From: Danny Smith Date: Mon, 26 Jan 2009 20:34:09 +0000 (+0000) Subject: re PR testsuite/38949 (Link failures in new stackalign tests) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89d2411cc9f3bc72fe1bb4cf5dcb85acccb823d2;p=platform%2Fupstream%2Fgcc.git re PR testsuite/38949 (Link failures in new stackalign tests) 2009-01-26 Danny Smith PR testsuite/38949 * g++.dg/torture/stackalign/test-unwind.h (ASMNAME): Define. Use instead of C name in asm statements. From-SVN: r143684 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5743ae0..57c8c33 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-01-26 Danny Smith + + PR testsuite/38949 + * g++.dg/torture/stackalign/test-unwind.h (ASMNAME): Define. + Use instead of C name in asm statements. + 2009-01-26 Richard Guenther PR tree-optimization/38745 diff --git a/gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h b/gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h index e6493ff..8267384 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h +++ b/gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h @@ -1,5 +1,10 @@ #include "check.h" + +#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define ASMNAME2(prefix, cname) STRING (prefix) cname +#define STRING(x) #x + #ifdef __cplusplus extern "C" void abort (void); #else @@ -69,8 +74,8 @@ main() : "i" (INIT_EBX) ); __asm__ __volatile__ ( - "movl %ebp, g_ebp_save\n\t" - "movl %esp, g_esp_save\n\t" + "movl %ebp," ASMNAME("g_ebp_save")"\n\t" + "movl %esp," ASMNAME("g_esp_save")"\n\t" ); try { foo(); @@ -81,11 +86,11 @@ main() // Get DI/SI/BX register value after exception caught __asm__ __volatile__ ( - "movl %edi, g_edi\n\t" - "movl %esi, g_esi\n\t" - "movl %ebx, g_ebx\n\t" - "movl %ebp, g_ebp\n\t" - "movl %esp, g_esp\n\t" + "movl %edi," ASMNAME("g_edi")"\n\t" + "movl %esi," ASMNAME("g_esi")"\n\t" + "movl %ebx," ASMNAME("g_ebx")"\n\t" + "movl %ebp," ASMNAME("g_ebp")"\n\t" + "movl %esp," ASMNAME("g_esp")"\n\t" ); // Check if DI/SI/BX register value are the same as before calling