Coverage Report

Created: 2026-07-25 10:20

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
129k
#define MASK_5  0x1f
55
67
#define MASK_10 0x3ff
56
17.8k
#define MASK_11 0x7ff
57
0
#define MASK_14 0x3fff
58
#define MASK_16 0xffff
59
17.1k
#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
2.09M
  ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
65
66
#define GET_BIT(X, WHICH) \
67
334k
  GET_FIELD (X, WHICH, WHICH)
68
69
/* Some of these have been converted to 2-d arrays because they
70
   consume less storage this way.  If the maintenance becomes a
71
   problem, convert them back to const 1-d pointer arrays.  */
72
static const char *const control_reg[] =
73
{
74
  "rctr", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7",
75
  "pidr1", "pidr2", "ccr", "sar", "pidr3", "pidr4",
76
  "iva", "eiem", "itmr", "pcsq", "pcoq", "iir", "isr",
77
  "ior", "ipsw", "eirr", "tr0", "tr1", "tr2", "tr3",
78
  "tr4", "tr5", "tr6", "tr7"
79
};
80
81
static const char *const compare_cond_names[] =
82
{
83
  "", ",=", ",<", ",<=", ",<<", ",<<=", ",sv", ",od",
84
  ",tr", ",<>", ",>=", ",>", ",>>=", ",>>", ",nsv", ",ev"
85
};
86
static const char *const compare_cond_64_names[] =
87
{
88
  ",*", ",*=", ",*<", ",*<=", ",*<<", ",*<<=", ",*sv", ",*od",
89
  ",*tr", ",*<>", ",*>=", ",*>", ",*>>=", ",*>>", ",*nsv", ",*ev"
90
};
91
static const char *const cmpib_cond_64_names[] =
92
{
93
  ",*<<", ",*=", ",*<", ",*<=", ",*>>=", ",*<>", ",*>=", ",*>"
94
};
95
static const char *const add_cond_names[] =
96
{
97
  "", ",=", ",<", ",<=", ",nuv", ",znv", ",sv", ",od",
98
  ",tr", ",<>", ",>=", ",>", ",uv", ",vnz", ",nsv", ",ev"
99
};
100
static const char *const add_cond_64_names[] =
101
{
102
  ",*", ",*=", ",*<", ",*<=", ",*nuv", ",*znv", ",*sv", ",*od",
103
  ",*tr", ",*<>", ",*>=", ",*>", ",*uv", ",*vnz", ",*nsv", ",*ev"
104
};
105
static const char *const wide_add_cond_names[] =
106
{
107
  "", ",=", ",<", ",<=", ",nuv", ",*=", ",*<", ",*<=",
108
  ",tr", ",<>", ",>=", ",>", ",uv", ",*<>", ",*>=", ",*>"
109
};
110
static const char *const logical_cond_names[] =
111
{
112
  "", ",=", ",<", ",<=", 0, 0, 0, ",od",
113
  ",tr", ",<>", ",>=", ",>", 0, 0, 0, ",ev"};
114
static const char *const logical_cond_64_names[] =
115
{
116
  ",*", ",*=", ",*<", ",*<=", 0, 0, 0, ",*od",
117
  ",*tr", ",*<>", ",*>=", ",*>", 0, 0, 0, ",*ev"};
118
static const char *const unit_cond_names[] =
119
{
120
  "", ",swz", ",sbz", ",shz", ",sdc", ",swc", ",sbc", ",shc",
121
  ",tr", ",nwz", ",nbz", ",nhz", ",ndc", ",nwc", ",nbc", ",nhc"
122
};
123
static const char *const unit_cond_64_names[] =
124
{
125
  ",*", ",*swz", ",*sbz", ",*shz", ",*sdc", ",*swc", ",*sbc", ",*shc",
126
  ",*tr", ",*nwz", ",*nbz", ",*nhz", ",*ndc", ",*nwc", ",*nbc", ",*nhc"
127
};
128
static const char *const shift_cond_names[] =
129
{
130
  "", ",=", ",<", ",od", ",tr", ",<>", ",>=", ",ev"
131
};
132
static const char *const shift_cond_64_names[] =
133
{
134
  ",*", ",*=", ",*<", ",*od", ",*tr", ",*<>", ",*>=", ",*ev"
135
};
136
static const char *const bb_cond_64_names[] =
137
{
138
  ",*<", ",*>="
139
};
140
static const char *const index_compl_names[] = {"", ",m", ",s", ",sm"};
141
static const char *const short_ldst_compl_names[] = {"", ",ma", "", ",mb"};
142
static const char *const short_bytes_compl_names[] =
143
{
144
  "", ",b,m", ",e", ",e,m"
145
};
146
static const char *const float_format_names[] = {",sgl", ",dbl", "", ",quad"};
147
static const char *const fcnv_fixed_names[] = {",w", ",dw", "", ",qw"};
148
static const char *const fcnv_ufixed_names[] = {",uw", ",udw", "", ",uqw"};
149
static const char *const float_comp_names[] =
150
{
151
  ",false?", ",false", ",?", ",!<=>", ",=", ",=t", ",?=", ",!<>",
152
  ",!?>=", ",<", ",?<", ",!>=", ",!?>", ",<=", ",?<=", ",!>",
153
  ",!?<=", ",>", ",?>", ",!<=", ",!?<", ",>=", ",?>=", ",!<",
154
  ",!?=", ",<>", ",!=", ",!=t", ",!?", ",<=>", ",true?", ",true"
155
};
156
static const char *const signed_unsigned_names[] = {",u", ",s"};
157
static const char *const mix_half_names[] = {",l", ",r"};
158
static const char *const saturation_names[] = {",us", ",ss", 0, ""};
159
static const char *const read_write_names[] = {",r", ",w"};
160
static const char *const add_compl_names[] = { 0, "", ",l", ",tsv" };
161
162
/* For a bunch of different instructions form an index into a
163
   completer name table.  */
164
26.5k
#define GET_COMPL(insn) (GET_FIELD (insn, 26, 26) | \
165
26.5k
       GET_FIELD (insn, 18, 18) << 1)
166
167
31.2k
#define GET_COND(insn) (GET_FIELD ((insn), 16, 18) + \
168
31.2k
      (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
133k
#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
551k
{
178
551k
  (*info->fprintf_func) (info->stream, "%s", reg ? reg_names[reg] : "r0");
179
551k
}
180
181
static void
182
fput_fp_reg (unsigned reg, disassemble_info *info)
183
107k
{
184
107k
  (*info->fprintf_func) (info->stream, "%s", reg ? fp_reg_names[reg] : "fr0");
185
107k
}
186
187
static void
188
fput_fp_reg_r (unsigned reg, disassemble_info *info)
189
30.1k
{
190
  /* Special case floating point exception registers.  */
191
30.1k
  if (reg < 4)
192
4.62k
    (*info->fprintf_func) (info->stream, "fpe%d", reg * 2 + 1);
193
25.5k
  else
194
25.5k
    (*info->fprintf_func) (info->stream, "%sR",
195
25.5k
         reg ? fp_reg_names[reg] : "fr0");
196
30.1k
}
197
198
static void
199
fput_creg (unsigned reg, disassemble_info *info)
200
109
{
201
109
  (*info->fprintf_func) (info->stream, "%s", control_reg[reg]);
202
109
}
203
204
/* Print constants with sign.  */
205
206
static void
207
fput_const (unsigned num, disassemble_info *info)
208
410k
{
209
410k
  if ((int) num < 0)
210
83.2k
    (*info->fprintf_func) (info->stream, "-%x", -num);
211
326k
  else
212
326k
    (*info->fprintf_func) (info->stream, "%x", num);
213
410k
}
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
18.5k
{
222
18.5k
  return GET_FIELD (word, 18, 18) << 2 | GET_FIELD (word, 16, 17);
223
18.5k
}
224
225
static int
226
extract_5_load (unsigned word)
227
36.3k
{
228
36.3k
  return low_sign_extend (word >> 16 & MASK_5, 5);
229
36.3k
}
230
231
/* Extract the immediate field from a st{bhw}s instruction.  */
232
233
static int
234
extract_5_store (unsigned word)
235
1.61k
{
236
1.61k
  return low_sign_extend (word & MASK_5, 5);
237
1.61k
}
238
239
/* Extract the immediate field from a break instruction.  */
240
241
static unsigned
242
extract_5r_store (unsigned word)
243
85.5k
{
244
85.5k
  return (word & MASK_5);
245
85.5k
}
246
247
/* Extract the immediate field from a {sr}sm instruction.  */
248
249
static unsigned
250
extract_5R_store (unsigned word)
251
108
{
252
108
  return (word >> 16 & MASK_5);
253
108
}
254
255
/* Extract the 10 bit immediate field from a {sr}sm instruction.  */
256
257
static unsigned
258
extract_10U_store (unsigned word)
259
67
{
260
67
  return (word >> 16 & MASK_10);
261
67
}
262
263
/* Extract the immediate field from a bb instruction.  */
264
265
static unsigned
266
extract_5Q_store (unsigned word)
267
6.07k
{
268
6.07k
  return (word >> 21 & MASK_5);
269
6.07k
}
270
271
/* Extract an 11 bit immediate field.  */
272
273
static int
274
extract_11 (unsigned word)
275
17.8k
{
276
17.8k
  return low_sign_extend (word & MASK_11, 11);
277
17.8k
}
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
111k
{
292
111k
  unsigned m15, m0, m1;
293
294
111k
  m0 = GET_BIT (word, 16);
295
111k
  m1 = GET_BIT (word, 17);
296
111k
  m15 = GET_BIT (word, 31);
297
111k
  word = (word >> 1) & 0x1fff;
298
111k
  word = word | (m15 << 15) | ((m15 ^ m0) << 14) | ((m15 ^ m1) << 13);
299
111k
  return sign_extend (word, 16);
300
111k
}
301
302
/* Extract a 21 bit constant.  */
303
304
static int
305
extract_21 (unsigned word)
306
17.1k
{
307
17.1k
  unsigned val;
308
309
17.1k
  word &= MASK_21;
310
17.1k
  word <<= 11;
311
17.1k
  val = GET_FIELD (word, 20, 20);
312
17.1k
  val <<= 11;
313
17.1k
  val |= GET_FIELD (word, 9, 19);
314
17.1k
  val <<= 2;
315
17.1k
  val |= GET_FIELD (word, 5, 6);
316
17.1k
  val <<= 5;
317
17.1k
  val |= GET_FIELD (word, 0, 4);
318
17.1k
  val <<= 2;
319
17.1k
  val |= GET_FIELD (word, 7, 8);
320
17.1k
  return sign_extend (val, 21) << 11;
321
17.1k
}
322
323
/* Extract a 12 bit constant from branch instructions.  */
324
325
static int
326
extract_12 (unsigned word)
327
71.8k
{
328
71.8k
  return sign_extend (GET_FIELD (word, 19, 28)
329
71.8k
          | GET_FIELD (word, 29, 29) << 10
330
71.8k
          | (word & 0x1) << 11, 12) << 2;
331
71.8k
}
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
12.2k
{
339
12.2k
  return sign_extend (GET_FIELD (word, 19, 28)
340
12.2k
          | GET_FIELD (word, 29, 29) << 10
341
12.2k
          | GET_FIELD (word, 11, 15) << 11
342
12.2k
          | (word & 0x1) << 16, 17) << 2;
343
12.2k
}
344
345
static int
346
extract_22 (unsigned word)
347
1.11k
{
348
1.11k
  return sign_extend (GET_FIELD (word, 19, 28)
349
1.11k
          | GET_FIELD (word, 29, 29) << 10
350
1.11k
          | GET_FIELD (word, 11, 15) << 11
351
1.11k
          | GET_FIELD (word, 6, 10) << 16
352
1.11k
          | (word & 0x1) << 21, 22) << 2;
353
1.11k
}
354
355
/* Print one instruction.  */
356
357
int
358
print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
359
736k
{
360
736k
  bfd_byte buffer[4];
361
736k
  unsigned int insn, i;
362
363
736k
  {
364
736k
    int status =
365
736k
      (*info->read_memory_func) (memaddr, buffer, sizeof (buffer), info);
366
736k
    if (status != 0)
367
1.48k
      {
368
1.48k
  (*info->memory_error_func) (status, memaddr, info);
369
1.48k
  return -1;
370
1.48k
      }
371
736k
  }
372
373
735k
  insn = bfd_getb32 (buffer);
374
375
322M
  for (i = 0; i < NUMOPCODES; ++i)
376
322M
    {
377
322M
      const struct pa_opcode *opcode = &pa_opcodes[i];
378
379
322M
      if ((insn & opcode->mask) == opcode->match)
380
491k
  {
381
491k
    const char *s;
382
#ifndef BFD64
383
    if (opcode->arch == pa20w)
384
      continue;
385
#endif
386
491k
    (*info->fprintf_func) (info->stream, "%s", opcode->name);
387
388
491k
    if (!strchr ("cfCY?-+nHNZFIuv{", opcode->args[0]))
389
182k
      (*info->fprintf_func) (info->stream, " ");
390
3.18M
    for (s = opcode->args; *s != '\0'; ++s)
391
2.69M
      {
392
2.69M
        switch (*s)
393
2.69M
    {
394
210k
    case 'x':
395
210k
      fput_reg (GET_FIELD (insn, 11, 15), info);
396
210k
      break;
397
1.92k
    case 'a':
398
300k
    case 'b':
399
300k
      fput_reg (GET_FIELD (insn, 6, 10), info);
400
300k
      break;
401
109
    case '^':
402
109
      fput_creg (GET_FIELD (insn, 6, 10), info);
403
109
      break;
404
41.1k
    case 't':
405
41.1k
      fput_reg (GET_FIELD (insn, 27, 31), info);
406
41.1k
      break;
407
408
      /* Handle floating point registers.  */
409
137k
    case 'f':
410
137k
      switch (*++s)
411
137k
        {
412
3.78k
        case 't':
413
3.78k
          fput_fp_reg (GET_FIELD (insn, 27, 31), info);
414
3.78k
          break;
415
16.8k
        case 'T':
416
16.8k
          if (GET_FIELD (insn, 25, 25))
417
4.87k
      fput_fp_reg_r (GET_FIELD (insn, 27, 31), info);
418
12.0k
          else
419
12.0k
      fput_fp_reg (GET_FIELD (insn, 27, 31), info);
420
16.8k
          break;
421
1.49k
        case 'a':
422
1.49k
          if (GET_FIELD (insn, 25, 25))
423
719
      fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
424
777
          else
425
777
      fput_fp_reg (GET_FIELD (insn, 6, 10), info);
426
1.49k
          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
185
        case 'X':
433
185
          fputs_filtered (" ", info);
434
          /* FALLTHRU */
435
436
11.6k
        case 'A':
437
11.6k
          if (GET_FIELD (insn, 24, 24))
438
6.01k
      fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
439
5.67k
          else
440
5.67k
      fput_fp_reg (GET_FIELD (insn, 6, 10), info);
441
11.6k
          break;
442
638
        case 'b':
443
638
          if (GET_FIELD (insn, 25, 25))
444
0
      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
445
638
          else
446
638
      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
447
638
          break;
448
11.3k
        case 'B':
449
11.3k
          if (GET_FIELD (insn, 19, 19))
450
6.46k
      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
451
4.90k
          else
452
4.90k
      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
453
11.3k
          break;
454
10.3k
        case 'C':
455
10.3k
          {
456
10.3k
      int reg = GET_FIELD (insn, 21, 22);
457
10.3k
      reg |= GET_FIELD (insn, 16, 18) << 2;
458
10.3k
      if (GET_FIELD (insn, 23, 23) != 0)
459
4.26k
        fput_fp_reg_r (reg, info);
460
6.11k
      else
461
6.11k
        fput_fp_reg (reg, info);
462
10.3k
      break;
463
185
          }
464
11.7k
        case 'i':
465
11.7k
          {
466
11.7k
      int reg = GET_FIELD (insn, 6, 10);
467
468
11.7k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
469
11.7k
      fput_fp_reg (reg, info);
470
11.7k
      break;
471
185
          }
472
11.7k
        case 'j':
473
11.7k
          {
474
11.7k
      int reg = GET_FIELD (insn, 11, 15);
475
476
11.7k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
477
11.7k
      fput_fp_reg (reg, info);
478
11.7k
      break;
479
185
          }
480
11.7k
        case 'k':
481
11.7k
          {
482
11.7k
      int reg = GET_FIELD (insn, 27, 31);
483
484
11.7k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
485
11.7k
      fput_fp_reg (reg, info);
486
11.7k
      break;
487
185
          }
488
11.7k
        case 'l':
489
11.7k
          {
490
11.7k
      int reg = GET_FIELD (insn, 21, 25);
491
492
11.7k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
493
11.7k
      fput_fp_reg (reg, info);
494
11.7k
      break;
495
185
          }
496
11.7k
        case 'm':
497
11.7k
          {
498
11.7k
      int reg = GET_FIELD (insn, 16, 20);
499
500
11.7k
      reg |= (GET_FIELD (insn, 26, 26) << 4);
501
11.7k
      fput_fp_reg (reg, info);
502
11.7k
      break;
503
185
          }
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.78k
        case 'E':
510
6.78k
          fputs_filtered (" ", info);
511
          /* FALLTHRU */
512
513
16.8k
        case 'e':
514
16.8k
          if (GET_FIELD (insn, 30, 30))
515
7.82k
      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
516
9.05k
          else
517
9.05k
      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
518
16.8k
          break;
519
6.05k
        case 'x':
520
6.05k
          fput_fp_reg (GET_FIELD (insn, 11, 15), info);
521
6.05k
          break;
522
137k
        }
523
137k
      break;
524
525
137k
    case '5':
526
36.3k
      fput_const (extract_5_load (insn), info);
527
36.3k
      break;
528
11.4k
    case 's':
529
11.4k
      {
530
11.4k
        int space = GET_FIELD (insn, 16, 17);
531
        /* Zero means implicit addressing, not use of sr0.  */
532
11.4k
        if (space != 0)
533
11.4k
          (*info->fprintf_func) (info->stream, "sr%d", space);
534
11.4k
      }
535
11.4k
      break;
536
537
18.5k
    case 'S':
538
18.5k
      (*info->fprintf_func) (info->stream, "sr%d",
539
18.5k
           extract_3 (insn));
540
18.5k
      break;
541
542
      /* Handle completers.  */
543
149k
    case 'c':
544
149k
      switch (*++s)
545
149k
        {
546
12.3k
        case 'x':
547
12.3k
          (*info->fprintf_func)
548
12.3k
      (info->stream, "%s",
549
12.3k
       index_compl_names[GET_COMPL (insn)]);
550
12.3k
          break;
551
9.06k
        case 'X':
552
9.06k
          (*info->fprintf_func)
553
9.06k
      (info->stream, "%s ",
554
9.06k
       index_compl_names[GET_COMPL (insn)]);
555
9.06k
          break;
556
2.87k
        case 'm':
557
2.87k
          (*info->fprintf_func)
558
2.87k
      (info->stream, "%s",
559
2.87k
       short_ldst_compl_names[GET_COMPL (insn)]);
560
2.87k
          break;
561
1.36k
        case 'M':
562
1.36k
          (*info->fprintf_func)
563
1.36k
      (info->stream, "%s ",
564
1.36k
       short_ldst_compl_names[GET_COMPL (insn)]);
565
1.36k
          break;
566
331
        case 'A':
567
331
          (*info->fprintf_func)
568
331
      (info->stream, "%s ",
569
331
       short_bytes_compl_names[GET_COMPL (insn)]);
570
331
          break;
571
633
        case 's':
572
633
          (*info->fprintf_func)
573
633
      (info->stream, "%s",
574
633
       short_bytes_compl_names[GET_COMPL (insn)]);
575
633
          break;
576
9.88k
        case 'c':
577
19.1k
        case 'C':
578
19.1k
          switch (GET_FIELD (insn, 20, 21))
579
19.1k
      {
580
7.73k
      case 1:
581
7.73k
        (*info->fprintf_func) (info->stream, ",bc ");
582
7.73k
        break;
583
4.39k
      case 2:
584
4.39k
        (*info->fprintf_func) (info->stream, ",sl ");
585
4.39k
        break;
586
7.06k
      default:
587
7.06k
        (*info->fprintf_func) (info->stream, " ");
588
19.1k
      }
589
19.1k
          break;
590
19.1k
        case 'd':
591
891
          switch (GET_FIELD (insn, 20, 21))
592
891
      {
593
463
      case 1:
594
463
        (*info->fprintf_func) (info->stream, ",co ");
595
463
        break;
596
428
      default:
597
428
        (*info->fprintf_func) (info->stream, " ");
598
891
      }
599
891
          break;
600
4.25k
        case 'o':
601
4.25k
          (*info->fprintf_func) (info->stream, ",o");
602
4.25k
          break;
603
447
        case 'g':
604
447
          (*info->fprintf_func) (info->stream, ",gate");
605
447
          break;
606
839
        case 'p':
607
839
          (*info->fprintf_func) (info->stream, ",l,push");
608
839
          break;
609
41
        case 'P':
610
41
          (*info->fprintf_func) (info->stream, ",pop");
611
41
          break;
612
6.78k
        case 'l':
613
6.86k
        case 'L':
614
6.86k
          (*info->fprintf_func) (info->stream, ",l");
615
6.86k
          break;
616
191
        case 'w':
617
191
          (*info->fprintf_func)
618
191
      (info->stream, "%s ",
619
191
       read_write_names[GET_FIELD (insn, 25, 25)]);
620
191
          break;
621
0
        case 'W':
622
0
          (*info->fprintf_func) (info->stream, ",w ");
623
0
          break;
624
149
        case 'r':
625
149
          if (GET_FIELD (insn, 23, 26) == 5)
626
40
      (*info->fprintf_func) (info->stream, ",r");
627
149
          break;
628
392
        case 'Z':
629
392
          if (GET_FIELD (insn, 26, 26))
630
112
      (*info->fprintf_func) (info->stream, ",m ");
631
280
          else
632
280
      (*info->fprintf_func) (info->stream, " ");
633
392
          break;
634
86
        case 'i':
635
86
          if (GET_FIELD (insn, 25, 25))
636
31
      (*info->fprintf_func) (info->stream, ",i");
637
86
          break;
638
10.5k
        case 'z':
639
10.5k
          if (!GET_FIELD (insn, 21, 21))
640
6.02k
      (*info->fprintf_func) (info->stream, ",z");
641
10.5k
          break;
642
4.97k
        case 'a':
643
4.97k
          (*info->fprintf_func)
644
4.97k
      (info->stream, "%s",
645
4.97k
       add_compl_names[GET_FIELD (insn, 20, 21)]);
646
4.97k
          break;
647
230
        case 'Y':
648
230
          (*info->fprintf_func)
649
230
      (info->stream, ",dc%s",
650
230
       add_compl_names[GET_FIELD (insn, 20, 21)]);
651
230
          break;
652
314
        case 'y':
653
314
          (*info->fprintf_func)
654
314
      (info->stream, ",c%s",
655
314
       add_compl_names[GET_FIELD (insn, 20, 21)]);
656
314
          break;
657
8.02k
        case 'v':
658
8.02k
          if (GET_FIELD (insn, 20, 20))
659
2.74k
      (*info->fprintf_func) (info->stream, ",tsv");
660
8.02k
          break;
661
4.10k
        case 't':
662
4.10k
          (*info->fprintf_func) (info->stream, ",tc");
663
4.10k
          if (GET_FIELD (insn, 20, 20))
664
1.12k
      (*info->fprintf_func) (info->stream, ",tsv");
665
4.10k
          break;
666
858
        case 'B':
667
858
          (*info->fprintf_func) (info->stream, ",db");
668
858
          if (GET_FIELD (insn, 20, 20))
669
411
      (*info->fprintf_func) (info->stream, ",tsv");
670
858
          break;
671
1.00k
        case 'b':
672
1.00k
          (*info->fprintf_func) (info->stream, ",b");
673
1.00k
          if (GET_FIELD (insn, 20, 20))
674
115
      (*info->fprintf_func) (info->stream, ",tsv");
675
1.00k
          break;
676
1.05k
        case 'T':
677
1.05k
          if (GET_FIELD (insn, 25, 25))
678
290
      (*info->fprintf_func) (info->stream, ",tc");
679
1.05k
          break;
680
5.06k
        case 'S':
681
          /* EXTRD/W has a following condition.  */
682
5.06k
          if (*(s + 1) == '?')
683
5.04k
      (*info->fprintf_func)
684
5.04k
        (info->stream, "%s",
685
5.04k
         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
5.06k
          break;
691
87
        case 'h':
692
87
          (*info->fprintf_func)
693
87
      (info->stream, "%s",
694
87
       mix_half_names[GET_FIELD (insn, 17, 17)]);
695
87
          break;
696
524
        case 'H':
697
524
          (*info->fprintf_func)
698
524
      (info->stream, "%s ",
699
524
       saturation_names[GET_FIELD (insn, 24, 25)]);
700
524
          break;
701
1.92k
        case '*':
702
1.92k
          (*info->fprintf_func)
703
1.92k
      (info->stream, ",%d%d%d%d ",
704
1.92k
       GET_FIELD (insn, 17, 18), GET_FIELD (insn, 20, 21),
705
1.92k
       GET_FIELD (insn, 22, 23), GET_FIELD (insn, 24, 25));
706
1.92k
          break;
707
708
14.5k
        case 'q':
709
14.5k
          {
710
14.5k
      int m, a;
711
712
14.5k
      m = GET_FIELD (insn, 28, 28);
713
14.5k
      a = GET_FIELD (insn, 29, 29);
714
715
14.5k
      if (m && !a)
716
1.93k
        fputs_filtered (",ma ", info);
717
12.6k
      else if (m && a)
718
3.09k
        fputs_filtered (",mb ", info);
719
9.53k
      else
720
9.53k
        fputs_filtered (" ", info);
721
14.5k
      break;
722
6.78k
          }
723
724
12.5k
        case 'J':
725
12.5k
          {
726
12.5k
      int opc = GET_FIELD (insn, 0, 5);
727
728
12.5k
      if (opc == 0x16 || opc == 0x1e)
729
12.5k
        {
730
12.5k
          if (GET_FIELD (insn, 29, 29) == 0)
731
9.07k
            fputs_filtered (",ma ", info);
732
3.50k
          else
733
3.50k
            fputs_filtered (",mb ", info);
734
12.5k
        }
735
0
      else
736
0
        fputs_filtered (" ", info);
737
12.5k
      break;
738
6.78k
          }
739
740
24.1k
        case 'e':
741
24.1k
          {
742
24.1k
      int opc = GET_FIELD (insn, 0, 5);
743
744
24.1k
      if (opc == 0x13 || opc == 0x1b)
745
18.0k
        {
746
18.0k
          if (GET_FIELD (insn, 18, 18) == 1)
747
12.0k
            fputs_filtered (",mb ", info);
748
6.02k
          else
749
6.02k
            fputs_filtered (",ma ", info);
750
18.0k
        }
751
6.13k
      else if (opc == 0x17 || opc == 0x1f)
752
6.13k
        {
753
6.13k
          if (GET_FIELD (insn, 31, 31) == 1)
754
2.34k
            fputs_filtered (",ma ", info);
755
3.79k
          else
756
3.79k
            fputs_filtered (",mb ", info);
757
6.13k
        }
758
0
      else
759
0
        fputs_filtered (" ", info);
760
761
24.1k
      break;
762
6.78k
          }
763
149k
        }
764
149k
      break;
765
766
      /* Handle conditions.  */
767
149k
    case '?':
768
121k
      {
769
121k
        s++;
770
121k
        switch (*s)
771
121k
          {
772
1.01k
          case 'f':
773
1.01k
      (*info->fprintf_func)
774
1.01k
        (info->stream, "%s ",
775
1.01k
         float_comp_names[GET_FIELD (insn, 27, 31)]);
776
1.01k
      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
8.06k
          case 'N':
793
8.06k
      fputs_filtered
794
8.06k
        (compare_cond_64_names[GET_FIELD (insn, 16, 18)
795
8.06k
             + GET_FIELD (insn, 2, 2) * 8],
796
8.06k
         info);
797
8.06k
      break;
798
5.22k
          case 'Q':
799
5.22k
      fputs_filtered
800
5.22k
        (cmpib_cond_64_names[GET_FIELD (insn, 16, 18)],
801
5.22k
         info);
802
5.22k
      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.51k
          case 's':
810
9.51k
      (*info->fprintf_func)
811
9.51k
        (info->stream, "%s ",
812
9.51k
         compare_cond_names[GET_COND (insn)]);
813
9.51k
      break;
814
2.51k
          case 'S':
815
2.51k
      (*info->fprintf_func)
816
2.51k
        (info->stream, "%s ",
817
2.51k
         compare_cond_64_names[GET_COND (insn)]);
818
2.51k
      break;
819
12.9k
          case 'a':
820
12.9k
      (*info->fprintf_func)
821
12.9k
        (info->stream, "%s ",
822
12.9k
         add_cond_names[GET_COND (insn)]);
823
12.9k
      break;
824
893
          case 'A':
825
893
      (*info->fprintf_func)
826
893
        (info->stream, "%s ",
827
893
         add_cond_64_names[GET_COND (insn)]);
828
893
      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
15.4k
          case 'W':
836
15.4k
      (*info->fprintf_func)
837
15.4k
        (info->stream, "%s",
838
15.4k
         wide_add_cond_names[GET_FIELD (insn, 16, 18) +
839
15.4k
                 GET_FIELD (insn, 4, 4) * 8]);
840
15.4k
      break;
841
842
3.37k
          case 'l':
843
3.37k
      (*info->fprintf_func)
844
3.37k
        (info->stream, "%s ",
845
3.37k
         logical_cond_names[GET_COND (insn)]);
846
3.37k
      break;
847
871
          case 'L':
848
871
      (*info->fprintf_func)
849
871
        (info->stream, "%s ",
850
871
         logical_cond_64_names[GET_COND (insn)]);
851
871
      break;
852
657
          case 'u':
853
657
      (*info->fprintf_func)
854
657
        (info->stream, "%s ",
855
657
         unit_cond_names[GET_COND (insn)]);
856
657
      break;
857
516
          case 'U':
858
516
      (*info->fprintf_func)
859
516
        (info->stream, "%s ",
860
516
         unit_cond_64_names[GET_COND (insn)]);
861
516
      break;
862
8.90k
          case 'y':
863
12.6k
          case 'x':
864
17.5k
          case 'b':
865
17.5k
      (*info->fprintf_func)
866
17.5k
        (info->stream, "%s",
867
17.5k
         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
17.5k
      if (s[1] != 'n')
872
3.74k
        (*info->fprintf_func) (info->stream, " ");
873
17.5k
      break;
874
13.5k
          case 'X':
875
13.5k
      (*info->fprintf_func)
876
13.5k
        (info->stream, "%s ",
877
13.5k
         shift_cond_64_names[GET_FIELD (insn, 16, 18)]);
878
13.5k
      break;
879
1.29k
          case 'B':
880
1.29k
      (*info->fprintf_func)
881
1.29k
        (info->stream, "%s",
882
1.29k
         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.29k
      if (s[1] != 'n')
887
0
        (*info->fprintf_func) (info->stream, " ");
888
1.29k
      break;
889
121k
          }
890
121k
        break;
891
121k
      }
892
893
121k
    case 'V':
894
1.61k
      fput_const (extract_5_store (insn), info);
895
1.61k
      break;
896
85.5k
    case 'r':
897
85.5k
      fput_const (extract_5r_store (insn), info);
898
85.5k
      break;
899
108
    case 'R':
900
108
      fput_const (extract_5R_store (insn), info);
901
108
      break;
902
67
    case 'U':
903
67
      fput_const (extract_10U_store (insn), info);
904
67
      break;
905
1.25k
    case 'B':
906
6.07k
    case 'Q':
907
6.07k
      fput_const (extract_5Q_store (insn), info);
908
6.07k
      break;
909
17.8k
    case 'i':
910
17.8k
      fput_const (extract_11 (insn), info);
911
17.8k
      break;
912
0
    case 'j':
913
0
      fput_const (extract_14 (insn), info);
914
0
      break;
915
17.1k
    case 'k':
916
17.1k
      fputs_filtered ("L%", info);
917
17.1k
      fput_const (extract_21 (insn), info);
918
17.1k
      break;
919
18.0k
    case '<':
920
73.9k
    case 'l':
921
      /* 16-bit long disp., PA2.0 wide only.  */
922
73.9k
      fput_const (extract_16 (insn), info);
923
73.9k
      break;
924
85.3k
    case 'n':
925
85.3k
      if (insn & 0x2)
926
36.3k
        (*info->fprintf_func) (info->stream, ",n ");
927
49.0k
      else
928
49.0k
        (*info->fprintf_func) (info->stream, " ");
929
85.3k
      break;
930
25.6k
    case 'N':
931
25.6k
      if ((insn & 0x20) && s[1])
932
1.89k
        (*info->fprintf_func) (info->stream, ",n ");
933
23.7k
      else if (insn & 0x20)
934
9.76k
        (*info->fprintf_func) (info->stream, ",n");
935
13.9k
      else if (s[1])
936
3.16k
        (*info->fprintf_func) (info->stream, " ");
937
25.6k
      break;
938
71.8k
    case 'w':
939
71.8k
      (*info->print_address_func)
940
71.8k
        (memaddr + 8 + extract_12 (insn), info);
941
71.8k
      break;
942
1.95k
    case 'W':
943
      /* 17 bit PC-relative branch.  */
944
1.95k
      (*info->print_address_func)
945
1.95k
        ((memaddr + 8 + extract_17 (insn)), info);
946
1.95k
      break;
947
10.2k
    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
10.2k
      fput_const (extract_17 (insn), info);
952
10.2k
      break;
953
954
6.95k
    case 'Z':
955
      /* addil %r1 implicit output.  */
956
6.95k
      fputs_filtered ("r1", info);
957
6.95k
      break;
958
959
4.99k
    case 'Y':
960
      /* be,l %sr0,%r31 implicit output.  */
961
4.99k
      fputs_filtered ("sr0,r31", info);
962
4.99k
      break;
963
964
4.25k
    case '@':
965
4.25k
      (*info->fprintf_func) (info->stream, "0");
966
4.25k
      break;
967
968
913
    case '.':
969
913
      (*info->fprintf_func) (info->stream, "%d",
970
913
           GET_FIELD (insn, 24, 25));
971
913
      break;
972
22
    case '*':
973
22
      (*info->fprintf_func) (info->stream, "%d",
974
22
           GET_FIELD (insn, 22, 25));
975
22
      break;
976
2.07k
    case '!':
977
2.07k
      fputs_filtered ("sar", info);
978
2.07k
      break;
979
1.21k
    case 'p':
980
1.21k
      (*info->fprintf_func) (info->stream, "%d",
981
1.21k
           31 - GET_FIELD (insn, 22, 26));
982
1.21k
      break;
983
9.65k
    case '~':
984
9.65k
      {
985
9.65k
        int num;
986
9.65k
        num = GET_FIELD (insn, 20, 20) << 5;
987
9.65k
        num |= GET_FIELD (insn, 22, 26);
988
9.65k
        (*info->fprintf_func) (info->stream, "%d", 63 - num);
989
9.65k
        break;
990
18.0k
      }
991
915
    case 'P':
992
915
      (*info->fprintf_func) (info->stream, "%d",
993
915
           GET_FIELD (insn, 22, 26));
994
915
      break;
995
3.47k
    case 'q':
996
3.47k
      {
997
3.47k
        int num;
998
3.47k
        num = GET_FIELD (insn, 20, 20) << 5;
999
3.47k
        num |= GET_FIELD (insn, 22, 26);
1000
3.47k
        (*info->fprintf_func) (info->stream, "%d", num);
1001
3.47k
        break;
1002
18.0k
      }
1003
2.89k
    case 'T':
1004
2.89k
      (*info->fprintf_func) (info->stream, "%d",
1005
2.89k
           32 - GET_FIELD (insn, 27, 31));
1006
2.89k
      break;
1007
374
    case '%':
1008
374
      {
1009
374
        int num;
1010
374
        num = (GET_FIELD (insn, 23, 23) + 1) * 32;
1011
374
        num -= GET_FIELD (insn, 27, 31);
1012
374
        (*info->fprintf_func) (info->stream, "%d", num);
1013
374
        break;
1014
18.0k
      }
1015
12.3k
    case '|':
1016
12.3k
      {
1017
12.3k
        int num;
1018
12.3k
        num = (GET_FIELD (insn, 19, 19) + 1) * 32;
1019
12.3k
        num -= GET_FIELD (insn, 27, 31);
1020
12.3k
        (*info->fprintf_func) (info->stream, "%d", num);
1021
12.3k
        break;
1022
18.0k
      }
1023
0
    case '$':
1024
0
      fput_const (GET_FIELD (insn, 20, 28), info);
1025
0
      break;
1026
85.5k
    case 'A':
1027
85.5k
      fput_const (GET_FIELD (insn, 6, 18), info);
1028
85.5k
      break;
1029
12.4k
    case 'D':
1030
12.4k
      fput_const (GET_FIELD (insn, 6, 31), info);
1031
12.4k
      break;
1032
12.8k
    case 'v':
1033
12.8k
      (*info->fprintf_func) (info->stream, ",%d",
1034
12.8k
           GET_FIELD (insn, 23, 25));
1035
12.8k
      break;
1036
7.76k
    case 'O':
1037
7.76k
      fput_const ((GET_FIELD (insn, 6,20) << 5 |
1038
7.76k
             GET_FIELD (insn, 27, 31)), info);
1039
7.76k
      break;
1040
2.12k
    case 'o':
1041
2.12k
      fput_const (GET_FIELD (insn, 6, 20), info);
1042
2.12k
      break;
1043
12.8k
    case '2':
1044
12.8k
      fput_const ((GET_FIELD (insn, 6, 22) << 5 |
1045
12.8k
             GET_FIELD (insn, 27, 31)), info);
1046
12.8k
      break;
1047
1.16k
    case '1':
1048
1.16k
      fput_const ((GET_FIELD (insn, 11, 20) << 5 |
1049
1.16k
             GET_FIELD (insn, 27, 31)), info);
1050
1.16k
      break;
1051
1.76k
    case '0':
1052
1.76k
      fput_const ((GET_FIELD (insn, 16, 20) << 5 |
1053
1.76k
             GET_FIELD (insn, 27, 31)), info);
1054
1.76k
      break;
1055
25.4k
    case 'u':
1056
25.4k
      (*info->fprintf_func) (info->stream, ",%d",
1057
25.4k
           GET_FIELD (insn, 23, 25));
1058
25.4k
      break;
1059
1.11k
    case 'F':
1060
      /* If no destination completer and not before a completer
1061
         for fcmp, need a space here.  */
1062
1.11k
      if (s[1] == 'G' || s[1] == '?')
1063
689
        fputs_filtered
1064
1.11k
          (float_format_names[GET_FIELD (insn, 19, 20)], info);
1065
427
      else
1066
427
        (*info->fprintf_func)
1067
427
          (info->stream, "%s ",
1068
427
           float_format_names[GET_FIELD (insn, 19, 20)]);
1069
1.11k
      break;
1070
322
    case 'G':
1071
322
      (*info->fprintf_func)
1072
322
        (info->stream, "%s ",
1073
322
         float_format_names[GET_FIELD (insn, 17, 18)]);
1074
322
      break;
1075
11.7k
    case 'H':
1076
11.7k
      if (GET_FIELD (insn, 26, 26) == 1)
1077
3.13k
        (*info->fprintf_func) (info->stream, "%s ",
1078
3.13k
             float_format_names[0]);
1079
8.61k
      else
1080
8.61k
        (*info->fprintf_func) (info->stream, "%s ",
1081
8.61k
             float_format_names[1]);
1082
11.7k
      break;
1083
11.1k
    case 'I':
1084
      /* If no destination completer and not before a completer
1085
         for fcmp, need a space here.  */
1086
11.1k
      if (s[1] == '?')
1087
644
        fputs_filtered
1088
11.1k
          (float_format_names[GET_FIELD (insn, 20, 20)], info);
1089
10.5k
      else
1090
10.5k
        (*info->fprintf_func)
1091
10.5k
          (info->stream, "%s ",
1092
10.5k
           float_format_names[GET_FIELD (insn, 20, 20)]);
1093
11.1k
      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
18.0k
      }
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
6.13k
    case '>':
1132
23.0k
    case 'y':
1133
23.0k
      {
1134
        /* 16-bit long disp., PA2.0 wide only.  */
1135
23.0k
        int disp = extract_16 (insn);
1136
23.0k
        disp &= ~3;
1137
23.0k
        fput_const (disp, info);
1138
23.0k
        break;
1139
6.13k
      }
1140
1141
14.5k
    case '&':
1142
14.5k
      {
1143
        /* 16-bit long disp., PA2.0 wide only.  */
1144
14.5k
        int disp = extract_16 (insn);
1145
14.5k
        disp &= ~7;
1146
14.5k
        fput_const (disp, info);
1147
14.5k
        break;
1148
6.13k
      }
1149
1150
734
    case '_':
1151
734
      break; /* Dealt with by '{' */
1152
1153
734
    case '{':
1154
734
      {
1155
734
        int sub = GET_FIELD (insn, 14, 16);
1156
734
        int df = GET_FIELD (insn, 17, 18);
1157
734
        int sf = GET_FIELD (insn, 19, 20);
1158
734
        const char * const * source = float_format_names;
1159
734
        const char * const * dest = float_format_names;
1160
734
        char *t = "";
1161
1162
734
        if (sub == 4)
1163
103
          {
1164
103
      fputs_filtered (",UND ", info);
1165
103
      break;
1166
103
          }
1167
631
        if ((sub & 3) == 3)
1168
20
          t = ",t";
1169
631
        if ((sub & 3) == 1)
1170
139
          source = sub & 4 ? fcnv_ufixed_names : fcnv_fixed_names;
1171
631
        if (sub & 2)
1172
291
          dest = sub & 4 ? fcnv_ufixed_names : fcnv_fixed_names;
1173
1174
631
        (*info->fprintf_func) (info->stream, "%s%s%s ",
1175
631
             t, source[sf], dest[df]);
1176
631
        break;
1177
734
      }
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
872
    case 'h':
1189
872
      {
1190
872
        int cbit;
1191
1192
872
        cbit = GET_FIELD (insn, 16, 18);
1193
1194
872
        if (cbit > 0)
1195
872
          (*info->fprintf_func) (info->stream, ",%d", cbit - 1);
1196
872
        break;
1197
734
      }
1198
1199
730
    case '=':
1200
730
      {
1201
730
        int cond = GET_FIELD (insn, 27, 31);
1202
1203
730
        switch (cond)
1204
730
          {
1205
0
          case  0: fputs_filtered (" ", info); break;
1206
68
          case  1: fputs_filtered ("acc ", info); break;
1207
18
          case  2: fputs_filtered ("rej ", info); break;
1208
197
          case  5: fputs_filtered ("acc8 ", info); break;
1209
18
          case  6: fputs_filtered ("rej8 ", info); break;
1210
84
          case  9: fputs_filtered ("acc6 ", info); break;
1211
180
          case 13: fputs_filtered ("acc4 ", info); break;
1212
62
          case 17: fputs_filtered ("acc2 ", info); break;
1213
103
          default: break;
1214
730
          }
1215
730
        break;
1216
730
      }
1217
1218
1.11k
    case 'X':
1219
1.11k
      (*info->print_address_func)
1220
1.11k
        (memaddr + 8 + extract_22 (insn), info);
1221
1.11k
      break;
1222
1.11k
    case 'L':
1223
1.11k
      fputs_filtered (",rp", info);
1224
1.11k
      break;
1225
992k
    default:
1226
992k
      (*info->fprintf_func) (info->stream, "%c", *s);
1227
992k
      break;
1228
2.69M
    }
1229
2.69M
      }
1230
491k
    return sizeof (insn);
1231
491k
  }
1232
322M
    }
1233
243k
  (*info->fprintf_func) (info->stream, "#%8x", insn);
1234
243k
  return sizeof (insn);
1235
735k
}