This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mips16/mips64 frame ptr to stack ptr
Gavin Koch wrote:
> Nigel Stephens writes:
> > * config/mips/mips.c (mips_move_1_word): We can't do a simple "lwu" for unsigned loads in 64-bit mode with -mips16 if the
> > base register is the stack pointer, instead we have do do
> > a "lw" and manually zero-extend.
>
> I thought about doing this too, but this produces an instruction
> of length 3, while the md file asserts that the length is only
> 1. I believe it's better to keep the assertions consistent and
> generate worse code, but I'm certainly not the final word on
> this.
You're right of course, although it's worse than that because the dsll
and dsrl will be extended instructions, making it length 5 :-(. I
suppose the length attributes of the zero_extendsidi2_internal pattern
in the md file could be adjusted to match this figure; perhaps just put
in a new pattern for TARGET_MIPS16.
--
________________________________________________________________________
Nigel Stephens, Algorithmics Ltd, 3 Drayton Park, London N5 1NU. England
mailto:nigel@algor.co.uk http://www.algor.co.uk
phone:+44 171 700 3301 mobile:+44 976 686470 fax:+44 171 700 3400