[LLVMdev] Is NASM supported by LLVM?

1,015 views
Skip to first unread message

Thomson

unread,
Jun 21, 2012, 1:12:27 AM6/21/12
to LLVM developers' mailing list
I saw some LLVM generated assembly in NASM format, but did find this support in the official release. Is this supported?

--
Thanks
Thomson Tan

Sean Silva

unread,
Jun 21, 2012, 2:30:46 AM6/21/12
to Thomson, LLVM developers' mailing list
If by "NASM format" you mean Intel syntax, then yes. In my experience most LLVM tools refer to it with the option "-x86-asm-syntax=intel". For example, tools/llvm-objdump has this flag.

--Sean Silva

_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


Thomson

unread,
Jun 21, 2012, 2:44:21 AM6/21/12
to Sean Silva, LLVM developers' mailing list
Could generated assembly with option "-x86-asm-symtab=intel" be assembled by nasm directly?

Sean Silva

unread,
Jun 21, 2012, 3:00:19 AM6/21/12
to Thomson, LLVM developers' mailing list
My intuition is that it will almost, but not quite, work. However, I would suggest that you test it to find out though.

--Sean Silva

Charles Davis

unread,
Jun 21, 2012, 4:35:37 AM6/21/12
to Thomson, LLVM developers' mailing list
On Jun 20, 2012, at 11:12 PM, Thomson wrote:

I saw some LLVM generated assembly in NASM format, but did find this support in the official release. Is this supported?
I have no idea where people get this silly notion that Intel syntax is the same as Netwide* syntax. They are NOT the same. They are similar, but not the same.

LLVM does not support the Netwide syntax. (There was talk of it, but nothing ever came of it--so far, at least) It does, however, support the Intel syntax... sort of. Specifically, it supports the GNU variant of it (where the actual instructions use Intel syntax, but pseudo-ops use GNU syntax--'.byte' instead of 'DB', for example).

* That's what the 'N' in "NASM' stands for.

Chip
Reply all
Reply to author
Forward
0 new messages