+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.
-/* 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 */