Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/arm/lithium-arm.cc

Issue 775613002: Fixed environment handling for LFlooringDivI on ARM. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added test Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-437765.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/arm/lithium-codegen-arm.h" 9 #include "src/arm/lithium-codegen-arm.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 1390
1391 1391
1392 LInstruction* LChunkBuilder::DoFlooringDivI(HMathFloorOfDiv* instr) { 1392 LInstruction* LChunkBuilder::DoFlooringDivI(HMathFloorOfDiv* instr) {
1393 DCHECK(instr->representation().IsSmiOrInteger32()); 1393 DCHECK(instr->representation().IsSmiOrInteger32());
1394 DCHECK(instr->left()->representation().Equals(instr->representation())); 1394 DCHECK(instr->left()->representation().Equals(instr->representation()));
1395 DCHECK(instr->right()->representation().Equals(instr->representation())); 1395 DCHECK(instr->right()->representation().Equals(instr->representation()));
1396 LOperand* dividend = UseRegister(instr->left()); 1396 LOperand* dividend = UseRegister(instr->left());
1397 LOperand* divisor = UseRegister(instr->right()); 1397 LOperand* divisor = UseRegister(instr->right());
1398 LOperand* temp = 1398 LOperand* temp =
1399 CpuFeatures::IsSupported(SUDIV) ? NULL : TempDoubleRegister(); 1399 CpuFeatures::IsSupported(SUDIV) ? NULL : TempDoubleRegister();
1400 LFlooringDivI* div = new(zone()) LFlooringDivI(dividend, divisor, temp); 1400 LInstruction* result =
1401 return AssignEnvironment(DefineAsRegister(div)); 1401 DefineAsRegister(new (zone()) LFlooringDivI(dividend, divisor, temp));
1402 if (instr->CheckFlag(HValue::kCanBeDivByZero) ||
1403 instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
1404 (instr->CheckFlag(HValue::kCanOverflow) &&
1405 (!CpuFeatures::IsSupported(SUDIV) ||
1406 !instr->CheckFlag(HValue::kAllUsesTruncatingToInt32)))) {
1407 result = AssignEnvironment(result);
1408 }
1409 return result;
1402 } 1410 }
1403 1411
1404 1412
1405 LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) { 1413 LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) {
1406 if (instr->RightIsPowerOf2()) { 1414 if (instr->RightIsPowerOf2()) {
1407 return DoFlooringDivByPowerOf2I(instr); 1415 return DoFlooringDivByPowerOf2I(instr);
1408 } else if (instr->right()->IsConstant()) { 1416 } else if (instr->right()->IsConstant()) {
1409 return DoFlooringDivByConstI(instr); 1417 return DoFlooringDivByConstI(instr);
1410 } else { 1418 } else {
1411 return DoFlooringDivI(instr); 1419 return DoFlooringDivI(instr);
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 LInstruction* LChunkBuilder::DoAllocateBlockContext( 2639 LInstruction* LChunkBuilder::DoAllocateBlockContext(
2632 HAllocateBlockContext* instr) { 2640 HAllocateBlockContext* instr) {
2633 LOperand* context = UseFixed(instr->context(), cp); 2641 LOperand* context = UseFixed(instr->context(), cp);
2634 LOperand* function = UseRegisterAtStart(instr->function()); 2642 LOperand* function = UseRegisterAtStart(instr->function());
2635 LAllocateBlockContext* result = 2643 LAllocateBlockContext* result =
2636 new(zone()) LAllocateBlockContext(context, function); 2644 new(zone()) LAllocateBlockContext(context, function);
2637 return MarkAsCall(DefineFixed(result, cp), instr); 2645 return MarkAsCall(DefineFixed(result, cp), instr);
2638 } 2646 }
2639 2647
2640 } } // namespace v8::internal 2648 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-437765.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698