diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2009-01-26 20:34:09 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2009-01-26 12:34:09 -0800 |
commit | 89d2411cc9f3bc72fe1bb4cf5dcb85acccb823d2 (patch) | |
tree | fdbd2d44291c3b85da85b8f9df0a8f4d61e83d53 /gcc | |
parent | 93f1527a3f84201334303253a3e5a23ade13f0dc (diff) | |
download | gcc-89d2411cc9f3bc72fe1bb4cf5dcb85acccb823d2.zip gcc-89d2411cc9f3bc72fe1bb4cf5dcb85acccb823d2.tar.gz gcc-89d2411cc9f3bc72fe1bb4cf5dcb85acccb823d2.tar.bz2 |
re PR testsuite/38949 (Link failures in new stackalign tests)
2009-01-26 Danny Smith <dannysmith@users.sourceforge.net>
PR testsuite/38949
* g++.dg/torture/stackalign/test-unwind.h (ASMNAME): Define.
Use instead of C name in asm statements.
From-SVN: r143684
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h | 19 |
2 files changed, 18 insertions, 7 deletions
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 <dannysmith@users.sourceforge.net> + + 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 <rguenther@suse.de> 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 |