Commit b5911513 authored by chunyang.dai's avatar chunyang.dai Committed by Commit bot

X87: [Interpreter] Pass context to interpreter bytecode handlers and add LoadConstextSlot

   For X87 platform, it has the same general register as ia32 and it will spill the
   context to the stack too.

port bfdc22d7 (r29325).

original commit message:

    Passes the current context to bytecode interpreter handlers. This is held in the
    context register on all architectures except for ia32 where there are too few
    registers and it is instead spilled to the stack.

    Also changes Load/StoreRegister to use kMachAnyTagged representation since they
    should only ever hold tagged values.

BUG=

Review URL: https://codereview.chromium.org/1316583003

Cr-Commit-Position: refs/heads/master@{#30368}
parent 457fc6bd
......@@ -413,7 +413,7 @@ CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) {
STATIC_ASSERT(5 == Linkage::kInterpreterContextParameter);
types.AddParam(kMachAnyTagged);
#if defined(V8_TARGET_ARCH_IA32)
#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X87)
locations.AddParam(
LinkageLocation::ForCallerFrameSlot(kInterpreterContextSpillSlot));
#else
......
......@@ -725,8 +725,9 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ add(kInterpreterDispatchTableRegister,
Immediate(FixedArray::kHeaderSize - kHeapObjectTag));
// TODO(rmcilroy) Push our context as a stack located parameter of the
// bytecode handler.
// Push context as a stack located parameter to the bytecode handler.
DCHECK_EQ(-1, kInterpreterContextSpillSlot);
__ push(esi);
// Dispatch to the first bytecode handler for the function.
__ movzx_b(esi, Operand(kInterpreterBytecodeArrayRegister,
......
......@@ -26,6 +26,9 @@ const Register kInterpreterDispatchTableRegister = {kRegister_ebx_Code};
const Register kRuntimeCallFunctionRegister = {kRegister_ebx_Code};
const Register kRuntimeCallArgCountRegister = {kRegister_eax_Code};
// Spill slots used by interpreter dispatch calling convention.
const int kInterpreterContextSpillSlot = -1;
// Convenience for platform-independent signatures. We do not normally
// distinguish memory operands from other operands on ia32.
typedef Operand MemOperand;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment