Have you tried this?
gcc -S -masm=intel test.c
Untested, but I found it in this forum where someone claimed it worked for them.
I just tried this on the mac and it failed, so I looked in my man page:
-masm=dialect
Output asm instructions using selected dialect. Supported choices
are intel or att (the default one). Darwin does not support intel.
It may work on your platform.
For Mac OSX:
clang++ -S -mllvm --x86-asm-syntax=intel test.cpp
Source: https://stackoverflow.com/a/11957826/950427
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…