This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, SPU] Use link register as DWARF return column
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: trevor_smigiel at playstation dot sony dot com, andrew_pinski at playstation dot sony dot com
- Date: Sat, 9 Aug 2008 15:10:04 +0200 (CEST)
- Subject: [PATCH, SPU] Use link register as DWARF return column
Hello,
mainline GCC currently does not define DWARF_FRAME_RETURN_COLUMN
for the SPU, even though it would be possible to use the link register
as return column (as is done e.g. on rs6000 and s390).
While both ways will work, using the link register as return column
will lead to somewhat more compact CFI, and also corresponds to what
our previous out-of-tree GCC builds used to do. The patch below adds
that define back.
Tested on spu-elf with no regressions.
OK for mainline and 4.3?
Bye,
Ulrich
Index: gcc/config/spu/spu.h
===================================================================
--- gcc/config/spu/spu.h (revision 132947)
+++ gcc/config/spu/spu.h (working copy)
@@ -289,6 +289,8 @@
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG(Pmode, LINK_REGISTER_REGNUM)
+#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (LINK_REGISTER_REGNUM)
+
#define ARG_POINTER_CFA_OFFSET(FNDECL) (-STACK_POINTER_OFFSET)
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com