Inline asm....
Inline asm....
if i use inline assembly in gcc of g++ , i'll have to use at&t syntax, witch is chinese to me . Is there an option for gcc to so that it uses nasm for inline assembly?
I need someone to show me the things in life that I cant find
I cant see the things that make true happiness, I must be blind
I cant see the things that make true happiness, I must be blind
- chase
- Site Admin
- Posts: 710
- Joined: Wed Oct 20, 2004 10:46 pm
- Libera.chat IRC: chase_osdev
- Location: Texas
- Discord: chase/matt.heimer
- Contact:
This is a common misconception. GAS supports intel syntex. Just add as your first inline assembly statement. The macro support and a little bit of the other syntax will still be different but it shouldn't be chinese anymore
Another little know fact is that you can generate intel syntax assembly from C/C++ source by using the compile options like this
Code: Select all
.intel_syntax noprefix
Another little know fact is that you can generate intel syntax assembly from C/C++ source by using the compile options like this
Code: Select all
gcc -masm=intel -finhibit-size-directive -fverbose-asm -fleading-underscore -S -o test.asm test.c