From: Bruno Larsen Date: Fri, 29 Oct 2021 19:24:04 +0000 (-0300) Subject: target/ppc: Move REQUIRE_ALTIVEC/VECTOR to translate.c X-Git-Tag: v6.2.0-rc0~5^2~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2205a4609750f824362a2110f49e9d60c4315e0;p=thirdparty%2Fqemu.git target/ppc: Move REQUIRE_ALTIVEC/VECTOR to translate.c Move REQUIRE_ALTIVEC to translate.c and rename it to REQUIRE_VECTOR. Signed-off-by: Bruno Larsen Signed-off-by: Matheus Ferst Signed-off-by: Fernando Valle Signed-off-by: Luis Pires Reviewed-by: Richard Henderson Acked-by: David Gibson Message-Id: <20211029192417.400707-3-luis.pires@eldorado.org.br> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Gibson --- diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 8d5141497f5..1d24b85746a 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7341,6 +7341,14 @@ static int times_16(DisasContext *ctx, int x) # define REQUIRE_64BIT(CTX) REQUIRE_INSNS_FLAGS(CTX, 64B) #endif +#define REQUIRE_VECTOR(CTX) \ + do { \ + if (unlikely(!(CTX)->altivec_enabled)) { \ + gen_exception((CTX), POWERPC_EXCP_VPU); \ + return true; \ + } \ + } while (0) + /* * Helpers for implementing sets of trans_* functions. * Defer the implementation of NAME to FUNC, with optional extra arguments. diff --git a/target/ppc/translate/vector-impl.c.inc b/target/ppc/translate/vector-impl.c.inc index 117ce9b1370..197e9033372 100644 --- a/target/ppc/translate/vector-impl.c.inc +++ b/target/ppc/translate/vector-impl.c.inc @@ -17,20 +17,12 @@ * License along with this library; if not, see . */ -#define REQUIRE_ALTIVEC(CTX) \ - do { \ - if (unlikely(!(CTX)->altivec_enabled)) { \ - gen_exception((CTX), POWERPC_EXCP_VPU); \ - return true; \ - } \ - } while (0) - static bool trans_VCFUGED(DisasContext *ctx, arg_VX *a) { TCGv_i64 tgt, src, mask; REQUIRE_INSNS_FLAGS2(ctx, ISA310); - REQUIRE_ALTIVEC(ctx); + REQUIRE_VECTOR(ctx); tgt = tcg_temp_new_i64(); src = tcg_temp_new_i64();