caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] mips32 backend without floating point hardware
Date: Sun, 21 Jun 2015 11:26:55 +0200	[thread overview]
Message-ID: <5586835F.9030401@inria.fr> (raw)
In-Reply-To: <CAPunWhBjGXu1wDP6UCM45kPkFb6Hj73U4Nc7Ky=UDkkkaKLG5Q@mail.gmail.com>

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

  reply	other threads:[~2015-06-21  9:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-21  2:17 Nicolas Ojeda Bar
2015-06-21  9:26 ` Xavier Leroy [this message]
2015-06-21 10:08   ` Vincent Bernardoff
2015-06-22  9:30     ` Stéphane Glondu
2015-06-22 10:07       ` Thomas Gazagnaire
2015-06-23 17:57       ` Richard W.M. Jones
2015-06-22  8:00 ` Alain Frisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5586835F.9030401@inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).