Coverage Report

Created: 2023-08-28 06:31

/src/binutils-gdb/opcodes/hppa-dis.c
Line
Count
Source (jump to first uncovered line)
1
/* Disassembler for the PA-RISC. Somewhat derived from sparc-pinsn.c.
2
   Copyright (C) 1989-2023 Free Software Foundation, Inc.
3
4
   Contributed by the Center for Software Science at the
5
   University of Utah (pa-gdb-bugs@cs.utah.edu).
6
7
   This file is part of the GNU opcodes library.
8
9
   This library is free software; you can redistribute it and/or modify
10
   it under the terms of the GNU General Public License as published by
11
   the Free Software Foundation; either version 3, or (at your option)
12
   any later version.
13
14
   It is distributed in the hope that it will be useful, but WITHOUT
15
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
17
   License for more details.
18
19
   You should have received a copy of the GNU General Public License
20
   along with this program; if not, write to the Free Software
21
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22
   MA 02110-1301, USA.  */
23
24
#include "sysdep.h"
25
#include "disassemble.h"
26
#include "libhppa.h"
27
#include "opcode/hppa.h"
28
29
/* Integer register names, indexed by the numbers which appear in the
30
   opcodes.  */
31
static const char *const reg_names[] =
32
{
33
  "flags", "r1", "rp", "r3", "r4", "r5", "r6", "r7", "r8", "r9",
34
  "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19",
35
  "r20", "r21", "r22", "r23", "r24", "r25", "r26", "dp", "ret0", "ret1",
36
  "sp", "r31"
37
};
38
39
/* Floating point register names, indexed by the numbers which appear in the
40
   opcodes.  */
41
static const char *const fp_reg_names[] =
42
{
43
  "fpsr", "fpe2", "fpe4", "fpe6",
44
  "fr4", "fr5", "fr6", "fr7", "fr8",
45
  "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
46
  "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23",
47
  "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31"
48
};
49
50
typedef unsigned int CORE_ADDR;
51
52
/* Get at various relevent fields of an instruction word.  */
53
54
84.0k
#define MASK_5  0x1f
55
16
#define MASK_10 0x3ff
56
13.1k
#define MASK_11 0x7ff
57
0
#define MASK_14 0x3fff
58
#define MASK_16 0xffff
59
19.9k
#define MASK_21 0x1fffff
60
61
/* These macros get bit fields using HP's numbering (MSB = 0).  */
62
63
#define GET_FIELD(X, FROM, TO) \
64
1.83M
  ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
65
66
#define GET_BIT(X, WHICH) \
67
388k
  GET_FIELD (X, WHICH, WHICH)
68
69
/* Some of these have been converted to 2-d arrays because they
70
   consume less storage this way.  If the maintenance becomes a
71
   problem, convert them back to const 1-d pointer arrays.  */
72
static const char *const control_reg[] =
73
{
74
  "rctr", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7",
75
  "pidr1", "pidr2", "ccr", "sar", "pidr3", "pidr4",
76
  "iva", "eiem", "itmr", "pcsq", "pcoq", "iir", "isr",
77
  "ior", "ipsw", "eirr", "tr0", "tr1", "tr2", "tr3",
78
  "tr4", "tr5", "tr6", "tr7"
79
};
80
81
static const char *const compare_cond_names[] =
82
{
83
  "", ",=", ",<", ",<=", ",<<", ",<<=", ",sv", ",od",
84
  ",tr", ",<>", ",>=", ",>", ",>>=", ",>>", ",nsv", ",ev"
85
};
86
static const char *const compare_cond_64_names[] =
87
{
88
  ",*", ",*=", ",*<", ",*<=", ",*<<", ",*<<=", ",*sv", ",*od",
89
  ",*tr", ",*<>", ",*>=", ",*>", ",*>>=", ",*>>", ",*nsv", ",*ev"
90
};
91
static const char *const cmpib_cond_64_names[] =
92
{
93
  ",*<<", ",*=", ",*<", ",*<=", ",*>>=", ",*<>", ",*>=", ",*>"
94
};
95
static const char *const add_cond_names[] =
96
{
97
  "", ",=", ",<", ",<=", ",nuv", ",znv", ",sv", ",od",
98
  ",tr", ",<>", ",>=", ",>", ",uv", ",vnz", ",nsv", ",ev"
99
};
100
static const char *const add_cond_64_names[] =
101
{
102
  ",*", ",*=", ",*<", ",*<=", ",*nuv", ",*znv", ",*sv", ",*od",
103
  ",*tr", ",*<>", ",*>=", ",*>", ",*uv", ",*vnz", ",*nsv", ",*ev"
104
};
105
static const char *const wide_add_cond_names[] =
106
{
107
  "", ",=", ",<", ",<=", ",nuv", ",*=", ",*<", ",*<=",
108
  ",tr", ",<>", ",>=", ",>", ",uv", ",*<>", ",*>=", ",*>"
109
};
110
static const char *const logical_cond_names[] =
111
{
112
  "", ",=", ",<", ",<=", 0, 0, 0, ",od",
113
  ",tr", ",<>", ",>=", ",>", 0, 0, 0, ",ev"};
114
static const char *const logical_cond_64_names[] =
115
{
116
  ",*", ",*=", ",*<", ",*<=", 0, 0, 0, ",*od",
117
  ",*tr", ",*<>", ",*>=", ",*>", 0, 0, 0, ",*ev"};
118
static const char *const unit_cond_names[] =
119
{
120
  "", ",swz", ",sbz", ",shz", ",sdc", ",swc", ",sbc", ",shc",
121
  ",tr", ",nwz", ",nbz", ",nhz", ",ndc", ",nwc", ",nbc", ",nhc"
122
};
123
static const char *const unit_cond_64_names[] =
124
{
125
  ",*", ",*swz", ",*sbz", ",*shz", ",*sdc", ",*swc", ",*sbc", ",*shc",
126
  ",*tr", ",*nwz", ",*nbz", ",*nhz", ",*ndc", ",*nwc", ",*nbc", ",*nhc"
127
};
128
static const char *const shift_cond_names[] =
129
{
130
  "", ",=", ",<", ",od", ",tr", ",<>", ",>=", ",ev"
131
};
132
static const char *const shift_cond_64_names[] =
133
{
134
  ",*", ",*=", ",*<", ",*od", ",*tr", ",*<>", ",*>=", ",*ev"
135
};
136
static const char *const bb_cond_64_names[] =
137
{
138
  ",*<", ",*>="
139
};
140
static const char *const index_compl_names[] = {"", ",m", ",s", ",sm"};
141
static const char *const short_ldst_compl_names[] = {"", ",ma", "", ",mb"};
142
static const char *const short_bytes_compl_names[] =
143
{
144
  "", ",b,m", ",e", ",e,m"
145
};
146
static const char *const float_format_names[] = {",sgl", ",dbl", "", ",quad"};
147
static const char *const fcnv_fixed_names[] = {",w", ",dw", "", ",qw"};
148
static const char *const fcnv_ufixed_names[] = {",uw", ",udw", "", ",uqw"};
149
static const char *const float_comp_names[] =
150
{
151
  ",false?", ",false", ",?", ",!<=>", ",=", ",=t", ",?=", ",!<>",
152
  ",!?>=", ",<", ",?<", ",!>=", ",!?>", ",<=", ",?<=", ",!>",
153
  ",!?<=", ",>", ",?>", ",!<=", ",!?<", ",>=", ",?>=", ",!<",
154
  ",!?=", ",<>", ",!=", ",!=t", ",!?", ",<=>", ",true?", ",true"
155
};
156
static const char *const signed_unsigned_names[] = {",u", ",s"};
157
static const char *const mix_half_names[] = {",l", ",r"};
158
static const char *const saturation_names[] = {",us", ",ss", 0, ""};
159
static const char *const read_write_names[] = {",r", ",w"};
160
static const char *const add_compl_names[] = { 0, "", ",l", ",tsv" };
161
162
/* For a bunch of different instructions form an index into a
163
   completer name table.  */
164
26.5k
#define GET_COMPL(insn) (GET_FIELD (insn, 26, 26) | \
165
26.5k
       GET_FIELD (insn, 18, 18) << 1)
166
167
23.4k
#define GET_COND(insn) (GET_FIELD ((insn), 16, 18) + \
168
23.4k
      (GET_FIELD ((insn), 19, 19) ? 8 : 0))
169
170
/* Utility function to print registers.  Put these first, so gcc's function
171
   inlining can do its stuff.  */
172
173
123k
#define fputs_filtered(STR,F) (*info->fprintf_func) (info->stream, "%s", STR)
174
175
static void
176
fput_reg (unsigned reg, disassemble_info *info)
177
536k
{
178
536k
  (*info->fprintf_func) (info->stream, "%s", reg ? reg_names[reg] : "r0");
179
536k
}
180
181
static void
182
fput_fp_reg (unsigned reg, disassemble_info *info)
183
67.4k
{
184
67.4k
  (*info->fprintf_func) (info->stream, "%s", reg ? fp_reg_names[reg] : "fr0");
185
67.4k
}
186
187
static void
188
fput_fp_reg_r (unsigned reg, disassemble_info *info)
189
12.1k
{
190
  /* Special case floating point exception registers.  */
191
12.1k
  if (reg < 4)
192
2.50k
    (*info->fprintf_func) (info->stream, "fpe%d", reg * 2 + 1);
193
9.63k
  else
194
9.63k
    (*info->fprintf_func) (info->stream, "%sR",
195
9.63k
         reg ? fp_reg_names[reg] : "fr0");
196
12.1k
}
197
198
static void
199
fput_creg (unsigned reg, disassemble_info *info)
200
39
{
201
39
  (*info->fprintf_func) (info->stream, "%s", control_reg[reg]);
202
39
}
203
204
/* Print constants with sign.  */
205
206
static void
207
fput_const (unsigned num, disassemble_info *info)
208
312k
{
209
312k
  if ((int) num < 0)
210
86.8k
    (*info->fprintf_func) (info->stream, "-%x", -num);
211
225k
  else
212
225k
    (*info->fprintf_func) (info->stream, "%x", num);
213
312k
}
214
215
/* Routines to extract various sized constants out of hppa
216
   instructions.  */
217
218
/* Extract a 3-bit space register number from a be, ble, mtsp or mfsp.  */
219
static int
220
extract_3 (unsigned word)
221
8.23k
{
222
8.23k
  return GET_FIELD (word, 18, 18) << 2 | GET_FIELD (word, 16, 17);
223
8.23k
}
224
225
static int
226
extract_5_load (unsigned word)
227
42.5k
{
228
42.5k
  return low_sign_extend (word >> 16 & MASK_5, 5);
229
42.5k
}
230
231
/* Extract the immediate field from a st{bhw}s instruction.  */
232
233
static int
234
extract_5_store (unsigned word)
235
4.48k
{
236
4.48k
  return low_sign_extend (word & MASK_5, 5);
237
4.48k
}
238
239
/* Extract the immediate field from a break instruction.  */
240
241
static unsigned
242
extract_5r_store (unsigned word)
243
34.4k
{
244
34.4k
  return (word & MASK_5);
245
34.4k
}
246
247
/* Extract the immediate field from a {sr}sm instruction.  */
248
249
static unsigned
250
extract_5R_store (unsigned word)
251
22
{
252
22
  return (word >> 16 & MASK_5);
253
22
}
254
255
/* Extract the 10 bit immediate field from a {sr}sm instruction.  */
256
257
static unsigned
258
extract_10U_store (unsigned word)
259
16
{
260
16
  return (word >> 16 & MASK_10);
261
16
}
262
263
/* Extract the immediate field from a bb instruction.  */
264
265
static unsigned
266
extract_5Q_store (unsigned word)
267
2.52k
{
268
2.52k
  return (word >> 21 & MASK_5);
269
2.52k
}
270
271
/* Extract an 11 bit immediate field.  */
272
273
static int
274
extract_11 (unsigned word)
275
13.1k
{
276
13.1k
  return low_sign_extend (word & MASK_11, 11);
277
13.1k
}
278
279
/* Extract a 14 bit immediate field.  */
280
281
static int
282
extract_14 (unsigned word)
283
0
{
284
0
  return low_sign_extend (word & MASK_14, 14);
285
0
}
286
287
/* Extract a 16 bit immediate field (PA2.0 wide only).  */
288
289
static int
290
extract_16 (unsigned word)
291
129k
{
292
129k
  unsigned m15, m0, m1;
293
294
129k
  m0 = GET_BIT (word, 16);
295
129k
  m1 = GET_BIT (word, 17);
296
129k
  m15 = GET_BIT (word, 31);
297
129k
  word = (word >> 1) & 0x1fff;
298
129k
  word = word | (m15 << 15) | ((m15 ^ m0) << 14) | ((m15 ^ m1) << 13);
299
129k
  return sign_extend (word, 16);
300
129k
}
301
302
/* Extract a 21 bit constant.  */
303
304
static int
305
extract_21 (unsigned word)
306
19.9k
{
307
19.9k
  unsigned val;
308
309
19.9k
  word &= MASK_21;
310
19.9k
  word <<= 11;
311
19.9k
  val = GET_FIELD (word, 20, 20);
312
19.9k
  val <<= 11;
313
19.9k
  val |= GET_FIELD (word, 9, 19);
314
19.9k
  val <<= 2;
315
19.9k
  val |= GET_FIELD (word, 5, 6);
316
19.9k
  val <<= 5;
317
19.9k
  val |= GET_FIELD (word, 0, 4);
318
19.9k
  val <<= 2;
319
19.9k
  val |= GET_FIELD (word, 7, 8);
320
19.9k
  return sign_extend (val, 21) << 11;
321
19.9k
}
322
323
/* Extract a 12 bit constant from branch instructions.  */
324
325
static int
326
extract_12 (unsigned word)
327
54.3k
{
328
54.3k
  return sign_extend (GET_FIELD (word, 19, 28)
329
54.3k
          | GET_FIELD (word, 29, 29) << 10
330
54.3k
          | (word & 0x1) << 11, 12) << 2;
331
54.3k
}
332
333
/* Extract a 17 bit constant from branch instructions, returning the
334
   19 bit signed value.  */
335
336
static int
337
extract_17 (unsigned word)
338
13.3k
{
339
13.3k
  return sign_extend (GET_FIELD (word, 19, 28)
340
13.3k
          | GET_FIELD (word, 29, 29) << 10
341
13.3k
          | GET_FIELD (word, 11, 15) << 11
342
13.3k
          | (word & 0x1) << 16, 17) << 2;
343
13.3k
}
344
345
static int
346
extract_22 (unsigned word)
347
11.3k
{
348
11.3k
  return sign_extend (GET_FIELD (word, 19, 28)
349
11.3k
          | GET_FIELD (word, 29, 29) << 10
350
11.3k
          | GET_FIELD (word, 11, 15) << 11
351
11.3k
          | GET_FIELD (word, 6, 10) << 16
352
11.3k
          | (word & 0x1) << 21, 22) << 2;
353
11.3k
}
354
355
/* Print one instruction.  */
356
357
int
358
print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
359
531k
{
360
531k
  bfd_byte buffer[4];
361
531k
  unsigned int insn, i;
362
363
531k
  {
364
531k
    int status =
365
531k
      (*info->read_memory_func) (memaddr, buffer, sizeof (buffer), info);
366
531k
    if (status != 0)
367
430
      {
368
430
  (*info->memory_error_func) (status, memaddr, info);
369
430
  return -1;
370
430
      }
371
531k
  }
372
373
530k
  insn = bfd_getb32 (buffer);
374
375
188M
  for (i = 0; i < NUMOPCODES; ++i)
376
188M
    {
377
188M
      const struct pa_opcode *opcode = &pa_opcodes[i];
378
379
188M
      if ((insn & opcode->mask) == opcode->match)
380
393k
  {
381
393k
    const char *s;
382
#ifndef BFD64
383
    if (opcode->arch == pa20w)
384
      continue;
385
#endif
386
393k
    (*info->fprintf_func) (info->stream, "%s", opcode->name);
387
388
393k
    if (!strchr ("cfCY?-+nHNZFIuv{", opcode->args[0]))
389
166k
      (*info->fprintf_func) (info->stream, " ");
390
2.68M
    for (s = opcode->args; *s != '\0'; ++s)
391
2.28M
      {
392
2.28M
        switch (*s)
393
2.28M
    {
394
209k
    case 'x':
395
209k
      fput_reg (GET_FIELD (insn, 11, 15), info);
396
209k
      break;
397
1.04k
    case 'a':
398
280k
    case 'b':
399
280k
      fput_reg (GET_FIELD (insn, 6, 10), info);
400
280k
      break;
401
39
    case '^':
402
39
      fput_creg (GET_FIELD (insn, 6, 10), info);
403
39
      break;
404
46.3k
    case 't':
405
46.3k
      fput_reg (GET_FIELD (insn, 27, 31), info);
406
46.3k
      break;
407
408
      /* Handle floating point registers.  */
409
79.5k
    case 'f':
410
79.5k
      switch (*++s)
411
79.5k
        {
412
3.45k
        case 't':
413
3.45k
          fput_fp_reg (GET_FIELD (insn, 27, 31), info);
414
3.45k
          break;
415
8.49k
        case 'T':
416
8.49k
          if (GET_FIELD (insn, 25, 25))
417
1.81k
      fput_fp_reg_r (GET_FIELD (insn, 27, 31), info);
418
6.68k
          else
419
6.68k
      fput_fp_reg (GET_FIELD (insn, 27, 31), info);
420
8.49k
          break;
421
558
        case 'a':
422
558
          if (GET_FIELD (insn, 25, 25))
423
33
      fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
424
525
          else
425
525
      fput_fp_reg (GET_FIELD (insn, 6, 10), info);
426
558
          break;
427
428
          /* 'fA' will not generate a space before the register
429
       name.  Normally that is fine.  Except that it
430
       causes problems with xmpyu which has no FP format
431
       completer.  */
432
113
        case 'X':
433
113
          fputs_filtered (" ", info);
434
          /* FALLTHRU */
435
436
4.59k
        case 'A':
437
4.59k
          if (GET_FIELD (insn, 24, 24))
438
2.12k
      fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
439
2.46k
          else
440
2.46k
      fput_fp_reg (GET_FIELD (insn, 6, 10), info);
441
4.59k
          break;
442
448
        case 'b':
443
448
          if (GET_FIELD (insn, 25, 25))
444
0
      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
445
448
          else
446
448
      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
447
448
          break;
448
4.54k
        case 'B':
449
4.54k
          if (GET_FIELD (insn, 19, 19))
450
2.43k
      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
451
2.11k
          else
452
2.11k
      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
453
4.54k
          break;
454
4.18k
        case 'C':
455
4.18k
          {
456
4.18k
      int reg = GET_FIELD (insn, 21, 22);
457
4.18k
      reg |= GET_FIELD (insn, 16, 18) << 2;
458
4.18k
      if (GET_FIELD (insn, 23, 23) != 0)
459
1.69k
        fput_fp_reg_r (reg, info);
460
2.49k
      else
461
2.49k
        fput_fp_reg (reg, info);
462
4.18k
      break;
463
113
          }
464
7.29k
        case 'i':
465
7.29k
          {
466
7.29k
      int reg = GET_FIELD (insn, 6, 10);
467
468
7.29k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
469
7.29k
      fput_fp_reg (reg, info);
470
7.29k
      break;
471
113
          }
472
7.29k
        case 'j':
473
7.29k
          {
474
7.29k
      int reg = GET_FIELD (insn, 11, 15);
475
476
7.29k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
477
7.29k
      fput_fp_reg (reg, info);
478
7.29k
      break;
479
113
          }
480
7.29k
        case 'k':
481
7.29k
          {
482
7.29k
      int reg = GET_FIELD (insn, 27, 31);
483
484
7.29k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
485
7.29k
      fput_fp_reg (reg, info);
486
7.29k
      break;
487
113
          }
488
7.29k
        case 'l':
489
7.29k
          {
490
7.29k
      int reg = GET_FIELD (insn, 21, 25);
491
492
7.29k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
493
7.29k
      fput_fp_reg (reg, info);
494
7.29k
      break;
495
113
          }
496
7.29k
        case 'm':
497
7.29k
          {
498
7.29k
      int reg = GET_FIELD (insn, 16, 20);
499
500
7.29k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
501
7.29k
      fput_fp_reg (reg, info);
502
7.29k
      break;
503
113
          }
504
505
          /* 'fe' will not generate a space before the register
506
       name.  Normally that is fine.  Except that it
507
       causes problems with fstw fe,y(b) which has no FP
508
       format completer.  */
509
5.49k
        case 'E':
510
5.49k
          fputs_filtered (" ", info);
511
          /* FALLTHRU */
512
513
11.1k
        case 'e':
514
11.1k
          if (GET_FIELD (insn, 30, 30))
515
4.03k
      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
516
7.13k
          else
517
7.13k
      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
518
11.1k
          break;
519
5.66k
        case 'x':
520
5.66k
          fput_fp_reg (GET_FIELD (insn, 11, 15), info);
521
5.66k
          break;
522
79.5k
        }
523
79.5k
      break;
524
525
79.5k
    case '5':
526
42.5k
      fput_const (extract_5_load (insn), info);
527
42.5k
      break;
528
5.55k
    case 's':
529
5.55k
      {
530
5.55k
        int space = GET_FIELD (insn, 16, 17);
531
        /* Zero means implicit addressing, not use of sr0.  */
532
5.55k
        if (space != 0)
533
5.55k
          (*info->fprintf_func) (info->stream, "sr%d", space);
534
5.55k
      }
535
5.55k
      break;
536
537
8.23k
    case 'S':
538
8.23k
      (*info->fprintf_func) (info->stream, "sr%d",
539
8.23k
           extract_3 (insn));
540
8.23k
      break;
541
542
      /* Handle completers.  */
543
130k
    case 'c':
544
130k
      switch (*++s)
545
130k
        {
546
5.32k
        case 'x':
547
5.32k
          (*info->fprintf_func)
548
5.32k
      (info->stream, "%s",
549
5.32k
       index_compl_names[GET_COMPL (insn)]);
550
5.32k
          break;
551
4.94k
        case 'X':
552
4.94k
          (*info->fprintf_func)
553
4.94k
      (info->stream, "%s ",
554
4.94k
       index_compl_names[GET_COMPL (insn)]);
555
4.94k
          break;
556
2.06k
        case 'm':
557
2.06k
          (*info->fprintf_func)
558
2.06k
      (info->stream, "%s",
559
2.06k
       short_ldst_compl_names[GET_COMPL (insn)]);
560
2.06k
          break;
561
13.7k
        case 'M':
562
13.7k
          (*info->fprintf_func)
563
13.7k
      (info->stream, "%s ",
564
13.7k
       short_ldst_compl_names[GET_COMPL (insn)]);
565
13.7k
          break;
566
113
        case 'A':
567
113
          (*info->fprintf_func)
568
113
      (info->stream, "%s ",
569
113
       short_bytes_compl_names[GET_COMPL (insn)]);
570
113
          break;
571
289
        case 's':
572
289
          (*info->fprintf_func)
573
289
      (info->stream, "%s",
574
289
       short_bytes_compl_names[GET_COMPL (insn)]);
575
289
          break;
576
6.04k
        case 'c':
577
9.70k
        case 'C':
578
9.70k
          switch (GET_FIELD (insn, 20, 21))
579
9.70k
      {
580
3.02k
      case 1:
581
3.02k
        (*info->fprintf_func) (info->stream, ",bc ");
582
3.02k
        break;
583
1.77k
      case 2:
584
1.77k
        (*info->fprintf_func) (info->stream, ",sl ");
585
1.77k
        break;
586
4.91k
      default:
587
4.91k
        (*info->fprintf_func) (info->stream, " ");
588
9.70k
      }
589
9.70k
          break;
590
9.70k
        case 'd':
591
318
          switch (GET_FIELD (insn, 20, 21))
592
318
      {
593
89
      case 1:
594
89
        (*info->fprintf_func) (info->stream, ",co ");
595
89
        break;
596
229
      default:
597
229
        (*info->fprintf_func) (info->stream, " ");
598
318
      }
599
318
          break;
600
2.35k
        case 'o':
601
2.35k
          (*info->fprintf_func) (info->stream, ",o");
602
2.35k
          break;
603
265
        case 'g':
604
265
          (*info->fprintf_func) (info->stream, ",gate");
605
265
          break;
606
168
        case 'p':
607
168
          (*info->fprintf_func) (info->stream, ",l,push");
608
168
          break;
609
0
        case 'P':
610
0
          (*info->fprintf_func) (info->stream, ",pop");
611
0
          break;
612
20.3k
        case 'l':
613
20.4k
        case 'L':
614
20.4k
          (*info->fprintf_func) (info->stream, ",l");
615
20.4k
          break;
616
49
        case 'w':
617
49
          (*info->fprintf_func)
618
49
      (info->stream, "%s ",
619
49
       read_write_names[GET_FIELD (insn, 25, 25)]);
620
49
          break;
621
0
        case 'W':
622
0
          (*info->fprintf_func) (info->stream, ",w ");
623
0
          break;
624
89
        case 'r':
625
89
          if (GET_FIELD (insn, 23, 26) == 5)
626
4
      (*info->fprintf_func) (info->stream, ",r");
627
89
          break;
628
371
        case 'Z':
629
371
          if (GET_FIELD (insn, 26, 26))
630
48
      (*info->fprintf_func) (info->stream, ",m ");
631
323
          else
632
323
      (*info->fprintf_func) (info->stream, " ");
633
371
          break;
634
46
        case 'i':
635
46
          if (GET_FIELD (insn, 25, 25))
636
32
      (*info->fprintf_func) (info->stream, ",i");
637
46
          break;
638
10.0k
        case 'z':
639
10.0k
          if (!GET_FIELD (insn, 21, 21))
640
5.79k
      (*info->fprintf_func) (info->stream, ",z");
641
10.0k
          break;
642
3.67k
        case 'a':
643
3.67k
          (*info->fprintf_func)
644
3.67k
      (info->stream, "%s",
645
3.67k
       add_compl_names[GET_FIELD (insn, 20, 21)]);
646
3.67k
          break;
647
61
        case 'Y':
648
61
          (*info->fprintf_func)
649
61
      (info->stream, ",dc%s",
650
61
       add_compl_names[GET_FIELD (insn, 20, 21)]);
651
61
          break;
652
301
        case 'y':
653
301
          (*info->fprintf_func)
654
301
      (info->stream, ",c%s",
655
301
       add_compl_names[GET_FIELD (insn, 20, 21)]);
656
301
          break;
657
6.07k
        case 'v':
658
6.07k
          if (GET_FIELD (insn, 20, 20))
659
1.48k
      (*info->fprintf_func) (info->stream, ",tsv");
660
6.07k
          break;
661
2.56k
        case 't':
662
2.56k
          (*info->fprintf_func) (info->stream, ",tc");
663
2.56k
          if (GET_FIELD (insn, 20, 20))
664
630
      (*info->fprintf_func) (info->stream, ",tsv");
665
2.56k
          break;
666
65
        case 'B':
667
65
          (*info->fprintf_func) (info->stream, ",db");
668
65
          if (GET_FIELD (insn, 20, 20))
669
35
      (*info->fprintf_func) (info->stream, ",tsv");
670
65
          break;
671
166
        case 'b':
672
166
          (*info->fprintf_func) (info->stream, ",b");
673
166
          if (GET_FIELD (insn, 20, 20))
674
66
      (*info->fprintf_func) (info->stream, ",tsv");
675
166
          break;
676
583
        case 'T':
677
583
          if (GET_FIELD (insn, 25, 25))
678
192
      (*info->fprintf_func) (info->stream, ",tc");
679
583
          break;
680
6.39k
        case 'S':
681
          /* EXTRD/W has a following condition.  */
682
6.39k
          if (*(s + 1) == '?')
683
6.38k
      (*info->fprintf_func)
684
6.38k
        (info->stream, "%s",
685
6.38k
         signed_unsigned_names[GET_FIELD (insn, 21, 21)]);
686
10
          else
687
10
      (*info->fprintf_func)
688
10
        (info->stream, "%s ",
689
10
         signed_unsigned_names[GET_FIELD (insn, 21, 21)]);
690
6.39k
          break;
691
34
        case 'h':
692
34
          (*info->fprintf_func)
693
34
      (info->stream, "%s",
694
34
       mix_half_names[GET_FIELD (insn, 17, 17)]);
695
34
          break;
696
107
        case 'H':
697
107
          (*info->fprintf_func)
698
107
      (info->stream, "%s ",
699
107
       saturation_names[GET_FIELD (insn, 24, 25)]);
700
107
          break;
701
1.04k
        case '*':
702
1.04k
          (*info->fprintf_func)
703
1.04k
      (info->stream, ",%d%d%d%d ",
704
1.04k
       GET_FIELD (insn, 17, 18), GET_FIELD (insn, 20, 21),
705
1.04k
       GET_FIELD (insn, 22, 23), GET_FIELD (insn, 24, 25));
706
1.04k
          break;
707
708
14.2k
        case 'q':
709
14.2k
          {
710
14.2k
      int m, a;
711
712
14.2k
      m = GET_FIELD (insn, 28, 28);
713
14.2k
      a = GET_FIELD (insn, 29, 29);
714
715
14.2k
      if (m && !a)
716
2.00k
        fputs_filtered (",ma ", info);
717
12.2k
      else if (m && a)
718
2.14k
        fputs_filtered (",mb ", info);
719
10.0k
      else
720
10.0k
        fputs_filtered (" ", info);
721
14.2k
      break;
722
20.3k
          }
723
724
7.45k
        case 'J':
725
7.45k
          {
726
7.45k
      int opc = GET_FIELD (insn, 0, 5);
727
728
7.45k
      if (opc == 0x16 || opc == 0x1e)
729
7.45k
        {
730
7.45k
          if (GET_FIELD (insn, 29, 29) == 0)
731
5.38k
            fputs_filtered (",ma ", info);
732
2.07k
          else
733
2.07k
            fputs_filtered (",mb ", info);
734
7.45k
        }
735
0
      else
736
0
        fputs_filtered (" ", info);
737
7.45k
      break;
738
20.3k
          }
739
740
16.9k
        case 'e':
741
16.9k
          {
742
16.9k
      int opc = GET_FIELD (insn, 0, 5);
743
744
16.9k
      if (opc == 0x13 || opc == 0x1b)
745
14.4k
        {
746
14.4k
          if (GET_FIELD (insn, 18, 18) == 1)
747
8.51k
            fputs_filtered (",mb ", info);
748
5.96k
          else
749
5.96k
            fputs_filtered (",ma ", info);
750
14.4k
        }
751
2.44k
      else if (opc == 0x17 || opc == 0x1f)
752
2.44k
        {
753
2.44k
          if (GET_FIELD (insn, 31, 31) == 1)
754
882
            fputs_filtered (",ma ", info);
755
1.55k
          else
756
1.55k
            fputs_filtered (",mb ", info);
757
2.44k
        }
758
0
      else
759
0
        fputs_filtered (" ", info);
760
761
16.9k
      break;
762
20.3k
          }
763
130k
        }
764
130k
      break;
765
766
      /* Handle conditions.  */
767
130k
    case '?':
768
95.6k
      {
769
95.6k
        s++;
770
95.6k
        switch (*s)
771
95.6k
          {
772
477
          case 'f':
773
477
      (*info->fprintf_func)
774
477
        (info->stream, "%s ",
775
477
         float_comp_names[GET_FIELD (insn, 27, 31)]);
776
477
      break;
777
778
      /* These four conditions are for the set of instructions
779
         which distinguish true/false conditions by opcode
780
         rather than by the 'f' bit (sigh): comb, comib,
781
         addb, addib.  */
782
0
          case 't':
783
0
      fputs_filtered
784
0
        (compare_cond_names[GET_FIELD (insn, 16, 18)], info);
785
0
      break;
786
24.3k
          case 'n':
787
24.3k
      fputs_filtered
788
24.3k
        (compare_cond_names[GET_FIELD (insn, 16, 18)
789
24.3k
                + GET_FIELD (insn, 4, 4) * 8],
790
24.3k
         info);
791
24.3k
      break;
792
5.00k
          case 'N':
793
5.00k
      fputs_filtered
794
5.00k
        (compare_cond_64_names[GET_FIELD (insn, 16, 18)
795
5.00k
             + GET_FIELD (insn, 2, 2) * 8],
796
5.00k
         info);
797
5.00k
      break;
798
4.01k
          case 'Q':
799
4.01k
      fputs_filtered
800
4.01k
        (cmpib_cond_64_names[GET_FIELD (insn, 16, 18)],
801
4.01k
         info);
802
4.01k
      break;
803
0
          case '@':
804
0
      fputs_filtered
805
0
        (add_cond_names[GET_FIELD (insn, 16, 18)
806
0
            + GET_FIELD (insn, 4, 4) * 8],
807
0
         info);
808
0
      break;
809
7.28k
          case 's':
810
7.28k
      (*info->fprintf_func)
811
7.28k
        (info->stream, "%s ",
812
7.28k
         compare_cond_names[GET_COND (insn)]);
813
7.28k
      break;
814
2.02k
          case 'S':
815
2.02k
      (*info->fprintf_func)
816
2.02k
        (info->stream, "%s ",
817
2.02k
         compare_cond_64_names[GET_COND (insn)]);
818
2.02k
      break;
819
7.07k
          case 'a':
820
7.07k
      (*info->fprintf_func)
821
7.07k
        (info->stream, "%s ",
822
7.07k
         add_cond_names[GET_COND (insn)]);
823
7.07k
      break;
824
2.45k
          case 'A':
825
2.45k
      (*info->fprintf_func)
826
2.45k
        (info->stream, "%s ",
827
2.45k
         add_cond_64_names[GET_COND (insn)]);
828
2.45k
      break;
829
0
          case 'd':
830
0
      (*info->fprintf_func)
831
0
        (info->stream, "%s",
832
0
         add_cond_names[GET_FIELD (insn, 16, 18)]);
833
0
      break;
834
835
10.7k
          case 'W':
836
10.7k
      (*info->fprintf_func)
837
10.7k
        (info->stream, "%s",
838
10.7k
         wide_add_cond_names[GET_FIELD (insn, 16, 18) +
839
10.7k
                 GET_FIELD (insn, 4, 4) * 8]);
840
10.7k
      break;
841
842
3.09k
          case 'l':
843
3.09k
      (*info->fprintf_func)
844
3.09k
        (info->stream, "%s ",
845
3.09k
         logical_cond_names[GET_COND (insn)]);
846
3.09k
      break;
847
826
          case 'L':
848
826
      (*info->fprintf_func)
849
826
        (info->stream, "%s ",
850
826
         logical_cond_64_names[GET_COND (insn)]);
851
826
      break;
852
357
          case 'u':
853
357
      (*info->fprintf_func)
854
357
        (info->stream, "%s ",
855
357
         unit_cond_names[GET_COND (insn)]);
856
357
      break;
857
340
          case 'U':
858
340
      (*info->fprintf_func)
859
340
        (info->stream, "%s ",
860
340
         unit_cond_64_names[GET_COND (insn)]);
861
340
      break;
862
7.59k
          case 'y':
863
12.4k
          case 'x':
864
14.6k
          case 'b':
865
14.6k
      (*info->fprintf_func)
866
14.6k
        (info->stream, "%s",
867
14.6k
         shift_cond_names[GET_FIELD (insn, 16, 18)]);
868
869
      /* If the next character in args is 'n', it will handle
870
         putting out the space.  */
871
14.6k
      if (s[1] != 'n')
872
4.89k
        (*info->fprintf_func) (info->stream, " ");
873
14.6k
      break;
874
12.4k
          case 'X':
875
12.4k
      (*info->fprintf_func)
876
12.4k
        (info->stream, "%s ",
877
12.4k
         shift_cond_64_names[GET_FIELD (insn, 16, 18)]);
878
12.4k
      break;
879
515
          case 'B':
880
515
      (*info->fprintf_func)
881
515
        (info->stream, "%s",
882
515
         bb_cond_64_names[GET_FIELD (insn, 16, 16)]);
883
884
      /* If the next character in args is 'n', it will handle
885
         putting out the space.  */
886
515
      if (s[1] != 'n')
887
0
        (*info->fprintf_func) (info->stream, " ");
888
515
      break;
889
95.6k
          }
890
95.6k
        break;
891
95.6k
      }
892
893
95.6k
    case 'V':
894
4.48k
      fput_const (extract_5_store (insn), info);
895
4.48k
      break;
896
34.4k
    case 'r':
897
34.4k
      fput_const (extract_5r_store (insn), info);
898
34.4k
      break;
899
22
    case 'R':
900
22
      fput_const (extract_5R_store (insn), info);
901
22
      break;
902
16
    case 'U':
903
16
      fput_const (extract_10U_store (insn), info);
904
16
      break;
905
492
    case 'B':
906
2.52k
    case 'Q':
907
2.52k
      fput_const (extract_5Q_store (insn), info);
908
2.52k
      break;
909
13.1k
    case 'i':
910
13.1k
      fput_const (extract_11 (insn), info);
911
13.1k
      break;
912
0
    case 'j':
913
0
      fput_const (extract_14 (insn), info);
914
0
      break;
915
19.9k
    case 'k':
916
19.9k
      fputs_filtered ("L%", info);
917
19.9k
      fput_const (extract_21 (insn), info);
918
19.9k
      break;
919
14.4k
    case '<':
920
101k
    case 'l':
921
      /* 16-bit long disp., PA2.0 wide only.  */
922
101k
      fput_const (extract_16 (insn), info);
923
101k
      break;
924
81.3k
    case 'n':
925
81.3k
      if (insn & 0x2)
926
26.9k
        (*info->fprintf_func) (info->stream, ",n ");
927
54.3k
      else
928
54.3k
        (*info->fprintf_func) (info->stream, " ");
929
81.3k
      break;
930
17.7k
    case 'N':
931
17.7k
      if ((insn & 0x20) && s[1])
932
2.42k
        (*info->fprintf_func) (info->stream, ",n ");
933
15.3k
      else if (insn & 0x20)
934
6.79k
        (*info->fprintf_func) (info->stream, ",n");
935
8.55k
      else if (s[1])
936
1.99k
        (*info->fprintf_func) (info->stream, " ");
937
17.7k
      break;
938
54.3k
    case 'w':
939
54.3k
      (*info->print_address_func)
940
54.3k
        (memaddr + 8 + extract_12 (insn), info);
941
54.3k
      break;
942
6.50k
    case 'W':
943
      /* 17 bit PC-relative branch.  */
944
6.50k
      (*info->print_address_func)
945
6.50k
        ((memaddr + 8 + extract_17 (insn)), info);
946
6.50k
      break;
947
6.85k
    case 'z':
948
      /* 17 bit displacement.  This is an offset from a register
949
         so it gets disasssembled as just a number, not any sort
950
         of address.  */
951
6.85k
      fput_const (extract_17 (insn), info);
952
6.85k
      break;
953
954
9.75k
    case 'Z':
955
      /* addil %r1 implicit output.  */
956
9.75k
      fputs_filtered ("r1", info);
957
9.75k
      break;
958
959
2.94k
    case 'Y':
960
      /* be,l %sr0,%r31 implicit output.  */
961
2.94k
      fputs_filtered ("sr0,r31", info);
962
2.94k
      break;
963
964
2.35k
    case '@':
965
2.35k
      (*info->fprintf_func) (info->stream, "0");
966
2.35k
      break;
967
968
835
    case '.':
969
835
      (*info->fprintf_func) (info->stream, "%d",
970
835
           GET_FIELD (insn, 24, 25));
971
835
      break;
972
13
    case '*':
973
13
      (*info->fprintf_func) (info->stream, "%d",
974
13
           GET_FIELD (insn, 22, 25));
975
13
      break;
976
771
    case '!':
977
771
      fputs_filtered ("sar", info);
978
771
      break;
979
1.68k
    case 'p':
980
1.68k
      (*info->fprintf_func) (info->stream, "%d",
981
1.68k
           31 - GET_FIELD (insn, 22, 26));
982
1.68k
      break;
983
8.64k
    case '~':
984
8.64k
      {
985
8.64k
        int num;
986
8.64k
        num = GET_FIELD (insn, 20, 20) << 5;
987
8.64k
        num |= GET_FIELD (insn, 22, 26);
988
8.64k
        (*info->fprintf_func) (info->stream, "%d", 63 - num);
989
8.64k
        break;
990
14.4k
      }
991
2.69k
    case 'P':
992
2.69k
      (*info->fprintf_func) (info->stream, "%d",
993
2.69k
           GET_FIELD (insn, 22, 26));
994
2.69k
      break;
995
3.62k
    case 'q':
996
3.62k
      {
997
3.62k
        int num;
998
3.62k
        num = GET_FIELD (insn, 20, 20) << 5;
999
3.62k
        num |= GET_FIELD (insn, 22, 26);
1000
3.62k
        (*info->fprintf_func) (info->stream, "%d", num);
1001
3.62k
        break;
1002
14.4k
      }
1003
4.45k
    case 'T':
1004
4.45k
      (*info->fprintf_func) (info->stream, "%d",
1005
4.45k
           32 - GET_FIELD (insn, 27, 31));
1006
4.45k
      break;
1007
132
    case '%':
1008
132
      {
1009
132
        int num;
1010
132
        num = (GET_FIELD (insn, 23, 23) + 1) * 32;
1011
132
        num -= GET_FIELD (insn, 27, 31);
1012
132
        (*info->fprintf_func) (info->stream, "%d", num);
1013
132
        break;
1014
14.4k
      }
1015
11.8k
    case '|':
1016
11.8k
      {
1017
11.8k
        int num;
1018
11.8k
        num = (GET_FIELD (insn, 19, 19) + 1) * 32;
1019
11.8k
        num -= GET_FIELD (insn, 27, 31);
1020
11.8k
        (*info->fprintf_func) (info->stream, "%d", num);
1021
11.8k
        break;
1022
14.4k
      }
1023
0
    case '$':
1024
0
      fput_const (GET_FIELD (insn, 20, 28), info);
1025
0
      break;
1026
34.4k
    case 'A':
1027
34.4k
      fput_const (GET_FIELD (insn, 6, 18), info);
1028
34.4k
      break;
1029
6.75k
    case 'D':
1030
6.75k
      fput_const (GET_FIELD (insn, 6, 31), info);
1031
6.75k
      break;
1032
10.7k
    case 'v':
1033
10.7k
      (*info->fprintf_func) (info->stream, ",%d",
1034
10.7k
           GET_FIELD (insn, 23, 25));
1035
10.7k
      break;
1036
6.32k
    case 'O':
1037
6.32k
      fput_const ((GET_FIELD (insn, 6,20) << 5 |
1038
6.32k
             GET_FIELD (insn, 27, 31)), info);
1039
6.32k
      break;
1040
1.96k
    case 'o':
1041
1.96k
      fput_const (GET_FIELD (insn, 6, 20), info);
1042
1.96k
      break;
1043
7.03k
    case '2':
1044
7.03k
      fput_const ((GET_FIELD (insn, 6, 22) << 5 |
1045
7.03k
             GET_FIELD (insn, 27, 31)), info);
1046
7.03k
      break;
1047
1.20k
    case '1':
1048
1.20k
      fput_const ((GET_FIELD (insn, 11, 20) << 5 |
1049
1.20k
             GET_FIELD (insn, 27, 31)), info);
1050
1.20k
      break;
1051
1.25k
    case '0':
1052
1.25k
      fput_const ((GET_FIELD (insn, 16, 20) << 5 |
1053
1.25k
             GET_FIELD (insn, 27, 31)), info);
1054
1.25k
      break;
1055
13.9k
    case 'u':
1056
13.9k
      (*info->fprintf_func) (info->stream, ",%d",
1057
13.9k
           GET_FIELD (insn, 23, 25));
1058
13.9k
      break;
1059
574
    case 'F':
1060
      /* If no destination completer and not before a completer
1061
         for fcmp, need a space here.  */
1062
574
      if (s[1] == 'G' || s[1] == '?')
1063
372
        fputs_filtered
1064
574
          (float_format_names[GET_FIELD (insn, 19, 20)], info);
1065
202
      else
1066
202
        (*info->fprintf_func)
1067
202
          (info->stream, "%s ",
1068
202
           float_format_names[GET_FIELD (insn, 19, 20)]);
1069
574
      break;
1070
68
    case 'G':
1071
68
      (*info->fprintf_func)
1072
68
        (info->stream, "%s ",
1073
68
         float_format_names[GET_FIELD (insn, 17, 18)]);
1074
68
      break;
1075
7.29k
    case 'H':
1076
7.29k
      if (GET_FIELD (insn, 26, 26) == 1)
1077
2.32k
        (*info->fprintf_func) (info->stream, "%s ",
1078
2.32k
             float_format_names[0]);
1079
4.96k
      else
1080
4.96k
        (*info->fprintf_func) (info->stream, "%s ",
1081
4.96k
             float_format_names[1]);
1082
7.29k
      break;
1083
4.42k
    case 'I':
1084
      /* If no destination completer and not before a completer
1085
         for fcmp, need a space here.  */
1086
4.42k
      if (s[1] == '?')
1087
173
        fputs_filtered
1088
4.42k
          (float_format_names[GET_FIELD (insn, 20, 20)], info);
1089
4.24k
      else
1090
4.24k
        (*info->fprintf_func)
1091
4.24k
          (info->stream, "%s ",
1092
4.24k
           float_format_names[GET_FIELD (insn, 20, 20)]);
1093
4.42k
      break;
1094
1095
0
    case 'J':
1096
0
      fput_const (extract_14 (insn), info);
1097
0
      break;
1098
1099
0
    case '#':
1100
0
      {
1101
0
        unsigned sign = GET_FIELD (insn, 31, 31);
1102
0
        unsigned imm10 = GET_FIELD (insn, 18, 27);
1103
0
        unsigned disp;
1104
1105
0
        if (sign)
1106
0
          disp = (-1U << 10) | imm10;
1107
0
        else
1108
0
          disp = imm10;
1109
1110
0
        disp <<= 3;
1111
0
        fput_const (disp, info);
1112
0
        break;
1113
14.4k
      }
1114
0
    case 'K':
1115
0
    case 'd':
1116
0
      {
1117
0
        unsigned sign = GET_FIELD (insn, 31, 31);
1118
0
        unsigned imm11 = GET_FIELD (insn, 18, 28);
1119
0
        unsigned disp;
1120
1121
0
        if (sign)
1122
0
          disp = (-1U << 11) | imm11;
1123
0
        else
1124
0
          disp = imm11;
1125
1126
0
        disp <<= 2;
1127
0
        fput_const (disp, info);
1128
0
        break;
1129
0
      }
1130
1131
2.44k
    case '>':
1132
13.6k
    case 'y':
1133
13.6k
      {
1134
        /* 16-bit long disp., PA2.0 wide only.  */
1135
13.6k
        int disp = extract_16 (insn);
1136
13.6k
        disp &= ~3;
1137
13.6k
        fput_const (disp, info);
1138
13.6k
        break;
1139
2.44k
      }
1140
1141
14.2k
    case '&':
1142
14.2k
      {
1143
        /* 16-bit long disp., PA2.0 wide only.  */
1144
14.2k
        int disp = extract_16 (insn);
1145
14.2k
        disp &= ~7;
1146
14.2k
        fput_const (disp, info);
1147
14.2k
        break;
1148
2.44k
      }
1149
1150
47
    case '_':
1151
47
      break; /* Dealt with by '{' */
1152
1153
47
    case '{':
1154
47
      {
1155
47
        int sub = GET_FIELD (insn, 14, 16);
1156
47
        int df = GET_FIELD (insn, 17, 18);
1157
47
        int sf = GET_FIELD (insn, 19, 20);
1158
47
        const char * const * source = float_format_names;
1159
47
        const char * const * dest = float_format_names;
1160
47
        char *t = "";
1161
1162
47
        if (sub == 4)
1163
11
          {
1164
11
      fputs_filtered (",UND ", info);
1165
11
      break;
1166
11
          }
1167
36
        if ((sub & 3) == 3)
1168
1
          t = ",t";
1169
36
        if ((sub & 3) == 1)
1170
20
          source = sub & 4 ? fcnv_ufixed_names : fcnv_fixed_names;
1171
36
        if (sub & 2)
1172
13
          dest = sub & 4 ? fcnv_ufixed_names : fcnv_fixed_names;
1173
1174
36
        (*info->fprintf_func) (info->stream, "%s%s%s ",
1175
36
             t, source[sf], dest[df]);
1176
36
        break;
1177
47
      }
1178
1179
0
    case 'm':
1180
0
      {
1181
0
        int y = GET_FIELD (insn, 16, 18);
1182
1183
0
        if (y != 1)
1184
0
          fput_const ((y ^ 1) - 1, info);
1185
0
      }
1186
0
      break;
1187
1188
240
    case 'h':
1189
240
      {
1190
240
        int cbit;
1191
1192
240
        cbit = GET_FIELD (insn, 16, 18);
1193
1194
240
        if (cbit > 0)
1195
240
          (*info->fprintf_func) (info->stream, ",%d", cbit - 1);
1196
240
        break;
1197
47
      }
1198
1199
67
    case '=':
1200
67
      {
1201
67
        int cond = GET_FIELD (insn, 27, 31);
1202
1203
67
        switch (cond)
1204
67
          {
1205
0
          case  0: fputs_filtered (" ", info); break;
1206
0
          case  1: fputs_filtered ("acc ", info); break;
1207
0
          case  2: fputs_filtered ("rej ", info); break;
1208
1
          case  5: fputs_filtered ("acc8 ", info); break;
1209
29
          case  6: fputs_filtered ("rej8 ", info); break;
1210
1
          case  9: fputs_filtered ("acc6 ", info); break;
1211
0
          case 13: fputs_filtered ("acc4 ", info); break;
1212
8
          case 17: fputs_filtered ("acc2 ", info); break;
1213
28
          default: break;
1214
67
          }
1215
67
        break;
1216
67
      }
1217
1218
11.3k
    case 'X':
1219
11.3k
      (*info->print_address_func)
1220
11.3k
        (memaddr + 8 + extract_22 (insn), info);
1221
11.3k
      break;
1222
11.3k
    case 'L':
1223
11.3k
      fputs_filtered (",rp", info);
1224
11.3k
      break;
1225
849k
    default:
1226
849k
      (*info->fprintf_func) (info->stream, "%c", *s);
1227
849k
      break;
1228
2.28M
    }
1229
2.28M
      }
1230
393k
    return sizeof (insn);
1231
393k
  }
1232
188M
    }
1233
137k
  (*info->fprintf_func) (info->stream, "#%8x", insn);
1234
137k
  return sizeof (insn);
1235
530k
}