From nobody Sun May 19 06:04:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1598274160; cv=none; d=zohomail.com; s=zohoarc; b=kO3xz2E0yO2nkN1R8yjRLEYvlNUT0Y09/S31Q/wMUm8S0EC11t/ZScm8ZXteQ3wcRfKBD24Z7Z8ano3cJ2Cfkgd7pzkUusEr3nmWxEz57DYpoFkbAWtx8xkEAgkaSeMLmIyC93Uo1ttGkrobZjBV0nXMKXbWrs+W/JBGGXnBS2U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598274160; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=esL1dkHZinACs22qmxIaFrjRQ3jGjWpeBvTqQ19GGJ8=; b=SUdS6aBKWFomi9tG7DVnkyqKXy8vh9x5XsKhzU1eZXp1C7u87IXX+4a3FRbKbDQSsAGIClmOfgVeYAUHD+x5Zlni567iNufbquDgpc8UyZFMAQ2w+jjaj42cQiGz1OAABgYBTF3TihezU1VBIrHtWsDLZOS1oDRMInTHgsGwcpg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail 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 1598274160817404.03774902759244; Mon, 24 Aug 2020 06:02:40 -0700 (PDT) Received: from localhost ([::1]:48020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAC7S-0003hU-Mk for importer@patchew.org; Mon, 24 Aug 2020 09:02:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAC6e-0003FE-4E for qemu-devel@nongnu.org; Mon, 24 Aug 2020 09:01:48 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:48969 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kAC6c-0006wN-E5 for qemu-devel@nongnu.org; Mon, 24 Aug 2020 09:01:47 -0400 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-44-WEYbk-JXNlGKI9cGCSlJOA-1; Mon, 24 Aug 2020 09:01:18 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 91C8380F043; Mon, 24 Aug 2020 13:01:17 +0000 (UTC) Received: from thuth.com (ovpn-114-8.ams2.redhat.com [10.36.114.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 514FF5D9E4; Mon, 24 Aug 2020 13:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598274105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type; bh=esL1dkHZinACs22qmxIaFrjRQ3jGjWpeBvTqQ19GGJ8=; b=d2mHlBoFa+3hJuoUtN+XP/teVi7Eq1vNxsHfScyJwqcg8DSEmepsWihnW2bUCHcnm2cx1U 3mOmkihXoMBCVYig5ub0m2PbvMgp8+qmKU6wlb8CIR6W8Ga8sgnegM+wB6lU+253t+txi5 i9GiJgIwn78Ff0enIxUZtgGoIwIpLyc= X-MC-Unique: WEYbk-JXNlGKI9cGCSlJOA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PATCH] disas/libvixl: Fix fall-through annotation for GCC >= 7 Date: Mon, 24 Aug 2020 15:01:14 +0200 Message-Id: <20200824130114.41368-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com 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=205.139.110.61; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/24 03:41:06 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.956, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: qemu-arm@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 --- 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.18.2