[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 07/19] target/ppc: Introduce REQUIRE_FPU
From: |
Luis Pires |
Subject: |
[PATCH v4 07/19] target/ppc: Introduce REQUIRE_FPU |
Date: |
Mon, 25 Oct 2021 16:11:42 -0300 |
From: Fernando Valle <fernando.valle@eldorado.org.br>
Signed-off-by: Fernando Valle <fernando.valle@eldorado.org.br>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
target/ppc/translate.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index c2fafebd1c..48a484eef6 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -7477,6 +7477,14 @@ static int times_4(DisasContext *ctx, int x)
} \
} while (0)
+#define REQUIRE_FPU(ctx) \
+ do { \
+ if (unlikely(!(ctx)->fpu_enabled)) { \
+ gen_exception((ctx), POWERPC_EXCP_FPU); \
+ return true; \
+ } \
+ } while (0)
+
/*
* Helpers for implementing sets of trans_* functions.
* Defer the implementation of NAME to FUNC, with optional extra arguments.
--
2.25.1
- [PATCH v4 00/19] target/ppc: DFP instructions using decodetree, Luis Pires, 2021/10/25
- [PATCH v4 01/19] host-utils: move checks out of divu128/divs128, Luis Pires, 2021/10/25
- [PATCH v4 02/19] host-utils: move udiv_qrnnd() to host-utils, Luis Pires, 2021/10/25
- [PATCH v4 03/19] host-utils: add 128-bit quotient support to divu128/divs128, Luis Pires, 2021/10/25
- [PATCH v4 04/19] host-utils: add unit tests for divu128/divs128, Luis Pires, 2021/10/25
- [PATCH v4 05/19] libdecnumber: introduce decNumberFrom[U]Int128, Luis Pires, 2021/10/25
- [PATCH v4 06/19] target/ppc: Move REQUIRE_ALTIVEC/VECTOR to translate.c, Luis Pires, 2021/10/25
- [PATCH v4 07/19] target/ppc: Introduce REQUIRE_FPU,
Luis Pires <=
- [PATCH v4 08/19] target/ppc: Implement DCFFIXQQ, Luis Pires, 2021/10/25
- [PATCH v4 09/19] host-utils: Introduce mulu128, Luis Pires, 2021/10/25
- [PATCH v4 10/19] libdecnumber: Introduce decNumberIntegralToInt128, Luis Pires, 2021/10/25
- [PATCH v4 11/19] target/ppc: Implement DCTFIXQQ, Luis Pires, 2021/10/25
- [PATCH v4 12/19] target/ppc: Do not update nip on DFP instructions, Luis Pires, 2021/10/25
- [PATCH v4 13/19] target/ppc: Move dtstdc[q]/dtstdg[q] to decodetree, Luis Pires, 2021/10/25
- [PATCH v4 14/19] target/ppc: Move d{add, sub, mul, div, iex}[q] to decodetree, Luis Pires, 2021/10/25
- [PATCH v4 15/19] target/ppc: Move dcmp{u, o}[q], dts{tex, tsf, tsfi}[q] to decodetree, Luis Pires, 2021/10/25
- [PATCH v4 16/19] target/ppc: Move dquai[q], drint{x, n}[q] to decodetree, Luis Pires, 2021/10/25
- [PATCH v4 17/19] target/ppc: Move dqua[q], drrnd[q] to decodetree, Luis Pires, 2021/10/25