From patchwork Sat Sep 4 20:35:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 1524642 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=vrull-eu.20150623.gappssmtp.com header.i=@vrull-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=auDp2Hbb; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H25zW5kl4z9sRf for ; Sun, 5 Sep 2021 06:36:22 +1000 (AEST) Received: from localhost ([::1]:47774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMcOg-0005vu-WE for incoming@patchwork.ozlabs.org; Sat, 04 Sep 2021 16:36:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMcNq-0005sz-4h for qemu-devel@nongnu.org; Sat, 04 Sep 2021 16:35:26 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:35538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMcNn-0002rq-Qs for qemu-devel@nongnu.org; Sat, 04 Sep 2021 16:35:25 -0400 Received: by mail-lf1-x12d.google.com with SMTP id k13so5372640lfv.2 for ; Sat, 04 Sep 2021 13:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VXRUh2RNxOPq7aVtgUqJTY86Nx2WcsRc44jSMulnpm8=; b=auDp2Hbb/B2DkvihJ/tPBBKv/4JbikXTz4AtbeYOEeaMyOrBY1RSIOdL2fihKCWYQ9 5kJbFPrzFnruU1Bu/P86kx7XqUDiJJaK0ROaO961OrIFSqAjsFwz0MIcrsDO4Bq6VWcr soAlJFZRHhrXxsNzCk0GROAHg4JefhjzCGYK5z2i9YkCPvV5X7TxeKIYl4fC5AjMYJhp CcM/P+yqn9f0QffyZ1JiaKTuG8GyJtxTdzowY5vj7/+IOpXUu9Av/Q9/PposfET67lVK iowpCOOBrURNXDPQn5JMkv6SpSLb3tZ0jt9r2p206wgXC/deAIJZxP8AttURBxJk1OnK 0FYQ== 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:mime-version:content-transfer-encoding; bh=VXRUh2RNxOPq7aVtgUqJTY86Nx2WcsRc44jSMulnpm8=; b=eM1fLhlCaDr8dlNKsxNMaitkdgTkk22kSa/L1uzC9N2+6Lqz5Am1gUmQSMJUzdU+T5 RXpjvxhED3fTGwchZdnD/kiqL98J/MsEJQyx8AT4s/hy5RezwtcdX2G/pDfmeLrJxnKe TZyg6oMtHdy1pBUEUW1OEwlG8b2A14nAxZNzX1G7YwHTcNaLdaANCuQOS1b1c5DTqLaV Ew/Kpth+EF6XcMcO6ijiiTxXYt6O+Vdek91+ScQanTfQKpHJ7BkbwGcap45yevskRIF3 UXnKItIvzTm89jPRUjCG6Y4uOb7TJPUBocJk+wRNzZZn8AEOy8mJ59DFdOGfiEY0bZsi 8iRQ== X-Gm-Message-State: AOAM530k0PUes+ExL/RXF2GE5xDYku3EkUazyz9qsPv0Ji++XR07Hrfs +gvivEjz9Fn9trQECReLRzOho8/O5+K8laesdsw= X-Google-Smtp-Source: ABdhPJxufJhORPqZTheLDaR+XiYd94jUxc1IZI/z8znQU7Tbr0J7gnrV5089EIBaW3O2HZ0FbLwUUg== X-Received: by 2002:a05:6512:3f9:: with SMTP id n25mr3955489lfq.231.1630787721002; Sat, 04 Sep 2021 13:35:21 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f9:3a:1e26::2]) by smtp.gmail.com with ESMTPSA id v15sm326304lfq.142.2021.09.04.13.35.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Sep 2021 13:35:20 -0700 (PDT) From: Philipp Tomsich To: qemu-devel@nongnu.org Subject: [PATCH v10 02/16] target/riscv: fix clzw implementation to operate on arg1 Date: Sat, 4 Sep 2021 22:35:01 +0200 Message-Id: <20210904203516.2570119-3-philipp.tomsich@vrull.eu> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210904203516.2570119-1-philipp.tomsich@vrull.eu> References: <20210904203516.2570119-1-philipp.tomsich@vrull.eu> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=philipp.tomsich@vrull.eu; helo=mail-lf1-x12d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Kito Cheng , Alistair Francis , Philipp Tomsich Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The refactored gen_clzw() uses ret as its argument, instead of arg1. Fix it. Signed-off-by: Philipp Tomsich Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Bin Meng --- Changes in v10: - New patch, fixing regressions discovered with x264_r. target/riscv/insn_trans/trans_rvb.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/insn_trans/trans_rvb.c.inc b/target/riscv/insn_trans/trans_rvb.c.inc index c0a6e25826..6c85c89f6d 100644 --- a/target/riscv/insn_trans/trans_rvb.c.inc +++ b/target/riscv/insn_trans/trans_rvb.c.inc @@ -349,7 +349,7 @@ GEN_TRANS_SHADD(3) static void gen_clzw(TCGv ret, TCGv arg1) { - tcg_gen_clzi_tl(ret, ret, 64); + tcg_gen_clzi_tl(ret, arg1, 64); tcg_gen_subi_tl(ret, ret, 32); }