Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index 38aa8f8260b414b836c3d25dfa54d5edf8b4b0b3..668e0a9159925431113bad2d0f10efc59ff38bed 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -1767,6 +1767,32 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
} |
+LInstruction* LChunkBuilder::DoToInt32(HToInt32* instr) { |
+ HValue* value = instr->value(); |
+ Representation input_rep = value->representation(); |
+ LOperand* reg = UseRegister(value); |
+ if (input_rep.IsDouble()) { |
+ LDoubleToI* res = new LDoubleToI(reg, |
Kevin Millikin (Chromium)
2011/05/26 07:53:37
Two space indent here.
I'd name the two TempRegis
danno
2011/06/01 13:14:41
Done.
|
+ TempRegister(), |
+ TempRegister()); |
+ return AssignEnvironment(DefineAsRegister(res)); |
+ } else if (input_rep.IsInteger32()) { |
+ // Canonicalization should already have removed the hydrogen instruction in |
+ // this case, since it is a noop. |
+ UNREACHABLE(); |
+ return NULL; |
+ } else { |
+ ASSERT(input_rep.IsTagged()); |
+ LOperand* temp1 = TempRegister(); |
+ LOperand* temp2 = TempRegister(); |
+ LOperand* temp3 = FixedTemp(d3); |
+ LInstruction* res = DefineSameAsFirst( |
Kevin Millikin (Chromium)
2011/05/26 07:53:37
I like
LTaggedToI* res = new LTaggedToI(reg, temp
danno
2011/06/01 13:14:41
Done.
|
+ new LTaggedToI(reg, temp1, temp2, temp3)); |
+ return AssignEnvironment(res); |
+ } |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
return new LReturn(UseFixed(instr->value(), r0)); |
} |