For X87 platform, it has the same general register as ia32 and it will spill the
context to the stack too.
port
bfdc22d7fc1bc046a38770a676619eee613222f3 (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}
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
__ 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,
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;