This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-19990112 sparcv9 FP bug
- To: egcs-bugs at cygnus dot com
- Subject: egcs-19990112 sparcv9 FP bug
- From: Jerry Kreuscher <jerry at microunity dot com>
- Date: Thu, 14 Jan 1999 13:59:00 -0800
Dear Friends,
There's a problem moving the result of fdtox to an integer register.
The second time that's done in the appended program, the wrong half of
the FP reg is stored. Strangely, the first time it works. We get:
fdtox %f4, %f2
st %f3, [%fp+2027]
ld [%fp+2027], %o1
But the second time, we get:
fdtox %f4, %f2
st %f2, [%fp+2031]
ld [%fp+2031], %o1
This is in snapshot 19990112 configured with
--target=sparcv9-sun-solaris2.
For what it's worth, this was exposed by the "assign" test of the
exprtest section of an old copy of Plum Hall.
If I can add anything useful, please let me know. Thank you for your
help.
Jerry
Test program:
double D;
static double *
pD (void)
{
return &D;
}
int
eqtest (int op1,
int op2)
{
return op1 == op2;
}
main (void)
{
unsigned int ui;
int result;
*pD() = 16;
ui = *pD();
result = eqtest (ui, (unsigned int) 16);
result += eqtest (ui = *pD(), (unsigned int) 16);
return result;
}