[ocaml/f17] - Modify the ppc64 patch to reduce the delta between power64 and upstream power backends. Note th

Richard W.M. Jones rjones at fedoraproject.org
Sun Jun 3 22:06:22 UTC 2012


commit a6bda98b36a2edd8ff71d56bd2656b42feb004af
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed May 30 12:46:08 2012 +0200

    - Modify the ppc64 patch to reduce the delta between power64 and
      upstream power backends.  Note there is no functional change.
    (cherry picked from commit f3cfaea67e0c750faf3bcd635a756c1a54329c29)

 ...fo-ocamlplugininfo-Useful-utilities-from-.patch |    4 +-
 ...-config.guess-and-config.sub-replacements.patch |    4 +-
 0003-Don-t-add-rpaths-to-libraries.patch           |    4 +-
 ...igure-Allow-user-defined-C-compiler-flags.patch |    4 +-
 ...-arm-add-.type-directive-for-code-symbols.patch |    4 +-
 0006-Add-support-for-ppc64.patch                   |   66 +++++++++-----------
 ...ackend-written-by-Benedikt-Meurer-PR-5433.patch |   10 ++--
 ocaml.spec                                         |    6 ++-
 8 files changed, 50 insertions(+), 52 deletions(-)
---
diff --git a/0001-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch b/0001-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch
index 8fa0e85..310f81c 100644
--- a/0001-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch
+++ b/0001-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch
@@ -9,7 +9,7 @@ http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git;a=tree;f=debian/ocam
 ---
  ocamlbyteinfo.ml   |  101 ++++++++++++++++++++++++++++++++++++++++++++++++
  ocamlplugininfo.ml |  109 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 210 insertions(+)
+ 2 files changed, 210 insertions(+), 0 deletions(-)
  create mode 100644 ocamlbyteinfo.ml
  create mode 100644 ocamlplugininfo.ml
 
@@ -236,5 +236,5 @@ index 0000000..e28800f
 +        header.units
 +    end
 -- 
-1.7.10
+1.7.7.6
 
diff --git a/0002-GNU-config.guess-and-config.sub-replacements.patch b/0002-GNU-config.guess-and-config.sub-replacements.patch
index 318422f..2d54028 100644
--- a/0002-GNU-config.guess-and-config.sub-replacements.patch
+++ b/0002-GNU-config.guess-and-config.sub-replacements.patch
@@ -7,7 +7,7 @@ The ones supplied by upstream OCaml are 8 years old.  These newer
 versions recognize arm properly.
 ---
  config/gnu/config.guess | 1037 +++++++++++++++++++++++++----------------------
- config/gnu/config.sub   |  424 ++++++++++++++-----
+ config/gnu/config.sub   |  424 +++++++++++++++-----
  2 files changed, 876 insertions(+), 585 deletions(-)
 
 diff --git a/config/gnu/config.guess b/config/gnu/config.guess
@@ -2579,5 +2579,5 @@ index d2e3557..e76eaf4 100755
  # Local variables:
  # eval: (add-hook 'write-file-hooks 'time-stamp)
 -- 
-1.7.10
+1.7.7.6
 
diff --git a/0003-Don-t-add-rpaths-to-libraries.patch b/0003-Don-t-add-rpaths-to-libraries.patch
index eedc190..7a94fb4 100644
--- a/0003-Don-t-add-rpaths-to-libraries.patch
+++ b/0003-Don-t-add-rpaths-to-libraries.patch
@@ -5,7 +5,7 @@ Subject: [PATCH 3/7] Don't add rpaths to libraries.
 
 ---
  tools/Makefile.shared |    3 ---
- 1 file changed, 3 deletions(-)
+ 1 files changed, 0 insertions(+), 3 deletions(-)
 
 diff --git a/tools/Makefile.shared b/tools/Makefile.shared
 index 247575a..05de46c 100644
@@ -22,5 +22,5 @@ index 247575a..05de46c 100644
  	  ocamlmklib.mlp >> ocamlmklib.ml
  
 -- 
-1.7.10
+1.7.7.6
 
diff --git a/0004-configure-Allow-user-defined-C-compiler-flags.patch b/0004-configure-Allow-user-defined-C-compiler-flags.patch
index c209644..63ec5ad 100644
--- a/0004-configure-Allow-user-defined-C-compiler-flags.patch
+++ b/0004-configure-Allow-user-defined-C-compiler-flags.patch
@@ -5,7 +5,7 @@ Subject: [PATCH 4/7] configure: Allow user defined C compiler flags.
 
 ---
  configure |    4 ++++
- 1 file changed, 4 insertions(+)
+ 1 files changed, 4 insertions(+), 0 deletions(-)
 
 diff --git a/configure b/configure
 index 9be5199..d0a6b0f 100755
@@ -23,5 +23,5 @@ index 9be5199..d0a6b0f 100755
  
  cclibs="$cclibs $mathlib"
 -- 
-1.7.10
+1.7.7.6
 
diff --git a/0005-ocamlopt-arm-add-.type-directive-for-code-symbols.patch b/0005-ocamlopt-arm-add-.type-directive-for-code-symbols.patch
index 3493142..2d42545 100644
--- a/0005-ocamlopt-arm-add-.type-directive-for-code-symbols.patch
+++ b/0005-ocamlopt-arm-add-.type-directive-for-code-symbols.patch
@@ -9,7 +9,7 @@ Signed-off-by: Stephane Glondu <steph at glondu.net>
 ---
  asmcomp/arm/emit.mlp |    1 +
  asmrun/arm.S         |   12 ++++++++++++
- 2 files changed, 13 insertions(+)
+ 2 files changed, 13 insertions(+), 0 deletions(-)
 
 diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp
 index 2003313..a4b2241 100644
@@ -124,5 +124,5 @@ index 164f731..1313e9c 100644
      /* Load address of [caml_array_bound_error] in r12 */
          ldr     r12, .Lcaml_array_bound_error
 -- 
-1.7.10
+1.7.7.6
 
diff --git a/0006-Add-support-for-ppc64.patch b/0006-Add-support-for-ppc64.patch
index f9b0dde..37173b6 100644
--- a/0006-Add-support-for-ppc64.patch
+++ b/0006-Add-support-for-ppc64.patch
@@ -1,4 +1,4 @@
-From a9648ff01cea44e6892663e97c3c388686b4fcd7 Mon Sep 17 00:00:00 2001
+From 07d6360922923ddfa2fe7ff745bed5da27f98e05 Mon Sep 17 00:00:00 2001
 From: "Richard W.M. Jones" <rjones at redhat.com>
 Date: Tue, 29 May 2012 20:47:07 +0100
 Subject: [PATCH 6/7] Add support for ppc64.
@@ -9,20 +9,20 @@ appropriate hardware for testing.
 Note (2): Upstream powerpc directory has some support for ppc64, but
 only for Macs, and I couldn't get it to work at all with IBM hardware.
 
-This patch was collaborated on by several people, most notably David
-Woodhouse.
+This patch was collaborated on by several people, most notably
+David Woodhouse.
 ---
- asmcomp/power64/arch.ml       |   84 ++++
+ asmcomp/power64/arch.ml       |   83 ++++
  asmcomp/power64/emit.mlp      |  989 +++++++++++++++++++++++++++++++++++++++++
- asmcomp/power64/proc.ml       |  245 ++++++++++
+ asmcomp/power64/proc.ml       |  241 ++++++++++
  asmcomp/power64/reload.ml     |   18 +
- asmcomp/power64/scheduling.ml |   66 +++
+ asmcomp/power64/scheduling.ml |   65 +++
  asmcomp/power64/selection.ml  |  103 +++++
  asmrun/Makefile               |    6 +
  asmrun/power64-elf.S          |  486 ++++++++++++++++++++
  asmrun/stack.h                |    9 +
  configure                     |    5 +-
- 10 files changed, 2010 insertions(+), 1 deletion(-)
+ 10 files changed, 2004 insertions(+), 1 deletions(-)
  create mode 100644 asmcomp/power64/arch.ml
  create mode 100644 asmcomp/power64/emit.mlp
  create mode 100644 asmcomp/power64/proc.ml
@@ -33,10 +33,10 @@ Woodhouse.
 
 diff --git a/asmcomp/power64/arch.ml b/asmcomp/power64/arch.ml
 new file mode 100644
-index 0000000..93b5b18
+index 0000000..55dd593
 --- /dev/null
 +++ b/asmcomp/power64/arch.ml
-@@ -0,0 +1,84 @@
+@@ -0,0 +1,83 @@
 +(***********************************************************************)
 +(*                                                                     *)
 +(*                           Objective Caml                            *)
@@ -49,7 +49,7 @@ index 0000000..93b5b18
 +(*                                                                     *)
 +(***********************************************************************)
 +
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: arch.ml 9547 2010-01-22 12:48:24Z doligez $ *)
 +
 +(* Specific operations for the PowerPC processor *)
 +
@@ -79,7 +79,7 @@ index 0000000..93b5b18
 +let big_endian = true
 +
 +let size_addr = 8
-+let size_int = 8
++let size_int = size_addr
 +let size_float = 8
 +
 +(* Operations on addressing modes *)
@@ -120,10 +120,9 @@ index 0000000..93b5b18
 +        printreg arg.(0) printreg arg.(1) printreg arg.(2)
 +  | Ialloc_far n ->
 +      fprintf ppf "alloc_far %d" n
-+
 diff --git a/asmcomp/power64/emit.mlp b/asmcomp/power64/emit.mlp
 new file mode 100644
-index 0000000..95eb193
+index 0000000..ba54e99
 --- /dev/null
 +++ b/asmcomp/power64/emit.mlp
 @@ -0,0 +1,989 @@
@@ -139,7 +138,7 @@ index 0000000..95eb193
 +(*                                                                     *)
 +(***********************************************************************)
 +
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: emit.mlp 9547 2010-01-22 12:48:24Z doligez $ *)
 +
 +(* Emission of PowerPC assembly code *)
 +
@@ -1118,10 +1117,10 @@ index 0000000..95eb193
 +  frame_descriptors := []
 diff --git a/asmcomp/power64/proc.ml b/asmcomp/power64/proc.ml
 new file mode 100644
-index 0000000..95bf6c4
+index 0000000..67f26ab
 --- /dev/null
 +++ b/asmcomp/power64/proc.ml
-@@ -0,0 +1,245 @@
+@@ -0,0 +1,241 @@
 +(***********************************************************************)
 +(*                                                                     *)
 +(*                           Objective Caml                            *)
@@ -1134,7 +1133,7 @@ index 0000000..95bf6c4
 +(*                                                                     *)
 +(***********************************************************************)
 +
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: proc.ml 9547 2010-01-22 12:48:24Z doligez $ *)
 +
 +(* Description of the Power PC *)
 +
@@ -1242,7 +1241,7 @@ index 0000000..95bf6c4
 +        end else begin
 +          loc.(i) <- stack_slot (make_stack !ofs) ty;
 +        end;
-+        ofs := !ofs + 8
++        ofs := !ofs + size_int
 +    | Float ->
 +        if !float <= last_float then begin
 +          loc.(i) <- phys_reg !float;
@@ -1250,7 +1249,7 @@ index 0000000..95bf6c4
 +        end else begin
 +          loc.(i) <- stack_slot (make_stack !ofs) Float;
 +        end;
-+        ofs := !ofs + 8
++        ofs := !ofs + size_float
 +  done;
 +  (loc, Misc.align !ofs 16)
 +  (* Keep stack 16-aligned. *)
@@ -1286,7 +1285,7 @@ index 0000000..95bf6c4
 +  let loc = Array.create (Array.length arg) Reg.dummy in
 +  let int = ref first_int in
 +  let float = ref first_float in
-+  let ofs = ref 112 in
++  let ofs = ref (14 * size_addr) in
 +  for i = 0 to Array.length arg - 1 do
 +    match arg.(i).typ with
 +      Int | Addr as ty ->
@@ -1358,18 +1357,14 @@ index 0000000..95bf6c4
 +(* Calling the assembler *)
 +
 +let assemble_file infile outfile =
-+  let infile = Filename.quote infile
-+  and outfile = Filename.quote outfile in
-+  match Config.system with
-+  | "elf" ->
-+      Ccomp.command ("as -u -m ppc64 -o " ^ outfile ^ " " ^ infile)
-+  | _ -> assert false
++  Ccomp.command (Config.asm ^ " -o " ^
++                 Filename.quote outfile ^ " " ^ Filename.quote infile)
 +
 +open Clflags;;
 +open Config;;
 diff --git a/asmcomp/power64/reload.ml b/asmcomp/power64/reload.ml
 new file mode 100644
-index 0000000..42d5d4d
+index 0000000..abcac6c
 --- /dev/null
 +++ b/asmcomp/power64/reload.ml
 @@ -0,0 +1,18 @@
@@ -1385,7 +1380,7 @@ index 0000000..42d5d4d
 +(*                                                                     *)
 +(***********************************************************************)
 +
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: reload.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
 +
 +(* Reloading for the PowerPC *)
 +
@@ -1393,10 +1388,10 @@ index 0000000..42d5d4d
 +  (new Reloadgen.reload_generic)#fundecl f
 diff --git a/asmcomp/power64/scheduling.ml b/asmcomp/power64/scheduling.ml
 new file mode 100644
-index 0000000..d73e333
+index 0000000..b7bba9b
 --- /dev/null
 +++ b/asmcomp/power64/scheduling.ml
-@@ -0,0 +1,66 @@
+@@ -0,0 +1,65 @@
 +(***********************************************************************)
 +(*                                                                     *)
 +(*                           Objective Caml                            *)
@@ -1409,7 +1404,7 @@ index 0000000..d73e333
 +(*                                                                     *)
 +(***********************************************************************)
 +
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: scheduling.ml 9547 2010-01-22 12:48:24Z doligez $ *)
 +
 +(* Instruction scheduling for the Power PC *)
 +
@@ -1462,10 +1457,9 @@ index 0000000..d73e333
 +end
 +
 +let fundecl f = (new scheduler)#schedule_fundecl f
-+
 diff --git a/asmcomp/power64/selection.ml b/asmcomp/power64/selection.ml
 new file mode 100644
-index 0000000..afc7649
+index 0000000..7b8e2a4
 --- /dev/null
 +++ b/asmcomp/power64/selection.ml
 @@ -0,0 +1,103 @@
@@ -1481,7 +1475,7 @@ index 0000000..afc7649
 +(*                                                                     *)
 +(***********************************************************************)
 +
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: selection.ml 10296 2010-04-22 12:51:06Z xleroy $ *)
 +
 +(* Instruction selection for the Power PC processor *)
 +
@@ -1534,7 +1528,7 @@ index 0000000..afc7649
 +      then (Iindexed2, Ctuple[e1; e2])
 +      else (Iindexed d, Cop(Cadda, [e1; e2]))
 +
-+method select_operation op args =
++method! select_operation op args =
 +  match (op, args) with
 +  (* Prevent the recognition of (x / cst) and (x % cst) when cst is not
 +     a power of 2, which do not correspond to an instruction. *)
@@ -2132,5 +2126,5 @@ index d0a6b0f..6ed0a9c 100755
                      aspp='gcc -c';;
    power,*,rhapsody) as="as -arch $model"
 -- 
-1.7.10
+1.7.7.6
 
diff --git a/0007-New-ARM-backend-written-by-Benedikt-Meurer-PR-5433.patch b/0007-New-ARM-backend-written-by-Benedikt-Meurer-PR-5433.patch
index 852579a..b826f11 100644
--- a/0007-New-ARM-backend-written-by-Benedikt-Meurer-PR-5433.patch
+++ b/0007-New-ARM-backend-written-by-Benedikt-Meurer-PR-5433.patch
@@ -1,4 +1,4 @@
-From 03318d9e7ef402f137dd100fe31bd01c37c1b94f Mon Sep 17 00:00:00 2001
+From 5017142a41b2ea9b81d41ff7d513847b9df7bae9 Mon Sep 17 00:00:00 2001
 From: "Richard W.M. Jones" <rjones at redhat.com>
 Date: Tue, 29 May 2012 20:50:42 +0100
 Subject: [PATCH 7/7] New ARM backend, written by Benedikt Meurer (PR#5433).
@@ -8,9 +8,9 @@ Backported from upstream sources to 3.12.1 by RWMJ.
  asmcomp/amd64/selection.ml   |   14 +-
  asmcomp/arm/arch.ml          |  152 +++++++-
  asmcomp/arm/emit.mlp         |  850 ++++++++++++++++++++++++++++--------------
- asmcomp/arm/proc.ml          |  185 ++++++---
+ asmcomp/arm/proc.ml          |  185 +++++++---
  asmcomp/arm/reload.ml        |    4 +-
- asmcomp/arm/scheduling.ml    |   80 ++--
+ asmcomp/arm/scheduling.ml    |   80 +++--
  asmcomp/arm/selection.ml     |  343 ++++++++++-------
  asmcomp/i386/selection.ml    |   14 +-
  asmcomp/power/selection.ml   |    2 +-
@@ -2291,7 +2291,7 @@ index ed15efb..0532d6b 100644
      (Asymbol s, d) ->
        (Ibased(s, d), Ctuple [])
 diff --git a/asmcomp/power64/selection.ml b/asmcomp/power64/selection.ml
-index afc7649..18b5318 100644
+index 7b8e2a4..d2325e1 100644
 --- a/asmcomp/power64/selection.ml
 +++ b/asmcomp/power64/selection.ml
 @@ -52,7 +52,7 @@ inherit Selectgen.selector_generic as super
@@ -3092,5 +3092,5 @@ index 6ed0a9c..4e07c92 100755
  esac
  
 -- 
-1.7.10
+1.7.7.6
 
diff --git a/ocaml.spec b/ocaml.spec
index 6dec677..bbf2669 100644
--- a/ocaml.spec
+++ b/ocaml.spec
@@ -2,7 +2,7 @@
 
 Name:           ocaml
 Version:        3.12.1
-Release:        6%{?dist}
+Release:        8%{?dist}
 
 Summary:        Objective Caml compiler and programming environment
 
@@ -504,6 +504,10 @@ fi
 
 
 %changelog
+* Wed May 29 2012 Richard W.M. Jones <rjones at redhat.com> 3.12.1-8
+- Modify the ppc64 patch to reduce the delta between power64 and
+  upstream power backends.  Note there is no functional change.
+
 * Tue May 29 2012 Richard W.M. Jones <rjones at redhat.com> 3.12.1-6
 - Move patches to external git repo:
   http://git.fedorahosted.org/git/?p=fedora-ocaml.git


More information about the scm-commits mailing list