Uh oh!
There was an error while loading. Please reload this page.
add Intel syntax alternatives to all gcc inline assembly - #244
Conversation
andrewbird
commented
Apr 22, 2026
So this is interesting, why would GCC allow this and what if the two sides aren't equivalent? |
ecm-pushbx
commented
Apr 22, 2026
In my case I make use of it so I can use |
andrewbird
commented
Apr 22, 2026
The use of ATT syntax is only in the GCC inline, or did I miss some other example in the kernel? It seems to me that if we switched to Intel syntax here it would be more in keeping with the rest of the assembly source in the kernel. Would anyone object to that? |
ecm-pushbx
commented
Apr 22, 2026
If you pass
That would require editing all makefiles to always pass |
andrewbird
commented
Apr 22, 2026
I thought that it might be nice to keep just one version of the inline assembly code and also support your use case. |
ecm-pushbx
commented
Apr 22, 2026
I don't know how that'd be possible unfortunately. If you use |
andrewbird
commented
Apr 22, 2026
Okay, sorry for the noise. |
PerditionC
commented
Jul 1, 2026
I prefer intel syntax over at&t form (just because its what I learned first), so I'm up for changing the whole build to use intel syntax [I'm starting on revamping the makefiles so gmake required, same make on all platforms] so updating makefiles isn't a problem. However, I haven't merged this yet because another project I"m working on is merging all the sys changes from here with the sys repository (mostly done, so I don't want to add more changes yet) and then make the sys in the kernel a submodule. |
Based on #225 I developed the patch in https://pushbx.org/ecm/test/20260422-generate-listings.diff (AT&T syntax) and https://pushbx.org/ecm/test/20260422-generate-listings-intel.diff (Intel syntax) to generate assembler listing files from the .c files.
This commit includes only the changes to inline assembly, as these shouldn't break anything for other users or other compilers than ia16-elf-gcc. As it turns out, gcc extended inline assembly allows to specify two variants for any snippet, one for AT&T syntax and the other for Intel syntax.
Previously discussed in https://codeberg.org/tkchia/gcc-ia16/issues/9#issuecomment-13551167
I verified that both sys.com and kgc8632.sys are byte by byte exactly identicalised matches before and after applying this commit.