Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Unified Diff: src/mips/builtins-mips.cc

Issue 1289863003: [interpreter]: Changes to interpreter builtins for accumulator and register file registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix_interpreter_initialization
Patch Set: Rename incoming_accumulator Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/builtins-mips.cc
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc
index e27199a904f9adc655c7c3eace7b5f5e15293130..b8eec2d81eee7dae9f794564193fb06c0c646b52 100644
--- a/src/mips/builtins-mips.cc
+++ b/src/mips/builtins-mips.cc
@@ -920,14 +920,15 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ bind(&ok);
// If ok, push undefined as the initial value for all register file entries.
- // Note: there should always be at least one stack slot for the return
- // register in the register file.
Label loop_header;
+ Label loop_check;
__ LoadRoot(t1, Heap::kUndefinedValueRootIndex);
+ __ Branch(&loop_check);
__ bind(&loop_header);
// TODO(rmcilroy): Consider doing more than one push per loop iteration.
__ push(t1);
// Continue loop if not done.
+ __ bind(&loop_check);
__ Subu(t0, t0, Operand(kPointerSize));
__ Branch(&loop_header, ge, t0, Operand(zero_reg));
}
@@ -963,6 +964,10 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
}
// Load bytecode offset and dispatch table into registers.
+ __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
+ __ Subu(
+ kInterpreterRegisterFileRegister, fp,
+ Operand(kPointerSize + StandardFrameConstants::kFixedFrameSizeFromFp));
__ li(kInterpreterBytecodeOffsetRegister,
Operand(BytecodeArray::kHeaderSize - kHeapObjectTag));
__ LoadRoot(kInterpreterDispatchTableRegister,
@@ -980,7 +985,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging
// and header removal.
__ Addu(at, at, Operand(Code::kHeaderSize - kHeapObjectTag));
- __ Jump(at);
+ __ Call(at);
}
@@ -991,9 +996,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 v0.
- __ lw(v0, MemOperand(fp, -kPointerSize -
- StandardFrameConstants::kFixedFrameSizeFromFp));
+ // The return value is in accumulator, which is already in v0.
+
// Leave the frame (also dropping the register file).
__ LeaveFrame(StackFrame::JAVA_SCRIPT);
// Drop receiver + arguments.
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698