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-2024 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
,
88 unsigned long x
, mask
;
91 x
= cgen_get_insn_value (cd
, bufp
, word_length
, cd
->endian
);
93 /* Written this way to avoid undefined behaviour. */
94 mask
= (1UL << (length
- 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
, cd
->endian
);
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];
136 /* If LENGTH is zero, this operand doesn't contribute to the value. */
140 /* Written this way to avoid undefined behaviour. */
141 mask
= (1UL << (length
- 1) << 1) - 1;
143 if (word_length
> 8 * sizeof (CGEN_INSN_INT
))
146 /* For architectures with insns smaller than the base-insn-bitsize,
147 word_length may be too big. */
148 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
151 && word_length
> total_length
)
152 word_length
= total_length
;
155 /* Ensure VALUE will fit. */
156 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGN_OPT
))
158 long minval
= - (1UL << (length
- 1));
159 unsigned long maxval
= mask
;
161 if ((value
> 0 && (unsigned long) value
> maxval
)
164 /* xgettext:c-format */
166 _("operand out of range (%ld not between %ld and %lu)"),
167 value
, minval
, maxval
);
171 else if (! CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
))
173 unsigned long maxval
= mask
;
174 unsigned long val
= (unsigned long) value
;
176 /* For hosts with a word size > 32 check to see if value has been sign
177 extended beyond 32 bits. If so then ignore these higher sign bits
178 as the user is attempting to store a 32-bit signed value into an
179 unsigned 32-bit field which is allowed. */
180 if (sizeof (unsigned long) > 4 && ((value
>> 32) == -1))
185 /* xgettext:c-format */
187 _("operand out of range (0x%lx not between 0 and 0x%lx)"),
194 if (! cgen_signed_overflow_ok_p (cd
))
196 long minval
= - (1UL << (length
- 1));
197 long maxval
= (1UL << (length
- 1)) - 1;
199 if (value
< minval
|| value
> maxval
)
202 /* xgettext:c-format */
203 (errbuf
, _("operand out of range (%ld not between %ld and %ld)"),
204 value
, minval
, maxval
);
213 int shift_within_word
, shift_to_word
, shift
;
215 /* How to shift the value to BIT0 of the word. */
216 shift_to_word
= total_length
- (word_offset
+ word_length
);
218 /* How to shift the value to the field within the word. */
219 if (CGEN_INSN_LSB0_P
)
220 shift_within_word
= start
+ 1 - length
;
222 shift_within_word
= word_length
- start
- length
;
224 /* The total SHIFT, then mask in the value. */
225 shift
= shift_to_word
+ shift_within_word
;
226 *buffer
= (*buffer
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
229 #else /* ! CGEN_INT_INSN_P */
232 unsigned char *bufp
= (unsigned char *) buffer
+ word_offset
/ 8;
234 insert_1 (cd
, value
, start
, length
, word_length
, bufp
);
237 #endif /* ! CGEN_INT_INSN_P */
242 /* Default insn builder (insert handler).
243 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
244 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
245 recorded in host byte order, otherwise BUFFER is an array of bytes
246 and the value is recorded in target byte order).
247 The result is an error message or NULL if success. */
250 insert_insn_normal (CGEN_CPU_DESC cd
,
251 const CGEN_INSN
* insn
,
252 CGEN_FIELDS
* fields
,
253 CGEN_INSN_BYTES_PTR buffer
,
256 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
258 const CGEN_SYNTAX_CHAR_TYPE
* syn
;
260 CGEN_INIT_INSERT (cd
);
261 value
= CGEN_INSN_BASE_VALUE (insn
);
263 /* If we're recording insns as numbers (rather than a string of bytes),
264 target byte order handling is deferred until later. */
268 put_insn_int_value (cd
, buffer
, cd
->base_insn_bitsize
,
269 CGEN_FIELDS_BITSIZE (fields
), value
);
273 cgen_put_insn_value (cd
, buffer
, min ((unsigned) cd
->base_insn_bitsize
,
274 (unsigned) CGEN_FIELDS_BITSIZE (fields
)),
275 value
, cd
->insn_endian
);
277 #endif /* ! CGEN_INT_INSN_P */
279 /* ??? It would be better to scan the format's fields.
280 Still need to be able to insert a value based on the operand though;
281 e.g. storing a branch displacement that got resolved later.
282 Needs more thought first. */
284 for (syn
= CGEN_SYNTAX_STRING (syntax
); * syn
; ++ syn
)
288 if (CGEN_SYNTAX_CHAR_P (* syn
))
291 errmsg
= (* cd
->insert_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
301 /* Cover function to store an insn value into an integral insn. Must go here
302 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
305 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
306 CGEN_INSN_BYTES_PTR buf
,
311 /* For architectures with insns smaller than the base-insn-bitsize,
312 length may be too big. */
313 if (length
> insn_length
)
317 int shift
= insn_length
- length
;
318 /* Written this way to avoid undefined behaviour. */
319 CGEN_INSN_INT mask
= length
== 0 ? 0 : (1UL << (length
- 1) << 1) - 1;
321 *buf
= (*buf
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
326 /* Operand extraction. */
328 #if ! CGEN_INT_INSN_P
330 /* Subroutine of extract_normal.
331 Ensure sufficient bytes are cached in EX_INFO.
332 OFFSET is the offset in bytes from the start of the insn of the value.
333 BYTES is the length of the needed value.
334 Returns 1 for success, 0 for failure. */
336 static CGEN_INLINE
int
337 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
338 CGEN_EXTRACT_INFO
*ex_info
,
343 /* It's doubtful that the middle part has already been fetched so
344 we don't optimize that case. kiss. */
346 disassemble_info
*info
= (disassemble_info
*) ex_info
->dis_info
;
348 /* First do a quick check. */
349 mask
= (1 << bytes
) - 1;
350 if (((ex_info
->valid
>> offset
) & mask
) == mask
)
353 /* Search for the first byte we need to read. */
354 for (mask
= 1 << offset
; bytes
> 0; --bytes
, ++offset
, mask
<<= 1)
355 if (! (mask
& ex_info
->valid
))
363 status
= (*info
->read_memory_func
)
364 (pc
, ex_info
->insn_bytes
+ offset
, bytes
, info
);
368 (*info
->memory_error_func
) (status
, pc
, info
);
372 ex_info
->valid
|= ((1 << bytes
) - 1) << offset
;
378 /* Subroutine of extract_normal. */
380 static CGEN_INLINE
long
381 extract_1 (CGEN_CPU_DESC cd
,
382 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
387 bfd_vma pc ATTRIBUTE_UNUSED
)
392 x
= cgen_get_insn_value (cd
, bufp
, word_length
, cd
->endian
);
394 if (CGEN_INSN_LSB0_P
)
395 shift
= (start
+ 1) - length
;
397 shift
= (word_length
- (start
+ length
));
401 #endif /* ! CGEN_INT_INSN_P */
403 /* Default extraction routine.
405 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
406 or sometimes less for cases like the m32r where the base insn size is 32
407 but some insns are 16 bits.
408 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
409 but for generality we take a bitmask of all of them.
410 WORD_OFFSET is the offset in bits from the start of the insn of the value.
411 WORD_LENGTH is the length of the word in bits in which the value resides.
412 START is the starting bit number in the word, architecture origin.
413 LENGTH is the length of VALUE in bits.
414 TOTAL_LENGTH is the total length of the insn in bits.
416 Returns 1 for success, 0 for failure. */
418 /* ??? The return code isn't properly used. wip. */
420 /* ??? This doesn't handle bfd_vma's. Create another function when
424 extract_normal (CGEN_CPU_DESC cd
,
425 #if ! CGEN_INT_INSN_P
426 CGEN_EXTRACT_INFO
*ex_info
,
428 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
430 CGEN_INSN_INT insn_value
,
432 unsigned int word_offset
,
435 unsigned int word_length
,
436 unsigned int total_length
,
437 #if ! CGEN_INT_INSN_P
440 bfd_vma pc ATTRIBUTE_UNUSED
,
446 /* If LENGTH is zero, this operand doesn't contribute to the value
447 so give it a standard value of zero. */
454 if (word_length
> 8 * sizeof (CGEN_INSN_INT
))
457 /* For architectures with insns smaller than the insn-base-bitsize,
458 word_length may be too big. */
459 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
461 if (word_offset
+ word_length
> total_length
)
462 word_length
= total_length
- word_offset
;
465 /* Does the value reside in INSN_VALUE, and at the right alignment? */
467 if (CGEN_INT_INSN_P
|| (word_offset
== 0 && word_length
== total_length
))
469 if (CGEN_INSN_LSB0_P
)
470 value
= insn_value
>> ((word_offset
+ start
+ 1) - length
);
472 value
= insn_value
>> (total_length
- ( word_offset
+ start
+ length
));
475 #if ! CGEN_INT_INSN_P
479 unsigned char *bufp
= ex_info
->insn_bytes
+ word_offset
/ 8;
481 if (word_length
> 8 * sizeof (CGEN_INSN_INT
))
484 if (fill_cache (cd
, ex_info
, word_offset
/ 8, word_length
/ 8, pc
) == 0)
490 value
= extract_1 (cd
, ex_info
, start
, length
, word_length
, bufp
, pc
);
493 #endif /* ! CGEN_INT_INSN_P */
495 /* Written this way to avoid undefined behaviour. */
496 mask
= (1UL << (length
- 1) << 1) - 1;
500 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
)
501 && (value
& (1UL << (length
- 1))))
509 /* Default insn extractor.
511 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
512 The extracted fields are stored in FIELDS.
513 EX_INFO is used to handle reading variable length insns.
514 Return the length of the insn in bits, or 0 if no match,
515 or -1 if an error occurs fetching data (memory_error_func will have
519 extract_insn_normal (CGEN_CPU_DESC cd
,
520 const CGEN_INSN
*insn
,
521 CGEN_EXTRACT_INFO
*ex_info
,
522 CGEN_INSN_INT insn_value
,
526 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
527 const CGEN_SYNTAX_CHAR_TYPE
*syn
;
529 CGEN_FIELDS_BITSIZE (fields
) = CGEN_INSN_BITSIZE (insn
);
531 CGEN_INIT_EXTRACT (cd
);
533 for (syn
= CGEN_SYNTAX_STRING (syntax
); *syn
; ++syn
)
537 if (CGEN_SYNTAX_CHAR_P (*syn
))
540 length
= (* cd
->extract_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
541 ex_info
, insn_value
, fields
, pc
);
546 /* We recognized and successfully extracted this insn. */
547 return CGEN_INSN_BITSIZE (insn
);
550 /* Machine generated code added here. */
552 const char * m32c_cgen_insert_operand
553 (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
555 /* Main entry point for operand insertion.
557 This function is basically just a big switch statement. Earlier versions
558 used tables to look up the function to use, but
559 - if the table contains both assembler and disassembler functions then
560 the disassembler contains much of the assembler and vice-versa,
561 - there's a lot of inlining possibilities as things grow,
562 - using a switch statement avoids the function call overhead.
564 This function could be moved into `parse_insn_normal', but keeping it
565 separate makes clear the interface between `parse_insn_normal' and each of
566 the handlers. It's also needed by GAS to insert operands that couldn't be
567 resolved during parsing. */
570 m32c_cgen_insert_operand (CGEN_CPU_DESC cd
,
572 CGEN_FIELDS
* fields
,
573 CGEN_INSN_BYTES_PTR buffer
,
574 bfd_vma pc ATTRIBUTE_UNUSED
)
576 const char * errmsg
= NULL
;
577 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
581 case M32C_OPERAND_A0
:
583 case M32C_OPERAND_A1
:
585 case M32C_OPERAND_AN16_PUSH_S
:
586 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
588 case M32C_OPERAND_BIT16AN
:
589 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
591 case M32C_OPERAND_BIT16RN
:
592 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
594 case M32C_OPERAND_BIT3_S
:
597 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
598 FLD (f_2_2
) = ((((UINT
) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
600 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
603 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
608 case M32C_OPERAND_BIT32ANPREFIXED
:
609 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
611 case M32C_OPERAND_BIT32ANUNPREFIXED
:
612 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
614 case M32C_OPERAND_BIT32RNPREFIXED
:
616 long value
= fields
->f_dst32_rn_prefixed_QI
;
617 value
= (((((~ (((value
) << (1))))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
618 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
621 case M32C_OPERAND_BIT32RNUNPREFIXED
:
623 long value
= fields
->f_dst32_rn_unprefixed_QI
;
624 value
= (((((~ (((value
) << (1))))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
625 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
628 case M32C_OPERAND_BITBASE16_16_S8
:
629 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
631 case M32C_OPERAND_BITBASE16_16_U16
:
633 long value
= fields
->f_dsp_16_u16
;
634 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
635 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
638 case M32C_OPERAND_BITBASE16_16_U8
:
639 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
641 case M32C_OPERAND_BITBASE16_8_U11_S
:
644 FLD (f_bitno16_S
) = ((FLD (f_bitbase16_u11_S
)) & (7));
645 FLD (f_dsp_8_u8
) = ((((UINT
) (FLD (f_bitbase16_u11_S
)) >> (3))) & (255));
647 errmsg
= insert_normal (cd
, fields
->f_bitno16_S
, 0, 0, 5, 3, 32, total_length
, buffer
);
650 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
655 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
658 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s11_unprefixed
)) & (7));
659 FLD (f_dsp_16_s8
) = ((INT
) (FLD (f_bitbase32_16_s11_unprefixed
)) >> (3));
661 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
664 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
669 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
672 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s19_unprefixed
)) & (7));
673 FLD (f_dsp_16_s16
) = ((INT
) (FLD (f_bitbase32_16_s19_unprefixed
)) >> (3));
675 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
679 long value
= fields
->f_dsp_16_s16
;
680 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
681 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
687 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
690 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u11_unprefixed
)) & (7));
691 FLD (f_dsp_16_u8
) = ((((UINT
) (FLD (f_bitbase32_16_u11_unprefixed
)) >> (3))) & (255));
693 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
696 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
701 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
704 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u19_unprefixed
)) & (7));
705 FLD (f_dsp_16_u16
) = ((((UINT
) (FLD (f_bitbase32_16_u19_unprefixed
)) >> (3))) & (65535));
707 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
711 long value
= fields
->f_dsp_16_u16
;
712 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
713 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
719 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
722 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u27_unprefixed
)) & (7));
723 FLD (f_dsp_16_u16
) = ((((UINT
) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (3))) & (65535));
724 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (19))) & (255));
726 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
730 long value
= fields
->f_dsp_16_u16
;
731 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
732 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
736 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
741 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
744 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s11_prefixed
)) & (7));
745 FLD (f_dsp_24_s8
) = ((INT
) (FLD (f_bitbase32_24_s11_prefixed
)) >> (3));
747 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
750 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
755 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
758 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s19_prefixed
)) & (7));
759 FLD (f_dsp_24_u8
) = ((((UINT
) (FLD (f_bitbase32_24_s19_prefixed
)) >> (3))) & (255));
760 FLD (f_dsp_32_s8
) = ((INT
) (FLD (f_bitbase32_24_s19_prefixed
)) >> (11));
762 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
765 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
768 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
773 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
776 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u11_prefixed
)) & (7));
777 FLD (f_dsp_24_u8
) = ((((UINT
) (FLD (f_bitbase32_24_u11_prefixed
)) >> (3))) & (255));
779 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
782 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
787 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
790 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u19_prefixed
)) & (7));
791 FLD (f_dsp_24_u8
) = ((((UINT
) (FLD (f_bitbase32_24_u19_prefixed
)) >> (3))) & (255));
792 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_bitbase32_24_u19_prefixed
)) >> (11))) & (255));
794 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
797 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
800 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
805 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
808 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u27_prefixed
)) & (7));
809 FLD (f_dsp_24_u8
) = ((((UINT
) (FLD (f_bitbase32_24_u27_prefixed
)) >> (3))) & (255));
810 FLD (f_dsp_32_u16
) = ((((UINT
) (FLD (f_bitbase32_24_u27_prefixed
)) >> (11))) & (65535));
812 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
815 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
819 long value
= fields
->f_dsp_32_u16
;
820 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
821 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
827 case M32C_OPERAND_BITNO16R
:
828 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
830 case M32C_OPERAND_BITNO32PREFIXED
:
831 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
833 case M32C_OPERAND_BITNO32UNPREFIXED
:
834 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
836 case M32C_OPERAND_DSP_10_U6
:
837 errmsg
= insert_normal (cd
, fields
->f_dsp_10_u6
, 0, 0, 10, 6, 32, total_length
, buffer
);
839 case M32C_OPERAND_DSP_16_S16
:
841 long value
= fields
->f_dsp_16_s16
;
842 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
843 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
846 case M32C_OPERAND_DSP_16_S8
:
847 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
849 case M32C_OPERAND_DSP_16_U16
:
851 long value
= fields
->f_dsp_16_u16
;
852 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
853 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
856 case M32C_OPERAND_DSP_16_U20
:
859 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
860 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
863 long value
= fields
->f_dsp_16_u16
;
864 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
865 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
869 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
874 case M32C_OPERAND_DSP_16_U24
:
877 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
878 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
881 long value
= fields
->f_dsp_16_u16
;
882 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
883 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
887 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
892 case M32C_OPERAND_DSP_16_U8
:
893 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
895 case M32C_OPERAND_DSP_24_S16
:
898 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
899 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
901 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
904 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
909 case M32C_OPERAND_DSP_24_S8
:
910 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
912 case M32C_OPERAND_DSP_24_U16
:
915 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u16
)) & (255));
916 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_24_u16
)) >> (8))) & (255));
918 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
921 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
926 case M32C_OPERAND_DSP_24_U20
:
929 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
930 FLD (f_dsp_32_u16
) = ((((UINT
) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
932 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
936 long value
= fields
->f_dsp_32_u16
;
937 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
938 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
944 case M32C_OPERAND_DSP_24_U24
:
947 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
948 FLD (f_dsp_32_u16
) = ((((UINT
) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
950 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
954 long value
= fields
->f_dsp_32_u16
;
955 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
956 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
962 case M32C_OPERAND_DSP_24_U8
:
963 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
965 case M32C_OPERAND_DSP_32_S16
:
967 long value
= fields
->f_dsp_32_s16
;
968 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
969 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
972 case M32C_OPERAND_DSP_32_S8
:
973 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
975 case M32C_OPERAND_DSP_32_U16
:
977 long value
= fields
->f_dsp_32_u16
;
978 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
979 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
982 case M32C_OPERAND_DSP_32_U20
:
984 long value
= fields
->f_dsp_32_u24
;
985 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
986 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
989 case M32C_OPERAND_DSP_32_U24
:
991 long value
= fields
->f_dsp_32_u24
;
992 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
993 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
996 case M32C_OPERAND_DSP_32_U8
:
997 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
999 case M32C_OPERAND_DSP_40_S16
:
1001 long value
= fields
->f_dsp_40_s16
;
1002 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
1003 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1006 case M32C_OPERAND_DSP_40_S8
:
1007 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1009 case M32C_OPERAND_DSP_40_U16
:
1011 long value
= fields
->f_dsp_40_u16
;
1012 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1013 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 16, 32, total_length
, buffer
);
1016 case M32C_OPERAND_DSP_40_U20
:
1018 long value
= fields
->f_dsp_40_u20
;
1019 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (983040))));
1020 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 20, 32, total_length
, buffer
);
1023 case M32C_OPERAND_DSP_40_U24
:
1025 long value
= fields
->f_dsp_40_u24
;
1026 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1027 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1030 case M32C_OPERAND_DSP_40_U8
:
1031 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1033 case M32C_OPERAND_DSP_48_S16
:
1035 long value
= fields
->f_dsp_48_s16
;
1036 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
1037 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1040 case M32C_OPERAND_DSP_48_S8
:
1041 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1043 case M32C_OPERAND_DSP_48_U16
:
1045 long value
= fields
->f_dsp_48_u16
;
1046 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1047 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1050 case M32C_OPERAND_DSP_48_U20
:
1053 FLD (f_dsp_64_u8
) = ((((UINT
) (FLD (f_dsp_48_u20
)) >> (16))) & (15));
1054 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u20
)) & (65535));
1057 long value
= fields
->f_dsp_48_u16
;
1058 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1059 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1063 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1068 case M32C_OPERAND_DSP_48_U24
:
1071 FLD (f_dsp_64_u8
) = ((((UINT
) (FLD (f_dsp_48_u24
)) >> (16))) & (255));
1072 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u24
)) & (65535));
1075 long value
= fields
->f_dsp_48_u16
;
1076 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1077 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1081 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1086 case M32C_OPERAND_DSP_48_U8
:
1087 errmsg
= insert_normal (cd
, fields
->f_dsp_48_u8
, 0, 32, 16, 8, 32, total_length
, buffer
);
1089 case M32C_OPERAND_DSP_8_S24
:
1091 long value
= fields
->f_dsp_8_s24
;
1092 value
= ((((((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))))) ^ (8388608))) - (8388608));
1093 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, buffer
);
1096 case M32C_OPERAND_DSP_8_S8
:
1097 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1099 case M32C_OPERAND_DSP_8_U16
:
1101 long value
= fields
->f_dsp_8_u16
;
1102 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1103 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 16, 32, total_length
, buffer
);
1106 case M32C_OPERAND_DSP_8_U24
:
1108 long value
= fields
->f_dsp_8_u24
;
1109 value
= ((((((USI
) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1110 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 24, 32, total_length
, buffer
);
1113 case M32C_OPERAND_DSP_8_U6
:
1114 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u6
, 0, 0, 8, 6, 32, total_length
, buffer
);
1116 case M32C_OPERAND_DSP_8_U8
:
1117 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1119 case M32C_OPERAND_DST16AN
:
1120 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1122 case M32C_OPERAND_DST16AN_S
:
1123 errmsg
= insert_normal (cd
, fields
->f_dst16_an_s
, 0, 0, 4, 1, 32, total_length
, buffer
);
1125 case M32C_OPERAND_DST16ANHI
:
1126 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1128 case M32C_OPERAND_DST16ANQI
:
1129 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1131 case M32C_OPERAND_DST16ANQI_S
:
1132 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1134 case M32C_OPERAND_DST16ANSI
:
1135 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1137 case M32C_OPERAND_DST16RNEXTQI
:
1138 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_ext
, 0, 0, 14, 1, 32, total_length
, buffer
);
1140 case M32C_OPERAND_DST16RNHI
:
1141 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1143 case M32C_OPERAND_DST16RNQI
:
1144 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1146 case M32C_OPERAND_DST16RNQI_S
:
1147 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1149 case M32C_OPERAND_DST16RNSI
:
1150 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1152 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
1153 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1155 case M32C_OPERAND_DST32ANPREFIXED
:
1156 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1158 case M32C_OPERAND_DST32ANPREFIXEDHI
:
1159 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1161 case M32C_OPERAND_DST32ANPREFIXEDQI
:
1162 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1164 case M32C_OPERAND_DST32ANPREFIXEDSI
:
1165 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1167 case M32C_OPERAND_DST32ANUNPREFIXED
:
1168 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1170 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
1171 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1173 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
1174 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1176 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
1177 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1179 case M32C_OPERAND_DST32R0HI_S
:
1181 case M32C_OPERAND_DST32R0QI_S
:
1183 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
1184 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1186 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
1187 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1189 case M32C_OPERAND_DST32RNPREFIXEDHI
:
1191 long value
= fields
->f_dst32_rn_prefixed_HI
;
1192 value
= ((((value
) + (2))) % (4));
1193 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1196 case M32C_OPERAND_DST32RNPREFIXEDQI
:
1198 long value
= fields
->f_dst32_rn_prefixed_QI
;
1199 value
= (((((~ (((value
) << (1))))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
1200 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1203 case M32C_OPERAND_DST32RNPREFIXEDSI
:
1205 long value
= fields
->f_dst32_rn_prefixed_SI
;
1206 value
= ((value
) + (2));
1207 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1210 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
1212 long value
= fields
->f_dst32_rn_unprefixed_HI
;
1213 value
= ((((value
) + (2))) % (4));
1214 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1217 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
1219 long value
= fields
->f_dst32_rn_unprefixed_QI
;
1220 value
= (((((~ (((value
) << (1))))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
1221 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1224 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
1226 long value
= fields
->f_dst32_rn_unprefixed_SI
;
1227 value
= ((value
) + (2));
1228 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1231 case M32C_OPERAND_G
:
1233 case M32C_OPERAND_IMM_12_S4
:
1234 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1236 case M32C_OPERAND_IMM_12_S4N
:
1237 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1239 case M32C_OPERAND_IMM_13_U3
:
1240 errmsg
= insert_normal (cd
, fields
->f_imm_13_u3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1242 case M32C_OPERAND_IMM_16_HI
:
1244 long value
= fields
->f_dsp_16_s16
;
1245 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
1246 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
1249 case M32C_OPERAND_IMM_16_QI
:
1250 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
1252 case M32C_OPERAND_IMM_16_SI
:
1255 FLD (f_dsp_32_u16
) = ((((UINT
) (FLD (f_dsp_16_s32
)) >> (16))) & (65535));
1256 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_s32
)) & (65535));
1259 long value
= fields
->f_dsp_16_u16
;
1260 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1261 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
1266 long value
= fields
->f_dsp_32_u16
;
1267 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1268 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
1274 case M32C_OPERAND_IMM_20_S4
:
1275 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1277 case M32C_OPERAND_IMM_24_HI
:
1280 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
1281 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
1283 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1286 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1291 case M32C_OPERAND_IMM_24_QI
:
1292 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
1294 case M32C_OPERAND_IMM_24_SI
:
1297 FLD (f_dsp_32_u24
) = ((((UINT
) (FLD (f_dsp_24_s32
)) >> (8))) & (16777215));
1298 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s32
)) & (255));
1300 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1304 long value
= fields
->f_dsp_32_u24
;
1305 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1306 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
1312 case M32C_OPERAND_IMM_32_HI
:
1314 long value
= fields
->f_dsp_32_s16
;
1315 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
1316 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
1319 case M32C_OPERAND_IMM_32_QI
:
1320 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
1322 case M32C_OPERAND_IMM_32_SI
:
1324 long value
= fields
->f_dsp_32_s32
;
1325 value
= EXTSISI (((((((((UINT
) (value
) >> (24))) & (255))) | (((((UINT
) (value
) >> (8))) & (65280))))) | (((((((value
) & (65280))) << (8))) | (((((value
) & (255))) << (24)))))));
1326 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, buffer
);
1329 case M32C_OPERAND_IMM_40_HI
:
1331 long value
= fields
->f_dsp_40_s16
;
1332 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
1333 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1336 case M32C_OPERAND_IMM_40_QI
:
1337 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1339 case M32C_OPERAND_IMM_40_SI
:
1342 FLD (f_dsp_64_u8
) = ((((UINT
) (FLD (f_dsp_40_s32
)) >> (24))) & (255));
1343 FLD (f_dsp_40_u24
) = ((FLD (f_dsp_40_s32
)) & (16777215));
1346 long value
= fields
->f_dsp_40_u24
;
1347 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1348 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1352 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1357 case M32C_OPERAND_IMM_48_HI
:
1359 long value
= fields
->f_dsp_48_s16
;
1360 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
1361 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1364 case M32C_OPERAND_IMM_48_QI
:
1365 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1367 case M32C_OPERAND_IMM_48_SI
:
1370 FLD (f_dsp_64_u16
) = ((((UINT
) (FLD (f_dsp_48_s32
)) >> (16))) & (65535));
1371 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_s32
)) & (65535));
1374 long value
= fields
->f_dsp_48_u16
;
1375 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1376 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1381 long value
= fields
->f_dsp_64_u16
;
1382 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1383 errmsg
= insert_normal (cd
, value
, 0, 64, 0, 16, 32, total_length
, buffer
);
1389 case M32C_OPERAND_IMM_56_HI
:
1392 FLD (f_dsp_56_u8
) = ((FLD (f_dsp_56_s16
)) & (255));
1393 FLD (f_dsp_64_u8
) = ((((UINT
) (FLD (f_dsp_56_s16
)) >> (8))) & (255));
1395 errmsg
= insert_normal (cd
, fields
->f_dsp_56_u8
, 0, 32, 24, 8, 32, total_length
, buffer
);
1398 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1403 case M32C_OPERAND_IMM_56_QI
:
1404 errmsg
= insert_normal (cd
, fields
->f_dsp_56_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 24, 8, 32, total_length
, buffer
);
1406 case M32C_OPERAND_IMM_64_HI
:
1408 long value
= fields
->f_dsp_64_s16
;
1409 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
1410 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, buffer
);
1413 case M32C_OPERAND_IMM_8_HI
:
1415 long value
= fields
->f_dsp_8_s16
;
1416 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
1417 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, buffer
);
1420 case M32C_OPERAND_IMM_8_QI
:
1421 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1423 case M32C_OPERAND_IMM_8_S4
:
1424 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1426 case M32C_OPERAND_IMM_8_S4N
:
1427 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1429 case M32C_OPERAND_IMM_SH_12_S4
:
1430 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1432 case M32C_OPERAND_IMM_SH_20_S4
:
1433 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1435 case M32C_OPERAND_IMM_SH_8_S4
:
1436 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1438 case M32C_OPERAND_IMM1_S
:
1440 long value
= fields
->f_imm1_S
;
1441 value
= ((value
) - (1));
1442 errmsg
= insert_normal (cd
, value
, 0, 0, 2, 1, 32, total_length
, buffer
);
1445 case M32C_OPERAND_IMM3_S
:
1448 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
1449 FLD (f_2_2
) = ((((UINT
) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
1451 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1454 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1459 case M32C_OPERAND_LAB_16_8
:
1461 long value
= fields
->f_lab_16_8
;
1462 value
= ((value
) - (((pc
) + (2))));
1463 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 16, 8, 32, total_length
, buffer
);
1466 case M32C_OPERAND_LAB_24_8
:
1468 long value
= fields
->f_lab_24_8
;
1469 value
= ((value
) - (((pc
) + (2))));
1470 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 24, 8, 32, total_length
, buffer
);
1473 case M32C_OPERAND_LAB_32_8
:
1475 long value
= fields
->f_lab_32_8
;
1476 value
= ((value
) - (((pc
) + (2))));
1477 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 0, 8, 32, total_length
, buffer
);
1480 case M32C_OPERAND_LAB_40_8
:
1482 long value
= fields
->f_lab_40_8
;
1483 value
= ((value
) - (((pc
) + (2))));
1484 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 8, 8, 32, total_length
, buffer
);
1487 case M32C_OPERAND_LAB_5_3
:
1489 long value
= fields
->f_lab_5_3
;
1490 value
= ((value
) - (((pc
) + (2))));
1491 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, buffer
);
1494 case M32C_OPERAND_LAB_8_16
:
1496 long value
= fields
->f_lab_8_16
;
1497 value
= ((((((((value
) - (((pc
) + (1))))) & (255))) << (8))) | (((USI
) (((((value
) - (((pc
) + (1))))) & (65280))) >> (8))));
1498 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGN_OPT
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 16, 32, total_length
, buffer
);
1501 case M32C_OPERAND_LAB_8_24
:
1503 long value
= fields
->f_lab_8_24
;
1504 value
= ((((((USI
) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1505 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, buffer
);
1508 case M32C_OPERAND_LAB_8_8
:
1510 long value
= fields
->f_lab_8_8
;
1511 value
= ((value
) - (((pc
) + (1))));
1512 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 8, 32, total_length
, buffer
);
1515 case M32C_OPERAND_LAB32_JMP_S
:
1519 tmp_val
= ((((FLD (f_lab32_jmp_s
)) - (pc
))) - (2));
1520 FLD (f_7_1
) = ((tmp_val
) & (1));
1521 FLD (f_2_2
) = ((USI
) (tmp_val
) >> (1));
1523 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1526 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1531 case M32C_OPERAND_Q
:
1533 case M32C_OPERAND_R0
:
1535 case M32C_OPERAND_R0H
:
1537 case M32C_OPERAND_R0L
:
1539 case M32C_OPERAND_R1
:
1541 case M32C_OPERAND_R1R2R0
:
1543 case M32C_OPERAND_R2
:
1545 case M32C_OPERAND_R2R0
:
1547 case M32C_OPERAND_R3
:
1549 case M32C_OPERAND_R3R1
:
1551 case M32C_OPERAND_REGSETPOP
:
1552 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1554 case M32C_OPERAND_REGSETPUSH
:
1555 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1557 case M32C_OPERAND_RN16_PUSH_S
:
1558 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
1560 case M32C_OPERAND_S
:
1562 case M32C_OPERAND_SRC16AN
:
1563 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1565 case M32C_OPERAND_SRC16ANHI
:
1566 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1568 case M32C_OPERAND_SRC16ANQI
:
1569 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1571 case M32C_OPERAND_SRC16RNHI
:
1572 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1574 case M32C_OPERAND_SRC16RNQI
:
1575 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1577 case M32C_OPERAND_SRC32ANPREFIXED
:
1578 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1580 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
1581 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1583 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
1584 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1586 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
1587 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1589 case M32C_OPERAND_SRC32ANUNPREFIXED
:
1590 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1592 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
1593 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1595 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
1596 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1598 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
1599 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1601 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
1603 long value
= fields
->f_src32_rn_prefixed_HI
;
1604 value
= ((((value
) + (2))) % (4));
1605 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1608 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
1610 long value
= fields
->f_src32_rn_prefixed_QI
;
1611 value
= (((((~ (((value
) << (1))))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
1612 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1615 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
1617 long value
= fields
->f_src32_rn_prefixed_SI
;
1618 value
= ((value
) + (2));
1619 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1622 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
1624 long value
= fields
->f_src32_rn_unprefixed_HI
;
1625 value
= ((((value
) + (2))) % (4));
1626 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1629 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
1631 long value
= fields
->f_src32_rn_unprefixed_QI
;
1632 value
= (((((~ (((value
) << (1))))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
1633 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1636 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
1638 long value
= fields
->f_src32_rn_unprefixed_SI
;
1639 value
= ((value
) + (2));
1640 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1643 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
1644 errmsg
= insert_normal (cd
, fields
->f_5_1
, 0, 0, 5, 1, 32, total_length
, buffer
);
1646 case M32C_OPERAND_X
:
1648 case M32C_OPERAND_Z
:
1650 case M32C_OPERAND_COND16_16
:
1651 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1653 case M32C_OPERAND_COND16_24
:
1654 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1656 case M32C_OPERAND_COND16_32
:
1657 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1659 case M32C_OPERAND_COND16C
:
1660 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1662 case M32C_OPERAND_COND16J
:
1663 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1665 case M32C_OPERAND_COND16J5
:
1666 errmsg
= insert_normal (cd
, fields
->f_cond16j_5
, 0, 0, 5, 3, 32, total_length
, buffer
);
1668 case M32C_OPERAND_COND32
:
1671 FLD (f_9_1
) = ((((UINT
) (FLD (f_cond32
)) >> (3))) & (1));
1672 FLD (f_13_3
) = ((FLD (f_cond32
)) & (7));
1674 errmsg
= insert_normal (cd
, fields
->f_9_1
, 0, 0, 9, 1, 32, total_length
, buffer
);
1677 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1682 case M32C_OPERAND_COND32_16
:
1683 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1685 case M32C_OPERAND_COND32_24
:
1686 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1688 case M32C_OPERAND_COND32_32
:
1689 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1691 case M32C_OPERAND_COND32_40
:
1692 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1694 case M32C_OPERAND_COND32J
:
1697 FLD (f_1_3
) = ((((UINT
) (FLD (f_cond32j
)) >> (1))) & (7));
1698 FLD (f_7_1
) = ((FLD (f_cond32j
)) & (1));
1700 errmsg
= insert_normal (cd
, fields
->f_1_3
, 0, 0, 1, 3, 32, total_length
, buffer
);
1703 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1708 case M32C_OPERAND_CR1_PREFIXED_32
:
1709 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1711 case M32C_OPERAND_CR1_UNPREFIXED_32
:
1712 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1714 case M32C_OPERAND_CR16
:
1715 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1717 case M32C_OPERAND_CR2_32
:
1718 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1720 case M32C_OPERAND_CR3_PREFIXED_32
:
1721 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1723 case M32C_OPERAND_CR3_UNPREFIXED_32
:
1724 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1726 case M32C_OPERAND_FLAGS16
:
1727 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1729 case M32C_OPERAND_FLAGS32
:
1730 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1732 case M32C_OPERAND_SCCOND32
:
1733 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1735 case M32C_OPERAND_SIZE
:
1739 /* xgettext:c-format */
1740 opcodes_error_handler
1741 (_("internal error: unrecognized field %d while building insn"),
1749 int m32c_cgen_extract_operand
1750 (CGEN_CPU_DESC
, int, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
1752 /* Main entry point for operand extraction.
1753 The result is <= 0 for error, >0 for success.
1754 ??? Actual values aren't well defined right now.
1756 This function is basically just a big switch statement. Earlier versions
1757 used tables to look up the function to use, but
1758 - if the table contains both assembler and disassembler functions then
1759 the disassembler contains much of the assembler and vice-versa,
1760 - there's a lot of inlining possibilities as things grow,
1761 - using a switch statement avoids the function call overhead.
1763 This function could be moved into `print_insn_normal', but keeping it
1764 separate makes clear the interface between `print_insn_normal' and each of
1768 m32c_cgen_extract_operand (CGEN_CPU_DESC cd
,
1770 CGEN_EXTRACT_INFO
*ex_info
,
1771 CGEN_INSN_INT insn_value
,
1772 CGEN_FIELDS
* fields
,
1775 /* Assume success (for those operands that are nops). */
1777 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
1781 case M32C_OPERAND_A0
:
1783 case M32C_OPERAND_A1
:
1785 case M32C_OPERAND_AN16_PUSH_S
:
1786 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
1788 case M32C_OPERAND_BIT16AN
:
1789 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
1791 case M32C_OPERAND_BIT16RN
:
1792 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
1794 case M32C_OPERAND_BIT3_S
:
1796 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
1797 if (length
<= 0) break;
1798 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
1799 if (length
<= 0) break;
1801 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
1805 case M32C_OPERAND_BIT32ANPREFIXED
:
1806 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
1808 case M32C_OPERAND_BIT32ANUNPREFIXED
:
1809 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
1811 case M32C_OPERAND_BIT32RNPREFIXED
:
1814 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
1815 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1816 fields
->f_dst32_rn_prefixed_QI
= value
;
1819 case M32C_OPERAND_BIT32RNUNPREFIXED
:
1822 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
1823 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1824 fields
->f_dst32_rn_unprefixed_QI
= value
;
1827 case M32C_OPERAND_BITBASE16_16_S8
:
1828 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
);
1830 case M32C_OPERAND_BITBASE16_16_U16
:
1833 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1834 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1835 fields
->f_dsp_16_u16
= value
;
1838 case M32C_OPERAND_BITBASE16_16_U8
:
1839 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1841 case M32C_OPERAND_BITBASE16_8_U11_S
:
1843 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_bitno16_S
);
1844 if (length
<= 0) break;
1845 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
1846 if (length
<= 0) break;
1848 FLD (f_bitbase16_u11_S
) = ((((FLD (f_dsp_8_u8
)) << (3))) | (FLD (f_bitno16_S
)));
1852 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
1854 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1855 if (length
<= 0) break;
1856 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
);
1857 if (length
<= 0) break;
1859 FLD (f_bitbase32_16_s11_unprefixed
) = ((((FLD (f_dsp_16_s8
)) * (8))) | (FLD (f_bitno32_unprefixed
)));
1863 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
1865 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1866 if (length
<= 0) break;
1869 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1870 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
1871 fields
->f_dsp_16_s16
= value
;
1873 if (length
<= 0) break;
1875 FLD (f_bitbase32_16_s19_unprefixed
) = ((((FLD (f_dsp_16_s16
)) * (8))) | (FLD (f_bitno32_unprefixed
)));
1879 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
1881 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1882 if (length
<= 0) break;
1883 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1884 if (length
<= 0) break;
1886 FLD (f_bitbase32_16_u11_unprefixed
) = ((((FLD (f_dsp_16_u8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1890 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
1892 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1893 if (length
<= 0) break;
1896 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1897 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1898 fields
->f_dsp_16_u16
= value
;
1900 if (length
<= 0) break;
1902 FLD (f_bitbase32_16_u19_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1906 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
1908 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1909 if (length
<= 0) break;
1912 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1913 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1914 fields
->f_dsp_16_u16
= value
;
1916 if (length
<= 0) break;
1917 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1918 if (length
<= 0) break;
1920 FLD (f_bitbase32_16_u27_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (19))) | (FLD (f_bitno32_unprefixed
)))));
1924 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
1926 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1927 if (length
<= 0) break;
1928 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
);
1929 if (length
<= 0) break;
1931 FLD (f_bitbase32_24_s11_prefixed
) = ((((FLD (f_dsp_24_s8
)) * (8))) | (FLD (f_bitno32_prefixed
)));
1935 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
1937 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1938 if (length
<= 0) break;
1939 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1940 if (length
<= 0) break;
1941 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
);
1942 if (length
<= 0) break;
1944 FLD (f_bitbase32_24_s19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_s8
)) * (2048))) | (FLD (f_bitno32_prefixed
)))));
1948 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
1950 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1951 if (length
<= 0) break;
1952 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1953 if (length
<= 0) break;
1955 FLD (f_bitbase32_24_u11_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1959 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
1961 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1962 if (length
<= 0) break;
1963 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1964 if (length
<= 0) break;
1965 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1966 if (length
<= 0) break;
1968 FLD (f_bitbase32_24_u19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1972 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
1974 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1975 if (length
<= 0) break;
1976 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1977 if (length
<= 0) break;
1980 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
1981 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
1982 fields
->f_dsp_32_u16
= value
;
1984 if (length
<= 0) break;
1986 FLD (f_bitbase32_24_u27_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u16
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1990 case M32C_OPERAND_BITNO16R
:
1991 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1993 case M32C_OPERAND_BITNO32PREFIXED
:
1994 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1996 case M32C_OPERAND_BITNO32UNPREFIXED
:
1997 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1999 case M32C_OPERAND_DSP_10_U6
:
2000 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 6, 32, total_length
, pc
, & fields
->f_dsp_10_u6
);
2002 case M32C_OPERAND_DSP_16_S16
:
2005 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2006 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2007 fields
->f_dsp_16_s16
= value
;
2010 case M32C_OPERAND_DSP_16_S8
:
2011 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
);
2013 case M32C_OPERAND_DSP_16_U16
:
2016 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2017 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2018 fields
->f_dsp_16_u16
= value
;
2021 case M32C_OPERAND_DSP_16_U20
:
2025 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2026 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2027 fields
->f_dsp_16_u16
= value
;
2029 if (length
<= 0) break;
2030 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2031 if (length
<= 0) break;
2033 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
2037 case M32C_OPERAND_DSP_16_U24
:
2041 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2042 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2043 fields
->f_dsp_16_u16
= value
;
2045 if (length
<= 0) break;
2046 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2047 if (length
<= 0) break;
2049 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
2053 case M32C_OPERAND_DSP_16_U8
:
2054 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2056 case M32C_OPERAND_DSP_24_S16
:
2058 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2059 if (length
<= 0) break;
2060 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2061 if (length
<= 0) break;
2063 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2067 case M32C_OPERAND_DSP_24_S8
:
2068 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
);
2070 case M32C_OPERAND_DSP_24_U16
:
2072 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2073 if (length
<= 0) break;
2074 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2075 if (length
<= 0) break;
2077 FLD (f_dsp_24_u16
) = ((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
)));
2081 case M32C_OPERAND_DSP_24_U20
:
2083 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2084 if (length
<= 0) break;
2087 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2088 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2089 fields
->f_dsp_32_u16
= value
;
2091 if (length
<= 0) break;
2093 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2097 case M32C_OPERAND_DSP_24_U24
:
2099 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2100 if (length
<= 0) break;
2103 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2104 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2105 fields
->f_dsp_32_u16
= value
;
2107 if (length
<= 0) break;
2109 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2113 case M32C_OPERAND_DSP_24_U8
:
2114 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2116 case M32C_OPERAND_DSP_32_S16
:
2119 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2120 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2121 fields
->f_dsp_32_s16
= value
;
2124 case M32C_OPERAND_DSP_32_S8
:
2125 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
);
2127 case M32C_OPERAND_DSP_32_U16
:
2130 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2131 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2132 fields
->f_dsp_32_u16
= value
;
2135 case M32C_OPERAND_DSP_32_U20
:
2138 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2139 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2140 fields
->f_dsp_32_u24
= value
;
2143 case M32C_OPERAND_DSP_32_U24
:
2146 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2147 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2148 fields
->f_dsp_32_u24
= value
;
2151 case M32C_OPERAND_DSP_32_U8
:
2152 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2154 case M32C_OPERAND_DSP_40_S16
:
2157 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2158 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2159 fields
->f_dsp_40_s16
= value
;
2162 case M32C_OPERAND_DSP_40_S8
:
2163 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
);
2165 case M32C_OPERAND_DSP_40_U16
:
2168 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 16, 32, total_length
, pc
, & value
);
2169 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2170 fields
->f_dsp_40_u16
= value
;
2173 case M32C_OPERAND_DSP_40_U20
:
2176 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 20, 32, total_length
, pc
, & value
);
2177 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (983040))));
2178 fields
->f_dsp_40_u20
= value
;
2181 case M32C_OPERAND_DSP_40_U24
:
2184 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2185 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2186 fields
->f_dsp_40_u24
= value
;
2189 case M32C_OPERAND_DSP_40_U8
:
2190 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2192 case M32C_OPERAND_DSP_48_S16
:
2195 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2196 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2197 fields
->f_dsp_48_s16
= value
;
2200 case M32C_OPERAND_DSP_48_S8
:
2201 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
);
2203 case M32C_OPERAND_DSP_48_U16
:
2206 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2207 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2208 fields
->f_dsp_48_u16
= value
;
2211 case M32C_OPERAND_DSP_48_U20
:
2215 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2216 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2217 fields
->f_dsp_48_u16
= value
;
2219 if (length
<= 0) break;
2220 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2221 if (length
<= 0) break;
2223 FLD (f_dsp_48_u20
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (983040))));
2227 case M32C_OPERAND_DSP_48_U24
:
2231 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2232 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2233 fields
->f_dsp_48_u16
= value
;
2235 if (length
<= 0) break;
2236 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2237 if (length
<= 0) break;
2239 FLD (f_dsp_48_u24
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (16711680))));
2243 case M32C_OPERAND_DSP_48_U8
:
2244 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_48_u8
);
2246 case M32C_OPERAND_DSP_8_S24
:
2249 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, pc
, & value
);
2250 value
= ((((((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))))) ^ (8388608))) - (8388608));
2251 fields
->f_dsp_8_s24
= value
;
2254 case M32C_OPERAND_DSP_8_S8
:
2255 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
);
2257 case M32C_OPERAND_DSP_8_U16
:
2260 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 16, 32, total_length
, pc
, & value
);
2261 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2262 fields
->f_dsp_8_u16
= value
;
2265 case M32C_OPERAND_DSP_8_U24
:
2268 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 24, 32, total_length
, pc
, & value
);
2269 value
= ((((((USI
) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2270 fields
->f_dsp_8_u24
= value
;
2273 case M32C_OPERAND_DSP_8_U6
:
2274 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 6, 32, total_length
, pc
, & fields
->f_dsp_8_u6
);
2276 case M32C_OPERAND_DSP_8_U8
:
2277 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
2279 case M32C_OPERAND_DST16AN
:
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_DST16AN_S
:
2283 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_dst16_an_s
);
2285 case M32C_OPERAND_DST16ANHI
:
2286 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2288 case M32C_OPERAND_DST16ANQI
:
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_DST16ANQI_S
:
2292 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2294 case M32C_OPERAND_DST16ANSI
:
2295 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2297 case M32C_OPERAND_DST16RNEXTQI
:
2298 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_ext
);
2300 case M32C_OPERAND_DST16RNHI
:
2301 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2303 case M32C_OPERAND_DST16RNQI
:
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_DST16RNQI_S
:
2307 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2309 case M32C_OPERAND_DST16RNSI
:
2310 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2312 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
2313 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2315 case M32C_OPERAND_DST32ANPREFIXED
:
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_DST32ANPREFIXEDHI
:
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_DST32ANPREFIXEDQI
:
2322 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2324 case M32C_OPERAND_DST32ANPREFIXEDSI
:
2325 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2327 case M32C_OPERAND_DST32ANUNPREFIXED
:
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_DST32ANUNPREFIXEDHI
:
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_DST32ANUNPREFIXEDQI
:
2334 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2336 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
2337 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2339 case M32C_OPERAND_DST32R0HI_S
:
2341 case M32C_OPERAND_DST32R0QI_S
:
2343 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
2344 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2346 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
2347 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2349 case M32C_OPERAND_DST32RNPREFIXEDHI
:
2352 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2353 value
= ((((value
) + (2))) % (4));
2354 fields
->f_dst32_rn_prefixed_HI
= value
;
2357 case M32C_OPERAND_DST32RNPREFIXEDQI
:
2360 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2361 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2362 fields
->f_dst32_rn_prefixed_QI
= value
;
2365 case M32C_OPERAND_DST32RNPREFIXEDSI
:
2368 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2369 value
= ((value
) - (2));
2370 fields
->f_dst32_rn_prefixed_SI
= value
;
2373 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
2376 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2377 value
= ((((value
) + (2))) % (4));
2378 fields
->f_dst32_rn_unprefixed_HI
= value
;
2381 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
2384 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2385 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2386 fields
->f_dst32_rn_unprefixed_QI
= value
;
2389 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
2392 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2393 value
= ((value
) - (2));
2394 fields
->f_dst32_rn_unprefixed_SI
= value
;
2397 case M32C_OPERAND_G
:
2399 case M32C_OPERAND_IMM_12_S4
:
2400 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
);
2402 case M32C_OPERAND_IMM_12_S4N
:
2403 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
);
2405 case M32C_OPERAND_IMM_13_U3
:
2406 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_imm_13_u3
);
2408 case M32C_OPERAND_IMM_16_HI
:
2411 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2412 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2413 fields
->f_dsp_16_s16
= value
;
2416 case M32C_OPERAND_IMM_16_QI
:
2417 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
);
2419 case M32C_OPERAND_IMM_16_SI
:
2423 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2424 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2425 fields
->f_dsp_16_u16
= value
;
2427 if (length
<= 0) break;
2430 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2431 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2432 fields
->f_dsp_32_u16
= value
;
2434 if (length
<= 0) break;
2436 FLD (f_dsp_16_s32
) = ((((FLD (f_dsp_16_u16
)) & (65535))) | (((((FLD (f_dsp_32_u16
)) << (16))) & (0xffff0000))));
2440 case M32C_OPERAND_IMM_20_S4
:
2441 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
);
2443 case M32C_OPERAND_IMM_24_HI
:
2445 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2446 if (length
<= 0) break;
2447 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2448 if (length
<= 0) break;
2450 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2454 case M32C_OPERAND_IMM_24_QI
:
2455 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
);
2457 case M32C_OPERAND_IMM_24_SI
:
2459 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2460 if (length
<= 0) break;
2463 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2464 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2465 fields
->f_dsp_32_u24
= value
;
2467 if (length
<= 0) break;
2469 FLD (f_dsp_24_s32
) = ((((FLD (f_dsp_24_u8
)) & (255))) | (((((FLD (f_dsp_32_u24
)) << (8))) & (0xffffff00))));
2473 case M32C_OPERAND_IMM_32_HI
:
2476 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2477 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2478 fields
->f_dsp_32_s16
= value
;
2481 case M32C_OPERAND_IMM_32_QI
:
2482 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
);
2484 case M32C_OPERAND_IMM_32_SI
:
2487 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, pc
, & value
);
2488 value
= EXTSISI (((((((((UINT
) (value
) >> (24))) & (255))) | (((((UINT
) (value
) >> (8))) & (65280))))) | (((((((value
) & (65280))) << (8))) | (((((value
) & (255))) << (24)))))));
2489 fields
->f_dsp_32_s32
= value
;
2492 case M32C_OPERAND_IMM_40_HI
:
2495 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2496 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2497 fields
->f_dsp_40_s16
= value
;
2500 case M32C_OPERAND_IMM_40_QI
:
2501 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
);
2503 case M32C_OPERAND_IMM_40_SI
:
2507 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2508 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2509 fields
->f_dsp_40_u24
= value
;
2511 if (length
<= 0) break;
2512 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2513 if (length
<= 0) break;
2515 FLD (f_dsp_40_s32
) = ((((FLD (f_dsp_40_u24
)) & (16777215))) | (((((FLD (f_dsp_64_u8
)) << (24))) & (0xff000000))));
2519 case M32C_OPERAND_IMM_48_HI
:
2522 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2523 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2524 fields
->f_dsp_48_s16
= value
;
2527 case M32C_OPERAND_IMM_48_QI
:
2528 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
);
2530 case M32C_OPERAND_IMM_48_SI
:
2534 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2535 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2536 fields
->f_dsp_48_u16
= value
;
2538 if (length
<= 0) break;
2541 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 16, 32, total_length
, pc
, & value
);
2542 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8))));
2543 fields
->f_dsp_64_u16
= value
;
2545 if (length
<= 0) break;
2547 FLD (f_dsp_48_s32
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u16
)) & (65535))) << (16))));
2551 case M32C_OPERAND_IMM_56_HI
:
2553 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_56_u8
);
2554 if (length
<= 0) break;
2555 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2556 if (length
<= 0) break;
2558 FLD (f_dsp_56_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_64_u8
)) << (8))) | (FLD (f_dsp_56_u8
))))));
2562 case M32C_OPERAND_IMM_56_QI
:
2563 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
);
2565 case M32C_OPERAND_IMM_64_HI
:
2568 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, pc
, & value
);
2569 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2570 fields
->f_dsp_64_s16
= value
;
2573 case M32C_OPERAND_IMM_8_HI
:
2576 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, pc
, & value
);
2577 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) & (255))) << (8)))))));
2578 fields
->f_dsp_8_s16
= value
;
2581 case M32C_OPERAND_IMM_8_QI
:
2582 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
);
2584 case M32C_OPERAND_IMM_8_S4
:
2585 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
);
2587 case M32C_OPERAND_IMM_8_S4N
:
2588 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
);
2590 case M32C_OPERAND_IMM_SH_12_S4
:
2591 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
);
2593 case M32C_OPERAND_IMM_SH_20_S4
:
2594 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
);
2596 case M32C_OPERAND_IMM_SH_8_S4
:
2597 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
);
2599 case M32C_OPERAND_IMM1_S
:
2602 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 1, 32, total_length
, pc
, & value
);
2603 value
= ((value
) + (1));
2604 fields
->f_imm1_S
= value
;
2607 case M32C_OPERAND_IMM3_S
:
2609 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2610 if (length
<= 0) break;
2611 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2612 if (length
<= 0) break;
2614 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
2618 case M32C_OPERAND_LAB_16_8
:
2621 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
);
2622 value
= ((value
) + (((pc
) + (2))));
2623 fields
->f_lab_16_8
= value
;
2626 case M32C_OPERAND_LAB_24_8
:
2629 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
);
2630 value
= ((value
) + (((pc
) + (2))));
2631 fields
->f_lab_24_8
= value
;
2634 case M32C_OPERAND_LAB_32_8
:
2637 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
);
2638 value
= ((value
) + (((pc
) + (2))));
2639 fields
->f_lab_32_8
= value
;
2642 case M32C_OPERAND_LAB_40_8
:
2645 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
);
2646 value
= ((value
) + (((pc
) + (2))));
2647 fields
->f_lab_40_8
= value
;
2650 case M32C_OPERAND_LAB_5_3
:
2653 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, pc
, & value
);
2654 value
= ((value
) + (((pc
) + (2))));
2655 fields
->f_lab_5_3
= value
;
2658 case M32C_OPERAND_LAB_8_16
:
2661 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
);
2662 value
= ((((((((((USI
) (((value
) & (65280))) >> (8))) | (((((value
) & (255))) << (8))))) ^ (32768))) - (32768))) + (((pc
) + (1))));
2663 fields
->f_lab_8_16
= value
;
2666 case M32C_OPERAND_LAB_8_24
:
2669 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, pc
, & value
);
2670 value
= ((((((USI
) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2671 fields
->f_lab_8_24
= value
;
2674 case M32C_OPERAND_LAB_8_8
:
2677 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
);
2678 value
= ((value
) + (((pc
) + (1))));
2679 fields
->f_lab_8_8
= value
;
2682 case M32C_OPERAND_LAB32_JMP_S
:
2684 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2685 if (length
<= 0) break;
2686 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2687 if (length
<= 0) break;
2689 FLD (f_lab32_jmp_s
) = ((pc
) + (((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (2))));
2693 case M32C_OPERAND_Q
:
2695 case M32C_OPERAND_R0
:
2697 case M32C_OPERAND_R0H
:
2699 case M32C_OPERAND_R0L
:
2701 case M32C_OPERAND_R1
:
2703 case M32C_OPERAND_R1R2R0
:
2705 case M32C_OPERAND_R2
:
2707 case M32C_OPERAND_R2R0
:
2709 case M32C_OPERAND_R3
:
2711 case M32C_OPERAND_R3R1
:
2713 case M32C_OPERAND_REGSETPOP
:
2714 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2716 case M32C_OPERAND_REGSETPUSH
:
2717 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2719 case M32C_OPERAND_RN16_PUSH_S
:
2720 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
2722 case M32C_OPERAND_S
:
2724 case M32C_OPERAND_SRC16AN
:
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_SRC16ANHI
:
2728 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2730 case M32C_OPERAND_SRC16ANQI
:
2731 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2733 case M32C_OPERAND_SRC16RNHI
:
2734 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2736 case M32C_OPERAND_SRC16RNQI
:
2737 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2739 case M32C_OPERAND_SRC32ANPREFIXED
:
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_SRC32ANPREFIXEDHI
:
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_SRC32ANPREFIXEDQI
:
2746 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2748 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
2749 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2751 case M32C_OPERAND_SRC32ANUNPREFIXED
:
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_SRC32ANUNPREFIXEDHI
:
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_SRC32ANUNPREFIXEDQI
:
2758 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2760 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
2761 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2763 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
2766 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2767 value
= ((((value
) + (2))) % (4));
2768 fields
->f_src32_rn_prefixed_HI
= value
;
2771 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
2774 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2775 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2776 fields
->f_src32_rn_prefixed_QI
= value
;
2779 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
2782 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2783 value
= ((value
) - (2));
2784 fields
->f_src32_rn_prefixed_SI
= value
;
2787 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
2790 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2791 value
= ((((value
) + (2))) % (4));
2792 fields
->f_src32_rn_unprefixed_HI
= value
;
2795 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
2798 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2799 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2800 fields
->f_src32_rn_unprefixed_QI
= value
;
2803 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
2806 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2807 value
= ((value
) - (2));
2808 fields
->f_src32_rn_unprefixed_SI
= value
;
2811 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
2812 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_5_1
);
2814 case M32C_OPERAND_X
:
2816 case M32C_OPERAND_Z
:
2818 case M32C_OPERAND_COND16_16
:
2819 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2821 case M32C_OPERAND_COND16_24
:
2822 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2824 case M32C_OPERAND_COND16_32
:
2825 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2827 case M32C_OPERAND_COND16C
:
2828 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2830 case M32C_OPERAND_COND16J
:
2831 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2833 case M32C_OPERAND_COND16J5
:
2834 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_cond16j_5
);
2836 case M32C_OPERAND_COND32
:
2838 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_9_1
);
2839 if (length
<= 0) break;
2840 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2841 if (length
<= 0) break;
2843 FLD (f_cond32
) = ((((FLD (f_9_1
)) << (3))) | (FLD (f_13_3
)));
2847 case M32C_OPERAND_COND32_16
:
2848 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2850 case M32C_OPERAND_COND32_24
:
2851 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2853 case M32C_OPERAND_COND32_32
:
2854 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2856 case M32C_OPERAND_COND32_40
:
2857 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2859 case M32C_OPERAND_COND32J
:
2861 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 1, 3, 32, total_length
, pc
, & fields
->f_1_3
);
2862 if (length
<= 0) break;
2863 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2864 if (length
<= 0) break;
2866 FLD (f_cond32j
) = ((((FLD (f_1_3
)) << (1))) | (FLD (f_7_1
)));
2870 case M32C_OPERAND_CR1_PREFIXED_32
:
2871 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2873 case M32C_OPERAND_CR1_UNPREFIXED_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_CR16
:
2877 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2879 case M32C_OPERAND_CR2_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_CR3_PREFIXED_32
:
2883 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2885 case M32C_OPERAND_CR3_UNPREFIXED_32
:
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_FLAGS16
:
2889 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2891 case M32C_OPERAND_FLAGS32
:
2892 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2894 case M32C_OPERAND_SCCOND32
:
2895 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2897 case M32C_OPERAND_SIZE
:
2901 /* xgettext:c-format */
2902 opcodes_error_handler
2903 (_("internal error: unrecognized field %d while decoding insn"),
2911 cgen_insert_fn
* const m32c_cgen_insert_handlers
[] =
2916 cgen_extract_fn
* const m32c_cgen_extract_handlers
[] =
2918 extract_insn_normal
,
2921 int m32c_cgen_get_int_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2922 bfd_vma
m32c_cgen_get_vma_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2924 /* Getting values from cgen_fields is handled by a collection of functions.
2925 They are distinguished by the type of the VALUE argument they return.
2926 TODO: floating point, inlining support, remove cases where result type
2930 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
2932 const CGEN_FIELDS
* fields
)
2938 case M32C_OPERAND_A0
:
2941 case M32C_OPERAND_A1
:
2944 case M32C_OPERAND_AN16_PUSH_S
:
2945 value
= fields
->f_4_1
;
2947 case M32C_OPERAND_BIT16AN
:
2948 value
= fields
->f_dst16_an
;
2950 case M32C_OPERAND_BIT16RN
:
2951 value
= fields
->f_dst16_rn
;
2953 case M32C_OPERAND_BIT3_S
:
2954 value
= fields
->f_imm3_S
;
2956 case M32C_OPERAND_BIT32ANPREFIXED
:
2957 value
= fields
->f_dst32_an_prefixed
;
2959 case M32C_OPERAND_BIT32ANUNPREFIXED
:
2960 value
= fields
->f_dst32_an_unprefixed
;
2962 case M32C_OPERAND_BIT32RNPREFIXED
:
2963 value
= fields
->f_dst32_rn_prefixed_QI
;
2965 case M32C_OPERAND_BIT32RNUNPREFIXED
:
2966 value
= fields
->f_dst32_rn_unprefixed_QI
;
2968 case M32C_OPERAND_BITBASE16_16_S8
:
2969 value
= fields
->f_dsp_16_s8
;
2971 case M32C_OPERAND_BITBASE16_16_U16
:
2972 value
= fields
->f_dsp_16_u16
;
2974 case M32C_OPERAND_BITBASE16_16_U8
:
2975 value
= fields
->f_dsp_16_u8
;
2977 case M32C_OPERAND_BITBASE16_8_U11_S
:
2978 value
= fields
->f_bitbase16_u11_S
;
2980 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
2981 value
= fields
->f_bitbase32_16_s11_unprefixed
;
2983 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
2984 value
= fields
->f_bitbase32_16_s19_unprefixed
;
2986 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
2987 value
= fields
->f_bitbase32_16_u11_unprefixed
;
2989 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
2990 value
= fields
->f_bitbase32_16_u19_unprefixed
;
2992 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
2993 value
= fields
->f_bitbase32_16_u27_unprefixed
;
2995 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
2996 value
= fields
->f_bitbase32_24_s11_prefixed
;
2998 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
2999 value
= fields
->f_bitbase32_24_s19_prefixed
;
3001 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
3002 value
= fields
->f_bitbase32_24_u11_prefixed
;
3004 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3005 value
= fields
->f_bitbase32_24_u19_prefixed
;
3007 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3008 value
= fields
->f_bitbase32_24_u27_prefixed
;
3010 case M32C_OPERAND_BITNO16R
:
3011 value
= fields
->f_dsp_16_u8
;
3013 case M32C_OPERAND_BITNO32PREFIXED
:
3014 value
= fields
->f_bitno32_prefixed
;
3016 case M32C_OPERAND_BITNO32UNPREFIXED
:
3017 value
= fields
->f_bitno32_unprefixed
;
3019 case M32C_OPERAND_DSP_10_U6
:
3020 value
= fields
->f_dsp_10_u6
;
3022 case M32C_OPERAND_DSP_16_S16
:
3023 value
= fields
->f_dsp_16_s16
;
3025 case M32C_OPERAND_DSP_16_S8
:
3026 value
= fields
->f_dsp_16_s8
;
3028 case M32C_OPERAND_DSP_16_U16
:
3029 value
= fields
->f_dsp_16_u16
;
3031 case M32C_OPERAND_DSP_16_U20
:
3032 value
= fields
->f_dsp_16_u24
;
3034 case M32C_OPERAND_DSP_16_U24
:
3035 value
= fields
->f_dsp_16_u24
;
3037 case M32C_OPERAND_DSP_16_U8
:
3038 value
= fields
->f_dsp_16_u8
;
3040 case M32C_OPERAND_DSP_24_S16
:
3041 value
= fields
->f_dsp_24_s16
;
3043 case M32C_OPERAND_DSP_24_S8
:
3044 value
= fields
->f_dsp_24_s8
;
3046 case M32C_OPERAND_DSP_24_U16
:
3047 value
= fields
->f_dsp_24_u16
;
3049 case M32C_OPERAND_DSP_24_U20
:
3050 value
= fields
->f_dsp_24_u24
;
3052 case M32C_OPERAND_DSP_24_U24
:
3053 value
= fields
->f_dsp_24_u24
;
3055 case M32C_OPERAND_DSP_24_U8
:
3056 value
= fields
->f_dsp_24_u8
;
3058 case M32C_OPERAND_DSP_32_S16
:
3059 value
= fields
->f_dsp_32_s16
;
3061 case M32C_OPERAND_DSP_32_S8
:
3062 value
= fields
->f_dsp_32_s8
;
3064 case M32C_OPERAND_DSP_32_U16
:
3065 value
= fields
->f_dsp_32_u16
;
3067 case M32C_OPERAND_DSP_32_U20
:
3068 value
= fields
->f_dsp_32_u24
;
3070 case M32C_OPERAND_DSP_32_U24
:
3071 value
= fields
->f_dsp_32_u24
;
3073 case M32C_OPERAND_DSP_32_U8
:
3074 value
= fields
->f_dsp_32_u8
;
3076 case M32C_OPERAND_DSP_40_S16
:
3077 value
= fields
->f_dsp_40_s16
;
3079 case M32C_OPERAND_DSP_40_S8
:
3080 value
= fields
->f_dsp_40_s8
;
3082 case M32C_OPERAND_DSP_40_U16
:
3083 value
= fields
->f_dsp_40_u16
;
3085 case M32C_OPERAND_DSP_40_U20
:
3086 value
= fields
->f_dsp_40_u20
;
3088 case M32C_OPERAND_DSP_40_U24
:
3089 value
= fields
->f_dsp_40_u24
;
3091 case M32C_OPERAND_DSP_40_U8
:
3092 value
= fields
->f_dsp_40_u8
;
3094 case M32C_OPERAND_DSP_48_S16
:
3095 value
= fields
->f_dsp_48_s16
;
3097 case M32C_OPERAND_DSP_48_S8
:
3098 value
= fields
->f_dsp_48_s8
;
3100 case M32C_OPERAND_DSP_48_U16
:
3101 value
= fields
->f_dsp_48_u16
;
3103 case M32C_OPERAND_DSP_48_U20
:
3104 value
= fields
->f_dsp_48_u20
;
3106 case M32C_OPERAND_DSP_48_U24
:
3107 value
= fields
->f_dsp_48_u24
;
3109 case M32C_OPERAND_DSP_48_U8
:
3110 value
= fields
->f_dsp_48_u8
;
3112 case M32C_OPERAND_DSP_8_S24
:
3113 value
= fields
->f_dsp_8_s24
;
3115 case M32C_OPERAND_DSP_8_S8
:
3116 value
= fields
->f_dsp_8_s8
;
3118 case M32C_OPERAND_DSP_8_U16
:
3119 value
= fields
->f_dsp_8_u16
;
3121 case M32C_OPERAND_DSP_8_U24
:
3122 value
= fields
->f_dsp_8_u24
;
3124 case M32C_OPERAND_DSP_8_U6
:
3125 value
= fields
->f_dsp_8_u6
;
3127 case M32C_OPERAND_DSP_8_U8
:
3128 value
= fields
->f_dsp_8_u8
;
3130 case M32C_OPERAND_DST16AN
:
3131 value
= fields
->f_dst16_an
;
3133 case M32C_OPERAND_DST16AN_S
:
3134 value
= fields
->f_dst16_an_s
;
3136 case M32C_OPERAND_DST16ANHI
:
3137 value
= fields
->f_dst16_an
;
3139 case M32C_OPERAND_DST16ANQI
:
3140 value
= fields
->f_dst16_an
;
3142 case M32C_OPERAND_DST16ANQI_S
:
3143 value
= fields
->f_dst16_rn_QI_s
;
3145 case M32C_OPERAND_DST16ANSI
:
3146 value
= fields
->f_dst16_an
;
3148 case M32C_OPERAND_DST16RNEXTQI
:
3149 value
= fields
->f_dst16_rn_ext
;
3151 case M32C_OPERAND_DST16RNHI
:
3152 value
= fields
->f_dst16_rn
;
3154 case M32C_OPERAND_DST16RNQI
:
3155 value
= fields
->f_dst16_rn
;
3157 case M32C_OPERAND_DST16RNQI_S
:
3158 value
= fields
->f_dst16_rn_QI_s
;
3160 case M32C_OPERAND_DST16RNSI
:
3161 value
= fields
->f_dst16_rn
;
3163 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3164 value
= fields
->f_dst32_an_unprefixed
;
3166 case M32C_OPERAND_DST32ANPREFIXED
:
3167 value
= fields
->f_dst32_an_prefixed
;
3169 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3170 value
= fields
->f_dst32_an_prefixed
;
3172 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3173 value
= fields
->f_dst32_an_prefixed
;
3175 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3176 value
= fields
->f_dst32_an_prefixed
;
3178 case M32C_OPERAND_DST32ANUNPREFIXED
:
3179 value
= fields
->f_dst32_an_unprefixed
;
3181 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3182 value
= fields
->f_dst32_an_unprefixed
;
3184 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3185 value
= fields
->f_dst32_an_unprefixed
;
3187 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3188 value
= fields
->f_dst32_an_unprefixed
;
3190 case M32C_OPERAND_DST32R0HI_S
:
3193 case M32C_OPERAND_DST32R0QI_S
:
3196 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3197 value
= fields
->f_dst32_rn_ext_unprefixed
;
3199 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3200 value
= fields
->f_dst32_rn_ext_unprefixed
;
3202 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3203 value
= fields
->f_dst32_rn_prefixed_HI
;
3205 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3206 value
= fields
->f_dst32_rn_prefixed_QI
;
3208 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3209 value
= fields
->f_dst32_rn_prefixed_SI
;
3211 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3212 value
= fields
->f_dst32_rn_unprefixed_HI
;
3214 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3215 value
= fields
->f_dst32_rn_unprefixed_QI
;
3217 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3218 value
= fields
->f_dst32_rn_unprefixed_SI
;
3220 case M32C_OPERAND_G
:
3223 case M32C_OPERAND_IMM_12_S4
:
3224 value
= fields
->f_imm_12_s4
;
3226 case M32C_OPERAND_IMM_12_S4N
:
3227 value
= fields
->f_imm_12_s4
;
3229 case M32C_OPERAND_IMM_13_U3
:
3230 value
= fields
->f_imm_13_u3
;
3232 case M32C_OPERAND_IMM_16_HI
:
3233 value
= fields
->f_dsp_16_s16
;
3235 case M32C_OPERAND_IMM_16_QI
:
3236 value
= fields
->f_dsp_16_s8
;
3238 case M32C_OPERAND_IMM_16_SI
:
3239 value
= fields
->f_dsp_16_s32
;
3241 case M32C_OPERAND_IMM_20_S4
:
3242 value
= fields
->f_imm_20_s4
;
3244 case M32C_OPERAND_IMM_24_HI
:
3245 value
= fields
->f_dsp_24_s16
;
3247 case M32C_OPERAND_IMM_24_QI
:
3248 value
= fields
->f_dsp_24_s8
;
3250 case M32C_OPERAND_IMM_24_SI
:
3251 value
= fields
->f_dsp_24_s32
;
3253 case M32C_OPERAND_IMM_32_HI
:
3254 value
= fields
->f_dsp_32_s16
;
3256 case M32C_OPERAND_IMM_32_QI
:
3257 value
= fields
->f_dsp_32_s8
;
3259 case M32C_OPERAND_IMM_32_SI
:
3260 value
= fields
->f_dsp_32_s32
;
3262 case M32C_OPERAND_IMM_40_HI
:
3263 value
= fields
->f_dsp_40_s16
;
3265 case M32C_OPERAND_IMM_40_QI
:
3266 value
= fields
->f_dsp_40_s8
;
3268 case M32C_OPERAND_IMM_40_SI
:
3269 value
= fields
->f_dsp_40_s32
;
3271 case M32C_OPERAND_IMM_48_HI
:
3272 value
= fields
->f_dsp_48_s16
;
3274 case M32C_OPERAND_IMM_48_QI
:
3275 value
= fields
->f_dsp_48_s8
;
3277 case M32C_OPERAND_IMM_48_SI
:
3278 value
= fields
->f_dsp_48_s32
;
3280 case M32C_OPERAND_IMM_56_HI
:
3281 value
= fields
->f_dsp_56_s16
;
3283 case M32C_OPERAND_IMM_56_QI
:
3284 value
= fields
->f_dsp_56_s8
;
3286 case M32C_OPERAND_IMM_64_HI
:
3287 value
= fields
->f_dsp_64_s16
;
3289 case M32C_OPERAND_IMM_8_HI
:
3290 value
= fields
->f_dsp_8_s16
;
3292 case M32C_OPERAND_IMM_8_QI
:
3293 value
= fields
->f_dsp_8_s8
;
3295 case M32C_OPERAND_IMM_8_S4
:
3296 value
= fields
->f_imm_8_s4
;
3298 case M32C_OPERAND_IMM_8_S4N
:
3299 value
= fields
->f_imm_8_s4
;
3301 case M32C_OPERAND_IMM_SH_12_S4
:
3302 value
= fields
->f_imm_12_s4
;
3304 case M32C_OPERAND_IMM_SH_20_S4
:
3305 value
= fields
->f_imm_20_s4
;
3307 case M32C_OPERAND_IMM_SH_8_S4
:
3308 value
= fields
->f_imm_8_s4
;
3310 case M32C_OPERAND_IMM1_S
:
3311 value
= fields
->f_imm1_S
;
3313 case M32C_OPERAND_IMM3_S
:
3314 value
= fields
->f_imm3_S
;
3316 case M32C_OPERAND_LAB_16_8
:
3317 value
= fields
->f_lab_16_8
;
3319 case M32C_OPERAND_LAB_24_8
:
3320 value
= fields
->f_lab_24_8
;
3322 case M32C_OPERAND_LAB_32_8
:
3323 value
= fields
->f_lab_32_8
;
3325 case M32C_OPERAND_LAB_40_8
:
3326 value
= fields
->f_lab_40_8
;
3328 case M32C_OPERAND_LAB_5_3
:
3329 value
= fields
->f_lab_5_3
;
3331 case M32C_OPERAND_LAB_8_16
:
3332 value
= fields
->f_lab_8_16
;
3334 case M32C_OPERAND_LAB_8_24
:
3335 value
= fields
->f_lab_8_24
;
3337 case M32C_OPERAND_LAB_8_8
:
3338 value
= fields
->f_lab_8_8
;
3340 case M32C_OPERAND_LAB32_JMP_S
:
3341 value
= fields
->f_lab32_jmp_s
;
3343 case M32C_OPERAND_Q
:
3346 case M32C_OPERAND_R0
:
3349 case M32C_OPERAND_R0H
:
3352 case M32C_OPERAND_R0L
:
3355 case M32C_OPERAND_R1
:
3358 case M32C_OPERAND_R1R2R0
:
3361 case M32C_OPERAND_R2
:
3364 case M32C_OPERAND_R2R0
:
3367 case M32C_OPERAND_R3
:
3370 case M32C_OPERAND_R3R1
:
3373 case M32C_OPERAND_REGSETPOP
:
3374 value
= fields
->f_8_8
;
3376 case M32C_OPERAND_REGSETPUSH
:
3377 value
= fields
->f_8_8
;
3379 case M32C_OPERAND_RN16_PUSH_S
:
3380 value
= fields
->f_4_1
;
3382 case M32C_OPERAND_S
:
3385 case M32C_OPERAND_SRC16AN
:
3386 value
= fields
->f_src16_an
;
3388 case M32C_OPERAND_SRC16ANHI
:
3389 value
= fields
->f_src16_an
;
3391 case M32C_OPERAND_SRC16ANQI
:
3392 value
= fields
->f_src16_an
;
3394 case M32C_OPERAND_SRC16RNHI
:
3395 value
= fields
->f_src16_rn
;
3397 case M32C_OPERAND_SRC16RNQI
:
3398 value
= fields
->f_src16_rn
;
3400 case M32C_OPERAND_SRC32ANPREFIXED
:
3401 value
= fields
->f_src32_an_prefixed
;
3403 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3404 value
= fields
->f_src32_an_prefixed
;
3406 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3407 value
= fields
->f_src32_an_prefixed
;
3409 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3410 value
= fields
->f_src32_an_prefixed
;
3412 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3413 value
= fields
->f_src32_an_unprefixed
;
3415 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3416 value
= fields
->f_src32_an_unprefixed
;
3418 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3419 value
= fields
->f_src32_an_unprefixed
;
3421 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3422 value
= fields
->f_src32_an_unprefixed
;
3424 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3425 value
= fields
->f_src32_rn_prefixed_HI
;
3427 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3428 value
= fields
->f_src32_rn_prefixed_QI
;
3430 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3431 value
= fields
->f_src32_rn_prefixed_SI
;
3433 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3434 value
= fields
->f_src32_rn_unprefixed_HI
;
3436 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3437 value
= fields
->f_src32_rn_unprefixed_QI
;
3439 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3440 value
= fields
->f_src32_rn_unprefixed_SI
;
3442 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3443 value
= fields
->f_5_1
;
3445 case M32C_OPERAND_X
:
3448 case M32C_OPERAND_Z
:
3451 case M32C_OPERAND_COND16_16
:
3452 value
= fields
->f_dsp_16_u8
;
3454 case M32C_OPERAND_COND16_24
:
3455 value
= fields
->f_dsp_24_u8
;
3457 case M32C_OPERAND_COND16_32
:
3458 value
= fields
->f_dsp_32_u8
;
3460 case M32C_OPERAND_COND16C
:
3461 value
= fields
->f_cond16
;
3463 case M32C_OPERAND_COND16J
:
3464 value
= fields
->f_cond16
;
3466 case M32C_OPERAND_COND16J5
:
3467 value
= fields
->f_cond16j_5
;
3469 case M32C_OPERAND_COND32
:
3470 value
= fields
->f_cond32
;
3472 case M32C_OPERAND_COND32_16
:
3473 value
= fields
->f_dsp_16_u8
;
3475 case M32C_OPERAND_COND32_24
:
3476 value
= fields
->f_dsp_24_u8
;
3478 case M32C_OPERAND_COND32_32
:
3479 value
= fields
->f_dsp_32_u8
;
3481 case M32C_OPERAND_COND32_40
:
3482 value
= fields
->f_dsp_40_u8
;
3484 case M32C_OPERAND_COND32J
:
3485 value
= fields
->f_cond32j
;
3487 case M32C_OPERAND_CR1_PREFIXED_32
:
3488 value
= fields
->f_21_3
;
3490 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3491 value
= fields
->f_13_3
;
3493 case M32C_OPERAND_CR16
:
3494 value
= fields
->f_9_3
;
3496 case M32C_OPERAND_CR2_32
:
3497 value
= fields
->f_13_3
;
3499 case M32C_OPERAND_CR3_PREFIXED_32
:
3500 value
= fields
->f_21_3
;
3502 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3503 value
= fields
->f_13_3
;
3505 case M32C_OPERAND_FLAGS16
:
3506 value
= fields
->f_9_3
;
3508 case M32C_OPERAND_FLAGS32
:
3509 value
= fields
->f_13_3
;
3511 case M32C_OPERAND_SCCOND32
:
3512 value
= fields
->f_cond16
;
3514 case M32C_OPERAND_SIZE
:
3519 /* xgettext:c-format */
3520 opcodes_error_handler
3521 (_("internal error: unrecognized field %d while getting int operand"),
3530 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3532 const CGEN_FIELDS
* fields
)
3538 case M32C_OPERAND_A0
:
3541 case M32C_OPERAND_A1
:
3544 case M32C_OPERAND_AN16_PUSH_S
:
3545 value
= fields
->f_4_1
;
3547 case M32C_OPERAND_BIT16AN
:
3548 value
= fields
->f_dst16_an
;
3550 case M32C_OPERAND_BIT16RN
:
3551 value
= fields
->f_dst16_rn
;
3553 case M32C_OPERAND_BIT3_S
:
3554 value
= fields
->f_imm3_S
;
3556 case M32C_OPERAND_BIT32ANPREFIXED
:
3557 value
= fields
->f_dst32_an_prefixed
;
3559 case M32C_OPERAND_BIT32ANUNPREFIXED
:
3560 value
= fields
->f_dst32_an_unprefixed
;
3562 case M32C_OPERAND_BIT32RNPREFIXED
:
3563 value
= fields
->f_dst32_rn_prefixed_QI
;
3565 case M32C_OPERAND_BIT32RNUNPREFIXED
:
3566 value
= fields
->f_dst32_rn_unprefixed_QI
;
3568 case M32C_OPERAND_BITBASE16_16_S8
:
3569 value
= fields
->f_dsp_16_s8
;
3571 case M32C_OPERAND_BITBASE16_16_U16
:
3572 value
= fields
->f_dsp_16_u16
;
3574 case M32C_OPERAND_BITBASE16_16_U8
:
3575 value
= fields
->f_dsp_16_u8
;
3577 case M32C_OPERAND_BITBASE16_8_U11_S
:
3578 value
= fields
->f_bitbase16_u11_S
;
3580 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
3581 value
= fields
->f_bitbase32_16_s11_unprefixed
;
3583 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
3584 value
= fields
->f_bitbase32_16_s19_unprefixed
;
3586 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
3587 value
= fields
->f_bitbase32_16_u11_unprefixed
;
3589 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
3590 value
= fields
->f_bitbase32_16_u19_unprefixed
;
3592 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
3593 value
= fields
->f_bitbase32_16_u27_unprefixed
;
3595 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
3596 value
= fields
->f_bitbase32_24_s11_prefixed
;
3598 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
3599 value
= fields
->f_bitbase32_24_s19_prefixed
;
3601 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
3602 value
= fields
->f_bitbase32_24_u11_prefixed
;
3604 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3605 value
= fields
->f_bitbase32_24_u19_prefixed
;
3607 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3608 value
= fields
->f_bitbase32_24_u27_prefixed
;
3610 case M32C_OPERAND_BITNO16R
:
3611 value
= fields
->f_dsp_16_u8
;
3613 case M32C_OPERAND_BITNO32PREFIXED
:
3614 value
= fields
->f_bitno32_prefixed
;
3616 case M32C_OPERAND_BITNO32UNPREFIXED
:
3617 value
= fields
->f_bitno32_unprefixed
;
3619 case M32C_OPERAND_DSP_10_U6
:
3620 value
= fields
->f_dsp_10_u6
;
3622 case M32C_OPERAND_DSP_16_S16
:
3623 value
= fields
->f_dsp_16_s16
;
3625 case M32C_OPERAND_DSP_16_S8
:
3626 value
= fields
->f_dsp_16_s8
;
3628 case M32C_OPERAND_DSP_16_U16
:
3629 value
= fields
->f_dsp_16_u16
;
3631 case M32C_OPERAND_DSP_16_U20
:
3632 value
= fields
->f_dsp_16_u24
;
3634 case M32C_OPERAND_DSP_16_U24
:
3635 value
= fields
->f_dsp_16_u24
;
3637 case M32C_OPERAND_DSP_16_U8
:
3638 value
= fields
->f_dsp_16_u8
;
3640 case M32C_OPERAND_DSP_24_S16
:
3641 value
= fields
->f_dsp_24_s16
;
3643 case M32C_OPERAND_DSP_24_S8
:
3644 value
= fields
->f_dsp_24_s8
;
3646 case M32C_OPERAND_DSP_24_U16
:
3647 value
= fields
->f_dsp_24_u16
;
3649 case M32C_OPERAND_DSP_24_U20
:
3650 value
= fields
->f_dsp_24_u24
;
3652 case M32C_OPERAND_DSP_24_U24
:
3653 value
= fields
->f_dsp_24_u24
;
3655 case M32C_OPERAND_DSP_24_U8
:
3656 value
= fields
->f_dsp_24_u8
;
3658 case M32C_OPERAND_DSP_32_S16
:
3659 value
= fields
->f_dsp_32_s16
;
3661 case M32C_OPERAND_DSP_32_S8
:
3662 value
= fields
->f_dsp_32_s8
;
3664 case M32C_OPERAND_DSP_32_U16
:
3665 value
= fields
->f_dsp_32_u16
;
3667 case M32C_OPERAND_DSP_32_U20
:
3668 value
= fields
->f_dsp_32_u24
;
3670 case M32C_OPERAND_DSP_32_U24
:
3671 value
= fields
->f_dsp_32_u24
;
3673 case M32C_OPERAND_DSP_32_U8
:
3674 value
= fields
->f_dsp_32_u8
;
3676 case M32C_OPERAND_DSP_40_S16
:
3677 value
= fields
->f_dsp_40_s16
;
3679 case M32C_OPERAND_DSP_40_S8
:
3680 value
= fields
->f_dsp_40_s8
;
3682 case M32C_OPERAND_DSP_40_U16
:
3683 value
= fields
->f_dsp_40_u16
;
3685 case M32C_OPERAND_DSP_40_U20
:
3686 value
= fields
->f_dsp_40_u20
;
3688 case M32C_OPERAND_DSP_40_U24
:
3689 value
= fields
->f_dsp_40_u24
;
3691 case M32C_OPERAND_DSP_40_U8
:
3692 value
= fields
->f_dsp_40_u8
;
3694 case M32C_OPERAND_DSP_48_S16
:
3695 value
= fields
->f_dsp_48_s16
;
3697 case M32C_OPERAND_DSP_48_S8
:
3698 value
= fields
->f_dsp_48_s8
;
3700 case M32C_OPERAND_DSP_48_U16
:
3701 value
= fields
->f_dsp_48_u16
;
3703 case M32C_OPERAND_DSP_48_U20
:
3704 value
= fields
->f_dsp_48_u20
;
3706 case M32C_OPERAND_DSP_48_U24
:
3707 value
= fields
->f_dsp_48_u24
;
3709 case M32C_OPERAND_DSP_48_U8
:
3710 value
= fields
->f_dsp_48_u8
;
3712 case M32C_OPERAND_DSP_8_S24
:
3713 value
= fields
->f_dsp_8_s24
;
3715 case M32C_OPERAND_DSP_8_S8
:
3716 value
= fields
->f_dsp_8_s8
;
3718 case M32C_OPERAND_DSP_8_U16
:
3719 value
= fields
->f_dsp_8_u16
;
3721 case M32C_OPERAND_DSP_8_U24
:
3722 value
= fields
->f_dsp_8_u24
;
3724 case M32C_OPERAND_DSP_8_U6
:
3725 value
= fields
->f_dsp_8_u6
;
3727 case M32C_OPERAND_DSP_8_U8
:
3728 value
= fields
->f_dsp_8_u8
;
3730 case M32C_OPERAND_DST16AN
:
3731 value
= fields
->f_dst16_an
;
3733 case M32C_OPERAND_DST16AN_S
:
3734 value
= fields
->f_dst16_an_s
;
3736 case M32C_OPERAND_DST16ANHI
:
3737 value
= fields
->f_dst16_an
;
3739 case M32C_OPERAND_DST16ANQI
:
3740 value
= fields
->f_dst16_an
;
3742 case M32C_OPERAND_DST16ANQI_S
:
3743 value
= fields
->f_dst16_rn_QI_s
;
3745 case M32C_OPERAND_DST16ANSI
:
3746 value
= fields
->f_dst16_an
;
3748 case M32C_OPERAND_DST16RNEXTQI
:
3749 value
= fields
->f_dst16_rn_ext
;
3751 case M32C_OPERAND_DST16RNHI
:
3752 value
= fields
->f_dst16_rn
;
3754 case M32C_OPERAND_DST16RNQI
:
3755 value
= fields
->f_dst16_rn
;
3757 case M32C_OPERAND_DST16RNQI_S
:
3758 value
= fields
->f_dst16_rn_QI_s
;
3760 case M32C_OPERAND_DST16RNSI
:
3761 value
= fields
->f_dst16_rn
;
3763 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3764 value
= fields
->f_dst32_an_unprefixed
;
3766 case M32C_OPERAND_DST32ANPREFIXED
:
3767 value
= fields
->f_dst32_an_prefixed
;
3769 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3770 value
= fields
->f_dst32_an_prefixed
;
3772 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3773 value
= fields
->f_dst32_an_prefixed
;
3775 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3776 value
= fields
->f_dst32_an_prefixed
;
3778 case M32C_OPERAND_DST32ANUNPREFIXED
:
3779 value
= fields
->f_dst32_an_unprefixed
;
3781 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3782 value
= fields
->f_dst32_an_unprefixed
;
3784 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3785 value
= fields
->f_dst32_an_unprefixed
;
3787 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3788 value
= fields
->f_dst32_an_unprefixed
;
3790 case M32C_OPERAND_DST32R0HI_S
:
3793 case M32C_OPERAND_DST32R0QI_S
:
3796 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3797 value
= fields
->f_dst32_rn_ext_unprefixed
;
3799 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3800 value
= fields
->f_dst32_rn_ext_unprefixed
;
3802 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3803 value
= fields
->f_dst32_rn_prefixed_HI
;
3805 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3806 value
= fields
->f_dst32_rn_prefixed_QI
;
3808 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3809 value
= fields
->f_dst32_rn_prefixed_SI
;
3811 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3812 value
= fields
->f_dst32_rn_unprefixed_HI
;
3814 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3815 value
= fields
->f_dst32_rn_unprefixed_QI
;
3817 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3818 value
= fields
->f_dst32_rn_unprefixed_SI
;
3820 case M32C_OPERAND_G
:
3823 case M32C_OPERAND_IMM_12_S4
:
3824 value
= fields
->f_imm_12_s4
;
3826 case M32C_OPERAND_IMM_12_S4N
:
3827 value
= fields
->f_imm_12_s4
;
3829 case M32C_OPERAND_IMM_13_U3
:
3830 value
= fields
->f_imm_13_u3
;
3832 case M32C_OPERAND_IMM_16_HI
:
3833 value
= fields
->f_dsp_16_s16
;
3835 case M32C_OPERAND_IMM_16_QI
:
3836 value
= fields
->f_dsp_16_s8
;
3838 case M32C_OPERAND_IMM_16_SI
:
3839 value
= fields
->f_dsp_16_s32
;
3841 case M32C_OPERAND_IMM_20_S4
:
3842 value
= fields
->f_imm_20_s4
;
3844 case M32C_OPERAND_IMM_24_HI
:
3845 value
= fields
->f_dsp_24_s16
;
3847 case M32C_OPERAND_IMM_24_QI
:
3848 value
= fields
->f_dsp_24_s8
;
3850 case M32C_OPERAND_IMM_24_SI
:
3851 value
= fields
->f_dsp_24_s32
;
3853 case M32C_OPERAND_IMM_32_HI
:
3854 value
= fields
->f_dsp_32_s16
;
3856 case M32C_OPERAND_IMM_32_QI
:
3857 value
= fields
->f_dsp_32_s8
;
3859 case M32C_OPERAND_IMM_32_SI
:
3860 value
= fields
->f_dsp_32_s32
;
3862 case M32C_OPERAND_IMM_40_HI
:
3863 value
= fields
->f_dsp_40_s16
;
3865 case M32C_OPERAND_IMM_40_QI
:
3866 value
= fields
->f_dsp_40_s8
;
3868 case M32C_OPERAND_IMM_40_SI
:
3869 value
= fields
->f_dsp_40_s32
;
3871 case M32C_OPERAND_IMM_48_HI
:
3872 value
= fields
->f_dsp_48_s16
;
3874 case M32C_OPERAND_IMM_48_QI
:
3875 value
= fields
->f_dsp_48_s8
;
3877 case M32C_OPERAND_IMM_48_SI
:
3878 value
= fields
->f_dsp_48_s32
;
3880 case M32C_OPERAND_IMM_56_HI
:
3881 value
= fields
->f_dsp_56_s16
;
3883 case M32C_OPERAND_IMM_56_QI
:
3884 value
= fields
->f_dsp_56_s8
;
3886 case M32C_OPERAND_IMM_64_HI
:
3887 value
= fields
->f_dsp_64_s16
;
3889 case M32C_OPERAND_IMM_8_HI
:
3890 value
= fields
->f_dsp_8_s16
;
3892 case M32C_OPERAND_IMM_8_QI
:
3893 value
= fields
->f_dsp_8_s8
;
3895 case M32C_OPERAND_IMM_8_S4
:
3896 value
= fields
->f_imm_8_s4
;
3898 case M32C_OPERAND_IMM_8_S4N
:
3899 value
= fields
->f_imm_8_s4
;
3901 case M32C_OPERAND_IMM_SH_12_S4
:
3902 value
= fields
->f_imm_12_s4
;
3904 case M32C_OPERAND_IMM_SH_20_S4
:
3905 value
= fields
->f_imm_20_s4
;
3907 case M32C_OPERAND_IMM_SH_8_S4
:
3908 value
= fields
->f_imm_8_s4
;
3910 case M32C_OPERAND_IMM1_S
:
3911 value
= fields
->f_imm1_S
;
3913 case M32C_OPERAND_IMM3_S
:
3914 value
= fields
->f_imm3_S
;
3916 case M32C_OPERAND_LAB_16_8
:
3917 value
= fields
->f_lab_16_8
;
3919 case M32C_OPERAND_LAB_24_8
:
3920 value
= fields
->f_lab_24_8
;
3922 case M32C_OPERAND_LAB_32_8
:
3923 value
= fields
->f_lab_32_8
;
3925 case M32C_OPERAND_LAB_40_8
:
3926 value
= fields
->f_lab_40_8
;
3928 case M32C_OPERAND_LAB_5_3
:
3929 value
= fields
->f_lab_5_3
;
3931 case M32C_OPERAND_LAB_8_16
:
3932 value
= fields
->f_lab_8_16
;
3934 case M32C_OPERAND_LAB_8_24
:
3935 value
= fields
->f_lab_8_24
;
3937 case M32C_OPERAND_LAB_8_8
:
3938 value
= fields
->f_lab_8_8
;
3940 case M32C_OPERAND_LAB32_JMP_S
:
3941 value
= fields
->f_lab32_jmp_s
;
3943 case M32C_OPERAND_Q
:
3946 case M32C_OPERAND_R0
:
3949 case M32C_OPERAND_R0H
:
3952 case M32C_OPERAND_R0L
:
3955 case M32C_OPERAND_R1
:
3958 case M32C_OPERAND_R1R2R0
:
3961 case M32C_OPERAND_R2
:
3964 case M32C_OPERAND_R2R0
:
3967 case M32C_OPERAND_R3
:
3970 case M32C_OPERAND_R3R1
:
3973 case M32C_OPERAND_REGSETPOP
:
3974 value
= fields
->f_8_8
;
3976 case M32C_OPERAND_REGSETPUSH
:
3977 value
= fields
->f_8_8
;
3979 case M32C_OPERAND_RN16_PUSH_S
:
3980 value
= fields
->f_4_1
;
3982 case M32C_OPERAND_S
:
3985 case M32C_OPERAND_SRC16AN
:
3986 value
= fields
->f_src16_an
;
3988 case M32C_OPERAND_SRC16ANHI
:
3989 value
= fields
->f_src16_an
;
3991 case M32C_OPERAND_SRC16ANQI
:
3992 value
= fields
->f_src16_an
;
3994 case M32C_OPERAND_SRC16RNHI
:
3995 value
= fields
->f_src16_rn
;
3997 case M32C_OPERAND_SRC16RNQI
:
3998 value
= fields
->f_src16_rn
;
4000 case M32C_OPERAND_SRC32ANPREFIXED
:
4001 value
= fields
->f_src32_an_prefixed
;
4003 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4004 value
= fields
->f_src32_an_prefixed
;
4006 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4007 value
= fields
->f_src32_an_prefixed
;
4009 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4010 value
= fields
->f_src32_an_prefixed
;
4012 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4013 value
= fields
->f_src32_an_unprefixed
;
4015 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4016 value
= fields
->f_src32_an_unprefixed
;
4018 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4019 value
= fields
->f_src32_an_unprefixed
;
4021 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4022 value
= fields
->f_src32_an_unprefixed
;
4024 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4025 value
= fields
->f_src32_rn_prefixed_HI
;
4027 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4028 value
= fields
->f_src32_rn_prefixed_QI
;
4030 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4031 value
= fields
->f_src32_rn_prefixed_SI
;
4033 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4034 value
= fields
->f_src32_rn_unprefixed_HI
;
4036 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4037 value
= fields
->f_src32_rn_unprefixed_QI
;
4039 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4040 value
= fields
->f_src32_rn_unprefixed_SI
;
4042 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4043 value
= fields
->f_5_1
;
4045 case M32C_OPERAND_X
:
4048 case M32C_OPERAND_Z
:
4051 case M32C_OPERAND_COND16_16
:
4052 value
= fields
->f_dsp_16_u8
;
4054 case M32C_OPERAND_COND16_24
:
4055 value
= fields
->f_dsp_24_u8
;
4057 case M32C_OPERAND_COND16_32
:
4058 value
= fields
->f_dsp_32_u8
;
4060 case M32C_OPERAND_COND16C
:
4061 value
= fields
->f_cond16
;
4063 case M32C_OPERAND_COND16J
:
4064 value
= fields
->f_cond16
;
4066 case M32C_OPERAND_COND16J5
:
4067 value
= fields
->f_cond16j_5
;
4069 case M32C_OPERAND_COND32
:
4070 value
= fields
->f_cond32
;
4072 case M32C_OPERAND_COND32_16
:
4073 value
= fields
->f_dsp_16_u8
;
4075 case M32C_OPERAND_COND32_24
:
4076 value
= fields
->f_dsp_24_u8
;
4078 case M32C_OPERAND_COND32_32
:
4079 value
= fields
->f_dsp_32_u8
;
4081 case M32C_OPERAND_COND32_40
:
4082 value
= fields
->f_dsp_40_u8
;
4084 case M32C_OPERAND_COND32J
:
4085 value
= fields
->f_cond32j
;
4087 case M32C_OPERAND_CR1_PREFIXED_32
:
4088 value
= fields
->f_21_3
;
4090 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4091 value
= fields
->f_13_3
;
4093 case M32C_OPERAND_CR16
:
4094 value
= fields
->f_9_3
;
4096 case M32C_OPERAND_CR2_32
:
4097 value
= fields
->f_13_3
;
4099 case M32C_OPERAND_CR3_PREFIXED_32
:
4100 value
= fields
->f_21_3
;
4102 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4103 value
= fields
->f_13_3
;
4105 case M32C_OPERAND_FLAGS16
:
4106 value
= fields
->f_9_3
;
4108 case M32C_OPERAND_FLAGS32
:
4109 value
= fields
->f_13_3
;
4111 case M32C_OPERAND_SCCOND32
:
4112 value
= fields
->f_cond16
;
4114 case M32C_OPERAND_SIZE
:
4119 /* xgettext:c-format */
4120 opcodes_error_handler
4121 (_("internal error: unrecognized field %d while getting vma operand"),
4129 void m32c_cgen_set_int_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, int);
4130 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, bfd_vma
);
4132 /* Stuffing values in cgen_fields is handled by a collection of functions.
4133 They are distinguished by the type of the VALUE argument they accept.
4134 TODO: floating point, inlining support, remove cases where argument type
4138 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4140 CGEN_FIELDS
* fields
,
4145 case M32C_OPERAND_A0
:
4147 case M32C_OPERAND_A1
:
4149 case M32C_OPERAND_AN16_PUSH_S
:
4150 fields
->f_4_1
= value
;
4152 case M32C_OPERAND_BIT16AN
:
4153 fields
->f_dst16_an
= value
;
4155 case M32C_OPERAND_BIT16RN
:
4156 fields
->f_dst16_rn
= value
;
4158 case M32C_OPERAND_BIT3_S
:
4159 fields
->f_imm3_S
= value
;
4161 case M32C_OPERAND_BIT32ANPREFIXED
:
4162 fields
->f_dst32_an_prefixed
= value
;
4164 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4165 fields
->f_dst32_an_unprefixed
= value
;
4167 case M32C_OPERAND_BIT32RNPREFIXED
:
4168 fields
->f_dst32_rn_prefixed_QI
= value
;
4170 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4171 fields
->f_dst32_rn_unprefixed_QI
= value
;
4173 case M32C_OPERAND_BITBASE16_16_S8
:
4174 fields
->f_dsp_16_s8
= value
;
4176 case M32C_OPERAND_BITBASE16_16_U16
:
4177 fields
->f_dsp_16_u16
= value
;
4179 case M32C_OPERAND_BITBASE16_16_U8
:
4180 fields
->f_dsp_16_u8
= value
;
4182 case M32C_OPERAND_BITBASE16_8_U11_S
:
4183 fields
->f_bitbase16_u11_S
= value
;
4185 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4186 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4188 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4189 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4191 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4192 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4194 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4195 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4197 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4198 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4200 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4201 fields
->f_bitbase32_24_s11_prefixed
= value
;
4203 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4204 fields
->f_bitbase32_24_s19_prefixed
= value
;
4206 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4207 fields
->f_bitbase32_24_u11_prefixed
= value
;
4209 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4210 fields
->f_bitbase32_24_u19_prefixed
= value
;
4212 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4213 fields
->f_bitbase32_24_u27_prefixed
= value
;
4215 case M32C_OPERAND_BITNO16R
:
4216 fields
->f_dsp_16_u8
= value
;
4218 case M32C_OPERAND_BITNO32PREFIXED
:
4219 fields
->f_bitno32_prefixed
= value
;
4221 case M32C_OPERAND_BITNO32UNPREFIXED
:
4222 fields
->f_bitno32_unprefixed
= value
;
4224 case M32C_OPERAND_DSP_10_U6
:
4225 fields
->f_dsp_10_u6
= value
;
4227 case M32C_OPERAND_DSP_16_S16
:
4228 fields
->f_dsp_16_s16
= value
;
4230 case M32C_OPERAND_DSP_16_S8
:
4231 fields
->f_dsp_16_s8
= value
;
4233 case M32C_OPERAND_DSP_16_U16
:
4234 fields
->f_dsp_16_u16
= value
;
4236 case M32C_OPERAND_DSP_16_U20
:
4237 fields
->f_dsp_16_u24
= value
;
4239 case M32C_OPERAND_DSP_16_U24
:
4240 fields
->f_dsp_16_u24
= value
;
4242 case M32C_OPERAND_DSP_16_U8
:
4243 fields
->f_dsp_16_u8
= value
;
4245 case M32C_OPERAND_DSP_24_S16
:
4246 fields
->f_dsp_24_s16
= value
;
4248 case M32C_OPERAND_DSP_24_S8
:
4249 fields
->f_dsp_24_s8
= value
;
4251 case M32C_OPERAND_DSP_24_U16
:
4252 fields
->f_dsp_24_u16
= value
;
4254 case M32C_OPERAND_DSP_24_U20
:
4255 fields
->f_dsp_24_u24
= value
;
4257 case M32C_OPERAND_DSP_24_U24
:
4258 fields
->f_dsp_24_u24
= value
;
4260 case M32C_OPERAND_DSP_24_U8
:
4261 fields
->f_dsp_24_u8
= value
;
4263 case M32C_OPERAND_DSP_32_S16
:
4264 fields
->f_dsp_32_s16
= value
;
4266 case M32C_OPERAND_DSP_32_S8
:
4267 fields
->f_dsp_32_s8
= value
;
4269 case M32C_OPERAND_DSP_32_U16
:
4270 fields
->f_dsp_32_u16
= value
;
4272 case M32C_OPERAND_DSP_32_U20
:
4273 fields
->f_dsp_32_u24
= value
;
4275 case M32C_OPERAND_DSP_32_U24
:
4276 fields
->f_dsp_32_u24
= value
;
4278 case M32C_OPERAND_DSP_32_U8
:
4279 fields
->f_dsp_32_u8
= value
;
4281 case M32C_OPERAND_DSP_40_S16
:
4282 fields
->f_dsp_40_s16
= value
;
4284 case M32C_OPERAND_DSP_40_S8
:
4285 fields
->f_dsp_40_s8
= value
;
4287 case M32C_OPERAND_DSP_40_U16
:
4288 fields
->f_dsp_40_u16
= value
;
4290 case M32C_OPERAND_DSP_40_U20
:
4291 fields
->f_dsp_40_u20
= value
;
4293 case M32C_OPERAND_DSP_40_U24
:
4294 fields
->f_dsp_40_u24
= value
;
4296 case M32C_OPERAND_DSP_40_U8
:
4297 fields
->f_dsp_40_u8
= value
;
4299 case M32C_OPERAND_DSP_48_S16
:
4300 fields
->f_dsp_48_s16
= value
;
4302 case M32C_OPERAND_DSP_48_S8
:
4303 fields
->f_dsp_48_s8
= value
;
4305 case M32C_OPERAND_DSP_48_U16
:
4306 fields
->f_dsp_48_u16
= value
;
4308 case M32C_OPERAND_DSP_48_U20
:
4309 fields
->f_dsp_48_u20
= value
;
4311 case M32C_OPERAND_DSP_48_U24
:
4312 fields
->f_dsp_48_u24
= value
;
4314 case M32C_OPERAND_DSP_48_U8
:
4315 fields
->f_dsp_48_u8
= value
;
4317 case M32C_OPERAND_DSP_8_S24
:
4318 fields
->f_dsp_8_s24
= value
;
4320 case M32C_OPERAND_DSP_8_S8
:
4321 fields
->f_dsp_8_s8
= value
;
4323 case M32C_OPERAND_DSP_8_U16
:
4324 fields
->f_dsp_8_u16
= value
;
4326 case M32C_OPERAND_DSP_8_U24
:
4327 fields
->f_dsp_8_u24
= value
;
4329 case M32C_OPERAND_DSP_8_U6
:
4330 fields
->f_dsp_8_u6
= value
;
4332 case M32C_OPERAND_DSP_8_U8
:
4333 fields
->f_dsp_8_u8
= value
;
4335 case M32C_OPERAND_DST16AN
:
4336 fields
->f_dst16_an
= value
;
4338 case M32C_OPERAND_DST16AN_S
:
4339 fields
->f_dst16_an_s
= value
;
4341 case M32C_OPERAND_DST16ANHI
:
4342 fields
->f_dst16_an
= value
;
4344 case M32C_OPERAND_DST16ANQI
:
4345 fields
->f_dst16_an
= value
;
4347 case M32C_OPERAND_DST16ANQI_S
:
4348 fields
->f_dst16_rn_QI_s
= value
;
4350 case M32C_OPERAND_DST16ANSI
:
4351 fields
->f_dst16_an
= value
;
4353 case M32C_OPERAND_DST16RNEXTQI
:
4354 fields
->f_dst16_rn_ext
= value
;
4356 case M32C_OPERAND_DST16RNHI
:
4357 fields
->f_dst16_rn
= value
;
4359 case M32C_OPERAND_DST16RNQI
:
4360 fields
->f_dst16_rn
= value
;
4362 case M32C_OPERAND_DST16RNQI_S
:
4363 fields
->f_dst16_rn_QI_s
= value
;
4365 case M32C_OPERAND_DST16RNSI
:
4366 fields
->f_dst16_rn
= value
;
4368 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4369 fields
->f_dst32_an_unprefixed
= value
;
4371 case M32C_OPERAND_DST32ANPREFIXED
:
4372 fields
->f_dst32_an_prefixed
= value
;
4374 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4375 fields
->f_dst32_an_prefixed
= value
;
4377 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4378 fields
->f_dst32_an_prefixed
= value
;
4380 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4381 fields
->f_dst32_an_prefixed
= value
;
4383 case M32C_OPERAND_DST32ANUNPREFIXED
:
4384 fields
->f_dst32_an_unprefixed
= value
;
4386 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4387 fields
->f_dst32_an_unprefixed
= value
;
4389 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4390 fields
->f_dst32_an_unprefixed
= value
;
4392 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4393 fields
->f_dst32_an_unprefixed
= value
;
4395 case M32C_OPERAND_DST32R0HI_S
:
4397 case M32C_OPERAND_DST32R0QI_S
:
4399 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4400 fields
->f_dst32_rn_ext_unprefixed
= value
;
4402 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4403 fields
->f_dst32_rn_ext_unprefixed
= value
;
4405 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4406 fields
->f_dst32_rn_prefixed_HI
= value
;
4408 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4409 fields
->f_dst32_rn_prefixed_QI
= value
;
4411 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4412 fields
->f_dst32_rn_prefixed_SI
= value
;
4414 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4415 fields
->f_dst32_rn_unprefixed_HI
= value
;
4417 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4418 fields
->f_dst32_rn_unprefixed_QI
= value
;
4420 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4421 fields
->f_dst32_rn_unprefixed_SI
= value
;
4423 case M32C_OPERAND_G
:
4425 case M32C_OPERAND_IMM_12_S4
:
4426 fields
->f_imm_12_s4
= value
;
4428 case M32C_OPERAND_IMM_12_S4N
:
4429 fields
->f_imm_12_s4
= value
;
4431 case M32C_OPERAND_IMM_13_U3
:
4432 fields
->f_imm_13_u3
= value
;
4434 case M32C_OPERAND_IMM_16_HI
:
4435 fields
->f_dsp_16_s16
= value
;
4437 case M32C_OPERAND_IMM_16_QI
:
4438 fields
->f_dsp_16_s8
= value
;
4440 case M32C_OPERAND_IMM_16_SI
:
4441 fields
->f_dsp_16_s32
= value
;
4443 case M32C_OPERAND_IMM_20_S4
:
4444 fields
->f_imm_20_s4
= value
;
4446 case M32C_OPERAND_IMM_24_HI
:
4447 fields
->f_dsp_24_s16
= value
;
4449 case M32C_OPERAND_IMM_24_QI
:
4450 fields
->f_dsp_24_s8
= value
;
4452 case M32C_OPERAND_IMM_24_SI
:
4453 fields
->f_dsp_24_s32
= value
;
4455 case M32C_OPERAND_IMM_32_HI
:
4456 fields
->f_dsp_32_s16
= value
;
4458 case M32C_OPERAND_IMM_32_QI
:
4459 fields
->f_dsp_32_s8
= value
;
4461 case M32C_OPERAND_IMM_32_SI
:
4462 fields
->f_dsp_32_s32
= value
;
4464 case M32C_OPERAND_IMM_40_HI
:
4465 fields
->f_dsp_40_s16
= value
;
4467 case M32C_OPERAND_IMM_40_QI
:
4468 fields
->f_dsp_40_s8
= value
;
4470 case M32C_OPERAND_IMM_40_SI
:
4471 fields
->f_dsp_40_s32
= value
;
4473 case M32C_OPERAND_IMM_48_HI
:
4474 fields
->f_dsp_48_s16
= value
;
4476 case M32C_OPERAND_IMM_48_QI
:
4477 fields
->f_dsp_48_s8
= value
;
4479 case M32C_OPERAND_IMM_48_SI
:
4480 fields
->f_dsp_48_s32
= value
;
4482 case M32C_OPERAND_IMM_56_HI
:
4483 fields
->f_dsp_56_s16
= value
;
4485 case M32C_OPERAND_IMM_56_QI
:
4486 fields
->f_dsp_56_s8
= value
;
4488 case M32C_OPERAND_IMM_64_HI
:
4489 fields
->f_dsp_64_s16
= value
;
4491 case M32C_OPERAND_IMM_8_HI
:
4492 fields
->f_dsp_8_s16
= value
;
4494 case M32C_OPERAND_IMM_8_QI
:
4495 fields
->f_dsp_8_s8
= value
;
4497 case M32C_OPERAND_IMM_8_S4
:
4498 fields
->f_imm_8_s4
= value
;
4500 case M32C_OPERAND_IMM_8_S4N
:
4501 fields
->f_imm_8_s4
= value
;
4503 case M32C_OPERAND_IMM_SH_12_S4
:
4504 fields
->f_imm_12_s4
= value
;
4506 case M32C_OPERAND_IMM_SH_20_S4
:
4507 fields
->f_imm_20_s4
= value
;
4509 case M32C_OPERAND_IMM_SH_8_S4
:
4510 fields
->f_imm_8_s4
= value
;
4512 case M32C_OPERAND_IMM1_S
:
4513 fields
->f_imm1_S
= value
;
4515 case M32C_OPERAND_IMM3_S
:
4516 fields
->f_imm3_S
= value
;
4518 case M32C_OPERAND_LAB_16_8
:
4519 fields
->f_lab_16_8
= value
;
4521 case M32C_OPERAND_LAB_24_8
:
4522 fields
->f_lab_24_8
= value
;
4524 case M32C_OPERAND_LAB_32_8
:
4525 fields
->f_lab_32_8
= value
;
4527 case M32C_OPERAND_LAB_40_8
:
4528 fields
->f_lab_40_8
= value
;
4530 case M32C_OPERAND_LAB_5_3
:
4531 fields
->f_lab_5_3
= value
;
4533 case M32C_OPERAND_LAB_8_16
:
4534 fields
->f_lab_8_16
= value
;
4536 case M32C_OPERAND_LAB_8_24
:
4537 fields
->f_lab_8_24
= value
;
4539 case M32C_OPERAND_LAB_8_8
:
4540 fields
->f_lab_8_8
= value
;
4542 case M32C_OPERAND_LAB32_JMP_S
:
4543 fields
->f_lab32_jmp_s
= value
;
4545 case M32C_OPERAND_Q
:
4547 case M32C_OPERAND_R0
:
4549 case M32C_OPERAND_R0H
:
4551 case M32C_OPERAND_R0L
:
4553 case M32C_OPERAND_R1
:
4555 case M32C_OPERAND_R1R2R0
:
4557 case M32C_OPERAND_R2
:
4559 case M32C_OPERAND_R2R0
:
4561 case M32C_OPERAND_R3
:
4563 case M32C_OPERAND_R3R1
:
4565 case M32C_OPERAND_REGSETPOP
:
4566 fields
->f_8_8
= value
;
4568 case M32C_OPERAND_REGSETPUSH
:
4569 fields
->f_8_8
= value
;
4571 case M32C_OPERAND_RN16_PUSH_S
:
4572 fields
->f_4_1
= value
;
4574 case M32C_OPERAND_S
:
4576 case M32C_OPERAND_SRC16AN
:
4577 fields
->f_src16_an
= value
;
4579 case M32C_OPERAND_SRC16ANHI
:
4580 fields
->f_src16_an
= value
;
4582 case M32C_OPERAND_SRC16ANQI
:
4583 fields
->f_src16_an
= value
;
4585 case M32C_OPERAND_SRC16RNHI
:
4586 fields
->f_src16_rn
= value
;
4588 case M32C_OPERAND_SRC16RNQI
:
4589 fields
->f_src16_rn
= value
;
4591 case M32C_OPERAND_SRC32ANPREFIXED
:
4592 fields
->f_src32_an_prefixed
= value
;
4594 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4595 fields
->f_src32_an_prefixed
= value
;
4597 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4598 fields
->f_src32_an_prefixed
= value
;
4600 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4601 fields
->f_src32_an_prefixed
= value
;
4603 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4604 fields
->f_src32_an_unprefixed
= value
;
4606 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4607 fields
->f_src32_an_unprefixed
= value
;
4609 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4610 fields
->f_src32_an_unprefixed
= value
;
4612 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4613 fields
->f_src32_an_unprefixed
= value
;
4615 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4616 fields
->f_src32_rn_prefixed_HI
= value
;
4618 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4619 fields
->f_src32_rn_prefixed_QI
= value
;
4621 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4622 fields
->f_src32_rn_prefixed_SI
= value
;
4624 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4625 fields
->f_src32_rn_unprefixed_HI
= value
;
4627 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4628 fields
->f_src32_rn_unprefixed_QI
= value
;
4630 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4631 fields
->f_src32_rn_unprefixed_SI
= value
;
4633 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4634 fields
->f_5_1
= value
;
4636 case M32C_OPERAND_X
:
4638 case M32C_OPERAND_Z
:
4640 case M32C_OPERAND_COND16_16
:
4641 fields
->f_dsp_16_u8
= value
;
4643 case M32C_OPERAND_COND16_24
:
4644 fields
->f_dsp_24_u8
= value
;
4646 case M32C_OPERAND_COND16_32
:
4647 fields
->f_dsp_32_u8
= value
;
4649 case M32C_OPERAND_COND16C
:
4650 fields
->f_cond16
= value
;
4652 case M32C_OPERAND_COND16J
:
4653 fields
->f_cond16
= value
;
4655 case M32C_OPERAND_COND16J5
:
4656 fields
->f_cond16j_5
= value
;
4658 case M32C_OPERAND_COND32
:
4659 fields
->f_cond32
= value
;
4661 case M32C_OPERAND_COND32_16
:
4662 fields
->f_dsp_16_u8
= value
;
4664 case M32C_OPERAND_COND32_24
:
4665 fields
->f_dsp_24_u8
= value
;
4667 case M32C_OPERAND_COND32_32
:
4668 fields
->f_dsp_32_u8
= value
;
4670 case M32C_OPERAND_COND32_40
:
4671 fields
->f_dsp_40_u8
= value
;
4673 case M32C_OPERAND_COND32J
:
4674 fields
->f_cond32j
= value
;
4676 case M32C_OPERAND_CR1_PREFIXED_32
:
4677 fields
->f_21_3
= value
;
4679 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4680 fields
->f_13_3
= value
;
4682 case M32C_OPERAND_CR16
:
4683 fields
->f_9_3
= value
;
4685 case M32C_OPERAND_CR2_32
:
4686 fields
->f_13_3
= value
;
4688 case M32C_OPERAND_CR3_PREFIXED_32
:
4689 fields
->f_21_3
= value
;
4691 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4692 fields
->f_13_3
= value
;
4694 case M32C_OPERAND_FLAGS16
:
4695 fields
->f_9_3
= value
;
4697 case M32C_OPERAND_FLAGS32
:
4698 fields
->f_13_3
= value
;
4700 case M32C_OPERAND_SCCOND32
:
4701 fields
->f_cond16
= value
;
4703 case M32C_OPERAND_SIZE
:
4707 /* xgettext:c-format */
4708 opcodes_error_handler
4709 (_("internal error: unrecognized field %d while setting int operand"),
4716 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4718 CGEN_FIELDS
* fields
,
4723 case M32C_OPERAND_A0
:
4725 case M32C_OPERAND_A1
:
4727 case M32C_OPERAND_AN16_PUSH_S
:
4728 fields
->f_4_1
= value
;
4730 case M32C_OPERAND_BIT16AN
:
4731 fields
->f_dst16_an
= value
;
4733 case M32C_OPERAND_BIT16RN
:
4734 fields
->f_dst16_rn
= value
;
4736 case M32C_OPERAND_BIT3_S
:
4737 fields
->f_imm3_S
= value
;
4739 case M32C_OPERAND_BIT32ANPREFIXED
:
4740 fields
->f_dst32_an_prefixed
= value
;
4742 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4743 fields
->f_dst32_an_unprefixed
= value
;
4745 case M32C_OPERAND_BIT32RNPREFIXED
:
4746 fields
->f_dst32_rn_prefixed_QI
= value
;
4748 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4749 fields
->f_dst32_rn_unprefixed_QI
= value
;
4751 case M32C_OPERAND_BITBASE16_16_S8
:
4752 fields
->f_dsp_16_s8
= value
;
4754 case M32C_OPERAND_BITBASE16_16_U16
:
4755 fields
->f_dsp_16_u16
= value
;
4757 case M32C_OPERAND_BITBASE16_16_U8
:
4758 fields
->f_dsp_16_u8
= value
;
4760 case M32C_OPERAND_BITBASE16_8_U11_S
:
4761 fields
->f_bitbase16_u11_S
= value
;
4763 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4764 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4766 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4767 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4769 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4770 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4772 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4773 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4775 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4776 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4778 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4779 fields
->f_bitbase32_24_s11_prefixed
= value
;
4781 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4782 fields
->f_bitbase32_24_s19_prefixed
= value
;
4784 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4785 fields
->f_bitbase32_24_u11_prefixed
= value
;
4787 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4788 fields
->f_bitbase32_24_u19_prefixed
= value
;
4790 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4791 fields
->f_bitbase32_24_u27_prefixed
= value
;
4793 case M32C_OPERAND_BITNO16R
:
4794 fields
->f_dsp_16_u8
= value
;
4796 case M32C_OPERAND_BITNO32PREFIXED
:
4797 fields
->f_bitno32_prefixed
= value
;
4799 case M32C_OPERAND_BITNO32UNPREFIXED
:
4800 fields
->f_bitno32_unprefixed
= value
;
4802 case M32C_OPERAND_DSP_10_U6
:
4803 fields
->f_dsp_10_u6
= value
;
4805 case M32C_OPERAND_DSP_16_S16
:
4806 fields
->f_dsp_16_s16
= value
;
4808 case M32C_OPERAND_DSP_16_S8
:
4809 fields
->f_dsp_16_s8
= value
;
4811 case M32C_OPERAND_DSP_16_U16
:
4812 fields
->f_dsp_16_u16
= value
;
4814 case M32C_OPERAND_DSP_16_U20
:
4815 fields
->f_dsp_16_u24
= value
;
4817 case M32C_OPERAND_DSP_16_U24
:
4818 fields
->f_dsp_16_u24
= value
;
4820 case M32C_OPERAND_DSP_16_U8
:
4821 fields
->f_dsp_16_u8
= value
;
4823 case M32C_OPERAND_DSP_24_S16
:
4824 fields
->f_dsp_24_s16
= value
;
4826 case M32C_OPERAND_DSP_24_S8
:
4827 fields
->f_dsp_24_s8
= value
;
4829 case M32C_OPERAND_DSP_24_U16
:
4830 fields
->f_dsp_24_u16
= value
;
4832 case M32C_OPERAND_DSP_24_U20
:
4833 fields
->f_dsp_24_u24
= value
;
4835 case M32C_OPERAND_DSP_24_U24
:
4836 fields
->f_dsp_24_u24
= value
;
4838 case M32C_OPERAND_DSP_24_U8
:
4839 fields
->f_dsp_24_u8
= value
;
4841 case M32C_OPERAND_DSP_32_S16
:
4842 fields
->f_dsp_32_s16
= value
;
4844 case M32C_OPERAND_DSP_32_S8
:
4845 fields
->f_dsp_32_s8
= value
;
4847 case M32C_OPERAND_DSP_32_U16
:
4848 fields
->f_dsp_32_u16
= value
;
4850 case M32C_OPERAND_DSP_32_U20
:
4851 fields
->f_dsp_32_u24
= value
;
4853 case M32C_OPERAND_DSP_32_U24
:
4854 fields
->f_dsp_32_u24
= value
;
4856 case M32C_OPERAND_DSP_32_U8
:
4857 fields
->f_dsp_32_u8
= value
;
4859 case M32C_OPERAND_DSP_40_S16
:
4860 fields
->f_dsp_40_s16
= value
;
4862 case M32C_OPERAND_DSP_40_S8
:
4863 fields
->f_dsp_40_s8
= value
;
4865 case M32C_OPERAND_DSP_40_U16
:
4866 fields
->f_dsp_40_u16
= value
;
4868 case M32C_OPERAND_DSP_40_U20
:
4869 fields
->f_dsp_40_u20
= value
;
4871 case M32C_OPERAND_DSP_40_U24
:
4872 fields
->f_dsp_40_u24
= value
;
4874 case M32C_OPERAND_DSP_40_U8
:
4875 fields
->f_dsp_40_u8
= value
;
4877 case M32C_OPERAND_DSP_48_S16
:
4878 fields
->f_dsp_48_s16
= value
;
4880 case M32C_OPERAND_DSP_48_S8
:
4881 fields
->f_dsp_48_s8
= value
;
4883 case M32C_OPERAND_DSP_48_U16
:
4884 fields
->f_dsp_48_u16
= value
;
4886 case M32C_OPERAND_DSP_48_U20
:
4887 fields
->f_dsp_48_u20
= value
;
4889 case M32C_OPERAND_DSP_48_U24
:
4890 fields
->f_dsp_48_u24
= value
;
4892 case M32C_OPERAND_DSP_48_U8
:
4893 fields
->f_dsp_48_u8
= value
;
4895 case M32C_OPERAND_DSP_8_S24
:
4896 fields
->f_dsp_8_s24
= value
;
4898 case M32C_OPERAND_DSP_8_S8
:
4899 fields
->f_dsp_8_s8
= value
;
4901 case M32C_OPERAND_DSP_8_U16
:
4902 fields
->f_dsp_8_u16
= value
;
4904 case M32C_OPERAND_DSP_8_U24
:
4905 fields
->f_dsp_8_u24
= value
;
4907 case M32C_OPERAND_DSP_8_U6
:
4908 fields
->f_dsp_8_u6
= value
;
4910 case M32C_OPERAND_DSP_8_U8
:
4911 fields
->f_dsp_8_u8
= value
;
4913 case M32C_OPERAND_DST16AN
:
4914 fields
->f_dst16_an
= value
;
4916 case M32C_OPERAND_DST16AN_S
:
4917 fields
->f_dst16_an_s
= value
;
4919 case M32C_OPERAND_DST16ANHI
:
4920 fields
->f_dst16_an
= value
;
4922 case M32C_OPERAND_DST16ANQI
:
4923 fields
->f_dst16_an
= value
;
4925 case M32C_OPERAND_DST16ANQI_S
:
4926 fields
->f_dst16_rn_QI_s
= value
;
4928 case M32C_OPERAND_DST16ANSI
:
4929 fields
->f_dst16_an
= value
;
4931 case M32C_OPERAND_DST16RNEXTQI
:
4932 fields
->f_dst16_rn_ext
= value
;
4934 case M32C_OPERAND_DST16RNHI
:
4935 fields
->f_dst16_rn
= value
;
4937 case M32C_OPERAND_DST16RNQI
:
4938 fields
->f_dst16_rn
= value
;
4940 case M32C_OPERAND_DST16RNQI_S
:
4941 fields
->f_dst16_rn_QI_s
= value
;
4943 case M32C_OPERAND_DST16RNSI
:
4944 fields
->f_dst16_rn
= value
;
4946 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4947 fields
->f_dst32_an_unprefixed
= value
;
4949 case M32C_OPERAND_DST32ANPREFIXED
:
4950 fields
->f_dst32_an_prefixed
= value
;
4952 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4953 fields
->f_dst32_an_prefixed
= value
;
4955 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4956 fields
->f_dst32_an_prefixed
= value
;
4958 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4959 fields
->f_dst32_an_prefixed
= value
;
4961 case M32C_OPERAND_DST32ANUNPREFIXED
:
4962 fields
->f_dst32_an_unprefixed
= value
;
4964 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4965 fields
->f_dst32_an_unprefixed
= value
;
4967 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4968 fields
->f_dst32_an_unprefixed
= value
;
4970 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4971 fields
->f_dst32_an_unprefixed
= value
;
4973 case M32C_OPERAND_DST32R0HI_S
:
4975 case M32C_OPERAND_DST32R0QI_S
:
4977 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4978 fields
->f_dst32_rn_ext_unprefixed
= value
;
4980 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4981 fields
->f_dst32_rn_ext_unprefixed
= value
;
4983 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4984 fields
->f_dst32_rn_prefixed_HI
= value
;
4986 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4987 fields
->f_dst32_rn_prefixed_QI
= value
;
4989 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4990 fields
->f_dst32_rn_prefixed_SI
= value
;
4992 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4993 fields
->f_dst32_rn_unprefixed_HI
= value
;
4995 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4996 fields
->f_dst32_rn_unprefixed_QI
= value
;
4998 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4999 fields
->f_dst32_rn_unprefixed_SI
= value
;
5001 case M32C_OPERAND_G
:
5003 case M32C_OPERAND_IMM_12_S4
:
5004 fields
->f_imm_12_s4
= value
;
5006 case M32C_OPERAND_IMM_12_S4N
:
5007 fields
->f_imm_12_s4
= value
;
5009 case M32C_OPERAND_IMM_13_U3
:
5010 fields
->f_imm_13_u3
= value
;
5012 case M32C_OPERAND_IMM_16_HI
:
5013 fields
->f_dsp_16_s16
= value
;
5015 case M32C_OPERAND_IMM_16_QI
:
5016 fields
->f_dsp_16_s8
= value
;
5018 case M32C_OPERAND_IMM_16_SI
:
5019 fields
->f_dsp_16_s32
= value
;
5021 case M32C_OPERAND_IMM_20_S4
:
5022 fields
->f_imm_20_s4
= value
;
5024 case M32C_OPERAND_IMM_24_HI
:
5025 fields
->f_dsp_24_s16
= value
;
5027 case M32C_OPERAND_IMM_24_QI
:
5028 fields
->f_dsp_24_s8
= value
;
5030 case M32C_OPERAND_IMM_24_SI
:
5031 fields
->f_dsp_24_s32
= value
;
5033 case M32C_OPERAND_IMM_32_HI
:
5034 fields
->f_dsp_32_s16
= value
;
5036 case M32C_OPERAND_IMM_32_QI
:
5037 fields
->f_dsp_32_s8
= value
;
5039 case M32C_OPERAND_IMM_32_SI
:
5040 fields
->f_dsp_32_s32
= value
;
5042 case M32C_OPERAND_IMM_40_HI
:
5043 fields
->f_dsp_40_s16
= value
;
5045 case M32C_OPERAND_IMM_40_QI
:
5046 fields
->f_dsp_40_s8
= value
;
5048 case M32C_OPERAND_IMM_40_SI
:
5049 fields
->f_dsp_40_s32
= value
;
5051 case M32C_OPERAND_IMM_48_HI
:
5052 fields
->f_dsp_48_s16
= value
;
5054 case M32C_OPERAND_IMM_48_QI
:
5055 fields
->f_dsp_48_s8
= value
;
5057 case M32C_OPERAND_IMM_48_SI
:
5058 fields
->f_dsp_48_s32
= value
;
5060 case M32C_OPERAND_IMM_56_HI
:
5061 fields
->f_dsp_56_s16
= value
;
5063 case M32C_OPERAND_IMM_56_QI
:
5064 fields
->f_dsp_56_s8
= value
;
5066 case M32C_OPERAND_IMM_64_HI
:
5067 fields
->f_dsp_64_s16
= value
;
5069 case M32C_OPERAND_IMM_8_HI
:
5070 fields
->f_dsp_8_s16
= value
;
5072 case M32C_OPERAND_IMM_8_QI
:
5073 fields
->f_dsp_8_s8
= value
;
5075 case M32C_OPERAND_IMM_8_S4
:
5076 fields
->f_imm_8_s4
= value
;
5078 case M32C_OPERAND_IMM_8_S4N
:
5079 fields
->f_imm_8_s4
= value
;
5081 case M32C_OPERAND_IMM_SH_12_S4
:
5082 fields
->f_imm_12_s4
= value
;
5084 case M32C_OPERAND_IMM_SH_20_S4
:
5085 fields
->f_imm_20_s4
= value
;
5087 case M32C_OPERAND_IMM_SH_8_S4
:
5088 fields
->f_imm_8_s4
= value
;
5090 case M32C_OPERAND_IMM1_S
:
5091 fields
->f_imm1_S
= value
;
5093 case M32C_OPERAND_IMM3_S
:
5094 fields
->f_imm3_S
= value
;
5096 case M32C_OPERAND_LAB_16_8
:
5097 fields
->f_lab_16_8
= value
;
5099 case M32C_OPERAND_LAB_24_8
:
5100 fields
->f_lab_24_8
= value
;
5102 case M32C_OPERAND_LAB_32_8
:
5103 fields
->f_lab_32_8
= value
;
5105 case M32C_OPERAND_LAB_40_8
:
5106 fields
->f_lab_40_8
= value
;
5108 case M32C_OPERAND_LAB_5_3
:
5109 fields
->f_lab_5_3
= value
;
5111 case M32C_OPERAND_LAB_8_16
:
5112 fields
->f_lab_8_16
= value
;
5114 case M32C_OPERAND_LAB_8_24
:
5115 fields
->f_lab_8_24
= value
;
5117 case M32C_OPERAND_LAB_8_8
:
5118 fields
->f_lab_8_8
= value
;
5120 case M32C_OPERAND_LAB32_JMP_S
:
5121 fields
->f_lab32_jmp_s
= value
;
5123 case M32C_OPERAND_Q
:
5125 case M32C_OPERAND_R0
:
5127 case M32C_OPERAND_R0H
:
5129 case M32C_OPERAND_R0L
:
5131 case M32C_OPERAND_R1
:
5133 case M32C_OPERAND_R1R2R0
:
5135 case M32C_OPERAND_R2
:
5137 case M32C_OPERAND_R2R0
:
5139 case M32C_OPERAND_R3
:
5141 case M32C_OPERAND_R3R1
:
5143 case M32C_OPERAND_REGSETPOP
:
5144 fields
->f_8_8
= value
;
5146 case M32C_OPERAND_REGSETPUSH
:
5147 fields
->f_8_8
= value
;
5149 case M32C_OPERAND_RN16_PUSH_S
:
5150 fields
->f_4_1
= value
;
5152 case M32C_OPERAND_S
:
5154 case M32C_OPERAND_SRC16AN
:
5155 fields
->f_src16_an
= value
;
5157 case M32C_OPERAND_SRC16ANHI
:
5158 fields
->f_src16_an
= value
;
5160 case M32C_OPERAND_SRC16ANQI
:
5161 fields
->f_src16_an
= value
;
5163 case M32C_OPERAND_SRC16RNHI
:
5164 fields
->f_src16_rn
= value
;
5166 case M32C_OPERAND_SRC16RNQI
:
5167 fields
->f_src16_rn
= value
;
5169 case M32C_OPERAND_SRC32ANPREFIXED
:
5170 fields
->f_src32_an_prefixed
= value
;
5172 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
5173 fields
->f_src32_an_prefixed
= value
;
5175 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
5176 fields
->f_src32_an_prefixed
= value
;
5178 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
5179 fields
->f_src32_an_prefixed
= value
;
5181 case M32C_OPERAND_SRC32ANUNPREFIXED
:
5182 fields
->f_src32_an_unprefixed
= value
;
5184 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
5185 fields
->f_src32_an_unprefixed
= value
;
5187 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
5188 fields
->f_src32_an_unprefixed
= value
;
5190 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
5191 fields
->f_src32_an_unprefixed
= value
;
5193 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
5194 fields
->f_src32_rn_prefixed_HI
= value
;
5196 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
5197 fields
->f_src32_rn_prefixed_QI
= value
;
5199 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
5200 fields
->f_src32_rn_prefixed_SI
= value
;
5202 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
5203 fields
->f_src32_rn_unprefixed_HI
= value
;
5205 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
5206 fields
->f_src32_rn_unprefixed_QI
= value
;
5208 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
5209 fields
->f_src32_rn_unprefixed_SI
= value
;
5211 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
5212 fields
->f_5_1
= value
;
5214 case M32C_OPERAND_X
:
5216 case M32C_OPERAND_Z
:
5218 case M32C_OPERAND_COND16_16
:
5219 fields
->f_dsp_16_u8
= value
;
5221 case M32C_OPERAND_COND16_24
:
5222 fields
->f_dsp_24_u8
= value
;
5224 case M32C_OPERAND_COND16_32
:
5225 fields
->f_dsp_32_u8
= value
;
5227 case M32C_OPERAND_COND16C
:
5228 fields
->f_cond16
= value
;
5230 case M32C_OPERAND_COND16J
:
5231 fields
->f_cond16
= value
;
5233 case M32C_OPERAND_COND16J5
:
5234 fields
->f_cond16j_5
= value
;
5236 case M32C_OPERAND_COND32
:
5237 fields
->f_cond32
= value
;
5239 case M32C_OPERAND_COND32_16
:
5240 fields
->f_dsp_16_u8
= value
;
5242 case M32C_OPERAND_COND32_24
:
5243 fields
->f_dsp_24_u8
= value
;
5245 case M32C_OPERAND_COND32_32
:
5246 fields
->f_dsp_32_u8
= value
;
5248 case M32C_OPERAND_COND32_40
:
5249 fields
->f_dsp_40_u8
= value
;
5251 case M32C_OPERAND_COND32J
:
5252 fields
->f_cond32j
= value
;
5254 case M32C_OPERAND_CR1_PREFIXED_32
:
5255 fields
->f_21_3
= value
;
5257 case M32C_OPERAND_CR1_UNPREFIXED_32
:
5258 fields
->f_13_3
= value
;
5260 case M32C_OPERAND_CR16
:
5261 fields
->f_9_3
= value
;
5263 case M32C_OPERAND_CR2_32
:
5264 fields
->f_13_3
= value
;
5266 case M32C_OPERAND_CR3_PREFIXED_32
:
5267 fields
->f_21_3
= value
;
5269 case M32C_OPERAND_CR3_UNPREFIXED_32
:
5270 fields
->f_13_3
= value
;
5272 case M32C_OPERAND_FLAGS16
:
5273 fields
->f_9_3
= value
;
5275 case M32C_OPERAND_FLAGS32
:
5276 fields
->f_13_3
= value
;
5278 case M32C_OPERAND_SCCOND32
:
5279 fields
->f_cond16
= value
;
5281 case M32C_OPERAND_SIZE
:
5285 /* xgettext:c-format */
5286 opcodes_error_handler
5287 (_("internal error: unrecognized field %d while setting vma operand"),
5293 /* Function to call before using the instruction builder tables. */
5296 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd
)
5298 cd
->insert_handlers
= & m32c_cgen_insert_handlers
[0];
5299 cd
->extract_handlers
= & m32c_cgen_extract_handlers
[0];
5301 cd
->insert_operand
= m32c_cgen_insert_operand
;
5302 cd
->extract_operand
= m32c_cgen_extract_operand
;
5304 cd
->get_int_operand
= m32c_cgen_get_int_operand
;
5305 cd
->set_int_operand
= m32c_cgen_set_int_operand
;
5306 cd
->get_vma_operand
= m32c_cgen_get_vma_operand
;
5307 cd
->set_vma_operand
= m32c_cgen_set_vma_operand
;