Skip to content

Commit 4f14733

Browse files
author
Lucas Coutinho
committed
target/ppc: Move slbsync to decodetree
1 parent d0da2f2 commit 4f14733

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

target/ppc/insn32.decode

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ SLBMFEE 011111 ..... ----- ..... 1110010011 - @X_tb
769769

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

772+
SLBSYNC 011111 ----- ----- ----- 0101010010 -
773+
772774
## TLB Management Instructions
773775

774776
&X_tlbie rb rs ric prs:bool r:bool

target/ppc/translate.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5389,17 +5389,6 @@ static void gen_tlbsync(DisasContext *ctx)
53895389
}
53905390

53915391
#if defined(TARGET_PPC64)
5392-
/* slbsync */
5393-
static void gen_slbsync(DisasContext *ctx)
5394-
{
5395-
#if defined(CONFIG_USER_ONLY)
5396-
GEN_PRIV(ctx);
5397-
#else
5398-
CHK_SV(ctx);
5399-
gen_check_tlb_flush(ctx, true);
5400-
#endif /* defined(CONFIG_USER_ONLY) */
5401-
}
5402-
54035392
#endif /* defined(TARGET_PPC64) */
54045393

54055394
/*** External control ***/
@@ -6804,7 +6793,6 @@ GEN_HANDLER(tlbia, 0x1F, 0x12, 0x0B, 0x03FFFC01, PPC_MEM_TLBIA),
68046793
*/
68056794
GEN_HANDLER(tlbsync, 0x1F, 0x16, 0x11, 0x03FFF801, PPC_MEM_TLBSYNC),
68066795
#if defined(TARGET_PPC64)
6807-
GEN_HANDLER_E(slbsync, 0x1F, 0x12, 0x0A, 0x03FFF801, PPC_NONE, PPC2_ISA300),
68086796
#endif
68096797
GEN_HANDLER(eciwx, 0x1F, 0x16, 0x0D, 0x00000001, PPC_EXTERN),
68106798
GEN_HANDLER(ecowx, 0x1F, 0x16, 0x09, 0x00000001, PPC_EXTERN),

target/ppc/translate/storage-ctrl-impl.c.inc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,25 @@ static bool trans_SLBFEE(DisasContext *ctx, arg_SLBFEE *a)
194194
return true;
195195
}
196196

197+
static bool trans_SLBSYNC(DisasContext *ctx, arg_SLBSYNC *a)
198+
{
199+
REQUIRE_64BIT(ctx);
200+
REQUIRE_INSNS_FLAGS2(ctx, ISA300);
201+
202+
#if defined(CONFIG_USER_ONLY)
203+
REQUIRE_SV(ctx);
204+
#else
205+
REQUIRE_SV(ctx);
206+
207+
#if defined(TARGET_PPC64)
208+
gen_check_tlb_flush(ctx, true);
209+
#else
210+
qemu_build_not_reached();
211+
#endif
212+
#endif
213+
return true;
214+
}
215+
197216
static bool do_tlbie(DisasContext *ctx, arg_X_tlbie *a, bool local)
198217
{
199218
#if defined(CONFIG_USER_ONLY)

0 commit comments

Comments
 (0)