Skip to content

Commit

Permalink
target/ppc: Move slbsync to decodetree
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Coutinho committed Jun 7, 2022
1 parent d0da2f2 commit 4f14733
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
2 changes: 2 additions & 0 deletions target/ppc/insn32.decode
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ SLBMFEE 011111 ..... ----- ..... 1110010011 - @X_tb

SLBFEE 011111 ..... ----- ..... 1111010011 1 @X_tb

SLBSYNC 011111 ----- ----- ----- 0101010010 -

## TLB Management Instructions

&X_tlbie rb rs ric prs:bool r:bool
Expand Down
12 changes: 0 additions & 12 deletions target/ppc/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -5389,17 +5389,6 @@ static void gen_tlbsync(DisasContext *ctx)
}

#if defined(TARGET_PPC64)
/* slbsync */
static void gen_slbsync(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
GEN_PRIV(ctx);
#else
CHK_SV(ctx);
gen_check_tlb_flush(ctx, true);
#endif /* defined(CONFIG_USER_ONLY) */
}

#endif /* defined(TARGET_PPC64) */

/*** External control ***/
Expand Down Expand Up @@ -6804,7 +6793,6 @@ GEN_HANDLER(tlbia, 0x1F, 0x12, 0x0B, 0x03FFFC01, PPC_MEM_TLBIA),
*/
GEN_HANDLER(tlbsync, 0x1F, 0x16, 0x11, 0x03FFF801, PPC_MEM_TLBSYNC),
#if defined(TARGET_PPC64)
GEN_HANDLER_E(slbsync, 0x1F, 0x12, 0x0A, 0x03FFF801, PPC_NONE, PPC2_ISA300),
#endif
GEN_HANDLER(eciwx, 0x1F, 0x16, 0x0D, 0x00000001, PPC_EXTERN),
GEN_HANDLER(ecowx, 0x1F, 0x16, 0x09, 0x00000001, PPC_EXTERN),
Expand Down
19 changes: 19 additions & 0 deletions target/ppc/translate/storage-ctrl-impl.c.inc
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,25 @@ static bool trans_SLBFEE(DisasContext *ctx, arg_SLBFEE *a)
return true;
}

static bool trans_SLBSYNC(DisasContext *ctx, arg_SLBSYNC *a)
{
REQUIRE_64BIT(ctx);
REQUIRE_INSNS_FLAGS2(ctx, ISA300);

#if defined(CONFIG_USER_ONLY)
REQUIRE_SV(ctx);
#else
REQUIRE_SV(ctx);

#if defined(TARGET_PPC64)
gen_check_tlb_flush(ctx, true);
#else
qemu_build_not_reached();
#endif
#endif
return true;
}

static bool do_tlbie(DisasContext *ctx, arg_X_tlbie *a, bool local)
{
#if defined(CONFIG_USER_ONLY)
Expand Down

0 comments on commit 4f14733

Please sign in to comment.