Intel icc integration with gcc

I am stuck in a problem. I used gcc to compile / build my code for a while and got used to using Intel's build syntax. I used the flag -masm=intelwhen creating assembly files.

Recently, due to company migration, they got Intel icc, claiming it is better. So now I need to use icc, but it was strange that it has the default assembly syntax such as AT & T. I tried to change it, but it didn’t work, so I contacted Intel support and they also don’t know, and each person gave me a contradictory answer.

Is there a way to integrate gcc and icc so that I use icc to compile "excellence" while compiling intel syntax with gcc?

I am using ubuntu and got icc version 12.x

+3
source share
2 answers

This flag?

   -use_msasm     Support  Microsoft  style  assembly  language  insertion
                  using MASM style syntax and, if requested, output assem-
                  bly in MASM format

https://web.archive.org/web/20120728043315/http://amath.colorado.edu/computing/software/man/icc.html

+3
source

It seems to -masm=intelwork in ICC, at least in the latest version (13.0.1) in Matt Gb Explorer Explorer. I tried to load the example "sum by array" and it generates the assembly below

L__routine_start__Z12testFunctionPii_0:
testFunction(int*, int):
        xor       eax, eax                                      #2.11
        test      esi, esi                                      #3.23
        jle       ..B1.18       # Prob 50%                      #3.23
        movsxd    rdx, esi                                      #3.3
        cmp       rdx, 4                                        #3.3
        jl        ..B1.19       # Prob 10%                      #3.3
...

While specifying -use_msasmas in Steve-0's answer does not work

0
source

All Articles