diff options
author | Peter Collingbourne <pcc@google.com> | 2013-05-15 20:31:53 +0200 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2013-05-15 20:31:53 +0200 |
commit | 791f3ba0db02911933255d080b8ff973330b9ebf (patch) | |
tree | 7d54d11ba341791af9dbf0e94d5cfeda98c78694 /sysdeps | |
parent | 39b1f6172a2f9ddc74a8f82d6e84dd13b22dbaf2 (diff) | |
download | glibc-791f3ba0db02911933255d080b8ff973330b9ebf.zip glibc-791f3ba0db02911933255d080b8ff973330b9ebf.tar.gz glibc-791f3ba0db02911933255d080b8ff973330b9ebf.tar.bz2 |
Use x constraints for operands to vfmaddss and vfmaddsd
While these instructions accept memory operands, only one operand
may be a memory operand. Giving two operands xm constraints gives
the compiler the option of using memory for both operands, which
would result in invalid assembly code. Using x for all operands is
more appropriate, as most x86_64 calling conventions will pass the
arguments in registers anyway.
2013-05-15 Peter Collingbourne <pcc@google.com>
* sysdeps/x86_64/fpu/multiarch/s_fma.c (__fma_fma4): Replace xm
constraints with x constraints.
* sysdeps/x86_64/fpu/multiarch/s_fmaf.c (__fmaf_fma4): Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/s_fma.c | 2 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/s_fmaf.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/s_fma.c b/sysdeps/x86_64/fpu/multiarch/s_fma.c index ea18559..25a306f 100644 --- a/sysdeps/x86_64/fpu/multiarch/s_fma.c +++ b/sysdeps/x86_64/fpu/multiarch/s_fma.c @@ -38,7 +38,7 @@ __fma_fma3 (double x, double y, double z) static double __fma_fma4 (double x, double y, double z) { - asm ("vfmaddsd %3, %2, %1, %0" : "=x" (x) : "x" (x), "xm" (y), "xm" (z)); + asm ("vfmaddsd %3, %2, %1, %0" : "=x" (x) : "x" (x), "x" (y), "x" (z)); return x; } # else diff --git a/sysdeps/x86_64/fpu/multiarch/s_fmaf.c b/sysdeps/x86_64/fpu/multiarch/s_fmaf.c index 9647d79..063be69 100644 --- a/sysdeps/x86_64/fpu/multiarch/s_fmaf.c +++ b/sysdeps/x86_64/fpu/multiarch/s_fmaf.c @@ -37,7 +37,7 @@ __fmaf_fma3 (float x, float y, float z) static float __fmaf_fma4 (float x, float y, float z) { - asm ("vfmaddss %3, %2, %1, %0" : "=x" (x) : "x" (x), "xm" (y), "xm" (z)); + asm ("vfmaddss %3, %2, %1, %0" : "=x" (x) : "x" (x), "x" (y), "x" (z)); return x; } # else |