mips16 can't add pseudo to sp directly

Alexandre Oliva aoliva@redhat.com
Sat Mar 16 15:52:00 GMT 2002


When the operand of an sp adjustment does not satisfy arith_operand
(for example, -100000, as in gcc.c-torture/compile/900313-1.c, we'll
have it forced into a register, and then we'll emit an instruction
that will be recognized as an sp addition but that won't be able to
satisfy its constraints.

This patch arranges for us to use a scratch register in which to
perform the addition, since the only add instruction involving sp can
only take an immediate operand.  This patch was tested with the same
Red Hat-internal mips port, as well as bootstrapped on
mips-sgi-irix6.5.  It was approved by Eric Christopher, so I'm
checking it in.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips16-add-non-const-into-sp.patch
Type: text/x-patch
Size: 2248 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020316/9bd21211/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


More information about the Gcc-patches mailing list