]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target/ppc: Introduce REQUIRE_FPU
authorFernando Valle <fernando.valle@eldorado.org.br>
Fri, 29 Oct 2021 19:24:05 +0000 (16:24 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 8 Nov 2021 23:32:52 +0000 (10:32 +1100)
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>
target/ppc/translate.c

index 1d24b85746ac3376e185db87deda23582bcf88ae..d4e72affa608c9f1fe62a18c95397151630acd42 100644 (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.