[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ocaml-team/ocaml][debian/sid] 3 commits: Import upstream patch to fix coq-elpi ppc64el failure



Title: GitLab

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:

Changes:

  • debian/changelog
    1
    +ocaml (5.2.0-3) unstable; urgency=medium
    
    2
    +
    
    3
    +  * Import upstream patch to fix coq-elpi ppc64el failure (Closes:
    
    4
    +    #1078549)
    
    5
    +
    
    6
    + -- Stéphane Glondu <glondu@debian.org>  Thu, 29 Aug 2024 18:03:23 +0200
    
    7
    +
    
    1 8
     ocaml (5.2.0-2) unstable; urgency=medium
    
    2 9
     
    
    3 10
       * Add ocaml-base to Build-Conflicts
    

  • debian/patches/0011-Don-t-use-r12-to-pass-size-to-caml_call_realloc_stac.patch
    1
    +From: Xavier Leroy <xavier.leroy@college-de-france.fr>
    
    2
    +Date: Thu, 29 Aug 2024 12:08:16 +0200
    
    3
    +Subject: Don't use r12 to pass size to caml_call_realloc_stack
    
    4
    +
    
    5
    +The temporary r12 can be destroyed by a PLT shim.
    
    6
    +Instead, use r27 (a non-temporary register, not used at OCaml function entry).
    
    7
    +
    
    8
    +Origin: https://github.com/ocaml/ocaml/pull/13410
    
    9
    +---
    
    10
    + asmcomp/power/emit.mlp | 3 ++-
    
    11
    + runtime/power.S        | 6 +++---
    
    12
    + 2 files changed, 5 insertions(+), 4 deletions(-)
    
    13
    +
    
    14
    +diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
    
    15
    +index 47f5419..70a6a0f 100644
    
    16
    +--- a/asmcomp/power/emit.mlp
    
    17
    ++++ b/asmcomp/power/emit.mlp
    
    18
    +@@ -996,8 +996,9 @@ let fundecl fundecl =
    
    19
    +   || max_frame_size >= stack_threshold_size then begin
    
    20
    +     let overflow = new_label () and ret = new_label () in
    
    21
    +     (* The return address is saved in a register not used for param passing *)
    
    22
    ++    (* The size is passed in a register normally not used for param passing *)
    
    23
    +     `{emit_label overflow}:	mflr	28\n`;
    
    24
    +-    `	li	12, {emit_int (Config.stack_threshold + max_frame_size / 8)}\n`;
    
    25
    ++    `	li	27, {emit_int (Config.stack_threshold + max_frame_size / 8)}\n`;
    
    26
    +     emit_call "caml_call_realloc_stack";
    
    27
    +     emit_call_nop ();
    
    28
    +     `	mtlr	28\n`;
    
    29
    +diff --git a/runtime/power.S b/runtime/power.S
    
    30
    +index bfb37fa..9e5b243 100644
    
    31
    +--- a/runtime/power.S
    
    32
    ++++ b/runtime/power.S
    
    33
    +@@ -358,16 +358,16 @@
    
    34
    + caml_system__code_begin:
    
    35
    + 
    
    36
    + /* Reallocate the stack when it is too small. */
    
    37
    +-/* Desired size is passed in register TMP2. */
    
    38
    ++/* Desired size is passed in register r27. */
    
    39
    + 
    
    40
    + FUNCTION caml_call_realloc_stack
    
    41
    +    /* Save return address in caller's frame. */
    
    42
    +         mflr    0
    
    43
    +         std     0, LR_SAVE(SP)
    
    44
    +    /* Save all registers, as well as ALLOC_PTR and TRAP_PTR */
    
    45
    +-        SAVE_ALL_REGS  /* TMP2 is preserved */
    
    46
    ++        SAVE_ALL_REGS  /* r27 is preserved */
    
    47
    +    /* Recover desired size, to be passed in r3 */
    
    48
    +-        mr      3, TMP2
    
    49
    ++        mr      3, 27
    
    50
    +    /* Switch stacks and call caml_try_realloc_stack */
    
    51
    +         SWITCH_OCAML_TO_C
    
    52
    +         Far_call(caml_try_realloc_stack)

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


  • Reply to: