I am using the Intel Compiler (icl.exe) on Windows. I let the compiler print the line information of the instructions. Normally the line number matches the source file I passed to the compiler. In some cases it adds instructions generated by some header files I included. But which file is it?
$LN10:
mov rax, 0d4b249ad2594c37dH #45.20 line from which file?
$LN11:
mulsd xmm0, xmm0 #7.3 matches the expected source file
MSVC on the other hand prints out the filename of the header where this instruction comes from. How can I get this information also in ICC?
# File d:\...\base.h
# Line 48
$LN3:
movsdx QWORD PTR [rsp+16], xmm1
Update:
On Linux it seems ICC prints out some more information. The .file directive is added there.
..LN1:
.file 2 "/usr/include/c++/4.6/bits/stl_vector.h"
.loc 2 82 is_stmt 1
xor eax, eax #82.2
[...]
.loc 1 5 is_stmt 1
ret #5.3 #5.3