[m68k 11/13] fix symbolic address recognition during reload

Roman Zippel zippel@linux-m68k.org
Mon Feb 5 23:01:00 GMT 2007


Hi,

On Mon, 5 Feb 2007, Jeffrey Law wrote:

> > The additional offset is generated later by converting the SI argument to 
> > a QI argument, but I have to check the exact details again myself.
> > Note that all mentioned bugzilla references are different bugs.
> I also wonder if we should be trying to prevent reload from changing
> the mode of the argument from SI to QI mode -- it seems like we are
> having numerous problems when arguments get squished down to QImode.

Actually the argument has already QI mode. This is the reload in question:

Reloads for insn # 27
[..]
Reload 1: reload_in (QI) = (mem/u:QI (plus:SI (reg:SI 13 %a5)
                                                        (const:SI (plus:SI (symbol_ref:SI ("_Z12LispLessThanR15LispEnvironmenti") [flags 0x41] <function_decl 0xb7906620 LispLessThan>)
                                                                (const_int 3 [0x3])))) [0 S1 A8])
        DATA_REGS, RELOAD_FOR_INPUT (opnum = 1), optional, can't combine
        reload_in_reg: (subreg:QI (reg:SI 131) 3)

[..]

(insn 7 5 9 2 (set (reg:SI 131)
        (mem/u:SI (plus:SI (reg:SI 13 %a5)
                (symbol_ref:SI ("_Z12LispLessThanR15LispEnvironmenti") [flags 0x41] <function_decl 0xb7906620 LispLessThan>)) [0 S4 A8])) 31 {*m68k.md:659} (nil)
    (expr_list:REG_EQUIV (mem/u:SI (plus:SI (reg:SI 13 %a5)
                (symbol_ref:SI ("_Z12LispLessThanR15LispEnvironmenti") [flags 0x41] <function_decl 0xb7906620 LispLessThan>)) [0 S4 A8])
        (nil)))

[..]

(insn 27 23 28 2 (set (mem/s:QI (plus:SI (reg:SI 134)
                (const_int 26 [0x1a])) [0 Code_PositiveIntPower+26 S1 A8])
        (subreg:QI (reg:SI 131) 3)) 38 {*m68k.md:731} (nil)
    (nil))


I guess the alternative is to push it into a register, but this actually 
works fine, the linker simply creates another GOT entry for it, so I don't 
see why we should disallow it.

bye, Roman



More information about the Gcc-patches mailing list