Reviewers: Mads Ager,

Message:
TBR=ager


Description:
X64 implementation: Correct kTargetAddrToReturnAddrDist value for x64.

Please review this at http://codereview.chromium.org/140063

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/x64/assembler-x64.h
   M     src/x64/macro-assembler-x64.cc


Index: src/x64/macro-assembler-x64.cc
===================================================================
--- src/x64/macro-assembler-x64.cc      (revision 2239)
+++ src/x64/macro-assembler-x64.cc      (working copy)
@@ -337,7 +337,15 @@
    WriteRecordedPositions();
    ASSERT(RelocInfo::IsCodeTarget(rmode));
    movq(kScratchRegister, code_object, rmode);
+#ifdef DEBUG
+  Label target;
+  bind(&target);
+#endif
    call(kScratchRegister);
+#ifdef DEBUG
+  ASSERT_EQ(kTargetAddrToReturnAddrDist,
+            SizeOfCodeGeneratedSince(&target) + kPointerSize);
+#endif
  }


Index: src/x64/assembler-x64.h
===================================================================
--- src/x64/assembler-x64.h     (revision 2239)
+++ src/x64/assembler-x64.h     (working copy)
@@ -413,8 +413,8 @@
    static inline void set_target_address_at(Address pc, Address target);

    // Distance between the address of the code target in the call  
instruction
-  // and the return address
-  static const int kTargetAddrToReturnAddrDist = kPointerSize;
+  // and the return address.  Checked in the debug build.
+  static const int kTargetAddrToReturnAddrDist = 3 + kPointerSize;


    //  
---------------------------------------------------------------------------



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to