don't use SSE for long-to-double conversion on 32-bit systems

This commit is contained in:
Joel Dice 2009-11-04 00:02:38 +00:00
parent ef9c1ee32c
commit fb5796b740
2 changed files with 16 additions and 8 deletions

View File

@ -2931,7 +2931,7 @@ class MyArchitecture: public Assembler::Architecture {
break;
case Int2Float:
if (useSSE(&c)) {
if (useSSE(&c) and (aSize <= BytesPerWord)) {
*aTypeMask = (1 << RegisterOperand) | (1 << MemoryOperand);
*aRegisterMask = GeneralRegisterMask
| (static_cast<uint64_t>(GeneralRegisterMask) << 32);

View File

@ -46,11 +46,13 @@ public class Floats {
expect(subtract(0.5d, 0.1d) == 0.4d);
double d = 1d;
expect(((int) d) == 1);
{ double d = 1d;
expect(((int) d) == 1);
}
float f = 1f;
expect(((int) f) == 1);
{ float f = 1f;
expect(((int) f) == 1);
}
expect(Math.round(0.4f) == 0);
expect(Math.round(0.5f) == 1);
@ -62,8 +64,14 @@ public class Floats {
expect(Math.round(1.0d) == 1);
expect(Math.round(1.9d) == 2);
float b = 1.0f;
int blue = (int)(b * 255 + 0.5);
expect(blue == 255);
{ float b = 1.0f;
int blue = (int)(b * 255 + 0.5);
expect(blue == 255);
}
{ long z = 6553311036568663L;
double d = (double) z;
expect(d == 6553311036568663.0);
}
}
}