From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608158145; cv=none; d=zohomail.com; s=zohoarc; b=W3QzD+qlEZul4ZzROCNekawT/XVLq45iYE2rhRJv25i4bICRZxLrgYkSHn+3O2vhiwJ+E7HqiKtwtRy0yNQcsFjOijExibkdkZSvmOQzoAUjYpCG4pp80g5HHPKCxRci8YxpHpkbMLp/XkU6MJ2uu1v5WvvzMP3gbB2wZswqW58= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608158145; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xk5OvThqMihubCF0P3A0z7+E9P5KeyCisuh+GKV4O6w=; b=CuNEBdx3Ir1rpYmIEZpy97jhgF8DjCwIAXAl10IlamOL4abk4d9mK3/DZjSm4HVsInwRT8tm+MGZOusye/xvqaAFoVQI5R+bucEOgYB4oVlsHekUMW/t0H7yKw9sMc47vDCtBvWaCwcjDDmra8LaC82ZaCEPqJLyGPTuhzGwm5I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608158145383213.45403449910657; Wed, 16 Dec 2020 14:35:45 -0800 (PST) Received: from localhost ([::1]:33284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpag2-0002Gf-TW for importer@patchew.org; Wed, 16 Dec 2020 12:33:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpacn-0008Mg-2H for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpacj-000127-U7 for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:04 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-525-Fj8MuVT7NpyhBFIiu2yFEg-1; Wed, 16 Dec 2020 12:29:58 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E910D801817; Wed, 16 Dec 2020 17:29:56 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C9E310016F4; Wed, 16 Dec 2020 17:29:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xk5OvThqMihubCF0P3A0z7+E9P5KeyCisuh+GKV4O6w=; b=dkPUlMfGO/2c37BApQLBVA1I9sO1FuzNiPb8/texpk40MrtrHcIhkAXX1G2JR3f/jsoYZ8 pjuPO3+pH1KJ1AjVYWo4dB5BzIiiaR8FSU3bamQLoQdjfgJs5gqKBkTZZgs8G32Sx3+NM0 OH6R1jGvgHZ6nF7VuoX0JQWsCv8skCY= X-MC-Unique: Fj8MuVT7NpyhBFIiu2yFEg-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 01/12] disas/libvixl: Fix fall-through annotation for GCC >= 7 Date: Wed, 16 Dec 2020 18:29:38 +0100 Message-Id: <20201216172949.57380-2-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" For compiling with -Wimplicit-fallthrough we need to fix the fallthrough annotations in the libvixl code. This is based on the following upstream vixl commit by Martyn Capewell: https://git.linaro.org/arm/vixl.git/commit/?id=3Dde326f850f736c3a337 "GCC 7 enables switch/case fallthrough checking, but this fails in VIXL, because the annotation we use is Clang specific. Also, fix a missing annotation in the disassembler." Signed-off-by: Thomas Huth Reviewed-by: Peter Maydell Message-Id: <20201211152426.350966-2-thuth@redhat.com> Signed-off-by: Thomas Huth --- disas/libvixl/vixl/a64/disasm-a64.cc | 4 ++++ disas/libvixl/vixl/globals.h | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/disas/libvixl/vixl/a64/disasm-a64.cc b/disas/libvixl/vixl/a64/= disasm-a64.cc index 7a58a5c087..f34d1d68da 100644 --- a/disas/libvixl/vixl/a64/disasm-a64.cc +++ b/disas/libvixl/vixl/a64/disasm-a64.cc @@ -2985,6 +2985,10 @@ int Disassembler::SubstituteImmediateField(const Ins= truction* instr, } return 3; } + default: { + VIXL_UNIMPLEMENTED(); + return 0; + } } } case 'C': { // ICondB - Immediate Conditional Branch. diff --git a/disas/libvixl/vixl/globals.h b/disas/libvixl/vixl/globals.h index 61dc9f7f7e..7099aa599f 100644 --- a/disas/libvixl/vixl/globals.h +++ b/disas/libvixl/vixl/globals.h @@ -108,10 +108,12 @@ inline void USE(T1, T2, T3, T4) {} #define __has_warning(x) 0 #endif =20 -// Note: This option is only available for Clang. And will only be enabled= for -// C++11(201103L). +// Fallthrough annotation for Clang and C++11(201103L). #if __has_warning("-Wimplicit-fallthrough") && __cplusplus >=3D 201103L #define VIXL_FALLTHROUGH() [[clang::fallthrough]] //NOLINT +// Fallthrough annotation for GCC >=3D 7. +#elif __GNUC__ >=3D 7 + #define VIXL_FALLTHROUGH() __attribute__((fallthrough)) #else #define VIXL_FALLTHROUGH() do {} while (0) #endif --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608158131; cv=none; d=zohomail.com; s=zohoarc; b=iM+Agnm/dRGV/xj9pXL7c5cGYfOyzenxZtON9BvSDWxFZxZ0FMZt7FHDSMWTkL41puXVscAmtTEVe05vk4gX/MzCmu0DytaTekZL5tmaIG60dZtufwXFMirD7/n+gFV5+Mum0v5NET7fv0kxIV2OpXdk+2W8vtUv1qIodDjKt8Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608158131; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2T6UN1mfg0U6GlpV4+jh0vnfDSHv41qUWviU2IK9Lf8=; b=RdA5PxhmKnh8NjbuDRHhNBU+DptYdFzTZRPXyAJg2ZAg5R26QCm1IYaeaRoZbI6negxbxqcGIr/l7G/BTpNav6Xs4XSZkgxrbCx6p6L8+9uR57mc2iuk7Z76NAe5KjymROiDX1HSL9gLFnyWSJwXePhV252JHGo4pGhReLi0khI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608158131750348.49536211600196; Wed, 16 Dec 2020 14:35:31 -0800 (PST) Received: from localhost ([::1]:51790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpamp-0001oZ-PA for importer@patchew.org; Wed, 16 Dec 2020 12:40:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpacp-0008RR-Pa for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpacn-00014P-W8 for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:07 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-195-IZj0P2BmPfe8wKTwhsmIrw-1; Wed, 16 Dec 2020 12:30:01 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 741AB180A093; Wed, 16 Dec 2020 17:29:59 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C17510023B3; Wed, 16 Dec 2020 17:29:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2T6UN1mfg0U6GlpV4+jh0vnfDSHv41qUWviU2IK9Lf8=; b=a5G2zJEH1snvIbLybTNsnxEmymQ+AiEyA3c/YApNx6Y4LOPpRfkNme4MOp/0f5Igz1z8qp VxgTHi0TVPB8ENuzFXBCQlwqNUUJfZi6hicD9OrujqpMdtM6fHvMm9bjKIbsC+oMxrDe55 fBAgzT3nS7wx8QhVKc/rR550DxQnJ5s= X-MC-Unique: IZj0P2BmPfe8wKTwhsmIrw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 02/12] target/unicore32/translate: Add missing fallthrough annotations Date: Wed, 16 Dec 2020 18:29:39 +0100 Message-Id: <20201216172949.57380-3-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Looking at the way the code is formatted here (there is an empty line after break statements, but none where the break is missing), and the instruction set overview at https://en.wikipedia.org/wiki/Unicore the fallthrough is very likely intended here. So add a fallthrough comment to make the it compilable with -Werror=3Dimplicit-fallthrough. Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20201211152426.350966-3-thuth@redhat.com> Signed-off-by: Thomas Huth --- target/unicore32/translate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/unicore32/translate.c b/target/unicore32/translate.c index d4b06df672..962f9877a0 100644 --- a/target/unicore32/translate.c +++ b/target/unicore32/translate.c @@ -1801,6 +1801,7 @@ static void disas_uc32_insn(CPUUniCore32State *env, D= isasContext *s) do_misc(env, s, insn); break; } + /* fallthrough */ case 0x1: if (((UCOP_OPCODES >> 2) =3D=3D 2) && !UCOP_SET_S) { do_misc(env, s, insn); @@ -1817,6 +1818,7 @@ static void disas_uc32_insn(CPUUniCore32State *env, D= isasContext *s) if (UCOP_SET(8) || UCOP_SET(5)) { ILLEGAL; } + /* fallthrough */ case 0x3: do_ldst_ir(env, s, insn); break; --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608158825; cv=none; d=zohomail.com; s=zohoarc; b=GXsabWZ6qrqqT5ydoTl7I3OZnEMiX1+i9wo5hjmmpYwcjq9Vlb/Kkiy5/byZ/8cm/kgsKnBNfn1HjGHNRsvSeXg/wi18M7JdTyqeI67lAwGF2GmvQhqabPX/6ltl8Hghavh5I1msUL3ZsKZwbkKLcz5Q8L/Vfyup5oHko2KKwOk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608158825; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iJMktt1nQ1NlKnoOgCZyHmsz7qX8N7ctuQSuJ5wZpfM=; b=WRdPcWKRuCx2NBR/akKkElVUo5Kns3DA5MBS60OhcgLtoxdaY+GX97Uo2ret7PgO3DYAqU6503KhLiBjr1FjsKO1RnHFvXZgTtwmTVMnifpq0zIPDUDNlqWrGjMSB3zKLqKISE8JMf8hemgy7y8YyDiC51b8pjUTdw0arrLTgOo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608158825734778.0966668819389; Wed, 16 Dec 2020 14:47:05 -0800 (PST) Received: from localhost ([::1]:41768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpajG-0005vE-E5 for importer@patchew.org; Wed, 16 Dec 2020 12:36:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpacs-0008Th-VE for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpacp-00014m-Og for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:10 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-215-KMZSZWvWOQicME8NLWSc2w-1; Wed, 16 Dec 2020 12:30:02 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96AFB1005513; Wed, 16 Dec 2020 17:30:01 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC27010023B3; Wed, 16 Dec 2020 17:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iJMktt1nQ1NlKnoOgCZyHmsz7qX8N7ctuQSuJ5wZpfM=; b=LPHyXQt4vTgq3P7pvWXDhu8cG/9nbLvRwCuelycZPqIKIHyFB4LVFF+afuYT/2MKNKgx2g qARlJ0VTT355Bwy4RkjVflhwCdRz4jjTK6vrAx8fMIIzrnzZGUyj1vee/uSsQydvYIqZB1 h8woAIud3XL5Xz5X3ZDcovy9t14Hpd4= X-MC-Unique: KMZSZWvWOQicME8NLWSc2w-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 03/12] hw/rtc/twl92230: Silence warnings about missing fallthrough statements Date: Wed, 16 Dec 2020 18:29:40 +0100 Message-Id: <20201216172949.57380-4-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When compiling with -Werror=3Dimplicit-fallthrough, gcc complains about missing fallthrough annotations in this file. Looking at the code, the fallthrough is indeed wanted here, but instead of adding the annotations, it can be done more efficiently by simply calculating the offset with a subtraction instead of increasing a local variable one by one. Signed-off-by: Thomas Huth Reviewed-by: Peter Maydell Message-Id: <20201211152426.350966-4-thuth@redhat.com> Signed-off-by: Thomas Huth --- hw/rtc/twl92230.c | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/hw/rtc/twl92230.c b/hw/rtc/twl92230.c index f838913b37..a787bd247d 100644 --- a/hw/rtc/twl92230.c +++ b/hw/rtc/twl92230.c @@ -271,37 +271,23 @@ static void menelaus_gpio_set(void *opaque, int line,= int level) static uint8_t menelaus_read(void *opaque, uint8_t addr) { MenelausState *s =3D (MenelausState *) opaque; - int reg =3D 0; =20 switch (addr) { case MENELAUS_REV: return 0x22; =20 - case MENELAUS_VCORE_CTRL5: reg ++; - case MENELAUS_VCORE_CTRL4: reg ++; - case MENELAUS_VCORE_CTRL3: reg ++; - case MENELAUS_VCORE_CTRL2: reg ++; - case MENELAUS_VCORE_CTRL1: - return s->vcore[reg]; + case MENELAUS_VCORE_CTRL1 ... MENELAUS_VCORE_CTRL5: + return s->vcore[addr - MENELAUS_VCORE_CTRL1]; =20 - case MENELAUS_DCDC_CTRL3: reg ++; - case MENELAUS_DCDC_CTRL2: reg ++; - case MENELAUS_DCDC_CTRL1: - return s->dcdc[reg]; - - case MENELAUS_LDO_CTRL8: reg ++; - case MENELAUS_LDO_CTRL7: reg ++; - case MENELAUS_LDO_CTRL6: reg ++; - case MENELAUS_LDO_CTRL5: reg ++; - case MENELAUS_LDO_CTRL4: reg ++; - case MENELAUS_LDO_CTRL3: reg ++; - case MENELAUS_LDO_CTRL2: reg ++; - case MENELAUS_LDO_CTRL1: - return s->ldo[reg]; + case MENELAUS_DCDC_CTRL1 ... MENELAUS_DCDC_CTRL3: + return s->dcdc[addr - MENELAUS_DCDC_CTRL1]; + + case MENELAUS_LDO_CTRL1 ... MENELAUS_LDO_CTRL8: + return s->ldo[addr - MENELAUS_LDO_CTRL1]; =20 - case MENELAUS_SLEEP_CTRL2: reg ++; case MENELAUS_SLEEP_CTRL1: - return s->sleep[reg]; + case MENELAUS_SLEEP_CTRL2: + return s->sleep[addr - MENELAUS_SLEEP_CTRL1]; =20 case MENELAUS_DEVICE_OFF: return 0; @@ -395,10 +381,8 @@ static uint8_t menelaus_read(void *opaque, uint8_t add= r) case MENELAUS_S2_PULL_DIR: return s->pull[3]; =20 - case MENELAUS_MCT_CTRL3: reg ++; - case MENELAUS_MCT_CTRL2: reg ++; - case MENELAUS_MCT_CTRL1: - return s->mmc_ctrl[reg]; + case MENELAUS_MCT_CTRL1 ... MENELAUS_MCT_CTRL3: + return s->mmc_ctrl[addr - MENELAUS_MCT_CTRL1]; case MENELAUS_MCT_PIN_ST: /* TODO: return the real Card Detect */ return 0; @@ -418,7 +402,6 @@ static void menelaus_write(void *opaque, uint8_t addr, = uint8_t value) { MenelausState *s =3D (MenelausState *) opaque; int line; - int reg =3D 0; struct tm tm; =20 switch (addr) { @@ -496,9 +479,9 @@ static void menelaus_write(void *opaque, uint8_t addr, = uint8_t value) s->ldo[7] =3D value & 3; break; =20 - case MENELAUS_SLEEP_CTRL2: reg ++; case MENELAUS_SLEEP_CTRL1: - s->sleep[reg] =3D value; + case MENELAUS_SLEEP_CTRL2: + s->sleep[addr - MENELAUS_SLEEP_CTRL1] =3D value; break; =20 case MENELAUS_DEVICE_OFF: --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608158394; cv=none; d=zohomail.com; s=zohoarc; b=lX/tRBFfyPvllxlimMau/f2jePbXFDjimvEvYSHAqUxSfa/ui3vZgGRwPdKpM5BNqWuo3A5jBkd10stMHRoXYf0JprjQlepdxOv0CeTh8r8fJzh6m5ZUjAKEqL4JVXT75oS1q0y3l3gLtrOoJAxmqiVvHgosLywkayUzvk56UeQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608158394; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nZQfHykoTAnWq6BRd1NsCrVd5DVh1QMstHYsQhrpMo4=; b=HsUN7GcL5Pj3JC1WZ4LgiZVGByjR+igF6FfzMuB/Zj0YMetv7lQnIpSLlIGK9JetFnO6zF4BzxX9IiIlmLR36xlRb3KEtBJim4IJZVPggmMiSV4/02P7WvrpkplpdUxPZBu7oLZw6FQXmIBj+OmfqJ7qcMTjdfWV9li4E07NwBc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608158394620305.8056232902169; Wed, 16 Dec 2020 14:39:54 -0800 (PST) Received: from localhost ([::1]:60906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpafy-00020D-DM for importer@patchew.org; Wed, 16 Dec 2020 12:33:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpacu-0008Uj-TG for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:41793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpacq-00014r-O9 for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:12 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-390-alewVLyXM-mIYGRBPP32XA-1; Wed, 16 Dec 2020 12:30:05 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 830F3C73AC; Wed, 16 Dec 2020 17:30:03 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06F9A10021B3; Wed, 16 Dec 2020 17:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nZQfHykoTAnWq6BRd1NsCrVd5DVh1QMstHYsQhrpMo4=; b=NoJ28S7eIsPJ22FG7mXxe5ATRfMriFeU2XZZOqOQ5wjwqXdd4sV94aN15NbAkbj2kv+NZT SsA1+g7mjj/APkJEXv3CgA7A30FnnTZHTJ7Fp1BWSHlSgdf4HI2XXGixBVJHybxuyju3OL 7yQxG8iz/4pMKtoLi8+ddC/zo0L4v+M= X-MC-Unique: alewVLyXM-mIYGRBPP32XA-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 04/12] hw/timer/renesas_tmr: silence the compiler warnings Date: Wed, 16 Dec 2020 18:29:41 +0100 Message-Id: <20201216172949.57380-5-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Chen Qun When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: ../hw/timer/renesas_tmr.c: In function =E2=80=98tmr_read=E2=80=99: ../hw/timer/renesas_tmr.c:221:19: warning: this statement may fall through = [-Wimplicit-fallthrough=3D] 221 | } else if (ch =3D=3D 0) {i | ^ ../hw/timer/renesas_tmr.c:224:5: note: here 224 | case A_TCORB: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun Signed-off-by: Thomas Huth Message-Id: <20201211152426.350966-5-thuth@redhat.com> Signed-off-by: Thomas Huth --- hw/timer/renesas_tmr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/timer/renesas_tmr.c b/hw/timer/renesas_tmr.c index 446f2eacdd..e03a8155b2 100644 --- a/hw/timer/renesas_tmr.c +++ b/hw/timer/renesas_tmr.c @@ -221,6 +221,7 @@ static uint64_t tmr_read(void *opaque, hwaddr addr, uns= igned size) } else if (ch =3D=3D 0) { return concat_reg(tmr->tcora); } + /* fall through */ case A_TCORB: if (size =3D=3D 1) { return tmr->tcorb[ch]; --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608153616; cv=none; d=zohomail.com; s=zohoarc; b=Uz1kPsGrdaZDNb4eIh5ThphVe7D/bTsG+WRtUoKAA1grPwJAOs5JRfSFRXOl5JFBFeLdFcHmbKjYlWrIjwhs/57+O8Gz6fTJAHulC3uJFh3BcD6jsDznQGna6y5TuIhDIVkr3RoGoDBYyNBvcEk0c2s7IjDGN5K7akyVy01bux0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608153616; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4o7enOJhfGQhYZW5tw/osEf8m1Un/eK6CpZQot16IZg=; b=JCxS4VV4kJTvKsfJC2+xqx1uNddDWxeSM9vpdUrMfi6LmpwkSenESXKF/U3Zr/pnMR375UzW5kbPWOpPmrCK0W68SYoGSnppppst2vCGtTLa7IqWODmGPMDzXI8pS9fWMaAwf4o8nfUsKRYTC+YhlFHmOjuafeK6ScrYX0G+Wu8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160815361614530.839643736052608; Wed, 16 Dec 2020 13:20:16 -0800 (PST) Received: from localhost ([::1]:41298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpaj9-0005jZ-II for importer@patchew.org; Wed, 16 Dec 2020 12:36:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpad0-00005y-Kv for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpacu-00015N-KX for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:18 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-169-8D3ePYu6Pa-VBzPLrCwk8A-1; Wed, 16 Dec 2020 12:30:06 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 595B6800D62; Wed, 16 Dec 2020 17:30:05 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 025C210016F4; Wed, 16 Dec 2020 17:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4o7enOJhfGQhYZW5tw/osEf8m1Un/eK6CpZQot16IZg=; b=LVxB9BAjGiLIefS8hdXa0DXEYWGHgTX8D+uhD0cMcq9/uuf4uWHdWW90MeU6Q6GZra+SdX X3AfL6CZrPy3SysUMlyiINo5RyGNjNR4gXGBDwg75aYX2d6LqEOJxzm7fQXz71Ec9gWp76 5k3S/CmXjAUQ1dBmcFUC9Zj60vqNiTo= X-MC-Unique: 8D3ePYu6Pa-VBzPLrCwk8A-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 05/12] target/i386: silence the compiler warnings in gen_shiftd_rm_T1 Date: Wed, 16 Dec 2020 18:29:42 +0100 Message-Id: <20201216172949.57380-6-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Chen Qun The current "#ifdef TARGET_X86_64" statement affects the compiler's determination of fall through. When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: target/i386/translate.c: In function =E2=80=98gen_shiftd_rm_T1=E2=80=99: target/i386/translate.c:1773:12: warning: this statement may fall through [= -Wimplicit-fallthrough=3D] if (is_right) { ^ target/i386/translate.c:1782:5: note: here case MO_32: ^~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Message-Id: <20201211152426.350966-6-thuth@redhat.com> Signed-off-by: Thomas Huth --- target/i386/translate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index e8f5f5803a..25fec8a150 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -1777,9 +1777,12 @@ static void gen_shiftd_rm_T1(DisasContext *s, MemOp = ot, int op1, } else { tcg_gen_deposit_tl(s->T1, s->T0, s->T1, 16, 16); } - /* FALLTHRU */ -#ifdef TARGET_X86_64 + /* + * If TARGET_X86_64 defined then fall through into MO_32 case, + * otherwise fall through default case. + */ case MO_32: +#ifdef TARGET_X86_64 /* Concatenate the two 32-bit values and use a 64-bit shift. */ tcg_gen_subi_tl(s->tmp0, count, 1); if (is_right) { --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608157814; cv=none; d=zohomail.com; s=zohoarc; b=DDc4DKlCZ+1nzH7eIgYo6h1SAhRbYYW1S9NvwdhrMCoIYC0UE5ywTbtUE/S68hx/Yk0mkyHAf6Bs7k5m873i+wmOtiTvR5kcWMAvX5gaZ3ofSUQkKgopDTubO/3c2mErrVkjDxcGhgFnnLs5sU3ZdGyjPQZI1ZbrJ/XH7fmfzSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608157814; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Jytzp0jZljpDHmO/3Sn+8N+F9wtCupmLHkpMFRtsdkI=; b=BuiW8XCnGXjYNpXlVj+Af0tbiafJYG6jzKdXoHHE6OeVnB3UBCHutJdon5TPY2wKu8qcHEtczojSvbzd+qfSEtc3IbA4YpOjshsRmA5H5FKuGxsM2zWCWw8Gbgv7RedxCu06tCR20wrGxBeA4Zv9FRlzhJ7oUpWrO4o5ndpN5so= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608157814517686.0776347811078; Wed, 16 Dec 2020 14:30:14 -0800 (PST) Received: from localhost ([::1]:41238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpaj8-0005iE-Nn for importer@patchew.org; Wed, 16 Dec 2020 12:36:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpad3-00008H-1v for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:22 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpacu-00015I-K2 for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:20 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-461-SmhtMDjaPuykdLEiSfBvOw-1; Wed, 16 Dec 2020 12:30:08 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85EB0180A093; Wed, 16 Dec 2020 17:30:07 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id B745110016F4; Wed, 16 Dec 2020 17:30:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jytzp0jZljpDHmO/3Sn+8N+F9wtCupmLHkpMFRtsdkI=; b=MTrvPkYm2qEIdRQDIAXdrh0S6URCcGRD6JdEkvxYJ64beEARQt3bP9l5PbFnhiWWetFlwA +WsmycnGGZYGUBG6OErSu6hqU/016OvBoi5K7fby6QQNzp6OBeT7Eb0DgCBCU/eudvtEM2 hHtbh30v5cbIEfBSbJXVv8Z4KxkHs/c= X-MC-Unique: SmhtMDjaPuykdLEiSfBvOw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 06/12] hw/intc/arm_gicv3_kvm: silence the compiler warnings Date: Wed, 16 Dec 2020 18:29:43 +0100 Message-Id: <20201216172949.57380-7-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Chen Qun When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: hw/intc/arm_gicv3_kvm.c: In function =E2=80=98kvm_arm_gicv3_put=E2=80=99: hw/intc/arm_gicv3_kvm.c:484:13: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] kvm_gicc_access(s, ICC_AP0R_EL1(1), ncpu, ®64, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/intc/arm_gicv3_kvm.c:485:9: note: here default: ^~~~~~~ hw/intc/arm_gicv3_kvm.c:495:13: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] kvm_gicc_access(s, ICC_AP1R_EL1(2), ncpu, ®64, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/intc/arm_gicv3_kvm.c:496:9: note: here case 6: ^~~~ hw/intc/arm_gicv3_kvm.c:498:13: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] kvm_gicc_access(s, ICC_AP1R_EL1(1), ncpu, ®64, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/intc/arm_gicv3_kvm.c:499:9: note: here default: ^~~~~~~ hw/intc/arm_gicv3_kvm.c: In function =E2=80=98kvm_arm_gicv3_get=E2=80=99: hw/intc/arm_gicv3_kvm.c:634:37: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] c->icc_apr[GICV3_G0][2] =3D reg64; ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ hw/intc/arm_gicv3_kvm.c:635:9: note: here case 6: ^~~~ hw/intc/arm_gicv3_kvm.c:637:37: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] c->icc_apr[GICV3_G0][1] =3D reg64; ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ hw/intc/arm_gicv3_kvm.c:638:9: note: here default: ^~~~~~~ hw/intc/arm_gicv3_kvm.c:648:39: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] c->icc_apr[GICV3_G1NS][2] =3D reg64; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ hw/intc/arm_gicv3_kvm.c:649:9: note: here case 6: ^~~~ hw/intc/arm_gicv3_kvm.c:651:39: warning: this statement may fall through [-= Wimplicit-fallthrough=3D] c->icc_apr[GICV3_G1NS][1] =3D reg64; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ hw/intc/arm_gicv3_kvm.c:652:9: note: here default: ^~~~~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Signed-off-by: Thomas Huth Reviewed-by: Peter Maydell Message-Id: <20201211152426.350966-7-thuth@redhat.com> Signed-off-by: Thomas Huth --- hw/intc/arm_gicv3_kvm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c index 187eb054e0..d040a5d1e9 100644 --- a/hw/intc/arm_gicv3_kvm.c +++ b/hw/intc/arm_gicv3_kvm.c @@ -478,9 +478,11 @@ static void kvm_arm_gicv3_put(GICv3State *s) kvm_gicc_access(s, ICC_AP0R_EL1(3), ncpu, ®64, true); reg64 =3D c->icc_apr[GICV3_G0][2]; kvm_gicc_access(s, ICC_AP0R_EL1(2), ncpu, ®64, true); + /* fall through */ case 6: reg64 =3D c->icc_apr[GICV3_G0][1]; kvm_gicc_access(s, ICC_AP0R_EL1(1), ncpu, ®64, true); + /* fall through */ default: reg64 =3D c->icc_apr[GICV3_G0][0]; kvm_gicc_access(s, ICC_AP0R_EL1(0), ncpu, ®64, true); @@ -492,9 +494,11 @@ static void kvm_arm_gicv3_put(GICv3State *s) kvm_gicc_access(s, ICC_AP1R_EL1(3), ncpu, ®64, true); reg64 =3D c->icc_apr[GICV3_G1NS][2]; kvm_gicc_access(s, ICC_AP1R_EL1(2), ncpu, ®64, true); + /* fall through */ case 6: reg64 =3D c->icc_apr[GICV3_G1NS][1]; kvm_gicc_access(s, ICC_AP1R_EL1(1), ncpu, ®64, true); + /* fall through */ default: reg64 =3D c->icc_apr[GICV3_G1NS][0]; kvm_gicc_access(s, ICC_AP1R_EL1(0), ncpu, ®64, true); @@ -631,9 +635,11 @@ static void kvm_arm_gicv3_get(GICv3State *s) c->icc_apr[GICV3_G0][3] =3D reg64; kvm_gicc_access(s, ICC_AP0R_EL1(2), ncpu, ®64, false); c->icc_apr[GICV3_G0][2] =3D reg64; + /* fall through */ case 6: kvm_gicc_access(s, ICC_AP0R_EL1(1), ncpu, ®64, false); c->icc_apr[GICV3_G0][1] =3D reg64; + /* fall through */ default: kvm_gicc_access(s, ICC_AP0R_EL1(0), ncpu, ®64, false); c->icc_apr[GICV3_G0][0] =3D reg64; @@ -645,9 +651,11 @@ static void kvm_arm_gicv3_get(GICv3State *s) c->icc_apr[GICV3_G1NS][3] =3D reg64; kvm_gicc_access(s, ICC_AP1R_EL1(2), ncpu, ®64, false); c->icc_apr[GICV3_G1NS][2] =3D reg64; + /* fall through */ case 6: kvm_gicc_access(s, ICC_AP1R_EL1(1), ncpu, ®64, false); c->icc_apr[GICV3_G1NS][1] =3D reg64; + /* fall through */ default: kvm_gicc_access(s, ICC_AP1R_EL1(0), ncpu, ®64, false); c->icc_apr[GICV3_G1NS][0] =3D reg64; --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608148097; cv=none; d=zohomail.com; s=zohoarc; b=hEqY7VcAoPmdFzZdFSOQSN815OVpByE0cI9BPMfd3bMZTtbjIPXZ4lj6JDu1SKdkxnEqweMC0aUmX631l3YsHxj/v0LJg3NfuGaluSFtriKozd1s8w20lHnkXc5EiEhYrnFGgGPCdZMU1sheR5sqjwcKjbGsKFnkB5wAu/18o6c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608148097; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nUDFlgcpQ5tFyhOH/LQ0XFhk0T8uOd/wbZkgpzLNLp4=; b=nlX65p9/PC5sRnhckANoJUkqSJgFFQ9Rh3fXFKbWtBgg3hfCiD2MjcHXChJVycn9gwNoe9VyOmhIauvk8fc2f5tRUP8+WIoh57X7xoNfgjq86gbfdXVar6evyjptbox9axnhfGOU2tGEFIVtFn3DMHkwkb8raJEULaoPdNToxA8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608148097500934.8836449899043; Wed, 16 Dec 2020 11:48:17 -0800 (PST) Received: from localhost ([::1]:49922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpamT-00010J-Mc for importer@patchew.org; Wed, 16 Dec 2020 12:40:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpad8-00009u-Q3 for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:26 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27816) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpacw-00015e-J0 for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:26 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-155-SFBjUEDOPY6phrezKEl2-w-1; Wed, 16 Dec 2020 12:30:10 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74F8410054FF; Wed, 16 Dec 2020 17:30:09 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0DC610016F5; Wed, 16 Dec 2020 17:30:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nUDFlgcpQ5tFyhOH/LQ0XFhk0T8uOd/wbZkgpzLNLp4=; b=CT50UQ/setwd22ptlDN0et067uY54+TfQUe/h61b2Prd/W7jy0R9UKV6FA7bv+1Ch5m9X6 mY15U+VuiDTKEpYWf5UmWNv80+dswGZSGMuTsd3bcy0x1xvEsgHNqE10pqD7V+V8sJb5YQ hnGpxwi/MGVoMeFRB2wHLB5QmnIvujw= X-MC-Unique: SFBjUEDOPY6phrezKEl2-w-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 07/12] accel/tcg/user-exec: silence the compiler warnings Date: Wed, 16 Dec 2020 18:29:44 +0100 Message-Id: <20201216172949.57380-8-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Chen Qun When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: ../accel/tcg/user-exec.c: In function =E2=80=98handle_cpu_signal=E2=80=99: ../accel/tcg/user-exec.c:169:13: warning: this statement may fall through [= -Wimplicit-fallthrough=3D] 169 | cpu_exit_tb_from_sighandler(cpu, old_set); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../accel/tcg/user-exec.c:172:9: note: here 172 | default: Mark the cpu_exit_tb_from_sighandler() function with QEMU_NORETURN to fix i= t. Reported-by: Euler Robot Signed-off-by: Chen Qun Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Alex Benn=C3=A9e Message-Id: <20201211152426.350966-8-thuth@redhat.com> Signed-off-by: Thomas Huth --- accel/tcg/user-exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 4ebe25461a..293ee86ea4 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -49,7 +49,8 @@ __thread uintptr_t helper_retaddr; /* exit the current TB from a signal handler. The host registers are restored in a state compatible with the CPU emulator */ -static void cpu_exit_tb_from_sighandler(CPUState *cpu, sigset_t *old_set) +static void QEMU_NORETURN cpu_exit_tb_from_sighandler(CPUState *cpu, + sigset_t *old_set) { /* XXX: use siglongjmp ? */ sigprocmask(SIG_SETMASK, old_set, NULL); --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608159059; cv=none; d=zohomail.com; s=zohoarc; b=D0FVJN1+D0zp1v1EBQiyEvJNzkiQ8hTxwsx8ERIBowAj3UVJQWT6daO4hX9bghkoBJFig+iyL/O7xmL96QqeVNyWTEPFfa6xt4fMH/IJ8dylToAMayI44jikcuMCPUpDp5K6hDQK7/j6fbPVjztdS3sSpwqZUYLZ0cW5YNuwjHg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608159059; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0CIH7+enPyw1ZYJZrF4HIltd7PcnsRieLkaa7z7IeIU=; b=QwOcKSS2V9gR5tyhpibUQSEL7cLIzOfcJCz4V7wvYpc9/iPeCCUxswdM7XWUt1z113cbAKi+P11WXnoP3GwZ4DhEaASo922Dp08+hqWsSxeS1vU6THx751ouUsmkvjN5hgbRb6HTakSW2Du/pR0jwwiPcmXWqvUWRmXgJNfEkuE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608159059410646.0878981206636; Wed, 16 Dec 2020 14:50:59 -0800 (PST) Received: from localhost ([::1]:58014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpaod-0004VY-Ji for importer@patchew.org; Wed, 16 Dec 2020 12:42:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpadH-0000K0-49 for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:53657) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpadF-000192-Gl for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:34 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-owJq2X8FO-W28iFGbPPbJw-1; Wed, 16 Dec 2020 12:30:13 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 829B3C73A0; Wed, 16 Dec 2020 17:30:11 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB23410016F4; Wed, 16 Dec 2020 17:30:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0CIH7+enPyw1ZYJZrF4HIltd7PcnsRieLkaa7z7IeIU=; b=DDgYQ7DG2th4lv/JtnPXY7V9yUwDacY+5txBlJ2ZW+3xZ5IoqqEfFc1yPFsocvBqZJGYOB YA1hwDYTOonBk2IZHfarO3fUql1Ak30fqPNOAeWJ9U+wRkBDH8303+VOUGnwmNaJu7kujz j4I5X5GK6+q//qiICbTWh7wgYh1aoNs= X-MC-Unique: owJq2X8FO-W28iFGbPPbJw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 08/12] target/sparc/translate: silence the compiler warnings Date: Wed, 16 Dec 2020 18:29:45 +0100 Message-Id: <20201216172949.57380-9-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Chen Qun When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: target/sparc/translate.c: In function =E2=80=98gen_st_asi=E2=80=99: target/sparc/translate.c:2320:12: warning: this statement may fall through = [-Wimplicit-fallthrough=3D] 2320 | if (!(dc->def->features & CPU_FEATURE_HYPV)) { | ^ target/sparc/translate.c:2329:5: note: here 2329 | case GET_ASI_DIRECT: | ^~~~ The "fall through" statement place is not correctly identified by the compi= ler. Reported-by: Euler Robot Signed-off-by: Chen Qun Signed-off-by: Thomas Huth Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20201211152426.350966-9-thuth@redhat.com> Signed-off-by: Thomas Huth --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 30c73f8d2e..4bfa3179f8 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2324,8 +2324,8 @@ static void gen_st_asi(DisasContext *dc, TCGv src, TC= Gv addr, } /* in OpenSPARC T1+ CPUs TWINX ASIs in store instructions * are ST_BLKINIT_ ASIs */ - /* fall through */ #endif + /* fall through */ case GET_ASI_DIRECT: gen_address_mask(dc, addr); tcg_gen_qemu_st_tl(src, addr, da.mem_idx, da.memop); --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608157914; cv=none; d=zohomail.com; s=zohoarc; b=PoWaMb0fOwLlMt+IFM4kkWxOmu+9kHAxgNxk6cSg2XZqYDUjmNHDP14YUK5XXeZzAcYt9j2IIa0YNoU4iK74DgpFQnwAhkiGlJm8sjwp+7MnfJ/t46Yll//Sec2edKfIi4pomSFIkTUnaoXivOqKJhqecf5g7oD4xyhHjVnQhPw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608157914; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pdUbxTX+q6YKRPARrZpe1fhHGFVxbcfXLLGU7vrquUY=; b=gd95CaVpEr1sAGCSuLM8GwqT9i1AbRdAJnBXVYerX4Sxe5IJ5o+X37MhKdzFnLUH46SKMV5M95bU9KGAUXGhmwOmH2GOEcKZLCU921WmW9cOc5kdaKTVMUQgWhPx7eoCEwCPn4ICBHlxkuo7vaYYERrtBbotR+iRYGz4ISYe16o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16081579149801020.9850430500546; Wed, 16 Dec 2020 14:31:54 -0800 (PST) Received: from localhost ([::1]:50944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpamf-0001Pg-Bd for importer@patchew.org; Wed, 16 Dec 2020 12:40:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpad8-00009o-41 for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:26 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:54635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpad0-000171-BH for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:24 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-566-_CpI4VY8OiOkSU8khnpRew-1; Wed, 16 Dec 2020 12:30:15 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D922E180A086; Wed, 16 Dec 2020 17:30:13 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0934A10016F4; Wed, 16 Dec 2020 17:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pdUbxTX+q6YKRPARrZpe1fhHGFVxbcfXLLGU7vrquUY=; b=DVuwUMGaXtonYb7s2h4roop5HcWvXaG8dB50Y5+6PIdveVKvH9Z2XxgWlxrpzWDmMeKJ5c 1V8DfwGtaFrdOq4Jv5NCdwoLWeY30aW39o/SBOEGki9NVe2KPz72ajU+5VngJweCa0o9C+ HZptRuXjqKzoRVM38PLV/nJ13KDa2Zk= X-MC-Unique: _CpI4VY8OiOkSU8khnpRew-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 09/12] target/sparc/win_helper: silence the compiler warnings Date: Wed, 16 Dec 2020 18:29:46 +0100 Message-Id: <20201216172949.57380-10-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Chen Qun When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warnin= g: target/sparc/win_helper.c: In function =E2=80=98get_gregset=E2=80=99: target/sparc/win_helper.c:304:9: warning: this statement may fall through [= -Wimplicit-fallthrough=3D] 304 | trace_win_helper_gregset_error(pstate); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ target/sparc/win_helper.c:306:5: note: here 306 | case 0: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun Signed-off-by: Thomas Huth Reviewed-by: Artyom Tarasenko Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20201211152426.350966-10-thuth@redhat.com> Signed-off-by: Thomas Huth --- target/sparc/win_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c index 5b57892a10..3a7c0ff943 100644 --- a/target/sparc/win_helper.c +++ b/target/sparc/win_helper.c @@ -302,7 +302,7 @@ static inline uint64_t *get_gregset(CPUSPARCState *env,= uint32_t pstate) switch (pstate) { default: trace_win_helper_gregset_error(pstate); - /* pass through to normal set of global registers */ + /* fall through to normal set of global registers */ case 0: return env->bgregs; case PS_AG: --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608157952; cv=none; d=zohomail.com; s=zohoarc; b=dSqujn25vMT8jckLDi40abH580pQSPXl4HvQw/euAXb/eNvUKeVb/UGIBarfluU/9dNfo/sYM2Kz5hQIX64mT4hnChjTHwkPGmfPUh0lVzlgBmnhDA3Mr9ZgVFFWYwp6t8lp9TnED9maWG8r/z9jwCJu1MlVdAu6WfLQJ9WtAOU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608157952; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mgAzG+5FM79lHfJRIIMj/P/qXojudU28ll/oBXTxbeo=; b=MOFiIjlKdsei9kzQXPle7z3CFo/Wr2m67c8hcszy5CRtKTmjNJLF0lpSxx9RCMVBFjbBisoT8K/7IIu53uoLSiW3NvTDPSKwSGo3uJ3VkU98hkdQRJ3S/pzm8KDqzSaXyASG1U5x1ISiaztlzgQBV8VHwfcNKB8pIY9Ea0x03gA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608157952404638.1078562358653; Wed, 16 Dec 2020 14:32:32 -0800 (PST) Received: from localhost ([::1]:58932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpaoo-0004sJ-WD for importer@patchew.org; Wed, 16 Dec 2020 12:42:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpadE-0000CX-7q for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:39111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpad2-00017S-Nv for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:31 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-200-bLk2IA_sNcmG6uID8gcp-A-1; Wed, 16 Dec 2020 12:30:17 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 553BB10054FF; Wed, 16 Dec 2020 17:30:16 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7777410023B2; Wed, 16 Dec 2020 17:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mgAzG+5FM79lHfJRIIMj/P/qXojudU28ll/oBXTxbeo=; b=aIt40cp1xgVkM6HVbg76CDKRVhTR3r3B38PvPQUVfVqPsNnDsGfWcq3wh9B/X4yrWf6ywB l+Ei33m77GysEaEjuOiePiBOcTL7VvrjEFY5ucPetpKVthv1BIbbqAQOKQZWeoeuvXi6ku Hm2fUDWfGXGbArNw2MhI//Zg8syeWbE= X-MC-Unique: bLk2IA_sNcmG6uID8gcp-A-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 10/12] tcg/optimize: Add fallthrough annotations Date: Wed, 16 Dec 2020 18:29:47 +0100 Message-Id: <20201216172949.57380-11-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" To be able to compile this file with -Werror=3Dimplicit-fallthrough, we need to add some fallthrough annotations to the case statements that might fall through. Unfortunately, the typical "/* fallthrough */" comments do not work here as expected since some case labels are wrapped in macros and the compiler fails to match the comments in this case. But using __attribute__((fallthrough)) seems to work fine, so let's use that instead (by introducing a new QEMU_FALLTHROUGH macro in our compiler.h header file). Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20201211152426.350966-11-thuth@redhat.com> Signed-off-by: Thomas Huth --- include/qemu/compiler.h | 11 +++++++++++ tcg/optimize.c | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 1b9e58e82b..df9ec08f8a 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -222,4 +222,15 @@ extern void QEMU_NORETURN QEMU_ERROR("code path is rea= chable") #define qemu_build_not_reached() g_assert_not_reached() #endif =20 +/** + * In most cases, normal "fallthrough" comments are good enough for + * switch-case statements, but sometimes the compiler has problems + * with those. In that case you can use QEMU_FALLTHROUGH instead. + */ +#if __has_attribute(fallthrough) +# define QEMU_FALLTHROUGH __attribute__((fallthrough)) +#else +# define QEMU_FALLTHROUGH do {} while (0) /* fallthrough */ +#endif + #endif /* COMPILER_H */ diff --git a/tcg/optimize.c b/tcg/optimize.c index 220f4601d5..7ca71de956 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -855,6 +855,7 @@ void tcg_optimize(TCGContext *s) if ((arg_info(op->args[1])->mask & 0x80) !=3D 0) { break; } + QEMU_FALLTHROUGH; CASE_OP_32_64(ext8u): mask =3D 0xff; goto and_const; @@ -862,6 +863,7 @@ void tcg_optimize(TCGContext *s) if ((arg_info(op->args[1])->mask & 0x8000) !=3D 0) { break; } + QEMU_FALLTHROUGH; CASE_OP_32_64(ext16u): mask =3D 0xffff; goto and_const; @@ -869,6 +871,7 @@ void tcg_optimize(TCGContext *s) if ((arg_info(op->args[1])->mask & 0x80000000) !=3D 0) { break; } + QEMU_FALLTHROUGH; case INDEX_op_ext32u_i64: mask =3D 0xffffffffU; goto and_const; @@ -886,6 +889,7 @@ void tcg_optimize(TCGContext *s) if ((arg_info(op->args[1])->mask & 0x80000000) !=3D 0) { break; } + QEMU_FALLTHROUGH; case INDEX_op_extu_i32_i64: /* We do not compute affected as it is a size changing op. */ mask =3D (uint32_t)arg_info(op->args[1])->mask; --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608158143; cv=none; d=zohomail.com; s=zohoarc; b=ItLm2yDdszyn2jHHMAWFvImG9pnv2DP3mY10vbFZqVjY9M+CJyIDzJlCVm2aWpn25xMKDagUwOOJK8IgNhPycQemQs6NbZ74hG6BOptsbpYiKU/h0nleL5/pOTjYmzSZq/3QU0Ej0CmWv+4jJwqTom8VqirHWSWi2FvnPSzPK6w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608158143; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2vYvGwMwqMStPDkJC7KcHOqt4Xr8Mi7gdMqIA3soAO0=; b=OTNSa013bx8IoGfMXA6+sW8WClHoAwUXwCXu36Lne1rRCIF3bKcRZh5ktl25sKXBP4t228mll6zOvR4ukpHZAKz7rbeSbHY1ZFSF5SmwmoMdGina/ZpjjqrhniLlJo+9xj6cn/uioyH1+a7iwQkoOUQk8A34zGoaeeZehWhOev0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608158143050673.8433134150081; Wed, 16 Dec 2020 14:35:43 -0800 (PST) Received: from localhost ([::1]:57566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpaoX-0004KO-1M for importer@patchew.org; Wed, 16 Dec 2020 12:42:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpadD-0000CS-NN for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57157) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpad6-000180-If for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:31 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-223-XyEvfrZ9Muut-BbOi9FnPA-1; Wed, 16 Dec 2020 12:30:20 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CCCAB8144E5; Wed, 16 Dec 2020 17:30:18 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id EBB3610016F4; Wed, 16 Dec 2020 17:30:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2vYvGwMwqMStPDkJC7KcHOqt4Xr8Mi7gdMqIA3soAO0=; b=jF09z4Gl2lWsLSIKicLetU8gUHpgB24jjUtBwxOmwMkOFcpm8trlcxlcdgA80LHNmTCWgK iRBIwXKAR5etbPS53Z/5N1slRNxx1GtXy5qKK8zmEM2On6DhFF+z1WrSH7OlFAlS0SSmPG YDw3bTnZOZpVIcQxkZnqhuDSu+jXGt8= X-MC-Unique: XyEvfrZ9Muut-BbOi9FnPA-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 11/12] tests/fp: Do not emit implicit-fallthrough warnings in the softfloat tests Date: Wed, 16 Dec 2020 18:29:48 +0100 Message-Id: <20201216172949.57380-12-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The softfloat tests are external repositories, so we do not care about implicit fallthrough warnings in this code. Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Reviewed-by: Chen Qun Message-Id: <20201211152426.350966-12-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/fp/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/fp/meson.build b/tests/fp/meson.build index 3d4fb00f9d..8d739c4d59 100644 --- a/tests/fp/meson.build +++ b/tests/fp/meson.build @@ -27,6 +27,7 @@ tfdir =3D 'berkeley-testfloat-3/source' sfinc =3D include_directories(sfdir / 'include', sfspedir) =20 tfcflags =3D [ + '-Wno-implicit-fallthrough', '-Wno-strict-prototypes', '-Wno-unknown-pragmas', '-Wno-uninitialized', @@ -209,6 +210,7 @@ libtestfloat =3D static_library( ) =20 sfcflags =3D [ + '-Wno-implicit-fallthrough', '-Wno-missing-prototypes', '-Wno-redundant-decls', '-Wno-return-type', --=20 2.27.0 From nobody Mon May 20 23:40:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608158470; cv=none; d=zohomail.com; s=zohoarc; b=SmdyEP7klTEOEmkjQbM0Er9594xq2DzxJsveylRGvshAnER8nTHyntiImDOn4Ccz1oW6wPN36GROr4ModKrtDKlgJTDiqH4LNqiytVs3FolvurN6nmhYo71OPSsPbf77TXSYfMwTZG1qEA9QCAy6gFSt2Bc5rzbFirNbyafH3Eg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608158470; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u0HRKXuzgfqTIQczh54KMzigvc9aTCz2Kkmi+FSZ8Go=; b=T860B9c1iVSdqCvnLEK/tVgR6B/NYaQXgdfYkRNZCcSFzC4IjhePWyQ1p6rECQO4VI+u07eyAgaRSxSrdChR5HBeFnbt/iOm3sWDHLRVcIjiTeMO7SwuXlCQrKgO7qwI8Luc27wkphZdedBV1IllqOM6oyqglX5CZ2C4ZCczLt4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608158470489298.76851046704326; Wed, 16 Dec 2020 14:41:10 -0800 (PST) Received: from localhost ([::1]:49838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpamR-0000y8-13 for importer@patchew.org; Wed, 16 Dec 2020 12:40:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpadF-0000CU-2v for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:33 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:34843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpad7-00018A-TM for qemu-devel@nongnu.org; Wed, 16 Dec 2020 12:30:31 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-472-ZouQofccMdG-qYCvnBtK4A-1; Wed, 16 Dec 2020 12:30:22 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E1A5A107ACE3; Wed, 16 Dec 2020 17:30:20 +0000 (UTC) Received: from thuth.com (ovpn-113-7.ams2.redhat.com [10.36.113.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 727DD10016F4; Wed, 16 Dec 2020 17:30:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608139824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u0HRKXuzgfqTIQczh54KMzigvc9aTCz2Kkmi+FSZ8Go=; b=XBdlwmNX/T6pnZVVVNDJ0FyhIz1xW4JsOgFxRSAAWt2g4FIoKHEQ8SvSuWDmQJ4P7uRnqF KWB4zaSEFy8QseR3xzO/bl/i4sfDvusChUwnDdXgGLCdgkR8giT0DvvxJk+GYyNRUcZnrf IETm08GtqdZyjA6DywdEKV+m6Q/dkf8= X-MC-Unique: ZouQofccMdG-qYCvnBtK4A-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 12/12] configure: Compile with -Wimplicit-fallthrough=2 Date: Wed, 16 Dec 2020 18:29:49 +0100 Message-Id: <20201216172949.57380-13-thuth@redhat.com> In-Reply-To: <20201216172949.57380-1-thuth@redhat.com> References: <20201216172949.57380-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen Qun , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Coverity always complains about switch-case statements that fall through the next one when there is no comment in between - which could indicate a forgotten "break" statement. Instead of handling these issues after they have been committed, it would be better to avoid them in the build process already. Thus let's enable the -Wimplicit-fallthrough warning now. The "=3D2" level seems to be a good compromise between being too strict and too generic about the possible comments, so we'll start with "=3D2" for now. Signed-off-by: Thomas Huth Reviewed-by: Chen Qun Reviewed-by: Peter Maydell Message-Id: <20201211152426.350966-13-thuth@redhat.com> Signed-off-by: Thomas Huth --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index c228f7c21e..881af4b6be 100755 --- a/configure +++ b/configure @@ -2023,6 +2023,7 @@ add_to warn_flags -Wempty-body add_to warn_flags -Wnested-externs add_to warn_flags -Wendif-labels add_to warn_flags -Wexpansion-to-defined +add_to warn_flags -Wimplicit-fallthrough=3D2 =20 nowarn_flags=3D add_to nowarn_flags -Wno-initializer-overrides --=20 2.27.0