Author :
Xi Ruoyao
Date :
2024-02-15 20:52:13
Hash :04f6fa31 Message :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.