[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/31] tcg: Move TCG_TYPE_COUNT outside enum
From: |
Richard Henderson |
Subject: |
[PATCH 12/31] tcg: Move TCG_TYPE_COUNT outside enum |
Date: |
Thu, 20 Oct 2022 21:52:23 +1000 |
The count is not itself an enumerator. Move it outside to
prevent the compiler from considering it with -Wswitch-enum.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/tcg/tcg.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index afa18986b1..a631e0bc80 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -294,8 +294,6 @@ typedef enum TCGType {
TCG_TYPE_V128,
TCG_TYPE_V256,
- TCG_TYPE_COUNT, /* number of different types */
-
/* An alias for the size of the host register. */
#if TCG_TARGET_REG_BITS == 32
TCG_TYPE_REG = TCG_TYPE_I32,
@@ -318,6 +316,9 @@ typedef enum TCGType {
#endif
} TCGType;
+/* Number of different types */
+#define TCG_TYPE_COUNT (TCG_TYPE_V256 + 1)
+
/**
* get_alignment_bits
* @memop: MemOp value
--
2.34.1
- Re: [PATCH 09/31] tcg: Move TCG_{LOW,HIGH} to tcg-internal.h, (continued)
- [PATCH 15/31] tcg: Replace TCG_TARGET_CALL_ALIGN_ARGS with TCG_TARGET_CALL_ARG_I64, Richard Henderson, 2022/10/20
- [PATCH 07/31] accel/tcg: Set cflags_next_tb in cpu_common_initfn, Richard Henderson, 2022/10/20
- [PATCH 04/31] tcg/arm: Use register pair allocation for qemu_{ld, st}_i64, Richard Henderson, 2022/10/20
- [PATCH 11/31] tcg: Allocate TCGTemp pairs in host memory order, Richard Henderson, 2022/10/20
- [PATCH 10/31] tcg: Add temp_subindex to TCGTemp, Richard Henderson, 2022/10/20
- [PATCH 14/31] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKind, Richard Henderson, 2022/10/20
- [PATCH 12/31] tcg: Move TCG_TYPE_COUNT outside enum,
Richard Henderson <=
- [PATCH 16/31] tcg: Replace TCG_TARGET_EXTEND_ARGS with TCG_TARGET_CALL_ARG_I32, Richard Henderson, 2022/10/20
- [PATCH 20/31] tcg: Add TCGHelperInfo argument to tcg_out_call, Richard Henderson, 2022/10/20
- [PATCH 25/31] tcg: Add TCG_CALL_{RET,ARG}_BY_REF, Richard Henderson, 2022/10/20
- [PATCH 01/31] tcg: Tidy tcg_reg_alloc_op, Richard Henderson, 2022/10/20
- [PATCH 21/31] tcg: Define TCG_TYPE_I128 and related helper macros, Richard Henderson, 2022/10/20
- [PATCH 02/31] tcg: Introduce paired register allocation, Richard Henderson, 2022/10/20
- [PATCH 19/31] tcg: Move ffi_cif pointer into TCGHelperInfo, Richard Henderson, 2022/10/20
- [PATCH 23/31] tcg: Allocate objects contiguously in temp_allocate_frame, Richard Henderson, 2022/10/20