[2/2] mathops: change "g" constraint to "rm" in x86-32 version of MUL64().

Message ID 1300210649-6744-2-git-send-email-justin.ruggles@gmail.com
State Committed
Headers show

Commit Message

Justin Ruggles March 15, 2011, 5:37 p.m.
The 1-arg imul instruction cannot take an immediate argument, only a register
or memory argument.
---
 libavcodec/x86/mathops.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Mans Rullgard March 15, 2011, 5:40 p.m. | #1
Justin Ruggles <justin.ruggles@gmail.com> writes:

> The 1-arg imul instruction cannot take an immediate argument, only a register
> or memory argument.
> ---
>  libavcodec/x86/mathops.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
> index 4e54886..b183027 100644
> --- a/libavcodec/x86/mathops.h
> +++ b/libavcodec/x86/mathops.h
> @@ -59,7 +59,7 @@ static av_always_inline av_const int64_t MUL64(int a, int b)
>      __asm__ (
>          "imull %2"
>          :"=A"(rt)
> -        :"a"(a), "g"(b)
> +        :"a"(a), "rm"(b)
>      );
>      return rt;
>  }

OK

Patch

diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
index 4e54886..b183027 100644
--- a/libavcodec/x86/mathops.h
+++ b/libavcodec/x86/mathops.h
@@ -59,7 +59,7 @@  static av_always_inline av_const int64_t MUL64(int a, int b)
     __asm__ (
         "imull %2"
         :"=A"(rt)
-        :"a"(a), "g"(b)
+        :"a"(a), "rm"(b)
     );
     return rt;
 }