[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/5] tcg: Allow non-constant control macros
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 1/5] tcg: Allow non-constant control macros |
Date: |
Thu, 6 Jun 2013 11:05:43 -0700 |
This allows TCG_TARGET_HAS_* to be a variable rather than a constant,
which allows easier support for differing ISA levels for the host.
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/tcg-opc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h
index 4246e9c..db5e6e5 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
--
1.8.1.4
- [Qemu-devel] [PATCH 0/5] tcg-arm: Runtime detection of architecture, Richard Henderson, 2013/06/06
- [Qemu-devel] [PATCH 1/5] tcg: Allow non-constant control macros,
Richard Henderson <=
- [Qemu-devel] [PATCH 2/5] tcg: Simplify logic using TCG_OPF_NOT_PRESENT, Richard Henderson, 2013/06/06
- [Qemu-devel] [PATCH 4/5] tcg-arm: Simplify logic in detecting the ARM ISA in use, Richard Henderson, 2013/06/06
- [Qemu-devel] [PATCH 3/5] tcg-arm: Make use of conditional availability of opcodes for divide, Richard Henderson, 2013/06/06
- [Qemu-devel] [PATCH 5/5] tcg-arm: Use AT_PLATFORM to detect the host ISA, Richard Henderson, 2013/06/06
- Re: [Qemu-devel] [PATCH 0/5] tcg-arm: Runtime detection of architecture, Richard Henderson, 2013/06/10