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]
Other format: [Raw text]

Re: Stormy16 reload failure in fp-cmp-5.c



Andrew Haley <aph@cambridge.redhat.com> writes:

> fp-cmp-5.c faile because reload is generating incorrect code.
> 
> If an insn like 
> 
> (set (mem (post_inc (sp))) mem (post_inc (reg)))
> 
> needs reloading with both the mem and reg, we end up with
> 
>         mov.w r6,(sp,-10)
>         mov.w r7,(r6++)
>         push r7
>         mov.w (sp,-10),r6
> 
> which is clearly wrong: reload can't cope with the sp adjustment.
> 
> I fixed this by defining separate push and pop patterns that only
> accept registers.  I ran the full c and c++ torture test, no
> regressions.

I don't really like this, but I couldn't think of a better way to fix
it, so the patch is approved.

> 2002-01-30  Andrew Haley  <aph@cambridge.redhat.com>
> 
> 	* config/stormy16/stormy16.md (pushqi): New.
> 	(popqi): New.
> 	(pushhi): New.
> 	(pophi): New.
> 	(movhi): Remove stack operands.
> 	(movqi): Likewise.
> 	* config/stormy16/stormy16.h (PREDICATE_CODES): Add
> 	nonimmediate_nonstack_operand.
> 	* config/stormy16/stormy16.c (nonimmediate_nonstack_operand): 
> 	New.
> 	* config/stormy16/stormy16-protos.h (nonimmediate_nonstack_operand)
> 	New.

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


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