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] MIPS/GAS: Correct ISA bit handling in backreferences


On Sun, 23 Sep 2012, Richard Sandiford wrote:

> >> 2012-09-21  Maciej W. Rozycki  <macro@codesourcery.com>
> >>
> >> 	gas/
> >> 	* config/tc-mips.c (md_assemble): Add a call to mips_mark_labels.
> >
> > OK as far as it goes, but...
> >
> >> 	gas/testsuite/
> >> 	* gas/mips/branch-swap-2.s: Make sure the ISA bit is clear in
> >> 	the label used for calculation.
> >
> > ...not OK.  "." ought to evaluate to the same thing as a label
> > on the current instruction.
> 
> Here's what I installed.  Adding a global like mips_assembling_insn
> isn't pretty, but I think it's correct.

 Fair enough, I originally assumed it would make sense to treat "." as the 
assembly pointer rather than an ISA-encoded address.  But it appears I got 
confused too, oh well.

 Regrettably MIPS GCC backend's DWARF-2 exception unwinder relies on 
assignments like:

foo	= .

to drop the ISA bit causing schizophrenia and a dual interpretation of "." 
depending on the context (and consequently a struggle in GDB to make debug 
and actual addresses uniform across all the places they are used in, so 
that they are actually useful for anything), and hence the need to use 
that mips_assembling_insn knob.

 Anyway, thanks for your assistance with these bug fixes.

  Maciej


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