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_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-allocator-inl.h" | 10 #include "src/lithium-allocator-inl.h" |
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 | 1438 |
1439 | 1439 |
1440 LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { | 1440 LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { |
1441 ASSERT(instr->representation().IsSmiOrInteger32()); | 1441 ASSERT(instr->representation().IsSmiOrInteger32()); |
1442 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1442 ASSERT(instr->left()->representation().Equals(instr->representation())); |
1443 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1443 ASSERT(instr->right()->representation().Equals(instr->representation())); |
1444 LOperand* dividend = UseRegisterAtStart(instr->left()); | 1444 LOperand* dividend = UseRegisterAtStart(instr->left()); |
1445 int32_t divisor = instr->right()->GetInteger32Constant(); | 1445 int32_t divisor = instr->right()->GetInteger32Constant(); |
1446 LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( | 1446 LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( |
1447 dividend, divisor)); | 1447 dividend, divisor)); |
1448 if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { | 1448 if (instr->CheckFlag(HValue::kLeftCanBeNegative) && |
| 1449 instr->CheckFlag(HValue::kBailoutOnMinusZero)) { |
1449 result = AssignEnvironment(result); | 1450 result = AssignEnvironment(result); |
1450 } | 1451 } |
1451 return result; | 1452 return result; |
1452 } | 1453 } |
1453 | 1454 |
1454 | 1455 |
1455 LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) { | 1456 LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) { |
1456 ASSERT(instr->representation().IsSmiOrInteger32()); | 1457 ASSERT(instr->representation().IsSmiOrInteger32()); |
1457 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1458 ASSERT(instr->left()->representation().Equals(instr->representation())); |
1458 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1459 ASSERT(instr->right()->representation().Equals(instr->representation())); |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2674 LOperand* function = UseRegisterAtStart(instr->function()); | 2675 LOperand* function = UseRegisterAtStart(instr->function()); |
2675 LAllocateBlockContext* result = | 2676 LAllocateBlockContext* result = |
2676 new(zone()) LAllocateBlockContext(context, function); | 2677 new(zone()) LAllocateBlockContext(context, function); |
2677 return MarkAsCall(DefineFixed(result, rsi), instr); | 2678 return MarkAsCall(DefineFixed(result, rsi), instr); |
2678 } | 2679 } |
2679 | 2680 |
2680 | 2681 |
2681 } } // namespace v8::internal | 2682 } } // namespace v8::internal |
2682 | 2683 |
2683 #endif // V8_TARGET_ARCH_X64 | 2684 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |