From nobody Tue Feb 10 01:31:22 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1594758117; cv=none; d=zohomail.com; s=zohoarc; b=lyzpoYK5xQlUcHuPTu0LXHvPNGT/lO8jFerkj3upZj6pWewtSTQgFzh5wBZeoGreRTYmJX+/H7kSo//drqmjc5GSJTbK4/n2klUNQ7LxZFsl8yB8tA6qTGUhFQghEGofL5CG1D7mjiXDYJR8gpPW+lb2TFJDvqjn65zM/oQkom0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594758117; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PrgOAuZeHBitof8zxZBYoRqFGXasEypHSQh2bG/rT7w=; b=ez47EOe1/EHkIvJoaU9vYybn7t7JnUt0Xc3jOgB/OWs0ZQfV/4VyxX4IIuwHI9JObdtA3Qyx2EV6xUSgQgUCdAL5zfQiJYy4FHJghLtzd5SErzOO9gTpq/4IHuhiQPI71fJUSAjj1zW1Y4afDJyiumNH4qx84+OBWI/xZYFAvto= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1594758117483458.7962541744449; Tue, 14 Jul 2020 13:21:57 -0700 (PDT) Received: from localhost ([::1]:41454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvRR6-0004Z2-9b for importer@patchew.org; Tue, 14 Jul 2020 16:21:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvRQA-0003C0-9a for qemu-devel@nongnu.org; Tue, 14 Jul 2020 16:20:58 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:44804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvRQ8-0006Tu-7g for qemu-devel@nongnu.org; Tue, 14 Jul 2020 16:20:57 -0400 Received: by mail-wr1-x444.google.com with SMTP id b6so24552060wrs.11 for ; Tue, 14 Jul 2020 13:20:55 -0700 (PDT) Received: from localhost.localdomain (138.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.138]) by smtp.gmail.com with ESMTPSA id 138sm7245217wmb.1.2020.07.14.13.20.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 13:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PrgOAuZeHBitof8zxZBYoRqFGXasEypHSQh2bG/rT7w=; b=j9cumUEIZ4wYq6O6fauu6rZh0QLH2PGcWmCDZe7Lx0iFqItWLmCvCBC1vrtvw88ccN O5Zoknw10jEFuBjE3+8EG5u7UH24Q7QCsAsl9mJMi2lxUsgk4pwxzGENfEeCPwKBFAkN sx2SvH8LcjxWKCVFqEV9F5W/fxPE4P6naK6tYCYDNQ+QNJlbEVlTsmIcAOkMcs6btxXE fTt3HTNQ1hs2XRJqjvMJUBnK60IBWd6LFcsJYvho4fvYUfKvMlpUouq7F+zdqHV8lzKb 4mrt8/B0BsZ6QoJ+bgbiVrfXZfzrlZrrQcYcOPlRSnKmkIafSx6zgqh1VlcrG57kAiFN +zqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=PrgOAuZeHBitof8zxZBYoRqFGXasEypHSQh2bG/rT7w=; b=qHAdQNHHV7a6SqeOlJBr2Cx1V7Fkp2oK6XDv3QmwQyE8g2R1eztDU+WKuERwsm1juI 8uqKYl3KSXgCBQ7TvCvIzCBKjt3rYdZdgyqL7544OX1Fs6JNF46LPbM1hYW9ivyMPSez DMoyJjjmYPrX7LxxYoX7qTdlVug1+g9JVr5qB7Wevs5NOyBgW3Z+BOK10mlb2/RuxR1Q Q7MMcb2XfWb9pYxZhAvXpopIorItodeQzp4Gtyo0Jq0yEdnLiQxro7Jtkhyt6m/ueygr +k7HKg5utLw9i4wbkYedx1rgihfzdjaG0yNSW2oo2HnXvZ0ePWnA6TMjj9O7Nss2bqTi 2zPg== X-Gm-Message-State: AOAM533X7mrahkgxz954AbOnSv3gOtCmqmRFdCfmUUIq8tvSJpU5+9aH eE/S429ruVe5S8H+Ejxcdm0RKGFz0Nc= X-Google-Smtp-Source: ABdhPJwXUAH1URVSsSw9U3r4WYgOo8bGvLJMjon1mz3Gn/RVWRWed3J8QAgym3taWc8gk1adHMOFaQ== X-Received: by 2002:a5d:470c:: with SMTP id y12mr8384057wrq.340.1594758054515; Tue, 14 Jul 2020 13:20:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 1/3] target/mips: Remove identical if/else branches Date: Tue, 14 Jul 2020 22:20:49 +0200 Message-Id: <20200714202051.13549-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200714202051.13549-1-f4bug@amsat.org> References: <20200714202051.13549-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Huacai Chen , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Aleksandar Markovic Remove the segment: if (other_tc =3D=3D other->current_tc) { tccause =3D other->CP0_Cause; } else { tccause =3D other->CP0_Cause; } Original contributor can't remember what was his intention. Fixes: 5a25ce9487 ("mips: Hook in more reg accesses via mttr/mftr") Buglink: https://bugs.launchpad.net/qemu/+bug/1885718 Signed-off-by: Aleksandar Markovic Message-Id: <20200701182559.28841-2-aleksandar.qemu.devel@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/cp0_helper.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/target/mips/cp0_helper.c b/target/mips/cp0_helper.c index bbf12e4a97..de64add038 100644 --- a/target/mips/cp0_helper.c +++ b/target/mips/cp0_helper.c @@ -375,16 +375,9 @@ target_ulong helper_mftc0_entryhi(CPUMIPSState *env) target_ulong helper_mftc0_cause(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - int32_t tccause; CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); =20 - if (other_tc =3D=3D other->current_tc) { - tccause =3D other->CP0_Cause; - } else { - tccause =3D other->CP0_Cause; - } - - return tccause; + return other->CP0_Cause; } =20 target_ulong helper_mftc0_status(CPUMIPSState *env) --=20 2.21.3