add Intel syntax alternatives to all gcc inline assembly#244
add Intel syntax alternatives to all gcc inline assembly#244ecm-pushbx wants to merge 1 commit intoFDOS:masterfrom
Conversation
|
So this is interesting, why would GCC allow this and what if the two sides aren't equivalent? |
|
In my case I make use of it so I can use |
|
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? |
If you pass
That would require editing all makefiles to always pass |
|
I thought that it might be nice to keep just one version of the inline assembly code and also support your use case. |
I don't know how that'd be possible unfortunately. If you use |
|
Okay, sorry for the noise. |
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.