]> sourceware.org Git - glibc.git/commitdiff
m68k: define stackinfo_get_sp, stackinfo_sub_sp
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 1 Nov 2011 15:03:29 +0000 (16:03 +0100)
committerAndreas Schwab <schwab@linux-m68k.org>
Tue, 1 Nov 2011 17:35:32 +0000 (18:35 +0100)
ChangeLog.m68k
sysdeps/m68k/stackinfo.h

index 09de15987b07727a8cf76d79d362e949d61f4c2f..42dcf75db0ddd25bec130d3d981f00353c0a970f 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-01  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * sysdeps/m68k/stackinfo.h (stackinfo_get_sp, stackinfo_sub_sp):
+       Define.
+
 2011-10-26  Andreas Schwab  <schwab@linux-m68k.org>
 
        * sysdeps/m68k/m680x0/fpu/math_private.h: New file.
index b44d4d0ee932a760c5d29cd7a67859b692aaabf1..bcfdb1285781745cb0b029f69490d8b623be4f9e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
    is present, but it is presumed absent.  */
 #define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
 
+/* Access to the stack pointer.  */
+#define stackinfo_get_sp() \
+  ({ void *p__; asm volatile ("move.l %%sp, %0" : "=r" (p__)); p__; })
+#define stackinfo_sub_sp(ptr) \
+  ({ ptrdiff_t d__;                                            \
+     asm volatile ("sub.l %%sp, %0" : "=r" (d__) : "0" (ptr)); \
+     d__; })
+
 #endif /* stackinfo.h */
This page took 0.046906 seconds and 5 git commands to generate.