Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Benedikt Meurer <benedikt.meurer@googlemail.com>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] New experimental ARM backend [was: OCaml maintenance status / community fork (again)]
Date: Tue, 13 Dec 2011 21:39:03 +0100	[thread overview]
Message-ID: <C2D371F3-9553-4D85-821A-E521BDC2FA91@googlemail.com> (raw)
In-Reply-To: <4EE63E88.40805@glondu.net>


On Dec 12, 2011, at 18:48 , Stéphane Glondu wrote:

>>> The relevant bug report PR/5404, which includes a backward
>>> compatible patch, is already waiting for a sign of life for 3 weeks
>>> now (maybe wait another 4 years to get the port fixed).
>> 
>> More bile.  What's so urgent about it?  The next release of OCaml is 3-6
>> months in the future; your suggestion will be examined by then. [...]
> 
> It's still unclear to me whether this kind of patches are welcome. I've
> been recently approached by an armhf porter (other than Benedikt)
> interested in having an ocamlopt running there, but I told him to back
> off because I don't know whether needed changes would be merged. Once
> again, I don't say we would have come up with a working solution before
> the next release of OCaml, but the result (if any) would have already
> been tested and deployed in Debian (and/or Ubuntu) before an upstream
> submission.

You can grab my current patch for the new OCaml ARM backend at:

 http://ps.informatik.uni-siegen.de/~meurer/tmp/ocaml-arm-20111213.diff

Compared to the old backend, this one does the following:

- Support for both softfp and VFPv3-D16 (if present).
- Properly supports interworking with Thumb/Thumb-2 code (for both OCaml and C code!)
- Supports dynamic linking and large memory models.
- Optional support for position-independent code via -fPIC, disabled by default and not required for natdynlink.
- Can emit both ARM and Thumb-2 code (currently Thumb-2 is used for ARMv7+ and ARM is used for everything else), with avg. code size savings of 27% for Thumb-2 (quite close the optimal 30% advertised by ARM Ltd.). I may also add support to emit small functions using Thumb-1 (for pre-ARMv7 / armel) in the future to reduce code size.
- Supports both AAPCS (armel) as well as extended VFP calling conventions (armhf).
- Properly supports backtraces.
- Recognizes several special ARM instructions (=> reduced code size and latency).
- Does not rely on GCC internals, but uses the standard ARM EABI runtime.

Feel free to test the patch, but be aware that it is

(a) highly experimental, it's tested and verified to work with Debian armel on ARMv5T and Debian armhf on a Cortex-A8, but YMMV,
(b) it only supports ARMv4T+ using the armel ABI w/o VFPv3, Thumb, etc. or ARMv7+ using the armhf ABI w/ VFPv3, Thumb-2, etc., there's no way to choose i.e. armel ABI w/ VFPv3, I don't know whether there's anyone except Ubuntu using such configurations currently,
(c) incompatible with .cmx/.cmxa/.cmxs files generated by the old ARM backend, and
(d) it's still a bit rough around the edges, i.e. the generated code is usually better (shorter and runs faster), but there's still room for improvement (i.e. instruction selection and scheduling need some more love).

Comments and suggestions are welcome.

> Cheers,
> Stéphane

HTH,
Benedikt


  reply	other threads:[~2011-12-13 20:39 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08  9:10 [Caml-list] OCaml maintenance status / community fork (again) Benedikt Meurer
2011-12-08  9:54 ` Alain Frisch
2011-12-08 10:28   ` Benedikt Meurer
2011-12-08 10:46     ` Alain Frisch
2011-12-08 11:08       ` Benedikt Meurer
2011-12-08 16:42       ` Fabrice Le Fessant
2011-12-08 10:47     ` ivan chollet
2011-12-08 14:07       ` oliver
2011-12-08 11:11     ` Pierre-Alexandre Voye
2011-12-08 18:18       ` Török Edwin
2011-12-09 21:42         ` oliver
2011-12-08 10:16 ` Gabriel Scherer
2011-12-08 11:07 ` Stéphane Glondu
2011-12-09  2:11 ` Jacques Garrigue
2011-12-09 10:37   ` Jérémie Dimino
2011-12-09 11:03     ` Gabriel Scherer
2011-12-09 11:17       ` Stefano Zacchiroli
2011-12-09 11:50         ` Jonathan Protzenko
2011-12-09 12:36           ` Alain Frisch
2011-12-09 23:22         ` Goswin von Brederlow
2011-12-09 22:33       ` oliver
2011-12-09 14:24     ` Benedikt Meurer
2011-12-09 17:00       ` Mehdi Dogguy
2011-12-09 17:36         ` Benedikt Meurer
2011-12-09 17:45           ` Mehdi Dogguy
2011-12-09 23:24             ` Goswin von Brederlow
2011-12-10  9:31               ` Benedikt Meurer
2011-12-10 14:45 ` Xavier Leroy
2011-12-10 15:58   ` Benedikt Meurer
2011-12-12 10:21     ` Xavier Leroy
2011-12-12 10:59       ` Benedikt Meurer
2011-12-12 12:20         ` Mehdi Dogguy
2011-12-12 15:17           ` Goswin von Brederlow
2011-12-19  4:09           ` Romain Beauxis
2011-12-19 17:35             ` Alain Frisch
2011-12-12 12:57         ` Gerd Stolpmann
2011-12-10 17:06   ` Török Edwin
2011-12-10 18:28   ` Jérémie Dimino
2011-12-10 18:34     ` Wojciech Meyer
2011-12-10 19:10       ` Wojciech Meyer
2011-12-10 20:55         ` Jérémie Dimino
2011-12-10 21:40           ` [Caml-list] Camlp4/p5 type reflection [was: OCaml maintenance status / community fork (again)] Wojciech Meyer
2011-12-10 23:34             ` Gabriel Scherer
2011-12-11  0:47               ` [Caml-list] Camlp4/p5 type reflection [ Wojciech Meyer
2011-12-11 11:19                 ` Gabriel Scherer
2011-12-11 18:14                   ` Jérémie Dimino
2011-12-11  9:04               ` [Caml-list] Camlp4/p5 type reflection [was: OCaml maintenance status / community fork (again)] Stéphane Glondu
2011-12-11  9:36                 ` Török Edwin
2011-12-11 10:29                 ` Gabriel Scherer
2011-12-11 11:23                   ` Gerd Stolpmann
2011-12-11 11:38                     ` Gabriel Scherer
2011-12-11 10:20               ` Fabrice Le Fessant
2011-12-11 10:47                 ` Gabriel Scherer
2011-12-11 13:27               ` Alain Frisch
2011-12-11 13:35                 ` Gabriel Scherer
2011-12-11 13:42                   ` Alain Frisch
2011-12-11 13:36                 ` Arnaud Spiwack
2011-12-11 13:46                 ` Stéphane Glondu
2011-12-10 23:28   ` [Caml-list] OCaml maintenance status / community fork (again) Jesper Louis Andersen
2011-12-11 11:02     ` Gerd Stolpmann
2011-12-13 19:36       ` oliver
2011-12-14 12:13         ` Gerd Stolpmann
2011-12-16 10:03           ` Stéphane Glondu
2011-12-11 13:33   ` Goswin von Brederlow
2011-12-11 13:59     ` [Caml-list] Community distribution [was: OCaml maintenance status / community fork (again)] Benedikt Meurer
2011-12-12 17:48   ` [Caml-list] OCaml maintenance status / community fork (again) Stéphane Glondu
2011-12-13 20:39     ` Benedikt Meurer [this message]
2011-12-14  9:18       ` [Caml-list] New experimental ARM backend [was: OCaml maintenance status / community fork (again)] Mark Shinwell
2011-12-14 21:51         ` Benedikt Meurer
2011-12-18 11:57       ` [Caml-list] " Benedikt Meurer
2011-12-18 13:08         ` Benedikt Meurer
2011-12-18 14:50           ` Alexandre Pilkiewicz
2011-12-18 16:42             ` Benedikt Meurer
2011-12-18 17:23           ` Stéphane Glondu
2011-12-21 10:11             ` [Caml-list] " Benedikt Meurer
2011-12-18 13:16         ` [Caml-list] " Benedikt Meurer
2011-12-17 18:36   ` [Caml-list] OCaml maintenance status / community fork (again) Stéphane Glondu
2011-12-18  4:25     ` Till Varoquaux

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=C2D371F3-9553-4D85-821A-E521BDC2FA91@googlemail.com \
    --to=benedikt.meurer@googlemail.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