This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH,rs6000] emit .gnu_attribute for struct return convention


This patch is the GCC follow-on to the binutils patch posted here:

http://sourceware.org/ml/binutils/2008-10/msg00068.html

We simply emit the appropriate .gnu_attribute tag.

Tested on powerpc-none-linux-gnuspe by visually inspecting 'readelf -A'
output on objects compiled with -m{no-,}aix-struct-return.  OK to
commit?

-Nathan

gcc/
2008-10-10  Nathan Froyd  <froydnj@codesourcery.com>

	* config/rs6000/rs6000.c (rs6000_file_start): Output gnu
	attribute for struct return convention.

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 141054)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -2476,6 +2476,8 @@ rs6000_file_start (void)
 	       (TARGET_ALTIVEC_ABI ? 2
 		: TARGET_SPE_ABI ? 3
 		: 1));
+      fprintf (file, "\t.gnu_attribute 12, %d\n",
+	       aix_struct_return ? 2 : 1);
     }
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]