- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Intel C++ compiler version 12.0.2 and I want to output assembly files that use Intel Syntax. It is currently displaying them in AT&T syntax. I am using ubuntu and I tried icpc -S -masm=intel Radar-Main.cpp it is giving me the following:"icpc: command line warning #10159: invalid argument for option '-m' " I also tried -use-masm=intel, -asm=intel --masm=intel...So I tried like most permutations of the m a s m letters.
Anyone knows how I can do that?
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
$ gcc -S -msasm=intel -c tstcase.cpp
cc1plus: error: unrecognized command line option "-msasm=intel"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"g++ -S -masm=intel Desktop/parsec-2.1/pkgs/apps/swaptions/src/HJM_Securities.cpp"
and this is part of the file that I got:
HJM_Securities.s
"
.file "HJM_Securities.cpp"
.intel_syntax noprefix
.local _ZStL8__ioinit
.comm _ZStL8__ioinit,1,1
mov eax, DWORD PTR [ebp+8]
mov eax, DWORD PTR [eax]
mov DWORD PTR [ebp-28], eax
"
which is clearly intel Syntax. Now I got 2 conflicting answers from both threads which I opened. the first one claimed that ICC linux compiler syntax can be changed to intel syntax and by default in windows it is intel syntax. While here I was told only at&t syntax.
which one is correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You didn't say originally for which linux tools you wanted the switch. I agree that it's a little strange for some Intel linux tools to default to intel format and others to provide no option to use that format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel compilerfor Linux does not genrate Intel assembly. You may use gcc for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The latest icc compiler version 12.1 supports that feature. The compiler options are -S masm=intel .
> icc -V
Intel C Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.1.256 Build 20111011
// default is to use att syntax
> icc -S hello.c
> more hello.s
main:
..B1.1: # Preds ..B1.0
..___tag_value_main.1: #4.1
pushq %rbp #4.1
..___tag_value_main.3: #
movq %rsp, %rbp #4.1
..___tag_value_main.4: #
andq $-128, %rsp #4.1
subq $128, %rsp #4.1
movl $3, %edi #4.1
..___tag_value_main.6: #4.1
call __intel_new_proc_init #4.1
// use Intel syntax
> icc -S -masm=intel hello.c
> more hello.s
main:
..B1.1: # Preds ..B1.0
..___tag_value_main.1: #4.1
push rbp #4.1
..___tag_value_main.3: #
mov rbp, rsp #4.1
..___tag_value_main.4: #
and rsp, -128 #4.1
sub rsp, 128 #4.1
mov edi, 3 #4.1
..___tag_value_main.6: #4.1

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page