- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to determine the assembly code correspondence of C code written for MIC.
For GCC, I have found the solution at this link: http://www.delorie.com/djgpp/v2faq/faq8_20.html
gcc -c -g -Wa,-a,-ad foo.c > foo.c-and-assembly
Is there a similar solution for ICC?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When not using offload constructs (like #pragma offload or _Cilk_shared/_Cilk_offload) just compile using: -mmic -S -fsource-asm
For your example, compile using: icc -mmic -S -fsource-asm -c foo.c
The assembly with source code annotations are collected in a <file>.s file named after the source file, so foo.s for the example above.
For source containing offload constructs, use -offload-option to pass the needed options to the offload compilation only.
For example: icc -offload-option,mic,compiler,"-S -c -fsource-asm" bar.c
Here, the assembly with source code annotations are collected in a <file>MIC.s file named after the source file, so barMIC.s for the example above.
These same options apply to Fortran (ifort) and C++ (icpc) also.

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