Coverage Report

Created: 2026-04-04 08:16

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