This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: MIPS assembler branch relaxations


>>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:

 Daniel> On Sat, Sep 14, 2002 at 02:59:45AM -0300, Alexandre Oliva
 Daniel> wrote:
 >> This patch arranges for the MIPS assembler to turn out-of-range
 >> branches into jumps.  No regressions are introduced in the
 >> binutils testsuites for a mips-linux build.  Details on how it is
 >> done are in comments in the beginning of the patch.  Ok to
 >> install?

 Daniel> A couple of thoughts:

 Daniel> + beql reg1, reg2, 1f + nop + beqzl $0, 2f + nop + 1: j[al]
 Daniel> label + delay slot (executed only if branch taken) + 2:

 Daniel> Why beqzl?  Admittedly, I don't know much about MIPS
 Daniel> hardware, but I'd think that just "b" would probably be
 Daniel> faster, since that's the normal unconditional branch.

Not only that, but MIPS64 explicitly deprecates all flavors of "branch
likely" which is why gcc has a way to avoid generating them.  So the
assembler should either have the same conditional stuff, or avoid them
entirely.  

	   paul


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