Revision: 19298
Author:   [email protected]
Date:     Tue Feb 11 18:53:35 2014 UTC
Log:      A64: Remove A64 special casing in ExternalCallbackScope

[email protected]

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

Modified:
 /branches/experimental/a64/src/a64/simulator-a64.h
 /branches/experimental/a64/src/arm/simulator-arm.h
 /branches/experimental/a64/src/mips/simulator-mips.h
 /branches/experimental/a64/src/vm-state-inl.h

=======================================
--- /branches/experimental/a64/src/a64/simulator-a64.h Mon Feb 10 19:23:47 2014 UTC +++ /branches/experimental/a64/src/a64/simulator-a64.h Tue Feb 11 18:53:35 2014 UTC
@@ -444,6 +444,8 @@
       return xreg(kFramePointerRegCode, Reg31IsStackPointer);
   }
   Instruction* lr() { return reg<Instruction*>(kLinkRegCode); }
+
+  Address get_sp() { return reinterpret_cast<Address>(sp()); }

   // Return 'size' bits of the value of a floating-point register, as the
   // specified type. The value is zero-extended to fill the result.
=======================================
--- /branches/experimental/a64/src/arm/simulator-arm.h Thu Feb 6 14:30:18 2014 UTC +++ /branches/experimental/a64/src/arm/simulator-arm.h Tue Feb 11 18:53:35 2014 UTC
@@ -207,6 +207,10 @@
   void set_pc(int32_t value);
   int32_t get_pc() const;

+  Address get_sp() {
+ return reinterpret_cast<Address>(static_cast<intptr_t>(get_register(sp)));
+  }
+
   // Accessor to the internal simulator stack area.
   uintptr_t StackLimit() const;

=======================================
--- /branches/experimental/a64/src/mips/simulator-mips.h Thu Feb 6 14:30:18 2014 UTC +++ /branches/experimental/a64/src/mips/simulator-mips.h Tue Feb 11 18:53:35 2014 UTC
@@ -203,6 +203,10 @@
   void set_pc(int32_t value);
   int32_t get_pc() const;

+  Address get_sp() {
+ return reinterpret_cast<Address>(static_cast<intptr_t>(get_register(sp)));
+  }
+
   // Accessor to the internal simulator stack area.
   uintptr_t StackLimit() const;

=======================================
--- /branches/experimental/a64/src/vm-state-inl.h Thu Jan 30 19:29:24 2014 UTC +++ /branches/experimental/a64/src/vm-state-inl.h Tue Feb 11 18:53:35 2014 UTC
@@ -85,12 +85,7 @@
       callback_(callback),
       previous_scope_(isolate->external_callback_scope()) {
 #ifdef USE_SIMULATOR
-#if V8_TARGET_ARCH_A64
- scope_address_ = reinterpret_cast<Address>(Simulator::current(isolate)->sp());
-#else
-  int32_t sp = Simulator::current(isolate)->get_register(Simulator::sp);
-  scope_address_ = reinterpret_cast<Address>(static_cast<intptr_t>(sp));
-#endif
+  scope_address_ = Simulator::current(isolate)->get_sp();
 #endif
   isolate_->set_external_callback_scope(this);
 }

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