gcc-3.3 problem with reloading byte into address register on ColdFire

Peter Barada pbarada@mail.wm.sps.mot.com
Wed Jul 9 20:35:00 GMT 2003


>Why don't you save all the effort with secondary reloads etc
>and just prohibit QImode values in ADDR_REGS entirely with
>HARD_REGNO_MODE_OK?  Yes, it prohibits you using ADDR_REGS
>for temporaries, but it is not clear to me that that gets
>you better code.

I'll try the following out and see what happens:

/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
   On the 68000, the cpu registers can hold any mode but the 68881 registers
   can hold only SFmode or DFmode.  Prevent QImode from being placed
   into an address register. */

#define HARD_REGNO_MODE_OK(REGNO, MODE) \
  ((((REGNO) >= 8 && (REGNO) < 16) && ((MODE) == QImode)) ? 0 :    \
  (((REGNO) < 16                                                   \
    && !((REGNO) < 8 && (REGNO) + GET_MODE_SIZE (MODE) / 4 > 8))   \
   || ((REGNO) >= 16 && (REGNO) < 24                               \
       && (GET_MODE_CLASS (MODE) == MODE_FLOAT                     \
	   || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT)         \
       && GET_MODE_UNIT_SIZE (MODE) <= 12)))

-- 
Peter Barada                             Peter.Barada@motorola.com
Wizard                                   781-852-2768 (direct)
WaveMark Solutions(A Motorola Company)   781-270-0193 (fax)



More information about the Gcc mailing list