Reviewers: Rodolph Perfetta,

Message:
PTAL, the entry hook expects location of the return address, but we are passing
the return address.

Description:
A64: fix ProfileEntryHookStub to pass return address location.

BUG=314606
TEST=cctest/test-api/SetFunctionEntryHook

Please review this at https://codereview.chromium.org/145703002/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/a64

Affected files (+2, -2 lines):
  M src/a64/code-stubs-a64.cc


Index: src/a64/code-stubs-a64.cc
diff --git a/src/a64/code-stubs-a64.cc b/src/a64/code-stubs-a64.cc
index 4cf29d373b9291e0307e189ea6a61d43b7671e02..e0dcd3b71de6a85b47c9a2fde690b0a0f78ef652 100644
--- a/src/a64/code-stubs-a64.cc
+++ b/src/a64/code-stubs-a64.cc
@@ -6713,8 +6713,8 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
 #endif

   // The caller's return address is above the saved temporaries.
-  // Grab that for the second argument to the hook.
-  __ Peek(x1, kNumSavedRegs * kPointerSize);
+  // Grab its location for the second argument to the hook.
+  __ Add(x1, __ StackPointer(), kNumSavedRegs * kPointerSize);

   {
     // Create a dummy frame, as CallCFunction requires this.


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to