在2025年1月5日一月 上午10:27,Jiaxun Yang写道: > 在2025年1月5日一月 上午4:43,Arnd Bergmann写道: > [...] >> If both the ISA and the ABI get it right, it should be possible to >> build 32-bit userspace that is compatible with both when targeting >> a 32-bit hardware, but still use 64-bit registers inside a single >> function when the compiler is building for a 64-bit capable CPU >> (e.g. "-march=la464 -m32"). There is a small cost in the calling >> conventions for passing u64 arguments in pairs of registers >> (unlike n32/x32/aarch64ilp32/rv64ilp32), but a huge benefit in >> not maintaining two incompatible ABIs. > Upon having a closer look, I think there's an issue regarding having uniformed ABI for LA32 and LA64. I'll call them ILP32GRLEN32 and ILP32GRLEN64 below. If we allow interlinking, we must treat the upper 32 bits of all GPRs as caller-saved, since an ILP32GRLEN32 callee would be unaware of them. This could incur significant performance overhead. Alternatively, we can disallow interlinking. However, this effectively creates a new, incompatible ABI. I'm not sure if it still fits our design goal. Thanks >> Arnd > > -- > - Jiaxun -- - Jiaxun