From nobody Tue Nov 11 19:02:12 2025 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=1565365411; cv=none; d=zoho.com; s=zohoarc; b=KqbcdNwCWo+gh4CqB1lnzioQ7TwEtbuudAfxoUNMlKX54TAGS/MktkucH2m+i2/vZJqI2rmtt2z4IMR/HuZD5PtncMzRNH0ReyYGPysPtHm9OeJEqF4SHA76eAiINFioZa7e35U9XlLFTNAaFZ+oMR582rvYXL/rZl898a4KABc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565365411; 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=UcR6femN4PMRW3W5bwCjDWWwUNOlmVUXp07Zv3cBZyQ=; b=UiS70AR5Mc1bYCVT/yS/taZa+HjarPIX1UDAWNFO1AqjbmhPZpt0r9ghK42ZQFA1oMivl8Zyi1jpIrEPIFIzLbFXK8TqnFjG/cl83fwIJLoSV6lOrnBIayx3DeV06uf4lddyBzKWaIFGWZdO7IekQloW+uBLLSJpiTZTIiGT8e4= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565365411481862.7215521571841; Fri, 9 Aug 2019 08:43:31 -0700 (PDT) Received: from localhost ([::1]:60282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw739-0002Gu-Ux for importer@patchew.org; Fri, 09 Aug 2019 11:43:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50762) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw71n-0000aV-Kg for qemu-devel@nongnu.org; Fri, 09 Aug 2019 11:42:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hw71l-0008Si-Mq for qemu-devel@nongnu.org; Fri, 09 Aug 2019 11:42:03 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:38482) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hw71j-0008QR-QW for qemu-devel@nongnu.org; Fri, 09 Aug 2019 11:42:00 -0400 Received: by mail-pl1-x634.google.com with SMTP id m12so6500788plt.5 for ; Fri, 09 Aug 2019 08:41:58 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 67sm80452179pfd.177.2019.08.09.08.41.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 08:41:56 -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=UcR6femN4PMRW3W5bwCjDWWwUNOlmVUXp07Zv3cBZyQ=; b=uxEZ9enmcTxPqmNgKJswZzmoH9lBzoCHXrZjIOPyzmeT30scIFiZNvQH13MytafGZf aXODqG3aPGdhY1jrtriJ3SsaXitIxVVSgV0xf+sdb/0v6wg1Fh835sjOjJ1CQWQUhfZ+ tcsmX/l353DyrFySOJjSC8SBANxDdSxilHEEvi8TZnkjcBJifpCGB4ulNDs0pVD+nPjK TqfFhaKpdkWKsLo5xirMRuUIQL/9oW3yYcwPzoKWymYJ1PejVG0zvI+g7xr9FL7EgqZ5 Qh4ZhZnazPf2VlMZzznCnHD5GL23pkvbjSm98lNYSWmrwqcSYep6h3qEEci+LCECNrpk YlIw== 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=UcR6femN4PMRW3W5bwCjDWWwUNOlmVUXp07Zv3cBZyQ=; b=JHtY6C6Pz8jN2N+cLV0LgPi2Y6uZV8SMTm8tfyroYp7EEFcKCAQ4fV72rSVedqKdzc aaMvqeio33Sz5woK1hKrn3X3GSOu2C/uQJkRdey1Jf+NSmROxoODze17jarEay1I3MUb 16nbZfcKtULytWjj07P4Kpo5s/Paa29uBnOGLVqxhCyq3TCO4g03lrwHzYHHZaD2zPH6 DWcwfqSakme2cX4eQwSWE9EhYR75wdIHLCTES6CCCV2SDEQQpLIi8P9zRRaLbSnbVAmU 4Dv5+FNlAxO4/DH4V9CAitqEvB+J3CZOB4cBHynoDT3Qq/w204imw1/WIDRGbamM5Gj1 XE1w== X-Gm-Message-State: APjAAAWZeLLP4k7p2YSSaCxiacjLtRqDQsl8ApAECxUP550eslYiWqj1 omMY1j1LHCbEgbYlcQEIBAX9jVU+JuI= X-Google-Smtp-Source: APXvYqwwREgGIpusrFEZs1pgJix6v55EN21JddT3zPGUA8OuT4jt8L1ZRDoDXxuCP8vpFzn6YJ6jeA== X-Received: by 2002:a17:902:8bc1:: with SMTP id r1mr19714697plo.42.1565365317334; Fri, 09 Aug 2019 08:41:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 9 Aug 2019 08:41:51 -0700 Message-Id: <20190809154153.31763-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190809154153.31763-1-richard.henderson@linaro.org> References: <20190809154153.31763-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::634 Subject: [Qemu-devel] [PATCH 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, Alistair.Francis@wdc.com, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, philmd@redhat.com 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 --- docs/devel/decodetree.rst | 8 ++++- scripts/decodetree.py | 54 ++++++++++++++++++++++++------- tests/decode/err_field6.decode | 5 +++ tests/decode/succ_function.decode | 6 ++++ 4 files changed, 60 insertions(+), 13 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..a2490aeb74 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -195,7 +195,10 @@ class MultiField: """Class representing a compound instruction field""" def __init__(self, subs, mask): self.subs =3D subs - self.sign =3D subs[0].sign + if len(subs): + self.sign =3D subs[0].sign + else: + self.sign =3D 0 self.mask =3D mask =20 def __str__(self): @@ -245,7 +248,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 +269,27 @@ class FunctionField: # end FunctionField =20 =20 +class ParameterField: + """Class representing a psuedo-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 +457,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 Tue Nov 11 19:02:12 2025 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=1565365411; cv=none; d=zoho.com; s=zohoarc; b=KA74M5iH9wgAhVxmyu6zGjlvyZQgY5cb3/QoCIRsR2wcEjUsxvQuPDyys9g4GJY2yN3ItFuBMBCRLroMQyjhqqBDSbCwo1a2q4vSPV5OY4PFVNEIOPpmMkLJivP/lX+mIM2/+IZeNV/8YSduj7vwBwsAxGM4XjXuJ3uAxZ1nug8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565365411; 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=leHpSxHzVUfQCq35SXdIhrfSJv5bGUxlfMEN59fKGs8=; b=Hmz2GZY66IO0XblRkA6TVDrVm7V8Y0WfuH4uJ0jAAfj7cRGHCUGhnSn7zC8YAO7GNBcYFyL9kP+v32iMhUA/qyjjSxJESKCnjDHWe26J3PKTIJZ6lNLQB+qhNiUNcCIaJD41MGTx1GSfDp1csZ2cg9CvaiiUVxekX/9RwFCXKb0= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 156536541150310.53205708901794; Fri, 9 Aug 2019 08:43:31 -0700 (PDT) Received: from localhost ([::1]:60284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw73A-0002Hj-Nj for importer@patchew.org; Fri, 09 Aug 2019 11:43:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50813) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw71p-0000eR-5y for qemu-devel@nongnu.org; Fri, 09 Aug 2019 11:42:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hw71n-0008Ur-Lj for qemu-devel@nongnu.org; Fri, 09 Aug 2019 11:42:05 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:42660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hw71l-0008RA-LP for qemu-devel@nongnu.org; Fri, 09 Aug 2019 11:42:03 -0400 Received: by mail-pl1-x644.google.com with SMTP id ay6so45162176plb.9 for ; Fri, 09 Aug 2019 08:41:59 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 67sm80452179pfd.177.2019.08.09.08.41.57 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 08:41:57 -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=leHpSxHzVUfQCq35SXdIhrfSJv5bGUxlfMEN59fKGs8=; b=R+x9JWNGRCUyPT9qY3gVRkx/94Jp2YtcuNACFzBuhhxhqF95so80+Jb8LzC7mqvsLE PC1JIijvAdAWGOxKse6YwXT0dF8oVgKkcY4NyvZYiY9uV7qkFrkRJh6qZcs7DHqC/Hrw DZohBIcvGacA/E0rBf7QTEmwaq9UQlQEF7IYM/eUVmlgtqPtgnV2gPIu+UZsGPtIQ3HT +iZ27v7taX0V46y2bXnJWuseXxxFPGoozjGC3faiJmbLMWbH9eGtJ6tMM1X2qCp2ii7x +AWyzWzDTHpxRPIEDUXvlKn5rPoOeMXZeDR332BiSIOBsgiC2Y4k3d862xbmCtgufaJk clnQ== 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=leHpSxHzVUfQCq35SXdIhrfSJv5bGUxlfMEN59fKGs8=; b=XACmY2iLAFVN/3uIEf8A7vIXA4zTlWCtRy3BP/e8mBWf7AtV2vPM9+7UUF8wAwsJ1l ULOE5n5KZooI4mll3UW+Tcb8EQ5fgApV2E5K23edVbVQv+/Dc/jYprJ2qiyboMAslb63 4tfJ0uEjnyCR6naaY6CNXqtCnFWPTnzxYDHjt+prUSjtwIbn9sJ+9Ph1+k3cfvOXHa4n B38AEkfRdlP0/TJ8w6XrypVKUOTGHm7GOXga+dOkifUd2umm1SzmYeR3epHCjn/9pkf3 6xv/zZPwCF2FaX7Fj9yT6FGsd5LWUzxN3aSGKgsxy1XjHWcG070bJZxpl1qGUpPjRZcw 2PqQ== X-Gm-Message-State: APjAAAWp9oP7yaL16o5vrlTWsd26P8ULuwLNKHkV1UgJgHNsoS1uhcRM Q6jxaAfZaM3fgDFZGW79qVYl0OW0bgI= X-Google-Smtp-Source: APXvYqz1hWfeknIiwUhlO6H8PJ7tvLD522TuqQjZPZ6xJ7ttkaVOB/zgqj9VJzjJKHTm+8JMBJDKxA== X-Received: by 2002:a17:902:7d86:: with SMTP id a6mr19609862plm.199.1565365318747; Fri, 09 Aug 2019 08:41:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 9 Aug 2019 08:41:52 -0700 Message-Id: <20190809154153.31763-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190809154153.31763-1-richard.henderson@linaro.org> References: <20190809154153.31763-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::644 Subject: [Qemu-devel] [PATCH 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, Alistair.Francis@wdc.com, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, philmd@redhat.com 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" 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. Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- scripts/decodetree.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index a2490aeb74..f02c8acca1 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 ' @@ -485,12 +486,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)) @@ -1191,6 +1194,7 @@ def main(): global insnmask global decode_function global variablewidth + global anyextern =20 decode_scope =3D 'static ' =20 @@ -1251,6 +1255,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: @@ -1262,6 +1279,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 Tue Nov 11 19:02:12 2025 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=1565365451; cv=none; d=zoho.com; s=zohoarc; b=NVvEM80ubObUF+0btOyySGZFJNrZM3h2ArwusUPVONTUytHDAG8C6HfFB2ZPir52JySifjxVIRhWqxZsTs5hUawqTq26lILP9/a9tML6GV6mwC2FtaHjzQPARhtgg2bKhXOHkf5lOm5Tjj1IJqEfBhGbmuwG4KmMzWp/bJmewwI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565365451; 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=x8MCVdcm8N9Wdyzx80ABjmXcKcOIg3c8JF8kLGEmqDw=; b=HdAJhmU5rKduImQnQAgClsg/9XMXwUtPezwY3eN7XBF1Vurl5rIYll3+OShVMcw83/dimZRPVOfPmDi+v+8ueJbdP9JXgLHRbOgGzR6S7cQTttmJD9uBVmzVgtl2eqHagDgW1N+P/ueLlfz3E9hZg4mjbvLc5ZxzSaNQI+s2kWI= 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 1565365451314150.34033177770607; Fri, 9 Aug 2019 08:44:11 -0700 (PDT) Received: from localhost ([::1]:60322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw73q-0004RY-Dv for importer@patchew.org; Fri, 09 Aug 2019 11:44:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50852) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw71q-0000hf-Au for qemu-devel@nongnu.org; Fri, 09 Aug 2019 11:42:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hw71n-0008VP-QQ for qemu-devel@nongnu.org; Fri, 09 Aug 2019 11:42:06 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:38649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hw71n-0008SG-I2 for qemu-devel@nongnu.org; Fri, 09 Aug 2019 11:42:03 -0400 Received: by mail-pg1-x542.google.com with SMTP id z14so8816700pga.5 for ; Fri, 09 Aug 2019 08:42:01 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 67sm80452179pfd.177.2019.08.09.08.41.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 08:41:59 -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=x8MCVdcm8N9Wdyzx80ABjmXcKcOIg3c8JF8kLGEmqDw=; b=loVYDKjBaQT2QJuvWNv441HJ4opYXwOlNGJtXF7TcgVjOtY/Q5TxH1B3gcaIIE10s8 4m/5mFet2d2doJgS+C7NHkl71dKMhvcKFXA9Cr53VFJN+bVv4Vo27vSxAGBbL9PRYb9R 9F6ljy04E0bDeWuXq1sfdNfwEMZLm9tyB7Ex4sQOJhsOvB7M4VSNPYK+djHYFg7VojU0 MtuBefnWTW4Co+HtG0+4tUDiJto32DH8EbT6YlEY56i3H8I9otXAc6YMStZIMkGMzd0b G0IIyIQ1nPIUoYGART9l/srPZAUjoKTxhODqXrdGJIPuaE7XzdtI5niKqJo4YbJAeSUR uRTg== 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=x8MCVdcm8N9Wdyzx80ABjmXcKcOIg3c8JF8kLGEmqDw=; b=YsItIPIlEI5yTWCQhLRX9wnob0v9uvvcObTxw/46DQKrEtr/8Bb+15jGA5imCcUH/W Sb5LAaxhpZzVXWFXdmslwqxg4K8KuYXqB4gbAlA2kwjaTFVVHjWjqy3a+42x5AerXZyK usJYi0lD1D0XBC2vvcbgRVDtJOMlSfv536oc77HnMGFKWWnffuKBfRdEtEluyd4gaOzv cSWsqsGdM2h4gLPiYcljqpGGkM8xGPqJY0dngfuCpWmMvMjH92GHGhwpsm7F2PJ8c8Oi eZFfWYyyYXbLAG9ATIltFcnQ0/9eN6H0EdFwdTD/jPOR963jY1EU9gYUSw5nesWh6EVs GYKA== X-Gm-Message-State: APjAAAVfoy7rGcYByXzzhrW1igWa3OVz7G6PKe/mw5QqtU9BKLswtAGI c+3bwoTUp309ne7OUOdfl9/ArzCxel0= X-Google-Smtp-Source: APXvYqzJVhYqToS78pzH02Vs71Z/uZx52a0m66lcCtV4A+/Z27nVRPbT6MRCBpVpPAQrEkMFlyM2xA== X-Received: by 2002:a17:90a:360b:: with SMTP id s11mr9919689pjb.51.1565365320410; Fri, 09 Aug 2019 08:42:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 9 Aug 2019 08:41:53 -0700 Message-Id: <20190809154153.31763-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190809154153.31763-1-richard.henderson@linaro.org> References: <20190809154153.31763-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::542 Subject: [Qemu-devel] [PATCH 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, Alistair.Francis@wdc.com, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, philmd@redhat.com 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" These are now generated by decodetree itself. Signed-off-by: Richard Henderson Acked-by: Palmer Dabbelt Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- 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