From f5b8dd54a664c3b9c64a238093a8bfaa74e07d3e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 8 Jun 2006 17:38:55 +0000 Subject: [PATCH] * sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12. --- ChangeLog.arm | 4 ++++ sysdeps/arm/nptl/pthreaddef.h | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index 5d2b051..c76374c 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,7 @@ +2006-06-08 Mark Shinwell + + * sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12. + 2006-06-08 Daniel Jacobowitz * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Reformat. diff --git a/sysdeps/arm/nptl/pthreaddef.h b/sysdeps/arm/nptl/pthreaddef.h index 783828a..b1a06cd 100644 --- a/sysdeps/arm/nptl/pthreaddef.h +++ b/sysdeps/arm/nptl/pthreaddef.h @@ -30,8 +30,16 @@ #define TCB_ALIGNMENT 16 -/* Location of current stack frame. */ -#define CURRENT_STACK_FRAME __builtin_frame_address (0) +/* Location of current stack frame. + + __builtin_frame_address (0) returns the value of the hard frame + pointer, which will point at the location of the saved PC on the + stack. Below this in memory is the remainder of the linkage info, + occupying 12 bytes. Therefore in order to address from + CURRENT_STACK_FRAME using "struct layout", we need to have the macro + return the hard FP minus 12. Of course, this makes no sense + without the obsolete APCS stack layout... */ +#define CURRENT_STACK_FRAME (__builtin_frame_address (0) - 12) /* XXX Until we have a better place keep the definitions here. */ -- 2.7.4