On 9/8/21 11:50 AM, Song Gao wrote:
Hi Richard,
On 09/05/2021 06:04 PM, Richard Henderson wrote:
+struct sigframe {
+ uint32_t sf_ass[4]; /* argument save space for o32 */
Surely there is no "o32" for loongarch?
Yes, qemu only support 64bit. but the kernel has 'o32'. Should we have to be
consistent with the kernel?
Yes, you need to be consistent with the kernel. However... the kernel is not yet
upstream, and therefore the ABI is (officially) still malleable.
Anyway, this padding was copied from mips o32, and should not have been. Looking at the
loongarch gcc sources, REG_PARM_STACK_SPACE is always 0, and thus the 4 words reserved
here are never used.
I see that gcc/libgcc/config/loongarch/linux-unwind.h builds in knowledge of these unused
words. I also see that linux/arch/loongarch/vdso/sigreturn.S does not provide correct
unwind info. Certainly the kernel vdso should be fixed, so that code within gcc should
not be needed. At which point the ABI for the signal frame is entirely private to the kernel.
r~