qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 17/21] LoongArch Linux User Emulation


From: Richard Henderson
Subject: Re: [PATCH v4 17/21] LoongArch Linux User Emulation
Date: Fri, 10 Sep 2021 14:52:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]