platform/upstream/libffi.git
3 months agoAdd packaging with v3.4.7 tizen_base_dev
Dongkyun Son [Wed, 19 Feb 2025 02:33:51 +0000 (11:33 +0900)]
Add packaging with v3.4.7

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
4 months agofeat: remove nios2 support upstream/3.4.7
Anthony Green [Sat, 8 Feb 2025 16:32:05 +0000 (11:32 -0500)]
feat: remove nios2 support

Acked-by: Anthony Green <green@moxielogic.com>
4 months agochore: Bump version to 3.4.7 and update change log
Anthony Green [Sat, 8 Feb 2025 14:37:31 +0000 (09:37 -0500)]
chore: Bump version to 3.4.7 and update change log

4 months agoEmscripten: remove support for `-sWASM_BIGINT=0` (#874)
Kleis Auke Wolthuizen [Fri, 31 Jan 2025 20:41:56 +0000 (21:41 +0100)]
Emscripten: remove support for `-sWASM_BIGINT=0` (#874)

* Emscripten: cleanup

* Emscripten: remove support for `-sWASM_BIGINT=0`

* Emscripten: remove redundant CircleCI config

* Emscripten: modernize CI

* Ensure test helper methods are static

Similar to #644.

* Fix test failures in `cls_multi_{s,u}shortchar`

4 months agox86 Darwin returns structs of size 1, 2, 4, and 8 in registers (#876)
Matthew Flatt [Fri, 31 Jan 2025 20:40:40 +0000 (13:40 -0700)]
x86 Darwin returns structs of size 1, 2, 4, and 8 in registers (#876)

4 months agoDisable go closures on Android (#877)
zye2-sc [Fri, 31 Jan 2025 20:40:00 +0000 (21:40 +0100)]
Disable go closures on Android (#877)

* x18 register shouldn't be used on Android due to the shadow call stack feature in llvm
* https://source.android.com/docs/security/test/shadow-call-stack

5 months agoFix config.sub on Apple platforms (#860)
杨萧玉 [Fri, 13 Dec 2024 10:38:01 +0000 (18:38 +0800)]
Fix config.sub on Apple platforms (#860)

* update config.sub

* update config.sub

5 months agoAdd mold linker to linker checks. (#866)
Satadru Pramanik, DO, MPH, MEng [Fri, 13 Dec 2024 10:37:15 +0000 (05:37 -0500)]
Add mold linker to linker checks. (#866)

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
5 months agoMIPS: add .note.GNU-stack section to assembly sources (#872)
Icenowy Zheng [Fri, 13 Dec 2024 10:36:02 +0000 (18:36 +0800)]
MIPS: add .note.GNU-stack section to assembly sources (#872)

To build ELF shared libraries that do not require executable stack on
MIPS, every object file linked should have a .note.GNU-stack section,
otherwise the linker defaults to executable stack.

As libffi shouldn't require executable stack, add the .note.GNU-stack
section to the assembly source files under src/mips, like other
architectures.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
6 months agoAdd static trampoline support for s390 (#862)
Eddy S. [Sat, 16 Nov 2024 12:03:24 +0000 (13:03 +0100)]
Add static trampoline support for s390 (#862)

* added static trampoline support for s390

* enable static tramp only for  s390x 64bit

7 months agoFix testsuite for C23 `va_start` (#861)
Joseph Myers [Thu, 24 Oct 2024 18:26:58 +0000 (18:26 +0000)]
Fix testsuite for C23 `va_start` (#861)

In the C23 revision of the C standard, `va_start` ignores its second
argument, which is no longer required (previously the last named
function parameter - which the compiler knows anyway, so it's
redundant information).

This has the consequence for the libffi testsuite, when making GCC
default to `-std=gnu23`, of making two tests fail with warnings about
an unused function argument (only passed to `va_start` and not
otherwise used).  Fix those test failures by explicitly casting the
argument to `void`.

8 months agoMove cfi_startproc after CNAME(label) (#857)
Ivan Tadeu Ferreira Antunes Filho [Fri, 20 Sep 2024 10:01:23 +0000 (06:01 -0400)]
Move cfi_startproc after CNAME(label) (#857)

This is a fix for https://github.com/libffi/libffi/issues/852: error: invalid CFI advance_loc expression on apple targets.

The CFI for darwin arm64 was broken because the CNAME macro was being used after the
cfi_startproc macro.

8 months agoDisable ASAN in ffi_call_int functions (#858)
KJ Tsanaktsidis [Fri, 20 Sep 2024 10:00:49 +0000 (20:00 +1000)]
Disable ASAN in ffi_call_int functions (#858)

The pattern for several of the architectures is for ffi_call_int to
stack-allocate some arguments + the registers, and then
ffi_call_$ARCH will pop the top of that structure into registers, and
then adjust the stack pointer such that the alloca'd buffer _becomes_
the stack-passed arguments for the function being called.

If libffi is compiled with ASAN, then there will be a redzone inserted
after the alloca'd buffer which is marked as poisoned. This redzone
appears beyond the end of $sp upon entry to the called function.

If the called function does anything to use this stack memory, ASAN will
notice that it's poisoned and report an error.

This commit fixes the situation (on the architectures that I have access
to) disabling instrumentation for ffi_call_int; that means there will be
no alloca redzone left on the shadow-stack.

8 months agotestsuite: fix dejagnu directive typo (#859)
Sam James [Fri, 20 Sep 2024 09:58:06 +0000 (10:58 +0100)]
testsuite: fix dejagnu directive typo (#859)

8 months agoMerge remote-tracking branch 'refs/remotes/origin/master'
Anthony Green [Sun, 15 Sep 2024 16:32:58 +0000 (12:32 -0400)]
Merge remote-tracking branch 'refs/remotes/origin/master'

8 months agoFix floating point compare
Anthony Green [Sun, 15 Sep 2024 16:32:29 +0000 (12:32 -0400)]
Fix floating point compare

8 months agoSuppress unused variable warning in dlmalloc.c (#843)
Richard Barnes [Sun, 15 Sep 2024 11:39:51 +0000 (07:39 -0400)]
Suppress unused variable warning in dlmalloc.c (#843)

Allows `-Wunused-but-set-variable` to pass

8 months agoA series of fixes for ARC port (#844)
Yuriy Kolerov [Sun, 15 Sep 2024 11:39:01 +0000 (14:39 +0300)]
A series of fixes for ARC port (#844)

* arc: Fix warnings

These warnings are fixed:

1. A series of "unused variables".
2. Implicit conversion from a pointer to uint32_t.

Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
* arc: Do not use mov_s and movl_s instructions

mov_s and movl_s instructions use a restricted set of registers.
However, a list of available registers for such instructions for
one ARC target may not match a list for another ARC targets. For
example, it is applicable to ARC700 and ARC HS3x/4x - build
fails because mov_s formats may be incompatible in some cases.

The easiest and the most straightforward way to fix this issue
is to use mov and movl instead of mov_s and movl_s.

Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
---------

Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
8 months agoBump actions/download-artifact from 3 to 4.1.7 in /.github/workflows (#856)
dependabot[bot] [Sun, 15 Sep 2024 11:38:22 +0000 (07:38 -0400)]
Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows (#856)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8 months agoconfigure: fix shared build on Solaris 10 (#846)
Yury V. Zaytsev [Sun, 15 Sep 2024 11:37:28 +0000 (13:37 +0200)]
configure: fix shared build on Solaris 10 (#846)

GNU tools are often installed with g-prefix on Solaris. Unfortunately, a check
in configure was using grep directly instead of through a variable, which lead
to wrong results due to missing option `-q`. Additionally, the check will fail
silently if `readelf` is not on `PATH` instead of trying `greadelf`.

8 months agofeat(testsuite): add struct_int_float.c to Makefile.am
Anthony Green [Sun, 15 Sep 2024 11:32:50 +0000 (07:32 -0400)]
feat(testsuite): add struct_int_float.c to Makefile.am

8 months agoRobustify floating point comparison in test
Anthony Green [Sun, 15 Sep 2024 11:31:33 +0000 (07:31 -0400)]
Robustify floating point comparison in test

8 months agoFix x86/ffi64 calls with 6 gp and some sse registers (#848)
kellda [Sun, 15 Sep 2024 11:29:42 +0000 (13:29 +0200)]
Fix x86/ffi64 calls with 6 gp and some sse registers (#848)

* Fix x86/ffi64 calls with 6 gp and some sse registers

* Add test demonstating issue when mixing gp and sse registers

8 months agoOpenRISC/or1k build fixes (#854)
Thomas Petazzoni [Sun, 15 Sep 2024 11:22:36 +0000 (13:22 +0200)]
OpenRISC/or1k build fixes (#854)

* src/or1k/ffi.c: fix prototype of ffi_call_SYSV()

The current code base of libffi on OpenRISC (or1k) fails to build with
GCC 14.x with the following error:

../src/or1k/ffi.c: In function 'ffi_call':
../src/or1k/ffi.c:167:34: error: passing argument 3 of 'ffi_call_SYSV' from incompatible pointer type [-Wincompatible-pointer-types]
  167 |       ffi_call_SYSV(size, &ecif, ffi_prep_args, rvalue, fn, cif->flags);
      |                                  ^~~~~~~~~~~~~
      |                                  |
      |                                  void * (*)(char *, extended_cif *)
../src/or1k/ffi.c:113:27: note: expected 'void * (*)(int *, extended_cif *)' but argument is of type 'void * (*)(char *, extended_cif *)'
  113 |                           void *(*)(int *, extended_cif *),
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is due to the fact that ffi_prep_args() is in fact defined as:

  void* ffi_prep_args(char *stack, extended_cif *ecif)

so, let's fix the prototype of the function pointer, which anyway gets
passed to assembly code, so the typing gets lost.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* src/or1k/ffi.c: fix incompatible pointer type

The current code base of libffi on OpenRISC (or1k) fails to build with
GCC 14.x with the following error:

../src/or1k/ffi.c: In function 'ffi_closure_SYSV':
../src/or1k/ffi.c:183:22: error: initialization of 'char *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
  183 |   char *stack_args = sp;
      |                      ^~

Indeed:

  register int *sp __asm__ ("r17");
  [..]
  char *stack_args = sp;

Adopt the same logic used for:

  char *ptr = (char *) register_args;

which consists in casting to the desired pointer type. Indeed, later
in the code stack_args is assigned to ptr (so they need to be the same
pointer type), and some arithmetic is done on ptr, so changing its
pointer type would change the behavior.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---------

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
11 months agoFix struct args (Rainer Orth)
Anthony Green [Fri, 28 Jun 2024 08:07:09 +0000 (04:07 -0400)]
Fix struct args (Rainer Orth)

12 months agoaarch64: Add a missing no-op define of SIGN_LR_LINUX_ONLY (#838)
Martin Storsjö [Tue, 4 Jun 2024 11:13:08 +0000 (14:13 +0300)]
aarch64: Add a missing no-op define of SIGN_LR_LINUX_ONLY (#838)

This is needed at least if building for Linux, with a toolchain
that doesn't default to having PAC enabled, fixing build errors
since 45d284f2d066cc3a080c5be88e51b4d934349797.

12 months agoImport from upstream
Anthony Green [Sat, 1 Jun 2024 17:42:29 +0000 (13:42 -0400)]
Import from upstream

12 months agoA fix to the struct type example (#837)
Florian [Sat, 1 Jun 2024 17:39:24 +0000 (19:39 +0200)]
A fix to the struct type example (#837)

Section 2.3.2 Structures of the docs declare `ffi_type`'s  `elements` field to be of type `ffi_type **`.

12 months agoaarch64: support pointer authentication (#834)
Bill Roberts [Sat, 1 Jun 2024 17:34:53 +0000 (12:34 -0500)]
aarch64: support pointer authentication (#834)

* aarch64: fix callstack in ffi_call_SYSV

The debug stack gets corrupted between the frame and stack pivots, update
the CFI directives so the call stack stays correct in the debugger.

str     x9, [x1, #32] // stack is ffi_call_SYSV() -> ffi_call_int() -> ffi_call_int() -> main() (good)
mov     x29, x1       // stack is ffi_call_SYSV() -> ffi_call_int() -> ffi_call_int() -> ffi_call() -> main() (bad)
mov     sp, x0        // stack is ffi_call_SYSV() -> ffi_call_int() -> ffi_call_int() -> main() (good)

The CFA data needs to be updated around the pivots, after this patch the
callstack stays correct.

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
* aarch64: remove uneeded CFI directive

This directive doesn't actually set the CFA to anything valid, and
during unwinding this isn't even used. Note that the PAC/Darwin usage
is quite suspect as well, as the CFA is either x1 or x29 after the frame
pivot, and the CFA address is what's used as the modifier when verifying
the PAC. At least this is the behavior on Linux with PAC, I need to
verify ARME ABI unwinding. So for now leave Darwin as is.

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
* ptrauth: rename define for clarity

Rename the HAVE_PTRAUTH define for clarity that its associated with the
ARM64E ABI and not the ARM64 ABI that can be supported on Linux and
enabled with -mbranch-protection=standard.

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
* aarch64: add PAC support to ffi_call_SYSV

Support AARCH64 Pointer Authentication Codes (PAC) within ffi_call_SYSV
and support exception unwinding.

The Linux ABI for PAC is to use paciasp/autiasp instructions which also
have hint space equivelent instructions. They sign the LR (x30) with the
A key and the current stack pointer as the salt. Note that this can also be
configured to use the B key and will use pacibsp/autibsp hint instructions.

The Linux ABI for exception frame data when PAC is enabled assumes that the
Connonical Frame Address, or CFA is equal to the stack pointer. I.E sp is
equal to x29 (fp). When the unwinder is invoked the cfa will point to
the frame which will include the *signed* return address from the LR.
This will then be passed to __builtin_aarch64_autia1716 where the CFA
will be used as the salt and stored to register x16 and register x17
will contain the signed address to demangle. This can be noted in:
  - https://github.com/gcc-mirror/gcc/blob/d6d7afcdbc04adb0ec42a44b2d7e05600945af42/libgcc/config/aarch64/aarch64-unwind.h#L56

The other required portion of this is to indicate to the unwinder that
this is a signed address that needs to go the special demangle route in
the unwinder. This is accomplished by using CFI directive "cfi_window_save"
which marks that frame as being signed.

Putting all of this together is a bit tricky, as the internals of
ffi_call_SYSV the callee allocates its stack and frame and passes it in
arg1 (x0) and arg2 (x1) to the called function, where that function
pivots its stack, so care must be taken to get the sp == fp before
paciasp is called and also restore that state before autiasp is called.

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
---------

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
12 months agoffi: fix spelling mistake (#833)
Bill Roberts [Sat, 1 Jun 2024 17:33:28 +0000 (12:33 -0500)]
ffi: fix spelling mistake (#833)

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
14 months agoFix bti support (#830)
Bill Roberts [Tue, 19 Mar 2024 16:44:55 +0000 (11:44 -0500)]
Fix bti support (#830)

* bti: add identifier to ffi_closure_SYSV_V_alt

This was missing BTI_C identifier.

Old Code:
ffi_closure_SYSV_V_alt:
0000fffff7f70500:   ldr     x17, [sp, #8]

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
* testsuite: fix whitespace in Makefile.am

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
* aarch64: correct comment describing BTI

The comment is incorrect, BTI is enabled per mapping via mprotect with
PROT_BTI flag set, not per-process. When the loader loads the library,
if the GNU Notes section is missing this, PROT_BTI will not be enabled
for that mapping, but is independent of other mappings.

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
---------

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
15 months agochore: update version to 3.4.6 and fix long double regression on mips64 and alpha
Anthony Green [Sun, 18 Feb 2024 14:22:51 +0000 (09:22 -0500)]
chore: update version to 3.4.6 and fix long double regression on mips64 and alpha

15 months agoUpdate sparc64 host
Anthony Green [Sun, 18 Feb 2024 13:41:04 +0000 (08:41 -0500)]
Update sparc64 host

15 months agoUpdate cfarm hostnames
Anthony Green [Sun, 18 Feb 2024 13:02:45 +0000 (08:02 -0500)]
Update cfarm hostnames

15 months agoAlways define long double types.
Anthony Green [Sun, 18 Feb 2024 12:48:51 +0000 (07:48 -0500)]
Always define long double types.

15 months agoUpdate
Anthony Green [Thu, 15 Feb 2024 13:35:02 +0000 (08:35 -0500)]
Update

15 months agoupdate copyright year in libffi.texi
Anthony Green [Thu, 15 Feb 2024 13:32:42 +0000 (08:32 -0500)]
update copyright year in libffi.texi

15 months agoUpdate version, copyright and testsuite info.
Anthony Green [Thu, 15 Feb 2024 13:30:09 +0000 (08:30 -0500)]
Update version, copyright and testsuite info.

15 months agoFix test filename reference
Anthony Green [Thu, 15 Feb 2024 13:03:21 +0000 (08:03 -0500)]
Fix test filename reference

15 months agodocs(README): update release details for libffi-3.4.5
Anthony Green [Thu, 15 Feb 2024 13:01:43 +0000 (08:01 -0500)]
docs(README): update release details for libffi-3.4.5

15 months agomips: Fix N32 ABI return value handling (#813)
Xi Ruoyao [Thu, 15 Feb 2024 12:52:13 +0000 (20:52 +0800)]
mips: Fix N32 ABI return value handling (#813)

In N32 ABI, 8-bit or 16-bit integers should be extended following the
signedness of the integer, but 32-bit integers should always be
sign-extended to 64-bit (note that N32 ABI only works on 64-bit CPUs).

So handling this in everything using libffi would be nasty.  And the
libffi code for architectures with a similar rule (LoongArch & RISC-V)
also properly handle this.  Let's do this work in libffi for MIPS N32
too.

This fixes two failures in Python 3.12.1 ctypes test.

15 months agoFix loongarch64 soft-float build (#816) (#817)
杨屿杰 [Thu, 15 Feb 2024 12:51:40 +0000 (20:51 +0800)]
Fix loongarch64 soft-float build (#816) (#817)

15 months agoEmscripten: Don't unbox single element structs if they are larger than 16 bytes ...
Hood Chatham [Thu, 15 Feb 2024 12:51:12 +0000 (04:51 -0800)]
Emscripten: Don't unbox single element structs if they are larger than 16 bytes (#818)

This arguably is a compensation for a Python ctypes bug / strange behavior
described here:
https://github.com/python/cpython/blob/a16a9f978f42b8a09297c1efbf33877f6388c403/Modules/_ctypes/stgdict.c#L718-L779

If a struct is larger than 16 bytes, Python does not bother to accurately report
its contents figuring that we don't need to know.

15 months agoaarch64: add BTI flag to ELF notes (#822)
Bill Roberts [Thu, 15 Feb 2024 12:50:40 +0000 (06:50 -0600)]
aarch64: add BTI flag to ELF notes (#822)

When a program is loaded and linked, the first ELF file that doesn't
declare that BTI is supported in the GNU NOTES section disables BTI
support.

Example:
readelf -n ./aarch64-unknown-linux-gnu/.libs/libffi.so
Displaying notes found in: .note.gnu.property
  Owner                Data size  Description
  GNU                  0x00000010 NT_GNU_PROPERTY_TYPE_0
      Properties: AArch64 feature: BTI

Fixes: #823
Signed-off-by: Bill Roberts <bill.roberts@arm.com>
15 months agodon't skip ffi_type_longdouble symbols (#814) (#824)
Dan Horák [Thu, 15 Feb 2024 12:50:13 +0000 (13:50 +0100)]
don't skip ffi_type_longdouble symbols (#814) (#824)

Seems there are configurations (ppc64 or ppc64le) that define
HAVE_LONG_DOUBLE_VARIANT in fficonfig.h, but do not define
HAVE_LONG_DOUBLE, and still want ffi_type_{,complex_}longdouble
symbols. Update the condition in libffi.map.in accordingly.

15 months agoLoongArch: Fix a build error with GCC 14 (#825)
Xi Ruoyao [Thu, 15 Feb 2024 12:49:27 +0000 (20:49 +0800)]
LoongArch: Fix a build error with GCC 14 (#825)

Fix the build error with GCC 14:

    ../src/loongarch64/ffi.c: In function 'ffi_prep_closure_loc':
    ../src/loongarch64/ffi.c:525:7: error: implicit declaration of
    function 'ffi_tramp_set_parms' [-Wimplicit-function-declaration]

16 months agoUpdate README.md (#820)
bartoli [Thu, 1 Feb 2024 03:54:57 +0000 (04:54 +0100)]
Update README.md (#820)

For cygwin/MSVC build, CXXCPP is also needed to pass configure checks

16 months ago`feat(github-actions): add new build workflow for warp`
Anthony Green [Thu, 1 Feb 2024 03:43:38 +0000 (22:43 -0500)]
`feat(github-actions): add new build workflow for warp`

17 months agoPut more optional symbols behind ifdefs (#812)
Chongyun Lee [Sun, 24 Dec 2023 15:38:32 +0000 (23:38 +0800)]
Put more optional symbols behind ifdefs (#812)

17 months agoFix a variety of warnings (#811)
Виктор Чернякин [Fri, 22 Dec 2023 10:30:50 +0000 (03:30 -0700)]
Fix a variety of warnings (#811)

17 months agoRemove warnings
Anthony Green [Thu, 21 Dec 2023 20:19:44 +0000 (15:19 -0500)]
Remove warnings

17 months agoEliminate warning
Anthony Green [Thu, 21 Dec 2023 19:04:19 +0000 (14:04 -0500)]
Eliminate warning

18 months agoaarch64: Write the BTI instructions as "hint" instructions (#810)
Martin Storsjö [Tue, 28 Nov 2023 22:38:13 +0000 (00:38 +0200)]
aarch64: Write the BTI instructions as "hint" instructions (#810)

GNU binutils refuses to assemble the direct BTI instructions unless
the target architecture explicitly supports BTI, ending up with errors
such as

    ../src/aarch64/sysv.S: Assembler messages:
    ../src/aarch64/sysv.S:87: Error: selected processor does not support `bti c'
    ../src/aarch64/sysv.S:156: Error: selected processor does not support `bti j'

Building with -march=armv8.5-a fixes building this.

However, the BTI instructions assemble into hint instructions, that
are ignored by processors that don't implement them. Therefore it is
possible to assemble them for the baseline armv8.0-a target as well,
by replacing "bti j" with "hint #36", "bti c" with "hint #34" and
"bti jc" with "hint #38"; this assembles into the same instruction
bits.

18 months agoReference recent changes
Anthony Green [Thu, 23 Nov 2023 14:22:20 +0000 (09:22 -0500)]
Reference recent changes

18 months agoFix visibility check for AIX (#804)
David Tenty [Thu, 23 Nov 2023 14:16:56 +0000 (09:16 -0500)]
Fix visibility check for AIX (#804)

18 months ago[powerpc][AIX] fix layout issues for nested struct types (#805)
David Tenty [Thu, 23 Nov 2023 14:16:35 +0000 (09:16 -0500)]
[powerpc][AIX] fix layout issues for nested struct types (#805)

* [powerpc][AIX] fix layout issues for nested struct types

On AIX under the default power alignment rules, the layout
of struct types which are nested inside other structs may
be different than the layout of those types on their own.

Specifically the first member double rules which would
apply an eight byte alignment if that type appears in the
first position of a struct:

 1) apply recursively if the struct appear in the first member
    of another struct
 2) do not apply if that struct is itself a member of another struct
    and not the first member.

The current implementation of the rules in libffi doesn't handle these
cases, causing a mismatch with the compiler and causing some crashes
we see when OpenJ9 is used with libffi on AIX.

This PR corrects this and adds some representative test cases.

* Fix code style

* Add a size check

* Add additional test

* Fix padding in internal structs

* Flip condition back to original form

* Add a comment

18 months agoAdd bti intructions to aarch64 assembly to work with strict (#808)
Tobias Heider [Thu, 23 Nov 2023 14:15:29 +0000 (15:15 +0100)]
Add bti intructions to aarch64 assembly to work with strict (#808)

BTI enforcement on OpenBSD.

19 months agoDisable firefox testing
Daily Price Depot Droid [Sat, 21 Oct 2023 13:58:28 +0000 (09:58 -0400)]
Disable firefox testing

19 months agoTry logging
Daily Price Depot Droid [Sat, 21 Oct 2023 13:05:48 +0000 (09:05 -0400)]
Try logging

19 months agoCheck if FFI_GO_CLOSURES is defined (#796)
Nobuyoshi Nakada [Sat, 21 Oct 2023 11:44:24 +0000 (20:44 +0900)]
Check if FFI_GO_CLOSURES is defined (#796)

This macro is always defined to 1 if defined, or undefined.
With `-Wundef` option, checking the value without checking if it is defined causes warnings:

```
/opt/local/include/ffi.h:477:5: warning: 'FFI_GO_CLOSURES' is not defined, evaluates to 0 [-Wundef]
#if FFI_GO_CLOSURES
    ^
```

19 months agoAdd support for Haikuos on PowerPC (#799)
Yn0ga [Sat, 21 Oct 2023 11:43:43 +0000 (13:43 +0200)]
Add support for Haikuos on PowerPC (#799)

19 months agoFix passing floating point arguments on 64bits SPARC (libffi#778) (#802)
Petr Sumbera [Sat, 21 Oct 2023 11:42:11 +0000 (13:42 +0200)]
Fix passing floating point arguments on 64bits SPARC (libffi#778) (#802)

19 months agoPut optional symbols behind ifdefs (#800)
Alfred Wingate [Fri, 20 Oct 2023 12:02:37 +0000 (15:02 +0300)]
Put optional symbols behind ifdefs (#800)

Signed-off-by: Alfred Wingate <parona@protonmail.com>
21 months agoFix build failures on HP-UX (#792)
Michael Osipov [Mon, 4 Sep 2023 11:27:01 +0000 (13:27 +0200)]
Fix build failures on HP-UX (#792)

This fixes #328

Co-authored-by: Chris Hunt <chrahunt@gmail.com>
21 months agoReplace use of triple with target, and explicitly specify build host to force cross...
Russell Keith-Magee [Mon, 4 Sep 2023 11:26:11 +0000 (19:26 +0800)]
Replace use of triple with target, and explicitly specify build host to force cross-compilation (#794)

21 months agoFix python and pyodide version
Anthony Green [Thu, 31 Aug 2023 20:31:42 +0000 (16:31 -0400)]
Fix python and pyodide version

21 months agoUpgrade pyodide version to match newer selenium API
Anthony Green [Thu, 31 Aug 2023 12:48:50 +0000 (08:48 -0400)]
Upgrade pyodide version to match newer selenium API

22 months agoMake label private on apple (#788)
Ivan Tadeu Ferreira Antunes Filho [Sat, 12 Aug 2023 13:02:39 +0000 (09:02 -0400)]
Make label private on apple (#788)

Private labels on apple must start with L prefix, while on ELF they start with .L prefix.
This makes the label start with L on apple instead of .L.

23 months agoEmscripten build: Remove -sSTRICT_JS (#781)
Hood Chatham [Wed, 21 Jun 2023 04:17:04 +0000 (21:17 -0700)]
Emscripten build: Remove -sSTRICT_JS (#781)

This rasies errors on newer versions of the emscripten compiler.

2 years agoMerge branch 'master' of github.com:/libffi/libffi
Anthony Green [Mon, 3 Apr 2023 12:20:32 +0000 (08:20 -0400)]
Merge branch 'master' of github.com:/libffi/libffi

2 years agoAdd tests with homogeneous aggregate types
Anthony Green [Mon, 3 Apr 2023 12:18:23 +0000 (08:18 -0400)]
Add tests with homogeneous aggregate types

2 years agoMore accurate explanation of wasm32 state in readme (#776)
Hood Chatham [Mon, 3 Apr 2023 02:54:22 +0000 (19:54 -0700)]
More accurate explanation of wasm32 state in readme (#776)

There are three main wasm32 target triples:
* wasm32-unknown-unknown
* wasm32-unknown-emscripten
* wasm32-unknown-wasi

The wasm32 port is only for the wasm32-unknown-emscripten target triple.
(The other triples have no dynamic linking support so libffi would be both
hard to port and of limited utility.)

2 years agoMention ARCv3 work
Anthony Green [Sat, 18 Feb 2023 01:35:44 +0000 (20:35 -0500)]
Mention ARCv3 work

2 years agoUpdate ARC's libffi port (#771)
Claudiu Zissulescu [Sat, 18 Feb 2023 01:33:47 +0000 (03:33 +0200)]
Update ARC's libffi port (#771)

* Add support for ARC and ARC64

Add support for ARC/ARC32/ARC64

* Implementation of GO Closure for ARC/ARC32/ARC64 Architectures

---------

Co-authored-by: Nuno Cardoso <cardoso@synopsys.com>
Co-authored-by: Luis Silva <luiss@synopsys.com>
2 years agoNormalize libffi labels
Anthony Green [Thu, 9 Feb 2023 17:23:35 +0000 (12:23 -0500)]
Normalize libffi labels

2 years agoUse rlgl
Anthony Green [Thu, 9 Feb 2023 15:31:22 +0000 (10:31 -0500)]
Use rlgl

2 years agoAdd emscripten gha workflow (#768)
Hood Chatham [Thu, 9 Feb 2023 14:01:37 +0000 (06:01 -0800)]
Add emscripten gha workflow (#768)

Resolves issue #767

2 years agoRename label
Anthony Green [Sun, 5 Feb 2023 14:51:37 +0000 (09:51 -0500)]
Rename label

2 years agoUse libffi-dg-prune to handle Emscripten INFO messages rather than patching emcc...
Hood Chatham [Thu, 2 Feb 2023 22:48:07 +0000 (14:48 -0800)]
Use libffi-dg-prune to handle Emscripten INFO messages rather than patching emcc.py (#766)

2 years agoMention wasm32
Anthony Green [Thu, 2 Feb 2023 21:09:14 +0000 (16:09 -0500)]
Mention wasm32

2 years agoModernize
Anthony Green [Thu, 2 Feb 2023 21:04:34 +0000 (16:04 -0500)]
Modernize

2 years agoAdd wasm32 emscripten support (#763)
Hood Chatham [Thu, 2 Feb 2023 17:10:00 +0000 (09:10 -0800)]
Add wasm32 emscripten support (#763)

* added build script

* Apply libffi-emscripten patch

* Some changes to wasm32/ffi.c

* Remove exit(0); from test suites

* Fix LONGDOUBLE argument type

* Use more macros in ffi.c

* Use switch statements instead of if chains

* Implemented struct args

* Finish struct implementation

* Partially working closures

* Got closures working (most of closures test suite passes)

* Revert changes to test suite

* Update .gitignore

* Apply code formatter

* Use stackSave and stackRestore rather than directly adjusting stack pointer

* Add missing break

* Fix visibility of ffi_closure_alloc and ffi_closure_free

* Fix FFI_TYPE_STRUCT and FFI_TYPE_LONGDOUBLE when WASM_BIGINT is not used
sig needs to be vi here for FFI_TYPE_STRUCT and FFI_TYPE_LONGDOUBLE, noticed this while running the test suite without WASM_BIGINT support.

* Always use dynCall rather than direct wasmTable lookup (function pointer cast emulation changes dynCall)

* Prevent closures.c from duplicating symbols

* Try to set up CI

* Add test with bigint

* Make test methods static

* Remove BigInt shorthand because it messes up terser

* Add selenium tests

* Update tests a bit to try to make CI work

* WASM_BIGINT is a linker flag not a compile flag

* Finish getting CI working (#1)

* update gitignore

* Avoid adding "use strict;" to generated JS

This should be controlled by -s STRICT_JS in Emscripten.

* Make JavaScript ES5 compliant

* Remove redundant EXPORTED_RUNTIME_METHODS settings

* Fix definition of DEREF_I16

* Avoid marshalling FFI_TYPE_LONGDOUBLE when WASM_BIGINT is not used

* Add missing FFI_TYPE_STRUCT signature

* Improve test scripts

* Remove redundant EXPORTED_RUNTIME_METHODS settings

* Add missing EOL

* Add struct unpacking tests

* Update ci config to try to actually use WASM_BIGINT

* Revert "Avoid marshalling FFI_TYPE_LONGDOUBLE when WASM_BIGINT is not used"

This reverts commit 61bd5a3e20891623715604581b6e872ab3dfab80.

* Fix single_entry_structs tests

* Fix return from closure call

* Fix 64 bit return from closures

* only allocate as much space on stack for return pointer as needed

* Revert "only allocate as much space on stack for return pointer as needed"

This reverts commit e54a30faea3803e7ac33eed191bde9e573850fc1.

* xfail two tests

* Fix err_bad_abi test

* Remove test logging junk

* Try to set up long double marshalling for closures

* xfail err_bad_abi

* Fix reference errors in previous commit

* Add missing argument pointer assignment

* Fix signature of function pointer in cls_dbls_struct

* Fix longdouble argument

* Try some changes to bigint handling

* Fix BigInt handling

* Fix cls_longdouble test

* Fix long double closure arg with no WASM_BIGINT

* Use EM_JS to factor out js helpers

* Support for varargs closure calls

* Fix varargs calls

* Fix err_bad_abi test

* Fix typo in previous commit

* Add more assertions to closures test suite

* Fix some asserts

* Add assertions to a few more tests

* Fix some tests

* Fix more floating point assertions

* Update more tests

* Var args for ffi_call

* Don't do node tests

* Macro for allocating on stack

* Add some comments, simplify struct handling

* Try again to fix varargs calls, add comments

* Consolidate WASM_BIGINT conditionals into LOAD_U64 and STORE_U64 macros

* A bit of cleanup

* Fix another typo

* Some fixes to the testsuite

* Another testsuite fix

* Fix varags with closures?

* Another attempt at getting closure varargs to work

* sig is initialized later

* Allow libffi.closures tests to be run

* Improve build script

* Remove redundant semicolons

* Fix a few libffi.closures test failures

* Cleanup

* Legacy dynCall API is no longer used

* Fix FFI_TYPE_LONGDOUBLE offset

* xfail 2 tests for WASM

- closure_loc_fn0; not applicable -- codeloc doesn't point to closure.
- huge_struct; function signature too long.

* Revert some redundant dg-output/printf statements

Helps Node.

* Revert "Don't do node tests"

This reverts commit a341ef4b.

* Fix assertions in cls_24byte

* More tiny formating fixes to test suite

* Revert "Revert "Don't do node tests""

This reverts commit 7722e685ea04e2420e042886816d8c4dd31f5dcb.

* Fix 64 bit returns when WASM_BIGINT is absent

* Fix print statement in cls_24byte

* Add CALL_FUNC_PTR macro to allow pyodide to define custom calling behavior to handle fpcast

* Update single_entry_structs tests

* More explanations

* Fix compile error in last commit

* Add more support for pyodide fpcast emulation, update CI to try to test it

* Clone via https

* Fix path to pyodide emsdk_env

* Add asserts to the rest of the test suite

* Fix test compile errors

* Fix some tests

* Fix cls_ulonglong

* Fix alignment of <4 byte args

* fix cls_ulonglong again

* Use snprintf instead of sprintf

* Should assert than strncmp returned 0

* Fix va_struct1 and va_struct3

* Change double and long double tests

These tests are failing because of a strange bug with prinft and doubles, but I am not convinced
it necessarily has anything to do with libffi. This version casts the double to int before printing it and avoids the issue

* Enable node tests

* Revert "Change double and long double tests"

This reverts commit 8f3ff89c6577dc99564181cd9974f2f1ba21f1e9.

* Fix PYODIDE_FPCAST flag

* add conftest.py back in

* Fix emcc error: setting `EXPORTED_FUNCTIONS` expects `<class 'list'>` but got `<class 'str'>`

See discussion on https://github.com/pyodide/pyodide/pull/1596

* Remove test.html

* Remove duplicate test file

* More changes from upstream

* Fix some whitespace

* Add some basic debug logging statements

* Reapply libffi.exp changes

* Don't build docs (#7)

Works around build issue makeinfo: command not found.

* Update long double alignment

Emscripten 2.0.26 reduces the aligmnet of long double to 8. Quoting
from `ChangeLog.md`:

> The alignment of `long double`, which is a 128-bit floating-point
> value implemented in software, is reduced from 16 to 8. The lower
> alignment allows `max_align_t` to properly match the alignment we
> use for malloc, which is 8 (raising malloc's alignment to achieve
> correctness the other way would come with a performance regression).
> (#10072)

* Update long double alignment

Emscripten 2.0.26 reduces the aligmnet of long double to 8. Quoting
from `ChangeLog.md`:

> The alignment of `long double`, which is a 128-bit floating-point
> value implemented in software, is reduced from 16 to 8. The lower
> alignment allows `max_align_t` to properly match the alignment we
> use for malloc, which is 8 (raising malloc's alignment to achieve
> correctness the other way would come with a performance regression).
> (#10072)

* Improve error handling a bit (#8)

* Fix handling of signed arguments to ffi_call (#11)

* Fix struct argument handling in ffi_call (#10)

* Remove fpcast emulation tests

* Align the stack to MAX_ALIGN before making call (#12)

* Increase MAX_ARGS

* Cleanup (#14)

* Fix Closure compiler error with -sASSERTIONS=1 (#15)

* Remove function pointer cast emulation (#13)

This reverts commit 593b402 and cbc54da, as it's no longer needed
after PR pyodide/pyodide#2019.

* Prefer the `__EMSCRIPTEN__` definition over `EMSCRIPTEN` (#18)

"The preprocessor define EMSCRIPTEN is deprecated. Don't pass it to code
in strict mode. Code should use the define __EMSCRIPTEN__ instead."
https://github.com/emscripten-core/emscripten/blob/84a634167a1cd9e8c47d37a559688153a4ceace6/emcc.py#L887-L890

* Install autoconf 2.71

* Try again with installing autoconf 2.71

* Fix compatibility with Emscripten 3.1.28

* CI: remove use of `EM_CONFIG` env

See commit:
https://github.com/emscripten-core/emsdk/commit/3d87d5ea8143b3636f872fb05b896eb4a19a070b

* Fix cls_multi_schar: cast rest_call to signed char

* Remove test xfails (#17)

* Fix long double when used as a varargs argument

* Enable unwindtest and fix it

* Add EM_JS_DEPS

* Also require convertJsFunctionToWasm

* Run tests very very verbose

* Echo the .emscripten file

* Remove --experimental-wasm-bigint insertion

* Build with assertions

* Move verbosity flags back out of LDFLAGS

* Remove debug print statement

* Use up to date pyodide docker image

* Explicitly cast res_call to fix test failure

* Put back name of main function in cls_longdouble_va.c

* Fix alignment

The stack pointer apparently needs to be aligned to 16. There were
some terrible subtle bugs caused by not respecting this. stackAlloc
knows that the stack should be 16 aligned, so we can use stackAlloc(0)
to enforce this. This way if alignment requirements change, as long
as Emscripten updates stackAlloc to continue to enforce them we should
be okay.

* Fix handling of systems with no Js bigint integration

When we run the node tests we use node v14 tests (since node v14 is
vendored with Emscripten). Node v14 has no Js bigint integration
unless the --experimental-wasm-bigint flag is passed. So only the
node tests really notice if we get this right. Turns out, it didn't
work. We can't call a JavaScript function with 64 bit integer arguments
without bigint integration.

In ffi_call, we are trying to call a wasm function that takes 64 bit
integer arguments. dynCall is designed to do this. We need to go back
to tracking the signature when we don't have WASM_BIGINT, and then use
dynCall. This works better now that emscripten can dynamically fill in
extra dynCall wrappers:
https://github.com/emscripten-core/emscripten/pull/17328

On the other hand, for the closures we are not getting a function pointer
as a first argument. We need to make our own wasm legalizer adaptor that
splits 64 bit integer arguments and then calls the JavaScript trampoline,
then the JavaScript trampoline reassembles them, calls the closure, then
splits the result (if it's a 64 bit integer) and the adaptor puts it back
together.

* Improvements to emscripten test shell scripts (#21)

This fixes the C++ unwinding tests and makes other minor improvements
to the Emscripten test shell scripts.

* Rename the test folder and move test files into emscripten test folder

* Use docker image that has autoconf-2.71

* Cleanup

* Pin emscripten 3.1.30

* Fix build.sh path

* Rearrange ci pipeline

* Fix bpo_38748 test

* Cleanup

* Improvements to comments, add static asserts, and update copyright

* Use `*_js` instead of `*_helper` for EM_JS functions (#22)

* Minor code simplification

* Xfail first dejagnu test to work around emscripten cache messages

See https://github.com/emscripten-core/emscripten/issues/18607

* Remove unneeded xfails

* Shorten conftest.py by using pytest-pyodide

* Apply formatters and linters to emscripten directory

* Fix Emscripten xfail hack

* Fix build-tests script

* Patch emscripten to quiet info messages

* Clean up compiler flags in scripts and remove some settings from circleci config

* Rename emscripten quiet script

* Add missing export

* Don't remove go.exp

* Add reference to emscripten logging issue

---------

Co-authored-by: Kleis Auke Wolthuizen <info@kleisauke.nl>
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
Co-authored-by: Christian Heimes <christian@python.org>
2 years agoForward declare open_temp_exec_file (#764)
serge-sans-paille [Thu, 2 Feb 2023 14:46:29 +0000 (14:46 +0000)]
Forward declare open_temp_exec_file (#764)

It's defined in closures.c and used in tramp.c.
Also declare it as an hidden symbol, as it should be.

Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
2 years agoMention HPPA fixes
Anthony Green [Thu, 2 Feb 2023 12:06:02 +0000 (07:06 -0500)]
Mention HPPA fixes

2 years agoFrom Dave Anglin:
Anthony Green [Thu, 2 Feb 2023 12:04:55 +0000 (07:04 -0500)]
From Dave Anglin:

This patch is derived from the work done in implementing libffi for 64-bit hppa64-hpux target. Currently, the 32-bit hppa targets do a linear search for the return type of an ffi_call. This is slow and inefficient. A jump table can used to jump directly to the code used to process the return value. In most common cases, the return value can be processed in the jump table itself.

The patch also fixes return handling for FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16 and FFI_TYPE_SINT16.

2 years agoFrom Dave Anglin:
Anthony Green [Thu, 2 Feb 2023 12:02:53 +0000 (07:02 -0500)]
From Dave Anglin:

A couple of years ago the 32-bit hppa targets were converted from using a trampoline executed on the stack to the function descriptor technique used by ia64. This is more efficient and avoids having to have an executable stack. However, function pointers on 32-bit need the PLABEL bit set in the pointer. It distinguishes between pointers that point directly to the executable code and pointer that point to a function descriptor. We need the later for libffi. But as a result, it is not possible to convert using casts data pointers to function pointers.

The solution at the time was to set the PLABEL bit in hppa closure pointers using FFI_CLOSURE_PTR. However, I realized recently that this was a bad choice. Packages like python-cffi allocate their own closure pointers, so this isn't going to work well there.

A better solution is to leave closure pointers unchanged and only set the PLABEL bit in pointers used to point to executable code.

The attached patch drops the FFI_CLOSURE_PTR and FFI_RESTORE_PTR defines. This allows some cleanup in the hppa closure routines. The FFI_FN define is now used to set the PLABEL bit on hppa. ffi_closure_alloc is modified to set the PLABEL bit in the value set in *code.

I also added a FFI_CL define to convert a function pointer to a closure pointer. It is only used in one test case.

2 years agoAdd HPPA64 support
Anthony Green [Thu, 2 Feb 2023 11:59:46 +0000 (06:59 -0500)]
Add HPPA64 support

2 years agolibffi: Fix X86 32b Darwin build and EH frames. (#757)
Iain Sandoe [Thu, 2 Feb 2023 11:44:13 +0000 (11:44 +0000)]
libffi: Fix X86 32b Darwin build and EH frames. (#757)

This addresses a number of issues in the X86 Darwin 32b port for libffi.

1. The pic symbol stubs are weak definitions; the correct section placement
   for these depends on the linker version in use.  We do not have access
   to that information, but we can use the target OS version (assumes that
   the user has installed the latest version of xcode available).
   When a coalesced section is in use (OS versions earlier than Darwin12 /
   OSX 10.8), its name must differ from  __TEXT,__text since otherwise that
   would correspond to altering the attributes of the .text section (which
   produces a diagnostic from the assembler).
   Here we use __TEXT, __textcoal_nt for this which is what GCC emits for
   these stubs.
   For later versions than Darwin 12 (OS X 10.8) we can place the stubs in
   the .text section (if we do not we get a diagnostic from clang -cc1as
   saying that the use of coalesced sections for this is deprecated).

2. The EH frame is specified manually, since there is no support for .cfi_
   directives in 'cctools' assemblers.  The implementation needs to provide
   offsets for CFA advance, code size and to the CIE as signed values
   rather than relocations. However the cctools assembler will produce a
   relocation for expressions like ' .long Lxx-Lyy' which then leads to a
   link-time error.  We correct this by forming the offset values using
   ' .set' directives and then assigning the results of them.

3. The register numbering used by m32 X86 Darwin EH frames is not the same
   as the DWARF debug numbering (the Frame and Stack pointer numbers are
   swapped).

4. The FDE address encoding used by the system tools is '0x10' (PCrel + abs)
   where the value provided was PCrel + sdata4.

5. GCC does not use compact unwind at present, and it was not implemented
   until Darwin10 / OSX 10.6.  There were some issues with function location
   in 10.6 so that the solution here suppresses emitting the compact unwind
   section until Darwin11 / OSX 10.7.

2 years agoDarwin: Search for both shared and convenience libraries in each path. (#761)
Iain Sandoe [Thu, 2 Feb 2023 11:42:46 +0000 (11:42 +0000)]
Darwin: Search for both shared and convenience libraries in each path. (#761)

For several Darwin linker versions, the default behaviour is to first traverse
the set of library paths, looking for shared libraries, and then a second time
looking for archives.

This means that if the library is configured --disable-shared the installed
system version /usr/lib/libffi.dylib will be found before the archive under
test.

Using the linker option '-search-paths-first' alters the strategy to search each
path for dylib and then archive before moving on to the next.

2 years agoFix signed vs unsigned comparison (#765)
serge-sans-paille [Thu, 2 Feb 2023 11:40:17 +0000 (11:40 +0000)]
Fix signed vs unsigned comparison (#765)

As reported by -Wsign-compare. In the case of getting the result of
comparing the result of sysconf (_SC_PAGESIZE) to other value, this also
correctly handles edge cases where the above fails and returns -1.

Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
2 years agoUse checkout@v3, with nodejs 16
Anthony Green [Sun, 8 Jan 2023 14:01:00 +0000 (09:01 -0500)]
Use checkout@v3, with nodejs 16

2 years agofix typo (#758)
YongKang Zhou [Sun, 8 Jan 2023 13:56:34 +0000 (21:56 +0800)]
fix typo (#758)

`mingW` -> `MinGW`

2 years agoarm/sysv: reverted clang VFP mitigation (#747)
Alexander Kanavin [Mon, 5 Dec 2022 02:20:09 +0000 (03:20 +0100)]
arm/sysv: reverted clang VFP mitigation (#747)

Since commit e3d2812ce43940aacae5bab2d0e965278cb1e7ea,
seperate instructions were used when compiling under clang,
as clang didn't allow the directives at the time. This mitigation
now causes compilation to fail under clang 10, as described by
https://github.com/libffi/libffi/issues/607. Now that
clang supports the LDC and SDC instructions, this mitigation
has been reverted.

Co-authored-by: Brett Warren <brett.warren@arm.com>
2 years agoFix large struct passing on PA-RISC
Anthony Green [Sun, 20 Nov 2022 17:20:40 +0000 (12:20 -0500)]
Fix large struct passing on PA-RISC

2 years agoAdd missing test cases
Anthony Green [Tue, 25 Oct 2022 14:28:19 +0000 (10:28 -0400)]
Add missing test cases

2 years agoSmall build cleanup (#743)
Xavier Claessens [Mon, 24 Oct 2022 18:39:04 +0000 (20:39 +0200)]
Small build cleanup (#743)

* configure.ac: Remove some unused checks

* Fix FFI_API definition

When doing a static build dllimport/dllexport should be disabled. It was
also using 2 different macros FFI_BUILDING_DLL and FFI_BUILDING for no
reason.

2 years agoUpdate to version 3.4.4
Anthony Green [Mon, 24 Oct 2022 00:17:29 +0000 (20:17 -0400)]
Update to version 3.4.4

2 years agoMore aarch64 fixes
Anthony Green [Sun, 23 Oct 2022 15:25:10 +0000 (11:25 -0400)]
More aarch64 fixes

2 years agoFix types of temporary variables in aarch64 extend_integer_type (#745)
Icecream95 [Sun, 23 Oct 2022 15:08:10 +0000 (04:08 +1300)]
Fix types of temporary variables in aarch64 extend_integer_type (#745)

Fixes truncated values in weston-info output.

2 years agotypos (#742)
musvaage [Mon, 17 Oct 2022 22:26:17 +0000 (17:26 -0500)]
typos (#742)