Bug#951496: libffi: libffi 3.3 breaks OpenJDK Zero on powerpc
Control: tags -1 +patch
Hi!
On 2/17/20 2:08 PM, John Paul Adrian Glaubitz wrote:
> Once the issue has been fixed and this bug is closed, I will mark the package for
> building again on powerpc.
Upstream has fixed the problem now [1], attaching the patch. I have
not actually tested yet whether the patch fixes the problem.
Adrian
> [1] https://github.com/libffi/libffi/commit/4d6d2866ae43e55325e8ee96561221804602cd7a
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
>From 4d6d2866ae43e55325e8ee96561221804602cd7a Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Fri, 21 Feb 2020 21:06:15 -0600
Subject: [PATCH] Update powerpc sysv assembly for ffi_powerpc.h changes (#541)
Some of the flag bits were moved when adding powerpc64 vector support.
Fixes #536
---
src/powerpc/sysv.S | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/powerpc/sysv.S b/src/powerpc/sysv.S
index 1474ce70..df977342 100644
--- a/src/powerpc/sysv.S
+++ b/src/powerpc/sysv.S
@@ -104,17 +104,16 @@ ENTRY(ffi_call_SYSV)
bctrl
/* Now, deal with the return value. */
- mtcrf 0x01,%r31 /* cr7 */
+ mtcrf 0x03,%r31 /* cr6-cr7 */
bt- 31,L(small_struct_return_value)
bt- 30,L(done_return_value)
#ifndef __NO_FPRS__
bt- 29,L(fp_return_value)
#endif
stw %r3,0(%r30)
- bf+ 28,L(done_return_value)
+ bf+ 27,L(done_return_value)
stw %r4,4(%r30)
- mtcrf 0x02,%r31 /* cr6 */
- bf 27,L(done_return_value)
+ bf 26,L(done_return_value)
stw %r5,8(%r30)
stw %r6,12(%r30)
/* Fall through... */
@@ -145,10 +144,9 @@ L(done_return_value):
#ifndef __NO_FPRS__
L(fp_return_value):
.cfi_restore_state
- bf 28,L(float_return_value)
+ bf 27,L(float_return_value)
stfd %f1,0(%r30)
- mtcrf 0x02,%r31 /* cr6 */
- bf 27,L(done_return_value)
+ bf 26,L(done_return_value)
stfd %f2,8(%r30)
b L(done_return_value)
L(float_return_value):
Reply to: