From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA05898; Tue, 26 Aug 2003 15:43:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA07311 for ; Tue, 26 Aug 2003 15:43:26 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h7QDhJf28665; Tue, 26 Aug 2003 15:43:19 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA08861; Tue, 26 Aug 2003 15:43:18 +0200 (MET DST) Date: Tue, 26 Aug 2003 15:43:18 +0200 From: Xavier Leroy To: Richard Zidlicky Cc: sven.luther@wanadoo.fr, caml-list@inria.fr Subject: Re: [Caml-list] Native compiler support for m68k? Message-ID: <20030826154318.A28532@pauillac.inria.fr> References: <20030820104917.GB6782@linux-m68k.org> <20030820143238.A15392@pauillac.inria.fr> <20030824200539.GA1118@linux-m68k.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20030824200539.GA1118@linux-m68k.org>; from rz@linux-m68k.org on Sun, Aug 24, 2003 at 10:05:39PM +0200 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 gcc:01 gcc:01 ocamlopt:01 compiler:01 compiler:01 caml:01 native:02 native:02 stack:02 pointer:03 types:03 interaction:05 functions:05 functions:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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 caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners