This is driving me up a tree.  I have a fix for 18421(on mainline &
gcc-3.4.3) that uses HARD_REGNO_MODE_OK to prevent bytes into address
registers, and modified movqi for ColdFire to drop the '*a' in
d*a/di*a constraint, as well as modified addsi3_5200 to us 'i' instead
of 's'.

My current problem is when I'm compiling Perl for the ColdFire v4e
using gcc-3.4.3 for m68k-linux, and I'm seeing:

[EMAIL PROTECTED] tmp]$ 
/opt/logicpd/ColdFire-new12/m68k-linux/gcc-3.4.3-glibc-2.3.2/bin/m68k-linux-gcc 
-DPERL_CORE -mcfv4e -fno-strict-aliasing -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 pp_pack.c -S -o pp_pack.s -da
pp_pack.c: In function `S_unpack_rec':
pp_pack.c:2220: error: unable to find a register to spill in class `ADDR_REGS'
pp_pack.c:2220: error: this is the insn:
(insn 5559 5558 5560 694 pp_pack.c:2144 (set (reg:SI 8 %a0 [1421])
        (plus:SI (subreg:SI (reg:QI 1420) 0)
            (const_int -32 [0xffffffe0]))) 121 {*addsi3_5200} (insn_list 5558 
(nil))
    (nil))
pp_pack.c:2220: confused by earlier errors, bailing out

The RTL surrounding this from pp_pack.c.24.lreg is:
;; Start of basic block 694, registers live: 14 [%a6] 15 [%sp] 24 [argptr] 31 
35 36 37 38 39 43 45 46 47 48 50 52 57 70 1369 1370 1371 1378 1391 1402 1413 
1725 1734 1735 1736 1738 1740 1756
(note 6967 5556 5558 694 [bb 694] NOTE_INSN_BASIC_BLOCK)

(insn 5558 6967 5559 694 pp_pack.c:2144 (set (reg:QI 1420)
        (mem:QI (reg:SI 1756 [ s ]) [0 S1 A8])) 43 {movqi_cfv4} (nil)
    (expr_list:REG_DEAD (reg:SI 1756 [ s ])
        (nil)))

(insn 5559 5558 5560 694 pp_pack.c:2144 (set (reg:SI 1421)
        (plus:SI (subreg:SI (reg:QI 1420) 0)
            (const_int -32 [0xffffffe0]))) 121 {*addsi3_5200}
        (insn_list 5558 (nil))
    (nil))

(insn:QI 5560 5559 5561 694 pp_pack.c:2144 (set (cc0)
        (compare (subreg:QI (reg:SI 1421) 3)
            (const_int 64 [0x40]))) 15 {cfv4_cmpqi} (insn_list 5559 (nil))
    (expr_list:REG_DEAD (reg:SI 1421)
        (nil)))


pp_pack.c.25.greg stops with the line 'Spilling for insn 5559.'  This
line is repeated twice previously. the first with no
information attached(just 'Spilling for insn 5559.'), and then second
time has 'Using reg 9 for reload 0' after it.

This also fails on gcc-3.4.3 for -m5407, but compiles for -m5200.  The
5407 has more instructions and less restrictive addressing modes on
some instructions than the 5200 has.

Can anyone take a stab at describing *how* to debug this?  Is this
just a case where there are so many live registers that reload has
just backed itself into a corner?

Any suggestions are appreciated!

-- 
Peter Barada
[EMAIL PROTECTED]

Reply via email to