From: Shan Hai Date: Wed, 17 Nov 2010 02:28:53 +0000 (+0800) Subject: powerpc/85xx: Fix SPE float to integer conversion failure X-Git-Tag: v2.6.39-rc1~430^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afc0a07d4a283599ac3a6a31d7454e9baaeccca0;p=pandora-kernel.git 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 Signed-off-by: Kumar Gala --- Reading git-diff-tree failed