From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21975 invoked by alias); 5 Feb 2003 00:16:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 21953 invoked by uid 71); 5 Feb 2003 00:16:00 -0000 Date: Wed, 05 Feb 2003 00:16:00 -0000 Message-ID: <20030205001600.21952.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Segher Boessenkool Subject: Re: c/9564: compiling sdiff causes ICE on powerpc Reply-To: Segher Boessenkool X-SW-Source: 2003-02/txt/msg00241.txt.bz2 List-Id: The following reply was made to PR c/9564; it has been noted by GNATS. From: Segher Boessenkool To: nall@gentoo.org Cc: gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: c/9564: compiling sdiff causes ICE on powerpc Date: Wed, 05 Feb 2003 00:10:09 +0100 Hi, This patch fixes it; if okay, please install on 3.3 and mainline (and 3.2, too, if that branch is open for this kind of thing; I believe it's not, at the moment :) ). Does something like this need a testcase? If so, in what directory? gcc.dg? A simplified testcase is attached, but I'll write a real testsuite thingy if wanted. Segher /* compile with -maltivec -mabi=altivec -g */ extern int vfork(void); void boom(void) { char buf[65536]; vfork(); } 2003-02-04 Segher Boessenkool * config/rs6000/rs6000.c (altivec_frame_fixup): Remove. (rs6000_emit_prologue): Use rs6000_frame_related instead. *** config/rs6000/rs6000.c~ Tue Feb 4 09:23:02 2003 --- config/rs6000/rs6000.c Tue Feb 4 10:51:42 2003 *************** static int first_altivec_reg_to_save PAR *** 262,268 **** 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)); /* Default register names. */ --- 262,267 ---- *************** rs6000_emit_allocate_stack (size, copy_r *** 9976,10007 **** 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 --- 9975,9980 ---- *************** rs6000_emit_prologue () *** 10299,10305 **** insn = emit_move_insn (mem, savereg); ! altivec_frame_fixup (insn, areg, offset); } } --- 10272,10279 ---- insn = emit_move_insn (mem, savereg); ! rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, ! areg, GEN_INT (offset)); } }