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: gcc-3.3 problem with reloading byte into address register on ColdFire


>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)


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