This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: x86 SSE constants
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Sat, 1 Oct 2005 01:17:38 +0200
- Subject: Re: x86 SSE constants
- References: <911f975f2625580327e1db45f490eb32@apple.com>
> The C constraint on x86 is defined, in both the doc and the comments, as
> "constant that can be easily constructed in SSE register without loading
> from memory". Currently the only one handled is 0, but there is at
> least
> one more, all 1 bits, which is constructed by
> pcmpeqd %xmm, %xmm
> Unfortunately there are quite a few places in the patterns that assume
> C
> means zero, and generate pxor or something like that. What would be
> the preferred way to fix this, new constraint or change the existing
> patterns?
My original plan was to add pcmpeqd by extending the 'C' constraint and
the patterns where pxor/xorp? is currently generated unconditionally.
This is pretty similar to what we do to i387 constants as well. I never
actually got to realizing this (for the scalar FP work I was mostly
interested in that time it was not at all that interesting), but I think
there is nothing in md file preventing it (or I just missed it when it
was added :)...
Honza