Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 542018fddd084c20fb9fc1f024a4d8a92e41cccd..15099da8ebcbfd477c24ecdf3234db70ee4ce613 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -3056,6 +3056,10 @@ static void GenerateSmiKeyCheck(MacroAssembler* masm, |
__ ucomisd(xmm_scratch1, xmm_scratch0); |
__ j(not_equal, fail); |
__ j(parity_even, fail); // NaN. |
+#if V8_USE_31_BITS_SMI_VALUE |
+ __ cmpl(scratch, Immediate(0xc0000000)); |
+ __ j(sign, fail); |
+#endif |
__ Integer32ToSmi(key, scratch); |
__ bind(&key_ok); |
} |