http://madscientistlabs.blogspot.ca/2013/07/gas-problems.htm...
Has Gas understanding of Intel syntax meanwhile improved? It had a few bugs when I did this.
But, as a side note, all PC assemblers are crap. They could do so much more. I don't know why I'm expected to handle register allocation, or think about inter-unit dependencies that cause stalls.
On the x86, starting with the 486 and Pentium it wasn't possible any longer to fit all variations on the head.
At least I can't.
The porting I mentioned above was to make a compiler depend only on binutils.
Other than that, my last 100% Assembly application was around 1995.
I started coding x86 Assembly back when MS-DOS 3.3 was modern in PC world, so never got to love AT&T syntax.
Specially after my porting experiment.
I needed to change a compiler backend to depend only on binutils (gas & ld).
So the existing NASM code had to ported.
NASM macros couldn't be mapped to what Gas offers and I also had some issues getting my head around how to write the addressing modes.
I was using a common trick for code generation.
Generate bytecodes that are actually Assembler macros.
A simple way to get static binaries, even if the performance is not optimal.
In the end I gave up and made the backend generate the respective Assembly code directly.
I had to port a code generation module from Intel syntax to AT&T. What a pain!
Gas is so limited compared with what PC macro assemblers are capable of.