m68k: define stackinfo_get_sp, stackinfo_sub_sp

This commit is contained in:
Andreas Schwab 2011-11-01 16:03:29 +01:00
parent 6dcecc6486
commit f335e01fe1
2 changed files with 14 additions and 1 deletions

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

View 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
@ -31,4 +31,12 @@
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 */