| 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 #include "src/hydrogen-osr.h" | 7 #include "src/hydrogen-osr.h" |
| 8 #include "src/lithium-allocator-inl.h" | 8 #include "src/lithium-allocator-inl.h" |
| 9 #include "src/mips64/lithium-codegen-mips64.h" | 9 #include "src/mips64/lithium-codegen-mips64.h" |
| 10 #include "src/mips64/lithium-mips64.h" | 10 #include "src/mips64/lithium-mips64.h" |
| (...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1300 return result; | 1300 return result; |
| 1301 } | 1301 } |
| 1302 | 1302 |
| 1303 | 1303 |
| 1304 LInstruction* LChunkBuilder::DoDivI(HDiv* instr) { | 1304 LInstruction* LChunkBuilder::DoDivI(HDiv* instr) { |
| 1305 ASSERT(instr->representation().IsSmiOrInteger32()); | 1305 ASSERT(instr->representation().IsSmiOrInteger32()); |
| 1306 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1306 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 1307 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1307 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1308 LOperand* dividend = UseRegister(instr->left()); | 1308 LOperand* dividend = UseRegister(instr->left()); |
| 1309 LOperand* divisor = UseRegister(instr->right()); | 1309 LOperand* divisor = UseRegister(instr->right()); |
| 1310 LOperand* temp = instr->CheckFlag(HInstruction::kAllUsesTruncatingToInt32) |
| 1311 ? NULL : TempRegister(); |
| 1310 LInstruction* result = | 1312 LInstruction* result = |
| 1311 DefineAsRegister(new(zone()) LDivI(dividend, divisor)); | 1313 DefineAsRegister(new(zone()) LDivI(dividend, divisor, temp)); |
| 1312 if (instr->CheckFlag(HValue::kCanBeDivByZero) || | 1314 if (instr->CheckFlag(HValue::kCanBeDivByZero) || |
| 1313 instr->CheckFlag(HValue::kBailoutOnMinusZero) || | 1315 instr->CheckFlag(HValue::kBailoutOnMinusZero) || |
| 1314 (instr->CheckFlag(HValue::kCanOverflow) && | 1316 (instr->CheckFlag(HValue::kCanOverflow) && |
| 1315 !instr->CheckFlag(HValue::kAllUsesTruncatingToInt32)) || | 1317 !instr->CheckFlag(HValue::kAllUsesTruncatingToInt32)) || |
| 1316 (!instr->IsMathFloorOfDiv() && | 1318 (!instr->IsMathFloorOfDiv() && |
| 1317 !instr->CheckFlag(HValue::kAllUsesTruncatingToInt32))) { | 1319 !instr->CheckFlag(HValue::kAllUsesTruncatingToInt32))) { |
| 1318 result = AssignEnvironment(result); | 1320 result = AssignEnvironment(result); |
| 1319 } | 1321 } |
| 1320 return result; | 1322 return result; |
| 1321 } | 1323 } |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2549 HAllocateBlockContext* instr) { | 2551 HAllocateBlockContext* instr) { |
| 2550 LOperand* context = UseFixed(instr->context(), cp); | 2552 LOperand* context = UseFixed(instr->context(), cp); |
| 2551 LOperand* function = UseRegisterAtStart(instr->function()); | 2553 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2552 LAllocateBlockContext* result = | 2554 LAllocateBlockContext* result = |
| 2553 new(zone()) LAllocateBlockContext(context, function); | 2555 new(zone()) LAllocateBlockContext(context, function); |
| 2554 return MarkAsCall(DefineFixed(result, cp), instr); | 2556 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2555 } | 2557 } |
| 2556 | 2558 |
| 2557 | 2559 |
| 2558 } } // namespace v8::internal | 2560 } } // namespace v8::internal |
| OLD | NEW |