bhavanvaishnav
27-Mar-2008, 14:03
Hi,
I was trying out different compiler optimizations and have a few queries regarding the same..
I tried running a simple spulet and checked out the generated assembly..with 03 on..
1> int z=10
printf ("\n %d",z);
this just loads an rValue il $2,10 instead of loading it off the $sp..so this does not require any rotates and shifts..since its an immediate value..
2> so its good to use qwords for scalars (because this eliminates rotates and shifts)..but if O3 does this for me..what advantage do i gain defining them as qwords?..
3>Actually the question here is more general..this might sound bad..but do i prefer qwords for vectors as well..cos i have been going through some of the 'homework 3' code (on the insomniac r&d website) and i could not see any vectors used there..so i assume i can complete SIMD operations defining things as qwords..am i right?..or that code wasnt SIMDized or SIMDizable..
4> And i would really appreciate it if someone explained where i can apply qwords instead of the obvious data types..
5> This website rocks..(n the insomniac one)..
Thanks..
I was trying out different compiler optimizations and have a few queries regarding the same..
I tried running a simple spulet and checked out the generated assembly..with 03 on..
1> int z=10
printf ("\n %d",z);
this just loads an rValue il $2,10 instead of loading it off the $sp..so this does not require any rotates and shifts..since its an immediate value..
2> so its good to use qwords for scalars (because this eliminates rotates and shifts)..but if O3 does this for me..what advantage do i gain defining them as qwords?..
3>Actually the question here is more general..this might sound bad..but do i prefer qwords for vectors as well..cos i have been going through some of the 'homework 3' code (on the insomniac r&d website) and i could not see any vectors used there..so i assume i can complete SIMD operations defining things as qwords..am i right?..or that code wasnt SIMDized or SIMDizable..
4> And i would really appreciate it if someone explained where i can apply qwords instead of the obvious data types..
5> This website rocks..(n the insomniac one)..
Thanks..