Index: src/arm64/builtins-arm64.cc |
diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc |
index e74e4077939bdb0d3924acd4ac3c8cde4db0cdaf..2d878686bbefe10600f841558c1bb0a8b9e65308 100644 |
--- a/src/arm64/builtins-arm64.cc |
+++ b/src/arm64/builtins-arm64.cc |
@@ -992,7 +992,11 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ Bind(&ok); |
} |
- // Load bytecode offset and dispatch table into registers. |
+ // Load accumulator, register file, bytecode offset, dispatch table into |
+ // registers. |
+ __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
+ __ Sub(kInterpreterRegisterFileRegister, fp, |
+ Operand(kPointerSize + StandardFrameConstants::kFixedFrameSizeFromFp)); |
__ Mov(kInterpreterBytecodeOffsetRegister, |
Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
__ LoadRoot(kInterpreterDispatchTableRegister, |
@@ -1001,14 +1005,14 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
// Dispatch to the first bytecode handler for the function. |
- __ Ldrb(x0, MemOperand(kInterpreterBytecodeArrayRegister, |
+ __ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister, |
kInterpreterBytecodeOffsetRegister)); |
- __ Mov(x0, Operand(x0, LSL, kPointerSizeLog2)); |
- __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x0)); |
+ __ Mov(x1, Operand(x1, LSL, kPointerSizeLog2)); |
+ __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x1)); |
// TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging |
// and header removal. |
__ Add(ip0, ip0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
- __ Jump(ip0); |
+ __ Call(ip0); |
} |
@@ -1019,9 +1023,8 @@ void Builtins::Generate_InterpreterExitTrampoline(MacroAssembler* masm) { |
// - Support profiler (specifically decrementing profiling_counter |
// appropriately and calling out to HandleInterrupts if necessary). |
- // Load return value into x0. |
- __ ldr(x0, MemOperand(fp, -kPointerSize - |
- StandardFrameConstants::kFixedFrameSizeFromFp)); |
+ // The return value is in accumulator, which is already in x0. |
+ |
// Leave the frame (also dropping the register file). |
__ LeaveFrame(StackFrame::JAVA_SCRIPT); |
// Drop receiver + arguments. |