Index: src/x64/macro-assembler-x64.cc |
=================================================================== |
--- src/x64/macro-assembler-x64.cc (revision 6786) |
+++ src/x64/macro-assembler-x64.cc (working copy) |
@@ -1443,13 +1443,15 @@ |
push(r14); |
// r15 is kSmiConstantRegister |
STATIC_ASSERT(11 == kNumSafepointSavedRegisters); |
- subq(rsp, Immediate( |
- (kNumSafepointRegisters-kNumSafepointSavedRegisters) * kPointerSize)); |
+ // Use lea for symmetry with Popad. |
+ lea(rsp, Operand(rsp, |
+ -(kNumSafepointRegisters-kNumSafepointSavedRegisters) * kPointerSize)); |
} |
void MacroAssembler::Popad() { |
- addq(rsp, Immediate( |
+ // Popad must not change the flags, so use lea instead of addq. |
+ lea(rsp, Operand(rsp, |
(kNumSafepointRegisters-kNumSafepointSavedRegisters) * kPointerSize)); |
pop(r14); |
pop(r12); |