Skip to content

Commit 9788e8c

Browse files
AMarkovicphilmd
authored andcommitted
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: 5a25ce9 ("mips: Hook in more reg accesses via mttr/mftr") Buglink: https://bugs.launchpad.net/qemu/+bug/1885718 Signed-off-by: Aleksandar Markovic <[email protected]> Message-Id: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent 1a53dfe commit 9788e8c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

target/mips/cp0_helper.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,16 +375,9 @@ target_ulong helper_mftc0_entryhi(CPUMIPSState *env)
375375
target_ulong helper_mftc0_cause(CPUMIPSState *env)
376376
{
377377
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
378-
int32_t tccause;
379378
CPUMIPSState *other = mips_cpu_map_tc(env, &other_tc);
380379

381-
if (other_tc == other->current_tc) {
382-
tccause = other->CP0_Cause;
383-
} else {
384-
tccause = other->CP0_Cause;
385-
}
386-
387-
return tccause;
380+
return other->CP0_Cause;
388381
}
389382

390383
target_ulong helper_mftc0_status(CPUMIPSState *env)

0 commit comments

Comments
 (0)