fix float to integer conversion

Java requires that NaNs be converted to zero and that numbers at or
beyond the limits of integer representation be clamped to the largest
or smallest value that can be represented, respectively.
This commit is contained in:
Joel Dice
2012-08-12 14:31:58 -06:00
parent 47503854d5
commit b98abe3f94
6 changed files with 132 additions and 10 deletions

View File

@ -2379,7 +2379,11 @@ class MyArchitecture: public Assembler::Architecture {
break;
case Float2Int:
if (vfpSupported() && bSize == 4) {
// todo: Java requires different semantics than SSE for
// converting floats to integers, we we need to either use
// thunks or produce inline machine code which handles edge
// cases properly.
if (false && vfpSupported() && bSize == 4) {
*aTypeMask = (1 << RegisterOperand);
*aRegisterMask = FPR_MASK64;
} else {