aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/math/asinl.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-08-30 14:12:48 +0200
committerCorinna Vinschen <corinna@vinschen.de>2020-08-30 14:27:43 +0200
commit023ddc41283b3508d32eb00bb45a7408cc196ffa (patch)
tree7300185b9e93460684d359c44468aba92cdc4254 /winsup/cygwin/math/asinl.c
parent0e6690a92ccda8b2d6a759bc1649c6160137d170 (diff)
downloadnewlib-023ddc41283b3508d32eb00bb45a7408cc196ffa.zip
newlib-023ddc41283b3508d32eb00bb45a7408cc196ffa.tar.gz
newlib-023ddc41283b3508d32eb00bb45a7408cc196ffa.tar.bz2
Cygwin: crt: Add "volatile" to all inline assembly snippets under math
On 32 bit x86, clang seems to miss loading input parameters based on asm constraints for inline assembly that uses the x87 floating registers, unless the snippet has got the volatile keyword. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'winsup/cygwin/math/asinl.c')
-rw-r--r--winsup/cygwin/math/asinl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/math/asinl.c b/winsup/cygwin/math/asinl.c
index a4d8746..35df3b5 100644
--- a/winsup/cygwin/math/asinl.c
+++ b/winsup/cygwin/math/asinl.c
@@ -16,7 +16,8 @@ long double asinl (long double x)
{
long double res = 0.0L;
- asm ( "fld %%st\n\t"
+ asm volatile (
+ "fld %%st\n\t"
"fmul %%st(0)\n\t" /* x^2 */
"fld1\n\t"
"fsubp\n\t" /* 1 - x^2 */