On 5/29/07, Paul Mackerras <paulus@samba.org> wrote:
Albert Cahalan writes: > Running a 32-bit userspace on a 64-bit kernel is > however gross, foul, bad, nasty, and wrong. Rubbish. It makes a lot of sense for most userspace programs to be 32-bit on a 64-bit PowerPC system. Unless a program needs to do 64-bit integer arithmetic or access more than 4GB of address space, it will be smaller and faster as a 32-bit process than as a 64-bit process.
That sounds like an argument for fixing the problem via a 32-bit kernel. After all, don't you want the kernel to be faster and smaller? The truth is though that normal apps do have these needs. 64-bit integer arithmetic is most apps these days, excepting the buggy ones that don't handle large files. Firefox needs the address space. I can get it over 2 GB on a non-powerpc system. Add in address space fragmentation and reserved stuff, and there you go. It's looking like OpenOffice needs it too, but fortunately I'm not one of the people using *.doc to author books. Once you start making a few apps 64-bit, you ought to go the whole way. It's not good to have two copies of the C library in your instruction cache. BTW, if you really wanted 32-bit apps to run fast, you'd create an ILP32 ABI that used the 64-bit registers. I think the MIPS n32 ABI is exactly that.