This is the mail archive of the
mailing list for the GCC project.
Re: fix for explicit SET modes
- To: "David S. Miller" <davem at dm dot cobaltmicro dot com>
- Subject: Re: fix for explicit SET modes
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 14 Aug 1998 09:29:06 -0600
- cc: egcs-patches at cygnus dot com, rth at cygnus dot com, wilson at cygnus dot com, scox at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199808141149.EAA17947@dm.cobaltmicro.com>you write:
> It is an error to give a mode other than VOIDmode for calls to
> gen_rtx_SET(). If you do it, reload can ruin your world. Also there
> are cases where explicit modes are given to SETs in *.md files which
> can have similarly disasterous effects.
> This tries to take care of all these issues. It might be nice to add
> a check in genrtl.[ch] for these cases to catch such coding errors
> Can I install this set of changes into the mainline?
> Fri Aug 14 03:41:31 1998 David S. Miller <firstname.lastname@example.org>
> * config/alpha/alpha.c (alpha_return_addr): Use VOIDmode in vall
> to gen_rtx_SET.
> * config/i386/i386.md (movsf, movdf, movxf): Likewise.
> * config/pa/pa.c (emit_move_sequence): Likewise.
> * expr.c (init_expr_once): Likewise.
> * config/pa/pa.md (switch_jump): Don't give SET an explicit mode.
This is definitely wrong for the PA.
The DImode is used to distinguish between two patterns which have the
same RTL form (a simple jump), but which must have different code at
assembly time because one appears inside a jump table.
We can certainly look for another way to solve the PA specific issue,
but first I want to know exactly why this is important.