|Anonymous | Login | Signup for a new account||2015-08-04 15:55 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005433||OCaml||OCaml general||public||2011-12-18 14:13||2013-05-08 15:26|
|Target Version||Fixed in Version||4.00.0+beta2/+rc1|
|Summary||0005433: New ARM backend|
|Description||The following is basically copy&paste from https://github.com/bmeurer/ocaml-arm/wiki: [^]|
This patch contains my work on a new ARM backend for the OCaml native code compiler, currently based on the 3.12.1 release. Compared to the old ARM backend, this one does the following:
- Support for both software and hardware floating-point (VFPv3).
- 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 a command line option -fPIC. This is disabled by default and not required for natdynlink.
- Can emit both ARM and Thumb-2 code, with avg. code size savings of 27% for Thumb-2 (quite close the optimal 30% advertised by ARM Ltd.).
- Supports both AAPCS (armel) as well as extended VFP calling conventions (armhf).
- Supports several special ARM instructions to reduce code size and latency.
- Uses standard ARM EABI runtime functions instead of relying on GCC internals.
- Supports exception backtraces.
- Supports profiling using gprof.
See https://github.com/bmeurer/ocaml-arm/wiki [^] for up-to-date information about the current state of the patch.
The latest patch is attached, but it's not necessarily the final patch. It's almost a complete rewrite of the ARM backend, so it will need some more testing.
|Tags||No tags attached.|
|Attached Files|| ocaml-arm-3.12.1+20111218.diff.bz2 [^] (40,417 bytes) 2011-12-18 14:13|
ocaml-arm-3.12.1+20111222.diff.bz2 [^] (21,176 bytes) 2011-12-22 11:41
|Attached a new patch, which does no longer includes the config.guess/config.sub upgrade (see PR#5439 for that), therefore only half the size of the previous patch.|
|I have a concern about Proc.destroyed_at_oper, case Iop(Iextcall(_, true)): the result should really be all_phys_regs as in the original code. Indeed, an allocating extcall can raise a Caml exception, which will not reload any of the callee-save registers. Also, such an extcall can trigger a GC, and if GC roots are stored in callee-save regs across the Iextcall, the GC assumes that these callee-save regs have been saved in memory in a location pointed to by caml_gc_regs (cf. caml_call_gc in asmrun/<proc>.S). For both reasons, all Caml values live across a Iextcall(_, true) must be stack-allocated, and this is achieved by saying that the Iextcall destroys all registers.|
Ok, makes sense. It's fixed in ocaml-arm:
|I just merged the latest commit ec5b444c7f of my development repository at https://github.com/bmeurer/ocaml-arm/tree/ec5b444c7f [^] into trunk with revision 12124.|
|2011-12-18 14:13||meurer||New Issue|
|2011-12-18 14:13||meurer||File Added: ocaml-arm-3.12.1+20111218.diff.bz2|
|2011-12-22 11:41||meurer||File Added: ocaml-arm-3.12.1+20111222.diff.bz2|
|2011-12-22 11:43||meurer||Note Added: 0006497|
|2012-01-17 11:04||lefessan||Relationship added||has duplicate 0005404|
|2012-01-23 15:48||xleroy||Note Added: 0006780|
|2012-01-23 15:48||xleroy||Status||new => feedback|
|2012-01-23 19:44||meurer||Note Added: 0006787|
|2012-01-23 19:44||meurer||Status||feedback => new|
|2012-01-31 08:49||xleroy||Assigned To||=> meurer|
|2012-01-31 08:49||xleroy||Status||new => assigned|
|2012-02-04 11:18||meurer||Note Added: 0006877|
|2012-02-04 11:19||meurer||Status||assigned => resolved|
|2012-02-04 11:19||meurer||Resolution||open => fixed|
|2013-05-08 15:26||meurer||Status||resolved => closed|
|2013-05-08 15:26||meurer||Fixed in Version||=> 4.00.0+beta2/+rc1|
|Copyright © 2000 - 2011 MantisBT Group|