On 5/13/21 7:24 AM, Matheus K. Ferst wrote:
+static bool trans_CFUGED(DisasContext *ctx, arg_X *a)
+{
+ REQUIRE_64BIT(ctx);
+ REQUIRE_INSNS_FLAGS2(ctx, ISA310);
+#if defined(TARGET_PPC64)
+ gen_helper_cfuged(cpu_gpr[a->ra], cpu_gpr[a->rt], cpu_gpr[a->rb]);
+#else
+ gen_invalid(ctx);
+#endif
+ return true;
+}
Given that this helper will also be used by vcfuged, there's no point in
hiding it in a TARGET_PPC64 block, and thus you can drop the ifdefs.
r~
If I remove it, the build for ppc will fail, because cpu_gpr is declared as
TCGv, and the helper uses i64 to match {get,set}_cpu_vsr{l,h}. REQUIRE_64BIT
makes the helper call unreachable for ppc, but it's a runtime check. At build
time, the compiler will check the types anyway, and give us an error.
Hmm, yes. Just change the gen_invalid above to qemu_build_not_reached().
r~