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]

Re: ARM Thumb byte stores


Richard Earnshaw wrote:
> The problem occurs because we have r8 (a high register) equal to sp; so
> when we try to reload the store (which is based off r8), we substitute in
> SP, since it is in BASE_REGS_CLASS and hence 'a valid alternative'.
> 
> Here is what I think should be a suitable patch.  I've run some code
> through it, and it doesn't seem to cause anything horrible to happen; but
> messing around with the register classes is fraught with potential
> problems, so this may throw up something I haven't considered.  However,
> the AVR port seems to manage without having the stack pointer part of
> BASE_REG_CLASS, so maybe thumb compiles can too.

I've finally tested with this patch and it all works now, and programs are
running happily. Can you put this in the v3.0 branch please?

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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