[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 29/34] tcg: Reorg function calls
From: |
Ilya Leoshkevich |
Subject: |
Re: [PATCH v3 29/34] tcg: Reorg function calls |
Date: |
Tue, 06 Dec 2022 16:58:58 +0100 |
User-agent: |
Evolution 3.46.1 (3.46.1-1.fc37) |
On Tue, 2022-12-06 at 09:49 -0600, Richard Henderson wrote:
> 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~
I looked at this line and completely missed the RET vs ARG difference.
Your diff fixes the issue for me too, of course.
Thanks!
- [PATCH v3 26/34] tci: MAX_OPC_PARAM_IARGS is no longer used, (continued)
- [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