addPassesToEmitFile and Intel syntax

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

addPassesToEmitFile and Intel syntax

Frank Winter
Hi,

I am using TargetMachine::addPassesToEmitFile to write out x86-64
assembly. However, the generated assembly uses the AT&T syntax. Is there
a way to switch to the Intel syntax?

Thanks,
Frank

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: addPassesToEmitFile and Intel syntax

Reid Kleckner-2
llc does support -x86-asm-syntax=intel, and Clang maps that to -masm=intel. I don't think there is an API for it other than the command line. The output will still use GAS style directives, so it won't assemble with masm.

It may not have as high fidelity as the AT&T asm printer, since we've never relied on it as much. Before MC, feeding AT&T style assembly to GAS was the only way to produce object files, so it had to be reliable in a way that was never required of the Intel syntax.

On Mon, Jul 27, 2015 at 8:50 AM, Frank Winter <[hidden email]> wrote:
Hi,

I am using TargetMachine::addPassesToEmitFile to write out x86-64 assembly. However, the generated assembly uses the AT&T syntax. Is there a way to switch to the Intel syntax?

Thanks,
Frank

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev