Commit Graph

582 Commits (4f131e3803f42b955effbc1b492320a1d9b24f63)

Author SHA1 Message Date
alainfrisch e888e099e2 Revert commits related to #330.
1. Revert "Switch to -custom for bytecode tests."
This reverts commit 6b7f81caf5.

2. Revert "Fix Changelog."
This reverts commit d94488d7b5.

3.Revert "Fix testsuite: use binary channels."
This reverts commit 840f7ca506.

4. Revert "Fix testsuite: do not require a globally installed ocamlrun."
This reverts commit 0388ef46d9.

5. Revert "Merge branch 'trunk' of https://github.com/bvaugon/ocaml into bvaugon-trunk"
This reverts commit 1ff6db10bf, reversing
changes made to 89d116c514.
2015-12-08 14:44:29 +01:00
Rich Neswold 2914b95cbb Add support for NetBSD/arm. 2015-12-05 10:16:48 -06:00
Benoit Vaugon 5e3964da86 Fix "weak hash of serialised closures" from mantis #0005942. 2015-12-04 00:51:44 +01:00
Xavier Leroy 51104fc231 Update zsystem branch wrt upstream trunk.
Resolved conflicts: testsuite/tests/asmcomp/mainarith.c
2015-11-19 13:55:54 +01:00
Damien Doligez 7cb9a80744 simplify .gitignore; remove .ignore files and tools/setignore; adjust tools/check-typo 2015-11-06 16:25:05 +01:00
alainfrisch 10b4f8d213 Attempt to fix a probable bug introduced by GPR#156. 2015-11-03 23:09:33 +01:00
Xavier Leroy 8e8835101a z port: simplify caml_start_program (cosmetic) 2015-11-01 05:01:03 -05:00
Xavier Leroy 9ff553d9ed z port: update caml_ml_bound_error
To reflect the changes to caml_c_call from commit cc9c12dff3
2015-10-30 12:16:58 -04:00
Xavier Leroy cc9c12dff3 z port: fix issue with PIC code and dynamic loading
In PIC mode, Itailcall_imm should jumpt to the PLT of the called function.

Also: use %r7 rather than %r1 to pass the function pointer argument to caml_c_call.  It can be that caml_c_call is in a different shared object than the caller.  In this case, %r0 and %r1 can be destroyed by PLT stub code, according to the ELF ABI.
2015-10-30 11:30:39 -04:00
Xavier Leroy 88fd26f63c z port: streamline the heap allocation code
Move the cold path (the one that calls the GC when alloc_ptr < alloc_limit)
as much as possible to the end of the function.

Use la and lay to produce shorter code.
2015-10-30 09:26:11 -04:00
Xavier Leroy 1e4aedd404 zSystem port: use %r12 as normal register + extcall conventions
Following the previous commit, %r12 becomes usable as a normal register.
However it must be saved in caml_call_gc.

Independently: change Proc.loc_external_arguments to account for the
160 reserved bytes at bottom of stack.  Then, caml_c_call and
emission of code for Iextcall(false) no longer need to account for
those reserved bytes.
2015-10-30 06:57:10 -04:00
Xavier Leroy f6a0392f57 zSystem port: do not mark return addresses
Using the low bit of return addresses to mark already-scanned stack frames improves GC time on architectures that ignore this bit in 'return' instructions, like Power.  Otherwise, as is the case for zSystem, clearing up this bit before every 'return' instruction costs too much in running time.

asmrun/stack.h: turn off the marking of return addresses for z
asmcomp/s390x/emit.mlp: suppress clearing of low bit of return addresses
2015-10-29 05:44:01 -04:00
Xavier Leroy 58db11e051 IBM zSystem port of OCaml
Import of Bill O'Farrell's port, rebased from 4.02.1 to trunk.
2015-10-29 09:55:19 +01:00
Mark Shinwell ca39ac766e GPR#262: Multiple GC roots per compilation unit
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16538 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 15:16:22 +00:00
Damien Doligez 8463f6667f ignore generated files
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16491 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-12 09:44:51 +00:00
Gabriel Scherer bedb4e3ac1 Build system: fix a few hardcoded ar commands.
(Daniel Bünzli)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16485 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-09 20:41:57 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Xavier Leroy ee9d50e899 asmrun/Makefile: Remove hard-wired '-O' options
configure: uninitialized variable $nativeccprofopts


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cc-optim@16377 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-25 14:15:54 +00:00
Xavier Leroy 6e9cd068c7 Support for PowerPC 64 bits big- and little-endian. Revised PowerPC 32 bits support.
Merge of branch 'ppc64'.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16374 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-25 09:28:33 +00:00
Gabriel Scherer 92be080ced second attempt to fix asmrun/backtrace.c windows build failure
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16372 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 15:54:09 +00:00
Gabriel Scherer 537c17af25 attempt to fix asmrun/backtrace.c windows build failure
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16371 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 14:22:28 +00:00
Gabriel Scherer 8da9ae04bb Adjust documentation
From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16368 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:24 +00:00
Gabriel Scherer c94118d61f Only register caml_backtrace_last_exn as root once.
This simplify the code, would have prevented GPR#205 and prepare ground
for upcoming improved backtrace generation.

From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16367 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:22 +00:00
Gabriel Scherer 91d1e34e2d Document backtrace infrastructure, make types more explicit
From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16366 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:20 +00:00
Gabriel Scherer 23d10e0875 Move backend specific backtrace code to backtrace_prim.c
And share backtrace.c between asmrun and byterun.

From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16365 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:18 +00:00
Xavier Leroy 84ebf792e6 Update wrt trunk, revision 16361.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16362 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-20 16:53:53 +00:00
Gabriel Scherer 9a533a50cd make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16352 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:59 +00:00
Xavier Leroy 7dacc03db0 PPC64 ABI v1: not enough space was reserved for the parameter save area before calls to C functions.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16339 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-06 12:32:30 +00:00
Xavier Leroy e0b40f2167 Update wrt trunk r16321.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16322 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-03 11:57:46 +00:00
Gabriel Scherer 465e34a590 GPR#221: add forgotten CAMLnoreturn_end
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16321 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-03 10:06:58 +00:00
Xavier Leroy cf87a2c664 Update wrt trunk r16319.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16320 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-03 09:18:04 +00:00
Xavier Leroy 7b80ca2581 PPC & SPARC trap handling: caml_young_ptr is a value *, not a char *.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16319 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-03 08:11:15 +00:00
Gabriel Scherer 1957021b27 make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 18:34:09 +00:00
Gabriel Scherer edb714dc15 GPR#221: keep Noreturn and add CAMLnoreturn_{start,end}
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16313 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:20 +00:00
Xavier Leroy d232e7d4ff PPC64 little-endian support.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16298 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-30 09:07:09 +00:00
Xavier Leroy a8d15c866b - Use addis/addi in preference to addis/ori to enable instruction fusion
on POWER8.
- PPC64: concatenate jump tables so as to reduce the number of TOC entries
  for jump table labels.
- Use simpler asm directives for filling the TOC.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16297 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-30 08:54:22 +00:00
Gabriel Scherer 34ab11fbcc GPR#165: Changed the definition of the Noreturn macro to also work with Visual Studio Version >= 2008 using the __declspec(noreturn).
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16262 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:50 +00:00
Gabriel Scherer 5a47e0cb7b GPR#156: Optimize reallocation of caml_frame_descriptors
(Pierre Chambart)

It now reallocates and reinitialises the whole table only when it is
too small. This avoids quadratic behavior when loading a lot of module
with dynlink.

This was problematic on frama-c when inlining increase the code
size. The frame table initialisation took ~0.5 second. This is quite
noticeable on real examples where the whole frama-c analysis is ~1.5s
long.

Also allows to unregister a frametable.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16260 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:01:47 +00:00
Xavier Leroy ace8b9da28 TOC hacking: revised strategy for saving and restoring r2, producing slightly smaller code.
Plus: force 2^12 alignment of the .opd section so that no page is common to the .opd and the .data sections.  This causes output_value and other polymorphic primitives to misbehave.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16236 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-22 14:09:02 +00:00
Xavier Leroy 133bb63ee4 TOC galore. Various issues with the TOC register r2 not being properly maintained when executable has multiple TOCs.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16230 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-21 15:23:35 +00:00
Xavier Leroy bf778d1d5d PPC64: add support for large TOC (32-bit offsets instead of 16-bit)
PPC: add some CFI directives and a bit of debug info.
testsuite/tests/asmcomp/power.S: update for PPC64le.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16227 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-21 08:28:26 +00:00
Xavier Leroy 8815d7e1a2 PowerPC port of ocamlopt:
- Removed MacOS X support, long dead.
- Added support for PowerPC 64 bits, big-endian, ELF v1 ABI
  (tested, mostly works, some issues remain with marshaling of code pointers)
- Added support for PowerPC 64 bits, little-endian, ELF v2 ABI
  (completely untested)


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ppc64@16226 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-20 15:41:44 +00:00
Damien Doligez 4b83d53fbc update .depend and bootstrap compilers after 4.02 merge
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16218 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 18:34:07 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Alain Frisch 30450e77df Fix GPR#205: Clear caml_backtrace_last_exn before registering as root.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16187 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-23 16:10:03 +00:00
Damien Doligez 9ab3918ec5 replace 0 -> NULL
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16166 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-09 16:39:02 +00:00
Mark Shinwell 8df90ef051 Port fix for GPR#191 to trunk (making gc.h and some part of memory.h public)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16163 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-08 13:21:42 +00:00
Damien Doligez 17ffb8ff23 missing bits of commit 16074 (for windows)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16081 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-05 16:37:53 +00:00
Damien Doligez 0477bab3bf deduplicate some startup code and fix PR#6808: the parsing of OCAMLRUNPARAM is too lax
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16074 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-04 15:44:40 +00:00
Gabriel Scherer d1c017c7cb PR#6693 libasmrun: fix -pic code generation
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16073 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-02 20:24:46 +00:00