math_efp.c: Fixed SPE data type conversion failure
Shan Hai
shan.hai at windriver.com
Wed Nov 17 13:28:52 EST 2010
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.
More information about the Linuxppc-dev
mailing list