]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/34970 (name mangling broken for __attributte__((fastcall)))
authorDanny Smith <dannysmith@users.sourceforge.net>
Sat, 26 Jan 2008 09:31:30 +0000 (09:31 +0000)
committerDanny Smith <dannysmith@gcc.gnu.org>
Sat, 26 Jan 2008 09:31:30 +0000 (09:31 +0000)
PR target/34970

gcc
* config/i386/cygming.h (ASM_OUTPUT_LABELREF): Define.
testsuite
* gcc.target/i386/fastcall-1.c: Scan for correct label.
Use -std=gnu89 switch.

From-SVN: r131859

gcc/ChangeLog
gcc/config/i386/cygming.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/fastcall-1.c

index 32c53ea9a5c08e2f5bf4d0d60644f29633fcbe92..d05641da28a902d45264851c250638b5bce3e039 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-26  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       PR target/34970
+       * config/i386/cygming.h (ASM_OUTPUT_LABELREF): Define.
+
 2008-01-25  Joseph Myers  <joseph@codesourcery.com>
 
        PR other/31955
index ee2631b2fb09492628c84f45679606369edbdcbd..3b18af5ba0f0985acf9e71cdcab77dbca6beaaa4 100644 (file)
@@ -1,7 +1,7 @@
 /* Operating system specific defines to be used when targeting GCC for
    hosting on Windows32, using a Unix style C library and tools.
    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2007
+   2004, 2005, 2007, 2008
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -197,6 +197,17 @@ do {                                                       \
   ASM_OUTPUT_LABEL ((STREAM), (NAME));                 \
 } while (0)
 
+/* Output a reference to a label. Fastcall function symbols
+   keep their '@' prefix, while other symbols are prefixed
+   with USER_LABEL_PREFIX.  */
+#undef ASM_OUTPUT_LABELREF
+#define  ASM_OUTPUT_LABELREF(STREAM, NAME)     \
+do {                                           \
+  if ((NAME)[0] != FASTCALL_PREFIX)            \
+    fputs (USER_LABEL_PREFIX, (STREAM));       \
+  fputs ((NAME), (STREAM));                    \
+} while (0)
+
 \f
 /* Emit code to check the stack when allocating more than 4000
    bytes in one go.  */
index 4bb6a972d4172b430fc9ee8649cab5249478a8d6..a09d87711c6607514273062f924d731ca379d5a4 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-26  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       PR target/34970
+       * gcc.target/i386/fastcall-1.c: Scan for correct label.
+       Use -std=gnu89 switch.
+
 2008-01-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libfortran/34876
index ba1d6673313bd071fb24a73139ef28c9d9161ec6..9d701239169f88bb69711d31965b4f9696808f6e 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target i?86-*-mingw32* i?86-*-cygwin* } } */
+/* { dg-options "-std=gnu89" } */
 
 void
 __attribute__ ((fastcall))
@@ -15,3 +16,6 @@ f3() { }
 void
 __attribute__ ((fastcall))
 f4(int x, int y, int z) { }
+
+/* Scan for global label with correct prefix and suffix.  */
+/* { dg-final { scan-assembler "\.globl\[ \t\]@f4@12" } } */