MSYS2-packages/libffi/libffi-3.4.7-Revert-Fix-x86-ffi64-calls-with-6-gp-and-some-sse-re.patch
2025-02-13 20:22:20 +01:00

39 lines
1.1 KiB
Diff

From 4354fe1434a37b781ff19f5a6be51ec4e982ad5a Mon Sep 17 00:00:00 2001
Message-ID: <4354fe1434a37b781ff19f5a6be51ec4e982ad5a.1739062746.git.sam@gentoo.org>
From: Sam James <sam@gentoo.org>
Date: Sun, 9 Feb 2025 00:54:28 +0000
Subject: [PATCH] Revert "Fix x86/ffi64 calls with 6 gp and some sse registers
(#848)"
This reverts commit d21881f55ed4a44d464c9091871e69b0bb47611a.
Bug: https://github.com/libffi/libffi/issues/879
Bug: https://bugs.gentoo.org/949051
Signed-off-by: Sam James <sam@gentoo.org>
--- a/src/x86/ffi64.c
+++ b/src/x86/ffi64.c
@@ -654,7 +654,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
break;
default:
reg_args->gpr[gprcount] = 0;
- memcpy (&reg_args->gpr[gprcount], a, sizeof(UINT64));
+ memcpy (&reg_args->gpr[gprcount], a, size);
}
gprcount++;
break;
--- a/testsuite/libffi.call/struct_int_float.c
+++ b/testsuite/libffi.call/struct_int_float.c
@@ -5,6 +5,7 @@
Originator: kellda */
/* { dg-do run } */
+/* { dg-skip-if "libffi bug #879" { *-*-* } { "*" } } */
#include "ffitest.h"
typedef struct
base-commit: 1716f81e9a115d340429504563bc8e7fb2eeef2b
--
2.48.1