This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: R10000 Needs LL/SC Workaround in Gcc


On Mon, Nov 03, 2008 at 10:51:49AM -0600, Paul_Koning@Dell.com wrote:

> > I believe (but have not checked) that all CPUs/ISAs that are within the 
> >MIPS II - MIPS IV range enable -mbranch-likely by default, 
> 
> Not quite.  sb1 has no-branch-likely.  It actually does implement the instruction but the documentation clearly states that it should be avoided.

For the usual reasons - the CPU micro architects hate branch likely.  It
means having to cancel an instruction from the pipeline rather late, if
the branch was not taken.  So the deprecation just expresses the desparate
wish of the CPU architects to get rid of the instruction.  In practice
that won't happen any time soon - we even still have useless crap like
signed add and sub instructions in the MIPS ISA.  And if the instructions
actually were removed we still could software emulate them in the kernel.

However unlike the R10000 the SB1 and SB1 implement full blown branch
prediction for branch likely so use it where you can for performance.

  Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]