Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Assembly file

Prashanthns
Beginner
489 Views
I am using ICC 11.1. I generated assembly file for a c implementation using -S option. But surprisingly the syntax used in this generated file is of GAS rather than of Intel's. And if i write assembly using intel syntax its not able to assemble it. What might be the problem ?

0 Kudos
5 Replies
TimP
Honored Contributor III
489 Views
icc on gnu platforms should be gcc compatible, including, in principle, observance of -masm=intel. Bugs with respect to that could be submitted on your premier.intel.com account. binutils docs indicate that .intel_syntax directive should switch as over to Intel syntax. top level binutils site gives bug submission and mailing list information.
0 Kudos
Prashanthns
Beginner
489 Views
Which is the assemble used in the Intel Compiler package?
I tried using .intel_syntax but it did not work. Do I have to install yasm to write assembly using intel syntax ? In what way i can make ICC to compile C files and create assembly in intel's syntax ??
0 Kudos
TimP
Honored Contributor III
489 Views
icc never provided its own assembler, except in the Itanium release. It takes whichever assembler is pointed to by the g++ installation or present on your PATH (normally part of gnu binutils which you installed as part of g++ development package). icc doesn't have control over binutils, so if binutils doesn't work according to binutils manual, your recourse must be to the binutils mail list or bugzilla, or, as you say, to invoke the assembler of your choice.
0 Kudos
Prashanthns
Beginner
489 Views
Thanks for the information Tim.
Now i have started using yasm to be in sync with intel syntax. But ICC still generates assembly for GAS and whatever assembly I am writing is for YASM. Though this thing works pretty well, I just wanted to know if it is possible to make the compiler to generate assembly for other assembler by changing any settings in ICC?
0 Kudos
TimP
Honored Contributor III
489 Views
If icc -masm=intel doesn't work, at least to the extent (if) it works for your gcc, you could file a problem report on the grounds of gcc compatibility.
0 Kudos
Reply