aarch64: AArch64 backend generates invalid asm: conditional branch out of range (RHBZ#1224815).

This commit is contained in:
Richard W.M. Jones 2015-06-09 12:32:25 +01:00
parent 0697d20197
commit 5b5668433a
19 changed files with 1254 additions and 35 deletions

View File

@ -1,7 +1,7 @@
From 607ae33eed09f9eafccda1276626e9c509dcbed1 Mon Sep 17 00:00:00 2001 From 607ae33eed09f9eafccda1276626e9c509dcbed1 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 24 Jun 2014 22:29:38 +0100 Date: Tue, 24 Jun 2014 22:29:38 +0100
Subject: [PATCH 01/17] Don't ignore ./configure, it's a real git file. Subject: [PATCH 01/18] Don't ignore ./configure, it's a real git file.
--- ---
.gitignore | 1 - .gitignore | 1 -
@ -20,5 +20,5 @@ index 6c66ecc..5d4b626 100644
/ocamlc.opt /ocamlc.opt
/expunge /expunge
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 89f29afc4aaa324585aa010289a4a58416d53700 Mon Sep 17 00:00:00 2001 From 89f29afc4aaa324585aa010289a4a58416d53700 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 7 Jun 2012 15:36:16 +0100 Date: Thu, 7 Jun 2012 15:36:16 +0100
Subject: [PATCH 02/17] Ensure empty compilerlibs/ directory is created by git. Subject: [PATCH 02/18] Ensure empty compilerlibs/ directory is created by git.
This directory exists in the OCaml tarball, but is empty. As a This directory exists in the OCaml tarball, but is empty. As a
result, git ignores it unless we put a dummy file in it. result, git ignores it unless we put a dummy file in it.
@ -14,5 +14,5 @@ diff --git a/compilerlibs/.exists b/compilerlibs/.exists
new file mode 100644 new file mode 100644
index 0000000..e69de29 index 0000000..e69de29
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 10209519de242952ebdef608ab5f2f51a6c9e2b3 Mon Sep 17 00:00:00 2001 From 10209519de242952ebdef608ab5f2f51a6c9e2b3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 24 Jun 2014 10:00:15 +0100 Date: Tue, 24 Jun 2014 10:00:15 +0100
Subject: [PATCH 03/17] Don't add rpaths to libraries. Subject: [PATCH 03/18] Don't add rpaths to libraries.
--- ---
tools/Makefile.shared | 6 +++--- tools/Makefile.shared | 6 +++---
@ -25,5 +25,5 @@ index 2517434..75a75b4 100644
sed -n -e 's/^#ml //p' ../config/Makefile) \ sed -n -e 's/^#ml //p' ../config/Makefile) \
> ocamlmklibconfig.ml > ocamlmklibconfig.ml
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From b360841d9b1eae64201d1ee7a1ff6dc5a5b0fa87 Mon Sep 17 00:00:00 2001 From b360841d9b1eae64201d1ee7a1ff6dc5a5b0fa87 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:40:36 +0100 Date: Tue, 29 May 2012 20:40:36 +0100
Subject: [PATCH 04/17] ocamlbyteinfo, ocamlplugininfo: Useful utilities from Subject: [PATCH 04/18] ocamlbyteinfo, ocamlplugininfo: Useful utilities from
Debian, sent upstream. Debian, sent upstream.
See: See:
@ -236,5 +236,5 @@ index 0000000..e28800f
+ header.units + header.units
+ end + end
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 6193266853d3667f18048989ebaaa0cbcb74afb5 Mon Sep 17 00:00:00 2001 From 6193266853d3667f18048989ebaaa0cbcb74afb5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:44:18 +0100 Date: Tue, 29 May 2012 20:44:18 +0100
Subject: [PATCH 05/17] configure: Allow user defined C compiler flags. Subject: [PATCH 05/18] configure: Allow user defined C compiler flags.
--- ---
configure | 4 ++++ configure | 4 ++++
@ -23,5 +23,5 @@ index 3edb9fd..18b95cd 100755
cclibs="$cclibs $mathlib" cclibs="$cclibs $mathlib"
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 5022b33b094d5a88c5c372b0873d81023f0d7bb4 Mon Sep 17 00:00:00 2001 From 5022b33b094d5a88c5c372b0873d81023f0d7bb4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:47:07 +0100 Date: Tue, 29 May 2012 20:47:07 +0100
Subject: [PATCH 06/17] Add support for ppc64. Subject: [PATCH 06/18] Add support for ppc64.
Note (1): This patch was rejected upstream because they don't have Note (1): This patch was rejected upstream because they don't have
appropriate hardware for testing. appropriate hardware for testing.
@ -2126,5 +2126,5 @@ index 18b95cd..57c8699 100755
aspp="$bytecc -c";; aspp="$bytecc -c";;
sparc,solaris) as="${TOOLPREF}as" sparc,solaris) as="${TOOLPREF}as"
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 834644b81c536fc81022a0a13f860fb33e3d78d2 Mon Sep 17 00:00:00 2001 From 834644b81c536fc81022a0a13f860fb33e3d78d2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Oct 2014 12:59:23 +0200 Date: Fri, 24 Oct 2014 12:59:23 +0200
Subject: [PATCH 07/17] ppc64: Update for OCaml 4.02.0. Subject: [PATCH 07/18] ppc64: Update for OCaml 4.02.0.
These are based on the power (ppc32) branch and some guesswork. These are based on the power (ppc32) branch and some guesswork.
In particular, I'm not convinced that my changes to floating In particular, I'm not convinced that my changes to floating
@ -201,5 +201,5 @@ index b7bba9b..b582b6a 100644
| Iintop(Imod) -> 40 (* assuming full stall *) | Iintop(Imod) -> 40 (* assuming full stall *)
| Iintop(Icomp _) -> 4 | Iintop(Icomp _) -> 4
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From c89bde7d3563e2c7bb725272334fabf53044bd9c Mon Sep 17 00:00:00 2001 From c89bde7d3563e2c7bb725272334fabf53044bd9c Mon Sep 17 00:00:00 2001
From: Michel Normand <normand@linux.vnet.ibm.com> From: Michel Normand <normand@linux.vnet.ibm.com>
Date: Tue, 18 Mar 2014 09:15:47 -0400 Date: Tue, 18 Mar 2014 09:15:47 -0400
Subject: [PATCH 08/17] Add support for ppc64le. Subject: [PATCH 08/18] Add support for ppc64le.
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com> Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
--- ---
@ -1913,5 +1913,5 @@ index 57c8699..c04272c 100755
aspp="$bytecc -c";; aspp="$bytecc -c";;
sparc,solaris) as="${TOOLPREF}as" sparc,solaris) as="${TOOLPREF}as"
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 8d86aba4983a254f36f2f1758079b3099ba5fc07 Mon Sep 17 00:00:00 2001 From 8d86aba4983a254f36f2f1758079b3099ba5fc07 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Oct 2014 12:59:23 +0200 Date: Fri, 24 Oct 2014 12:59:23 +0200
Subject: [PATCH 09/17] ppc64le: Update for OCaml 4.02.0. Subject: [PATCH 09/18] ppc64le: Update for OCaml 4.02.0.
These are based on the power (ppc32) branch and some guesswork. In These are based on the power (ppc32) branch and some guesswork. In
particular, I'm not convinced that my changes to floating point particular, I'm not convinced that my changes to floating point
@ -200,5 +200,5 @@ index b7bba9b..b582b6a 100644
| Iintop(Imod) -> 40 (* assuming full stall *) | Iintop(Imod) -> 40 (* assuming full stall *)
| Iintop(Icomp _) -> 4 | Iintop(Icomp _) -> 4
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 4d08d0e8511e247a96440693b73773c72b04fee2 Mon Sep 17 00:00:00 2001 From 4d08d0e8511e247a96440693b73773c72b04fee2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 10 May 2014 03:20:35 -0400 Date: Sat, 10 May 2014 03:20:35 -0400
Subject: [PATCH 10/17] arm, arm64: Mark stack as non-executable. Subject: [PATCH 10/18] arm, arm64: Mark stack as non-executable.
The same fix as this one, which was only fully applied to The same fix as this one, which was only fully applied to
i686 & x86-64: i686 & x86-64:
@ -35,5 +35,5 @@ index 9b4b9ab..c23168b 100644
+ /* Mark stack as non-executable, PR#4564 */ + /* Mark stack as non-executable, PR#4564 */
+ .section .note.GNU-stack,"",%progbits + .section .note.GNU-stack,"",%progbits
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 8ee89eee0500d17ffb91aa2febdeb6792ac53f27 Mon Sep 17 00:00:00 2001 From 8ee89eee0500d17ffb91aa2febdeb6792ac53f27 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 1 Apr 2014 11:17:07 +0100 Date: Tue, 1 Apr 2014 11:17:07 +0100
Subject: [PATCH 11/17] arg: Add no_arg and get_arg helper functions. Subject: [PATCH 11/18] arg: Add no_arg and get_arg helper functions.
The no_arg function in this patch is a no-op. It will do something The no_arg function in this patch is a no-op. It will do something
useful in the followups. useful in the followups.
@ -114,5 +114,5 @@ index d7b8ac0..a8f3964 100644
treat_action action treat_action action
with Bad m -> stop (Message m); with Bad m -> stop (Message m);
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 350eab7918f0adf385e01411ae6fed3e0579145f Mon Sep 17 00:00:00 2001 From 350eab7918f0adf385e01411ae6fed3e0579145f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 1 Apr 2014 11:21:40 +0100 Date: Tue, 1 Apr 2014 11:21:40 +0100
Subject: [PATCH 12/17] arg: Allow flags such as --flag=arg as well as --flag Subject: [PATCH 12/18] arg: Allow flags such as --flag=arg as well as --flag
arg. arg.
Allow flags to be followed directly by their argument, separated by an '=' Allow flags to be followed directly by their argument, separated by an '='
@ -80,5 +80,5 @@ index 0999edf..71af638 100644
Examples ([cmd] is assumed to be the command name): Examples ([cmd] is assumed to be the command name):
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 4072cbf56bba989f87783f285952d7227ba5898d Mon Sep 17 00:00:00 2001 From 4072cbf56bba989f87783f285952d7227ba5898d Mon Sep 17 00:00:00 2001
From: Xavier Leroy <xavier.leroy@inria.fr> From: Xavier Leroy <xavier.leroy@inria.fr>
Date: Wed, 27 Aug 2014 09:58:33 +0000 Date: Wed, 27 Aug 2014 09:58:33 +0000
Subject: [PATCH 13/17] PR#6517: use ISO C99 types {,u}int{32,64}_t in Subject: [PATCH 13/18] PR#6517: use ISO C99 types {,u}int{32,64}_t in
preference to our homegrown types {,u}int{32,64}. preference to our homegrown types {,u}int{32,64}.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
@ -1959,5 +1959,5 @@ index cb3d995..93cdfeb 100644
lseek(fd, (long) -TRAILER_SIZE, SEEK_END); lseek(fd, (long) -TRAILER_SIZE, SEEK_END);
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 8e493f90181b8b592185b2f9322575113b5ff7d5 Mon Sep 17 00:00:00 2001 From 8e493f90181b8b592185b2f9322575113b5ff7d5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 11 Sep 2014 14:49:54 +0100 Date: Thu, 11 Sep 2014 14:49:54 +0100
Subject: [PATCH 14/17] ppc, ppc64, ppc64le: Mark stack as non-executable. Subject: [PATCH 14/18] ppc, ppc64, ppc64le: Mark stack as non-executable.
The same fix as this one, which was only fully applied to The same fix as this one, which was only fully applied to
i686 & x86-64: i686 & x86-64:
@ -70,5 +70,5 @@ index 98c42e2..b7bfce4 100644
+/* Mark stack as non-executable, PR#4564 */ +/* Mark stack as non-executable, PR#4564 */
+ .section .note.GNU-stack,"",%progbits + .section .note.GNU-stack,"",%progbits
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From df5201a35d02a13ad7ffd6fb38252851910cae43 Mon Sep 17 00:00:00 2001 From df5201a35d02a13ad7ffd6fb38252851910cae43 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Oct 2014 10:10:54 +0100 Date: Fri, 24 Oct 2014 10:10:54 +0100
Subject: [PATCH 15/17] ppc64/ppc64le: proc: Interim definitions for op_is_pure Subject: [PATCH 15/18] ppc64/ppc64le: proc: Interim definitions for op_is_pure
and regs_are_volatile. and regs_are_volatile.
See: https://bugzilla.redhat.com/show_bug.cgi?id=1156300 See: https://bugzilla.redhat.com/show_bug.cgi?id=1156300
@ -80,5 +80,5 @@ index 476c984..56473ac 100644
let num_stack_slots = [| 0; 0 |] let num_stack_slots = [| 0; 0 |]
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From d3ca0ccc0eccfecd4aa922decf99ca7d67d40fa7 Mon Sep 17 00:00:00 2001 From d3ca0ccc0eccfecd4aa922decf99ca7d67d40fa7 Mon Sep 17 00:00:00 2001
From: Mark Shinwell <mshinwell@janestreet.com> From: Mark Shinwell <mshinwell@janestreet.com>
Date: Wed, 6 May 2015 17:37:43 +0000 Date: Wed, 6 May 2015 17:37:43 +0000
Subject: [PATCH 16/17] Fix PR#6490: incorrect backtraces in gdb on AArch64. Subject: [PATCH 16/18] Fix PR#6490: incorrect backtraces in gdb on AArch64.
(Also fixes the same problem for 32-bit ARM.) (Also fixes the same problem for 32-bit ARM.)
git-svn-id: http://caml.inria.fr/svn/ocaml/version/4.02@16091 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 git-svn-id: http://caml.inria.fr/svn/ocaml/version/4.02@16091 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
@ -75,5 +75,5 @@ index 486a583..e943da3 100644
val cfi_adjust_cfa_offset : int -> unit val cfi_adjust_cfa_offset : int -> unit
+val cfi_offset : reg:int -> offset:int -> unit +val cfi_offset : reg:int -> offset:int -> unit
-- --
2.3.1 2.4.1

View File

@ -1,7 +1,7 @@
From 5b7d4c5d1407115c2c685987be2669a9b0aafa78 Mon Sep 17 00:00:00 2001 From 5b7d4c5d1407115c2c685987be2669a9b0aafa78 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 28 May 2015 16:13:40 -0400 Date: Thu, 28 May 2015 16:13:40 -0400
Subject: [PATCH 17/17] ppc64le: Fix calling convention of external functions Subject: [PATCH 17/18] ppc64le: Fix calling convention of external functions
with > 8 parameters (RHBZ#1225995). with > 8 parameters (RHBZ#1225995).
For external (ie. C) functions with more than 8 parameters, we must For external (ie. C) functions with more than 8 parameters, we must
@ -30,5 +30,5 @@ index 56473ac..c705695 100644
let extcall_use_push = false let extcall_use_push = false
-- --
2.3.1 2.4.1

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@
Name: ocaml Name: ocaml
Version: 4.02.1 Version: 4.02.1
Release: 5%{?dist} Release: 6%{?dist}
Summary: OCaml compiler and programming environment Summary: OCaml compiler and programming environment
@ -62,6 +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 Patch0015: 0015-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch
Patch0016: 0016-Fix-PR-6490-incorrect-backtraces-in-gdb-on-AArch64.-.patch Patch0016: 0016-Fix-PR-6490-incorrect-backtraces-in-gdb-on-AArch64.-.patch
Patch0017: 0017-ppc64le-Fix-calling-convention-of-external-functions.patch Patch0017: 0017-ppc64le-Fix-calling-convention-of-external-functions.patch
Patch0018: 0018-aarch64-AArch64-backend-generates-invalid-asm-condit.patch
# Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735). # Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735).
BuildRequires: binutils-devel BuildRequires: binutils-devel
@ -423,6 +424,10 @@ fi
%changelog %changelog
* Tue Jun 09 2015 Richard W.M. Jones <rjones@redhat.com> - 4.02.1-6
- aarch64: AArch64 backend generates invalid asm: conditional branch
out of range (RHBZ#1224815).
* Thu May 28 2015 Richard W.M. Jones <rjones@redhat.com> - 4.02.1-5 * Thu May 28 2015 Richard W.M. Jones <rjones@redhat.com> - 4.02.1-5
- ppc64le: Fix calling convention of external functions with > 8 parameters - ppc64le: Fix calling convention of external functions with > 8 parameters
(RHBZ#1225995). (RHBZ#1225995).