From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 02E18BB9C for ; Wed, 16 Nov 2005 16:21:56 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAGFLt9H014901 for ; Wed, 16 Nov 2005 16:21:55 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA21964; Wed, 16 Nov 2005 16:21:55 +0100 (MET) Received: from [128.93.11.95] (estephe.inria.fr [128.93.11.95]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAGFLN4V014846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Nov 2005 16:21:23 +0100 Message-ID: <437B4E73.5020503@inria.fr> Date: Wed, 16 Nov 2005 16:21:23 +0100 From: Xavier Leroy User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050322) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard Jones Cc: caml-list@inria.fr, caml-bugs@pauillac.inria.fr Subject: Re: [Caml-list] THREADED_CODE: Why CODE32 defined on x86-64? References: <20051116152330.GA9895@furbychan.cocan.org> In-Reply-To: <20051116152330.GA9895@furbychan.cocan.org> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 437B4E93.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 437B4E73.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 pointers:01 bytecode:01 defines:01 model:01 gcc:01 compilers:01 loader:01 model:01 defined:01 defined:01 data:02 seems:03 dynamic:03 threaded:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 > 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