[hppa] Fix disassembly of bb condition codes

John David Anglin dave@hiauly1.hia.nrc.ca
Sat Mar 4 22:15:00 GMT 2006


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

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

2006-03-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* hppa.h (pa_opcodes): Reorder bb opcodes so that pa10 opcodes come
	first.  Correct mask of bb "B" opcode.

Index: hppa.h
===================================================================
RCS file: /cvs/src/src/include/opcode/hppa.h,v
retrieving revision 1.63
diff -u -3 -p -r1.63 hppa.h
--- hppa.h	16 Oct 2005 20:42:14 -0000	1.63
+++ hppa.h	4 Mar 2006 19:16:07 -0000
@@ -593,10 +593,10 @@ static const struct pa_opcode pa_opcodes
 { "addbf",	0xa8000000, 0xfc000000, "?dnx,b,w", pa10, 0},
 { "addibt",	0xa4000000, 0xfc000000, "?dn5,b,w", pa10, 0},
 { "addibf",	0xac000000, 0xfc000000, "?dn5,b,w", pa10, 0},
+{ "bb",		0xc0004000, 0xffe06000, "?bnx,!,w", pa10, FLAG_STRICT}, 
 { "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",		0xc0004000, 0xffe06000, "?bnx,!,w", pa10, FLAG_STRICT}, 
-{ "bb",		0xc4004000, 0xfc004000, "?bnx,Q,w", pa10, 0}, 
 { "bvb",	0xc0004000, 0xffe04000, "?bnx,w", pa10, 0},
 { "clrbts",	0xe8004005, 0xffffffff, "", pa20, FLAG_STRICT},
 { "popbts",	0xe8004005, 0xfffff007, "$", pa20, FLAG_STRICT},



More information about the Binutils mailing list