From patchwork Thu Jun 13 04:16:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 166598 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp235059ilk; Wed, 12 Jun 2019 21:17:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOrFqiMK3J1l2sQpv9deSPcFGoCol6xC57UH1YqVH219xQmMDkul/FP04MJdzYUkmJmLqr X-Received: by 2002:a0c:9802:: with SMTP id c2mr1668922qvd.96.1560399452608; Wed, 12 Jun 2019 21:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560399452; cv=none; d=google.com; s=arc-20160816; b=y49kix/nn/ppfbTqev/1JfqvFCnr95Pszu8YRtY19nnF6ApSC7gtZvEyu0J0WgZdrn mKrK25mhck9dY7cy6hOmwllsRxjCmoiuR6Jvey1HKDSyys4iqRhYI3tqYafRyc2uuhlc sn2R6rqEBWzKSMVFE6kCKgL9g8QVPYQa+oYWm6xRIGkQ/hZYloAA/bGHN1L37XnM9sCt KX9fAXGI4QGbAJS4qfqZO418eN2fJMkdwH9RbhaCX588bqiZVCa22hho84NX3oQgKnVS 22e5PLAuBBFsuS3J7+8gbDmc6ZyD1Uhy5xEEA8y/3hSXrfLbHHHluMvVkySnx+9uHCN9 NVdg== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=E8T9QYRxQ8oYv/LyVXgALpcOgOYN25OmkK0wh8S8+x0=; b=Bl++CqKTsbdCkdkyHGxTti2ZClRWWvFfyxkytDiqODLyesH8HxGh9brEOryBo5zcfk ovim7qwzwH6HDEqC0djl5UE0JW3ho+DosiEwdNkEnXwhJpnzoLi/2O//OtTrHX4XA9es 2IDL3RCuk6iSR5aQ+ynKHV4ZqAXCplYB0mJxndZcdOdIZqOVFaCJjEoWiz1kI5VthlYO yPvVtYAQotjCYcOSJW3BD9zHxStY+WYuvHQF9swxIdWKiigBFP7e8G+6v0nxe0ppO/Jo sYebCTeo1vdoa4Ae7Km9xW4OYwQuZNkgjhD0DTRgnYzbsH4sVVw54qqEVFB8V2UpP0w5 nRDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="dL/heaFl"; 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 v2si828868qkh.48.2019.06.12.21.17.32 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2019 21:17:32 -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="dL/heaFl"; 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]:36874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbHB6-0004Jt-7N for patch@linaro.org; Thu, 13 Jun 2019 00:17:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35881) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbHA3-0002E8-1H for qemu-devel@nongnu.org; Thu, 13 Jun 2019 00:16:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbHA2-000620-3O for qemu-devel@nongnu.org; Thu, 13 Jun 2019 00:16:26 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:42997) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbHA1-00060B-TL for qemu-devel@nongnu.org; Thu, 13 Jun 2019 00:16:26 -0400 Received: by mail-pg1-x544.google.com with SMTP id l19so7537395pgh.9 for ; Wed, 12 Jun 2019 21:16:25 -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; bh=E8T9QYRxQ8oYv/LyVXgALpcOgOYN25OmkK0wh8S8+x0=; b=dL/heaFlr/FFCB1z+6v7NecnLByMyoHiXjFYWo0Af3W8XYO8HjuAX8yARNZPnC5j9q zxImcmcGh0gzoVlOmD8YFiIspdTeyKCb/IPMXZFu322WNTZCUvGFTx52gJKUZZnxT8K9 xFqyaCY1qkepKNuLJ6LDs9QN0OiQgttFlIrGq13qBylBkMv+dQfOLMOZJ8S06nWwv/Qr vIUrepLze5Ccx9NRCaDAtuNORGU4i0ucIi2ZovePBUd24Vr9YYGp4nl/YfkBQ7zZSa7t cbyetP5o4n0kWTAOpbj7rR97s+7mIYh1g3PirJzlfDbxXvGIpJU8n9ZiQZRm7KyXMdzK hQtA== 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; bh=E8T9QYRxQ8oYv/LyVXgALpcOgOYN25OmkK0wh8S8+x0=; b=thlSBQ/Z1kNKNHY7aFoyzgmsf9MwH8W8FqhnXwaN7EPrMH/4723wLUV0KCgKomgwSJ GyVrtxkH6+O7MzKavPmhIZ4H2GZd4/S8jr1o21mED3c4iHoa/BnggaCbUN0znkMHQiET +Ny+/BO0cZfi49tGbOp3bC/h+AzfWign1Zkk0vVQGz0SBHx6ej2ieZXuDvkQgymhDU5p 8TO+bNO9IbC6FX/POwjg/VgOZ576B/y1Cn4T2ybPJDyEG9vRc8anqHAqSf1sVVO+069F QzOQYOMtTmjV5mRg6evY1hXgU60vGdpgKk5fIVO68ka+rfVS99PsHZ4RHDMT7gGvitla hriw== X-Gm-Message-State: APjAAAX9vO0dParZBnEjy1N+1h4eM75IYS5NIUVYS/T5huqVD/0f55no tehLsG1abI5A/gTIMOh5T3gj6OMX82Q= X-Received: by 2002:a17:90a:23a4:: with SMTP id g33mr2874252pje.115.1560399384524; Wed, 12 Jun 2019 21:16:24 -0700 (PDT) Received: from localhost.localdomain (50-247-96-158-static.hfc.comcastbusiness.net. [50.247.96.158]) by smtp.gmail.com with ESMTPSA id m19sm1301262pff.153.2019.06.12.21.16.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 12 Jun 2019 21:16:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 12 Jun 2019 21:16:19 -0700 Message-Id: <20190613041619.32102-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190613041619.32102-1-richard.henderson@linaro.org> References: <20190613041619.32102-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH 1/1] tcg: Fix typos in helper_gvec_sar{8, 32, 64}v 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The loop is written with scalars, not vectors. Use the correct type when incrementing. Fixes: 5ee5c14cacd Reported-by: Laurent Vivier Tested-by: Laurent Vivier Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- accel/tcg/tcg-runtime-gvec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/accel/tcg/tcg-runtime-gvec.c b/accel/tcg/tcg-runtime-gvec.c index 3b6052fe97..51cb29ca79 100644 --- a/accel/tcg/tcg-runtime-gvec.c +++ b/accel/tcg/tcg-runtime-gvec.c @@ -874,7 +874,7 @@ void HELPER(gvec_sar8v)(void *d, void *a, void *b, uint32_t desc) intptr_t oprsz = simd_oprsz(desc); intptr_t i; - for (i = 0; i < oprsz; i += sizeof(vec8)) { + for (i = 0; i < oprsz; i += sizeof(int8_t)) { uint8_t sh = *(uint8_t *)(b + i) & 7; *(int8_t *)(d + i) = *(int8_t *)(a + i) >> sh; } @@ -898,7 +898,7 @@ void HELPER(gvec_sar32v)(void *d, void *a, void *b, uint32_t desc) intptr_t oprsz = simd_oprsz(desc); intptr_t i; - for (i = 0; i < oprsz; i += sizeof(vec32)) { + for (i = 0; i < oprsz; i += sizeof(int32_t)) { uint8_t sh = *(uint32_t *)(b + i) & 31; *(int32_t *)(d + i) = *(int32_t *)(a + i) >> sh; } @@ -910,7 +910,7 @@ void HELPER(gvec_sar64v)(void *d, void *a, void *b, uint32_t desc) intptr_t oprsz = simd_oprsz(desc); intptr_t i; - for (i = 0; i < oprsz; i += sizeof(vec64)) { + for (i = 0; i < oprsz; i += sizeof(int64_t)) { uint8_t sh = *(uint64_t *)(b + i) & 63; *(int64_t *)(d + i) = *(int64_t *)(a + i) >> sh; }