This is the mail archive of the
mailing list for the GCC project.
Re: Alpha CPU-specific builtins
On Mon, May 27, 2002 at 02:50:37AM +0200, Falk Hueffner wrote:
> Interesting, I cannot find this in the architecture handbook nor the
> EV6 hardware reference, where is this documented?
I don't know where it's documented. It was mentioned to me in
a conversation with one of the alpha architects.
It's probably not worth worrying about, I guess.
> I considered that, but it seems when using vector mode, the variables
> have to be declared to be of a special type in C, and cast to and from
> normal longs.
No, you insert all the "casts" inside the builtin function.
What I wrote for you should be nearly complete.
> What would be the advantages?
As target-independent vector operations are added to gcc, alpha will
already have the appropriate bits defined.
> The same thing applies to zap, IMHO: I would normally never write
> zap(foo, 0xaa)...
No, zap is a different case. It is _much_ more likely that gcc
can optimize a funny AND than a vector operation.
Perhaps I'm being overly anal, but IMO one should always attempt to
describe what the instruction is doing and only fall back on UNSPEC
when it's really too hard. You might be surprised what the compiler
can do sometimes when you give it enough information.