Fix handling Float128 structs on ppc64le (#2045797)
This commit is contained in:
parent
53606fd875
commit
acfefabea4
26
libffi-3.4.2-ppc.patch
Normal file
26
libffi-3.4.2-ppc.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 83ce80f3194bbf95c39764d075b070389c0f8522 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||||
|
Date: Mon, 31 Jan 2022 09:21:53 +0000
|
||||||
|
Subject: [PATCH] powerpc64: fix handling of homogeneous float128 structs
|
||||||
|
|
||||||
|
If there is a homogeneous struct with float128 members, they should be
|
||||||
|
copied to vector register save area. The current code incorrectly copies
|
||||||
|
only the value of the first member, not increasing the pointer with each
|
||||||
|
iteration. Fix this.
|
||||||
|
---
|
||||||
|
src/powerpc/ffi_linux64.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c
|
||||||
|
index 4d50878e4..3454dacd3 100644
|
||||||
|
--- a/src/powerpc/ffi_linux64.c
|
||||||
|
+++ b/src/powerpc/ffi_linux64.c
|
||||||
|
@@ -680,7 +680,7 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
||||||
|
{
|
||||||
|
if (vecarg_count < NUM_VEC_ARG_REGISTERS64
|
||||||
|
&& i < nfixedargs)
|
||||||
|
- memcpy (vec_base.f128++, arg.f128, sizeof (float128));
|
||||||
|
+ memcpy (vec_base.f128++, arg.f128++, sizeof (float128));
|
||||||
|
else
|
||||||
|
memcpy (next_arg.f128, arg.f128++, sizeof (float128));
|
||||||
|
if (++next_arg.f128 == gpr_end.f128)
|
@ -13,6 +13,9 @@ Source0: https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.
|
|||||||
Source1: ffi-multilib.h
|
Source1: ffi-multilib.h
|
||||||
Source2: ffitarget-multilib.h
|
Source2: ffitarget-multilib.h
|
||||||
|
|
||||||
|
# https://github.com/libffi/libffi/pull/689
|
||||||
|
Patch0: libffi-3.4.2-ppc.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
@ -57,7 +60,7 @@ The %{name}-devel package contains libraries and header files for
|
|||||||
developing applications that use %{name}.
|
developing applications that use %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# For now we disable the static templates to avoid ghc and
|
# For now we disable the static templates to avoid ghc and
|
||||||
@ -113,6 +116,9 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
|
|||||||
%{_infodir}/libffi.info.*
|
%{_infodir}/libffi.info.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 31 2022 Dan Horák <dan[at]danny.cz> - 3.4.2-8
|
||||||
|
- Fix handling Float128 structs on ppc64le (#2045797)
|
||||||
|
|
||||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-7
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-7
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user