Saga of m68k PIC continues
Peter Barada
pbarada@mail.wm.sps.mot.com
Wed Dec 11 12:57:00 GMT 2002
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)
More information about the Gcc
mailing list