Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 80f61db7774f2455a79e703271c31c1f9d800fe8..b36f4f059332b93b0be6eeea2fc52f9bb0b07b2e 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -3278,6 +3278,8 @@ void MacroAssembler::TruncateHeapNumberToI(Register result_reg, |
} |
bind(&done); |
+ // Keep our invariant that the upper 32 bits are zero. |
+ movl(result_reg, result_reg); |
} |
@@ -3294,6 +3296,8 @@ void MacroAssembler::TruncateDoubleToI(Register result_reg, |
addp(rsp, Immediate(kDoubleSize)); |
bind(&done); |
+ // Keep our invariant that the upper 32 bits are zero. |
+ movl(result_reg, result_reg); |
} |