[Bug target/15492] floating-point arguments are loaded too early to x87 stack
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Apr 15 14:38:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15492
--- Comment #13 from Uroš Bizjak <ubizjak at gmail dot com> ---
Recent gcc generates:
testcase from Comment #0:
double test (double a, double b)
{
return a*a + b*b;
}
fldl 4(%esp)
fmul %st(0), %st
fldl 12(%esp)
fmul %st(0), %st
faddp %st, %st(1)
ret
first testcase from Comment #3:
double test1 (double a, int x, double b, int y, double c)
{
return sin (c) + tan (b) * sqrt (a) + x * fabs (b) + y;
}
fldl 28(%esp)
fsin
fldl 16(%esp)
fptan
fstp %st(0)
fldl 4(%esp)
fsqrt
fldl 16(%esp)
fabs
fimull 12(%esp)
fiaddl 24(%esp)
faddp %st, %st(3)
fmulp %st, %st(1)
faddp %st, %st(1)
ret
second testcase from comment #3:
double test1 (double y, double x)
{
return atan2(x, y);
}
fldl 12(%esp)
fldl 4(%esp)
fpatan
ret
More information about the Gcc-bugs
mailing list