在2025年4月24日周四 上午5:28,WANG Rui写道:
[...]
>>
>> Hardware manual from official public website should be published at
>> first, and SW follows this, rather than informal HW with FPGA version only.
>
> I agree with your point - the ISA specification should come first, and
> software should follow. That’s exactly why I think it's meaningful to
> handle this case properly in QEMU now.
>
> According to the latest version of the LoongArch ISA specification
> that I have access to, LSX and LASX are explicitly allowed to be
> implemented on LA32, with only a few instructions restricted to LA64
> due to 64-bit GPR transfers. So the idea of supporting LSX/LASX on a
> 32-bit target isn't based on any private or unofficial hardware - it’s
> aligned with what's permitted by the official spec.
>
> From this perspective, what we're doing in QEMU is not following any
> informal implementation, but rather respecting and staying compatible
> with the ISA as officially defined.
I second this. Anything combination permitted by ISA specification should
be emulated by QEMU, not only the thing implemented by Loongson hardware
currently. That can actually reduce software maintenance burden by catching
issues beforehand.
Bear in mind that LoongArch is an open specification, which means other
implementer are free to do whatever they want permitted by ISA spec.
Thanks
>
> Anyway, thanks for the discussion - good to hear different perspectives on
> this.
>
> Regards,
> Rui
>
--
- Jiaxun