[GRLUG] 32bit vs. 64bit [Was: Random questions]

Michael Mol mikemol at gmail.com
Fri Jul 27 13:28:35 EDT 2012


On Fri, Jul 27, 2012 at 9:33 AM, Clay Ashby <kingpoiuy at gmail.com> wrote:
>
> On Fri, Jul 27, 2012 at 9:28 AM, Tim Schmidt <timschmidt at gmail.com> wrote:
>>
>> On Fri, Jul 27, 2012 at 9:16 AM, Topher <topher at codeventure.net> wrote:
>> > Yay!  May their computers turn white in the sun!  As long as no embedded
>> > system that affects me is harmed in any way.
>>
>> As of right now, every single ARM machine ever sold is <=32bits.  And
>> will be for at least another year.  I have a feeling LOTS of them will
>> still be around in 25 years.
>
> I really hope technology isn't progressing that slowly, but you could be
> right. More importantly, I like your avatar.

The big, big enhancements in x86-64 comes from the architectural
improvements. The increase in the address space is really orthogonal
to that. Indeed, that's rather the point of the recently-introduced
"x32" ABI; get at the architectural enhancements afforded by x86-64
without the overhead of 64-bit pointers and some other
64-bit-by-default types. It's only really useful for some very
specific circumstances, though, and most people aware of it aren't
really pleased with the idea of supporting it; moving from 32-bit to
64-bit x86 hasn't forced generic code portability, but instead led to
a bunch of assumptions about 32-bit vs 64-bit environments. Debugging
*that* mess will take at least the same amount of effort that went
into getting x86-32 code ported to x86-64.

And, yeah, it's confusing. You now have two 32-bit ABIs: x86 and x32.
x86 is the classic ABI that's been with us since Linux on a 386. The
x86 ABI clashes with the x64 ABI because of decisions made by AMD to
throw out legacy garbage when developing AMD64. The x32 ABI, on the
other hand, allows code to run on top of AMD64 natively (x86, by
comparison, runs in a processor-provided compatibility mode), but only
uses a 32-bit address space and makes some other base declarations
such as the default size of 'int'.

Certainly, x32 would be an improvement over x86, and even an
improvement over x64 _in limited circumstances_, but, again, there's a
lot of code that asks what the size of a pointer is and makes
assumptions based on that. Assumptions which would be incorrect under
x32.

That said, a 64-bit ARM architecture is in the works. It's already
getting worked into the Linux kernel; designers of mobile devices are
already feeling real pain from the limitations of a 32-bit address
space.

-- 
:wq


More information about the grlug mailing list