You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <ansidecl.h>
#include "sysdep.h"
#include "dis-asm.h"
+#include "libhppa.h"
#include "opcode/hppa.h"
/* Integer register names, indexed by the numbers which appear in the
static const char *const reg_names[] =
{"flags", "r1", "rp", "r3", "r4", "r5", "r6", "r7", "r8", "r9",
"r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19",
- "r20", "r21", "r22", "arg3", "arg2", "arg1", "arg0", "dp", "ret0", "ret1",
+ "r20", "r21", "r22", "r23", "r24", "r25", "r26", "dp", "ret0", "ret1",
"sp", "r31"};
/* Floating point register names, indexed by the numbers which appear in the
/* 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
};
static const char compare_cond_names[][5] = {
- "", ",=", ",<", ",<=", ",<<", ",<<=", ",sv",
- ",od", ",tr", ",<>", ",>=", ",>", ",>>=",
- ",>>", ",nsv", ",ev"
+ "", ",=", ",<", ",<=", ",<<", ",<<=", ",sv", ",od",
+ ",tr", ",<>", ",>=", ",>", ",>>=", ",>>", ",nsv", ",ev"
+};
+static const char compare_cond_64_names[][6] = {
+ "", ",*=", ",*<", ",*<=", ",*<<", ",*<<=", ",*sv", ",*od",
+ ",*tr", ",*<>", ",*>=", ",*>", ",*>>=", ",*>>", ",*nsv", ",*ev"
+};
+static const char cmpib_cond_64_names[][6] = {
+ ",*<<", ",*=", ",*<", ",*<=", ",*>>=", ",*<>", ",*>=", ",*>"
};
static const char add_cond_names[][5] = {
- "", ",=", ",<", ",<=", ",nuv", ",znv", ",sv",
- ",od", ",tr", ",<>", ",>=", ",>", ",uv",
- ",vnz", ",nsv", ",ev"
+ "", ",=", ",<", ",<=", ",nuv", ",znv", ",sv", ",od",
+ ",tr", ",<>", ",>=", ",>", ",uv", ",vnz", ",nsv", ",ev"
+};
+static const char add_cond_64_names[][6] = {
+ "", ",*=", ",*<", ",*<=", ",*nuv", ",*znv", ",*sv", ",*od",
+ ",*tr", ",*<>", ",*>=", ",*>", ",*uv", ",*vnz", ",*nsv", ",*ev"
+};
+static const char wide_add_cond_names[][5] = {
+ "", ",=", ",<", ",<=", ",nuv", ",*=", ",*<", ",*<=",
+ ",tr", ",<>", ",>=", ",>", ",uv", ",*<>", ",*>=", ",*>"
};
static const char *const logical_cond_names[] = {
"", ",=", ",<", ",<=", 0, 0, 0, ",od",
",tr", ",<>", ",>=", ",>", 0, 0, 0, ",ev"};
+static const char *const logical_cond_64_names[] = {
+ "", ",*=", ",*<", ",*<=", 0, 0, 0, ",*od",
+ ",*tr", ",*<>", ",*>=", ",*>", 0, 0, 0, ",*ev"};
static const char *const unit_cond_names[] = {
"", 0, ",sbz", ",shz", ",sdc", 0, ",sbc", ",shc",
",tr", 0, ",nbz", ",nhz", ",ndc", 0, ",nbc", ",nhc"
};
+static const char *const unit_cond_64_names[] = {
+ "", ",*swz", ",*sbz", ",*shz", ",*sdc", ",*swc", ",*sbc", ",*shc",
+ ",*tr", ",*nwz", ",*nbz", ",*nhz", ",*ndc", ",*nwc", ",*nbc", ",*nhc"
+};
static const char shift_cond_names[][4] = {
"", ",=", ",<", ",od", ",tr", ",<>", ",>=", ",ev"
};
+static const char shift_cond_64_names[][5] = {
+ "", ",*=", ",*<", ",*od", ",*tr", ",*<>", ",*>=", ",*ev"
+};
+static const char bb_cond_64_names[][5] = {
+ ",*<", ",*>="
+};
static const char index_compl_names[][4] = {"", ",m", ",s", ",sm"};
static const char short_ldst_compl_names[][4] = {"", ",ma", "", ",mb"};
static const char *const short_bytes_compl_names[] = {
",!?<=", ",>", ",?>", ",!<=", ",!?<", ",>=", ",?>=", ",!<",
",!?=", ",<>", ",!=", ",!=t", ",!?", ",<=>", ",true?", ",true"
};
+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[][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. */
/* Routines to extract various sized constants out of hppa
instructions. */
-/* This assumes that no garbage lies outside of the lower bits of
- value. */
-
-static int
-sign_extend (val, bits)
- unsigned val, bits;
-{
- return (int)(val >> (bits - 1) ? (-1 << bits) | val : val);
-}
-
-/* For many immediate values the sign bit is the low bit! */
-
-static int
-low_sign_extend (val, bits)
- unsigned val, bits;
-{
- return (int)((val & 0x1 ? (-1 << (bits - 1)) : 0) | val >> 1);
-}
-/* extract the immediate field from a ld{bhw}s instruction */
-
-#if 0 /* not used */
-static unsigned
-get_field (val, from, to)
- unsigned val, from, to;
-{
- val = val >> (31 - to);
- return val & ((1 << (32 - from)) - 1);
-}
-
-static unsigned
-set_field (val, from, to, new_val)
- unsigned *val, from, to, new_val;
-{
- unsigned mask = ~((1 << (to - from + 1)) << (31 - from));
- return *val = (*val & mask) | (new_val << (31 - from));
-}
-#endif
-
/* extract a 3-bit space register number from a be, ble, mtsp or mfsp */
static int
extract_3 (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)
return low_sign_extend (word & MASK_14, 14);
}
-#if 0
-/* deposit a 14 bit constant in a word */
-static unsigned
-deposit_14 (opnd, word)
- int opnd;
- unsigned word;
-{
- unsigned sign = (opnd < 0 ? 1 : 0);
-
- return word | ((unsigned)opnd << 1 & MASK_14) | sign;
-}
-#endif
-
/* extract a 21 bit constant */
static int
return sign_extend (val, 21) << 11;
}
-#if 0
-/* deposit a 21 bit constant in a word. Although 21 bit constants are
- usually the top 21 bits of a 32 bit constant, we assume that only
- the low 21 bits of opnd are relevant */
-
-static unsigned
-deposit_21 (opnd, word)
- unsigned opnd, word;
-{
- unsigned val = 0;
-
- val |= GET_FIELD (opnd, 11 + 14, 11 + 18);
- val <<= 2;
- val |= GET_FIELD (opnd, 11 + 12, 11 + 13);
- val <<= 2;
- val |= GET_FIELD (opnd, 11 + 19, 11 + 20);
- val <<= 11;
- val |= GET_FIELD (opnd, 11 + 1, 11 + 11);
- val <<= 1;
- val |= GET_FIELD (opnd, 11 + 0, 11 + 0);
- return word | val;
-}
-#endif
-
/* extract a 12 bit constant from branch instructions */
static int
bfd_vma memaddr;
disassemble_info *info;
{
- unsigned int insn, i, op;
+ bfd_byte buffer[4];
+ unsigned int insn, i;
{
int status =
- (*info->read_memory_func) (memaddr, (bfd_byte*) &insn, sizeof (insn),
- info);
+ (*info->read_memory_func) (memaddr, buffer, sizeof (buffer), info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
}
}
+ insn = bfd_getb32 (buffer);
+
for (i = 0; i < NUMOPCODES; ++i)
{
const struct pa_opcode *opcode = &pa_opcodes[i];
(*info->fprintf_func) (info->stream, "%s", opcode->name);
- if (!strchr ("cfCY<?!@-+&U>~nHNZFIMadu|", opcode->args[0]))
+ if (!strchr ("cfCY?-+nHNZFIu", opcode->args[0]))
(*info->fprintf_func) (info->stream, " ");
for (s = opcode->args; *s != '\0'; ++s)
{
case 'x':
fput_reg (GET_FIELD (insn, 11, 15), info);
break;
- case 'X':
- if (GET_FIELD (insn, 25, 25))
- fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
- else
- fput_fp_reg (GET_FIELD (insn, 11, 15), info);
- break;
+ case 'a':
case 'b':
fput_reg (GET_FIELD (insn, 6, 10), info);
break;
case '^':
fput_creg (GET_FIELD (insn, 6, 10), info);
break;
- case 'E':
- if (GET_FIELD (insn, 25, 25))
- fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
- else
- fput_fp_reg (GET_FIELD (insn, 6, 10), info);
- break;
case 't':
fput_reg (GET_FIELD (insn, 27, 31), info);
break;
- case 'v':
- if (GET_FIELD (insn, 25, 25))
- fput_fp_reg_r (GET_FIELD (insn, 27, 31), info);
- else
- fput_fp_reg (GET_FIELD (insn, 27, 31), info);
- break;
- case 'y':
- fput_fp_reg (GET_FIELD (insn, 27, 31), info);
- break;
- case '4':
- {
- int reg = GET_FIELD (insn, 6, 10);
-
- reg |= (GET_FIELD (insn, 26, 26) << 4);
- fput_fp_reg (reg, info);
- break;
- }
- case '6':
- {
- int reg = GET_FIELD (insn, 11, 15);
-
- reg |= (GET_FIELD (insn, 26, 26) << 4);
- fput_fp_reg (reg, info);
- break;
- }
- case '7':
- {
- int reg = GET_FIELD (insn, 27, 31);
-
- reg |= (GET_FIELD (insn, 26, 26) << 4);
- fput_fp_reg (reg, info);
- break;
- }
- case '8':
- {
- int reg = GET_FIELD (insn, 16, 20);
- reg |= (GET_FIELD (insn, 26, 26) << 4);
- fput_fp_reg (reg, info);
- break;
- }
- case '9':
- {
- int reg = GET_FIELD (insn, 21, 25);
+ /* Handle floating point registers. */
+ case 'f':
+ switch (*++s)
+ {
+ case 't':
+ fput_fp_reg (GET_FIELD (insn, 27, 31), info);
+ break;
+ case 'T':
+ if (GET_FIELD (insn, 25, 25))
+ fput_fp_reg_r (GET_FIELD (insn, 27, 31), info);
+ else
+ fput_fp_reg (GET_FIELD (insn, 27, 31), info);
+ break;
+ case 'a':
+ if (GET_FIELD (insn, 25, 25))
+ fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
+ else
+ fput_fp_reg (GET_FIELD (insn, 6, 10), info);
+ break;
+ case 'A':
+ if (GET_FIELD (insn, 24, 24))
+ fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
+ else
+ fput_fp_reg (GET_FIELD (insn, 6, 10), info);
+
+ break;
+ case 'b':
+ if (GET_FIELD (insn, 25, 25))
+ fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
+ else
+ fput_fp_reg (GET_FIELD (insn, 11, 15), info);
+ break;
+ case 'B':
+ if (GET_FIELD (insn, 19, 19))
+ fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
+ else
+ fput_fp_reg (GET_FIELD (insn, 11, 15), info);
+ break;
+ case 'C':
+ {
+ int reg = GET_FIELD (insn, 21, 22);
+ reg |= GET_FIELD (insn, 16, 18) << 2;
+ if (GET_FIELD (insn, 23, 23) != 0)
+ fput_fp_reg_r (reg, info);
+ else
+ fput_fp_reg (reg, info);
+ break;
+ }
+ case 'i':
+ {
+ int reg = GET_FIELD (insn, 6, 10);
+
+ reg |= (GET_FIELD (insn, 26, 26) << 4);
+ fput_fp_reg (reg, info);
+ break;
+ }
+ case 'j':
+ {
+ int reg = GET_FIELD (insn, 11, 15);
+
+ reg |= (GET_FIELD (insn, 26, 26) << 4);
+ fput_fp_reg (reg, info);
+ break;
+ }
+ case 'k':
+ {
+ int reg = GET_FIELD (insn, 27, 31);
+
+ reg |= (GET_FIELD (insn, 26, 26) << 4);
+ fput_fp_reg (reg, info);
+ break;
+ }
+ case 'l':
+ {
+ int reg = GET_FIELD (insn, 21, 25);
+
+ reg |= (GET_FIELD (insn, 26, 26) << 4);
+ fput_fp_reg (reg, info);
+ break;
+ }
+ case 'm':
+ {
+ int reg = GET_FIELD (insn, 16, 20);
+
+ reg |= (GET_FIELD (insn, 26, 26) << 4);
+ fput_fp_reg (reg, info);
+ break;
+ }
+ }
- reg |= (GET_FIELD (insn, 26, 26) << 4);
- fput_fp_reg (reg, info);
- break;
- }
case '5':
fput_const (extract_5_load (insn), info);
break;
(*info->fprintf_func) (info->stream,
"sr%d", GET_FIELD (insn, 16, 17));
break;
+
case 'S':
(*info->fprintf_func) (info->stream, "sr%d", extract_3 (insn));
break;
+
+ /* Handle completers. */
case 'c':
- (*info->fprintf_func) (info->stream, "%s ",
- index_compl_names[GET_COMPL (insn)]);
- break;
- case 'C':
- (*info->fprintf_func) (info->stream, "%s ",
- short_ldst_compl_names[GET_COMPL (insn)]);
- break;
- case 'Y':
- (*info->fprintf_func) (info->stream, "%s ",
- short_bytes_compl_names[GET_COMPL (insn)]);
- break;
- /* these four conditions are for the set of instructions
- which distinguish true/false conditions by opcode rather
- than by the 'f' bit (sigh): comb, comib, addb, addib */
- case '<':
- fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)],
- info);
- break;
+ switch (*++s)
+ {
+ case 'x':
+ (*info->fprintf_func) (info->stream, "%s ",
+ index_compl_names[GET_COMPL (insn)]);
+ break;
+ case 'm':
+ (*info->fprintf_func) (info->stream, "%s ",
+ short_ldst_compl_names[GET_COMPL (insn)]);
+ break;
+ case 's':
+ (*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 'z':
+ if (!GET_FIELD (insn, 21, 21))
+ (*info->fprintf_func) (info->stream, ",z");
+ 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) == '?')
+ (*info->fprintf_func)
+ (info->stream, "%s", signed_unsigned_names[GET_FIELD
+ (insn, 21, 21)]);
+ else
+ (*info->fprintf_func)
+ (info->stream, "%s ", signed_unsigned_names[GET_FIELD
+ (insn, 21, 21)]);
+ break;
+ case 'h':
+ (*info->fprintf_func)
+ (info->stream, "%s", mix_half_names[GET_FIELD
+ (insn, 17, 17)]);
+ break;
+ case 'H':
+ (*info->fprintf_func)
+ (info->stream, "%s", saturation_names[GET_FIELD
+ (insn, 24, 25)]);
+ break;
+ case '*':
+ (*info->fprintf_func)
+ (info->stream, ",%d%d%d%d ",
+ GET_FIELD (insn, 17, 18), GET_FIELD (insn, 20, 21),
+ GET_FIELD (insn, 22, 23), GET_FIELD (insn, 24, 25));
+ break;
+ }
+ break;
+
+ /* Handle conditions. */
case '?':
- fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18) + 8],
- info);
- break;
- case '@':
- fputs_filtered (add_cond_names[GET_FIELD (insn, 16, 18) + 8],
- info);
- break;
- case 'a':
- (*info->fprintf_func) (info->stream, "%s ",
- compare_cond_names[GET_COND (insn)]);
- break;
- case 'd':
- (*info->fprintf_func) (info->stream, "%s ",
- add_cond_names[GET_COND (insn)]);
- break;
- case '!':
- (*info->fprintf_func) (info->stream, "%s",
- add_cond_names[GET_FIELD (insn, 16, 18)]);
- break;
-
- case '&':
- (*info->fprintf_func) (info->stream, "%s ",
- logical_cond_names[GET_COND (insn)]);
- break;
- case 'U':
- (*info->fprintf_func) (info->stream, "%s ",
- unit_cond_names[GET_COND (insn)]);
- break;
- case '|':
- case '>':
- case '~':
- (*info->fprintf_func)
- (info->stream, "%s",
- shift_cond_names[GET_FIELD (insn, 16, 18)]);
+ {
+ s++;
+ switch (*s)
+ {
+ case 'f':
+ (*info->fprintf_func) (info->stream, "%s ",
+ float_comp_names[GET_FIELD
+ (insn, 27, 31)]);
+ break;
+
+ /* these four conditions are for the set of instructions
+ which distinguish true/false conditions by opcode
+ rather than by the 'f' bit (sigh): comb, comib,
+ addb, addib */
+ case 't':
+ fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)],
+ info);
+ break;
+ case 'T':
+ fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)
+ + 8], info);
+ break;
+ case 'r':
+ fputs_filtered (compare_cond_64_names[GET_FIELD (insn, 16, 18)],
+ info);
+ break;
+ case 'R':
+ fputs_filtered (compare_cond_64_names[GET_FIELD (insn, 16, 18)
+ + 8], info);
+ break;
+ case 'Q':
+ fputs_filtered (cmpib_cond_64_names[GET_FIELD (insn, 16, 18)],
+ info);
+ break;
+ case 'n':
+ fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)
+ + GET_FIELD (insn, 4, 4) * 8], info);
+ break;
+ case '@':
+ fputs_filtered (add_cond_names[GET_FIELD (insn, 16, 18)
+ + GET_FIELD (insn, 4, 4) * 8], info);
+ break;
+ case 's':
+ (*info->fprintf_func) (info->stream, "%s ",
+ compare_cond_names[GET_COND (insn)]);
+ break;
+ case 'S':
+ (*info->fprintf_func) (info->stream, "%s ",
+ compare_cond_64_names[GET_COND (insn)]);
+ break;
+ case 'a':
+ (*info->fprintf_func) (info->stream, "%s ",
+ add_cond_names[GET_COND (insn)]);
+ break;
+ case 'A':
+ (*info->fprintf_func) (info->stream, "%s ",
+ add_cond_64_names[GET_COND (insn)]);
+ break;
+ case 'd':
+ (*info->fprintf_func) (info->stream, "%s",
+ add_cond_names[GET_FIELD (insn, 16, 18)]);
+ break;
+
+ case 'D':
+ (*info->fprintf_func) (info->stream, "%s",
+ add_cond_names[GET_FIELD (insn, 16, 18)
+ + 8]);
+ break;
+ case 'w':
+ (*info->fprintf_func)
+ (info->stream, "%s",
+ wide_add_cond_names[GET_FIELD (insn, 16, 18)]);
+ break;
+
+ case 'W':
+ (*info->fprintf_func)
+ (info->stream, "%s",
+ wide_add_cond_names[GET_FIELD (insn, 16, 18) + 8]);
+ break;
+
+ case 'l':
+ (*info->fprintf_func) (info->stream, "%s ",
+ logical_cond_names[GET_COND (insn)]);
+ break;
+ case 'L':
+ (*info->fprintf_func) (info->stream, "%s ",
+ logical_cond_64_names[GET_COND (insn)]);
+ break;
+ case 'u':
+ (*info->fprintf_func) (info->stream, "%s ",
+ unit_cond_names[GET_COND (insn)]);
+ break;
+ case 'U':
+ (*info->fprintf_func) (info->stream, "%s ",
+ unit_cond_64_names[GET_COND (insn)]);
+ break;
+ case 'y':
+ case 'x':
+ case 'b':
+ (*info->fprintf_func)
+ (info->stream, "%s",
+ shift_cond_names[GET_FIELD (insn, 16, 18)]);
+
+ /* If the next character in args is 'n', it will handle
+ putting out the space. */
+ if (s[1] != 'n')
+ (*info->fprintf_func) (info->stream, " ");
+ break;
+ case 'X':
+ (*info->fprintf_func) (info->stream, "%s",
+ shift_cond_64_names[GET_FIELD (insn, 16, 18)]);
+ break;
+ case 'B':
+ (*info->fprintf_func)
+ (info->stream, "%s",
+ bb_cond_64_names[GET_FIELD (insn, 16, 16)]);
+
+ /* If the next character in args is 'n', it will handle
+ putting out the space. */
+ if (s[1] != 'n')
+ (*info->fprintf_func) (info->stream, " ");
+ break;
+ }
+ break;
+ }
- /* If the next character in args is 'n', it will handle
- putting out the space. */
- if (s[1] != 'n')
- (*info->fprintf_func) (info->stream, " ");
- break;
case 'V':
fput_const (extract_5_store (insn), info);
break;
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;
of address. */
fput_const (extract_17 (insn), info);
break;
+
+ case 'Z':
+ /* addil %r1 implicit output. */
+ (*info->fprintf_func) (info->stream, "%%r1");
+ break;
+
+ case '.':
+ (*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;
case 'p':
(*info->fprintf_func) (info->stream, "%d",
31 - GET_FIELD (insn, 22, 26));
break;
+ case '~':
+ {
+ int num;
+ num = GET_FIELD (insn, 20, 20) << 5;
+ num |= GET_FIELD (insn, 22, 26);
+ (*info->fprintf_func) (info->stream, "%d", 63 - num);
+ break;
+ }
case 'P':
(*info->fprintf_func) (info->stream, "%d",
GET_FIELD (insn, 22, 26));
break;
+ case 'q':
+ {
+ int num;
+ num = GET_FIELD (insn, 20, 20) << 5;
+ num |= GET_FIELD (insn, 22, 26);
+ (*info->fprintf_func) (info->stream, "%d", num);
+ break;
+ }
case 'T':
(*info->fprintf_func) (info->stream, "%d",
32 - GET_FIELD (insn, 27, 31));
break;
+ case '%':
+ {
+ int num;
+ num = (GET_FIELD (insn, 23, 23) + 1) * 32;
+ num -= GET_FIELD (insn, 27, 31);
+ (*info->fprintf_func) (info->stream, "%d", num);
+ break;
+ }
+ case '|':
+ {
+ int num;
+ num = (GET_FIELD (insn, 19, 19) + 1) * 32;
+ num -= GET_FIELD (insn, 27, 31);
+ (*info->fprintf_func) (info->stream, "%d", num);
+ break;
+ }
+ case '$':
+ fput_const (GET_FIELD (insn, 20, 28), info);
+ break;
case 'A':
fput_const (GET_FIELD (insn, 6, 18), info);
break;
- case 'Z':
- if (GET_FIELD (insn, 26, 26))
- (*info->fprintf_func) (info->stream, ",m ");
- else
- (*info->fprintf_func) (info->stream, " ");
- break;
case 'D':
fput_const (GET_FIELD (insn, 6, 31), info);
break;
- case 'f':
+ case 'v':
(*info->fprintf_func) (info->stream, ",%d", GET_FIELD (insn, 23, 25));
break;
case 'O':
case 'F':
/* if no destination completer and not before a completer
for fcmp, need a space here */
- if (GET_FIELD (insn, 21, 22) == 1 || s[1] == 'M')
+ if (s[1] == 'G' || s[1] == '?')
fputs_filtered (float_format_names[GET_FIELD (insn, 19, 20)],
info);
else
case 'I':
/* if no destination completer and not before a completer
for fcmp, need a space here */
- if (GET_FIELD (insn, 21, 22) == 1 || s[1] == 'M')
+ if (s[1] == '?')
fputs_filtered (float_format_names[GET_FIELD (insn, 20, 20)],
info);
else
float_format_names[GET_FIELD
(insn, 20, 20)]);
break;
- case 'J':
- if (GET_FIELD (insn, 24, 24))
- fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
- else
- fput_fp_reg (GET_FIELD (insn, 6, 10), info);
-
- break;
- case 'K':
- if (GET_FIELD (insn, 19, 19))
- fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
- else
- fput_fp_reg (GET_FIELD (insn, 11, 15), info);
- break;
- case 'M':
- (*info->fprintf_func) (info->stream, "%s ",
- float_comp_names[GET_FIELD
- (insn, 27, 31)]);
- break;
default:
(*info->fprintf_func) (info->stream, "%c", *s);
break;