Commit 4c2a3788 authored by whesse@chromium.org's avatar whesse@chromium.org

X64 implementation: GenerateAdaptor builtin.

Review URL: http://codereview.chromium.org/146085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent cc271fe7
......@@ -34,11 +34,20 @@ namespace internal {
#define __ ACCESS_MASM(masm)
void Builtins::Generate_Adaptor(MacroAssembler* masm,
Builtins::CFunctionId id) {
masm->int3(); // UNIMPLEMENTED.
void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) {
// TODO(1238487): Don't pass the function in a static variable.
ExternalReference passed = ExternalReference::builtin_passed_function();
__ movq(kScratchRegister, passed.address(), RelocInfo::EXTERNAL_REFERENCE);
__ movq(Operand(kScratchRegister, 0), rdi);
// The actual argument count has already been loaded into register
// rax, but JumpToBuiltin expects rax to contain the number of
// arguments including the receiver.
__ incq(rax);
__ JumpToBuiltin(ExternalReference(id));
}
static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) {
__ push(rbp);
__ movq(rbp, rsp);
......@@ -161,10 +170,12 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
masm->int3(); // UNIMPLEMENTED.
masm->movq(kScratchRegister, Immediate(0xBEFA)); // Debugging aid.
}
void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
masm->int3(); // UNIMPLEMENTED.
masm->movq(kScratchRegister, Immediate(0xBEFC)); // Debugging aid.
}
......
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