mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-01-10 19:23:41 +01:00
(a): When compiling with GCC on ia64, use "asm" statement to get the address of the
label. gcc-3.x otherwise notices that the label isn't used for control-flow and feels free to move it around (usually to the beginning of the basic-block), with very bad consequences. (Logical change 1.70)
This commit is contained in:
parent
453ec65cf0
commit
757746aefb
1 changed files with 11 additions and 3 deletions
|
@ -95,15 +95,23 @@ a (void)
|
||||||
long stack;
|
long stack;
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
void *label;
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf ("a: sp=%p bsp=%p\n", &stack, __builtin_ia64_bsp ());
|
printf ("a: sp=%p bsp=%p\n", &stack, __builtin_ia64_bsp ());
|
||||||
b (&&handler);
|
#ifdef UNW_TARGET_IA64
|
||||||
|
asm ("movl %0=Label" : "=r"(label));
|
||||||
|
#else
|
||||||
|
label = &&handler;
|
||||||
|
#endif
|
||||||
|
b (label);
|
||||||
panic ("FAILURE: unexpected return from func()!\n");
|
panic ("FAILURE: unexpected return from func()!\n");
|
||||||
|
|
||||||
#if UNW_TARGET_IA64
|
#if UNW_TARGET_IA64
|
||||||
asm volatile ("1:"); /* force a new bundle */
|
asm volatile ("Label:"); /* force a new bundle */
|
||||||
|
#else
|
||||||
|
handler:
|
||||||
#endif
|
#endif
|
||||||
handler:
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
printf ("exception handler: here we go (sp=%p, bsp=%p)...\n",
|
printf ("exception handler: here we go (sp=%p, bsp=%p)...\n",
|
||||||
|
|
Loading…
Reference in a new issue