* hppa-dis.c (print_insn_hppa): Do not emit a space after 'F'

or 'I' operands if the next format specifier is 'M' (fcmp
        condition completer).
This commit is contained in:
Jeff Law
1994-02-05 08:04:45 +00:00
parent 647d688bcc
commit e3960b9610
2 changed files with 45 additions and 26 deletions

View File

@ -1,4 +1,10 @@
Fri Feb 4 23:38:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) Sat Feb 5 00:04:02 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
* hppa-dis.c (print_insn_hppa): Do not emit a space after 'F'
or 'I' operands if the next format specifier is 'M' (fcmp
condition completer).
Feb 4 23:38:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* ppc-opc.c (powerpc_operands): New operand type MBE to handle a * ppc-opc.c (powerpc_operands): New operand type MBE to handle a
single number giving a bitmask for the MB and ME fields of an M single number giving a bitmask for the MB and ME fields of an M

View File

@ -29,7 +29,7 @@ static const char *const reg_names[] =
{"flags", "r1", "rp", "r3", "r4", "r5", "r6", "r7", "r8", "r9", {"flags", "r1", "rp", "r3", "r4", "r5", "r6", "r7", "r8", "r9",
"r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19",
"r20", "r21", "r22", "arg3", "arg2", "arg1", "arg0", "dp", "ret0", "ret1", "r20", "r21", "r22", "arg3", "arg2", "arg1", "arg0", "dp", "ret0", "ret1",
"sp", "r31"} "sp", "r31"};
/* Floating point register names, indexed by the numbers which appear in the /* Floating point register names, indexed by the numbers which appear in the
opcodes. */ opcodes. */
@ -356,7 +356,6 @@ print_insn_hppa (memaddr, info)
disassemble_info *info; disassemble_info *info;
{ {
unsigned int insn, i, op; unsigned int insn, i, op;
FILE *stream = info->stream;
{ {
int status = int status =
@ -378,7 +377,7 @@ print_insn_hppa (memaddr, info)
(*info->fprintf_func) (info->stream, "%s", opcode->name); (*info->fprintf_func) (info->stream, "%s", opcode->name);
if (!strchr ("cCY<?!@-+&U>~nZFIMad", opcode->args[0])) if (!strchr ("cfCY<?!@-+&U>~nNZFIMadu|", opcode->args[0]))
(*info->fprintf_func) (info->stream, " "); (*info->fprintf_func) (info->stream, " ");
for (s = opcode->args; *s != '\0'; ++s) for (s = opcode->args; *s != '\0'; ++s)
{ {
@ -436,7 +435,8 @@ print_insn_hppa (memaddr, info)
fput_const (extract_5_load (insn), info); fput_const (extract_5_load (insn), info);
break; break;
case 's': case 's':
fprintf_filtered (stream, "sr%d", GET_FIELD (insn, 16, 17)); (*info->fprintf_func) (info->stream,
"sr%d", GET_FIELD (insn, 16, 17));
break; break;
case 'S': case 'S':
(*info->fprintf_func) (info->stream, "sr%d", extract_3 (insn)); (*info->fprintf_func) (info->stream, "sr%d", extract_3 (insn));
@ -489,6 +489,7 @@ print_insn_hppa (memaddr, info)
(*info->fprintf_func) (info->stream, "%s ", (*info->fprintf_func) (info->stream, "%s ",
unit_cond_names[GET_COND (insn)]); unit_cond_names[GET_COND (insn)]);
break; break;
case '|':
case '>': case '>':
case '~': case '~':
(*info->fprintf_func) (*info->fprintf_func)
@ -527,20 +528,29 @@ print_insn_hppa (memaddr, info)
else else
(*info->fprintf_func) (info->stream, " "); (*info->fprintf_func) (info->stream, " ");
break; break;
case 'N':
if ((insn & 0x20) && s[1])
(*info->fprintf_func) (info->stream, ",n ");
else if (insn & 0x20)
(*info->fprintf_func) (info->stream, ",n");
else if (s[1])
(*info->fprintf_func) (info->stream, " ");
break;
case 'w': case 'w':
(*info->print_address_func) (memaddr + 8 + extract_12 (insn), (*info->print_address_func) (memaddr + 8 + extract_12 (insn),
info); info);
break; break;
case 'W': case 'W':
/* don't interpret an address if it's an external branch /* 17 bit PC-relative branch. */
instruction. */ (*info->print_address_func) ((memaddr + 8
op = GET_FIELD (insn, 0, 5); + extract_17 (insn)),
if (op != 0x38 /* be */ && op != 0x39 /* ble */) info);
(*info->print_address_func) ((memaddr + 8 break;
+ extract_17 (insn)), case 'z':
info); /* 17 bit displacement. This is an offset from a register
else so it gets disasssembled as just a number, not any sort
fput_const (extract_17 (insn), info); of address. */
fput_const (extract_17 (insn), info);
break; break;
case 'p': case 'p':
(*info->fprintf_func) (info->stream, "%d", (*info->fprintf_func) (info->stream, "%d",
@ -589,17 +599,18 @@ print_insn_hppa (memaddr, info)
GET_FIELD (insn, 27, 31)), info); GET_FIELD (insn, 27, 31)), info);
break; break;
case 'u': case 'u':
(*info->fprintf_func) (info->stream, "%d", GET_FIELD (insn, 23, 25)); (*info->fprintf_func) (info->stream, ",%d", GET_FIELD (insn, 23, 25));
break; break;
case 'F': case 'F':
/* if no destination completer, need a space here */ /* if no destination completer and not before a completer
if (GET_FIELD (insn, 21, 22) == 1) for fcmp, need a space here */
if (GET_FIELD (insn, 21, 22) == 1 || s[1] == 'M')
fputs_filtered (float_format_names[GET_FIELD (insn, 19, 20)], fputs_filtered (float_format_names[GET_FIELD (insn, 19, 20)],
info); info);
else else
(*info->fprintf_func) (info->stream, "%s ", (*info->fprintf_func) (info->stream, "%s ",
float_format_names[GET_FIELD float_format_names[GET_FIELD
(insn, 19, 20)]); (insn, 19, 20)]);
break; break;
case 'G': case 'G':
(*info->fprintf_func) (info->stream, "%s ", (*info->fprintf_func) (info->stream, "%s ",
@ -611,14 +622,15 @@ print_insn_hppa (memaddr, info)
(insn, 26, 26)], info); (insn, 26, 26)], info);
break; break;
case 'I': case 'I':
/* if no destination completer, need a space here */ /* if no destination completer and not before a completer
if (GET_FIELD (insn, 21, 22) == 1) for fcmp, need a space here */
if (GET_FIELD (insn, 21, 22) == 1 || s[1] == 'M')
fputs_filtered (float_format_names[GET_FIELD (insn, 20, 20)], fputs_filtered (float_format_names[GET_FIELD (insn, 20, 20)],
info); info);
else else
fprintf_filtered (stream, "%s ", (*info->fprintf_func) (info->stream, "%s ",
float_format_names[GET_FIELD float_format_names[GET_FIELD
(insn, 20, 20)]); (insn, 20, 20)]);
break; break;
case 'J': case 'J':
if (GET_FIELD (insn, 24, 24)) if (GET_FIELD (insn, 24, 24))
@ -634,8 +646,9 @@ print_insn_hppa (memaddr, info)
fput_fp_reg (GET_FIELD (insn, 11, 15), info); fput_fp_reg (GET_FIELD (insn, 11, 15), info);
break; break;
case 'M': case 'M':
fputs_filtered (float_comp_names[GET_FIELD (insn, 27, 31)], (*info->fprintf_func) (info->stream, "%s ",
info); float_comp_names[GET_FIELD
(insn, 27, 31)]);
break; break;
default: default:
(*info->fprintf_func) (info->stream, "%c", *s); (*info->fprintf_func) (info->stream, "%c", *s);