From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3669 invoked by alias); 11 Dec 2002 20:46:49 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 3656 invoked from network); 11 Dec 2002 20:46:46 -0000 Received: from unknown (HELO motgate4.mot.com) (144.189.100.102) by sources.redhat.com with SMTP; 11 Dec 2002 20:46:46 -0000 Received: from pobox3.mot.com (pobox3.mot.com [10.64.251.242]) by motgate4.mot.com (Motorola/Motgate4) with ESMTP id gBBKkjpW008497 for ; Wed, 11 Dec 2002 13:46:45 -0700 (MST) Received: [from hyper.wm.sps.mot.com ([199.10.246.43]) by pobox3.mot.com (MOT-pobox3 2.0) with ESMTP id NAA22196 for ; Wed, 11 Dec 2002 13:42:00 -0700 (MST)] Received: (from pbarada@localhost) by hyper.wm.sps.mot.com (8.11.6/8.11.6) id gBBKjnQ13223; Wed, 11 Dec 2002 15:45:49 -0500 Date: Wed, 11 Dec 2002 12:57:00 -0000 Message-Id: <200212112045.gBBKjnQ13223@hyper.wm.sps.mot.com> From: Peter Barada To: gcc@gcc.gnu.org Subject: Re: Saga of m68k PIC continues X-SW-Source: 2002-12/txt/msg00597.txt.bz2 I restarted the mind-meld of i386 PIC into m68k, and I've gone through and modified the following defintions in m68k.h: LEGITIITMATE_PIC_OPERAND_P SYMBOLIC_CONST And modified/created the following functions in m68k.c: symbolic_operand local_symbolic_operand legitimate_pic_address_disp_p symbolic_reference_mentioned_p legitimize_pic_address It builds now, but fails building crtstuff.c with -fPIC: ./xgcc -B./ -B/home/mylocal/xcomp/target/m68k-linux/bin/ -isystem /home/mylocal/xcomp/target/m68k-linux/include -isystem /home/mylocal/xcomp/target/m68k-linux/sys-include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2.1/gcc -I/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2.1/gcc/. -I/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2.1/gcc/config -I/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2.1/gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fPIC \ -Dinhibit_libc -c /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2.1/gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFS_O \ -o crtbeginS.o /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2.1/gcc/crtstuff.c: In function `__do_global_dtors_aux': /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2.1/gcc/crtstuff.c:286: unrecognizable insn: (insn 12 115 14 (set (reg/f:SI 32) (unspec:SI[ (symbol_ref:SI ("completed.1")) ] 6)) -1 (nil) (expr_list:REG_EQUAL (const:SI (unspec:SI[ (symbol_ref:SI ("completed.1")) ] 6)) (nil))) /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.2.1/gcc/crtstuff.c:286: Internal compiler error in extract_insn, at recog.c:2148 The backtrace points to regmove_optimize() being the current pass, and at this point reload_in_progress *and* reload_complete are both zero, so the pseudo should be legal. Since I'm only trying to load the address of the symbol into a register, I'd expect the movsi and other implicit movsi patterns to handle it, especially: (define_insn "" ;; Notes: make sure no alternative allows g vs g. ;; We don't allow f-regs since fixed point cannot go in them. ;; We do allow y and x regs since fixed point is allowed in them. [(set (match_operand:SI 0 "nonimmediate_operand" "=g,d,a<,y,!*x*r*m") (match_operand:SI 1 "general_src_operand" "daymSKT,n,i,g,*x*r*m"))] "!TARGET_5200" "* { if (which_alternative == 4) return \"fpmove%.l %x1,fpa0\;fpmove%.l fpa0,%x0\"; if (FPA_REG_P (operands[1]) || FPA_REG_P (operands[0])) return \"fpmove%.l %x1,%x0\"; return output_move_simode (operands); }") I found that: (unspec:SI[ (symbol_ref:SI ("completed.1")) ] 6) is not accepted by general_operand(which is called form general_src_operand) which to me seems very strange, especially since the mode was SImode. 1) Should general_src_operand accept the unspec symbol? 2) If not, does anyone have an idea how I should get this instruction recognized? -- Peter Barada Peter.Barada@motorola.com Wizard 781-852-2768 (direct) WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)