diff options
Diffstat (limited to 'deps/v8/src/crankshaft/s390/lithium-s390.cc')
-rw-r--r-- | deps/v8/src/crankshaft/s390/lithium-s390.cc | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/deps/v8/src/crankshaft/s390/lithium-s390.cc b/deps/v8/src/crankshaft/s390/lithium-s390.cc index 3d14764032..79868f5579 100644 --- a/deps/v8/src/crankshaft/s390/lithium-s390.cc +++ b/deps/v8/src/crankshaft/s390/lithium-s390.cc @@ -619,7 +619,9 @@ LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); LArithmeticD* result = new (zone()) LArithmeticD(op, left, right); - return DefineSameAsFirst(result); + return CpuFeatures::IsSupported(VECTOR_FACILITY) + ? DefineAsRegister(result) + : DefineSameAsFirst(result); } } @@ -1056,7 +1058,7 @@ LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { } LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { - LOperand* input = UseRegisterAtStart(instr->value()); + LOperand* input = UseAtStart(instr->value()); LMathSqrt* result = new (zone()) LMathSqrt(input); return DefineAsRegister(result); } @@ -1353,12 +1355,6 @@ LInstruction* LChunkBuilder::DoSub(HSub* instr) { DCHECK(instr->left()->representation().Equals(instr->representation())); DCHECK(instr->right()->representation().Equals(instr->representation())); - if (instr->left()->IsConstant() && - !instr->CheckFlag(HValue::kCanOverflow)) { - // If lhs is constant, do reverse subtraction instead. - return DoRSub(instr); - } - LOperand* left = UseRegisterAtStart(instr->left()); LOperand* right = UseOrConstantAtStart(instr->right()); LSubI* sub = new (zone()) LSubI(left, right); @@ -1374,21 +1370,6 @@ LInstruction* LChunkBuilder::DoSub(HSub* instr) { } } -LInstruction* LChunkBuilder::DoRSub(HSub* instr) { - DCHECK(instr->representation().IsSmiOrInteger32()); - DCHECK(instr->left()->representation().Equals(instr->representation())); - DCHECK(instr->right()->representation().Equals(instr->representation())); - DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); - - // Note: The lhs of the subtraction becomes the rhs of the - // reverse-subtraction. - LOperand* left = UseRegisterAtStart(instr->right()); - LOperand* right = UseOrConstantAtStart(instr->left()); - LRSubI* rsb = new (zone()) LRSubI(left, right); - LInstruction* result = DefineAsRegister(rsb); - return result; -} - LInstruction* LChunkBuilder::DoMultiplyAdd(HMul* mul, HValue* addend) { LOperand* multiplier_op = UseRegister(mul->left()); LOperand* multiplicand_op = UseRegister(mul->right()); @@ -1697,7 +1678,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { } LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) { - LOperand* value = UseRegisterAtStart(instr->value()); + LOperand* value = UseAtStart(instr->value()); LInstruction* result = new (zone()) LCheckNonSmi(value); if (!instr->value()->type().IsHeapObject()) { result = AssignEnvironment(result); @@ -1706,7 +1687,7 @@ LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) { } LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { - LOperand* value = UseRegisterAtStart(instr->value()); + LOperand* value = UseAtStart(instr->value()); return AssignEnvironment(new (zone()) LCheckSmi(value)); } |