about summary refs log tree commit diff
path: root/sysdeps/x86_64/stackinfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64/stackinfo.h')
-rw-r--r--sysdeps/x86_64/stackinfo.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/x86_64/stackinfo.h b/sysdeps/x86_64/stackinfo.h
index 34c9d0b576..7354632132 100644
--- a/sysdeps/x86_64/stackinfo.h
+++ b/sysdeps/x86_64/stackinfo.h
@@ -40,7 +40,9 @@
    for which they need to act as barriers as well, hence the additional
    (unnecessary) parameters.  */
 #define stackinfo_get_sp() \
-  ({ void *p__; asm volatile ("mov %%" RSP_REG ", %0" : "=r" (p__)); p__; })
+  ({ register void * p__ __asm__(RSP_REG); \
+     asm volatile("" : "=r" (p__)); \
+     p__; })
 #define stackinfo_sub_sp(ptr) \
   ({ ptrdiff_t d__;						\
      asm volatile ("sub %%" RSP_REG " , %0" : "=r" (d__) : "0" (ptr));	\