diff options
author | Fernando Valle <fernando.valle@eldorado.org.br> | 2021-10-29 16:24:05 -0300 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-11-09 10:32:52 +1100 |
commit | 86057426d037ca023632156777a28d8493eaeb9d (patch) | |
tree | 56f9c90f7111b1b1eb1d6c0826e627d356243cbd /target/ppc/translate.c | |
parent | e2205a4609750f824362a2110f49e9d60c4315e0 (diff) | |
download | qemu-86057426d037ca023632156777a28d8493eaeb9d.zip qemu-86057426d037ca023632156777a28d8493eaeb9d.tar.gz qemu-86057426d037ca023632156777a28d8493eaeb9d.tar.bz2 |
target/ppc: Introduce REQUIRE_FPU
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>
Message-Id: <20211029192417.400707-4-luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/translate.c')
-rw-r--r-- | target/ppc/translate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 1d24b85..d4e72af 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7349,6 +7349,14 @@ static int times_16(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. |