target/mips/op_helper.c:971:duplicated branches ?

Bug #1856706 reported by dcb
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

qemu-4.2.0/target/mips/op_helper.c:971:8: warning: this condition has identical branches [-Wduplicated-branches]

Source code is

   if (other_tc == other->current_tc) {
        tccause = other->CP0_Cause;
    } else {
        tccause = other->CP0_Cause;
    }

Possible cut'n'paste error ?

Tags: mips
tags: added: mips
Revision history for this message
Edgar E. Iglesias (edgar-iglesias) wrote : Re: [Bug 1856706] [NEW] target/mips/op_helper.c:971:duplicated branches ?

On Tue, 17 Dec. 2019, 09:28 Thomas Huth, <email address hidden> wrote:

> On 17/12/2019 14.25, dcb wrote:
> > Public bug reported:
> >
> > qemu-4.2.0/target/mips/op_helper.c:971:8: warning: this condition has
> > identical branches [-Wduplicated-branches]
> >
> > Source code is
> >
> > if (other_tc == other->current_tc) {
> > tccause = other->CP0_Cause;
> > } else {
> > tccause = other->CP0_Cause;
> > }
> >
> > Possible cut'n'paste error ?
>
> Hi Edgar,
>
> you added the code in 2011 ... do you still remember the details here,
> whether that was on purpose or whether it should look differently?
>
> Thomas
>

Hi Thomas,

Sorry but I barely recall yesterday, 2011 was a long time ago... It does
look weird.

IIRC smp was kinda of working but the multithreading support wasn't. Some
of these paths were probably not tested too much at the time.

Cheers,
Edgar

>
>

Revision history for this message
Thomas Huth (th-huth) wrote :
Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.