Revision: 16051
Author:   [email protected]
Date:     Mon Aug  5 05:43:04 2013
Log: Introduce Push and Pop register macro instructions for all platforms

[email protected]

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

Modified:
 /branches/bleeding_edge/src/arm/macro-assembler-arm.h
 /branches/bleeding_edge/src/full-codegen.cc
 /branches/bleeding_edge/src/ia32/macro-assembler-ia32.h
 /branches/bleeding_edge/src/mips/macro-assembler-mips.h
 /branches/bleeding_edge/src/x64/macro-assembler-x64.h

=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.h Fri Aug 2 02:53:11 2013 +++ /branches/bleeding_edge/src/arm/macro-assembler-arm.h Mon Aug 5 05:43:04 2013
@@ -144,6 +144,8 @@
             Condition cond = al);

   void Call(Label* target);
+  void Push(Register src) { push(src); }
+  void Pop(Register dst) { pop(dst); }

   // Register move. May do nothing if the registers are identical.
   void Move(Register dst, Handle<Object> value);
=======================================
--- /branches/bleeding_edge/src/full-codegen.cc Fri Jul 19 07:46:23 2013
+++ /branches/bleeding_edge/src/full-codegen.cc Mon Aug  5 05:43:04 2013
@@ -512,7 +512,7 @@


 void FullCodeGenerator::StackValueContext::Plug(Register reg) const {
-  __ push(reg);
+  __ Push(reg);
 }


@@ -530,7 +530,7 @@


 void FullCodeGenerator::AccumulatorValueContext::PlugTOS() const {
-  __ pop(result_register());
+  __ Pop(result_register());
 }


@@ -540,7 +540,7 @@

 void FullCodeGenerator::TestContext::PlugTOS() const {
   // For simplicity we always test the accumulator register.
-  __ pop(result_register());
+  __ Pop(result_register());
   codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL);
   codegen()->DoTest(this);
 }
@@ -1006,7 +1006,7 @@
     VisitForAccumulatorValue(left);
// We want the value in the accumulator for the test, and on the stack in
     // case we need it.
-    __ push(result_register());
+    __ Push(result_register());
     Label discard, restore;
     if (is_logical_and) {
       DoTest(left, &discard, &restore, &restore);
@@ -1014,7 +1014,7 @@
       DoTest(left, &restore, &discard, &restore);
     }
     __ bind(&restore);
-    __ pop(result_register());
+    __ Pop(result_register());
     __ jmp(&done);
     __ bind(&discard);
     __ Drop(1);
@@ -1024,7 +1024,7 @@
     VisitForAccumulatorValue(left);
// We want the value in the accumulator for the test, and on the stack in
     // case we need it.
-    __ push(result_register());
+    __ Push(result_register());
     Label discard;
     if (is_logical_and) {
       DoTest(left, &discard, &done, &discard);
@@ -1416,7 +1416,7 @@
   // Extend the context before executing the catch block.
   { Comment cmnt(masm_, "[ Extend catch context");
     __ Push(stmt->variable()->name());
-    __ push(result_register());
+    __ Push(result_register());
     PushFunctionArgumentForContextAllocation();
     __ CallRuntime(Runtime::kPushCatchContext, 3);
     StoreToFrameField(StandardFrameConstants::kContextOffset,
@@ -1481,7 +1481,7 @@
   // preserved by the finally block.  Call the finally block and then
   // rethrow the exception if it returns.
   __ Call(&finally_entry);
-  __ push(result_register());
+  __ Push(result_register());
   __ CallRuntime(Runtime::kReThrow, 1);

   // Finally block implementation.
=======================================
--- /branches/bleeding_edge/src/ia32/macro-assembler-ia32.h Fri Aug 2 02:53:11 2013 +++ /branches/bleeding_edge/src/ia32/macro-assembler-ia32.h Mon Aug 5 05:43:04 2013
@@ -807,6 +807,8 @@
   void Drop(int element_count);

   void Call(Label* target) { call(target); }
+  void Push(Register src) { push(src); }
+  void Pop(Register dst) { pop(dst); }

   // Emit call to the code we are currently generating.
   void CallSelf() {
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.h Fri Aug 2 02:53:11 2013 +++ /branches/bleeding_edge/src/mips/macro-assembler-mips.h Mon Aug 5 05:43:04 2013
@@ -627,11 +627,11 @@
   void MultiPushFPU(RegList regs);
   void MultiPushReversedFPU(RegList regs);

-  // Lower case push() for compatibility with arch-independent code.
   void push(Register src) {
     Addu(sp, sp, Operand(-kPointerSize));
     sw(src, MemOperand(sp, 0));
   }
+  void Push(Register src) { push(src); }

   // Push a handle.
   void Push(Handle<Object> handle);
@@ -676,11 +676,11 @@
   void MultiPopFPU(RegList regs);
   void MultiPopReversedFPU(RegList regs);

-  // Lower case pop() for compatibility with arch-independent code.
   void pop(Register dst) {
     lw(dst, MemOperand(sp, 0));
     Addu(sp, sp, Operand(kPointerSize));
   }
+  void Pop(Register dst) { pop(dst); }

   // Pop two registers. Pops rightmost register first (from lower address).
   void Pop(Register src1, Register src2) {
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.h Fri Aug 2 06:42:02 2013 +++ /branches/bleeding_edge/src/x64/macro-assembler-x64.h Mon Aug 5 05:43:04 2013
@@ -823,6 +823,8 @@
   void Drop(int stack_elements);

   void Call(Label* target) { call(target); }
+  void Push(Register src) { push(src); }
+  void Pop(Register dst) { pop(dst); }
   void PushReturnAddressFrom(Register src) { push(src); }
   void PopReturnAddressTo(Register dst) { pop(dst); }

--
--
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