From patchwork Fri Jul 9 04:26:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 471790 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp954511jao; Thu, 8 Jul 2021 21:48:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPTIyOgF/DZDLjBlnhKS8lz54fEFVEsGgUlaT9JdZEMkWfeDZID5zvPjefkNhQyWPdd1K4 X-Received: by 2002:a05:6214:178d:: with SMTP id ct13mr1244129qvb.22.1625806129883; Thu, 08 Jul 2021 21:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625806129; cv=none; d=google.com; s=arc-20160816; b=IfOjYND7XMKRTFDRcdu5OvhFi4uao4bbKyJMAXjvTnggcMtz2jyTtpyTwjw+srMww0 hsZvd9rQzPZsJYwLWdkIBoc/R6VARnhyLFoaQeLBnhy4GtGagPHfO2jh9km7byE356wr N6rrolmqP+3TzfxsJ4PSU+LIj9oziOnUnpq3tdzuTWb37J/DJznOHUV4e5vKe+UtO6k3 SMjjDJDg/YLwkqOV1LjpXvVZqXLZ26AEQ0YQUUDZN3P9baMXE44JBZI/iWRMefss+Jh7 hou3gSorTJUlca7RGptotQ1DlmwB6DPt86Gus/VJkO94JF0elk8ek+fPv31T/Ht+0Arx 09LQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Zos/XIBM0Jy9VE3NQaTNYLdt/FcSmttabh3+wO3UTg8=; b=PQIW9gFqqLmz2WmtXewVkCBTZpFR6VKMm0UwjGi1SM8BiHtc0SrPwAM5RRpq9zP1v1 KrDz8u8HkfzD1Ocy1YlLF0KkqO8KcSrY3+kFNqFEJFRVl5T9Awv5wZadHCgATx9Wu6Ko YxV5Z4q/AluJf9Azz0nZj9NDFXcHqXdxFCqP5loHv+oqMpq0rBOsUg7YmbmooY/qYeqz pelPScrYv137BlDl3L/JJbRs/x0ERKk6IMIFE3QbEIumtomVw2aPKdS51WWbxAI5TBiP entrVTi/iWEDq0orFhnk9wrCDj5PQ4XW1DaqZs7hDEMATo8E0Iv2z0wBGhFGfB0aUQOs tbZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iO6szx4B; 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 13si4019109qtw.213.2021.07.08.21.48.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Jul 2021 21:48:49 -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=iO6szx4B; 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]:57538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1iRV-0007Cl-8W for patch@linaro.org; Fri, 09 Jul 2021 00:48:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1i6F-0006oH-PZ for qemu-devel@nongnu.org; Fri, 09 Jul 2021 00:26:51 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:53772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1i5l-0001ZO-Ic for qemu-devel@nongnu.org; Fri, 09 Jul 2021 00:26:50 -0400 Received: by mail-pj1-x102e.google.com with SMTP id p9so5059024pjl.3 for ; Thu, 08 Jul 2021 21:26:20 -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 :mime-version:content-transfer-encoding; bh=Zos/XIBM0Jy9VE3NQaTNYLdt/FcSmttabh3+wO3UTg8=; b=iO6szx4BWtH+ue6cE4Dgzyuy6w+HxTBmStd1LHV+kV9WPBfLviA7eWeqzi1xXWN5l1 aSlg2odQAU3nmp4d1MbGSovVsVz0ky6qmONrDzDx2LkBSUrMZkDuyoMg2W8HMBFn/kL1 Dqk/vC6HK2O/Yw80wVouRQtApSP0nCH8ab+S6+pS9+/6+D9I9KGQ4abZYk0S4xqRyz// eAy55ZPbse/7RdaPO3faBkl43V8UmdhcxS7cpKG6oAOa628ERuJ/D6w85vCBnD6cjSsL icX/odWpBImZjGr+rQb0MSs+T4UWsbUrrsf7j9eBSXoSDGdg3PlB2OD8ctmUQMra59F3 iNgg== 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=Zos/XIBM0Jy9VE3NQaTNYLdt/FcSmttabh3+wO3UTg8=; b=alLVLkTkqioUFsQX4FhVRmLSo2LxyYwSVeleZItAooMRxJTR77dz4CXQ0AS4Zb5dav kqZPQVytxWGQ/EWt+OH+Z7ChqKJZApVcrm6q/p0pziXtIiKvxd49bfrfyA4wv0thZztT LSu6EjtoAhf2FugiZFqtp/Es+3uQzxeAn5RS1wfKE1RFkXl3X8k0wBO0OS2u7JUAIj7a LvenBSk+3uJYXBwOafImEe7yiTMuQHRUlI+uUicxQPBwgvHgdF9aQGaTWUE+izSA5xhs hTYR2WhU7UJFg8FY7hGAgFYhdJqEA7wzTBUpkhhPNdSZsWGSfut/QQJlIhT5K0NjMGUN Wb4g== X-Gm-Message-State: AOAM532pBQ9cp0ObhlbgL1FAJL3Khr5zIV5rVZmbOmi0DcuSL64fAWrX JQl99LrkGMQWcvMpxuaaweAkZMOfH5ZDrw== X-Received: by 2002:a17:90a:4404:: with SMTP id s4mr8628604pjg.218.1625804780049; Thu, 08 Jul 2021 21:26:20 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id y16sm4406727pfe.70.2021.07.08.21.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 21:26:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 17/17] target/riscv: Remove gen_get_gpr Date: Thu, 8 Jul 2021 21:26:08 -0700 Message-Id: <20210709042608.883256-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210709042608.883256-1-richard.henderson@linaro.org> References: <20210709042608.883256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair.francis@wdc.com, qemu-riscv@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This function is now unused. The corresponding gen_set_gpr function is still in use. Signed-off-by: Richard Henderson --- target/riscv/translate.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) -- 2.25.1 Reviewed-by: Alistair Francis diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 8ff75a5798..a6c850e9d3 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -195,15 +195,6 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) /* Wrapper for getting reg values - need to check of reg is zero since * cpu_gpr[0] is not actually allocated */ -static inline void gen_get_gpr(TCGv t, int reg_num) -{ - if (reg_num == 0) { - tcg_gen_movi_tl(t, 0); - } else { - tcg_gen_mov_tl(t, cpu_gpr[reg_num]); - } -} - static TCGv gpr_src(DisasContext *ctx, int reg_num) { if (reg_num == 0) { @@ -1046,9 +1037,11 @@ void riscv_translate_init(void) { int i; - /* cpu_gpr[0] is a placeholder for the zero register. Do not use it. */ - /* Use the gen_set_gpr and gen_get_gpr helper functions when accessing */ - /* registers, unless you specifically block reads/writes to reg 0 */ + /* + * cpu_gpr[0] is a placeholder for the zero register. Do not use it. + * Use the gpr_src and gpr_dst helper functions when accessing regs, + * unless you specifically block reads/writes to reg 0. + */ cpu_gpr[0] = NULL; for (i = 1; i < 32; i++) {