Correctly check gcc version.
[external/binutils.git] / bfd / libhppa.h
1 /* HP PA-RISC SOM object file format:  definitions internal to BFD.
2    Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 98, 99, 2000
3    Free Software Foundation, Inc.
4
5    Contributed by the Center for Software Science at the
6    University of Utah (pa-gdb-bugs@cs.utah.edu).
7
8    This file is part of BFD, the Binary File Descriptor library.
9
10    This program is free software; you can redistribute it and/or modify
11    it under the terms of the GNU General Public License as published by
12    the Free Software Foundation; either version 2 of the License, or
13    (at your option) any later version.
14
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
23
24 #ifndef _HPPA_H
25 #define _HPPA_H
26
27 #define BYTES_IN_WORD 4
28 #define PA_PAGESIZE 0x1000
29
30 #ifndef INLINE
31 #ifdef __GNUC__
32 #define INLINE inline
33 #else
34 #define INLINE
35 #endif /* GNU C? */
36 #endif /* INLINE */
37
38 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
39 /* Declare the functions with the unused attribute to avoid warnings.  */
40 static INLINE unsigned int assemble_3 (unsigned int)
41      __attribute__ ((__unused__));
42 static INLINE void dis_assemble_3 (unsigned int, unsigned int *)
43      __attribute__ ((__unused__));
44 static INLINE unsigned int assemble_12 (unsigned int, unsigned int)
45      __attribute__ ((__unused__));
46 static INLINE void dis_assemble_12 (unsigned int, unsigned int *,
47                                     unsigned int *)
48      __attribute__ ((__unused__));
49 static INLINE void dis_assemble_16 (unsigned int, unsigned int *, int)
50      __attribute__ ((__unused__));
51 static INLINE unsigned long assemble_17 (unsigned int, unsigned int,
52                                          unsigned int)
53      __attribute__ ((__unused__));
54 static INLINE void dis_assemble_17 (unsigned int, unsigned int *,
55                                     unsigned int *, unsigned int *)
56      __attribute__ ((__unused__));
57 static INLINE void dis_assemble_22 (unsigned int, unsigned int *,
58                                     unsigned int *, unsigned int *,
59                                     unsigned int *)
60      __attribute__ ((__unused__));
61 static INLINE unsigned long assemble_21 (unsigned int)
62      __attribute ((__unused__));
63 static INLINE void dis_assemble_21 (unsigned int, unsigned int *)
64      __attribute__ ((__unused__));
65 static INLINE unsigned long sign_extend (unsigned int, unsigned int)
66      __attribute__ ((__unused__));
67 static INLINE unsigned int ones (int) __attribute ((__unused__));
68 static INLINE void sign_unext (unsigned int, unsigned int, unsigned int *)
69      __attribute__ ((__unused__));
70 static INLINE unsigned long low_sign_extend (unsigned int, unsigned int)
71      __attribute__ ((__unused__));
72 static INLINE void low_sign_unext (unsigned int, unsigned int, unsigned int *)
73      __attribute__ ((__unused__));
74 static INLINE unsigned long hppa_field_adjust (unsigned long, unsigned long,
75                                                unsigned short)
76      __attribute__ ((__unused__));
77 static INLINE int bfd_hppa_insn2fmt (unsigned long)
78      __attribute__ ((__unused__));
79 static INLINE  unsigned long hppa_rebuild_insn (bfd *, unsigned long,
80                                                 unsigned long, unsigned long)
81      __attribute__ ((__unused__));
82 #endif /* gcc 2.7 or higher */
83
84
85 /* The PA instruction set variants.  */
86 enum pa_arch {pa10 = 10, pa11 = 11, pa20 = 20, pa20w = 25};
87
88 /* HP PA-RISC relocation types */
89
90 enum hppa_reloc_field_selector_type
91   {
92     R_HPPA_FSEL = 0x0,
93     R_HPPA_LSSEL = 0x1,
94     R_HPPA_RSSEL = 0x2,
95     R_HPPA_LSEL = 0x3,
96     R_HPPA_RSEL = 0x4,
97     R_HPPA_LDSEL = 0x5,
98     R_HPPA_RDSEL = 0x6,
99     R_HPPA_LRSEL = 0x7,
100     R_HPPA_RRSEL = 0x8,
101     R_HPPA_NSEL  = 0x9,
102     R_HPPA_NLSEL  = 0xa,
103     R_HPPA_NLRSEL  = 0xb,
104     R_HPPA_PSEL = 0xc,
105     R_HPPA_LPSEL = 0xd,
106     R_HPPA_RPSEL = 0xe,
107     R_HPPA_TSEL = 0xf,
108     R_HPPA_LTSEL = 0x10,
109     R_HPPA_RTSEL = 0x11,
110     R_HPPA_LTPSEL = 0x12,
111     R_HPPA_RTPSEL = 0x13
112   };
113
114 /* /usr/include/reloc.h defines these to constants.  We want to use
115    them in enums, so #undef them before we start using them.  We might
116    be able to fix this another way by simply managing not to include
117    /usr/include/reloc.h, but currently GDB picks up these defines
118    somewhere.  */
119 #undef e_fsel
120 #undef e_lssel
121 #undef e_rssel
122 #undef e_lsel
123 #undef e_rsel
124 #undef e_ldsel
125 #undef e_rdsel
126 #undef e_lrsel
127 #undef e_rrsel
128 #undef e_nsel
129 #undef e_nlsel
130 #undef e_nlrsel
131 #undef e_psel
132 #undef e_lpsel
133 #undef e_rpsel
134 #undef e_tsel
135 #undef e_ltsel
136 #undef e_rtsel
137 #undef e_one
138 #undef e_two
139 #undef e_pcrel
140 #undef e_con
141 #undef e_plabel
142 #undef e_abs
143
144 /* for compatibility */
145 enum hppa_reloc_field_selector_type_alt
146   {
147     e_fsel = R_HPPA_FSEL,
148     e_lssel = R_HPPA_LSSEL,
149     e_rssel = R_HPPA_RSSEL,
150     e_lsel = R_HPPA_LSEL,
151     e_rsel = R_HPPA_RSEL,
152     e_ldsel = R_HPPA_LDSEL,
153     e_rdsel = R_HPPA_RDSEL,
154     e_lrsel = R_HPPA_LRSEL,
155     e_rrsel = R_HPPA_RRSEL,
156     e_nsel = R_HPPA_NSEL,
157     e_nlsel = R_HPPA_NLSEL,
158     e_nlrsel = R_HPPA_NLRSEL,
159     e_psel = R_HPPA_PSEL,
160     e_lpsel = R_HPPA_LPSEL,
161     e_rpsel = R_HPPA_RPSEL,
162     e_tsel = R_HPPA_TSEL,
163     e_ltsel = R_HPPA_LTSEL,
164     e_rtsel = R_HPPA_RTSEL,
165     e_ltpsel = R_HPPA_LTPSEL,
166     e_rtpsel = R_HPPA_RTPSEL
167   };
168
169 enum hppa_reloc_expr_type
170   {
171     R_HPPA_E_ONE = 0,
172     R_HPPA_E_TWO = 1,
173     R_HPPA_E_PCREL = 2,
174     R_HPPA_E_CON = 3,
175     R_HPPA_E_PLABEL = 7,
176     R_HPPA_E_ABS = 18
177   };
178
179 /* for compatibility */
180 enum hppa_reloc_expr_type_alt
181   {
182     e_one = R_HPPA_E_ONE,
183     e_two = R_HPPA_E_TWO,
184     e_pcrel = R_HPPA_E_PCREL,
185     e_con = R_HPPA_E_CON,
186     e_plabel = R_HPPA_E_PLABEL,
187     e_abs = R_HPPA_E_ABS
188   };
189
190
191 /* Relocations for function calls must be accompanied by parameter
192    relocation bits.  These bits describe exactly where the caller has
193    placed the function's arguments and where it expects to find a return
194    value.
195
196    Both ELF and SOM encode this information within the addend field
197    of the call relocation.  (Note this could break very badly if one
198    was to make a call like bl foo + 0x12345678).
199
200    The high order 10 bits contain parameter relocation information,
201    the low order 22 bits contain the constant offset.  */
202    
203 #define HPPA_R_ARG_RELOC(a)     (((a) >> 22) & 0x3FF)
204 #define HPPA_R_CONSTANT(a)      ((((int)(a)) << 10) >> 10)
205 #define HPPA_R_ADDEND(r,c)      (((r) << 22) + ((c) & 0x3FFFFF))
206 #define HPPA_WIDE              (0) /* PSW W-bit, need to check! FIXME */
207
208 /* These macros get bit fields using HP's numbering (MSB = 0),
209  * but note that "MASK" assumes that the LSB bits are what's
210  * wanted.
211  */
212 #ifndef GET_FIELD
213 #define GET_FIELD(X, FROM, TO) \
214   ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
215 #endif  
216 #define GET_BIT(X, WHICH) \
217   GET_FIELD (X, WHICH, WHICH)
218
219 #define MASK(SIZE) \
220   (~((-1) << SIZE))
221   
222 #define CATENATE(X, XSIZE, Y, YSIZE) \
223   (((X & MASK (XSIZE)) << YSIZE) | (Y & MASK (YSIZE)))
224
225 #define ELEVEN(X) \
226   CATENATE (GET_BIT (X, 10), 1, GET_FIELD (X, 0, 9), 10)
227   
228 /* Some functions to manipulate PA instructions.  */
229
230 /* NOTE: these use the HP convention that f{1} is the _left_ most
231  *       bit (MSB) of f; they sometimes have to impose an assumption
232  *       about the size of a field; and as far as I can tell, most
233  *       aren't used.
234  */
235
236 static INLINE unsigned long
237 sign_extend (x, len)
238      unsigned int x, len;
239 {
240   return (int)(x >> (len - 1) ? (-1 << len) | x : x);
241 }
242
243 static INLINE unsigned int
244 assemble_3 (x)
245      unsigned int x;
246 {
247   return CATENATE (GET_BIT (x, 2), 1, GET_FIELD (x, 0, 1), 2);
248 }
249
250 static INLINE void
251 dis_assemble_3 (x, r)
252      unsigned int x;
253      unsigned int *r;
254 {
255   *r = (((x & 4) >> 2) | ((x & 3) << 1)) & 7;
256 }
257
258 static INLINE unsigned int
259 assemble_6 (x, y)
260      unsigned int x, y;
261 {
262   return (((x & 0x1) << 5) + (32 - (y & 0x1f)));
263 }
264
265 static INLINE unsigned int
266 assemble_12 (x, y)
267      unsigned int x, y;
268 {
269   return CATENATE (CATENATE (y, 1, GET_BIT (x, 10), 1), 2,
270                    GET_FIELD (x, 0, 9), 9);
271 }
272
273 static INLINE void
274 dis_assemble_12 (as12, x, y)
275      unsigned int as12;
276      unsigned int *x, *y;
277 {
278   *y = (as12 & 0x800) >> 11;
279   *x = ((as12 & 0x3ff) << 1) | ((as12 & 0x400) >> 10);
280 }
281
282 static INLINE void
283 dis_assemble_16 (as16, x, wide)
284      unsigned int as16;
285      unsigned int *x;
286      int wide;
287 {
288   unsigned int t1, t2;
289
290   if (wide)
291     {
292       /* Unusual 16-bit encoding.  */
293       t1 = (as16 << 1) & 0xffff;
294       t2 = (as16 & 0x8000);
295       *x = t1 ^ t2 ^ (t2 >> 1) | (t2 >> 15);
296     }
297   else
298     {
299       /* Standard 14-bit encoding.  */
300       t1 = (as16 << 1) & 0x3fff;
301       t2 = (as16 & 0x2000);
302       *x = t1 | (t2 >> 13);
303     }
304 }
305
306 static INLINE unsigned long
307 assemble_16 (x, y)
308      unsigned int x, y;
309 {
310   /* Depends on PSW W-bit !*/
311   unsigned int temp;
312
313   if (HPPA_WIDE)
314     temp = CATENATE (CATENATE (GET_BIT (y, 13), 1,
315                                (GET_BIT (y, 13) ^ GET_BIT (x, 0)), 1), 2,
316                      CATENATE ((GET_BIT (y, 13) ^ GET_BIT (x, 1)), 1,
317                                GET_FIELD (y, 0, 12), 13), 14);
318   else
319     temp = CATENATE (CATENATE (GET_BIT (y, 13), 1, GET_BIT (y, 13), 1), 2,
320                      CATENATE (GET_BIT (y, 13), 1, GET_FIELD (y, 0, 12), 13), 14);
321
322   return sign_extend (temp, 16);
323 }
324
325
326 static INLINE unsigned long
327 assemble_16a (x, y, z)
328      unsigned int x, y, z;
329 {
330   /* Depends on PSW W-bit !*/
331   unsigned int temp;
332
333   if (HPPA_WIDE)
334     temp = CATENATE (CATENATE (z, 1, (z ^ GET_BIT (x, 0)), 1), 2,
335                      CATENATE ((z ^ GET_BIT (x, 1)), 1, y, 11), 12);
336   else 
337       temp = CATENATE (CATENATE (z, 1, z, 1), 2, CATENATE (z, 1, y, 11), 12);
338
339   return sign_extend ((temp << 2), 16);
340 }
341
342 static INLINE unsigned long
343 assemble_17 (x, y, z)
344      unsigned int x, y, z;
345 {
346   unsigned long temp;
347
348   temp = CATENATE (CATENATE (z, 1, x, 5), 6,
349                    CATENATE (GET_BIT (y, 10), 1, GET_FIELD (y, 0, 9), 10), 11);
350   
351   return temp;
352 }
353
354 static INLINE void
355 dis_assemble_17 (as17, x, y, z)
356      unsigned int as17;
357      unsigned int *x, *y, *z;
358 {
359
360   *z = (as17 & 0x10000) >> 16;
361   *x = (as17 & 0x0f800) >> 11;
362   *y = (((as17 & 0x00400) >> 10) | ((as17 & 0x3ff) << 1)) & 0x7ff;
363 }
364
365 static INLINE void
366 dis_assemble_22 (as22, a, b, c, d)
367      unsigned int as22;
368      unsigned int *a, *b, *c, *d;
369 {
370
371   *d = (as22 & 0x200000) >> 21;
372   *a = (as22 & 0x1f0000) >> 16;
373   *b = (as22 & 0x0f800) >> 11;
374   *c = (((as22 & 0x00400) >> 10) | ((as22 & 0x3ff) << 1)) & 0x7ff;
375 }
376
377 static INLINE unsigned long
378 assemble_21 (x)
379      unsigned int x;
380 {
381   unsigned long temp;
382
383   temp = ((x & 1) << 20) |
384     ((x & 0xffe) << 8) |
385     ((x & 0xc000) >> 7) |
386     ((x & 0x1f0000) >> 14) |
387     ((x & 0x003000) >> 12);
388   return temp & 0x1fffff;
389 }
390
391 static INLINE unsigned long
392 assemble_22 (a,b,c,d)
393      unsigned int a,b,c,d;
394 {
395   unsigned long temp;
396   
397   temp = CATENATE (CATENATE (d, 1, a, 5), 6,
398                    CATENATE (b, 5, ELEVEN (c), 11), 16);
399
400   return sign_extend (temp, 22);
401 }
402
403 static INLINE void
404 dis_assemble_21 (as21, x)
405      unsigned int as21, *x;
406 {
407   unsigned long temp;
408
409
410   temp = (as21 & 0x100000) >> 20;
411   temp |= (as21 & 0x0ffe00) >> 8;
412   temp |= (as21 & 0x000180) << 7;
413   temp |= (as21 & 0x00007c) << 14;
414   temp |= (as21 & 0x000003) << 12;
415   *x = temp;
416 }
417
418 static INLINE unsigned int
419 ones (n)
420      int n;
421 {
422   unsigned int len_ones;
423   int i;
424
425   i = 0;
426   len_ones = 0;
427   while (i < n)
428     {
429       len_ones = (len_ones << 1) | 1;
430       i++;
431     }
432
433   return len_ones;
434 }
435
436 static INLINE void
437 sign_unext (x, len, result)
438      unsigned int x, len;
439      unsigned int *result;
440 {
441   unsigned int len_ones;
442
443   len_ones = ones (len);
444
445   *result = x & len_ones;
446 }
447
448 static INLINE unsigned long
449 low_sign_extend (x, len)
450      unsigned int x, len;
451 {
452   return (int)((x & 0x1 ? (-1 << (len - 1)) : 0) | x >> 1);
453 }
454
455 static INLINE void
456 low_sign_unext (x, len, result)
457      unsigned int x, len;
458      unsigned int *result;
459 {
460   unsigned int temp;
461   unsigned int sign;
462   unsigned int rest;
463   unsigned int one_bit_at_len;
464   unsigned int len_ones;
465
466   len_ones = ones (len);
467   one_bit_at_len = 1 << (len - 1);
468
469   sign_unext (x, len, &temp);
470   sign = temp & one_bit_at_len;
471   sign >>= (len - 1);
472
473   rest = temp & (len_ones ^ one_bit_at_len);
474   rest <<= 1;
475
476   *result = rest | sign;
477 }
478
479 /* Handle field selectors for PA instructions.  */
480
481 static INLINE unsigned long
482 hppa_field_adjust (value, constant_value, r_field)
483      unsigned long value;
484      unsigned long constant_value;
485      unsigned short r_field;
486 {
487   switch (r_field)
488     {
489     case e_fsel:                /* F  : no change                     */
490     case e_nsel:                /* N  : no change                      */
491       value += constant_value;
492       break;
493
494     case e_lssel:               /* LS : if (bit 21) then add 0x800
495                                    arithmetic shift right 11 bits */
496       value += constant_value;
497       if (value & 0x00000400)
498         value += 0x800;
499       value = (value & 0xfffff800) >> 11;
500       break;
501
502     case e_rssel:               /* RS : Sign extend from bit 21 */
503       value += constant_value;
504       if (value & 0x00000400)
505         value |= 0xfffff800;
506       else
507         value &= 0x7ff;
508       break;
509
510     case e_lsel:                /* L  : Arithmetic shift right 11 bits */
511     case e_nlsel:               /* NL  : Arithmetic shift right 11 bits */
512       value += constant_value;
513       value = (value & 0xfffff800) >> 11;
514       break;
515
516     case e_rsel:                /* R  : Set bits 0-20 to zero     */
517       value += constant_value;
518       value = value & 0x7ff;
519       break;
520
521     case e_ldsel:               /* LD : Add 0x800, arithmetic shift
522                                    right 11 bits                  */
523       value += constant_value;
524       value += 0x800;
525       value = (value & 0xfffff800) >> 11;
526       break;
527
528     case e_rdsel:               /* RD : Set bits 0-20 to one       */
529       value += constant_value;
530       value |= 0xfffff800;
531       break;
532
533     case e_lrsel:               /* LR : L with "rounded" constant      */
534     case e_nlrsel:              /* NLR : NL with "rounded" constant      */
535       value = value + ((constant_value + 0x1000) & 0xffffe000);
536       value = (value & 0xfffff800) >> 11;
537       break;
538
539     case e_rrsel:               /* RR : R with "rounded" constant      */
540       value = value + ((constant_value + 0x1000) & 0xffffe000);
541       value = (value & 0x7ff) + constant_value - ((constant_value + 0x1000) & 0xffffe000);
542       break;
543
544     default:
545       abort ();
546     }
547   return value;
548
549 }
550
551 /* PA-RISC OPCODES */
552 #define get_opcode(insn)        ((insn) & 0xfc000000) >> 26
553
554 /* FIXME: this list is incomplete.  It should also be an enumerated
555    type rather than #defines.  */
556
557 #define LDO     0x0d
558 #define LDB     0x10
559 #define LDH     0x11
560 #define LDW     0x12
561 #define LDWM    0x13
562 #define STB     0x18
563 #define STH     0x19
564 #define STW     0x1a
565 #define STWM    0x1b
566 #define COMICLR 0x24
567 #define SUBI    0x25
568 #define SUBIO   0x25
569 #define ADDIT   0x2c
570 #define ADDITO  0x2c
571 #define ADDI    0x2d
572 #define ADDIO   0x2d
573 #define LDIL    0x08
574 #define ADDIL   0x0a
575
576 #define MOVB    0x32
577 #define MOVIB   0x33
578 #define COMBT   0x20
579 #define COMBF   0x22
580 #define COMIBT  0x21
581 #define COMIBF  0x23
582 #define ADDBT   0x28
583 #define ADDBF   0x2a
584 #define ADDIBT  0x29
585 #define ADDIBF  0x2b
586 #define BVB     0x30
587 #define BB      0x31
588
589 #define BL      0x3a
590 #define BLE     0x39
591 #define BE      0x38
592
593 #define CMPBDT  0x27
594 #define CMPBDF  0x2f
595 #define CMPIBD  0x3b
596 #define LDD     0x14
597 #define STD     0x1c
598 #define LDWL    0x17
599 #define STWL    0x1f
600 #define FDLW    0x16
601 #define FSTW    0x1e
602   
603 /* Given a machine instruction, return its format.
604
605    FIXME:  opcodes which do not map to a known format
606    should return an error of some sort.  */
607
608 static INLINE int
609 bfd_hppa_insn2fmt (insn)
610      unsigned long insn;
611 {
612   int fmt = -1;
613   unsigned char op = get_opcode (insn);
614   
615   switch (op)
616     {
617     case ADDI:
618     case ADDIT:
619     case SUBI:
620       fmt = 11;
621       break;
622     case MOVB:
623     case MOVIB:
624     case COMBT:
625     case COMBF:
626     case COMIBT:
627     case COMIBF:
628     case ADDBT:
629     case ADDBF:
630     case ADDIBT:
631     case ADDIBF:
632     case BVB:
633     case BB:
634     case CMPBDT:
635     case CMPBDF:
636     case CMPIBD:
637       fmt = 12;
638       break;
639     case LDO:
640     case LDB:
641     case LDH:
642     case LDW:
643     case LDWM:
644     case STB:
645     case STH:
646     case STW:
647     case STWM:
648       fmt = 14;
649       break;
650     case LDWL:
651     case STWL:
652     case FDLW:
653     case FSTW:
654       /* This is a hack.  Unfortunately, format 11 is already taken
655          and we're using integers rather than an enum, so it's hard
656          to describe the 10a format.  */
657       fmt = -11;
658       break;
659     case LDD:
660     case STD:
661       fmt = 10;
662       break;
663     case BL:
664     case BE:
665     case BLE:
666       if ((insn & 0x00008000) == 0x00008000)
667         return 22;
668       fmt = 17;
669       break;
670     case LDIL:
671     case ADDIL:
672       fmt = 21;
673       break;
674     default:
675       fmt = 32;
676       break;
677     }
678   return fmt;
679 }
680
681
682 /* Insert VALUE into INSN using R_FORMAT to determine exactly what
683    bits to change.  */
684    
685 static INLINE unsigned long
686 hppa_rebuild_insn (abfd, insn, value, r_format)
687      bfd *abfd ATTRIBUTE_UNUSED;
688      unsigned long insn;
689      unsigned long value;
690      unsigned long r_format;
691 {
692   unsigned long const_part;
693   unsigned long rebuilt_part;
694
695   switch (r_format)
696     {
697     case 11:
698       {
699         unsigned w1, w;
700
701         const_part = insn & 0xffffe002;
702         dis_assemble_12 (value, &w1, &w);
703         rebuilt_part = (w1 << 2) | w;
704         return const_part | rebuilt_part;
705       }
706
707     case 12:
708       {
709         unsigned w1, w;
710
711         const_part = insn & 0xffffe002;
712         dis_assemble_12 (value, &w1, &w);
713         rebuilt_part = (w1 << 2) | w;
714         return const_part | rebuilt_part;
715       }
716
717     case 14:
718       {
719         unsigned int ext;
720         
721         const_part = insn & 0xffffc000;
722         low_sign_unext (value, 14, &ext);
723         return const_part | ext;
724       }
725
726     case 17:
727       {
728         unsigned w1, w2, w;
729
730         const_part = insn & 0xffe0e002;
731         dis_assemble_17 (value, &w1, &w2, &w);
732         rebuilt_part = (w2 << 2) | (w1 << 16) | w;
733         return const_part | rebuilt_part;
734       }
735
736     case 21:
737       {
738         unsigned int w;
739
740         const_part = insn & 0xffe00000;
741         dis_assemble_21 (value, &w);
742         return const_part | w;
743       }
744
745     case 32:
746       const_part = 0;
747       return value;
748
749     default:
750       abort ();
751     }
752   return insn;
753 }
754
755 #endif /* _HPPA_H */