digitalmars.D - Template Arguments in inline ASM
- John Kiro (34/34) Sep 07 2007 Hell There
- Don Clugston (5/42) Sep 09 2007 Yup. #1 and #4 are bugs. Put them into Bugzilla.
- John Kiro (4/46) Sep 09 2007 Thanks Don.. that would be my first bugs to report.. I'll check how to d...
Hell There I made the following example to see how far can inline asm blocks use template args: ======================================== void asm_template(T)(T Tval,T* pDest) { asm{ fld Tval; mov EAX,pDest; }//asm }//asm_template void main() { float f1=4.0; float f2=5.0; asm_template!(float)(f1,&f2); } ======================================== Here is the compilation result of the 4 statements marked above: float". In other words, why would it fail if T is correctly interpreted to float? would be more natural). In conclusion, I see that template args are partially (and unclearly) supported inside ASM blocks. Me, I hope to have better support for aliases & template args in ASM blocks. What do you think friends? Regards, John
Sep 07 2007
John Kiro wrote:Hell There I made the following example to see how far can inline asm blocks use template args: ======================================== void asm_template(T)(T Tval,T* pDest) { asm{ fld Tval; mov EAX,pDest; }//asm }//asm_template void main() { float f1=4.0; float f2=5.0; asm_template!(float)(f1,&f2); } ======================================== Here is the compilation result of the 4 statements marked above: float". In other words, why would it fail if T is correctly interpreted to float? would be more natural). In conclusion, I see that template args are partially (and unclearly) supported inside ASM blocks. Me, I hope to have better support for aliases & template args in ASM blocks. What do you think friends? Regards, Johnis giving me a lot of grief at the moment. And in the last DMD, there's a new bad code generation bug with using tuple parameters from asm.
Sep 09 2007
Don Clugston Wrote:John Kiro wrote:Thanks Don.. that would be my first bugs to report.. I'll check how to do so. Regards, JohnHell There I made the following example to see how far can inline asm blocks use template args: ======================================== void asm_template(T)(T Tval,T* pDest) { asm{ fld Tval; mov EAX,pDest; }//asm }//asm_template void main() { float f1=4.0; float f2=5.0; asm_template!(float)(f1,&f2); } ======================================== Here is the compilation result of the 4 statements marked above: float". In other words, why would it fail if T is correctly interpreted to float? would be more natural). In conclusion, I see that template args are partially (and unclearly) supported inside ASM blocks. Me, I hope to have better support for aliases & template args in ASM blocks. What do you think friends? Regards, Johnis giving me a lot of grief at the moment. And in the last DMD, there's a new bad code generation bug with using tuple parameters from asm.
Sep 09 2007