qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH 01/43] target/loongarch: Add vector data type vec_t


From: gaosong
Subject: Re: [RFC PATCH 01/43] target/loongarch: Add vector data type vec_t
Date: Thu, 29 Dec 2022 09:51:49 +0800
User-agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0


在 2022/12/29 上午1:30, Richard Henderson 写道:
On 12/27/22 18:34, gaosong wrote:
The manual says "The lower 64 bits of each vector register overlap with the floating point register of the same number.  In other words When the basic floating-point instruction is executed to update the floating-point register, the low 64 bits of the corresponding LSX register
are also updated to the same value."

So If we don't use the fpr_t.  we should:
1 Update LSX low 64 bits after floating point instruction translation;
2 Update floating-point registers after LSX instruction translation.

Should we do this  or have I misunderstood?

You should use fpr_t, you should not use cpu_fpr[].
This is the same as aarch64, for instance.

A related question though: does the manual mention whether the fpu instructions only modify the lower 64 bits, or do the high 64-bits become zeroed, nanboxed, or unspecified?


Only modify the lower 64bits,   the high 64-bits is unpecified.

Thanks.
Song Gao
I strongly suggest that you introduce wrappers to load/store fpr values from their env slots.  I would name them similarly to gpr_{src,dst}, gen_set_gpr.

Got it.


r~




reply via email to

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