void-packages/srcpkgs/libffi/patches/libffi-pr401.patch
Jürgen Buchmüller a369f4e48d
libffi: import (some) Debian patches
The Debian team has some patches which we were missing.
This set does not address the ppc64* failing tests, though.
I did not include patches for alpha or riscv becase we
do not (yet) support these target architectures.

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-05-08 15:33:50 +02:00

33 lines
992 B
Diff

Description: fixes issue with aarch64
Author: Anthony Green <green@moxielogic.com>
Origin: libffi_3.2.1-9.debian.tar.xz
https://github.com/libffi/libffi/pull/401
--- src/mips/ffi.c
+++ src/mips/ffi.c
@@ -715,7 +715,11 @@ ffi_prep_closure_loc (ffi_closure *closure,
/* lui $12,high(codeloc) */
tramp[2] = 0x3c0c0000 | ((unsigned)codeloc >> 16);
/* jr $25 */
+#if !defined(__mips_isa_rev) || (__mips_isa_rev<6)
tramp[3] = 0x03200008;
+#else
+ tramp[3] = 0x03200009;
+#endif
/* ori $12,low(codeloc) */
tramp[4] = 0x358c0000 | ((unsigned)codeloc & 0xffff);
#else
@@ -743,7 +747,11 @@ ffi_prep_closure_loc (ffi_closure *closure,
/* ori $25,low(fn) */
tramp[10] = 0x37390000 | ((unsigned long)fn & 0xffff);
/* jr $25 */
+#if !defined(__mips_isa_rev) || (__mips_isa_rev<6)
tramp[11] = 0x03200008;
+#else
+ tramp[11] = 0x03200009;
+#endif
/* ori $12,low(codeloc) */
tramp[12] = 0x358c0000 | ((unsigned long)codeloc & 0xffff);