English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
THREADED_CODE: Why CODE32 defined on x86-64?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-16 (15:21)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] THREADED_CODE: Why CODE32 defined on x86-64?
> Why is CODE32 defined on the x86-64 architecture?  This architecture
> has 64 bit pointers, and it seems like it's only by luck that the
> bytecode interpreter normally works.

No, it's not by luck: the x86-64 ABI defines several "code models",
one of which -- the "small code model" -- guarantees that code and
static data is in the lower 2G of the address space, and is the
default for gcc (and I suspect other compilers as well).

I would have expected the dynamic loader to implement the small model
like the static linker does, but from what you say it's not the case.

- Xavier Leroy