[Bf-committers] 64 bits Blender

Giuseppe Ghibò ghibo at mandriva.com
Sat Jan 20 17:06:53 CET 2007


Hans Lambermont wrote:

> Now you get me curious, as I do not remember these issues. If I remember
> well we had 3 64-bit platforms in 2001 : Linux on Alpha, Solaris on
> UltraSparc and Irix on Mips.

Note that not all the 64bits are using the same model datatype.
Actually according to where the 64bit type is, we can have 3 models
(keep in mind I=int, L=long, LL=long long, P=pointer):

LP64: int   at 32bit
      long  at 64bit
      long long at 64bit
      pointer at 64bit

LLP64: int  at 32bit
       long at 32bit
       long long at 64bit
       pointer at 64bit

ILP64: int at 64bit
       long at 32bit
       long long at 64bit
       pointer at 64bit

As you can see the common in each model is that pointers are at 64bits.
And for each model you can have endianess little or big (or middle, but
very old, so don't care). While the choice of one model or the other, it's usually
of the operating system, the endianess depends on the CPU
(unless the CPU don't support both [bi-endianess], but in that case the OS chooses
one). For instance:

1) X86_64 Linux on AMD Athlon64/Opteron as well as Intel Core2
uses LP64 (endianess: little endian)

2) X86_64 Windows64 on Athlon64/Opteron/Core2 uses LLP64 and
(endianess: little endian).

3) Alpha Linux uses LP64 model (endianess: little endian, tough alpha supports
   big endian as well). It's not uncommon that some OS with Alpha was using ILP64
   model (e.g. on Cray).

4) UltraSparc Solaris and Linux Sparc uses LP64 (endianess: big endian)

5) Itanium IA-64 Linux uses LP64 (endianess: little endian, though IA-64 supports bi-endianess)

6) Itanium IA-64 HP/UX uses LP64 (endianess: big endian).

6) MIPS Irix uses LP64 (endianess: big endian, though MIPS supports bi-endianess)

7) ...

from the above list LP64 (except Windows64) is the most common and most widespread here.

Some useful links:

http://www-128.ibm.com/developerworks/library/l-port64.html
http://developer.apple.com/documentation/Darwin/Conceptual/64bitPorting/transition/chapter_3_section_3.html
http://docs.sun.com/app/docs/doc/816-5138

Bye
Giuseppe.


More information about the Bf-committers mailing list