X64 Crankshaft: Fix error in pushed register indices for safepoints. Fixes issue...
authorwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 14 Feb 2011 16:02:02 +0000 (16:02 +0000)
committerwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 14 Feb 2011 16:02:02 +0000 (16:02 +0000)
BUG=1153
TEST=mjsunit/date-parse

Review URL: http://codereview.chromium.org/6518007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/x64/macro-assembler-x64.cc
src/x64/macro-assembler-x64.h
test/mjsunit/mjsunit.status

index b28d44e..f66883a 100644 (file)
@@ -1442,6 +1442,7 @@ void MacroAssembler::Pushad() {
   // r13 is kRootRegister.
   push(r14);
   // r15 is kSmiConstantRegister
+  STATIC_ASSERT(11 == kRegistersPushedByPushad);
 }
 
 
@@ -1461,7 +1462,6 @@ void MacroAssembler::Popad() {
 
 
 void MacroAssembler::Dropad() {
-  const int kRegistersPushedByPushad = 11;
   addq(rsp, Immediate(kRegistersPushedByPushad * kPointerSize));
 }
 
index 684142d..d24fb1e 100644 (file)
@@ -171,7 +171,8 @@ class MacroAssembler: public Assembler {
   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 @@ 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;
+
   bool generating_stub_;
   bool allow_stub_calls_;
 
index 8b2e31e..f05d7f8 100644 (file)
@@ -125,9 +125,6 @@ compiler/simple-osr: SKIP
 # BUG (1094)
 regress/regress-deopt-gc: SKIP
 
-# BUG (1153)
-date-parse: SKIP
-
 ##############################################################################
 [ $arch == mips ]