Coverage Report

Created: 2023-06-29 07:13

/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
89.3k
#define MASK_5  0x1f
55
116
#define MASK_10 0x3ff
56
13.4k
#define MASK_11 0x7ff
57
0
#define MASK_14 0x3fff
58
#define MASK_16 0xffff
59
19.6k
#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.98M
  ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
65
66
#define GET_BIT(X, WHICH) \
67
428k
  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
28.9k
#define GET_COMPL(insn) (GET_FIELD (insn, 26, 26) | \
165
28.9k
       GET_FIELD (insn, 18, 18) << 1)
166
167
25.9k
#define GET_COND(insn) (GET_FIELD ((insn), 16, 18) + \
168
25.9k
      (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
130k
#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
582k
{
178
582k
  (*info->fprintf_func) (info->stream, "%s", reg ? reg_names[reg] : "r0");
179
582k
}
180
181
static void
182
fput_fp_reg (unsigned reg, disassemble_info *info)
183
72.2k
{
184
72.2k
  (*info->fprintf_func) (info->stream, "%s", reg ? fp_reg_names[reg] : "fr0");
185
72.2k
}
186
187
static void
188
fput_fp_reg_r (unsigned reg, disassemble_info *info)
189
15.4k
{
190
  /* Special case floating point exception registers.  */
191
15.4k
  if (reg < 4)
192
2.66k
    (*info->fprintf_func) (info->stream, "fpe%d", reg * 2 + 1);
193
12.7k
  else
194
12.7k
    (*info->fprintf_func) (info->stream, "%sR",
195
12.7k
         reg ? fp_reg_names[reg] : "fr0");
196
15.4k
}
197
198
static void
199
fput_creg (unsigned reg, disassemble_info *info)
200
62
{
201
62
  (*info->fprintf_func) (info->stream, "%s", control_reg[reg]);
202
62
}
203
204
/* Print constants with sign.  */
205
206
static void
207
fput_const (unsigned num, disassemble_info *info)
208
335k
{
209
335k
  if ((int) num < 0)
210
96.9k
    (*info->fprintf_func) (info->stream, "-%x", -num);
211
238k
  else
212
238k
    (*info->fprintf_func) (info->stream, "%x", num);
213
335k
}
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.99k
{
222
8.99k
  return GET_FIELD (word, 18, 18) << 2 | GET_FIELD (word, 16, 17);
223
8.99k
}
224
225
static int
226
extract_5_load (unsigned word)
227
44.6k
{
228
44.6k
  return low_sign_extend (word >> 16 & MASK_5, 5);
229
44.6k
}
230
231
/* Extract the immediate field from a st{bhw}s instruction.  */
232
233
static int
234
extract_5_store (unsigned word)
235
4.74k
{
236
4.74k
  return low_sign_extend (word & MASK_5, 5);
237
4.74k
}
238
239
/* Extract the immediate field from a break instruction.  */
240
241
static unsigned
242
extract_5r_store (unsigned word)
243
35.8k
{
244
35.8k
  return (word & MASK_5);
245
35.8k
}
246
247
/* Extract the immediate field from a {sr}sm instruction.  */
248
249
static unsigned
250
extract_5R_store (unsigned word)
251
12
{
252
12
  return (word >> 16 & MASK_5);
253
12
}
254
255
/* Extract the 10 bit immediate field from a {sr}sm instruction.  */
256
257
static unsigned
258
extract_10U_store (unsigned word)
259
116
{
260
116
  return (word >> 16 & MASK_10);
261
116
}
262
263
/* Extract the immediate field from a bb instruction.  */
264
265
static unsigned
266
extract_5Q_store (unsigned word)
267
4.10k
{
268
4.10k
  return (word >> 21 & MASK_5);
269
4.10k
}
270
271
/* Extract an 11 bit immediate field.  */
272
273
static int
274
extract_11 (unsigned word)
275
13.4k
{
276
13.4k
  return low_sign_extend (word & MASK_11, 11);
277
13.4k
}
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
142k
{
292
142k
  unsigned m15, m0, m1;
293
294
142k
  m0 = GET_BIT (word, 16);
295
142k
  m1 = GET_BIT (word, 17);
296
142k
  m15 = GET_BIT (word, 31);
297
142k
  word = (word >> 1) & 0x1fff;
298
142k
  word = word | (m15 << 15) | ((m15 ^ m0) << 14) | ((m15 ^ m1) << 13);
299
142k
  return sign_extend (word, 16);
300
142k
}
301
302
/* Extract a 21 bit constant.  */
303
304
static int
305
extract_21 (unsigned word)
306
19.6k
{
307
19.6k
  unsigned val;
308
309
19.6k
  word &= MASK_21;
310
19.6k
  word <<= 11;
311
19.6k
  val = GET_FIELD (word, 20, 20);
312
19.6k
  val <<= 11;
313
19.6k
  val |= GET_FIELD (word, 9, 19);
314
19.6k
  val <<= 2;
315
19.6k
  val |= GET_FIELD (word, 5, 6);
316
19.6k
  val <<= 5;
317
19.6k
  val |= GET_FIELD (word, 0, 4);
318
19.6k
  val <<= 2;
319
19.6k
  val |= GET_FIELD (word, 7, 8);
320
19.6k
  return sign_extend (val, 21) << 11;
321
19.6k
}
322
323
/* Extract a 12 bit constant from branch instructions.  */
324
325
static int
326
extract_12 (unsigned word)
327
60.9k
{
328
60.9k
  return sign_extend (GET_FIELD (word, 19, 28)
329
60.9k
          | GET_FIELD (word, 29, 29) << 10
330
60.9k
          | (word & 0x1) << 11, 12) << 2;
331
60.9k
}
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
14.1k
{
339
14.1k
  return sign_extend (GET_FIELD (word, 19, 28)
340
14.1k
          | GET_FIELD (word, 29, 29) << 10
341
14.1k
          | GET_FIELD (word, 11, 15) << 11
342
14.1k
          | (word & 0x1) << 16, 17) << 2;
343
14.1k
}
344
345
static int
346
extract_22 (unsigned word)
347
11.4k
{
348
11.4k
  return sign_extend (GET_FIELD (word, 19, 28)
349
11.4k
          | GET_FIELD (word, 29, 29) << 10
350
11.4k
          | GET_FIELD (word, 11, 15) << 11
351
11.4k
          | GET_FIELD (word, 6, 10) << 16
352
11.4k
          | (word & 0x1) << 21, 22) << 2;
353
11.4k
}
354
355
/* Print one instruction.  */
356
357
int
358
print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
359
575k
{
360
575k
  bfd_byte buffer[4];
361
575k
  unsigned int insn, i;
362
363
575k
  {
364
575k
    int status =
365
575k
      (*info->read_memory_func) (memaddr, buffer, sizeof (buffer), info);
366
575k
    if (status != 0)
367
379
      {
368
379
  (*info->memory_error_func) (status, memaddr, info);
369
379
  return -1;
370
379
      }
371
575k
  }
372
373
575k
  insn = bfd_getb32 (buffer);
374
375
206M
  for (i = 0; i < NUMOPCODES; ++i)
376
205M
    {
377
205M
      const struct pa_opcode *opcode = &pa_opcodes[i];
378
379
205M
      if ((insn & opcode->mask) == opcode->match)
380
423k
  {
381
423k
    const char *s;
382
#ifndef BFD64
383
    if (opcode->arch == pa20w)
384
      continue;
385
#endif
386
423k
    (*info->fprintf_func) (info->stream, "%s", opcode->name);
387
388
423k
    if (!strchr ("cfCY?-+nHNZFIuv{", opcode->args[0]))
389
176k
      (*info->fprintf_func) (info->stream, " ");
390
2.90M
    for (s = opcode->args; *s != '\0'; ++s)
391
2.47M
      {
392
2.47M
        switch (*s)
393
2.47M
    {
394
228k
    case 'x':
395
228k
      fput_reg (GET_FIELD (insn, 11, 15), info);
396
228k
      break;
397
1.03k
    case 'a':
398
302k
    case 'b':
399
302k
      fput_reg (GET_FIELD (insn, 6, 10), info);
400
302k
      break;
401
62
    case '^':
402
62
      fput_creg (GET_FIELD (insn, 6, 10), info);
403
62
      break;
404
51.1k
    case 't':
405
51.1k
      fput_reg (GET_FIELD (insn, 27, 31), info);
406
51.1k
      break;
407
408
      /* Handle floating point registers.  */
409
87.6k
    case 'f':
410
87.6k
      switch (*++s)
411
87.6k
        {
412
3.73k
        case 't':
413
3.73k
          fput_fp_reg (GET_FIELD (insn, 27, 31), info);
414
3.73k
          break;
415
9.14k
        case 'T':
416
9.14k
          if (GET_FIELD (insn, 25, 25))
417
2.25k
      fput_fp_reg_r (GET_FIELD (insn, 27, 31), info);
418
6.89k
          else
419
6.89k
      fput_fp_reg (GET_FIELD (insn, 27, 31), info);
420
9.14k
          break;
421
755
        case 'a':
422
755
          if (GET_FIELD (insn, 25, 25))
423
57
      fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
424
698
          else
425
698
      fput_fp_reg (GET_FIELD (insn, 6, 10), info);
426
755
          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
111
        case 'X':
433
111
          fputs_filtered (" ", info);
434
          /* FALLTHRU */
435
436
5.03k
        case 'A':
437
5.03k
          if (GET_FIELD (insn, 24, 24))
438
2.65k
      fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
439
2.37k
          else
440
2.37k
      fput_fp_reg (GET_FIELD (insn, 6, 10), info);
441
5.03k
          break;
442
648
        case 'b':
443
648
          if (GET_FIELD (insn, 25, 25))
444
0
      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
445
648
          else
446
648
      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
447
648
          break;
448
4.93k
        case 'B':
449
4.93k
          if (GET_FIELD (insn, 19, 19))
450
2.83k
      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
451
2.10k
          else
452
2.10k
      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
453
4.93k
          break;
454
4.47k
        case 'C':
455
4.47k
          {
456
4.47k
      int reg = GET_FIELD (insn, 21, 22);
457
4.47k
      reg |= GET_FIELD (insn, 16, 18) << 2;
458
4.47k
      if (GET_FIELD (insn, 23, 23) != 0)
459
2.25k
        fput_fp_reg_r (reg, info);
460
2.21k
      else
461
2.21k
        fput_fp_reg (reg, info);
462
4.47k
      break;
463
111
          }
464
7.84k
        case 'i':
465
7.84k
          {
466
7.84k
      int reg = GET_FIELD (insn, 6, 10);
467
468
7.84k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
469
7.84k
      fput_fp_reg (reg, info);
470
7.84k
      break;
471
111
          }
472
7.84k
        case 'j':
473
7.84k
          {
474
7.84k
      int reg = GET_FIELD (insn, 11, 15);
475
476
7.84k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
477
7.84k
      fput_fp_reg (reg, info);
478
7.84k
      break;
479
111
          }
480
7.84k
        case 'k':
481
7.84k
          {
482
7.84k
      int reg = GET_FIELD (insn, 27, 31);
483
484
7.84k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
485
7.84k
      fput_fp_reg (reg, info);
486
7.84k
      break;
487
111
          }
488
7.84k
        case 'l':
489
7.84k
          {
490
7.84k
      int reg = GET_FIELD (insn, 21, 25);
491
492
7.84k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
493
7.84k
      fput_fp_reg (reg, info);
494
7.84k
      break;
495
111
          }
496
7.84k
        case 'm':
497
7.84k
          {
498
7.84k
      int reg = GET_FIELD (insn, 16, 20);
499
500
7.84k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
501
7.84k
      fput_fp_reg (reg, info);
502
7.84k
      break;
503
111
          }
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
6.47k
        case 'E':
510
6.47k
          fputs_filtered (" ", info);
511
          /* FALLTHRU */
512
513
12.3k
        case 'e':
514
12.3k
          if (GET_FIELD (insn, 30, 30))
515
5.35k
      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
516
7.00k
          else
517
7.00k
      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
518
12.3k
          break;
519
7.32k
        case 'x':
520
7.32k
          fput_fp_reg (GET_FIELD (insn, 11, 15), info);
521
7.32k
          break;
522
87.6k
        }
523
87.6k
      break;
524
525
87.6k
    case '5':
526
44.6k
      fput_const (extract_5_load (insn), info);
527
44.6k
      break;
528
6.71k
    case 's':
529
6.71k
      {
530
6.71k
        int space = GET_FIELD (insn, 16, 17);
531
        /* Zero means implicit addressing, not use of sr0.  */
532
6.71k
        if (space != 0)
533
6.71k
          (*info->fprintf_func) (info->stream, "sr%d", space);
534
6.71k
      }
535
6.71k
      break;
536
537
8.99k
    case 'S':
538
8.99k
      (*info->fprintf_func) (info->stream, "sr%d",
539
8.99k
           extract_3 (insn));
540
8.99k
      break;
541
542
      /* Handle completers.  */
543
140k
    case 'c':
544
140k
      switch (*++s)
545
140k
        {
546
6.99k
        case 'x':
547
6.99k
          (*info->fprintf_func)
548
6.99k
      (info->stream, "%s",
549
6.99k
       index_compl_names[GET_COMPL (insn)]);
550
6.99k
          break;
551
5.02k
        case 'X':
552
5.02k
          (*info->fprintf_func)
553
5.02k
      (info->stream, "%s ",
554
5.02k
       index_compl_names[GET_COMPL (insn)]);
555
5.02k
          break;
556
2.44k
        case 'm':
557
2.44k
          (*info->fprintf_func)
558
2.44k
      (info->stream, "%s",
559
2.44k
       short_ldst_compl_names[GET_COMPL (insn)]);
560
2.44k
          break;
561
14.0k
        case 'M':
562
14.0k
          (*info->fprintf_func)
563
14.0k
      (info->stream, "%s ",
564
14.0k
       short_ldst_compl_names[GET_COMPL (insn)]);
565
14.0k
          break;
566
150
        case 'A':
567
150
          (*info->fprintf_func)
568
150
      (info->stream, "%s ",
569
150
       short_bytes_compl_names[GET_COMPL (insn)]);
570
150
          break;
571
326
        case 's':
572
326
          (*info->fprintf_func)
573
326
      (info->stream, "%s",
574
326
       short_bytes_compl_names[GET_COMPL (insn)]);
575
326
          break;
576
7.66k
        case 'c':
577
11.9k
        case 'C':
578
11.9k
          switch (GET_FIELD (insn, 20, 21))
579
11.9k
      {
580
3.64k
      case 1:
581
3.64k
        (*info->fprintf_func) (info->stream, ",bc ");
582
3.64k
        break;
583
2.10k
      case 2:
584
2.10k
        (*info->fprintf_func) (info->stream, ",sl ");
585
2.10k
        break;
586
6.21k
      default:
587
6.21k
        (*info->fprintf_func) (info->stream, " ");
588
11.9k
      }
589
11.9k
          break;
590
11.9k
        case 'd':
591
400
          switch (GET_FIELD (insn, 20, 21))
592
400
      {
593
106
      case 1:
594
106
        (*info->fprintf_func) (info->stream, ",co ");
595
106
        break;
596
294
      default:
597
294
        (*info->fprintf_func) (info->stream, " ");
598
400
      }
599
400
          break;
600
2.60k
        case 'o':
601
2.60k
          (*info->fprintf_func) (info->stream, ",o");
602
2.60k
          break;
603
268
        case 'g':
604
268
          (*info->fprintf_func) (info->stream, ",gate");
605
268
          break;
606
211
        case 'p':
607
211
          (*info->fprintf_func) (info->stream, ",l,push");
608
211
          break;
609
0
        case 'P':
610
0
          (*info->fprintf_func) (info->stream, ",pop");
611
0
          break;
612
20.6k
        case 'l':
613
20.7k
        case 'L':
614
20.7k
          (*info->fprintf_func) (info->stream, ",l");
615
20.7k
          break;
616
52
        case 'w':
617
52
          (*info->fprintf_func)
618
52
      (info->stream, "%s ",
619
52
       read_write_names[GET_FIELD (insn, 25, 25)]);
620
52
          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
15
      (*info->fprintf_func) (info->stream, ",r");
627
89
          break;
628
351
        case 'Z':
629
351
          if (GET_FIELD (insn, 26, 26))
630
54
      (*info->fprintf_func) (info->stream, ",m ");
631
297
          else
632
297
      (*info->fprintf_func) (info->stream, " ");
633
351
          break;
634
34
        case 'i':
635
34
          if (GET_FIELD (insn, 25, 25))
636
11
      (*info->fprintf_func) (info->stream, ",i");
637
34
          break;
638
8.67k
        case 'z':
639
8.67k
          if (!GET_FIELD (insn, 21, 21))
640
4.99k
      (*info->fprintf_func) (info->stream, ",z");
641
8.67k
          break;
642
4.52k
        case 'a':
643
4.52k
          (*info->fprintf_func)
644
4.52k
      (info->stream, "%s",
645
4.52k
       add_compl_names[GET_FIELD (insn, 20, 21)]);
646
4.52k
          break;
647
152
        case 'Y':
648
152
          (*info->fprintf_func)
649
152
      (info->stream, ",dc%s",
650
152
       add_compl_names[GET_FIELD (insn, 20, 21)]);
651
152
          break;
652
459
        case 'y':
653
459
          (*info->fprintf_func)
654
459
      (info->stream, ",c%s",
655
459
       add_compl_names[GET_FIELD (insn, 20, 21)]);
656
459
          break;
657
6.47k
        case 'v':
658
6.47k
          if (GET_FIELD (insn, 20, 20))
659
1.70k
      (*info->fprintf_func) (info->stream, ",tsv");
660
6.47k
          break;
661
2.28k
        case 't':
662
2.28k
          (*info->fprintf_func) (info->stream, ",tc");
663
2.28k
          if (GET_FIELD (insn, 20, 20))
664
584
      (*info->fprintf_func) (info->stream, ",tsv");
665
2.28k
          break;
666
99
        case 'B':
667
99
          (*info->fprintf_func) (info->stream, ",db");
668
99
          if (GET_FIELD (insn, 20, 20))
669
64
      (*info->fprintf_func) (info->stream, ",tsv");
670
99
          break;
671
180
        case 'b':
672
180
          (*info->fprintf_func) (info->stream, ",b");
673
180
          if (GET_FIELD (insn, 20, 20))
674
48
      (*info->fprintf_func) (info->stream, ",tsv");
675
180
          break;
676
1.13k
        case 'T':
677
1.13k
          if (GET_FIELD (insn, 25, 25))
678
484
      (*info->fprintf_func) (info->stream, ",tc");
679
1.13k
          break;
680
6.51k
        case 'S':
681
          /* EXTRD/W has a following condition.  */
682
6.51k
          if (*(s + 1) == '?')
683
6.49k
      (*info->fprintf_func)
684
6.49k
        (info->stream, "%s",
685
6.49k
         signed_unsigned_names[GET_FIELD (insn, 21, 21)]);
686
11
          else
687
11
      (*info->fprintf_func)
688
11
        (info->stream, "%s ",
689
11
         signed_unsigned_names[GET_FIELD (insn, 21, 21)]);
690
6.51k
          break;
691
42
        case 'h':
692
42
          (*info->fprintf_func)
693
42
      (info->stream, "%s",
694
42
       mix_half_names[GET_FIELD (insn, 17, 17)]);
695
42
          break;
696
141
        case 'H':
697
141
          (*info->fprintf_func)
698
141
      (info->stream, "%s ",
699
141
       saturation_names[GET_FIELD (insn, 24, 25)]);
700
141
          break;
701
1.03k
        case '*':
702
1.03k
          (*info->fprintf_func)
703
1.03k
      (info->stream, ",%d%d%d%d ",
704
1.03k
       GET_FIELD (insn, 17, 18), GET_FIELD (insn, 20, 21),
705
1.03k
       GET_FIELD (insn, 22, 23), GET_FIELD (insn, 24, 25));
706
1.03k
          break;
707
708
17.2k
        case 'q':
709
17.2k
          {
710
17.2k
      int m, a;
711
712
17.2k
      m = GET_FIELD (insn, 28, 28);
713
17.2k
      a = GET_FIELD (insn, 29, 29);
714
715
17.2k
      if (m && !a)
716
2.59k
        fputs_filtered (",ma ", info);
717
14.6k
      else if (m && a)
718
2.67k
        fputs_filtered (",mb ", info);
719
12.0k
      else
720
12.0k
        fputs_filtered (" ", info);
721
17.2k
      break;
722
20.6k
          }
723
724
8.63k
        case 'J':
725
8.63k
          {
726
8.63k
      int opc = GET_FIELD (insn, 0, 5);
727
728
8.63k
      if (opc == 0x16 || opc == 0x1e)
729
8.63k
        {
730
8.63k
          if (GET_FIELD (insn, 29, 29) == 0)
731
5.81k
            fputs_filtered (",ma ", info);
732
2.81k
          else
733
2.81k
            fputs_filtered (",mb ", info);
734
8.63k
        }
735
0
      else
736
0
        fputs_filtered (" ", info);
737
8.63k
      break;
738
20.6k
          }
739
740
17.2k
        case 'e':
741
17.2k
          {
742
17.2k
      int opc = GET_FIELD (insn, 0, 5);
743
744
17.2k
      if (opc == 0x13 || opc == 0x1b)
745
14.4k
        {
746
14.4k
          if (GET_FIELD (insn, 18, 18) == 1)
747
8.33k
            fputs_filtered (",mb ", info);
748
6.12k
          else
749
6.12k
            fputs_filtered (",ma ", info);
750
14.4k
        }
751
2.76k
      else if (opc == 0x17 || opc == 0x1f)
752
2.76k
        {
753
2.76k
          if (GET_FIELD (insn, 31, 31) == 1)
754
1.28k
            fputs_filtered (",ma ", info);
755
1.48k
          else
756
1.48k
            fputs_filtered (",mb ", info);
757
2.76k
        }
758
0
      else
759
0
        fputs_filtered (" ", info);
760
761
17.2k
      break;
762
20.6k
          }
763
140k
        }
764
140k
      break;
765
766
      /* Handle conditions.  */
767
140k
    case '?':
768
103k
      {
769
103k
        s++;
770
103k
        switch (*s)
771
103k
          {
772
706
          case 'f':
773
706
      (*info->fprintf_func)
774
706
        (info->stream, "%s ",
775
706
         float_comp_names[GET_FIELD (insn, 27, 31)]);
776
706
      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
25.8k
          case 'n':
787
25.8k
      fputs_filtered
788
25.8k
        (compare_cond_names[GET_FIELD (insn, 16, 18)
789
25.8k
                + GET_FIELD (insn, 4, 4) * 8],
790
25.8k
         info);
791
25.8k
      break;
792
5.91k
          case 'N':
793
5.91k
      fputs_filtered
794
5.91k
        (compare_cond_64_names[GET_FIELD (insn, 16, 18)
795
5.91k
             + GET_FIELD (insn, 2, 2) * 8],
796
5.91k
         info);
797
5.91k
      break;
798
4.02k
          case 'Q':
799
4.02k
      fputs_filtered
800
4.02k
        (cmpib_cond_64_names[GET_FIELD (insn, 16, 18)],
801
4.02k
         info);
802
4.02k
      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
8.17k
          case 's':
810
8.17k
      (*info->fprintf_func)
811
8.17k
        (info->stream, "%s ",
812
8.17k
         compare_cond_names[GET_COND (insn)]);
813
8.17k
      break;
814
2.15k
          case 'S':
815
2.15k
      (*info->fprintf_func)
816
2.15k
        (info->stream, "%s ",
817
2.15k
         compare_cond_64_names[GET_COND (insn)]);
818
2.15k
      break;
819
7.18k
          case 'a':
820
7.18k
      (*info->fprintf_func)
821
7.18k
        (info->stream, "%s ",
822
7.18k
         add_cond_names[GET_COND (insn)]);
823
7.18k
      break;
824
3.02k
          case 'A':
825
3.02k
      (*info->fprintf_func)
826
3.02k
        (info->stream, "%s ",
827
3.02k
         add_cond_64_names[GET_COND (insn)]);
828
3.02k
      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
14.3k
          case 'W':
836
14.3k
      (*info->fprintf_func)
837
14.3k
        (info->stream, "%s",
838
14.3k
         wide_add_cond_names[GET_FIELD (insn, 16, 18) +
839
14.3k
                 GET_FIELD (insn, 4, 4) * 8]);
840
14.3k
      break;
841
842
3.17k
          case 'l':
843
3.17k
      (*info->fprintf_func)
844
3.17k
        (info->stream, "%s ",
845
3.17k
         logical_cond_names[GET_COND (insn)]);
846
3.17k
      break;
847
964
          case 'L':
848
964
      (*info->fprintf_func)
849
964
        (info->stream, "%s ",
850
964
         logical_cond_64_names[GET_COND (insn)]);
851
964
      break;
852
458
          case 'u':
853
458
      (*info->fprintf_func)
854
458
        (info->stream, "%s ",
855
458
         unit_cond_names[GET_COND (insn)]);
856
458
      break;
857
833
          case 'U':
858
833
      (*info->fprintf_func)
859
833
        (info->stream, "%s ",
860
833
         unit_cond_64_names[GET_COND (insn)]);
861
833
      break;
862
6.58k
          case 'y':
863
11.6k
          case 'x':
864
15.3k
          case 'b':
865
15.3k
      (*info->fprintf_func)
866
15.3k
        (info->stream, "%s",
867
15.3k
         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
15.3k
      if (s[1] != 'n')
872
5.11k
        (*info->fprintf_func) (info->stream, " ");
873
15.3k
      break;
874
10.8k
          case 'X':
875
10.8k
      (*info->fprintf_func)
876
10.8k
        (info->stream, "%s ",
877
10.8k
         shift_cond_64_names[GET_FIELD (insn, 16, 18)]);
878
10.8k
      break;
879
536
          case 'B':
880
536
      (*info->fprintf_func)
881
536
        (info->stream, "%s",
882
536
         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
536
      if (s[1] != 'n')
887
0
        (*info->fprintf_func) (info->stream, " ");
888
536
      break;
889
103k
          }
890
103k
        break;
891
103k
      }
892
893
103k
    case 'V':
894
4.74k
      fput_const (extract_5_store (insn), info);
895
4.74k
      break;
896
35.8k
    case 'r':
897
35.8k
      fput_const (extract_5r_store (insn), info);
898
35.8k
      break;
899
12
    case 'R':
900
12
      fput_const (extract_5R_store (insn), info);
901
12
      break;
902
116
    case 'U':
903
116
      fput_const (extract_10U_store (insn), info);
904
116
      break;
905
520
    case 'B':
906
4.10k
    case 'Q':
907
4.10k
      fput_const (extract_5Q_store (insn), info);
908
4.10k
      break;
909
13.4k
    case 'i':
910
13.4k
      fput_const (extract_11 (insn), info);
911
13.4k
      break;
912
0
    case 'j':
913
0
      fput_const (extract_14 (insn), info);
914
0
      break;
915
19.6k
    case 'k':
916
19.6k
      fputs_filtered ("L%", info);
917
19.6k
      fput_const (extract_21 (insn), info);
918
19.6k
      break;
919
14.4k
    case '<':
920
110k
    case 'l':
921
      /* 16-bit long disp., PA2.0 wide only.  */
922
110k
      fput_const (extract_16 (insn), info);
923
110k
      break;
924
88.6k
    case 'n':
925
88.6k
      if (insn & 0x2)
926
30.4k
        (*info->fprintf_func) (info->stream, ",n ");
927
58.2k
      else
928
58.2k
        (*info->fprintf_func) (info->stream, " ");
929
88.6k
      break;
930
20.1k
    case 'N':
931
20.1k
      if ((insn & 0x20) && s[1])
932
2.43k
        (*info->fprintf_func) (info->stream, ",n ");
933
17.7k
      else if (insn & 0x20)
934
7.98k
        (*info->fprintf_func) (info->stream, ",n");
935
9.74k
      else if (s[1])
936
2.31k
        (*info->fprintf_func) (info->stream, " ");
937
20.1k
      break;
938
60.9k
    case 'w':
939
60.9k
      (*info->print_address_func)
940
60.9k
        (memaddr + 8 + extract_12 (insn), info);
941
60.9k
      break;
942
6.57k
    case 'W':
943
      /* 17 bit PC-relative branch.  */
944
6.57k
      (*info->print_address_func)
945
6.57k
        ((memaddr + 8 + extract_17 (insn)), info);
946
6.57k
      break;
947
7.57k
    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
7.57k
      fput_const (extract_17 (insn), info);
952
7.57k
      break;
953
954
9.25k
    case 'Z':
955
      /* addil %r1 implicit output.  */
956
9.25k
      fputs_filtered ("r1", info);
957
9.25k
      break;
958
959
3.19k
    case 'Y':
960
      /* be,l %sr0,%r31 implicit output.  */
961
3.19k
      fputs_filtered ("sr0,r31", info);
962
3.19k
      break;
963
964
2.60k
    case '@':
965
2.60k
      (*info->fprintf_func) (info->stream, "0");
966
2.60k
      break;
967
968
1.30k
    case '.':
969
1.30k
      (*info->fprintf_func) (info->stream, "%d",
970
1.30k
           GET_FIELD (insn, 24, 25));
971
1.30k
      break;
972
11
    case '*':
973
11
      (*info->fprintf_func) (info->stream, "%d",
974
11
           GET_FIELD (insn, 22, 25));
975
11
      break;
976
773
    case '!':
977
773
      fputs_filtered ("sar", info);
978
773
      break;
979
2.03k
    case 'p':
980
2.03k
      (*info->fprintf_func) (info->stream, "%d",
981
2.03k
           31 - GET_FIELD (insn, 22, 26));
982
2.03k
      break;
983
6.97k
    case '~':
984
6.97k
      {
985
6.97k
        int num;
986
6.97k
        num = GET_FIELD (insn, 20, 20) << 5;
987
6.97k
        num |= GET_FIELD (insn, 22, 26);
988
6.97k
        (*info->fprintf_func) (info->stream, "%d", 63 - num);
989
6.97k
        break;
990
14.4k
      }
991
2.63k
    case 'P':
992
2.63k
      (*info->fprintf_func) (info->stream, "%d",
993
2.63k
           GET_FIELD (insn, 22, 26));
994
2.63k
      break;
995
3.71k
    case 'q':
996
3.71k
      {
997
3.71k
        int num;
998
3.71k
        num = GET_FIELD (insn, 20, 20) << 5;
999
3.71k
        num |= GET_FIELD (insn, 22, 26);
1000
3.71k
        (*info->fprintf_func) (info->stream, "%d", num);
1001
3.71k
        break;
1002
14.4k
      }
1003
4.75k
    case 'T':
1004
4.75k
      (*info->fprintf_func) (info->stream, "%d",
1005
4.75k
           32 - GET_FIELD (insn, 27, 31));
1006
4.75k
      break;
1007
182
    case '%':
1008
182
      {
1009
182
        int num;
1010
182
        num = (GET_FIELD (insn, 23, 23) + 1) * 32;
1011
182
        num -= GET_FIELD (insn, 27, 31);
1012
182
        (*info->fprintf_func) (info->stream, "%d", num);
1013
182
        break;
1014
14.4k
      }
1015
10.2k
    case '|':
1016
10.2k
      {
1017
10.2k
        int num;
1018
10.2k
        num = (GET_FIELD (insn, 19, 19) + 1) * 32;
1019
10.2k
        num -= GET_FIELD (insn, 27, 31);
1020
10.2k
        (*info->fprintf_func) (info->stream, "%d", num);
1021
10.2k
        break;
1022
14.4k
      }
1023
0
    case '$':
1024
0
      fput_const (GET_FIELD (insn, 20, 28), info);
1025
0
      break;
1026
35.8k
    case 'A':
1027
35.8k
      fput_const (GET_FIELD (insn, 6, 18), info);
1028
35.8k
      break;
1029
7.08k
    case 'D':
1030
7.08k
      fput_const (GET_FIELD (insn, 6, 31), info);
1031
7.08k
      break;
1032
11.4k
    case 'v':
1033
11.4k
      (*info->fprintf_func) (info->stream, ",%d",
1034
11.4k
           GET_FIELD (insn, 23, 25));
1035
11.4k
      break;
1036
6.68k
    case 'O':
1037
6.68k
      fput_const ((GET_FIELD (insn, 6,20) << 5 |
1038
6.68k
             GET_FIELD (insn, 27, 31)), info);
1039
6.68k
      break;
1040
2.40k
    case 'o':
1041
2.40k
      fput_const (GET_FIELD (insn, 6, 20), info);
1042
2.40k
      break;
1043
8.73k
    case '2':
1044
8.73k
      fput_const ((GET_FIELD (insn, 6, 22) << 5 |
1045
8.73k
             GET_FIELD (insn, 27, 31)), info);
1046
8.73k
      break;
1047
981
    case '1':
1048
981
      fput_const ((GET_FIELD (insn, 11, 20) << 5 |
1049
981
             GET_FIELD (insn, 27, 31)), info);
1050
981
      break;
1051
1.36k
    case '0':
1052
1.36k
      fput_const ((GET_FIELD (insn, 16, 20) << 5 |
1053
1.36k
             GET_FIELD (insn, 27, 31)), info);
1054
1.36k
      break;
1055
16.0k
    case 'u':
1056
16.0k
      (*info->fprintf_func) (info->stream, ",%d",
1057
16.0k
           GET_FIELD (insn, 23, 25));
1058
16.0k
      break;
1059
791
    case 'F':
1060
      /* If no destination completer and not before a completer
1061
         for fcmp, need a space here.  */
1062
791
      if (s[1] == 'G' || s[1] == '?')
1063
617
        fputs_filtered
1064
791
          (float_format_names[GET_FIELD (insn, 19, 20)], info);
1065
174
      else
1066
174
        (*info->fprintf_func)
1067
174
          (info->stream, "%s ",
1068
174
           float_format_names[GET_FIELD (insn, 19, 20)]);
1069
791
      break;
1070
106
    case 'G':
1071
106
      (*info->fprintf_func)
1072
106
        (info->stream, "%s ",
1073
106
         float_format_names[GET_FIELD (insn, 17, 18)]);
1074
106
      break;
1075
7.84k
    case 'H':
1076
7.84k
      if (GET_FIELD (insn, 26, 26) == 1)
1077
2.35k
        (*info->fprintf_func) (info->stream, "%s ",
1078
2.35k
             float_format_names[0]);
1079
5.49k
      else
1080
5.49k
        (*info->fprintf_func) (info->stream, "%s ",
1081
5.49k
             float_format_names[1]);
1082
7.84k
      break;
1083
4.81k
    case 'I':
1084
      /* If no destination completer and not before a completer
1085
         for fcmp, need a space here.  */
1086
4.81k
      if (s[1] == '?')
1087
195
        fputs_filtered
1088
4.81k
          (float_format_names[GET_FIELD (insn, 20, 20)], info);
1089
4.62k
      else
1090
4.62k
        (*info->fprintf_func)
1091
4.62k
          (info->stream, "%s ",
1092
4.62k
           float_format_names[GET_FIELD (insn, 20, 20)]);
1093
4.81k
      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.76k
    case '>':
1132
15.1k
    case 'y':
1133
15.1k
      {
1134
        /* 16-bit long disp., PA2.0 wide only.  */
1135
15.1k
        int disp = extract_16 (insn);
1136
15.1k
        disp &= ~3;
1137
15.1k
        fput_const (disp, info);
1138
15.1k
        break;
1139
2.76k
      }
1140
1141
17.2k
    case '&':
1142
17.2k
      {
1143
        /* 16-bit long disp., PA2.0 wide only.  */
1144
17.2k
        int disp = extract_16 (insn);
1145
17.2k
        disp &= ~7;
1146
17.2k
        fput_const (disp, info);
1147
17.2k
        break;
1148
2.76k
      }
1149
1150
67
    case '_':
1151
67
      break; /* Dealt with by '{' */
1152
1153
67
    case '{':
1154
67
      {
1155
67
        int sub = GET_FIELD (insn, 14, 16);
1156
67
        int df = GET_FIELD (insn, 17, 18);
1157
67
        int sf = GET_FIELD (insn, 19, 20);
1158
67
        const char * const * source = float_format_names;
1159
67
        const char * const * dest = float_format_names;
1160
67
        char *t = "";
1161
1162
67
        if (sub == 4)
1163
53
          {
1164
53
      fputs_filtered (",UND ", info);
1165
53
      break;
1166
53
          }
1167
14
        if ((sub & 3) == 3)
1168
1
          t = ",t";
1169
14
        if ((sub & 3) == 1)
1170
9
          source = sub & 4 ? fcnv_ufixed_names : fcnv_fixed_names;
1171
14
        if (sub & 2)
1172
5
          dest = sub & 4 ? fcnv_ufixed_names : fcnv_fixed_names;
1173
1174
14
        (*info->fprintf_func) (info->stream, "%s%s%s ",
1175
14
             t, source[sf], dest[df]);
1176
14
        break;
1177
67
      }
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
324
    case 'h':
1189
324
      {
1190
324
        int cbit;
1191
1192
324
        cbit = GET_FIELD (insn, 16, 18);
1193
1194
324
        if (cbit > 0)
1195
324
          (*info->fprintf_func) (info->stream, ",%d", cbit - 1);
1196
324
        break;
1197
67
      }
1198
1199
157
    case '=':
1200
157
      {
1201
157
        int cond = GET_FIELD (insn, 27, 31);
1202
1203
157
        switch (cond)
1204
157
          {
1205
0
          case  0: fputs_filtered (" ", info); break;
1206
20
          case  1: fputs_filtered ("acc ", info); break;
1207
13
          case  2: fputs_filtered ("rej ", info); break;
1208
14
          case  5: fputs_filtered ("acc8 ", info); break;
1209
35
          case  6: fputs_filtered ("rej8 ", info); break;
1210
15
          case  9: fputs_filtered ("acc6 ", info); break;
1211
0
          case 13: fputs_filtered ("acc4 ", info); break;
1212
11
          case 17: fputs_filtered ("acc2 ", info); break;
1213
49
          default: break;
1214
157
          }
1215
157
        break;
1216
157
      }
1217
1218
11.4k
    case 'X':
1219
11.4k
      (*info->print_address_func)
1220
11.4k
        (memaddr + 8 + extract_22 (insn), info);
1221
11.4k
      break;
1222
11.4k
    case 'L':
1223
11.4k
      fputs_filtered (",rp", info);
1224
11.4k
      break;
1225
922k
    default:
1226
922k
      (*info->fprintf_func) (info->stream, "%c", *s);
1227
922k
      break;
1228
2.47M
    }
1229
2.47M
      }
1230
423k
    return sizeof (insn);
1231
423k
  }
1232
205M
    }
1233
151k
  (*info->fprintf_func) (info->stream, "#%8x", insn);
1234
151k
  return sizeof (insn);
1235
575k
}