Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index e7ec59cfa89d39d11270f1664d8342511351b954..fbe8e171fa596967a65aff143823863b4570dca8 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -4650,9 +4650,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()) { |
@@ -4671,6 +4669,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 V8_FINAL : public LDeferredCode { |
public: |