Revision: 17357
Author:   [email protected]
Date:     Thu Oct 24 07:38:50 2013 UTC
Log: Use PopReturnAddressTo and PushReturnAddressFrom in Generate_MarkCodeAsExecutedOnce builtin function for X64

[email protected]

Review URL: https://codereview.chromium.org/38613003
http://code.google.com/p/v8/source/detail?r=17357

Modified:
 /branches/bleeding_edge/src/x64/assembler-x64.cc
 /branches/bleeding_edge/src/x64/builtins-x64.cc

=======================================
--- /branches/bleeding_edge/src/x64/assembler-x64.cc Thu Oct 24 02:12:51 2013 UTC +++ /branches/bleeding_edge/src/x64/assembler-x64.cc Thu Oct 24 07:38:50 2013 UTC
@@ -110,8 +110,8 @@
 #endif

   // Patch the code.
-  patcher.masm()->movq(r10, target, RelocInfo::NONE64);
-  patcher.masm()->call(r10);
+  patcher.masm()->movq(kScratchRegister, target, RelocInfo::NONE64);
+  patcher.masm()->call(kScratchRegister);

   // Check that the size of the code generated is as expected.
   ASSERT_EQ(Assembler::kCallSequenceLength,
=======================================
--- /branches/bleeding_edge/src/x64/builtins-x64.cc Wed Oct 23 13:48:04 2013 UTC +++ /branches/bleeding_edge/src/x64/builtins-x64.cc Thu Oct 24 07:38:50 2013 UTC
@@ -646,12 +646,12 @@
   __ Popad();

   // Perform prologue operations usually performed by the young code stub.
-  __ pop(r10);   // Pop return address into scratch register.
+  __ PopReturnAddressTo(kScratchRegister);
   __ push(rbp);  // Caller's frame pointer.
   __ movq(rbp, rsp);
   __ push(rsi);  // Callee's context.
   __ push(rdi);  // Callee's JS Function.
-  __ push(r10);  // Push return address after frame prologue.
+  __ PushReturnAddressFrom(kScratchRegister);

   // Jump to point after the code-age stub.
   __ ret(0);
@@ -696,17 +696,17 @@
   }

   // Get the full codegen state from the stack and untag it.
-  __ SmiToInteger32(r10, Operand(rsp, kPCOnStackSize));
+  __ SmiToInteger32(kScratchRegister, Operand(rsp, kPCOnStackSize));

   // Switch on the state.
   Label not_no_registers, not_tos_rax;
-  __ cmpq(r10, Immediate(FullCodeGenerator::NO_REGISTERS));
+  __ cmpq(kScratchRegister, Immediate(FullCodeGenerator::NO_REGISTERS));
   __ j(not_equal, &not_no_registers, Label::kNear);
   __ ret(1 * kPointerSize);  // Remove state.

   __ bind(&not_no_registers);
   __ movq(rax, Operand(rsp, kPCOnStackSize + kPointerSize));
-  __ cmpq(r10, Immediate(FullCodeGenerator::TOS_REG));
+  __ cmpq(kScratchRegister, Immediate(FullCodeGenerator::TOS_REG));
   __ j(not_equal, &not_tos_rax, Label::kNear);
   __ ret(2 * kPointerSize);  // Remove state, rax.

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to