This is most definitely not what I'm expecting; this simple function can be implemented in five instructions, but gcc decides to ignore SSE and do anding manually.
$ gcc --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gcc 4.3.2 on linux i686 also produces the same output that >>6 posted. 4.3.2 on x86-64 dumps out something remarkably similar to >>7, and
I think >>1 runs Debian moldy stable.
Name:
Anonymous2008-12-02 1:26
Ah, true, I have gcc 3.4.4 -- from mingw and not gentoo. >>4-kun, yes I was aware of that; This thing just kept not working so I was adding and removing random flags.
Thanks, I'll try with gcc 4
Name:
Anonymous2008-12-02 1:35
>>9
And that is what makes you a fucking dumb Gentoo shit. Read the documentation and understand what the switches do instead of spewing them like diarrhoea in a public toilet.
Name:
Anonymous2008-12-02 2:20
>>10
Whatever, bro. It's not working either way and documentation isn't helping much.
-msse
-mno-sse
-msse2
-mno-sse2
-msse3
-mno-sse3
-m3dnow
-mno-3dnow
These switches enable or disable the use of built-in functions that allow direct access to the
MMX, SSE, SSE2, SSE3 and 3Dnow extensions of the instruction set.
To have SSE/SSE2 instructions generated automatically from floating-point code, see -mfpmath=sse.
All I want is to make gcc generate and optimize code for me, so that I don't have to do that in assembler.
Sage for people thinking they can get any compiler to produce ``optimized'' binaries.
Name:
Anonymous2008-12-02 6:35
>>15
The Intel C++ compiler and Microsoft's optimizing cl.exe compiler produce pretty darn well optimized binaries.
Of course, since free software is typically of sub-standard amateur quality, nobody really expects gcc to produce optimized code; well, maybe just the GNU fanboys :P
>>16
cl.exe from msvcs9 doesn't even want to compile the code, ``error C2088: '&' : illegal for union''
Name:
Anonymous2008-12-02 8:58
>>20
Ah, but if you would have payed a little attention to code, you'd have noticed that there are movdqa instructions generated. How are you going to explain this?
>>22
it can use them, but the documentation doesn't say that those switches make it use them whenever possible.
Name:
Anonymous2008-12-02 9:04
>>23
This is exactly why I was trying to run gcc with different flags. Because documentation is not always consistent and there may be some undocumented effects. Does that make me a gentoo ricer?
>>31
I am terribly sorry for not being a GNUU GCC expert. This makes me ricer, I guess. How sad. All I wanted is to have a nice thing done by program for me. Oh well.
>>32
The beauty of anonymous posting is that once you've made a complete fool of yourself, you don't have to keep digging.
There's no reputation to salvage. Just accept that you were an idiot, learn from your mistakes, and move on.
>>33
What nonsense. This will haunt him to the day he dies, and so will we.
Name:
Anonymous2008-12-02 15:08
Hey buddy, GCC's nice if you like kool-aids (with emphasis in AIDS). But code generation quality was never a priority, and it shows. Speed of compilation was neither, in case you haven't noticed yet.
What it does it make sure that MMX intrinsics don not use
MMX registers.
I think that speaks for itself.
Name:
Anonymous2008-12-02 15:18
Firefox on Windows can be built using either MSVC or GCC. Of course it's built using MSVC because losing over 10% speed is not worth the freedom. Freedom of being fucked in the ass by Richard Stallman, that is.
Name:
Anonymous2008-12-02 15:42
Join us now and share the software.
You'll be free, hackers, you'll be freeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee