ocaml/0016-ppc64le-Fix-calling-convention-of-external-functions.patch
Richard W.M. Jones c5cb967506 New upstream version: 4.02.2+rc1.
- Dropped two aarch64 patches which are now included upstream.
- Includes libasmrun_shared.so (RHBZ#1195025).
2015-06-16 14:00:05 +01:00

35 lines
1.2 KiB
Diff

From c1ebccc0e1250d3efc303819b383f713132e66f8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 28 May 2015 16:13:40 -0400
Subject: [PATCH 16/16] ppc64le: Fix calling convention of external functions
with > 8 parameters (RHBZ#1225995).
For external (ie. C) functions with more than 8 parameters, we must
pass the first 8 parameters in registers and then all the remaining
parameters on the stack.
Unfortunately the original backend copied the stack offset from ppc64,
where it works, but the offset was wrong for ppc64le.
By experimentation I found the correct offset.
---
asmcomp/power64le/proc.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/asmcomp/power64le/proc.ml b/asmcomp/power64le/proc.ml
index 56473ac..c705695 100644
--- a/asmcomp/power64le/proc.ml
+++ b/asmcomp/power64le/proc.ml
@@ -188,7 +188,7 @@ let poweropen_external_conventions first_int last_int
let loc_external_arguments =
match Config.system with
| "rhapsody" -> poweropen_external_conventions 0 7 100 112
- | "elf" | "bsd" -> calling_conventions 0 7 100 107 outgoing 48
+ | "elf" | "bsd" -> calling_conventions 0 7 100 107 outgoing 32
| _ -> assert false
let extcall_use_push = false
--
2.3.1