Commit Graph

22 Commits (master)

Author SHA1 Message Date
Greta Yorsh 30e1e534d7 Add named text sections for caml_system__code_begin/end symbols 2020-10-19 16:47:13 +01:00
EduardoRFS cf6ecb7816 arm64: remove misleading comment 2020-07-26 21:21:37 +00:00
EduardoRFS 8c38ac6bf6 arm64: support ios shared library
* the stub on iOS also saves x8 and x9
* use x8 for ADDITIONAL_ARG
* use only 8 regs for calling args
2020-07-25 08:37:39 +00:00
EduardoRFS bdbd867c62 arm64 runtime: use additional arg only externally 2020-07-25 08:37:39 +00:00
EduardoRFS f323d2ad67 arm64 runtime: apply ios assembler requirements 2020-07-25 08:36:23 +00:00
EduardoRFS 42943915a7 arm64 runtime: macro for global and local symbols 2020-07-25 08:36:22 +00:00
EduardoRFS cbcd76b4c8 arm64 runtime: remove .type, .size on local labels 2020-07-25 08:36:22 +00:00
EduardoRFS f6c799d08f arm64 runtime: macro pair for objects 2020-07-25 08:36:22 +00:00
EduardoRFS 32ab52c59a arm64 runtime: macro pair for functions 2020-07-25 08:36:22 +00:00
EduardoRFS 4375fa82db arm64 runtime: use x17 instead of x18(reserved) 2020-07-25 08:36:22 +00:00
Stephen Dolan 7fe360401b Per-architecture support for allocation size info in frame tables.
amd64: remove caml_call_gc{1,2,3} and simplify caml_alloc{1,2,3,N}
       by tail-calling caml_call_gc.

i386:  simplify caml_alloc{1,2,3,N} by tail-calling caml_call_gc.
       these functions do not need to preserve ebx.

arm:   simplify caml_alloc{1,2,3,N} by tail-calling caml_call_gc.
       partial revert of #8619.

arm64: simplify caml_alloc{1,2,3,N} by tail-calling caml_call_gc.
       partial revert of #8619.

power: partial revert of #8619.
       avoid restarting allocation sequence after failure.

s390:  partial revert of #8619.
       avoid restarting allocation seqeunce after failure.
2019-10-23 09:24:13 +01:00
Guillaume Munch-Maccagnoni b304042b29 Fix missing Caml_state (#8940)
* Fix free identifiers in spacetime

* Fix free identifiers in tools/gdb-macros

* [minor] Fix Caml_state fields in comments, and other comment updates

* Changes
2019-10-03 16:27:32 +02:00
KC Sivaramakrishnan 8721dc4e89 Remove inclusion of config.h from the files that generate domain state table. 2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan f7920a127f Domain state works on Power64 2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan 7841b4e30b Support for domain state on arm64 architecture 2019-08-23 09:50:05 +05:30
Greta Yorsh c79387bb64 Add .caml to function section names
Emit .text.caml.function_name instead of .text.function_name,
and update runtime assembly function names accordingly.
2019-07-15 10:25:26 +01:00
Greta Yorsh 3d624e83ec Add macro FUNCTION in arm.S and arm64.S to avoid duplicate use of function name 2019-07-15 10:25:26 +01:00
Greta Yorsh 27a92a9445 Emit each function in a separate section (amd64,i386,arm,arm64)
Add --enable-function-sections option to configure. With this option,
the compiler will emit each function in a separate named text section,
on supported targets. This enables function reordering using a linker
script. With this option, the compiler also emits caml_hot__code_begin
and caml_hot__code_end sections. This allows a linker script to
move function sections outside of the segments they belong to,
without breaking caml_code_segments.
2019-07-15 10:25:26 +01:00
Stephen Dolan c24e5b5c8a Ensure that Gc.minor_words remains accurate after a GC (#8619)
If an allocation fails, the decrement of young_ptr should be undone
before the GC is entered. This happened correctly on bytecode but not
on native code.

This commit (squash of pull request #8619) fixes it for all the
platforms supported by ocamlopt.

amd64: add alternate entry points caml_call_gc{1,2,3} for code size
optimisation.

powerpc: introduce one GC call point per allocation size per function.
Each call point corrects the allocation pointer r31 before calling
caml_call_gc.

i386, arm, arm64, s390x: update the allocation pointer after the
conditional branch to the GC, not before.

arm64: simplify the code generator: Ialloc can assume that less than
0x1_0000 bytes are allocated, since the max allocation size for the
minor heap is less than that.

This is a partial cherry-pick of commit 8ceec on multicore.
2019-05-04 10:01:23 +02:00
Xavier Leroy dc439ec74b
arm64.S: use 32-bit loads to access caml_backtrace_active (#8569)
`caml_backtrace_active` is declared with type `int32_t`, so it is
incorrect to access it with a 64-bit "ldr" instruction.
Either a link-time error occurs, as in issue #8567,
or the wrong value may be loaded.

This commit uses `ldrsw` instructions (32-bit signed loads) to
access `caml_backtrace_active`.

Closes: #8567
2019-04-02 11:17:49 +02:00
Mark Shinwell 2cc1ea26b9 Remove gprof support (#2314)
This commit removes support for gprof-based profiling (the -p option to ocamlopt).  It follows a discussion on the core developers' list, which indicated that removing gprof support was a reasonable thing to do. The rationale is that there are better easy-to-use profilers out there now, such as perf for Linux and Instruments on macOS; and the gprof support has always been patchy across targets. We save a whole build of the runtime and simplify some other parts of the codebase by removing it.
2019-03-16 19:56:53 +01:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00