From 50b945d8c5e66d963815207a1cc8158f8b60e0e2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 28 May 2015 16:13:40 -0400 Subject: [PATCH 17/18] 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 9b98577..30d4cdc 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