Reviewers: Vyacheslav Egorov,
Description:
X64 Crankshaft: Fix error in pushed register indices for safepoints. Fixes
issue 1153.
BUG=1153
TEST=mjsunit/date-parse
Please review this at http://codereview.chromium.org/6518007/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/x64/macro-assembler-x64.h
M src/x64/macro-assembler-x64.cc
M test/mjsunit/mjsunit.status
Index: src/x64/macro-assembler-x64.cc
===================================================================
--- src/x64/macro-assembler-x64.cc (revision 6775)
+++ src/x64/macro-assembler-x64.cc (working copy)
@@ -1442,6 +1442,7 @@
// r13 is kRootRegister.
push(r14);
// r15 is kSmiConstantRegister
+ STATIC_ASSERT(11 == kRegistersPushedByPushad);
}
@@ -1461,7 +1462,6 @@
void MacroAssembler::Dropad() {
- const int kRegistersPushedByPushad = 11;
addq(rsp, Immediate(kRegistersPushedByPushad * kPointerSize));
}
Index: src/x64/macro-assembler-x64.h
===================================================================
--- src/x64/macro-assembler-x64.h (revision 6775)
+++ src/x64/macro-assembler-x64.h (working copy)
@@ -171,7 +171,8 @@
void PushSafepointRegisters() { Pushad(); }
void PopSafepointRegisters() { Popad(); }
static int SafepointRegisterStackIndex(int reg_code) {
- return kSafepointPushRegisterIndices[reg_code];
+ return kRegistersPushedByPushad - 1 -
+ kSafepointPushRegisterIndices[reg_code];
}
@@ -966,6 +967,8 @@
// 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;
+
bool generating_stub_;
bool allow_stub_calls_;
Index: test/mjsunit/mjsunit.status
===================================================================
--- test/mjsunit/mjsunit.status (revision 6775)
+++ test/mjsunit/mjsunit.status (working copy)
@@ -125,9 +125,6 @@
# BUG (1094)
regress/regress-deopt-gc: SKIP
-# BUG (1153)
-date-parse: SKIP
-
##############################################################################
[ $arch == mips ]
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev