Commit Graph

8 Commits (ee8f71101b80496b2ec2c996d29ac33bbaf7cf00)

Author SHA1 Message Date
Damien Doligez ee8f71101b clean up whitespace and cut long lines 2016-02-17 13:36:27 +01:00
Xavier Leroy b1f2289de1 GPR#333: mark stack as nonexecutable. 2015-12-22 16:20:26 +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 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