MIPS assembler branch relaxations

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Tue Sep 17 00:38:00 GMT 2002


Alexandre Oliva wrote:
> On Sep 16, 2002, Richard Henderson <rth@redhat.com> wrote:
> 
> >> Does the linker refrain from doing relaxations on machine code
> >> generated from opcodes assembled while .set nomacro was in effect?
> 
> > What linker relaxations?
> 
> coff-mips does them for embedded pic.  I thought we did more of those,
> given the references to linker relaxations in comments in the
> assembler.
> 
> Ok, I'm now convinced not doing such relaxations under certain
> conditions is the way to go.  But what are the exact conditions?
> nomacro (as suggested),

Always, as it should prevent expansions.

> noat (to avoid clobbering $at in the expanded
> sequences)

Only if $at is actually used. AFAICS this is the PIC case.

> and no gp (to avoid depending on uninitialized values)?

AFAICS $gp is only used for PIC, where it must be defined anyway.

Btw, your patch uses explicit binary patterns to create insns, is it
actually impossible to use mips_ip()/append_insn() instead?


Thiemo



More information about the Binutils mailing list