X64 Crankshaft: Fix bug in pushed registers at safepoints. Fixes issue 1153 completely.
BUG=1153 TEST=mjsunit/mul-exhaustive TBR=kmillikin@chromium.org Review URL: http://codereview.chromium.org/6475012 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3711b87e8c
commit
6f2e90b1cb
@ -1442,11 +1442,15 @@ void MacroAssembler::Pushad() {
|
||||
// r13 is kRootRegister.
|
||||
push(r14);
|
||||
// r15 is kSmiConstantRegister
|
||||
STATIC_ASSERT(11 == kRegistersPushedByPushad);
|
||||
STATIC_ASSERT(11 == kNumSafepointSavedRegisters);
|
||||
subq(rsp, Immediate(
|
||||
(kNumSafepointRegisters-kNumSafepointSavedRegisters) * kPointerSize));
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::Popad() {
|
||||
addq(rsp, Immediate(
|
||||
(kNumSafepointRegisters-kNumSafepointSavedRegisters) * kPointerSize));
|
||||
pop(r14);
|
||||
pop(r12);
|
||||
pop(r11);
|
||||
@ -1462,7 +1466,7 @@ void MacroAssembler::Popad() {
|
||||
|
||||
|
||||
void MacroAssembler::Dropad() {
|
||||
addq(rsp, Immediate(kRegistersPushedByPushad * kPointerSize));
|
||||
addq(rsp, Immediate(kNumSafepointRegisters * kPointerSize));
|
||||
}
|
||||
|
||||
|
||||
|
@ -171,7 +171,7 @@ class MacroAssembler: public Assembler {
|
||||
void PushSafepointRegisters() { Pushad(); }
|
||||
void PopSafepointRegisters() { Popad(); }
|
||||
static int SafepointRegisterStackIndex(int reg_code) {
|
||||
return kRegistersPushedByPushad - 1 -
|
||||
return kNumSafepointRegisters - 1 -
|
||||
kSafepointPushRegisterIndices[reg_code];
|
||||
}
|
||||
|
||||
@ -967,7 +967,7 @@ class MacroAssembler: public Assembler {
|
||||
// Order general registers are pushed by Pushad.
|
||||
// rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r12, r14.
|
||||
static int kSafepointPushRegisterIndices[Register::kNumRegisters];
|
||||
static const int kRegistersPushedByPushad = 11;
|
||||
static const int kNumSafepointSavedRegisters = 11;
|
||||
|
||||
bool generating_stub_;
|
||||
bool allow_stub_calls_;
|
||||
|
Loading…
Reference in New Issue
Block a user