[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 20/33] target/ppc: Introduce REQUIRE_VSX macro
From: |
matheus . ferst |
Subject: |
[PATCH 20/33] target/ppc: Introduce REQUIRE_VSX macro |
Date: |
Thu, 21 Oct 2021 16:45:34 -0300 |
From: "Bruno Larsen (billionai)" <bruno.larsen@eldorado.org.br>
Introduce the macro to centralize checking if the VSX facility is
enabled and handle it correctly.
Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
target/ppc/translate.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index e7ea15f703..d11029d03a 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -7352,6 +7352,14 @@ static int times_16(DisasContext *ctx, int x)
} \
} while (0)
+#define REQUIRE_VSX(CTX) \
+ do { \
+ if (unlikely(!(CTX)->vsx_enabled)) { \
+ gen_exception((CTX), POWERPC_EXCP_VSXU); \
+ return true; \
+ } \
+ } while (0)
+
#define REQUIRE_FPU(ctx) \
do { \
if (unlikely(!(ctx)->fpu_enabled)) { \
--
2.25.1
- Re: [PATCH 15/33] target/ppc: Implement Vector Insert from GPR using GPR index insns, (continued)
[PATCH 16/33] target/ppc: Implement Vector Insert Word from GPR using Immediate insns, matheus . ferst, 2021/10/21
[PATCH 17/33] target/ppc: Implement Vector Insert from VSR using GPR index insns, matheus . ferst, 2021/10/21
[PATCH 19/33] target/ppc: Implement Vector Extract Double to VSR using GPR index insns, matheus . ferst, 2021/10/21
[PATCH 20/33] target/ppc: Introduce REQUIRE_VSX macro,
matheus . ferst <=
[PATCH 21/33] target/ppc: moved stxv and lxv from legacy to decodtree, matheus . ferst, 2021/10/21
[PATCH 22/33] target/ppc: moved stxvx and lxvx from legacy to decodtree, matheus . ferst, 2021/10/21
[PATCH 23/33] target/ppc: added the instructions LXVP and STXVP, matheus . ferst, 2021/10/21
[PATCH 24/33] target/ppc: added the instructions LXVPX and STXVPX, matheus . ferst, 2021/10/21