Talk:Inline Assembly/Examples: Difference between revisions

no edit summary
No edit summary
 
Line 50:
::I did a general cleanup of the article, which was in ''pitiful'' state. That's more important than whether it's inline functions or macros. ;-)
::I assume you are more familiar with inline ASM in general; could you double-check the syntax of each example? I have a feeling there might be some bugs in there. The first 'io_wait()' looks funny, several 'asm' calls have only one colon, stuff like that. I'd also prefer 'uintX_t' instead of 'word' or 'unsigned short' and stuff like that (unless I get another flame from you for that ;-) ). -- [[User:Solar|Solar]] 14:41, 22 March 2011 (UTC)
 
:::There was nothing wrong with the io_wait labels but I changed the second anyway in order to avoid confusion. Having only one colon is okay as long as you only have output (the syntax is '':output:input:clobber''). With the exception of CPUID, everything looked fine but I also changed the way multi-instruction asm blocks were written so that the output doesn't contain all the instructions on a single line (this is only visible for people who want to see the assembly file generated by GCC). Regarding the uintX_t, I fully agree---however, I think there are quite a few articles that need to be modified because they don't use the freestanding headers, which I think is just silly. --[[User:Love4boobies|Love4boobies]] 15:55, 22 March 2011 (UTC)
Anonymous user