Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index 2a079404730de74a0a71050174d2564002894a8e..03e0057dae09debbb5623fe3611b012daac0f465 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -241,8 +241,6 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
break; |
case kMipsTst: |
// Psuedo-instruction used for tst/branch. |
paul.l...
2014/11/04 19:04:27
Suggest adding "No opcode emitted here." to commen
dusmil.imgtec
2014/11/04 19:46:11
Done.
|
- __ And(kCompareReg, i.InputRegister(0), i.InputOperand(1)); |
- break; |
case kMipsCmp: |
// Psuedo-instruction used for cmp/branch. No opcode emitted here. |
break; |
@@ -418,7 +416,6 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, |
// not separated by other instructions. |
if (instr->arch_opcode() == kMipsTst) { |
- // The kMipsTst psuedo-instruction emits And to 'kCompareReg' register. |
switch (condition) { |
case kNotEqual: |
cc = ne; |
@@ -430,7 +427,8 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, |
UNSUPPORTED_COND(kMipsTst, condition); |
break; |
} |
- __ Branch(tlabel, cc, kCompareReg, Operand(zero_reg)); |
+ __ And(at, i.InputRegister(0), i.InputOperand(1)); |
+ __ Branch(tlabel, cc, at, Operand(zero_reg)); |
} else if (instr->arch_opcode() == kMipsAddOvf || |
instr->arch_opcode() == kMipsSubOvf) { |
@@ -557,7 +555,6 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr, |
// TODO(plind): Add CHECK() to ensure that test/cmp and this branch were |
// not separated by other instructions. |
if (instr->arch_opcode() == kMipsTst) { |
- // The kMipsTst psuedo-instruction emits And to 'kCompareReg' register. |
switch (condition) { |
case kNotEqual: |
cc = ne; |
@@ -569,7 +566,8 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr, |
UNSUPPORTED_COND(kMipsTst, condition); |
break; |
} |
- __ Branch(USE_DELAY_SLOT, &done, cc, kCompareReg, Operand(zero_reg)); |
+ __ And(at, i.InputRegister(0), i.InputOperand(1)); |
+ __ Branch(USE_DELAY_SLOT, &done, cc, at, Operand(zero_reg)); |
__ li(result, Operand(1)); // In delay slot. |
} else if (instr->arch_opcode() == kMipsAddOvf || |