Version française
Home     About     Download     Resources     Contact us    
Browse thread
never mind was Re: [Caml-list] Release 3.09.1
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Kip Macy <kip.macy@g...>
Subject: never mind was Re: [Caml-list] Release 3.09.1
After doing a make clean and then re-doing make world everything went
smoothly. Thanks again for the patches.

 -Kip

On 10/7/06, Kip Macy <kip.macy@gmail.com> wrote:
> 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 <camlPervasives__entry+0>:   sub  %sp, 0x10, %sp
> 0x00000000002379a8 <camlPervasives__entry+4>:   stx  %o7, [ %sp + 0x8b7 ]
> 0x00000000002379ac <camlPervasives__entry+8>:   sethi  %hi(0x405400), %o3
> 0x00000000002379b0 <camlPervasives__entry+12>:  sethi  %hi(0x405c00), %o2
> 0x00000000002379b4 <camlPervasives__entry+16>:  add  %o2, 0x30c, %o2
>  ! 0x405f0c <camlPervasives__84>
> 0x00000000002379b8 <camlPervasives__entry+20>:  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 <camlPervasives__entry+0>:   sub  %sp, 0x10, %sp
> 0x0000000000221ca8 <camlPervasives__entry+4>:   stx  %o7, [ %sp + 0x8b7 ]
> 0x0000000000221cac <camlPervasives__entry+8>:   sethi  %hi(0x40e400), %o3
> 0x0000000000221cb0 <camlPervasives__entry+12>:  sethi  %hi(0x40ec00), %o2
> 0x0000000000221cb4 <camlPervasives__entry+16>:  add  %o2, 0x198, %o2
>  ! 0x40ed98 <camlPervasives__84>
>  0x0000000000221cb8 <camlPervasives__entry+20>:  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 <jfc@mit.edu> 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
> >
>