Re: MIPS gas relaxation still doesn't work

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

 



>Can gcc not to emit nop nor noreorder when it tries to fill the delay
>slot with nop?

You never want the assembler to try to fill delay slots.  Consider a compiler
optimization like software pipelining.  The compiler will schedule instructions
inside a loop with full knowledge of the target pipeline to give maximum
performance.  Then the assembler picks a random instruction from the loop,
puts it in a branch delay slot, and now your code runs twice as slow because
the assembler introduced pipeline stalls.  Of course, gcc isn't good enough
yet to have this problem yet, but we will get there eventually.  Meanwhile, we
need to get out of the habit of relying on assembler optimizations.  In the
long run, assembler optimizations are bad, and we need to stop using them as
soon as possible.  Gcc should emit .set nomacro/noreorder/noat/etc at the
begining of its assembly output, and never turn them on.

Jim


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux