gcc - C/C++: -msse and -msse2 Flags do not have any effect on the binaries? -


i'm playing around gcc (g++) , compilerflags -msse , -msse2. have little test program looks that:

#include <iostream>  int main(int argc, char **argv) {     float = 12558.5688;     float b = 6.5585;      float result = 0.0;      result = * b;      std::cout << "result: " << result << std::endl;      return 0; } 

when compile following statements:

/usr/local/bin/g++-4.9 -w -msse main.cpp -o testsse 

and

/usr/local/bin/g++-4.9 -w -msse2 main.cpp -o testsse2 

the output files binary equal. i've expected not same because of smid flags.

so question is, complier flags not have influence on binary file? i've tested on os x 10.10.3 , fedora 21.

thanks help.

kind regards

fabian

in code basic floating point maths involved. , bet if turn optimizations on (even -o1) gets optimized out because values constant expressions , calculable @ compile-time.

sse used (movss, mulss) because it's threshold of floating point calculus, if want. sse2 has no scope here.
in order find room sse2 need include more complex calculus may or may not exploit instructions available in sse2; do, equivalent , see if compiler can take advantage of them.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -