I am using GCC on AMD processors as well and i agree with Marc Lehmann.bob wrote:This is _completely_ false. Renaming registers does _not_ reduce the effects of a limited number of registers for most programming examples. Renaming allows an easy way to track the data flow for an OOE processor. But when you just have eax-edx visible to the compiler, the extra 8 registers on X86-64 make a significant difference...diep wrote:Eugene has regrettably proven to be very correct and he said it polite still compared to a GCC team member Marc Lehman.Gerd Isenberg wrote:The point is that mailbox programs, which would even compile and run efficiently on a 16-bit os, did not take advantage from 64-bit mode, despite eight additional registers and implicit fastcall.bob wrote: I have no idea what you mean by "clumsiness of 64 bit instructions." They don't seem clumsy to me considering the speeds I see on 64 bit processors. Yes, the compilers have to produce machine language that is semantically equivalent to the original source code you wrote. And yes, the hardware has to execute things so that the final result is identical with what would be produced if the compiler output was executed exactly in the order produced by the compiler, without any effects of speculative execution or out of order execution changing a single thing other than making it run faster...
Using r08-r15 takes an additional opcode byte. x64 calling conventions "allocates" stackspace to save caller safe registers via mov [rbp + offset], reg instead of push/pop (much longer ocpode). Accessing global data via register indirection. Probably compiler are not (yet) good enough to optimize (despite pgo) than their 32-bit counterparts. In general, if you don't use 64-bit that much, most mentioned programs likely become larger if compiled for 64-bit mode than for 32-bit mode.
Eugene: "32 bits will be faster for most programs than 64 bits".
Correct, and a LOT faster.
Only bitboard engines profitted for a simple reason which has nothing to do with number of registers.
K7 had already 44 rename registers or so and P4 like 128, so there never was a real shortage of registers in x86.
I use gcc on AMD processors exclusively, so I am not sure what you are talking about. It does quite well...
Marc Lehmann: "x86-64 will be the ultimate disaster for GCC"
He has proven to be very right.
Add to this that GCC was already ugly bad in efficient code optimization.
Compilers have become one big intel show.
Vincent