[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, experimental/master, updated. debian/4.00.1-1-3-ga1d58f9

Stephane Glondu steph at glondu.net
Fri Jul 26 05:07:36 UTC 2013


The following commit has been merged in the experimental/master branch:
commit 35ffa87c754391dff98e491e059243afb3e8a0d8
Author: Stephane Glondu <steph at glondu.net>
Date:   Fri Jul 26 06:15:49 2013 +0200

    Fix (arm) code generation bug with mod 1

diff --git a/debian/patches/0009-Fix-code-generation-bug-with-mod-1.patch b/debian/patches/0009-Fix-code-generation-bug-with-mod-1.patch
new file mode 100644
index 0000000..171f87a
--- /dev/null
+++ b/debian/patches/0009-Fix-code-generation-bug-with-mod-1.patch
@@ -0,0 +1,25 @@
+From: Stephane Glondu <steph at glondu.net>
+Date: Fri, 26 Jul 2013 06:13:27 +0200
+Subject: Fix code generation bug with "mod 1"
+
+Backport of a patch from Benedikt Meurer. ocamlnet needs it.
+
+Bug: http://caml.inria.fr/mantis/view.php?id=5910
+---
+ asmcomp/arm/selection.ml |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/asmcomp/arm/selection.ml b/asmcomp/arm/selection.ml
+index ecda382..ef112ed 100644
+--- a/asmcomp/arm/selection.ml
++++ b/asmcomp/arm/selection.ml
+@@ -173,7 +173,7 @@ method! select_operation op args =
+   | (Cdivi, args) ->
+       (Iextcall("__aeabi_idiv", false), args)
+   | (Cmodi, [arg; Cconst_int n])
+-    when n = 1 lsl Misc.log2 n ->
++    when n > 1 && n = 1 lsl Misc.log2 n ->
+       (Iintop_imm(Imod, n), [arg])
+   | (Cmodi, args) ->
+       (* See above for fix up of return register *)
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index be80a2c..52ca655 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
 0006-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch
 0007-Avoid-multiple-declarations-in-generated-.c-files-in.patch
 0008-Embed-bytecode-in-C-object-when-using-custom.patch
+0009-Fix-code-generation-bug-with-mod-1.patch

-- 
OCaml packaging



More information about the Pkg-ocaml-maint-commits mailing list