[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/11] tcg: Move TCG_TYPE_COUNT out of enum TCGType
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 08/11] tcg: Move TCG_TYPE_COUNT out of enum TCGType |
Date: |
Mon, 22 Sep 2014 13:57:38 -0700 |
Having the count inside the enumeration makes gcc believe that we
want to be able to store values 0-2, and thus a 1-bit bitfield cannot
hold the enumeration. With the count as a define external to the enum,
gcc correctly sees that we only care about values 0-1.
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/tcg.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 997a704..fcc50bd 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -194,7 +194,6 @@ typedef struct TCGPool {
typedef enum TCGType {
TCG_TYPE_I32,
TCG_TYPE_I64,
- TCG_TYPE_COUNT, /* number of different types */
/* An alias for the size of the host register. */
#if TCG_TARGET_REG_BITS == 32
@@ -218,6 +217,8 @@ typedef enum TCGType {
#endif
} TCGType;
+#define TCG_TYPE_COUNT 2
+
/* Constants for qemu_ld and qemu_st for the Memory Operation field. */
typedef enum TCGMemOp {
MO_8 = 0,
--
1.9.3
- [Qemu-devel] [PULL 02/11] tcg-sparc: Use ADDXC in addsub2_i64, (continued)
- [Qemu-devel] [PULL 02/11] tcg-sparc: Use ADDXC in addsub2_i64, Richard Henderson, 2014/09/22
- [Qemu-devel] [PULL 04/11] tcg-sparc: Use ADDXC in setcond_i64, Richard Henderson, 2014/09/22
- [Qemu-devel] [PULL 03/11] tcg-sparc: Fix setcond_i32 uninitialized value, Richard Henderson, 2014/09/22
- [Qemu-devel] [PULL 05/11] tcg-sparc: Rename ADDX/SUBX insns, Richard Henderson, 2014/09/22
- [Qemu-devel] [PULL 07/11] tcg: Compress TCGLabelQemuLdst, Richard Henderson, 2014/09/22
[Qemu-devel] [PULL 06/11] tcg-sparc: Use UMULXHI instruction, Richard Henderson, 2014/09/22
[Qemu-devel] [PULL 08/11] tcg: Move TCG_TYPE_COUNT out of enum TCGType,
Richard Henderson <=
[Qemu-devel] [PULL 10/11] qemu/compiler: Define QEMU_ARTIFICIAL, Richard Henderson, 2014/09/22
[Qemu-devel] [PULL 11/11] tcg: Always enable TCGv type checking, Richard Henderson, 2014/09/22
[Qemu-devel] [PULL 09/11] tcg-aarch64: Use 32-bit loads for qemu_ld_i32, Richard Henderson, 2014/09/22