This is the mail archive of the 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]

Fix for 3029057

While I was away Sam ran into a problem in Altivec epilog generation,
and with Mike's help came up with a fix (see Radar). Unfortunately
this fix doesn't work on the current TOT. I think it is the case that
a later pass doesn't expect two adjacent branches without a label
in between, so the RT is just to not emit the second (unreachable) branch
when emitting the epilog rather than wait for a later pass to do it.
I haven't tested this extensively yet; it works on Sam's example and
Skidmarks. I'll do a bootstrap before committing.

Index: rs6000.c
RCS file: /cvs/Darwin/gcc3/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.170
diff -u -d -b -w -r1.170 rs6000.c
--- rs6000.c 2002/09/03 23:44:44 1.170
+++ rs6000.c 2002/09/05 19:02:17
@@ -13808,6 +13808,9 @@
/* Prevent any attempt to delete the setting of R0 or R10! */
RTVEC_ELT (p, j++) = gen_rtx_USE (VOIDmode, gen_rtx_REG (reg_mode, 0));
RTVEC_ELT (p, j++) = gen_rtx_USE (VOIDmode, gen_rtx_REG (reg_mode, 10));
+ if (vrsave == branch)
+ emit_jump_insn (gen_rtx_PARALLEL (VOIDmode, p));
+ else
emit_insn (gen_rtx_PARALLEL (VOIDmode, p));

/* Get the old lr if we saved it. */
@@ -13860,7 +13863,8 @@
: gen_adddi3 (sp_reg_rtx, sp_reg_rtx, sa));

- if (!sibcall)
+ /* APPLE LOCAL Altivec related */
+ if (!sibcall && vrsave != branch)
rtvec p;
if (! restoring_FPRs_inline)

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