This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c/9564: compiling sdiff causes ICE on powerpc
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Segher Boessenkool <segher at koffie dot nl>
- Cc: David Edelsohn <dje at watson dot ibm dot com>, gcc-patches at gcc dot gnu dot org, nall at gentoo dot org
- Date: Mon, 10 Mar 2003 11:35:27 -0800
- Subject: Re: c/9564: compiling sdiff causes ICE on powerpc
- References: <D937B15A-395A-11D7-8760-000393750C1E@redhat.com> <3E41E935.8010500@koffie.nl> <3E4D9848.2000104@koffie.nl>
- Reply-to: aldyh at redhat dot com
Segher. Thanks so much for your patch, and my apologies for the delay.
I'm committing the patch below to mainline. No changes from your version,
except a few whitespace mods.
2003-03-10 Segher Boessenkool <segher at koffie dot nl>
* testsuite/gcc.dg/altivec-9.c: New file.
* config/rs6000/rs6000.c (altivec_frame_fixup): Remove.
(rs6000_emit_prologue): Use rs6000_frame_related instead.
Index: testsuite/gcc.dg/altivec-9.c
===================================================================
RCS file: testsuite/gcc.dg/altivec-9.c
diff -N testsuite/gcc.dg/altivec-9.c
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- testsuite/gcc.dg/altivec-9.c 10 Mar 2003 19:32:52 -0000
***************
*** 0 ****
--- 1,13 ----
+ /* { dg-do compile { target powerpc-*-* } } */
+ /* { dg-options "-maltivec -mabi=altivec -g" } */
+
+ /* PR9564 */
+
+ extern int vfork(void);
+
+ void
+ boom (void)
+ {
+ char buf[65536];
+ vfork();
+ }
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.433
diff -c -p -r1.433 rs6000.c
*** config/rs6000/rs6000.c 10 Mar 2003 18:03:17 -0000 1.433
--- config/rs6000/rs6000.c 10 Mar 2003 19:32:53 -0000
*************** static int first_altivec_reg_to_save PAR
*** 267,273 ****
static unsigned int compute_vrsave_mask PARAMS ((void));
static void is_altivec_return_reg PARAMS ((rtx, void *));
static rtx generate_set_vrsave PARAMS ((rtx, rs6000_stack_t *, int));
- static void altivec_frame_fixup PARAMS ((rtx, rtx, HOST_WIDE_INT));
static int easy_vector_constant PARAMS ((rtx));
static bool is_ev64_opaque_type PARAMS ((tree));
static rtx rs6000_dwarf_register_span PARAMS ((rtx));
--- 267,272 ----
*************** rs6000_emit_allocate_stack (size, copy_r
*** 10102,10133 ****
REG_NOTES (insn));
}
- /* Add a RTX_FRAME_RELATED note so that dwarf2out_frame_debug_expr
- knows that:
-
- (mem (plus (blah) (regXX)))
-
- is really:
-
- (mem (plus (blah) (const VALUE_OF_REGXX))). */
-
- static void
- altivec_frame_fixup (insn, reg, val)
- rtx insn, reg;
- HOST_WIDE_INT val;
- {
- rtx real;
-
- real = copy_rtx (PATTERN (insn));
-
- real = replace_rtx (real, reg, GEN_INT (val));
-
- RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- real,
- REG_NOTES (insn));
- }
-
/* Add to 'insn' a note which is PATTERN (INSN) but with REG replaced
with (plus:P (reg 1) VAL), and with REG2 replaced with RREG if REG2
is not NULL. It would be nice if dwarf2out_frame_debug_expr could
--- 10101,10106 ----
*************** rs6000_emit_prologue ()
*** 10494,10500 ****
insn = emit_move_insn (mem, savereg);
! altivec_frame_fixup (insn, areg, offset);
}
}
--- 10467,10474 ----
insn = emit_move_insn (mem, savereg);
! rs6000_frame_related (insn, frame_ptr_rtx, info->total_size,
! areg, GEN_INT (offset));
}
}