[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: Nicholas Coult <coult@augsburg.edu>*Subject*: altivec: how to load a scalar.*From*: Peter Soendergaard <soender@cs.utk.edu>*Date*: Wed, 25 Jul 2001 17:22:41 -0400 (EDT)*cc*: atlas-comm@cs.utk.edu*In-Reply-To*: <a05101000b7846f5c776b@[192.168.1.9]>

Hello Nicholas, I'm trying to adapt my codegenerator to AltiVec code, so I have taken your codes as a starting point to get a running start. However, I need one thing to get my algorithm working: I need to load a scalar into a vector register and zero all other elements in the vector. It does not matter where in the vector the scalar element ends up. I looked at the lvewx instruction that does exactly that, however the values at the positions in the vector that is not occupied by the scalar are undefined after the load, and not zero. Do you know how to solve this problem efficiently? First zeroing the vector would still leave undefined but bounded zeros, whatever that would amount to. Another question: I thought about using vxor to zero a register instead of loading -0.0 into it. Do you have any thoughts on that? Thanks, Peter.

**Follow-Ups**:**Re: altivec: how to load a scalar.***From:*Nicholas Coult <coult@augsburg.edu>

**References**:**Re: altivec***From:*Nicholas Coult <coult@augsburg.edu>

- Prev by Date:
**RE: repeat you test on P4** - Next by Date:
**Re: altivec: how to load a scalar.** - Prev by thread:
**Re: altivec** - Next by thread:
**Re: altivec: how to load a scalar.** - Index(es):