From patchwork Fri Feb 1 16:06:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 157290 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp653246jaa; Fri, 1 Feb 2019 08:37:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN7FlAi+rtMgu5dA+KXmvQdF/Y7u4+Vy72MlCVh46Uddo1JXIZ0vpTOD348T/VzKD1vg/0o4 X-Received: by 2002:a25:c092:: with SMTP id c140mr37163156ybf.495.1549039031219; Fri, 01 Feb 2019 08:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549039031; cv=none; d=google.com; s=arc-20160816; b=xKYlAsQHisC4GSsx0weWdMwMoZjxb1g7Ve+nRX9UmmnD2ZfaayzOtJz/WdguHxt9EE DJ9px3vAaOz5RMsizCQILKPrrgjHsvKdYpygtOnQK1nJO9okJe8ZjoTAEuNSJGvdXs1c msQ3i8sHLW21A5B/Rf3tN8WS0Aj6Gy0LqEweuSWbOfrQ7F01/sK2357XDOtyVr+H70MG sriktwHfo3bACgyeO03zmB4wN4djCcyZnM9cuu0RoW1vbLqt7Jz8Xafp8dKdeT1jdUEZ 1kUbjYRkBZ35yv1bCICeHwAY7tduA16LaKtEUtUMf4eXWX0hh92lEgnyE7o+TDPRxdNZ eByQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=ngWp7LIioM7RfYDW6yG3i704r9TniOnWvlnT05BWtoc=; b=eNx8qCP9srTMBaLQo5QjKqkJfB1jA2QkIy0rktK2lK6H5ghKxEKYxYhygFr1Lr1a60 TBwmk/hX+GRPYGfJ+/CeGnDKpNRXJyRke/D06xFJoA1IYcv2S1cmGLtclqvQbmI1Posu h/cfq9QbMzupNTBeePQtkupwn8XsI3/BNZd0eI3RL82fdvhEihSfaHhUmS5Sh8Qu8Wat lK8t5FtgTTa5s+Ef827LdFKCChD5RHmtdzBGEoQufUe2rH6J44FXqJF2QZ2MEpRHrmNa 67LmR7hVFM10IZ5H9Vk0dguO+AInYTv2Iz2k/MQ3lZpUvKCHYz8m28KmXVvjdC2mi8vY I0qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aApzB9vs; 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=fail (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 k62si4440044ywd.392.2019.02.01.08.37.11 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 01 Feb 2019 08:37:11 -0800 (PST) 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=fail header.i=@linaro.org header.s=google header.b=aApzB9vs; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:57657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpboU-0006b9-MN for patch@linaro.org; Fri, 01 Feb 2019 11:37:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbMC-0008Fd-RD for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:08:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpbMA-0003jF-Ro for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:56 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:44167) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpbMA-0003TI-GV for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:54 -0500 Received: by mail-wr1-x42c.google.com with SMTP id z5so7630089wrt.11 for ; Fri, 01 Feb 2019 08:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ngWp7LIioM7RfYDW6yG3i704r9TniOnWvlnT05BWtoc=; b=aApzB9vsDoZ1Ufvy9zqA+T68u9wjopri54cFTP349a5as0aRLkJC1JcKAP46xfjzAZ e4bLFWDoYdKG7gEh97WznYZWnplT45HYiZwT54kaKL/K4d3zUpcmbfxzNTL1kmRnL753 MWCRPDVc5jURB/4+iRKQIJdfrbbDN2tDpp5ow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ngWp7LIioM7RfYDW6yG3i704r9TniOnWvlnT05BWtoc=; b=GG5bC68DIfYXR32nmv/cRIinRyb6mcQVuR1QGAzeaK0C3Zu25YT4k/rvdAeQC2rxM3 SMeBTex/4UkFJBrhtk37sO/pYCRfcXQAIs7mj6kL26lalr2nGSA6R9pTnUdLNGQghX/y IuiGSVXuRwBZTAX+aWN4EsZWi1OmK+a+8Uyz4T7H5FR+oeu30fzeoe0XjpiO6ZBITqiO 843mTX+IFJnBEwTVyv486ZdWgML8zv6iWjFpcgZlzU4qItR/5El65o+6iVHb7HZwgA0F Ik3g/4tcUQCu9FmuzrvSlyd0t6n8ni/ociLH3hYFgRcaSZI6rzqwIcqIu9EyRd3YBLsO 3Tpw== X-Gm-Message-State: AJcUukdQPhmchtjcdiWpWWP/RE+oCYi/+fyTrmUhW/9/4pZs86nAR+dR imSCXQZ7S8xg4QkQgPQiujvEOupNDF+mjg== X-Received: by 2002:adf:9542:: with SMTP id 60mr37887748wrs.60.1549037249731; Fri, 01 Feb 2019 08:07:29 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id n6sm2847250wmk.9.2019.02.01.08.07.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 08:07:28 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 16:06:32 +0000 Message-Id: <20190201160653.13829-27-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190201160653.13829-1-peter.maydell@linaro.org> References: <20190201160653.13829-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42c Subject: [Qemu-devel] [PULL 26/47] target/arm/translate-a64: Don't underdecode PRFM X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The PRFM prefetch insn in the load/store with imm9 encodings requires idx field 0b00; we were underdecoding this by only checking !is_unpriv (which is equivalent to idx != 2). Correctly UNDEF the unallocated encodings where idx == 0b01 and 0b11 as well as 0b10. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell Reviewed-by: Laurent Desnogues Message-id: 20190125182626.9221-3-peter.maydell@linaro.org --- target/arm/translate-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index e6df303e321..8e081758e03 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2803,7 +2803,7 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint32_t insn, } else { if (size == 3 && opc == 2) { /* PRFM - prefetch */ - if (is_unpriv) { + if (idx != 0) { unallocated_encoding(s); return; }