From patchwork Wed Nov 25 04:06:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 332361 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp124548ilb; Tue, 24 Nov 2020 20:13:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSjcoU12l8p5OQMTwln5FGo5KGqS4plRxLzCSItIR6VJV4Wp37Y2Qrma8hveLmW8LPHYnF X-Received: by 2002:a25:8b82:: with SMTP id j2mr1520701ybl.276.1606277621203; Tue, 24 Nov 2020 20:13:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606277621; cv=none; d=google.com; s=arc-20160816; b=WNGpntjuA1bqJJspZ4aBWfrNz+D+z0g5Bn1TwTJMiPaNR9Jchfnb8p5r+zHWxjXaZ5 Kq+Pn3EQxOZeeaxrxRFBYMudYdpFRSjSFHkaHPlhjcyEsnlR5tM3QaeH7tV83F3LBwp8 yKb4TXqdhJAur/AhJ+vEkFED2DckRxLkN/+3esd0+LXzERJ0wmDXxGUOpMgNI+csY2y8 uS7RgfLzwwyCuTIqeoH84wclby4QqPFWS1PnMYrD9N3UQU20YPL01W6+D0D8U/qEAd8D jVtR5BPpJEJsafcMVfMpH3JG1pTWX8uI57pLQaOQiRLPryb+0e3EQAQ1q0CnenqSyyIy fh+Q== 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=A0GArN05QL42PJKkh5e5g8eJMWLUKLJQ2bxbC2/N0XQ=; b=sz2yLsXO4Zs062mqQzykbBoS9SundXAME6NHuc/Xh81eMIH3WcRP23uDSpXo24rJaX fI5UoZCvqko1nQKAEwUbRlHKtG0LQn1eZLtWMLNNa6JE27+Xw7A2l9S3WaUKLcUgNXqE boKNCgLT1Uph0FdT/3o9G3DEdKxpOBwiZTryUf9AxGSiKVoAN1goxza5xCzilfOt4v0X ULK442klY0hMBrw1Noi4O2m9DZHGHlXLkhQLDZHR4eVtmB3ArRoC9RxIEcUs5bqrG+Wl JSPlWbUd4J2lDRL3y54lNhyBCwF/ncHNPqibPoUAxNS3iAHUqBsPrraNTkNY6EanVz/Y Xvsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WaKb39oe; 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 q1si1465338ybg.360.2020.11.24.20.13.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Nov 2020 20:13:41 -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=pass header.i=@linaro.org header.s=google header.b=WaKb39oe; 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]:35936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khmBY-0004bq-Ln for patch@linaro.org; Tue, 24 Nov 2020 23:13:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khm56-000565-KS for qemu-devel@nongnu.org; Tue, 24 Nov 2020 23:07:00 -0500 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:36447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khm55-00065o-2U for qemu-devel@nongnu.org; Tue, 24 Nov 2020 23:07:00 -0500 Received: by mail-pl1-x643.google.com with SMTP id r2so459273pls.3 for ; Tue, 24 Nov 2020 20:06:58 -0800 (PST) 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=A0GArN05QL42PJKkh5e5g8eJMWLUKLJQ2bxbC2/N0XQ=; b=WaKb39oevq8pC/DZQaDhKHTXB2Lkb16p2n10ECBRxvi2+o1kh2KvB2F53K7JbHYSqb A3VBAzXqLIp11BaYWzP24ORfgTB7cTSKTAiXgJ5mWaknBnZm7tON7dSf4x/M4Bud6g4y URl+gyuMteTjxczZEyKVNnJ9RwYuO6f2PNrKrgKVd9sQOsFBOWbxearUOu17nS112Bfg 0uo1cQ59LccSCa22QW5CtcvvXEEYxN2oXpSDbmog4Wz17HJd24IqyuWK4glILR6bboof FmJsdPLzkgaDevhU0z5McDc0BEFuyu0tEqimU4yp6SZbVxoR8HJ5n2uftqgwvH/d6dGL fdgA== 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=A0GArN05QL42PJKkh5e5g8eJMWLUKLJQ2bxbC2/N0XQ=; b=oXNx17Vh6h3lrz8obMgQFGrULZfAmxVKnLp36T+1UPTEj2i5m3NG6x+VTlFK6vDqzU V/DGNxnc7JJT/jTW254bVFF3EMJ70F19dlh0BJRKxNCEeEJN0LP9YmTXr8/n/ch+WJ79 cHTYLQyEaXvj/hpHUeXPNF8HHexm6dUnTTGFhP+8jg+aNT2W5jAiQnZcAAVy4SqmPRt7 Wf8hSvkNOiGk3Z8XGM37R7MqNjxKUnQtksslS467Ek1gAAUBh8+hUKzPUU7eo+d1kTtc Y+k5hgiz8Rcq3qpYXRRUQpPE9PbC/4SF7+kANWrz7l85i75mx8RVkanFU5c38VTXb7ye q1Rw== X-Gm-Message-State: AOAM532GpYFJIhSepH7m2g4z3R2OZX4sqBD+LRDCmaoqCdT9IUW2j6jw enC3ZMO1cd1F9qxnP6eEZMNf5nyXWPCqcA== X-Received: by 2002:a17:902:930a:b029:d8:ca83:3108 with SMTP id bc10-20020a170902930ab02900d8ca833108mr1637830plb.60.1606277217482; Tue, 24 Nov 2020 20:06:57 -0800 (PST) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id f7sm447806pfe.30.2020.11.24.20.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 20:06:56 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 10/11] target/arm: Fix decode of align in VLDST_single Date: Tue, 24 Nov 2020 20:06:41 -0800 Message-Id: <20201125040642.2339476-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201125040642.2339476-1-richard.henderson@linaro.org> References: <20201125040642.2339476-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x643.google.com 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=unavailable 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: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The encoding of size = 2 and size = 3 had the incorrect decode for align, overlapping the stride field. This error was hidden by what should have been unnecessary masking in translate. Signed-off-by: Richard Henderson --- target/arm/neon-ls.decode | 4 ++-- target/arm/translate-neon.c.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/arm/neon-ls.decode b/target/arm/neon-ls.decode index c17f5019e3..0a2a0e15db 100644 --- a/target/arm/neon-ls.decode +++ b/target/arm/neon-ls.decode @@ -46,7 +46,7 @@ VLD_all_lanes 1111 0100 1 . 1 0 rn:4 .... 11 n:2 size:2 t:1 a:1 rm:4 \ VLDST_single 1111 0100 1 . l:1 0 rn:4 .... 00 n:2 reg_idx:3 align:1 rm:4 \ vd=%vd_dp size=0 stride=1 -VLDST_single 1111 0100 1 . l:1 0 rn:4 .... 01 n:2 reg_idx:2 align:2 rm:4 \ +VLDST_single 1111 0100 1 . l:1 0 rn:4 .... 01 n:2 reg_idx:2 . align:1 rm:4 \ vd=%vd_dp size=1 stride=%imm1_5_p1 -VLDST_single 1111 0100 1 . l:1 0 rn:4 .... 10 n:2 reg_idx:1 align:3 rm:4 \ +VLDST_single 1111 0100 1 . l:1 0 rn:4 .... 10 n:2 reg_idx:1 . align:2 rm:4 \ vd=%vd_dp size=2 stride=%imm1_6_p1 diff --git a/target/arm/translate-neon.c.inc b/target/arm/translate-neon.c.inc index c4be019d9c..330b5fc7b0 100644 --- a/target/arm/translate-neon.c.inc +++ b/target/arm/translate-neon.c.inc @@ -616,7 +616,7 @@ static bool trans_VLDST_single(DisasContext *s, arg_VLDST_single *a) switch (nregs) { case 1: if (((a->align & (1 << a->size)) != 0) || - (a->size == 2 && ((a->align & 3) == 1 || (a->align & 3) == 2))) { + (a->size == 2 && (a->align == 1 || a->align == 2))) { return false; } break; @@ -631,7 +631,7 @@ static bool trans_VLDST_single(DisasContext *s, arg_VLDST_single *a) } break; case 4: - if ((a->size == 2) && ((a->align & 3) == 3)) { + if (a->size == 2 && a->align == 3) { return false; } break;