Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 1da0866b3c2333778e5433da9dd69c6d30604fd8..c4b26cd1bf5d7002a2762ddfd77e45c4fbd4fb0d 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -971,10 +971,11 @@ void MacroAssembler::EnterExitFramePrologue() { |
void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) { |
// Optionally save all XMM registers. |
if (save_doubles) { |
- int space = XMMRegister::kNumRegisters * kDoubleSize + argc * kPointerSize; |
+ int space = XMMRegister::kMaxNumRegisters * kDoubleSize + |
+ argc * kPointerSize; |
sub(esp, Immediate(space)); |
const int offset = -2 * kPointerSize; |
- for (int i = 0; i < XMMRegister::kNumRegisters; i++) { |
+ for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) { |
XMMRegister reg = XMMRegister::from_code(i); |
movsd(Operand(ebp, offset - ((i + 1) * kDoubleSize)), reg); |
} |
@@ -1017,7 +1018,7 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles) { |
// Optionally restore all XMM registers. |
if (save_doubles) { |
const int offset = -2 * kPointerSize; |
- for (int i = 0; i < XMMRegister::kNumRegisters; i++) { |
+ for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) { |
XMMRegister reg = XMMRegister::from_code(i); |
movsd(reg, Operand(ebp, offset - ((i + 1) * kDoubleSize))); |
} |