From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 05827BBE1 for ; Sun, 8 Oct 2006 03:44:02 +0200 (CEST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id k981i1NX004924 for ; Sun, 8 Oct 2006 03:44:01 +0200 Received: by nf-out-0910.google.com with SMTP id l36so1460651nfa for ; Sat, 07 Oct 2006 18:44:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UEXYv5bJidcMrBXNFHE67SdZY4SDVFotpyfaDXDh414++y/meUpyNfq3EnyTEwE8f4XQ/ep23w5+XQDA+q0wBgb3WR/o3a0hnRfGiHR1kegLvKkuvxI4mPiVkTkmleCzNKpVhttZ6xrucik6Ab/mZuebpsO41FmVRJQ4WGjodBY= Received: by 10.82.127.15 with SMTP id z15mr302004buc; Sat, 07 Oct 2006 18:44:00 -0700 (PDT) Received: by 10.82.191.20 with HTTP; Sat, 7 Oct 2006 18:44:00 -0700 (PDT) Message-ID: Date: Sat, 7 Oct 2006 18:44:00 -0700 From: "Kip Macy" To: "John Carr" Subject: Re: [Caml-list] Release 3.09.1 Cc: "caml users" In-Reply-To: <200601071929.k07JTF64008575@w20-575-49.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200601071929.k07JTF64008575@w20-575-49.mit.edu> X-j-chkmail-Score: MSGID : 452857E1.000 on discorde : j-chkmail score : X : 0/20 1 X-Miltered: at discorde with ID 452857E1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml-:01 ocamlc:01 aligned:01 ocamlopt:01 ocaml:01 internals:01 ocaml-:01 asmrun:01 asmrun:01 preprocessed:01 cpp:01 mlp:01 asmcomp:01 mlp:01 asmcomp:01 This has been an immense help in getting ocaml-3.09.3 working on FreeBSD sparc64 - but I'm still finding that incorrect code is getting generated for camlPervasives__entry in ocamlc.opt: 0x00000000002379a4 : sub %sp, 0x10, %sp 0x00000000002379a8 : stx %o7, [ %sp + 0x8b7 ] 0x00000000002379ac : sethi %hi(0x405400), %o3 0x00000000002379b0 : sethi %hi(0x405c00), %o2 0x00000000002379b4 : add %o2, 0x30c, %o2 ! 0x405f0c 0x00000000002379b8 : stx %o2, [ %o3 + 0x32c ] The store is not 8-byte aligned so it causes a bus error. In ocamlopt.opt the generated code does not cause a bus error: 0x0000000000221ca4 : sub %sp, 0x10, %sp 0x0000000000221ca8 : stx %o7, [ %sp + 0x8b7 ] 0x0000000000221cac : sethi %hi(0x40e400), %o3 0x0000000000221cb0 : sethi %hi(0x40ec00), %o2 0x0000000000221cb4 : add %o2, 0x198, %o2 ! 0x40ed98 0x0000000000221cb8 : stx %o2, [ %o3 + 0x1b8 ] I'm happy to fix it myself, however, not being familiar with ocaml internals I'm not sure where to look. Any suggestions? Thanks. P.S. I added the following diff to get it to work: kmacy@storage [/shared|18:32|203] diff -u ocaml-3.09-sparc64/sparc-sparc64.S ocaml-3.09.3/asmrun/sparc-sparc64.S --- ocaml-3.09-sparc64/sparc-sparc64.S Sat Dec 3 18:34:25 2005 +++ ocaml-3.09.3/asmrun/sparc-sparc64.S Sat Oct 7 17:20:32 2006 @@ -18,6 +18,9 @@ using the SPARC 64 bit ABI. The ABI uses ELF and does not prefix symbols with underscore. */ +#define Caml_ml_array_bound_error caml_ml_array_bound_error +#define Caml_c_call caml_c_call +#define Caml_array_bound_error caml_array_bound_error /* Must be preprocessed by cpp */ ! Tell the assembler not to complain about use of %g2 and %g3, which kmacy@storage [/shared|18:32|204] diff -u ocaml-3.09-sparc64/emit64.mlp ocaml-3.09.3/asmcomp/sparc/emit.mlp --- ocaml-3.09-sparc64/emit64.mlp Sat Dec 3 11:10:50 2005 +++ ocaml-3.09.3/asmcomp/sparc/emit.mlp Sat Oct 7 17:46:33 2006 @@ -31,6 +31,7 @@ begin match Config.system with "solaris" -> Solaris | "linux" -> Linux + | "bsd" -> Solaris | "sunos" -> SunOS | os -> failwith ("Unknown operating system " ^ os) end On 1/7/06, John Carr wrote: > > I updated my SPARC 64 bit native code changes to work with version 3.09.1. > > http://www.mit.edu/~jfc/ocaml-3.09.1-sparc64.tar.gz > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >