This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch - gas] MIPS: fix problem with mips16 delay branchoptimization.
> >> At first glance, it looks like it should just be a case of guarding
> >> "frag_grow (6);" with "(pinfo & INSN_UNCOND_BRANCH_DELAY) == 0".
> >
> > yeah, something like that might do it.
> >
> > else if (mips_opts.mips16
> > && ! ip->use_extend
> > + && (pinfo & INSN_UNCOND_BRANCH_DELAY) == 0
> > && *reloc_type != BFD_RELOC_MIPS16_JMP)
> >
> > I'll run the regressions and see.
>
> No, that won't work. The next arm of the if branch doesn't expect to
> see normal non-extended instructions. I really did mean what I said
> above about guarding the call to frag_grow.
ok, corrected.
else if (mips_opts.mips16
&& ! ip->use_extend
&& *reloc_type != BFD_RELOC_MIPS16_JMP)
{
if ((pinfo & INSN_UNCOND_BRANCH_DELAY) == 0)
/* Make sure there is enough room to swap this instruction with
a following jump instruction. */
frag_grow (6);
add_fixed_insn (ip);
David