qemu-devel
[Top][All Lists]
Advanced

[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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]