* Compiling for Mac OS 64 bit?
@ 2005-10-25 16:37 Fritz Anderson
2005-10-27 15:21 ` [Caml-list] " Xavier Leroy
0 siblings, 1 reply; 3+ messages in thread
From: Fritz Anderson @ 2005-10-25 16:37 UTC (permalink / raw)
To: caml-list
I've been asked to research the use of Ocaml in high-performance
computing applications on Mac OS X. I take this to mean (a) 64-bit
applications (the client says so) and (b) compiled applications.
I've configured the build with
./configure -cc 'gcc -arch ppc64' -tk-no-x11
... which seems to produce the interpreter with no complaints, with
the only exception that ocamlmklib.ml had to be edited so that '-arch
ppc64' was appended to the value of the mksharedlib variable. Make
bootstrap concludes without error.
(Caveats that an interpreter that has to haul 64-bit entities around
instead of 32-bit entities is apt to be slower, are already
understood. By me. The client sees a knob labeled 32/64, and wants to
turn it all the way up.)
Make opt is not so happy. One example is that the assembler balks at
_camlPervasives__55:
.long _caml_int64_ops
.long 1018167296
.long 4372995238176751616
.data
.long 2303
because the huge number should take the .quad directive, not .long.
But given that the huge number is 0x3cb0000000000000, I have bad
feelings that this is some badly-cleared or -shifted native integer.
In fact, my skimming of the compiler source suggests that the
compiler doesn't do native 64-bit pointers and integers.
Is there a way to configure Ocaml to produce a 64-bit compiler, or is
there a project for one? (I know, I'm asking for magic beans.) Or do
I tell the client that on PowerPC/Mac OS, it's 32 bits or nothing?
-- F
Fritz Anderson
Mac Programmer
University of Chicago
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Compiling for Mac OS 64 bit?
2005-10-25 16:37 Compiling for Mac OS 64 bit? Fritz Anderson
@ 2005-10-27 15:21 ` Xavier Leroy
0 siblings, 0 replies; 3+ messages in thread
From: Xavier Leroy @ 2005-10-27 15:21 UTC (permalink / raw)
To: Fritz Anderson; +Cc: caml-list
> I've been asked to research the use of Ocaml in high-performance
> computing applications on Mac OS X. I take this to mean (a) 64-bit
> applications (the client says so) and (b) compiled applications.
As you found out, ocamlopt currently cannot generate PPC64 code.
So, it's either bytecode-only in 64-bit mode, or native code in 32-bit
mode.
A PPC64 port of ocamlopt looks reasonably simple, but that will have
to wait until a Mac G5 lands here at INRIA.
> Make opt is not so happy. One example is that the assembler balks at
>
> _camlPervasives__55:
> .long _caml_int64_ops
> .long 1018167296
> .long 4372995238176751616
> .data
> .long 2303
>
> because the huge number should take the .quad directive, not .long. But
> given that the huge number is 0x3cb0000000000000, I have bad feelings
> that this is some badly-cleared or -shifted native integer.
No, no, it's a genuine 64-bit integer constant (see the definition of
epsilon_float in stdlib/pervasives.ml).
> In fact, my
> skimming of the compiler source suggests that the compiler doesn't do
> native 64-bit pointers and integers.
The PowerPC back-end does not, but everything else in OCaml will
gladly handle 64-bit quantities on a 64-bit architecture (e.g. Alpha,
AMD64, IA64).
- Xavier Leroy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Compiling for Mac OS 64 bit?
@ 2005-10-27 21:59 Gregory Lafitte
0 siblings, 0 replies; 3+ messages in thread
From: Gregory Lafitte @ 2005-10-27 21:59 UTC (permalink / raw)
To: Xavier.Leroy; +Cc: caml-list
If you don't have access to a G5 at INRIA (there seems to be some at
IRISA, http://www.irisa.fr/paris/General/apple.htm),
I would be very happy to provide you with an account on a G5 machine
with a ppc64 Linux
(64bit kernel, gcc, libc, ...).
Gregory Lafitte
In the caml-list, on October 27th 2005, Xavier Leroy wrote:
> I've been asked to research the use of Ocaml in high-performance
> computing applications on Mac OS X. I take this to mean (a) 64-bit
> applications (the client says so) and (b) compiled applications.
>
As you found out, ocamlopt currently cannot generate PPC64 code.
So, it's either bytecode-only in 64-bit mode, or native code in 32-bit
mode.
A PPC64 port of ocamlopt looks reasonably simple, but that will have
to wait until a Mac G5 lands here at INRIA.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-27 22:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-25 16:37 Compiling for Mac OS 64 bit? Fritz Anderson
2005-10-27 15:21 ` [Caml-list] " Xavier Leroy
2005-10-27 21:59 Gregory Lafitte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).