summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorAleksandar Markovic2020-07-01 20:25:57 +0200
committerPhilippe Mathieu-Daudé2020-07-14 21:49:33 +0200
commit9788e8c9b64e4cebb01c96bab2b0e4c2d4454041 (patch)
tree648016838997203bb1052d9ef38a789e7df4876e /target
parentMerge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-07-13' into st... (diff)
downloadqemu-9788e8c9b64e4cebb01c96bab2b0e4c2d4454041.tar.gz
qemu-9788e8c9b64e4cebb01c96bab2b0e4c2d4454041.tar.xz
qemu-9788e8c9b64e4cebb01c96bab2b0e4c2d4454041.zip
target/mips: Remove identical if/else branches
Remove the segment: if (other_tc == other->current_tc) { tccause = other->CP0_Cause; } else { tccause = 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 <aleksandar.qemu.devel@gmail.com> Message-Id: <20200701182559.28841-2-aleksandar.qemu.devel@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'target')
-rw-r--r--target/mips/cp0_helper.c9
1 files changed, 1 insertions, 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 = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
- int32_t tccause;
CPUMIPSState *other = mips_cpu_map_tc(env, &other_tc);
- if (other_tc == other->current_tc) {
- tccause = other->CP0_Cause;
- } else {
- tccause = other->CP0_Cause;
- }
-
- return tccause;
+ return other->CP0_Cause;
}
target_ulong helper_mftc0_status(CPUMIPSState *env)