target/ppc: Introduce REQUIRE_VSX macro
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> Message-Id: <20211104123719.323713-11-matheus.ferst@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
28110b72a8
commit
8226cb2d9c
@ -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)) { \
|
||||
|
Loading…
Reference in New Issue
Block a user