aboutsummaryrefslogtreecommitdiff
path: root/tcg/ppc/tcg-target.h
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.h
parentb82f769cc16b4ee7b628e7a923d3b09eb1d85a80 (diff)
downloadqemu-7d9dae0a102bc41ea031b358b47c243c5bc6ced9.zip
qemu-7d9dae0a102bc41ea031b358b47c243c5bc6ced9.tar.gz
qemu-7d9dae0a102bc41ea031b358b47c243c5bc6ced9.tar.bz2
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.h')
-rw-r--r--tcg/ppc/tcg-target.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h
index 690fa74..35ba869 100644
--- a/tcg/ppc/tcg-target.h
+++ b/tcg/ppc/tcg-target.h
@@ -58,8 +58,16 @@ typedef enum {
TCG_AREG0 = TCG_REG_R27
} TCGReg;
-extern bool have_isa_2_06;
-extern bool have_isa_3_00;
+typedef enum {
+ tcg_isa_base,
+ tcg_isa_2_06,
+ tcg_isa_3_00,
+} TCGPowerISA;
+
+extern TCGPowerISA have_isa;
+
+#define have_isa_2_06 (have_isa >= tcg_isa_2_06)
+#define have_isa_3_00 (have_isa >= tcg_isa_3_00)
/* optional instructions automatically implemented */
#define TCG_TARGET_HAS_ext8u_i32 0 /* andi */