Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 12fce439f2ac9faab6e8b0164a836febe09414b0..7a943ddaecd539e5e5cfc48b16b8272bda5e45d8 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -4639,9 +4639,7 @@ void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
void LCodeGen::DoInteger32ToSmi(LInteger32ToSmi* instr) { |
LOperand* input = instr->value(); |
- ASSERT(input->IsRegister()); |
LOperand* output = instr->result(); |
- ASSERT(output->IsRegister()); |
__ SmiTag(ToRegister(output), ToRegister(input), SetCC); |
if (!instr->hydrogen()->value()->HasRange() || |
!instr->hydrogen()->value()->range()->IsInSmiRange()) { |
@@ -4660,6 +4658,18 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { |
} |
+void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) { |
+ LOperand* input = instr->value(); |
+ LOperand* output = instr->result(); |
+ if (!instr->hydrogen()->value()->HasRange() || |
+ !instr->hydrogen()->value()->range()->IsInSmiRange()) { |
+ __ tst(ToRegister(input), Operand(0xc0000000)); |
+ DeoptimizeIf(ne, instr->environment()); |
+ } |
+ __ SmiTag(ToRegister(output), ToRegister(input)); |
+} |
+ |
+ |
void LCodeGen::DoNumberTagI(LNumberTagI* instr) { |
class DeferredNumberTagI: public LDeferredCode { |
public: |