re PR testsuite/38949 (Link failures in new stackalign tests)
authorDanny Smith <dannysmith@users.sourceforge.net>
Mon, 26 Jan 2009 20:34:09 +0000 (20:34 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 26 Jan 2009 20:34:09 +0000 (12:34 -0800)
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

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h

index 5743ae0..57c8c33 100644 (file)
@@ -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
index e6493ff..8267384 100644 (file)
@@ -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