From nobody Mon Feb 9 15:29:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1566110481; cv=none; d=zoho.com; s=zohoarc; b=OkT8NwkGCbOtWPYl+7Wk9pFXtbBtYHoxYCwfgCmLLMP4kRpHQI6R7fhJc0CeRlqTQdogOP7lRv+mGHCZiUeAry1Lwx/8X17N+EimJP8dgGPNduvmoJ8fxe1vjvF5+jYIln/0RKsF7Fy2R87fEB7n4IOck/uFlODDv1OIOdgXWBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566110481; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ndW1MBgJZz0GTxmVD7WEDsm+sYC3ktueJpfSWfiaaTM=; b=oJ1wD3+Sqyk8KCSoLwfMoYA329hhPWASYRsiTaEuigEdKDtzZeZ+J1mmF7zL1snkk4OACndfGwRdb4Tg00rQ7aB1kMvxY7oxF9MHSwLRuXRX18bnioBJk8Hmw6/oyHvsUcuf4eqKUojVsDeSISP24AjQqaA5fd0ZyGlI1e66EIw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1566110481051334.3253702717569; Sat, 17 Aug 2019 23:41:21 -0700 (PDT) Received: from localhost ([::1]:39470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzEsO-0006Pm-5T for importer@patchew.org; Sun, 18 Aug 2019 02:41:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36390) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzErF-00056J-NH for qemu-devel@nongnu.org; Sun, 18 Aug 2019 02:40:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzErE-0000k7-Ev for qemu-devel@nongnu.org; Sun, 18 Aug 2019 02:40:05 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:53149) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzErE-0000jl-9G for qemu-devel@nongnu.org; Sun, 18 Aug 2019 02:40:04 -0400 Received: by mail-wm1-x332.google.com with SMTP id o4so340101wmh.2 for ; Sat, 17 Aug 2019 23:40:04 -0700 (PDT) Received: from cloudburst.Home ([2a02:c7f:a69:1700:8897:9507:94c2:b98d]) by smtp.gmail.com with ESMTPSA id r5sm9015435wmh.35.2019.08.17.23.40.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 23:40:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ndW1MBgJZz0GTxmVD7WEDsm+sYC3ktueJpfSWfiaaTM=; b=qoY56WUDRp6DtmMmltOtCtCTw4MUD/Bv76rI9FOuCrfsHp08pjhiZ2MYi5yxJehjcQ w4e346MZwjgUBxjJmHNW8rSTLlN5uPvPJ0Gv8gtlRQjpTprkmQ3VhHq0y+tpzjhmrlSQ DmYe39POfLI2JSnftP+vCzTolbTgB+7Vl4B5xsDs5JMthov+VfrV16uMWwqyn6DlNs1X V2F+s5WOXScUBu5en1rdPYenF8M0e2F3Cgz8RoB55s6g8bBWD0QFIH2tX8zZ3blq8Z+k gfs9b0eRdPhcLlI7Ee0KKmF/npsP0hiw71wA5K7qWsOvQvX8H9FYaRFZ/Ah8OBuYrQC6 mYUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ndW1MBgJZz0GTxmVD7WEDsm+sYC3ktueJpfSWfiaaTM=; b=RAlzgTyujKqFXylhj+1feHCUg0TsEQBptJTfHfHUljXhypjfI4xZ3aTFEUt4jQFx7E LIYLbE31FYnSjejbT6/ipwIPXuGMLdVUNFeIrqFUr4bkUcQHKA0JzT4wDajnO6JkXnSJ wNx2ID5kmkI6NuTIoawnbaXaTtdsiDNSjvKFs03QPT0XIR3NAXX9v8Xlavhj98uu7jy/ 4rok6xiLgxqaL46kAKRD3s+Xt+W98kl8C9OViH/y4jYGo/Jp8SQa2ZKuHIavS+JOmNqg Ao2jgl6zgtotUvLON79XnS6kTbGxKYedVSLuJarj44iSe9QXDB784oQaAeA/RYH+Jr9b dWtg== X-Gm-Message-State: APjAAAWLkm12ExoJaSvh+XfTYjYVQV24za9xfPE1/Sivf9vF2u+CM5NM NY8RxXuJ/UTt/89QCwJWe06ctjCTQTU= X-Google-Smtp-Source: APXvYqyOSPMEGn6k8O6ndoXjWN7BVw9DcbsZ2TQD2ClEWvkreYmJiy7dz4TXiTCA/aXx1tzgHYn5aw== X-Received: by 2002:a1c:1d86:: with SMTP id d128mr13225477wmd.123.1566110403060; Sat, 17 Aug 2019 23:40:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 18 Aug 2019 07:39:57 +0100 Message-Id: <20190818063959.14533-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190818063959.14533-1-richard.henderson@linaro.org> References: <20190818063959.14533-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::332 Subject: [Qemu-devel] [PATCH v2 1/3] decodetree: Allow !function with no input bits 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: peter.maydell@linaro.org 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" Call this form a "parameter", returning a value extracted from the DisasContext. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daude --- docs/devel/decodetree.rst | 8 ++++- scripts/decodetree.py | 49 ++++++++++++++++++++++++------- tests/decode/err_field6.decode | 5 ++++ tests/decode/succ_function.decode | 6 ++++ 4 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 tests/decode/err_field6.decode create mode 100644 tests/decode/succ_function.decode diff --git a/docs/devel/decodetree.rst b/docs/devel/decodetree.rst index 44ac621ea8..ce7f52308f 100644 --- a/docs/devel/decodetree.rst +++ b/docs/devel/decodetree.rst @@ -23,7 +23,7 @@ Fields =20 Syntax:: =20 - field_def :=3D '%' identifier ( unnamed_field )+ ( !function=3Dident= ifier )? + field_def :=3D '%' identifier ( unnamed_field )* ( !function=3Dident= ifier )? unnamed_field :=3D number ':' ( 's' ) number =20 For *unnamed_field*, the first number is the least-significant bit position @@ -34,6 +34,12 @@ present, they are concatenated. In this way one can def= ine disjoint fields. If ``!function`` is specified, the concatenated result is passed through t= he named function, taking and returning an integral value. =20 +One may use ``!function`` with zero ``unnamed_fields``. This case is call= ed +a *parameter*, and the named function is only passed the ``DisasContext`` +and returns an integral value extracted from there. + +A field with no ``unnamed_fields`` and no ``!function`` is in error. + FIXME: the fields of the structure into which this result will be stored is restricted to ``int``. Which means that we cannot expand 64-bit items. =20 diff --git a/scripts/decodetree.py b/scripts/decodetree.py index d7a59d63ac..31e2f04ecb 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -245,7 +245,7 @@ class ConstField: =20 =20 class FunctionField: - """Class representing a field passed through an expander""" + """Class representing a field passed through a function""" def __init__(self, func, base): self.mask =3D base.mask self.sign =3D base.sign @@ -266,6 +266,27 @@ class FunctionField: # end FunctionField =20 =20 +class ParameterField: + """Class representing a pseudo-field read from a function""" + def __init__(self, func): + self.mask =3D 0 + self.sign =3D 0 + self.func =3D func + + def __str__(self): + return self.func + + def str_extract(self): + return self.func + '(ctx)' + + def __eq__(self, other): + return self.func =3D=3D other.func + + def __ne__(self, other): + return not self.__eq__(other) +# end FunctionField + + class Arguments: """Class representing the extracted fields of a format""" def __init__(self, nm, flds, extern): @@ -433,17 +454,23 @@ def parse_field(lineno, name, toks): =20 if width > insnwidth: error(lineno, 'field too large') - if len(subs) =3D=3D 1: - f =3D subs[0] + if len(subs) =3D=3D 0: + if func: + f =3D ParameterField(func) + else: + error(lineno, 'field with no value') else: - mask =3D 0 - for s in subs: - if mask & s.mask: - error(lineno, 'field components overlap') - mask |=3D s.mask - f =3D MultiField(subs, mask) - if func: - f =3D FunctionField(func, f) + if len(subs) =3D=3D 1: + f =3D subs[0] + else: + mask =3D 0 + for s in subs: + if mask & s.mask: + error(lineno, 'field components overlap') + mask |=3D s.mask + f =3D MultiField(subs, mask) + if func: + f =3D FunctionField(func, f) =20 if name in fields: error(lineno, 'duplicate field', name) diff --git a/tests/decode/err_field6.decode b/tests/decode/err_field6.decode new file mode 100644 index 0000000000..a719884572 --- /dev/null +++ b/tests/decode/err_field6.decode @@ -0,0 +1,5 @@ +# This work is licensed under the terms of the GNU LGPL, version 2 or late= r. +# See the COPYING.LIB file in the top-level directory. + +# Diagnose no bits in field +%field diff --git a/tests/decode/succ_function.decode b/tests/decode/succ_function= .decode new file mode 100644 index 0000000000..7751b1784e --- /dev/null +++ b/tests/decode/succ_function.decode @@ -0,0 +1,6 @@ +# This work is licensed under the terms of the GNU LGPL, version 2 or late= r. +# See the COPYING.LIB file in the top-level directory. + +# "Field" as parameter pulled from DisasContext. +%foo !function=3Dfoo +foo 00000000000000000000000000000000 %foo --=20 2.17.1 From nobody Mon Feb 9 15:29:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1566110553; cv=none; d=zoho.com; s=zohoarc; b=fGIj1irfme+4NDMXmRgOmwOvABiFBXRVsUdxeGBuw9jBBNidH5fi7tS+muCdgY/sjeym8gXNdQcfZwgrD1Lp3L2AeOTxkX8P/GZILsF8ACjVwBGCZLycjcT1HScze0Dfxxl1fY3lVOfDb8EPqE3LgXErRzDZ3X2qiHlITvNHSkM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566110553; 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:ARC-Authentication-Results; bh=tKxbBo5PP5QzWeZGavSTCFjk6sHISgddhsvvpM6xVYM=; b=ZlBA+K2Z4H18VUx14hHSRdsGD7JZRuf4I5acXEnrZORXMwZ7GirweD4fUEg222ow7zqC7jX+fF4DKSCuL/BWHqZT1h8HwnL8qQIPF/TvT8krB6XZrwNaW8GRMI6Fa7N9txvaXjfHMdY+afZYCnkp6jYPzkwZdGbMmhc/FrOZpO8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1566110553875579.7933359936641; Sat, 17 Aug 2019 23:42:33 -0700 (PDT) Received: from localhost ([::1]:39494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzEtc-0008HE-SX for importer@patchew.org; Sun, 18 Aug 2019 02:42:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36401) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzErG-00056P-K3 for qemu-devel@nongnu.org; Sun, 18 Aug 2019 02:40:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzErF-0000kZ-EB for qemu-devel@nongnu.org; Sun, 18 Aug 2019 02:40:06 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:44391) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzErF-0000kC-8K for qemu-devel@nongnu.org; Sun, 18 Aug 2019 02:40:05 -0400 Received: by mail-wr1-x429.google.com with SMTP id p17so5409153wrf.11 for ; Sat, 17 Aug 2019 23:40:05 -0700 (PDT) Received: from cloudburst.Home ([2a02:c7f:a69:1700:8897:9507:94c2:b98d]) by smtp.gmail.com with ESMTPSA id r5sm9015435wmh.35.2019.08.17.23.40.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 23:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tKxbBo5PP5QzWeZGavSTCFjk6sHISgddhsvvpM6xVYM=; b=QrWWzm8EiDh7WQPpLMtGfaJRXKnuIwFPVtvShtsqBBwHC/LXMWst5dTO5QoQMxIBMo rBG/GwsyU6BdjbVRZbphzqiU/N556v97REuB7Vms8OxweRc6DQO9R0Pwwm617wHM+Jd2 lPFNSAMmJHGcXDxx1eI5ONHTPmuwmdvASQOd41oedznlBgtMtLvFPLk9CbfjIU2uU0GY o6+EUuzMMEPPIeKm2UqOPUeB5SyBp6I3Kvmim73WljLny4YbM3iJuztqICrz6nVJJR9g OudK3nUmfhxHR++7NEFUwPeZUBVHG5/simi/kAE1lCnFUdha0KtEXEvVubyJQR+AY8tx xpVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tKxbBo5PP5QzWeZGavSTCFjk6sHISgddhsvvpM6xVYM=; b=HKoNQVd37wb8uJBLmkMpo21biaH8yVJBeFJ/6VKGy/BQdY+CrrK++T3k51Lwn2Ttgs liCqosHPLr4RQVouon3oElv0Ukr1WF+1P7Fglzd5bjQCG0iRpcAPFygkN4lHoU2fUiu0 /EjlArgYXn3Krz04lUoCzoixvmyGXDh6Yt+DJ6m+m8TvOzAA0y7g+Fg7Amx9XcTdQX3Q 5tNR5QK9YcI2iiaUUFAEX5yfeApimGXwpM1/GD4Wj181jor4SaV7UuTfclwH47Jq4c5S VBn2L/4dRsXq6rxvwPyvBC4mjLTBNUpq5dZ7U6pLuPz6WXqQFtBYgEndwDIZpFEh54u2 8dLw== X-Gm-Message-State: APjAAAXdbeZ50F0uYTxlB71vUz5t+Nx80+s+3IPuKKZYuOEnGoaHw3wn Ymtn+iGfd/EXyvx5svvjTkFdxVDgc+U= X-Google-Smtp-Source: APXvYqwlnW5SbHvBJqzGlM7UvEMDw0ERmMLcm6sEC/ZUjipCz0jmkM1lTZNqtGvCwsO36saAc1buoQ== X-Received: by 2002:adf:8bd8:: with SMTP id w24mr19589296wra.273.1566110404020; Sat, 17 Aug 2019 23:40:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 18 Aug 2019 07:39:58 +0100 Message-Id: <20190818063959.14533-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190818063959.14533-1-richard.henderson@linaro.org> References: <20190818063959.14533-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 Subject: [Qemu-devel] [PATCH v2 2/3] decodetree: Suppress redundant declaration warnings 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We can tell that a decodetree input file is "secondary" when it uses an argument set marked "!extern". This indicates that at least one of the insn translation functions will have already been declared by the "primary" input file, but given only the secondary we cannot tell which. Avoid redundant declaration warnings by suppressing them with pragmas. Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Suggested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- scripts/decodetree.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 31e2f04ecb..12c1cd0ddb 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -33,6 +33,7 @@ arguments =3D {} formats =3D {} patterns =3D [] allpatterns =3D [] +anyextern =3D False =20 translate_prefix =3D 'trans' translate_scope =3D 'static ' @@ -482,12 +483,14 @@ def parse_arguments(lineno, name, toks): """Parse one argument set from TOKS at LINENO""" global arguments global re_ident + global anyextern =20 flds =3D [] extern =3D False for t in toks: if re_fullmatch('!extern', t): extern =3D True + anyextern =3D True continue if not re_fullmatch(re_ident, t): error(lineno, 'invalid argument set token "{0}"'.format(t)) @@ -1188,6 +1191,7 @@ def main(): global insnmask global decode_function global variablewidth + global anyextern =20 decode_scope =3D 'static ' =20 @@ -1248,6 +1252,19 @@ def main(): # A single translate function can be invoked for different patterns. # Make sure that the argument sets are the same, and declare the # function only once. + # + # If we're sharing formats, we're likely also sharing trans_* function= s, + # but we can't tell which ones. Prevent issues from the compiler by + # suppressing redundant declaration warnings. + if anyextern: + output("#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE\n", + "# pragma GCC diagnostic push\n", + "# pragma GCC diagnostic ignored \"-Wredundant-decls\"\n", + "# ifdef __clang__\n" + "# pragma GCC diagnostic ignored \"-Wtypedef-redefinition\= "\n", + "# endif\n", + "#endif\n\n") + out_pats =3D {} for i in allpatterns: if i.name in out_pats: @@ -1259,6 +1276,11 @@ def main(): out_pats[i.name] =3D i output('\n') =20 + if anyextern: + output("#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE\n", + "# pragma GCC diagnostic pop\n", + "#endif\n\n") + for n in sorted(formats.keys()): f =3D formats[n] f.output_extract() --=20 2.17.1 From nobody Mon Feb 9 15:29:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1566110482; cv=none; d=zoho.com; s=zohoarc; b=lPf/mqtaK4MfL5FmLINfUJl+8FX9V+rVYT4l0rz2SwdpnNHc1O23L5s09o1Ja0CqRQ1mc7deyIfIAijLBKpFWeBOVvVQ+r8uCkGemx2l9w56rtZeULZpgnkaOEvCKneMIdwepyXMej9t8OlM12krqFJCmYx/aGkEt/zJIQHhU+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566110482; 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:ARC-Authentication-Results; bh=FYIOkeCFDs+BgfZApqGQTYKi9ofiCzdQQpabShx+clA=; b=QxIgKgkbLQsmqdrL4E/3k+Ym5XdYGmL7edzvjt74Bt2Ekfwdzxau0Io4EgyYstHMoR5fQ+BVC19p4sjc/YzQvIp5Mi6WCQcb61EOoj6rHfoffiiTmZn6zdvkMaTSanFqqRno99iL1Xa4fsg3kTWhVp2CYQEH/ZDeypYKSFzxsG4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1566110482137882.9020060828711; Sat, 17 Aug 2019 23:41:22 -0700 (PDT) Received: from localhost ([::1]:39474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzEsS-0006XU-TB for importer@patchew.org; Sun, 18 Aug 2019 02:41:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36412) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzErH-00056m-Dt for qemu-devel@nongnu.org; Sun, 18 Aug 2019 02:40:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzErG-0000l6-D7 for qemu-devel@nongnu.org; Sun, 18 Aug 2019 02:40:07 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:35168) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzErG-0000kj-7A for qemu-devel@nongnu.org; Sun, 18 Aug 2019 02:40:06 -0400 Received: by mail-wr1-x443.google.com with SMTP id k2so5419293wrq.2 for ; Sat, 17 Aug 2019 23:40:06 -0700 (PDT) Received: from cloudburst.Home ([2a02:c7f:a69:1700:8897:9507:94c2:b98d]) by smtp.gmail.com with ESMTPSA id r5sm9015435wmh.35.2019.08.17.23.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 23:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FYIOkeCFDs+BgfZApqGQTYKi9ofiCzdQQpabShx+clA=; b=BxZybswZd7mlu+zDCl5EE89cpB9LSXMOaG1bQ9ORBc/RUuO4kufMVcGrJq1K5jYFnz XAGVT6NFoIp1yASZaG5MGtdTK2bKh0BbogAC2vkDnX7xuRHosUOJ0NIypSm5stslzAK/ A5UsOJl1JeTiStn9qdHGVzwV3wcDYt+CfpxbKc4UPV45IPExGZ4auhe8Sc32UnCkDEkX wo3tNxrTFI4b4HoBW4WqCjI55n+EmJhAcS5+8Tg04JCsu/CnG3a9/W1jyhy51vbgV/ru 7rTqTybEHzi1T/cMMfY+xnsq4ed+J2u6mNDtBcMUbKyvAXlf4+P4Exe2PZYbCCY6CmBg JgKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FYIOkeCFDs+BgfZApqGQTYKi9ofiCzdQQpabShx+clA=; b=Ul/cNb5OL2FFR2IfHczTlVhWZ9CdJ5kPjwbJ1ELNfibTfCVG9Ue0H1UEYQQfpRRhOS nMUS9Q8zUPb63+tmXd3nixBTFqPBtKhur8I34S96SY9qFGpvYdUs/RhNTGuLLGludaE5 lRxlEsDGmJLOyWZ0BZOGjusFjKlHyWPSlYvJe988QkuKtW1oyrSaqwQJ2gpQeEEUklW+ 8NI1A87v6Madfl7GJIuaVv+7SEs2THSAZvaMhZ0gyVyyY5W3vX4kGsEWclZ9NSDPB/PR 5Y+9zrdIWk+0v/rLp4qBjT6N25OkU65TndrkUogpnWvgDTc297+V4TxGG0ocQ/5Hibi7 qeug== X-Gm-Message-State: APjAAAUXms8aobn2/CuLkFlwXlCUuEvWT/PtUuKMODNXOtOkV4a+JHr/ q0fchHpYDwkXDMzFcb/iP8scUOwyHck= X-Google-Smtp-Source: APXvYqxG2/BKSQ3Pk1ejeN17VdBGxOmBAu7vSxecXXc5q9Sb6UnTkcZX+qMShCGMlv+VtNzWQ1h8NA== X-Received: by 2002:adf:f705:: with SMTP id r5mr19188340wrp.342.1566110405026; Sat, 17 Aug 2019 23:40:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 18 Aug 2019 07:39:59 +0100 Message-Id: <20190818063959.14533-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190818063959.14533-1-richard.henderson@linaro.org> References: <20190818063959.14533-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH v2 3/3] target/riscv: Remove redundant declaration pragmas 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) These are now generated by decodetree itself. Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Acked-by: Palmer Dabbelt Signed-off-by: Richard Henderson --- target/riscv/translate.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 8d6ab73258..adeddb85f6 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -708,26 +708,9 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, #include "insn_trans/trans_rvd.inc.c" #include "insn_trans/trans_privileged.inc.c" =20 -/* - * Auto-generated decoder. - * Note that the 16-bit decoder reuses some of the trans_* functions - * initially declared by the 32-bit decoder, which results in duplicate - * declaration warnings. Suppress them. - */ -#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wredundant-decls" -# ifdef __clang__ -# pragma GCC diagnostic ignored "-Wtypedef-redefinition" -# endif -#endif - +/* Include the auto-generated decoder for 16 bit insn */ #include "decode_insn16.inc.c" =20 -#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE -# pragma GCC diagnostic pop -#endif - static void decode_opc(DisasContext *ctx) { /* check for compressed insn */ --=20 2.17.1