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: Richard Henderson
Subject: Re: [RFC PATCH 01/43] target/loongarch: Add vector data type vec_t
Date: Wed, 28 Dec 2022 09:30:33 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

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?


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]