Previously, `caml_int_compare` and `caml_float_compare` would compute their -1/0/1 result
at type int, then widen it to type intnat. On 64-bit platforms this causes an extra sign extension.
This commit changes the code so that the -1/0/1 result is computed directly at type intnat.
Using the clang/llvm assembler avoids an extra dependency on GNU binutils, and that's what 32-bit arm is using.
But in this case, there was a problem with floating point immediates: LLVM thinks that if they're written in hex, they must be integer values between 0 and 255.
Changed them to float literals.
Some ocamlopt code generators use special instructions to load specific FP
constants into an FP register, instead of loading the value from memory.
This is the case for i386, amd64, and arm64.
This test checks that these special instructions produce the correct
FP values.
Call the C preprocessor through the C compiler rather than calling it
directly.
This required the definition of a new ocamltest variable,
ocaml_filetype_flag, which makes it possible to override the filetype
inferred by the compiler from the extnesion of the source file.
The Graphics library is now distributed as a separate package.
The sources are at https://github.com/ocaml/graphics .
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
The address was loaded from the TOC into register r0. This generated bad code in the "big TOC" case, as r0 was used as index register. The fix is to use another temporary register instead of r0.
Add "arch_power" builtin to ocamltest.
Add test case.
That's because ocamlopt -a doesn't support .cmxa files as arguments.
It is better to reject those files in ocamlmklib than later.
The manual never said that ocamlmklib accepts .cmxa files.
Closes: #3249
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.
Following on from GPR#851 and GPR#873, this pull request further enhances debugging information in Cmm terms. This was driven both by manually examining the debugger's behaviour and also by a report received from a user regarding substandard DWARF location information.
The compatibility macros (that were introduced while moving bigarray file mapping functions to the Unix library) are no longer necessary, so let's get rid of them.
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>