From patchwork Mon Oct 31 05:41:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 620207 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2605265pvb; Sun, 30 Oct 2022 22:43:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4fiU4WpHQqnUCmuP/8RK4yTPR1G5CriKAc54sRaTcyWOKrx3mM+hcYyabIvLwtek9rD5mp X-Received: by 2002:a05:620a:f12:b0:6cf:bf70:9ee4 with SMTP id v18-20020a05620a0f1200b006cfbf709ee4mr8027552qkl.608.1667194983212; Sun, 30 Oct 2022 22:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667194983; cv=none; d=google.com; s=arc-20160816; b=GZZGNoarULkyddkYbPnwdafukKek1Hc1EDdyqjFi8HGiQyT3t2L7T8bFUy9Ovv+Pf8 r7HETvM8hnT+L2RN0C0/F3jYdthsiJsnRY/DnqUp1LlcXxPzbD3GtXXry5Ay5L6u1oC3 ExtIWWgNeiaRwxO8z9Q7Oav3jCP/eEweoOssmOS7MGTIpg7l3HEwoEiJNRNdQMEd0aYX S1v0y+iwF6j4e8BG9QNfdFlJg99SklGEuhRw2c6IPKCGqpAFm3BrHTqKY2ORo29Wc6Vn IMQZhRUh+LjnJbqFh/fFRJwEI0xJV807c3/6chRXi9HnaTscftYOSJgfBSpF+xa4dwFr IK1A== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=aTEo0Aq3CF9CDtdhcwYs6wkUEncR0N5grPyzOskqywg=; b=E+l32V8/SFdc2afIPv1q9YHzu0muuo9hjRHesuWcKl26HSMTbu2caVuQYvzY5uMtaq P0W7W5dNUN3n7cAXcmOuhnpwbYvma6VotSSmInB3iT8C4NQF97SeK7GLyCAcH+AFWGsd YfXEO+uFrm7q8Z4wYzpm3hF6gLZf6xmG1KDYsTfBL8hZfcJFp8DAJMEg+ja215PQhRP0 4Z5RlRH727u5KHUJ6WlIPg92N9aJQ3xREsiMs0+rsAFH6sSIvTXwARerxrOOzM4ytORy vtju7QWbFN78UnoDuzeGgnbg8sURCSn6TLMNdBRLV8chlVULQCb418zXM+73R+LaKs7n Ttaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qJnkd7K1; 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 u5-20020a05620a0c4500b006fa1f337b5esi2676262qki.180.2022.10.30.22.43.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Oct 2022 22:43:03 -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=qJnkd7K1; 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 1opNYp-0003nX-IB; Mon, 31 Oct 2022 01:42:13 -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 1opNYg-0003Pk-UF for qemu-devel@nongnu.org; Mon, 31 Oct 2022 01:42:05 -0400 Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opNYf-0004Q6-DL for qemu-devel@nongnu.org; Mon, 31 Oct 2022 01:42:02 -0400 Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-13b6c1c89bdso12434115fac.13 for ; Sun, 30 Oct 2022 22:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=aTEo0Aq3CF9CDtdhcwYs6wkUEncR0N5grPyzOskqywg=; b=qJnkd7K1CrDy7zmyaqTgCBAbGpSwGe+CLzYptT6Qtuc+R/nh5EvwVmHmpfw+9cNktJ X//ySs0NCubPq0tuZOZBL8ySjemIFcx/D9/ndJKYePQGf2szN0ZbZDjWEBTuMP5YfbcY /4TXBKBUpu+M0wqDHrVk2ZLcBZ2p+rMwThlJIvzekPcleWuC6450+YuP1CclNVRN4uhh Wf9BeobxjoWfRTBMPs3DKeiDRQajw9DIZGuK6le6dIi0qXiYbOquMU/bw94bk01wKmh5 dWLIyyr+6OUNjn8g3TLU8TaDo8V78xtivDvq01lZgeqipRKQJZqFwnig/7AH0d9dKxya d9UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aTEo0Aq3CF9CDtdhcwYs6wkUEncR0N5grPyzOskqywg=; b=I7ChU4fFtbN25X6I5n2ZGuMQNHHqWFR3a6LEeqBG3YNm/OruL89zrWyXzJnjv3wE4p 6EJlKur66VXSKKHFv4xGbRJPrtKTrV07aF+hpQoa6bsgG7zyuUgKrFmKTVDrUtOv3RmR sSXIyKFsWwEs+ctxW15mlboMPskZZDx0fpjge2HQa7/5M6A+ITCxYXHXLTpGCkIWQhFN VqiGzbwR/oODPv9Yqq2Shzhg3sHAm1qrGb1MCdtbjAtW9UZyRHz4CcQcu3NM9cDOsoqo 96/GtAkJbe/ZF8VzQ7d8B7l75MEeYHUbvGCkm3KlJnvXG1IJW19P/ItzEYbLRdbpdZt+ +Htw== X-Gm-Message-State: ACrzQf1yTQWiyMuG7TW242vTdaBY5qKNTtL5oV2o6EhSHWwt4RtHALUI OhOREq7IafN/aRnbzW2QnMIJDu66Gh4ugw== X-Received: by 2002:a05:6870:ea8f:b0:13b:8dad:5895 with SMTP id s15-20020a056870ea8f00b0013b8dad5895mr16274503oap.233.1667194920125; Sun, 30 Oct 2022 22:42:00 -0700 (PDT) Received: from stoup.. ([172.58.176.235]) by smtp.gmail.com with ESMTPSA id i21-20020a9d68d5000000b006619295af60sm2388837oto.70.2022.10.30.22.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 22:41:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Idan Horowitz Subject: [PATCH] target/arm: Copy the entire vector in DO_ZIP Date: Mon, 31 Oct 2022 16:41:44 +1100 Message-Id: <20221031054144.3574-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::32; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x32.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 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é --- 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 3d0d2987cd..1afeadf9c8 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)); \