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]

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

Please apply if ok.

randolph

2006-02-26  Randolph Chung  <tausq@debian.org>

        * hppa-dis.c (bb_cond_names): Define.
        (print_insn_hppa): Disambiguate between 32- and 64-bit bb
        conditions.

--- opcodes/hppa-dis.c.orig     2006-02-26 15:38:59.000000000 -0800
+++ opcodes/hppa-dis.c  2006-02-26 07:39:15.000000000 -0800
@@ -132,6 +132,10 @@
 {
   "", ",*=", ",*<", ",*od", ",*tr", ",*<>", ",*>=", ",*ev"
 };
+static const char *const bb_cond_names[] =
+{
+  ",<", ",>="
+};
 static const char *const bb_cond_64_names[] =
 {
   ",*<", ",*>="
@@ -878,7 +882,9 @@
                      case 'B':
                        (*info->fprintf_func)
                          (info->stream, "%s",
-                          bb_cond_64_names[GET_FIELD (insn, 16, 16)]);
+                          GET_FIELD (insn, 18, 18)
+                          ? bb_cond_64_names[GET_FIELD (insn, 16, 16)]
+                          : bb_cond_names[GET_FIELD (insn, 16, 16)]);

                        /* If the next character in args is 'n', it will handle
                           putting out the space.  */


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