1 /* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */
2 /* Instruction building/extraction support for m32c. -*- C -*-
4 THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
5 - the resultant file is machine generated, cgen-ibld.in isn't
7 Copyright (C) 1996-2017 Free Software Foundation, Inc.
9 This file is part of libopcodes.
11 This library is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3, or (at your option)
16 It is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
19 License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
25 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
34 #include "m32c-desc.h"
36 #include "cgen/basic-modes.h"
38 #include "safe-ctype.h"
41 #define min(a,b) ((a) < (b) ? (a) : (b))
43 #define max(a,b) ((a) > (b) ? (a) : (b))
45 /* Used by the ifield rtx function. */
46 #define FLD(f) (fields->f)
48 static const char * insert_normal
49 (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
50 unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
51 static const char * insert_insn_normal
52 (CGEN_CPU_DESC, const CGEN_INSN *,
53 CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
54 static int extract_normal
55 (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
56 unsigned int, unsigned int, unsigned int, unsigned int,
57 unsigned int, unsigned int, bfd_vma, long *);
58 static int extract_insn_normal
59 (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
60 CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
62 static void put_insn_int_value
63 (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
66 static CGEN_INLINE void insert_1
67 (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
68 static CGEN_INLINE int fill_cache
69 (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
70 static CGEN_INLINE long extract_1
71 (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
74 /* Operand insertion. */
78 /* Subroutine of insert_normal. */
80 static CGEN_INLINE void
81 insert_1 (CGEN_CPU_DESC cd,
91 x = cgen_get_insn_value (cd, bufp, word_length);
93 /* Written this way to avoid undefined behaviour. */
94 mask = (((1L << (length - 1)) - 1) << 1) | 1;
96 shift = (start + 1) - length;
98 shift = (word_length - (start + length));
99 x = (x & ~(mask << shift)) | ((value & mask) << shift);
101 cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x);
104 #endif /* ! CGEN_INT_INSN_P */
106 /* Default insertion routine.
108 ATTRS is a mask of the boolean attributes.
109 WORD_OFFSET is the offset in bits from the start of the insn of the value.
110 WORD_LENGTH is the length of the word in bits in which the value resides.
111 START is the starting bit number in the word, architecture origin.
112 LENGTH is the length of VALUE in bits.
113 TOTAL_LENGTH is the total length of the insn in bits.
115 The result is an error message or NULL if success. */
117 /* ??? This duplicates functionality with bfd's howto table and
118 bfd_install_relocation. */
119 /* ??? This doesn't handle bfd_vma's. Create another function when
123 insert_normal (CGEN_CPU_DESC cd,
126 unsigned int word_offset,
129 unsigned int word_length,
130 unsigned int total_length,
131 CGEN_INSN_BYTES_PTR buffer)
133 static char errbuf[100];
134 /* Written this way to avoid undefined behaviour. */
135 unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1;
137 /* If LENGTH is zero, this operand doesn't contribute to the value. */
141 if (word_length > 8 * sizeof (CGEN_INSN_INT))
144 /* For architectures with insns smaller than the base-insn-bitsize,
145 word_length may be too big. */
146 if (cd->min_insn_bitsize < cd->base_insn_bitsize)
149 && word_length > total_length)
150 word_length = total_length;
153 /* Ensure VALUE will fit. */
154 if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
156 long minval = - (1L << (length - 1));
157 unsigned long maxval = mask;
159 if ((value > 0 && (unsigned long) value > maxval)
162 /* xgettext:c-format */
164 _("operand out of range (%ld not between %ld and %lu)"),
165 value, minval, maxval);
169 else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
171 unsigned long maxval = mask;
172 unsigned long val = (unsigned long) value;
174 /* For hosts with a word size > 32 check to see if value has been sign
175 extended beyond 32 bits. If so then ignore these higher sign bits
176 as the user is attempting to store a 32-bit signed value into an
177 unsigned 32-bit field which is allowed. */
178 if (sizeof (unsigned long) > 4 && ((value >> 32) == -1))
183 /* xgettext:c-format */
185 _("operand out of range (0x%lx not between 0 and 0x%lx)"),
192 if (! cgen_signed_overflow_ok_p (cd))
194 long minval = - (1L << (length - 1));
195 long maxval = (1L << (length - 1)) - 1;
197 if (value < minval || value > maxval)
200 /* xgettext:c-format */
201 (errbuf, _("operand out of range (%ld not between %ld and %ld)"),
202 value, minval, maxval);
211 int shift_within_word, shift_to_word, shift;
213 /* How to shift the value to BIT0 of the word. */
214 shift_to_word = total_length - (word_offset + word_length);
216 /* How to shift the value to the field within the word. */
217 if (CGEN_INSN_LSB0_P)
218 shift_within_word = start + 1 - length;
220 shift_within_word = word_length - start - length;
222 /* The total SHIFT, then mask in the value. */
223 shift = shift_to_word + shift_within_word;
224 *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
227 #else /* ! CGEN_INT_INSN_P */
230 unsigned char *bufp = (unsigned char *) buffer + word_offset / 8;
232 insert_1 (cd, value, start, length, word_length, bufp);
235 #endif /* ! CGEN_INT_INSN_P */
240 /* Default insn builder (insert handler).
241 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
242 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
243 recorded in host byte order, otherwise BUFFER is an array of bytes
244 and the value is recorded in target byte order).
245 The result is an error message or NULL if success. */
248 insert_insn_normal (CGEN_CPU_DESC cd,
249 const CGEN_INSN * insn,
250 CGEN_FIELDS * fields,
251 CGEN_INSN_BYTES_PTR buffer,
254 const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
256 const CGEN_SYNTAX_CHAR_TYPE * syn;
258 CGEN_INIT_INSERT (cd);
259 value = CGEN_INSN_BASE_VALUE (insn);
261 /* If we're recording insns as numbers (rather than a string of bytes),
262 target byte order handling is deferred until later. */
266 put_insn_int_value (cd, buffer, cd->base_insn_bitsize,
267 CGEN_FIELDS_BITSIZE (fields), value);
271 cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
272 (unsigned) CGEN_FIELDS_BITSIZE (fields)),
275 #endif /* ! CGEN_INT_INSN_P */
277 /* ??? It would be better to scan the format's fields.
278 Still need to be able to insert a value based on the operand though;
279 e.g. storing a branch displacement that got resolved later.
280 Needs more thought first. */
282 for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn)
286 if (CGEN_SYNTAX_CHAR_P (* syn))
289 errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
299 /* Cover function to store an insn value into an integral insn. Must go here
300 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
303 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
304 CGEN_INSN_BYTES_PTR buf,
309 /* For architectures with insns smaller than the base-insn-bitsize,
310 length may be too big. */
311 if (length > insn_length)
315 int shift = insn_length - length;
316 /* Written this way to avoid undefined behaviour. */
317 CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1;
319 *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift);
324 /* Operand extraction. */
326 #if ! CGEN_INT_INSN_P
328 /* Subroutine of extract_normal.
329 Ensure sufficient bytes are cached in EX_INFO.
330 OFFSET is the offset in bytes from the start of the insn of the value.
331 BYTES is the length of the needed value.
332 Returns 1 for success, 0 for failure. */
334 static CGEN_INLINE int
335 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
336 CGEN_EXTRACT_INFO *ex_info,
341 /* It's doubtful that the middle part has already been fetched so
342 we don't optimize that case. kiss. */
344 disassemble_info *info = (disassemble_info *) ex_info->dis_info;
346 /* First do a quick check. */
347 mask = (1 << bytes) - 1;
348 if (((ex_info->valid >> offset) & mask) == mask)
351 /* Search for the first byte we need to read. */
352 for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1)
353 if (! (mask & ex_info->valid))
361 status = (*info->read_memory_func)
362 (pc, ex_info->insn_bytes + offset, bytes, info);
366 (*info->memory_error_func) (status, pc, info);
370 ex_info->valid |= ((1 << bytes) - 1) << offset;
376 /* Subroutine of extract_normal. */
378 static CGEN_INLINE long
379 extract_1 (CGEN_CPU_DESC cd,
380 CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
385 bfd_vma pc ATTRIBUTE_UNUSED)
390 x = cgen_get_insn_value (cd, bufp, word_length);
392 if (CGEN_INSN_LSB0_P)
393 shift = (start + 1) - length;
395 shift = (word_length - (start + length));
399 #endif /* ! CGEN_INT_INSN_P */
401 /* Default extraction routine.
403 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
404 or sometimes less for cases like the m32r where the base insn size is 32
405 but some insns are 16 bits.
406 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
407 but for generality we take a bitmask of all of them.
408 WORD_OFFSET is the offset in bits from the start of the insn of the value.
409 WORD_LENGTH is the length of the word in bits in which the value resides.
410 START is the starting bit number in the word, architecture origin.
411 LENGTH is the length of VALUE in bits.
412 TOTAL_LENGTH is the total length of the insn in bits.
414 Returns 1 for success, 0 for failure. */
416 /* ??? The return code isn't properly used. wip. */
418 /* ??? This doesn't handle bfd_vma's. Create another function when
422 extract_normal (CGEN_CPU_DESC cd,
423 #if ! CGEN_INT_INSN_P
424 CGEN_EXTRACT_INFO *ex_info,
426 CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
428 CGEN_INSN_INT insn_value,
430 unsigned int word_offset,
433 unsigned int word_length,
434 unsigned int total_length,
435 #if ! CGEN_INT_INSN_P
438 bfd_vma pc ATTRIBUTE_UNUSED,
444 /* If LENGTH is zero, this operand doesn't contribute to the value
445 so give it a standard value of zero. */
452 if (word_length > 8 * sizeof (CGEN_INSN_INT))
455 /* For architectures with insns smaller than the insn-base-bitsize,
456 word_length may be too big. */
457 if (cd->min_insn_bitsize < cd->base_insn_bitsize)
459 if (word_offset + word_length > total_length)
460 word_length = total_length - word_offset;
463 /* Does the value reside in INSN_VALUE, and at the right alignment? */
465 if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length))
467 if (CGEN_INSN_LSB0_P)
468 value = insn_value >> ((word_offset + start + 1) - length);
470 value = insn_value >> (total_length - ( word_offset + start + length));
473 #if ! CGEN_INT_INSN_P
477 unsigned char *bufp = ex_info->insn_bytes + word_offset / 8;
479 if (word_length > 8 * sizeof (CGEN_INSN_INT))
482 if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0)
485 value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc);
488 #endif /* ! CGEN_INT_INSN_P */
490 /* Written this way to avoid undefined behaviour. */
491 mask = (((1L << (length - 1)) - 1) << 1) | 1;
495 if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
496 && (value & (1L << (length - 1))))
504 /* Default insn extractor.
506 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
507 The extracted fields are stored in FIELDS.
508 EX_INFO is used to handle reading variable length insns.
509 Return the length of the insn in bits, or 0 if no match,
510 or -1 if an error occurs fetching data (memory_error_func will have
514 extract_insn_normal (CGEN_CPU_DESC cd,
515 const CGEN_INSN *insn,
516 CGEN_EXTRACT_INFO *ex_info,
517 CGEN_INSN_INT insn_value,
521 const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
522 const CGEN_SYNTAX_CHAR_TYPE *syn;
524 CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
526 CGEN_INIT_EXTRACT (cd);
528 for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
532 if (CGEN_SYNTAX_CHAR_P (*syn))
535 length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
536 ex_info, insn_value, fields, pc);
541 /* We recognized and successfully extracted this insn. */
542 return CGEN_INSN_BITSIZE (insn);
545 /* Machine generated code added here. */
547 const char * m32c_cgen_insert_operand
548 (CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
550 /* Main entry point for operand insertion.
552 This function is basically just a big switch statement. Earlier versions
553 used tables to look up the function to use, but
554 - if the table contains both assembler and disassembler functions then
555 the disassembler contains much of the assembler and vice-versa,
556 - there's a lot of inlining possibilities as things grow,
557 - using a switch statement avoids the function call overhead.
559 This function could be moved into `parse_insn_normal', but keeping it
560 separate makes clear the interface between `parse_insn_normal' and each of
561 the handlers. It's also needed by GAS to insert operands that couldn't be
562 resolved during parsing. */
565 m32c_cgen_insert_operand (CGEN_CPU_DESC cd,
567 CGEN_FIELDS * fields,
568 CGEN_INSN_BYTES_PTR buffer,
569 bfd_vma pc ATTRIBUTE_UNUSED)
571 const char * errmsg = NULL;
572 unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
576 case M32C_OPERAND_A0 :
578 case M32C_OPERAND_A1 :
580 case M32C_OPERAND_AN16_PUSH_S :
581 errmsg = insert_normal (cd, fields->f_4_1, 0, 0, 4, 1, 32, total_length, buffer);
583 case M32C_OPERAND_BIT16AN :
584 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
586 case M32C_OPERAND_BIT16RN :
587 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
589 case M32C_OPERAND_BIT3_S :
592 FLD (f_7_1) = ((((FLD (f_imm3_S)) - (1))) & (1));
593 FLD (f_2_2) = ((((UINT) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3));
595 errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
598 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
603 case M32C_OPERAND_BIT32ANPREFIXED :
604 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
606 case M32C_OPERAND_BIT32ANUNPREFIXED :
607 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
609 case M32C_OPERAND_BIT32RNPREFIXED :
611 long value = fields->f_dst32_rn_prefixed_QI;
612 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
613 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
616 case M32C_OPERAND_BIT32RNUNPREFIXED :
618 long value = fields->f_dst32_rn_unprefixed_QI;
619 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
620 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
623 case M32C_OPERAND_BITBASE16_16_S8 :
624 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
626 case M32C_OPERAND_BITBASE16_16_U16 :
628 long value = fields->f_dsp_16_u16;
629 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
630 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
633 case M32C_OPERAND_BITBASE16_16_U8 :
634 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
636 case M32C_OPERAND_BITBASE16_8_U11_S :
639 FLD (f_bitno16_S) = ((FLD (f_bitbase16_u11_S)) & (7));
640 FLD (f_dsp_8_u8) = ((((UINT) (FLD (f_bitbase16_u11_S)) >> (3))) & (255));
642 errmsg = insert_normal (cd, fields->f_bitno16_S, 0, 0, 5, 3, 32, total_length, buffer);
645 errmsg = insert_normal (cd, fields->f_dsp_8_u8, 0, 0, 8, 8, 32, total_length, buffer);
650 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
653 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s11_unprefixed)) & (7));
654 FLD (f_dsp_16_s8) = ((INT) (FLD (f_bitbase32_16_s11_unprefixed)) >> (3));
656 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
659 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
664 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
667 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s19_unprefixed)) & (7));
668 FLD (f_dsp_16_s16) = ((INT) (FLD (f_bitbase32_16_s19_unprefixed)) >> (3));
670 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
674 long value = fields->f_dsp_16_s16;
675 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
676 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
682 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
685 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u11_unprefixed)) & (7));
686 FLD (f_dsp_16_u8) = ((((UINT) (FLD (f_bitbase32_16_u11_unprefixed)) >> (3))) & (255));
688 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
691 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
696 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
699 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u19_unprefixed)) & (7));
700 FLD (f_dsp_16_u16) = ((((UINT) (FLD (f_bitbase32_16_u19_unprefixed)) >> (3))) & (65535));
702 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
706 long value = fields->f_dsp_16_u16;
707 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
708 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
714 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
717 FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u27_unprefixed)) & (7));
718 FLD (f_dsp_16_u16) = ((((UINT) (FLD (f_bitbase32_16_u27_unprefixed)) >> (3))) & (65535));
719 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_bitbase32_16_u27_unprefixed)) >> (19))) & (255));
721 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
725 long value = fields->f_dsp_16_u16;
726 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
727 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
731 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
736 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
739 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s11_prefixed)) & (7));
740 FLD (f_dsp_24_s8) = ((INT) (FLD (f_bitbase32_24_s11_prefixed)) >> (3));
742 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
745 errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
750 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
753 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s19_prefixed)) & (7));
754 FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_s19_prefixed)) >> (3))) & (255));
755 FLD (f_dsp_32_s8) = ((INT) (FLD (f_bitbase32_24_s19_prefixed)) >> (11));
757 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
760 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
763 errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
768 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
771 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u11_prefixed)) & (7));
772 FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_u11_prefixed)) >> (3))) & (255));
774 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
777 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
782 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
785 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u19_prefixed)) & (7));
786 FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_u19_prefixed)) >> (3))) & (255));
787 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_bitbase32_24_u19_prefixed)) >> (11))) & (255));
789 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
792 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
795 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
800 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
803 FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u27_prefixed)) & (7));
804 FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_u27_prefixed)) >> (3))) & (255));
805 FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_bitbase32_24_u27_prefixed)) >> (11))) & (65535));
807 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
810 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
814 long value = fields->f_dsp_32_u16;
815 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
816 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
822 case M32C_OPERAND_BITNO16R :
823 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
825 case M32C_OPERAND_BITNO32PREFIXED :
826 errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
828 case M32C_OPERAND_BITNO32UNPREFIXED :
829 errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
831 case M32C_OPERAND_DSP_10_U6 :
832 errmsg = insert_normal (cd, fields->f_dsp_10_u6, 0, 0, 10, 6, 32, total_length, buffer);
834 case M32C_OPERAND_DSP_16_S16 :
836 long value = fields->f_dsp_16_s16;
837 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
838 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
841 case M32C_OPERAND_DSP_16_S8 :
842 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
844 case M32C_OPERAND_DSP_16_U16 :
846 long value = fields->f_dsp_16_u16;
847 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
848 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
851 case M32C_OPERAND_DSP_16_U20 :
854 FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535));
855 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_16_u24)) >> (16))) & (255));
858 long value = fields->f_dsp_16_u16;
859 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
860 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
864 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
869 case M32C_OPERAND_DSP_16_U24 :
872 FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535));
873 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_16_u24)) >> (16))) & (255));
876 long value = fields->f_dsp_16_u16;
877 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
878 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
882 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
887 case M32C_OPERAND_DSP_16_U8 :
888 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
890 case M32C_OPERAND_DSP_24_S16 :
893 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255));
894 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_24_s16)) >> (8))) & (255));
896 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
899 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
904 case M32C_OPERAND_DSP_24_S8 :
905 errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
907 case M32C_OPERAND_DSP_24_U16 :
910 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u16)) & (255));
911 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_24_u16)) >> (8))) & (255));
913 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
916 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
921 case M32C_OPERAND_DSP_24_U20 :
924 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255));
925 FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_dsp_24_u24)) >> (8))) & (65535));
927 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
931 long value = fields->f_dsp_32_u16;
932 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
933 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
939 case M32C_OPERAND_DSP_24_U24 :
942 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255));
943 FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_dsp_24_u24)) >> (8))) & (65535));
945 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
949 long value = fields->f_dsp_32_u16;
950 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
951 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
957 case M32C_OPERAND_DSP_24_U8 :
958 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
960 case M32C_OPERAND_DSP_32_S16 :
962 long value = fields->f_dsp_32_s16;
963 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
964 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, buffer);
967 case M32C_OPERAND_DSP_32_S8 :
968 errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
970 case M32C_OPERAND_DSP_32_U16 :
972 long value = fields->f_dsp_32_u16;
973 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
974 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
977 case M32C_OPERAND_DSP_32_U20 :
979 long value = fields->f_dsp_32_u24;
980 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
981 errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
984 case M32C_OPERAND_DSP_32_U24 :
986 long value = fields->f_dsp_32_u24;
987 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
988 errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
991 case M32C_OPERAND_DSP_32_U8 :
992 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
994 case M32C_OPERAND_DSP_40_S16 :
996 long value = fields->f_dsp_40_s16;
997 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
998 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, buffer);
1001 case M32C_OPERAND_DSP_40_S8 :
1002 errmsg = insert_normal (cd, fields->f_dsp_40_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, buffer);
1004 case M32C_OPERAND_DSP_40_U16 :
1006 long value = fields->f_dsp_40_u16;
1007 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1008 errmsg = insert_normal (cd, value, 0, 32, 8, 16, 32, total_length, buffer);
1011 case M32C_OPERAND_DSP_40_U20 :
1013 long value = fields->f_dsp_40_u20;
1014 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040))));
1015 errmsg = insert_normal (cd, value, 0, 32, 8, 20, 32, total_length, buffer);
1018 case M32C_OPERAND_DSP_40_U24 :
1020 long value = fields->f_dsp_40_u24;
1021 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
1022 errmsg = insert_normal (cd, value, 0, 32, 8, 24, 32, total_length, buffer);
1025 case M32C_OPERAND_DSP_40_U8 :
1026 errmsg = insert_normal (cd, fields->f_dsp_40_u8, 0, 32, 8, 8, 32, total_length, buffer);
1028 case M32C_OPERAND_DSP_48_S16 :
1030 long value = fields->f_dsp_48_s16;
1031 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1032 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, buffer);
1035 case M32C_OPERAND_DSP_48_S8 :
1036 errmsg = insert_normal (cd, fields->f_dsp_48_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, buffer);
1038 case M32C_OPERAND_DSP_48_U16 :
1040 long value = fields->f_dsp_48_u16;
1041 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1042 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1045 case M32C_OPERAND_DSP_48_U20 :
1048 FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_48_u20)) >> (16))) & (15));
1049 FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_u20)) & (65535));
1052 long value = fields->f_dsp_48_u16;
1053 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1054 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1058 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1063 case M32C_OPERAND_DSP_48_U24 :
1066 FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_48_u24)) >> (16))) & (255));
1067 FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_u24)) & (65535));
1070 long value = fields->f_dsp_48_u16;
1071 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1072 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1076 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1081 case M32C_OPERAND_DSP_48_U8 :
1082 errmsg = insert_normal (cd, fields->f_dsp_48_u8, 0, 32, 16, 8, 32, total_length, buffer);
1084 case M32C_OPERAND_DSP_8_S24 :
1086 long value = fields->f_dsp_8_s24;
1087 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16))));
1088 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 24, 32, total_length, buffer);
1091 case M32C_OPERAND_DSP_8_S8 :
1092 errmsg = insert_normal (cd, fields->f_dsp_8_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, buffer);
1094 case M32C_OPERAND_DSP_8_U16 :
1096 long value = fields->f_dsp_8_u16;
1097 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1098 errmsg = insert_normal (cd, value, 0, 0, 8, 16, 32, total_length, buffer);
1101 case M32C_OPERAND_DSP_8_U24 :
1103 long value = fields->f_dsp_8_u24;
1104 value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
1105 errmsg = insert_normal (cd, value, 0, 0, 8, 24, 32, total_length, buffer);
1108 case M32C_OPERAND_DSP_8_U6 :
1109 errmsg = insert_normal (cd, fields->f_dsp_8_u6, 0, 0, 8, 6, 32, total_length, buffer);
1111 case M32C_OPERAND_DSP_8_U8 :
1112 errmsg = insert_normal (cd, fields->f_dsp_8_u8, 0, 0, 8, 8, 32, total_length, buffer);
1114 case M32C_OPERAND_DST16AN :
1115 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1117 case M32C_OPERAND_DST16AN_S :
1118 errmsg = insert_normal (cd, fields->f_dst16_an_s, 0, 0, 4, 1, 32, total_length, buffer);
1120 case M32C_OPERAND_DST16ANHI :
1121 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1123 case M32C_OPERAND_DST16ANQI :
1124 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1126 case M32C_OPERAND_DST16ANQI_S :
1127 errmsg = insert_normal (cd, fields->f_dst16_rn_QI_s, 0, 0, 5, 1, 32, total_length, buffer);
1129 case M32C_OPERAND_DST16ANSI :
1130 errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
1132 case M32C_OPERAND_DST16RNEXTQI :
1133 errmsg = insert_normal (cd, fields->f_dst16_rn_ext, 0, 0, 14, 1, 32, total_length, buffer);
1135 case M32C_OPERAND_DST16RNHI :
1136 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
1138 case M32C_OPERAND_DST16RNQI :
1139 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
1141 case M32C_OPERAND_DST16RNQI_S :
1142 errmsg = insert_normal (cd, fields->f_dst16_rn_QI_s, 0, 0, 5, 1, 32, total_length, buffer);
1144 case M32C_OPERAND_DST16RNSI :
1145 errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
1147 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
1148 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1150 case M32C_OPERAND_DST32ANPREFIXED :
1151 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1153 case M32C_OPERAND_DST32ANPREFIXEDHI :
1154 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1156 case M32C_OPERAND_DST32ANPREFIXEDQI :
1157 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1159 case M32C_OPERAND_DST32ANPREFIXEDSI :
1160 errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
1162 case M32C_OPERAND_DST32ANUNPREFIXED :
1163 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1165 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
1166 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1168 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
1169 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1171 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
1172 errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1174 case M32C_OPERAND_DST32R0HI_S :
1176 case M32C_OPERAND_DST32R0QI_S :
1178 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
1179 errmsg = insert_normal (cd, fields->f_dst32_rn_ext_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1181 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
1182 errmsg = insert_normal (cd, fields->f_dst32_rn_ext_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
1184 case M32C_OPERAND_DST32RNPREFIXEDHI :
1186 long value = fields->f_dst32_rn_prefixed_HI;
1187 value = ((((value) + (2))) % (4));
1188 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
1191 case M32C_OPERAND_DST32RNPREFIXEDQI :
1193 long value = fields->f_dst32_rn_prefixed_QI;
1194 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
1195 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
1198 case M32C_OPERAND_DST32RNPREFIXEDSI :
1200 long value = fields->f_dst32_rn_prefixed_SI;
1201 value = ((value) + (2));
1202 errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
1205 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
1207 long value = fields->f_dst32_rn_unprefixed_HI;
1208 value = ((((value) + (2))) % (4));
1209 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
1212 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
1214 long value = fields->f_dst32_rn_unprefixed_QI;
1215 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
1216 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
1219 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
1221 long value = fields->f_dst32_rn_unprefixed_SI;
1222 value = ((value) + (2));
1223 errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
1226 case M32C_OPERAND_G :
1228 case M32C_OPERAND_IMM_12_S4 :
1229 errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
1231 case M32C_OPERAND_IMM_12_S4N :
1232 errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
1234 case M32C_OPERAND_IMM_13_U3 :
1235 errmsg = insert_normal (cd, fields->f_imm_13_u3, 0, 0, 13, 3, 32, total_length, buffer);
1237 case M32C_OPERAND_IMM_16_HI :
1239 long value = fields->f_dsp_16_s16;
1240 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1241 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
1244 case M32C_OPERAND_IMM_16_QI :
1245 errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
1247 case M32C_OPERAND_IMM_16_SI :
1250 FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_dsp_16_s32)) >> (16))) & (65535));
1251 FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_s32)) & (65535));
1254 long value = fields->f_dsp_16_u16;
1255 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1256 errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
1261 long value = fields->f_dsp_32_u16;
1262 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1263 errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
1269 case M32C_OPERAND_IMM_20_S4 :
1270 errmsg = insert_normal (cd, fields->f_imm_20_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, buffer);
1272 case M32C_OPERAND_IMM_24_HI :
1275 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255));
1276 FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_24_s16)) >> (8))) & (255));
1278 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1281 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
1286 case M32C_OPERAND_IMM_24_QI :
1287 errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
1289 case M32C_OPERAND_IMM_24_SI :
1292 FLD (f_dsp_32_u24) = ((((UINT) (FLD (f_dsp_24_s32)) >> (8))) & (16777215));
1293 FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s32)) & (255));
1295 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1299 long value = fields->f_dsp_32_u24;
1300 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
1301 errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
1307 case M32C_OPERAND_IMM_32_HI :
1309 long value = fields->f_dsp_32_s16;
1310 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1311 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, buffer);
1314 case M32C_OPERAND_IMM_32_QI :
1315 errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
1317 case M32C_OPERAND_IMM_32_SI :
1319 long value = fields->f_dsp_32_s32;
1320 value = EXTSISI (((((((((UINT) (value) >> (24))) & (255))) | (((((UINT) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000)))))));
1321 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 32, 32, total_length, buffer);
1324 case M32C_OPERAND_IMM_40_HI :
1326 long value = fields->f_dsp_40_s16;
1327 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1328 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, buffer);
1331 case M32C_OPERAND_IMM_40_QI :
1332 errmsg = insert_normal (cd, fields->f_dsp_40_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, buffer);
1334 case M32C_OPERAND_IMM_40_SI :
1337 FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_40_s32)) >> (24))) & (255));
1338 FLD (f_dsp_40_u24) = ((FLD (f_dsp_40_s32)) & (16777215));
1341 long value = fields->f_dsp_40_u24;
1342 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
1343 errmsg = insert_normal (cd, value, 0, 32, 8, 24, 32, total_length, buffer);
1347 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1352 case M32C_OPERAND_IMM_48_HI :
1354 long value = fields->f_dsp_48_s16;
1355 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1356 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, buffer);
1359 case M32C_OPERAND_IMM_48_QI :
1360 errmsg = insert_normal (cd, fields->f_dsp_48_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, buffer);
1362 case M32C_OPERAND_IMM_48_SI :
1365 FLD (f_dsp_64_u16) = ((((UINT) (FLD (f_dsp_48_s32)) >> (16))) & (65535));
1366 FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_s32)) & (65535));
1369 long value = fields->f_dsp_48_u16;
1370 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1371 errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
1376 long value = fields->f_dsp_64_u16;
1377 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1378 errmsg = insert_normal (cd, value, 0, 64, 0, 16, 32, total_length, buffer);
1384 case M32C_OPERAND_IMM_56_HI :
1387 FLD (f_dsp_56_u8) = ((FLD (f_dsp_56_s16)) & (255));
1388 FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_56_s16)) >> (8))) & (255));
1390 errmsg = insert_normal (cd, fields->f_dsp_56_u8, 0, 32, 24, 8, 32, total_length, buffer);
1393 errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
1398 case M32C_OPERAND_IMM_56_QI :
1399 errmsg = insert_normal (cd, fields->f_dsp_56_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 24, 8, 32, total_length, buffer);
1401 case M32C_OPERAND_IMM_64_HI :
1403 long value = fields->f_dsp_64_s16;
1404 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1405 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 64, 0, 16, 32, total_length, buffer);
1408 case M32C_OPERAND_IMM_8_HI :
1410 long value = fields->f_dsp_8_s16;
1411 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1412 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 16, 32, total_length, buffer);
1415 case M32C_OPERAND_IMM_8_QI :
1416 errmsg = insert_normal (cd, fields->f_dsp_8_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, buffer);
1418 case M32C_OPERAND_IMM_8_S4 :
1419 errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
1421 case M32C_OPERAND_IMM_8_S4N :
1422 errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
1424 case M32C_OPERAND_IMM_SH_12_S4 :
1425 errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
1427 case M32C_OPERAND_IMM_SH_20_S4 :
1428 errmsg = insert_normal (cd, fields->f_imm_20_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, buffer);
1430 case M32C_OPERAND_IMM_SH_8_S4 :
1431 errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
1433 case M32C_OPERAND_IMM1_S :
1435 long value = fields->f_imm1_S;
1436 value = ((value) - (1));
1437 errmsg = insert_normal (cd, value, 0, 0, 2, 1, 32, total_length, buffer);
1440 case M32C_OPERAND_IMM3_S :
1443 FLD (f_7_1) = ((((FLD (f_imm3_S)) - (1))) & (1));
1444 FLD (f_2_2) = ((((UINT) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3));
1446 errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
1449 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
1454 case M32C_OPERAND_LAB_16_8 :
1456 long value = fields->f_lab_16_8;
1457 value = ((value) - (((pc) + (2))));
1458 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 8, 32, total_length, buffer);
1461 case M32C_OPERAND_LAB_24_8 :
1463 long value = fields->f_lab_24_8;
1464 value = ((value) - (((pc) + (2))));
1465 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 24, 8, 32, total_length, buffer);
1468 case M32C_OPERAND_LAB_32_8 :
1470 long value = fields->f_lab_32_8;
1471 value = ((value) - (((pc) + (2))));
1472 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 0, 8, 32, total_length, buffer);
1475 case M32C_OPERAND_LAB_40_8 :
1477 long value = fields->f_lab_40_8;
1478 value = ((value) - (((pc) + (2))));
1479 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 8, 8, 32, total_length, buffer);
1482 case M32C_OPERAND_LAB_5_3 :
1484 long value = fields->f_lab_5_3;
1485 value = ((value) - (((pc) + (2))));
1486 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 3, 32, total_length, buffer);
1489 case M32C_OPERAND_LAB_8_16 :
1491 long value = fields->f_lab_8_16;
1492 value = ((((((((value) - (((pc) + (1))))) & (255))) << (8))) | (((USI) (((((value) - (((pc) + (1))))) & (65535))) >> (8))));
1493 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGN_OPT)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 16, 32, total_length, buffer);
1496 case M32C_OPERAND_LAB_8_24 :
1498 long value = fields->f_lab_8_24;
1499 value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
1500 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 24, 32, total_length, buffer);
1503 case M32C_OPERAND_LAB_8_8 :
1505 long value = fields->f_lab_8_8;
1506 value = ((value) - (((pc) + (1))));
1507 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 8, 32, total_length, buffer);
1510 case M32C_OPERAND_LAB32_JMP_S :
1514 tmp_val = ((((FLD (f_lab32_jmp_s)) - (pc))) - (2));
1515 FLD (f_7_1) = ((tmp_val) & (1));
1516 FLD (f_2_2) = ((USI) (tmp_val) >> (1));
1518 errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
1521 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
1526 case M32C_OPERAND_Q :
1528 case M32C_OPERAND_R0 :
1530 case M32C_OPERAND_R0H :
1532 case M32C_OPERAND_R0L :
1534 case M32C_OPERAND_R1 :
1536 case M32C_OPERAND_R1R2R0 :
1538 case M32C_OPERAND_R2 :
1540 case M32C_OPERAND_R2R0 :
1542 case M32C_OPERAND_R3 :
1544 case M32C_OPERAND_R3R1 :
1546 case M32C_OPERAND_REGSETPOP :
1547 errmsg = insert_normal (cd, fields->f_8_8, 0, 0, 8, 8, 32, total_length, buffer);
1549 case M32C_OPERAND_REGSETPUSH :
1550 errmsg = insert_normal (cd, fields->f_8_8, 0, 0, 8, 8, 32, total_length, buffer);
1552 case M32C_OPERAND_RN16_PUSH_S :
1553 errmsg = insert_normal (cd, fields->f_4_1, 0, 0, 4, 1, 32, total_length, buffer);
1555 case M32C_OPERAND_S :
1557 case M32C_OPERAND_SRC16AN :
1558 errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
1560 case M32C_OPERAND_SRC16ANHI :
1561 errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
1563 case M32C_OPERAND_SRC16ANQI :
1564 errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
1566 case M32C_OPERAND_SRC16RNHI :
1567 errmsg = insert_normal (cd, fields->f_src16_rn, 0, 0, 10, 2, 32, total_length, buffer);
1569 case M32C_OPERAND_SRC16RNQI :
1570 errmsg = insert_normal (cd, fields->f_src16_rn, 0, 0, 10, 2, 32, total_length, buffer);
1572 case M32C_OPERAND_SRC32ANPREFIXED :
1573 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1575 case M32C_OPERAND_SRC32ANPREFIXEDHI :
1576 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1578 case M32C_OPERAND_SRC32ANPREFIXEDQI :
1579 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1581 case M32C_OPERAND_SRC32ANPREFIXEDSI :
1582 errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
1584 case M32C_OPERAND_SRC32ANUNPREFIXED :
1585 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1587 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
1588 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1590 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
1591 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1593 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
1594 errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
1596 case M32C_OPERAND_SRC32RNPREFIXEDHI :
1598 long value = fields->f_src32_rn_prefixed_HI;
1599 value = ((((value) + (2))) % (4));
1600 errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
1603 case M32C_OPERAND_SRC32RNPREFIXEDQI :
1605 long value = fields->f_src32_rn_prefixed_QI;
1606 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
1607 errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
1610 case M32C_OPERAND_SRC32RNPREFIXEDSI :
1612 long value = fields->f_src32_rn_prefixed_SI;
1613 value = ((value) + (2));
1614 errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
1617 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
1619 long value = fields->f_src32_rn_unprefixed_HI;
1620 value = ((((value) + (2))) % (4));
1621 errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
1624 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
1626 long value = fields->f_src32_rn_unprefixed_QI;
1627 value = (((((((~ (value))) << (1))) & (2))) | (((((USI) (value) >> (1))) & (1))));
1628 errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
1631 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
1633 long value = fields->f_src32_rn_unprefixed_SI;
1634 value = ((value) + (2));
1635 errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
1638 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
1639 errmsg = insert_normal (cd, fields->f_5_1, 0, 0, 5, 1, 32, total_length, buffer);
1641 case M32C_OPERAND_X :
1643 case M32C_OPERAND_Z :
1645 case M32C_OPERAND_COND16_16 :
1646 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
1648 case M32C_OPERAND_COND16_24 :
1649 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1651 case M32C_OPERAND_COND16_32 :
1652 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
1654 case M32C_OPERAND_COND16C :
1655 errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
1657 case M32C_OPERAND_COND16J :
1658 errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
1660 case M32C_OPERAND_COND16J5 :
1661 errmsg = insert_normal (cd, fields->f_cond16j_5, 0, 0, 5, 3, 32, total_length, buffer);
1663 case M32C_OPERAND_COND32 :
1666 FLD (f_9_1) = ((((UINT) (FLD (f_cond32)) >> (3))) & (1));
1667 FLD (f_13_3) = ((FLD (f_cond32)) & (7));
1669 errmsg = insert_normal (cd, fields->f_9_1, 0, 0, 9, 1, 32, total_length, buffer);
1672 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1677 case M32C_OPERAND_COND32_16 :
1678 errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
1680 case M32C_OPERAND_COND32_24 :
1681 errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
1683 case M32C_OPERAND_COND32_32 :
1684 errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
1686 case M32C_OPERAND_COND32_40 :
1687 errmsg = insert_normal (cd, fields->f_dsp_40_u8, 0, 32, 8, 8, 32, total_length, buffer);
1689 case M32C_OPERAND_COND32J :
1692 FLD (f_1_3) = ((((UINT) (FLD (f_cond32j)) >> (1))) & (7));
1693 FLD (f_7_1) = ((FLD (f_cond32j)) & (1));
1695 errmsg = insert_normal (cd, fields->f_1_3, 0, 0, 1, 3, 32, total_length, buffer);
1698 errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
1703 case M32C_OPERAND_CR1_PREFIXED_32 :
1704 errmsg = insert_normal (cd, fields->f_21_3, 0, 0, 21, 3, 32, total_length, buffer);
1706 case M32C_OPERAND_CR1_UNPREFIXED_32 :
1707 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1709 case M32C_OPERAND_CR16 :
1710 errmsg = insert_normal (cd, fields->f_9_3, 0, 0, 9, 3, 32, total_length, buffer);
1712 case M32C_OPERAND_CR2_32 :
1713 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1715 case M32C_OPERAND_CR3_PREFIXED_32 :
1716 errmsg = insert_normal (cd, fields->f_21_3, 0, 0, 21, 3, 32, total_length, buffer);
1718 case M32C_OPERAND_CR3_UNPREFIXED_32 :
1719 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1721 case M32C_OPERAND_FLAGS16 :
1722 errmsg = insert_normal (cd, fields->f_9_3, 0, 0, 9, 3, 32, total_length, buffer);
1724 case M32C_OPERAND_FLAGS32 :
1725 errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
1727 case M32C_OPERAND_SCCOND32 :
1728 errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
1730 case M32C_OPERAND_SIZE :
1734 /* xgettext:c-format */
1735 fprintf (stderr, _("Unrecognized field %d while building insn.\n"),
1743 int m32c_cgen_extract_operand
1744 (CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
1746 /* Main entry point for operand extraction.
1747 The result is <= 0 for error, >0 for success.
1748 ??? Actual values aren't well defined right now.
1750 This function is basically just a big switch statement. Earlier versions
1751 used tables to look up the function to use, but
1752 - if the table contains both assembler and disassembler functions then
1753 the disassembler contains much of the assembler and vice-versa,
1754 - there's a lot of inlining possibilities as things grow,
1755 - using a switch statement avoids the function call overhead.
1757 This function could be moved into `print_insn_normal', but keeping it
1758 separate makes clear the interface between `print_insn_normal' and each of
1762 m32c_cgen_extract_operand (CGEN_CPU_DESC cd,
1764 CGEN_EXTRACT_INFO *ex_info,
1765 CGEN_INSN_INT insn_value,
1766 CGEN_FIELDS * fields,
1769 /* Assume success (for those operands that are nops). */
1771 unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
1775 case M32C_OPERAND_A0 :
1777 case M32C_OPERAND_A1 :
1779 case M32C_OPERAND_AN16_PUSH_S :
1780 length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_4_1);
1782 case M32C_OPERAND_BIT16AN :
1783 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
1785 case M32C_OPERAND_BIT16RN :
1786 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
1788 case M32C_OPERAND_BIT3_S :
1790 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
1791 if (length <= 0) break;
1792 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
1793 if (length <= 0) break;
1795 FLD (f_imm3_S) = ((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (1));
1799 case M32C_OPERAND_BIT32ANPREFIXED :
1800 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
1802 case M32C_OPERAND_BIT32ANUNPREFIXED :
1803 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
1805 case M32C_OPERAND_BIT32RNPREFIXED :
1808 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
1809 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
1810 fields->f_dst32_rn_prefixed_QI = value;
1813 case M32C_OPERAND_BIT32RNUNPREFIXED :
1816 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
1817 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
1818 fields->f_dst32_rn_unprefixed_QI = value;
1821 case M32C_OPERAND_BITBASE16_16_S8 :
1822 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);
1824 case M32C_OPERAND_BITBASE16_16_U16 :
1827 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1828 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1829 fields->f_dsp_16_u16 = value;
1832 case M32C_OPERAND_BITBASE16_16_U8 :
1833 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1835 case M32C_OPERAND_BITBASE16_8_U11_S :
1837 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_bitno16_S);
1838 if (length <= 0) break;
1839 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_u8);
1840 if (length <= 0) break;
1842 FLD (f_bitbase16_u11_S) = ((((FLD (f_dsp_8_u8)) << (3))) | (FLD (f_bitno16_S)));
1846 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
1848 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1849 if (length <= 0) break;
1850 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);
1851 if (length <= 0) break;
1853 FLD (f_bitbase32_16_s11_unprefixed) = ((((FLD (f_dsp_16_s8)) << (3))) | (FLD (f_bitno32_unprefixed)));
1857 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
1859 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1860 if (length <= 0) break;
1863 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
1864 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
1865 fields->f_dsp_16_s16 = value;
1867 if (length <= 0) break;
1869 FLD (f_bitbase32_16_s19_unprefixed) = ((((FLD (f_dsp_16_s16)) << (3))) | (FLD (f_bitno32_unprefixed)));
1873 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
1875 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1876 if (length <= 0) break;
1877 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1878 if (length <= 0) break;
1880 FLD (f_bitbase32_16_u11_unprefixed) = ((((FLD (f_dsp_16_u8)) << (3))) | (FLD (f_bitno32_unprefixed)));
1884 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
1886 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1887 if (length <= 0) break;
1890 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1891 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1892 fields->f_dsp_16_u16 = value;
1894 if (length <= 0) break;
1896 FLD (f_bitbase32_16_u19_unprefixed) = ((((FLD (f_dsp_16_u16)) << (3))) | (FLD (f_bitno32_unprefixed)));
1900 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
1902 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1903 if (length <= 0) break;
1906 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
1907 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1908 fields->f_dsp_16_u16 = value;
1910 if (length <= 0) break;
1911 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
1912 if (length <= 0) break;
1914 FLD (f_bitbase32_16_u27_unprefixed) = ((((FLD (f_dsp_16_u16)) << (3))) | (((((FLD (f_dsp_32_u8)) << (19))) | (FLD (f_bitno32_unprefixed)))));
1918 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
1920 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1921 if (length <= 0) break;
1922 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);
1923 if (length <= 0) break;
1925 FLD (f_bitbase32_24_s11_prefixed) = ((((FLD (f_dsp_24_s8)) << (3))) | (FLD (f_bitno32_prefixed)));
1929 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
1931 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1932 if (length <= 0) break;
1933 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1934 if (length <= 0) break;
1935 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);
1936 if (length <= 0) break;
1938 FLD (f_bitbase32_24_s19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_s8)) << (11))) | (FLD (f_bitno32_prefixed)))));
1942 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
1944 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1945 if (length <= 0) break;
1946 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1947 if (length <= 0) break;
1949 FLD (f_bitbase32_24_u11_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (FLD (f_bitno32_prefixed)));
1953 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
1955 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1956 if (length <= 0) break;
1957 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1958 if (length <= 0) break;
1959 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
1960 if (length <= 0) break;
1962 FLD (f_bitbase32_24_u19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_u8)) << (11))) | (FLD (f_bitno32_prefixed)))));
1966 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
1968 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1969 if (length <= 0) break;
1970 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
1971 if (length <= 0) break;
1974 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
1975 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
1976 fields->f_dsp_32_u16 = value;
1978 if (length <= 0) break;
1980 FLD (f_bitbase32_24_u27_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_u16)) << (11))) | (FLD (f_bitno32_prefixed)))));
1984 case M32C_OPERAND_BITNO16R :
1985 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
1987 case M32C_OPERAND_BITNO32PREFIXED :
1988 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
1990 case M32C_OPERAND_BITNO32UNPREFIXED :
1991 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
1993 case M32C_OPERAND_DSP_10_U6 :
1994 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 6, 32, total_length, pc, & fields->f_dsp_10_u6);
1996 case M32C_OPERAND_DSP_16_S16 :
1999 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
2000 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2001 fields->f_dsp_16_s16 = value;
2004 case M32C_OPERAND_DSP_16_S8 :
2005 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);
2007 case M32C_OPERAND_DSP_16_U16 :
2010 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
2011 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2012 fields->f_dsp_16_u16 = value;
2015 case M32C_OPERAND_DSP_16_U20 :
2019 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
2020 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2021 fields->f_dsp_16_u16 = value;
2023 if (length <= 0) break;
2024 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2025 if (length <= 0) break;
2027 FLD (f_dsp_16_u24) = ((((FLD (f_dsp_32_u8)) << (16))) | (FLD (f_dsp_16_u16)));
2031 case M32C_OPERAND_DSP_16_U24 :
2035 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
2036 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2037 fields->f_dsp_16_u16 = value;
2039 if (length <= 0) break;
2040 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2041 if (length <= 0) break;
2043 FLD (f_dsp_16_u24) = ((((FLD (f_dsp_32_u8)) << (16))) | (FLD (f_dsp_16_u16)));
2047 case M32C_OPERAND_DSP_16_U8 :
2048 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
2050 case M32C_OPERAND_DSP_24_S16 :
2052 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2053 if (length <= 0) break;
2054 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2055 if (length <= 0) break;
2057 FLD (f_dsp_24_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8))))));
2061 case M32C_OPERAND_DSP_24_S8 :
2062 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);
2064 case M32C_OPERAND_DSP_24_U16 :
2066 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2067 if (length <= 0) break;
2068 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2069 if (length <= 0) break;
2071 FLD (f_dsp_24_u16) = ((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8)));
2075 case M32C_OPERAND_DSP_24_U20 :
2077 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2078 if (length <= 0) break;
2081 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2082 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2083 fields->f_dsp_32_u16 = value;
2085 if (length <= 0) break;
2087 FLD (f_dsp_24_u24) = ((((FLD (f_dsp_32_u16)) << (8))) | (FLD (f_dsp_24_u8)));
2091 case M32C_OPERAND_DSP_24_U24 :
2093 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2094 if (length <= 0) break;
2097 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2098 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2099 fields->f_dsp_32_u16 = value;
2101 if (length <= 0) break;
2103 FLD (f_dsp_24_u24) = ((((FLD (f_dsp_32_u16)) << (8))) | (FLD (f_dsp_24_u8)));
2107 case M32C_OPERAND_DSP_24_U8 :
2108 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2110 case M32C_OPERAND_DSP_32_S16 :
2113 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value);
2114 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2115 fields->f_dsp_32_s16 = value;
2118 case M32C_OPERAND_DSP_32_S8 :
2119 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);
2121 case M32C_OPERAND_DSP_32_U16 :
2124 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2125 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2126 fields->f_dsp_32_u16 = value;
2129 case M32C_OPERAND_DSP_32_U20 :
2132 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
2133 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2134 fields->f_dsp_32_u24 = value;
2137 case M32C_OPERAND_DSP_32_U24 :
2140 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
2141 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2142 fields->f_dsp_32_u24 = value;
2145 case M32C_OPERAND_DSP_32_U8 :
2146 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2148 case M32C_OPERAND_DSP_40_S16 :
2151 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, pc, & value);
2152 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2153 fields->f_dsp_40_s16 = value;
2156 case M32C_OPERAND_DSP_40_S8 :
2157 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);
2159 case M32C_OPERAND_DSP_40_U16 :
2162 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 16, 32, total_length, pc, & value);
2163 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2164 fields->f_dsp_40_u16 = value;
2167 case M32C_OPERAND_DSP_40_U20 :
2170 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 20, 32, total_length, pc, & value);
2171 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040))));
2172 fields->f_dsp_40_u20 = value;
2175 case M32C_OPERAND_DSP_40_U24 :
2178 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value);
2179 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2180 fields->f_dsp_40_u24 = value;
2183 case M32C_OPERAND_DSP_40_U8 :
2184 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_u8);
2186 case M32C_OPERAND_DSP_48_S16 :
2189 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, pc, & value);
2190 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2191 fields->f_dsp_48_s16 = value;
2194 case M32C_OPERAND_DSP_48_S8 :
2195 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);
2197 case M32C_OPERAND_DSP_48_U16 :
2200 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2201 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2202 fields->f_dsp_48_u16 = value;
2205 case M32C_OPERAND_DSP_48_U20 :
2209 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2210 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2211 fields->f_dsp_48_u16 = value;
2213 if (length <= 0) break;
2214 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2215 if (length <= 0) break;
2217 FLD (f_dsp_48_u20) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u8)) << (16))) & (983040))));
2221 case M32C_OPERAND_DSP_48_U24 :
2225 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2226 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2227 fields->f_dsp_48_u16 = value;
2229 if (length <= 0) break;
2230 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2231 if (length <= 0) break;
2233 FLD (f_dsp_48_u24) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u8)) << (16))) & (16711680))));
2237 case M32C_OPERAND_DSP_48_U8 :
2238 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 8, 32, total_length, pc, & fields->f_dsp_48_u8);
2240 case M32C_OPERAND_DSP_8_S24 :
2243 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 24, 32, total_length, pc, & value);
2244 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16))));
2245 fields->f_dsp_8_s24 = value;
2248 case M32C_OPERAND_DSP_8_S8 :
2249 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);
2251 case M32C_OPERAND_DSP_8_U16 :
2254 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 16, 32, total_length, pc, & value);
2255 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2256 fields->f_dsp_8_u16 = value;
2259 case M32C_OPERAND_DSP_8_U24 :
2262 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 24, 32, total_length, pc, & value);
2263 value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
2264 fields->f_dsp_8_u24 = value;
2267 case M32C_OPERAND_DSP_8_U6 :
2268 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 6, 32, total_length, pc, & fields->f_dsp_8_u6);
2270 case M32C_OPERAND_DSP_8_U8 :
2271 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_u8);
2273 case M32C_OPERAND_DST16AN :
2274 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2276 case M32C_OPERAND_DST16AN_S :
2277 length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_dst16_an_s);
2279 case M32C_OPERAND_DST16ANHI :
2280 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2282 case M32C_OPERAND_DST16ANQI :
2283 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2285 case M32C_OPERAND_DST16ANQI_S :
2286 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_dst16_rn_QI_s);
2288 case M32C_OPERAND_DST16ANSI :
2289 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
2291 case M32C_OPERAND_DST16RNEXTQI :
2292 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 1, 32, total_length, pc, & fields->f_dst16_rn_ext);
2294 case M32C_OPERAND_DST16RNHI :
2295 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
2297 case M32C_OPERAND_DST16RNQI :
2298 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
2300 case M32C_OPERAND_DST16RNQI_S :
2301 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_dst16_rn_QI_s);
2303 case M32C_OPERAND_DST16RNSI :
2304 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
2306 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
2307 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2309 case M32C_OPERAND_DST32ANPREFIXED :
2310 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2312 case M32C_OPERAND_DST32ANPREFIXEDHI :
2313 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2315 case M32C_OPERAND_DST32ANPREFIXEDQI :
2316 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2318 case M32C_OPERAND_DST32ANPREFIXEDSI :
2319 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
2321 case M32C_OPERAND_DST32ANUNPREFIXED :
2322 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2324 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
2325 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2327 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
2328 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2330 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
2331 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
2333 case M32C_OPERAND_DST32R0HI_S :
2335 case M32C_OPERAND_DST32R0QI_S :
2337 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
2338 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_rn_ext_unprefixed);
2340 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
2341 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_rn_ext_unprefixed);
2343 case M32C_OPERAND_DST32RNPREFIXEDHI :
2346 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
2347 value = ((((value) + (2))) % (4));
2348 fields->f_dst32_rn_prefixed_HI = value;
2351 case M32C_OPERAND_DST32RNPREFIXEDQI :
2354 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
2355 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2356 fields->f_dst32_rn_prefixed_QI = value;
2359 case M32C_OPERAND_DST32RNPREFIXEDSI :
2362 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
2363 value = ((value) - (2));
2364 fields->f_dst32_rn_prefixed_SI = value;
2367 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
2370 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
2371 value = ((((value) + (2))) % (4));
2372 fields->f_dst32_rn_unprefixed_HI = value;
2375 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
2378 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
2379 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2380 fields->f_dst32_rn_unprefixed_QI = value;
2383 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
2386 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
2387 value = ((value) - (2));
2388 fields->f_dst32_rn_unprefixed_SI = value;
2391 case M32C_OPERAND_G :
2393 case M32C_OPERAND_IMM_12_S4 :
2394 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);
2396 case M32C_OPERAND_IMM_12_S4N :
2397 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);
2399 case M32C_OPERAND_IMM_13_U3 :
2400 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_imm_13_u3);
2402 case M32C_OPERAND_IMM_16_HI :
2405 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
2406 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2407 fields->f_dsp_16_s16 = value;
2410 case M32C_OPERAND_IMM_16_QI :
2411 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);
2413 case M32C_OPERAND_IMM_16_SI :
2417 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
2418 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2419 fields->f_dsp_16_u16 = value;
2421 if (length <= 0) break;
2424 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
2425 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2426 fields->f_dsp_32_u16 = value;
2428 if (length <= 0) break;
2430 FLD (f_dsp_16_s32) = ((((FLD (f_dsp_16_u16)) & (65535))) | (((((FLD (f_dsp_32_u16)) << (16))) & (0xffff0000))));
2434 case M32C_OPERAND_IMM_20_S4 :
2435 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);
2437 case M32C_OPERAND_IMM_24_HI :
2439 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2440 if (length <= 0) break;
2441 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2442 if (length <= 0) break;
2444 FLD (f_dsp_24_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8))))));
2448 case M32C_OPERAND_IMM_24_QI :
2449 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);
2451 case M32C_OPERAND_IMM_24_SI :
2453 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2454 if (length <= 0) break;
2457 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
2458 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2459 fields->f_dsp_32_u24 = value;
2461 if (length <= 0) break;
2463 FLD (f_dsp_24_s32) = ((((FLD (f_dsp_24_u8)) & (255))) | (((((FLD (f_dsp_32_u24)) << (8))) & (0xffffff00))));
2467 case M32C_OPERAND_IMM_32_HI :
2470 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value);
2471 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2472 fields->f_dsp_32_s16 = value;
2475 case M32C_OPERAND_IMM_32_QI :
2476 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);
2478 case M32C_OPERAND_IMM_32_SI :
2481 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 32, 32, total_length, pc, & value);
2482 value = EXTSISI (((((((((UINT) (value) >> (24))) & (255))) | (((((UINT) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000)))))));
2483 fields->f_dsp_32_s32 = value;
2486 case M32C_OPERAND_IMM_40_HI :
2489 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, pc, & value);
2490 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2491 fields->f_dsp_40_s16 = value;
2494 case M32C_OPERAND_IMM_40_QI :
2495 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);
2497 case M32C_OPERAND_IMM_40_SI :
2501 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value);
2502 value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
2503 fields->f_dsp_40_u24 = value;
2505 if (length <= 0) break;
2506 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2507 if (length <= 0) break;
2509 FLD (f_dsp_40_s32) = ((((FLD (f_dsp_40_u24)) & (16777215))) | (((((FLD (f_dsp_64_u8)) << (24))) & (0xff000000))));
2513 case M32C_OPERAND_IMM_48_HI :
2516 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, pc, & value);
2517 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2518 fields->f_dsp_48_s16 = value;
2521 case M32C_OPERAND_IMM_48_QI :
2522 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);
2524 case M32C_OPERAND_IMM_48_SI :
2528 length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
2529 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2530 fields->f_dsp_48_u16 = value;
2532 if (length <= 0) break;
2535 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 16, 32, total_length, pc, & value);
2536 value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
2537 fields->f_dsp_64_u16 = value;
2539 if (length <= 0) break;
2541 FLD (f_dsp_48_s32) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u16)) << (16))) & (0xffff0000))));
2545 case M32C_OPERAND_IMM_56_HI :
2547 length = extract_normal (cd, ex_info, insn_value, 0, 32, 24, 8, 32, total_length, pc, & fields->f_dsp_56_u8);
2548 if (length <= 0) break;
2549 length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
2550 if (length <= 0) break;
2552 FLD (f_dsp_56_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_64_u8)) << (8))) | (FLD (f_dsp_56_u8))))));
2556 case M32C_OPERAND_IMM_56_QI :
2557 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);
2559 case M32C_OPERAND_IMM_64_HI :
2562 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 64, 0, 16, 32, total_length, pc, & value);
2563 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2564 fields->f_dsp_64_s16 = value;
2567 case M32C_OPERAND_IMM_8_HI :
2570 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 16, 32, total_length, pc, & value);
2571 value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
2572 fields->f_dsp_8_s16 = value;
2575 case M32C_OPERAND_IMM_8_QI :
2576 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);
2578 case M32C_OPERAND_IMM_8_S4 :
2579 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);
2581 case M32C_OPERAND_IMM_8_S4N :
2582 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);
2584 case M32C_OPERAND_IMM_SH_12_S4 :
2585 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);
2587 case M32C_OPERAND_IMM_SH_20_S4 :
2588 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);
2590 case M32C_OPERAND_IMM_SH_8_S4 :
2591 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);
2593 case M32C_OPERAND_IMM1_S :
2596 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 1, 32, total_length, pc, & value);
2597 value = ((value) + (1));
2598 fields->f_imm1_S = value;
2601 case M32C_OPERAND_IMM3_S :
2603 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
2604 if (length <= 0) break;
2605 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
2606 if (length <= 0) break;
2608 FLD (f_imm3_S) = ((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (1));
2612 case M32C_OPERAND_LAB_16_8 :
2615 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);
2616 value = ((value) + (((pc) + (2))));
2617 fields->f_lab_16_8 = value;
2620 case M32C_OPERAND_LAB_24_8 :
2623 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);
2624 value = ((value) + (((pc) + (2))));
2625 fields->f_lab_24_8 = value;
2628 case M32C_OPERAND_LAB_32_8 :
2631 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);
2632 value = ((value) + (((pc) + (2))));
2633 fields->f_lab_32_8 = value;
2636 case M32C_OPERAND_LAB_40_8 :
2639 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);
2640 value = ((value) + (((pc) + (2))));
2641 fields->f_lab_40_8 = value;
2644 case M32C_OPERAND_LAB_5_3 :
2647 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 3, 32, total_length, pc, & value);
2648 value = ((value) + (((pc) + (2))));
2649 fields->f_lab_5_3 = value;
2652 case M32C_OPERAND_LAB_8_16 :
2655 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);
2656 value = ((((((USI) (((value) & (65535))) >> (8))) | (((SI) (((((value) & (255))) << (24))) >> (16))))) + (((pc) + (1))));
2657 fields->f_lab_8_16 = value;
2660 case M32C_OPERAND_LAB_8_24 :
2663 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 24, 32, total_length, pc, & value);
2664 value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
2665 fields->f_lab_8_24 = value;
2668 case M32C_OPERAND_LAB_8_8 :
2671 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);
2672 value = ((value) + (((pc) + (1))));
2673 fields->f_lab_8_8 = value;
2676 case M32C_OPERAND_LAB32_JMP_S :
2678 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
2679 if (length <= 0) break;
2680 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
2681 if (length <= 0) break;
2683 FLD (f_lab32_jmp_s) = ((pc) + (((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (2))));
2687 case M32C_OPERAND_Q :
2689 case M32C_OPERAND_R0 :
2691 case M32C_OPERAND_R0H :
2693 case M32C_OPERAND_R0L :
2695 case M32C_OPERAND_R1 :
2697 case M32C_OPERAND_R1R2R0 :
2699 case M32C_OPERAND_R2 :
2701 case M32C_OPERAND_R2R0 :
2703 case M32C_OPERAND_R3 :
2705 case M32C_OPERAND_R3R1 :
2707 case M32C_OPERAND_REGSETPOP :
2708 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_8_8);
2710 case M32C_OPERAND_REGSETPUSH :
2711 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_8_8);
2713 case M32C_OPERAND_RN16_PUSH_S :
2714 length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_4_1);
2716 case M32C_OPERAND_S :
2718 case M32C_OPERAND_SRC16AN :
2719 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
2721 case M32C_OPERAND_SRC16ANHI :
2722 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
2724 case M32C_OPERAND_SRC16ANQI :
2725 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
2727 case M32C_OPERAND_SRC16RNHI :
2728 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_src16_rn);
2730 case M32C_OPERAND_SRC16RNQI :
2731 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_src16_rn);
2733 case M32C_OPERAND_SRC32ANPREFIXED :
2734 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2736 case M32C_OPERAND_SRC32ANPREFIXEDHI :
2737 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2739 case M32C_OPERAND_SRC32ANPREFIXEDQI :
2740 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2742 case M32C_OPERAND_SRC32ANPREFIXEDSI :
2743 length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
2745 case M32C_OPERAND_SRC32ANUNPREFIXED :
2746 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2748 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
2749 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2751 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
2752 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2754 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
2755 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
2757 case M32C_OPERAND_SRC32RNPREFIXEDHI :
2760 length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
2761 value = ((((value) + (2))) % (4));
2762 fields->f_src32_rn_prefixed_HI = value;
2765 case M32C_OPERAND_SRC32RNPREFIXEDQI :
2768 length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
2769 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2770 fields->f_src32_rn_prefixed_QI = value;
2773 case M32C_OPERAND_SRC32RNPREFIXEDSI :
2776 length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
2777 value = ((value) - (2));
2778 fields->f_src32_rn_prefixed_SI = value;
2781 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
2784 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
2785 value = ((((value) + (2))) % (4));
2786 fields->f_src32_rn_unprefixed_HI = value;
2789 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
2792 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
2793 value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
2794 fields->f_src32_rn_unprefixed_QI = value;
2797 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
2800 length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
2801 value = ((value) - (2));
2802 fields->f_src32_rn_unprefixed_SI = value;
2805 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
2806 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_5_1);
2808 case M32C_OPERAND_X :
2810 case M32C_OPERAND_Z :
2812 case M32C_OPERAND_COND16_16 :
2813 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
2815 case M32C_OPERAND_COND16_24 :
2816 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2818 case M32C_OPERAND_COND16_32 :
2819 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2821 case M32C_OPERAND_COND16C :
2822 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
2824 case M32C_OPERAND_COND16J :
2825 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
2827 case M32C_OPERAND_COND16J5 :
2828 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_cond16j_5);
2830 case M32C_OPERAND_COND32 :
2832 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_9_1);
2833 if (length <= 0) break;
2834 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2835 if (length <= 0) break;
2837 FLD (f_cond32) = ((((FLD (f_9_1)) << (3))) | (FLD (f_13_3)));
2841 case M32C_OPERAND_COND32_16 :
2842 length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
2844 case M32C_OPERAND_COND32_24 :
2845 length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
2847 case M32C_OPERAND_COND32_32 :
2848 length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
2850 case M32C_OPERAND_COND32_40 :
2851 length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_u8);
2853 case M32C_OPERAND_COND32J :
2855 length = extract_normal (cd, ex_info, insn_value, 0, 0, 1, 3, 32, total_length, pc, & fields->f_1_3);
2856 if (length <= 0) break;
2857 length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
2858 if (length <= 0) break;
2860 FLD (f_cond32j) = ((((FLD (f_1_3)) << (1))) | (FLD (f_7_1)));
2864 case M32C_OPERAND_CR1_PREFIXED_32 :
2865 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_21_3);
2867 case M32C_OPERAND_CR1_UNPREFIXED_32 :
2868 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2870 case M32C_OPERAND_CR16 :
2871 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 3, 32, total_length, pc, & fields->f_9_3);
2873 case M32C_OPERAND_CR2_32 :
2874 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2876 case M32C_OPERAND_CR3_PREFIXED_32 :
2877 length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_21_3);
2879 case M32C_OPERAND_CR3_UNPREFIXED_32 :
2880 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2882 case M32C_OPERAND_FLAGS16 :
2883 length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 3, 32, total_length, pc, & fields->f_9_3);
2885 case M32C_OPERAND_FLAGS32 :
2886 length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
2888 case M32C_OPERAND_SCCOND32 :
2889 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
2891 case M32C_OPERAND_SIZE :
2895 /* xgettext:c-format */
2896 fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"),
2904 cgen_insert_fn * const m32c_cgen_insert_handlers[] =
2909 cgen_extract_fn * const m32c_cgen_extract_handlers[] =
2911 extract_insn_normal,
2914 int m32c_cgen_get_int_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
2915 bfd_vma m32c_cgen_get_vma_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
2917 /* Getting values from cgen_fields is handled by a collection of functions.
2918 They are distinguished by the type of the VALUE argument they return.
2919 TODO: floating point, inlining support, remove cases where result type
2923 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
2925 const CGEN_FIELDS * fields)
2931 case M32C_OPERAND_A0 :
2934 case M32C_OPERAND_A1 :
2937 case M32C_OPERAND_AN16_PUSH_S :
2938 value = fields->f_4_1;
2940 case M32C_OPERAND_BIT16AN :
2941 value = fields->f_dst16_an;
2943 case M32C_OPERAND_BIT16RN :
2944 value = fields->f_dst16_rn;
2946 case M32C_OPERAND_BIT3_S :
2947 value = fields->f_imm3_S;
2949 case M32C_OPERAND_BIT32ANPREFIXED :
2950 value = fields->f_dst32_an_prefixed;
2952 case M32C_OPERAND_BIT32ANUNPREFIXED :
2953 value = fields->f_dst32_an_unprefixed;
2955 case M32C_OPERAND_BIT32RNPREFIXED :
2956 value = fields->f_dst32_rn_prefixed_QI;
2958 case M32C_OPERAND_BIT32RNUNPREFIXED :
2959 value = fields->f_dst32_rn_unprefixed_QI;
2961 case M32C_OPERAND_BITBASE16_16_S8 :
2962 value = fields->f_dsp_16_s8;
2964 case M32C_OPERAND_BITBASE16_16_U16 :
2965 value = fields->f_dsp_16_u16;
2967 case M32C_OPERAND_BITBASE16_16_U8 :
2968 value = fields->f_dsp_16_u8;
2970 case M32C_OPERAND_BITBASE16_8_U11_S :
2971 value = fields->f_bitbase16_u11_S;
2973 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
2974 value = fields->f_bitbase32_16_s11_unprefixed;
2976 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
2977 value = fields->f_bitbase32_16_s19_unprefixed;
2979 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
2980 value = fields->f_bitbase32_16_u11_unprefixed;
2982 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
2983 value = fields->f_bitbase32_16_u19_unprefixed;
2985 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
2986 value = fields->f_bitbase32_16_u27_unprefixed;
2988 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
2989 value = fields->f_bitbase32_24_s11_prefixed;
2991 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
2992 value = fields->f_bitbase32_24_s19_prefixed;
2994 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
2995 value = fields->f_bitbase32_24_u11_prefixed;
2997 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
2998 value = fields->f_bitbase32_24_u19_prefixed;
3000 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
3001 value = fields->f_bitbase32_24_u27_prefixed;
3003 case M32C_OPERAND_BITNO16R :
3004 value = fields->f_dsp_16_u8;
3006 case M32C_OPERAND_BITNO32PREFIXED :
3007 value = fields->f_bitno32_prefixed;
3009 case M32C_OPERAND_BITNO32UNPREFIXED :
3010 value = fields->f_bitno32_unprefixed;
3012 case M32C_OPERAND_DSP_10_U6 :
3013 value = fields->f_dsp_10_u6;
3015 case M32C_OPERAND_DSP_16_S16 :
3016 value = fields->f_dsp_16_s16;
3018 case M32C_OPERAND_DSP_16_S8 :
3019 value = fields->f_dsp_16_s8;
3021 case M32C_OPERAND_DSP_16_U16 :
3022 value = fields->f_dsp_16_u16;
3024 case M32C_OPERAND_DSP_16_U20 :
3025 value = fields->f_dsp_16_u24;
3027 case M32C_OPERAND_DSP_16_U24 :
3028 value = fields->f_dsp_16_u24;
3030 case M32C_OPERAND_DSP_16_U8 :
3031 value = fields->f_dsp_16_u8;
3033 case M32C_OPERAND_DSP_24_S16 :
3034 value = fields->f_dsp_24_s16;
3036 case M32C_OPERAND_DSP_24_S8 :
3037 value = fields->f_dsp_24_s8;
3039 case M32C_OPERAND_DSP_24_U16 :
3040 value = fields->f_dsp_24_u16;
3042 case M32C_OPERAND_DSP_24_U20 :
3043 value = fields->f_dsp_24_u24;
3045 case M32C_OPERAND_DSP_24_U24 :
3046 value = fields->f_dsp_24_u24;
3048 case M32C_OPERAND_DSP_24_U8 :
3049 value = fields->f_dsp_24_u8;
3051 case M32C_OPERAND_DSP_32_S16 :
3052 value = fields->f_dsp_32_s16;
3054 case M32C_OPERAND_DSP_32_S8 :
3055 value = fields->f_dsp_32_s8;
3057 case M32C_OPERAND_DSP_32_U16 :
3058 value = fields->f_dsp_32_u16;
3060 case M32C_OPERAND_DSP_32_U20 :
3061 value = fields->f_dsp_32_u24;
3063 case M32C_OPERAND_DSP_32_U24 :
3064 value = fields->f_dsp_32_u24;
3066 case M32C_OPERAND_DSP_32_U8 :
3067 value = fields->f_dsp_32_u8;
3069 case M32C_OPERAND_DSP_40_S16 :
3070 value = fields->f_dsp_40_s16;
3072 case M32C_OPERAND_DSP_40_S8 :
3073 value = fields->f_dsp_40_s8;
3075 case M32C_OPERAND_DSP_40_U16 :
3076 value = fields->f_dsp_40_u16;
3078 case M32C_OPERAND_DSP_40_U20 :
3079 value = fields->f_dsp_40_u20;
3081 case M32C_OPERAND_DSP_40_U24 :
3082 value = fields->f_dsp_40_u24;
3084 case M32C_OPERAND_DSP_40_U8 :
3085 value = fields->f_dsp_40_u8;
3087 case M32C_OPERAND_DSP_48_S16 :
3088 value = fields->f_dsp_48_s16;
3090 case M32C_OPERAND_DSP_48_S8 :
3091 value = fields->f_dsp_48_s8;
3093 case M32C_OPERAND_DSP_48_U16 :
3094 value = fields->f_dsp_48_u16;
3096 case M32C_OPERAND_DSP_48_U20 :
3097 value = fields->f_dsp_48_u20;
3099 case M32C_OPERAND_DSP_48_U24 :
3100 value = fields->f_dsp_48_u24;
3102 case M32C_OPERAND_DSP_48_U8 :
3103 value = fields->f_dsp_48_u8;
3105 case M32C_OPERAND_DSP_8_S24 :
3106 value = fields->f_dsp_8_s24;
3108 case M32C_OPERAND_DSP_8_S8 :
3109 value = fields->f_dsp_8_s8;
3111 case M32C_OPERAND_DSP_8_U16 :
3112 value = fields->f_dsp_8_u16;
3114 case M32C_OPERAND_DSP_8_U24 :
3115 value = fields->f_dsp_8_u24;
3117 case M32C_OPERAND_DSP_8_U6 :
3118 value = fields->f_dsp_8_u6;
3120 case M32C_OPERAND_DSP_8_U8 :
3121 value = fields->f_dsp_8_u8;
3123 case M32C_OPERAND_DST16AN :
3124 value = fields->f_dst16_an;
3126 case M32C_OPERAND_DST16AN_S :
3127 value = fields->f_dst16_an_s;
3129 case M32C_OPERAND_DST16ANHI :
3130 value = fields->f_dst16_an;
3132 case M32C_OPERAND_DST16ANQI :
3133 value = fields->f_dst16_an;
3135 case M32C_OPERAND_DST16ANQI_S :
3136 value = fields->f_dst16_rn_QI_s;
3138 case M32C_OPERAND_DST16ANSI :
3139 value = fields->f_dst16_an;
3141 case M32C_OPERAND_DST16RNEXTQI :
3142 value = fields->f_dst16_rn_ext;
3144 case M32C_OPERAND_DST16RNHI :
3145 value = fields->f_dst16_rn;
3147 case M32C_OPERAND_DST16RNQI :
3148 value = fields->f_dst16_rn;
3150 case M32C_OPERAND_DST16RNQI_S :
3151 value = fields->f_dst16_rn_QI_s;
3153 case M32C_OPERAND_DST16RNSI :
3154 value = fields->f_dst16_rn;
3156 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
3157 value = fields->f_dst32_an_unprefixed;
3159 case M32C_OPERAND_DST32ANPREFIXED :
3160 value = fields->f_dst32_an_prefixed;
3162 case M32C_OPERAND_DST32ANPREFIXEDHI :
3163 value = fields->f_dst32_an_prefixed;
3165 case M32C_OPERAND_DST32ANPREFIXEDQI :
3166 value = fields->f_dst32_an_prefixed;
3168 case M32C_OPERAND_DST32ANPREFIXEDSI :
3169 value = fields->f_dst32_an_prefixed;
3171 case M32C_OPERAND_DST32ANUNPREFIXED :
3172 value = fields->f_dst32_an_unprefixed;
3174 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
3175 value = fields->f_dst32_an_unprefixed;
3177 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
3178 value = fields->f_dst32_an_unprefixed;
3180 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
3181 value = fields->f_dst32_an_unprefixed;
3183 case M32C_OPERAND_DST32R0HI_S :
3186 case M32C_OPERAND_DST32R0QI_S :
3189 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
3190 value = fields->f_dst32_rn_ext_unprefixed;
3192 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
3193 value = fields->f_dst32_rn_ext_unprefixed;
3195 case M32C_OPERAND_DST32RNPREFIXEDHI :
3196 value = fields->f_dst32_rn_prefixed_HI;
3198 case M32C_OPERAND_DST32RNPREFIXEDQI :
3199 value = fields->f_dst32_rn_prefixed_QI;
3201 case M32C_OPERAND_DST32RNPREFIXEDSI :
3202 value = fields->f_dst32_rn_prefixed_SI;
3204 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
3205 value = fields->f_dst32_rn_unprefixed_HI;
3207 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
3208 value = fields->f_dst32_rn_unprefixed_QI;
3210 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
3211 value = fields->f_dst32_rn_unprefixed_SI;
3213 case M32C_OPERAND_G :
3216 case M32C_OPERAND_IMM_12_S4 :
3217 value = fields->f_imm_12_s4;
3219 case M32C_OPERAND_IMM_12_S4N :
3220 value = fields->f_imm_12_s4;
3222 case M32C_OPERAND_IMM_13_U3 :
3223 value = fields->f_imm_13_u3;
3225 case M32C_OPERAND_IMM_16_HI :
3226 value = fields->f_dsp_16_s16;
3228 case M32C_OPERAND_IMM_16_QI :
3229 value = fields->f_dsp_16_s8;
3231 case M32C_OPERAND_IMM_16_SI :
3232 value = fields->f_dsp_16_s32;
3234 case M32C_OPERAND_IMM_20_S4 :
3235 value = fields->f_imm_20_s4;
3237 case M32C_OPERAND_IMM_24_HI :
3238 value = fields->f_dsp_24_s16;
3240 case M32C_OPERAND_IMM_24_QI :
3241 value = fields->f_dsp_24_s8;
3243 case M32C_OPERAND_IMM_24_SI :
3244 value = fields->f_dsp_24_s32;
3246 case M32C_OPERAND_IMM_32_HI :
3247 value = fields->f_dsp_32_s16;
3249 case M32C_OPERAND_IMM_32_QI :
3250 value = fields->f_dsp_32_s8;
3252 case M32C_OPERAND_IMM_32_SI :
3253 value = fields->f_dsp_32_s32;
3255 case M32C_OPERAND_IMM_40_HI :
3256 value = fields->f_dsp_40_s16;
3258 case M32C_OPERAND_IMM_40_QI :
3259 value = fields->f_dsp_40_s8;
3261 case M32C_OPERAND_IMM_40_SI :
3262 value = fields->f_dsp_40_s32;
3264 case M32C_OPERAND_IMM_48_HI :
3265 value = fields->f_dsp_48_s16;
3267 case M32C_OPERAND_IMM_48_QI :
3268 value = fields->f_dsp_48_s8;
3270 case M32C_OPERAND_IMM_48_SI :
3271 value = fields->f_dsp_48_s32;
3273 case M32C_OPERAND_IMM_56_HI :
3274 value = fields->f_dsp_56_s16;
3276 case M32C_OPERAND_IMM_56_QI :
3277 value = fields->f_dsp_56_s8;
3279 case M32C_OPERAND_IMM_64_HI :
3280 value = fields->f_dsp_64_s16;
3282 case M32C_OPERAND_IMM_8_HI :
3283 value = fields->f_dsp_8_s16;
3285 case M32C_OPERAND_IMM_8_QI :
3286 value = fields->f_dsp_8_s8;
3288 case M32C_OPERAND_IMM_8_S4 :
3289 value = fields->f_imm_8_s4;
3291 case M32C_OPERAND_IMM_8_S4N :
3292 value = fields->f_imm_8_s4;
3294 case M32C_OPERAND_IMM_SH_12_S4 :
3295 value = fields->f_imm_12_s4;
3297 case M32C_OPERAND_IMM_SH_20_S4 :
3298 value = fields->f_imm_20_s4;
3300 case M32C_OPERAND_IMM_SH_8_S4 :
3301 value = fields->f_imm_8_s4;
3303 case M32C_OPERAND_IMM1_S :
3304 value = fields->f_imm1_S;
3306 case M32C_OPERAND_IMM3_S :
3307 value = fields->f_imm3_S;
3309 case M32C_OPERAND_LAB_16_8 :
3310 value = fields->f_lab_16_8;
3312 case M32C_OPERAND_LAB_24_8 :
3313 value = fields->f_lab_24_8;
3315 case M32C_OPERAND_LAB_32_8 :
3316 value = fields->f_lab_32_8;
3318 case M32C_OPERAND_LAB_40_8 :
3319 value = fields->f_lab_40_8;
3321 case M32C_OPERAND_LAB_5_3 :
3322 value = fields->f_lab_5_3;
3324 case M32C_OPERAND_LAB_8_16 :
3325 value = fields->f_lab_8_16;
3327 case M32C_OPERAND_LAB_8_24 :
3328 value = fields->f_lab_8_24;
3330 case M32C_OPERAND_LAB_8_8 :
3331 value = fields->f_lab_8_8;
3333 case M32C_OPERAND_LAB32_JMP_S :
3334 value = fields->f_lab32_jmp_s;
3336 case M32C_OPERAND_Q :
3339 case M32C_OPERAND_R0 :
3342 case M32C_OPERAND_R0H :
3345 case M32C_OPERAND_R0L :
3348 case M32C_OPERAND_R1 :
3351 case M32C_OPERAND_R1R2R0 :
3354 case M32C_OPERAND_R2 :
3357 case M32C_OPERAND_R2R0 :
3360 case M32C_OPERAND_R3 :
3363 case M32C_OPERAND_R3R1 :
3366 case M32C_OPERAND_REGSETPOP :
3367 value = fields->f_8_8;
3369 case M32C_OPERAND_REGSETPUSH :
3370 value = fields->f_8_8;
3372 case M32C_OPERAND_RN16_PUSH_S :
3373 value = fields->f_4_1;
3375 case M32C_OPERAND_S :
3378 case M32C_OPERAND_SRC16AN :
3379 value = fields->f_src16_an;
3381 case M32C_OPERAND_SRC16ANHI :
3382 value = fields->f_src16_an;
3384 case M32C_OPERAND_SRC16ANQI :
3385 value = fields->f_src16_an;
3387 case M32C_OPERAND_SRC16RNHI :
3388 value = fields->f_src16_rn;
3390 case M32C_OPERAND_SRC16RNQI :
3391 value = fields->f_src16_rn;
3393 case M32C_OPERAND_SRC32ANPREFIXED :
3394 value = fields->f_src32_an_prefixed;
3396 case M32C_OPERAND_SRC32ANPREFIXEDHI :
3397 value = fields->f_src32_an_prefixed;
3399 case M32C_OPERAND_SRC32ANPREFIXEDQI :
3400 value = fields->f_src32_an_prefixed;
3402 case M32C_OPERAND_SRC32ANPREFIXEDSI :
3403 value = fields->f_src32_an_prefixed;
3405 case M32C_OPERAND_SRC32ANUNPREFIXED :
3406 value = fields->f_src32_an_unprefixed;
3408 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
3409 value = fields->f_src32_an_unprefixed;
3411 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
3412 value = fields->f_src32_an_unprefixed;
3414 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
3415 value = fields->f_src32_an_unprefixed;
3417 case M32C_OPERAND_SRC32RNPREFIXEDHI :
3418 value = fields->f_src32_rn_prefixed_HI;
3420 case M32C_OPERAND_SRC32RNPREFIXEDQI :
3421 value = fields->f_src32_rn_prefixed_QI;
3423 case M32C_OPERAND_SRC32RNPREFIXEDSI :
3424 value = fields->f_src32_rn_prefixed_SI;
3426 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
3427 value = fields->f_src32_rn_unprefixed_HI;
3429 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
3430 value = fields->f_src32_rn_unprefixed_QI;
3432 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
3433 value = fields->f_src32_rn_unprefixed_SI;
3435 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
3436 value = fields->f_5_1;
3438 case M32C_OPERAND_X :
3441 case M32C_OPERAND_Z :
3444 case M32C_OPERAND_COND16_16 :
3445 value = fields->f_dsp_16_u8;
3447 case M32C_OPERAND_COND16_24 :
3448 value = fields->f_dsp_24_u8;
3450 case M32C_OPERAND_COND16_32 :
3451 value = fields->f_dsp_32_u8;
3453 case M32C_OPERAND_COND16C :
3454 value = fields->f_cond16;
3456 case M32C_OPERAND_COND16J :
3457 value = fields->f_cond16;
3459 case M32C_OPERAND_COND16J5 :
3460 value = fields->f_cond16j_5;
3462 case M32C_OPERAND_COND32 :
3463 value = fields->f_cond32;
3465 case M32C_OPERAND_COND32_16 :
3466 value = fields->f_dsp_16_u8;
3468 case M32C_OPERAND_COND32_24 :
3469 value = fields->f_dsp_24_u8;
3471 case M32C_OPERAND_COND32_32 :
3472 value = fields->f_dsp_32_u8;
3474 case M32C_OPERAND_COND32_40 :
3475 value = fields->f_dsp_40_u8;
3477 case M32C_OPERAND_COND32J :
3478 value = fields->f_cond32j;
3480 case M32C_OPERAND_CR1_PREFIXED_32 :
3481 value = fields->f_21_3;
3483 case M32C_OPERAND_CR1_UNPREFIXED_32 :
3484 value = fields->f_13_3;
3486 case M32C_OPERAND_CR16 :
3487 value = fields->f_9_3;
3489 case M32C_OPERAND_CR2_32 :
3490 value = fields->f_13_3;
3492 case M32C_OPERAND_CR3_PREFIXED_32 :
3493 value = fields->f_21_3;
3495 case M32C_OPERAND_CR3_UNPREFIXED_32 :
3496 value = fields->f_13_3;
3498 case M32C_OPERAND_FLAGS16 :
3499 value = fields->f_9_3;
3501 case M32C_OPERAND_FLAGS32 :
3502 value = fields->f_13_3;
3504 case M32C_OPERAND_SCCOND32 :
3505 value = fields->f_cond16;
3507 case M32C_OPERAND_SIZE :
3512 /* xgettext:c-format */
3513 fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
3522 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
3524 const CGEN_FIELDS * fields)
3530 case M32C_OPERAND_A0 :
3533 case M32C_OPERAND_A1 :
3536 case M32C_OPERAND_AN16_PUSH_S :
3537 value = fields->f_4_1;
3539 case M32C_OPERAND_BIT16AN :
3540 value = fields->f_dst16_an;
3542 case M32C_OPERAND_BIT16RN :
3543 value = fields->f_dst16_rn;
3545 case M32C_OPERAND_BIT3_S :
3546 value = fields->f_imm3_S;
3548 case M32C_OPERAND_BIT32ANPREFIXED :
3549 value = fields->f_dst32_an_prefixed;
3551 case M32C_OPERAND_BIT32ANUNPREFIXED :
3552 value = fields->f_dst32_an_unprefixed;
3554 case M32C_OPERAND_BIT32RNPREFIXED :
3555 value = fields->f_dst32_rn_prefixed_QI;
3557 case M32C_OPERAND_BIT32RNUNPREFIXED :
3558 value = fields->f_dst32_rn_unprefixed_QI;
3560 case M32C_OPERAND_BITBASE16_16_S8 :
3561 value = fields->f_dsp_16_s8;
3563 case M32C_OPERAND_BITBASE16_16_U16 :
3564 value = fields->f_dsp_16_u16;
3566 case M32C_OPERAND_BITBASE16_16_U8 :
3567 value = fields->f_dsp_16_u8;
3569 case M32C_OPERAND_BITBASE16_8_U11_S :
3570 value = fields->f_bitbase16_u11_S;
3572 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
3573 value = fields->f_bitbase32_16_s11_unprefixed;
3575 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
3576 value = fields->f_bitbase32_16_s19_unprefixed;
3578 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
3579 value = fields->f_bitbase32_16_u11_unprefixed;
3581 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
3582 value = fields->f_bitbase32_16_u19_unprefixed;
3584 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
3585 value = fields->f_bitbase32_16_u27_unprefixed;
3587 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
3588 value = fields->f_bitbase32_24_s11_prefixed;
3590 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
3591 value = fields->f_bitbase32_24_s19_prefixed;
3593 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
3594 value = fields->f_bitbase32_24_u11_prefixed;
3596 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
3597 value = fields->f_bitbase32_24_u19_prefixed;
3599 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
3600 value = fields->f_bitbase32_24_u27_prefixed;
3602 case M32C_OPERAND_BITNO16R :
3603 value = fields->f_dsp_16_u8;
3605 case M32C_OPERAND_BITNO32PREFIXED :
3606 value = fields->f_bitno32_prefixed;
3608 case M32C_OPERAND_BITNO32UNPREFIXED :
3609 value = fields->f_bitno32_unprefixed;
3611 case M32C_OPERAND_DSP_10_U6 :
3612 value = fields->f_dsp_10_u6;
3614 case M32C_OPERAND_DSP_16_S16 :
3615 value = fields->f_dsp_16_s16;
3617 case M32C_OPERAND_DSP_16_S8 :
3618 value = fields->f_dsp_16_s8;
3620 case M32C_OPERAND_DSP_16_U16 :
3621 value = fields->f_dsp_16_u16;
3623 case M32C_OPERAND_DSP_16_U20 :
3624 value = fields->f_dsp_16_u24;
3626 case M32C_OPERAND_DSP_16_U24 :
3627 value = fields->f_dsp_16_u24;
3629 case M32C_OPERAND_DSP_16_U8 :
3630 value = fields->f_dsp_16_u8;
3632 case M32C_OPERAND_DSP_24_S16 :
3633 value = fields->f_dsp_24_s16;
3635 case M32C_OPERAND_DSP_24_S8 :
3636 value = fields->f_dsp_24_s8;
3638 case M32C_OPERAND_DSP_24_U16 :
3639 value = fields->f_dsp_24_u16;
3641 case M32C_OPERAND_DSP_24_U20 :
3642 value = fields->f_dsp_24_u24;
3644 case M32C_OPERAND_DSP_24_U24 :
3645 value = fields->f_dsp_24_u24;
3647 case M32C_OPERAND_DSP_24_U8 :
3648 value = fields->f_dsp_24_u8;
3650 case M32C_OPERAND_DSP_32_S16 :
3651 value = fields->f_dsp_32_s16;
3653 case M32C_OPERAND_DSP_32_S8 :
3654 value = fields->f_dsp_32_s8;
3656 case M32C_OPERAND_DSP_32_U16 :
3657 value = fields->f_dsp_32_u16;
3659 case M32C_OPERAND_DSP_32_U20 :
3660 value = fields->f_dsp_32_u24;
3662 case M32C_OPERAND_DSP_32_U24 :
3663 value = fields->f_dsp_32_u24;
3665 case M32C_OPERAND_DSP_32_U8 :
3666 value = fields->f_dsp_32_u8;
3668 case M32C_OPERAND_DSP_40_S16 :
3669 value = fields->f_dsp_40_s16;
3671 case M32C_OPERAND_DSP_40_S8 :
3672 value = fields->f_dsp_40_s8;
3674 case M32C_OPERAND_DSP_40_U16 :
3675 value = fields->f_dsp_40_u16;
3677 case M32C_OPERAND_DSP_40_U20 :
3678 value = fields->f_dsp_40_u20;
3680 case M32C_OPERAND_DSP_40_U24 :
3681 value = fields->f_dsp_40_u24;
3683 case M32C_OPERAND_DSP_40_U8 :
3684 value = fields->f_dsp_40_u8;
3686 case M32C_OPERAND_DSP_48_S16 :
3687 value = fields->f_dsp_48_s16;
3689 case M32C_OPERAND_DSP_48_S8 :
3690 value = fields->f_dsp_48_s8;
3692 case M32C_OPERAND_DSP_48_U16 :
3693 value = fields->f_dsp_48_u16;
3695 case M32C_OPERAND_DSP_48_U20 :
3696 value = fields->f_dsp_48_u20;
3698 case M32C_OPERAND_DSP_48_U24 :
3699 value = fields->f_dsp_48_u24;
3701 case M32C_OPERAND_DSP_48_U8 :
3702 value = fields->f_dsp_48_u8;
3704 case M32C_OPERAND_DSP_8_S24 :
3705 value = fields->f_dsp_8_s24;
3707 case M32C_OPERAND_DSP_8_S8 :
3708 value = fields->f_dsp_8_s8;
3710 case M32C_OPERAND_DSP_8_U16 :
3711 value = fields->f_dsp_8_u16;
3713 case M32C_OPERAND_DSP_8_U24 :
3714 value = fields->f_dsp_8_u24;
3716 case M32C_OPERAND_DSP_8_U6 :
3717 value = fields->f_dsp_8_u6;
3719 case M32C_OPERAND_DSP_8_U8 :
3720 value = fields->f_dsp_8_u8;
3722 case M32C_OPERAND_DST16AN :
3723 value = fields->f_dst16_an;
3725 case M32C_OPERAND_DST16AN_S :
3726 value = fields->f_dst16_an_s;
3728 case M32C_OPERAND_DST16ANHI :
3729 value = fields->f_dst16_an;
3731 case M32C_OPERAND_DST16ANQI :
3732 value = fields->f_dst16_an;
3734 case M32C_OPERAND_DST16ANQI_S :
3735 value = fields->f_dst16_rn_QI_s;
3737 case M32C_OPERAND_DST16ANSI :
3738 value = fields->f_dst16_an;
3740 case M32C_OPERAND_DST16RNEXTQI :
3741 value = fields->f_dst16_rn_ext;
3743 case M32C_OPERAND_DST16RNHI :
3744 value = fields->f_dst16_rn;
3746 case M32C_OPERAND_DST16RNQI :
3747 value = fields->f_dst16_rn;
3749 case M32C_OPERAND_DST16RNQI_S :
3750 value = fields->f_dst16_rn_QI_s;
3752 case M32C_OPERAND_DST16RNSI :
3753 value = fields->f_dst16_rn;
3755 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
3756 value = fields->f_dst32_an_unprefixed;
3758 case M32C_OPERAND_DST32ANPREFIXED :
3759 value = fields->f_dst32_an_prefixed;
3761 case M32C_OPERAND_DST32ANPREFIXEDHI :
3762 value = fields->f_dst32_an_prefixed;
3764 case M32C_OPERAND_DST32ANPREFIXEDQI :
3765 value = fields->f_dst32_an_prefixed;
3767 case M32C_OPERAND_DST32ANPREFIXEDSI :
3768 value = fields->f_dst32_an_prefixed;
3770 case M32C_OPERAND_DST32ANUNPREFIXED :
3771 value = fields->f_dst32_an_unprefixed;
3773 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
3774 value = fields->f_dst32_an_unprefixed;
3776 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
3777 value = fields->f_dst32_an_unprefixed;
3779 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
3780 value = fields->f_dst32_an_unprefixed;
3782 case M32C_OPERAND_DST32R0HI_S :
3785 case M32C_OPERAND_DST32R0QI_S :
3788 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
3789 value = fields->f_dst32_rn_ext_unprefixed;
3791 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
3792 value = fields->f_dst32_rn_ext_unprefixed;
3794 case M32C_OPERAND_DST32RNPREFIXEDHI :
3795 value = fields->f_dst32_rn_prefixed_HI;
3797 case M32C_OPERAND_DST32RNPREFIXEDQI :
3798 value = fields->f_dst32_rn_prefixed_QI;
3800 case M32C_OPERAND_DST32RNPREFIXEDSI :
3801 value = fields->f_dst32_rn_prefixed_SI;
3803 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
3804 value = fields->f_dst32_rn_unprefixed_HI;
3806 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
3807 value = fields->f_dst32_rn_unprefixed_QI;
3809 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
3810 value = fields->f_dst32_rn_unprefixed_SI;
3812 case M32C_OPERAND_G :
3815 case M32C_OPERAND_IMM_12_S4 :
3816 value = fields->f_imm_12_s4;
3818 case M32C_OPERAND_IMM_12_S4N :
3819 value = fields->f_imm_12_s4;
3821 case M32C_OPERAND_IMM_13_U3 :
3822 value = fields->f_imm_13_u3;
3824 case M32C_OPERAND_IMM_16_HI :
3825 value = fields->f_dsp_16_s16;
3827 case M32C_OPERAND_IMM_16_QI :
3828 value = fields->f_dsp_16_s8;
3830 case M32C_OPERAND_IMM_16_SI :
3831 value = fields->f_dsp_16_s32;
3833 case M32C_OPERAND_IMM_20_S4 :
3834 value = fields->f_imm_20_s4;
3836 case M32C_OPERAND_IMM_24_HI :
3837 value = fields->f_dsp_24_s16;
3839 case M32C_OPERAND_IMM_24_QI :
3840 value = fields->f_dsp_24_s8;
3842 case M32C_OPERAND_IMM_24_SI :
3843 value = fields->f_dsp_24_s32;
3845 case M32C_OPERAND_IMM_32_HI :
3846 value = fields->f_dsp_32_s16;
3848 case M32C_OPERAND_IMM_32_QI :
3849 value = fields->f_dsp_32_s8;
3851 case M32C_OPERAND_IMM_32_SI :
3852 value = fields->f_dsp_32_s32;
3854 case M32C_OPERAND_IMM_40_HI :
3855 value = fields->f_dsp_40_s16;
3857 case M32C_OPERAND_IMM_40_QI :
3858 value = fields->f_dsp_40_s8;
3860 case M32C_OPERAND_IMM_40_SI :
3861 value = fields->f_dsp_40_s32;
3863 case M32C_OPERAND_IMM_48_HI :
3864 value = fields->f_dsp_48_s16;
3866 case M32C_OPERAND_IMM_48_QI :
3867 value = fields->f_dsp_48_s8;
3869 case M32C_OPERAND_IMM_48_SI :
3870 value = fields->f_dsp_48_s32;
3872 case M32C_OPERAND_IMM_56_HI :
3873 value = fields->f_dsp_56_s16;
3875 case M32C_OPERAND_IMM_56_QI :
3876 value = fields->f_dsp_56_s8;
3878 case M32C_OPERAND_IMM_64_HI :
3879 value = fields->f_dsp_64_s16;
3881 case M32C_OPERAND_IMM_8_HI :
3882 value = fields->f_dsp_8_s16;
3884 case M32C_OPERAND_IMM_8_QI :
3885 value = fields->f_dsp_8_s8;
3887 case M32C_OPERAND_IMM_8_S4 :
3888 value = fields->f_imm_8_s4;
3890 case M32C_OPERAND_IMM_8_S4N :
3891 value = fields->f_imm_8_s4;
3893 case M32C_OPERAND_IMM_SH_12_S4 :
3894 value = fields->f_imm_12_s4;
3896 case M32C_OPERAND_IMM_SH_20_S4 :
3897 value = fields->f_imm_20_s4;
3899 case M32C_OPERAND_IMM_SH_8_S4 :
3900 value = fields->f_imm_8_s4;
3902 case M32C_OPERAND_IMM1_S :
3903 value = fields->f_imm1_S;
3905 case M32C_OPERAND_IMM3_S :
3906 value = fields->f_imm3_S;
3908 case M32C_OPERAND_LAB_16_8 :
3909 value = fields->f_lab_16_8;
3911 case M32C_OPERAND_LAB_24_8 :
3912 value = fields->f_lab_24_8;
3914 case M32C_OPERAND_LAB_32_8 :
3915 value = fields->f_lab_32_8;
3917 case M32C_OPERAND_LAB_40_8 :
3918 value = fields->f_lab_40_8;
3920 case M32C_OPERAND_LAB_5_3 :
3921 value = fields->f_lab_5_3;
3923 case M32C_OPERAND_LAB_8_16 :
3924 value = fields->f_lab_8_16;
3926 case M32C_OPERAND_LAB_8_24 :
3927 value = fields->f_lab_8_24;
3929 case M32C_OPERAND_LAB_8_8 :
3930 value = fields->f_lab_8_8;
3932 case M32C_OPERAND_LAB32_JMP_S :
3933 value = fields->f_lab32_jmp_s;
3935 case M32C_OPERAND_Q :
3938 case M32C_OPERAND_R0 :
3941 case M32C_OPERAND_R0H :
3944 case M32C_OPERAND_R0L :
3947 case M32C_OPERAND_R1 :
3950 case M32C_OPERAND_R1R2R0 :
3953 case M32C_OPERAND_R2 :
3956 case M32C_OPERAND_R2R0 :
3959 case M32C_OPERAND_R3 :
3962 case M32C_OPERAND_R3R1 :
3965 case M32C_OPERAND_REGSETPOP :
3966 value = fields->f_8_8;
3968 case M32C_OPERAND_REGSETPUSH :
3969 value = fields->f_8_8;
3971 case M32C_OPERAND_RN16_PUSH_S :
3972 value = fields->f_4_1;
3974 case M32C_OPERAND_S :
3977 case M32C_OPERAND_SRC16AN :
3978 value = fields->f_src16_an;
3980 case M32C_OPERAND_SRC16ANHI :
3981 value = fields->f_src16_an;
3983 case M32C_OPERAND_SRC16ANQI :
3984 value = fields->f_src16_an;
3986 case M32C_OPERAND_SRC16RNHI :
3987 value = fields->f_src16_rn;
3989 case M32C_OPERAND_SRC16RNQI :
3990 value = fields->f_src16_rn;
3992 case M32C_OPERAND_SRC32ANPREFIXED :
3993 value = fields->f_src32_an_prefixed;
3995 case M32C_OPERAND_SRC32ANPREFIXEDHI :
3996 value = fields->f_src32_an_prefixed;
3998 case M32C_OPERAND_SRC32ANPREFIXEDQI :
3999 value = fields->f_src32_an_prefixed;
4001 case M32C_OPERAND_SRC32ANPREFIXEDSI :
4002 value = fields->f_src32_an_prefixed;
4004 case M32C_OPERAND_SRC32ANUNPREFIXED :
4005 value = fields->f_src32_an_unprefixed;
4007 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
4008 value = fields->f_src32_an_unprefixed;
4010 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
4011 value = fields->f_src32_an_unprefixed;
4013 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
4014 value = fields->f_src32_an_unprefixed;
4016 case M32C_OPERAND_SRC32RNPREFIXEDHI :
4017 value = fields->f_src32_rn_prefixed_HI;
4019 case M32C_OPERAND_SRC32RNPREFIXEDQI :
4020 value = fields->f_src32_rn_prefixed_QI;
4022 case M32C_OPERAND_SRC32RNPREFIXEDSI :
4023 value = fields->f_src32_rn_prefixed_SI;
4025 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
4026 value = fields->f_src32_rn_unprefixed_HI;
4028 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
4029 value = fields->f_src32_rn_unprefixed_QI;
4031 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
4032 value = fields->f_src32_rn_unprefixed_SI;
4034 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
4035 value = fields->f_5_1;
4037 case M32C_OPERAND_X :
4040 case M32C_OPERAND_Z :
4043 case M32C_OPERAND_COND16_16 :
4044 value = fields->f_dsp_16_u8;
4046 case M32C_OPERAND_COND16_24 :
4047 value = fields->f_dsp_24_u8;
4049 case M32C_OPERAND_COND16_32 :
4050 value = fields->f_dsp_32_u8;
4052 case M32C_OPERAND_COND16C :
4053 value = fields->f_cond16;
4055 case M32C_OPERAND_COND16J :
4056 value = fields->f_cond16;
4058 case M32C_OPERAND_COND16J5 :
4059 value = fields->f_cond16j_5;
4061 case M32C_OPERAND_COND32 :
4062 value = fields->f_cond32;
4064 case M32C_OPERAND_COND32_16 :
4065 value = fields->f_dsp_16_u8;
4067 case M32C_OPERAND_COND32_24 :
4068 value = fields->f_dsp_24_u8;
4070 case M32C_OPERAND_COND32_32 :
4071 value = fields->f_dsp_32_u8;
4073 case M32C_OPERAND_COND32_40 :
4074 value = fields->f_dsp_40_u8;
4076 case M32C_OPERAND_COND32J :
4077 value = fields->f_cond32j;
4079 case M32C_OPERAND_CR1_PREFIXED_32 :
4080 value = fields->f_21_3;
4082 case M32C_OPERAND_CR1_UNPREFIXED_32 :
4083 value = fields->f_13_3;
4085 case M32C_OPERAND_CR16 :
4086 value = fields->f_9_3;
4088 case M32C_OPERAND_CR2_32 :
4089 value = fields->f_13_3;
4091 case M32C_OPERAND_CR3_PREFIXED_32 :
4092 value = fields->f_21_3;
4094 case M32C_OPERAND_CR3_UNPREFIXED_32 :
4095 value = fields->f_13_3;
4097 case M32C_OPERAND_FLAGS16 :
4098 value = fields->f_9_3;
4100 case M32C_OPERAND_FLAGS32 :
4101 value = fields->f_13_3;
4103 case M32C_OPERAND_SCCOND32 :
4104 value = fields->f_cond16;
4106 case M32C_OPERAND_SIZE :
4111 /* xgettext:c-format */
4112 fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
4120 void m32c_cgen_set_int_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, int);
4121 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma);
4123 /* Stuffing values in cgen_fields is handled by a collection of functions.
4124 They are distinguished by the type of the VALUE argument they accept.
4125 TODO: floating point, inlining support, remove cases where argument type
4129 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
4131 CGEN_FIELDS * fields,
4136 case M32C_OPERAND_A0 :
4138 case M32C_OPERAND_A1 :
4140 case M32C_OPERAND_AN16_PUSH_S :
4141 fields->f_4_1 = value;
4143 case M32C_OPERAND_BIT16AN :
4144 fields->f_dst16_an = value;
4146 case M32C_OPERAND_BIT16RN :
4147 fields->f_dst16_rn = value;
4149 case M32C_OPERAND_BIT3_S :
4150 fields->f_imm3_S = value;
4152 case M32C_OPERAND_BIT32ANPREFIXED :
4153 fields->f_dst32_an_prefixed = value;
4155 case M32C_OPERAND_BIT32ANUNPREFIXED :
4156 fields->f_dst32_an_unprefixed = value;
4158 case M32C_OPERAND_BIT32RNPREFIXED :
4159 fields->f_dst32_rn_prefixed_QI = value;
4161 case M32C_OPERAND_BIT32RNUNPREFIXED :
4162 fields->f_dst32_rn_unprefixed_QI = value;
4164 case M32C_OPERAND_BITBASE16_16_S8 :
4165 fields->f_dsp_16_s8 = value;
4167 case M32C_OPERAND_BITBASE16_16_U16 :
4168 fields->f_dsp_16_u16 = value;
4170 case M32C_OPERAND_BITBASE16_16_U8 :
4171 fields->f_dsp_16_u8 = value;
4173 case M32C_OPERAND_BITBASE16_8_U11_S :
4174 fields->f_bitbase16_u11_S = value;
4176 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
4177 fields->f_bitbase32_16_s11_unprefixed = value;
4179 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
4180 fields->f_bitbase32_16_s19_unprefixed = value;
4182 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
4183 fields->f_bitbase32_16_u11_unprefixed = value;
4185 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
4186 fields->f_bitbase32_16_u19_unprefixed = value;
4188 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
4189 fields->f_bitbase32_16_u27_unprefixed = value;
4191 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
4192 fields->f_bitbase32_24_s11_prefixed = value;
4194 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
4195 fields->f_bitbase32_24_s19_prefixed = value;
4197 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
4198 fields->f_bitbase32_24_u11_prefixed = value;
4200 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
4201 fields->f_bitbase32_24_u19_prefixed = value;
4203 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
4204 fields->f_bitbase32_24_u27_prefixed = value;
4206 case M32C_OPERAND_BITNO16R :
4207 fields->f_dsp_16_u8 = value;
4209 case M32C_OPERAND_BITNO32PREFIXED :
4210 fields->f_bitno32_prefixed = value;
4212 case M32C_OPERAND_BITNO32UNPREFIXED :
4213 fields->f_bitno32_unprefixed = value;
4215 case M32C_OPERAND_DSP_10_U6 :
4216 fields->f_dsp_10_u6 = value;
4218 case M32C_OPERAND_DSP_16_S16 :
4219 fields->f_dsp_16_s16 = value;
4221 case M32C_OPERAND_DSP_16_S8 :
4222 fields->f_dsp_16_s8 = value;
4224 case M32C_OPERAND_DSP_16_U16 :
4225 fields->f_dsp_16_u16 = value;
4227 case M32C_OPERAND_DSP_16_U20 :
4228 fields->f_dsp_16_u24 = value;
4230 case M32C_OPERAND_DSP_16_U24 :
4231 fields->f_dsp_16_u24 = value;
4233 case M32C_OPERAND_DSP_16_U8 :
4234 fields->f_dsp_16_u8 = value;
4236 case M32C_OPERAND_DSP_24_S16 :
4237 fields->f_dsp_24_s16 = value;
4239 case M32C_OPERAND_DSP_24_S8 :
4240 fields->f_dsp_24_s8 = value;
4242 case M32C_OPERAND_DSP_24_U16 :
4243 fields->f_dsp_24_u16 = value;
4245 case M32C_OPERAND_DSP_24_U20 :
4246 fields->f_dsp_24_u24 = value;
4248 case M32C_OPERAND_DSP_24_U24 :
4249 fields->f_dsp_24_u24 = value;
4251 case M32C_OPERAND_DSP_24_U8 :
4252 fields->f_dsp_24_u8 = value;
4254 case M32C_OPERAND_DSP_32_S16 :
4255 fields->f_dsp_32_s16 = value;
4257 case M32C_OPERAND_DSP_32_S8 :
4258 fields->f_dsp_32_s8 = value;
4260 case M32C_OPERAND_DSP_32_U16 :
4261 fields->f_dsp_32_u16 = value;
4263 case M32C_OPERAND_DSP_32_U20 :
4264 fields->f_dsp_32_u24 = value;
4266 case M32C_OPERAND_DSP_32_U24 :
4267 fields->f_dsp_32_u24 = value;
4269 case M32C_OPERAND_DSP_32_U8 :
4270 fields->f_dsp_32_u8 = value;
4272 case M32C_OPERAND_DSP_40_S16 :
4273 fields->f_dsp_40_s16 = value;
4275 case M32C_OPERAND_DSP_40_S8 :
4276 fields->f_dsp_40_s8 = value;
4278 case M32C_OPERAND_DSP_40_U16 :
4279 fields->f_dsp_40_u16 = value;
4281 case M32C_OPERAND_DSP_40_U20 :
4282 fields->f_dsp_40_u20 = value;
4284 case M32C_OPERAND_DSP_40_U24 :
4285 fields->f_dsp_40_u24 = value;
4287 case M32C_OPERAND_DSP_40_U8 :
4288 fields->f_dsp_40_u8 = value;
4290 case M32C_OPERAND_DSP_48_S16 :
4291 fields->f_dsp_48_s16 = value;
4293 case M32C_OPERAND_DSP_48_S8 :
4294 fields->f_dsp_48_s8 = value;
4296 case M32C_OPERAND_DSP_48_U16 :
4297 fields->f_dsp_48_u16 = value;
4299 case M32C_OPERAND_DSP_48_U20 :
4300 fields->f_dsp_48_u20 = value;
4302 case M32C_OPERAND_DSP_48_U24 :
4303 fields->f_dsp_48_u24 = value;
4305 case M32C_OPERAND_DSP_48_U8 :
4306 fields->f_dsp_48_u8 = value;
4308 case M32C_OPERAND_DSP_8_S24 :
4309 fields->f_dsp_8_s24 = value;
4311 case M32C_OPERAND_DSP_8_S8 :
4312 fields->f_dsp_8_s8 = value;
4314 case M32C_OPERAND_DSP_8_U16 :
4315 fields->f_dsp_8_u16 = value;
4317 case M32C_OPERAND_DSP_8_U24 :
4318 fields->f_dsp_8_u24 = value;
4320 case M32C_OPERAND_DSP_8_U6 :
4321 fields->f_dsp_8_u6 = value;
4323 case M32C_OPERAND_DSP_8_U8 :
4324 fields->f_dsp_8_u8 = value;
4326 case M32C_OPERAND_DST16AN :
4327 fields->f_dst16_an = value;
4329 case M32C_OPERAND_DST16AN_S :
4330 fields->f_dst16_an_s = value;
4332 case M32C_OPERAND_DST16ANHI :
4333 fields->f_dst16_an = value;
4335 case M32C_OPERAND_DST16ANQI :
4336 fields->f_dst16_an = value;
4338 case M32C_OPERAND_DST16ANQI_S :
4339 fields->f_dst16_rn_QI_s = value;
4341 case M32C_OPERAND_DST16ANSI :
4342 fields->f_dst16_an = value;
4344 case M32C_OPERAND_DST16RNEXTQI :
4345 fields->f_dst16_rn_ext = value;
4347 case M32C_OPERAND_DST16RNHI :
4348 fields->f_dst16_rn = value;
4350 case M32C_OPERAND_DST16RNQI :
4351 fields->f_dst16_rn = value;
4353 case M32C_OPERAND_DST16RNQI_S :
4354 fields->f_dst16_rn_QI_s = value;
4356 case M32C_OPERAND_DST16RNSI :
4357 fields->f_dst16_rn = value;
4359 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
4360 fields->f_dst32_an_unprefixed = value;
4362 case M32C_OPERAND_DST32ANPREFIXED :
4363 fields->f_dst32_an_prefixed = value;
4365 case M32C_OPERAND_DST32ANPREFIXEDHI :
4366 fields->f_dst32_an_prefixed = value;
4368 case M32C_OPERAND_DST32ANPREFIXEDQI :
4369 fields->f_dst32_an_prefixed = value;
4371 case M32C_OPERAND_DST32ANPREFIXEDSI :
4372 fields->f_dst32_an_prefixed = value;
4374 case M32C_OPERAND_DST32ANUNPREFIXED :
4375 fields->f_dst32_an_unprefixed = value;
4377 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
4378 fields->f_dst32_an_unprefixed = value;
4380 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
4381 fields->f_dst32_an_unprefixed = value;
4383 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
4384 fields->f_dst32_an_unprefixed = value;
4386 case M32C_OPERAND_DST32R0HI_S :
4388 case M32C_OPERAND_DST32R0QI_S :
4390 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
4391 fields->f_dst32_rn_ext_unprefixed = value;
4393 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
4394 fields->f_dst32_rn_ext_unprefixed = value;
4396 case M32C_OPERAND_DST32RNPREFIXEDHI :
4397 fields->f_dst32_rn_prefixed_HI = value;
4399 case M32C_OPERAND_DST32RNPREFIXEDQI :
4400 fields->f_dst32_rn_prefixed_QI = value;
4402 case M32C_OPERAND_DST32RNPREFIXEDSI :
4403 fields->f_dst32_rn_prefixed_SI = value;
4405 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
4406 fields->f_dst32_rn_unprefixed_HI = value;
4408 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
4409 fields->f_dst32_rn_unprefixed_QI = value;
4411 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
4412 fields->f_dst32_rn_unprefixed_SI = value;
4414 case M32C_OPERAND_G :
4416 case M32C_OPERAND_IMM_12_S4 :
4417 fields->f_imm_12_s4 = value;
4419 case M32C_OPERAND_IMM_12_S4N :
4420 fields->f_imm_12_s4 = value;
4422 case M32C_OPERAND_IMM_13_U3 :
4423 fields->f_imm_13_u3 = value;
4425 case M32C_OPERAND_IMM_16_HI :
4426 fields->f_dsp_16_s16 = value;
4428 case M32C_OPERAND_IMM_16_QI :
4429 fields->f_dsp_16_s8 = value;
4431 case M32C_OPERAND_IMM_16_SI :
4432 fields->f_dsp_16_s32 = value;
4434 case M32C_OPERAND_IMM_20_S4 :
4435 fields->f_imm_20_s4 = value;
4437 case M32C_OPERAND_IMM_24_HI :
4438 fields->f_dsp_24_s16 = value;
4440 case M32C_OPERAND_IMM_24_QI :
4441 fields->f_dsp_24_s8 = value;
4443 case M32C_OPERAND_IMM_24_SI :
4444 fields->f_dsp_24_s32 = value;
4446 case M32C_OPERAND_IMM_32_HI :
4447 fields->f_dsp_32_s16 = value;
4449 case M32C_OPERAND_IMM_32_QI :
4450 fields->f_dsp_32_s8 = value;
4452 case M32C_OPERAND_IMM_32_SI :
4453 fields->f_dsp_32_s32 = value;
4455 case M32C_OPERAND_IMM_40_HI :
4456 fields->f_dsp_40_s16 = value;
4458 case M32C_OPERAND_IMM_40_QI :
4459 fields->f_dsp_40_s8 = value;
4461 case M32C_OPERAND_IMM_40_SI :
4462 fields->f_dsp_40_s32 = value;
4464 case M32C_OPERAND_IMM_48_HI :
4465 fields->f_dsp_48_s16 = value;
4467 case M32C_OPERAND_IMM_48_QI :
4468 fields->f_dsp_48_s8 = value;
4470 case M32C_OPERAND_IMM_48_SI :
4471 fields->f_dsp_48_s32 = value;
4473 case M32C_OPERAND_IMM_56_HI :
4474 fields->f_dsp_56_s16 = value;
4476 case M32C_OPERAND_IMM_56_QI :
4477 fields->f_dsp_56_s8 = value;
4479 case M32C_OPERAND_IMM_64_HI :
4480 fields->f_dsp_64_s16 = value;
4482 case M32C_OPERAND_IMM_8_HI :
4483 fields->f_dsp_8_s16 = value;
4485 case M32C_OPERAND_IMM_8_QI :
4486 fields->f_dsp_8_s8 = value;
4488 case M32C_OPERAND_IMM_8_S4 :
4489 fields->f_imm_8_s4 = value;
4491 case M32C_OPERAND_IMM_8_S4N :
4492 fields->f_imm_8_s4 = value;
4494 case M32C_OPERAND_IMM_SH_12_S4 :
4495 fields->f_imm_12_s4 = value;
4497 case M32C_OPERAND_IMM_SH_20_S4 :
4498 fields->f_imm_20_s4 = value;
4500 case M32C_OPERAND_IMM_SH_8_S4 :
4501 fields->f_imm_8_s4 = value;
4503 case M32C_OPERAND_IMM1_S :
4504 fields->f_imm1_S = value;
4506 case M32C_OPERAND_IMM3_S :
4507 fields->f_imm3_S = value;
4509 case M32C_OPERAND_LAB_16_8 :
4510 fields->f_lab_16_8 = value;
4512 case M32C_OPERAND_LAB_24_8 :
4513 fields->f_lab_24_8 = value;
4515 case M32C_OPERAND_LAB_32_8 :
4516 fields->f_lab_32_8 = value;
4518 case M32C_OPERAND_LAB_40_8 :
4519 fields->f_lab_40_8 = value;
4521 case M32C_OPERAND_LAB_5_3 :
4522 fields->f_lab_5_3 = value;
4524 case M32C_OPERAND_LAB_8_16 :
4525 fields->f_lab_8_16 = value;
4527 case M32C_OPERAND_LAB_8_24 :
4528 fields->f_lab_8_24 = value;
4530 case M32C_OPERAND_LAB_8_8 :
4531 fields->f_lab_8_8 = value;
4533 case M32C_OPERAND_LAB32_JMP_S :
4534 fields->f_lab32_jmp_s = value;
4536 case M32C_OPERAND_Q :
4538 case M32C_OPERAND_R0 :
4540 case M32C_OPERAND_R0H :
4542 case M32C_OPERAND_R0L :
4544 case M32C_OPERAND_R1 :
4546 case M32C_OPERAND_R1R2R0 :
4548 case M32C_OPERAND_R2 :
4550 case M32C_OPERAND_R2R0 :
4552 case M32C_OPERAND_R3 :
4554 case M32C_OPERAND_R3R1 :
4556 case M32C_OPERAND_REGSETPOP :
4557 fields->f_8_8 = value;
4559 case M32C_OPERAND_REGSETPUSH :
4560 fields->f_8_8 = value;
4562 case M32C_OPERAND_RN16_PUSH_S :
4563 fields->f_4_1 = value;
4565 case M32C_OPERAND_S :
4567 case M32C_OPERAND_SRC16AN :
4568 fields->f_src16_an = value;
4570 case M32C_OPERAND_SRC16ANHI :
4571 fields->f_src16_an = value;
4573 case M32C_OPERAND_SRC16ANQI :
4574 fields->f_src16_an = value;
4576 case M32C_OPERAND_SRC16RNHI :
4577 fields->f_src16_rn = value;
4579 case M32C_OPERAND_SRC16RNQI :
4580 fields->f_src16_rn = value;
4582 case M32C_OPERAND_SRC32ANPREFIXED :
4583 fields->f_src32_an_prefixed = value;
4585 case M32C_OPERAND_SRC32ANPREFIXEDHI :
4586 fields->f_src32_an_prefixed = value;
4588 case M32C_OPERAND_SRC32ANPREFIXEDQI :
4589 fields->f_src32_an_prefixed = value;
4591 case M32C_OPERAND_SRC32ANPREFIXEDSI :
4592 fields->f_src32_an_prefixed = value;
4594 case M32C_OPERAND_SRC32ANUNPREFIXED :
4595 fields->f_src32_an_unprefixed = value;
4597 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
4598 fields->f_src32_an_unprefixed = value;
4600 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
4601 fields->f_src32_an_unprefixed = value;
4603 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
4604 fields->f_src32_an_unprefixed = value;
4606 case M32C_OPERAND_SRC32RNPREFIXEDHI :
4607 fields->f_src32_rn_prefixed_HI = value;
4609 case M32C_OPERAND_SRC32RNPREFIXEDQI :
4610 fields->f_src32_rn_prefixed_QI = value;
4612 case M32C_OPERAND_SRC32RNPREFIXEDSI :
4613 fields->f_src32_rn_prefixed_SI = value;
4615 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
4616 fields->f_src32_rn_unprefixed_HI = value;
4618 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
4619 fields->f_src32_rn_unprefixed_QI = value;
4621 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
4622 fields->f_src32_rn_unprefixed_SI = value;
4624 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
4625 fields->f_5_1 = value;
4627 case M32C_OPERAND_X :
4629 case M32C_OPERAND_Z :
4631 case M32C_OPERAND_COND16_16 :
4632 fields->f_dsp_16_u8 = value;
4634 case M32C_OPERAND_COND16_24 :
4635 fields->f_dsp_24_u8 = value;
4637 case M32C_OPERAND_COND16_32 :
4638 fields->f_dsp_32_u8 = value;
4640 case M32C_OPERAND_COND16C :
4641 fields->f_cond16 = value;
4643 case M32C_OPERAND_COND16J :
4644 fields->f_cond16 = value;
4646 case M32C_OPERAND_COND16J5 :
4647 fields->f_cond16j_5 = value;
4649 case M32C_OPERAND_COND32 :
4650 fields->f_cond32 = value;
4652 case M32C_OPERAND_COND32_16 :
4653 fields->f_dsp_16_u8 = value;
4655 case M32C_OPERAND_COND32_24 :
4656 fields->f_dsp_24_u8 = value;
4658 case M32C_OPERAND_COND32_32 :
4659 fields->f_dsp_32_u8 = value;
4661 case M32C_OPERAND_COND32_40 :
4662 fields->f_dsp_40_u8 = value;
4664 case M32C_OPERAND_COND32J :
4665 fields->f_cond32j = value;
4667 case M32C_OPERAND_CR1_PREFIXED_32 :
4668 fields->f_21_3 = value;
4670 case M32C_OPERAND_CR1_UNPREFIXED_32 :
4671 fields->f_13_3 = value;
4673 case M32C_OPERAND_CR16 :
4674 fields->f_9_3 = value;
4676 case M32C_OPERAND_CR2_32 :
4677 fields->f_13_3 = value;
4679 case M32C_OPERAND_CR3_PREFIXED_32 :
4680 fields->f_21_3 = value;
4682 case M32C_OPERAND_CR3_UNPREFIXED_32 :
4683 fields->f_13_3 = value;
4685 case M32C_OPERAND_FLAGS16 :
4686 fields->f_9_3 = value;
4688 case M32C_OPERAND_FLAGS32 :
4689 fields->f_13_3 = value;
4691 case M32C_OPERAND_SCCOND32 :
4692 fields->f_cond16 = value;
4694 case M32C_OPERAND_SIZE :
4698 /* xgettext:c-format */
4699 fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
4706 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
4708 CGEN_FIELDS * fields,
4713 case M32C_OPERAND_A0 :
4715 case M32C_OPERAND_A1 :
4717 case M32C_OPERAND_AN16_PUSH_S :
4718 fields->f_4_1 = value;
4720 case M32C_OPERAND_BIT16AN :
4721 fields->f_dst16_an = value;
4723 case M32C_OPERAND_BIT16RN :
4724 fields->f_dst16_rn = value;
4726 case M32C_OPERAND_BIT3_S :
4727 fields->f_imm3_S = value;
4729 case M32C_OPERAND_BIT32ANPREFIXED :
4730 fields->f_dst32_an_prefixed = value;
4732 case M32C_OPERAND_BIT32ANUNPREFIXED :
4733 fields->f_dst32_an_unprefixed = value;
4735 case M32C_OPERAND_BIT32RNPREFIXED :
4736 fields->f_dst32_rn_prefixed_QI = value;
4738 case M32C_OPERAND_BIT32RNUNPREFIXED :
4739 fields->f_dst32_rn_unprefixed_QI = value;
4741 case M32C_OPERAND_BITBASE16_16_S8 :
4742 fields->f_dsp_16_s8 = value;
4744 case M32C_OPERAND_BITBASE16_16_U16 :
4745 fields->f_dsp_16_u16 = value;
4747 case M32C_OPERAND_BITBASE16_16_U8 :
4748 fields->f_dsp_16_u8 = value;
4750 case M32C_OPERAND_BITBASE16_8_U11_S :
4751 fields->f_bitbase16_u11_S = value;
4753 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
4754 fields->f_bitbase32_16_s11_unprefixed = value;
4756 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
4757 fields->f_bitbase32_16_s19_unprefixed = value;
4759 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
4760 fields->f_bitbase32_16_u11_unprefixed = value;
4762 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
4763 fields->f_bitbase32_16_u19_unprefixed = value;
4765 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
4766 fields->f_bitbase32_16_u27_unprefixed = value;
4768 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
4769 fields->f_bitbase32_24_s11_prefixed = value;
4771 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
4772 fields->f_bitbase32_24_s19_prefixed = value;
4774 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
4775 fields->f_bitbase32_24_u11_prefixed = value;
4777 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
4778 fields->f_bitbase32_24_u19_prefixed = value;
4780 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
4781 fields->f_bitbase32_24_u27_prefixed = value;
4783 case M32C_OPERAND_BITNO16R :
4784 fields->f_dsp_16_u8 = value;
4786 case M32C_OPERAND_BITNO32PREFIXED :
4787 fields->f_bitno32_prefixed = value;
4789 case M32C_OPERAND_BITNO32UNPREFIXED :
4790 fields->f_bitno32_unprefixed = value;
4792 case M32C_OPERAND_DSP_10_U6 :
4793 fields->f_dsp_10_u6 = value;
4795 case M32C_OPERAND_DSP_16_S16 :
4796 fields->f_dsp_16_s16 = value;
4798 case M32C_OPERAND_DSP_16_S8 :
4799 fields->f_dsp_16_s8 = value;
4801 case M32C_OPERAND_DSP_16_U16 :
4802 fields->f_dsp_16_u16 = value;
4804 case M32C_OPERAND_DSP_16_U20 :
4805 fields->f_dsp_16_u24 = value;
4807 case M32C_OPERAND_DSP_16_U24 :
4808 fields->f_dsp_16_u24 = value;
4810 case M32C_OPERAND_DSP_16_U8 :
4811 fields->f_dsp_16_u8 = value;
4813 case M32C_OPERAND_DSP_24_S16 :
4814 fields->f_dsp_24_s16 = value;
4816 case M32C_OPERAND_DSP_24_S8 :
4817 fields->f_dsp_24_s8 = value;
4819 case M32C_OPERAND_DSP_24_U16 :
4820 fields->f_dsp_24_u16 = value;
4822 case M32C_OPERAND_DSP_24_U20 :
4823 fields->f_dsp_24_u24 = value;
4825 case M32C_OPERAND_DSP_24_U24 :
4826 fields->f_dsp_24_u24 = value;
4828 case M32C_OPERAND_DSP_24_U8 :
4829 fields->f_dsp_24_u8 = value;
4831 case M32C_OPERAND_DSP_32_S16 :
4832 fields->f_dsp_32_s16 = value;
4834 case M32C_OPERAND_DSP_32_S8 :
4835 fields->f_dsp_32_s8 = value;
4837 case M32C_OPERAND_DSP_32_U16 :
4838 fields->f_dsp_32_u16 = value;
4840 case M32C_OPERAND_DSP_32_U20 :
4841 fields->f_dsp_32_u24 = value;
4843 case M32C_OPERAND_DSP_32_U24 :
4844 fields->f_dsp_32_u24 = value;
4846 case M32C_OPERAND_DSP_32_U8 :
4847 fields->f_dsp_32_u8 = value;
4849 case M32C_OPERAND_DSP_40_S16 :
4850 fields->f_dsp_40_s16 = value;
4852 case M32C_OPERAND_DSP_40_S8 :
4853 fields->f_dsp_40_s8 = value;
4855 case M32C_OPERAND_DSP_40_U16 :
4856 fields->f_dsp_40_u16 = value;
4858 case M32C_OPERAND_DSP_40_U20 :
4859 fields->f_dsp_40_u20 = value;
4861 case M32C_OPERAND_DSP_40_U24 :
4862 fields->f_dsp_40_u24 = value;
4864 case M32C_OPERAND_DSP_40_U8 :
4865 fields->f_dsp_40_u8 = value;
4867 case M32C_OPERAND_DSP_48_S16 :
4868 fields->f_dsp_48_s16 = value;
4870 case M32C_OPERAND_DSP_48_S8 :
4871 fields->f_dsp_48_s8 = value;
4873 case M32C_OPERAND_DSP_48_U16 :
4874 fields->f_dsp_48_u16 = value;
4876 case M32C_OPERAND_DSP_48_U20 :
4877 fields->f_dsp_48_u20 = value;
4879 case M32C_OPERAND_DSP_48_U24 :
4880 fields->f_dsp_48_u24 = value;
4882 case M32C_OPERAND_DSP_48_U8 :
4883 fields->f_dsp_48_u8 = value;
4885 case M32C_OPERAND_DSP_8_S24 :
4886 fields->f_dsp_8_s24 = value;
4888 case M32C_OPERAND_DSP_8_S8 :
4889 fields->f_dsp_8_s8 = value;
4891 case M32C_OPERAND_DSP_8_U16 :
4892 fields->f_dsp_8_u16 = value;
4894 case M32C_OPERAND_DSP_8_U24 :
4895 fields->f_dsp_8_u24 = value;
4897 case M32C_OPERAND_DSP_8_U6 :
4898 fields->f_dsp_8_u6 = value;
4900 case M32C_OPERAND_DSP_8_U8 :
4901 fields->f_dsp_8_u8 = value;
4903 case M32C_OPERAND_DST16AN :
4904 fields->f_dst16_an = value;
4906 case M32C_OPERAND_DST16AN_S :
4907 fields->f_dst16_an_s = value;
4909 case M32C_OPERAND_DST16ANHI :
4910 fields->f_dst16_an = value;
4912 case M32C_OPERAND_DST16ANQI :
4913 fields->f_dst16_an = value;
4915 case M32C_OPERAND_DST16ANQI_S :
4916 fields->f_dst16_rn_QI_s = value;
4918 case M32C_OPERAND_DST16ANSI :
4919 fields->f_dst16_an = value;
4921 case M32C_OPERAND_DST16RNEXTQI :
4922 fields->f_dst16_rn_ext = value;
4924 case M32C_OPERAND_DST16RNHI :
4925 fields->f_dst16_rn = value;
4927 case M32C_OPERAND_DST16RNQI :
4928 fields->f_dst16_rn = value;
4930 case M32C_OPERAND_DST16RNQI_S :
4931 fields->f_dst16_rn_QI_s = value;
4933 case M32C_OPERAND_DST16RNSI :
4934 fields->f_dst16_rn = value;
4936 case M32C_OPERAND_DST32ANEXTUNPREFIXED :
4937 fields->f_dst32_an_unprefixed = value;
4939 case M32C_OPERAND_DST32ANPREFIXED :
4940 fields->f_dst32_an_prefixed = value;
4942 case M32C_OPERAND_DST32ANPREFIXEDHI :
4943 fields->f_dst32_an_prefixed = value;
4945 case M32C_OPERAND_DST32ANPREFIXEDQI :
4946 fields->f_dst32_an_prefixed = value;
4948 case M32C_OPERAND_DST32ANPREFIXEDSI :
4949 fields->f_dst32_an_prefixed = value;
4951 case M32C_OPERAND_DST32ANUNPREFIXED :
4952 fields->f_dst32_an_unprefixed = value;
4954 case M32C_OPERAND_DST32ANUNPREFIXEDHI :
4955 fields->f_dst32_an_unprefixed = value;
4957 case M32C_OPERAND_DST32ANUNPREFIXEDQI :
4958 fields->f_dst32_an_unprefixed = value;
4960 case M32C_OPERAND_DST32ANUNPREFIXEDSI :
4961 fields->f_dst32_an_unprefixed = value;
4963 case M32C_OPERAND_DST32R0HI_S :
4965 case M32C_OPERAND_DST32R0QI_S :
4967 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
4968 fields->f_dst32_rn_ext_unprefixed = value;
4970 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
4971 fields->f_dst32_rn_ext_unprefixed = value;
4973 case M32C_OPERAND_DST32RNPREFIXEDHI :
4974 fields->f_dst32_rn_prefixed_HI = value;
4976 case M32C_OPERAND_DST32RNPREFIXEDQI :
4977 fields->f_dst32_rn_prefixed_QI = value;
4979 case M32C_OPERAND_DST32RNPREFIXEDSI :
4980 fields->f_dst32_rn_prefixed_SI = value;
4982 case M32C_OPERAND_DST32RNUNPREFIXEDHI :
4983 fields->f_dst32_rn_unprefixed_HI = value;
4985 case M32C_OPERAND_DST32RNUNPREFIXEDQI :
4986 fields->f_dst32_rn_unprefixed_QI = value;
4988 case M32C_OPERAND_DST32RNUNPREFIXEDSI :
4989 fields->f_dst32_rn_unprefixed_SI = value;
4991 case M32C_OPERAND_G :
4993 case M32C_OPERAND_IMM_12_S4 :
4994 fields->f_imm_12_s4 = value;
4996 case M32C_OPERAND_IMM_12_S4N :
4997 fields->f_imm_12_s4 = value;
4999 case M32C_OPERAND_IMM_13_U3 :
5000 fields->f_imm_13_u3 = value;
5002 case M32C_OPERAND_IMM_16_HI :
5003 fields->f_dsp_16_s16 = value;
5005 case M32C_OPERAND_IMM_16_QI :
5006 fields->f_dsp_16_s8 = value;
5008 case M32C_OPERAND_IMM_16_SI :
5009 fields->f_dsp_16_s32 = value;
5011 case M32C_OPERAND_IMM_20_S4 :
5012 fields->f_imm_20_s4 = value;
5014 case M32C_OPERAND_IMM_24_HI :
5015 fields->f_dsp_24_s16 = value;
5017 case M32C_OPERAND_IMM_24_QI :
5018 fields->f_dsp_24_s8 = value;
5020 case M32C_OPERAND_IMM_24_SI :
5021 fields->f_dsp_24_s32 = value;
5023 case M32C_OPERAND_IMM_32_HI :
5024 fields->f_dsp_32_s16 = value;
5026 case M32C_OPERAND_IMM_32_QI :
5027 fields->f_dsp_32_s8 = value;
5029 case M32C_OPERAND_IMM_32_SI :
5030 fields->f_dsp_32_s32 = value;
5032 case M32C_OPERAND_IMM_40_HI :
5033 fields->f_dsp_40_s16 = value;
5035 case M32C_OPERAND_IMM_40_QI :
5036 fields->f_dsp_40_s8 = value;
5038 case M32C_OPERAND_IMM_40_SI :
5039 fields->f_dsp_40_s32 = value;
5041 case M32C_OPERAND_IMM_48_HI :
5042 fields->f_dsp_48_s16 = value;
5044 case M32C_OPERAND_IMM_48_QI :
5045 fields->f_dsp_48_s8 = value;
5047 case M32C_OPERAND_IMM_48_SI :
5048 fields->f_dsp_48_s32 = value;
5050 case M32C_OPERAND_IMM_56_HI :
5051 fields->f_dsp_56_s16 = value;
5053 case M32C_OPERAND_IMM_56_QI :
5054 fields->f_dsp_56_s8 = value;
5056 case M32C_OPERAND_IMM_64_HI :
5057 fields->f_dsp_64_s16 = value;
5059 case M32C_OPERAND_IMM_8_HI :
5060 fields->f_dsp_8_s16 = value;
5062 case M32C_OPERAND_IMM_8_QI :
5063 fields->f_dsp_8_s8 = value;
5065 case M32C_OPERAND_IMM_8_S4 :
5066 fields->f_imm_8_s4 = value;
5068 case M32C_OPERAND_IMM_8_S4N :
5069 fields->f_imm_8_s4 = value;
5071 case M32C_OPERAND_IMM_SH_12_S4 :
5072 fields->f_imm_12_s4 = value;
5074 case M32C_OPERAND_IMM_SH_20_S4 :
5075 fields->f_imm_20_s4 = value;
5077 case M32C_OPERAND_IMM_SH_8_S4 :
5078 fields->f_imm_8_s4 = value;
5080 case M32C_OPERAND_IMM1_S :
5081 fields->f_imm1_S = value;
5083 case M32C_OPERAND_IMM3_S :
5084 fields->f_imm3_S = value;
5086 case M32C_OPERAND_LAB_16_8 :
5087 fields->f_lab_16_8 = value;
5089 case M32C_OPERAND_LAB_24_8 :
5090 fields->f_lab_24_8 = value;
5092 case M32C_OPERAND_LAB_32_8 :
5093 fields->f_lab_32_8 = value;
5095 case M32C_OPERAND_LAB_40_8 :
5096 fields->f_lab_40_8 = value;
5098 case M32C_OPERAND_LAB_5_3 :
5099 fields->f_lab_5_3 = value;
5101 case M32C_OPERAND_LAB_8_16 :
5102 fields->f_lab_8_16 = value;
5104 case M32C_OPERAND_LAB_8_24 :
5105 fields->f_lab_8_24 = value;
5107 case M32C_OPERAND_LAB_8_8 :
5108 fields->f_lab_8_8 = value;
5110 case M32C_OPERAND_LAB32_JMP_S :
5111 fields->f_lab32_jmp_s = value;
5113 case M32C_OPERAND_Q :
5115 case M32C_OPERAND_R0 :
5117 case M32C_OPERAND_R0H :
5119 case M32C_OPERAND_R0L :
5121 case M32C_OPERAND_R1 :
5123 case M32C_OPERAND_R1R2R0 :
5125 case M32C_OPERAND_R2 :
5127 case M32C_OPERAND_R2R0 :
5129 case M32C_OPERAND_R3 :
5131 case M32C_OPERAND_R3R1 :
5133 case M32C_OPERAND_REGSETPOP :
5134 fields->f_8_8 = value;
5136 case M32C_OPERAND_REGSETPUSH :
5137 fields->f_8_8 = value;
5139 case M32C_OPERAND_RN16_PUSH_S :
5140 fields->f_4_1 = value;
5142 case M32C_OPERAND_S :
5144 case M32C_OPERAND_SRC16AN :
5145 fields->f_src16_an = value;
5147 case M32C_OPERAND_SRC16ANHI :
5148 fields->f_src16_an = value;
5150 case M32C_OPERAND_SRC16ANQI :
5151 fields->f_src16_an = value;
5153 case M32C_OPERAND_SRC16RNHI :
5154 fields->f_src16_rn = value;
5156 case M32C_OPERAND_SRC16RNQI :
5157 fields->f_src16_rn = value;
5159 case M32C_OPERAND_SRC32ANPREFIXED :
5160 fields->f_src32_an_prefixed = value;
5162 case M32C_OPERAND_SRC32ANPREFIXEDHI :
5163 fields->f_src32_an_prefixed = value;
5165 case M32C_OPERAND_SRC32ANPREFIXEDQI :
5166 fields->f_src32_an_prefixed = value;
5168 case M32C_OPERAND_SRC32ANPREFIXEDSI :
5169 fields->f_src32_an_prefixed = value;
5171 case M32C_OPERAND_SRC32ANUNPREFIXED :
5172 fields->f_src32_an_unprefixed = value;
5174 case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
5175 fields->f_src32_an_unprefixed = value;
5177 case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
5178 fields->f_src32_an_unprefixed = value;
5180 case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
5181 fields->f_src32_an_unprefixed = value;
5183 case M32C_OPERAND_SRC32RNPREFIXEDHI :
5184 fields->f_src32_rn_prefixed_HI = value;
5186 case M32C_OPERAND_SRC32RNPREFIXEDQI :
5187 fields->f_src32_rn_prefixed_QI = value;
5189 case M32C_OPERAND_SRC32RNPREFIXEDSI :
5190 fields->f_src32_rn_prefixed_SI = value;
5192 case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
5193 fields->f_src32_rn_unprefixed_HI = value;
5195 case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
5196 fields->f_src32_rn_unprefixed_QI = value;
5198 case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
5199 fields->f_src32_rn_unprefixed_SI = value;
5201 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
5202 fields->f_5_1 = value;
5204 case M32C_OPERAND_X :
5206 case M32C_OPERAND_Z :
5208 case M32C_OPERAND_COND16_16 :
5209 fields->f_dsp_16_u8 = value;
5211 case M32C_OPERAND_COND16_24 :
5212 fields->f_dsp_24_u8 = value;
5214 case M32C_OPERAND_COND16_32 :
5215 fields->f_dsp_32_u8 = value;
5217 case M32C_OPERAND_COND16C :
5218 fields->f_cond16 = value;
5220 case M32C_OPERAND_COND16J :
5221 fields->f_cond16 = value;
5223 case M32C_OPERAND_COND16J5 :
5224 fields->f_cond16j_5 = value;
5226 case M32C_OPERAND_COND32 :
5227 fields->f_cond32 = value;
5229 case M32C_OPERAND_COND32_16 :
5230 fields->f_dsp_16_u8 = value;
5232 case M32C_OPERAND_COND32_24 :
5233 fields->f_dsp_24_u8 = value;
5235 case M32C_OPERAND_COND32_32 :
5236 fields->f_dsp_32_u8 = value;
5238 case M32C_OPERAND_COND32_40 :
5239 fields->f_dsp_40_u8 = value;
5241 case M32C_OPERAND_COND32J :
5242 fields->f_cond32j = value;
5244 case M32C_OPERAND_CR1_PREFIXED_32 :
5245 fields->f_21_3 = value;
5247 case M32C_OPERAND_CR1_UNPREFIXED_32 :
5248 fields->f_13_3 = value;
5250 case M32C_OPERAND_CR16 :
5251 fields->f_9_3 = value;
5253 case M32C_OPERAND_CR2_32 :
5254 fields->f_13_3 = value;
5256 case M32C_OPERAND_CR3_PREFIXED_32 :
5257 fields->f_21_3 = value;
5259 case M32C_OPERAND_CR3_UNPREFIXED_32 :
5260 fields->f_13_3 = value;
5262 case M32C_OPERAND_FLAGS16 :
5263 fields->f_9_3 = value;
5265 case M32C_OPERAND_FLAGS32 :
5266 fields->f_13_3 = value;
5268 case M32C_OPERAND_SCCOND32 :
5269 fields->f_cond16 = value;
5271 case M32C_OPERAND_SIZE :
5275 /* xgettext:c-format */
5276 fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"),
5282 /* Function to call before using the instruction builder tables. */
5285 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd)
5287 cd->insert_handlers = & m32c_cgen_insert_handlers[0];
5288 cd->extract_handlers = & m32c_cgen_extract_handlers[0];
5290 cd->insert_operand = m32c_cgen_insert_operand;
5291 cd->extract_operand = m32c_cgen_extract_operand;
5293 cd->get_int_operand = m32c_cgen_get_int_operand;
5294 cd->set_int_operand = m32c_cgen_set_int_operand;
5295 cd->get_vma_operand = m32c_cgen_get_vma_operand;
5296 cd->set_vma_operand = m32c_cgen_set_vma_operand;