Stéphane Glondu pushed to branch debian/sid at Debian OCaml Maintainers / ocaml


Commits:
668409f0 by Stéphane Glondu at 2024-08-29T16:00:55+02:00
Import upstream patch to fix coq-elpi ppc64el failure

- - - - -
27d7d11c by Stéphane Glondu at 2024-08-29T16:05:56+02:00
Update changelog

- - - - -
9dbc34d5 by Stéphane Glondu at 2024-08-29T18:03:58+02:00
Prepare upload to unstable

- - - - -


3 changed files:

- debian/changelog
- + 
debian/patches/0011-Don-t-use-r12-to-pass-size-to-caml_call_realloc_stac.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+ocaml (5.2.0-3) unstable; urgency=medium
+
+  * Import upstream patch to fix coq-elpi ppc64el failure (Closes:
+    #1078549)
+
+ -- Stéphane Glondu <[email protected]>  Thu, 29 Aug 2024 18:03:23 +0200
+
 ocaml (5.2.0-2) unstable; urgency=medium
 
   * Add ocaml-base to Build-Conflicts


=====================================
debian/patches/0011-Don-t-use-r12-to-pass-size-to-caml_call_realloc_stac.patch
=====================================
@@ -0,0 +1,52 @@
+From: Xavier Leroy <[email protected]>
+Date: Thu, 29 Aug 2024 12:08:16 +0200
+Subject: Don't use r12 to pass size to caml_call_realloc_stack
+
+The temporary r12 can be destroyed by a PLT shim.
+Instead, use r27 (a non-temporary register, not used at OCaml function entry).
+
+Origin: https://github.com/ocaml/ocaml/pull/13410
+---
+ asmcomp/power/emit.mlp | 3 ++-
+ runtime/power.S        | 6 +++---
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
+index 47f5419..70a6a0f 100644
+--- a/asmcomp/power/emit.mlp
++++ b/asmcomp/power/emit.mlp
+@@ -996,8 +996,9 @@ let fundecl fundecl =
+   || max_frame_size >= stack_threshold_size then begin
+     let overflow = new_label () and ret = new_label () in
+     (* The return address is saved in a register not used for param passing *)
++    (* The size is passed in a register normally not used for param passing *)
+     `{emit_label overflow}:   mflr    28\n`;
+-    ` li      12, {emit_int (Config.stack_threshold + max_frame_size / 8)}\n`;
++    ` li      27, {emit_int (Config.stack_threshold + max_frame_size / 8)}\n`;
+     emit_call "caml_call_realloc_stack";
+     emit_call_nop ();
+     ` mtlr    28\n`;
+diff --git a/runtime/power.S b/runtime/power.S
+index bfb37fa..9e5b243 100644
+--- a/runtime/power.S
++++ b/runtime/power.S
+@@ -358,16 +358,16 @@
+ caml_system__code_begin:
+ 
+ /* Reallocate the stack when it is too small. */
+-/* Desired size is passed in register TMP2. */
++/* Desired size is passed in register r27. */
+ 
+ FUNCTION caml_call_realloc_stack
+    /* Save return address in caller's frame. */
+         mflr    0
+         std     0, LR_SAVE(SP)
+    /* Save all registers, as well as ALLOC_PTR and TRAP_PTR */
+-        SAVE_ALL_REGS  /* TMP2 is preserved */
++        SAVE_ALL_REGS  /* r27 is preserved */
+    /* Recover desired size, to be passed in r3 */
+-        mr      3, TMP2
++        mr      3, 27
+    /* Switch stacks and call caml_try_realloc_stack */
+         SWITCH_OCAML_TO_C
+         Far_call(caml_try_realloc_stack)


=====================================
debian/patches/series
=====================================
@@ -8,3 +8,4 @@
 0008-Fix-call-to-test-in-configure.ac.patch
 0009-Rework-fixed-register-assignments-on-m68k.patch
 0010-Avoid-atomic-64-bit-load-on-Debian-armel.patch
+0011-Don-t-use-r12-to-pass-size-to-caml_call_realloc_stac.patch



View it on GitLab: 
https://salsa.debian.org/ocaml-team/ocaml/-/compare/4a5a9ca5a7313f3786b8db415d59a5f17c805e8c...9dbc34d5a6ace5161dc34dc76ca7cbf42acf1cc2

-- 
View it on GitLab: 
https://salsa.debian.org/ocaml-team/ocaml/-/compare/4a5a9ca5a7313f3786b8db415d59a5f17c805e8c...9dbc34d5a6ace5161dc34dc76ca7cbf42acf1cc2
You're receiving this email because of your account on salsa.debian.org.


Reply via email to