OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1666 return NULL; | 1666 return NULL; |
1667 } | 1667 } |
1668 | 1668 |
1669 | 1669 |
1670 LInstruction* LChunkBuilder::DoChange(HChange* instr) { | 1670 LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
1671 Representation from = instr->from(); | 1671 Representation from = instr->from(); |
1672 Representation to = instr->to(); | 1672 Representation to = instr->to(); |
1673 if (from.IsTagged()) { | 1673 if (from.IsTagged()) { |
1674 if (to.IsDouble()) { | 1674 if (to.IsDouble()) { |
1675 LOperand* value = UseRegister(instr->value()); | 1675 LOperand* value = UseRegister(instr->value()); |
1676 LNumberUntagD* res = new(zone()) LNumberUntagD(value); | 1676 // Temp register only necessary for minus zero check. |
| 1677 LOperand* temp = instr->CheckFlag(HValue::kBailoutOnMinusZero) |
| 1678 ? TempRegister() |
| 1679 : NULL; |
| 1680 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp); |
1677 return AssignEnvironment(DefineAsRegister(res)); | 1681 return AssignEnvironment(DefineAsRegister(res)); |
1678 } else { | 1682 } else { |
1679 ASSERT(to.IsInteger32()); | 1683 ASSERT(to.IsInteger32()); |
1680 LOperand* value = UseRegister(instr->value()); | 1684 LOperand* value = UseRegister(instr->value()); |
1681 bool needs_check = !instr->value()->type().IsSmi(); | 1685 bool needs_check = !instr->value()->type().IsSmi(); |
1682 if (needs_check) { | 1686 if (needs_check) { |
1683 bool truncating = instr->CanTruncateToInt32(); | 1687 bool truncating = instr->CanTruncateToInt32(); |
1684 LOperand* xmm_temp = | 1688 LOperand* xmm_temp = |
1685 (truncating && CpuFeatures::IsSupported(SSE3)) | 1689 (truncating && CpuFeatures::IsSupported(SSE3)) |
1686 ? NULL | 1690 ? NULL |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2388 LOperand* key = UseOrConstantAtStart(instr->key()); | 2392 LOperand* key = UseOrConstantAtStart(instr->key()); |
2389 LOperand* object = UseOrConstantAtStart(instr->object()); | 2393 LOperand* object = UseOrConstantAtStart(instr->object()); |
2390 LIn* result = new(zone()) LIn(context, key, object); | 2394 LIn* result = new(zone()) LIn(context, key, object); |
2391 return MarkAsCall(DefineFixed(result, eax), instr); | 2395 return MarkAsCall(DefineFixed(result, eax), instr); |
2392 } | 2396 } |
2393 | 2397 |
2394 | 2398 |
2395 } } // namespace v8::internal | 2399 } } // namespace v8::internal |
2396 | 2400 |
2397 #endif // V8_TARGET_ARCH_IA32 | 2401 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |