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: [hppa] Fix disassembly of bb condition codes


> 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 don't believe that it's completely possible to differentiate between
32 and 64-bit conditions in pa20 mode.  Only when the d bit is set are
we certain that we need to print a 64-bit condition code.  When d is
zero and the architecture version for the file is pa10 or pa11, then
we are sure we need to print a 32-bit condition code.  We shouldn't
match 'B' in this case.  However, hppa-dis.c doesn't check the
architecture of the file.

I think this problem can be worked around by reordering the bb opcodes
in the opcode table so that the "Q" opcode comes before the "B" opcode.
As a result, we should only match the 'B' opcode when d is one, and
avoid the ambiguity.

The mask value for the "Q" opcode looks wrong.  I believe it should be
0xfc006000.

I probably messed this up when I reordered the table a few months ago.

Dave


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


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