This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] MIPS/GAS: Fix DWARF-2 with branch swapping for MIPS16 code
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Sat, 02 Jul 2011 08:33:16 +0100
- Subject: Re: [PATCH] MIPS/GAS: Fix DWARF-2 with branch swapping for MIPS16 code
- References: <alpine.DEB.email@example.com> <firstname.lastname@example.org> <alpine.DEB.email@example.com>
"Maciej W. Rozycki" <firstname.lastname@example.org> writes:
>> - this:
>> > + Advance PC by 16 to 0x5c
>> depends on the target alignment of .text; it passes for GNU/Linux
>> targets but fails on ELF ones. I think we should stub out the
>> exact numbers, since they're incidental to the test.
> Hmm, does it? I did verify it both on a GNU/Linux and an ELF target. It
> still passes for me, except that:
> + Advance PC by 24 to 0x64
> is required instead as with my intended-to-be-sent-originally change.
> + Advance PC by 23 to 0x40
> for the MIPS16 dump. Which target is failing for you? Perhaps the cause
> was merely the outdated version of the change, sigh...
Ah, could be. It was mips64-elf. Maybe I'd got confused and the
original didn't pass for GNU/Linux after all. Sorry about that.
> I have regenerated and revalidated the change now and I'm ready to push
> it, but I'd prefer the final DWARF-2 instructions to be matched exactly.
> I made the effort to make the source alignment-agnostic and I'd prefer to
> keep the final offsets to be verified literally so that any unexpected
> discrepancies are caught.
> 2011-07-02 Maciej W. Rozycki <email@example.com>
> * config/tc-mips.c (append_insn): Make sure DWARF-2 location
> information is properly adjusted for branches that get swapped.
> * gas/mips/loc-swap.d: New test case for DWARF-2 location with
> branch swapping.
> * gas/mips/loc-swap-dis.d: Likewise.
> * gas/mips/mips16\@loc-swap.d: Likewise, MIPS16 version.
> * gas/mips/mips16\@loc-swap-dis.d: Likewise.
> * gas/mips/loc-swap.s: Source for the new tests.
> * gas/mips/mips.exp: Run the new tests.