caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] mips32 backend without floating point hardware
@ 2015-06-21  2:17 Nicolas Ojeda Bar
  2015-06-21  9:26 ` Xavier Leroy
  2015-06-22  8:00 ` Alain Frisch
  0 siblings, 2 replies; 7+ messages in thread
From: Nicolas Ojeda Bar @ 2015-06-21  2:17 UTC (permalink / raw)
  To: caml-list

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-23 17:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-21  2:17 [Caml-list] mips32 backend without floating point hardware Nicolas Ojeda Bar
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

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).