Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.

Assembly file

Prashanthns
Beginner
186 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
Black Belt
186 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.
Prashanthns
Beginner
186 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 ??
TimP
Black Belt
186 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.
Prashanthns
Beginner
186 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?
TimP
Black Belt
186 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.
Reply