Port-mips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

RE: atomic_ops(3) and sync



> ...
> > But it seems there's a problem with our membar_ops too:
> > (gdb) disas membar_enter
> > Dump of assembler code for function membar_sync:
> > 0xffffffffc02b1b70 <membar_sync+0>:     jr      ra
> > 0xffffffffc02b1b74 <membar_sync+4>:     nop
> > 0xffffffffc02b1b78 <membar_sync+8>:     sync
> > 0xffffffffc02b1b7c <membar_sync+12>:    nop
> >
> > the assembler inserted a nop in the delay slot; I guess membar_ops.S
> > needs ".set noreorder" at the top.

In general, all assembly code should use .set noreorder.  The fact the
assembler does this stuff at all, never mind the fact that it does it by
default, is a horrible design error on the part of MIPS Co.

        paul 


Home | Main Index | Thread Index | Old Index