[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/30] target/ppc: Move slbsync to decodetree
From: |
Daniel Henrique Barboza |
Subject: |
[PULL 25/30] target/ppc: Move slbsync to decodetree |
Date: |
Mon, 18 Jul 2022 14:22:03 -0300 |
From: Lucas Coutinho <lucas.coutinho@eldorado.org.br>
Reviewed-by: Leandro Lupori <leandro.lupori@eldorado.org.br>
Signed-off-by: Lucas Coutinho <lucas.coutinho@eldorado.org.br>
Message-Id: <20220701133507.740619-11-lucas.coutinho@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
target/ppc/insn32.decode | 2 ++
target/ppc/translate.c | 17 -----------------
target/ppc/translate/storage-ctrl-impl.c.inc | 14 ++++++++++++++
3 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode
index 5049c98691..781051e993 100644
--- a/target/ppc/insn32.decode
+++ b/target/ppc/insn32.decode
@@ -877,6 +877,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
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index d7a785164b..5a18ee577f 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -5388,20 +5388,6 @@ static void gen_tlbsync(DisasContext *ctx)
#endif /* defined(CONFIG_USER_ONLY) */
}
-#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 ***/
/* Optional: */
@@ -6787,9 +6773,6 @@ GEN_HANDLER(tlbia, 0x1F, 0x12, 0x0B, 0x03FFFC01,
PPC_MEM_TLBIA),
* different ISA versions
*/
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),
GEN_HANDLER2(tlbld_6xx, "tlbld", 0x1F, 0x12, 0x1E, 0x03FF0001, PPC_6xx_TLB),
diff --git a/target/ppc/translate/storage-ctrl-impl.c.inc
b/target/ppc/translate/storage-ctrl-impl.c.inc
index d7e2bb185f..5c569a3c75 100644
--- a/target/ppc/translate/storage-ctrl-impl.c.inc
+++ b/target/ppc/translate/storage-ctrl-impl.c.inc
@@ -141,6 +141,20 @@ 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);
+ REQUIRE_SV(ctx);
+
+#if !defined(CONFIG_USER_ONLY) && defined(TARGET_PPC64)
+ gen_check_tlb_flush(ctx, true);
+#else
+ qemu_build_not_reached();
+#endif
+ return true;
+}
+
static bool do_tlbie(DisasContext *ctx, arg_X_tlbie *a, bool local)
{
#if defined(CONFIG_USER_ONLY)
--
2.36.1
- [PULL 22/30] target/ppc: Move slbmfev to decodetree, (continued)
- [PULL 22/30] target/ppc: Move slbmfev to decodetree, Daniel Henrique Barboza, 2022/07/18
- [PULL 23/30] target/ppc: Move slbmfee to decodetree, Daniel Henrique Barboza, 2022/07/18
- [PULL 24/30] target/ppc: Move slbfee to decodetree, Daniel Henrique Barboza, 2022/07/18
- [PULL 17/30] target/ppc: add macros to check privilege level, Daniel Henrique Barboza, 2022/07/18
- [PULL 21/30] target/ppc: Move slbmte to decodetree, Daniel Henrique Barboza, 2022/07/18
- [PULL 26/30] target/ppc: Implement slbiag, Daniel Henrique Barboza, 2022/07/18
- [PULL 28/30] ppc: Check partition and process table alignment, Daniel Henrique Barboza, 2022/07/18
- [PULL 29/30] target/ppc: Improve Radix xlate level validation, Daniel Henrique Barboza, 2022/07/18
- [PULL 30/30] target/ppc: Check page dir/table base alignment, Daniel Henrique Barboza, 2022/07/18
- [PULL 27/30] target/ppc: check tb_env != 0 before printing TBU/TBL/DECR, Daniel Henrique Barboza, 2022/07/18
- [PULL 25/30] target/ppc: Move slbsync to decodetree,
Daniel Henrique Barboza <=
- Re: [PULL 00/30] ppc queue, Peter Maydell, 2022/07/19