See https://github.com/ocaml/ocaml/pull/1789#issuecomment-695785998
Currently ocamldoc default encoding is isolatin, however it seems that some files in `libref` already use UTF8 encoding, so I assume it would be better to generate HTML files with "charset=UTF-8".
- Rewrite the `is_immediate` methods in $ARCH/selection.ml in the style of
other selection methods: operations that need platform-dependent handling
are explicitly listed, all others fall through `super#is_immediate`.
- The `is_immediate` method from selectgen.ml knows how to handle shifts
(and no other operation). Remove the `select_shift_op` method,
now unnecessary.
- ARM: remove special cases for multiply and multiply-high, no longer
necessary.
- RISC-V: in emit.mlp, remove implementation of checkbound immediate,
which is no longer generated.
Rewrite check_scope_escape using proper marking and unmarking
This uses the Btype.snapshot/backtrack mechanism, to ensure that we
always undo marking on types from the environment and to avoid a
`try ... with ...` construction for each recursive call.
This commit simplifies a few integer constants that were obfuscated so
as to pass compilation on a 32-bit host, as "make check_all_arches"
would do if ran on a 32-bit host. However, "make check_all_arches"
does not run on 32-bit hosts, unlike what is claimed in comments.
More generally, 32-bit hosts are no longer used for developing OCaml and
will not be used for cross-compilation. So, let's not complicate the
back-ends unnecessarily.
- Support a wider range of immediate values for ADD and SUB,
using two instructions when needed (add/sub middle 12 bits then low 12 bits).
- Do not rely on the assembler to convert CMP immediate negative to
CMN immediate.
Replace the a single `is_immediate n` method that is supposed to apply
to all arithmetic instructions by two methods:
`is_immediate op n` : tests whether `n` is in the range of supported
immediate arguments for integer operation `op`
`is_immediate_test cmp n` : tests whether `n` is in the range of supported
immediate arguments for integer comparison `cmp`
This makes it easier to handle operations without immediate operands
(e.g. multiply or multiply-high on many platforms) and operations with
specific ranges of immediate operands (e.g. N-bit unsigned versus
N-bit signed). Before, these operations had to be treated as special
cases in the platform-specific `select_operation` method.