aboutsummaryrefslogtreecommitdiff
path: root/tcg/ppc/tcg-target.inc.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-09-30 02:52:00 +0000
committerRichard Henderson <richard.henderson@linaro.org>2019-10-14 07:09:30 -0700
commit7d9dae0a102bc41ea031b358b47c243c5bc6ced9 (patch)
tree8db5cec22a91ac5ceb43cc257bf125e987df8733 /tcg/ppc/tcg-target.inc.c
parentb82f769cc16b4ee7b628e7a923d3b09eb1d85a80 (diff)
tcg/ppc: Create TCGPowerISA and have_isa
Introduce an enum to hold base < 2.06 < 3.00. Use macros to preserve the existing have_isa_2_06 and have_isa_3_00 predicates. Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/ppc/tcg-target.inc.c')
-rw-r--r--tcg/ppc/tcg-target.inc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c
index 4aad5d2b36..0bfaef9418 100644
--- a/tcg/ppc/tcg-target.inc.c
+++ b/tcg/ppc/tcg-target.inc.c
@@ -64,8 +64,7 @@
static tcg_insn_unit *tb_ret_addr;
-bool have_isa_2_06;
-bool have_isa_3_00;
+TCGPowerISA have_isa;
#define HAVE_ISA_2_06 have_isa_2_06
#define HAVE_ISEL have_isa_2_06
@@ -2787,12 +2786,13 @@ static void tcg_target_init(TCGContext *s)
unsigned long hwcap = qemu_getauxval(AT_HWCAP);
unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2);
+ have_isa = tcg_isa_base;
if (hwcap & PPC_FEATURE_ARCH_2_06) {
- have_isa_2_06 = true;
+ have_isa = tcg_isa_2_06;
}
#ifdef PPC_FEATURE2_ARCH_3_00
if (hwcap2 & PPC_FEATURE2_ARCH_3_00) {
- have_isa_3_00 = true;
+ have_isa = tcg_isa_3_00;
}
#endif