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>
This commit is contained in:
Fernando Valle 2021-10-29 16:24:05 -03:00 committed by David Gibson
parent e2205a4609
commit 86057426d0
1 changed files with 8 additions and 0 deletions

View File

@ -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.