From patchwork Fri Nov 4 11:35:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 621368 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp168566pvb; Fri, 4 Nov 2022 04:37:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ek+h6gD644RjxoTwicGLPwGqjSgmZuJCRkwgdhiE2XOmo1yN3ktU32DXO2mDkO11bvLAR X-Received: by 2002:ad4:5bac:0:b0:4bb:db4d:b60f with SMTP id 12-20020ad45bac000000b004bbdb4db60fmr28661795qvq.105.1667561829974; Fri, 04 Nov 2022 04:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667561829; cv=none; d=google.com; s=arc-20160816; b=tEA9a3/HG7wOH3S4bMoOmsxnHaKCIAUVOhTdsyw/1DlaBcm3w4GoqissHsTwJJml62 0LEZm9Iv5y8yqPN5mHZGbJUa40d3KR+y2iaAL0QdMCBMlTOa6PvyelCcSOR4LIB4Dgid oC/1EOLxkZLa70rq7hKsHRC9hl/6wfpEbv/2vN5YYJVChZ2SVzIqs8agJJd5pAMohxMc NwGb7aBtagJTxaylgGrgpW/YomADoff5MEQWe78Gc/HHwt2u3z+qkb7QBxR94vUbl2Nc B7fcNQDvRMTMO1wLxfRqHztrt0QbmMNhUgLC3fv9a+pYq+OpYPCvJ04RkWgRAX7Iziu+ TG3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender: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=OaH3AJ6++HqpYB2gMwyPaC+oyNj5p0BkbapcfI5PAjg=; b=OpHcqYjC48Ip+pPkBHGXJlfm1p7i/x45aGzuYhuNfu/T1OzQ5zoyNDnEiTTSC0di2x YFbPPqDv+7IAyUxFurVR9fpVqDXW736mbfprMe/DtS7K2WyOdmUHE+HFI4cmtyixgy2z W97TrKXg6hJLIpG6J7M9uGIgdwGkAIFQdOcPpfSSipqoX9QJeRoA8VMQRh13IVcrGE3w 2szbNyFodDJwj1h08M7jJRpWj7ddApL2K63pRgpqx4/wCnKarCUIa6A6oN8qLbfosoSP bKVyCmzSKlrrvDCiWM2jOplL+Q7ndNCJ9im2hkLGJhk9duWbi1RjzFAYipj8qayNbkPd tsXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dNaPdlqv; 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 fv8-20020a056214240800b004b40ccfe68bsi2536891qvb.105.2022.11.04.04.37.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Nov 2022 04:37:09 -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=dNaPdlqv; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oquyx-0001Fh-1T; Fri, 04 Nov 2022 07:35:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oquys-0001Bd-Im for qemu-devel@nongnu.org; Fri, 04 Nov 2022 07:35:26 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oquyq-00086U-Ua for qemu-devel@nongnu.org; Fri, 04 Nov 2022 07:35:26 -0400 Received: by mail-wm1-x335.google.com with SMTP id p16so2857896wmc.3 for ; Fri, 04 Nov 2022 04:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OaH3AJ6++HqpYB2gMwyPaC+oyNj5p0BkbapcfI5PAjg=; b=dNaPdlqvrfIYhdca05Z+nNHc25pxVkN2v9HdKE+VNT0Jpv+paH0gxGBZFKs01wfqKB PBKTDgR1Dkuzjz3kNMUm8N8uMQXyXBfwj8p5KGGRzRA1GPs29xuh/Uqzoh8Dqv0xqW0D pUi08KNzXD9pMcenhot5nui/SIg3xqZinCU0Vy6K3kZr6nBWLilW3p6HkUe9wMWH51VO VgJzQF9EHuBu3RFjIg7c1F2Z8wXmAD2nPwZDoI+3tMyI8eXUzAytk+d6RUNip21QZ5Ns tCM9JKat1yky6bm7mNVIrPutF/fnolPzA24diEFGjmX28qEIwftxhQAPUh72P6t4ZHN7 VA0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OaH3AJ6++HqpYB2gMwyPaC+oyNj5p0BkbapcfI5PAjg=; b=aXVo6FhpbDsXt4lAvHpAF9dle5bkq0iwEE020z95rjZLcIpMdM3lOVB8hEjar+sAur PhsVdJawNwbsRf5rHnKx4UBn1ISV4BCnDxxwoCbB+tONjegM7JzBsI/zgyWDNkijOzJv NsFRAyDKrBJMdayT5Mq9/m87NKT3ZkEqNKl4Fzoyhkh2BpVpilIdr7WsKbBzyRgw2cCM d9rRp/cszY7U0szzWIYhkwY3y1SC27crnpRmHFmidu0oeqoBI9PbWOX/K0EYeVzytgF/ ltF64bcBqcrTNwj2g2e0W3W3NZl0beMZFLqtcJ1/dC58u1cXi5N57VM7Xlufj9Zl6Sjf yt8Q== X-Gm-Message-State: ACrzQf03LEEmC68eCmwCT6FaGi0pP9zd2lIHxFBOPb557Og3+ldQ9O/e j9PXUwauo0HODx3H9bXFdqd11dFkga4jSg== X-Received: by 2002:a05:600c:2242:b0:3cf:4ccc:7418 with SMTP id a2-20020a05600c224200b003cf4ccc7418mr32804125wmm.191.1667561723499; Fri, 04 Nov 2022 04:35:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id g17-20020a5d4891000000b0023655e51c33sm3255743wrq.4.2022.11.04.04.35.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 04:35:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 5/7] target/arm: Copy the entire vector in DO_ZIP Date: Fri, 4 Nov 2022 11:35:13 +0000 Message-Id: <20221104113515.2278508-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221104113515.2278508-1-peter.maydell@linaro.org> References: <20221104113515.2278508-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson With odd_ofs set, we weren't copying enough data. Fixes: 09eb6d7025d1 ("target/arm: Move sve zip high_ofs into simd_data") Reported-by: Idan Horowitz Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20221031054144.3574-1-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/sve_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index 3d0d2987cd0..1afeadf9c85 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -3366,10 +3366,10 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \ /* We produce output faster than we consume input. \ Therefore we must be mindful of possible overlap. */ \ if (unlikely((vn - vd) < (uintptr_t)oprsz)) { \ - vn = memcpy(&tmp_n, vn, oprsz_2); \ + vn = memcpy(&tmp_n, vn, oprsz); \ } \ if (unlikely((vm - vd) < (uintptr_t)oprsz)) { \ - vm = memcpy(&tmp_m, vm, oprsz_2); \ + vm = memcpy(&tmp_m, vm, oprsz); \ } \ for (i = 0; i < oprsz_2; i += sizeof(TYPE)) { \ *(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + odd_ofs + H(i)); \