This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [m68k]: More trouble with byte moves into Address registers


>> 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))
>
>You might want to look at CANNOT_CHANGE_MODE_CLASS, which can be used to 
>change how reload handles (subreg:SI (reg:QI)).  That might help avoid 
>generating QImode ADDR_REG reloads in the first place.
>
>But if they are generated, then you need second reloads to resolve them 
>as Ian mentioned.  There is probably no way to avoid implementing this.
>
>You should also look at MODES_TIEABLE_P, which may also help prevent 
>getting QImode ADDR_REG reloads.
>
>Even if you fix both of these, you will probably still need the 
>secondary reload support for this case.

I added:

/* Try to suppress (subreg:SI (reg:QI)) from ending up in ADDR_REGS */
#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS)   \
 (((FROM) == QImode || (TO) == QImode) \
  ? reg_classes_intersect_p (ADDR_REGS, (CLASS)) : 0)

to my gcc-3.4.3 for ColdFire v4e, and that allows perl-5.9.2 to build.
I'm in the midst of rebuilding the entire linux kernel and user
environment to make sure it didn't cause anything else to go wrong,
but so far, so good.  I have my fingers crossed that this is both
correct and is enough(Should I try (GET_MODE_SIZE (FROM) == 1 ||
GET_MODE_SIZE (TO) == 1) )?

I'm really leary of twisting any more knobs without a *clear*
understanding of what impact the knobs actaully have, and the doco
just isn't giving me that.

I've got a "Using and Porting GNU CC" manual for rev 2.95, and am
looking around for a newer one and can't find it anywhere.  Does
anyone know if a newer printed manual is available(and if so, where I
can find it)?

Eventually I'll have to try my changes on gcc-4.0 to see what that does.

-- 
Peter Barada
peter@the-baradas.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]