Chromium Code Reviews| Index: src/crankshaft/s390/lithium-s390.cc |
| diff --git a/src/crankshaft/s390/lithium-s390.cc b/src/crankshaft/s390/lithium-s390.cc |
| index 3d1476403295ffe6d6c06d7f30e910cf81192aea..4698d33938c16f0afc25f9b9d91d41d548fd3259 100644 |
| --- a/src/crankshaft/s390/lithium-s390.cc |
| +++ b/src/crankshaft/s390/lithium-s390.cc |
| @@ -20,6 +20,18 @@ namespace internal { |
| LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE) |
| #undef DEFINE_COMPILE |
| +const char* LInstruction::GetOpcodeName(LInstruction::Opcode op) { |
| + switch (op) { |
|
JoranSiu
2016/12/07 21:01:42
What is the purpose of this new function? I don't
|
| +#define DECLARE_OPCODE(type) \ |
| + case Opcode::k##type: \ |
| + return #type; |
| + LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_OPCODE) |
| +#undef DECLARE_OPCODE |
| + default: |
| + return NULL; |
| + } |
| +} |
| + |
| #ifdef DEBUG |
| void LInstruction::VerifyCall() { |
| // Call instructions can use only fixed registers as temporaries and |
| @@ -1353,12 +1365,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 +1380,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()); |