mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/ppc: overhauled and moved logic of storing fpscr
Followed the suggested overhaul to store_fpscr logic, and moved it to cpu.c where it can be accessed in !TCG builds. The overhaul was suggested because storing a value to fpscr should never raise an exception, so we could remove all the mess that happened with POWERPC_EXCP_FP. We also moved fpscr_set_rounding_mode into cpu.c as it could now be moved there, and it is needed when a value for the fpscr is being stored directly. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210527163522.23019-1-bruno.larsen@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
1a1c9a00f3
commit
fe43ba9721
4 changed files with 65 additions and 234 deletions
|
@ -271,7 +271,7 @@ int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
|
|||
break;
|
||||
case 70:
|
||||
/* fpscr */
|
||||
store_fpscr(env, ldtul_p(mem_buf), 0xffffffff);
|
||||
ppc_store_fpscr(env, ldtul_p(mem_buf));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ int ppc_cpu_gdb_write_register_apple(CPUState *cs, uint8_t *mem_buf, int n)
|
|||
break;
|
||||
case 70 + 32:
|
||||
/* fpscr */
|
||||
store_fpscr(env, ldq_p(mem_buf), 0xffffffff);
|
||||
ppc_store_fpscr(env, ldq_p(mem_buf));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -474,7 +474,7 @@ static int gdb_set_float_reg(CPUPPCState *env, uint8_t *mem_buf, int n)
|
|||
}
|
||||
if (n == 32) {
|
||||
ppc_maybe_bswap_register(env, mem_buf, 4);
|
||||
store_fpscr(env, ldl_p(mem_buf), 0xffffffff);
|
||||
ppc_store_fpscr(env, ldl_p(mem_buf));
|
||||
return 4;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue