OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/ia32/lithium-codegen-ia32.h" | 10 #include "src/ia32/lithium-codegen-ia32.h" |
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 | 1458 |
1459 | 1459 |
1460 LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { | 1460 LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { |
1461 ASSERT(instr->representation().IsSmiOrInteger32()); | 1461 ASSERT(instr->representation().IsSmiOrInteger32()); |
1462 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1462 ASSERT(instr->left()->representation().Equals(instr->representation())); |
1463 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1463 ASSERT(instr->right()->representation().Equals(instr->representation())); |
1464 LOperand* dividend = UseRegisterAtStart(instr->left()); | 1464 LOperand* dividend = UseRegisterAtStart(instr->left()); |
1465 int32_t divisor = instr->right()->GetInteger32Constant(); | 1465 int32_t divisor = instr->right()->GetInteger32Constant(); |
1466 LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( | 1466 LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( |
1467 dividend, divisor)); | 1467 dividend, divisor)); |
1468 if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { | 1468 if (instr->CheckFlag(HValue::kLeftCanBeNegative) && |
| 1469 instr->CheckFlag(HValue::kBailoutOnMinusZero)) { |
1469 result = AssignEnvironment(result); | 1470 result = AssignEnvironment(result); |
1470 } | 1471 } |
1471 return result; | 1472 return result; |
1472 } | 1473 } |
1473 | 1474 |
1474 | 1475 |
1475 LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) { | 1476 LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) { |
1476 ASSERT(instr->representation().IsSmiOrInteger32()); | 1477 ASSERT(instr->representation().IsSmiOrInteger32()); |
1477 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1478 ASSERT(instr->left()->representation().Equals(instr->representation())); |
1478 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1479 ASSERT(instr->right()->representation().Equals(instr->representation())); |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2698 LOperand* function = UseRegisterAtStart(instr->function()); | 2699 LOperand* function = UseRegisterAtStart(instr->function()); |
2699 LAllocateBlockContext* result = | 2700 LAllocateBlockContext* result = |
2700 new(zone()) LAllocateBlockContext(context, function); | 2701 new(zone()) LAllocateBlockContext(context, function); |
2701 return MarkAsCall(DefineFixed(result, esi), instr); | 2702 return MarkAsCall(DefineFixed(result, esi), instr); |
2702 } | 2703 } |
2703 | 2704 |
2704 | 2705 |
2705 } } // namespace v8::internal | 2706 } } // namespace v8::internal |
2706 | 2707 |
2707 #endif // V8_TARGET_ARCH_IA32 | 2708 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |