From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] mips32 backend without floating point hardware
Date: Sun, 21 Jun 2015 07:47:42 +0530 [thread overview]
Message-ID: <CAPunWhBjGXu1wDP6UCM45kPkFb6Hj73U4Nc7Ky=UDkkkaKLG5Q@mail.gmail.com> (raw)
Hello list,
I am trying to get the mips o32 backend (from 1.*, ~17 years ago!)
working again on machines without *any* floating point hardware.
As suggested in the comments of selectgen.ml I overloaded
method regs_for : Cmm.machtype -> Reg.t array
to store float regs in pairs of int regs. 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 ?
Thanks!
Best wishes,
Nicolas
next reply other threads:[~2015-06-21 2:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-21 2:17 Nicolas Ojeda Bar [this message]
2015-06-21 9:26 ` Xavier Leroy
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='CAPunWhBjGXu1wDP6UCM45kPkFb6Hj73U4Nc7Ky=UDkkkaKLG5Q@mail.gmail.com' \
--to=n.oje.bar@gmail.com \
--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