From patchwork Mon Aug 3 20:57:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 247394 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp1536889ilo; Mon, 3 Aug 2020 13:57:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ+zDmOWwFZTznEKbeddLxoMRr/2CQLoAwCg99HDWaDLIiixRAQbmsyoFQZ8KiLtlle5is X-Received: by 2002:a5b:44b:: with SMTP id s11mr27994257ybp.342.1596488273430; Mon, 03 Aug 2020 13:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596488273; cv=none; d=google.com; s=arc-20160816; b=ETFYUJuc4ByDvwwhXgwCfxQU4x5y/+CE9X+xbH1LvTdrBkSPuS4oKNhmdHkzsQEy1P R4i1JnpLs0P/dP5D0sW/9qzsjTRMBPzmHP7BTuYxOJIN+IsV/v2njZdZX+H0Y4VQ5YP5 FXyagam2O6yksc3kVGs7QkUw4NEBy2jQ05ytW69Jp4lVf9zN3LT1vt+EWte809rK3Hz0 RCq6XkgvMxjybb8js622LJkmR153KzhucOyoSvpdmQ7+wa4RlodasYXi6ypnCeNqNn5p 3OEsTTuxYGbzyn83QlppfAnA4DsunKTLEWqLcehpepWY0OvO2coGp1wh696fB0LkZs+S SF1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=MS6fe5pqK8dVuvq4lPUQ3McLZfkrtocF71lhmBH/Qg0=; b=j6HhUQ1S5mz9bazwQMKkY2NFGrGAntKmrC2672VlbXb9WT2yjnKpR3eCYlZi89BTB+ W6tLPAWLMpzEF2VSyq7VeSud8gmXWoZ9hHvo6sbrP+wV7zfFVDo5d4l5M+XS/SZjn9nF 8YwV4EOEOVLspTRFUUKCFp7oMdXAGeInsSDyfQxbyK+Jvzn/WPZrzTb62OxPv7G2/4hV JgyzE9Ri0N3ICVXSQXcmmS/nhlrgQtrrq66XkPK2JKh3arnVCz1NyLpVjxuVMvkH/0el KbwV7A+ILx3OLQXJ7Tp8HRfY62B/QmyPGubXFSZqRVhkpIRfAdFFvLu70MJ3DLCgDUjM kf9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4nErp9r; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o62si6268460yba.223.2020.08.03.13.57.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Aug 2020 13:57:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4nErp9r; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2hWq-0003eX-Ts for patch@linaro.org; Mon, 03 Aug 2020 16:57:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2hWE-0003e8-Rs for qemu-devel@nongnu.org; Mon, 03 Aug 2020 16:57:14 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:40718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2hWD-0006CE-34 for qemu-devel@nongnu.org; Mon, 03 Aug 2020 16:57:14 -0400 Received: by mail-pf1-x442.google.com with SMTP id k18so11701796pfp.7 for ; Mon, 03 Aug 2020 13:57:12 -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:mime-version :content-transfer-encoding; bh=MS6fe5pqK8dVuvq4lPUQ3McLZfkrtocF71lhmBH/Qg0=; b=d4nErp9rvwqHZu11W0s39YFnXMGgD8FeEM4HnQTKDnEFGTPoW563YfOH7Yueh6eNJj V298bPn4lct8IlxLlMbVvNZvdEFjrNT6gaJtP7L4mR54x3ls9oGMrSzdqAYWb62kZjt9 uYF88myjPzD74RLo+hoI/Y2Z80/PPy10gay/Y2JgTmeguD44ow3Gp+bLYf3vdHhk4dTU 5EzvyEUuHm640KVOS3jor4ZSZ/hyZK6m0RZcIB8N84jaGFNyBeGcvtDlYg828eo4jpsc mZYRkvEg8zwV5jDpmB7gZ7gWosZiCZw6CGBA6g6nS8nkQQpDL3YdE0ReXl2IkIdc++jk eh1g== 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:mime-version :content-transfer-encoding; bh=MS6fe5pqK8dVuvq4lPUQ3McLZfkrtocF71lhmBH/Qg0=; b=Nos90VQ+N1QsRrfZnafe0gRnVpD58iYuy1SVcyala+WuSdwN1tn5kYl7045VOhnC9d wlwCv1MwCLB1r+o4vuK9nGc8coazJGx7DK47R+3k9IcB8gAXBC9VuaTPJw4G/QBwT8SN 3BwsWG1Qa7qhMqmyzQDk3uie5IRNNv9BXcw1cHWcXFd3UzhPEI28BpHRda/HsuCe/NCy 1k6op2KpQk5HiHn4FMGrm7juOSzlpibsVnCcIaQ6Y8M7TJvcJo3wwUnKkAcGJIJw8DiJ Bmzp7Q1PVtM1I9cX8SxEiUuSoEU+XYlafKzjBJqG4H7TIEoIJJwJJyS1+0FTCKaUbYqH ql+Q== X-Gm-Message-State: AOAM533cQS6ibqIdIBikp5+b6aorgFF9RiLJlyXZS6uU+zhGGT4M/66G ims+fBPCtv26VL6RPhGAOwLTR9J6Ju4= X-Received: by 2002:a63:df10:: with SMTP id u16mr3330074pgg.437.1596488230759; Mon, 03 Aug 2020 13:57:10 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id lr18sm357687pjb.31.2020.08.03.13.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 13:57:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-5.1] docs/devel: Document decodetree no-overlap groups Date: Mon, 3 Aug 2020 13:57:08 -0700 Message-Id: <20200803205708.315829-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, 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=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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When support for this feature went in, the update to the documentation was forgotten. Fixes: 067e8b0f45d6 Reported-by: Peter Maydell Signed-off-by: Richard Henderson --- docs/devel/decodetree.rst | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/docs/devel/decodetree.rst b/docs/devel/decodetree.rst index ce7f52308f..74f66bf46e 100644 --- a/docs/devel/decodetree.rst +++ b/docs/devel/decodetree.rst @@ -173,18 +173,25 @@ Pattern Groups Syntax:: - group := '{' ( pat_def | group )+ '}' + group := overlap_group | no_overlap_group + overlap_group := '{' ( pat_def | group )+ '}' + no_overlap_group := '[' ( pat_def | group )+ ']' -A *group* begins with a lone open-brace, with all subsequent lines -indented two spaces, and ending with a lone close-brace. Groups -may be nested, increasing the required indentation of the lines -within the nested group to two spaces per nesting level. +A *group* begins with a lone open-brace or open-bracket, with all +subsequent lines indented two spaces, and ending with a lone +close-brace or close-bracket. Groups may be nested, increasing the +required indentation of the lines within the nested group to two +spaces per nesting level. -Unlike ungrouped patterns, grouped patterns are allowed to overlap. -Conflicts are resolved by selecting the patterns in order. If all -of the fixedbits for a pattern match, its translate function will -be called. If the translate function returns false, then subsequent -patterns within the group will be matched. +Patterns within overlap groups are allowed to overlap. Conflicts are +resolved by selecting the patterns in order. If all of the fixedbits +for a pattern match, its translate function will be called. If the +translate function returns false, then subsequent patterns within the +group will be matched. + +Patterns within no-overlap groups are not allowed to overlap, just +the same as ungrouped patterns. Thus no-overlap groups are intended +to be nested inside overlap groups. The following example from PA-RISC shows specialization of the *or* instruction:: @@ -200,7 +207,7 @@ instruction:: When the *cf* field is zero, the instruction has no side effects, and may be specialized. When the *rt* field is zero, the output is discarded and so the instruction has no effect. When the *rt2* -field is zero, the operation is ``reg[rt] | 0`` and so encodes +field is zero, the operation is ``reg[r1] | 0`` and so encodes the canonical register copy operation. The output from the generator might look like::