Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Native compiler support for m68k?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-08-26 (13:43)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Native compiler support for m68k?
> ok, I got 2.0.4 working for m68k-linux, not very hard.
> Speed is quite impressive, fib is faster than gcc code ?!

Sure: gcc passes all parameters on the stack, ocamlopt passes the
first ones in registers.

> One thing that I need to verify is the interaction of the native
> compiler and the strange m68k-linux ABI which is different from
> SUN or BSD. The unusual part of m68k-linux ABI is that functions
> returning pointer return their value in register a0, while integer
> types are retuned in d0.
> How does the code generated by the native compiler interact
> with c-ABI functions?

C functions that can be called by Caml code must be declared with
return type "value", which is "long".  So, the C compiler will arrange
for the result to be in D0, which is where ocamlopt-generated code
expects to find it.

- Xavier Leroy

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: