Blame SOURCES/0017-ppc64le-Fix-calling-convention-of-external-functions.patch

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