mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/ppc: Fix width of some 32-bit SPRs
Some 32-bit SPRs are incorrectly implemented as 64-bits on 64-bit targets. This changes VRSAVE, DSISR, HDSISR, DAWRX0, PIDR, LPIDR, DEXCR, HDEXCR, CTRL, TSCR, MMCRH, and PMC[1-6] from to be 32-bit registers. This only goes by the 32/64 classification in the architecture, it does not try to implement finer details of SPR implementation (e.g., not all bits implemented as simple read/write storage). Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Message-Id: <20230515092655.171206-2-npiggin@gmail.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
5260ecffd2
commit
fbda88f7ab
6 changed files with 27 additions and 27 deletions
|
@ -411,19 +411,6 @@ void spr_write_generic(DisasContext *ctx, int sprn, int gprn)
|
|||
spr_store_dump_spr(sprn);
|
||||
}
|
||||
|
||||
void spr_write_CTRL(DisasContext *ctx, int sprn, int gprn)
|
||||
{
|
||||
spr_write_generic(ctx, sprn, gprn);
|
||||
|
||||
/*
|
||||
* SPR_CTRL writes must force a new translation block,
|
||||
* allowing the PMU to calculate the run latch events with
|
||||
* more accuracy.
|
||||
*/
|
||||
ctx->base.is_jmp = DISAS_EXIT_UPDATE;
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
void spr_write_generic32(DisasContext *ctx, int sprn, int gprn)
|
||||
{
|
||||
#ifdef TARGET_PPC64
|
||||
|
@ -436,6 +423,19 @@ void spr_write_generic32(DisasContext *ctx, int sprn, int gprn)
|
|||
#endif
|
||||
}
|
||||
|
||||
void spr_write_CTRL(DisasContext *ctx, int sprn, int gprn)
|
||||
{
|
||||
spr_write_generic32(ctx, sprn, gprn);
|
||||
|
||||
/*
|
||||
* SPR_CTRL writes must force a new translation block,
|
||||
* allowing the PMU to calculate the run latch events with
|
||||
* more accuracy.
|
||||
*/
|
||||
ctx->base.is_jmp = DISAS_EXIT_UPDATE;
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
void spr_write_clear(DisasContext *ctx, int sprn, int gprn)
|
||||
{
|
||||
TCGv t0 = tcg_temp_new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue