Received: by 2002:a19:6b17:0:0:0:0:0 with SMTP id d23csp3957297lfa; Mon, 19 Oct 2020 08:13:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzV1IEEsPknJ7YwWOFQfMZMojMInGKKbFyy89v8l0ZATDFHNi6ptwT5WsKvG5BtuZbQVzf X-Received: by 2002:a25:b8b:: with SMTP id 133mr167033ybl.257.1603120429086; Mon, 19 Oct 2020 08:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603120429; cv=none; d=google.com; s=arc-20160816; b=Pscf/V+H73TREENnG5WZbM44Dwbd229hkTeOOP/nTv5ES70olLKfrSEOXTbeEaxWGJ oWw+KgS4adOZtTKu+6LbEV1wYooVTN2Ob1jgvQSGRy3253ia98X1mkcu5COo1heAz8Vp XZ1a2r+xAY9kKfN4qIR7nrueqbfdDXLzfIhb4dtC2UjPhrw8iPcIWc/4EsFOzryyKXNu fIW7ag0Ga2I8uNRlzUFh/xFaOAu8dWAvVHfnAw4BLvy3gNj06KV2hv6dvQQlqXEbx8KW ilJkbp8+UpqrrmPwApooon56D3f67bjkImtjXZ0xuHx650WzqYcp8VKhROdcGmnMg0Hi AMlg== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=kLCgJNRELMxG1PAWJwJlgP80Ymoy4kuq1bsu+yq9fEQ=; b=M4gAeUQ+gRpfD6JY8Pf8YRlO0zdvpPFdmCfmzLqxY5dArAQDcPmVBOLeUreZndhiD6 qE5lAPrUBN4J00YY+2MTQf2X4PZuRmTgVAOhvABJ/qfVtEK7HirrFCobDYT/JYlIqh8p /RKV6+W4UcPEzrgCveUcgO9eT5B0zAoZZzSXp5V6qfh9ndzhgP5HVd4DRKemx6q0bWta Zsd58M6PbF0llnXAR0GlvgT6A7+DbBti9j5/yyq7T/JSU8RymLoQxa5+G65GeN0iJxe9 GaFtLHDuNi+LVa+Qnm6llgiYF1DmJMiwGvqr2un0kTQNV6Tj+/yfpFgUCH17Bx+3WCwS IOLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q8oKyXk8; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=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 i13si268429ybp.288.2020.10.19.08.13.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Oct 2020 08:13:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=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=q8oKyXk8; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUWr6-0007m8-D6 for alex.bennee@linaro.org; Mon, 19 Oct 2020 11:13:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUWqZ-0006sS-0Z for qemu-arm@nongnu.org; Mon, 19 Oct 2020 11:13:15 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUWqW-0002kM-6y for qemu-arm@nongnu.org; Mon, 19 Oct 2020 11:13:14 -0400 Received: by mail-wr1-x441.google.com with SMTP id g12so99152wrp.10 for ; Mon, 19 Oct 2020 08:13:09 -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=kLCgJNRELMxG1PAWJwJlgP80Ymoy4kuq1bsu+yq9fEQ=; b=q8oKyXk8lShUd8g1quoB7Qr1ZdncnUXrAW3TcBPPd06bpvGw1ESIGJNfEKmubWDsyq rsd0orW58GjAf4L7c2ewRj0aSlxh7xQEX2qOHiG/sQbCQlqde35mAiRvpiVKh2fLNveq 7NyCVLEbKfc/oVjaqAOySWfb5qgrTJvCEKmHBuUMyNY7/R3X9SUbThLUHFFGQuHAI2uV gOZnAfxlZX7WgMkQrq4iRWqFdGy6lXObIYz3ruBafJE5bkhVANow0FoRAP4ZZ8eZJ8Nz CMO51IVl5Ky4xs9nbUH0Pdh5igYXVRJCmP5FA8LAq67hUoQ+JpXVdZdp1Qx+13ETt/n7 BHvw== 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=kLCgJNRELMxG1PAWJwJlgP80Ymoy4kuq1bsu+yq9fEQ=; b=DzU67wxRGA8UeRxM5PMVYOo+h7k/7W44hJZO/e21kZI+DZAyctXy725q4/U5hJ7r3H j7iQ3xwhPk9qOX9sOfSXTkQZt9WspPpn20hwuTEIYVIsl/U5Hz2vqAPxKL7Zg9tgLzZA +N/du3UrgX31de4097hx/0JPngf7AZM/3s+sqDX2b9HgYt0y9dIngSh+z1UBL0zOV4Ta vRYQxAIfoTUn2PA4RoPGnzP3hmUGycsMMxqqAsRmZ5Tly2ECbDIQcjgrW6zOdOhCS+aM 91+U8IDuJmWgnxWonmDwpUuClTvsjXvaMTbpVk29zUc4e3ur9I2t2S69LCc72FD8bPoJ 9Fdg== X-Gm-Message-State: AOAM531zEmyIt4BhYe1LwUaN1E7B7eWR15QksDWqTUWwAB4RPnb6WIko uFrai9T09fmyu3bYDbfuZmcvCZg/FTMjAg== X-Received: by 2002:a5d:480b:: with SMTP id l11mr20640042wrq.225.1603120388580; Mon, 19 Oct 2020 08:13:08 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y14sm309918wma.48.2020.10.19.08.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 08:13:07 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH v2 04/10] target/arm: Make the t32 insn[25:23]=111 group non-overlapping Date: Mon, 19 Oct 2020 16:12:55 +0100 Message-Id: <20201019151301.2046-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201019151301.2046-1-peter.maydell@linaro.org> References: <20201019151301.2046-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x441.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-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: /6r8t68HafLx The t32 decode has a group which represents a set of insns which overlap with B_cond_thumb because they have [25:23]=111 (which is an invalid condition code field for the branch insn). This group is currently defined using the {} overlap-OK syntax, but it is almost entirely non-overlapping patterns. Switch it over to use a non-overlapping group. For this to be valid syntactically, CPS must move into the same overlapping-group as the hint insns (CPS vs hints was the only actual use of the overlap facility for the group). The non-overlapping subgroup for CLREX/DSB/DMB/ISB/SB is no longer necessary and so we can remove it (promoting those insns to be members of the parent group). Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/t32.decode | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/target/arm/t32.decode b/target/arm/t32.decode index d8454bd814e..7d5e000e82c 100644 --- a/target/arm/t32.decode +++ b/target/arm/t32.decode @@ -296,8 +296,8 @@ CLZ 1111 1010 1011 ---- 1111 .... 1000 .... @rdm { # Group insn[25:23] = 111, which is cond=111x for the branch below, # or unconditional, which would be illegal for the branch. - { - # Hints + [ + # Hints, and CPS { YIELD 1111 0011 1010 1111 1000 0000 0000 0001 WFE 1111 0011 1010 1111 1000 0000 0000 0010 @@ -310,20 +310,18 @@ CLZ 1111 1010 1011 ---- 1111 .... 1000 .... @rdm # The canonical nop ends in 0000 0000, but the whole rest # of the space is "reserved hint, behaves as nop". NOP 1111 0011 1010 1111 1000 0000 ---- ---- + + # If imod == '00' && M == '0' then SEE "Hint instructions", above. + CPS 1111 0011 1010 1111 1000 0 imod:2 M:1 A:1 I:1 F:1 mode:5 \ + &cps } - # If imod == '00' && M == '0' then SEE "Hint instructions", above. - CPS 1111 0011 1010 1111 1000 0 imod:2 M:1 A:1 I:1 F:1 mode:5 \ - &cps - # Miscellaneous control - [ - CLREX 1111 0011 1011 1111 1000 1111 0010 1111 - DSB 1111 0011 1011 1111 1000 1111 0100 ---- - DMB 1111 0011 1011 1111 1000 1111 0101 ---- - ISB 1111 0011 1011 1111 1000 1111 0110 ---- - SB 1111 0011 1011 1111 1000 1111 0111 0000 - ] + CLREX 1111 0011 1011 1111 1000 1111 0010 1111 + DSB 1111 0011 1011 1111 1000 1111 0100 ---- + DMB 1111 0011 1011 1111 1000 1111 0101 ---- + ISB 1111 0011 1011 1111 1000 1111 0110 ---- + SB 1111 0011 1011 1111 1000 1111 0111 0000 # Note that the v7m insn overlaps both the normal and banked insn. { @@ -351,7 +349,7 @@ CLZ 1111 1010 1011 ---- 1111 .... 1000 .... @rdm HVC 1111 0111 1110 .... 1000 .... .... .... \ &i imm=%imm16_16_0 UDF 1111 0111 1111 ---- 1010 ---- ---- ---- - } + ] B_cond_thumb 1111 0. cond:4 ...... 10.0 ............ &ci imm=%imm21 } -- 2.20.1