From patchwork Thu Feb 15 17:57:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 772996 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968850wre; Thu, 15 Feb 2024 10:08:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUptKDypfIcERByE9U037FYHQvhAMpMK6K13z54OtQ+0b64E5SsM6mkf8whHW6VE4l2M1pMfrrQ97lRPG0ele61 X-Google-Smtp-Source: AGHT+IFdjUx2TJ6Hx0/b+dkuZl+6jleHduDEBR/+Z7HjEOAyEXbw2v4cQ2Uu66L4DNfGA0DJik4P X-Received: by 2002:a05:620a:45a3:b0:787:19b4:b8f8 with SMTP id bp35-20020a05620a45a300b0078719b4b8f8mr3097857qkb.75.1708020499789; Thu, 15 Feb 2024 10:08:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020499; cv=none; d=google.com; s=arc-20160816; b=FbWDMGMwCk0pF19ZhW5CIH4AnirwSpcYZ24iOzREingAR6v8oqMf3Z7DdNbKeXdPXx /4vLWB6SsfzIkUfiifFGmEGtku9iyFa2oKDpKGFdUn+KaikCOOJiIwwWnatpe1DIWUDz +0lQ40US0pptpCSk4eN5Z+wNWlAR1A10ypYMOgDPRKLxhOuu+TP/3E1fFAFBW9GjJKfe qa27yrzOpAeNMlTzDUQPJcQJH64mUruP9qfnIhqxYb/ilxYi0PVDpxEXeUBnuJVzbm5e CWdklJ50BVdfrp328ZBV34DwcLpiAhTwL6kAyzdmlwrpW61NFml5goOogJrT5r0kcmuZ 5uFQ== 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=8KRNAN7J6jVrW+a5YkWZvl2JIbNfjxd3JGHRrNe6AUc=; fh=lFbaFE9CCURXS2ZRFy5xEQEZPoERQGZgvMk0cqzTFRw=; b=N1sg9JP+m1UT4EPIB/rgpDz2eBnPdYKYtVwOpCYssSDMTkXweeOqBrRVvskfgXLiYZ FG7cLlqUWQ3qfZBZzWsiH2pTkc2b4OkISAPxvYBKz8JwVi3bG7ws2mldnCZz1hEQ+wlu ey3/c+fEYxnjHRcLTxAFwAY9G6zVtew+obrMXSTUi/10b2Uxqck+jVxrsMfN2vv87l8R NJ492u2sA5djQGgISA8CSpJYKZcDfs3sSbeKu6fk2FDaDkoVxJCsz5SqQkcNntUBwmBZ 5sBrq3W0ICbXL8Rf/0xzuhypmWNb1jJyEf9pUQJQncXCbwVLLOdmXJVUrQYS7j2GOjhD C0TA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XwckSceF; 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 e15-20020a05620a12cf00b00783f2ad9a46si1947892qkl.305.2024.02.15.10.08.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:19 -0800 (PST) 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=XwckSceF; 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 1rag1R-0004yH-Qb; Thu, 15 Feb 2024 12:59:45 -0500 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 1rag14-0004Wv-Hz for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:23 -0500 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag0w-0001jy-Mt for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:22 -0500 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2d0fd07ba8bso13657991fa.1 for ; Thu, 15 Feb 2024 09:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019952; x=1708624752; 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=8KRNAN7J6jVrW+a5YkWZvl2JIbNfjxd3JGHRrNe6AUc=; b=XwckSceFGVkZ5LLhJ+dnl+6hw9goj7dHawTxXt8MhWaOJ/0EVV/R7XCVpeRzEja8+D uMVxDtGZooeYAR71+3Mj13ETEbwG9eRyEGs5byjkJGV7x8XS5X5H9kT8W0YOR79GFMdS ZdQ+bOAm3bzA82my1ye1Ov8jq7TM8aJve9QhDtqnRmlKU1iqHlhmJ594aQw0Ye1+XbXn viVA2/P6s0T0SIzftbff8Oyj0aomOn2i8QmHjA5IcK4hpqVV6rL8x3Q+runs1FIJmWk1 ezwElO45+IcNVzm8hbaddoAUkJYs8+drb9BWcqNchvGzscf3mkuztvJ96HXPqDvx0i5N 2sWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019952; x=1708624752; 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=8KRNAN7J6jVrW+a5YkWZvl2JIbNfjxd3JGHRrNe6AUc=; b=u48TqCNgALL9didzSrLo0JAZo/sEH5FUhffdLUINWPoGm6ylXqZZNH55TuK0JLA8fS Xn71FH03/mKaPnezD9+o/ZsAzgnibf4m4IhJD9QbWp1CnGHMj+pqpsvwf8/EKxBkE04w HPPzoxoWdJcX054nbvQVJC/97HttSyavlrhSaJop01XhQ0Ag78vikelw5KnV4NbODgcZ Hx5p3x8qRrYtWEbMhZmENbwsJTMVBjREo1F4CzOE/5xmhVgknod5v9W36JH5KglHTqvE dMHLtfhPs4+FmVcoc4yLzguqa1wNZYUyaycOLNrsJe02EV/jDKykdf48Dd0R7dLdTnXD F7wQ== X-Gm-Message-State: AOJu0YxoxoJCQvZOtei5GDN8lLVjgGJekiFUJO40f1nS2pb4IxnwgJdf HGMi0MX/CcANlnJ2dsB/Kk4zLLq/s3H6PvoUEw5c7DXRtdyaM5lSUVO0TcU4wTeVH8N+vhwsv7x 3nVU= X-Received: by 2002:a2e:8018:0:b0:2d0:d3ec:a545 with SMTP id j24-20020a2e8018000000b002d0d3eca545mr1850052ljg.50.1708019952746; Thu, 15 Feb 2024 09:59:12 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id y5-20020a7bcd85000000b00410ab50f70fsm5604008wmj.15.2024.02.15.09.59.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 12/56] target/mips: Remove helpers accessing SAARI register Date: Thu, 15 Feb 2024 18:57:06 +0100 Message-ID: <20240215175752.82828-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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, T_SCC_BODY_TEXT_LINE=-0.01 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 DisasContext::saar boolean is never set, so this code is not reachable. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-9-philmd@linaro.org> --- target/mips/tcg/sysemu_helper.h.inc | 1 - target/mips/tcg/sysemu/cp0_helper.c | 8 -------- target/mips/tcg/translate.c | 20 -------------------- 3 files changed, 29 deletions(-) diff --git a/target/mips/tcg/sysemu_helper.h.inc b/target/mips/tcg/sysemu_helper.h.inc index 78f7272208..1861d538de 100644 --- a/target/mips/tcg/sysemu_helper.h.inc +++ b/target/mips/tcg/sysemu_helper.h.inc @@ -100,7 +100,6 @@ DEF_HELPER_2(mtc0_srsconf4, void, env, tl) DEF_HELPER_2(mtc0_hwrena, void, env, tl) DEF_HELPER_2(mtc0_pwctl, void, env, tl) DEF_HELPER_2(mtc0_count, void, env, tl) -DEF_HELPER_2(mtc0_saari, void, env, tl) DEF_HELPER_2(mtc0_entryhi, void, env, tl) DEF_HELPER_2(mttc0_entryhi, void, env, tl) DEF_HELPER_2(mtc0_compare, void, env, tl) diff --git a/target/mips/tcg/sysemu/cp0_helper.c b/target/mips/tcg/sysemu/cp0_helper.c index f8883a3515..ded6c78e9a 100644 --- a/target/mips/tcg/sysemu/cp0_helper.c +++ b/target/mips/tcg/sysemu/cp0_helper.c @@ -1077,14 +1077,6 @@ void helper_mtc0_count(CPUMIPSState *env, target_ulong arg1) cpu_mips_store_count(env, arg1); } -void helper_mtc0_saari(CPUMIPSState *env, target_ulong arg1) -{ - uint32_t target = arg1 & 0x3f; - if (target <= 1) { - env->CP0_SAARI = target; - } -} - void helper_mtc0_entryhi(CPUMIPSState *env, target_ulong arg1) { target_ulong old, val, mask; diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 173b19a090..3ba2101647 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -5653,11 +5653,6 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel) ctx->base.is_jmp = DISAS_EXIT; register_name = "Count"; break; - case CP0_REG09__SAARI: - CP0_CHECK(ctx->saar); - gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI)); - register_name = "SAARI"; - break; default: goto cp0_unimplemented; } @@ -6374,11 +6369,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) gen_helper_mtc0_count(tcg_env, arg); register_name = "Count"; break; - case CP0_REG09__SAARI: - CP0_CHECK(ctx->saar); - gen_helper_mtc0_saari(tcg_env, arg); - register_name = "SAARI"; - break; default: goto cp0_unimplemented; } @@ -7143,11 +7133,6 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel) ctx->base.is_jmp = DISAS_EXIT; register_name = "Count"; break; - case CP0_REG09__SAARI: - CP0_CHECK(ctx->saar); - gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI)); - register_name = "SAARI"; - break; default: goto cp0_unimplemented; } @@ -7850,11 +7835,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel) gen_helper_mtc0_count(tcg_env, arg); register_name = "Count"; break; - case CP0_REG09__SAARI: - CP0_CHECK(ctx->saar); - gen_helper_mtc0_saari(tcg_env, arg); - register_name = "SAARI"; - break; default: goto cp0_unimplemented; }