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-2020 Free Software Foundation, Inc.
9 This file is part of libopcodes.
11 This library is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3, or (at your option)
16 It is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
19 License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
25 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
34 #include "m32c-desc.h"
36 #include "cgen/basic-modes.h"
38 #include "safe-ctype.h"
41 #define min(a,b) ((a) < (b) ? (a) : (b))
43 #define max(a,b) ((a) > (b) ? (a) : (b))
45 /* Used by the ifield rtx function. */
46 #define FLD(f) (fields->f)
48 static const char * insert_normal
49 (CGEN_CPU_DESC
, long, unsigned int, unsigned int, unsigned int,
50 unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR
);
51 static const char * insert_insn_normal
52 (CGEN_CPU_DESC
, const CGEN_INSN
*,
53 CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
54 static int extract_normal
55 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
,
56 unsigned int, unsigned int, unsigned int, unsigned int,
57 unsigned int, unsigned int, bfd_vma
, long *);
58 static int extract_insn_normal
59 (CGEN_CPU_DESC
, const CGEN_INSN
*, CGEN_EXTRACT_INFO
*,
60 CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
62 static void put_insn_int_value
63 (CGEN_CPU_DESC
, CGEN_INSN_BYTES_PTR
, int, int, CGEN_INSN_INT
);
66 static CGEN_INLINE
void insert_1
67 (CGEN_CPU_DESC
, unsigned long, int, int, int, unsigned char *);
68 static CGEN_INLINE
int fill_cache
69 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, int, int, bfd_vma
);
70 static CGEN_INLINE
long extract_1
71 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, int, int, int, unsigned char *, bfd_vma
);
74 /* Operand insertion. */
78 /* Subroutine of insert_normal. */
80 static CGEN_INLINE
void
81 insert_1 (CGEN_CPU_DESC cd
,
91 x
= cgen_get_insn_value (cd
, bufp
, word_length
);
93 /* Written this way to avoid undefined behaviour. */
94 mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
96 shift
= (start
+ 1) - length
;
98 shift
= (word_length
- (start
+ length
));
99 x
= (x
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
101 cgen_put_insn_value (cd
, bufp
, word_length
, (bfd_vma
) x
);
104 #endif /* ! CGEN_INT_INSN_P */
106 /* Default insertion routine.
108 ATTRS is a mask of the boolean attributes.
109 WORD_OFFSET is the offset in bits from the start of the insn of the value.
110 WORD_LENGTH is the length of the word in bits in which the value resides.
111 START is the starting bit number in the word, architecture origin.
112 LENGTH is the length of VALUE in bits.
113 TOTAL_LENGTH is the total length of the insn in bits.
115 The result is an error message or NULL if success. */
117 /* ??? This duplicates functionality with bfd's howto table and
118 bfd_install_relocation. */
119 /* ??? This doesn't handle bfd_vma's. Create another function when
123 insert_normal (CGEN_CPU_DESC cd
,
126 unsigned int word_offset
,
129 unsigned int word_length
,
130 unsigned int total_length
,
131 CGEN_INSN_BYTES_PTR buffer
)
133 static char errbuf
[100];
134 /* Written this way to avoid undefined behaviour. */
135 unsigned long mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
137 /* If LENGTH is zero, this operand doesn't contribute to the value. */
141 if (word_length
> 8 * sizeof (CGEN_INSN_INT
))
144 /* For architectures with insns smaller than the base-insn-bitsize,
145 word_length may be too big. */
146 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
149 && word_length
> total_length
)
150 word_length
= total_length
;
153 /* Ensure VALUE will fit. */
154 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGN_OPT
))
156 long minval
= - (1L << (length
- 1));
157 unsigned long maxval
= mask
;
159 if ((value
> 0 && (unsigned long) value
> maxval
)
162 /* xgettext:c-format */
164 _("operand out of range (%ld not between %ld and %lu)"),
165 value
, minval
, maxval
);
169 else if (! CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
))
171 unsigned long maxval
= mask
;
172 unsigned long val
= (unsigned long) value
;
174 /* For hosts with a word size > 32 check to see if value has been sign
175 extended beyond 32 bits. If so then ignore these higher sign bits
176 as the user is attempting to store a 32-bit signed value into an
177 unsigned 32-bit field which is allowed. */
178 if (sizeof (unsigned long) > 4 && ((value
>> 32) == -1))
183 /* xgettext:c-format */
185 _("operand out of range (0x%lx not between 0 and 0x%lx)"),
192 if (! cgen_signed_overflow_ok_p (cd
))
194 long minval
= - (1L << (length
- 1));
195 long maxval
= (1L << (length
- 1)) - 1;
197 if (value
< minval
|| value
> maxval
)
200 /* xgettext:c-format */
201 (errbuf
, _("operand out of range (%ld not between %ld and %ld)"),
202 value
, minval
, maxval
);
211 int shift_within_word
, shift_to_word
, shift
;
213 /* How to shift the value to BIT0 of the word. */
214 shift_to_word
= total_length
- (word_offset
+ word_length
);
216 /* How to shift the value to the field within the word. */
217 if (CGEN_INSN_LSB0_P
)
218 shift_within_word
= start
+ 1 - length
;
220 shift_within_word
= word_length
- start
- length
;
222 /* The total SHIFT, then mask in the value. */
223 shift
= shift_to_word
+ shift_within_word
;
224 *buffer
= (*buffer
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
227 #else /* ! CGEN_INT_INSN_P */
230 unsigned char *bufp
= (unsigned char *) buffer
+ word_offset
/ 8;
232 insert_1 (cd
, value
, start
, length
, word_length
, bufp
);
235 #endif /* ! CGEN_INT_INSN_P */
240 /* Default insn builder (insert handler).
241 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
242 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
243 recorded in host byte order, otherwise BUFFER is an array of bytes
244 and the value is recorded in target byte order).
245 The result is an error message or NULL if success. */
248 insert_insn_normal (CGEN_CPU_DESC cd
,
249 const CGEN_INSN
* insn
,
250 CGEN_FIELDS
* fields
,
251 CGEN_INSN_BYTES_PTR buffer
,
254 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
256 const CGEN_SYNTAX_CHAR_TYPE
* syn
;
258 CGEN_INIT_INSERT (cd
);
259 value
= CGEN_INSN_BASE_VALUE (insn
);
261 /* If we're recording insns as numbers (rather than a string of bytes),
262 target byte order handling is deferred until later. */
266 put_insn_int_value (cd
, buffer
, cd
->base_insn_bitsize
,
267 CGEN_FIELDS_BITSIZE (fields
), value
);
271 cgen_put_insn_value (cd
, buffer
, min ((unsigned) cd
->base_insn_bitsize
,
272 (unsigned) CGEN_FIELDS_BITSIZE (fields
)),
275 #endif /* ! CGEN_INT_INSN_P */
277 /* ??? It would be better to scan the format's fields.
278 Still need to be able to insert a value based on the operand though;
279 e.g. storing a branch displacement that got resolved later.
280 Needs more thought first. */
282 for (syn
= CGEN_SYNTAX_STRING (syntax
); * syn
; ++ syn
)
286 if (CGEN_SYNTAX_CHAR_P (* syn
))
289 errmsg
= (* cd
->insert_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
299 /* Cover function to store an insn value into an integral insn. Must go here
300 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
303 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
304 CGEN_INSN_BYTES_PTR buf
,
309 /* For architectures with insns smaller than the base-insn-bitsize,
310 length may be too big. */
311 if (length
> insn_length
)
315 int shift
= insn_length
- length
;
316 /* Written this way to avoid undefined behaviour. */
317 CGEN_INSN_INT mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
319 *buf
= (*buf
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
324 /* Operand extraction. */
326 #if ! CGEN_INT_INSN_P
328 /* Subroutine of extract_normal.
329 Ensure sufficient bytes are cached in EX_INFO.
330 OFFSET is the offset in bytes from the start of the insn of the value.
331 BYTES is the length of the needed value.
332 Returns 1 for success, 0 for failure. */
334 static CGEN_INLINE
int
335 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
336 CGEN_EXTRACT_INFO
*ex_info
,
341 /* It's doubtful that the middle part has already been fetched so
342 we don't optimize that case. kiss. */
344 disassemble_info
*info
= (disassemble_info
*) ex_info
->dis_info
;
346 /* First do a quick check. */
347 mask
= (1 << bytes
) - 1;
348 if (((ex_info
->valid
>> offset
) & mask
) == mask
)
351 /* Search for the first byte we need to read. */
352 for (mask
= 1 << offset
; bytes
> 0; --bytes
, ++offset
, mask
<<= 1)
353 if (! (mask
& ex_info
->valid
))
361 status
= (*info
->read_memory_func
)
362 (pc
, ex_info
->insn_bytes
+ offset
, bytes
, info
);
366 (*info
->memory_error_func
) (status
, pc
, info
);
370 ex_info
->valid
|= ((1 << bytes
) - 1) << offset
;
376 /* Subroutine of extract_normal. */
378 static CGEN_INLINE
long
379 extract_1 (CGEN_CPU_DESC cd
,
380 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
385 bfd_vma pc ATTRIBUTE_UNUSED
)
390 x
= cgen_get_insn_value (cd
, bufp
, word_length
);
392 if (CGEN_INSN_LSB0_P
)
393 shift
= (start
+ 1) - length
;
395 shift
= (word_length
- (start
+ length
));
399 #endif /* ! CGEN_INT_INSN_P */
401 /* Default extraction routine.
403 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
404 or sometimes less for cases like the m32r where the base insn size is 32
405 but some insns are 16 bits.
406 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
407 but for generality we take a bitmask of all of them.
408 WORD_OFFSET is the offset in bits from the start of the insn of the value.
409 WORD_LENGTH is the length of the word in bits in which the value resides.
410 START is the starting bit number in the word, architecture origin.
411 LENGTH is the length of VALUE in bits.
412 TOTAL_LENGTH is the total length of the insn in bits.
414 Returns 1 for success, 0 for failure. */
416 /* ??? The return code isn't properly used. wip. */
418 /* ??? This doesn't handle bfd_vma's. Create another function when
422 extract_normal (CGEN_CPU_DESC cd
,
423 #if ! CGEN_INT_INSN_P
424 CGEN_EXTRACT_INFO
*ex_info
,
426 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
428 CGEN_INSN_INT insn_value
,
430 unsigned int word_offset
,
433 unsigned int word_length
,
434 unsigned int total_length
,
435 #if ! CGEN_INT_INSN_P
438 bfd_vma pc ATTRIBUTE_UNUSED
,
444 /* If LENGTH is zero, this operand doesn't contribute to the value
445 so give it a standard value of zero. */
452 if (word_length
> 8 * sizeof (CGEN_INSN_INT
))
455 /* For architectures with insns smaller than the insn-base-bitsize,
456 word_length may be too big. */
457 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
459 if (word_offset
+ word_length
> total_length
)
460 word_length
= total_length
- word_offset
;
463 /* Does the value reside in INSN_VALUE, and at the right alignment? */
465 if (CGEN_INT_INSN_P
|| (word_offset
== 0 && word_length
== total_length
))
467 if (CGEN_INSN_LSB0_P
)
468 value
= insn_value
>> ((word_offset
+ start
+ 1) - length
);
470 value
= insn_value
>> (total_length
- ( word_offset
+ start
+ length
));
473 #if ! CGEN_INT_INSN_P
477 unsigned char *bufp
= ex_info
->insn_bytes
+ word_offset
/ 8;
479 if (word_length
> 8 * sizeof (CGEN_INSN_INT
))
482 if (fill_cache (cd
, ex_info
, word_offset
/ 8, word_length
/ 8, pc
) == 0)
485 value
= extract_1 (cd
, ex_info
, start
, length
, word_length
, bufp
, pc
);
488 #endif /* ! CGEN_INT_INSN_P */
490 /* Written this way to avoid undefined behaviour. */
491 mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
495 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
)
496 && (value
& (1L << (length
- 1))))
504 /* Default insn extractor.
506 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
507 The extracted fields are stored in FIELDS.
508 EX_INFO is used to handle reading variable length insns.
509 Return the length of the insn in bits, or 0 if no match,
510 or -1 if an error occurs fetching data (memory_error_func will have
514 extract_insn_normal (CGEN_CPU_DESC cd
,
515 const CGEN_INSN
*insn
,
516 CGEN_EXTRACT_INFO
*ex_info
,
517 CGEN_INSN_INT insn_value
,
521 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
522 const CGEN_SYNTAX_CHAR_TYPE
*syn
;
524 CGEN_FIELDS_BITSIZE (fields
) = CGEN_INSN_BITSIZE (insn
);
526 CGEN_INIT_EXTRACT (cd
);
528 for (syn
= CGEN_SYNTAX_STRING (syntax
); *syn
; ++syn
)
532 if (CGEN_SYNTAX_CHAR_P (*syn
))
535 length
= (* cd
->extract_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
536 ex_info
, insn_value
, fields
, pc
);
541 /* We recognized and successfully extracted this insn. */
542 return CGEN_INSN_BITSIZE (insn
);
545 /* Machine generated code added here. */
547 const char * m32c_cgen_insert_operand
548 (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
550 /* Main entry point for operand insertion.
552 This function is basically just a big switch statement. Earlier versions
553 used tables to look up the function to use, but
554 - if the table contains both assembler and disassembler functions then
555 the disassembler contains much of the assembler and vice-versa,
556 - there's a lot of inlining possibilities as things grow,
557 - using a switch statement avoids the function call overhead.
559 This function could be moved into `parse_insn_normal', but keeping it
560 separate makes clear the interface between `parse_insn_normal' and each of
561 the handlers. It's also needed by GAS to insert operands that couldn't be
562 resolved during parsing. */
565 m32c_cgen_insert_operand (CGEN_CPU_DESC cd
,
567 CGEN_FIELDS
* fields
,
568 CGEN_INSN_BYTES_PTR buffer
,
569 bfd_vma pc ATTRIBUTE_UNUSED
)
571 const char * errmsg
= NULL
;
572 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
576 case M32C_OPERAND_A0
:
578 case M32C_OPERAND_A1
:
580 case M32C_OPERAND_AN16_PUSH_S
:
581 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
583 case M32C_OPERAND_BIT16AN
:
584 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
586 case M32C_OPERAND_BIT16RN
:
587 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
589 case M32C_OPERAND_BIT3_S
:
592 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
593 FLD (f_2_2
) = ((((UINT
) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
595 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
598 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
603 case M32C_OPERAND_BIT32ANPREFIXED
:
604 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
606 case M32C_OPERAND_BIT32ANUNPREFIXED
:
607 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
609 case M32C_OPERAND_BIT32RNPREFIXED
:
611 long value
= fields
->f_dst32_rn_prefixed_QI
;
612 value
= (((((((~ (value
))) << (1))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
613 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
616 case M32C_OPERAND_BIT32RNUNPREFIXED
:
618 long value
= fields
->f_dst32_rn_unprefixed_QI
;
619 value
= (((((((~ (value
))) << (1))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
620 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
623 case M32C_OPERAND_BITBASE16_16_S8
:
624 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
626 case M32C_OPERAND_BITBASE16_16_U16
:
628 long value
= fields
->f_dsp_16_u16
;
629 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
630 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
633 case M32C_OPERAND_BITBASE16_16_U8
:
634 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
636 case M32C_OPERAND_BITBASE16_8_U11_S
:
639 FLD (f_bitno16_S
) = ((FLD (f_bitbase16_u11_S
)) & (7));
640 FLD (f_dsp_8_u8
) = ((((UINT
) (FLD (f_bitbase16_u11_S
)) >> (3))) & (255));
642 errmsg
= insert_normal (cd
, fields
->f_bitno16_S
, 0, 0, 5, 3, 32, total_length
, buffer
);
645 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
650 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
653 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s11_unprefixed
)) & (7));
654 FLD (f_dsp_16_s8
) = ((INT
) (FLD (f_bitbase32_16_s11_unprefixed
)) >> (3));
656 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
659 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
664 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
667 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s19_unprefixed
)) & (7));
668 FLD (f_dsp_16_s16
) = ((INT
) (FLD (f_bitbase32_16_s19_unprefixed
)) >> (3));
670 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
674 long value
= fields
->f_dsp_16_s16
;
675 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
676 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
682 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
685 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u11_unprefixed
)) & (7));
686 FLD (f_dsp_16_u8
) = ((((UINT
) (FLD (f_bitbase32_16_u11_unprefixed
)) >> (3))) & (255));
688 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
691 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
696 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
699 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u19_unprefixed
)) & (7));
700 FLD (f_dsp_16_u16
) = ((((UINT
) (FLD (f_bitbase32_16_u19_unprefixed
)) >> (3))) & (65535));
702 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
706 long value
= fields
->f_dsp_16_u16
;
707 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
708 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
714 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
717 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u27_unprefixed
)) & (7));
718 FLD (f_dsp_16_u16
) = ((((UINT
) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (3))) & (65535));
719 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (19))) & (255));
721 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
725 long value
= fields
->f_dsp_16_u16
;
726 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
727 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
731 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
736 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
739 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s11_prefixed
)) & (7));
740 FLD (f_dsp_24_s8
) = ((INT
) (FLD (f_bitbase32_24_s11_prefixed
)) >> (3));
742 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
745 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
750 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
753 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s19_prefixed
)) & (7));
754 FLD (f_dsp_24_u8
) = ((((UINT
) (FLD (f_bitbase32_24_s19_prefixed
)) >> (3))) & (255));
755 FLD (f_dsp_32_s8
) = ((INT
) (FLD (f_bitbase32_24_s19_prefixed
)) >> (11));
757 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
760 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
763 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
768 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
771 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u11_prefixed
)) & (7));
772 FLD (f_dsp_24_u8
) = ((((UINT
) (FLD (f_bitbase32_24_u11_prefixed
)) >> (3))) & (255));
774 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
777 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
782 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
785 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u19_prefixed
)) & (7));
786 FLD (f_dsp_24_u8
) = ((((UINT
) (FLD (f_bitbase32_24_u19_prefixed
)) >> (3))) & (255));
787 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_bitbase32_24_u19_prefixed
)) >> (11))) & (255));
789 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
792 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
795 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
800 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
803 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u27_prefixed
)) & (7));
804 FLD (f_dsp_24_u8
) = ((((UINT
) (FLD (f_bitbase32_24_u27_prefixed
)) >> (3))) & (255));
805 FLD (f_dsp_32_u16
) = ((((UINT
) (FLD (f_bitbase32_24_u27_prefixed
)) >> (11))) & (65535));
807 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
810 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
814 long value
= fields
->f_dsp_32_u16
;
815 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
816 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
822 case M32C_OPERAND_BITNO16R
:
823 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
825 case M32C_OPERAND_BITNO32PREFIXED
:
826 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
828 case M32C_OPERAND_BITNO32UNPREFIXED
:
829 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
831 case M32C_OPERAND_DSP_10_U6
:
832 errmsg
= insert_normal (cd
, fields
->f_dsp_10_u6
, 0, 0, 10, 6, 32, total_length
, buffer
);
834 case M32C_OPERAND_DSP_16_S16
:
836 long value
= fields
->f_dsp_16_s16
;
837 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
838 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
841 case M32C_OPERAND_DSP_16_S8
:
842 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
844 case M32C_OPERAND_DSP_16_U16
:
846 long value
= fields
->f_dsp_16_u16
;
847 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
848 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
851 case M32C_OPERAND_DSP_16_U20
:
854 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
855 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
858 long value
= fields
->f_dsp_16_u16
;
859 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
860 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
864 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
869 case M32C_OPERAND_DSP_16_U24
:
872 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
873 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
876 long value
= fields
->f_dsp_16_u16
;
877 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
878 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
882 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
887 case M32C_OPERAND_DSP_16_U8
:
888 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
890 case M32C_OPERAND_DSP_24_S16
:
893 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
894 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
896 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
899 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
904 case M32C_OPERAND_DSP_24_S8
:
905 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
907 case M32C_OPERAND_DSP_24_U16
:
910 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u16
)) & (255));
911 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_24_u16
)) >> (8))) & (255));
913 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
916 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
921 case M32C_OPERAND_DSP_24_U20
:
924 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
925 FLD (f_dsp_32_u16
) = ((((UINT
) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
927 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
931 long value
= fields
->f_dsp_32_u16
;
932 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
933 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
939 case M32C_OPERAND_DSP_24_U24
:
942 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
943 FLD (f_dsp_32_u16
) = ((((UINT
) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
945 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
949 long value
= fields
->f_dsp_32_u16
;
950 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
951 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
957 case M32C_OPERAND_DSP_24_U8
:
958 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
960 case M32C_OPERAND_DSP_32_S16
:
962 long value
= fields
->f_dsp_32_s16
;
963 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
964 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
967 case M32C_OPERAND_DSP_32_S8
:
968 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
970 case M32C_OPERAND_DSP_32_U16
:
972 long value
= fields
->f_dsp_32_u16
;
973 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
974 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
977 case M32C_OPERAND_DSP_32_U20
:
979 long value
= fields
->f_dsp_32_u24
;
980 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
981 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
984 case M32C_OPERAND_DSP_32_U24
:
986 long value
= fields
->f_dsp_32_u24
;
987 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
988 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
991 case M32C_OPERAND_DSP_32_U8
:
992 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
994 case M32C_OPERAND_DSP_40_S16
:
996 long value
= fields
->f_dsp_40_s16
;
997 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
998 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1001 case M32C_OPERAND_DSP_40_S8
:
1002 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1004 case M32C_OPERAND_DSP_40_U16
:
1006 long value
= fields
->f_dsp_40_u16
;
1007 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1008 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 16, 32, total_length
, buffer
);
1011 case M32C_OPERAND_DSP_40_U20
:
1013 long value
= fields
->f_dsp_40_u20
;
1014 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (983040))));
1015 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 20, 32, total_length
, buffer
);
1018 case M32C_OPERAND_DSP_40_U24
:
1020 long value
= fields
->f_dsp_40_u24
;
1021 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1022 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1025 case M32C_OPERAND_DSP_40_U8
:
1026 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1028 case M32C_OPERAND_DSP_48_S16
:
1030 long value
= fields
->f_dsp_48_s16
;
1031 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1032 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1035 case M32C_OPERAND_DSP_48_S8
:
1036 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1038 case M32C_OPERAND_DSP_48_U16
:
1040 long value
= fields
->f_dsp_48_u16
;
1041 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1042 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1045 case M32C_OPERAND_DSP_48_U20
:
1048 FLD (f_dsp_64_u8
) = ((((UINT
) (FLD (f_dsp_48_u20
)) >> (16))) & (15));
1049 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u20
)) & (65535));
1052 long value
= fields
->f_dsp_48_u16
;
1053 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1054 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1058 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1063 case M32C_OPERAND_DSP_48_U24
:
1066 FLD (f_dsp_64_u8
) = ((((UINT
) (FLD (f_dsp_48_u24
)) >> (16))) & (255));
1067 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u24
)) & (65535));
1070 long value
= fields
->f_dsp_48_u16
;
1071 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1072 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1076 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1081 case M32C_OPERAND_DSP_48_U8
:
1082 errmsg
= insert_normal (cd
, fields
->f_dsp_48_u8
, 0, 32, 16, 8, 32, total_length
, buffer
);
1084 case M32C_OPERAND_DSP_8_S24
:
1086 long value
= fields
->f_dsp_8_s24
;
1087 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
1088 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, buffer
);
1091 case M32C_OPERAND_DSP_8_S8
:
1092 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1094 case M32C_OPERAND_DSP_8_U16
:
1096 long value
= fields
->f_dsp_8_u16
;
1097 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1098 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 16, 32, total_length
, buffer
);
1101 case M32C_OPERAND_DSP_8_U24
:
1103 long value
= fields
->f_dsp_8_u24
;
1104 value
= ((((((USI
) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1105 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 24, 32, total_length
, buffer
);
1108 case M32C_OPERAND_DSP_8_U6
:
1109 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u6
, 0, 0, 8, 6, 32, total_length
, buffer
);
1111 case M32C_OPERAND_DSP_8_U8
:
1112 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1114 case M32C_OPERAND_DST16AN
:
1115 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1117 case M32C_OPERAND_DST16AN_S
:
1118 errmsg
= insert_normal (cd
, fields
->f_dst16_an_s
, 0, 0, 4, 1, 32, total_length
, buffer
);
1120 case M32C_OPERAND_DST16ANHI
:
1121 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1123 case M32C_OPERAND_DST16ANQI
:
1124 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1126 case M32C_OPERAND_DST16ANQI_S
:
1127 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1129 case M32C_OPERAND_DST16ANSI
:
1130 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1132 case M32C_OPERAND_DST16RNEXTQI
:
1133 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_ext
, 0, 0, 14, 1, 32, total_length
, buffer
);
1135 case M32C_OPERAND_DST16RNHI
:
1136 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1138 case M32C_OPERAND_DST16RNQI
:
1139 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1141 case M32C_OPERAND_DST16RNQI_S
:
1142 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1144 case M32C_OPERAND_DST16RNSI
:
1145 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1147 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
1148 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1150 case M32C_OPERAND_DST32ANPREFIXED
:
1151 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1153 case M32C_OPERAND_DST32ANPREFIXEDHI
:
1154 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1156 case M32C_OPERAND_DST32ANPREFIXEDQI
:
1157 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1159 case M32C_OPERAND_DST32ANPREFIXEDSI
:
1160 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1162 case M32C_OPERAND_DST32ANUNPREFIXED
:
1163 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1165 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
1166 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1168 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
1169 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1171 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
1172 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1174 case M32C_OPERAND_DST32R0HI_S
:
1176 case M32C_OPERAND_DST32R0QI_S
:
1178 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
1179 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1181 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
1182 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1184 case M32C_OPERAND_DST32RNPREFIXEDHI
:
1186 long value
= fields
->f_dst32_rn_prefixed_HI
;
1187 value
= ((((value
) + (2))) % (4));
1188 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1191 case M32C_OPERAND_DST32RNPREFIXEDQI
:
1193 long value
= fields
->f_dst32_rn_prefixed_QI
;
1194 value
= (((((((~ (value
))) << (1))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
1195 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1198 case M32C_OPERAND_DST32RNPREFIXEDSI
:
1200 long value
= fields
->f_dst32_rn_prefixed_SI
;
1201 value
= ((value
) + (2));
1202 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1205 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
1207 long value
= fields
->f_dst32_rn_unprefixed_HI
;
1208 value
= ((((value
) + (2))) % (4));
1209 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1212 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
1214 long value
= fields
->f_dst32_rn_unprefixed_QI
;
1215 value
= (((((((~ (value
))) << (1))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
1216 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1219 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
1221 long value
= fields
->f_dst32_rn_unprefixed_SI
;
1222 value
= ((value
) + (2));
1223 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1226 case M32C_OPERAND_G
:
1228 case M32C_OPERAND_IMM_12_S4
:
1229 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1231 case M32C_OPERAND_IMM_12_S4N
:
1232 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1234 case M32C_OPERAND_IMM_13_U3
:
1235 errmsg
= insert_normal (cd
, fields
->f_imm_13_u3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1237 case M32C_OPERAND_IMM_16_HI
:
1239 long value
= fields
->f_dsp_16_s16
;
1240 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1241 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
1244 case M32C_OPERAND_IMM_16_QI
:
1245 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
1247 case M32C_OPERAND_IMM_16_SI
:
1250 FLD (f_dsp_32_u16
) = ((((UINT
) (FLD (f_dsp_16_s32
)) >> (16))) & (65535));
1251 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_s32
)) & (65535));
1254 long value
= fields
->f_dsp_16_u16
;
1255 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1256 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
1261 long value
= fields
->f_dsp_32_u16
;
1262 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1263 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
1269 case M32C_OPERAND_IMM_20_S4
:
1270 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1272 case M32C_OPERAND_IMM_24_HI
:
1275 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
1276 FLD (f_dsp_32_u8
) = ((((UINT
) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
1278 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1281 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1286 case M32C_OPERAND_IMM_24_QI
:
1287 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
1289 case M32C_OPERAND_IMM_24_SI
:
1292 FLD (f_dsp_32_u24
) = ((((UINT
) (FLD (f_dsp_24_s32
)) >> (8))) & (16777215));
1293 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s32
)) & (255));
1295 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1299 long value
= fields
->f_dsp_32_u24
;
1300 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1301 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
1307 case M32C_OPERAND_IMM_32_HI
:
1309 long value
= fields
->f_dsp_32_s16
;
1310 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1311 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
1314 case M32C_OPERAND_IMM_32_QI
:
1315 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
1317 case M32C_OPERAND_IMM_32_SI
:
1319 long value
= fields
->f_dsp_32_s32
;
1320 value
= EXTSISI (((((((((UINT
) (value
) >> (24))) & (255))) | (((((UINT
) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
1321 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, buffer
);
1324 case M32C_OPERAND_IMM_40_HI
:
1326 long value
= fields
->f_dsp_40_s16
;
1327 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1328 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1331 case M32C_OPERAND_IMM_40_QI
:
1332 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1334 case M32C_OPERAND_IMM_40_SI
:
1337 FLD (f_dsp_64_u8
) = ((((UINT
) (FLD (f_dsp_40_s32
)) >> (24))) & (255));
1338 FLD (f_dsp_40_u24
) = ((FLD (f_dsp_40_s32
)) & (16777215));
1341 long value
= fields
->f_dsp_40_u24
;
1342 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1343 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1347 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1352 case M32C_OPERAND_IMM_48_HI
:
1354 long value
= fields
->f_dsp_48_s16
;
1355 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1356 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1359 case M32C_OPERAND_IMM_48_QI
:
1360 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1362 case M32C_OPERAND_IMM_48_SI
:
1365 FLD (f_dsp_64_u16
) = ((((UINT
) (FLD (f_dsp_48_s32
)) >> (16))) & (65535));
1366 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_s32
)) & (65535));
1369 long value
= fields
->f_dsp_48_u16
;
1370 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1371 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1376 long value
= fields
->f_dsp_64_u16
;
1377 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1378 errmsg
= insert_normal (cd
, value
, 0, 64, 0, 16, 32, total_length
, buffer
);
1384 case M32C_OPERAND_IMM_56_HI
:
1387 FLD (f_dsp_56_u8
) = ((FLD (f_dsp_56_s16
)) & (255));
1388 FLD (f_dsp_64_u8
) = ((((UINT
) (FLD (f_dsp_56_s16
)) >> (8))) & (255));
1390 errmsg
= insert_normal (cd
, fields
->f_dsp_56_u8
, 0, 32, 24, 8, 32, total_length
, buffer
);
1393 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1398 case M32C_OPERAND_IMM_56_QI
:
1399 errmsg
= insert_normal (cd
, fields
->f_dsp_56_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 24, 8, 32, total_length
, buffer
);
1401 case M32C_OPERAND_IMM_64_HI
:
1403 long value
= fields
->f_dsp_64_s16
;
1404 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1405 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, buffer
);
1408 case M32C_OPERAND_IMM_8_HI
:
1410 long value
= fields
->f_dsp_8_s16
;
1411 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1412 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, buffer
);
1415 case M32C_OPERAND_IMM_8_QI
:
1416 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1418 case M32C_OPERAND_IMM_8_S4
:
1419 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1421 case M32C_OPERAND_IMM_8_S4N
:
1422 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1424 case M32C_OPERAND_IMM_SH_12_S4
:
1425 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1427 case M32C_OPERAND_IMM_SH_20_S4
:
1428 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1430 case M32C_OPERAND_IMM_SH_8_S4
:
1431 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1433 case M32C_OPERAND_IMM1_S
:
1435 long value
= fields
->f_imm1_S
;
1436 value
= ((value
) - (1));
1437 errmsg
= insert_normal (cd
, value
, 0, 0, 2, 1, 32, total_length
, buffer
);
1440 case M32C_OPERAND_IMM3_S
:
1443 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
1444 FLD (f_2_2
) = ((((UINT
) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
1446 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1449 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1454 case M32C_OPERAND_LAB_16_8
:
1456 long value
= fields
->f_lab_16_8
;
1457 value
= ((value
) - (((pc
) + (2))));
1458 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 16, 8, 32, total_length
, buffer
);
1461 case M32C_OPERAND_LAB_24_8
:
1463 long value
= fields
->f_lab_24_8
;
1464 value
= ((value
) - (((pc
) + (2))));
1465 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 24, 8, 32, total_length
, buffer
);
1468 case M32C_OPERAND_LAB_32_8
:
1470 long value
= fields
->f_lab_32_8
;
1471 value
= ((value
) - (((pc
) + (2))));
1472 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 0, 8, 32, total_length
, buffer
);
1475 case M32C_OPERAND_LAB_40_8
:
1477 long value
= fields
->f_lab_40_8
;
1478 value
= ((value
) - (((pc
) + (2))));
1479 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 8, 8, 32, total_length
, buffer
);
1482 case M32C_OPERAND_LAB_5_3
:
1484 long value
= fields
->f_lab_5_3
;
1485 value
= ((value
) - (((pc
) + (2))));
1486 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, buffer
);
1489 case M32C_OPERAND_LAB_8_16
:
1491 long value
= fields
->f_lab_8_16
;
1492 value
= ((((((((value
) - (((pc
) + (1))))) & (255))) << (8))) | (((USI
) (((((value
) - (((pc
) + (1))))) & (65280))) >> (8))));
1493 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGN_OPT
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 16, 32, total_length
, buffer
);
1496 case M32C_OPERAND_LAB_8_24
:
1498 long value
= fields
->f_lab_8_24
;
1499 value
= ((((((USI
) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1500 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, buffer
);
1503 case M32C_OPERAND_LAB_8_8
:
1505 long value
= fields
->f_lab_8_8
;
1506 value
= ((value
) - (((pc
) + (1))));
1507 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 8, 32, total_length
, buffer
);
1510 case M32C_OPERAND_LAB32_JMP_S
:
1514 tmp_val
= ((((FLD (f_lab32_jmp_s
)) - (pc
))) - (2));
1515 FLD (f_7_1
) = ((tmp_val
) & (1));
1516 FLD (f_2_2
) = ((USI
) (tmp_val
) >> (1));
1518 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1521 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1526 case M32C_OPERAND_Q
:
1528 case M32C_OPERAND_R0
:
1530 case M32C_OPERAND_R0H
:
1532 case M32C_OPERAND_R0L
:
1534 case M32C_OPERAND_R1
:
1536 case M32C_OPERAND_R1R2R0
:
1538 case M32C_OPERAND_R2
:
1540 case M32C_OPERAND_R2R0
:
1542 case M32C_OPERAND_R3
:
1544 case M32C_OPERAND_R3R1
:
1546 case M32C_OPERAND_REGSETPOP
:
1547 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1549 case M32C_OPERAND_REGSETPUSH
:
1550 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1552 case M32C_OPERAND_RN16_PUSH_S
:
1553 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
1555 case M32C_OPERAND_S
:
1557 case M32C_OPERAND_SRC16AN
:
1558 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1560 case M32C_OPERAND_SRC16ANHI
:
1561 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1563 case M32C_OPERAND_SRC16ANQI
:
1564 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1566 case M32C_OPERAND_SRC16RNHI
:
1567 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1569 case M32C_OPERAND_SRC16RNQI
:
1570 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1572 case M32C_OPERAND_SRC32ANPREFIXED
:
1573 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1575 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
1576 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1578 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
1579 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1581 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
1582 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1584 case M32C_OPERAND_SRC32ANUNPREFIXED
:
1585 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1587 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
1588 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1590 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
1591 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1593 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
1594 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1596 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
1598 long value
= fields
->f_src32_rn_prefixed_HI
;
1599 value
= ((((value
) + (2))) % (4));
1600 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1603 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
1605 long value
= fields
->f_src32_rn_prefixed_QI
;
1606 value
= (((((((~ (value
))) << (1))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
1607 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1610 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
1612 long value
= fields
->f_src32_rn_prefixed_SI
;
1613 value
= ((value
) + (2));
1614 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1617 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
1619 long value
= fields
->f_src32_rn_unprefixed_HI
;
1620 value
= ((((value
) + (2))) % (4));
1621 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1624 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
1626 long value
= fields
->f_src32_rn_unprefixed_QI
;
1627 value
= (((((((~ (value
))) << (1))) & (2))) | (((((USI
) (value
) >> (1))) & (1))));
1628 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1631 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
1633 long value
= fields
->f_src32_rn_unprefixed_SI
;
1634 value
= ((value
) + (2));
1635 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1638 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
1639 errmsg
= insert_normal (cd
, fields
->f_5_1
, 0, 0, 5, 1, 32, total_length
, buffer
);
1641 case M32C_OPERAND_X
:
1643 case M32C_OPERAND_Z
:
1645 case M32C_OPERAND_COND16_16
:
1646 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1648 case M32C_OPERAND_COND16_24
:
1649 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1651 case M32C_OPERAND_COND16_32
:
1652 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1654 case M32C_OPERAND_COND16C
:
1655 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1657 case M32C_OPERAND_COND16J
:
1658 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1660 case M32C_OPERAND_COND16J5
:
1661 errmsg
= insert_normal (cd
, fields
->f_cond16j_5
, 0, 0, 5, 3, 32, total_length
, buffer
);
1663 case M32C_OPERAND_COND32
:
1666 FLD (f_9_1
) = ((((UINT
) (FLD (f_cond32
)) >> (3))) & (1));
1667 FLD (f_13_3
) = ((FLD (f_cond32
)) & (7));
1669 errmsg
= insert_normal (cd
, fields
->f_9_1
, 0, 0, 9, 1, 32, total_length
, buffer
);
1672 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1677 case M32C_OPERAND_COND32_16
:
1678 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1680 case M32C_OPERAND_COND32_24
:
1681 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1683 case M32C_OPERAND_COND32_32
:
1684 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1686 case M32C_OPERAND_COND32_40
:
1687 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1689 case M32C_OPERAND_COND32J
:
1692 FLD (f_1_3
) = ((((UINT
) (FLD (f_cond32j
)) >> (1))) & (7));
1693 FLD (f_7_1
) = ((FLD (f_cond32j
)) & (1));
1695 errmsg
= insert_normal (cd
, fields
->f_1_3
, 0, 0, 1, 3, 32, total_length
, buffer
);
1698 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1703 case M32C_OPERAND_CR1_PREFIXED_32
:
1704 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1706 case M32C_OPERAND_CR1_UNPREFIXED_32
:
1707 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1709 case M32C_OPERAND_CR16
:
1710 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1712 case M32C_OPERAND_CR2_32
:
1713 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1715 case M32C_OPERAND_CR3_PREFIXED_32
:
1716 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1718 case M32C_OPERAND_CR3_UNPREFIXED_32
:
1719 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1721 case M32C_OPERAND_FLAGS16
:
1722 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1724 case M32C_OPERAND_FLAGS32
:
1725 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1727 case M32C_OPERAND_SCCOND32
:
1728 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1730 case M32C_OPERAND_SIZE
:
1734 /* xgettext:c-format */
1735 opcodes_error_handler
1736 (_("internal error: unrecognized field %d while building insn"),
1744 int m32c_cgen_extract_operand
1745 (CGEN_CPU_DESC
, int, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
1747 /* Main entry point for operand extraction.
1748 The result is <= 0 for error, >0 for success.
1749 ??? Actual values aren't well defined right now.
1751 This function is basically just a big switch statement. Earlier versions
1752 used tables to look up the function to use, but
1753 - if the table contains both assembler and disassembler functions then
1754 the disassembler contains much of the assembler and vice-versa,
1755 - there's a lot of inlining possibilities as things grow,
1756 - using a switch statement avoids the function call overhead.
1758 This function could be moved into `print_insn_normal', but keeping it
1759 separate makes clear the interface between `print_insn_normal' and each of
1763 m32c_cgen_extract_operand (CGEN_CPU_DESC cd
,
1765 CGEN_EXTRACT_INFO
*ex_info
,
1766 CGEN_INSN_INT insn_value
,
1767 CGEN_FIELDS
* fields
,
1770 /* Assume success (for those operands that are nops). */
1772 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
1776 case M32C_OPERAND_A0
:
1778 case M32C_OPERAND_A1
:
1780 case M32C_OPERAND_AN16_PUSH_S
:
1781 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
1783 case M32C_OPERAND_BIT16AN
:
1784 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
1786 case M32C_OPERAND_BIT16RN
:
1787 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
1789 case M32C_OPERAND_BIT3_S
:
1791 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
1792 if (length
<= 0) break;
1793 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
1794 if (length
<= 0) break;
1796 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
1800 case M32C_OPERAND_BIT32ANPREFIXED
:
1801 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
1803 case M32C_OPERAND_BIT32ANUNPREFIXED
:
1804 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
1806 case M32C_OPERAND_BIT32RNPREFIXED
:
1809 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
1810 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1811 fields
->f_dst32_rn_prefixed_QI
= value
;
1814 case M32C_OPERAND_BIT32RNUNPREFIXED
:
1817 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
1818 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1819 fields
->f_dst32_rn_unprefixed_QI
= value
;
1822 case M32C_OPERAND_BITBASE16_16_S8
:
1823 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
);
1825 case M32C_OPERAND_BITBASE16_16_U16
:
1828 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1829 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1830 fields
->f_dsp_16_u16
= value
;
1833 case M32C_OPERAND_BITBASE16_16_U8
:
1834 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1836 case M32C_OPERAND_BITBASE16_8_U11_S
:
1838 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_bitno16_S
);
1839 if (length
<= 0) break;
1840 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
1841 if (length
<= 0) break;
1843 FLD (f_bitbase16_u11_S
) = ((((FLD (f_dsp_8_u8
)) << (3))) | (FLD (f_bitno16_S
)));
1847 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
1849 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1850 if (length
<= 0) break;
1851 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
);
1852 if (length
<= 0) break;
1854 FLD (f_bitbase32_16_s11_unprefixed
) = ((((FLD (f_dsp_16_s8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1858 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
1860 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1861 if (length
<= 0) break;
1864 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1865 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1866 fields
->f_dsp_16_s16
= value
;
1868 if (length
<= 0) break;
1870 FLD (f_bitbase32_16_s19_unprefixed
) = ((((FLD (f_dsp_16_s16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1874 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
1876 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1877 if (length
<= 0) break;
1878 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1879 if (length
<= 0) break;
1881 FLD (f_bitbase32_16_u11_unprefixed
) = ((((FLD (f_dsp_16_u8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1885 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
1887 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1888 if (length
<= 0) break;
1891 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1892 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1893 fields
->f_dsp_16_u16
= value
;
1895 if (length
<= 0) break;
1897 FLD (f_bitbase32_16_u19_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1901 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
1903 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1904 if (length
<= 0) break;
1907 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1908 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1909 fields
->f_dsp_16_u16
= value
;
1911 if (length
<= 0) break;
1912 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1913 if (length
<= 0) break;
1915 FLD (f_bitbase32_16_u27_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (19))) | (FLD (f_bitno32_unprefixed
)))));
1919 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
1921 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1922 if (length
<= 0) break;
1923 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
);
1924 if (length
<= 0) break;
1926 FLD (f_bitbase32_24_s11_prefixed
) = ((((FLD (f_dsp_24_s8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1930 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
1932 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1933 if (length
<= 0) break;
1934 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1935 if (length
<= 0) break;
1936 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
);
1937 if (length
<= 0) break;
1939 FLD (f_bitbase32_24_s19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_s8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1943 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
1945 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1946 if (length
<= 0) break;
1947 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1948 if (length
<= 0) break;
1950 FLD (f_bitbase32_24_u11_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1954 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
1956 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1957 if (length
<= 0) break;
1958 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1959 if (length
<= 0) break;
1960 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1961 if (length
<= 0) break;
1963 FLD (f_bitbase32_24_u19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1967 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
1969 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1970 if (length
<= 0) break;
1971 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1972 if (length
<= 0) break;
1975 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
1976 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1977 fields
->f_dsp_32_u16
= value
;
1979 if (length
<= 0) break;
1981 FLD (f_bitbase32_24_u27_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u16
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1985 case M32C_OPERAND_BITNO16R
:
1986 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1988 case M32C_OPERAND_BITNO32PREFIXED
:
1989 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1991 case M32C_OPERAND_BITNO32UNPREFIXED
:
1992 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1994 case M32C_OPERAND_DSP_10_U6
:
1995 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 6, 32, total_length
, pc
, & fields
->f_dsp_10_u6
);
1997 case M32C_OPERAND_DSP_16_S16
:
2000 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2001 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2002 fields
->f_dsp_16_s16
= value
;
2005 case M32C_OPERAND_DSP_16_S8
:
2006 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
);
2008 case M32C_OPERAND_DSP_16_U16
:
2011 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2012 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2013 fields
->f_dsp_16_u16
= value
;
2016 case M32C_OPERAND_DSP_16_U20
:
2020 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2021 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2022 fields
->f_dsp_16_u16
= value
;
2024 if (length
<= 0) break;
2025 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2026 if (length
<= 0) break;
2028 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
2032 case M32C_OPERAND_DSP_16_U24
:
2036 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2037 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2038 fields
->f_dsp_16_u16
= value
;
2040 if (length
<= 0) break;
2041 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2042 if (length
<= 0) break;
2044 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
2048 case M32C_OPERAND_DSP_16_U8
:
2049 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2051 case M32C_OPERAND_DSP_24_S16
:
2053 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2054 if (length
<= 0) break;
2055 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2056 if (length
<= 0) break;
2058 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2062 case M32C_OPERAND_DSP_24_S8
:
2063 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
);
2065 case M32C_OPERAND_DSP_24_U16
:
2067 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2068 if (length
<= 0) break;
2069 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2070 if (length
<= 0) break;
2072 FLD (f_dsp_24_u16
) = ((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
)));
2076 case M32C_OPERAND_DSP_24_U20
:
2078 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2079 if (length
<= 0) break;
2082 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2083 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2084 fields
->f_dsp_32_u16
= value
;
2086 if (length
<= 0) break;
2088 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2092 case M32C_OPERAND_DSP_24_U24
:
2094 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2095 if (length
<= 0) break;
2098 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2099 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2100 fields
->f_dsp_32_u16
= value
;
2102 if (length
<= 0) break;
2104 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2108 case M32C_OPERAND_DSP_24_U8
:
2109 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2111 case M32C_OPERAND_DSP_32_S16
:
2114 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2115 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2116 fields
->f_dsp_32_s16
= value
;
2119 case M32C_OPERAND_DSP_32_S8
:
2120 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
);
2122 case M32C_OPERAND_DSP_32_U16
:
2125 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2126 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2127 fields
->f_dsp_32_u16
= value
;
2130 case M32C_OPERAND_DSP_32_U20
:
2133 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2134 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2135 fields
->f_dsp_32_u24
= value
;
2138 case M32C_OPERAND_DSP_32_U24
:
2141 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2142 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2143 fields
->f_dsp_32_u24
= value
;
2146 case M32C_OPERAND_DSP_32_U8
:
2147 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2149 case M32C_OPERAND_DSP_40_S16
:
2152 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2153 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2154 fields
->f_dsp_40_s16
= value
;
2157 case M32C_OPERAND_DSP_40_S8
:
2158 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
);
2160 case M32C_OPERAND_DSP_40_U16
:
2163 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 16, 32, total_length
, pc
, & value
);
2164 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2165 fields
->f_dsp_40_u16
= value
;
2168 case M32C_OPERAND_DSP_40_U20
:
2171 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 20, 32, total_length
, pc
, & value
);
2172 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (983040))));
2173 fields
->f_dsp_40_u20
= value
;
2176 case M32C_OPERAND_DSP_40_U24
:
2179 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2180 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2181 fields
->f_dsp_40_u24
= value
;
2184 case M32C_OPERAND_DSP_40_U8
:
2185 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2187 case M32C_OPERAND_DSP_48_S16
:
2190 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2191 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2192 fields
->f_dsp_48_s16
= value
;
2195 case M32C_OPERAND_DSP_48_S8
:
2196 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
);
2198 case M32C_OPERAND_DSP_48_U16
:
2201 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2202 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2203 fields
->f_dsp_48_u16
= value
;
2206 case M32C_OPERAND_DSP_48_U20
:
2210 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2211 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2212 fields
->f_dsp_48_u16
= value
;
2214 if (length
<= 0) break;
2215 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2216 if (length
<= 0) break;
2218 FLD (f_dsp_48_u20
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (983040))));
2222 case M32C_OPERAND_DSP_48_U24
:
2226 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2227 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2228 fields
->f_dsp_48_u16
= value
;
2230 if (length
<= 0) break;
2231 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2232 if (length
<= 0) break;
2234 FLD (f_dsp_48_u24
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (16711680))));
2238 case M32C_OPERAND_DSP_48_U8
:
2239 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_48_u8
);
2241 case M32C_OPERAND_DSP_8_S24
:
2244 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, pc
, & value
);
2245 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
2246 fields
->f_dsp_8_s24
= value
;
2249 case M32C_OPERAND_DSP_8_S8
:
2250 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
);
2252 case M32C_OPERAND_DSP_8_U16
:
2255 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 16, 32, total_length
, pc
, & value
);
2256 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2257 fields
->f_dsp_8_u16
= value
;
2260 case M32C_OPERAND_DSP_8_U24
:
2263 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 24, 32, total_length
, pc
, & value
);
2264 value
= ((((((USI
) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2265 fields
->f_dsp_8_u24
= value
;
2268 case M32C_OPERAND_DSP_8_U6
:
2269 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 6, 32, total_length
, pc
, & fields
->f_dsp_8_u6
);
2271 case M32C_OPERAND_DSP_8_U8
:
2272 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
2274 case M32C_OPERAND_DST16AN
:
2275 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2277 case M32C_OPERAND_DST16AN_S
:
2278 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_dst16_an_s
);
2280 case M32C_OPERAND_DST16ANHI
:
2281 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2283 case M32C_OPERAND_DST16ANQI
:
2284 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2286 case M32C_OPERAND_DST16ANQI_S
:
2287 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2289 case M32C_OPERAND_DST16ANSI
:
2290 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2292 case M32C_OPERAND_DST16RNEXTQI
:
2293 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_ext
);
2295 case M32C_OPERAND_DST16RNHI
:
2296 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2298 case M32C_OPERAND_DST16RNQI
:
2299 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2301 case M32C_OPERAND_DST16RNQI_S
:
2302 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2304 case M32C_OPERAND_DST16RNSI
:
2305 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2307 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
2308 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2310 case M32C_OPERAND_DST32ANPREFIXED
:
2311 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2313 case M32C_OPERAND_DST32ANPREFIXEDHI
:
2314 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2316 case M32C_OPERAND_DST32ANPREFIXEDQI
:
2317 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2319 case M32C_OPERAND_DST32ANPREFIXEDSI
:
2320 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2322 case M32C_OPERAND_DST32ANUNPREFIXED
:
2323 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2325 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
2326 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2328 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
2329 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2331 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
2332 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2334 case M32C_OPERAND_DST32R0HI_S
:
2336 case M32C_OPERAND_DST32R0QI_S
:
2338 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
2339 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2341 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
2342 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2344 case M32C_OPERAND_DST32RNPREFIXEDHI
:
2347 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2348 value
= ((((value
) + (2))) % (4));
2349 fields
->f_dst32_rn_prefixed_HI
= value
;
2352 case M32C_OPERAND_DST32RNPREFIXEDQI
:
2355 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2356 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2357 fields
->f_dst32_rn_prefixed_QI
= value
;
2360 case M32C_OPERAND_DST32RNPREFIXEDSI
:
2363 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2364 value
= ((value
) - (2));
2365 fields
->f_dst32_rn_prefixed_SI
= value
;
2368 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
2371 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2372 value
= ((((value
) + (2))) % (4));
2373 fields
->f_dst32_rn_unprefixed_HI
= value
;
2376 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
2379 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2380 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2381 fields
->f_dst32_rn_unprefixed_QI
= value
;
2384 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
2387 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2388 value
= ((value
) - (2));
2389 fields
->f_dst32_rn_unprefixed_SI
= value
;
2392 case M32C_OPERAND_G
:
2394 case M32C_OPERAND_IMM_12_S4
:
2395 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
);
2397 case M32C_OPERAND_IMM_12_S4N
:
2398 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
);
2400 case M32C_OPERAND_IMM_13_U3
:
2401 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_imm_13_u3
);
2403 case M32C_OPERAND_IMM_16_HI
:
2406 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2407 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2408 fields
->f_dsp_16_s16
= value
;
2411 case M32C_OPERAND_IMM_16_QI
:
2412 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
);
2414 case M32C_OPERAND_IMM_16_SI
:
2418 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2419 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2420 fields
->f_dsp_16_u16
= value
;
2422 if (length
<= 0) break;
2425 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2426 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2427 fields
->f_dsp_32_u16
= value
;
2429 if (length
<= 0) break;
2431 FLD (f_dsp_16_s32
) = ((((FLD (f_dsp_16_u16
)) & (65535))) | (((((FLD (f_dsp_32_u16
)) << (16))) & (0xffff0000))));
2435 case M32C_OPERAND_IMM_20_S4
:
2436 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
);
2438 case M32C_OPERAND_IMM_24_HI
:
2440 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2441 if (length
<= 0) break;
2442 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2443 if (length
<= 0) break;
2445 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2449 case M32C_OPERAND_IMM_24_QI
:
2450 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
);
2452 case M32C_OPERAND_IMM_24_SI
:
2454 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2455 if (length
<= 0) break;
2458 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2459 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2460 fields
->f_dsp_32_u24
= value
;
2462 if (length
<= 0) break;
2464 FLD (f_dsp_24_s32
) = ((((FLD (f_dsp_24_u8
)) & (255))) | (((((FLD (f_dsp_32_u24
)) << (8))) & (0xffffff00))));
2468 case M32C_OPERAND_IMM_32_HI
:
2471 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2472 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2473 fields
->f_dsp_32_s16
= value
;
2476 case M32C_OPERAND_IMM_32_QI
:
2477 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
);
2479 case M32C_OPERAND_IMM_32_SI
:
2482 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, pc
, & value
);
2483 value
= EXTSISI (((((((((UINT
) (value
) >> (24))) & (255))) | (((((UINT
) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
2484 fields
->f_dsp_32_s32
= value
;
2487 case M32C_OPERAND_IMM_40_HI
:
2490 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2491 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2492 fields
->f_dsp_40_s16
= value
;
2495 case M32C_OPERAND_IMM_40_QI
:
2496 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
);
2498 case M32C_OPERAND_IMM_40_SI
:
2502 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2503 value
= ((((((((USI
) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2504 fields
->f_dsp_40_u24
= value
;
2506 if (length
<= 0) break;
2507 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2508 if (length
<= 0) break;
2510 FLD (f_dsp_40_s32
) = ((((FLD (f_dsp_40_u24
)) & (16777215))) | (((((FLD (f_dsp_64_u8
)) << (24))) & (0xff000000))));
2514 case M32C_OPERAND_IMM_48_HI
:
2517 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2518 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2519 fields
->f_dsp_48_s16
= value
;
2522 case M32C_OPERAND_IMM_48_QI
:
2523 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
);
2525 case M32C_OPERAND_IMM_48_SI
:
2529 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2530 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2531 fields
->f_dsp_48_u16
= value
;
2533 if (length
<= 0) break;
2536 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 16, 32, total_length
, pc
, & value
);
2537 value
= ((((((UHI
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2538 fields
->f_dsp_64_u16
= value
;
2540 if (length
<= 0) break;
2542 FLD (f_dsp_48_s32
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u16
)) << (16))) & (0xffff0000))));
2546 case M32C_OPERAND_IMM_56_HI
:
2548 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_56_u8
);
2549 if (length
<= 0) break;
2550 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2551 if (length
<= 0) break;
2553 FLD (f_dsp_56_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_64_u8
)) << (8))) | (FLD (f_dsp_56_u8
))))));
2557 case M32C_OPERAND_IMM_56_QI
:
2558 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
);
2560 case M32C_OPERAND_IMM_64_HI
:
2563 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, pc
, & value
);
2564 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2565 fields
->f_dsp_64_s16
= value
;
2568 case M32C_OPERAND_IMM_8_HI
:
2571 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, pc
, & value
);
2572 value
= EXTHISI (((HI
) (INT
) (((((((UINT
) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2573 fields
->f_dsp_8_s16
= value
;
2576 case M32C_OPERAND_IMM_8_QI
:
2577 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
);
2579 case M32C_OPERAND_IMM_8_S4
:
2580 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
);
2582 case M32C_OPERAND_IMM_8_S4N
:
2583 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
);
2585 case M32C_OPERAND_IMM_SH_12_S4
:
2586 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
);
2588 case M32C_OPERAND_IMM_SH_20_S4
:
2589 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
);
2591 case M32C_OPERAND_IMM_SH_8_S4
:
2592 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
);
2594 case M32C_OPERAND_IMM1_S
:
2597 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 1, 32, total_length
, pc
, & value
);
2598 value
= ((value
) + (1));
2599 fields
->f_imm1_S
= value
;
2602 case M32C_OPERAND_IMM3_S
:
2604 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2605 if (length
<= 0) break;
2606 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2607 if (length
<= 0) break;
2609 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
2613 case M32C_OPERAND_LAB_16_8
:
2616 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
);
2617 value
= ((value
) + (((pc
) + (2))));
2618 fields
->f_lab_16_8
= value
;
2621 case M32C_OPERAND_LAB_24_8
:
2624 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
);
2625 value
= ((value
) + (((pc
) + (2))));
2626 fields
->f_lab_24_8
= value
;
2629 case M32C_OPERAND_LAB_32_8
:
2632 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
);
2633 value
= ((value
) + (((pc
) + (2))));
2634 fields
->f_lab_32_8
= value
;
2637 case M32C_OPERAND_LAB_40_8
:
2640 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
);
2641 value
= ((value
) + (((pc
) + (2))));
2642 fields
->f_lab_40_8
= value
;
2645 case M32C_OPERAND_LAB_5_3
:
2648 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, pc
, & value
);
2649 value
= ((value
) + (((pc
) + (2))));
2650 fields
->f_lab_5_3
= value
;
2653 case M32C_OPERAND_LAB_8_16
:
2656 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
);
2657 value
= ((((((((((USI
) (((value
) & (65280))) >> (8))) | (((((value
) & (255))) << (8))))) ^ (32768))) - (32768))) + (((pc
) + (1))));
2658 fields
->f_lab_8_16
= value
;
2661 case M32C_OPERAND_LAB_8_24
:
2664 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, pc
, & value
);
2665 value
= ((((((USI
) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2666 fields
->f_lab_8_24
= value
;
2669 case M32C_OPERAND_LAB_8_8
:
2672 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
);
2673 value
= ((value
) + (((pc
) + (1))));
2674 fields
->f_lab_8_8
= value
;
2677 case M32C_OPERAND_LAB32_JMP_S
:
2679 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2680 if (length
<= 0) break;
2681 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2682 if (length
<= 0) break;
2684 FLD (f_lab32_jmp_s
) = ((pc
) + (((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (2))));
2688 case M32C_OPERAND_Q
:
2690 case M32C_OPERAND_R0
:
2692 case M32C_OPERAND_R0H
:
2694 case M32C_OPERAND_R0L
:
2696 case M32C_OPERAND_R1
:
2698 case M32C_OPERAND_R1R2R0
:
2700 case M32C_OPERAND_R2
:
2702 case M32C_OPERAND_R2R0
:
2704 case M32C_OPERAND_R3
:
2706 case M32C_OPERAND_R3R1
:
2708 case M32C_OPERAND_REGSETPOP
:
2709 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2711 case M32C_OPERAND_REGSETPUSH
:
2712 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2714 case M32C_OPERAND_RN16_PUSH_S
:
2715 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
2717 case M32C_OPERAND_S
:
2719 case M32C_OPERAND_SRC16AN
:
2720 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2722 case M32C_OPERAND_SRC16ANHI
:
2723 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2725 case M32C_OPERAND_SRC16ANQI
:
2726 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2728 case M32C_OPERAND_SRC16RNHI
:
2729 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2731 case M32C_OPERAND_SRC16RNQI
:
2732 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2734 case M32C_OPERAND_SRC32ANPREFIXED
:
2735 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2737 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
2738 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2740 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
2741 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2743 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
2744 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2746 case M32C_OPERAND_SRC32ANUNPREFIXED
:
2747 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2749 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
2750 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2752 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
2753 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2755 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
2756 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2758 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
2761 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2762 value
= ((((value
) + (2))) % (4));
2763 fields
->f_src32_rn_prefixed_HI
= value
;
2766 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
2769 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2770 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2771 fields
->f_src32_rn_prefixed_QI
= value
;
2774 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
2777 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2778 value
= ((value
) - (2));
2779 fields
->f_src32_rn_prefixed_SI
= value
;
2782 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
2785 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2786 value
= ((((value
) + (2))) % (4));
2787 fields
->f_src32_rn_unprefixed_HI
= value
;
2790 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
2793 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2794 value
= (((((~ (((USI
) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2795 fields
->f_src32_rn_unprefixed_QI
= value
;
2798 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
2801 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2802 value
= ((value
) - (2));
2803 fields
->f_src32_rn_unprefixed_SI
= value
;
2806 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
2807 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_5_1
);
2809 case M32C_OPERAND_X
:
2811 case M32C_OPERAND_Z
:
2813 case M32C_OPERAND_COND16_16
:
2814 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2816 case M32C_OPERAND_COND16_24
:
2817 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2819 case M32C_OPERAND_COND16_32
:
2820 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2822 case M32C_OPERAND_COND16C
:
2823 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2825 case M32C_OPERAND_COND16J
:
2826 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2828 case M32C_OPERAND_COND16J5
:
2829 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_cond16j_5
);
2831 case M32C_OPERAND_COND32
:
2833 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_9_1
);
2834 if (length
<= 0) break;
2835 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2836 if (length
<= 0) break;
2838 FLD (f_cond32
) = ((((FLD (f_9_1
)) << (3))) | (FLD (f_13_3
)));
2842 case M32C_OPERAND_COND32_16
:
2843 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2845 case M32C_OPERAND_COND32_24
:
2846 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2848 case M32C_OPERAND_COND32_32
:
2849 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2851 case M32C_OPERAND_COND32_40
:
2852 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2854 case M32C_OPERAND_COND32J
:
2856 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 1, 3, 32, total_length
, pc
, & fields
->f_1_3
);
2857 if (length
<= 0) break;
2858 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2859 if (length
<= 0) break;
2861 FLD (f_cond32j
) = ((((FLD (f_1_3
)) << (1))) | (FLD (f_7_1
)));
2865 case M32C_OPERAND_CR1_PREFIXED_32
:
2866 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2868 case M32C_OPERAND_CR1_UNPREFIXED_32
:
2869 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2871 case M32C_OPERAND_CR16
:
2872 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2874 case M32C_OPERAND_CR2_32
:
2875 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2877 case M32C_OPERAND_CR3_PREFIXED_32
:
2878 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2880 case M32C_OPERAND_CR3_UNPREFIXED_32
:
2881 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2883 case M32C_OPERAND_FLAGS16
:
2884 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2886 case M32C_OPERAND_FLAGS32
:
2887 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2889 case M32C_OPERAND_SCCOND32
:
2890 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2892 case M32C_OPERAND_SIZE
:
2896 /* xgettext:c-format */
2897 opcodes_error_handler
2898 (_("internal error: unrecognized field %d while decoding insn"),
2906 cgen_insert_fn
* const m32c_cgen_insert_handlers
[] =
2911 cgen_extract_fn
* const m32c_cgen_extract_handlers
[] =
2913 extract_insn_normal
,
2916 int m32c_cgen_get_int_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2917 bfd_vma
m32c_cgen_get_vma_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2919 /* Getting values from cgen_fields is handled by a collection of functions.
2920 They are distinguished by the type of the VALUE argument they return.
2921 TODO: floating point, inlining support, remove cases where result type
2925 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
2927 const CGEN_FIELDS
* fields
)
2933 case M32C_OPERAND_A0
:
2936 case M32C_OPERAND_A1
:
2939 case M32C_OPERAND_AN16_PUSH_S
:
2940 value
= fields
->f_4_1
;
2942 case M32C_OPERAND_BIT16AN
:
2943 value
= fields
->f_dst16_an
;
2945 case M32C_OPERAND_BIT16RN
:
2946 value
= fields
->f_dst16_rn
;
2948 case M32C_OPERAND_BIT3_S
:
2949 value
= fields
->f_imm3_S
;
2951 case M32C_OPERAND_BIT32ANPREFIXED
:
2952 value
= fields
->f_dst32_an_prefixed
;
2954 case M32C_OPERAND_BIT32ANUNPREFIXED
:
2955 value
= fields
->f_dst32_an_unprefixed
;
2957 case M32C_OPERAND_BIT32RNPREFIXED
:
2958 value
= fields
->f_dst32_rn_prefixed_QI
;
2960 case M32C_OPERAND_BIT32RNUNPREFIXED
:
2961 value
= fields
->f_dst32_rn_unprefixed_QI
;
2963 case M32C_OPERAND_BITBASE16_16_S8
:
2964 value
= fields
->f_dsp_16_s8
;
2966 case M32C_OPERAND_BITBASE16_16_U16
:
2967 value
= fields
->f_dsp_16_u16
;
2969 case M32C_OPERAND_BITBASE16_16_U8
:
2970 value
= fields
->f_dsp_16_u8
;
2972 case M32C_OPERAND_BITBASE16_8_U11_S
:
2973 value
= fields
->f_bitbase16_u11_S
;
2975 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
2976 value
= fields
->f_bitbase32_16_s11_unprefixed
;
2978 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
2979 value
= fields
->f_bitbase32_16_s19_unprefixed
;
2981 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
2982 value
= fields
->f_bitbase32_16_u11_unprefixed
;
2984 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
2985 value
= fields
->f_bitbase32_16_u19_unprefixed
;
2987 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
2988 value
= fields
->f_bitbase32_16_u27_unprefixed
;
2990 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
2991 value
= fields
->f_bitbase32_24_s11_prefixed
;
2993 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
2994 value
= fields
->f_bitbase32_24_s19_prefixed
;
2996 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
2997 value
= fields
->f_bitbase32_24_u11_prefixed
;
2999 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3000 value
= fields
->f_bitbase32_24_u19_prefixed
;
3002 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3003 value
= fields
->f_bitbase32_24_u27_prefixed
;
3005 case M32C_OPERAND_BITNO16R
:
3006 value
= fields
->f_dsp_16_u8
;
3008 case M32C_OPERAND_BITNO32PREFIXED
:
3009 value
= fields
->f_bitno32_prefixed
;
3011 case M32C_OPERAND_BITNO32UNPREFIXED
:
3012 value
= fields
->f_bitno32_unprefixed
;
3014 case M32C_OPERAND_DSP_10_U6
:
3015 value
= fields
->f_dsp_10_u6
;
3017 case M32C_OPERAND_DSP_16_S16
:
3018 value
= fields
->f_dsp_16_s16
;
3020 case M32C_OPERAND_DSP_16_S8
:
3021 value
= fields
->f_dsp_16_s8
;
3023 case M32C_OPERAND_DSP_16_U16
:
3024 value
= fields
->f_dsp_16_u16
;
3026 case M32C_OPERAND_DSP_16_U20
:
3027 value
= fields
->f_dsp_16_u24
;
3029 case M32C_OPERAND_DSP_16_U24
:
3030 value
= fields
->f_dsp_16_u24
;
3032 case M32C_OPERAND_DSP_16_U8
:
3033 value
= fields
->f_dsp_16_u8
;
3035 case M32C_OPERAND_DSP_24_S16
:
3036 value
= fields
->f_dsp_24_s16
;
3038 case M32C_OPERAND_DSP_24_S8
:
3039 value
= fields
->f_dsp_24_s8
;
3041 case M32C_OPERAND_DSP_24_U16
:
3042 value
= fields
->f_dsp_24_u16
;
3044 case M32C_OPERAND_DSP_24_U20
:
3045 value
= fields
->f_dsp_24_u24
;
3047 case M32C_OPERAND_DSP_24_U24
:
3048 value
= fields
->f_dsp_24_u24
;
3050 case M32C_OPERAND_DSP_24_U8
:
3051 value
= fields
->f_dsp_24_u8
;
3053 case M32C_OPERAND_DSP_32_S16
:
3054 value
= fields
->f_dsp_32_s16
;
3056 case M32C_OPERAND_DSP_32_S8
:
3057 value
= fields
->f_dsp_32_s8
;
3059 case M32C_OPERAND_DSP_32_U16
:
3060 value
= fields
->f_dsp_32_u16
;
3062 case M32C_OPERAND_DSP_32_U20
:
3063 value
= fields
->f_dsp_32_u24
;
3065 case M32C_OPERAND_DSP_32_U24
:
3066 value
= fields
->f_dsp_32_u24
;
3068 case M32C_OPERAND_DSP_32_U8
:
3069 value
= fields
->f_dsp_32_u8
;
3071 case M32C_OPERAND_DSP_40_S16
:
3072 value
= fields
->f_dsp_40_s16
;
3074 case M32C_OPERAND_DSP_40_S8
:
3075 value
= fields
->f_dsp_40_s8
;
3077 case M32C_OPERAND_DSP_40_U16
:
3078 value
= fields
->f_dsp_40_u16
;
3080 case M32C_OPERAND_DSP_40_U20
:
3081 value
= fields
->f_dsp_40_u20
;
3083 case M32C_OPERAND_DSP_40_U24
:
3084 value
= fields
->f_dsp_40_u24
;
3086 case M32C_OPERAND_DSP_40_U8
:
3087 value
= fields
->f_dsp_40_u8
;
3089 case M32C_OPERAND_DSP_48_S16
:
3090 value
= fields
->f_dsp_48_s16
;
3092 case M32C_OPERAND_DSP_48_S8
:
3093 value
= fields
->f_dsp_48_s8
;
3095 case M32C_OPERAND_DSP_48_U16
:
3096 value
= fields
->f_dsp_48_u16
;
3098 case M32C_OPERAND_DSP_48_U20
:
3099 value
= fields
->f_dsp_48_u20
;
3101 case M32C_OPERAND_DSP_48_U24
:
3102 value
= fields
->f_dsp_48_u24
;
3104 case M32C_OPERAND_DSP_48_U8
:
3105 value
= fields
->f_dsp_48_u8
;
3107 case M32C_OPERAND_DSP_8_S24
:
3108 value
= fields
->f_dsp_8_s24
;
3110 case M32C_OPERAND_DSP_8_S8
:
3111 value
= fields
->f_dsp_8_s8
;
3113 case M32C_OPERAND_DSP_8_U16
:
3114 value
= fields
->f_dsp_8_u16
;
3116 case M32C_OPERAND_DSP_8_U24
:
3117 value
= fields
->f_dsp_8_u24
;
3119 case M32C_OPERAND_DSP_8_U6
:
3120 value
= fields
->f_dsp_8_u6
;
3122 case M32C_OPERAND_DSP_8_U8
:
3123 value
= fields
->f_dsp_8_u8
;
3125 case M32C_OPERAND_DST16AN
:
3126 value
= fields
->f_dst16_an
;
3128 case M32C_OPERAND_DST16AN_S
:
3129 value
= fields
->f_dst16_an_s
;
3131 case M32C_OPERAND_DST16ANHI
:
3132 value
= fields
->f_dst16_an
;
3134 case M32C_OPERAND_DST16ANQI
:
3135 value
= fields
->f_dst16_an
;
3137 case M32C_OPERAND_DST16ANQI_S
:
3138 value
= fields
->f_dst16_rn_QI_s
;
3140 case M32C_OPERAND_DST16ANSI
:
3141 value
= fields
->f_dst16_an
;
3143 case M32C_OPERAND_DST16RNEXTQI
:
3144 value
= fields
->f_dst16_rn_ext
;
3146 case M32C_OPERAND_DST16RNHI
:
3147 value
= fields
->f_dst16_rn
;
3149 case M32C_OPERAND_DST16RNQI
:
3150 value
= fields
->f_dst16_rn
;
3152 case M32C_OPERAND_DST16RNQI_S
:
3153 value
= fields
->f_dst16_rn_QI_s
;
3155 case M32C_OPERAND_DST16RNSI
:
3156 value
= fields
->f_dst16_rn
;
3158 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3159 value
= fields
->f_dst32_an_unprefixed
;
3161 case M32C_OPERAND_DST32ANPREFIXED
:
3162 value
= fields
->f_dst32_an_prefixed
;
3164 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3165 value
= fields
->f_dst32_an_prefixed
;
3167 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3168 value
= fields
->f_dst32_an_prefixed
;
3170 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3171 value
= fields
->f_dst32_an_prefixed
;
3173 case M32C_OPERAND_DST32ANUNPREFIXED
:
3174 value
= fields
->f_dst32_an_unprefixed
;
3176 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3177 value
= fields
->f_dst32_an_unprefixed
;
3179 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3180 value
= fields
->f_dst32_an_unprefixed
;
3182 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3183 value
= fields
->f_dst32_an_unprefixed
;
3185 case M32C_OPERAND_DST32R0HI_S
:
3188 case M32C_OPERAND_DST32R0QI_S
:
3191 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3192 value
= fields
->f_dst32_rn_ext_unprefixed
;
3194 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3195 value
= fields
->f_dst32_rn_ext_unprefixed
;
3197 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3198 value
= fields
->f_dst32_rn_prefixed_HI
;
3200 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3201 value
= fields
->f_dst32_rn_prefixed_QI
;
3203 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3204 value
= fields
->f_dst32_rn_prefixed_SI
;
3206 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3207 value
= fields
->f_dst32_rn_unprefixed_HI
;
3209 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3210 value
= fields
->f_dst32_rn_unprefixed_QI
;
3212 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3213 value
= fields
->f_dst32_rn_unprefixed_SI
;
3215 case M32C_OPERAND_G
:
3218 case M32C_OPERAND_IMM_12_S4
:
3219 value
= fields
->f_imm_12_s4
;
3221 case M32C_OPERAND_IMM_12_S4N
:
3222 value
= fields
->f_imm_12_s4
;
3224 case M32C_OPERAND_IMM_13_U3
:
3225 value
= fields
->f_imm_13_u3
;
3227 case M32C_OPERAND_IMM_16_HI
:
3228 value
= fields
->f_dsp_16_s16
;
3230 case M32C_OPERAND_IMM_16_QI
:
3231 value
= fields
->f_dsp_16_s8
;
3233 case M32C_OPERAND_IMM_16_SI
:
3234 value
= fields
->f_dsp_16_s32
;
3236 case M32C_OPERAND_IMM_20_S4
:
3237 value
= fields
->f_imm_20_s4
;
3239 case M32C_OPERAND_IMM_24_HI
:
3240 value
= fields
->f_dsp_24_s16
;
3242 case M32C_OPERAND_IMM_24_QI
:
3243 value
= fields
->f_dsp_24_s8
;
3245 case M32C_OPERAND_IMM_24_SI
:
3246 value
= fields
->f_dsp_24_s32
;
3248 case M32C_OPERAND_IMM_32_HI
:
3249 value
= fields
->f_dsp_32_s16
;
3251 case M32C_OPERAND_IMM_32_QI
:
3252 value
= fields
->f_dsp_32_s8
;
3254 case M32C_OPERAND_IMM_32_SI
:
3255 value
= fields
->f_dsp_32_s32
;
3257 case M32C_OPERAND_IMM_40_HI
:
3258 value
= fields
->f_dsp_40_s16
;
3260 case M32C_OPERAND_IMM_40_QI
:
3261 value
= fields
->f_dsp_40_s8
;
3263 case M32C_OPERAND_IMM_40_SI
:
3264 value
= fields
->f_dsp_40_s32
;
3266 case M32C_OPERAND_IMM_48_HI
:
3267 value
= fields
->f_dsp_48_s16
;
3269 case M32C_OPERAND_IMM_48_QI
:
3270 value
= fields
->f_dsp_48_s8
;
3272 case M32C_OPERAND_IMM_48_SI
:
3273 value
= fields
->f_dsp_48_s32
;
3275 case M32C_OPERAND_IMM_56_HI
:
3276 value
= fields
->f_dsp_56_s16
;
3278 case M32C_OPERAND_IMM_56_QI
:
3279 value
= fields
->f_dsp_56_s8
;
3281 case M32C_OPERAND_IMM_64_HI
:
3282 value
= fields
->f_dsp_64_s16
;
3284 case M32C_OPERAND_IMM_8_HI
:
3285 value
= fields
->f_dsp_8_s16
;
3287 case M32C_OPERAND_IMM_8_QI
:
3288 value
= fields
->f_dsp_8_s8
;
3290 case M32C_OPERAND_IMM_8_S4
:
3291 value
= fields
->f_imm_8_s4
;
3293 case M32C_OPERAND_IMM_8_S4N
:
3294 value
= fields
->f_imm_8_s4
;
3296 case M32C_OPERAND_IMM_SH_12_S4
:
3297 value
= fields
->f_imm_12_s4
;
3299 case M32C_OPERAND_IMM_SH_20_S4
:
3300 value
= fields
->f_imm_20_s4
;
3302 case M32C_OPERAND_IMM_SH_8_S4
:
3303 value
= fields
->f_imm_8_s4
;
3305 case M32C_OPERAND_IMM1_S
:
3306 value
= fields
->f_imm1_S
;
3308 case M32C_OPERAND_IMM3_S
:
3309 value
= fields
->f_imm3_S
;
3311 case M32C_OPERAND_LAB_16_8
:
3312 value
= fields
->f_lab_16_8
;
3314 case M32C_OPERAND_LAB_24_8
:
3315 value
= fields
->f_lab_24_8
;
3317 case M32C_OPERAND_LAB_32_8
:
3318 value
= fields
->f_lab_32_8
;
3320 case M32C_OPERAND_LAB_40_8
:
3321 value
= fields
->f_lab_40_8
;
3323 case M32C_OPERAND_LAB_5_3
:
3324 value
= fields
->f_lab_5_3
;
3326 case M32C_OPERAND_LAB_8_16
:
3327 value
= fields
->f_lab_8_16
;
3329 case M32C_OPERAND_LAB_8_24
:
3330 value
= fields
->f_lab_8_24
;
3332 case M32C_OPERAND_LAB_8_8
:
3333 value
= fields
->f_lab_8_8
;
3335 case M32C_OPERAND_LAB32_JMP_S
:
3336 value
= fields
->f_lab32_jmp_s
;
3338 case M32C_OPERAND_Q
:
3341 case M32C_OPERAND_R0
:
3344 case M32C_OPERAND_R0H
:
3347 case M32C_OPERAND_R0L
:
3350 case M32C_OPERAND_R1
:
3353 case M32C_OPERAND_R1R2R0
:
3356 case M32C_OPERAND_R2
:
3359 case M32C_OPERAND_R2R0
:
3362 case M32C_OPERAND_R3
:
3365 case M32C_OPERAND_R3R1
:
3368 case M32C_OPERAND_REGSETPOP
:
3369 value
= fields
->f_8_8
;
3371 case M32C_OPERAND_REGSETPUSH
:
3372 value
= fields
->f_8_8
;
3374 case M32C_OPERAND_RN16_PUSH_S
:
3375 value
= fields
->f_4_1
;
3377 case M32C_OPERAND_S
:
3380 case M32C_OPERAND_SRC16AN
:
3381 value
= fields
->f_src16_an
;
3383 case M32C_OPERAND_SRC16ANHI
:
3384 value
= fields
->f_src16_an
;
3386 case M32C_OPERAND_SRC16ANQI
:
3387 value
= fields
->f_src16_an
;
3389 case M32C_OPERAND_SRC16RNHI
:
3390 value
= fields
->f_src16_rn
;
3392 case M32C_OPERAND_SRC16RNQI
:
3393 value
= fields
->f_src16_rn
;
3395 case M32C_OPERAND_SRC32ANPREFIXED
:
3396 value
= fields
->f_src32_an_prefixed
;
3398 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3399 value
= fields
->f_src32_an_prefixed
;
3401 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3402 value
= fields
->f_src32_an_prefixed
;
3404 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3405 value
= fields
->f_src32_an_prefixed
;
3407 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3408 value
= fields
->f_src32_an_unprefixed
;
3410 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3411 value
= fields
->f_src32_an_unprefixed
;
3413 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3414 value
= fields
->f_src32_an_unprefixed
;
3416 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3417 value
= fields
->f_src32_an_unprefixed
;
3419 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3420 value
= fields
->f_src32_rn_prefixed_HI
;
3422 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3423 value
= fields
->f_src32_rn_prefixed_QI
;
3425 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3426 value
= fields
->f_src32_rn_prefixed_SI
;
3428 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3429 value
= fields
->f_src32_rn_unprefixed_HI
;
3431 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3432 value
= fields
->f_src32_rn_unprefixed_QI
;
3434 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3435 value
= fields
->f_src32_rn_unprefixed_SI
;
3437 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3438 value
= fields
->f_5_1
;
3440 case M32C_OPERAND_X
:
3443 case M32C_OPERAND_Z
:
3446 case M32C_OPERAND_COND16_16
:
3447 value
= fields
->f_dsp_16_u8
;
3449 case M32C_OPERAND_COND16_24
:
3450 value
= fields
->f_dsp_24_u8
;
3452 case M32C_OPERAND_COND16_32
:
3453 value
= fields
->f_dsp_32_u8
;
3455 case M32C_OPERAND_COND16C
:
3456 value
= fields
->f_cond16
;
3458 case M32C_OPERAND_COND16J
:
3459 value
= fields
->f_cond16
;
3461 case M32C_OPERAND_COND16J5
:
3462 value
= fields
->f_cond16j_5
;
3464 case M32C_OPERAND_COND32
:
3465 value
= fields
->f_cond32
;
3467 case M32C_OPERAND_COND32_16
:
3468 value
= fields
->f_dsp_16_u8
;
3470 case M32C_OPERAND_COND32_24
:
3471 value
= fields
->f_dsp_24_u8
;
3473 case M32C_OPERAND_COND32_32
:
3474 value
= fields
->f_dsp_32_u8
;
3476 case M32C_OPERAND_COND32_40
:
3477 value
= fields
->f_dsp_40_u8
;
3479 case M32C_OPERAND_COND32J
:
3480 value
= fields
->f_cond32j
;
3482 case M32C_OPERAND_CR1_PREFIXED_32
:
3483 value
= fields
->f_21_3
;
3485 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3486 value
= fields
->f_13_3
;
3488 case M32C_OPERAND_CR16
:
3489 value
= fields
->f_9_3
;
3491 case M32C_OPERAND_CR2_32
:
3492 value
= fields
->f_13_3
;
3494 case M32C_OPERAND_CR3_PREFIXED_32
:
3495 value
= fields
->f_21_3
;
3497 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3498 value
= fields
->f_13_3
;
3500 case M32C_OPERAND_FLAGS16
:
3501 value
= fields
->f_9_3
;
3503 case M32C_OPERAND_FLAGS32
:
3504 value
= fields
->f_13_3
;
3506 case M32C_OPERAND_SCCOND32
:
3507 value
= fields
->f_cond16
;
3509 case M32C_OPERAND_SIZE
:
3514 /* xgettext:c-format */
3515 opcodes_error_handler
3516 (_("internal error: unrecognized field %d while getting int operand"),
3525 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3527 const CGEN_FIELDS
* fields
)
3533 case M32C_OPERAND_A0
:
3536 case M32C_OPERAND_A1
:
3539 case M32C_OPERAND_AN16_PUSH_S
:
3540 value
= fields
->f_4_1
;
3542 case M32C_OPERAND_BIT16AN
:
3543 value
= fields
->f_dst16_an
;
3545 case M32C_OPERAND_BIT16RN
:
3546 value
= fields
->f_dst16_rn
;
3548 case M32C_OPERAND_BIT3_S
:
3549 value
= fields
->f_imm3_S
;
3551 case M32C_OPERAND_BIT32ANPREFIXED
:
3552 value
= fields
->f_dst32_an_prefixed
;
3554 case M32C_OPERAND_BIT32ANUNPREFIXED
:
3555 value
= fields
->f_dst32_an_unprefixed
;
3557 case M32C_OPERAND_BIT32RNPREFIXED
:
3558 value
= fields
->f_dst32_rn_prefixed_QI
;
3560 case M32C_OPERAND_BIT32RNUNPREFIXED
:
3561 value
= fields
->f_dst32_rn_unprefixed_QI
;
3563 case M32C_OPERAND_BITBASE16_16_S8
:
3564 value
= fields
->f_dsp_16_s8
;
3566 case M32C_OPERAND_BITBASE16_16_U16
:
3567 value
= fields
->f_dsp_16_u16
;
3569 case M32C_OPERAND_BITBASE16_16_U8
:
3570 value
= fields
->f_dsp_16_u8
;
3572 case M32C_OPERAND_BITBASE16_8_U11_S
:
3573 value
= fields
->f_bitbase16_u11_S
;
3575 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
3576 value
= fields
->f_bitbase32_16_s11_unprefixed
;
3578 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
3579 value
= fields
->f_bitbase32_16_s19_unprefixed
;
3581 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
3582 value
= fields
->f_bitbase32_16_u11_unprefixed
;
3584 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
3585 value
= fields
->f_bitbase32_16_u19_unprefixed
;
3587 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
3588 value
= fields
->f_bitbase32_16_u27_unprefixed
;
3590 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
3591 value
= fields
->f_bitbase32_24_s11_prefixed
;
3593 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
3594 value
= fields
->f_bitbase32_24_s19_prefixed
;
3596 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
3597 value
= fields
->f_bitbase32_24_u11_prefixed
;
3599 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3600 value
= fields
->f_bitbase32_24_u19_prefixed
;
3602 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3603 value
= fields
->f_bitbase32_24_u27_prefixed
;
3605 case M32C_OPERAND_BITNO16R
:
3606 value
= fields
->f_dsp_16_u8
;
3608 case M32C_OPERAND_BITNO32PREFIXED
:
3609 value
= fields
->f_bitno32_prefixed
;
3611 case M32C_OPERAND_BITNO32UNPREFIXED
:
3612 value
= fields
->f_bitno32_unprefixed
;
3614 case M32C_OPERAND_DSP_10_U6
:
3615 value
= fields
->f_dsp_10_u6
;
3617 case M32C_OPERAND_DSP_16_S16
:
3618 value
= fields
->f_dsp_16_s16
;
3620 case M32C_OPERAND_DSP_16_S8
:
3621 value
= fields
->f_dsp_16_s8
;
3623 case M32C_OPERAND_DSP_16_U16
:
3624 value
= fields
->f_dsp_16_u16
;
3626 case M32C_OPERAND_DSP_16_U20
:
3627 value
= fields
->f_dsp_16_u24
;
3629 case M32C_OPERAND_DSP_16_U24
:
3630 value
= fields
->f_dsp_16_u24
;
3632 case M32C_OPERAND_DSP_16_U8
:
3633 value
= fields
->f_dsp_16_u8
;
3635 case M32C_OPERAND_DSP_24_S16
:
3636 value
= fields
->f_dsp_24_s16
;
3638 case M32C_OPERAND_DSP_24_S8
:
3639 value
= fields
->f_dsp_24_s8
;
3641 case M32C_OPERAND_DSP_24_U16
:
3642 value
= fields
->f_dsp_24_u16
;
3644 case M32C_OPERAND_DSP_24_U20
:
3645 value
= fields
->f_dsp_24_u24
;
3647 case M32C_OPERAND_DSP_24_U24
:
3648 value
= fields
->f_dsp_24_u24
;
3650 case M32C_OPERAND_DSP_24_U8
:
3651 value
= fields
->f_dsp_24_u8
;
3653 case M32C_OPERAND_DSP_32_S16
:
3654 value
= fields
->f_dsp_32_s16
;
3656 case M32C_OPERAND_DSP_32_S8
:
3657 value
= fields
->f_dsp_32_s8
;
3659 case M32C_OPERAND_DSP_32_U16
:
3660 value
= fields
->f_dsp_32_u16
;
3662 case M32C_OPERAND_DSP_32_U20
:
3663 value
= fields
->f_dsp_32_u24
;
3665 case M32C_OPERAND_DSP_32_U24
:
3666 value
= fields
->f_dsp_32_u24
;
3668 case M32C_OPERAND_DSP_32_U8
:
3669 value
= fields
->f_dsp_32_u8
;
3671 case M32C_OPERAND_DSP_40_S16
:
3672 value
= fields
->f_dsp_40_s16
;
3674 case M32C_OPERAND_DSP_40_S8
:
3675 value
= fields
->f_dsp_40_s8
;
3677 case M32C_OPERAND_DSP_40_U16
:
3678 value
= fields
->f_dsp_40_u16
;
3680 case M32C_OPERAND_DSP_40_U20
:
3681 value
= fields
->f_dsp_40_u20
;
3683 case M32C_OPERAND_DSP_40_U24
:
3684 value
= fields
->f_dsp_40_u24
;
3686 case M32C_OPERAND_DSP_40_U8
:
3687 value
= fields
->f_dsp_40_u8
;
3689 case M32C_OPERAND_DSP_48_S16
:
3690 value
= fields
->f_dsp_48_s16
;
3692 case M32C_OPERAND_DSP_48_S8
:
3693 value
= fields
->f_dsp_48_s8
;
3695 case M32C_OPERAND_DSP_48_U16
:
3696 value
= fields
->f_dsp_48_u16
;
3698 case M32C_OPERAND_DSP_48_U20
:
3699 value
= fields
->f_dsp_48_u20
;
3701 case M32C_OPERAND_DSP_48_U24
:
3702 value
= fields
->f_dsp_48_u24
;
3704 case M32C_OPERAND_DSP_48_U8
:
3705 value
= fields
->f_dsp_48_u8
;
3707 case M32C_OPERAND_DSP_8_S24
:
3708 value
= fields
->f_dsp_8_s24
;
3710 case M32C_OPERAND_DSP_8_S8
:
3711 value
= fields
->f_dsp_8_s8
;
3713 case M32C_OPERAND_DSP_8_U16
:
3714 value
= fields
->f_dsp_8_u16
;
3716 case M32C_OPERAND_DSP_8_U24
:
3717 value
= fields
->f_dsp_8_u24
;
3719 case M32C_OPERAND_DSP_8_U6
:
3720 value
= fields
->f_dsp_8_u6
;
3722 case M32C_OPERAND_DSP_8_U8
:
3723 value
= fields
->f_dsp_8_u8
;
3725 case M32C_OPERAND_DST16AN
:
3726 value
= fields
->f_dst16_an
;
3728 case M32C_OPERAND_DST16AN_S
:
3729 value
= fields
->f_dst16_an_s
;
3731 case M32C_OPERAND_DST16ANHI
:
3732 value
= fields
->f_dst16_an
;
3734 case M32C_OPERAND_DST16ANQI
:
3735 value
= fields
->f_dst16_an
;
3737 case M32C_OPERAND_DST16ANQI_S
:
3738 value
= fields
->f_dst16_rn_QI_s
;
3740 case M32C_OPERAND_DST16ANSI
:
3741 value
= fields
->f_dst16_an
;
3743 case M32C_OPERAND_DST16RNEXTQI
:
3744 value
= fields
->f_dst16_rn_ext
;
3746 case M32C_OPERAND_DST16RNHI
:
3747 value
= fields
->f_dst16_rn
;
3749 case M32C_OPERAND_DST16RNQI
:
3750 value
= fields
->f_dst16_rn
;
3752 case M32C_OPERAND_DST16RNQI_S
:
3753 value
= fields
->f_dst16_rn_QI_s
;
3755 case M32C_OPERAND_DST16RNSI
:
3756 value
= fields
->f_dst16_rn
;
3758 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3759 value
= fields
->f_dst32_an_unprefixed
;
3761 case M32C_OPERAND_DST32ANPREFIXED
:
3762 value
= fields
->f_dst32_an_prefixed
;
3764 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3765 value
= fields
->f_dst32_an_prefixed
;
3767 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3768 value
= fields
->f_dst32_an_prefixed
;
3770 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3771 value
= fields
->f_dst32_an_prefixed
;
3773 case M32C_OPERAND_DST32ANUNPREFIXED
:
3774 value
= fields
->f_dst32_an_unprefixed
;
3776 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3777 value
= fields
->f_dst32_an_unprefixed
;
3779 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3780 value
= fields
->f_dst32_an_unprefixed
;
3782 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3783 value
= fields
->f_dst32_an_unprefixed
;
3785 case M32C_OPERAND_DST32R0HI_S
:
3788 case M32C_OPERAND_DST32R0QI_S
:
3791 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3792 value
= fields
->f_dst32_rn_ext_unprefixed
;
3794 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3795 value
= fields
->f_dst32_rn_ext_unprefixed
;
3797 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3798 value
= fields
->f_dst32_rn_prefixed_HI
;
3800 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3801 value
= fields
->f_dst32_rn_prefixed_QI
;
3803 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3804 value
= fields
->f_dst32_rn_prefixed_SI
;
3806 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3807 value
= fields
->f_dst32_rn_unprefixed_HI
;
3809 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3810 value
= fields
->f_dst32_rn_unprefixed_QI
;
3812 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3813 value
= fields
->f_dst32_rn_unprefixed_SI
;
3815 case M32C_OPERAND_G
:
3818 case M32C_OPERAND_IMM_12_S4
:
3819 value
= fields
->f_imm_12_s4
;
3821 case M32C_OPERAND_IMM_12_S4N
:
3822 value
= fields
->f_imm_12_s4
;
3824 case M32C_OPERAND_IMM_13_U3
:
3825 value
= fields
->f_imm_13_u3
;
3827 case M32C_OPERAND_IMM_16_HI
:
3828 value
= fields
->f_dsp_16_s16
;
3830 case M32C_OPERAND_IMM_16_QI
:
3831 value
= fields
->f_dsp_16_s8
;
3833 case M32C_OPERAND_IMM_16_SI
:
3834 value
= fields
->f_dsp_16_s32
;
3836 case M32C_OPERAND_IMM_20_S4
:
3837 value
= fields
->f_imm_20_s4
;
3839 case M32C_OPERAND_IMM_24_HI
:
3840 value
= fields
->f_dsp_24_s16
;
3842 case M32C_OPERAND_IMM_24_QI
:
3843 value
= fields
->f_dsp_24_s8
;
3845 case M32C_OPERAND_IMM_24_SI
:
3846 value
= fields
->f_dsp_24_s32
;
3848 case M32C_OPERAND_IMM_32_HI
:
3849 value
= fields
->f_dsp_32_s16
;
3851 case M32C_OPERAND_IMM_32_QI
:
3852 value
= fields
->f_dsp_32_s8
;
3854 case M32C_OPERAND_IMM_32_SI
:
3855 value
= fields
->f_dsp_32_s32
;
3857 case M32C_OPERAND_IMM_40_HI
:
3858 value
= fields
->f_dsp_40_s16
;
3860 case M32C_OPERAND_IMM_40_QI
:
3861 value
= fields
->f_dsp_40_s8
;
3863 case M32C_OPERAND_IMM_40_SI
:
3864 value
= fields
->f_dsp_40_s32
;
3866 case M32C_OPERAND_IMM_48_HI
:
3867 value
= fields
->f_dsp_48_s16
;
3869 case M32C_OPERAND_IMM_48_QI
:
3870 value
= fields
->f_dsp_48_s8
;
3872 case M32C_OPERAND_IMM_48_SI
:
3873 value
= fields
->f_dsp_48_s32
;
3875 case M32C_OPERAND_IMM_56_HI
:
3876 value
= fields
->f_dsp_56_s16
;
3878 case M32C_OPERAND_IMM_56_QI
:
3879 value
= fields
->f_dsp_56_s8
;
3881 case M32C_OPERAND_IMM_64_HI
:
3882 value
= fields
->f_dsp_64_s16
;
3884 case M32C_OPERAND_IMM_8_HI
:
3885 value
= fields
->f_dsp_8_s16
;
3887 case M32C_OPERAND_IMM_8_QI
:
3888 value
= fields
->f_dsp_8_s8
;
3890 case M32C_OPERAND_IMM_8_S4
:
3891 value
= fields
->f_imm_8_s4
;
3893 case M32C_OPERAND_IMM_8_S4N
:
3894 value
= fields
->f_imm_8_s4
;
3896 case M32C_OPERAND_IMM_SH_12_S4
:
3897 value
= fields
->f_imm_12_s4
;
3899 case M32C_OPERAND_IMM_SH_20_S4
:
3900 value
= fields
->f_imm_20_s4
;
3902 case M32C_OPERAND_IMM_SH_8_S4
:
3903 value
= fields
->f_imm_8_s4
;
3905 case M32C_OPERAND_IMM1_S
:
3906 value
= fields
->f_imm1_S
;
3908 case M32C_OPERAND_IMM3_S
:
3909 value
= fields
->f_imm3_S
;
3911 case M32C_OPERAND_LAB_16_8
:
3912 value
= fields
->f_lab_16_8
;
3914 case M32C_OPERAND_LAB_24_8
:
3915 value
= fields
->f_lab_24_8
;
3917 case M32C_OPERAND_LAB_32_8
:
3918 value
= fields
->f_lab_32_8
;
3920 case M32C_OPERAND_LAB_40_8
:
3921 value
= fields
->f_lab_40_8
;
3923 case M32C_OPERAND_LAB_5_3
:
3924 value
= fields
->f_lab_5_3
;
3926 case M32C_OPERAND_LAB_8_16
:
3927 value
= fields
->f_lab_8_16
;
3929 case M32C_OPERAND_LAB_8_24
:
3930 value
= fields
->f_lab_8_24
;
3932 case M32C_OPERAND_LAB_8_8
:
3933 value
= fields
->f_lab_8_8
;
3935 case M32C_OPERAND_LAB32_JMP_S
:
3936 value
= fields
->f_lab32_jmp_s
;
3938 case M32C_OPERAND_Q
:
3941 case M32C_OPERAND_R0
:
3944 case M32C_OPERAND_R0H
:
3947 case M32C_OPERAND_R0L
:
3950 case M32C_OPERAND_R1
:
3953 case M32C_OPERAND_R1R2R0
:
3956 case M32C_OPERAND_R2
:
3959 case M32C_OPERAND_R2R0
:
3962 case M32C_OPERAND_R3
:
3965 case M32C_OPERAND_R3R1
:
3968 case M32C_OPERAND_REGSETPOP
:
3969 value
= fields
->f_8_8
;
3971 case M32C_OPERAND_REGSETPUSH
:
3972 value
= fields
->f_8_8
;
3974 case M32C_OPERAND_RN16_PUSH_S
:
3975 value
= fields
->f_4_1
;
3977 case M32C_OPERAND_S
:
3980 case M32C_OPERAND_SRC16AN
:
3981 value
= fields
->f_src16_an
;
3983 case M32C_OPERAND_SRC16ANHI
:
3984 value
= fields
->f_src16_an
;
3986 case M32C_OPERAND_SRC16ANQI
:
3987 value
= fields
->f_src16_an
;
3989 case M32C_OPERAND_SRC16RNHI
:
3990 value
= fields
->f_src16_rn
;
3992 case M32C_OPERAND_SRC16RNQI
:
3993 value
= fields
->f_src16_rn
;
3995 case M32C_OPERAND_SRC32ANPREFIXED
:
3996 value
= fields
->f_src32_an_prefixed
;
3998 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3999 value
= fields
->f_src32_an_prefixed
;
4001 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4002 value
= fields
->f_src32_an_prefixed
;
4004 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4005 value
= fields
->f_src32_an_prefixed
;
4007 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4008 value
= fields
->f_src32_an_unprefixed
;
4010 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4011 value
= fields
->f_src32_an_unprefixed
;
4013 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4014 value
= fields
->f_src32_an_unprefixed
;
4016 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4017 value
= fields
->f_src32_an_unprefixed
;
4019 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4020 value
= fields
->f_src32_rn_prefixed_HI
;
4022 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4023 value
= fields
->f_src32_rn_prefixed_QI
;
4025 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4026 value
= fields
->f_src32_rn_prefixed_SI
;
4028 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4029 value
= fields
->f_src32_rn_unprefixed_HI
;
4031 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4032 value
= fields
->f_src32_rn_unprefixed_QI
;
4034 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4035 value
= fields
->f_src32_rn_unprefixed_SI
;
4037 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4038 value
= fields
->f_5_1
;
4040 case M32C_OPERAND_X
:
4043 case M32C_OPERAND_Z
:
4046 case M32C_OPERAND_COND16_16
:
4047 value
= fields
->f_dsp_16_u8
;
4049 case M32C_OPERAND_COND16_24
:
4050 value
= fields
->f_dsp_24_u8
;
4052 case M32C_OPERAND_COND16_32
:
4053 value
= fields
->f_dsp_32_u8
;
4055 case M32C_OPERAND_COND16C
:
4056 value
= fields
->f_cond16
;
4058 case M32C_OPERAND_COND16J
:
4059 value
= fields
->f_cond16
;
4061 case M32C_OPERAND_COND16J5
:
4062 value
= fields
->f_cond16j_5
;
4064 case M32C_OPERAND_COND32
:
4065 value
= fields
->f_cond32
;
4067 case M32C_OPERAND_COND32_16
:
4068 value
= fields
->f_dsp_16_u8
;
4070 case M32C_OPERAND_COND32_24
:
4071 value
= fields
->f_dsp_24_u8
;
4073 case M32C_OPERAND_COND32_32
:
4074 value
= fields
->f_dsp_32_u8
;
4076 case M32C_OPERAND_COND32_40
:
4077 value
= fields
->f_dsp_40_u8
;
4079 case M32C_OPERAND_COND32J
:
4080 value
= fields
->f_cond32j
;
4082 case M32C_OPERAND_CR1_PREFIXED_32
:
4083 value
= fields
->f_21_3
;
4085 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4086 value
= fields
->f_13_3
;
4088 case M32C_OPERAND_CR16
:
4089 value
= fields
->f_9_3
;
4091 case M32C_OPERAND_CR2_32
:
4092 value
= fields
->f_13_3
;
4094 case M32C_OPERAND_CR3_PREFIXED_32
:
4095 value
= fields
->f_21_3
;
4097 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4098 value
= fields
->f_13_3
;
4100 case M32C_OPERAND_FLAGS16
:
4101 value
= fields
->f_9_3
;
4103 case M32C_OPERAND_FLAGS32
:
4104 value
= fields
->f_13_3
;
4106 case M32C_OPERAND_SCCOND32
:
4107 value
= fields
->f_cond16
;
4109 case M32C_OPERAND_SIZE
:
4114 /* xgettext:c-format */
4115 opcodes_error_handler
4116 (_("internal error: unrecognized field %d while getting vma operand"),
4124 void m32c_cgen_set_int_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, int);
4125 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, bfd_vma
);
4127 /* Stuffing values in cgen_fields is handled by a collection of functions.
4128 They are distinguished by the type of the VALUE argument they accept.
4129 TODO: floating point, inlining support, remove cases where argument type
4133 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4135 CGEN_FIELDS
* fields
,
4140 case M32C_OPERAND_A0
:
4142 case M32C_OPERAND_A1
:
4144 case M32C_OPERAND_AN16_PUSH_S
:
4145 fields
->f_4_1
= value
;
4147 case M32C_OPERAND_BIT16AN
:
4148 fields
->f_dst16_an
= value
;
4150 case M32C_OPERAND_BIT16RN
:
4151 fields
->f_dst16_rn
= value
;
4153 case M32C_OPERAND_BIT3_S
:
4154 fields
->f_imm3_S
= value
;
4156 case M32C_OPERAND_BIT32ANPREFIXED
:
4157 fields
->f_dst32_an_prefixed
= value
;
4159 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4160 fields
->f_dst32_an_unprefixed
= value
;
4162 case M32C_OPERAND_BIT32RNPREFIXED
:
4163 fields
->f_dst32_rn_prefixed_QI
= value
;
4165 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4166 fields
->f_dst32_rn_unprefixed_QI
= value
;
4168 case M32C_OPERAND_BITBASE16_16_S8
:
4169 fields
->f_dsp_16_s8
= value
;
4171 case M32C_OPERAND_BITBASE16_16_U16
:
4172 fields
->f_dsp_16_u16
= value
;
4174 case M32C_OPERAND_BITBASE16_16_U8
:
4175 fields
->f_dsp_16_u8
= value
;
4177 case M32C_OPERAND_BITBASE16_8_U11_S
:
4178 fields
->f_bitbase16_u11_S
= value
;
4180 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4181 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4183 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4184 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4186 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4187 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4189 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4190 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4192 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4193 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4195 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4196 fields
->f_bitbase32_24_s11_prefixed
= value
;
4198 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4199 fields
->f_bitbase32_24_s19_prefixed
= value
;
4201 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4202 fields
->f_bitbase32_24_u11_prefixed
= value
;
4204 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4205 fields
->f_bitbase32_24_u19_prefixed
= value
;
4207 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4208 fields
->f_bitbase32_24_u27_prefixed
= value
;
4210 case M32C_OPERAND_BITNO16R
:
4211 fields
->f_dsp_16_u8
= value
;
4213 case M32C_OPERAND_BITNO32PREFIXED
:
4214 fields
->f_bitno32_prefixed
= value
;
4216 case M32C_OPERAND_BITNO32UNPREFIXED
:
4217 fields
->f_bitno32_unprefixed
= value
;
4219 case M32C_OPERAND_DSP_10_U6
:
4220 fields
->f_dsp_10_u6
= value
;
4222 case M32C_OPERAND_DSP_16_S16
:
4223 fields
->f_dsp_16_s16
= value
;
4225 case M32C_OPERAND_DSP_16_S8
:
4226 fields
->f_dsp_16_s8
= value
;
4228 case M32C_OPERAND_DSP_16_U16
:
4229 fields
->f_dsp_16_u16
= value
;
4231 case M32C_OPERAND_DSP_16_U20
:
4232 fields
->f_dsp_16_u24
= value
;
4234 case M32C_OPERAND_DSP_16_U24
:
4235 fields
->f_dsp_16_u24
= value
;
4237 case M32C_OPERAND_DSP_16_U8
:
4238 fields
->f_dsp_16_u8
= value
;
4240 case M32C_OPERAND_DSP_24_S16
:
4241 fields
->f_dsp_24_s16
= value
;
4243 case M32C_OPERAND_DSP_24_S8
:
4244 fields
->f_dsp_24_s8
= value
;
4246 case M32C_OPERAND_DSP_24_U16
:
4247 fields
->f_dsp_24_u16
= value
;
4249 case M32C_OPERAND_DSP_24_U20
:
4250 fields
->f_dsp_24_u24
= value
;
4252 case M32C_OPERAND_DSP_24_U24
:
4253 fields
->f_dsp_24_u24
= value
;
4255 case M32C_OPERAND_DSP_24_U8
:
4256 fields
->f_dsp_24_u8
= value
;
4258 case M32C_OPERAND_DSP_32_S16
:
4259 fields
->f_dsp_32_s16
= value
;
4261 case M32C_OPERAND_DSP_32_S8
:
4262 fields
->f_dsp_32_s8
= value
;
4264 case M32C_OPERAND_DSP_32_U16
:
4265 fields
->f_dsp_32_u16
= value
;
4267 case M32C_OPERAND_DSP_32_U20
:
4268 fields
->f_dsp_32_u24
= value
;
4270 case M32C_OPERAND_DSP_32_U24
:
4271 fields
->f_dsp_32_u24
= value
;
4273 case M32C_OPERAND_DSP_32_U8
:
4274 fields
->f_dsp_32_u8
= value
;
4276 case M32C_OPERAND_DSP_40_S16
:
4277 fields
->f_dsp_40_s16
= value
;
4279 case M32C_OPERAND_DSP_40_S8
:
4280 fields
->f_dsp_40_s8
= value
;
4282 case M32C_OPERAND_DSP_40_U16
:
4283 fields
->f_dsp_40_u16
= value
;
4285 case M32C_OPERAND_DSP_40_U20
:
4286 fields
->f_dsp_40_u20
= value
;
4288 case M32C_OPERAND_DSP_40_U24
:
4289 fields
->f_dsp_40_u24
= value
;
4291 case M32C_OPERAND_DSP_40_U8
:
4292 fields
->f_dsp_40_u8
= value
;
4294 case M32C_OPERAND_DSP_48_S16
:
4295 fields
->f_dsp_48_s16
= value
;
4297 case M32C_OPERAND_DSP_48_S8
:
4298 fields
->f_dsp_48_s8
= value
;
4300 case M32C_OPERAND_DSP_48_U16
:
4301 fields
->f_dsp_48_u16
= value
;
4303 case M32C_OPERAND_DSP_48_U20
:
4304 fields
->f_dsp_48_u20
= value
;
4306 case M32C_OPERAND_DSP_48_U24
:
4307 fields
->f_dsp_48_u24
= value
;
4309 case M32C_OPERAND_DSP_48_U8
:
4310 fields
->f_dsp_48_u8
= value
;
4312 case M32C_OPERAND_DSP_8_S24
:
4313 fields
->f_dsp_8_s24
= value
;
4315 case M32C_OPERAND_DSP_8_S8
:
4316 fields
->f_dsp_8_s8
= value
;
4318 case M32C_OPERAND_DSP_8_U16
:
4319 fields
->f_dsp_8_u16
= value
;
4321 case M32C_OPERAND_DSP_8_U24
:
4322 fields
->f_dsp_8_u24
= value
;
4324 case M32C_OPERAND_DSP_8_U6
:
4325 fields
->f_dsp_8_u6
= value
;
4327 case M32C_OPERAND_DSP_8_U8
:
4328 fields
->f_dsp_8_u8
= value
;
4330 case M32C_OPERAND_DST16AN
:
4331 fields
->f_dst16_an
= value
;
4333 case M32C_OPERAND_DST16AN_S
:
4334 fields
->f_dst16_an_s
= value
;
4336 case M32C_OPERAND_DST16ANHI
:
4337 fields
->f_dst16_an
= value
;
4339 case M32C_OPERAND_DST16ANQI
:
4340 fields
->f_dst16_an
= value
;
4342 case M32C_OPERAND_DST16ANQI_S
:
4343 fields
->f_dst16_rn_QI_s
= value
;
4345 case M32C_OPERAND_DST16ANSI
:
4346 fields
->f_dst16_an
= value
;
4348 case M32C_OPERAND_DST16RNEXTQI
:
4349 fields
->f_dst16_rn_ext
= value
;
4351 case M32C_OPERAND_DST16RNHI
:
4352 fields
->f_dst16_rn
= value
;
4354 case M32C_OPERAND_DST16RNQI
:
4355 fields
->f_dst16_rn
= value
;
4357 case M32C_OPERAND_DST16RNQI_S
:
4358 fields
->f_dst16_rn_QI_s
= value
;
4360 case M32C_OPERAND_DST16RNSI
:
4361 fields
->f_dst16_rn
= value
;
4363 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4364 fields
->f_dst32_an_unprefixed
= value
;
4366 case M32C_OPERAND_DST32ANPREFIXED
:
4367 fields
->f_dst32_an_prefixed
= value
;
4369 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4370 fields
->f_dst32_an_prefixed
= value
;
4372 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4373 fields
->f_dst32_an_prefixed
= value
;
4375 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4376 fields
->f_dst32_an_prefixed
= value
;
4378 case M32C_OPERAND_DST32ANUNPREFIXED
:
4379 fields
->f_dst32_an_unprefixed
= value
;
4381 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4382 fields
->f_dst32_an_unprefixed
= value
;
4384 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4385 fields
->f_dst32_an_unprefixed
= value
;
4387 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4388 fields
->f_dst32_an_unprefixed
= value
;
4390 case M32C_OPERAND_DST32R0HI_S
:
4392 case M32C_OPERAND_DST32R0QI_S
:
4394 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4395 fields
->f_dst32_rn_ext_unprefixed
= value
;
4397 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4398 fields
->f_dst32_rn_ext_unprefixed
= value
;
4400 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4401 fields
->f_dst32_rn_prefixed_HI
= value
;
4403 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4404 fields
->f_dst32_rn_prefixed_QI
= value
;
4406 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4407 fields
->f_dst32_rn_prefixed_SI
= value
;
4409 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4410 fields
->f_dst32_rn_unprefixed_HI
= value
;
4412 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4413 fields
->f_dst32_rn_unprefixed_QI
= value
;
4415 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4416 fields
->f_dst32_rn_unprefixed_SI
= value
;
4418 case M32C_OPERAND_G
:
4420 case M32C_OPERAND_IMM_12_S4
:
4421 fields
->f_imm_12_s4
= value
;
4423 case M32C_OPERAND_IMM_12_S4N
:
4424 fields
->f_imm_12_s4
= value
;
4426 case M32C_OPERAND_IMM_13_U3
:
4427 fields
->f_imm_13_u3
= value
;
4429 case M32C_OPERAND_IMM_16_HI
:
4430 fields
->f_dsp_16_s16
= value
;
4432 case M32C_OPERAND_IMM_16_QI
:
4433 fields
->f_dsp_16_s8
= value
;
4435 case M32C_OPERAND_IMM_16_SI
:
4436 fields
->f_dsp_16_s32
= value
;
4438 case M32C_OPERAND_IMM_20_S4
:
4439 fields
->f_imm_20_s4
= value
;
4441 case M32C_OPERAND_IMM_24_HI
:
4442 fields
->f_dsp_24_s16
= value
;
4444 case M32C_OPERAND_IMM_24_QI
:
4445 fields
->f_dsp_24_s8
= value
;
4447 case M32C_OPERAND_IMM_24_SI
:
4448 fields
->f_dsp_24_s32
= value
;
4450 case M32C_OPERAND_IMM_32_HI
:
4451 fields
->f_dsp_32_s16
= value
;
4453 case M32C_OPERAND_IMM_32_QI
:
4454 fields
->f_dsp_32_s8
= value
;
4456 case M32C_OPERAND_IMM_32_SI
:
4457 fields
->f_dsp_32_s32
= value
;
4459 case M32C_OPERAND_IMM_40_HI
:
4460 fields
->f_dsp_40_s16
= value
;
4462 case M32C_OPERAND_IMM_40_QI
:
4463 fields
->f_dsp_40_s8
= value
;
4465 case M32C_OPERAND_IMM_40_SI
:
4466 fields
->f_dsp_40_s32
= value
;
4468 case M32C_OPERAND_IMM_48_HI
:
4469 fields
->f_dsp_48_s16
= value
;
4471 case M32C_OPERAND_IMM_48_QI
:
4472 fields
->f_dsp_48_s8
= value
;
4474 case M32C_OPERAND_IMM_48_SI
:
4475 fields
->f_dsp_48_s32
= value
;
4477 case M32C_OPERAND_IMM_56_HI
:
4478 fields
->f_dsp_56_s16
= value
;
4480 case M32C_OPERAND_IMM_56_QI
:
4481 fields
->f_dsp_56_s8
= value
;
4483 case M32C_OPERAND_IMM_64_HI
:
4484 fields
->f_dsp_64_s16
= value
;
4486 case M32C_OPERAND_IMM_8_HI
:
4487 fields
->f_dsp_8_s16
= value
;
4489 case M32C_OPERAND_IMM_8_QI
:
4490 fields
->f_dsp_8_s8
= value
;
4492 case M32C_OPERAND_IMM_8_S4
:
4493 fields
->f_imm_8_s4
= value
;
4495 case M32C_OPERAND_IMM_8_S4N
:
4496 fields
->f_imm_8_s4
= value
;
4498 case M32C_OPERAND_IMM_SH_12_S4
:
4499 fields
->f_imm_12_s4
= value
;
4501 case M32C_OPERAND_IMM_SH_20_S4
:
4502 fields
->f_imm_20_s4
= value
;
4504 case M32C_OPERAND_IMM_SH_8_S4
:
4505 fields
->f_imm_8_s4
= value
;
4507 case M32C_OPERAND_IMM1_S
:
4508 fields
->f_imm1_S
= value
;
4510 case M32C_OPERAND_IMM3_S
:
4511 fields
->f_imm3_S
= value
;
4513 case M32C_OPERAND_LAB_16_8
:
4514 fields
->f_lab_16_8
= value
;
4516 case M32C_OPERAND_LAB_24_8
:
4517 fields
->f_lab_24_8
= value
;
4519 case M32C_OPERAND_LAB_32_8
:
4520 fields
->f_lab_32_8
= value
;
4522 case M32C_OPERAND_LAB_40_8
:
4523 fields
->f_lab_40_8
= value
;
4525 case M32C_OPERAND_LAB_5_3
:
4526 fields
->f_lab_5_3
= value
;
4528 case M32C_OPERAND_LAB_8_16
:
4529 fields
->f_lab_8_16
= value
;
4531 case M32C_OPERAND_LAB_8_24
:
4532 fields
->f_lab_8_24
= value
;
4534 case M32C_OPERAND_LAB_8_8
:
4535 fields
->f_lab_8_8
= value
;
4537 case M32C_OPERAND_LAB32_JMP_S
:
4538 fields
->f_lab32_jmp_s
= value
;
4540 case M32C_OPERAND_Q
:
4542 case M32C_OPERAND_R0
:
4544 case M32C_OPERAND_R0H
:
4546 case M32C_OPERAND_R0L
:
4548 case M32C_OPERAND_R1
:
4550 case M32C_OPERAND_R1R2R0
:
4552 case M32C_OPERAND_R2
:
4554 case M32C_OPERAND_R2R0
:
4556 case M32C_OPERAND_R3
:
4558 case M32C_OPERAND_R3R1
:
4560 case M32C_OPERAND_REGSETPOP
:
4561 fields
->f_8_8
= value
;
4563 case M32C_OPERAND_REGSETPUSH
:
4564 fields
->f_8_8
= value
;
4566 case M32C_OPERAND_RN16_PUSH_S
:
4567 fields
->f_4_1
= value
;
4569 case M32C_OPERAND_S
:
4571 case M32C_OPERAND_SRC16AN
:
4572 fields
->f_src16_an
= value
;
4574 case M32C_OPERAND_SRC16ANHI
:
4575 fields
->f_src16_an
= value
;
4577 case M32C_OPERAND_SRC16ANQI
:
4578 fields
->f_src16_an
= value
;
4580 case M32C_OPERAND_SRC16RNHI
:
4581 fields
->f_src16_rn
= value
;
4583 case M32C_OPERAND_SRC16RNQI
:
4584 fields
->f_src16_rn
= value
;
4586 case M32C_OPERAND_SRC32ANPREFIXED
:
4587 fields
->f_src32_an_prefixed
= value
;
4589 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4590 fields
->f_src32_an_prefixed
= value
;
4592 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4593 fields
->f_src32_an_prefixed
= value
;
4595 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4596 fields
->f_src32_an_prefixed
= value
;
4598 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4599 fields
->f_src32_an_unprefixed
= value
;
4601 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4602 fields
->f_src32_an_unprefixed
= value
;
4604 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4605 fields
->f_src32_an_unprefixed
= value
;
4607 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4608 fields
->f_src32_an_unprefixed
= value
;
4610 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4611 fields
->f_src32_rn_prefixed_HI
= value
;
4613 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4614 fields
->f_src32_rn_prefixed_QI
= value
;
4616 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4617 fields
->f_src32_rn_prefixed_SI
= value
;
4619 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4620 fields
->f_src32_rn_unprefixed_HI
= value
;
4622 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4623 fields
->f_src32_rn_unprefixed_QI
= value
;
4625 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4626 fields
->f_src32_rn_unprefixed_SI
= value
;
4628 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4629 fields
->f_5_1
= value
;
4631 case M32C_OPERAND_X
:
4633 case M32C_OPERAND_Z
:
4635 case M32C_OPERAND_COND16_16
:
4636 fields
->f_dsp_16_u8
= value
;
4638 case M32C_OPERAND_COND16_24
:
4639 fields
->f_dsp_24_u8
= value
;
4641 case M32C_OPERAND_COND16_32
:
4642 fields
->f_dsp_32_u8
= value
;
4644 case M32C_OPERAND_COND16C
:
4645 fields
->f_cond16
= value
;
4647 case M32C_OPERAND_COND16J
:
4648 fields
->f_cond16
= value
;
4650 case M32C_OPERAND_COND16J5
:
4651 fields
->f_cond16j_5
= value
;
4653 case M32C_OPERAND_COND32
:
4654 fields
->f_cond32
= value
;
4656 case M32C_OPERAND_COND32_16
:
4657 fields
->f_dsp_16_u8
= value
;
4659 case M32C_OPERAND_COND32_24
:
4660 fields
->f_dsp_24_u8
= value
;
4662 case M32C_OPERAND_COND32_32
:
4663 fields
->f_dsp_32_u8
= value
;
4665 case M32C_OPERAND_COND32_40
:
4666 fields
->f_dsp_40_u8
= value
;
4668 case M32C_OPERAND_COND32J
:
4669 fields
->f_cond32j
= value
;
4671 case M32C_OPERAND_CR1_PREFIXED_32
:
4672 fields
->f_21_3
= value
;
4674 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4675 fields
->f_13_3
= value
;
4677 case M32C_OPERAND_CR16
:
4678 fields
->f_9_3
= value
;
4680 case M32C_OPERAND_CR2_32
:
4681 fields
->f_13_3
= value
;
4683 case M32C_OPERAND_CR3_PREFIXED_32
:
4684 fields
->f_21_3
= value
;
4686 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4687 fields
->f_13_3
= value
;
4689 case M32C_OPERAND_FLAGS16
:
4690 fields
->f_9_3
= value
;
4692 case M32C_OPERAND_FLAGS32
:
4693 fields
->f_13_3
= value
;
4695 case M32C_OPERAND_SCCOND32
:
4696 fields
->f_cond16
= value
;
4698 case M32C_OPERAND_SIZE
:
4702 /* xgettext:c-format */
4703 opcodes_error_handler
4704 (_("internal error: unrecognized field %d while setting int operand"),
4711 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4713 CGEN_FIELDS
* fields
,
4718 case M32C_OPERAND_A0
:
4720 case M32C_OPERAND_A1
:
4722 case M32C_OPERAND_AN16_PUSH_S
:
4723 fields
->f_4_1
= value
;
4725 case M32C_OPERAND_BIT16AN
:
4726 fields
->f_dst16_an
= value
;
4728 case M32C_OPERAND_BIT16RN
:
4729 fields
->f_dst16_rn
= value
;
4731 case M32C_OPERAND_BIT3_S
:
4732 fields
->f_imm3_S
= value
;
4734 case M32C_OPERAND_BIT32ANPREFIXED
:
4735 fields
->f_dst32_an_prefixed
= value
;
4737 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4738 fields
->f_dst32_an_unprefixed
= value
;
4740 case M32C_OPERAND_BIT32RNPREFIXED
:
4741 fields
->f_dst32_rn_prefixed_QI
= value
;
4743 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4744 fields
->f_dst32_rn_unprefixed_QI
= value
;
4746 case M32C_OPERAND_BITBASE16_16_S8
:
4747 fields
->f_dsp_16_s8
= value
;
4749 case M32C_OPERAND_BITBASE16_16_U16
:
4750 fields
->f_dsp_16_u16
= value
;
4752 case M32C_OPERAND_BITBASE16_16_U8
:
4753 fields
->f_dsp_16_u8
= value
;
4755 case M32C_OPERAND_BITBASE16_8_U11_S
:
4756 fields
->f_bitbase16_u11_S
= value
;
4758 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4759 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4761 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4762 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4764 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4765 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4767 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4768 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4770 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4771 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4773 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4774 fields
->f_bitbase32_24_s11_prefixed
= value
;
4776 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4777 fields
->f_bitbase32_24_s19_prefixed
= value
;
4779 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4780 fields
->f_bitbase32_24_u11_prefixed
= value
;
4782 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4783 fields
->f_bitbase32_24_u19_prefixed
= value
;
4785 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4786 fields
->f_bitbase32_24_u27_prefixed
= value
;
4788 case M32C_OPERAND_BITNO16R
:
4789 fields
->f_dsp_16_u8
= value
;
4791 case M32C_OPERAND_BITNO32PREFIXED
:
4792 fields
->f_bitno32_prefixed
= value
;
4794 case M32C_OPERAND_BITNO32UNPREFIXED
:
4795 fields
->f_bitno32_unprefixed
= value
;
4797 case M32C_OPERAND_DSP_10_U6
:
4798 fields
->f_dsp_10_u6
= value
;
4800 case M32C_OPERAND_DSP_16_S16
:
4801 fields
->f_dsp_16_s16
= value
;
4803 case M32C_OPERAND_DSP_16_S8
:
4804 fields
->f_dsp_16_s8
= value
;
4806 case M32C_OPERAND_DSP_16_U16
:
4807 fields
->f_dsp_16_u16
= value
;
4809 case M32C_OPERAND_DSP_16_U20
:
4810 fields
->f_dsp_16_u24
= value
;
4812 case M32C_OPERAND_DSP_16_U24
:
4813 fields
->f_dsp_16_u24
= value
;
4815 case M32C_OPERAND_DSP_16_U8
:
4816 fields
->f_dsp_16_u8
= value
;
4818 case M32C_OPERAND_DSP_24_S16
:
4819 fields
->f_dsp_24_s16
= value
;
4821 case M32C_OPERAND_DSP_24_S8
:
4822 fields
->f_dsp_24_s8
= value
;
4824 case M32C_OPERAND_DSP_24_U16
:
4825 fields
->f_dsp_24_u16
= value
;
4827 case M32C_OPERAND_DSP_24_U20
:
4828 fields
->f_dsp_24_u24
= value
;
4830 case M32C_OPERAND_DSP_24_U24
:
4831 fields
->f_dsp_24_u24
= value
;
4833 case M32C_OPERAND_DSP_24_U8
:
4834 fields
->f_dsp_24_u8
= value
;
4836 case M32C_OPERAND_DSP_32_S16
:
4837 fields
->f_dsp_32_s16
= value
;
4839 case M32C_OPERAND_DSP_32_S8
:
4840 fields
->f_dsp_32_s8
= value
;
4842 case M32C_OPERAND_DSP_32_U16
:
4843 fields
->f_dsp_32_u16
= value
;
4845 case M32C_OPERAND_DSP_32_U20
:
4846 fields
->f_dsp_32_u24
= value
;
4848 case M32C_OPERAND_DSP_32_U24
:
4849 fields
->f_dsp_32_u24
= value
;
4851 case M32C_OPERAND_DSP_32_U8
:
4852 fields
->f_dsp_32_u8
= value
;
4854 case M32C_OPERAND_DSP_40_S16
:
4855 fields
->f_dsp_40_s16
= value
;
4857 case M32C_OPERAND_DSP_40_S8
:
4858 fields
->f_dsp_40_s8
= value
;
4860 case M32C_OPERAND_DSP_40_U16
:
4861 fields
->f_dsp_40_u16
= value
;
4863 case M32C_OPERAND_DSP_40_U20
:
4864 fields
->f_dsp_40_u20
= value
;
4866 case M32C_OPERAND_DSP_40_U24
:
4867 fields
->f_dsp_40_u24
= value
;
4869 case M32C_OPERAND_DSP_40_U8
:
4870 fields
->f_dsp_40_u8
= value
;
4872 case M32C_OPERAND_DSP_48_S16
:
4873 fields
->f_dsp_48_s16
= value
;
4875 case M32C_OPERAND_DSP_48_S8
:
4876 fields
->f_dsp_48_s8
= value
;
4878 case M32C_OPERAND_DSP_48_U16
:
4879 fields
->f_dsp_48_u16
= value
;
4881 case M32C_OPERAND_DSP_48_U20
:
4882 fields
->f_dsp_48_u20
= value
;
4884 case M32C_OPERAND_DSP_48_U24
:
4885 fields
->f_dsp_48_u24
= value
;
4887 case M32C_OPERAND_DSP_48_U8
:
4888 fields
->f_dsp_48_u8
= value
;
4890 case M32C_OPERAND_DSP_8_S24
:
4891 fields
->f_dsp_8_s24
= value
;
4893 case M32C_OPERAND_DSP_8_S8
:
4894 fields
->f_dsp_8_s8
= value
;
4896 case M32C_OPERAND_DSP_8_U16
:
4897 fields
->f_dsp_8_u16
= value
;
4899 case M32C_OPERAND_DSP_8_U24
:
4900 fields
->f_dsp_8_u24
= value
;
4902 case M32C_OPERAND_DSP_8_U6
:
4903 fields
->f_dsp_8_u6
= value
;
4905 case M32C_OPERAND_DSP_8_U8
:
4906 fields
->f_dsp_8_u8
= value
;
4908 case M32C_OPERAND_DST16AN
:
4909 fields
->f_dst16_an
= value
;
4911 case M32C_OPERAND_DST16AN_S
:
4912 fields
->f_dst16_an_s
= value
;
4914 case M32C_OPERAND_DST16ANHI
:
4915 fields
->f_dst16_an
= value
;
4917 case M32C_OPERAND_DST16ANQI
:
4918 fields
->f_dst16_an
= value
;
4920 case M32C_OPERAND_DST16ANQI_S
:
4921 fields
->f_dst16_rn_QI_s
= value
;
4923 case M32C_OPERAND_DST16ANSI
:
4924 fields
->f_dst16_an
= value
;
4926 case M32C_OPERAND_DST16RNEXTQI
:
4927 fields
->f_dst16_rn_ext
= value
;
4929 case M32C_OPERAND_DST16RNHI
:
4930 fields
->f_dst16_rn
= value
;
4932 case M32C_OPERAND_DST16RNQI
:
4933 fields
->f_dst16_rn
= value
;
4935 case M32C_OPERAND_DST16RNQI_S
:
4936 fields
->f_dst16_rn_QI_s
= value
;
4938 case M32C_OPERAND_DST16RNSI
:
4939 fields
->f_dst16_rn
= value
;
4941 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4942 fields
->f_dst32_an_unprefixed
= value
;
4944 case M32C_OPERAND_DST32ANPREFIXED
:
4945 fields
->f_dst32_an_prefixed
= value
;
4947 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4948 fields
->f_dst32_an_prefixed
= value
;
4950 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4951 fields
->f_dst32_an_prefixed
= value
;
4953 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4954 fields
->f_dst32_an_prefixed
= value
;
4956 case M32C_OPERAND_DST32ANUNPREFIXED
:
4957 fields
->f_dst32_an_unprefixed
= value
;
4959 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4960 fields
->f_dst32_an_unprefixed
= value
;
4962 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4963 fields
->f_dst32_an_unprefixed
= value
;
4965 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4966 fields
->f_dst32_an_unprefixed
= value
;
4968 case M32C_OPERAND_DST32R0HI_S
:
4970 case M32C_OPERAND_DST32R0QI_S
:
4972 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4973 fields
->f_dst32_rn_ext_unprefixed
= value
;
4975 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4976 fields
->f_dst32_rn_ext_unprefixed
= value
;
4978 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4979 fields
->f_dst32_rn_prefixed_HI
= value
;
4981 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4982 fields
->f_dst32_rn_prefixed_QI
= value
;
4984 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4985 fields
->f_dst32_rn_prefixed_SI
= value
;
4987 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4988 fields
->f_dst32_rn_unprefixed_HI
= value
;
4990 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4991 fields
->f_dst32_rn_unprefixed_QI
= value
;
4993 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4994 fields
->f_dst32_rn_unprefixed_SI
= value
;
4996 case M32C_OPERAND_G
:
4998 case M32C_OPERAND_IMM_12_S4
:
4999 fields
->f_imm_12_s4
= value
;
5001 case M32C_OPERAND_IMM_12_S4N
:
5002 fields
->f_imm_12_s4
= value
;
5004 case M32C_OPERAND_IMM_13_U3
:
5005 fields
->f_imm_13_u3
= value
;
5007 case M32C_OPERAND_IMM_16_HI
:
5008 fields
->f_dsp_16_s16
= value
;
5010 case M32C_OPERAND_IMM_16_QI
:
5011 fields
->f_dsp_16_s8
= value
;
5013 case M32C_OPERAND_IMM_16_SI
:
5014 fields
->f_dsp_16_s32
= value
;
5016 case M32C_OPERAND_IMM_20_S4
:
5017 fields
->f_imm_20_s4
= value
;
5019 case M32C_OPERAND_IMM_24_HI
:
5020 fields
->f_dsp_24_s16
= value
;
5022 case M32C_OPERAND_IMM_24_QI
:
5023 fields
->f_dsp_24_s8
= value
;
5025 case M32C_OPERAND_IMM_24_SI
:
5026 fields
->f_dsp_24_s32
= value
;
5028 case M32C_OPERAND_IMM_32_HI
:
5029 fields
->f_dsp_32_s16
= value
;
5031 case M32C_OPERAND_IMM_32_QI
:
5032 fields
->f_dsp_32_s8
= value
;
5034 case M32C_OPERAND_IMM_32_SI
:
5035 fields
->f_dsp_32_s32
= value
;
5037 case M32C_OPERAND_IMM_40_HI
:
5038 fields
->f_dsp_40_s16
= value
;
5040 case M32C_OPERAND_IMM_40_QI
:
5041 fields
->f_dsp_40_s8
= value
;
5043 case M32C_OPERAND_IMM_40_SI
:
5044 fields
->f_dsp_40_s32
= value
;
5046 case M32C_OPERAND_IMM_48_HI
:
5047 fields
->f_dsp_48_s16
= value
;
5049 case M32C_OPERAND_IMM_48_QI
:
5050 fields
->f_dsp_48_s8
= value
;
5052 case M32C_OPERAND_IMM_48_SI
:
5053 fields
->f_dsp_48_s32
= value
;
5055 case M32C_OPERAND_IMM_56_HI
:
5056 fields
->f_dsp_56_s16
= value
;
5058 case M32C_OPERAND_IMM_56_QI
:
5059 fields
->f_dsp_56_s8
= value
;
5061 case M32C_OPERAND_IMM_64_HI
:
5062 fields
->f_dsp_64_s16
= value
;
5064 case M32C_OPERAND_IMM_8_HI
:
5065 fields
->f_dsp_8_s16
= value
;
5067 case M32C_OPERAND_IMM_8_QI
:
5068 fields
->f_dsp_8_s8
= value
;
5070 case M32C_OPERAND_IMM_8_S4
:
5071 fields
->f_imm_8_s4
= value
;
5073 case M32C_OPERAND_IMM_8_S4N
:
5074 fields
->f_imm_8_s4
= value
;
5076 case M32C_OPERAND_IMM_SH_12_S4
:
5077 fields
->f_imm_12_s4
= value
;
5079 case M32C_OPERAND_IMM_SH_20_S4
:
5080 fields
->f_imm_20_s4
= value
;
5082 case M32C_OPERAND_IMM_SH_8_S4
:
5083 fields
->f_imm_8_s4
= value
;
5085 case M32C_OPERAND_IMM1_S
:
5086 fields
->f_imm1_S
= value
;
5088 case M32C_OPERAND_IMM3_S
:
5089 fields
->f_imm3_S
= value
;
5091 case M32C_OPERAND_LAB_16_8
:
5092 fields
->f_lab_16_8
= value
;
5094 case M32C_OPERAND_LAB_24_8
:
5095 fields
->f_lab_24_8
= value
;
5097 case M32C_OPERAND_LAB_32_8
:
5098 fields
->f_lab_32_8
= value
;
5100 case M32C_OPERAND_LAB_40_8
:
5101 fields
->f_lab_40_8
= value
;
5103 case M32C_OPERAND_LAB_5_3
:
5104 fields
->f_lab_5_3
= value
;
5106 case M32C_OPERAND_LAB_8_16
:
5107 fields
->f_lab_8_16
= value
;
5109 case M32C_OPERAND_LAB_8_24
:
5110 fields
->f_lab_8_24
= value
;
5112 case M32C_OPERAND_LAB_8_8
:
5113 fields
->f_lab_8_8
= value
;
5115 case M32C_OPERAND_LAB32_JMP_S
:
5116 fields
->f_lab32_jmp_s
= value
;
5118 case M32C_OPERAND_Q
:
5120 case M32C_OPERAND_R0
:
5122 case M32C_OPERAND_R0H
:
5124 case M32C_OPERAND_R0L
:
5126 case M32C_OPERAND_R1
:
5128 case M32C_OPERAND_R1R2R0
:
5130 case M32C_OPERAND_R2
:
5132 case M32C_OPERAND_R2R0
:
5134 case M32C_OPERAND_R3
:
5136 case M32C_OPERAND_R3R1
:
5138 case M32C_OPERAND_REGSETPOP
:
5139 fields
->f_8_8
= value
;
5141 case M32C_OPERAND_REGSETPUSH
:
5142 fields
->f_8_8
= value
;
5144 case M32C_OPERAND_RN16_PUSH_S
:
5145 fields
->f_4_1
= value
;
5147 case M32C_OPERAND_S
:
5149 case M32C_OPERAND_SRC16AN
:
5150 fields
->f_src16_an
= value
;
5152 case M32C_OPERAND_SRC16ANHI
:
5153 fields
->f_src16_an
= value
;
5155 case M32C_OPERAND_SRC16ANQI
:
5156 fields
->f_src16_an
= value
;
5158 case M32C_OPERAND_SRC16RNHI
:
5159 fields
->f_src16_rn
= value
;
5161 case M32C_OPERAND_SRC16RNQI
:
5162 fields
->f_src16_rn
= value
;
5164 case M32C_OPERAND_SRC32ANPREFIXED
:
5165 fields
->f_src32_an_prefixed
= value
;
5167 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
5168 fields
->f_src32_an_prefixed
= value
;
5170 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
5171 fields
->f_src32_an_prefixed
= value
;
5173 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
5174 fields
->f_src32_an_prefixed
= value
;
5176 case M32C_OPERAND_SRC32ANUNPREFIXED
:
5177 fields
->f_src32_an_unprefixed
= value
;
5179 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
5180 fields
->f_src32_an_unprefixed
= value
;
5182 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
5183 fields
->f_src32_an_unprefixed
= value
;
5185 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
5186 fields
->f_src32_an_unprefixed
= value
;
5188 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
5189 fields
->f_src32_rn_prefixed_HI
= value
;
5191 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
5192 fields
->f_src32_rn_prefixed_QI
= value
;
5194 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
5195 fields
->f_src32_rn_prefixed_SI
= value
;
5197 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
5198 fields
->f_src32_rn_unprefixed_HI
= value
;
5200 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
5201 fields
->f_src32_rn_unprefixed_QI
= value
;
5203 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
5204 fields
->f_src32_rn_unprefixed_SI
= value
;
5206 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
5207 fields
->f_5_1
= value
;
5209 case M32C_OPERAND_X
:
5211 case M32C_OPERAND_Z
:
5213 case M32C_OPERAND_COND16_16
:
5214 fields
->f_dsp_16_u8
= value
;
5216 case M32C_OPERAND_COND16_24
:
5217 fields
->f_dsp_24_u8
= value
;
5219 case M32C_OPERAND_COND16_32
:
5220 fields
->f_dsp_32_u8
= value
;
5222 case M32C_OPERAND_COND16C
:
5223 fields
->f_cond16
= value
;
5225 case M32C_OPERAND_COND16J
:
5226 fields
->f_cond16
= value
;
5228 case M32C_OPERAND_COND16J5
:
5229 fields
->f_cond16j_5
= value
;
5231 case M32C_OPERAND_COND32
:
5232 fields
->f_cond32
= value
;
5234 case M32C_OPERAND_COND32_16
:
5235 fields
->f_dsp_16_u8
= value
;
5237 case M32C_OPERAND_COND32_24
:
5238 fields
->f_dsp_24_u8
= value
;
5240 case M32C_OPERAND_COND32_32
:
5241 fields
->f_dsp_32_u8
= value
;
5243 case M32C_OPERAND_COND32_40
:
5244 fields
->f_dsp_40_u8
= value
;
5246 case M32C_OPERAND_COND32J
:
5247 fields
->f_cond32j
= value
;
5249 case M32C_OPERAND_CR1_PREFIXED_32
:
5250 fields
->f_21_3
= value
;
5252 case M32C_OPERAND_CR1_UNPREFIXED_32
:
5253 fields
->f_13_3
= value
;
5255 case M32C_OPERAND_CR16
:
5256 fields
->f_9_3
= value
;
5258 case M32C_OPERAND_CR2_32
:
5259 fields
->f_13_3
= value
;
5261 case M32C_OPERAND_CR3_PREFIXED_32
:
5262 fields
->f_21_3
= value
;
5264 case M32C_OPERAND_CR3_UNPREFIXED_32
:
5265 fields
->f_13_3
= value
;
5267 case M32C_OPERAND_FLAGS16
:
5268 fields
->f_9_3
= value
;
5270 case M32C_OPERAND_FLAGS32
:
5271 fields
->f_13_3
= value
;
5273 case M32C_OPERAND_SCCOND32
:
5274 fields
->f_cond16
= value
;
5276 case M32C_OPERAND_SIZE
:
5280 /* xgettext:c-format */
5281 opcodes_error_handler
5282 (_("internal error: unrecognized field %d while setting vma operand"),
5288 /* Function to call before using the instruction builder tables. */
5291 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd
)
5293 cd
->insert_handlers
= & m32c_cgen_insert_handlers
[0];
5294 cd
->extract_handlers
= & m32c_cgen_extract_handlers
[0];
5296 cd
->insert_operand
= m32c_cgen_insert_operand
;
5297 cd
->extract_operand
= m32c_cgen_extract_operand
;
5299 cd
->get_int_operand
= m32c_cgen_get_int_operand
;
5300 cd
->set_int_operand
= m32c_cgen_set_int_operand
;
5301 cd
->get_vma_operand
= m32c_cgen_get_vma_operand
;
5302 cd
->set_vma_operand
= m32c_cgen_set_vma_operand
;