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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 156663002: Use StackArgumentsAccessor to access receiver on stack, use kPCOnStackSize to (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/x64/builtins-x64.cc ('k') | src/x64/deoptimizer-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index a36f4b1c6c06074f104e4ee2ef8856a196e096b5..075964bcee36299c5d80825ea1f2d7592c3637b7 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2284,7 +2284,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
}
// Load the receiver from the stack.
- __ movp(rax, Operand(rsp, (argc_ + 1) * kPointerSize));
+ __ movp(rax, args.GetReceiverOperand());
if (NeedsChecks()) {
__ JumpIfSmi(rax, &wrap);
@@ -2345,7 +2345,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
__ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
__ pop(rdi);
}
- __ movp(Operand(rsp, (argc_ + 1) * kPointerSize), rax);
+ __ movp(args.GetReceiverOperand(), rax);
__ jmp(&cont);
}
}
@@ -2916,7 +2916,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
__ StoreRoot(rax, Heap::kInstanceofCacheMapRootIndex);
} else {
// Get return address and delta to inlined map check.
- __ movp(kScratchRegister, StackOperandForReturnAddress(0));
+ __ movq(kScratchRegister, StackOperandForReturnAddress(0));
__ subq(kScratchRegister, args.GetArgumentOperand(2));
if (FLAG_debug_code) {
__ movl(rdi, Immediate(kWordBeforeMapCheckValue));
@@ -2957,7 +2957,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
// Assert it is a 1-byte signed value.
ASSERT(true_offset >= 0 && true_offset < 0x100);
__ movl(rax, Immediate(true_offset));
- __ movp(kScratchRegister, StackOperandForReturnAddress(0));
+ __ movq(kScratchRegister, StackOperandForReturnAddress(0));
__ subq(kScratchRegister, args.GetArgumentOperand(2));
__ movb(Operand(kScratchRegister, kOffsetToResultValue), rax);
if (FLAG_debug_code) {
@@ -2980,7 +2980,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
// Assert it is a 1-byte signed value.
ASSERT(false_offset >= 0 && false_offset < 0x100);
__ movl(rax, Immediate(false_offset));
- __ movp(kScratchRegister, StackOperandForReturnAddress(0));
+ __ movq(kScratchRegister, StackOperandForReturnAddress(0));
__ subq(kScratchRegister, args.GetArgumentOperand(2));
__ movb(Operand(kScratchRegister, kOffsetToResultValue), rax);
if (FLAG_debug_code) {
@@ -5263,7 +5263,7 @@ void CallApiGetterStub::Generate(MacroAssembler* masm) {
// Allocate v8::AccessorInfo in non-GCed stack space.
const int kArgStackSpace = 1;
- __ lea(name_arg, Operand(rsp, 1 * kPointerSize));
+ __ lea(name_arg, Operand(rsp, kPCOnStackSize));
__ PrepareCallApiFunction(kArgStackSpace);
__ lea(scratch, Operand(name_arg, 1 * kPointerSize));
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | src/x64/deoptimizer-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698