Where can I find syntax and semantics of the above modifier?
The IL reference guide is a bit short on this.
Thanks
Try out:
http://developer.amd.com/gpu_assets/ATI_Intermediate_Language_%28IL%29_Specification_v2b.pdf
himanshu
Himanshu,
thanks a lot. There isn't too much info in this document either.
So, for example, what does
mov r0, r1.wzxy_neg(zw)
do?
Is the neg-operator pre- or post-swizzle?
Plus, will a neg-operator consume additional clock cycles?
Thanks
Sorry, found it myself:
swizzle takes precedence over neg.
Additional question I would have:
What's the correct way of using neg() for double-precision operands?
Also, are there literals for double-precision constants?
Thanks
If you have a look at the ASM docs (Evergreen Family ISA), you'll get a better idea of what the modifier does. In general, it flips the MSB of the channel specified (post swizzle).
The specific rules I have worked out by trial and error are:
Note that the same rules seem to apply to the abs modifier. Many of the other modifiers will make no sense for integer operations (eg _bx2), although I doubt the IL compiler will complain (it is not always self consistent in behaviour).
Malcolm