[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 29/34] tcg: Reorg function calls
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 29/34] tcg: Reorg function calls |
Date: |
Tue, 6 Dec 2022 09:49:32 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 12/6/22 09:28, Ilya Leoshkevich wrote:
+ switch (TCG_TARGET_CALL_ARG_I64) {
+ case TCG_CALL_ARG_EVEN:
On a s390x host with gcc-11.0.1-0.3.1.ibm.fc34.s390x I get:
FAILED: libqemu-aarch64-softmmu.fa.p/tcg_tcg.c.o
../tcg/tcg.c: In function ‘init_call_layout’:
../tcg/tcg.c:739:13: error: case value ‘1’ not in enumerated type
[-Werror=switch]
739 | case TCG_CALL_ARG_EVEN:
| ^~~~
The following helps:
Yes, I found and fixed this since.
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -735,7 +735,7 @@ static void init_call_layout(TCGHelperInfo *info)
break;
case TCG_TYPE_I64:
- switch (TCG_TARGET_CALL_ARG_I64) {
+ switch ((TCGCallArgumentKind)TCG_TARGET_CALL_ARG_I64) {
case TCG_CALL_ARG_EVEN:
layout_arg_even(&cum);
/* fall through */
This looks like a gcc bug to me.
The gcc "bug" is only in not being sufficiently verbose. It should say something about
*differing* enumerated types, and perhaps name them.
Back in patch 20, tcg/s390x/tcg-target.h,
-#define TCG_TARGET_CALL_ARG_I64 TCG_CALL_RET_NORMAL
+#define TCG_TARGET_CALL_ARG_I64 TCG_CALL_ARG_NORMAL
r~
- [PATCH v3 24/34] accel/tcg/plugin: Avoid duplicate copy in copy_call, (continued)
- [PATCH v3 24/34] accel/tcg/plugin: Avoid duplicate copy in copy_call, Richard Henderson, 2022/12/02
- [PATCH v3 26/34] tci: MAX_OPC_PARAM_IARGS is no longer used, Richard Henderson, 2022/12/02
- [PATCH v3 23/34] accel/tcg/plugin: Don't search for the function pointer index, Richard Henderson, 2022/12/02
- [PATCH v3 27/34] tcg: Vary the allocation size for TCGOp, Richard Henderson, 2022/12/02
- [PATCH v3 28/34] tcg: Use output_pref wrapper function, Richard Henderson, 2022/12/02
- [PATCH v3 30/34] tcg: Convert typecode_to_ffi from array to function, Richard Henderson, 2022/12/02
- [PATCH v3 32/34] tcg: Move ffi_cif pointer into TCGHelperInfo, Richard Henderson, 2022/12/02
- [PATCH v3 31/34] tcg: Factor init_ffi_layouts() out of tcg_context_init(), Richard Henderson, 2022/12/02
- [PATCH v3 29/34] tcg: Reorg function calls, Richard Henderson, 2022/12/02
- [PATCH v3 33/34] tcg/aarch64: Merge tcg_out_callr into tcg_out_call, Richard Henderson, 2022/12/02
- [PATCH v3 34/34] tcg: Add TCGHelperInfo argument to tcg_out_call, Richard Henderson, 2022/12/02