Index: src/compiler/arm/code-generator-arm.cc |
diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc |
index 956fbbde8cc3a1d6f9a4fd64e9c6b1ce8fd2e707..8b7f9c117fbb96a435ef0d265456e25919936ae2 100644 |
--- a/src/compiler/arm/code-generator-arm.cc |
+++ b/src/compiler/arm/code-generator-arm.cc |
@@ -501,6 +501,12 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, |
case kUnsignedGreaterThan: |
__ b(hi, tlabel); |
break; |
+ case kOverflow: |
+ __ b(vs, tlabel); |
+ break; |
+ case kNotOverflow: |
+ __ b(vc, tlabel); |
+ break; |
} |
if (!fallthru) __ b(flabel); // no fallthru to flabel. |
__ bind(&done); |
@@ -513,9 +519,11 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr, |
ArmOperandConverter i(this, instr); |
Label done; |
- // Materialize a full 32-bit 1 or 0 value. |
+ // Materialize a full 32-bit 1 or 0 value. The result register is always the |
+ // last output of the instruction. |
Label check; |
- Register reg = i.OutputRegister(); |
+ ASSERT_NE(0, instr->OutputCount()); |
+ Register reg = i.OutputRegister(instr->OutputCount() - 1); |
Condition cc = kNoCondition; |
switch (condition) { |
case kUnorderedEqual: |
@@ -578,6 +586,12 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr, |
case kUnsignedGreaterThan: |
cc = hi; |
break; |
+ case kOverflow: |
+ cc = vs; |
+ break; |
+ case kNotOverflow: |
+ cc = vc; |
+ break; |
} |
__ bind(&check); |
__ mov(reg, Operand(0)); |