summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2017-04-14 14:30:57 +0200
committerRichard Henderson <rth@twiddle.net>2017-04-26 04:21:59 -0700
commit1e1f44de64d12a9539155665cd0aedee7909b00d (patch)
tree77c78e26ffa17bdaac989f2f1b6a62e40200a1f9 /sysdeps
parent9fe3c80c7c3dbce34dadc7f0693d211fdd9a0b03 (diff)
downloadglibc-1e1f44de64d12a9539155665cd0aedee7909b00d.tar.gz
glibc-1e1f44de64d12a9539155665cd0aedee7909b00d.tar.xz
glibc-1e1f44de64d12a9539155665cd0aedee7909b00d.zip
Add earlyclobber to sqrtt/sqrtf insns.
When using software completions, we have to prevent assembler to match
input and output operands of sqrtt/sqrtf insn. Add earlyclobber to
output operand to avoid unwanted operand matching.

2017-04-14  Uros Bizjak  <ubizjak@gmail.com>

    * sysdeps/alpha/fpu/math_private.h (__ieee754_sqrt): Add
    earlyclobber to output operand of sqrt insn.
    (__ieee754_sqrtf): Ditto.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/fpu/math_private.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/alpha/fpu/math_private.h b/sysdeps/alpha/fpu/math_private.h
index 9e06e25dc6..1e97c867c3 100644
--- a/sysdeps/alpha/fpu/math_private.h
+++ b/sysdeps/alpha/fpu/math_private.h
@@ -27,9 +27,9 @@ __ieee754_sqrt (double d)
 {
   double ret;
 # ifdef _IEEE_FP_INEXACT
-  asm ("sqrtt/suid %1,%0" : "=f"(ret) : "f"(d));
+  asm ("sqrtt/suid %1,%0" : "=&f"(ret) : "f"(d));
 # else
-  asm ("sqrtt/sud %1,%0" : "=f"(ret) : "f"(d));
+  asm ("sqrtt/sud %1,%0" : "=&f"(ret) : "f"(d));
 # endif
   return ret;
 }
@@ -39,9 +39,9 @@ __ieee754_sqrtf (float d)
 {
   float ret;
 # ifdef _IEEE_FP_INEXACT
-  asm ("sqrts/suid %1,%0" : "=f"(ret) : "f"(d));
+  asm ("sqrts/suid %1,%0" : "=&f"(ret) : "f"(d));
 # else
-  asm ("sqrts/sud %1,%0" : "=f"(ret) : "f"(d));
+  asm ("sqrts/sud %1,%0" : "=&f"(ret) : "f"(d));
 # endif
   return ret;
 }