1 /* Instruction building/extraction support for m32c. -*- C -*-
3 THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
4 - the resultant file is machine generated, cgen-ibld.in isn't
6 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006
7 Free Software Foundation, Inc.
9 This file is part of the GNU Binutils and GDB, the GNU debugger.
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
25 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
34 #include "m32c-desc.h"
37 #include "safe-ctype.h"
40 #define min(a,b) ((a) < (b) ? (a) : (b))
42 #define max(a,b) ((a) > (b) ? (a) : (b))
44 /* Used by the ifield rtx function. */
45 #define FLD(f) (fields->f)
47 static const char * insert_normal
48 (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
49 unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
50 static const char * insert_insn_normal
51 (CGEN_CPU_DESC, const CGEN_INSN *,
52 CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
53 static int extract_normal
54 (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
55 unsigned int, unsigned int, unsigned int, unsigned int,
56 unsigned int, unsigned int, bfd_vma, long *);
57 static int extract_insn_normal
58 (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
59 CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
61 static void put_insn_int_value
62 (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
65 static CGEN_INLINE void insert_1
66 (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
67 static CGEN_INLINE int fill_cache
68 (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
69 static CGEN_INLINE long extract_1
70 (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
73 /* Operand insertion. */
77 /* Subroutine of insert_normal. */
79 static CGEN_INLINE void
80 insert_1 (CGEN_CPU_DESC cd,
90 x = cgen_get_insn_value (cd, bufp, word_length);
92 /* Written this way to avoid undefined behaviour. */
93 mask = (((1L << (length - 1)) - 1) << 1) | 1;
95 shift = (start + 1) - length;
97 shift = (word_length - (start + length));
98 x = (x & ~(mask << shift)) | ((value & mask) << shift);
100 cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x);
103 #endif /* ! CGEN_INT_INSN_P */
105 /* Default insertion routine.
107 ATTRS is a mask of the boolean attributes.
108 WORD_OFFSET is the offset in bits from the start of the insn of the value.
109 WORD_LENGTH is the length of the word in bits in which the value resides.
110 START is the starting bit number in the word, architecture origin.
111 LENGTH is the length of VALUE in bits.
112 TOTAL_LENGTH is the total length of the insn in bits.
114 The result is an error message or NULL if success. */
116 /* ??? This duplicates functionality with bfd's howto table and
117 bfd_install_relocation. */
118 /* ??? This doesn't handle bfd_vma's. Create another function when
122 insert_normal (CGEN_CPU_DESC cd,
125 unsigned int word_offset,
128 unsigned int word_length,
129 unsigned int total_length,
130 CGEN_INSN_BYTES_PTR buffer)
132 static char errbuf[100];
133 /* Written this way to avoid undefined behaviour. */
134 unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1;
136 /* If LENGTH is zero, this operand doesn't contribute to the value. */
140 if (word_length > 32)
143 /* For architectures with insns smaller than the base-insn-bitsize,
144 word_length may be too big. */
145 if (cd->min_insn_bitsize < cd->base_insn_bitsize)
148 && word_length > total_length)
149 word_length = total_length;
152 /* Ensure VALUE will fit. */
153 if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
155 long minval = - (1L << (length - 1));
156 unsigned long maxval = mask;
158 if ((value > 0 && (unsigned long) value > maxval)
161 /* xgettext:c-format */
163 _("operand out of range (%ld not between %ld and %lu)"),
164 value, minval, maxval);
168 else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
170 unsigned long maxval = mask;
171 unsigned long val = (unsigned long) value;
173 /* For hosts with a word size > 32 check to see if value has been sign
174 extended beyond 32 bits. If so then ignore these higher sign bits
175 as the user is attempting to store a 32-bit signed value into an
176 unsigned 32-bit field which is allowed. */
177 if (sizeof (unsigned long) > 4 && ((value >> 32) == -1))
182 /* xgettext:c-format */
184 _("operand out of range (0x%lx not between 0 and 0x%lx)"),
191 if (! cgen_signed_overflow_ok_p (cd))
193 long minval = - (1L << (length - 1));
194 long maxval = (1L << (length - 1)) - 1;
196 if (value < minval || value > maxval)
199 /* xgettext:c-format */
200 (errbuf, _("operand out of range (%ld not between %ld and %ld)"),
201 value, minval, maxval);
212 if (CGEN_INSN_LSB0_P)
213 shift = (word_offset + start + 1) - length;
215 shift = total_length - (word_offset + start + length);
216 *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
219 #else /* ! CGEN_INT_INSN_P */
222 unsigned char *bufp = (unsigned char *) buffer + word_offset / 8;
224 insert_1 (cd, value, start, length, word_length, bufp);
227 #endif /* ! CGEN_INT_INSN_P */
232 /* Default insn builder (insert handler).
233 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
234 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
235 recorded in host byte order, otherwise BUFFER is an array of bytes
236 and the value is recorded in target byte order).
237 The result is an error message or NULL if success. */
240 insert_insn_normal (CGEN_CPU_DESC cd,
241 const CGEN_INSN * insn,
242 CGEN_FIELDS * fields,
243 CGEN_INSN_BYTES_PTR buffer,
246 const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
248 const CGEN_SYNTAX_CHAR_TYPE * syn;
250 CGEN_INIT_INSERT (cd);
251 value = CGEN_INSN_BASE_VALUE (insn);
253 /* If we're recording insns as numbers (rather than a string of bytes),
254 target byte order handling is deferred until later. */
258 put_insn_int_value (cd, buffer, cd->base_insn_bitsize,
259 CGEN_FIELDS_BITSIZE (fields), value);
263 cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
264 (unsigned) CGEN_FIELDS_BITSIZE (fields)),
267 #endif /* ! CGEN_INT_INSN_P */
269 /* ??? It would be better to scan the format's fields.
270 Still need to be able to insert a value based on the operand though;
271 e.g. storing a branch displacement that got resolved later.
272 Needs more thought first. */
274 for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn)
278 if (CGEN_SYNTAX_CHAR_P (* syn))
281 errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
291 /* Cover function to store an insn value into an integral insn. Must go here
292 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
295 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
296 CGEN_INSN_BYTES_PTR buf,
301 /* For architectures with insns smaller than the base-insn-bitsize,
302 length may be too big. */
303 if (length > insn_length)
307 int shift = insn_length - length;
308 /* Written this way to avoid undefined behaviour. */
309 CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1;
311 *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift);
316 /* Operand extraction. */
318 #if ! CGEN_INT_INSN_P
320 /* Subroutine of extract_normal.
321 Ensure sufficient bytes are cached in EX_INFO.
322 OFFSET is the offset in bytes from the start of the insn of the value.
323 BYTES is the length of the needed value.
324 Returns 1 for success, 0 for failure. */
326 static CGEN_INLINE int
327 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
328 CGEN_EXTRACT_INFO *ex_info,
333 /* It's doubtful that the middle part has already been fetched so
334 we don't optimize that case. kiss. */
336 disassemble_info *info = (disassemble_info *) ex_info->dis_info;
338 /* First do a quick check. */
339 mask = (1 << bytes) - 1;
340 if (((ex_info->valid >> offset) & mask) == mask)
343 /* Search for the first byte we need to read. */
344 for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1)
345 if (! (mask & ex_info->valid))
353 status = (*info->read_memory_func)
354 (pc, ex_info->insn_bytes + offset, bytes, info);
358 (*info->memory_error_func) (status, pc, info);
362 ex_info->valid |= ((1 << bytes) - 1) << offset;
368 /* Subroutine of extract_normal. */
370 static CGEN_INLINE long
371 extract_1 (CGEN_CPU_DESC cd,
372 CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
377 bfd_vma pc ATTRIBUTE_UNUSED)
382 x = cgen_get_insn_value (cd, bufp, word_length);
384 if (CGEN_INSN_LSB0_P)
385 shift = (start + 1) - length;
387 shift = (word_length - (start + length));
391 #endif /* ! CGEN_INT_INSN_P */
393 /* Default extraction routine.
395 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
396 or sometimes less for cases like the m32r where the base insn size is 32
397 but some insns are 16 bits.
398 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
399 but for generality we take a bitmask of all of them.
400 WORD_OFFSET is the offset in bits from the start of the insn of the value.
401 WORD_LENGTH is the length of the word in bits in which the value resides.
402 START is the starting bit number in the word, architecture origin.
403 LENGTH is the length of VALUE in bits.
404 TOTAL_LENGTH is the total length of the insn in bits.
406 Returns 1 for success, 0 for failure. */
408 /* ??? The return code isn't properly used. wip. */
410 /* ??? This doesn't handle bfd_vma's. Create another function when
414 extract_normal (CGEN_CPU_DESC cd,
415 #if ! CGEN_INT_INSN_P
416 CGEN_EXTRACT_INFO *ex_info,
418 CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
420 CGEN_INSN_INT insn_value,
422 unsigned int word_offset,
425 unsigned int word_length,
426 unsigned int total_length,
427 #if ! CGEN_INT_INSN_P
430 bfd_vma pc ATTRIBUTE_UNUSED,
436 /* If LENGTH is zero, this operand doesn't contribute to the value
437 so give it a standard value of zero. */
444 if (word_length > 32)
447 /* For architectures with insns smaller than the insn-base-bitsize,
448 word_length may be too big. */
449 if (cd->min_insn_bitsize < cd->base_insn_bitsize)
451 if (word_offset + word_length > total_length)
452 word_length = total_length - word_offset;
455 /* Does the value reside in INSN_VALUE, and at the right alignment? */
457 if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length))
459 if (CGEN_INSN_LSB0_P)
460 value = insn_value >> ((word_offset + start + 1) - length);
462 value = insn_value >> (total_length - ( word_offset + start + length));
465 #if ! CGEN_INT_INSN_P
469 unsigned char *bufp = ex_info->insn_bytes + word_offset / 8;
471 if (word_length > 32)
474 if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0)
477 value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc);
480 #endif /* ! CGEN_INT_INSN_P */
482 /* Written this way to avoid undefined behaviour. */
483 mask = (((1L << (length - 1)) - 1) << 1) | 1;
487 if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
488 && (value & (1L << (length - 1))))
496 /* Default insn extractor.
498 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
499 The extracted fields are stored in FIELDS.
500 EX_INFO is used to handle reading variable length insns.
501 Return the length of the insn in bits, or 0 if no match,
502 or -1 if an error occurs fetching data (memory_error_func will have
506 extract_insn_normal (CGEN_CPU_DESC cd,
507 const CGEN_INSN *insn,
508 CGEN_EXTRACT_INFO *ex_info,
509 CGEN_INSN_INT insn_value,
513 const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
514 const CGEN_SYNTAX_CHAR_TYPE *syn;
516 CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
518 CGEN_INIT_EXTRACT (cd);
520 for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
524 if (CGEN_SYNTAX_CHAR_P (*syn))
527 length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
528 ex_info, insn_value, fields, pc);
533 /* We recognized and successfully extracted this insn. */
534 return CGEN_INSN_BITSIZE (insn);
537 /* Machine generated code added here. */
539 const char * m32c_cgen_insert_operand
540 (CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
542 /* Main entry point for operand insertion.
544 This function is basically just a big switch statement. Earlier versions
545 used tables to look up the function to use, but
546 - if the table contains both assembler and disassembler functions then
547 the disassembler contains much of the assembler and vice-versa,
548 - there's a lot of inlining possibilities as things grow,
549 - using a switch statement avoids the function call overhead.
551 This function could be moved into `parse_insn_normal', but keeping it
552 separate makes clear the interface between `parse_insn_normal' and each of
553 the handlers. It's also needed by GAS to insert operands that couldn't be
554 resolved during parsing. */
557 m32c_cgen_insert_operand (CGEN_CPU_DESC cd,
559 CGEN_FIELDS * fields,
560 CGEN_INSN_BYTES_PTR buffer,
561 bfd_vma pc ATTRIBUTE_UNUSED)
563 const char * errmsg = NULL;
564 unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
568 case M32C_OPERAND_A0 :
570 case M32C_OPERAND_A1 :
572 case M32C_OPERAND_AN16_PUSH_S :
573 errmsg = insert_normal (cd, fields->f_4_1, 0, 0, 4, 1, 32, total_length, buffer);
575 case M32C_OPERAND_BIT16AN :
576 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
578 case M32C_OPERAND_BIT16RN :
579 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
581 case M32C_OPERAND_BIT32ANPREFIXED :
582 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
584 case M32C_OPERAND_BIT32ANUNPREFIXED :
585 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
587 case M32C_OPERAND_BIT32RNPREFIXED :
589 long value = fields->f_dst32_rn_prefixed_QI;
590 value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
591 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
594 case M32C_OPERAND_BIT32RNUNPREFIXED :
596 long value = fields->f_dst32_rn_unprefixed_QI;
597 value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
598 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
601 case M32C_OPERAND_BITBASE16_16_S8 :
602 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
604 case M32C_OPERAND_BITBASE16_16_U16 :
606 long value = fields->f_dsp_16_u16;
607 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
608 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
611 case M32C_OPERAND_BITBASE16_16_U8 :
612 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
614 case M32C_OPERAND_BITBASE16_8_U11_S :
617 FLD (f_bitno16_S) = ((FLD (f_bitbase16_u11_S)) & (7));
618 FLD (f_dsp_8_u8) = ((((unsigned int) (FLD (f_bitbase16_u11_S)) >> (3))) & (255));
620 errmsg = insert_normal (cd, fields->f_bitno16_S, 0, 0, 5, 3, 32, total_length, buffer);
623 errmsg = insert_normal (cd, fields->f_dsp_8_u8, 0, 0, 8, 8, 32, total_length, buffer);
628 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
631 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s11_unprefixed)) & (7));
632 FLD (f_dsp_16_s8) = ((int) (FLD (f_bitbase32_16_s11_unprefixed)) >> (3));
634 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
637 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
642 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
645 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s19_unprefixed)) & (7));
646 FLD (f_dsp_16_s16) = ((int) (FLD (f_bitbase32_16_s19_unprefixed)) >> (3));
648 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
652 long value = fields->f_dsp_16_s16;
653 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
654 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
660 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
663 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u11_unprefixed)) & (7));
664 FLD (f_dsp_16_u8) = ((((unsigned int) (FLD (f_bitbase32_16_u11_unprefixed)) >> (3))) & (255));
666 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
669 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
674 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
677 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u19_unprefixed)) & (7));
678 FLD (f_dsp_16_u16) = ((((unsigned int) (FLD (f_bitbase32_16_u19_unprefixed)) >> (3))) & (65535));
680 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
684 long value = fields->f_dsp_16_u16;
685 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
686 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
692 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
695 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u27_unprefixed)) & (7));
696 FLD (f_dsp_16_u16) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed)) >> (3))) & (65535));
697 FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed)) >> (19))) & (255));
699 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
703 long value = fields->f_dsp_16_u16;
704 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
705 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
709 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
714 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
717 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s11_prefixed)) & (7));
718 FLD (f_dsp_24_s8) = ((int) (FLD (f_bitbase32_24_s11_prefixed)) >> (3));
720 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
723 errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
728 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
731 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s19_prefixed)) & (7));
732 FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_s19_prefixed)) >> (3))) & (255));
733 FLD (f_dsp_32_s8) = ((int) (FLD (f_bitbase32_24_s19_prefixed)) >> (11));
735 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
738 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
741 errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
746 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
749 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u11_prefixed)) & (7));
750 FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u11_prefixed)) >> (3))) & (255));
752 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
755 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
760 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
763 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u19_prefixed)) & (7));
764 FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed)) >> (3))) & (255));
765 FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed)) >> (11))) & (255));
767 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
770 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
773 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
778 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
781 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u27_prefixed)) & (7));
782 FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed)) >> (3))) & (255));
783 FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed)) >> (11))) & (65535));
785 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
788 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
792 long value = fields->f_dsp_32_u16;
793 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
794 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
800 case M32C_OPERAND_BITNO16R :
801 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
803 case M32C_OPERAND_BITNO32PREFIXED :
804 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
806 case M32C_OPERAND_BITNO32UNPREFIXED :
807 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
809 case M32C_OPERAND_DSP_10_U6 :
810 errmsg = insert_normal (cd, fields->f_dsp_10_u6, 0, 0, 10, 6, 32, total_length, buffer);
812 case M32C_OPERAND_DSP_16_S16 :
814 long value = fields->f_dsp_16_s16;
815 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
816 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
819 case M32C_OPERAND_DSP_16_S8 :
820 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
822 case M32C_OPERAND_DSP_16_U16 :
824 long value = fields->f_dsp_16_u16;
825 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
826 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
829 case M32C_OPERAND_DSP_16_U20 :
832 FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535));
833 FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_16_u24)) >> (16))) & (255));
836 long value = fields->f_dsp_16_u16;
837 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
838 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
842 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
847 case M32C_OPERAND_DSP_16_U24 :
850 FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535));
851 FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_16_u24)) >> (16))) & (255));
854 long value = fields->f_dsp_16_u16;
855 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
856 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
860 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
865 case M32C_OPERAND_DSP_16_U8 :
866 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
868 case M32C_OPERAND_DSP_24_S16 :
871 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255));
872 FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_24_s16)) >> (8))) & (255));
874 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
877 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
882 case M32C_OPERAND_DSP_24_S8 :
883 errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
885 case M32C_OPERAND_DSP_24_U16 :
888 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u16)) & (255));
889 FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_24_u16)) >> (8))) & (255));
891 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
894 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
899 case M32C_OPERAND_DSP_24_U20 :
902 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255));
903 FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_dsp_24_u24)) >> (8))) & (65535));
905 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
909 long value = fields->f_dsp_32_u16;
910 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
911 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
917 case M32C_OPERAND_DSP_24_U24 :
920 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255));
921 FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_dsp_24_u24)) >> (8))) & (65535));
923 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
927 long value = fields->f_dsp_32_u16;
928 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
929 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
935 case M32C_OPERAND_DSP_24_U8 :
936 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
938 case M32C_OPERAND_DSP_32_S16 :
940 long value = fields->f_dsp_32_s16;
941 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
942 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, buffer);
945 case M32C_OPERAND_DSP_32_S8 :
946 errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
948 case M32C_OPERAND_DSP_32_U16 :
950 long value = fields->f_dsp_32_u16;
951 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
952 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
955 case M32C_OPERAND_DSP_32_U20 :
957 long value = fields->f_dsp_32_u24;
958 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
959 errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
962 case M32C_OPERAND_DSP_32_U24 :
964 long value = fields->f_dsp_32_u24;
965 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
966 errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
969 case M32C_OPERAND_DSP_32_U8 :
970 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
972 case M32C_OPERAND_DSP_40_S16 :
974 long value = fields->f_dsp_40_s16;
975 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
976 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, buffer);
979 case M32C_OPERAND_DSP_40_S8 :
980 errmsg = insert_normal (cd, fields->f_dsp_40_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, buffer);
982 case M32C_OPERAND_DSP_40_U16 :
984 long value = fields->f_dsp_40_u16;
985 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
986 errmsg = insert_normal (cd, value, 0, 32, 8, 16, 32, total_length, buffer);
989 case M32C_OPERAND_DSP_40_U24 :
991 long value = fields->f_dsp_40_u24;
992 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
993 errmsg = insert_normal (cd, value, 0, 32, 8, 24, 32, total_length, buffer);
996 case M32C_OPERAND_DSP_40_U8 :
997 errmsg = insert_normal (cd, fields->f_dsp_40_u8, 0, 32, 8, 8, 32, total_length, buffer);
999 case M32C_OPERAND_DSP_48_S16 :
1001 long value = fields->f_dsp_48_s16;
1002 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1003 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, buffer);
1006 case M32C_OPERAND_DSP_48_S8 :
1007 errmsg = insert_normal (cd, fields->f_dsp_48_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, buffer);
1009 case M32C_OPERAND_DSP_48_U16 :
1011 long value = fields->f_dsp_48_u16;
1012 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1013 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1016 case M32C_OPERAND_DSP_48_U24 :
1019 FLD (f_dsp_64_u8) = ((((unsigned int) (FLD (f_dsp_48_u24)) >> (16))) & (255));
1020 FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_u24)) & (65535));
1023 long value = fields->f_dsp_48_u16;
1024 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1025 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1029 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1034 case M32C_OPERAND_DSP_48_U8 :
1035 errmsg = insert_normal (cd, fields->f_dsp_48_u8, 0, 32, 16, 8, 32, total_length, buffer);
1037 case M32C_OPERAND_DSP_8_S24 :
1039 long value = fields->f_dsp_8_s24;
1040 value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16))));
1041 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 24, 32, total_length, buffer);
1044 case M32C_OPERAND_DSP_8_S8 :
1045 errmsg = insert_normal (cd, fields->f_dsp_8_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, buffer);
1047 case M32C_OPERAND_DSP_8_U16 :
1049 long value = fields->f_dsp_8_u16;
1050 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1051 errmsg = insert_normal (cd, value, 0, 0, 8, 16, 32, total_length, buffer);
1054 case M32C_OPERAND_DSP_8_U24 :
1056 long value = fields->f_dsp_8_u24;
1057 value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
1058 errmsg = insert_normal (cd, value, 0, 0, 8, 24, 32, total_length, buffer);
1061 case M32C_OPERAND_DSP_8_U6 :
1062 errmsg = insert_normal (cd, fields->f_dsp_8_u6, 0, 0, 8, 6, 32, total_length, buffer);
1064 case M32C_OPERAND_DSP_8_U8 :
1065 errmsg = insert_normal (cd, fields->f_dsp_8_u8, 0, 0, 8, 8, 32, total_length, buffer);
1067 case M32C_OPERAND_DST16AN :
1068 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1070 case M32C_OPERAND_DST16AN_S :
1071 errmsg = insert_normal (cd, fields->f_dst16_an_s, 0, 0, 4, 1, 32, total_length, buffer);
1073 case M32C_OPERAND_DST16ANHI :
1074 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1076 case M32C_OPERAND_DST16ANQI :
1077 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1079 case M32C_OPERAND_DST16ANQI_S :
1080 errmsg = insert_normal (cd, fields->f_dst16_rn_QI_s, 0, 0, 5, 1, 32, total_length, buffer);
1082 case M32C_OPERAND_DST16ANSI :
1083 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1085 case M32C_OPERAND_DST16RNEXTQI :
1086 errmsg = insert_normal (cd, fields->f_dst16_rn_ext, 0, 0, 14, 1, 32, total_length, buffer);
1088 case M32C_OPERAND_DST16RNHI :
1089 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
1091 case M32C_OPERAND_DST16RNQI :
1092 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
1094 case M32C_OPERAND_DST16RNQI_S :
1095 errmsg = insert_normal (cd, fields->f_dst16_rn_QI_s, 0, 0, 5, 1, 32, total_length, buffer);
1097 case M32C_OPERAND_DST16RNSI :
1098 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
1100 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
1101 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1103 case M32C_OPERAND_DST32ANPREFIXED :
1104 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1106 case M32C_OPERAND_DST32ANPREFIXEDHI :
1107 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1109 case M32C_OPERAND_DST32ANPREFIXEDQI :
1110 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1112 case M32C_OPERAND_DST32ANPREFIXEDSI :
1113 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1115 case M32C_OPERAND_DST32ANUNPREFIXED :
1116 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1118 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
1119 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1121 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
1122 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1124 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
1125 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1127 case M32C_OPERAND_DST32R0HI_S :
1129 case M32C_OPERAND_DST32R0QI_S :
1131 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
1132 errmsg = insert_normal (cd, fields->f_dst32_rn_ext_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1134 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
1135 errmsg = insert_normal (cd, fields->f_dst32_rn_ext_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1137 case M32C_OPERAND_DST32RNPREFIXEDHI :
1139 long value = fields->f_dst32_rn_prefixed_HI;
1140 value = ((((value) + (2))) % (4));
1141 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
1144 case M32C_OPERAND_DST32RNPREFIXEDQI :
1146 long value = fields->f_dst32_rn_prefixed_QI;
1147 value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
1148 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
1151 case M32C_OPERAND_DST32RNPREFIXEDSI :
1153 long value = fields->f_dst32_rn_prefixed_SI;
1154 value = ((value) + (2));
1155 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
1158 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
1160 long value = fields->f_dst32_rn_unprefixed_HI;
1161 value = ((((value) + (2))) % (4));
1162 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
1165 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
1167 long value = fields->f_dst32_rn_unprefixed_QI;
1168 value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
1169 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
1172 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
1174 long value = fields->f_dst32_rn_unprefixed_SI;
1175 value = ((value) + (2));
1176 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
1179 case M32C_OPERAND_G :
1181 case M32C_OPERAND_IMM_12_S4 :
1182 errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
1184 case M32C_OPERAND_IMM_12_S4N :
1185 errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
1187 case M32C_OPERAND_IMM_13_U3 :
1188 errmsg = insert_normal (cd, fields->f_imm_13_u3, 0, 0, 13, 3, 32, total_length, buffer);
1190 case M32C_OPERAND_IMM_16_HI :
1192 long value = fields->f_dsp_16_s16;
1193 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1194 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
1197 case M32C_OPERAND_IMM_16_QI :
1198 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
1200 case M32C_OPERAND_IMM_16_SI :
1203 FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_dsp_16_s32)) >> (16))) & (65535));
1204 FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_s32)) & (65535));
1207 long value = fields->f_dsp_16_u16;
1208 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1209 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
1214 long value = fields->f_dsp_32_u16;
1215 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1216 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
1222 case M32C_OPERAND_IMM_20_S4 :
1223 errmsg = insert_normal (cd, fields->f_imm_20_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, buffer);
1225 case M32C_OPERAND_IMM_24_HI :
1228 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255));
1229 FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_24_s16)) >> (8))) & (255));
1231 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1234 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
1239 case M32C_OPERAND_IMM_24_QI :
1240 errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
1242 case M32C_OPERAND_IMM_24_SI :
1245 FLD (f_dsp_32_u24) = ((((unsigned int) (FLD (f_dsp_24_s32)) >> (8))) & (16777215));
1246 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s32)) & (255));
1248 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1252 long value = fields->f_dsp_32_u24;
1253 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
1254 errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
1260 case M32C_OPERAND_IMM_32_HI :
1262 long value = fields->f_dsp_32_s16;
1263 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1264 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, buffer);
1267 case M32C_OPERAND_IMM_32_QI :
1268 errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
1270 case M32C_OPERAND_IMM_32_SI :
1272 long value = fields->f_dsp_32_s32;
1273 value = EXTSISI (((((((((unsigned int) (value) >> (24))) & (255))) | (((((unsigned int) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000)))))));
1274 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 32, 32, total_length, buffer);
1277 case M32C_OPERAND_IMM_40_HI :
1279 long value = fields->f_dsp_40_s16;
1280 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1281 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, buffer);
1284 case M32C_OPERAND_IMM_40_QI :
1285 errmsg = insert_normal (cd, fields->f_dsp_40_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, buffer);
1287 case M32C_OPERAND_IMM_40_SI :
1290 FLD (f_dsp_64_u8) = ((((unsigned int) (FLD (f_dsp_40_s32)) >> (24))) & (255));
1291 FLD (f_dsp_40_u24) = ((FLD (f_dsp_40_s32)) & (16777215));
1294 long value = fields->f_dsp_40_u24;
1295 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
1296 errmsg = insert_normal (cd, value, 0, 32, 8, 24, 32, total_length, buffer);
1300 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1305 case M32C_OPERAND_IMM_48_HI :
1307 long value = fields->f_dsp_48_s16;
1308 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1309 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, buffer);
1312 case M32C_OPERAND_IMM_48_QI :
1313 errmsg = insert_normal (cd, fields->f_dsp_48_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, buffer);
1315 case M32C_OPERAND_IMM_48_SI :
1318 FLD (f_dsp_64_u16) = ((((unsigned int) (FLD (f_dsp_48_s32)) >> (16))) & (65535));
1319 FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_s32)) & (65535));
1322 long value = fields->f_dsp_48_u16;
1323 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1324 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1329 long value = fields->f_dsp_64_u16;
1330 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1331 errmsg = insert_normal (cd, value, 0, 64, 0, 16, 32, total_length, buffer);
1337 case M32C_OPERAND_IMM_56_HI :
1340 FLD (f_dsp_56_u8) = ((FLD (f_dsp_56_s16)) & (255));
1341 FLD (f_dsp_64_u8) = ((((unsigned int) (FLD (f_dsp_56_s16)) >> (8))) & (255));
1343 errmsg = insert_normal (cd, fields->f_dsp_56_u8, 0, 32, 24, 8, 32, total_length, buffer);
1346 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1351 case M32C_OPERAND_IMM_56_QI :
1352 errmsg = insert_normal (cd, fields->f_dsp_56_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 24, 8, 32, total_length, buffer);
1354 case M32C_OPERAND_IMM_64_HI :
1356 long value = fields->f_dsp_64_s16;
1357 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1358 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 64, 0, 16, 32, total_length, buffer);
1361 case M32C_OPERAND_IMM_8_HI :
1363 long value = fields->f_dsp_8_s16;
1364 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1365 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 16, 32, total_length, buffer);
1368 case M32C_OPERAND_IMM_8_QI :
1369 errmsg = insert_normal (cd, fields->f_dsp_8_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, buffer);
1371 case M32C_OPERAND_IMM_8_S4 :
1372 errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
1374 case M32C_OPERAND_IMM_8_S4N :
1375 errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
1377 case M32C_OPERAND_IMM_SH_12_S4 :
1378 errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
1380 case M32C_OPERAND_IMM_SH_20_S4 :
1381 errmsg = insert_normal (cd, fields->f_imm_20_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, buffer);
1383 case M32C_OPERAND_IMM_SH_8_S4 :
1384 errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
1386 case M32C_OPERAND_IMM1_S :
1388 long value = fields->f_imm1_S;
1389 value = ((value) - (1));
1390 errmsg = insert_normal (cd, value, 0, 0, 2, 1, 32, total_length, buffer);
1393 case M32C_OPERAND_IMM3_S :
1396 FLD (f_7_1) = ((((FLD (f_imm3_S)) - (1))) & (1));
1397 FLD (f_2_2) = ((((unsigned int) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3));
1399 errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
1402 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
1407 case M32C_OPERAND_LAB_16_8 :
1409 long value = fields->f_lab_16_8;
1410 value = ((value) - (((pc) + (2))));
1411 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 8, 32, total_length, buffer);
1414 case M32C_OPERAND_LAB_24_8 :
1416 long value = fields->f_lab_24_8;
1417 value = ((value) - (((pc) + (2))));
1418 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 24, 8, 32, total_length, buffer);
1421 case M32C_OPERAND_LAB_32_8 :
1423 long value = fields->f_lab_32_8;
1424 value = ((value) - (((pc) + (2))));
1425 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 0, 8, 32, total_length, buffer);
1428 case M32C_OPERAND_LAB_40_8 :
1430 long value = fields->f_lab_40_8;
1431 value = ((value) - (((pc) + (2))));
1432 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 8, 8, 32, total_length, buffer);
1435 case M32C_OPERAND_LAB_5_3 :
1437 long value = fields->f_lab_5_3;
1438 value = ((value) - (((pc) + (2))));
1439 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 3, 32, total_length, buffer);
1442 case M32C_OPERAND_LAB_8_16 :
1444 long value = fields->f_lab_8_16;
1445 value = ((((((((value) - (((pc) + (1))))) & (255))) << (8))) | (((unsigned int) (((((value) - (((pc) + (1))))) & (65535))) >> (8))));
1446 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGN_OPT)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 16, 32, total_length, buffer);
1449 case M32C_OPERAND_LAB_8_24 :
1451 long value = fields->f_lab_8_24;
1452 value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
1453 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 24, 32, total_length, buffer);
1456 case M32C_OPERAND_LAB_8_8 :
1458 long value = fields->f_lab_8_8;
1459 value = ((value) - (((pc) + (1))));
1460 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 8, 32, total_length, buffer);
1463 case M32C_OPERAND_LAB32_JMP_S :
1467 tmp_val = ((((FLD (f_lab32_jmp_s)) - (pc))) - (2));
1468 FLD (f_7_1) = ((tmp_val) & (1));
1469 FLD (f_2_2) = ((unsigned int) (tmp_val) >> (1));
1471 errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
1474 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
1479 case M32C_OPERAND_Q :
1481 case M32C_OPERAND_R0 :
1483 case M32C_OPERAND_R0H :
1485 case M32C_OPERAND_R0L :
1487 case M32C_OPERAND_R1 :
1489 case M32C_OPERAND_R1R2R0 :
1491 case M32C_OPERAND_R2 :
1493 case M32C_OPERAND_R2R0 :
1495 case M32C_OPERAND_R3 :
1497 case M32C_OPERAND_R3R1 :
1499 case M32C_OPERAND_REGSETPOP :
1500 errmsg = insert_normal (cd, fields->f_8_8, 0, 0, 8, 8, 32, total_length, buffer);
1502 case M32C_OPERAND_REGSETPUSH :
1503 errmsg = insert_normal (cd, fields->f_8_8, 0, 0, 8, 8, 32, total_length, buffer);
1505 case M32C_OPERAND_RN16_PUSH_S :
1506 errmsg = insert_normal (cd, fields->f_4_1, 0, 0, 4, 1, 32, total_length, buffer);
1508 case M32C_OPERAND_S :
1510 case M32C_OPERAND_SRC16AN :
1511 errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
1513 case M32C_OPERAND_SRC16ANHI :
1514 errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
1516 case M32C_OPERAND_SRC16ANQI :
1517 errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
1519 case M32C_OPERAND_SRC16RNHI :
1520 errmsg = insert_normal (cd, fields->f_src16_rn, 0, 0, 10, 2, 32, total_length, buffer);
1522 case M32C_OPERAND_SRC16RNQI :
1523 errmsg = insert_normal (cd, fields->f_src16_rn, 0, 0, 10, 2, 32, total_length, buffer);
1525 case M32C_OPERAND_SRC32ANPREFIXED :
1526 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1528 case M32C_OPERAND_SRC32ANPREFIXEDHI :
1529 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1531 case M32C_OPERAND_SRC32ANPREFIXEDQI :
1532 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1534 case M32C_OPERAND_SRC32ANPREFIXEDSI :
1535 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1537 case M32C_OPERAND_SRC32ANUNPREFIXED :
1538 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1540 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
1541 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1543 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
1544 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1546 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
1547 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1549 case M32C_OPERAND_SRC32RNPREFIXEDHI :
1551 long value = fields->f_src32_rn_prefixed_HI;
1552 value = ((((value) + (2))) % (4));
1553 errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
1556 case M32C_OPERAND_SRC32RNPREFIXEDQI :
1558 long value = fields->f_src32_rn_prefixed_QI;
1559 value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
1560 errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
1563 case M32C_OPERAND_SRC32RNPREFIXEDSI :
1565 long value = fields->f_src32_rn_prefixed_SI;
1566 value = ((value) + (2));
1567 errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
1570 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
1572 long value = fields->f_src32_rn_unprefixed_HI;
1573 value = ((((value) + (2))) % (4));
1574 errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
1577 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
1579 long value = fields->f_src32_rn_unprefixed_QI;
1580 value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
1581 errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
1584 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
1586 long value = fields->f_src32_rn_unprefixed_SI;
1587 value = ((value) + (2));
1588 errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
1591 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
1592 errmsg = insert_normal (cd, fields->f_5_1, 0, 0, 5, 1, 32, total_length, buffer);
1594 case M32C_OPERAND_X :
1596 case M32C_OPERAND_Z :
1598 case M32C_OPERAND_COND16_16 :
1599 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
1601 case M32C_OPERAND_COND16_24 :
1602 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1604 case M32C_OPERAND_COND16_32 :
1605 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
1607 case M32C_OPERAND_COND16C :
1608 errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
1610 case M32C_OPERAND_COND16J :
1611 errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
1613 case M32C_OPERAND_COND16J5 :
1614 errmsg = insert_normal (cd, fields->f_cond16j_5, 0, 0, 5, 3, 32, total_length, buffer);
1616 case M32C_OPERAND_COND32 :
1619 FLD (f_9_1) = ((((unsigned int) (FLD (f_cond32)) >> (3))) & (1));
1620 FLD (f_13_3) = ((FLD (f_cond32)) & (7));
1622 errmsg = insert_normal (cd, fields->f_9_1, 0, 0, 9, 1, 32, total_length, buffer);
1625 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1630 case M32C_OPERAND_COND32_16 :
1631 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
1633 case M32C_OPERAND_COND32_24 :
1634 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1636 case M32C_OPERAND_COND32_32 :
1637 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
1639 case M32C_OPERAND_COND32_40 :
1640 errmsg = insert_normal (cd, fields->f_dsp_40_u8, 0, 32, 8, 8, 32, total_length, buffer);
1642 case M32C_OPERAND_COND32J :
1645 FLD (f_1_3) = ((((unsigned int) (FLD (f_cond32j)) >> (1))) & (7));
1646 FLD (f_7_1) = ((FLD (f_cond32j)) & (1));
1648 errmsg = insert_normal (cd, fields->f_1_3, 0, 0, 1, 3, 32, total_length, buffer);
1651 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
1656 case M32C_OPERAND_CR1_PREFIXED_32 :
1657 errmsg = insert_normal (cd, fields->f_21_3, 0, 0, 21, 3, 32, total_length, buffer);
1659 case M32C_OPERAND_CR1_UNPREFIXED_32 :
1660 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1662 case M32C_OPERAND_CR16 :
1663 errmsg = insert_normal (cd, fields->f_9_3, 0, 0, 9, 3, 32, total_length, buffer);
1665 case M32C_OPERAND_CR2_32 :
1666 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1668 case M32C_OPERAND_CR3_PREFIXED_32 :
1669 errmsg = insert_normal (cd, fields->f_21_3, 0, 0, 21, 3, 32, total_length, buffer);
1671 case M32C_OPERAND_CR3_UNPREFIXED_32 :
1672 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1674 case M32C_OPERAND_FLAGS16 :
1675 errmsg = insert_normal (cd, fields->f_9_3, 0, 0, 9, 3, 32, total_length, buffer);
1677 case M32C_OPERAND_FLAGS32 :
1678 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1680 case M32C_OPERAND_SCCOND32 :
1681 errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
1683 case M32C_OPERAND_SIZE :
1687 /* xgettext:c-format */
1688 fprintf (stderr, _("Unrecognized field %d while building insn.\n"),
1696 int m32c_cgen_extract_operand
1697 (CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
1699 /* Main entry point for operand extraction.
1700 The result is <= 0 for error, >0 for success.
1701 ??? Actual values aren't well defined right now.
1703 This function is basically just a big switch statement. Earlier versions
1704 used tables to look up the function to use, but
1705 - if the table contains both assembler and disassembler functions then
1706 the disassembler contains much of the assembler and vice-versa,
1707 - there's a lot of inlining possibilities as things grow,
1708 - using a switch statement avoids the function call overhead.
1710 This function could be moved into `print_insn_normal', but keeping it
1711 separate makes clear the interface between `print_insn_normal' and each of
1715 m32c_cgen_extract_operand (CGEN_CPU_DESC cd,
1717 CGEN_EXTRACT_INFO *ex_info,
1718 CGEN_INSN_INT insn_value,
1719 CGEN_FIELDS * fields,
1722 /* Assume success (for those operands that are nops). */
1724 unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
1728 case M32C_OPERAND_A0 :
1730 case M32C_OPERAND_A1 :
1732 case M32C_OPERAND_AN16_PUSH_S :
1733 length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_4_1);
1735 case M32C_OPERAND_BIT16AN :
1736 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
1738 case M32C_OPERAND_BIT16RN :
1739 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
1741 case M32C_OPERAND_BIT32ANPREFIXED :
1742 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
1744 case M32C_OPERAND_BIT32ANUNPREFIXED :
1745 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
1747 case M32C_OPERAND_BIT32RNPREFIXED :
1750 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
1751 value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
1752 fields->f_dst32_rn_prefixed_QI = value;
1755 case M32C_OPERAND_BIT32RNUNPREFIXED :
1758 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
1759 value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
1760 fields->f_dst32_rn_unprefixed_QI = value;
1763 case M32C_OPERAND_BITBASE16_16_S8 :
1764 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_s8);
1766 case M32C_OPERAND_BITBASE16_16_U16 :
1769 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1770 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1771 fields->f_dsp_16_u16 = value;
1774 case M32C_OPERAND_BITBASE16_16_U8 :
1775 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1777 case M32C_OPERAND_BITBASE16_8_U11_S :
1779 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_bitno16_S);
1780 if (length <= 0) break;
1781 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_u8);
1782 if (length <= 0) break;
1784 FLD (f_bitbase16_u11_S) = ((((FLD (f_dsp_8_u8)) << (3))) | (FLD (f_bitno16_S)));
1788 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
1790 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1791 if (length <= 0) break;
1792 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_s8);
1793 if (length <= 0) break;
1795 FLD (f_bitbase32_16_s11_unprefixed) = ((((FLD (f_dsp_16_s8)) << (3))) | (FLD (f_bitno32_unprefixed)));
1799 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
1801 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1802 if (length <= 0) break;
1805 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
1806 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1807 fields->f_dsp_16_s16 = value;
1809 if (length <= 0) break;
1811 FLD (f_bitbase32_16_s19_unprefixed) = ((((FLD (f_dsp_16_s16)) << (3))) | (FLD (f_bitno32_unprefixed)));
1815 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
1817 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1818 if (length <= 0) break;
1819 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1820 if (length <= 0) break;
1822 FLD (f_bitbase32_16_u11_unprefixed) = ((((FLD (f_dsp_16_u8)) << (3))) | (FLD (f_bitno32_unprefixed)));
1826 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
1828 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1829 if (length <= 0) break;
1832 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1833 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1834 fields->f_dsp_16_u16 = value;
1836 if (length <= 0) break;
1838 FLD (f_bitbase32_16_u19_unprefixed) = ((((FLD (f_dsp_16_u16)) << (3))) | (FLD (f_bitno32_unprefixed)));
1842 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
1844 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1845 if (length <= 0) break;
1848 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1849 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1850 fields->f_dsp_16_u16 = value;
1852 if (length <= 0) break;
1853 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
1854 if (length <= 0) break;
1856 FLD (f_bitbase32_16_u27_unprefixed) = ((((FLD (f_dsp_16_u16)) << (3))) | (((((FLD (f_dsp_32_u8)) << (19))) | (FLD (f_bitno32_unprefixed)))));
1860 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
1862 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1863 if (length <= 0) break;
1864 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_s8);
1865 if (length <= 0) break;
1867 FLD (f_bitbase32_24_s11_prefixed) = ((((FLD (f_dsp_24_s8)) << (3))) | (FLD (f_bitno32_prefixed)));
1871 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
1873 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1874 if (length <= 0) break;
1875 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1876 if (length <= 0) break;
1877 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_s8);
1878 if (length <= 0) break;
1880 FLD (f_bitbase32_24_s19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_s8)) << (11))) | (FLD (f_bitno32_prefixed)))));
1884 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
1886 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1887 if (length <= 0) break;
1888 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1889 if (length <= 0) break;
1891 FLD (f_bitbase32_24_u11_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (FLD (f_bitno32_prefixed)));
1895 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
1897 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1898 if (length <= 0) break;
1899 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1900 if (length <= 0) break;
1901 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
1902 if (length <= 0) break;
1904 FLD (f_bitbase32_24_u19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_u8)) << (11))) | (FLD (f_bitno32_prefixed)))));
1908 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
1910 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1911 if (length <= 0) break;
1912 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1913 if (length <= 0) break;
1916 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
1917 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1918 fields->f_dsp_32_u16 = value;
1920 if (length <= 0) break;
1922 FLD (f_bitbase32_24_u27_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_u16)) << (11))) | (FLD (f_bitno32_prefixed)))));
1926 case M32C_OPERAND_BITNO16R :
1927 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1929 case M32C_OPERAND_BITNO32PREFIXED :
1930 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1932 case M32C_OPERAND_BITNO32UNPREFIXED :
1933 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1935 case M32C_OPERAND_DSP_10_U6 :
1936 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 6, 32, total_length, pc, & fields->f_dsp_10_u6);
1938 case M32C_OPERAND_DSP_16_S16 :
1941 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
1942 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1943 fields->f_dsp_16_s16 = value;
1946 case M32C_OPERAND_DSP_16_S8 :
1947 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_s8);
1949 case M32C_OPERAND_DSP_16_U16 :
1952 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1953 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1954 fields->f_dsp_16_u16 = value;
1957 case M32C_OPERAND_DSP_16_U20 :
1961 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1962 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1963 fields->f_dsp_16_u16 = value;
1965 if (length <= 0) break;
1966 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
1967 if (length <= 0) break;
1969 FLD (f_dsp_16_u24) = ((((FLD (f_dsp_32_u8)) << (16))) | (FLD (f_dsp_16_u16)));
1973 case M32C_OPERAND_DSP_16_U24 :
1977 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1978 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1979 fields->f_dsp_16_u16 = value;
1981 if (length <= 0) break;
1982 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
1983 if (length <= 0) break;
1985 FLD (f_dsp_16_u24) = ((((FLD (f_dsp_32_u8)) << (16))) | (FLD (f_dsp_16_u16)));
1989 case M32C_OPERAND_DSP_16_U8 :
1990 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1992 case M32C_OPERAND_DSP_24_S16 :
1994 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1995 if (length <= 0) break;
1996 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
1997 if (length <= 0) break;
1999 FLD (f_dsp_24_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8))))));
2003 case M32C_OPERAND_DSP_24_S8 :
2004 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_s8);
2006 case M32C_OPERAND_DSP_24_U16 :
2008 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2009 if (length <= 0) break;
2010 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2011 if (length <= 0) break;
2013 FLD (f_dsp_24_u16) = ((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8)));
2017 case M32C_OPERAND_DSP_24_U20 :
2019 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2020 if (length <= 0) break;
2023 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2024 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2025 fields->f_dsp_32_u16 = value;
2027 if (length <= 0) break;
2029 FLD (f_dsp_24_u24) = ((((FLD (f_dsp_32_u16)) << (8))) | (FLD (f_dsp_24_u8)));
2033 case M32C_OPERAND_DSP_24_U24 :
2035 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2036 if (length <= 0) break;
2039 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2040 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2041 fields->f_dsp_32_u16 = value;
2043 if (length <= 0) break;
2045 FLD (f_dsp_24_u24) = ((((FLD (f_dsp_32_u16)) << (8))) | (FLD (f_dsp_24_u8)));
2049 case M32C_OPERAND_DSP_24_U8 :
2050 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2052 case M32C_OPERAND_DSP_32_S16 :
2055 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value);
2056 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2057 fields->f_dsp_32_s16 = value;
2060 case M32C_OPERAND_DSP_32_S8 :
2061 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_s8);
2063 case M32C_OPERAND_DSP_32_U16 :
2066 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2067 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2068 fields->f_dsp_32_u16 = value;
2071 case M32C_OPERAND_DSP_32_U20 :
2074 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
2075 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2076 fields->f_dsp_32_u24 = value;
2079 case M32C_OPERAND_DSP_32_U24 :
2082 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
2083 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2084 fields->f_dsp_32_u24 = value;
2087 case M32C_OPERAND_DSP_32_U8 :
2088 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2090 case M32C_OPERAND_DSP_40_S16 :
2093 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, pc, & value);
2094 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2095 fields->f_dsp_40_s16 = value;
2098 case M32C_OPERAND_DSP_40_S8 :
2099 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_s8);
2101 case M32C_OPERAND_DSP_40_U16 :
2104 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 16, 32, total_length, pc, & value);
2105 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2106 fields->f_dsp_40_u16 = value;
2109 case M32C_OPERAND_DSP_40_U24 :
2112 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value);
2113 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2114 fields->f_dsp_40_u24 = value;
2117 case M32C_OPERAND_DSP_40_U8 :
2118 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_u8);
2120 case M32C_OPERAND_DSP_48_S16 :
2123 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, pc, & value);
2124 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2125 fields->f_dsp_48_s16 = value;
2128 case M32C_OPERAND_DSP_48_S8 :
2129 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, pc, & fields->f_dsp_48_s8);
2131 case M32C_OPERAND_DSP_48_U16 :
2134 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2135 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2136 fields->f_dsp_48_u16 = value;
2139 case M32C_OPERAND_DSP_48_U24 :
2143 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2144 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2145 fields->f_dsp_48_u16 = value;
2147 if (length <= 0) break;
2148 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2149 if (length <= 0) break;
2151 FLD (f_dsp_48_u24) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u8)) << (16))) & (16711680))));
2155 case M32C_OPERAND_DSP_48_U8 :
2156 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 8, 32, total_length, pc, & fields->f_dsp_48_u8);
2158 case M32C_OPERAND_DSP_8_S24 :
2161 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 24, 32, total_length, pc, & value);
2162 value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16))));
2163 fields->f_dsp_8_s24 = value;
2166 case M32C_OPERAND_DSP_8_S8 :
2167 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_s8);
2169 case M32C_OPERAND_DSP_8_U16 :
2172 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 16, 32, total_length, pc, & value);
2173 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2174 fields->f_dsp_8_u16 = value;
2177 case M32C_OPERAND_DSP_8_U24 :
2180 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 24, 32, total_length, pc, & value);
2181 value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
2182 fields->f_dsp_8_u24 = value;
2185 case M32C_OPERAND_DSP_8_U6 :
2186 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 6, 32, total_length, pc, & fields->f_dsp_8_u6);
2188 case M32C_OPERAND_DSP_8_U8 :
2189 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_u8);
2191 case M32C_OPERAND_DST16AN :
2192 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2194 case M32C_OPERAND_DST16AN_S :
2195 length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_dst16_an_s);
2197 case M32C_OPERAND_DST16ANHI :
2198 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2200 case M32C_OPERAND_DST16ANQI :
2201 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2203 case M32C_OPERAND_DST16ANQI_S :
2204 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_dst16_rn_QI_s);
2206 case M32C_OPERAND_DST16ANSI :
2207 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2209 case M32C_OPERAND_DST16RNEXTQI :
2210 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 1, 32, total_length, pc, & fields->f_dst16_rn_ext);
2212 case M32C_OPERAND_DST16RNHI :
2213 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
2215 case M32C_OPERAND_DST16RNQI :
2216 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
2218 case M32C_OPERAND_DST16RNQI_S :
2219 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_dst16_rn_QI_s);
2221 case M32C_OPERAND_DST16RNSI :
2222 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
2224 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
2225 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2227 case M32C_OPERAND_DST32ANPREFIXED :
2228 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2230 case M32C_OPERAND_DST32ANPREFIXEDHI :
2231 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2233 case M32C_OPERAND_DST32ANPREFIXEDQI :
2234 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2236 case M32C_OPERAND_DST32ANPREFIXEDSI :
2237 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2239 case M32C_OPERAND_DST32ANUNPREFIXED :
2240 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2242 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
2243 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2245 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
2246 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2248 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
2249 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2251 case M32C_OPERAND_DST32R0HI_S :
2253 case M32C_OPERAND_DST32R0QI_S :
2255 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
2256 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_rn_ext_unprefixed);
2258 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
2259 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_rn_ext_unprefixed);
2261 case M32C_OPERAND_DST32RNPREFIXEDHI :
2264 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
2265 value = ((((value) + (2))) % (4));
2266 fields->f_dst32_rn_prefixed_HI = value;
2269 case M32C_OPERAND_DST32RNPREFIXEDQI :
2272 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
2273 value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2274 fields->f_dst32_rn_prefixed_QI = value;
2277 case M32C_OPERAND_DST32RNPREFIXEDSI :
2280 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
2281 value = ((value) - (2));
2282 fields->f_dst32_rn_prefixed_SI = value;
2285 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
2288 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
2289 value = ((((value) + (2))) % (4));
2290 fields->f_dst32_rn_unprefixed_HI = value;
2293 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
2296 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
2297 value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2298 fields->f_dst32_rn_unprefixed_QI = value;
2301 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
2304 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
2305 value = ((value) - (2));
2306 fields->f_dst32_rn_unprefixed_SI = value;
2309 case M32C_OPERAND_G :
2311 case M32C_OPERAND_IMM_12_S4 :
2312 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, pc, & fields->f_imm_12_s4);
2314 case M32C_OPERAND_IMM_12_S4N :
2315 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, pc, & fields->f_imm_12_s4);
2317 case M32C_OPERAND_IMM_13_U3 :
2318 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_imm_13_u3);
2320 case M32C_OPERAND_IMM_16_HI :
2323 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
2324 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2325 fields->f_dsp_16_s16 = value;
2328 case M32C_OPERAND_IMM_16_QI :
2329 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_s8);
2331 case M32C_OPERAND_IMM_16_SI :
2335 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
2336 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2337 fields->f_dsp_16_u16 = value;
2339 if (length <= 0) break;
2342 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2343 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2344 fields->f_dsp_32_u16 = value;
2346 if (length <= 0) break;
2348 FLD (f_dsp_16_s32) = ((((FLD (f_dsp_16_u16)) & (65535))) | (((((FLD (f_dsp_32_u16)) << (16))) & (0xffff0000))));
2352 case M32C_OPERAND_IMM_20_S4 :
2353 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, pc, & fields->f_imm_20_s4);
2355 case M32C_OPERAND_IMM_24_HI :
2357 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2358 if (length <= 0) break;
2359 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2360 if (length <= 0) break;
2362 FLD (f_dsp_24_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8))))));
2366 case M32C_OPERAND_IMM_24_QI :
2367 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_s8);
2369 case M32C_OPERAND_IMM_24_SI :
2371 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2372 if (length <= 0) break;
2375 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
2376 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2377 fields->f_dsp_32_u24 = value;
2379 if (length <= 0) break;
2381 FLD (f_dsp_24_s32) = ((((FLD (f_dsp_24_u8)) & (255))) | (((((FLD (f_dsp_32_u24)) << (8))) & (0xffffff00))));
2385 case M32C_OPERAND_IMM_32_HI :
2388 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value);
2389 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2390 fields->f_dsp_32_s16 = value;
2393 case M32C_OPERAND_IMM_32_QI :
2394 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_s8);
2396 case M32C_OPERAND_IMM_32_SI :
2399 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 32, 32, total_length, pc, & value);
2400 value = EXTSISI (((((((((unsigned int) (value) >> (24))) & (255))) | (((((unsigned int) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000)))))));
2401 fields->f_dsp_32_s32 = value;
2404 case M32C_OPERAND_IMM_40_HI :
2407 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, pc, & value);
2408 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2409 fields->f_dsp_40_s16 = value;
2412 case M32C_OPERAND_IMM_40_QI :
2413 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_s8);
2415 case M32C_OPERAND_IMM_40_SI :
2419 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value);
2420 value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2421 fields->f_dsp_40_u24 = value;
2423 if (length <= 0) break;
2424 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2425 if (length <= 0) break;
2427 FLD (f_dsp_40_s32) = ((((FLD (f_dsp_40_u24)) & (16777215))) | (((((FLD (f_dsp_64_u8)) << (24))) & (0xff000000))));
2431 case M32C_OPERAND_IMM_48_HI :
2434 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, pc, & value);
2435 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2436 fields->f_dsp_48_s16 = value;
2439 case M32C_OPERAND_IMM_48_QI :
2440 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, pc, & fields->f_dsp_48_s8);
2442 case M32C_OPERAND_IMM_48_SI :
2446 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2447 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2448 fields->f_dsp_48_u16 = value;
2450 if (length <= 0) break;
2453 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 16, 32, total_length, pc, & value);
2454 value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2455 fields->f_dsp_64_u16 = value;
2457 if (length <= 0) break;
2459 FLD (f_dsp_48_s32) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u16)) << (16))) & (0xffff0000))));
2463 case M32C_OPERAND_IMM_56_HI :
2465 length = extract_normal (cd, ex_info, insn_value, 0, 32, 24, 8, 32, total_length, pc, & fields->f_dsp_56_u8);
2466 if (length <= 0) break;
2467 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2468 if (length <= 0) break;
2470 FLD (f_dsp_56_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_64_u8)) << (8))) | (FLD (f_dsp_56_u8))))));
2474 case M32C_OPERAND_IMM_56_QI :
2475 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 24, 8, 32, total_length, pc, & fields->f_dsp_56_s8);
2477 case M32C_OPERAND_IMM_64_HI :
2480 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 64, 0, 16, 32, total_length, pc, & value);
2481 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2482 fields->f_dsp_64_s16 = value;
2485 case M32C_OPERAND_IMM_8_HI :
2488 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 16, 32, total_length, pc, & value);
2489 value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2490 fields->f_dsp_8_s16 = value;
2493 case M32C_OPERAND_IMM_8_QI :
2494 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_s8);
2496 case M32C_OPERAND_IMM_8_S4 :
2497 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, pc, & fields->f_imm_8_s4);
2499 case M32C_OPERAND_IMM_8_S4N :
2500 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, pc, & fields->f_imm_8_s4);
2502 case M32C_OPERAND_IMM_SH_12_S4 :
2503 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, pc, & fields->f_imm_12_s4);
2505 case M32C_OPERAND_IMM_SH_20_S4 :
2506 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, pc, & fields->f_imm_20_s4);
2508 case M32C_OPERAND_IMM_SH_8_S4 :
2509 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, pc, & fields->f_imm_8_s4);
2511 case M32C_OPERAND_IMM1_S :
2514 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 1, 32, total_length, pc, & value);
2515 value = ((value) + (1));
2516 fields->f_imm1_S = value;
2519 case M32C_OPERAND_IMM3_S :
2521 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
2522 if (length <= 0) break;
2523 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
2524 if (length <= 0) break;
2526 FLD (f_imm3_S) = ((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (1));
2530 case M32C_OPERAND_LAB_16_8 :
2533 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 8, 32, total_length, pc, & value);
2534 value = ((value) + (((pc) + (2))));
2535 fields->f_lab_16_8 = value;
2538 case M32C_OPERAND_LAB_24_8 :
2541 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 24, 8, 32, total_length, pc, & value);
2542 value = ((value) + (((pc) + (2))));
2543 fields->f_lab_24_8 = value;
2546 case M32C_OPERAND_LAB_32_8 :
2549 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 0, 8, 32, total_length, pc, & value);
2550 value = ((value) + (((pc) + (2))));
2551 fields->f_lab_32_8 = value;
2554 case M32C_OPERAND_LAB_40_8 :
2557 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 8, 8, 32, total_length, pc, & value);
2558 value = ((value) + (((pc) + (2))));
2559 fields->f_lab_40_8 = value;
2562 case M32C_OPERAND_LAB_5_3 :
2565 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 3, 32, total_length, pc, & value);
2566 value = ((value) + (((pc) + (2))));
2567 fields->f_lab_5_3 = value;
2570 case M32C_OPERAND_LAB_8_16 :
2573 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGN_OPT)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 16, 32, total_length, pc, & value);
2574 value = ((((((unsigned int) (((value) & (65535))) >> (8))) | (((int) (((((value) & (255))) << (24))) >> (16))))) + (((pc) + (1))));
2575 fields->f_lab_8_16 = value;
2578 case M32C_OPERAND_LAB_8_24 :
2581 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 24, 32, total_length, pc, & value);
2582 value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
2583 fields->f_lab_8_24 = value;
2586 case M32C_OPERAND_LAB_8_8 :
2589 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 8, 32, total_length, pc, & value);
2590 value = ((value) + (((pc) + (1))));
2591 fields->f_lab_8_8 = value;
2594 case M32C_OPERAND_LAB32_JMP_S :
2596 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
2597 if (length <= 0) break;
2598 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
2599 if (length <= 0) break;
2601 FLD (f_lab32_jmp_s) = ((pc) + (((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (2))));
2605 case M32C_OPERAND_Q :
2607 case M32C_OPERAND_R0 :
2609 case M32C_OPERAND_R0H :
2611 case M32C_OPERAND_R0L :
2613 case M32C_OPERAND_R1 :
2615 case M32C_OPERAND_R1R2R0 :
2617 case M32C_OPERAND_R2 :
2619 case M32C_OPERAND_R2R0 :
2621 case M32C_OPERAND_R3 :
2623 case M32C_OPERAND_R3R1 :
2625 case M32C_OPERAND_REGSETPOP :
2626 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_8_8);
2628 case M32C_OPERAND_REGSETPUSH :
2629 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_8_8);
2631 case M32C_OPERAND_RN16_PUSH_S :
2632 length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_4_1);
2634 case M32C_OPERAND_S :
2636 case M32C_OPERAND_SRC16AN :
2637 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
2639 case M32C_OPERAND_SRC16ANHI :
2640 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
2642 case M32C_OPERAND_SRC16ANQI :
2643 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
2645 case M32C_OPERAND_SRC16RNHI :
2646 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_src16_rn);
2648 case M32C_OPERAND_SRC16RNQI :
2649 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_src16_rn);
2651 case M32C_OPERAND_SRC32ANPREFIXED :
2652 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2654 case M32C_OPERAND_SRC32ANPREFIXEDHI :
2655 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2657 case M32C_OPERAND_SRC32ANPREFIXEDQI :
2658 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2660 case M32C_OPERAND_SRC32ANPREFIXEDSI :
2661 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2663 case M32C_OPERAND_SRC32ANUNPREFIXED :
2664 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2666 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
2667 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2669 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
2670 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2672 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
2673 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2675 case M32C_OPERAND_SRC32RNPREFIXEDHI :
2678 length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
2679 value = ((((value) + (2))) % (4));
2680 fields->f_src32_rn_prefixed_HI = value;
2683 case M32C_OPERAND_SRC32RNPREFIXEDQI :
2686 length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
2687 value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2688 fields->f_src32_rn_prefixed_QI = value;
2691 case M32C_OPERAND_SRC32RNPREFIXEDSI :
2694 length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
2695 value = ((value) - (2));
2696 fields->f_src32_rn_prefixed_SI = value;
2699 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
2702 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
2703 value = ((((value) + (2))) % (4));
2704 fields->f_src32_rn_unprefixed_HI = value;
2707 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
2710 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
2711 value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2712 fields->f_src32_rn_unprefixed_QI = value;
2715 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
2718 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
2719 value = ((value) - (2));
2720 fields->f_src32_rn_unprefixed_SI = value;
2723 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
2724 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_5_1);
2726 case M32C_OPERAND_X :
2728 case M32C_OPERAND_Z :
2730 case M32C_OPERAND_COND16_16 :
2731 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
2733 case M32C_OPERAND_COND16_24 :
2734 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2736 case M32C_OPERAND_COND16_32 :
2737 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2739 case M32C_OPERAND_COND16C :
2740 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
2742 case M32C_OPERAND_COND16J :
2743 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
2745 case M32C_OPERAND_COND16J5 :
2746 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_cond16j_5);
2748 case M32C_OPERAND_COND32 :
2750 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_9_1);
2751 if (length <= 0) break;
2752 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2753 if (length <= 0) break;
2755 FLD (f_cond32) = ((((FLD (f_9_1)) << (3))) | (FLD (f_13_3)));
2759 case M32C_OPERAND_COND32_16 :
2760 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
2762 case M32C_OPERAND_COND32_24 :
2763 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2765 case M32C_OPERAND_COND32_32 :
2766 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2768 case M32C_OPERAND_COND32_40 :
2769 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_u8);
2771 case M32C_OPERAND_COND32J :
2773 length = extract_normal (cd, ex_info, insn_value, 0, 0, 1, 3, 32, total_length, pc, & fields->f_1_3);
2774 if (length <= 0) break;
2775 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
2776 if (length <= 0) break;
2778 FLD (f_cond32j) = ((((FLD (f_1_3)) << (1))) | (FLD (f_7_1)));
2782 case M32C_OPERAND_CR1_PREFIXED_32 :
2783 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_21_3);
2785 case M32C_OPERAND_CR1_UNPREFIXED_32 :
2786 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2788 case M32C_OPERAND_CR16 :
2789 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 3, 32, total_length, pc, & fields->f_9_3);
2791 case M32C_OPERAND_CR2_32 :
2792 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2794 case M32C_OPERAND_CR3_PREFIXED_32 :
2795 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_21_3);
2797 case M32C_OPERAND_CR3_UNPREFIXED_32 :
2798 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2800 case M32C_OPERAND_FLAGS16 :
2801 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 3, 32, total_length, pc, & fields->f_9_3);
2803 case M32C_OPERAND_FLAGS32 :
2804 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2806 case M32C_OPERAND_SCCOND32 :
2807 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
2809 case M32C_OPERAND_SIZE :
2813 /* xgettext:c-format */
2814 fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"),
2822 cgen_insert_fn * const m32c_cgen_insert_handlers[] =
2827 cgen_extract_fn * const m32c_cgen_extract_handlers[] =
2829 extract_insn_normal,
2832 int m32c_cgen_get_int_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
2833 bfd_vma m32c_cgen_get_vma_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
2835 /* Getting values from cgen_fields is handled by a collection of functions.
2836 They are distinguished by the type of the VALUE argument they return.
2837 TODO: floating point, inlining support, remove cases where result type
2841 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
2843 const CGEN_FIELDS * fields)
2849 case M32C_OPERAND_A0 :
2852 case M32C_OPERAND_A1 :
2855 case M32C_OPERAND_AN16_PUSH_S :
2856 value = fields->f_4_1;
2858 case M32C_OPERAND_BIT16AN :
2859 value = fields->f_dst16_an;
2861 case M32C_OPERAND_BIT16RN :
2862 value = fields->f_dst16_rn;
2864 case M32C_OPERAND_BIT32ANPREFIXED :
2865 value = fields->f_dst32_an_prefixed;
2867 case M32C_OPERAND_BIT32ANUNPREFIXED :
2868 value = fields->f_dst32_an_unprefixed;
2870 case M32C_OPERAND_BIT32RNPREFIXED :
2871 value = fields->f_dst32_rn_prefixed_QI;
2873 case M32C_OPERAND_BIT32RNUNPREFIXED :
2874 value = fields->f_dst32_rn_unprefixed_QI;
2876 case M32C_OPERAND_BITBASE16_16_S8 :
2877 value = fields->f_dsp_16_s8;
2879 case M32C_OPERAND_BITBASE16_16_U16 :
2880 value = fields->f_dsp_16_u16;
2882 case M32C_OPERAND_BITBASE16_16_U8 :
2883 value = fields->f_dsp_16_u8;
2885 case M32C_OPERAND_BITBASE16_8_U11_S :
2886 value = fields->f_bitbase16_u11_S;
2888 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
2889 value = fields->f_bitbase32_16_s11_unprefixed;
2891 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
2892 value = fields->f_bitbase32_16_s19_unprefixed;
2894 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
2895 value = fields->f_bitbase32_16_u11_unprefixed;
2897 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
2898 value = fields->f_bitbase32_16_u19_unprefixed;
2900 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
2901 value = fields->f_bitbase32_16_u27_unprefixed;
2903 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
2904 value = fields->f_bitbase32_24_s11_prefixed;
2906 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
2907 value = fields->f_bitbase32_24_s19_prefixed;
2909 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
2910 value = fields->f_bitbase32_24_u11_prefixed;
2912 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
2913 value = fields->f_bitbase32_24_u19_prefixed;
2915 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
2916 value = fields->f_bitbase32_24_u27_prefixed;
2918 case M32C_OPERAND_BITNO16R :
2919 value = fields->f_dsp_16_u8;
2921 case M32C_OPERAND_BITNO32PREFIXED :
2922 value = fields->f_bitno32_prefixed;
2924 case M32C_OPERAND_BITNO32UNPREFIXED :
2925 value = fields->f_bitno32_unprefixed;
2927 case M32C_OPERAND_DSP_10_U6 :
2928 value = fields->f_dsp_10_u6;
2930 case M32C_OPERAND_DSP_16_S16 :
2931 value = fields->f_dsp_16_s16;
2933 case M32C_OPERAND_DSP_16_S8 :
2934 value = fields->f_dsp_16_s8;
2936 case M32C_OPERAND_DSP_16_U16 :
2937 value = fields->f_dsp_16_u16;
2939 case M32C_OPERAND_DSP_16_U20 :
2940 value = fields->f_dsp_16_u24;
2942 case M32C_OPERAND_DSP_16_U24 :
2943 value = fields->f_dsp_16_u24;
2945 case M32C_OPERAND_DSP_16_U8 :
2946 value = fields->f_dsp_16_u8;
2948 case M32C_OPERAND_DSP_24_S16 :
2949 value = fields->f_dsp_24_s16;
2951 case M32C_OPERAND_DSP_24_S8 :
2952 value = fields->f_dsp_24_s8;
2954 case M32C_OPERAND_DSP_24_U16 :
2955 value = fields->f_dsp_24_u16;
2957 case M32C_OPERAND_DSP_24_U20 :
2958 value = fields->f_dsp_24_u24;
2960 case M32C_OPERAND_DSP_24_U24 :
2961 value = fields->f_dsp_24_u24;
2963 case M32C_OPERAND_DSP_24_U8 :
2964 value = fields->f_dsp_24_u8;
2966 case M32C_OPERAND_DSP_32_S16 :
2967 value = fields->f_dsp_32_s16;
2969 case M32C_OPERAND_DSP_32_S8 :
2970 value = fields->f_dsp_32_s8;
2972 case M32C_OPERAND_DSP_32_U16 :
2973 value = fields->f_dsp_32_u16;
2975 case M32C_OPERAND_DSP_32_U20 :
2976 value = fields->f_dsp_32_u24;
2978 case M32C_OPERAND_DSP_32_U24 :
2979 value = fields->f_dsp_32_u24;
2981 case M32C_OPERAND_DSP_32_U8 :
2982 value = fields->f_dsp_32_u8;
2984 case M32C_OPERAND_DSP_40_S16 :
2985 value = fields->f_dsp_40_s16;
2987 case M32C_OPERAND_DSP_40_S8 :
2988 value = fields->f_dsp_40_s8;
2990 case M32C_OPERAND_DSP_40_U16 :
2991 value = fields->f_dsp_40_u16;
2993 case M32C_OPERAND_DSP_40_U24 :
2994 value = fields->f_dsp_40_u24;
2996 case M32C_OPERAND_DSP_40_U8 :
2997 value = fields->f_dsp_40_u8;
2999 case M32C_OPERAND_DSP_48_S16 :
3000 value = fields->f_dsp_48_s16;
3002 case M32C_OPERAND_DSP_48_S8 :
3003 value = fields->f_dsp_48_s8;
3005 case M32C_OPERAND_DSP_48_U16 :
3006 value = fields->f_dsp_48_u16;
3008 case M32C_OPERAND_DSP_48_U24 :
3009 value = fields->f_dsp_48_u24;
3011 case M32C_OPERAND_DSP_48_U8 :
3012 value = fields->f_dsp_48_u8;
3014 case M32C_OPERAND_DSP_8_S24 :
3015 value = fields->f_dsp_8_s24;
3017 case M32C_OPERAND_DSP_8_S8 :
3018 value = fields->f_dsp_8_s8;
3020 case M32C_OPERAND_DSP_8_U16 :
3021 value = fields->f_dsp_8_u16;
3023 case M32C_OPERAND_DSP_8_U24 :
3024 value = fields->f_dsp_8_u24;
3026 case M32C_OPERAND_DSP_8_U6 :
3027 value = fields->f_dsp_8_u6;
3029 case M32C_OPERAND_DSP_8_U8 :
3030 value = fields->f_dsp_8_u8;
3032 case M32C_OPERAND_DST16AN :
3033 value = fields->f_dst16_an;
3035 case M32C_OPERAND_DST16AN_S :
3036 value = fields->f_dst16_an_s;
3038 case M32C_OPERAND_DST16ANHI :
3039 value = fields->f_dst16_an;
3041 case M32C_OPERAND_DST16ANQI :
3042 value = fields->f_dst16_an;
3044 case M32C_OPERAND_DST16ANQI_S :
3045 value = fields->f_dst16_rn_QI_s;
3047 case M32C_OPERAND_DST16ANSI :
3048 value = fields->f_dst16_an;
3050 case M32C_OPERAND_DST16RNEXTQI :
3051 value = fields->f_dst16_rn_ext;
3053 case M32C_OPERAND_DST16RNHI :
3054 value = fields->f_dst16_rn;
3056 case M32C_OPERAND_DST16RNQI :
3057 value = fields->f_dst16_rn;
3059 case M32C_OPERAND_DST16RNQI_S :
3060 value = fields->f_dst16_rn_QI_s;
3062 case M32C_OPERAND_DST16RNSI :
3063 value = fields->f_dst16_rn;
3065 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
3066 value = fields->f_dst32_an_unprefixed;
3068 case M32C_OPERAND_DST32ANPREFIXED :
3069 value = fields->f_dst32_an_prefixed;
3071 case M32C_OPERAND_DST32ANPREFIXEDHI :
3072 value = fields->f_dst32_an_prefixed;
3074 case M32C_OPERAND_DST32ANPREFIXEDQI :
3075 value = fields->f_dst32_an_prefixed;
3077 case M32C_OPERAND_DST32ANPREFIXEDSI :
3078 value = fields->f_dst32_an_prefixed;
3080 case M32C_OPERAND_DST32ANUNPREFIXED :
3081 value = fields->f_dst32_an_unprefixed;
3083 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
3084 value = fields->f_dst32_an_unprefixed;
3086 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
3087 value = fields->f_dst32_an_unprefixed;
3089 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
3090 value = fields->f_dst32_an_unprefixed;
3092 case M32C_OPERAND_DST32R0HI_S :
3095 case M32C_OPERAND_DST32R0QI_S :
3098 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
3099 value = fields->f_dst32_rn_ext_unprefixed;
3101 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
3102 value = fields->f_dst32_rn_ext_unprefixed;
3104 case M32C_OPERAND_DST32RNPREFIXEDHI :
3105 value = fields->f_dst32_rn_prefixed_HI;
3107 case M32C_OPERAND_DST32RNPREFIXEDQI :
3108 value = fields->f_dst32_rn_prefixed_QI;
3110 case M32C_OPERAND_DST32RNPREFIXEDSI :
3111 value = fields->f_dst32_rn_prefixed_SI;
3113 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
3114 value = fields->f_dst32_rn_unprefixed_HI;
3116 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
3117 value = fields->f_dst32_rn_unprefixed_QI;
3119 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
3120 value = fields->f_dst32_rn_unprefixed_SI;
3122 case M32C_OPERAND_G :
3125 case M32C_OPERAND_IMM_12_S4 :
3126 value = fields->f_imm_12_s4;
3128 case M32C_OPERAND_IMM_12_S4N :
3129 value = fields->f_imm_12_s4;
3131 case M32C_OPERAND_IMM_13_U3 :
3132 value = fields->f_imm_13_u3;
3134 case M32C_OPERAND_IMM_16_HI :
3135 value = fields->f_dsp_16_s16;
3137 case M32C_OPERAND_IMM_16_QI :
3138 value = fields->f_dsp_16_s8;
3140 case M32C_OPERAND_IMM_16_SI :
3141 value = fields->f_dsp_16_s32;
3143 case M32C_OPERAND_IMM_20_S4 :
3144 value = fields->f_imm_20_s4;
3146 case M32C_OPERAND_IMM_24_HI :
3147 value = fields->f_dsp_24_s16;
3149 case M32C_OPERAND_IMM_24_QI :
3150 value = fields->f_dsp_24_s8;
3152 case M32C_OPERAND_IMM_24_SI :
3153 value = fields->f_dsp_24_s32;
3155 case M32C_OPERAND_IMM_32_HI :
3156 value = fields->f_dsp_32_s16;
3158 case M32C_OPERAND_IMM_32_QI :
3159 value = fields->f_dsp_32_s8;
3161 case M32C_OPERAND_IMM_32_SI :
3162 value = fields->f_dsp_32_s32;
3164 case M32C_OPERAND_IMM_40_HI :
3165 value = fields->f_dsp_40_s16;
3167 case M32C_OPERAND_IMM_40_QI :
3168 value = fields->f_dsp_40_s8;
3170 case M32C_OPERAND_IMM_40_SI :
3171 value = fields->f_dsp_40_s32;
3173 case M32C_OPERAND_IMM_48_HI :
3174 value = fields->f_dsp_48_s16;
3176 case M32C_OPERAND_IMM_48_QI :
3177 value = fields->f_dsp_48_s8;
3179 case M32C_OPERAND_IMM_48_SI :
3180 value = fields->f_dsp_48_s32;
3182 case M32C_OPERAND_IMM_56_HI :
3183 value = fields->f_dsp_56_s16;
3185 case M32C_OPERAND_IMM_56_QI :
3186 value = fields->f_dsp_56_s8;
3188 case M32C_OPERAND_IMM_64_HI :
3189 value = fields->f_dsp_64_s16;
3191 case M32C_OPERAND_IMM_8_HI :
3192 value = fields->f_dsp_8_s16;
3194 case M32C_OPERAND_IMM_8_QI :
3195 value = fields->f_dsp_8_s8;
3197 case M32C_OPERAND_IMM_8_S4 :
3198 value = fields->f_imm_8_s4;
3200 case M32C_OPERAND_IMM_8_S4N :
3201 value = fields->f_imm_8_s4;
3203 case M32C_OPERAND_IMM_SH_12_S4 :
3204 value = fields->f_imm_12_s4;
3206 case M32C_OPERAND_IMM_SH_20_S4 :
3207 value = fields->f_imm_20_s4;
3209 case M32C_OPERAND_IMM_SH_8_S4 :
3210 value = fields->f_imm_8_s4;
3212 case M32C_OPERAND_IMM1_S :
3213 value = fields->f_imm1_S;
3215 case M32C_OPERAND_IMM3_S :
3216 value = fields->f_imm3_S;
3218 case M32C_OPERAND_LAB_16_8 :
3219 value = fields->f_lab_16_8;
3221 case M32C_OPERAND_LAB_24_8 :
3222 value = fields->f_lab_24_8;
3224 case M32C_OPERAND_LAB_32_8 :
3225 value = fields->f_lab_32_8;
3227 case M32C_OPERAND_LAB_40_8 :
3228 value = fields->f_lab_40_8;
3230 case M32C_OPERAND_LAB_5_3 :
3231 value = fields->f_lab_5_3;
3233 case M32C_OPERAND_LAB_8_16 :
3234 value = fields->f_lab_8_16;
3236 case M32C_OPERAND_LAB_8_24 :
3237 value = fields->f_lab_8_24;
3239 case M32C_OPERAND_LAB_8_8 :
3240 value = fields->f_lab_8_8;
3242 case M32C_OPERAND_LAB32_JMP_S :
3243 value = fields->f_lab32_jmp_s;
3245 case M32C_OPERAND_Q :
3248 case M32C_OPERAND_R0 :
3251 case M32C_OPERAND_R0H :
3254 case M32C_OPERAND_R0L :
3257 case M32C_OPERAND_R1 :
3260 case M32C_OPERAND_R1R2R0 :
3263 case M32C_OPERAND_R2 :
3266 case M32C_OPERAND_R2R0 :
3269 case M32C_OPERAND_R3 :
3272 case M32C_OPERAND_R3R1 :
3275 case M32C_OPERAND_REGSETPOP :
3276 value = fields->f_8_8;
3278 case M32C_OPERAND_REGSETPUSH :
3279 value = fields->f_8_8;
3281 case M32C_OPERAND_RN16_PUSH_S :
3282 value = fields->f_4_1;
3284 case M32C_OPERAND_S :
3287 case M32C_OPERAND_SRC16AN :
3288 value = fields->f_src16_an;
3290 case M32C_OPERAND_SRC16ANHI :
3291 value = fields->f_src16_an;
3293 case M32C_OPERAND_SRC16ANQI :
3294 value = fields->f_src16_an;
3296 case M32C_OPERAND_SRC16RNHI :
3297 value = fields->f_src16_rn;
3299 case M32C_OPERAND_SRC16RNQI :
3300 value = fields->f_src16_rn;
3302 case M32C_OPERAND_SRC32ANPREFIXED :
3303 value = fields->f_src32_an_prefixed;
3305 case M32C_OPERAND_SRC32ANPREFIXEDHI :
3306 value = fields->f_src32_an_prefixed;
3308 case M32C_OPERAND_SRC32ANPREFIXEDQI :
3309 value = fields->f_src32_an_prefixed;
3311 case M32C_OPERAND_SRC32ANPREFIXEDSI :
3312 value = fields->f_src32_an_prefixed;
3314 case M32C_OPERAND_SRC32ANUNPREFIXED :
3315 value = fields->f_src32_an_unprefixed;
3317 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
3318 value = fields->f_src32_an_unprefixed;
3320 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
3321 value = fields->f_src32_an_unprefixed;
3323 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
3324 value = fields->f_src32_an_unprefixed;
3326 case M32C_OPERAND_SRC32RNPREFIXEDHI :
3327 value = fields->f_src32_rn_prefixed_HI;
3329 case M32C_OPERAND_SRC32RNPREFIXEDQI :
3330 value = fields->f_src32_rn_prefixed_QI;
3332 case M32C_OPERAND_SRC32RNPREFIXEDSI :
3333 value = fields->f_src32_rn_prefixed_SI;
3335 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
3336 value = fields->f_src32_rn_unprefixed_HI;
3338 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
3339 value = fields->f_src32_rn_unprefixed_QI;
3341 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
3342 value = fields->f_src32_rn_unprefixed_SI;
3344 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
3345 value = fields->f_5_1;
3347 case M32C_OPERAND_X :
3350 case M32C_OPERAND_Z :
3353 case M32C_OPERAND_COND16_16 :
3354 value = fields->f_dsp_16_u8;
3356 case M32C_OPERAND_COND16_24 :
3357 value = fields->f_dsp_24_u8;
3359 case M32C_OPERAND_COND16_32 :
3360 value = fields->f_dsp_32_u8;
3362 case M32C_OPERAND_COND16C :
3363 value = fields->f_cond16;
3365 case M32C_OPERAND_COND16J :
3366 value = fields->f_cond16;
3368 case M32C_OPERAND_COND16J5 :
3369 value = fields->f_cond16j_5;
3371 case M32C_OPERAND_COND32 :
3372 value = fields->f_cond32;
3374 case M32C_OPERAND_COND32_16 :
3375 value = fields->f_dsp_16_u8;
3377 case M32C_OPERAND_COND32_24 :
3378 value = fields->f_dsp_24_u8;
3380 case M32C_OPERAND_COND32_32 :
3381 value = fields->f_dsp_32_u8;
3383 case M32C_OPERAND_COND32_40 :
3384 value = fields->f_dsp_40_u8;
3386 case M32C_OPERAND_COND32J :
3387 value = fields->f_cond32j;
3389 case M32C_OPERAND_CR1_PREFIXED_32 :
3390 value = fields->f_21_3;
3392 case M32C_OPERAND_CR1_UNPREFIXED_32 :
3393 value = fields->f_13_3;
3395 case M32C_OPERAND_CR16 :
3396 value = fields->f_9_3;
3398 case M32C_OPERAND_CR2_32 :
3399 value = fields->f_13_3;
3401 case M32C_OPERAND_CR3_PREFIXED_32 :
3402 value = fields->f_21_3;
3404 case M32C_OPERAND_CR3_UNPREFIXED_32 :
3405 value = fields->f_13_3;
3407 case M32C_OPERAND_FLAGS16 :
3408 value = fields->f_9_3;
3410 case M32C_OPERAND_FLAGS32 :
3411 value = fields->f_13_3;
3413 case M32C_OPERAND_SCCOND32 :
3414 value = fields->f_cond16;
3416 case M32C_OPERAND_SIZE :
3421 /* xgettext:c-format */
3422 fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
3431 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
3433 const CGEN_FIELDS * fields)
3439 case M32C_OPERAND_A0 :
3442 case M32C_OPERAND_A1 :
3445 case M32C_OPERAND_AN16_PUSH_S :
3446 value = fields->f_4_1;
3448 case M32C_OPERAND_BIT16AN :
3449 value = fields->f_dst16_an;
3451 case M32C_OPERAND_BIT16RN :
3452 value = fields->f_dst16_rn;
3454 case M32C_OPERAND_BIT32ANPREFIXED :
3455 value = fields->f_dst32_an_prefixed;
3457 case M32C_OPERAND_BIT32ANUNPREFIXED :
3458 value = fields->f_dst32_an_unprefixed;
3460 case M32C_OPERAND_BIT32RNPREFIXED :
3461 value = fields->f_dst32_rn_prefixed_QI;
3463 case M32C_OPERAND_BIT32RNUNPREFIXED :
3464 value = fields->f_dst32_rn_unprefixed_QI;
3466 case M32C_OPERAND_BITBASE16_16_S8 :
3467 value = fields->f_dsp_16_s8;
3469 case M32C_OPERAND_BITBASE16_16_U16 :
3470 value = fields->f_dsp_16_u16;
3472 case M32C_OPERAND_BITBASE16_16_U8 :
3473 value = fields->f_dsp_16_u8;
3475 case M32C_OPERAND_BITBASE16_8_U11_S :
3476 value = fields->f_bitbase16_u11_S;
3478 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
3479 value = fields->f_bitbase32_16_s11_unprefixed;
3481 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
3482 value = fields->f_bitbase32_16_s19_unprefixed;
3484 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
3485 value = fields->f_bitbase32_16_u11_unprefixed;
3487 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
3488 value = fields->f_bitbase32_16_u19_unprefixed;
3490 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
3491 value = fields->f_bitbase32_16_u27_unprefixed;
3493 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
3494 value = fields->f_bitbase32_24_s11_prefixed;
3496 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
3497 value = fields->f_bitbase32_24_s19_prefixed;
3499 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
3500 value = fields->f_bitbase32_24_u11_prefixed;
3502 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
3503 value = fields->f_bitbase32_24_u19_prefixed;
3505 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
3506 value = fields->f_bitbase32_24_u27_prefixed;
3508 case M32C_OPERAND_BITNO16R :
3509 value = fields->f_dsp_16_u8;
3511 case M32C_OPERAND_BITNO32PREFIXED :
3512 value = fields->f_bitno32_prefixed;
3514 case M32C_OPERAND_BITNO32UNPREFIXED :
3515 value = fields->f_bitno32_unprefixed;
3517 case M32C_OPERAND_DSP_10_U6 :
3518 value = fields->f_dsp_10_u6;
3520 case M32C_OPERAND_DSP_16_S16 :
3521 value = fields->f_dsp_16_s16;
3523 case M32C_OPERAND_DSP_16_S8 :
3524 value = fields->f_dsp_16_s8;
3526 case M32C_OPERAND_DSP_16_U16 :
3527 value = fields->f_dsp_16_u16;
3529 case M32C_OPERAND_DSP_16_U20 :
3530 value = fields->f_dsp_16_u24;
3532 case M32C_OPERAND_DSP_16_U24 :
3533 value = fields->f_dsp_16_u24;
3535 case M32C_OPERAND_DSP_16_U8 :
3536 value = fields->f_dsp_16_u8;
3538 case M32C_OPERAND_DSP_24_S16 :
3539 value = fields->f_dsp_24_s16;
3541 case M32C_OPERAND_DSP_24_S8 :
3542 value = fields->f_dsp_24_s8;
3544 case M32C_OPERAND_DSP_24_U16 :
3545 value = fields->f_dsp_24_u16;
3547 case M32C_OPERAND_DSP_24_U20 :
3548 value = fields->f_dsp_24_u24;
3550 case M32C_OPERAND_DSP_24_U24 :
3551 value = fields->f_dsp_24_u24;
3553 case M32C_OPERAND_DSP_24_U8 :
3554 value = fields->f_dsp_24_u8;
3556 case M32C_OPERAND_DSP_32_S16 :
3557 value = fields->f_dsp_32_s16;
3559 case M32C_OPERAND_DSP_32_S8 :
3560 value = fields->f_dsp_32_s8;
3562 case M32C_OPERAND_DSP_32_U16 :
3563 value = fields->f_dsp_32_u16;
3565 case M32C_OPERAND_DSP_32_U20 :
3566 value = fields->f_dsp_32_u24;
3568 case M32C_OPERAND_DSP_32_U24 :
3569 value = fields->f_dsp_32_u24;
3571 case M32C_OPERAND_DSP_32_U8 :
3572 value = fields->f_dsp_32_u8;
3574 case M32C_OPERAND_DSP_40_S16 :
3575 value = fields->f_dsp_40_s16;
3577 case M32C_OPERAND_DSP_40_S8 :
3578 value = fields->f_dsp_40_s8;
3580 case M32C_OPERAND_DSP_40_U16 :
3581 value = fields->f_dsp_40_u16;
3583 case M32C_OPERAND_DSP_40_U24 :
3584 value = fields->f_dsp_40_u24;
3586 case M32C_OPERAND_DSP_40_U8 :
3587 value = fields->f_dsp_40_u8;
3589 case M32C_OPERAND_DSP_48_S16 :
3590 value = fields->f_dsp_48_s16;
3592 case M32C_OPERAND_DSP_48_S8 :
3593 value = fields->f_dsp_48_s8;
3595 case M32C_OPERAND_DSP_48_U16 :
3596 value = fields->f_dsp_48_u16;
3598 case M32C_OPERAND_DSP_48_U24 :
3599 value = fields->f_dsp_48_u24;
3601 case M32C_OPERAND_DSP_48_U8 :
3602 value = fields->f_dsp_48_u8;
3604 case M32C_OPERAND_DSP_8_S24 :
3605 value = fields->f_dsp_8_s24;
3607 case M32C_OPERAND_DSP_8_S8 :
3608 value = fields->f_dsp_8_s8;
3610 case M32C_OPERAND_DSP_8_U16 :
3611 value = fields->f_dsp_8_u16;
3613 case M32C_OPERAND_DSP_8_U24 :
3614 value = fields->f_dsp_8_u24;
3616 case M32C_OPERAND_DSP_8_U6 :
3617 value = fields->f_dsp_8_u6;
3619 case M32C_OPERAND_DSP_8_U8 :
3620 value = fields->f_dsp_8_u8;
3622 case M32C_OPERAND_DST16AN :
3623 value = fields->f_dst16_an;
3625 case M32C_OPERAND_DST16AN_S :
3626 value = fields->f_dst16_an_s;
3628 case M32C_OPERAND_DST16ANHI :
3629 value = fields->f_dst16_an;
3631 case M32C_OPERAND_DST16ANQI :
3632 value = fields->f_dst16_an;
3634 case M32C_OPERAND_DST16ANQI_S :
3635 value = fields->f_dst16_rn_QI_s;
3637 case M32C_OPERAND_DST16ANSI :
3638 value = fields->f_dst16_an;
3640 case M32C_OPERAND_DST16RNEXTQI :
3641 value = fields->f_dst16_rn_ext;
3643 case M32C_OPERAND_DST16RNHI :
3644 value = fields->f_dst16_rn;
3646 case M32C_OPERAND_DST16RNQI :
3647 value = fields->f_dst16_rn;
3649 case M32C_OPERAND_DST16RNQI_S :
3650 value = fields->f_dst16_rn_QI_s;
3652 case M32C_OPERAND_DST16RNSI :
3653 value = fields->f_dst16_rn;
3655 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
3656 value = fields->f_dst32_an_unprefixed;
3658 case M32C_OPERAND_DST32ANPREFIXED :
3659 value = fields->f_dst32_an_prefixed;
3661 case M32C_OPERAND_DST32ANPREFIXEDHI :
3662 value = fields->f_dst32_an_prefixed;
3664 case M32C_OPERAND_DST32ANPREFIXEDQI :
3665 value = fields->f_dst32_an_prefixed;
3667 case M32C_OPERAND_DST32ANPREFIXEDSI :
3668 value = fields->f_dst32_an_prefixed;
3670 case M32C_OPERAND_DST32ANUNPREFIXED :
3671 value = fields->f_dst32_an_unprefixed;
3673 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
3674 value = fields->f_dst32_an_unprefixed;
3676 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
3677 value = fields->f_dst32_an_unprefixed;
3679 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
3680 value = fields->f_dst32_an_unprefixed;
3682 case M32C_OPERAND_DST32R0HI_S :
3685 case M32C_OPERAND_DST32R0QI_S :
3688 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
3689 value = fields->f_dst32_rn_ext_unprefixed;
3691 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
3692 value = fields->f_dst32_rn_ext_unprefixed;
3694 case M32C_OPERAND_DST32RNPREFIXEDHI :
3695 value = fields->f_dst32_rn_prefixed_HI;
3697 case M32C_OPERAND_DST32RNPREFIXEDQI :
3698 value = fields->f_dst32_rn_prefixed_QI;
3700 case M32C_OPERAND_DST32RNPREFIXEDSI :
3701 value = fields->f_dst32_rn_prefixed_SI;
3703 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
3704 value = fields->f_dst32_rn_unprefixed_HI;
3706 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
3707 value = fields->f_dst32_rn_unprefixed_QI;
3709 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
3710 value = fields->f_dst32_rn_unprefixed_SI;
3712 case M32C_OPERAND_G :
3715 case M32C_OPERAND_IMM_12_S4 :
3716 value = fields->f_imm_12_s4;
3718 case M32C_OPERAND_IMM_12_S4N :
3719 value = fields->f_imm_12_s4;
3721 case M32C_OPERAND_IMM_13_U3 :
3722 value = fields->f_imm_13_u3;
3724 case M32C_OPERAND_IMM_16_HI :
3725 value = fields->f_dsp_16_s16;
3727 case M32C_OPERAND_IMM_16_QI :
3728 value = fields->f_dsp_16_s8;
3730 case M32C_OPERAND_IMM_16_SI :
3731 value = fields->f_dsp_16_s32;
3733 case M32C_OPERAND_IMM_20_S4 :
3734 value = fields->f_imm_20_s4;
3736 case M32C_OPERAND_IMM_24_HI :
3737 value = fields->f_dsp_24_s16;
3739 case M32C_OPERAND_IMM_24_QI :
3740 value = fields->f_dsp_24_s8;
3742 case M32C_OPERAND_IMM_24_SI :
3743 value = fields->f_dsp_24_s32;
3745 case M32C_OPERAND_IMM_32_HI :
3746 value = fields->f_dsp_32_s16;
3748 case M32C_OPERAND_IMM_32_QI :
3749 value = fields->f_dsp_32_s8;
3751 case M32C_OPERAND_IMM_32_SI :
3752 value = fields->f_dsp_32_s32;
3754 case M32C_OPERAND_IMM_40_HI :
3755 value = fields->f_dsp_40_s16;
3757 case M32C_OPERAND_IMM_40_QI :
3758 value = fields->f_dsp_40_s8;
3760 case M32C_OPERAND_IMM_40_SI :
3761 value = fields->f_dsp_40_s32;
3763 case M32C_OPERAND_IMM_48_HI :
3764 value = fields->f_dsp_48_s16;
3766 case M32C_OPERAND_IMM_48_QI :
3767 value = fields->f_dsp_48_s8;
3769 case M32C_OPERAND_IMM_48_SI :
3770 value = fields->f_dsp_48_s32;
3772 case M32C_OPERAND_IMM_56_HI :
3773 value = fields->f_dsp_56_s16;
3775 case M32C_OPERAND_IMM_56_QI :
3776 value = fields->f_dsp_56_s8;
3778 case M32C_OPERAND_IMM_64_HI :
3779 value = fields->f_dsp_64_s16;
3781 case M32C_OPERAND_IMM_8_HI :
3782 value = fields->f_dsp_8_s16;
3784 case M32C_OPERAND_IMM_8_QI :
3785 value = fields->f_dsp_8_s8;
3787 case M32C_OPERAND_IMM_8_S4 :
3788 value = fields->f_imm_8_s4;
3790 case M32C_OPERAND_IMM_8_S4N :
3791 value = fields->f_imm_8_s4;
3793 case M32C_OPERAND_IMM_SH_12_S4 :
3794 value = fields->f_imm_12_s4;
3796 case M32C_OPERAND_IMM_SH_20_S4 :
3797 value = fields->f_imm_20_s4;
3799 case M32C_OPERAND_IMM_SH_8_S4 :
3800 value = fields->f_imm_8_s4;
3802 case M32C_OPERAND_IMM1_S :
3803 value = fields->f_imm1_S;
3805 case M32C_OPERAND_IMM3_S :
3806 value = fields->f_imm3_S;
3808 case M32C_OPERAND_LAB_16_8 :
3809 value = fields->f_lab_16_8;
3811 case M32C_OPERAND_LAB_24_8 :
3812 value = fields->f_lab_24_8;
3814 case M32C_OPERAND_LAB_32_8 :
3815 value = fields->f_lab_32_8;
3817 case M32C_OPERAND_LAB_40_8 :
3818 value = fields->f_lab_40_8;
3820 case M32C_OPERAND_LAB_5_3 :
3821 value = fields->f_lab_5_3;
3823 case M32C_OPERAND_LAB_8_16 :
3824 value = fields->f_lab_8_16;
3826 case M32C_OPERAND_LAB_8_24 :
3827 value = fields->f_lab_8_24;
3829 case M32C_OPERAND_LAB_8_8 :
3830 value = fields->f_lab_8_8;
3832 case M32C_OPERAND_LAB32_JMP_S :
3833 value = fields->f_lab32_jmp_s;
3835 case M32C_OPERAND_Q :
3838 case M32C_OPERAND_R0 :
3841 case M32C_OPERAND_R0H :
3844 case M32C_OPERAND_R0L :
3847 case M32C_OPERAND_R1 :
3850 case M32C_OPERAND_R1R2R0 :
3853 case M32C_OPERAND_R2 :
3856 case M32C_OPERAND_R2R0 :
3859 case M32C_OPERAND_R3 :
3862 case M32C_OPERAND_R3R1 :
3865 case M32C_OPERAND_REGSETPOP :
3866 value = fields->f_8_8;
3868 case M32C_OPERAND_REGSETPUSH :
3869 value = fields->f_8_8;
3871 case M32C_OPERAND_RN16_PUSH_S :
3872 value = fields->f_4_1;
3874 case M32C_OPERAND_S :
3877 case M32C_OPERAND_SRC16AN :
3878 value = fields->f_src16_an;
3880 case M32C_OPERAND_SRC16ANHI :
3881 value = fields->f_src16_an;
3883 case M32C_OPERAND_SRC16ANQI :
3884 value = fields->f_src16_an;
3886 case M32C_OPERAND_SRC16RNHI :
3887 value = fields->f_src16_rn;
3889 case M32C_OPERAND_SRC16RNQI :
3890 value = fields->f_src16_rn;
3892 case M32C_OPERAND_SRC32ANPREFIXED :
3893 value = fields->f_src32_an_prefixed;
3895 case M32C_OPERAND_SRC32ANPREFIXEDHI :
3896 value = fields->f_src32_an_prefixed;
3898 case M32C_OPERAND_SRC32ANPREFIXEDQI :
3899 value = fields->f_src32_an_prefixed;
3901 case M32C_OPERAND_SRC32ANPREFIXEDSI :
3902 value = fields->f_src32_an_prefixed;
3904 case M32C_OPERAND_SRC32ANUNPREFIXED :
3905 value = fields->f_src32_an_unprefixed;
3907 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
3908 value = fields->f_src32_an_unprefixed;
3910 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
3911 value = fields->f_src32_an_unprefixed;
3913 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
3914 value = fields->f_src32_an_unprefixed;
3916 case M32C_OPERAND_SRC32RNPREFIXEDHI :
3917 value = fields->f_src32_rn_prefixed_HI;
3919 case M32C_OPERAND_SRC32RNPREFIXEDQI :
3920 value = fields->f_src32_rn_prefixed_QI;
3922 case M32C_OPERAND_SRC32RNPREFIXEDSI :
3923 value = fields->f_src32_rn_prefixed_SI;
3925 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
3926 value = fields->f_src32_rn_unprefixed_HI;
3928 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
3929 value = fields->f_src32_rn_unprefixed_QI;
3931 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
3932 value = fields->f_src32_rn_unprefixed_SI;
3934 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
3935 value = fields->f_5_1;
3937 case M32C_OPERAND_X :
3940 case M32C_OPERAND_Z :
3943 case M32C_OPERAND_COND16_16 :
3944 value = fields->f_dsp_16_u8;
3946 case M32C_OPERAND_COND16_24 :
3947 value = fields->f_dsp_24_u8;
3949 case M32C_OPERAND_COND16_32 :
3950 value = fields->f_dsp_32_u8;
3952 case M32C_OPERAND_COND16C :
3953 value = fields->f_cond16;
3955 case M32C_OPERAND_COND16J :
3956 value = fields->f_cond16;
3958 case M32C_OPERAND_COND16J5 :
3959 value = fields->f_cond16j_5;
3961 case M32C_OPERAND_COND32 :
3962 value = fields->f_cond32;
3964 case M32C_OPERAND_COND32_16 :
3965 value = fields->f_dsp_16_u8;
3967 case M32C_OPERAND_COND32_24 :
3968 value = fields->f_dsp_24_u8;
3970 case M32C_OPERAND_COND32_32 :
3971 value = fields->f_dsp_32_u8;
3973 case M32C_OPERAND_COND32_40 :
3974 value = fields->f_dsp_40_u8;
3976 case M32C_OPERAND_COND32J :
3977 value = fields->f_cond32j;
3979 case M32C_OPERAND_CR1_PREFIXED_32 :
3980 value = fields->f_21_3;
3982 case M32C_OPERAND_CR1_UNPREFIXED_32 :
3983 value = fields->f_13_3;
3985 case M32C_OPERAND_CR16 :
3986 value = fields->f_9_3;
3988 case M32C_OPERAND_CR2_32 :
3989 value = fields->f_13_3;
3991 case M32C_OPERAND_CR3_PREFIXED_32 :
3992 value = fields->f_21_3;
3994 case M32C_OPERAND_CR3_UNPREFIXED_32 :
3995 value = fields->f_13_3;
3997 case M32C_OPERAND_FLAGS16 :
3998 value = fields->f_9_3;
4000 case M32C_OPERAND_FLAGS32 :
4001 value = fields->f_13_3;
4003 case M32C_OPERAND_SCCOND32 :
4004 value = fields->f_cond16;
4006 case M32C_OPERAND_SIZE :
4011 /* xgettext:c-format */
4012 fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
4020 void m32c_cgen_set_int_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, int);
4021 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma);
4023 /* Stuffing values in cgen_fields is handled by a collection of functions.
4024 They are distinguished by the type of the VALUE argument they accept.
4025 TODO: floating point, inlining support, remove cases where argument type
4029 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
4031 CGEN_FIELDS * fields,
4036 case M32C_OPERAND_A0 :
4038 case M32C_OPERAND_A1 :
4040 case M32C_OPERAND_AN16_PUSH_S :
4041 fields->f_4_1 = value;
4043 case M32C_OPERAND_BIT16AN :
4044 fields->f_dst16_an = value;
4046 case M32C_OPERAND_BIT16RN :
4047 fields->f_dst16_rn = value;
4049 case M32C_OPERAND_BIT32ANPREFIXED :
4050 fields->f_dst32_an_prefixed = value;
4052 case M32C_OPERAND_BIT32ANUNPREFIXED :
4053 fields->f_dst32_an_unprefixed = value;
4055 case M32C_OPERAND_BIT32RNPREFIXED :
4056 fields->f_dst32_rn_prefixed_QI = value;
4058 case M32C_OPERAND_BIT32RNUNPREFIXED :
4059 fields->f_dst32_rn_unprefixed_QI = value;
4061 case M32C_OPERAND_BITBASE16_16_S8 :
4062 fields->f_dsp_16_s8 = value;
4064 case M32C_OPERAND_BITBASE16_16_U16 :
4065 fields->f_dsp_16_u16 = value;
4067 case M32C_OPERAND_BITBASE16_16_U8 :
4068 fields->f_dsp_16_u8 = value;
4070 case M32C_OPERAND_BITBASE16_8_U11_S :
4071 fields->f_bitbase16_u11_S = value;
4073 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
4074 fields->f_bitbase32_16_s11_unprefixed = value;
4076 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
4077 fields->f_bitbase32_16_s19_unprefixed = value;
4079 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
4080 fields->f_bitbase32_16_u11_unprefixed = value;
4082 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
4083 fields->f_bitbase32_16_u19_unprefixed = value;
4085 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
4086 fields->f_bitbase32_16_u27_unprefixed = value;
4088 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
4089 fields->f_bitbase32_24_s11_prefixed = value;
4091 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
4092 fields->f_bitbase32_24_s19_prefixed = value;
4094 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
4095 fields->f_bitbase32_24_u11_prefixed = value;
4097 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
4098 fields->f_bitbase32_24_u19_prefixed = value;
4100 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
4101 fields->f_bitbase32_24_u27_prefixed = value;
4103 case M32C_OPERAND_BITNO16R :
4104 fields->f_dsp_16_u8 = value;
4106 case M32C_OPERAND_BITNO32PREFIXED :
4107 fields->f_bitno32_prefixed = value;
4109 case M32C_OPERAND_BITNO32UNPREFIXED :
4110 fields->f_bitno32_unprefixed = value;
4112 case M32C_OPERAND_DSP_10_U6 :
4113 fields->f_dsp_10_u6 = value;
4115 case M32C_OPERAND_DSP_16_S16 :
4116 fields->f_dsp_16_s16 = value;
4118 case M32C_OPERAND_DSP_16_S8 :
4119 fields->f_dsp_16_s8 = value;
4121 case M32C_OPERAND_DSP_16_U16 :
4122 fields->f_dsp_16_u16 = value;
4124 case M32C_OPERAND_DSP_16_U20 :
4125 fields->f_dsp_16_u24 = value;
4127 case M32C_OPERAND_DSP_16_U24 :
4128 fields->f_dsp_16_u24 = value;
4130 case M32C_OPERAND_DSP_16_U8 :
4131 fields->f_dsp_16_u8 = value;
4133 case M32C_OPERAND_DSP_24_S16 :
4134 fields->f_dsp_24_s16 = value;
4136 case M32C_OPERAND_DSP_24_S8 :
4137 fields->f_dsp_24_s8 = value;
4139 case M32C_OPERAND_DSP_24_U16 :
4140 fields->f_dsp_24_u16 = value;
4142 case M32C_OPERAND_DSP_24_U20 :
4143 fields->f_dsp_24_u24 = value;
4145 case M32C_OPERAND_DSP_24_U24 :
4146 fields->f_dsp_24_u24 = value;
4148 case M32C_OPERAND_DSP_24_U8 :
4149 fields->f_dsp_24_u8 = value;
4151 case M32C_OPERAND_DSP_32_S16 :
4152 fields->f_dsp_32_s16 = value;
4154 case M32C_OPERAND_DSP_32_S8 :
4155 fields->f_dsp_32_s8 = value;
4157 case M32C_OPERAND_DSP_32_U16 :
4158 fields->f_dsp_32_u16 = value;
4160 case M32C_OPERAND_DSP_32_U20 :
4161 fields->f_dsp_32_u24 = value;
4163 case M32C_OPERAND_DSP_32_U24 :
4164 fields->f_dsp_32_u24 = value;
4166 case M32C_OPERAND_DSP_32_U8 :
4167 fields->f_dsp_32_u8 = value;
4169 case M32C_OPERAND_DSP_40_S16 :
4170 fields->f_dsp_40_s16 = value;
4172 case M32C_OPERAND_DSP_40_S8 :
4173 fields->f_dsp_40_s8 = value;
4175 case M32C_OPERAND_DSP_40_U16 :
4176 fields->f_dsp_40_u16 = value;
4178 case M32C_OPERAND_DSP_40_U24 :
4179 fields->f_dsp_40_u24 = value;
4181 case M32C_OPERAND_DSP_40_U8 :
4182 fields->f_dsp_40_u8 = value;
4184 case M32C_OPERAND_DSP_48_S16 :
4185 fields->f_dsp_48_s16 = value;
4187 case M32C_OPERAND_DSP_48_S8 :
4188 fields->f_dsp_48_s8 = value;
4190 case M32C_OPERAND_DSP_48_U16 :
4191 fields->f_dsp_48_u16 = value;
4193 case M32C_OPERAND_DSP_48_U24 :
4194 fields->f_dsp_48_u24 = value;
4196 case M32C_OPERAND_DSP_48_U8 :
4197 fields->f_dsp_48_u8 = value;
4199 case M32C_OPERAND_DSP_8_S24 :
4200 fields->f_dsp_8_s24 = value;
4202 case M32C_OPERAND_DSP_8_S8 :
4203 fields->f_dsp_8_s8 = value;
4205 case M32C_OPERAND_DSP_8_U16 :
4206 fields->f_dsp_8_u16 = value;
4208 case M32C_OPERAND_DSP_8_U24 :
4209 fields->f_dsp_8_u24 = value;
4211 case M32C_OPERAND_DSP_8_U6 :
4212 fields->f_dsp_8_u6 = value;
4214 case M32C_OPERAND_DSP_8_U8 :
4215 fields->f_dsp_8_u8 = value;
4217 case M32C_OPERAND_DST16AN :
4218 fields->f_dst16_an = value;
4220 case M32C_OPERAND_DST16AN_S :
4221 fields->f_dst16_an_s = value;
4223 case M32C_OPERAND_DST16ANHI :
4224 fields->f_dst16_an = value;
4226 case M32C_OPERAND_DST16ANQI :
4227 fields->f_dst16_an = value;
4229 case M32C_OPERAND_DST16ANQI_S :
4230 fields->f_dst16_rn_QI_s = value;
4232 case M32C_OPERAND_DST16ANSI :
4233 fields->f_dst16_an = value;
4235 case M32C_OPERAND_DST16RNEXTQI :
4236 fields->f_dst16_rn_ext = value;
4238 case M32C_OPERAND_DST16RNHI :
4239 fields->f_dst16_rn = value;
4241 case M32C_OPERAND_DST16RNQI :
4242 fields->f_dst16_rn = value;
4244 case M32C_OPERAND_DST16RNQI_S :
4245 fields->f_dst16_rn_QI_s = value;
4247 case M32C_OPERAND_DST16RNSI :
4248 fields->f_dst16_rn = value;
4250 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
4251 fields->f_dst32_an_unprefixed = value;
4253 case M32C_OPERAND_DST32ANPREFIXED :
4254 fields->f_dst32_an_prefixed = value;
4256 case M32C_OPERAND_DST32ANPREFIXEDHI :
4257 fields->f_dst32_an_prefixed = value;
4259 case M32C_OPERAND_DST32ANPREFIXEDQI :
4260 fields->f_dst32_an_prefixed = value;
4262 case M32C_OPERAND_DST32ANPREFIXEDSI :
4263 fields->f_dst32_an_prefixed = value;
4265 case M32C_OPERAND_DST32ANUNPREFIXED :
4266 fields->f_dst32_an_unprefixed = value;
4268 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
4269 fields->f_dst32_an_unprefixed = value;
4271 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
4272 fields->f_dst32_an_unprefixed = value;
4274 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
4275 fields->f_dst32_an_unprefixed = value;
4277 case M32C_OPERAND_DST32R0HI_S :
4279 case M32C_OPERAND_DST32R0QI_S :
4281 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
4282 fields->f_dst32_rn_ext_unprefixed = value;
4284 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
4285 fields->f_dst32_rn_ext_unprefixed = value;
4287 case M32C_OPERAND_DST32RNPREFIXEDHI :
4288 fields->f_dst32_rn_prefixed_HI = value;
4290 case M32C_OPERAND_DST32RNPREFIXEDQI :
4291 fields->f_dst32_rn_prefixed_QI = value;
4293 case M32C_OPERAND_DST32RNPREFIXEDSI :
4294 fields->f_dst32_rn_prefixed_SI = value;
4296 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
4297 fields->f_dst32_rn_unprefixed_HI = value;
4299 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
4300 fields->f_dst32_rn_unprefixed_QI = value;
4302 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
4303 fields->f_dst32_rn_unprefixed_SI = value;
4305 case M32C_OPERAND_G :
4307 case M32C_OPERAND_IMM_12_S4 :
4308 fields->f_imm_12_s4 = value;
4310 case M32C_OPERAND_IMM_12_S4N :
4311 fields->f_imm_12_s4 = value;
4313 case M32C_OPERAND_IMM_13_U3 :
4314 fields->f_imm_13_u3 = value;
4316 case M32C_OPERAND_IMM_16_HI :
4317 fields->f_dsp_16_s16 = value;
4319 case M32C_OPERAND_IMM_16_QI :
4320 fields->f_dsp_16_s8 = value;
4322 case M32C_OPERAND_IMM_16_SI :
4323 fields->f_dsp_16_s32 = value;
4325 case M32C_OPERAND_IMM_20_S4 :
4326 fields->f_imm_20_s4 = value;
4328 case M32C_OPERAND_IMM_24_HI :
4329 fields->f_dsp_24_s16 = value;
4331 case M32C_OPERAND_IMM_24_QI :
4332 fields->f_dsp_24_s8 = value;
4334 case M32C_OPERAND_IMM_24_SI :
4335 fields->f_dsp_24_s32 = value;
4337 case M32C_OPERAND_IMM_32_HI :
4338 fields->f_dsp_32_s16 = value;
4340 case M32C_OPERAND_IMM_32_QI :
4341 fields->f_dsp_32_s8 = value;
4343 case M32C_OPERAND_IMM_32_SI :
4344 fields->f_dsp_32_s32 = value;
4346 case M32C_OPERAND_IMM_40_HI :
4347 fields->f_dsp_40_s16 = value;
4349 case M32C_OPERAND_IMM_40_QI :
4350 fields->f_dsp_40_s8 = value;
4352 case M32C_OPERAND_IMM_40_SI :
4353 fields->f_dsp_40_s32 = value;
4355 case M32C_OPERAND_IMM_48_HI :
4356 fields->f_dsp_48_s16 = value;
4358 case M32C_OPERAND_IMM_48_QI :
4359 fields->f_dsp_48_s8 = value;
4361 case M32C_OPERAND_IMM_48_SI :
4362 fields->f_dsp_48_s32 = value;
4364 case M32C_OPERAND_IMM_56_HI :
4365 fields->f_dsp_56_s16 = value;
4367 case M32C_OPERAND_IMM_56_QI :
4368 fields->f_dsp_56_s8 = value;
4370 case M32C_OPERAND_IMM_64_HI :
4371 fields->f_dsp_64_s16 = value;
4373 case M32C_OPERAND_IMM_8_HI :
4374 fields->f_dsp_8_s16 = value;
4376 case M32C_OPERAND_IMM_8_QI :
4377 fields->f_dsp_8_s8 = value;
4379 case M32C_OPERAND_IMM_8_S4 :
4380 fields->f_imm_8_s4 = value;
4382 case M32C_OPERAND_IMM_8_S4N :
4383 fields->f_imm_8_s4 = value;
4385 case M32C_OPERAND_IMM_SH_12_S4 :
4386 fields->f_imm_12_s4 = value;
4388 case M32C_OPERAND_IMM_SH_20_S4 :
4389 fields->f_imm_20_s4 = value;
4391 case M32C_OPERAND_IMM_SH_8_S4 :
4392 fields->f_imm_8_s4 = value;
4394 case M32C_OPERAND_IMM1_S :
4395 fields->f_imm1_S = value;
4397 case M32C_OPERAND_IMM3_S :
4398 fields->f_imm3_S = value;
4400 case M32C_OPERAND_LAB_16_8 :
4401 fields->f_lab_16_8 = value;
4403 case M32C_OPERAND_LAB_24_8 :
4404 fields->f_lab_24_8 = value;
4406 case M32C_OPERAND_LAB_32_8 :
4407 fields->f_lab_32_8 = value;
4409 case M32C_OPERAND_LAB_40_8 :
4410 fields->f_lab_40_8 = value;
4412 case M32C_OPERAND_LAB_5_3 :
4413 fields->f_lab_5_3 = value;
4415 case M32C_OPERAND_LAB_8_16 :
4416 fields->f_lab_8_16 = value;
4418 case M32C_OPERAND_LAB_8_24 :
4419 fields->f_lab_8_24 = value;
4421 case M32C_OPERAND_LAB_8_8 :
4422 fields->f_lab_8_8 = value;
4424 case M32C_OPERAND_LAB32_JMP_S :
4425 fields->f_lab32_jmp_s = value;
4427 case M32C_OPERAND_Q :
4429 case M32C_OPERAND_R0 :
4431 case M32C_OPERAND_R0H :
4433 case M32C_OPERAND_R0L :
4435 case M32C_OPERAND_R1 :
4437 case M32C_OPERAND_R1R2R0 :
4439 case M32C_OPERAND_R2 :
4441 case M32C_OPERAND_R2R0 :
4443 case M32C_OPERAND_R3 :
4445 case M32C_OPERAND_R3R1 :
4447 case M32C_OPERAND_REGSETPOP :
4448 fields->f_8_8 = value;
4450 case M32C_OPERAND_REGSETPUSH :
4451 fields->f_8_8 = value;
4453 case M32C_OPERAND_RN16_PUSH_S :
4454 fields->f_4_1 = value;
4456 case M32C_OPERAND_S :
4458 case M32C_OPERAND_SRC16AN :
4459 fields->f_src16_an = value;
4461 case M32C_OPERAND_SRC16ANHI :
4462 fields->f_src16_an = value;
4464 case M32C_OPERAND_SRC16ANQI :
4465 fields->f_src16_an = value;
4467 case M32C_OPERAND_SRC16RNHI :
4468 fields->f_src16_rn = value;
4470 case M32C_OPERAND_SRC16RNQI :
4471 fields->f_src16_rn = value;
4473 case M32C_OPERAND_SRC32ANPREFIXED :
4474 fields->f_src32_an_prefixed = value;
4476 case M32C_OPERAND_SRC32ANPREFIXEDHI :
4477 fields->f_src32_an_prefixed = value;
4479 case M32C_OPERAND_SRC32ANPREFIXEDQI :
4480 fields->f_src32_an_prefixed = value;
4482 case M32C_OPERAND_SRC32ANPREFIXEDSI :
4483 fields->f_src32_an_prefixed = value;
4485 case M32C_OPERAND_SRC32ANUNPREFIXED :
4486 fields->f_src32_an_unprefixed = value;
4488 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
4489 fields->f_src32_an_unprefixed = value;
4491 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
4492 fields->f_src32_an_unprefixed = value;
4494 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
4495 fields->f_src32_an_unprefixed = value;
4497 case M32C_OPERAND_SRC32RNPREFIXEDHI :
4498 fields->f_src32_rn_prefixed_HI = value;
4500 case M32C_OPERAND_SRC32RNPREFIXEDQI :
4501 fields->f_src32_rn_prefixed_QI = value;
4503 case M32C_OPERAND_SRC32RNPREFIXEDSI :
4504 fields->f_src32_rn_prefixed_SI = value;
4506 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
4507 fields->f_src32_rn_unprefixed_HI = value;
4509 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
4510 fields->f_src32_rn_unprefixed_QI = value;
4512 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
4513 fields->f_src32_rn_unprefixed_SI = value;
4515 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
4516 fields->f_5_1 = value;
4518 case M32C_OPERAND_X :
4520 case M32C_OPERAND_Z :
4522 case M32C_OPERAND_COND16_16 :
4523 fields->f_dsp_16_u8 = value;
4525 case M32C_OPERAND_COND16_24 :
4526 fields->f_dsp_24_u8 = value;
4528 case M32C_OPERAND_COND16_32 :
4529 fields->f_dsp_32_u8 = value;
4531 case M32C_OPERAND_COND16C :
4532 fields->f_cond16 = value;
4534 case M32C_OPERAND_COND16J :
4535 fields->f_cond16 = value;
4537 case M32C_OPERAND_COND16J5 :
4538 fields->f_cond16j_5 = value;
4540 case M32C_OPERAND_COND32 :
4541 fields->f_cond32 = value;
4543 case M32C_OPERAND_COND32_16 :
4544 fields->f_dsp_16_u8 = value;
4546 case M32C_OPERAND_COND32_24 :
4547 fields->f_dsp_24_u8 = value;
4549 case M32C_OPERAND_COND32_32 :
4550 fields->f_dsp_32_u8 = value;
4552 case M32C_OPERAND_COND32_40 :
4553 fields->f_dsp_40_u8 = value;
4555 case M32C_OPERAND_COND32J :
4556 fields->f_cond32j = value;
4558 case M32C_OPERAND_CR1_PREFIXED_32 :
4559 fields->f_21_3 = value;
4561 case M32C_OPERAND_CR1_UNPREFIXED_32 :
4562 fields->f_13_3 = value;
4564 case M32C_OPERAND_CR16 :
4565 fields->f_9_3 = value;
4567 case M32C_OPERAND_CR2_32 :
4568 fields->f_13_3 = value;
4570 case M32C_OPERAND_CR3_PREFIXED_32 :
4571 fields->f_21_3 = value;
4573 case M32C_OPERAND_CR3_UNPREFIXED_32 :
4574 fields->f_13_3 = value;
4576 case M32C_OPERAND_FLAGS16 :
4577 fields->f_9_3 = value;
4579 case M32C_OPERAND_FLAGS32 :
4580 fields->f_13_3 = value;
4582 case M32C_OPERAND_SCCOND32 :
4583 fields->f_cond16 = value;
4585 case M32C_OPERAND_SIZE :
4589 /* xgettext:c-format */
4590 fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
4597 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
4599 CGEN_FIELDS * fields,
4604 case M32C_OPERAND_A0 :
4606 case M32C_OPERAND_A1 :
4608 case M32C_OPERAND_AN16_PUSH_S :
4609 fields->f_4_1 = value;
4611 case M32C_OPERAND_BIT16AN :
4612 fields->f_dst16_an = value;
4614 case M32C_OPERAND_BIT16RN :
4615 fields->f_dst16_rn = value;
4617 case M32C_OPERAND_BIT32ANPREFIXED :
4618 fields->f_dst32_an_prefixed = value;
4620 case M32C_OPERAND_BIT32ANUNPREFIXED :
4621 fields->f_dst32_an_unprefixed = value;
4623 case M32C_OPERAND_BIT32RNPREFIXED :
4624 fields->f_dst32_rn_prefixed_QI = value;
4626 case M32C_OPERAND_BIT32RNUNPREFIXED :
4627 fields->f_dst32_rn_unprefixed_QI = value;
4629 case M32C_OPERAND_BITBASE16_16_S8 :
4630 fields->f_dsp_16_s8 = value;
4632 case M32C_OPERAND_BITBASE16_16_U16 :
4633 fields->f_dsp_16_u16 = value;
4635 case M32C_OPERAND_BITBASE16_16_U8 :
4636 fields->f_dsp_16_u8 = value;
4638 case M32C_OPERAND_BITBASE16_8_U11_S :
4639 fields->f_bitbase16_u11_S = value;
4641 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
4642 fields->f_bitbase32_16_s11_unprefixed = value;
4644 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
4645 fields->f_bitbase32_16_s19_unprefixed = value;
4647 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
4648 fields->f_bitbase32_16_u11_unprefixed = value;
4650 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
4651 fields->f_bitbase32_16_u19_unprefixed = value;
4653 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
4654 fields->f_bitbase32_16_u27_unprefixed = value;
4656 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
4657 fields->f_bitbase32_24_s11_prefixed = value;
4659 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
4660 fields->f_bitbase32_24_s19_prefixed = value;
4662 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
4663 fields->f_bitbase32_24_u11_prefixed = value;
4665 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
4666 fields->f_bitbase32_24_u19_prefixed = value;
4668 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
4669 fields->f_bitbase32_24_u27_prefixed = value;
4671 case M32C_OPERAND_BITNO16R :
4672 fields->f_dsp_16_u8 = value;
4674 case M32C_OPERAND_BITNO32PREFIXED :
4675 fields->f_bitno32_prefixed = value;
4677 case M32C_OPERAND_BITNO32UNPREFIXED :
4678 fields->f_bitno32_unprefixed = value;
4680 case M32C_OPERAND_DSP_10_U6 :
4681 fields->f_dsp_10_u6 = value;
4683 case M32C_OPERAND_DSP_16_S16 :
4684 fields->f_dsp_16_s16 = value;
4686 case M32C_OPERAND_DSP_16_S8 :
4687 fields->f_dsp_16_s8 = value;
4689 case M32C_OPERAND_DSP_16_U16 :
4690 fields->f_dsp_16_u16 = value;
4692 case M32C_OPERAND_DSP_16_U20 :
4693 fields->f_dsp_16_u24 = value;
4695 case M32C_OPERAND_DSP_16_U24 :
4696 fields->f_dsp_16_u24 = value;
4698 case M32C_OPERAND_DSP_16_U8 :
4699 fields->f_dsp_16_u8 = value;
4701 case M32C_OPERAND_DSP_24_S16 :
4702 fields->f_dsp_24_s16 = value;
4704 case M32C_OPERAND_DSP_24_S8 :
4705 fields->f_dsp_24_s8 = value;
4707 case M32C_OPERAND_DSP_24_U16 :
4708 fields->f_dsp_24_u16 = value;
4710 case M32C_OPERAND_DSP_24_U20 :
4711 fields->f_dsp_24_u24 = value;
4713 case M32C_OPERAND_DSP_24_U24 :
4714 fields->f_dsp_24_u24 = value;
4716 case M32C_OPERAND_DSP_24_U8 :
4717 fields->f_dsp_24_u8 = value;
4719 case M32C_OPERAND_DSP_32_S16 :
4720 fields->f_dsp_32_s16 = value;
4722 case M32C_OPERAND_DSP_32_S8 :
4723 fields->f_dsp_32_s8 = value;
4725 case M32C_OPERAND_DSP_32_U16 :
4726 fields->f_dsp_32_u16 = value;
4728 case M32C_OPERAND_DSP_32_U20 :
4729 fields->f_dsp_32_u24 = value;
4731 case M32C_OPERAND_DSP_32_U24 :
4732 fields->f_dsp_32_u24 = value;
4734 case M32C_OPERAND_DSP_32_U8 :
4735 fields->f_dsp_32_u8 = value;
4737 case M32C_OPERAND_DSP_40_S16 :
4738 fields->f_dsp_40_s16 = value;
4740 case M32C_OPERAND_DSP_40_S8 :
4741 fields->f_dsp_40_s8 = value;
4743 case M32C_OPERAND_DSP_40_U16 :
4744 fields->f_dsp_40_u16 = value;
4746 case M32C_OPERAND_DSP_40_U24 :
4747 fields->f_dsp_40_u24 = value;
4749 case M32C_OPERAND_DSP_40_U8 :
4750 fields->f_dsp_40_u8 = value;
4752 case M32C_OPERAND_DSP_48_S16 :
4753 fields->f_dsp_48_s16 = value;
4755 case M32C_OPERAND_DSP_48_S8 :
4756 fields->f_dsp_48_s8 = value;
4758 case M32C_OPERAND_DSP_48_U16 :
4759 fields->f_dsp_48_u16 = value;
4761 case M32C_OPERAND_DSP_48_U24 :
4762 fields->f_dsp_48_u24 = value;
4764 case M32C_OPERAND_DSP_48_U8 :
4765 fields->f_dsp_48_u8 = value;
4767 case M32C_OPERAND_DSP_8_S24 :
4768 fields->f_dsp_8_s24 = value;
4770 case M32C_OPERAND_DSP_8_S8 :
4771 fields->f_dsp_8_s8 = value;
4773 case M32C_OPERAND_DSP_8_U16 :
4774 fields->f_dsp_8_u16 = value;
4776 case M32C_OPERAND_DSP_8_U24 :
4777 fields->f_dsp_8_u24 = value;
4779 case M32C_OPERAND_DSP_8_U6 :
4780 fields->f_dsp_8_u6 = value;
4782 case M32C_OPERAND_DSP_8_U8 :
4783 fields->f_dsp_8_u8 = value;
4785 case M32C_OPERAND_DST16AN :
4786 fields->f_dst16_an = value;
4788 case M32C_OPERAND_DST16AN_S :
4789 fields->f_dst16_an_s = value;
4791 case M32C_OPERAND_DST16ANHI :
4792 fields->f_dst16_an = value;
4794 case M32C_OPERAND_DST16ANQI :
4795 fields->f_dst16_an = value;
4797 case M32C_OPERAND_DST16ANQI_S :
4798 fields->f_dst16_rn_QI_s = value;
4800 case M32C_OPERAND_DST16ANSI :
4801 fields->f_dst16_an = value;
4803 case M32C_OPERAND_DST16RNEXTQI :
4804 fields->f_dst16_rn_ext = value;
4806 case M32C_OPERAND_DST16RNHI :
4807 fields->f_dst16_rn = value;
4809 case M32C_OPERAND_DST16RNQI :
4810 fields->f_dst16_rn = value;
4812 case M32C_OPERAND_DST16RNQI_S :
4813 fields->f_dst16_rn_QI_s = value;
4815 case M32C_OPERAND_DST16RNSI :
4816 fields->f_dst16_rn = value;
4818 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
4819 fields->f_dst32_an_unprefixed = value;
4821 case M32C_OPERAND_DST32ANPREFIXED :
4822 fields->f_dst32_an_prefixed = value;
4824 case M32C_OPERAND_DST32ANPREFIXEDHI :
4825 fields->f_dst32_an_prefixed = value;
4827 case M32C_OPERAND_DST32ANPREFIXEDQI :
4828 fields->f_dst32_an_prefixed = value;
4830 case M32C_OPERAND_DST32ANPREFIXEDSI :
4831 fields->f_dst32_an_prefixed = value;
4833 case M32C_OPERAND_DST32ANUNPREFIXED :
4834 fields->f_dst32_an_unprefixed = value;
4836 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
4837 fields->f_dst32_an_unprefixed = value;
4839 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
4840 fields->f_dst32_an_unprefixed = value;
4842 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
4843 fields->f_dst32_an_unprefixed = value;
4845 case M32C_OPERAND_DST32R0HI_S :
4847 case M32C_OPERAND_DST32R0QI_S :
4849 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
4850 fields->f_dst32_rn_ext_unprefixed = value;
4852 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
4853 fields->f_dst32_rn_ext_unprefixed = value;
4855 case M32C_OPERAND_DST32RNPREFIXEDHI :
4856 fields->f_dst32_rn_prefixed_HI = value;
4858 case M32C_OPERAND_DST32RNPREFIXEDQI :
4859 fields->f_dst32_rn_prefixed_QI = value;
4861 case M32C_OPERAND_DST32RNPREFIXEDSI :
4862 fields->f_dst32_rn_prefixed_SI = value;
4864 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
4865 fields->f_dst32_rn_unprefixed_HI = value;
4867 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
4868 fields->f_dst32_rn_unprefixed_QI = value;
4870 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
4871 fields->f_dst32_rn_unprefixed_SI = value;
4873 case M32C_OPERAND_G :
4875 case M32C_OPERAND_IMM_12_S4 :
4876 fields->f_imm_12_s4 = value;
4878 case M32C_OPERAND_IMM_12_S4N :
4879 fields->f_imm_12_s4 = value;
4881 case M32C_OPERAND_IMM_13_U3 :
4882 fields->f_imm_13_u3 = value;
4884 case M32C_OPERAND_IMM_16_HI :
4885 fields->f_dsp_16_s16 = value;
4887 case M32C_OPERAND_IMM_16_QI :
4888 fields->f_dsp_16_s8 = value;
4890 case M32C_OPERAND_IMM_16_SI :
4891 fields->f_dsp_16_s32 = value;
4893 case M32C_OPERAND_IMM_20_S4 :
4894 fields->f_imm_20_s4 = value;
4896 case M32C_OPERAND_IMM_24_HI :
4897 fields->f_dsp_24_s16 = value;
4899 case M32C_OPERAND_IMM_24_QI :
4900 fields->f_dsp_24_s8 = value;
4902 case M32C_OPERAND_IMM_24_SI :
4903 fields->f_dsp_24_s32 = value;
4905 case M32C_OPERAND_IMM_32_HI :
4906 fields->f_dsp_32_s16 = value;
4908 case M32C_OPERAND_IMM_32_QI :
4909 fields->f_dsp_32_s8 = value;
4911 case M32C_OPERAND_IMM_32_SI :
4912 fields->f_dsp_32_s32 = value;
4914 case M32C_OPERAND_IMM_40_HI :
4915 fields->f_dsp_40_s16 = value;
4917 case M32C_OPERAND_IMM_40_QI :
4918 fields->f_dsp_40_s8 = value;
4920 case M32C_OPERAND_IMM_40_SI :
4921 fields->f_dsp_40_s32 = value;
4923 case M32C_OPERAND_IMM_48_HI :
4924 fields->f_dsp_48_s16 = value;
4926 case M32C_OPERAND_IMM_48_QI :
4927 fields->f_dsp_48_s8 = value;
4929 case M32C_OPERAND_IMM_48_SI :
4930 fields->f_dsp_48_s32 = value;
4932 case M32C_OPERAND_IMM_56_HI :
4933 fields->f_dsp_56_s16 = value;
4935 case M32C_OPERAND_IMM_56_QI :
4936 fields->f_dsp_56_s8 = value;
4938 case M32C_OPERAND_IMM_64_HI :
4939 fields->f_dsp_64_s16 = value;
4941 case M32C_OPERAND_IMM_8_HI :
4942 fields->f_dsp_8_s16 = value;
4944 case M32C_OPERAND_IMM_8_QI :
4945 fields->f_dsp_8_s8 = value;
4947 case M32C_OPERAND_IMM_8_S4 :
4948 fields->f_imm_8_s4 = value;
4950 case M32C_OPERAND_IMM_8_S4N :
4951 fields->f_imm_8_s4 = value;
4953 case M32C_OPERAND_IMM_SH_12_S4 :
4954 fields->f_imm_12_s4 = value;
4956 case M32C_OPERAND_IMM_SH_20_S4 :
4957 fields->f_imm_20_s4 = value;
4959 case M32C_OPERAND_IMM_SH_8_S4 :
4960 fields->f_imm_8_s4 = value;
4962 case M32C_OPERAND_IMM1_S :
4963 fields->f_imm1_S = value;
4965 case M32C_OPERAND_IMM3_S :
4966 fields->f_imm3_S = value;
4968 case M32C_OPERAND_LAB_16_8 :
4969 fields->f_lab_16_8 = value;
4971 case M32C_OPERAND_LAB_24_8 :
4972 fields->f_lab_24_8 = value;
4974 case M32C_OPERAND_LAB_32_8 :
4975 fields->f_lab_32_8 = value;
4977 case M32C_OPERAND_LAB_40_8 :
4978 fields->f_lab_40_8 = value;
4980 case M32C_OPERAND_LAB_5_3 :
4981 fields->f_lab_5_3 = value;
4983 case M32C_OPERAND_LAB_8_16 :
4984 fields->f_lab_8_16 = value;
4986 case M32C_OPERAND_LAB_8_24 :
4987 fields->f_lab_8_24 = value;
4989 case M32C_OPERAND_LAB_8_8 :
4990 fields->f_lab_8_8 = value;
4992 case M32C_OPERAND_LAB32_JMP_S :
4993 fields->f_lab32_jmp_s = value;
4995 case M32C_OPERAND_Q :
4997 case M32C_OPERAND_R0 :
4999 case M32C_OPERAND_R0H :
5001 case M32C_OPERAND_R0L :
5003 case M32C_OPERAND_R1 :
5005 case M32C_OPERAND_R1R2R0 :
5007 case M32C_OPERAND_R2 :
5009 case M32C_OPERAND_R2R0 :
5011 case M32C_OPERAND_R3 :
5013 case M32C_OPERAND_R3R1 :
5015 case M32C_OPERAND_REGSETPOP :
5016 fields->f_8_8 = value;
5018 case M32C_OPERAND_REGSETPUSH :
5019 fields->f_8_8 = value;
5021 case M32C_OPERAND_RN16_PUSH_S :
5022 fields->f_4_1 = value;
5024 case M32C_OPERAND_S :
5026 case M32C_OPERAND_SRC16AN :
5027 fields->f_src16_an = value;
5029 case M32C_OPERAND_SRC16ANHI :
5030 fields->f_src16_an = value;
5032 case M32C_OPERAND_SRC16ANQI :
5033 fields->f_src16_an = value;
5035 case M32C_OPERAND_SRC16RNHI :
5036 fields->f_src16_rn = value;
5038 case M32C_OPERAND_SRC16RNQI :
5039 fields->f_src16_rn = value;
5041 case M32C_OPERAND_SRC32ANPREFIXED :
5042 fields->f_src32_an_prefixed = value;
5044 case M32C_OPERAND_SRC32ANPREFIXEDHI :
5045 fields->f_src32_an_prefixed = value;
5047 case M32C_OPERAND_SRC32ANPREFIXEDQI :
5048 fields->f_src32_an_prefixed = value;
5050 case M32C_OPERAND_SRC32ANPREFIXEDSI :
5051 fields->f_src32_an_prefixed = value;
5053 case M32C_OPERAND_SRC32ANUNPREFIXED :
5054 fields->f_src32_an_unprefixed = value;
5056 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
5057 fields->f_src32_an_unprefixed = value;
5059 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
5060 fields->f_src32_an_unprefixed = value;
5062 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
5063 fields->f_src32_an_unprefixed = value;
5065 case M32C_OPERAND_SRC32RNPREFIXEDHI :
5066 fields->f_src32_rn_prefixed_HI = value;
5068 case M32C_OPERAND_SRC32RNPREFIXEDQI :
5069 fields->f_src32_rn_prefixed_QI = value;
5071 case M32C_OPERAND_SRC32RNPREFIXEDSI :
5072 fields->f_src32_rn_prefixed_SI = value;
5074 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
5075 fields->f_src32_rn_unprefixed_HI = value;
5077 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
5078 fields->f_src32_rn_unprefixed_QI = value;
5080 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
5081 fields->f_src32_rn_unprefixed_SI = value;
5083 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
5084 fields->f_5_1 = value;
5086 case M32C_OPERAND_X :
5088 case M32C_OPERAND_Z :
5090 case M32C_OPERAND_COND16_16 :
5091 fields->f_dsp_16_u8 = value;
5093 case M32C_OPERAND_COND16_24 :
5094 fields->f_dsp_24_u8 = value;
5096 case M32C_OPERAND_COND16_32 :
5097 fields->f_dsp_32_u8 = value;
5099 case M32C_OPERAND_COND16C :
5100 fields->f_cond16 = value;
5102 case M32C_OPERAND_COND16J :
5103 fields->f_cond16 = value;
5105 case M32C_OPERAND_COND16J5 :
5106 fields->f_cond16j_5 = value;
5108 case M32C_OPERAND_COND32 :
5109 fields->f_cond32 = value;
5111 case M32C_OPERAND_COND32_16 :
5112 fields->f_dsp_16_u8 = value;
5114 case M32C_OPERAND_COND32_24 :
5115 fields->f_dsp_24_u8 = value;
5117 case M32C_OPERAND_COND32_32 :
5118 fields->f_dsp_32_u8 = value;
5120 case M32C_OPERAND_COND32_40 :
5121 fields->f_dsp_40_u8 = value;
5123 case M32C_OPERAND_COND32J :
5124 fields->f_cond32j = value;
5126 case M32C_OPERAND_CR1_PREFIXED_32 :
5127 fields->f_21_3 = value;
5129 case M32C_OPERAND_CR1_UNPREFIXED_32 :
5130 fields->f_13_3 = value;
5132 case M32C_OPERAND_CR16 :
5133 fields->f_9_3 = value;
5135 case M32C_OPERAND_CR2_32 :
5136 fields->f_13_3 = value;
5138 case M32C_OPERAND_CR3_PREFIXED_32 :
5139 fields->f_21_3 = value;
5141 case M32C_OPERAND_CR3_UNPREFIXED_32 :
5142 fields->f_13_3 = value;
5144 case M32C_OPERAND_FLAGS16 :
5145 fields->f_9_3 = value;
5147 case M32C_OPERAND_FLAGS32 :
5148 fields->f_13_3 = value;
5150 case M32C_OPERAND_SCCOND32 :
5151 fields->f_cond16 = value;
5153 case M32C_OPERAND_SIZE :
5157 /* xgettext:c-format */
5158 fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"),
5164 /* Function to call before using the instruction builder tables. */
5167 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd)
5169 cd->insert_handlers = & m32c_cgen_insert_handlers[0];
5170 cd->extract_handlers = & m32c_cgen_extract_handlers[0];
5172 cd->insert_operand = m32c_cgen_insert_operand;
5173 cd->extract_operand = m32c_cgen_extract_operand;
5175 cd->get_int_operand = m32c_cgen_get_int_operand;
5176 cd->set_int_operand = m32c_cgen_set_int_operand;
5177 cd->get_vma_operand = m32c_cgen_get_vma_operand;
5178 cd->set_vma_operand = m32c_cgen_set_vma_operand;