diff options
author | Shan Hai <shan.hai@windriver.com> | 2010-11-17 10:28:53 +0800 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-03-15 13:48:15 -0500 |
commit | afc0a07d4a283599ac3a6a31d7454e9baaeccca0 (patch) | |
tree | 0cc07560a34c697f1f67841ee637170f4e38e416 /firmware/bnx2x | |
parent | cf773702b912544fdb8573c5f4299513d66bb0bf (diff) | |
download | linux-afc0a07d4a283599ac3a6a31d7454e9baaeccca0.tar.gz linux-afc0a07d4a283599ac3a6a31d7454e9baaeccca0.tar.bz2 linux-afc0a07d4a283599ac3a6a31d7454e9baaeccca0.zip |
powerpc/85xx: Fix SPE float to integer conversion failure
Conversion from float to integer should based on both the instruction
encoding and the sign of the operand.
A simple testcase to show the issue:
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
Signed-off-by: Shan Hai <shan.hai@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'firmware/bnx2x')
0 files changed, 0 insertions, 0 deletions