From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 79B20BBBB for ; Wed, 25 Jan 2006 14:26:35 +0100 (CET) Received: from smtp2.mathworks.com (smtp2.mathworks.com [144.212.95.218]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k0PDQYZU017584 for ; Wed, 25 Jan 2006 14:26:35 +0100 Received: from mail-vif.mathworks.com (fred-ce0.mathworks.com [144.212.95.18]) by smtp2.mathworks.com (8.12.11/8.12.11) with ESMTP id k0PDQZs9007407 for ; Wed, 25 Jan 2006 08:26:35 -0500 (EST) Received: from MESSAGE-AH.ad.mathworks.com (ex-01-ah.mathworks.com [144.212.95.156]) by mail-vif.mathworks.com (8.11.7/8.11.7) with ESMTP id k0PDQXr16320 for ; Wed, 25 Jan 2006 08:26:33 -0500 (EST) X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] [patch] PIC on amd64 Date: Wed, 25 Jan 2006 08:26:32 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Caml-list] [patch] PIC on amd64 Thread-Index: AcYhr5eh0Lv82FQYRYenPSAoP6gQfAAAulwg From: "Alexander Bottema" To: X-Miltered: at concorde with ID 43D77C8A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 bug:01 caml-list:01 ocaml:01 clobbered:01 ocaml's:01 compiler:01 stack:01 compile:01 compile:01 edges:01 defined:01 native:02 caml:02 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 Hasn't support for PIC/AMD64 been fixed in the latest release of OCaml (3.09.1)? Or have you found a bug in 3.09.1? I've tried to (native) compile a simple program on AMD64 as a shared library and it worked fine. Alexander Bottema (Software Developer @ The Mathworks) -----Original Message----- From: caml-list-bounces@yquem.inria.fr [mailto:caml-list-bounces@yquem.inria.fr] On Behalf Of Erik Bourget Sent: Wednesday, January 25, 2006 7:52 AM To: caml-list@yquem.inria.fr Subject: [Caml-list] [patch] PIC on amd64 Attached is a patch that makes ocaml able to compile proper PIC code on amd64. This allows shared libraries to be created from ocaml code. This patch needs work - in addition to being rough around the edges, there is a fairly major issue where it will generate patters as such: some_label: movq camlPcre@GOTPCREL(%rip), %r13 movq 248(%r13), %r10 call caml_apply8@PLT ... caml_apply8: call (%r10) # should call camlPcre+248 This would be cool but %r10 is clobbered by the call in some circumstances as it's defined as a scratch register. Ocaml's compiler seems to have logic to 'spill' registers onto the stack but I haven't studied it hard enough to put it to use; maybe someone else is more familiar and will be able to mark registers as live when they are used in this way? :) - Erik