Coverage Report

Created: 2026-10-02 09:53

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