Reviewers: jochen, m.m.capewell,
Message:
PTAL
https://codereview.chromium.org/145073006/diff/1/src/a64/macro-assembler-a64.cc
File src/a64/macro-assembler-a64.cc (right):
https://codereview.chromium.org/145073006/diff/1/src/a64/macro-assembler-a64.cc#newcode1350
src/a64/macro-assembler-a64.cc:1350: Mov(x3, Operand(thunk_ref));
I took this from the ARM port.
Description:
A64: Fix CallApiFunctionAndReturn.
TEST=cctest/test-api/FunctionTemplateWithProfiler
Please review this at https://codereview.chromium.org/145073006/
SVN Base: https://v8.googlecode.com/svn/branches/experimental/a64
Affected files (+6, -12 lines):
M src/a64/macro-assembler-a64.cc
Index: src/a64/macro-assembler-a64.cc
diff --git a/src/a64/macro-assembler-a64.cc b/src/a64/macro-assembler-a64.cc
index
c55a59fbb8d708ce3f3f7dfa70da5e9589e7c28a..623a54bd2d20edaa36718ec0b4d89df3ec2fd11f
100644
--- a/src/a64/macro-assembler-a64.cc
+++ b/src/a64/macro-assembler-a64.cc
@@ -1347,18 +1347,12 @@ void MacroAssembler::CallApiFunctionAndReturn(
Mov(x10, reinterpret_cast<uintptr_t>(is_profiling_flag));
Ldrb(w10, MemOperand(x10));
Cbz(w10, &profiler_disabled);
+ Mov(x3, Operand(thunk_ref));
+ B(&end_profiler_check);
- // Additional parameter is the address of the actual callback.
- Mov(function_address, Operand(thunk_ref));
- if (!function_address.Is(x3)) {
- B(&end_profiler_check);
- Bind(&profiler_disabled);
- Mov(x3, function_address);
- Bind(&end_profiler_check);
- } else {
- Bind(&profiler_disabled);
- Bind(&end_profiler_check);
- }
+ Bind(&profiler_disabled);
+ Mov(x3, function_address);
+ Bind(&end_profiler_check);
// Save the callee-save registers we are going to use.
// TODO(all): Is this necessary? ARM doesn't do it.
@@ -1395,7 +1389,7 @@ void MacroAssembler::CallApiFunctionAndReturn(
// return address pushed on stack (could have moved after GC).
// DirectCEntry stub itself is generated early and never moves.
DirectCEntryStub stub;
- stub.GenerateCall(this, function_address);
+ stub.GenerateCall(this, x3);
if (FLAG_log_timer_events) {
FrameScope frame(this, StackFrame::MANUAL);
--
--
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.