This is the mail archive of the gcc-patches@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]

Re: Incorrect code using gcc 2.8.x for Motorola 5200 Coldfire


Jeffrey A Law wrote:
> 
>   In message <35EB1E68.19E3FCDD@intellistor.com>you write:
>   >
>   > Correct.  I didn't state that clearly enough.  Upon reading the
>   > 68020, 68030, 68040, 5202, 5206 and 5307 programmers references;
>   > it appears that a "movea.w" is not allowed on any of these
>   > processors (i.e. a byte move into or out of an address register).
> Err, "movea.w" != byte.

Yes, my mistake.  I meant "movea.b", which does = byte.  A "movea.w"
is allowed, on all 68k and 5X architectures.
> 
> I spent a little more time looking at the code, and for other m68k
> variants we only disallow QImode loads/stores to/from address registers.
> 
> For a byte copy we'll actually generate a word sized copy.  So, does
> the 5307 allow mov.w #<immedaite>,aX or mov.w reg0,reg1 where
> reg0 and/or reg1 are address registers?
> 
> If so, then the better solution is easy.  We fix the constraints to disallow
> QImode load/stores to/from address regs and tweak output_movve_qimode
> to use the ".w" extension instead of hte ".b" extension for something
> which references an address reg.

This sounds good.

> 
> [ I say better since we would still allow QImode values to be
>   allocated to address regs, which has advantages for register
>   allocation. ]
> 
> 
> 
> jeff

Thanks again,
-- 

--Russ (rfellows@intellistor.com)


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