From patchwork Tue Jun 25 05:07:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 807225 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp2185158wrt; Mon, 24 Jun 2024 22:09:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXevDwjYhLNwjy/ZLl8v/QRZjDAiRGSWt8j+JlKAbHGWDV0ZO30TRumvxNm9CBJBknz7d0J8M9VccETF7PBhh+j X-Google-Smtp-Source: AGHT+IEN4n5GLQug0sfcZzLhDkZyse+z1uW26H1uXCKkJinmgi5ZfYbOGyHEbKEl94R6e2b88/B2 X-Received: by 2002:a0c:9d49:0:b0:6b0:4201:3840 with SMTP id 6a1803df08f44-6b540a836c9mr62374326d6.40.1719292171925; Mon, 24 Jun 2024 22:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719292171; cv=none; d=google.com; s=arc-20160816; b=LjEUt/f3IDIXs2Rn5pOZAgbiUiiC1cPtmx7S+GlSayJ+FRi/c7Me0D7MZYjb4veICp sz+9SED/GVuvcaOifmE3FkVZ/KrA2EExFXjGKL9PNQv4yKH6+TRAEw/pfjZxoit/EEHh XUnrUS6pTTqXO9PxgX9faGVMVhoskGx0hTajK/CGbGAgmuDjuLpzi2yguzVQGdBAYn/z LrslUaXLEJH7nzu7XHMkEcKKPdH8j5SZtVZt6VU/NqOEc3iFOIM2muoeQkmfpwkX2Cwx baEfnbjH+9XUecHAkICrCi5qRO0jtIm2yQ2UPQSgJOBf8mos3+rse6lKy45wVytH5iwb xsTA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SxSbNTyLqm62CyX0wlj5AbMtTOd0dfgBThbteUcz5rI=; fh=quVKJN+JogokNzsp4kwoA7mheGRSBID5PxcC4hooSO8=; b=G2wm4KoE8oK9F2dwgX2hur/8hWahJQYHaDnoVI6apIUF+HGW4i5tTSfA7nDeb9WL5J ya0Jjlh8FJiZvg/aZMzqLPXdE9UuX850Lv8TP/91laB3w/yFeaRGHQHO6i8OOiX4KPau ziOEYRNiKLyytlUfvfGPKDKjfYMZAvGj2v45i08ppJRXa20swE+2f156c7amAmeiHXDK V4aj8PkhcbDtRktIgTMtOSc5A/ecZfB4/HvH1A37vjGKqrZwTu9VlfszgoXRB/yK1rMk k64STM+SEkaIm47FsvMbTM9GaJVHeczaj2F57jHSizS+tou+MH4i2sfjUpRYZstXOIEh Zrqg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FWD41Rek; 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 6a1803df08f44-6b51eceb7c3si97622866d6.34.2024.06.24.22.09.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2024 22:09:31 -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=FWD41Rek; 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 1sLyPm-00013C-05; Tue, 25 Jun 2024 01:08:22 -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 1sLyPh-00011W-7q for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:17 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPf-0001VC-1X for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:16 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1f6a837e9a3so31324745ad.1 for ; Mon, 24 Jun 2024 22:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292093; x=1719896893; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SxSbNTyLqm62CyX0wlj5AbMtTOd0dfgBThbteUcz5rI=; b=FWD41RekZQtVGMVobvF8Qg2MLiuhZ9mQR5ek2awl64oCckp9p84F0+rhDTLJhKqVSu 9qVoiOW2jXce4It1jdaGxx/SLmRsgCUD4sL6zDgA+K0wIX9PnGLob1bqvKk50KPtbX91 2JKKwuyDVPJAlM+XqwJRR2TLGmyy0Cc1GISVzEU4LY+Jq3lmPx4crDrzMR/jJ3lO7uLk Zwed9hVTe4Zsio2JDLl/VOch5DFAr70kmiJXhCCYGPlNWh9NZwqKvanpWEX4KJ5JLYgv QvlvyVL2IgEk4pTT86oIkxIwPhGbDv9eiJAFYNna55v2xxm75hT29wAMWp6I6hsGlmgH eWkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292093; x=1719896893; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SxSbNTyLqm62CyX0wlj5AbMtTOd0dfgBThbteUcz5rI=; b=tUoiDHebIHhYebopr5/hoO0DY8x8gDKnLduGzWqU0J0EVjY7l9q4Z6CQvguy/cnbep eHYYbbIkwyp6d/8xnUD3ykZxc6w5BzDovqxmlZ/9lZ7TSF3ds6EXH0fqht5Kc4m0WBty KjFfF2lboD6nRZ33DmyPCWK5il4OLQovCEdhevS+b0eePZsL5rkAV3Z7TqtNpvhmRQoq NwIXKCGVJ4oW4rkzePqImx/TEoY7D/t/hJBOFGJMG3h291zUyhl2RA7ZeSa0CTYd2D2w bxfj3rntbXPjjQw6+w2ortraCrYljMQlYFvwVEWtzMo/2vuyDC3m3fWTLXslVYiJvYhV tPDw== X-Gm-Message-State: AOJu0YzCWUmljup1oKZ2JWENGSyj8AeNLXs7rDD/6diKhBUk3Vg11yJ9 t0KaAEjqDrvPUTyiyH4XOdf1QBhlqAxOHnNuo2oG1oYF1oapxLbUI25P2J4Q5rm38WEPaLceM4D L X-Received: by 2002:a17:902:f60b:b0:1f9:fa69:dd4d with SMTP id d9443c01a7336-1fa240f27bemr73490835ad.68.1719292093207; Mon, 24 Jun 2024 22:08:13 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-stable@nongnu.org Subject: [PATCH 01/13] target/arm: Fix VCMLA Dd, Dn, Dm[idx] Date: Mon, 24 Jun 2024 22:07:58 -0700 Message-Id: <20240625050810.1475643-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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.29 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-bounces+patch=linaro.org@nongnu.org The inner loop, bounded by eltspersegment, must not be larger than the outer loop, bounded by elements. Cc: qemu-stable@nongnu.org Fixes: 18fc2405781 ("target/arm: Implement SVE fp complex multiply add (indexed)") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2376 Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/tcg/vec_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c index b05922b425..7b34cc98af 100644 --- a/target/arm/tcg/vec_helper.c +++ b/target/arm/tcg/vec_helper.c @@ -907,7 +907,7 @@ void HELPER(gvec_fcmlah_idx)(void *vd, void *vn, void *vm, void *va, intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2); uint32_t neg_real = flip ^ neg_imag; intptr_t elements = opr_sz / sizeof(float16); - intptr_t eltspersegment = 16 / sizeof(float16); + intptr_t eltspersegment = MIN(16 / sizeof(float16), elements); intptr_t i, j; /* Shift boolean to the sign bit so we can xor to negate. */ @@ -969,7 +969,7 @@ void HELPER(gvec_fcmlas_idx)(void *vd, void *vn, void *vm, void *va, intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2); uint32_t neg_real = flip ^ neg_imag; intptr_t elements = opr_sz / sizeof(float32); - intptr_t eltspersegment = 16 / sizeof(float32); + intptr_t eltspersegment = MIN(16 / sizeof(float32), elements); intptr_t i, j; /* Shift boolean to the sign bit so we can xor to negate. */