[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/25] target/ppc: Introduce REQUIRE_VSX macro
From: |
matheus . ferst |
Subject: |
[PATCH v3 10/25] target/ppc: Introduce REQUIRE_VSX macro |
Date: |
Thu, 4 Nov 2021 09:37:04 -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.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
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 fc9d35a7a8..e88b613093 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -7354,6 +7354,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
- [PATCH v3 00/25] PowerISA v3.1 instruction batch, matheus . ferst, 2021/11/04
- [PATCH v3 01/25] target/ppc: Move vcfuged to vmx-impl.c.inc, matheus . ferst, 2021/11/04
- [PATCH v3 02/25] target/ppc: Implement vclzdm/vctzdm instructions, matheus . ferst, 2021/11/04
- [PATCH v3 03/25] target/ppc: Implement vpdepd/vpextd instruction, matheus . ferst, 2021/11/04
- [PATCH v3 04/25] target/ppc: Implement vsldbi/vsrdbi instructions, matheus . ferst, 2021/11/04
- [PATCH v3 05/25] target/ppc: Implement Vector Insert from GPR using GPR index insns, matheus . ferst, 2021/11/04
- [PATCH v3 07/25] target/ppc: Implement Vector Insert from VSR using GPR index insns, matheus . ferst, 2021/11/04
- [PATCH v3 06/25] target/ppc: Implement Vector Insert Word from GPR using Immediate insns, matheus . ferst, 2021/11/04
- [PATCH v3 09/25] target/ppc: Implement Vector Extract Double to VSR using GPR index insns, matheus . ferst, 2021/11/04
- [PATCH v3 10/25] target/ppc: Introduce REQUIRE_VSX macro,
matheus . ferst <=
- [PATCH v3 08/25] target/ppc: Move vinsertb/vinserth/vinsertw/vinsertd to decodetree, matheus . ferst, 2021/11/04
- [PATCH v3 11/25] target/ppc: receive high/low as argument in get/set_cpu_vsr, matheus . ferst, 2021/11/04
- [PATCH v3 12/25] target/ppc: moved stxv and lxv from legacy to decodtree, matheus . ferst, 2021/11/04
- [PATCH v3 13/25] target/ppc: moved stxvx and lxvx from legacy to decodtree, matheus . ferst, 2021/11/04
- [PATCH v3 15/25] target/ppc: added the instructions LXVPX and STXVPX, matheus . ferst, 2021/11/04
- [PATCH v3 14/25] target/ppc: added the instructions LXVP and STXVP, matheus . ferst, 2021/11/04
- [PATCH v3 16/25] target/ppc: added the instructions PLXV and PSTXV, matheus . ferst, 2021/11/04
- [PATCH v3 17/25] target/ppc: added the instructions PLXVP and PSTXVP, matheus . ferst, 2021/11/04
- [PATCH v3 19/25] target/ppc: moved XXSPLTIB to using decodetree, matheus . ferst, 2021/11/04
- [PATCH v3 18/25] target/ppc: moved XXSPLTW to using decodetree, matheus . ferst, 2021/11/04