mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/sparc: Split ver from env->fsr
This field is read-only. It is easier to store it separately and merge it only upon read. While we're at it, use FSR_VER_SHIFT to initialize fpu_version. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20231103173841.33651-17-richard.henderson@linaro.org>
This commit is contained in:
parent
1ccd6e13cc
commit
49bb972513
3 changed files with 23 additions and 16 deletions
|
@ -349,7 +349,12 @@ GEN_FCMP(fcmpeq_fcc3, float128, 26, 1);
|
|||
|
||||
target_ulong cpu_get_fsr(CPUSPARCState *env)
|
||||
{
|
||||
return env->fsr;
|
||||
target_ulong fsr = env->fsr;
|
||||
|
||||
/* VER is kept completely separate until re-assembly. */
|
||||
fsr |= env->def.fpu_version;
|
||||
|
||||
return fsr;
|
||||
}
|
||||
|
||||
target_ulong helper_get_fsr(CPUSPARCState *env)
|
||||
|
@ -361,7 +366,7 @@ static void set_fsr_nonsplit(CPUSPARCState *env, target_ulong fsr)
|
|||
{
|
||||
int rnd_mode;
|
||||
|
||||
env->fsr = fsr;
|
||||
env->fsr = fsr & ~FSR_VER_MASK;
|
||||
|
||||
switch (fsr & FSR_RD_MASK) {
|
||||
case FSR_RD_NEAREST:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue