[hppa] Fix disassembly of bb condition codes [was Fwd: failure notice]

John David Anglin dave@hiauly1.hia.nrc.ca
Thu Aug 20 17:05:00 GMT 2009


The change is ok with the addition of a ChangeLog entry.  There's
no modern way...

> --Boundary-00=_CIUjKe+zrt/pGNr
> Content-Type: text/plain;
>   charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> On Monday 17 August 2009 18:37:53 John David Anglin wrote:
> > Hi Nick,
> >
> > Don't know what happen to the dns lookup.  hiauly1 is continually
> > subject to denial of service attacks.
> >
> > > On Saturday 04 March 2006 22:15:05 John David Anglin wrote:
> > > > > > Currently binutils doesn't properly differentiate between 32-bit
> > > > > > and 64-bit condition codes for the hppa bb insn, always
> > > > > > disassembling the condition code as a 64-bit condition if it is in
> > > > > > pa20 mode. This patch fixes the problem.
> > > > >
> > > > > I don't believe the change is correct.  'B' is for 64-bit conditions.
> > > > > This affects the printed bit position.  So, printing a 32-bit code
> > > > > with a 64-bit position would be wrong.
> > > >
> > > > I've committed the following change.  Tested on hppa-unknown-linux-gnu
> > > > and by visually inspecting the disassembly of some bb instructions.
> > > > Let me know if you see any problems.
> > >
> > > This breaks, e.g.
> > >
> > > sign:	.equ	8
> > >
> > > 	bb	sign, 0, foo
> > >
> > > as FLAG_STRICT is now set on all entries. Not sure what the fix is
> >
> > I think we need to add non-strict pa10 variants after the current
> > strict pa10 bb entries.
> 
> The attached diff works for me.
> 
> > Surprised that you are still using this old technique to specify register
> > numbers. 
> 
> It's old code and it looked OK to me. What's the modern way?
> 
> >
> > Dave
> 
> 
> 
> --Boundary-00=_CIUjKe+zrt/pGNr
> Content-Type: text/x-diff;
>   charset="iso 8859-15";
>   name="hppa.h.diff"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: attachment;
> 	filename="hppa.h.diff"
> 
> Index: include/opcode/hppa.h
> ===================================================================
> RCS file: /cvsroot/src/external/gpl3/binutils/dist/include/opcode/hppa.h,v
> retrieving revision 1.1.1.1
> diff -u -p -u -r1.1.1.1 hppa.h
> --- include/opcode/hppa.h	18 Aug 2009 09:49:31 -0000	1.1.1.1
> +++ include/opcode/hppa.h	20 Aug 2009 12:23:48 -0000
> @@ -597,6 +597,7 @@ static const struct pa_opcode pa_opcodes
>  { "bb",		0xc0006000, 0xffe06000, "?Bnx,!,w", pa20, FLAG_STRICT}, 
>  { "bb",		0xc4004000, 0xfc006000, "?bnx,Q,w", pa10, FLAG_STRICT}, 
>  { "bb",		0xc4004000, 0xfc004000, "?Bnx,B,w", pa20, FLAG_STRICT}, 
> +{ "bb",		0xc4004000, 0xfc006000, "?bnx,Q,w", pa10, 0}, 
>  { "bvb",	0xc0004000, 0xffe04000, "?bnx,w", pa10, 0},
>  { "clrbts",	0xe8004005, 0xffffffff, "", pa20, FLAG_STRICT},
>  { "popbts",	0xe8004005, 0xfffff007, "$", pa20, FLAG_STRICT},
> 
> --Boundary-00=_CIUjKe+zrt/pGNr--
> 

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)



More information about the Binutils mailing list