Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 042a47080895f340c98feabba695b346f1f548a5..46c87e1d62a9686627ec995c363fb87d6d7e5d41 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -5012,6 +5012,17 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { |
} |
+void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) { |
+ Register input = ToRegister(instr->value()); |
+ if (!instr->hydrogen()->value()->HasRange() || |
+ !instr->hydrogen()->value()->range()->IsInSmiRange()) { |
+ __ test(input, Immediate(0xc0000000)); |
+ DeoptimizeIf(not_zero, instr->environment()); |
+ } |
+ __ SmiTag(input); |
+} |
+ |
+ |
void LCodeGen::DoNumberTagI(LNumberTagI* instr) { |
class DeferredNumberTagI V8_FINAL : public LDeferredCode { |
public: |