X64 implementation: Correct kTargetAddrToReturnAddrDist value for x64.
Review URL: http://codereview.chromium.org/140063 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
ab3d1e1a43
commit
dcd25643bd
@ -413,8 +413,8 @@ class Assembler : public Malloced {
|
||||
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;
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
@ -337,7 +337,15 @@ void MacroAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) {
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user