From nobody Sun Oct 26 01:44:59 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152297649647777.91477492252716; Thu, 5 Apr 2018 18:01:36 -0700 (PDT) Received: from localhost ([::1]:40005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4Fl1-0002Wi-Na for importer@patchew.org; Thu, 05 Apr 2018 21:01:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4Fjv-00023I-SM for qemu-devel@nongnu.org; Thu, 05 Apr 2018 21:00:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f4Fju-0000D4-A6 for qemu-devel@nongnu.org; Thu, 05 Apr 2018 21:00:27 -0400 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]:45840) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f4Fju-0000Bj-0w for qemu-devel@nongnu.org; Thu, 05 Apr 2018 21:00:26 -0400 Received: by mail-pl0-x244.google.com with SMTP id v18-v6so19636367ply.12 for ; Thu, 05 Apr 2018 18:00:25 -0700 (PDT) Received: from cloudburst.lan (2001-44b8-2176-c800-8cc6-2630-7d99-5ef1.static.ipv6.internode.on.net. [2001:44b8:2176:c800:8cc6:2630:7d99:5ef1]) by smtp.gmail.com with ESMTPSA id k126sm16768436pfc.142.2018.04.05.18.00.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Apr 2018 18:00:23 -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; bh=rZ2fTQyMhAxonaSBh854h5s+o5c0YIFJqdXcE4L1Pw4=; b=cY21Pg6K6fzMsuiDcEqCFMzUhsBPU9JwNeDuI9D38Op1Zx3u2YYa2B6Gz1sPzZZswI c4kz/TFlbQUksDGwVk6V+JCHnPKlWVMghN8ndUrBTjTokJFWT1iLtkG3VfwJEV9yW/nL AeX6NQ/7pSPBXuRKj3n/w7HqpbXKNbBlePcAo= 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; bh=rZ2fTQyMhAxonaSBh854h5s+o5c0YIFJqdXcE4L1Pw4=; b=F0GjDfXJ/JotO25tySnHSSUUb4o2W6sSCcbWgKGfRHjUXJE+0XEfJx+9f1hbVhd1GJ nkLBq+zTSm1aM8oTfx/4FSd8ttG3NczzazWOsG6UERULuZx9tQy44k1qHKY38vxlDkSe 8toTMjs/HJYlnapQW/8HJKaIFA64l7pAEaCMC6az195pQQ+tjlyFlvNc4f0ZR3bvYv3E dlj55th4P7AuUrMfCUELm7Ze5eVl5uje/FEqTORjkllRMgNA2LZyOh7ksJYqmVg5QA4U OLUQEKZCU/nTnO26a9laiRqDKW0NwDv9Wsu2uNd86fua6BMY2lbM0biNl9gqfHO38L+b FBIQ== X-Gm-Message-State: ALQs6tBMzdi/4q2tlz6MSUqkMZOpGgfKBqAJT+HLuvrr/4xuXKdB3Rl6 37Oi+ALUuz84bEbETjg/DTBM9Gi603k= X-Google-Smtp-Source: AIpwx49wZMk6gd/BsdQPzzgZVmnW0RONNQ0t55kDcrhhv3rDUx8K/y/T2sSeoLL/pXGi33m/9lBgmQ== X-Received: by 2002:a17:902:f44:: with SMTP id 62-v6mr13367562ply.318.1522976424085; Thu, 05 Apr 2018 18:00:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 6 Apr 2018 11:00:15 +1000 Message-Id: <20180406010015.16979-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::244 Subject: [Qemu-devel] [PATCH] tcg: Fix out-of-line generic vector compares X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, thuth@redhat.com, "Emilio G . Cota" , alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" A mistake in the type passed to sizeof, that happens to work when the out-of-line fallback itself is using host vectors, but fails when using only the base types. Reported-by: Emilio G. Cota Signed-off-by: Richard Henderson Tested-by: Emilio G. Cota --- accel/tcg/tcg-runtime-gvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/tcg-runtime-gvec.c b/accel/tcg/tcg-runtime-gvec.c index 8bf8d63912..90340e56e0 100644 --- a/accel/tcg/tcg-runtime-gvec.c +++ b/accel/tcg/tcg-runtime-gvec.c @@ -705,7 +705,7 @@ void HELPER(NAME)(void *d, void *a, void *b, uint32_t d= esc) \ { = \ intptr_t oprsz =3D simd_oprsz(desc); = \ intptr_t i; = \ - for (i =3D 0; i < oprsz; i +=3D sizeof(vec64)) { = \ + for (i =3D 0; i < oprsz; i +=3D sizeof(TYPE)) { = \ *(TYPE *)(d + i) =3D DO_CMP0(*(TYPE *)(a + i) OP *(TYPE *)(b + i))= ; \ } = \ clear_high(d, oprsz, desc); = \ --=20 2.14.3