Coverage Report

Created: 2024-05-21 06:29

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