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 (C) 1996-2017 Free Software Foundation, Inc.
8 This file is part of libopcodes.
10 This library is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3, or (at your option)
15 It is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18 License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software Foundation, Inc.,
22 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
24 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
33 #include "m32c-desc.h"
35 #include "cgen/basic-modes.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 > 8 * sizeof (CGEN_INSN_INT))
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);
210 int shift_within_word, shift_to_word, shift;
212 /* How to shift the value to BIT0 of the word. */
213 shift_to_word = total_length - (word_offset + word_length);
215 /* How to shift the value to the field within the word. */
216 if (CGEN_INSN_LSB0_P)
217 shift_within_word = start + 1 - length;
219 shift_within_word = word_length - start - length;
221 /* The total SHIFT, then mask in the value. */
222 shift = shift_to_word + shift_within_word;
223 *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
226 #else /* ! CGEN_INT_INSN_P */
229 unsigned char *bufp = (unsigned char *) buffer + word_offset / 8;
231 insert_1 (cd, value, start, length, word_length, bufp);
234 #endif /* ! CGEN_INT_INSN_P */
239 /* Default insn builder (insert handler).
240 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
241 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
242 recorded in host byte order, otherwise BUFFER is an array of bytes
243 and the value is recorded in target byte order).
244 The result is an error message or NULL if success. */
247 insert_insn_normal (CGEN_CPU_DESC cd,
248 const CGEN_INSN * insn,
249 CGEN_FIELDS * fields,
250 CGEN_INSN_BYTES_PTR buffer,
253 const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
255 const CGEN_SYNTAX_CHAR_TYPE * syn;
257 CGEN_INIT_INSERT (cd);
258 value = CGEN_INSN_BASE_VALUE (insn);
260 /* If we're recording insns as numbers (rather than a string of bytes),
261 target byte order handling is deferred until later. */
265 put_insn_int_value (cd, buffer, cd->base_insn_bitsize,
266 CGEN_FIELDS_BITSIZE (fields), value);
270 cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
271 (unsigned) CGEN_FIELDS_BITSIZE (fields)),
274 #endif /* ! CGEN_INT_INSN_P */
276 /* ??? It would be better to scan the format's fields.
277 Still need to be able to insert a value based on the operand though;
278 e.g. storing a branch displacement that got resolved later.
279 Needs more thought first. */
281 for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn)
285 if (CGEN_SYNTAX_CHAR_P (* syn))
288 errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
298 /* Cover function to store an insn value into an integral insn. Must go here
299 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
302 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
303 CGEN_INSN_BYTES_PTR buf,
308 /* For architectures with insns smaller than the base-insn-bitsize,
309 length may be too big. */
310 if (length > insn_length)
314 int shift = insn_length - length;
315 /* Written this way to avoid undefined behaviour. */
316 CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1;
318 *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift);
323 /* Operand extraction. */
325 #if ! CGEN_INT_INSN_P
327 /* Subroutine of extract_normal.
328 Ensure sufficient bytes are cached in EX_INFO.
329 OFFSET is the offset in bytes from the start of the insn of the value.
330 BYTES is the length of the needed value.
331 Returns 1 for success, 0 for failure. */
333 static CGEN_INLINE int
334 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
335 CGEN_EXTRACT_INFO *ex_info,
340 /* It's doubtful that the middle part has already been fetched so
341 we don't optimize that case. kiss. */
343 disassemble_info *info = (disassemble_info *) ex_info->dis_info;
345 /* First do a quick check. */
346 mask = (1 << bytes) - 1;
347 if (((ex_info->valid >> offset) & mask) == mask)
350 /* Search for the first byte we need to read. */
351 for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1)
352 if (! (mask & ex_info->valid))
360 status = (*info->read_memory_func)
361 (pc, ex_info->insn_bytes + offset, bytes, info);
365 (*info->memory_error_func) (status, pc, info);
369 ex_info->valid |= ((1 << bytes) - 1) << offset;
375 /* Subroutine of extract_normal. */
377 static CGEN_INLINE long
378 extract_1 (CGEN_CPU_DESC cd,
379 CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
384 bfd_vma pc ATTRIBUTE_UNUSED)
389 x = cgen_get_insn_value (cd, bufp, word_length);
391 if (CGEN_INSN_LSB0_P)
392 shift = (start + 1) - length;
394 shift = (word_length - (start + length));
398 #endif /* ! CGEN_INT_INSN_P */
400 /* Default extraction routine.
402 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
403 or sometimes less for cases like the m32r where the base insn size is 32
404 but some insns are 16 bits.
405 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
406 but for generality we take a bitmask of all of them.
407 WORD_OFFSET is the offset in bits from the start of the insn of the value.
408 WORD_LENGTH is the length of the word in bits in which the value resides.
409 START is the starting bit number in the word, architecture origin.
410 LENGTH is the length of VALUE in bits.
411 TOTAL_LENGTH is the total length of the insn in bits.
413 Returns 1 for success, 0 for failure. */
415 /* ??? The return code isn't properly used. wip. */
417 /* ??? This doesn't handle bfd_vma's. Create another function when
421 extract_normal (CGEN_CPU_DESC cd,
422 #if ! CGEN_INT_INSN_P
423 CGEN_EXTRACT_INFO *ex_info,
425 CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
427 CGEN_INSN_INT insn_value,
429 unsigned int word_offset,
432 unsigned int word_length,
433 unsigned int total_length,
434 #if ! CGEN_INT_INSN_P
437 bfd_vma pc ATTRIBUTE_UNUSED,
443 /* If LENGTH is zero, this operand doesn't contribute to the value
444 so give it a standard value of zero. */
451 if (word_length > 8 * sizeof (CGEN_INSN_INT))
454 /* For architectures with insns smaller than the insn-base-bitsize,
455 word_length may be too big. */
456 if (cd->min_insn_bitsize < cd->base_insn_bitsize)
458 if (word_offset + word_length > total_length)
459 word_length = total_length - word_offset;
462 /* Does the value reside in INSN_VALUE, and at the right alignment? */
464 if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length))
466 if (CGEN_INSN_LSB0_P)
467 value = insn_value >> ((word_offset + start + 1) - length);
469 value = insn_value >> (total_length - ( word_offset + start + length));
472 #if ! CGEN_INT_INSN_P
476 unsigned char *bufp = ex_info->insn_bytes + word_offset / 8;
478 if (word_length > 8 * sizeof (CGEN_INSN_INT))
481 if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0)
484 value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc);
487 #endif /* ! CGEN_INT_INSN_P */
489 /* Written this way to avoid undefined behaviour. */
490 mask = (((1L << (length - 1)) - 1) << 1) | 1;
494 if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
495 && (value & (1L << (length - 1))))
503 /* Default insn extractor.
505 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
506 The extracted fields are stored in FIELDS.
507 EX_INFO is used to handle reading variable length insns.
508 Return the length of the insn in bits, or 0 if no match,
509 or -1 if an error occurs fetching data (memory_error_func will have
513 extract_insn_normal (CGEN_CPU_DESC cd,
514 const CGEN_INSN *insn,
515 CGEN_EXTRACT_INFO *ex_info,
516 CGEN_INSN_INT insn_value,
520 const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
521 const CGEN_SYNTAX_CHAR_TYPE *syn;
523 CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
525 CGEN_INIT_EXTRACT (cd);
527 for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
531 if (CGEN_SYNTAX_CHAR_P (*syn))
534 length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
535 ex_info, insn_value, fields, pc);
540 /* We recognized and successfully extracted this insn. */
541 return CGEN_INSN_BITSIZE (insn);
544 /* Machine generated code added here. */
546 const char * m32c_cgen_insert_operand
547 (CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
549 /* Main entry point for operand insertion.
551 This function is basically just a big switch statement. Earlier versions
552 used tables to look up the function to use, but
553 - if the table contains both assembler and disassembler functions then
554 the disassembler contains much of the assembler and vice-versa,
555 - there's a lot of inlining possibilities as things grow,
556 - using a switch statement avoids the function call overhead.
558 This function could be moved into `parse_insn_normal', but keeping it
559 separate makes clear the interface between `parse_insn_normal' and each of
560 the handlers. It's also needed by GAS to insert operands that couldn't be
561 resolved during parsing. */
564 m32c_cgen_insert_operand (CGEN_CPU_DESC cd,
566 CGEN_FIELDS * fields,
567 CGEN_INSN_BYTES_PTR buffer,
568 bfd_vma pc ATTRIBUTE_UNUSED)
570 const char * errmsg = NULL;
571 unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
575 case M32C_OPERAND_A0 :
577 case M32C_OPERAND_A1 :
579 case M32C_OPERAND_AN16_PUSH_S :
580 errmsg = insert_normal (cd, fields->f_4_1, 0, 0, 4, 1, 32, total_length, buffer);
582 case M32C_OPERAND_BIT16AN :
583 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
585 case M32C_OPERAND_BIT16RN :
586 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
588 case M32C_OPERAND_BIT3_S :
591 FLD (f_7_1) = ((((FLD (f_imm3_S)) - (1))) & (1));
592 FLD (f_2_2) = ((((UINT) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3));
594 errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
597 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
602 case M32C_OPERAND_BIT32ANPREFIXED :
603 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
605 case M32C_OPERAND_BIT32ANUNPREFIXED :
606 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
608 case M32C_OPERAND_BIT32RNPREFIXED :
610 long value = fields->f_dst32_rn_prefixed_QI;
611 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
612 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
615 case M32C_OPERAND_BIT32RNUNPREFIXED :
617 long value = fields->f_dst32_rn_unprefixed_QI;
618 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
619 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
622 case M32C_OPERAND_BITBASE16_16_S8 :
623 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
625 case M32C_OPERAND_BITBASE16_16_U16 :
627 long value = fields->f_dsp_16_u16;
628 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
629 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
632 case M32C_OPERAND_BITBASE16_16_U8 :
633 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
635 case M32C_OPERAND_BITBASE16_8_U11_S :
638 FLD (f_bitno16_S) = ((FLD (f_bitbase16_u11_S)) & (7));
639 FLD (f_dsp_8_u8) = ((((UINT) (FLD (f_bitbase16_u11_S)) >> (3))) & (255));
641 errmsg = insert_normal (cd, fields->f_bitno16_S, 0, 0, 5, 3, 32, total_length, buffer);
644 errmsg = insert_normal (cd, fields->f_dsp_8_u8, 0, 0, 8, 8, 32, total_length, buffer);
649 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
652 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s11_unprefixed)) & (7));
653 FLD (f_dsp_16_s8) = ((INT) (FLD (f_bitbase32_16_s11_unprefixed)) >> (3));
655 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
658 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
663 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
666 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s19_unprefixed)) & (7));
667 FLD (f_dsp_16_s16) = ((INT) (FLD (f_bitbase32_16_s19_unprefixed)) >> (3));
669 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
673 long value = fields->f_dsp_16_s16;
674 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
675 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
681 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
684 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u11_unprefixed)) & (7));
685 FLD (f_dsp_16_u8) = ((((UINT) (FLD (f_bitbase32_16_u11_unprefixed)) >> (3))) & (255));
687 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
690 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
695 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
698 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u19_unprefixed)) & (7));
699 FLD (f_dsp_16_u16) = ((((UINT) (FLD (f_bitbase32_16_u19_unprefixed)) >> (3))) & (65535));
701 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
705 long value = fields->f_dsp_16_u16;
706 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
707 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
713 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
716 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u27_unprefixed)) & (7));
717 FLD (f_dsp_16_u16) = ((((UINT) (FLD (f_bitbase32_16_u27_unprefixed)) >> (3))) & (65535));
718 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_bitbase32_16_u27_unprefixed)) >> (19))) & (255));
720 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
724 long value = fields->f_dsp_16_u16;
725 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
726 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
730 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
735 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
738 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s11_prefixed)) & (7));
739 FLD (f_dsp_24_s8) = ((INT) (FLD (f_bitbase32_24_s11_prefixed)) >> (3));
741 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
744 errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
749 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
752 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s19_prefixed)) & (7));
753 FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_s19_prefixed)) >> (3))) & (255));
754 FLD (f_dsp_32_s8) = ((INT) (FLD (f_bitbase32_24_s19_prefixed)) >> (11));
756 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
759 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
762 errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
767 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
770 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u11_prefixed)) & (7));
771 FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_u11_prefixed)) >> (3))) & (255));
773 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
776 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
781 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
784 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u19_prefixed)) & (7));
785 FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_u19_prefixed)) >> (3))) & (255));
786 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_bitbase32_24_u19_prefixed)) >> (11))) & (255));
788 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
791 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
794 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
799 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
802 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u27_prefixed)) & (7));
803 FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_u27_prefixed)) >> (3))) & (255));
804 FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_bitbase32_24_u27_prefixed)) >> (11))) & (65535));
806 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
809 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
813 long value = fields->f_dsp_32_u16;
814 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
815 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
821 case M32C_OPERAND_BITNO16R :
822 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
824 case M32C_OPERAND_BITNO32PREFIXED :
825 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
827 case M32C_OPERAND_BITNO32UNPREFIXED :
828 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
830 case M32C_OPERAND_DSP_10_U6 :
831 errmsg = insert_normal (cd, fields->f_dsp_10_u6, 0, 0, 10, 6, 32, total_length, buffer);
833 case M32C_OPERAND_DSP_16_S16 :
835 long value = fields->f_dsp_16_s16;
836 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
837 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
840 case M32C_OPERAND_DSP_16_S8 :
841 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
843 case M32C_OPERAND_DSP_16_U16 :
845 long value = fields->f_dsp_16_u16;
846 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
847 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
850 case M32C_OPERAND_DSP_16_U20 :
853 FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535));
854 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_16_u24)) >> (16))) & (255));
857 long value = fields->f_dsp_16_u16;
858 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
859 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
863 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
868 case M32C_OPERAND_DSP_16_U24 :
871 FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535));
872 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_16_u24)) >> (16))) & (255));
875 long value = fields->f_dsp_16_u16;
876 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
877 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
881 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
886 case M32C_OPERAND_DSP_16_U8 :
887 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
889 case M32C_OPERAND_DSP_24_S16 :
892 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255));
893 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_24_s16)) >> (8))) & (255));
895 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
898 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
903 case M32C_OPERAND_DSP_24_S8 :
904 errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
906 case M32C_OPERAND_DSP_24_U16 :
909 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u16)) & (255));
910 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_24_u16)) >> (8))) & (255));
912 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
915 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
920 case M32C_OPERAND_DSP_24_U20 :
923 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255));
924 FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_dsp_24_u24)) >> (8))) & (65535));
926 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
930 long value = fields->f_dsp_32_u16;
931 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
932 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
938 case M32C_OPERAND_DSP_24_U24 :
941 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255));
942 FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_dsp_24_u24)) >> (8))) & (65535));
944 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
948 long value = fields->f_dsp_32_u16;
949 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
950 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
956 case M32C_OPERAND_DSP_24_U8 :
957 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
959 case M32C_OPERAND_DSP_32_S16 :
961 long value = fields->f_dsp_32_s16;
962 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
963 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, buffer);
966 case M32C_OPERAND_DSP_32_S8 :
967 errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
969 case M32C_OPERAND_DSP_32_U16 :
971 long value = fields->f_dsp_32_u16;
972 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
973 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
976 case M32C_OPERAND_DSP_32_U20 :
978 long value = fields->f_dsp_32_u24;
979 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
980 errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
983 case M32C_OPERAND_DSP_32_U24 :
985 long value = fields->f_dsp_32_u24;
986 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
987 errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
990 case M32C_OPERAND_DSP_32_U8 :
991 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
993 case M32C_OPERAND_DSP_40_S16 :
995 long value = fields->f_dsp_40_s16;
996 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
997 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, buffer);
1000 case M32C_OPERAND_DSP_40_S8 :
1001 errmsg = insert_normal (cd, fields->f_dsp_40_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, buffer);
1003 case M32C_OPERAND_DSP_40_U16 :
1005 long value = fields->f_dsp_40_u16;
1006 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1007 errmsg = insert_normal (cd, value, 0, 32, 8, 16, 32, total_length, buffer);
1010 case M32C_OPERAND_DSP_40_U20 :
1012 long value = fields->f_dsp_40_u20;
1013 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040))));
1014 errmsg = insert_normal (cd, value, 0, 32, 8, 20, 32, total_length, buffer);
1017 case M32C_OPERAND_DSP_40_U24 :
1019 long value = fields->f_dsp_40_u24;
1020 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
1021 errmsg = insert_normal (cd, value, 0, 32, 8, 24, 32, total_length, buffer);
1024 case M32C_OPERAND_DSP_40_U8 :
1025 errmsg = insert_normal (cd, fields->f_dsp_40_u8, 0, 32, 8, 8, 32, total_length, buffer);
1027 case M32C_OPERAND_DSP_48_S16 :
1029 long value = fields->f_dsp_48_s16;
1030 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1031 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, buffer);
1034 case M32C_OPERAND_DSP_48_S8 :
1035 errmsg = insert_normal (cd, fields->f_dsp_48_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, buffer);
1037 case M32C_OPERAND_DSP_48_U16 :
1039 long value = fields->f_dsp_48_u16;
1040 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1041 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1044 case M32C_OPERAND_DSP_48_U20 :
1047 FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_48_u20)) >> (16))) & (15));
1048 FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_u20)) & (65535));
1051 long value = fields->f_dsp_48_u16;
1052 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1053 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1057 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1062 case M32C_OPERAND_DSP_48_U24 :
1065 FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_48_u24)) >> (16))) & (255));
1066 FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_u24)) & (65535));
1069 long value = fields->f_dsp_48_u16;
1070 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1071 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1075 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1080 case M32C_OPERAND_DSP_48_U8 :
1081 errmsg = insert_normal (cd, fields->f_dsp_48_u8, 0, 32, 16, 8, 32, total_length, buffer);
1083 case M32C_OPERAND_DSP_8_S24 :
1085 long value = fields->f_dsp_8_s24;
1086 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16))));
1087 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 24, 32, total_length, buffer);
1090 case M32C_OPERAND_DSP_8_S8 :
1091 errmsg = insert_normal (cd, fields->f_dsp_8_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, buffer);
1093 case M32C_OPERAND_DSP_8_U16 :
1095 long value = fields->f_dsp_8_u16;
1096 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1097 errmsg = insert_normal (cd, value, 0, 0, 8, 16, 32, total_length, buffer);
1100 case M32C_OPERAND_DSP_8_U24 :
1102 long value = fields->f_dsp_8_u24;
1103 value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
1104 errmsg = insert_normal (cd, value, 0, 0, 8, 24, 32, total_length, buffer);
1107 case M32C_OPERAND_DSP_8_U6 :
1108 errmsg = insert_normal (cd, fields->f_dsp_8_u6, 0, 0, 8, 6, 32, total_length, buffer);
1110 case M32C_OPERAND_DSP_8_U8 :
1111 errmsg = insert_normal (cd, fields->f_dsp_8_u8, 0, 0, 8, 8, 32, total_length, buffer);
1113 case M32C_OPERAND_DST16AN :
1114 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1116 case M32C_OPERAND_DST16AN_S :
1117 errmsg = insert_normal (cd, fields->f_dst16_an_s, 0, 0, 4, 1, 32, total_length, buffer);
1119 case M32C_OPERAND_DST16ANHI :
1120 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1122 case M32C_OPERAND_DST16ANQI :
1123 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1125 case M32C_OPERAND_DST16ANQI_S :
1126 errmsg = insert_normal (cd, fields->f_dst16_rn_QI_s, 0, 0, 5, 1, 32, total_length, buffer);
1128 case M32C_OPERAND_DST16ANSI :
1129 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1131 case M32C_OPERAND_DST16RNEXTQI :
1132 errmsg = insert_normal (cd, fields->f_dst16_rn_ext, 0, 0, 14, 1, 32, total_length, buffer);
1134 case M32C_OPERAND_DST16RNHI :
1135 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
1137 case M32C_OPERAND_DST16RNQI :
1138 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
1140 case M32C_OPERAND_DST16RNQI_S :
1141 errmsg = insert_normal (cd, fields->f_dst16_rn_QI_s, 0, 0, 5, 1, 32, total_length, buffer);
1143 case M32C_OPERAND_DST16RNSI :
1144 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
1146 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
1147 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1149 case M32C_OPERAND_DST32ANPREFIXED :
1150 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1152 case M32C_OPERAND_DST32ANPREFIXEDHI :
1153 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1155 case M32C_OPERAND_DST32ANPREFIXEDQI :
1156 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1158 case M32C_OPERAND_DST32ANPREFIXEDSI :
1159 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1161 case M32C_OPERAND_DST32ANUNPREFIXED :
1162 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1164 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
1165 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1167 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
1168 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1170 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
1171 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1173 case M32C_OPERAND_DST32R0HI_S :
1175 case M32C_OPERAND_DST32R0QI_S :
1177 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
1178 errmsg = insert_normal (cd, fields->f_dst32_rn_ext_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1180 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
1181 errmsg = insert_normal (cd, fields->f_dst32_rn_ext_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1183 case M32C_OPERAND_DST32RNPREFIXEDHI :
1185 long value = fields->f_dst32_rn_prefixed_HI;
1186 value = ((((value) + (2))) % (4));
1187 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
1190 case M32C_OPERAND_DST32RNPREFIXEDQI :
1192 long value = fields->f_dst32_rn_prefixed_QI;
1193 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
1194 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
1197 case M32C_OPERAND_DST32RNPREFIXEDSI :
1199 long value = fields->f_dst32_rn_prefixed_SI;
1200 value = ((value) + (2));
1201 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
1204 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
1206 long value = fields->f_dst32_rn_unprefixed_HI;
1207 value = ((((value) + (2))) % (4));
1208 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
1211 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
1213 long value = fields->f_dst32_rn_unprefixed_QI;
1214 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
1215 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
1218 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
1220 long value = fields->f_dst32_rn_unprefixed_SI;
1221 value = ((value) + (2));
1222 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
1225 case M32C_OPERAND_G :
1227 case M32C_OPERAND_IMM_12_S4 :
1228 errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
1230 case M32C_OPERAND_IMM_12_S4N :
1231 errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
1233 case M32C_OPERAND_IMM_13_U3 :
1234 errmsg = insert_normal (cd, fields->f_imm_13_u3, 0, 0, 13, 3, 32, total_length, buffer);
1236 case M32C_OPERAND_IMM_16_HI :
1238 long value = fields->f_dsp_16_s16;
1239 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1240 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
1243 case M32C_OPERAND_IMM_16_QI :
1244 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
1246 case M32C_OPERAND_IMM_16_SI :
1249 FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_dsp_16_s32)) >> (16))) & (65535));
1250 FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_s32)) & (65535));
1253 long value = fields->f_dsp_16_u16;
1254 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1255 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
1260 long value = fields->f_dsp_32_u16;
1261 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1262 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
1268 case M32C_OPERAND_IMM_20_S4 :
1269 errmsg = insert_normal (cd, fields->f_imm_20_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, buffer);
1271 case M32C_OPERAND_IMM_24_HI :
1274 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255));
1275 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_24_s16)) >> (8))) & (255));
1277 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1280 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
1285 case M32C_OPERAND_IMM_24_QI :
1286 errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
1288 case M32C_OPERAND_IMM_24_SI :
1291 FLD (f_dsp_32_u24) = ((((UINT) (FLD (f_dsp_24_s32)) >> (8))) & (16777215));
1292 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s32)) & (255));
1294 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1298 long value = fields->f_dsp_32_u24;
1299 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
1300 errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
1306 case M32C_OPERAND_IMM_32_HI :
1308 long value = fields->f_dsp_32_s16;
1309 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1310 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, buffer);
1313 case M32C_OPERAND_IMM_32_QI :
1314 errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
1316 case M32C_OPERAND_IMM_32_SI :
1318 long value = fields->f_dsp_32_s32;
1319 value = EXTSISI (((((((((UINT) (value) >> (24))) & (255))) | (((((UINT) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000)))))));
1320 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 32, 32, total_length, buffer);
1323 case M32C_OPERAND_IMM_40_HI :
1325 long value = fields->f_dsp_40_s16;
1326 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1327 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, buffer);
1330 case M32C_OPERAND_IMM_40_QI :
1331 errmsg = insert_normal (cd, fields->f_dsp_40_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, buffer);
1333 case M32C_OPERAND_IMM_40_SI :
1336 FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_40_s32)) >> (24))) & (255));
1337 FLD (f_dsp_40_u24) = ((FLD (f_dsp_40_s32)) & (16777215));
1340 long value = fields->f_dsp_40_u24;
1341 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
1342 errmsg = insert_normal (cd, value, 0, 32, 8, 24, 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_48_HI :
1353 long value = fields->f_dsp_48_s16;
1354 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1355 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, buffer);
1358 case M32C_OPERAND_IMM_48_QI :
1359 errmsg = insert_normal (cd, fields->f_dsp_48_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, buffer);
1361 case M32C_OPERAND_IMM_48_SI :
1364 FLD (f_dsp_64_u16) = ((((UINT) (FLD (f_dsp_48_s32)) >> (16))) & (65535));
1365 FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_s32)) & (65535));
1368 long value = fields->f_dsp_48_u16;
1369 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1370 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1375 long value = fields->f_dsp_64_u16;
1376 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1377 errmsg = insert_normal (cd, value, 0, 64, 0, 16, 32, total_length, buffer);
1383 case M32C_OPERAND_IMM_56_HI :
1386 FLD (f_dsp_56_u8) = ((FLD (f_dsp_56_s16)) & (255));
1387 FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_56_s16)) >> (8))) & (255));
1389 errmsg = insert_normal (cd, fields->f_dsp_56_u8, 0, 32, 24, 8, 32, total_length, buffer);
1392 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1397 case M32C_OPERAND_IMM_56_QI :
1398 errmsg = insert_normal (cd, fields->f_dsp_56_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 24, 8, 32, total_length, buffer);
1400 case M32C_OPERAND_IMM_64_HI :
1402 long value = fields->f_dsp_64_s16;
1403 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1404 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 64, 0, 16, 32, total_length, buffer);
1407 case M32C_OPERAND_IMM_8_HI :
1409 long value = fields->f_dsp_8_s16;
1410 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1411 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 16, 32, total_length, buffer);
1414 case M32C_OPERAND_IMM_8_QI :
1415 errmsg = insert_normal (cd, fields->f_dsp_8_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, buffer);
1417 case M32C_OPERAND_IMM_8_S4 :
1418 errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
1420 case M32C_OPERAND_IMM_8_S4N :
1421 errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
1423 case M32C_OPERAND_IMM_SH_12_S4 :
1424 errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
1426 case M32C_OPERAND_IMM_SH_20_S4 :
1427 errmsg = insert_normal (cd, fields->f_imm_20_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, buffer);
1429 case M32C_OPERAND_IMM_SH_8_S4 :
1430 errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
1432 case M32C_OPERAND_IMM1_S :
1434 long value = fields->f_imm1_S;
1435 value = ((value) - (1));
1436 errmsg = insert_normal (cd, value, 0, 0, 2, 1, 32, total_length, buffer);
1439 case M32C_OPERAND_IMM3_S :
1442 FLD (f_7_1) = ((((FLD (f_imm3_S)) - (1))) & (1));
1443 FLD (f_2_2) = ((((UINT) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3));
1445 errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
1448 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
1453 case M32C_OPERAND_LAB_16_8 :
1455 long value = fields->f_lab_16_8;
1456 value = ((value) - (((pc) + (2))));
1457 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 8, 32, total_length, buffer);
1460 case M32C_OPERAND_LAB_24_8 :
1462 long value = fields->f_lab_24_8;
1463 value = ((value) - (((pc) + (2))));
1464 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 24, 8, 32, total_length, buffer);
1467 case M32C_OPERAND_LAB_32_8 :
1469 long value = fields->f_lab_32_8;
1470 value = ((value) - (((pc) + (2))));
1471 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 0, 8, 32, total_length, buffer);
1474 case M32C_OPERAND_LAB_40_8 :
1476 long value = fields->f_lab_40_8;
1477 value = ((value) - (((pc) + (2))));
1478 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 8, 8, 32, total_length, buffer);
1481 case M32C_OPERAND_LAB_5_3 :
1483 long value = fields->f_lab_5_3;
1484 value = ((value) - (((pc) + (2))));
1485 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 3, 32, total_length, buffer);
1488 case M32C_OPERAND_LAB_8_16 :
1490 long value = fields->f_lab_8_16;
1491 value = ((((((((value) - (((pc) + (1))))) & (255))) << (8))) | (((USI) (((((value) - (((pc) + (1))))) & (65535))) >> (8))));
1492 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGN_OPT)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 16, 32, total_length, buffer);
1495 case M32C_OPERAND_LAB_8_24 :
1497 long value = fields->f_lab_8_24;
1498 value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
1499 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 24, 32, total_length, buffer);
1502 case M32C_OPERAND_LAB_8_8 :
1504 long value = fields->f_lab_8_8;
1505 value = ((value) - (((pc) + (1))));
1506 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 8, 32, total_length, buffer);
1509 case M32C_OPERAND_LAB32_JMP_S :
1513 tmp_val = ((((FLD (f_lab32_jmp_s)) - (pc))) - (2));
1514 FLD (f_7_1) = ((tmp_val) & (1));
1515 FLD (f_2_2) = ((USI) (tmp_val) >> (1));
1517 errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
1520 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
1525 case M32C_OPERAND_Q :
1527 case M32C_OPERAND_R0 :
1529 case M32C_OPERAND_R0H :
1531 case M32C_OPERAND_R0L :
1533 case M32C_OPERAND_R1 :
1535 case M32C_OPERAND_R1R2R0 :
1537 case M32C_OPERAND_R2 :
1539 case M32C_OPERAND_R2R0 :
1541 case M32C_OPERAND_R3 :
1543 case M32C_OPERAND_R3R1 :
1545 case M32C_OPERAND_REGSETPOP :
1546 errmsg = insert_normal (cd, fields->f_8_8, 0, 0, 8, 8, 32, total_length, buffer);
1548 case M32C_OPERAND_REGSETPUSH :
1549 errmsg = insert_normal (cd, fields->f_8_8, 0, 0, 8, 8, 32, total_length, buffer);
1551 case M32C_OPERAND_RN16_PUSH_S :
1552 errmsg = insert_normal (cd, fields->f_4_1, 0, 0, 4, 1, 32, total_length, buffer);
1554 case M32C_OPERAND_S :
1556 case M32C_OPERAND_SRC16AN :
1557 errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
1559 case M32C_OPERAND_SRC16ANHI :
1560 errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
1562 case M32C_OPERAND_SRC16ANQI :
1563 errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
1565 case M32C_OPERAND_SRC16RNHI :
1566 errmsg = insert_normal (cd, fields->f_src16_rn, 0, 0, 10, 2, 32, total_length, buffer);
1568 case M32C_OPERAND_SRC16RNQI :
1569 errmsg = insert_normal (cd, fields->f_src16_rn, 0, 0, 10, 2, 32, total_length, buffer);
1571 case M32C_OPERAND_SRC32ANPREFIXED :
1572 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1574 case M32C_OPERAND_SRC32ANPREFIXEDHI :
1575 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1577 case M32C_OPERAND_SRC32ANPREFIXEDQI :
1578 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1580 case M32C_OPERAND_SRC32ANPREFIXEDSI :
1581 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1583 case M32C_OPERAND_SRC32ANUNPREFIXED :
1584 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1586 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
1587 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1589 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
1590 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1592 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
1593 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1595 case M32C_OPERAND_SRC32RNPREFIXEDHI :
1597 long value = fields->f_src32_rn_prefixed_HI;
1598 value = ((((value) + (2))) % (4));
1599 errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
1602 case M32C_OPERAND_SRC32RNPREFIXEDQI :
1604 long value = fields->f_src32_rn_prefixed_QI;
1605 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
1606 errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
1609 case M32C_OPERAND_SRC32RNPREFIXEDSI :
1611 long value = fields->f_src32_rn_prefixed_SI;
1612 value = ((value) + (2));
1613 errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
1616 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
1618 long value = fields->f_src32_rn_unprefixed_HI;
1619 value = ((((value) + (2))) % (4));
1620 errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
1623 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
1625 long value = fields->f_src32_rn_unprefixed_QI;
1626 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
1627 errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
1630 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
1632 long value = fields->f_src32_rn_unprefixed_SI;
1633 value = ((value) + (2));
1634 errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
1637 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
1638 errmsg = insert_normal (cd, fields->f_5_1, 0, 0, 5, 1, 32, total_length, buffer);
1640 case M32C_OPERAND_X :
1642 case M32C_OPERAND_Z :
1644 case M32C_OPERAND_COND16_16 :
1645 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
1647 case M32C_OPERAND_COND16_24 :
1648 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1650 case M32C_OPERAND_COND16_32 :
1651 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
1653 case M32C_OPERAND_COND16C :
1654 errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
1656 case M32C_OPERAND_COND16J :
1657 errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
1659 case M32C_OPERAND_COND16J5 :
1660 errmsg = insert_normal (cd, fields->f_cond16j_5, 0, 0, 5, 3, 32, total_length, buffer);
1662 case M32C_OPERAND_COND32 :
1665 FLD (f_9_1) = ((((UINT) (FLD (f_cond32)) >> (3))) & (1));
1666 FLD (f_13_3) = ((FLD (f_cond32)) & (7));
1668 errmsg = insert_normal (cd, fields->f_9_1, 0, 0, 9, 1, 32, total_length, buffer);
1671 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1676 case M32C_OPERAND_COND32_16 :
1677 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
1679 case M32C_OPERAND_COND32_24 :
1680 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1682 case M32C_OPERAND_COND32_32 :
1683 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
1685 case M32C_OPERAND_COND32_40 :
1686 errmsg = insert_normal (cd, fields->f_dsp_40_u8, 0, 32, 8, 8, 32, total_length, buffer);
1688 case M32C_OPERAND_COND32J :
1691 FLD (f_1_3) = ((((UINT) (FLD (f_cond32j)) >> (1))) & (7));
1692 FLD (f_7_1) = ((FLD (f_cond32j)) & (1));
1694 errmsg = insert_normal (cd, fields->f_1_3, 0, 0, 1, 3, 32, total_length, buffer);
1697 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
1702 case M32C_OPERAND_CR1_PREFIXED_32 :
1703 errmsg = insert_normal (cd, fields->f_21_3, 0, 0, 21, 3, 32, total_length, buffer);
1705 case M32C_OPERAND_CR1_UNPREFIXED_32 :
1706 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1708 case M32C_OPERAND_CR16 :
1709 errmsg = insert_normal (cd, fields->f_9_3, 0, 0, 9, 3, 32, total_length, buffer);
1711 case M32C_OPERAND_CR2_32 :
1712 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1714 case M32C_OPERAND_CR3_PREFIXED_32 :
1715 errmsg = insert_normal (cd, fields->f_21_3, 0, 0, 21, 3, 32, total_length, buffer);
1717 case M32C_OPERAND_CR3_UNPREFIXED_32 :
1718 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1720 case M32C_OPERAND_FLAGS16 :
1721 errmsg = insert_normal (cd, fields->f_9_3, 0, 0, 9, 3, 32, total_length, buffer);
1723 case M32C_OPERAND_FLAGS32 :
1724 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1726 case M32C_OPERAND_SCCOND32 :
1727 errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
1729 case M32C_OPERAND_SIZE :
1733 /* xgettext:c-format */
1734 fprintf (stderr, _("Unrecognized field %d while building insn.\n"),
1742 int m32c_cgen_extract_operand
1743 (CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
1745 /* Main entry point for operand extraction.
1746 The result is <= 0 for error, >0 for success.
1747 ??? Actual values aren't well defined right now.
1749 This function is basically just a big switch statement. Earlier versions
1750 used tables to look up the function to use, but
1751 - if the table contains both assembler and disassembler functions then
1752 the disassembler contains much of the assembler and vice-versa,
1753 - there's a lot of inlining possibilities as things grow,
1754 - using a switch statement avoids the function call overhead.
1756 This function could be moved into `print_insn_normal', but keeping it
1757 separate makes clear the interface between `print_insn_normal' and each of
1761 m32c_cgen_extract_operand (CGEN_CPU_DESC cd,
1763 CGEN_EXTRACT_INFO *ex_info,
1764 CGEN_INSN_INT insn_value,
1765 CGEN_FIELDS * fields,
1768 /* Assume success (for those operands that are nops). */
1770 unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
1774 case M32C_OPERAND_A0 :
1776 case M32C_OPERAND_A1 :
1778 case M32C_OPERAND_AN16_PUSH_S :
1779 length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_4_1);
1781 case M32C_OPERAND_BIT16AN :
1782 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
1784 case M32C_OPERAND_BIT16RN :
1785 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
1787 case M32C_OPERAND_BIT3_S :
1789 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
1790 if (length <= 0) break;
1791 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
1792 if (length <= 0) break;
1794 FLD (f_imm3_S) = ((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (1));
1798 case M32C_OPERAND_BIT32ANPREFIXED :
1799 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
1801 case M32C_OPERAND_BIT32ANUNPREFIXED :
1802 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
1804 case M32C_OPERAND_BIT32RNPREFIXED :
1807 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
1808 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
1809 fields->f_dst32_rn_prefixed_QI = value;
1812 case M32C_OPERAND_BIT32RNUNPREFIXED :
1815 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
1816 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
1817 fields->f_dst32_rn_unprefixed_QI = value;
1820 case M32C_OPERAND_BITBASE16_16_S8 :
1821 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);
1823 case M32C_OPERAND_BITBASE16_16_U16 :
1826 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1827 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1828 fields->f_dsp_16_u16 = value;
1831 case M32C_OPERAND_BITBASE16_16_U8 :
1832 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1834 case M32C_OPERAND_BITBASE16_8_U11_S :
1836 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_bitno16_S);
1837 if (length <= 0) break;
1838 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_u8);
1839 if (length <= 0) break;
1841 FLD (f_bitbase16_u11_S) = ((((FLD (f_dsp_8_u8)) << (3))) | (FLD (f_bitno16_S)));
1845 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
1847 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1848 if (length <= 0) break;
1849 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);
1850 if (length <= 0) break;
1852 FLD (f_bitbase32_16_s11_unprefixed) = ((((FLD (f_dsp_16_s8)) << (3))) | (FLD (f_bitno32_unprefixed)));
1856 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
1858 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1859 if (length <= 0) break;
1862 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
1863 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1864 fields->f_dsp_16_s16 = value;
1866 if (length <= 0) break;
1868 FLD (f_bitbase32_16_s19_unprefixed) = ((((FLD (f_dsp_16_s16)) << (3))) | (FLD (f_bitno32_unprefixed)));
1872 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
1874 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1875 if (length <= 0) break;
1876 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1877 if (length <= 0) break;
1879 FLD (f_bitbase32_16_u11_unprefixed) = ((((FLD (f_dsp_16_u8)) << (3))) | (FLD (f_bitno32_unprefixed)));
1883 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
1885 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1886 if (length <= 0) break;
1889 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1890 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1891 fields->f_dsp_16_u16 = value;
1893 if (length <= 0) break;
1895 FLD (f_bitbase32_16_u19_unprefixed) = ((((FLD (f_dsp_16_u16)) << (3))) | (FLD (f_bitno32_unprefixed)));
1899 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
1901 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1902 if (length <= 0) break;
1905 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1906 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1907 fields->f_dsp_16_u16 = value;
1909 if (length <= 0) break;
1910 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
1911 if (length <= 0) break;
1913 FLD (f_bitbase32_16_u27_unprefixed) = ((((FLD (f_dsp_16_u16)) << (3))) | (((((FLD (f_dsp_32_u8)) << (19))) | (FLD (f_bitno32_unprefixed)))));
1917 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
1919 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1920 if (length <= 0) break;
1921 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);
1922 if (length <= 0) break;
1924 FLD (f_bitbase32_24_s11_prefixed) = ((((FLD (f_dsp_24_s8)) << (3))) | (FLD (f_bitno32_prefixed)));
1928 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
1930 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1931 if (length <= 0) break;
1932 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1933 if (length <= 0) break;
1934 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);
1935 if (length <= 0) break;
1937 FLD (f_bitbase32_24_s19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_s8)) << (11))) | (FLD (f_bitno32_prefixed)))));
1941 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
1943 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1944 if (length <= 0) break;
1945 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1946 if (length <= 0) break;
1948 FLD (f_bitbase32_24_u11_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (FLD (f_bitno32_prefixed)));
1952 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
1954 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1955 if (length <= 0) break;
1956 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1957 if (length <= 0) break;
1958 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
1959 if (length <= 0) break;
1961 FLD (f_bitbase32_24_u19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_u8)) << (11))) | (FLD (f_bitno32_prefixed)))));
1965 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
1967 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1968 if (length <= 0) break;
1969 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1970 if (length <= 0) break;
1973 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
1974 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1975 fields->f_dsp_32_u16 = value;
1977 if (length <= 0) break;
1979 FLD (f_bitbase32_24_u27_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_u16)) << (11))) | (FLD (f_bitno32_prefixed)))));
1983 case M32C_OPERAND_BITNO16R :
1984 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1986 case M32C_OPERAND_BITNO32PREFIXED :
1987 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1989 case M32C_OPERAND_BITNO32UNPREFIXED :
1990 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1992 case M32C_OPERAND_DSP_10_U6 :
1993 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 6, 32, total_length, pc, & fields->f_dsp_10_u6);
1995 case M32C_OPERAND_DSP_16_S16 :
1998 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
1999 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2000 fields->f_dsp_16_s16 = value;
2003 case M32C_OPERAND_DSP_16_S8 :
2004 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);
2006 case M32C_OPERAND_DSP_16_U16 :
2009 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
2010 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2011 fields->f_dsp_16_u16 = value;
2014 case M32C_OPERAND_DSP_16_U20 :
2018 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
2019 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2020 fields->f_dsp_16_u16 = value;
2022 if (length <= 0) break;
2023 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2024 if (length <= 0) break;
2026 FLD (f_dsp_16_u24) = ((((FLD (f_dsp_32_u8)) << (16))) | (FLD (f_dsp_16_u16)));
2030 case M32C_OPERAND_DSP_16_U24 :
2034 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
2035 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2036 fields->f_dsp_16_u16 = value;
2038 if (length <= 0) break;
2039 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2040 if (length <= 0) break;
2042 FLD (f_dsp_16_u24) = ((((FLD (f_dsp_32_u8)) << (16))) | (FLD (f_dsp_16_u16)));
2046 case M32C_OPERAND_DSP_16_U8 :
2047 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
2049 case M32C_OPERAND_DSP_24_S16 :
2051 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2052 if (length <= 0) break;
2053 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2054 if (length <= 0) break;
2056 FLD (f_dsp_24_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8))))));
2060 case M32C_OPERAND_DSP_24_S8 :
2061 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);
2063 case M32C_OPERAND_DSP_24_U16 :
2065 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2066 if (length <= 0) break;
2067 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2068 if (length <= 0) break;
2070 FLD (f_dsp_24_u16) = ((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8)));
2074 case M32C_OPERAND_DSP_24_U20 :
2076 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2077 if (length <= 0) break;
2080 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2081 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2082 fields->f_dsp_32_u16 = value;
2084 if (length <= 0) break;
2086 FLD (f_dsp_24_u24) = ((((FLD (f_dsp_32_u16)) << (8))) | (FLD (f_dsp_24_u8)));
2090 case M32C_OPERAND_DSP_24_U24 :
2092 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2093 if (length <= 0) break;
2096 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2097 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2098 fields->f_dsp_32_u16 = value;
2100 if (length <= 0) break;
2102 FLD (f_dsp_24_u24) = ((((FLD (f_dsp_32_u16)) << (8))) | (FLD (f_dsp_24_u8)));
2106 case M32C_OPERAND_DSP_24_U8 :
2107 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2109 case M32C_OPERAND_DSP_32_S16 :
2112 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value);
2113 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2114 fields->f_dsp_32_s16 = value;
2117 case M32C_OPERAND_DSP_32_S8 :
2118 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);
2120 case M32C_OPERAND_DSP_32_U16 :
2123 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2124 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2125 fields->f_dsp_32_u16 = value;
2128 case M32C_OPERAND_DSP_32_U20 :
2131 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
2132 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2133 fields->f_dsp_32_u24 = value;
2136 case M32C_OPERAND_DSP_32_U24 :
2139 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
2140 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2141 fields->f_dsp_32_u24 = value;
2144 case M32C_OPERAND_DSP_32_U8 :
2145 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2147 case M32C_OPERAND_DSP_40_S16 :
2150 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, pc, & value);
2151 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2152 fields->f_dsp_40_s16 = value;
2155 case M32C_OPERAND_DSP_40_S8 :
2156 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);
2158 case M32C_OPERAND_DSP_40_U16 :
2161 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 16, 32, total_length, pc, & value);
2162 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2163 fields->f_dsp_40_u16 = value;
2166 case M32C_OPERAND_DSP_40_U20 :
2169 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 20, 32, total_length, pc, & value);
2170 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040))));
2171 fields->f_dsp_40_u20 = value;
2174 case M32C_OPERAND_DSP_40_U24 :
2177 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value);
2178 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2179 fields->f_dsp_40_u24 = value;
2182 case M32C_OPERAND_DSP_40_U8 :
2183 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_u8);
2185 case M32C_OPERAND_DSP_48_S16 :
2188 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, pc, & value);
2189 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2190 fields->f_dsp_48_s16 = value;
2193 case M32C_OPERAND_DSP_48_S8 :
2194 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);
2196 case M32C_OPERAND_DSP_48_U16 :
2199 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2200 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2201 fields->f_dsp_48_u16 = value;
2204 case M32C_OPERAND_DSP_48_U20 :
2208 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2209 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2210 fields->f_dsp_48_u16 = value;
2212 if (length <= 0) break;
2213 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2214 if (length <= 0) break;
2216 FLD (f_dsp_48_u20) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u8)) << (16))) & (983040))));
2220 case M32C_OPERAND_DSP_48_U24 :
2224 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2225 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2226 fields->f_dsp_48_u16 = value;
2228 if (length <= 0) break;
2229 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2230 if (length <= 0) break;
2232 FLD (f_dsp_48_u24) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u8)) << (16))) & (16711680))));
2236 case M32C_OPERAND_DSP_48_U8 :
2237 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 8, 32, total_length, pc, & fields->f_dsp_48_u8);
2239 case M32C_OPERAND_DSP_8_S24 :
2242 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 24, 32, total_length, pc, & value);
2243 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16))));
2244 fields->f_dsp_8_s24 = value;
2247 case M32C_OPERAND_DSP_8_S8 :
2248 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);
2250 case M32C_OPERAND_DSP_8_U16 :
2253 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 16, 32, total_length, pc, & value);
2254 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2255 fields->f_dsp_8_u16 = value;
2258 case M32C_OPERAND_DSP_8_U24 :
2261 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 24, 32, total_length, pc, & value);
2262 value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
2263 fields->f_dsp_8_u24 = value;
2266 case M32C_OPERAND_DSP_8_U6 :
2267 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 6, 32, total_length, pc, & fields->f_dsp_8_u6);
2269 case M32C_OPERAND_DSP_8_U8 :
2270 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_u8);
2272 case M32C_OPERAND_DST16AN :
2273 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2275 case M32C_OPERAND_DST16AN_S :
2276 length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_dst16_an_s);
2278 case M32C_OPERAND_DST16ANHI :
2279 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2281 case M32C_OPERAND_DST16ANQI :
2282 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2284 case M32C_OPERAND_DST16ANQI_S :
2285 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_dst16_rn_QI_s);
2287 case M32C_OPERAND_DST16ANSI :
2288 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2290 case M32C_OPERAND_DST16RNEXTQI :
2291 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 1, 32, total_length, pc, & fields->f_dst16_rn_ext);
2293 case M32C_OPERAND_DST16RNHI :
2294 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
2296 case M32C_OPERAND_DST16RNQI :
2297 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
2299 case M32C_OPERAND_DST16RNQI_S :
2300 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_dst16_rn_QI_s);
2302 case M32C_OPERAND_DST16RNSI :
2303 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
2305 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
2306 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2308 case M32C_OPERAND_DST32ANPREFIXED :
2309 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2311 case M32C_OPERAND_DST32ANPREFIXEDHI :
2312 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2314 case M32C_OPERAND_DST32ANPREFIXEDQI :
2315 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2317 case M32C_OPERAND_DST32ANPREFIXEDSI :
2318 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2320 case M32C_OPERAND_DST32ANUNPREFIXED :
2321 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2323 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
2324 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2326 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
2327 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2329 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
2330 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2332 case M32C_OPERAND_DST32R0HI_S :
2334 case M32C_OPERAND_DST32R0QI_S :
2336 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
2337 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_rn_ext_unprefixed);
2339 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
2340 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_rn_ext_unprefixed);
2342 case M32C_OPERAND_DST32RNPREFIXEDHI :
2345 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
2346 value = ((((value) + (2))) % (4));
2347 fields->f_dst32_rn_prefixed_HI = value;
2350 case M32C_OPERAND_DST32RNPREFIXEDQI :
2353 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
2354 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2355 fields->f_dst32_rn_prefixed_QI = value;
2358 case M32C_OPERAND_DST32RNPREFIXEDSI :
2361 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
2362 value = ((value) - (2));
2363 fields->f_dst32_rn_prefixed_SI = value;
2366 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
2369 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
2370 value = ((((value) + (2))) % (4));
2371 fields->f_dst32_rn_unprefixed_HI = value;
2374 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
2377 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
2378 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2379 fields->f_dst32_rn_unprefixed_QI = value;
2382 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
2385 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
2386 value = ((value) - (2));
2387 fields->f_dst32_rn_unprefixed_SI = value;
2390 case M32C_OPERAND_G :
2392 case M32C_OPERAND_IMM_12_S4 :
2393 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);
2395 case M32C_OPERAND_IMM_12_S4N :
2396 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);
2398 case M32C_OPERAND_IMM_13_U3 :
2399 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_imm_13_u3);
2401 case M32C_OPERAND_IMM_16_HI :
2404 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
2405 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2406 fields->f_dsp_16_s16 = value;
2409 case M32C_OPERAND_IMM_16_QI :
2410 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);
2412 case M32C_OPERAND_IMM_16_SI :
2416 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
2417 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2418 fields->f_dsp_16_u16 = value;
2420 if (length <= 0) break;
2423 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2424 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2425 fields->f_dsp_32_u16 = value;
2427 if (length <= 0) break;
2429 FLD (f_dsp_16_s32) = ((((FLD (f_dsp_16_u16)) & (65535))) | (((((FLD (f_dsp_32_u16)) << (16))) & (0xffff0000))));
2433 case M32C_OPERAND_IMM_20_S4 :
2434 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);
2436 case M32C_OPERAND_IMM_24_HI :
2438 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2439 if (length <= 0) break;
2440 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2441 if (length <= 0) break;
2443 FLD (f_dsp_24_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8))))));
2447 case M32C_OPERAND_IMM_24_QI :
2448 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);
2450 case M32C_OPERAND_IMM_24_SI :
2452 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2453 if (length <= 0) break;
2456 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
2457 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2458 fields->f_dsp_32_u24 = value;
2460 if (length <= 0) break;
2462 FLD (f_dsp_24_s32) = ((((FLD (f_dsp_24_u8)) & (255))) | (((((FLD (f_dsp_32_u24)) << (8))) & (0xffffff00))));
2466 case M32C_OPERAND_IMM_32_HI :
2469 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value);
2470 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2471 fields->f_dsp_32_s16 = value;
2474 case M32C_OPERAND_IMM_32_QI :
2475 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);
2477 case M32C_OPERAND_IMM_32_SI :
2480 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 32, 32, total_length, pc, & value);
2481 value = EXTSISI (((((((((UINT) (value) >> (24))) & (255))) | (((((UINT) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000)))))));
2482 fields->f_dsp_32_s32 = value;
2485 case M32C_OPERAND_IMM_40_HI :
2488 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, pc, & value);
2489 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2490 fields->f_dsp_40_s16 = value;
2493 case M32C_OPERAND_IMM_40_QI :
2494 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);
2496 case M32C_OPERAND_IMM_40_SI :
2500 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value);
2501 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2502 fields->f_dsp_40_u24 = value;
2504 if (length <= 0) break;
2505 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2506 if (length <= 0) break;
2508 FLD (f_dsp_40_s32) = ((((FLD (f_dsp_40_u24)) & (16777215))) | (((((FLD (f_dsp_64_u8)) << (24))) & (0xff000000))));
2512 case M32C_OPERAND_IMM_48_HI :
2515 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, pc, & value);
2516 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2517 fields->f_dsp_48_s16 = value;
2520 case M32C_OPERAND_IMM_48_QI :
2521 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);
2523 case M32C_OPERAND_IMM_48_SI :
2527 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2528 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2529 fields->f_dsp_48_u16 = value;
2531 if (length <= 0) break;
2534 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 16, 32, total_length, pc, & value);
2535 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2536 fields->f_dsp_64_u16 = value;
2538 if (length <= 0) break;
2540 FLD (f_dsp_48_s32) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u16)) << (16))) & (0xffff0000))));
2544 case M32C_OPERAND_IMM_56_HI :
2546 length = extract_normal (cd, ex_info, insn_value, 0, 32, 24, 8, 32, total_length, pc, & fields->f_dsp_56_u8);
2547 if (length <= 0) break;
2548 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2549 if (length <= 0) break;
2551 FLD (f_dsp_56_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_64_u8)) << (8))) | (FLD (f_dsp_56_u8))))));
2555 case M32C_OPERAND_IMM_56_QI :
2556 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);
2558 case M32C_OPERAND_IMM_64_HI :
2561 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 64, 0, 16, 32, total_length, pc, & value);
2562 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2563 fields->f_dsp_64_s16 = value;
2566 case M32C_OPERAND_IMM_8_HI :
2569 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 16, 32, total_length, pc, & value);
2570 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2571 fields->f_dsp_8_s16 = value;
2574 case M32C_OPERAND_IMM_8_QI :
2575 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);
2577 case M32C_OPERAND_IMM_8_S4 :
2578 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);
2580 case M32C_OPERAND_IMM_8_S4N :
2581 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);
2583 case M32C_OPERAND_IMM_SH_12_S4 :
2584 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);
2586 case M32C_OPERAND_IMM_SH_20_S4 :
2587 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);
2589 case M32C_OPERAND_IMM_SH_8_S4 :
2590 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);
2592 case M32C_OPERAND_IMM1_S :
2595 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 1, 32, total_length, pc, & value);
2596 value = ((value) + (1));
2597 fields->f_imm1_S = value;
2600 case M32C_OPERAND_IMM3_S :
2602 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
2603 if (length <= 0) break;
2604 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
2605 if (length <= 0) break;
2607 FLD (f_imm3_S) = ((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (1));
2611 case M32C_OPERAND_LAB_16_8 :
2614 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);
2615 value = ((value) + (((pc) + (2))));
2616 fields->f_lab_16_8 = value;
2619 case M32C_OPERAND_LAB_24_8 :
2622 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);
2623 value = ((value) + (((pc) + (2))));
2624 fields->f_lab_24_8 = value;
2627 case M32C_OPERAND_LAB_32_8 :
2630 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);
2631 value = ((value) + (((pc) + (2))));
2632 fields->f_lab_32_8 = value;
2635 case M32C_OPERAND_LAB_40_8 :
2638 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);
2639 value = ((value) + (((pc) + (2))));
2640 fields->f_lab_40_8 = value;
2643 case M32C_OPERAND_LAB_5_3 :
2646 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 3, 32, total_length, pc, & value);
2647 value = ((value) + (((pc) + (2))));
2648 fields->f_lab_5_3 = value;
2651 case M32C_OPERAND_LAB_8_16 :
2654 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);
2655 value = ((((((USI) (((value) & (65535))) >> (8))) | (((SI) (((((value) & (255))) << (24))) >> (16))))) + (((pc) + (1))));
2656 fields->f_lab_8_16 = value;
2659 case M32C_OPERAND_LAB_8_24 :
2662 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 24, 32, total_length, pc, & value);
2663 value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
2664 fields->f_lab_8_24 = value;
2667 case M32C_OPERAND_LAB_8_8 :
2670 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);
2671 value = ((value) + (((pc) + (1))));
2672 fields->f_lab_8_8 = value;
2675 case M32C_OPERAND_LAB32_JMP_S :
2677 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
2678 if (length <= 0) break;
2679 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
2680 if (length <= 0) break;
2682 FLD (f_lab32_jmp_s) = ((pc) + (((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (2))));
2686 case M32C_OPERAND_Q :
2688 case M32C_OPERAND_R0 :
2690 case M32C_OPERAND_R0H :
2692 case M32C_OPERAND_R0L :
2694 case M32C_OPERAND_R1 :
2696 case M32C_OPERAND_R1R2R0 :
2698 case M32C_OPERAND_R2 :
2700 case M32C_OPERAND_R2R0 :
2702 case M32C_OPERAND_R3 :
2704 case M32C_OPERAND_R3R1 :
2706 case M32C_OPERAND_REGSETPOP :
2707 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_8_8);
2709 case M32C_OPERAND_REGSETPUSH :
2710 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_8_8);
2712 case M32C_OPERAND_RN16_PUSH_S :
2713 length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_4_1);
2715 case M32C_OPERAND_S :
2717 case M32C_OPERAND_SRC16AN :
2718 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
2720 case M32C_OPERAND_SRC16ANHI :
2721 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
2723 case M32C_OPERAND_SRC16ANQI :
2724 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
2726 case M32C_OPERAND_SRC16RNHI :
2727 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_src16_rn);
2729 case M32C_OPERAND_SRC16RNQI :
2730 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_src16_rn);
2732 case M32C_OPERAND_SRC32ANPREFIXED :
2733 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2735 case M32C_OPERAND_SRC32ANPREFIXEDHI :
2736 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2738 case M32C_OPERAND_SRC32ANPREFIXEDQI :
2739 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2741 case M32C_OPERAND_SRC32ANPREFIXEDSI :
2742 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2744 case M32C_OPERAND_SRC32ANUNPREFIXED :
2745 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2747 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
2748 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2750 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
2751 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2753 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
2754 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2756 case M32C_OPERAND_SRC32RNPREFIXEDHI :
2759 length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
2760 value = ((((value) + (2))) % (4));
2761 fields->f_src32_rn_prefixed_HI = value;
2764 case M32C_OPERAND_SRC32RNPREFIXEDQI :
2767 length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
2768 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2769 fields->f_src32_rn_prefixed_QI = value;
2772 case M32C_OPERAND_SRC32RNPREFIXEDSI :
2775 length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
2776 value = ((value) - (2));
2777 fields->f_src32_rn_prefixed_SI = value;
2780 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
2783 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
2784 value = ((((value) + (2))) % (4));
2785 fields->f_src32_rn_unprefixed_HI = value;
2788 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
2791 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
2792 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2793 fields->f_src32_rn_unprefixed_QI = value;
2796 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
2799 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
2800 value = ((value) - (2));
2801 fields->f_src32_rn_unprefixed_SI = value;
2804 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
2805 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_5_1);
2807 case M32C_OPERAND_X :
2809 case M32C_OPERAND_Z :
2811 case M32C_OPERAND_COND16_16 :
2812 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
2814 case M32C_OPERAND_COND16_24 :
2815 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2817 case M32C_OPERAND_COND16_32 :
2818 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2820 case M32C_OPERAND_COND16C :
2821 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
2823 case M32C_OPERAND_COND16J :
2824 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
2826 case M32C_OPERAND_COND16J5 :
2827 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_cond16j_5);
2829 case M32C_OPERAND_COND32 :
2831 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_9_1);
2832 if (length <= 0) break;
2833 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2834 if (length <= 0) break;
2836 FLD (f_cond32) = ((((FLD (f_9_1)) << (3))) | (FLD (f_13_3)));
2840 case M32C_OPERAND_COND32_16 :
2841 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
2843 case M32C_OPERAND_COND32_24 :
2844 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2846 case M32C_OPERAND_COND32_32 :
2847 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2849 case M32C_OPERAND_COND32_40 :
2850 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_u8);
2852 case M32C_OPERAND_COND32J :
2854 length = extract_normal (cd, ex_info, insn_value, 0, 0, 1, 3, 32, total_length, pc, & fields->f_1_3);
2855 if (length <= 0) break;
2856 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
2857 if (length <= 0) break;
2859 FLD (f_cond32j) = ((((FLD (f_1_3)) << (1))) | (FLD (f_7_1)));
2863 case M32C_OPERAND_CR1_PREFIXED_32 :
2864 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_21_3);
2866 case M32C_OPERAND_CR1_UNPREFIXED_32 :
2867 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2869 case M32C_OPERAND_CR16 :
2870 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 3, 32, total_length, pc, & fields->f_9_3);
2872 case M32C_OPERAND_CR2_32 :
2873 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2875 case M32C_OPERAND_CR3_PREFIXED_32 :
2876 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_21_3);
2878 case M32C_OPERAND_CR3_UNPREFIXED_32 :
2879 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2881 case M32C_OPERAND_FLAGS16 :
2882 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 3, 32, total_length, pc, & fields->f_9_3);
2884 case M32C_OPERAND_FLAGS32 :
2885 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2887 case M32C_OPERAND_SCCOND32 :
2888 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
2890 case M32C_OPERAND_SIZE :
2894 /* xgettext:c-format */
2895 fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"),
2903 cgen_insert_fn * const m32c_cgen_insert_handlers[] =
2908 cgen_extract_fn * const m32c_cgen_extract_handlers[] =
2910 extract_insn_normal,
2913 int m32c_cgen_get_int_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
2914 bfd_vma m32c_cgen_get_vma_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
2916 /* Getting values from cgen_fields is handled by a collection of functions.
2917 They are distinguished by the type of the VALUE argument they return.
2918 TODO: floating point, inlining support, remove cases where result type
2922 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
2924 const CGEN_FIELDS * fields)
2930 case M32C_OPERAND_A0 :
2933 case M32C_OPERAND_A1 :
2936 case M32C_OPERAND_AN16_PUSH_S :
2937 value = fields->f_4_1;
2939 case M32C_OPERAND_BIT16AN :
2940 value = fields->f_dst16_an;
2942 case M32C_OPERAND_BIT16RN :
2943 value = fields->f_dst16_rn;
2945 case M32C_OPERAND_BIT3_S :
2946 value = fields->f_imm3_S;
2948 case M32C_OPERAND_BIT32ANPREFIXED :
2949 value = fields->f_dst32_an_prefixed;
2951 case M32C_OPERAND_BIT32ANUNPREFIXED :
2952 value = fields->f_dst32_an_unprefixed;
2954 case M32C_OPERAND_BIT32RNPREFIXED :
2955 value = fields->f_dst32_rn_prefixed_QI;
2957 case M32C_OPERAND_BIT32RNUNPREFIXED :
2958 value = fields->f_dst32_rn_unprefixed_QI;
2960 case M32C_OPERAND_BITBASE16_16_S8 :
2961 value = fields->f_dsp_16_s8;
2963 case M32C_OPERAND_BITBASE16_16_U16 :
2964 value = fields->f_dsp_16_u16;
2966 case M32C_OPERAND_BITBASE16_16_U8 :
2967 value = fields->f_dsp_16_u8;
2969 case M32C_OPERAND_BITBASE16_8_U11_S :
2970 value = fields->f_bitbase16_u11_S;
2972 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
2973 value = fields->f_bitbase32_16_s11_unprefixed;
2975 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
2976 value = fields->f_bitbase32_16_s19_unprefixed;
2978 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
2979 value = fields->f_bitbase32_16_u11_unprefixed;
2981 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
2982 value = fields->f_bitbase32_16_u19_unprefixed;
2984 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
2985 value = fields->f_bitbase32_16_u27_unprefixed;
2987 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
2988 value = fields->f_bitbase32_24_s11_prefixed;
2990 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
2991 value = fields->f_bitbase32_24_s19_prefixed;
2993 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
2994 value = fields->f_bitbase32_24_u11_prefixed;
2996 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
2997 value = fields->f_bitbase32_24_u19_prefixed;
2999 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
3000 value = fields->f_bitbase32_24_u27_prefixed;
3002 case M32C_OPERAND_BITNO16R :
3003 value = fields->f_dsp_16_u8;
3005 case M32C_OPERAND_BITNO32PREFIXED :
3006 value = fields->f_bitno32_prefixed;
3008 case M32C_OPERAND_BITNO32UNPREFIXED :
3009 value = fields->f_bitno32_unprefixed;
3011 case M32C_OPERAND_DSP_10_U6 :
3012 value = fields->f_dsp_10_u6;
3014 case M32C_OPERAND_DSP_16_S16 :
3015 value = fields->f_dsp_16_s16;
3017 case M32C_OPERAND_DSP_16_S8 :
3018 value = fields->f_dsp_16_s8;
3020 case M32C_OPERAND_DSP_16_U16 :
3021 value = fields->f_dsp_16_u16;
3023 case M32C_OPERAND_DSP_16_U20 :
3024 value = fields->f_dsp_16_u24;
3026 case M32C_OPERAND_DSP_16_U24 :
3027 value = fields->f_dsp_16_u24;
3029 case M32C_OPERAND_DSP_16_U8 :
3030 value = fields->f_dsp_16_u8;
3032 case M32C_OPERAND_DSP_24_S16 :
3033 value = fields->f_dsp_24_s16;
3035 case M32C_OPERAND_DSP_24_S8 :
3036 value = fields->f_dsp_24_s8;
3038 case M32C_OPERAND_DSP_24_U16 :
3039 value = fields->f_dsp_24_u16;
3041 case M32C_OPERAND_DSP_24_U20 :
3042 value = fields->f_dsp_24_u24;
3044 case M32C_OPERAND_DSP_24_U24 :
3045 value = fields->f_dsp_24_u24;
3047 case M32C_OPERAND_DSP_24_U8 :
3048 value = fields->f_dsp_24_u8;
3050 case M32C_OPERAND_DSP_32_S16 :
3051 value = fields->f_dsp_32_s16;
3053 case M32C_OPERAND_DSP_32_S8 :
3054 value = fields->f_dsp_32_s8;
3056 case M32C_OPERAND_DSP_32_U16 :
3057 value = fields->f_dsp_32_u16;
3059 case M32C_OPERAND_DSP_32_U20 :
3060 value = fields->f_dsp_32_u24;
3062 case M32C_OPERAND_DSP_32_U24 :
3063 value = fields->f_dsp_32_u24;
3065 case M32C_OPERAND_DSP_32_U8 :
3066 value = fields->f_dsp_32_u8;
3068 case M32C_OPERAND_DSP_40_S16 :
3069 value = fields->f_dsp_40_s16;
3071 case M32C_OPERAND_DSP_40_S8 :
3072 value = fields->f_dsp_40_s8;
3074 case M32C_OPERAND_DSP_40_U16 :
3075 value = fields->f_dsp_40_u16;
3077 case M32C_OPERAND_DSP_40_U20 :
3078 value = fields->f_dsp_40_u20;
3080 case M32C_OPERAND_DSP_40_U24 :
3081 value = fields->f_dsp_40_u24;
3083 case M32C_OPERAND_DSP_40_U8 :
3084 value = fields->f_dsp_40_u8;
3086 case M32C_OPERAND_DSP_48_S16 :
3087 value = fields->f_dsp_48_s16;
3089 case M32C_OPERAND_DSP_48_S8 :
3090 value = fields->f_dsp_48_s8;
3092 case M32C_OPERAND_DSP_48_U16 :
3093 value = fields->f_dsp_48_u16;
3095 case M32C_OPERAND_DSP_48_U20 :
3096 value = fields->f_dsp_48_u20;
3098 case M32C_OPERAND_DSP_48_U24 :
3099 value = fields->f_dsp_48_u24;
3101 case M32C_OPERAND_DSP_48_U8 :
3102 value = fields->f_dsp_48_u8;
3104 case M32C_OPERAND_DSP_8_S24 :
3105 value = fields->f_dsp_8_s24;
3107 case M32C_OPERAND_DSP_8_S8 :
3108 value = fields->f_dsp_8_s8;
3110 case M32C_OPERAND_DSP_8_U16 :
3111 value = fields->f_dsp_8_u16;
3113 case M32C_OPERAND_DSP_8_U24 :
3114 value = fields->f_dsp_8_u24;
3116 case M32C_OPERAND_DSP_8_U6 :
3117 value = fields->f_dsp_8_u6;
3119 case M32C_OPERAND_DSP_8_U8 :
3120 value = fields->f_dsp_8_u8;
3122 case M32C_OPERAND_DST16AN :
3123 value = fields->f_dst16_an;
3125 case M32C_OPERAND_DST16AN_S :
3126 value = fields->f_dst16_an_s;
3128 case M32C_OPERAND_DST16ANHI :
3129 value = fields->f_dst16_an;
3131 case M32C_OPERAND_DST16ANQI :
3132 value = fields->f_dst16_an;
3134 case M32C_OPERAND_DST16ANQI_S :
3135 value = fields->f_dst16_rn_QI_s;
3137 case M32C_OPERAND_DST16ANSI :
3138 value = fields->f_dst16_an;
3140 case M32C_OPERAND_DST16RNEXTQI :
3141 value = fields->f_dst16_rn_ext;
3143 case M32C_OPERAND_DST16RNHI :
3144 value = fields->f_dst16_rn;
3146 case M32C_OPERAND_DST16RNQI :
3147 value = fields->f_dst16_rn;
3149 case M32C_OPERAND_DST16RNQI_S :
3150 value = fields->f_dst16_rn_QI_s;
3152 case M32C_OPERAND_DST16RNSI :
3153 value = fields->f_dst16_rn;
3155 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
3156 value = fields->f_dst32_an_unprefixed;
3158 case M32C_OPERAND_DST32ANPREFIXED :
3159 value = fields->f_dst32_an_prefixed;
3161 case M32C_OPERAND_DST32ANPREFIXEDHI :
3162 value = fields->f_dst32_an_prefixed;
3164 case M32C_OPERAND_DST32ANPREFIXEDQI :
3165 value = fields->f_dst32_an_prefixed;
3167 case M32C_OPERAND_DST32ANPREFIXEDSI :
3168 value = fields->f_dst32_an_prefixed;
3170 case M32C_OPERAND_DST32ANUNPREFIXED :
3171 value = fields->f_dst32_an_unprefixed;
3173 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
3174 value = fields->f_dst32_an_unprefixed;
3176 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
3177 value = fields->f_dst32_an_unprefixed;
3179 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
3180 value = fields->f_dst32_an_unprefixed;
3182 case M32C_OPERAND_DST32R0HI_S :
3185 case M32C_OPERAND_DST32R0QI_S :
3188 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
3189 value = fields->f_dst32_rn_ext_unprefixed;
3191 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
3192 value = fields->f_dst32_rn_ext_unprefixed;
3194 case M32C_OPERAND_DST32RNPREFIXEDHI :
3195 value = fields->f_dst32_rn_prefixed_HI;
3197 case M32C_OPERAND_DST32RNPREFIXEDQI :
3198 value = fields->f_dst32_rn_prefixed_QI;
3200 case M32C_OPERAND_DST32RNPREFIXEDSI :
3201 value = fields->f_dst32_rn_prefixed_SI;
3203 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
3204 value = fields->f_dst32_rn_unprefixed_HI;
3206 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
3207 value = fields->f_dst32_rn_unprefixed_QI;
3209 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
3210 value = fields->f_dst32_rn_unprefixed_SI;
3212 case M32C_OPERAND_G :
3215 case M32C_OPERAND_IMM_12_S4 :
3216 value = fields->f_imm_12_s4;
3218 case M32C_OPERAND_IMM_12_S4N :
3219 value = fields->f_imm_12_s4;
3221 case M32C_OPERAND_IMM_13_U3 :
3222 value = fields->f_imm_13_u3;
3224 case M32C_OPERAND_IMM_16_HI :
3225 value = fields->f_dsp_16_s16;
3227 case M32C_OPERAND_IMM_16_QI :
3228 value = fields->f_dsp_16_s8;
3230 case M32C_OPERAND_IMM_16_SI :
3231 value = fields->f_dsp_16_s32;
3233 case M32C_OPERAND_IMM_20_S4 :
3234 value = fields->f_imm_20_s4;
3236 case M32C_OPERAND_IMM_24_HI :
3237 value = fields->f_dsp_24_s16;
3239 case M32C_OPERAND_IMM_24_QI :
3240 value = fields->f_dsp_24_s8;
3242 case M32C_OPERAND_IMM_24_SI :
3243 value = fields->f_dsp_24_s32;
3245 case M32C_OPERAND_IMM_32_HI :
3246 value = fields->f_dsp_32_s16;
3248 case M32C_OPERAND_IMM_32_QI :
3249 value = fields->f_dsp_32_s8;
3251 case M32C_OPERAND_IMM_32_SI :
3252 value = fields->f_dsp_32_s32;
3254 case M32C_OPERAND_IMM_40_HI :
3255 value = fields->f_dsp_40_s16;
3257 case M32C_OPERAND_IMM_40_QI :
3258 value = fields->f_dsp_40_s8;
3260 case M32C_OPERAND_IMM_40_SI :
3261 value = fields->f_dsp_40_s32;
3263 case M32C_OPERAND_IMM_48_HI :
3264 value = fields->f_dsp_48_s16;
3266 case M32C_OPERAND_IMM_48_QI :
3267 value = fields->f_dsp_48_s8;
3269 case M32C_OPERAND_IMM_48_SI :
3270 value = fields->f_dsp_48_s32;
3272 case M32C_OPERAND_IMM_56_HI :
3273 value = fields->f_dsp_56_s16;
3275 case M32C_OPERAND_IMM_56_QI :
3276 value = fields->f_dsp_56_s8;
3278 case M32C_OPERAND_IMM_64_HI :
3279 value = fields->f_dsp_64_s16;
3281 case M32C_OPERAND_IMM_8_HI :
3282 value = fields->f_dsp_8_s16;
3284 case M32C_OPERAND_IMM_8_QI :
3285 value = fields->f_dsp_8_s8;
3287 case M32C_OPERAND_IMM_8_S4 :
3288 value = fields->f_imm_8_s4;
3290 case M32C_OPERAND_IMM_8_S4N :
3291 value = fields->f_imm_8_s4;
3293 case M32C_OPERAND_IMM_SH_12_S4 :
3294 value = fields->f_imm_12_s4;
3296 case M32C_OPERAND_IMM_SH_20_S4 :
3297 value = fields->f_imm_20_s4;
3299 case M32C_OPERAND_IMM_SH_8_S4 :
3300 value = fields->f_imm_8_s4;
3302 case M32C_OPERAND_IMM1_S :
3303 value = fields->f_imm1_S;
3305 case M32C_OPERAND_IMM3_S :
3306 value = fields->f_imm3_S;
3308 case M32C_OPERAND_LAB_16_8 :
3309 value = fields->f_lab_16_8;
3311 case M32C_OPERAND_LAB_24_8 :
3312 value = fields->f_lab_24_8;
3314 case M32C_OPERAND_LAB_32_8 :
3315 value = fields->f_lab_32_8;
3317 case M32C_OPERAND_LAB_40_8 :
3318 value = fields->f_lab_40_8;
3320 case M32C_OPERAND_LAB_5_3 :
3321 value = fields->f_lab_5_3;
3323 case M32C_OPERAND_LAB_8_16 :
3324 value = fields->f_lab_8_16;
3326 case M32C_OPERAND_LAB_8_24 :
3327 value = fields->f_lab_8_24;
3329 case M32C_OPERAND_LAB_8_8 :
3330 value = fields->f_lab_8_8;
3332 case M32C_OPERAND_LAB32_JMP_S :
3333 value = fields->f_lab32_jmp_s;
3335 case M32C_OPERAND_Q :
3338 case M32C_OPERAND_R0 :
3341 case M32C_OPERAND_R0H :
3344 case M32C_OPERAND_R0L :
3347 case M32C_OPERAND_R1 :
3350 case M32C_OPERAND_R1R2R0 :
3353 case M32C_OPERAND_R2 :
3356 case M32C_OPERAND_R2R0 :
3359 case M32C_OPERAND_R3 :
3362 case M32C_OPERAND_R3R1 :
3365 case M32C_OPERAND_REGSETPOP :
3366 value = fields->f_8_8;
3368 case M32C_OPERAND_REGSETPUSH :
3369 value = fields->f_8_8;
3371 case M32C_OPERAND_RN16_PUSH_S :
3372 value = fields->f_4_1;
3374 case M32C_OPERAND_S :
3377 case M32C_OPERAND_SRC16AN :
3378 value = fields->f_src16_an;
3380 case M32C_OPERAND_SRC16ANHI :
3381 value = fields->f_src16_an;
3383 case M32C_OPERAND_SRC16ANQI :
3384 value = fields->f_src16_an;
3386 case M32C_OPERAND_SRC16RNHI :
3387 value = fields->f_src16_rn;
3389 case M32C_OPERAND_SRC16RNQI :
3390 value = fields->f_src16_rn;
3392 case M32C_OPERAND_SRC32ANPREFIXED :
3393 value = fields->f_src32_an_prefixed;
3395 case M32C_OPERAND_SRC32ANPREFIXEDHI :
3396 value = fields->f_src32_an_prefixed;
3398 case M32C_OPERAND_SRC32ANPREFIXEDQI :
3399 value = fields->f_src32_an_prefixed;
3401 case M32C_OPERAND_SRC32ANPREFIXEDSI :
3402 value = fields->f_src32_an_prefixed;
3404 case M32C_OPERAND_SRC32ANUNPREFIXED :
3405 value = fields->f_src32_an_unprefixed;
3407 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
3408 value = fields->f_src32_an_unprefixed;
3410 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
3411 value = fields->f_src32_an_unprefixed;
3413 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
3414 value = fields->f_src32_an_unprefixed;
3416 case M32C_OPERAND_SRC32RNPREFIXEDHI :
3417 value = fields->f_src32_rn_prefixed_HI;
3419 case M32C_OPERAND_SRC32RNPREFIXEDQI :
3420 value = fields->f_src32_rn_prefixed_QI;
3422 case M32C_OPERAND_SRC32RNPREFIXEDSI :
3423 value = fields->f_src32_rn_prefixed_SI;
3425 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
3426 value = fields->f_src32_rn_unprefixed_HI;
3428 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
3429 value = fields->f_src32_rn_unprefixed_QI;
3431 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
3432 value = fields->f_src32_rn_unprefixed_SI;
3434 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
3435 value = fields->f_5_1;
3437 case M32C_OPERAND_X :
3440 case M32C_OPERAND_Z :
3443 case M32C_OPERAND_COND16_16 :
3444 value = fields->f_dsp_16_u8;
3446 case M32C_OPERAND_COND16_24 :
3447 value = fields->f_dsp_24_u8;
3449 case M32C_OPERAND_COND16_32 :
3450 value = fields->f_dsp_32_u8;
3452 case M32C_OPERAND_COND16C :
3453 value = fields->f_cond16;
3455 case M32C_OPERAND_COND16J :
3456 value = fields->f_cond16;
3458 case M32C_OPERAND_COND16J5 :
3459 value = fields->f_cond16j_5;
3461 case M32C_OPERAND_COND32 :
3462 value = fields->f_cond32;
3464 case M32C_OPERAND_COND32_16 :
3465 value = fields->f_dsp_16_u8;
3467 case M32C_OPERAND_COND32_24 :
3468 value = fields->f_dsp_24_u8;
3470 case M32C_OPERAND_COND32_32 :
3471 value = fields->f_dsp_32_u8;
3473 case M32C_OPERAND_COND32_40 :
3474 value = fields->f_dsp_40_u8;
3476 case M32C_OPERAND_COND32J :
3477 value = fields->f_cond32j;
3479 case M32C_OPERAND_CR1_PREFIXED_32 :
3480 value = fields->f_21_3;
3482 case M32C_OPERAND_CR1_UNPREFIXED_32 :
3483 value = fields->f_13_3;
3485 case M32C_OPERAND_CR16 :
3486 value = fields->f_9_3;
3488 case M32C_OPERAND_CR2_32 :
3489 value = fields->f_13_3;
3491 case M32C_OPERAND_CR3_PREFIXED_32 :
3492 value = fields->f_21_3;
3494 case M32C_OPERAND_CR3_UNPREFIXED_32 :
3495 value = fields->f_13_3;
3497 case M32C_OPERAND_FLAGS16 :
3498 value = fields->f_9_3;
3500 case M32C_OPERAND_FLAGS32 :
3501 value = fields->f_13_3;
3503 case M32C_OPERAND_SCCOND32 :
3504 value = fields->f_cond16;
3506 case M32C_OPERAND_SIZE :
3511 /* xgettext:c-format */
3512 fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
3521 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
3523 const CGEN_FIELDS * fields)
3529 case M32C_OPERAND_A0 :
3532 case M32C_OPERAND_A1 :
3535 case M32C_OPERAND_AN16_PUSH_S :
3536 value = fields->f_4_1;
3538 case M32C_OPERAND_BIT16AN :
3539 value = fields->f_dst16_an;
3541 case M32C_OPERAND_BIT16RN :
3542 value = fields->f_dst16_rn;
3544 case M32C_OPERAND_BIT3_S :
3545 value = fields->f_imm3_S;
3547 case M32C_OPERAND_BIT32ANPREFIXED :
3548 value = fields->f_dst32_an_prefixed;
3550 case M32C_OPERAND_BIT32ANUNPREFIXED :
3551 value = fields->f_dst32_an_unprefixed;
3553 case M32C_OPERAND_BIT32RNPREFIXED :
3554 value = fields->f_dst32_rn_prefixed_QI;
3556 case M32C_OPERAND_BIT32RNUNPREFIXED :
3557 value = fields->f_dst32_rn_unprefixed_QI;
3559 case M32C_OPERAND_BITBASE16_16_S8 :
3560 value = fields->f_dsp_16_s8;
3562 case M32C_OPERAND_BITBASE16_16_U16 :
3563 value = fields->f_dsp_16_u16;
3565 case M32C_OPERAND_BITBASE16_16_U8 :
3566 value = fields->f_dsp_16_u8;
3568 case M32C_OPERAND_BITBASE16_8_U11_S :
3569 value = fields->f_bitbase16_u11_S;
3571 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
3572 value = fields->f_bitbase32_16_s11_unprefixed;
3574 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
3575 value = fields->f_bitbase32_16_s19_unprefixed;
3577 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
3578 value = fields->f_bitbase32_16_u11_unprefixed;
3580 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
3581 value = fields->f_bitbase32_16_u19_unprefixed;
3583 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
3584 value = fields->f_bitbase32_16_u27_unprefixed;
3586 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
3587 value = fields->f_bitbase32_24_s11_prefixed;
3589 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
3590 value = fields->f_bitbase32_24_s19_prefixed;
3592 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
3593 value = fields->f_bitbase32_24_u11_prefixed;
3595 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
3596 value = fields->f_bitbase32_24_u19_prefixed;
3598 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
3599 value = fields->f_bitbase32_24_u27_prefixed;
3601 case M32C_OPERAND_BITNO16R :
3602 value = fields->f_dsp_16_u8;
3604 case M32C_OPERAND_BITNO32PREFIXED :
3605 value = fields->f_bitno32_prefixed;
3607 case M32C_OPERAND_BITNO32UNPREFIXED :
3608 value = fields->f_bitno32_unprefixed;
3610 case M32C_OPERAND_DSP_10_U6 :
3611 value = fields->f_dsp_10_u6;
3613 case M32C_OPERAND_DSP_16_S16 :
3614 value = fields->f_dsp_16_s16;
3616 case M32C_OPERAND_DSP_16_S8 :
3617 value = fields->f_dsp_16_s8;
3619 case M32C_OPERAND_DSP_16_U16 :
3620 value = fields->f_dsp_16_u16;
3622 case M32C_OPERAND_DSP_16_U20 :
3623 value = fields->f_dsp_16_u24;
3625 case M32C_OPERAND_DSP_16_U24 :
3626 value = fields->f_dsp_16_u24;
3628 case M32C_OPERAND_DSP_16_U8 :
3629 value = fields->f_dsp_16_u8;
3631 case M32C_OPERAND_DSP_24_S16 :
3632 value = fields->f_dsp_24_s16;
3634 case M32C_OPERAND_DSP_24_S8 :
3635 value = fields->f_dsp_24_s8;
3637 case M32C_OPERAND_DSP_24_U16 :
3638 value = fields->f_dsp_24_u16;
3640 case M32C_OPERAND_DSP_24_U20 :
3641 value = fields->f_dsp_24_u24;
3643 case M32C_OPERAND_DSP_24_U24 :
3644 value = fields->f_dsp_24_u24;
3646 case M32C_OPERAND_DSP_24_U8 :
3647 value = fields->f_dsp_24_u8;
3649 case M32C_OPERAND_DSP_32_S16 :
3650 value = fields->f_dsp_32_s16;
3652 case M32C_OPERAND_DSP_32_S8 :
3653 value = fields->f_dsp_32_s8;
3655 case M32C_OPERAND_DSP_32_U16 :
3656 value = fields->f_dsp_32_u16;
3658 case M32C_OPERAND_DSP_32_U20 :
3659 value = fields->f_dsp_32_u24;
3661 case M32C_OPERAND_DSP_32_U24 :
3662 value = fields->f_dsp_32_u24;
3664 case M32C_OPERAND_DSP_32_U8 :
3665 value = fields->f_dsp_32_u8;
3667 case M32C_OPERAND_DSP_40_S16 :
3668 value = fields->f_dsp_40_s16;
3670 case M32C_OPERAND_DSP_40_S8 :
3671 value = fields->f_dsp_40_s8;
3673 case M32C_OPERAND_DSP_40_U16 :
3674 value = fields->f_dsp_40_u16;
3676 case M32C_OPERAND_DSP_40_U20 :
3677 value = fields->f_dsp_40_u20;
3679 case M32C_OPERAND_DSP_40_U24 :
3680 value = fields->f_dsp_40_u24;
3682 case M32C_OPERAND_DSP_40_U8 :
3683 value = fields->f_dsp_40_u8;
3685 case M32C_OPERAND_DSP_48_S16 :
3686 value = fields->f_dsp_48_s16;
3688 case M32C_OPERAND_DSP_48_S8 :
3689 value = fields->f_dsp_48_s8;
3691 case M32C_OPERAND_DSP_48_U16 :
3692 value = fields->f_dsp_48_u16;
3694 case M32C_OPERAND_DSP_48_U20 :
3695 value = fields->f_dsp_48_u20;
3697 case M32C_OPERAND_DSP_48_U24 :
3698 value = fields->f_dsp_48_u24;
3700 case M32C_OPERAND_DSP_48_U8 :
3701 value = fields->f_dsp_48_u8;
3703 case M32C_OPERAND_DSP_8_S24 :
3704 value = fields->f_dsp_8_s24;
3706 case M32C_OPERAND_DSP_8_S8 :
3707 value = fields->f_dsp_8_s8;
3709 case M32C_OPERAND_DSP_8_U16 :
3710 value = fields->f_dsp_8_u16;
3712 case M32C_OPERAND_DSP_8_U24 :
3713 value = fields->f_dsp_8_u24;
3715 case M32C_OPERAND_DSP_8_U6 :
3716 value = fields->f_dsp_8_u6;
3718 case M32C_OPERAND_DSP_8_U8 :
3719 value = fields->f_dsp_8_u8;
3721 case M32C_OPERAND_DST16AN :
3722 value = fields->f_dst16_an;
3724 case M32C_OPERAND_DST16AN_S :
3725 value = fields->f_dst16_an_s;
3727 case M32C_OPERAND_DST16ANHI :
3728 value = fields->f_dst16_an;
3730 case M32C_OPERAND_DST16ANQI :
3731 value = fields->f_dst16_an;
3733 case M32C_OPERAND_DST16ANQI_S :
3734 value = fields->f_dst16_rn_QI_s;
3736 case M32C_OPERAND_DST16ANSI :
3737 value = fields->f_dst16_an;
3739 case M32C_OPERAND_DST16RNEXTQI :
3740 value = fields->f_dst16_rn_ext;
3742 case M32C_OPERAND_DST16RNHI :
3743 value = fields->f_dst16_rn;
3745 case M32C_OPERAND_DST16RNQI :
3746 value = fields->f_dst16_rn;
3748 case M32C_OPERAND_DST16RNQI_S :
3749 value = fields->f_dst16_rn_QI_s;
3751 case M32C_OPERAND_DST16RNSI :
3752 value = fields->f_dst16_rn;
3754 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
3755 value = fields->f_dst32_an_unprefixed;
3757 case M32C_OPERAND_DST32ANPREFIXED :
3758 value = fields->f_dst32_an_prefixed;
3760 case M32C_OPERAND_DST32ANPREFIXEDHI :
3761 value = fields->f_dst32_an_prefixed;
3763 case M32C_OPERAND_DST32ANPREFIXEDQI :
3764 value = fields->f_dst32_an_prefixed;
3766 case M32C_OPERAND_DST32ANPREFIXEDSI :
3767 value = fields->f_dst32_an_prefixed;
3769 case M32C_OPERAND_DST32ANUNPREFIXED :
3770 value = fields->f_dst32_an_unprefixed;
3772 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
3773 value = fields->f_dst32_an_unprefixed;
3775 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
3776 value = fields->f_dst32_an_unprefixed;
3778 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
3779 value = fields->f_dst32_an_unprefixed;
3781 case M32C_OPERAND_DST32R0HI_S :
3784 case M32C_OPERAND_DST32R0QI_S :
3787 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
3788 value = fields->f_dst32_rn_ext_unprefixed;
3790 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
3791 value = fields->f_dst32_rn_ext_unprefixed;
3793 case M32C_OPERAND_DST32RNPREFIXEDHI :
3794 value = fields->f_dst32_rn_prefixed_HI;
3796 case M32C_OPERAND_DST32RNPREFIXEDQI :
3797 value = fields->f_dst32_rn_prefixed_QI;
3799 case M32C_OPERAND_DST32RNPREFIXEDSI :
3800 value = fields->f_dst32_rn_prefixed_SI;
3802 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
3803 value = fields->f_dst32_rn_unprefixed_HI;
3805 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
3806 value = fields->f_dst32_rn_unprefixed_QI;
3808 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
3809 value = fields->f_dst32_rn_unprefixed_SI;
3811 case M32C_OPERAND_G :
3814 case M32C_OPERAND_IMM_12_S4 :
3815 value = fields->f_imm_12_s4;
3817 case M32C_OPERAND_IMM_12_S4N :
3818 value = fields->f_imm_12_s4;
3820 case M32C_OPERAND_IMM_13_U3 :
3821 value = fields->f_imm_13_u3;
3823 case M32C_OPERAND_IMM_16_HI :
3824 value = fields->f_dsp_16_s16;
3826 case M32C_OPERAND_IMM_16_QI :
3827 value = fields->f_dsp_16_s8;
3829 case M32C_OPERAND_IMM_16_SI :
3830 value = fields->f_dsp_16_s32;
3832 case M32C_OPERAND_IMM_20_S4 :
3833 value = fields->f_imm_20_s4;
3835 case M32C_OPERAND_IMM_24_HI :
3836 value = fields->f_dsp_24_s16;
3838 case M32C_OPERAND_IMM_24_QI :
3839 value = fields->f_dsp_24_s8;
3841 case M32C_OPERAND_IMM_24_SI :
3842 value = fields->f_dsp_24_s32;
3844 case M32C_OPERAND_IMM_32_HI :
3845 value = fields->f_dsp_32_s16;
3847 case M32C_OPERAND_IMM_32_QI :
3848 value = fields->f_dsp_32_s8;
3850 case M32C_OPERAND_IMM_32_SI :
3851 value = fields->f_dsp_32_s32;
3853 case M32C_OPERAND_IMM_40_HI :
3854 value = fields->f_dsp_40_s16;
3856 case M32C_OPERAND_IMM_40_QI :
3857 value = fields->f_dsp_40_s8;
3859 case M32C_OPERAND_IMM_40_SI :
3860 value = fields->f_dsp_40_s32;
3862 case M32C_OPERAND_IMM_48_HI :
3863 value = fields->f_dsp_48_s16;
3865 case M32C_OPERAND_IMM_48_QI :
3866 value = fields->f_dsp_48_s8;
3868 case M32C_OPERAND_IMM_48_SI :
3869 value = fields->f_dsp_48_s32;
3871 case M32C_OPERAND_IMM_56_HI :
3872 value = fields->f_dsp_56_s16;
3874 case M32C_OPERAND_IMM_56_QI :
3875 value = fields->f_dsp_56_s8;
3877 case M32C_OPERAND_IMM_64_HI :
3878 value = fields->f_dsp_64_s16;
3880 case M32C_OPERAND_IMM_8_HI :
3881 value = fields->f_dsp_8_s16;
3883 case M32C_OPERAND_IMM_8_QI :
3884 value = fields->f_dsp_8_s8;
3886 case M32C_OPERAND_IMM_8_S4 :
3887 value = fields->f_imm_8_s4;
3889 case M32C_OPERAND_IMM_8_S4N :
3890 value = fields->f_imm_8_s4;
3892 case M32C_OPERAND_IMM_SH_12_S4 :
3893 value = fields->f_imm_12_s4;
3895 case M32C_OPERAND_IMM_SH_20_S4 :
3896 value = fields->f_imm_20_s4;
3898 case M32C_OPERAND_IMM_SH_8_S4 :
3899 value = fields->f_imm_8_s4;
3901 case M32C_OPERAND_IMM1_S :
3902 value = fields->f_imm1_S;
3904 case M32C_OPERAND_IMM3_S :
3905 value = fields->f_imm3_S;
3907 case M32C_OPERAND_LAB_16_8 :
3908 value = fields->f_lab_16_8;
3910 case M32C_OPERAND_LAB_24_8 :
3911 value = fields->f_lab_24_8;
3913 case M32C_OPERAND_LAB_32_8 :
3914 value = fields->f_lab_32_8;
3916 case M32C_OPERAND_LAB_40_8 :
3917 value = fields->f_lab_40_8;
3919 case M32C_OPERAND_LAB_5_3 :
3920 value = fields->f_lab_5_3;
3922 case M32C_OPERAND_LAB_8_16 :
3923 value = fields->f_lab_8_16;
3925 case M32C_OPERAND_LAB_8_24 :
3926 value = fields->f_lab_8_24;
3928 case M32C_OPERAND_LAB_8_8 :
3929 value = fields->f_lab_8_8;
3931 case M32C_OPERAND_LAB32_JMP_S :
3932 value = fields->f_lab32_jmp_s;
3934 case M32C_OPERAND_Q :
3937 case M32C_OPERAND_R0 :
3940 case M32C_OPERAND_R0H :
3943 case M32C_OPERAND_R0L :
3946 case M32C_OPERAND_R1 :
3949 case M32C_OPERAND_R1R2R0 :
3952 case M32C_OPERAND_R2 :
3955 case M32C_OPERAND_R2R0 :
3958 case M32C_OPERAND_R3 :
3961 case M32C_OPERAND_R3R1 :
3964 case M32C_OPERAND_REGSETPOP :
3965 value = fields->f_8_8;
3967 case M32C_OPERAND_REGSETPUSH :
3968 value = fields->f_8_8;
3970 case M32C_OPERAND_RN16_PUSH_S :
3971 value = fields->f_4_1;
3973 case M32C_OPERAND_S :
3976 case M32C_OPERAND_SRC16AN :
3977 value = fields->f_src16_an;
3979 case M32C_OPERAND_SRC16ANHI :
3980 value = fields->f_src16_an;
3982 case M32C_OPERAND_SRC16ANQI :
3983 value = fields->f_src16_an;
3985 case M32C_OPERAND_SRC16RNHI :
3986 value = fields->f_src16_rn;
3988 case M32C_OPERAND_SRC16RNQI :
3989 value = fields->f_src16_rn;
3991 case M32C_OPERAND_SRC32ANPREFIXED :
3992 value = fields->f_src32_an_prefixed;
3994 case M32C_OPERAND_SRC32ANPREFIXEDHI :
3995 value = fields->f_src32_an_prefixed;
3997 case M32C_OPERAND_SRC32ANPREFIXEDQI :
3998 value = fields->f_src32_an_prefixed;
4000 case M32C_OPERAND_SRC32ANPREFIXEDSI :
4001 value = fields->f_src32_an_prefixed;
4003 case M32C_OPERAND_SRC32ANUNPREFIXED :
4004 value = fields->f_src32_an_unprefixed;
4006 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
4007 value = fields->f_src32_an_unprefixed;
4009 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
4010 value = fields->f_src32_an_unprefixed;
4012 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
4013 value = fields->f_src32_an_unprefixed;
4015 case M32C_OPERAND_SRC32RNPREFIXEDHI :
4016 value = fields->f_src32_rn_prefixed_HI;
4018 case M32C_OPERAND_SRC32RNPREFIXEDQI :
4019 value = fields->f_src32_rn_prefixed_QI;
4021 case M32C_OPERAND_SRC32RNPREFIXEDSI :
4022 value = fields->f_src32_rn_prefixed_SI;
4024 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
4025 value = fields->f_src32_rn_unprefixed_HI;
4027 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
4028 value = fields->f_src32_rn_unprefixed_QI;
4030 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
4031 value = fields->f_src32_rn_unprefixed_SI;
4033 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
4034 value = fields->f_5_1;
4036 case M32C_OPERAND_X :
4039 case M32C_OPERAND_Z :
4042 case M32C_OPERAND_COND16_16 :
4043 value = fields->f_dsp_16_u8;
4045 case M32C_OPERAND_COND16_24 :
4046 value = fields->f_dsp_24_u8;
4048 case M32C_OPERAND_COND16_32 :
4049 value = fields->f_dsp_32_u8;
4051 case M32C_OPERAND_COND16C :
4052 value = fields->f_cond16;
4054 case M32C_OPERAND_COND16J :
4055 value = fields->f_cond16;
4057 case M32C_OPERAND_COND16J5 :
4058 value = fields->f_cond16j_5;
4060 case M32C_OPERAND_COND32 :
4061 value = fields->f_cond32;
4063 case M32C_OPERAND_COND32_16 :
4064 value = fields->f_dsp_16_u8;
4066 case M32C_OPERAND_COND32_24 :
4067 value = fields->f_dsp_24_u8;
4069 case M32C_OPERAND_COND32_32 :
4070 value = fields->f_dsp_32_u8;
4072 case M32C_OPERAND_COND32_40 :
4073 value = fields->f_dsp_40_u8;
4075 case M32C_OPERAND_COND32J :
4076 value = fields->f_cond32j;
4078 case M32C_OPERAND_CR1_PREFIXED_32 :
4079 value = fields->f_21_3;
4081 case M32C_OPERAND_CR1_UNPREFIXED_32 :
4082 value = fields->f_13_3;
4084 case M32C_OPERAND_CR16 :
4085 value = fields->f_9_3;
4087 case M32C_OPERAND_CR2_32 :
4088 value = fields->f_13_3;
4090 case M32C_OPERAND_CR3_PREFIXED_32 :
4091 value = fields->f_21_3;
4093 case M32C_OPERAND_CR3_UNPREFIXED_32 :
4094 value = fields->f_13_3;
4096 case M32C_OPERAND_FLAGS16 :
4097 value = fields->f_9_3;
4099 case M32C_OPERAND_FLAGS32 :
4100 value = fields->f_13_3;
4102 case M32C_OPERAND_SCCOND32 :
4103 value = fields->f_cond16;
4105 case M32C_OPERAND_SIZE :
4110 /* xgettext:c-format */
4111 fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
4119 void m32c_cgen_set_int_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, int);
4120 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma);
4122 /* Stuffing values in cgen_fields is handled by a collection of functions.
4123 They are distinguished by the type of the VALUE argument they accept.
4124 TODO: floating point, inlining support, remove cases where argument type
4128 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
4130 CGEN_FIELDS * fields,
4135 case M32C_OPERAND_A0 :
4137 case M32C_OPERAND_A1 :
4139 case M32C_OPERAND_AN16_PUSH_S :
4140 fields->f_4_1 = value;
4142 case M32C_OPERAND_BIT16AN :
4143 fields->f_dst16_an = value;
4145 case M32C_OPERAND_BIT16RN :
4146 fields->f_dst16_rn = value;
4148 case M32C_OPERAND_BIT3_S :
4149 fields->f_imm3_S = value;
4151 case M32C_OPERAND_BIT32ANPREFIXED :
4152 fields->f_dst32_an_prefixed = value;
4154 case M32C_OPERAND_BIT32ANUNPREFIXED :
4155 fields->f_dst32_an_unprefixed = value;
4157 case M32C_OPERAND_BIT32RNPREFIXED :
4158 fields->f_dst32_rn_prefixed_QI = value;
4160 case M32C_OPERAND_BIT32RNUNPREFIXED :
4161 fields->f_dst32_rn_unprefixed_QI = value;
4163 case M32C_OPERAND_BITBASE16_16_S8 :
4164 fields->f_dsp_16_s8 = value;
4166 case M32C_OPERAND_BITBASE16_16_U16 :
4167 fields->f_dsp_16_u16 = value;
4169 case M32C_OPERAND_BITBASE16_16_U8 :
4170 fields->f_dsp_16_u8 = value;
4172 case M32C_OPERAND_BITBASE16_8_U11_S :
4173 fields->f_bitbase16_u11_S = value;
4175 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
4176 fields->f_bitbase32_16_s11_unprefixed = value;
4178 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
4179 fields->f_bitbase32_16_s19_unprefixed = value;
4181 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
4182 fields->f_bitbase32_16_u11_unprefixed = value;
4184 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
4185 fields->f_bitbase32_16_u19_unprefixed = value;
4187 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
4188 fields->f_bitbase32_16_u27_unprefixed = value;
4190 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
4191 fields->f_bitbase32_24_s11_prefixed = value;
4193 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
4194 fields->f_bitbase32_24_s19_prefixed = value;
4196 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
4197 fields->f_bitbase32_24_u11_prefixed = value;
4199 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
4200 fields->f_bitbase32_24_u19_prefixed = value;
4202 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
4203 fields->f_bitbase32_24_u27_prefixed = value;
4205 case M32C_OPERAND_BITNO16R :
4206 fields->f_dsp_16_u8 = value;
4208 case M32C_OPERAND_BITNO32PREFIXED :
4209 fields->f_bitno32_prefixed = value;
4211 case M32C_OPERAND_BITNO32UNPREFIXED :
4212 fields->f_bitno32_unprefixed = value;
4214 case M32C_OPERAND_DSP_10_U6 :
4215 fields->f_dsp_10_u6 = value;
4217 case M32C_OPERAND_DSP_16_S16 :
4218 fields->f_dsp_16_s16 = value;
4220 case M32C_OPERAND_DSP_16_S8 :
4221 fields->f_dsp_16_s8 = value;
4223 case M32C_OPERAND_DSP_16_U16 :
4224 fields->f_dsp_16_u16 = value;
4226 case M32C_OPERAND_DSP_16_U20 :
4227 fields->f_dsp_16_u24 = value;
4229 case M32C_OPERAND_DSP_16_U24 :
4230 fields->f_dsp_16_u24 = value;
4232 case M32C_OPERAND_DSP_16_U8 :
4233 fields->f_dsp_16_u8 = value;
4235 case M32C_OPERAND_DSP_24_S16 :
4236 fields->f_dsp_24_s16 = value;
4238 case M32C_OPERAND_DSP_24_S8 :
4239 fields->f_dsp_24_s8 = value;
4241 case M32C_OPERAND_DSP_24_U16 :
4242 fields->f_dsp_24_u16 = value;
4244 case M32C_OPERAND_DSP_24_U20 :
4245 fields->f_dsp_24_u24 = value;
4247 case M32C_OPERAND_DSP_24_U24 :
4248 fields->f_dsp_24_u24 = value;
4250 case M32C_OPERAND_DSP_24_U8 :
4251 fields->f_dsp_24_u8 = value;
4253 case M32C_OPERAND_DSP_32_S16 :
4254 fields->f_dsp_32_s16 = value;
4256 case M32C_OPERAND_DSP_32_S8 :
4257 fields->f_dsp_32_s8 = value;
4259 case M32C_OPERAND_DSP_32_U16 :
4260 fields->f_dsp_32_u16 = value;
4262 case M32C_OPERAND_DSP_32_U20 :
4263 fields->f_dsp_32_u24 = value;
4265 case M32C_OPERAND_DSP_32_U24 :
4266 fields->f_dsp_32_u24 = value;
4268 case M32C_OPERAND_DSP_32_U8 :
4269 fields->f_dsp_32_u8 = value;
4271 case M32C_OPERAND_DSP_40_S16 :
4272 fields->f_dsp_40_s16 = value;
4274 case M32C_OPERAND_DSP_40_S8 :
4275 fields->f_dsp_40_s8 = value;
4277 case M32C_OPERAND_DSP_40_U16 :
4278 fields->f_dsp_40_u16 = value;
4280 case M32C_OPERAND_DSP_40_U20 :
4281 fields->f_dsp_40_u20 = value;
4283 case M32C_OPERAND_DSP_40_U24 :
4284 fields->f_dsp_40_u24 = value;
4286 case M32C_OPERAND_DSP_40_U8 :
4287 fields->f_dsp_40_u8 = value;
4289 case M32C_OPERAND_DSP_48_S16 :
4290 fields->f_dsp_48_s16 = value;
4292 case M32C_OPERAND_DSP_48_S8 :
4293 fields->f_dsp_48_s8 = value;
4295 case M32C_OPERAND_DSP_48_U16 :
4296 fields->f_dsp_48_u16 = value;
4298 case M32C_OPERAND_DSP_48_U20 :
4299 fields->f_dsp_48_u20 = value;
4301 case M32C_OPERAND_DSP_48_U24 :
4302 fields->f_dsp_48_u24 = value;
4304 case M32C_OPERAND_DSP_48_U8 :
4305 fields->f_dsp_48_u8 = value;
4307 case M32C_OPERAND_DSP_8_S24 :
4308 fields->f_dsp_8_s24 = value;
4310 case M32C_OPERAND_DSP_8_S8 :
4311 fields->f_dsp_8_s8 = value;
4313 case M32C_OPERAND_DSP_8_U16 :
4314 fields->f_dsp_8_u16 = value;
4316 case M32C_OPERAND_DSP_8_U24 :
4317 fields->f_dsp_8_u24 = value;
4319 case M32C_OPERAND_DSP_8_U6 :
4320 fields->f_dsp_8_u6 = value;
4322 case M32C_OPERAND_DSP_8_U8 :
4323 fields->f_dsp_8_u8 = value;
4325 case M32C_OPERAND_DST16AN :
4326 fields->f_dst16_an = value;
4328 case M32C_OPERAND_DST16AN_S :
4329 fields->f_dst16_an_s = value;
4331 case M32C_OPERAND_DST16ANHI :
4332 fields->f_dst16_an = value;
4334 case M32C_OPERAND_DST16ANQI :
4335 fields->f_dst16_an = value;
4337 case M32C_OPERAND_DST16ANQI_S :
4338 fields->f_dst16_rn_QI_s = value;
4340 case M32C_OPERAND_DST16ANSI :
4341 fields->f_dst16_an = value;
4343 case M32C_OPERAND_DST16RNEXTQI :
4344 fields->f_dst16_rn_ext = value;
4346 case M32C_OPERAND_DST16RNHI :
4347 fields->f_dst16_rn = value;
4349 case M32C_OPERAND_DST16RNQI :
4350 fields->f_dst16_rn = value;
4352 case M32C_OPERAND_DST16RNQI_S :
4353 fields->f_dst16_rn_QI_s = value;
4355 case M32C_OPERAND_DST16RNSI :
4356 fields->f_dst16_rn = value;
4358 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
4359 fields->f_dst32_an_unprefixed = value;
4361 case M32C_OPERAND_DST32ANPREFIXED :
4362 fields->f_dst32_an_prefixed = value;
4364 case M32C_OPERAND_DST32ANPREFIXEDHI :
4365 fields->f_dst32_an_prefixed = value;
4367 case M32C_OPERAND_DST32ANPREFIXEDQI :
4368 fields->f_dst32_an_prefixed = value;
4370 case M32C_OPERAND_DST32ANPREFIXEDSI :
4371 fields->f_dst32_an_prefixed = value;
4373 case M32C_OPERAND_DST32ANUNPREFIXED :
4374 fields->f_dst32_an_unprefixed = value;
4376 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
4377 fields->f_dst32_an_unprefixed = value;
4379 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
4380 fields->f_dst32_an_unprefixed = value;
4382 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
4383 fields->f_dst32_an_unprefixed = value;
4385 case M32C_OPERAND_DST32R0HI_S :
4387 case M32C_OPERAND_DST32R0QI_S :
4389 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
4390 fields->f_dst32_rn_ext_unprefixed = value;
4392 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
4393 fields->f_dst32_rn_ext_unprefixed = value;
4395 case M32C_OPERAND_DST32RNPREFIXEDHI :
4396 fields->f_dst32_rn_prefixed_HI = value;
4398 case M32C_OPERAND_DST32RNPREFIXEDQI :
4399 fields->f_dst32_rn_prefixed_QI = value;
4401 case M32C_OPERAND_DST32RNPREFIXEDSI :
4402 fields->f_dst32_rn_prefixed_SI = value;
4404 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
4405 fields->f_dst32_rn_unprefixed_HI = value;
4407 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
4408 fields->f_dst32_rn_unprefixed_QI = value;
4410 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
4411 fields->f_dst32_rn_unprefixed_SI = value;
4413 case M32C_OPERAND_G :
4415 case M32C_OPERAND_IMM_12_S4 :
4416 fields->f_imm_12_s4 = value;
4418 case M32C_OPERAND_IMM_12_S4N :
4419 fields->f_imm_12_s4 = value;
4421 case M32C_OPERAND_IMM_13_U3 :
4422 fields->f_imm_13_u3 = value;
4424 case M32C_OPERAND_IMM_16_HI :
4425 fields->f_dsp_16_s16 = value;
4427 case M32C_OPERAND_IMM_16_QI :
4428 fields->f_dsp_16_s8 = value;
4430 case M32C_OPERAND_IMM_16_SI :
4431 fields->f_dsp_16_s32 = value;
4433 case M32C_OPERAND_IMM_20_S4 :
4434 fields->f_imm_20_s4 = value;
4436 case M32C_OPERAND_IMM_24_HI :
4437 fields->f_dsp_24_s16 = value;
4439 case M32C_OPERAND_IMM_24_QI :
4440 fields->f_dsp_24_s8 = value;
4442 case M32C_OPERAND_IMM_24_SI :
4443 fields->f_dsp_24_s32 = value;
4445 case M32C_OPERAND_IMM_32_HI :
4446 fields->f_dsp_32_s16 = value;
4448 case M32C_OPERAND_IMM_32_QI :
4449 fields->f_dsp_32_s8 = value;
4451 case M32C_OPERAND_IMM_32_SI :
4452 fields->f_dsp_32_s32 = value;
4454 case M32C_OPERAND_IMM_40_HI :
4455 fields->f_dsp_40_s16 = value;
4457 case M32C_OPERAND_IMM_40_QI :
4458 fields->f_dsp_40_s8 = value;
4460 case M32C_OPERAND_IMM_40_SI :
4461 fields->f_dsp_40_s32 = value;
4463 case M32C_OPERAND_IMM_48_HI :
4464 fields->f_dsp_48_s16 = value;
4466 case M32C_OPERAND_IMM_48_QI :
4467 fields->f_dsp_48_s8 = value;
4469 case M32C_OPERAND_IMM_48_SI :
4470 fields->f_dsp_48_s32 = value;
4472 case M32C_OPERAND_IMM_56_HI :
4473 fields->f_dsp_56_s16 = value;
4475 case M32C_OPERAND_IMM_56_QI :
4476 fields->f_dsp_56_s8 = value;
4478 case M32C_OPERAND_IMM_64_HI :
4479 fields->f_dsp_64_s16 = value;
4481 case M32C_OPERAND_IMM_8_HI :
4482 fields->f_dsp_8_s16 = value;
4484 case M32C_OPERAND_IMM_8_QI :
4485 fields->f_dsp_8_s8 = value;
4487 case M32C_OPERAND_IMM_8_S4 :
4488 fields->f_imm_8_s4 = value;
4490 case M32C_OPERAND_IMM_8_S4N :
4491 fields->f_imm_8_s4 = value;
4493 case M32C_OPERAND_IMM_SH_12_S4 :
4494 fields->f_imm_12_s4 = value;
4496 case M32C_OPERAND_IMM_SH_20_S4 :
4497 fields->f_imm_20_s4 = value;
4499 case M32C_OPERAND_IMM_SH_8_S4 :
4500 fields->f_imm_8_s4 = value;
4502 case M32C_OPERAND_IMM1_S :
4503 fields->f_imm1_S = value;
4505 case M32C_OPERAND_IMM3_S :
4506 fields->f_imm3_S = value;
4508 case M32C_OPERAND_LAB_16_8 :
4509 fields->f_lab_16_8 = value;
4511 case M32C_OPERAND_LAB_24_8 :
4512 fields->f_lab_24_8 = value;
4514 case M32C_OPERAND_LAB_32_8 :
4515 fields->f_lab_32_8 = value;
4517 case M32C_OPERAND_LAB_40_8 :
4518 fields->f_lab_40_8 = value;
4520 case M32C_OPERAND_LAB_5_3 :
4521 fields->f_lab_5_3 = value;
4523 case M32C_OPERAND_LAB_8_16 :
4524 fields->f_lab_8_16 = value;
4526 case M32C_OPERAND_LAB_8_24 :
4527 fields->f_lab_8_24 = value;
4529 case M32C_OPERAND_LAB_8_8 :
4530 fields->f_lab_8_8 = value;
4532 case M32C_OPERAND_LAB32_JMP_S :
4533 fields->f_lab32_jmp_s = value;
4535 case M32C_OPERAND_Q :
4537 case M32C_OPERAND_R0 :
4539 case M32C_OPERAND_R0H :
4541 case M32C_OPERAND_R0L :
4543 case M32C_OPERAND_R1 :
4545 case M32C_OPERAND_R1R2R0 :
4547 case M32C_OPERAND_R2 :
4549 case M32C_OPERAND_R2R0 :
4551 case M32C_OPERAND_R3 :
4553 case M32C_OPERAND_R3R1 :
4555 case M32C_OPERAND_REGSETPOP :
4556 fields->f_8_8 = value;
4558 case M32C_OPERAND_REGSETPUSH :
4559 fields->f_8_8 = value;
4561 case M32C_OPERAND_RN16_PUSH_S :
4562 fields->f_4_1 = value;
4564 case M32C_OPERAND_S :
4566 case M32C_OPERAND_SRC16AN :
4567 fields->f_src16_an = value;
4569 case M32C_OPERAND_SRC16ANHI :
4570 fields->f_src16_an = value;
4572 case M32C_OPERAND_SRC16ANQI :
4573 fields->f_src16_an = value;
4575 case M32C_OPERAND_SRC16RNHI :
4576 fields->f_src16_rn = value;
4578 case M32C_OPERAND_SRC16RNQI :
4579 fields->f_src16_rn = value;
4581 case M32C_OPERAND_SRC32ANPREFIXED :
4582 fields->f_src32_an_prefixed = value;
4584 case M32C_OPERAND_SRC32ANPREFIXEDHI :
4585 fields->f_src32_an_prefixed = value;
4587 case M32C_OPERAND_SRC32ANPREFIXEDQI :
4588 fields->f_src32_an_prefixed = value;
4590 case M32C_OPERAND_SRC32ANPREFIXEDSI :
4591 fields->f_src32_an_prefixed = value;
4593 case M32C_OPERAND_SRC32ANUNPREFIXED :
4594 fields->f_src32_an_unprefixed = value;
4596 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
4597 fields->f_src32_an_unprefixed = value;
4599 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
4600 fields->f_src32_an_unprefixed = value;
4602 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
4603 fields->f_src32_an_unprefixed = value;
4605 case M32C_OPERAND_SRC32RNPREFIXEDHI :
4606 fields->f_src32_rn_prefixed_HI = value;
4608 case M32C_OPERAND_SRC32RNPREFIXEDQI :
4609 fields->f_src32_rn_prefixed_QI = value;
4611 case M32C_OPERAND_SRC32RNPREFIXEDSI :
4612 fields->f_src32_rn_prefixed_SI = value;
4614 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
4615 fields->f_src32_rn_unprefixed_HI = value;
4617 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
4618 fields->f_src32_rn_unprefixed_QI = value;
4620 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
4621 fields->f_src32_rn_unprefixed_SI = value;
4623 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
4624 fields->f_5_1 = value;
4626 case M32C_OPERAND_X :
4628 case M32C_OPERAND_Z :
4630 case M32C_OPERAND_COND16_16 :
4631 fields->f_dsp_16_u8 = value;
4633 case M32C_OPERAND_COND16_24 :
4634 fields->f_dsp_24_u8 = value;
4636 case M32C_OPERAND_COND16_32 :
4637 fields->f_dsp_32_u8 = value;
4639 case M32C_OPERAND_COND16C :
4640 fields->f_cond16 = value;
4642 case M32C_OPERAND_COND16J :
4643 fields->f_cond16 = value;
4645 case M32C_OPERAND_COND16J5 :
4646 fields->f_cond16j_5 = value;
4648 case M32C_OPERAND_COND32 :
4649 fields->f_cond32 = value;
4651 case M32C_OPERAND_COND32_16 :
4652 fields->f_dsp_16_u8 = value;
4654 case M32C_OPERAND_COND32_24 :
4655 fields->f_dsp_24_u8 = value;
4657 case M32C_OPERAND_COND32_32 :
4658 fields->f_dsp_32_u8 = value;
4660 case M32C_OPERAND_COND32_40 :
4661 fields->f_dsp_40_u8 = value;
4663 case M32C_OPERAND_COND32J :
4664 fields->f_cond32j = value;
4666 case M32C_OPERAND_CR1_PREFIXED_32 :
4667 fields->f_21_3 = value;
4669 case M32C_OPERAND_CR1_UNPREFIXED_32 :
4670 fields->f_13_3 = value;
4672 case M32C_OPERAND_CR16 :
4673 fields->f_9_3 = value;
4675 case M32C_OPERAND_CR2_32 :
4676 fields->f_13_3 = value;
4678 case M32C_OPERAND_CR3_PREFIXED_32 :
4679 fields->f_21_3 = value;
4681 case M32C_OPERAND_CR3_UNPREFIXED_32 :
4682 fields->f_13_3 = value;
4684 case M32C_OPERAND_FLAGS16 :
4685 fields->f_9_3 = value;
4687 case M32C_OPERAND_FLAGS32 :
4688 fields->f_13_3 = value;
4690 case M32C_OPERAND_SCCOND32 :
4691 fields->f_cond16 = value;
4693 case M32C_OPERAND_SIZE :
4697 /* xgettext:c-format */
4698 fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
4705 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
4707 CGEN_FIELDS * fields,
4712 case M32C_OPERAND_A0 :
4714 case M32C_OPERAND_A1 :
4716 case M32C_OPERAND_AN16_PUSH_S :
4717 fields->f_4_1 = value;
4719 case M32C_OPERAND_BIT16AN :
4720 fields->f_dst16_an = value;
4722 case M32C_OPERAND_BIT16RN :
4723 fields->f_dst16_rn = value;
4725 case M32C_OPERAND_BIT3_S :
4726 fields->f_imm3_S = value;
4728 case M32C_OPERAND_BIT32ANPREFIXED :
4729 fields->f_dst32_an_prefixed = value;
4731 case M32C_OPERAND_BIT32ANUNPREFIXED :
4732 fields->f_dst32_an_unprefixed = value;
4734 case M32C_OPERAND_BIT32RNPREFIXED :
4735 fields->f_dst32_rn_prefixed_QI = value;
4737 case M32C_OPERAND_BIT32RNUNPREFIXED :
4738 fields->f_dst32_rn_unprefixed_QI = value;
4740 case M32C_OPERAND_BITBASE16_16_S8 :
4741 fields->f_dsp_16_s8 = value;
4743 case M32C_OPERAND_BITBASE16_16_U16 :
4744 fields->f_dsp_16_u16 = value;
4746 case M32C_OPERAND_BITBASE16_16_U8 :
4747 fields->f_dsp_16_u8 = value;
4749 case M32C_OPERAND_BITBASE16_8_U11_S :
4750 fields->f_bitbase16_u11_S = value;
4752 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
4753 fields->f_bitbase32_16_s11_unprefixed = value;
4755 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
4756 fields->f_bitbase32_16_s19_unprefixed = value;
4758 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
4759 fields->f_bitbase32_16_u11_unprefixed = value;
4761 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
4762 fields->f_bitbase32_16_u19_unprefixed = value;
4764 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
4765 fields->f_bitbase32_16_u27_unprefixed = value;
4767 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
4768 fields->f_bitbase32_24_s11_prefixed = value;
4770 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
4771 fields->f_bitbase32_24_s19_prefixed = value;
4773 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
4774 fields->f_bitbase32_24_u11_prefixed = value;
4776 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
4777 fields->f_bitbase32_24_u19_prefixed = value;
4779 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
4780 fields->f_bitbase32_24_u27_prefixed = value;
4782 case M32C_OPERAND_BITNO16R :
4783 fields->f_dsp_16_u8 = value;
4785 case M32C_OPERAND_BITNO32PREFIXED :
4786 fields->f_bitno32_prefixed = value;
4788 case M32C_OPERAND_BITNO32UNPREFIXED :
4789 fields->f_bitno32_unprefixed = value;
4791 case M32C_OPERAND_DSP_10_U6 :
4792 fields->f_dsp_10_u6 = value;
4794 case M32C_OPERAND_DSP_16_S16 :
4795 fields->f_dsp_16_s16 = value;
4797 case M32C_OPERAND_DSP_16_S8 :
4798 fields->f_dsp_16_s8 = value;
4800 case M32C_OPERAND_DSP_16_U16 :
4801 fields->f_dsp_16_u16 = value;
4803 case M32C_OPERAND_DSP_16_U20 :
4804 fields->f_dsp_16_u24 = value;
4806 case M32C_OPERAND_DSP_16_U24 :
4807 fields->f_dsp_16_u24 = value;
4809 case M32C_OPERAND_DSP_16_U8 :
4810 fields->f_dsp_16_u8 = value;
4812 case M32C_OPERAND_DSP_24_S16 :
4813 fields->f_dsp_24_s16 = value;
4815 case M32C_OPERAND_DSP_24_S8 :
4816 fields->f_dsp_24_s8 = value;
4818 case M32C_OPERAND_DSP_24_U16 :
4819 fields->f_dsp_24_u16 = value;
4821 case M32C_OPERAND_DSP_24_U20 :
4822 fields->f_dsp_24_u24 = value;
4824 case M32C_OPERAND_DSP_24_U24 :
4825 fields->f_dsp_24_u24 = value;
4827 case M32C_OPERAND_DSP_24_U8 :
4828 fields->f_dsp_24_u8 = value;
4830 case M32C_OPERAND_DSP_32_S16 :
4831 fields->f_dsp_32_s16 = value;
4833 case M32C_OPERAND_DSP_32_S8 :
4834 fields->f_dsp_32_s8 = value;
4836 case M32C_OPERAND_DSP_32_U16 :
4837 fields->f_dsp_32_u16 = value;
4839 case M32C_OPERAND_DSP_32_U20 :
4840 fields->f_dsp_32_u24 = value;
4842 case M32C_OPERAND_DSP_32_U24 :
4843 fields->f_dsp_32_u24 = value;
4845 case M32C_OPERAND_DSP_32_U8 :
4846 fields->f_dsp_32_u8 = value;
4848 case M32C_OPERAND_DSP_40_S16 :
4849 fields->f_dsp_40_s16 = value;
4851 case M32C_OPERAND_DSP_40_S8 :
4852 fields->f_dsp_40_s8 = value;
4854 case M32C_OPERAND_DSP_40_U16 :
4855 fields->f_dsp_40_u16 = value;
4857 case M32C_OPERAND_DSP_40_U20 :
4858 fields->f_dsp_40_u20 = value;
4860 case M32C_OPERAND_DSP_40_U24 :
4861 fields->f_dsp_40_u24 = value;
4863 case M32C_OPERAND_DSP_40_U8 :
4864 fields->f_dsp_40_u8 = value;
4866 case M32C_OPERAND_DSP_48_S16 :
4867 fields->f_dsp_48_s16 = value;
4869 case M32C_OPERAND_DSP_48_S8 :
4870 fields->f_dsp_48_s8 = value;
4872 case M32C_OPERAND_DSP_48_U16 :
4873 fields->f_dsp_48_u16 = value;
4875 case M32C_OPERAND_DSP_48_U20 :
4876 fields->f_dsp_48_u20 = value;
4878 case M32C_OPERAND_DSP_48_U24 :
4879 fields->f_dsp_48_u24 = value;
4881 case M32C_OPERAND_DSP_48_U8 :
4882 fields->f_dsp_48_u8 = value;
4884 case M32C_OPERAND_DSP_8_S24 :
4885 fields->f_dsp_8_s24 = value;
4887 case M32C_OPERAND_DSP_8_S8 :
4888 fields->f_dsp_8_s8 = value;
4890 case M32C_OPERAND_DSP_8_U16 :
4891 fields->f_dsp_8_u16 = value;
4893 case M32C_OPERAND_DSP_8_U24 :
4894 fields->f_dsp_8_u24 = value;
4896 case M32C_OPERAND_DSP_8_U6 :
4897 fields->f_dsp_8_u6 = value;
4899 case M32C_OPERAND_DSP_8_U8 :
4900 fields->f_dsp_8_u8 = value;
4902 case M32C_OPERAND_DST16AN :
4903 fields->f_dst16_an = value;
4905 case M32C_OPERAND_DST16AN_S :
4906 fields->f_dst16_an_s = value;
4908 case M32C_OPERAND_DST16ANHI :
4909 fields->f_dst16_an = value;
4911 case M32C_OPERAND_DST16ANQI :
4912 fields->f_dst16_an = value;
4914 case M32C_OPERAND_DST16ANQI_S :
4915 fields->f_dst16_rn_QI_s = value;
4917 case M32C_OPERAND_DST16ANSI :
4918 fields->f_dst16_an = value;
4920 case M32C_OPERAND_DST16RNEXTQI :
4921 fields->f_dst16_rn_ext = value;
4923 case M32C_OPERAND_DST16RNHI :
4924 fields->f_dst16_rn = value;
4926 case M32C_OPERAND_DST16RNQI :
4927 fields->f_dst16_rn = value;
4929 case M32C_OPERAND_DST16RNQI_S :
4930 fields->f_dst16_rn_QI_s = value;
4932 case M32C_OPERAND_DST16RNSI :
4933 fields->f_dst16_rn = value;
4935 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
4936 fields->f_dst32_an_unprefixed = value;
4938 case M32C_OPERAND_DST32ANPREFIXED :
4939 fields->f_dst32_an_prefixed = value;
4941 case M32C_OPERAND_DST32ANPREFIXEDHI :
4942 fields->f_dst32_an_prefixed = value;
4944 case M32C_OPERAND_DST32ANPREFIXEDQI :
4945 fields->f_dst32_an_prefixed = value;
4947 case M32C_OPERAND_DST32ANPREFIXEDSI :
4948 fields->f_dst32_an_prefixed = value;
4950 case M32C_OPERAND_DST32ANUNPREFIXED :
4951 fields->f_dst32_an_unprefixed = value;
4953 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
4954 fields->f_dst32_an_unprefixed = value;
4956 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
4957 fields->f_dst32_an_unprefixed = value;
4959 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
4960 fields->f_dst32_an_unprefixed = value;
4962 case M32C_OPERAND_DST32R0HI_S :
4964 case M32C_OPERAND_DST32R0QI_S :
4966 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
4967 fields->f_dst32_rn_ext_unprefixed = value;
4969 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
4970 fields->f_dst32_rn_ext_unprefixed = value;
4972 case M32C_OPERAND_DST32RNPREFIXEDHI :
4973 fields->f_dst32_rn_prefixed_HI = value;
4975 case M32C_OPERAND_DST32RNPREFIXEDQI :
4976 fields->f_dst32_rn_prefixed_QI = value;
4978 case M32C_OPERAND_DST32RNPREFIXEDSI :
4979 fields->f_dst32_rn_prefixed_SI = value;
4981 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
4982 fields->f_dst32_rn_unprefixed_HI = value;
4984 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
4985 fields->f_dst32_rn_unprefixed_QI = value;
4987 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
4988 fields->f_dst32_rn_unprefixed_SI = value;
4990 case M32C_OPERAND_G :
4992 case M32C_OPERAND_IMM_12_S4 :
4993 fields->f_imm_12_s4 = value;
4995 case M32C_OPERAND_IMM_12_S4N :
4996 fields->f_imm_12_s4 = value;
4998 case M32C_OPERAND_IMM_13_U3 :
4999 fields->f_imm_13_u3 = value;
5001 case M32C_OPERAND_IMM_16_HI :
5002 fields->f_dsp_16_s16 = value;
5004 case M32C_OPERAND_IMM_16_QI :
5005 fields->f_dsp_16_s8 = value;
5007 case M32C_OPERAND_IMM_16_SI :
5008 fields->f_dsp_16_s32 = value;
5010 case M32C_OPERAND_IMM_20_S4 :
5011 fields->f_imm_20_s4 = value;
5013 case M32C_OPERAND_IMM_24_HI :
5014 fields->f_dsp_24_s16 = value;
5016 case M32C_OPERAND_IMM_24_QI :
5017 fields->f_dsp_24_s8 = value;
5019 case M32C_OPERAND_IMM_24_SI :
5020 fields->f_dsp_24_s32 = value;
5022 case M32C_OPERAND_IMM_32_HI :
5023 fields->f_dsp_32_s16 = value;
5025 case M32C_OPERAND_IMM_32_QI :
5026 fields->f_dsp_32_s8 = value;
5028 case M32C_OPERAND_IMM_32_SI :
5029 fields->f_dsp_32_s32 = value;
5031 case M32C_OPERAND_IMM_40_HI :
5032 fields->f_dsp_40_s16 = value;
5034 case M32C_OPERAND_IMM_40_QI :
5035 fields->f_dsp_40_s8 = value;
5037 case M32C_OPERAND_IMM_40_SI :
5038 fields->f_dsp_40_s32 = value;
5040 case M32C_OPERAND_IMM_48_HI :
5041 fields->f_dsp_48_s16 = value;
5043 case M32C_OPERAND_IMM_48_QI :
5044 fields->f_dsp_48_s8 = value;
5046 case M32C_OPERAND_IMM_48_SI :
5047 fields->f_dsp_48_s32 = value;
5049 case M32C_OPERAND_IMM_56_HI :
5050 fields->f_dsp_56_s16 = value;
5052 case M32C_OPERAND_IMM_56_QI :
5053 fields->f_dsp_56_s8 = value;
5055 case M32C_OPERAND_IMM_64_HI :
5056 fields->f_dsp_64_s16 = value;
5058 case M32C_OPERAND_IMM_8_HI :
5059 fields->f_dsp_8_s16 = value;
5061 case M32C_OPERAND_IMM_8_QI :
5062 fields->f_dsp_8_s8 = value;
5064 case M32C_OPERAND_IMM_8_S4 :
5065 fields->f_imm_8_s4 = value;
5067 case M32C_OPERAND_IMM_8_S4N :
5068 fields->f_imm_8_s4 = value;
5070 case M32C_OPERAND_IMM_SH_12_S4 :
5071 fields->f_imm_12_s4 = value;
5073 case M32C_OPERAND_IMM_SH_20_S4 :
5074 fields->f_imm_20_s4 = value;
5076 case M32C_OPERAND_IMM_SH_8_S4 :
5077 fields->f_imm_8_s4 = value;
5079 case M32C_OPERAND_IMM1_S :
5080 fields->f_imm1_S = value;
5082 case M32C_OPERAND_IMM3_S :
5083 fields->f_imm3_S = value;
5085 case M32C_OPERAND_LAB_16_8 :
5086 fields->f_lab_16_8 = value;
5088 case M32C_OPERAND_LAB_24_8 :
5089 fields->f_lab_24_8 = value;
5091 case M32C_OPERAND_LAB_32_8 :
5092 fields->f_lab_32_8 = value;
5094 case M32C_OPERAND_LAB_40_8 :
5095 fields->f_lab_40_8 = value;
5097 case M32C_OPERAND_LAB_5_3 :
5098 fields->f_lab_5_3 = value;
5100 case M32C_OPERAND_LAB_8_16 :
5101 fields->f_lab_8_16 = value;
5103 case M32C_OPERAND_LAB_8_24 :
5104 fields->f_lab_8_24 = value;
5106 case M32C_OPERAND_LAB_8_8 :
5107 fields->f_lab_8_8 = value;
5109 case M32C_OPERAND_LAB32_JMP_S :
5110 fields->f_lab32_jmp_s = value;
5112 case M32C_OPERAND_Q :
5114 case M32C_OPERAND_R0 :
5116 case M32C_OPERAND_R0H :
5118 case M32C_OPERAND_R0L :
5120 case M32C_OPERAND_R1 :
5122 case M32C_OPERAND_R1R2R0 :
5124 case M32C_OPERAND_R2 :
5126 case M32C_OPERAND_R2R0 :
5128 case M32C_OPERAND_R3 :
5130 case M32C_OPERAND_R3R1 :
5132 case M32C_OPERAND_REGSETPOP :
5133 fields->f_8_8 = value;
5135 case M32C_OPERAND_REGSETPUSH :
5136 fields->f_8_8 = value;
5138 case M32C_OPERAND_RN16_PUSH_S :
5139 fields->f_4_1 = value;
5141 case M32C_OPERAND_S :
5143 case M32C_OPERAND_SRC16AN :
5144 fields->f_src16_an = value;
5146 case M32C_OPERAND_SRC16ANHI :
5147 fields->f_src16_an = value;
5149 case M32C_OPERAND_SRC16ANQI :
5150 fields->f_src16_an = value;
5152 case M32C_OPERAND_SRC16RNHI :
5153 fields->f_src16_rn = value;
5155 case M32C_OPERAND_SRC16RNQI :
5156 fields->f_src16_rn = value;
5158 case M32C_OPERAND_SRC32ANPREFIXED :
5159 fields->f_src32_an_prefixed = value;
5161 case M32C_OPERAND_SRC32ANPREFIXEDHI :
5162 fields->f_src32_an_prefixed = value;
5164 case M32C_OPERAND_SRC32ANPREFIXEDQI :
5165 fields->f_src32_an_prefixed = value;
5167 case M32C_OPERAND_SRC32ANPREFIXEDSI :
5168 fields->f_src32_an_prefixed = value;
5170 case M32C_OPERAND_SRC32ANUNPREFIXED :
5171 fields->f_src32_an_unprefixed = value;
5173 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
5174 fields->f_src32_an_unprefixed = value;
5176 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
5177 fields->f_src32_an_unprefixed = value;
5179 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
5180 fields->f_src32_an_unprefixed = value;
5182 case M32C_OPERAND_SRC32RNPREFIXEDHI :
5183 fields->f_src32_rn_prefixed_HI = value;
5185 case M32C_OPERAND_SRC32RNPREFIXEDQI :
5186 fields->f_src32_rn_prefixed_QI = value;
5188 case M32C_OPERAND_SRC32RNPREFIXEDSI :
5189 fields->f_src32_rn_prefixed_SI = value;
5191 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
5192 fields->f_src32_rn_unprefixed_HI = value;
5194 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
5195 fields->f_src32_rn_unprefixed_QI = value;
5197 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
5198 fields->f_src32_rn_unprefixed_SI = value;
5200 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
5201 fields->f_5_1 = value;
5203 case M32C_OPERAND_X :
5205 case M32C_OPERAND_Z :
5207 case M32C_OPERAND_COND16_16 :
5208 fields->f_dsp_16_u8 = value;
5210 case M32C_OPERAND_COND16_24 :
5211 fields->f_dsp_24_u8 = value;
5213 case M32C_OPERAND_COND16_32 :
5214 fields->f_dsp_32_u8 = value;
5216 case M32C_OPERAND_COND16C :
5217 fields->f_cond16 = value;
5219 case M32C_OPERAND_COND16J :
5220 fields->f_cond16 = value;
5222 case M32C_OPERAND_COND16J5 :
5223 fields->f_cond16j_5 = value;
5225 case M32C_OPERAND_COND32 :
5226 fields->f_cond32 = value;
5228 case M32C_OPERAND_COND32_16 :
5229 fields->f_dsp_16_u8 = value;
5231 case M32C_OPERAND_COND32_24 :
5232 fields->f_dsp_24_u8 = value;
5234 case M32C_OPERAND_COND32_32 :
5235 fields->f_dsp_32_u8 = value;
5237 case M32C_OPERAND_COND32_40 :
5238 fields->f_dsp_40_u8 = value;
5240 case M32C_OPERAND_COND32J :
5241 fields->f_cond32j = value;
5243 case M32C_OPERAND_CR1_PREFIXED_32 :
5244 fields->f_21_3 = value;
5246 case M32C_OPERAND_CR1_UNPREFIXED_32 :
5247 fields->f_13_3 = value;
5249 case M32C_OPERAND_CR16 :
5250 fields->f_9_3 = value;
5252 case M32C_OPERAND_CR2_32 :
5253 fields->f_13_3 = value;
5255 case M32C_OPERAND_CR3_PREFIXED_32 :
5256 fields->f_21_3 = value;
5258 case M32C_OPERAND_CR3_UNPREFIXED_32 :
5259 fields->f_13_3 = value;
5261 case M32C_OPERAND_FLAGS16 :
5262 fields->f_9_3 = value;
5264 case M32C_OPERAND_FLAGS32 :
5265 fields->f_13_3 = value;
5267 case M32C_OPERAND_SCCOND32 :
5268 fields->f_cond16 = value;
5270 case M32C_OPERAND_SIZE :
5274 /* xgettext:c-format */
5275 fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"),
5281 /* Function to call before using the instruction builder tables. */
5284 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd)
5286 cd->insert_handlers = & m32c_cgen_insert_handlers[0];
5287 cd->extract_handlers = & m32c_cgen_extract_handlers[0];
5289 cd->insert_operand = m32c_cgen_insert_operand;
5290 cd->extract_operand = m32c_cgen_extract_operand;
5292 cd->get_int_operand = m32c_cgen_get_int_operand;
5293 cd->set_int_operand = m32c_cgen_set_int_operand;
5294 cd->get_vma_operand = m32c_cgen_get_vma_operand;
5295 cd->set_vma_operand = m32c_cgen_set_vma_operand;