diff options
author | Richard Henderson <rth@twiddle.net> | 2013-05-02 11:35:08 +0100 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-07-09 07:14:35 -0700 |
commit | 4ef76952bd702d29ee4c021f068d85b063fdb928 (patch) | |
tree | 723effc39739d8fc54c0223d823a8c9a364e75d0 /tcg | |
parent | 5b9f72ab59ec9d57546cfc499ccc863327cb8a46 (diff) | |
download | qemu-4ef76952bd702d29ee4c021f068d85b063fdb928.tar.gz qemu-4ef76952bd702d29ee4c021f068d85b063fdb928.tar.bz2 qemu-4ef76952bd702d29ee4c021f068d85b063fdb928.zip |
tcg: Allow non-constant control macros
This allows TCG_TARGET_HAS_* to be a variable rather than a constant,
which allows easier support for differing ISA levels for the host.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/tcg-opc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h index 12967fb6ee..c94e25526c 100644 --- a/tcg/tcg-opc.h +++ b/tcg/tcg-opc.h @@ -40,7 +40,7 @@ DEF(set_label, 0, 0, 1, TCG_OPF_BB_END) DEF(call, 0, 1, 2, TCG_OPF_CALL_CLOBBER) /* variable number of parameters */ DEF(br, 0, 0, 1, TCG_OPF_BB_END) -#define IMPL(X) (X ? 0 : TCG_OPF_NOT_PRESENT) +#define IMPL(X) (__builtin_constant_p(X) && !(X) ? TCG_OPF_NOT_PRESENT : 0) #if TCG_TARGET_REG_BITS == 32 # define IMPL64 TCG_OPF_64BIT | TCG_OPF_NOT_PRESENT #else |