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 81298aaeca8e28970aa5ee874d346283734c7c93..5616337a6d8c63cd83123a76d8edf9f177cbb2e4 100644 |
--- a/src/compiler/arm/code-generator-arm.cc |
+++ b/src/compiler/arm/code-generator-arm.cc |
@@ -494,8 +494,15 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
DCHECK_EQ(SetCC, i.OutputSBit()); |
break; |
case kArmVcmpF64: |
- __ VFPCompareAndSetFlags(i.InputFloat64Register(0), |
- i.InputFloat64Register(1)); |
+ if (instr->InputAt(1)->IsDoubleRegister()) { |
+ __ VFPCompareAndSetFlags(i.InputFloat64Register(0), |
+ i.InputFloat64Register(1)); |
+ } else { |
+ DCHECK(instr->InputAt(1)->IsImmediate()); |
+ // 0.0 is the only immediate supported by vcmp instructions. |
+ DCHECK(i.InputDouble(1) == 0.0); |
+ __ VFPCompareAndSetFlags(i.InputFloat64Register(0), i.InputDouble(1)); |
+ } |
DCHECK_EQ(SetCC, i.OutputSBit()); |
break; |
case kArmVaddF64: |