From patchwork Sat Aug 15 01:31:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 247759 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp1265063ilo; Sat, 15 Aug 2020 09:10:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzfKy37aZMRLNgyz0ASHSeC7UIb7yH1c3YjM1X4caoIcepWxvUCZLMogs7JhN4OsPcUNUC X-Received: by 2002:a25:2006:: with SMTP id g6mr11875222ybg.143.1597507815311; Sat, 15 Aug 2020 09:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597507815; cv=none; d=google.com; s=arc-20160816; b=gKo92CZvrdA7qi0wRDmT9XbWbUHoDIIwI95yFTcM/9Eqt7+otdQMI6LZKDq3tMB/1V kZEc3OzpABtrZeq0q7wYfUsFQIqP8IptB3YSksU57b2IXwVtgeI2hks9C9ziNj24VD0Y e+YhSQPZxuIAw3HxUhL4eDoknpK9JYDBCgZJRvTfbVNIle4oeJMFG6N64umYSh5UqLlP iBEZk0Dy0uBQKtP3aALQ/7p8h03CKWqbaifYt77DI0NL/Kio8fqUMqzfSuzIZzRPrjJi Y5UrRP/kZMGiYOBpdd8kfGX+OGm1veYHM6XY3E8SfIv9UKPjfZmQ5EljZQSXw+tfa5jn SpiQ== 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=QsaGTiUVfWoR7s1tF95X85Ju0+8PUYwEAqh0P+R84cU=; b=PPxVP+1xljFvFILAGW+yQZqni2srZK7EHkP31cIc3W41sjEq09xky2tGVGsNIefmfc Kt5MPt69Clh7lEpywN/1saEFdWkPgNbIBd4DHXYyhcoYuKvwvTId4vaKgL1diSxZOcoD Z2JButipIPqiBX+yAvDiONfy+1lmhGNVQBhGX7roJ28ulhZYEzwr1e+xC+3jkExPHY7x Fz2sTwdiaU355o8V3viFKW6xo1IMHtIKLuamnFrdMvSAwMQ6Sip/M65UBt9PFQlcS+Yu 8CY2K8BPAQyDPWbNMvqyUoWwlc1uNk8WmSf8MeJqi4PVhLUnHAJNebJkgkYDy9iJk+ox 865Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NkdNomWE; 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 r126si11402476ybf.329.2020.08.15.09.10.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Aug 2020 09:10:15 -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=fail header.i=@linaro.org header.s=google header.b=NkdNomWE; 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 ([::1]:54450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6yl4-0002SW-Rv for patch@linaro.org; Sat, 15 Aug 2020 12:10:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6yko-0002Qj-RS for qemu-devel@nongnu.org; Sat, 15 Aug 2020 12:09:58 -0400 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]:34768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6ykn-0002a9-88 for qemu-devel@nongnu.org; Sat, 15 Aug 2020 12:09:58 -0400 Received: by mail-oi1-x241.google.com with SMTP id z22so10962318oid.1 for ; Sat, 15 Aug 2020 09:09: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 :mime-version:content-transfer-encoding; bh=QsaGTiUVfWoR7s1tF95X85Ju0+8PUYwEAqh0P+R84cU=; b=NkdNomWEJHvOAJWlQ7t+8+TgCmGLRbkeX5ytcxkQFp1uN+rHhK1sZszsWa6sgHuGrF l65YGA8PvL9ZUzjy5qlkYXKcN9ANgkfBIjDRQwZYBE7wb7TLNh+b5SBy1+yy7AitQhBl JAlnBvArNkVeeXx0yHx0KKXLw0Szd6fHoyun3BfgsA6Pu0w2a8Xq1zJB5E40y7EdPVqW hHe5Nl+xE/Zl1Y+x9itwl7NsJrO8e3vLcn+OP8F4DPBkXQ3hyRtjNb29F5BISBjFPUSw Aj9HHyK2LTUNO+gufx7TnUl17fQXo8OXK//N0ELWrQZ93ws+3vTY6m4T6UbAZoIh35Rp u5Pw== 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=QsaGTiUVfWoR7s1tF95X85Ju0+8PUYwEAqh0P+R84cU=; b=gMBCpn+AV9UD/nWjd6URJfAX5/Wq8C37s8AzremIZfOPyCJyIkSqncdIsPhgZRlE3W k/4UnWWyXhywVgxjapLVR6Do1pbLOGN2hB68Ns46LgI2HmOMvAWcvMWtZZIcGHamyjQC 24nkp2GHSCKguFf8tkz3X9u/mf66jKzmEzf53uaRiBsAY065RvOCF2O4lHwzDe/gMw3E 0MYXg4oo8pFgvECTDZqy09q73al6ALg8937LwVqJ/0YMe39wdZXj27HPtggjIXLcCsJ6 MCWqnXPlNsctQb9xFq1Oe6cvyz3QvHhFAV5X8Nj4uJSHnTa6NiXBud44HPMyusQ1ajQ0 HxOw== X-Gm-Message-State: AOAM531jPPLVngvDrh/zocueFhVQCqEzDMzO3Yno1z57mvwDDgSy5KlO l0Mh/k/TSDDPSJ6wifv+2TGQTTr7z9EkvA== X-Received: by 2002:a17:90a:1a42:: with SMTP id 2mr4123152pjl.16.1597455130803; Fri, 14 Aug 2020 18:32:10 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id y196sm10625528pfc.202.2020.08.14.18.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 18:32:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 17/20] target/arm: Fix sve_punpk_p vs odd vector lengths Date: Fri, 14 Aug 2020 18:31:42 -0700 Message-Id: <20200815013145.539409-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200815013145.539409-1-richard.henderson@linaro.org> References: <20200815013145.539409-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::241; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x241.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: Laurent Desnogues , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Wrote too much with punpk1 with vl % 512 != 0. Reported-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/sve_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index b8651ae173..c983cd4356 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -2104,11 +2104,11 @@ void HELPER(sve_punpk_p)(void *vd, void *vn, uint32_t pred_desc) high = oprsz >> 1; } - if ((high & 3) == 0) { + if ((oprsz & 7) == 0) { uint32_t *n = vn; high >>= 2; - for (i = 0; i < DIV_ROUND_UP(oprsz, 8); i++) { + for (i = 0; i < oprsz / 8; i++) { uint64_t nn = n[H4(high + i)]; d[i] = expand_bits(nn, 0); }