diff --git a/0001-Don-t-ignore-.-configure-it-s-a-real-git-file.patch b/0001-Don-t-ignore-.-configure-it-s-a-real-git-file.patch index aa469a9..38bf039 100644 --- a/0001-Don-t-ignore-.-configure-it-s-a-real-git-file.patch +++ b/0001-Don-t-ignore-.-configure-it-s-a-real-git-file.patch @@ -20,5 +20,5 @@ index 6c66ecc..5d4b626 100644 /ocamlc.opt /expunge -- -2.4.1 +2.3.1 diff --git a/0002-Ensure-empty-compilerlibs-directory-is-created-by-gi.patch b/0002-Ensure-empty-compilerlibs-directory-is-created-by-gi.patch index 8656d00..cb2c1ce 100644 --- a/0002-Ensure-empty-compilerlibs-directory-is-created-by-gi.patch +++ b/0002-Ensure-empty-compilerlibs-directory-is-created-by-gi.patch @@ -14,5 +14,5 @@ diff --git a/compilerlibs/.exists b/compilerlibs/.exists new file mode 100644 index 0000000..e69de29 -- -2.4.1 +2.3.1 diff --git a/0003-Don-t-add-rpaths-to-libraries.patch b/0003-Don-t-add-rpaths-to-libraries.patch index 93af56d..158a687 100644 --- a/0003-Don-t-add-rpaths-to-libraries.patch +++ b/0003-Don-t-add-rpaths-to-libraries.patch @@ -25,5 +25,5 @@ index 2517434..75a75b4 100644 sed -n -e 's/^#ml //p' ../config/Makefile) \ > ocamlmklibconfig.ml -- -2.4.1 +2.3.1 diff --git a/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch b/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch index db21321..4f9e793 100644 --- a/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch +++ b/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch @@ -236,5 +236,5 @@ index 0000000..e28800f + header.units + end -- -2.4.1 +2.3.1 diff --git a/0005-configure-Allow-user-defined-C-compiler-flags.patch b/0005-configure-Allow-user-defined-C-compiler-flags.patch index a211a76..b29755f 100644 --- a/0005-configure-Allow-user-defined-C-compiler-flags.patch +++ b/0005-configure-Allow-user-defined-C-compiler-flags.patch @@ -23,5 +23,5 @@ index 3edb9fd..18b95cd 100755 cclibs="$cclibs $mathlib" -- -2.4.1 +2.3.1 diff --git a/0006-Add-support-for-ppc64.patch b/0006-Add-support-for-ppc64.patch index 91a6311..d96a643 100644 --- a/0006-Add-support-for-ppc64.patch +++ b/0006-Add-support-for-ppc64.patch @@ -2126,5 +2126,5 @@ index 18b95cd..57c8699 100755 aspp="$bytecc -c";; sparc,solaris) as="${TOOLPREF}as" -- -2.4.1 +2.3.1 diff --git a/0007-ppc64-Update-for-OCaml-4.02.0.patch b/0007-ppc64-Update-for-OCaml-4.02.0.patch index 92f1e07..719f481 100644 --- a/0007-ppc64-Update-for-OCaml-4.02.0.patch +++ b/0007-ppc64-Update-for-OCaml-4.02.0.patch @@ -201,5 +201,5 @@ index b7bba9b..b582b6a 100644 | Iintop(Imod) -> 40 (* assuming full stall *) | Iintop(Icomp _) -> 4 -- -2.4.1 +2.3.1 diff --git a/0008-Add-support-for-ppc64le.patch b/0008-Add-support-for-ppc64le.patch index e264706..223b625 100644 --- a/0008-Add-support-for-ppc64le.patch +++ b/0008-Add-support-for-ppc64le.patch @@ -1913,5 +1913,5 @@ index 57c8699..c04272c 100755 aspp="$bytecc -c";; sparc,solaris) as="${TOOLPREF}as" -- -2.4.1 +2.3.1 diff --git a/0009-ppc64le-Update-for-OCaml-4.02.0.patch b/0009-ppc64le-Update-for-OCaml-4.02.0.patch index 09d9c11..7cd779d 100644 --- a/0009-ppc64le-Update-for-OCaml-4.02.0.patch +++ b/0009-ppc64le-Update-for-OCaml-4.02.0.patch @@ -200,5 +200,5 @@ index b7bba9b..b582b6a 100644 | Iintop(Imod) -> 40 (* assuming full stall *) | Iintop(Icomp _) -> 4 -- -2.4.1 +2.3.1 diff --git a/0010-arm-arm64-Mark-stack-as-non-executable.patch b/0010-arm-arm64-Mark-stack-as-non-executable.patch index 1e52d15..b7fef02 100644 --- a/0010-arm-arm64-Mark-stack-as-non-executable.patch +++ b/0010-arm-arm64-Mark-stack-as-non-executable.patch @@ -35,5 +35,5 @@ index 9b4b9ab..c23168b 100644 + /* Mark stack as non-executable, PR#4564 */ + .section .note.GNU-stack,"",%progbits -- -2.4.1 +2.3.1 diff --git a/0011-arg-Add-no_arg-and-get_arg-helper-functions.patch b/0011-arg-Add-no_arg-and-get_arg-helper-functions.patch index dd31681..c1eb577 100644 --- a/0011-arg-Add-no_arg-and-get_arg-helper-functions.patch +++ b/0011-arg-Add-no_arg-and-get_arg-helper-functions.patch @@ -114,5 +114,5 @@ index d7b8ac0..a8f3964 100644 treat_action action with Bad m -> stop (Message m); -- -2.4.1 +2.3.1 diff --git a/0012-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch b/0012-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch index 50ef250..9e3f866 100644 --- a/0012-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch +++ b/0012-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch @@ -80,5 +80,5 @@ index 0999edf..71af638 100644 Examples ([cmd] is assumed to be the command name): -- -2.4.1 +2.3.1 diff --git a/0013-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch b/0013-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch index 17b269f..133f333 100644 --- a/0013-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch +++ b/0013-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch @@ -1959,5 +1959,5 @@ index cb3d995..93cdfeb 100644 lseek(fd, (long) -TRAILER_SIZE, SEEK_END); -- -2.4.1 +2.3.1 diff --git a/0014-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch b/0014-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch index b00c52c..fdf6ce5 100644 --- a/0014-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch +++ b/0014-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch @@ -70,5 +70,5 @@ index 98c42e2..b7bfce4 100644 +/* Mark stack as non-executable, PR#4564 */ + .section .note.GNU-stack,"",%progbits -- -2.4.1 +2.3.1 diff --git a/0015-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch b/0015-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch index 3039aed..a417211 100644 --- a/0015-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch +++ b/0015-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch @@ -80,5 +80,5 @@ index 476c984..56473ac 100644 let num_stack_slots = [| 0; 0 |] -- -2.4.1 +2.3.1 diff --git a/0016-Fix-PR-6490-incorrect-backtraces-in-gdb-on-AArch64.-.patch b/0016-Fix-PR-6490-incorrect-backtraces-in-gdb-on-AArch64.-.patch index 3f1d9c3..3b82dc2 100644 --- a/0016-Fix-PR-6490-incorrect-backtraces-in-gdb-on-AArch64.-.patch +++ b/0016-Fix-PR-6490-incorrect-backtraces-in-gdb-on-AArch64.-.patch @@ -75,5 +75,5 @@ index 486a583..e943da3 100644 val cfi_adjust_cfa_offset : int -> unit +val cfi_offset : reg:int -> offset:int -> unit -- -2.4.1 +2.3.1 diff --git a/0017-ppc64le-Fix-calling-convention-of-external-functions.patch b/0017-ppc64le-Fix-calling-convention-of-external-functions.patch index 038fe47..b3d35da 100644 --- a/0017-ppc64le-Fix-calling-convention-of-external-functions.patch +++ b/0017-ppc64le-Fix-calling-convention-of-external-functions.patch @@ -30,5 +30,5 @@ index 56473ac..c705695 100644 let extcall_use_push = false -- -2.4.1 +2.3.1 diff --git a/0018-aarch64-AArch64-backend-generates-invalid-asm-condit.patch b/0018-Fix-PR-6878-AArch64-conditional-branches-out-of-rang.patch similarity index 91% rename from 0018-aarch64-AArch64-backend-generates-invalid-asm-condit.patch rename to 0018-Fix-PR-6878-AArch64-conditional-branches-out-of-rang.patch index 615f00f..718f3dc 100644 --- a/0018-aarch64-AArch64-backend-generates-invalid-asm-condit.patch +++ b/0018-Fix-PR-6878-AArch64-conditional-branches-out-of-rang.patch @@ -1,26 +1,28 @@ -From 1469caf50519c50979aeb27518f53d5976aed4ce Mon Sep 17 00:00:00 2001 -From: Mark Shinwell -Date: Tue, 9 Jun 2015 11:52:59 +0100 -Subject: [PATCH 18/18] aarch64: AArch64 backend generates invalid asm: - conditional branch out of range (RHBZ#1224815). +From 2a2f55156c3d53f22095968f1785e79cca7676e7 Mon Sep 17 00:00:00 2001 +From: Mark Shinwell +Date: Wed, 10 Jun 2015 09:27:36 +0000 +Subject: [PATCH 18/18] Fix PR#6878: AArch64 conditional branches out of range. + (Introduces new, generic branch relaxation module.) -Upstream bug: http://caml.inria.fr/mantis/view.php?id=6878 +git-svn-id: http://caml.inria.fr/svn/ocaml/version/4.02@16168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 +(cherry picked from commit d2a9da66eca1cb769e555b79a23b1ac64c01d1b5) --- - .depend | 148 ++++++++++--------- + .depend | 130 +++++++++-------- Makefile | 2 + + asmcomp/amd64/emit.mlp | 6 + asmcomp/arm64/arch.ml | 13 ++ asmcomp/arm64/emit.mlp | 294 +++++++++++++++++++++++++++++++++++--- - asmcomp/branch_relaxation.ml | 135 +++++++++++++++++ + asmcomp/branch_relaxation.ml | 138 ++++++++++++++++++ asmcomp/branch_relaxation.mli | 26 ++++ - asmcomp/branch_relaxation_intf.ml | 53 +++++++ + asmcomp/branch_relaxation_intf.ml | 63 ++++++++ asmcomp/power/emit.mlp | 190 ++++++++++-------------- - 8 files changed, 655 insertions(+), 206 deletions(-) + 9 files changed, 666 insertions(+), 196 deletions(-) create mode 100644 asmcomp/branch_relaxation.ml create mode 100644 asmcomp/branch_relaxation.mli create mode 100644 asmcomp/branch_relaxation_intf.ml diff --git a/.depend b/.depend -index 5d95a9b..d18b769 100644 +index 5d95a9b..813fbd7 100644 --- a/.depend +++ b/.depend @@ -94,10 +94,10 @@ typing/ctype.cmi : typing/types.cmi typing/path.cmi parsing/longident.cmi \ @@ -265,78 +267,51 @@ index 5d95a9b..d18b769 100644 asmcomp/debuginfo.cmi asmcomp/debuginfo.cmx : parsing/location.cmx bytecomp/lambda.cmx \ asmcomp/debuginfo.cmi --asmcomp/emit.cmo : asmcomp/reg.cmi asmcomp/proc.cmi utils/misc.cmi \ -- asmcomp/mach.cmi asmcomp/linearize.cmi bytecomp/lambda.cmi \ -- asmcomp/emitaux.cmi asmcomp/debuginfo.cmi utils/config.cmi \ ++asmcomp/emitaux.cmo : asmcomp/linearize.cmi asmcomp/debuginfo.cmi \ ++ utils/config.cmi utils/clflags.cmi asmcomp/arch.cmo asmcomp/emitaux.cmi ++asmcomp/emitaux.cmx : asmcomp/linearize.cmx asmcomp/debuginfo.cmx \ ++ utils/config.cmx utils/clflags.cmx asmcomp/arch.cmx asmcomp/emitaux.cmi + asmcomp/emit.cmo : asmcomp/reg.cmi asmcomp/proc.cmi utils/misc.cmi \ + asmcomp/mach.cmi asmcomp/linearize.cmi bytecomp/lambda.cmi \ + asmcomp/emitaux.cmi asmcomp/debuginfo.cmi utils/config.cmi \ - asmcomp/compilenv.cmi asmcomp/cmm.cmi utils/clflags.cmi asmcomp/arch.cmo \ - asmcomp/emit.cmi --asmcomp/emit.cmx : asmcomp/reg.cmx asmcomp/proc.cmx utils/misc.cmx \ -- asmcomp/mach.cmx asmcomp/linearize.cmx bytecomp/lambda.cmx \ -- asmcomp/emitaux.cmx asmcomp/debuginfo.cmx utils/config.cmx \ ++ asmcomp/compilenv.cmi asmcomp/cmm.cmi utils/clflags.cmi \ ++ asmcomp/branch_relaxation.cmi asmcomp/arch.cmo asmcomp/emit.cmi + asmcomp/emit.cmx : asmcomp/reg.cmx asmcomp/proc.cmx utils/misc.cmx \ + asmcomp/mach.cmx asmcomp/linearize.cmx bytecomp/lambda.cmx \ + asmcomp/emitaux.cmx asmcomp/debuginfo.cmx utils/config.cmx \ - asmcomp/compilenv.cmx asmcomp/cmm.cmx utils/clflags.cmx asmcomp/arch.cmx \ - asmcomp/emit.cmi - asmcomp/emitaux.cmo : asmcomp/linearize.cmi asmcomp/debuginfo.cmi \ - utils/config.cmi utils/clflags.cmi asmcomp/arch.cmo asmcomp/emitaux.cmi - asmcomp/emitaux.cmx : asmcomp/linearize.cmx asmcomp/debuginfo.cmx \ - utils/config.cmx utils/clflags.cmx asmcomp/arch.cmx asmcomp/emitaux.cmi -+asmcomp/emit.cmo : asmcomp/reg.cmi asmcomp/proc.cmi utils/misc.cmi \ -+ asmcomp/mach.cmi asmcomp/linearize.cmi bytecomp/lambda.cmi \ -+ asmcomp/emitaux.cmi utils/config.cmi asmcomp/compilenv.cmi \ -+ asmcomp/cmm.cmi utils/clflags.cmi asmcomp/branch_relaxation.cmi \ -+ asmcomp/arch.cmo asmcomp/emit.cmi -+asmcomp/emit.cmx : asmcomp/reg.cmx asmcomp/proc.cmx utils/misc.cmx \ -+ asmcomp/mach.cmx asmcomp/linearize.cmx bytecomp/lambda.cmx \ -+ asmcomp/emitaux.cmx utils/config.cmx asmcomp/compilenv.cmx \ -+ asmcomp/cmm.cmx utils/clflags.cmx asmcomp/branch_relaxation.cmx \ -+ asmcomp/arch.cmx asmcomp/emit.cmi +-asmcomp/emitaux.cmo : asmcomp/linearize.cmi asmcomp/debuginfo.cmi \ +- utils/config.cmi utils/clflags.cmi asmcomp/arch.cmo asmcomp/emitaux.cmi +-asmcomp/emitaux.cmx : asmcomp/linearize.cmx asmcomp/debuginfo.cmx \ +- utils/config.cmx utils/clflags.cmx asmcomp/arch.cmx asmcomp/emitaux.cmi ++ asmcomp/compilenv.cmx asmcomp/cmm.cmx utils/clflags.cmx \ ++ asmcomp/branch_relaxation.cmx asmcomp/arch.cmx asmcomp/emit.cmi asmcomp/interf.cmo : asmcomp/reg.cmi asmcomp/proc.cmi asmcomp/mach.cmi \ asmcomp/interf.cmi asmcomp/interf.cmx : asmcomp/reg.cmx asmcomp/proc.cmx asmcomp/mach.cmx \ -@@ -796,21 +806,19 @@ asmcomp/printmach.cmx : asmcomp/reg.cmx asmcomp/proc.cmx \ - asmcomp/debuginfo.cmx asmcomp/cmm.cmx asmcomp/arch.cmx \ - asmcomp/printmach.cmi - asmcomp/proc.cmo : asmcomp/reg.cmi utils/misc.cmi asmcomp/mach.cmi \ -- utils/config.cmi asmcomp/cmm.cmi utils/clflags.cmi utils/ccomp.cmi \ -- asmcomp/arch.cmo asmcomp/proc.cmi -+ utils/config.cmi asmcomp/cmm.cmi utils/ccomp.cmi asmcomp/arch.cmo \ -+ asmcomp/proc.cmi - asmcomp/proc.cmx : asmcomp/reg.cmx utils/misc.cmx asmcomp/mach.cmx \ -- utils/config.cmx asmcomp/cmm.cmx utils/clflags.cmx utils/ccomp.cmx \ -- asmcomp/arch.cmx asmcomp/proc.cmi -+ utils/config.cmx asmcomp/cmm.cmx utils/ccomp.cmx asmcomp/arch.cmx \ -+ asmcomp/proc.cmi +@@ -803,14 +813,14 @@ asmcomp/proc.cmx : asmcomp/reg.cmx utils/misc.cmx asmcomp/mach.cmx \ + asmcomp/arch.cmx asmcomp/proc.cmi asmcomp/reg.cmo : typing/ident.cmi asmcomp/cmm.cmi asmcomp/reg.cmi asmcomp/reg.cmx : typing/ident.cmx asmcomp/cmm.cmx asmcomp/reg.cmi --asmcomp/reload.cmo : asmcomp/reloadgen.cmi asmcomp/reg.cmi asmcomp/mach.cmi \ -- asmcomp/cmm.cmi utils/clflags.cmi asmcomp/arch.cmo asmcomp/reload.cmi --asmcomp/reload.cmx : asmcomp/reloadgen.cmx asmcomp/reg.cmx asmcomp/mach.cmx \ -- asmcomp/cmm.cmx utils/clflags.cmx asmcomp/arch.cmx asmcomp/reload.cmi - asmcomp/reloadgen.cmo : asmcomp/reg.cmi utils/misc.cmi asmcomp/mach.cmi \ - asmcomp/reloadgen.cmi - asmcomp/reloadgen.cmx : asmcomp/reg.cmx utils/misc.cmx asmcomp/mach.cmx \ - asmcomp/reloadgen.cmi -+asmcomp/reload.cmo : asmcomp/reloadgen.cmi asmcomp/reload.cmi -+asmcomp/reload.cmx : asmcomp/reloadgen.cmx asmcomp/reload.cmi ++asmcomp/reloadgen.cmo : asmcomp/reg.cmi utils/misc.cmi asmcomp/mach.cmi \ ++ asmcomp/reloadgen.cmi ++asmcomp/reloadgen.cmx : asmcomp/reg.cmx utils/misc.cmx asmcomp/mach.cmx \ ++ asmcomp/reloadgen.cmi + asmcomp/reload.cmo : asmcomp/reloadgen.cmi asmcomp/reg.cmi asmcomp/mach.cmi \ + asmcomp/cmm.cmi utils/clflags.cmi asmcomp/arch.cmo asmcomp/reload.cmi + asmcomp/reload.cmx : asmcomp/reloadgen.cmx asmcomp/reg.cmx asmcomp/mach.cmx \ + asmcomp/cmm.cmx utils/clflags.cmx asmcomp/arch.cmx asmcomp/reload.cmi +-asmcomp/reloadgen.cmo : asmcomp/reg.cmi utils/misc.cmi asmcomp/mach.cmi \ +- asmcomp/reloadgen.cmi +-asmcomp/reloadgen.cmx : asmcomp/reg.cmx utils/misc.cmx asmcomp/mach.cmx \ +- asmcomp/reloadgen.cmi asmcomp/schedgen.cmo : asmcomp/reg.cmi asmcomp/proc.cmi asmcomp/mach.cmi \ asmcomp/linearize.cmi asmcomp/cmm.cmi asmcomp/arch.cmo \ asmcomp/schedgen.cmi -@@ -827,11 +835,11 @@ asmcomp/selectgen.cmx : utils/tbl.cmx bytecomp/simplif.cmx asmcomp/reg.cmx \ - asmcomp/proc.cmx utils/misc.cmx asmcomp/mach.cmx bytecomp/lambda.cmx \ - typing/ident.cmx asmcomp/debuginfo.cmx asmcomp/cmm.cmx utils/clflags.cmx \ - asmcomp/arch.cmx asmcomp/selectgen.cmi --asmcomp/selection.cmo : asmcomp/selectgen.cmi asmcomp/proc.cmi \ -- asmcomp/mach.cmi asmcomp/cmm.cmi utils/clflags.cmi asmcomp/arch.cmo \ -+asmcomp/selection.cmo : asmcomp/selectgen.cmi asmcomp/mach.cmi \ -+ asmcomp/compilenv.cmi asmcomp/cmm.cmi utils/clflags.cmi asmcomp/arch.cmo \ - asmcomp/selection.cmi --asmcomp/selection.cmx : asmcomp/selectgen.cmx asmcomp/proc.cmx \ -- asmcomp/mach.cmx asmcomp/cmm.cmx utils/clflags.cmx asmcomp/arch.cmx \ -+asmcomp/selection.cmx : asmcomp/selectgen.cmx asmcomp/mach.cmx \ -+ asmcomp/compilenv.cmx asmcomp/cmm.cmx utils/clflags.cmx asmcomp/arch.cmx \ - asmcomp/selection.cmi - asmcomp/spill.cmo : asmcomp/reg.cmi asmcomp/proc.cmi utils/misc.cmi \ - asmcomp/mach.cmi asmcomp/spill.cmi -@@ -849,8 +857,8 @@ driver/compenv.cmi : +@@ -849,8 +859,8 @@ driver/compenv.cmi : driver/compile.cmi : driver/compmisc.cmi : typing/env.cmi driver/errors.cmi : @@ -346,7 +321,7 @@ index 5d95a9b..d18b769 100644 driver/optcompile.cmi : driver/opterrors.cmi : driver/optmain.cmi : -@@ -885,6 +893,8 @@ driver/compmisc.cmx : typing/typemod.cmx utils/misc.cmx \ +@@ -885,6 +895,8 @@ driver/compmisc.cmx : typing/typemod.cmx utils/misc.cmx \ parsing/asttypes.cmi driver/compmisc.cmi driver/errors.cmo : parsing/location.cmi driver/errors.cmi driver/errors.cmx : parsing/location.cmx driver/errors.cmi @@ -355,7 +330,7 @@ index 5d95a9b..d18b769 100644 driver/main.cmo : utils/warnings.cmi utils/misc.cmi driver/main_args.cmi \ parsing/location.cmi utils/config.cmi driver/compmisc.cmi \ driver/compile.cmi driver/compenv.cmi utils/clflags.cmi \ -@@ -895,8 +905,6 @@ driver/main.cmx : utils/warnings.cmx utils/misc.cmx driver/main_args.cmx \ +@@ -895,8 +907,6 @@ driver/main.cmx : utils/warnings.cmx utils/misc.cmx driver/main_args.cmx \ driver/compile.cmx driver/compenv.cmx utils/clflags.cmx \ bytecomp/bytepackager.cmx bytecomp/bytelink.cmx \ bytecomp/bytelibrarian.cmx driver/main.cmi @@ -377,6 +352,23 @@ index 6c0e7e6..7a20e2c 100644 asmcomp/emitaux.cmo asmcomp/emit.cmo asmcomp/asmgen.cmo \ asmcomp/asmlink.cmo asmcomp/asmlibrarian.cmo asmcomp/asmpackager.cmo \ driver/opterrors.cmo driver/optcompile.cmo +diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp +index b576ece..d56d0f5 100644 +--- a/asmcomp/amd64/emit.mlp ++++ b/asmcomp/amd64/emit.mlp +@@ -20,6 +20,12 @@ open Mach + open Linearize + open Emitaux + ++(* [Branch_relaxation] is not used in this file, but is required by ++ emit.mlp files for certain other targets; the reference here ensures ++ that when releases are being prepared the .depend files are correct ++ for all targets. *) ++open! Branch_relaxation ++ + let macosx = (Config.system = "macosx") + let mingw64 = (Config.system = "mingw64") + let cygwin = (Config.system = "cygwin") diff --git a/asmcomp/arm64/arch.ml b/asmcomp/arm64/arch.ml index bfbe183..3e62da8 100644 --- a/asmcomp/arm64/arch.ml @@ -418,7 +410,7 @@ index bfbe183..3e62da8 100644 fprintf ppf "(%a * %a) + %a" printreg arg.(0) diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp -index c5c30d4..3d7a297 100644 +index c5c30d4..8576eeb 100644 --- a/asmcomp/arm64/emit.mlp +++ b/asmcomp/arm64/emit.mlp @@ -231,6 +231,32 @@ let emit_intconst dst n = @@ -473,7 +465,7 @@ index c5c30d4..3d7a297 100644 + | Lop (Ispecific (Ishiftcheckbound _)) -> + let check_bound = + (* When not in debug mode, there is at most one check-bound point. *) -+ if not !Clflags.debug then min (check_bound + 1) 1 ++ if not !Clflags.debug then 1 + else check_bound + 1 + in + loop instr.next (call_gc, check_bound) @@ -713,7 +705,7 @@ index c5c30d4..3d7a297 100644 + let lbl = bound_error_label i.dbg in + let lbl2 = new_label () in + ` cmp {emit_reg i.arg.(0)}, {emit_reg i.arg.(1)}\n`; -+ ` b.ge {emit_label lbl2}\n`; ++ ` b.hi {emit_label lbl2}\n`; + ` b {emit_label lbl}\n`; + `{emit_label lbl2}:\n`; | Lop(Iintop_imm(Icheckbound, n)) -> @@ -724,7 +716,7 @@ index c5c30d4..3d7a297 100644 + let lbl = bound_error_label i.dbg in + let lbl2 = new_label () in + ` cmp {emit_reg i.arg.(0)}, #{emit_int bound}\n`; -+ ` b.ge {emit_label lbl2}\n`; ++ ` b.hi {emit_label lbl2}\n`; + ` b {emit_label lbl}\n`; + `{emit_label lbl2}:\n`; | Lop(Ispecific(Ishiftcheckbound shift)) -> @@ -735,7 +727,7 @@ index c5c30d4..3d7a297 100644 + let lbl = bound_error_label i.dbg in + let lbl2 = new_label () in + ` cmp {emit_reg i.arg.(1)}, {emit_reg i.arg.(0)}, lsr #{emit_int shift}\n`; -+ ` b.ge {emit_label lbl2}\n`; ++ ` b.lo {emit_label lbl2}\n`; + ` b {emit_label lbl}\n`; + `{emit_label lbl2}:\n`; | Lop(Iintop Imod) -> @@ -763,10 +755,10 @@ index c5c30d4..3d7a297 100644 ` .size {emit_symbol fundecl.fun_name}, .-{emit_symbol fundecl.fun_name}\n`; diff --git a/asmcomp/branch_relaxation.ml b/asmcomp/branch_relaxation.ml new file mode 100644 -index 0000000..8fd3891 +index 0000000..d4609e4 --- /dev/null +++ b/asmcomp/branch_relaxation.ml -@@ -0,0 +1,135 @@ +@@ -0,0 +1,138 @@ +(***********************************************************************) +(* *) +(* OCaml *) @@ -883,7 +875,10 @@ index 0000000..8fd3891 + instr.next <- cont.next; + fixup true pc instr + | _ -> -+ Misc.fatal_error "Unsupported instruction for branch relaxation" ++ (* Any other instruction has already been rejected in ++ [instr_overflows] above. ++ We can *never* get here. *) ++ assert false + in + fixup false 0 code + @@ -936,10 +931,10 @@ index 0000000..9d517b1 +end diff --git a/asmcomp/branch_relaxation_intf.ml b/asmcomp/branch_relaxation_intf.ml new file mode 100644 -index 0000000..fb721b2 +index 0000000..610d0d0 --- /dev/null +++ b/asmcomp/branch_relaxation_intf.ml -@@ -0,0 +1,53 @@ +@@ -0,0 +1,63 @@ +(***********************************************************************) +(* *) +(* OCaml *) @@ -973,7 +968,17 @@ index 0000000..fb721b2 + + (* Which variety of conditional branch may be produced by the emitter for a + given instruction description. For the moment we assume that only one -+ such variety per instruction description is needed. *) ++ such variety per instruction description is needed. ++ ++ N.B. The only instructions supported are the following: ++ - Lop (Ialloc _) ++ - Lop (Iintop Icheckbound) ++ - Lop (Iintop_imm (Icheckbound, _)) ++ - Lop (Ispecific _) ++ - Lcondbranch (_, _) ++ - Lcondbranch3 (_, _, _) ++ [classify_instr] is expected to return [None] when called on any ++ instruction not in this list. *) + val classify_instr : Linearize.instruction_desc -> t option + end + @@ -1210,5 +1215,5 @@ index 8e31b58..717ab12 100644 (* Emit the glue code to call the GC *) if !call_gc_label > 0 then begin -- -2.4.1 +2.3.1 diff --git a/ocaml.spec b/ocaml.spec index d0e5eec..79b0d65 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -17,7 +17,7 @@ Name: ocaml Version: 4.02.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: OCaml compiler and programming environment @@ -62,7 +62,7 @@ Patch0014: 0014-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch Patch0015: 0015-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch Patch0016: 0016-Fix-PR-6490-incorrect-backtraces-in-gdb-on-AArch64.-.patch Patch0017: 0017-ppc64le-Fix-calling-convention-of-external-functions.patch -Patch0018: 0018-aarch64-AArch64-backend-generates-invalid-asm-condit.patch +Patch0018: 0018-Fix-PR-6878-AArch64-conditional-branches-out-of-rang.patch # Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735). BuildRequires: binutils-devel @@ -424,6 +424,9 @@ fi %changelog +* Wed Jun 10 2015 Richard W.M. Jones - 4.02.1-7 +- aarch64: Use upstream version of patch that fixes RHBZ#1224815. + * Tue Jun 09 2015 Richard W.M. Jones - 4.02.1-6 - aarch64: AArch64 backend generates invalid asm: conditional branch out of range (RHBZ#1224815).