@Dremora and others concerning the -O3 vs -Os(blitz default).
That flag is GCC optimization level has nothing do do with generation of SSE vs x87 Floating point code. Now -O3 is much faster at expense of -Os which is optimize for size.
I am controlling all optimizations of C code outside of BMK although I have modified my version of BMK allow setting modules to set the -Ox as a flag. Currentl with Bruceys changes the -Os is set as last option so it overrides any changes via Bruceys settings.
Just setting -O3 in BMK should produce better C comipled code it has no impact on BCC generated code as that is straight ASM output. Although when you turn up optimizations sometimes the compiler will toast your code. I assume Mark is erroring on side of caution with debugging C problems caused by compiler optimizations screwing it up. But if you have a specific module and test the heck out of your functions go for -O3.
There is also BCC_OPTS envoriment variable that you can set that will control all C code generation outside of the MODULEINFO changes. This is global but not so good would be better if there was something settable via a config file but it works. There are global Link Options you can set too.
@Dremora to turn on SSE you need to set -march=PentiumIII or Better as well -mfpmath=SSE.
This does not mean it will use SSE it will try, 3.4 is not so good and all my research indicates use intrinics.
That works better for what I am attempting.
Know in my case I am trying to generate code that falls back to straight Pentium x87 math in case SSE is not enabled.
For that you need to use intrinsics.
You really need to test stuff out and read the generated ASM output to understand what flags are doing to your code other than what you think its doing.
I have spent two weeks fliping the flags and examing the ASM generated. GCC -S instead of -c or objdump if you want to see what is actually if you dont want ASM listing.
Doug
That flag is GCC optimization level has nothing do do with generation of SSE vs x87 Floating point code. Now -O3 is much faster at expense of -Os which is optimize for size.
I am controlling all optimizations of C code outside of BMK although I have modified my version of BMK allow setting modules to set the -Ox as a flag. Currentl with Bruceys changes the -Os is set as last option so it overrides any changes via Bruceys settings.
Just setting -O3 in BMK should produce better C comipled code it has no impact on BCC generated code as that is straight ASM output. Although when you turn up optimizations sometimes the compiler will toast your code. I assume Mark is erroring on side of caution with debugging C problems caused by compiler optimizations screwing it up. But if you have a specific module and test the heck out of your functions go for -O3.
There is also BCC_OPTS envoriment variable that you can set that will control all C code generation outside of the MODULEINFO changes. This is global but not so good would be better if there was something settable via a config file but it works. There are global Link Options you can set too.
@Dremora to turn on SSE you need to set -march=PentiumIII or Better as well -mfpmath=SSE.
This does not mean it will use SSE it will try, 3.4 is not so good and all my research indicates use intrinics.
That works better for what I am attempting.
Know in my case I am trying to generate code that falls back to straight Pentium x87 math in case SSE is not enabled.
For that you need to use intrinsics.
You really need to test stuff out and read the generated ASM output to understand what flags are doing to your code other than what you think its doing.
I have spent two weeks fliping the flags and examing the ASM generated. GCC -S instead of -c or objdump if you want to see what is actually if you dont want ASM listing.
Doug