Commit c3ba22ad authored by haitao.feng@intel.com's avatar haitao.feng@intel.com

Use StackArgumentsAccessor to access receiver on stack, use kPCOnStackSize to

access stack argument and use movq instead of movp to operate return address
on stack for x64

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 41039c4f
......@@ -395,7 +395,7 @@ enum ScaleFactor {
times_4 = 2,
times_8 = 3,
times_int_size = times_4,
times_pointer_size = times_8
times_pointer_size = (kPointerSize == 8) ? times_8 : times_4
};
......@@ -1021,7 +1021,6 @@ class Assembler : public AssemblerBase {
immediate_arithmetic_op_32(0x1, dst, src);
}
void rcl(Register dst, Immediate imm8) {
shift(dst, imm8, 0x2);
}
......
......@@ -1412,7 +1412,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
__ lea(rax, Operand(rax, rbx, times_1, Code::kHeaderSize - kHeapObjectTag));
// Overwrite the return address on the stack.
__ movq(Operand(rsp, 0), rax);
__ movq(StackOperandForReturnAddress(0), rax);
// And "return" to the OSR entry point of the function.
__ ret(0);
......
......@@ -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));
......
......@@ -97,7 +97,7 @@ void Deoptimizer::FillInputFrame(Address tos, JavaScriptFrame* frame) {
// Fill the frame content from the actual data on the frame.
for (unsigned i = 0; i < input_->GetFrameSize(); i += kPointerSize) {
input_->SetFrameSlot(i, Memory::uint64_at(tos + i));
input_->SetFrameSlot(i, Memory::uintptr_at(tos + i));
}
}
......
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