On Tue, 2003-11-11 at 19:16, Albert Cahalan wrote: > On Tue, 2003-11-11 at 15:37, Peter Bergner wrote: > > Kevin B.Hendricks wrote: > > > One question, why do 32 bit apps run faster than 64 bit apps, is it all > > > of the memory accesses needed to load 64 bit immediate and other data > > > when restricted to 32 bit instruction lengths? > > > > Yes, on powerpc64-linux, it takes 5 instructions to load a 64-bit > > immediate and/or address. > > That's in the fully general case, assuming you > don't do it with ONE instruction via a load > involving the GOT or some such. > > Typically sign-extension or zero-extension will > cut that down.
BTW, it's no big loss to require all .text symbols to fall in the low (or high) 4 GB. The same goes for the other symbols almost as well; that would only pose a problem for FORTRAN with massive arrays. Note that I'm not saying to restrict malloc() and mmap() at all. It's just the things compiled into the executable that would be restricted. Mapped below 4 GB: code, globals, static stuff Mapped anywhere: stack, malloc(), mmap() I recall this being the normal 64-bit model on the Opteron. So that gets you back to two-opcode immediate generation for all addresses. (the ones returned by mmap and malloc have to be loaded already) Hmmm. This isn't already the ABI? What a shame.