Avoid doing explicit cast in simulator-a64::get_sp().
authorrmcilroy@chromium.org <rmcilroy@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 12 Feb 2014 13:34:40 +0000 (13:34 +0000)
committerrmcilroy@chromium.org <rmcilroy@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 12 Feb 2014 13:34:40 +0000 (13:34 +0000)
R=rodolph.perfetta@arm.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/a64/simulator-a64.h

index b1f0b82..941e3a4 100644 (file)
@@ -447,7 +447,7 @@ class Simulator : public DecoderVisitor {
   }
   Instruction* lr() { return reg<Instruction*>(kLinkRegCode); }
 
-  Address get_sp() { return reinterpret_cast<Address>(sp()); }
+  Address get_sp() { return reg<Address>(31, Reg31IsStackPointer); }
 
   // Return 'size' bits of the value of a floating-point register, as the
   // specified type. The value is zero-extended to fill the result.