linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* math_efp.c: Fixed SPE data type conversion failure
@ 2010-11-17  2:28 Shan Hai
  2010-11-17  2:28 ` [PATCH] Fix SPE float to integer " Shan Hai
  0 siblings, 1 reply; 3+ messages in thread
From: Shan Hai @ 2010-11-17  2:28 UTC (permalink / raw)
  To: linuxppc-dev


The following test case failed on Powerpc sbc8548 with CONFIG_SPE

static float fm;
static signed int si_min = (-2147483647 - 1);
static unsigned int ui;
int main()
{
        fm = (float) si_min; ;
        ui = (unsigned int)fm;
        printf("ui=%d, should be %d\n", ui, si_min);

        return 0;
}
Result: ui=-1, should be -2147483648

The reason is failure to emulate the minus float to unsigned integer conversion 
instruction in the SPE driver.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-15 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-17  2:28 math_efp.c: Fixed SPE data type conversion failure Shan Hai
2010-11-17  2:28 ` [PATCH] Fix SPE float to integer " Shan Hai
2011-03-15 15:51   ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).