Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cumulusnimbus
Beginner
73 Views

Optimizing code generation without linking against CRT lib.

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
Black Belt
73 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.

cumulusnimbus
Beginner
73 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

cumulusnimbus
Beginner
73 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

Reply