* hppa-dis.c (MASK_10, read_write_names, add_compl_names,
authorJeff Law <law@redhat.com>
Sat, 28 Aug 1999 10:17:07 +0000 (10:17 +0000)
committerJeff Law <law@redhat.com>
Sat, 28 Aug 1999 10:17:07 +0000 (10:17 +0000)
        extract_10U_store):  New.
        (print_insn_hppa):  Add new completers.

opcodes/ChangeLog
opcodes/hppa-dis.c

index a6db1cea9123d56b90dc465068effb72c083a765..f49165f5e264c005afcc30a1ab7b1966e079b22c 100644 (file)
@@ -1,5 +1,9 @@
 Sat Aug 28 00:27:24 1999  Jerry Quinn <jquinn@nortelnetworks.com>
 
+       * hppa-dis.c (MASK_10, read_write_names, add_compl_names,
+       extract_10U_store):  New.
+       (print_insn_hppa):  Add new completers.
+
        * hppa-dis.c (signed_unsigned_names,mix_half_names,
        saturation_names):  New.
        (print_insn_hppa): Add completer codes 'a', 'ch', 'cH', 'cS', and 'c*'.
index 4a7fd06efb7f2349d610755aba6df6a90fd0c3d3..42c364b180ae11eb25c9124840fb0a9499462064 100644 (file)
@@ -46,6 +46,7 @@ typedef unsigned int CORE_ADDR;
 /* Get at various relevent fields of an instruction word. */
 
 #define MASK_5 0x1f
+#define MASK_10 0x3ff
 #define MASK_11 0x7ff
 #define MASK_14 0x3fff
 #define MASK_21 0x1fffff
@@ -127,8 +128,11 @@ static const char float_comp_names[][8] =
 };
 static const char *const signed_unsigned_names[][3] = {",u", ",s"};
 static const char *const mix_half_names[][3] = {",l", ",r"};
-static const char *const saturation_names[][3] = {",us", ",ss", 0, ""};
-
+static const char *const saturation_names[][4] = {",us", ",ss", 0, ""};
+static const char *const read_write_names[][3] = {",r", ",w"};
+static const char *const add_compl_names[] = {
+  0, "", ",l", ",tsv"
+};
 
 /* For a bunch of different instructions form an index into a 
    completer name table. */
@@ -235,6 +239,14 @@ extract_5R_store (word)
   return (word >> 16 & MASK_5);
 }
 
+/* extract the 10 bit immediate field from a {sr}sm instruction */
+static unsigned
+extract_10U_store (word)
+     unsigned word;
+{
+  return (word >> 16 & MASK_10);
+}
+
 /* extract the immediate field from a bb instruction */
 static unsigned
 extract_5Q_store (word)
@@ -440,12 +452,68 @@ print_insn_hppa (memaddr, info)
                      (*info->fprintf_func) (info->stream, "%s ",
                                             short_bytes_compl_names[GET_COMPL (insn)]);
                      break;
+                   case 'L':
+                     (*info->fprintf_func) (info->stream, ",l");
+                     break;
+                   case 'w':
+                     (*info->fprintf_func) (info->stream, "%s ",
+                                            read_write_names[GET_FIELD (insn, 25, 25)]);
+                     break;
+                   case 'W':
+                     (*info->fprintf_func) (info->stream, ",w");
+                     break;
+                   case 'r':
+                     if (GET_FIELD (insn, 23, 26) == 5)
+                       (*info->fprintf_func) (info->stream, ",r");
+                     break;
                    case 'Z':
                      if (GET_FIELD (insn, 26, 26))
                        (*info->fprintf_func) (info->stream, ",m ");
                      else
                        (*info->fprintf_func) (info->stream, " ");
                      break;
+                   case 'i':
+                     if (GET_FIELD (insn, 25, 25))
+                       (*info->fprintf_func) (info->stream, ",i");
+                     break;
+                   case 'a':
+                     (*info->fprintf_func)
+                       (info->stream, "%s", add_compl_names[GET_FIELD
+                                                           (insn, 20, 21)]);
+                     break;
+                   case 'Y':
+                     (*info->fprintf_func)
+                       (info->stream, ",dc%s", add_compl_names[GET_FIELD
+                                                              (insn, 20, 21)]);
+                     break;
+                   case 'y':
+                     (*info->fprintf_func)
+                       (info->stream, ",c%s", add_compl_names[GET_FIELD
+                                                             (insn, 20, 21)]);
+                     break;
+                   case 'v':
+                     if (GET_FIELD (insn, 20, 20))
+                       (*info->fprintf_func) (info->stream, ",tsv");
+                     break;
+                   case 't':
+                     (*info->fprintf_func) (info->stream, ",tc");
+                     if (GET_FIELD (insn, 20, 20))
+                       (*info->fprintf_func) (info->stream, ",tsv");
+                     break;
+                   case 'B':
+                     (*info->fprintf_func) (info->stream, ",db");
+                     if (GET_FIELD (insn, 20, 20))
+                       (*info->fprintf_func) (info->stream, ",tsv");
+                     break;
+                   case 'b':
+                     (*info->fprintf_func) (info->stream, ",b");
+                     if (GET_FIELD (insn, 20, 20))
+                       (*info->fprintf_func) (info->stream, ",tsv");
+                     break;
+                   case 'T':
+                     if (GET_FIELD (insn, 25, 25))
+                       (*info->fprintf_func) (info->stream, ",tc");
+                     break;
                    case 'S':
                      /* EXTRD/W has a following condition.  */
                      if (*(s + 1) == '?')
@@ -617,6 +685,9 @@ print_insn_hppa (memaddr, info)
                case 'R':
                  fput_const (extract_5R_store (insn), info);
                  break;
+               case 'U':
+                 fput_const (extract_10U_store (insn), info);
+                 break;
                case 'Q':
                  fput_const (extract_5Q_store (insn), info);
                  break;
@@ -663,6 +734,10 @@ print_insn_hppa (memaddr, info)
                  (*info->fprintf_func) (info->stream, "%d",
                                    GET_FIELD (insn, 24, 25));
                  break;
+               case '*':
+                 (*info->fprintf_func) (info->stream, "%d",
+                                   GET_FIELD (insn, 22, 25));
+                 break;
                case '!':
                  (*info->fprintf_func) (info->stream, "%sar");
                  break;
This page took 0.027632 seconds and 4 git commands to generate.