From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id CDFB57EEEF for ; Sun, 21 Jun 2015 11:26:55 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of Xavier.Leroy@inria.fr) identity=pra; client-ip=212.27.42.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="Xavier.Leroy@inria.fr"; x-sender="Xavier.Leroy@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of Xavier.Leroy@inria.fr) identity=mailfrom; client-ip=212.27.42.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="Xavier.Leroy@inria.fr"; x-sender="Xavier.Leroy@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp3-g21.free.fr) identity=helo; client-ip=212.27.42.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="Xavier.Leroy@inria.fr"; x-sender="postmaster@smtp3-g21.free.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AsAwDNgoZVnAMqG9Rch2G/d4JUAoEjTAEBAQEBARIBAQEBAQYNCQkhLkEFg10BAQQjMCURCxgCAgUWCwICCQMCAQIBRRMIAQGIL7EjlXoBCyCBIYokhQ0WglKBQwWTfYtOiDKPf4QhgzUBAQE X-IPAS-Result: A0AsAwDNgoZVnAMqG9Rch2G/d4JUAoEjTAEBAQEBARIBAQEBAQYNCQkhLkEFg10BAQQjMCURCxgCAgUWCwICCQMCAQIBRRMIAQGIL7EjlXoBCyCBIYokhQ0WglKBQwWTfYtOiDKPf4QhgzUBAQE X-IronPort-AV: E=Sophos;i="5.13,653,1427752800"; d="scan'208";a="166488109" Received: from smtp3-g21.free.fr ([212.27.42.3]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 21 Jun 2015 11:26:55 +0200 Received: from [192.168.1.2] (unknown [82.237.71.191]) by smtp3-g21.free.fr (Postfix) with ESMTPS id 6A6C2A6335 for ; Sun, 21 Jun 2015 11:26:55 +0200 (CEST) Message-ID: <5586835F.9030401@inria.fr> Date: Sun, 21 Jun 2015 11:26:55 +0200 From: Xavier Leroy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] mips32 backend without floating point hardware On 21/06/15 04:17, Nicolas Ojeda Bar wrote: > I am trying to get the mips o32 backend (from 1.*, ~17 years ago!) > working again on machines without *any* floating point hardware. > [...] > This works well for the > OCaml side of things, but the C abi dictates that float args should be > passed in even-odd pairs of int registers (i.e., either a0-a1 or > a2-a3). Unfortunately I lost the Int/Float distinction after > overloading regs_for, so I can't enforce this constraint in > Proc.loc_external_arguments. Similarly it is not possible to 8-align > extra floats in the stack since the type information is lost. > > Any ideas/suggestions how to fit this situation to the existing > backend infrastructure ? My suggestion is just to forget about soft floating-point altogether. The back-end hacks that were introduced 10 years ago to support soft FP on ARM don't quite work in the general case, as you describe above. In the meantime, hardware FP is now provided by all the processors that are powerful enough to run OCaml code. Why bother? - Xavier Leroy