This is the mail archive of the
mailing list for the GCC project.
Re: Extend mode macros
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Aldy Hernandez<aldyh at redhat dot com>, Richard Henderson <rth at redhat dot com>
- Date: Tue, 23 Nov 2004 10:28:32 +0000
- Subject: Re: Extend mode macros
- References: <41A30B3D.firstname.lastname@example.org>
Nathan Sidwell <email@example.com> writes:
> I've been using mode macros to clean up the altivec.md file. There is
> a shortcoming wrt UNSPEC, and this patch addresses that.
> UNSPECs look like
> (UNSPEC:mode [...] MAGIC_CONSTANT)
> and altivec has distinct UNSPECS for V4SI, V8HI and V16QI modes, all
> with the same template, but different MAGIC_CONSTANTs.
But why do they need to have different constants? It looks from your
example altivec.md patch like they're doing the same thing conceptually,
but with different sizes, so why not use a single constant for them all?
recog checks both the mode and the constant so there's not going to be
FWIW, mips.md has several examples of this.
Not that I'm objecting to an extension to the reader. It's just that it
doesn't look like stage3 material to me, and the example from altivec.md
looks like something you can clean up with the existing framework.