Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
2003-03-15  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
	__builtin_frame_address, use stack pointer.

	* sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
	instead of __builtin_frame_pointer.
  • Loading branch information
Ulrich Drepper committed Mar 15, 2003
1 parent 92ed3da commit a87731e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
8 changes: 8 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2003-03-15 Ulrich Drepper <drepper@redhat.com>

* sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
__builtin_frame_address, use stack pointer.

* sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
instead of __builtin_frame_pointer.

2003-03-14 Ulrich Drepper <drepper@redhat.com>

* tst-basic1.c (do_test): Add cast to avoid warning.
Expand Down
3 changes: 2 additions & 1 deletion nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <setjmp.h>
#include <stddef.h>
#include <pthread-functions.h>
#include <pthreaddef.h>

extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe);
#pragma weak __pthread_cleanup_upto
Expand All @@ -35,5 +36,5 @@ _longjmp_unwind (jmp_buf env, int val)
#endif

if (fptr != NULL)
fptr (env->__jmpbuf, __builtin_frame_address (0));
fptr (env->__jmpbuf, CURRENT_STACK_FRAME);
}
7 changes: 4 additions & 3 deletions nptl/sysdeps/x86_64/pthreaddef.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2002 Free Software Foundation, Inc.
/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
Expand Down Expand Up @@ -34,8 +34,9 @@
#define SIGCANCEL __SIGRTMIN


/* Location of current stack frame. */
#define CURRENT_STACK_FRAME __builtin_frame_address (0)
/* Location of current stack frame. The frame pointer is not usable. */
#define CURRENT_STACK_FRAME \
({ char *frame; asm ("movq %%rsp, %0" : "=r" (frame)); frame; })


/* XXX Until we have a better place keep the definitions here. */
Expand Down
12 changes: 12 additions & 0 deletions nptl/sysdeps/x86_64/tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,18 @@ typedef struct
}})


#define CALL_THREAD_FCT(descr) \
({ void *__res; \
asm volatile ("movq %%fs:%P2, %%rdi\n\t" \
"callq *%%fs:%P1" \
: "=a" (__res) \
: "i" (offsetof (struct pthread, start_routine)), \
"i" (offsetof (struct pthread, arg)) \
: "di", "si", "cx", "dx", "r8", "r9", "r10", "r11", \
"memory", "cc"); \
__res; })


#endif /* __ASSEMBLER__ */

#endif /* tls.h */

0 comments on commit a87731e

Please sign in to comment.