This is the mail archive of the binutils@sourceware.org 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: [patch - gas] MIPS: fix problem with mips16 delay branch optimization.


David Ung <davidu@mips.com> writes:
>> Oh, so it was specifically "jr" that was the problem?  That's the
>> extra detail I was hoping for, thanks.
>
> yeah.  I thought I've mention that "jr" was creating the new fragment,
> but obviously it wasn't clear enough.

I missed the reference to "jr" in your first followup.  Sorry about that.

>> 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.

Richard


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