This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,rs6000] emit .gnu_attribute for struct return convention
- From: Nathan Froyd <froydnj at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dje dot gcc at gmail dot com
- Date: Fri, 10 Oct 2008 19:02:25 -0700
- Subject: [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