Increment size of relax sequence if we emit a nop
Richard Sandiford
rsandifo@redhat.com
Thu Dec 9 16:38:00 GMT 2004
Ian Lance Taylor <ian@wasabisystems.com> writes:
> Index: config/tc-mips.c
> ===================================================================
> RCS file: /cvs/src/src/gas/config/tc-mips.c,v
> retrieving revision 1.275
> diff -u -r1.275 tc-mips.c
> --- config/tc-mips.c 9 Dec 2004 06:17:14 -0000 1.275
> +++ config/tc-mips.c 9 Dec 2004 15:47:41 -0000
> @@ -2542,6 +2542,8 @@
> instruction at the destination, put it in the delay
> slot, and bump the destination address. */
> emit_nop ();
> + if (mips_relax.sequence)
> + mips_relax.sizes[mips_relax.sequence - 1] += 4;
> /* Update the previous insn information. */
> prev_prev_insn = *ip;
> prev_insn.insn_mo = &dummy_opcode;
Wouldn't it be better to turn emit_nop() into a function and do this
check there instead? It's the kind of thing that might be needed in
more than one place otherwise.
Richard
More information about the Binutils
mailing list