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

Optimizing code generation without linking against CRT lib.

cumulusnimbus
Beginner
297 Views

Hi,

I just replaced MSVC++ compiler with icl. Everything worked out just fine except for a few small things. Most of them sorted out, but last one is still open.

My code runs standalone on ia32 and are compiled/linked with /nodefaultlib

The compiler references in "__sse2_strlen", "__libm_sse2_sincos" etc.

Is it impossible to get icl to compile AND optimize without using crt code?

icl parameters are "/Zc:forScope /Gd /Fm /TC /GS- /Oy- /Gy"

xilink parameters are "/nologo /INCREMENTAL:NO /LARGEADDRESSAWARE /driver /fixed /nodefaultlib /merge:.bss=.data /merge:.rdata=.data /entry:start /subsystem:native /safeseh:no /filealign:0x1000 /base:0xc0000000 /map:kernel.map /out:kernel.exe

best regards

Thomas

0 Kudos
3 Replies
TimP
Honored Contributor III
297 Views

Are you interested in the /Oi- option, available both on command line, and in VS properties? Or, do you mean (for 32-bit only) the option to generate x87 code by /arch:ia32 ?

Preventing use of SSE2 (including math functions) is generally considered a restriction against optimization. Mixing x87 math functions with SSE2 compilation, for those compiler/library combinations where it's supported, generally is quite slow, with little advantage for in-lining. Of course, you can do it by in-line asm, if you're serious about checking it out.

0 Kudos
cumulusnimbus
Beginner
297 Views

Hi,

/Oi- seems to work. I also included /arch:ia32.

I still get unresolved functions becasue of optimazion it seems. For example "__intel_f2int"

I really don't want to deny SSE2 etc, but what i want to do is deny compiler to include library functions / function intrinstcs from libraries.

best regards

Thomas

0 Kudos
cumulusnimbus
Beginner
297 Views

Hi again,

I managed to get this away by using /Qfreestanding. That seems to prevent compiler to use any intristincts at all.

best regards

Thomas

0 Kudos
Reply