#6205: add Hint before spellchecking suggestion.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14220 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Fix testsuite.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14221 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Fix PR#6174 (non -rectypes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14246 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Fix PR#6174 (-rectypes case)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14248 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Add test for PR#6216. Not fixed yet.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14250 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
PR#6216: inlining of GADT matches generates invalid assembly
(reflecting commit r14251 on version/4.01).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14252 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
PR#6042: optimize integer division and modulus when divisor is constant.
So far, implemented only for amd64.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14254 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Follow-up to commit r14254: update destroyed_at_oper and max_register_pressure
for immediate Idiv and Imod.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14255 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Follow-up to commit r14254: optimization of division and modulus by constants for the I386.  Untested; CI will find out.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14256 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Follow-up to commit r14254: optimization of immediate division and modulus for ARM64.  Completely untested.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Compile multiplication by power of 2 constant to left shift.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14258 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
[arm] Optimize integer division and modulus by constant.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14259 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
[arm] r12 is destroyed for constants that are not a power of 2.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14260 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
PR#6222: The mls instruction is not available on ARMv6.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14261 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
#6042: fix Intel syntax.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14262 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Further refactor code generation for multiplication.

Recognize negation by multiplication with -1 and generate
subtraction in this case.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14264 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
[arm] Fix bug in div/mod by constant.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14265 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Improve code generation for subtraction.

Given integer constants x and n:
1. If n + x does not overflow, then (x - c) + n is compiled
   to (x + n) - c.
2. If n - x does not overflow, then (c - x) + n is compiled
   to c + (n - x).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14266 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
bound checking bug with caml_string_{get,set}{16,32,64}: fix the runtime C code

As notified by Nicolas Trangez, the following program behaves in an
unexpected way by returning 0 instead of failing with an out-of-bound
exception:

  external get16 : string -> int -> int = "%caml_string_get16"
  let test = get16 "" 0

caml_string_get16(str, idx) will access indices (idx) and (idx+1). The
bound-checking code is currently implemented as:

   if (idx < 0 || idx >= caml_string_length(str) - 1) caml_array_bound_error();

This is wrong as caml_string_length returns an mlsize_t which is
unsigned, so substracting 1 gets buggy when the size is 0. The test
should be written as follow:

   if (idx < 0 || idx + 1 >= caml_string_length(str)) caml_array_bound_error();

Note 1: we can exploit this bug to make out-of-bound access to
a string, but I think get16 examples will run into the padding
characters of OCaml strings and behave in a not-too-wrong way. It may
also be the case of get32, but get64 will access 7 bytes, so access
memory outside the string:

  # external set64: string -> int -> int -> unit = "%caml_string_get64";;
  external set64 : string -> int -> int -> unit = "%caml_string_get64"
  # set64 "" 0 0;;
  Segmentation fault

Note 2: this first commit only fixes the C code in byterun/str.c. Only
ocamlc actually uses these functions when the compiler primitive is
used ("%caml_string_get16" instead of "caml_string_get16"). ocamlopt
generates ocaml code directly, and this part has yet to be fixed in
a following commit.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14267 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
#6042: fix msvc64 port.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14268 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02