1 /* Instruction building/extraction support for m32c. -*- C -*-
3 THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
4 - the resultant file is machine generated, cgen-ibld.in isn't
6 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006
7 Free Software Foundation, Inc.
9 This file is part of the GNU Binutils and GDB, the GNU debugger.
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
25 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
34 #include "m32c-desc.h"
37 #include "safe-ctype.h"
40 #define min(a,b) ((a) < (b) ? (a) : (b))
42 #define max(a,b) ((a) > (b) ? (a) : (b))
44 /* Used by the ifield rtx function. */
45 #define FLD(f) (fields->f)
47 static const char * insert_normal
48 (CGEN_CPU_DESC
, long, unsigned int, unsigned int, unsigned int,
49 unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR
);
50 static const char * insert_insn_normal
51 (CGEN_CPU_DESC
, const CGEN_INSN
*,
52 CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
53 static int extract_normal
54 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
,
55 unsigned int, unsigned int, unsigned int, unsigned int,
56 unsigned int, unsigned int, bfd_vma
, long *);
57 static int extract_insn_normal
58 (CGEN_CPU_DESC
, const CGEN_INSN
*, CGEN_EXTRACT_INFO
*,
59 CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
61 static void put_insn_int_value
62 (CGEN_CPU_DESC
, CGEN_INSN_BYTES_PTR
, int, int, CGEN_INSN_INT
);
65 static CGEN_INLINE
void insert_1
66 (CGEN_CPU_DESC
, unsigned long, int, int, int, unsigned char *);
67 static CGEN_INLINE
int fill_cache
68 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, int, int, bfd_vma
);
69 static CGEN_INLINE
long extract_1
70 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, int, int, int, unsigned char *, bfd_vma
);
73 /* Operand insertion. */
77 /* Subroutine of insert_normal. */
79 static CGEN_INLINE
void
80 insert_1 (CGEN_CPU_DESC cd
,
90 x
= cgen_get_insn_value (cd
, bufp
, word_length
);
92 /* Written this way to avoid undefined behaviour. */
93 mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
95 shift
= (start
+ 1) - length
;
97 shift
= (word_length
- (start
+ length
));
98 x
= (x
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
100 cgen_put_insn_value (cd
, bufp
, word_length
, (bfd_vma
) x
);
103 #endif /* ! CGEN_INT_INSN_P */
105 /* Default insertion routine.
107 ATTRS is a mask of the boolean attributes.
108 WORD_OFFSET is the offset in bits from the start of the insn of the value.
109 WORD_LENGTH is the length of the word in bits in which the value resides.
110 START is the starting bit number in the word, architecture origin.
111 LENGTH is the length of VALUE in bits.
112 TOTAL_LENGTH is the total length of the insn in bits.
114 The result is an error message or NULL if success. */
116 /* ??? This duplicates functionality with bfd's howto table and
117 bfd_install_relocation. */
118 /* ??? This doesn't handle bfd_vma's. Create another function when
122 insert_normal (CGEN_CPU_DESC cd
,
125 unsigned int word_offset
,
128 unsigned int word_length
,
129 unsigned int total_length
,
130 CGEN_INSN_BYTES_PTR buffer
)
132 static char errbuf
[100];
133 /* Written this way to avoid undefined behaviour. */
134 unsigned long mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
136 /* If LENGTH is zero, this operand doesn't contribute to the value. */
140 if (word_length
> 32)
143 /* For architectures with insns smaller than the base-insn-bitsize,
144 word_length may be too big. */
145 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
148 && word_length
> total_length
)
149 word_length
= total_length
;
152 /* Ensure VALUE will fit. */
153 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGN_OPT
))
155 long minval
= - (1L << (length
- 1));
156 unsigned long maxval
= mask
;
158 if ((value
> 0 && (unsigned long) value
> maxval
)
161 /* xgettext:c-format */
163 _("operand out of range (%ld not between %ld and %lu)"),
164 value
, minval
, maxval
);
168 else if (! CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
))
170 unsigned long maxval
= mask
;
171 unsigned long val
= (unsigned long) value
;
173 /* For hosts with a word size > 32 check to see if value has been sign
174 extended beyond 32 bits. If so then ignore these higher sign bits
175 as the user is attempting to store a 32-bit signed value into an
176 unsigned 32-bit field which is allowed. */
177 if (sizeof (unsigned long) > 4 && ((value
>> 32) == -1))
182 /* xgettext:c-format */
184 _("operand out of range (0x%lx not between 0 and 0x%lx)"),
191 if (! cgen_signed_overflow_ok_p (cd
))
193 long minval
= - (1L << (length
- 1));
194 long maxval
= (1L << (length
- 1)) - 1;
196 if (value
< minval
|| value
> maxval
)
199 /* xgettext:c-format */
200 (errbuf
, _("operand out of range (%ld not between %ld and %ld)"),
201 value
, minval
, maxval
);
212 if (CGEN_INSN_LSB0_P
)
213 shift
= (word_offset
+ start
+ 1) - length
;
215 shift
= total_length
- (word_offset
+ start
+ length
);
216 *buffer
= (*buffer
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
219 #else /* ! CGEN_INT_INSN_P */
222 unsigned char *bufp
= (unsigned char *) buffer
+ word_offset
/ 8;
224 insert_1 (cd
, value
, start
, length
, word_length
, bufp
);
227 #endif /* ! CGEN_INT_INSN_P */
232 /* Default insn builder (insert handler).
233 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
234 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
235 recorded in host byte order, otherwise BUFFER is an array of bytes
236 and the value is recorded in target byte order).
237 The result is an error message or NULL if success. */
240 insert_insn_normal (CGEN_CPU_DESC cd
,
241 const CGEN_INSN
* insn
,
242 CGEN_FIELDS
* fields
,
243 CGEN_INSN_BYTES_PTR buffer
,
246 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
248 const CGEN_SYNTAX_CHAR_TYPE
* syn
;
250 CGEN_INIT_INSERT (cd
);
251 value
= CGEN_INSN_BASE_VALUE (insn
);
253 /* If we're recording insns as numbers (rather than a string of bytes),
254 target byte order handling is deferred until later. */
258 put_insn_int_value (cd
, buffer
, cd
->base_insn_bitsize
,
259 CGEN_FIELDS_BITSIZE (fields
), value
);
263 cgen_put_insn_value (cd
, buffer
, min ((unsigned) cd
->base_insn_bitsize
,
264 (unsigned) CGEN_FIELDS_BITSIZE (fields
)),
267 #endif /* ! CGEN_INT_INSN_P */
269 /* ??? It would be better to scan the format's fields.
270 Still need to be able to insert a value based on the operand though;
271 e.g. storing a branch displacement that got resolved later.
272 Needs more thought first. */
274 for (syn
= CGEN_SYNTAX_STRING (syntax
); * syn
; ++ syn
)
278 if (CGEN_SYNTAX_CHAR_P (* syn
))
281 errmsg
= (* cd
->insert_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
291 /* Cover function to store an insn value into an integral insn. Must go here
292 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
295 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
296 CGEN_INSN_BYTES_PTR buf
,
301 /* For architectures with insns smaller than the base-insn-bitsize,
302 length may be too big. */
303 if (length
> insn_length
)
307 int shift
= insn_length
- length
;
308 /* Written this way to avoid undefined behaviour. */
309 CGEN_INSN_INT mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
311 *buf
= (*buf
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
316 /* Operand extraction. */
318 #if ! CGEN_INT_INSN_P
320 /* Subroutine of extract_normal.
321 Ensure sufficient bytes are cached in EX_INFO.
322 OFFSET is the offset in bytes from the start of the insn of the value.
323 BYTES is the length of the needed value.
324 Returns 1 for success, 0 for failure. */
326 static CGEN_INLINE
int
327 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
328 CGEN_EXTRACT_INFO
*ex_info
,
333 /* It's doubtful that the middle part has already been fetched so
334 we don't optimize that case. kiss. */
336 disassemble_info
*info
= (disassemble_info
*) ex_info
->dis_info
;
338 /* First do a quick check. */
339 mask
= (1 << bytes
) - 1;
340 if (((ex_info
->valid
>> offset
) & mask
) == mask
)
343 /* Search for the first byte we need to read. */
344 for (mask
= 1 << offset
; bytes
> 0; --bytes
, ++offset
, mask
<<= 1)
345 if (! (mask
& ex_info
->valid
))
353 status
= (*info
->read_memory_func
)
354 (pc
, ex_info
->insn_bytes
+ offset
, bytes
, info
);
358 (*info
->memory_error_func
) (status
, pc
, info
);
362 ex_info
->valid
|= ((1 << bytes
) - 1) << offset
;
368 /* Subroutine of extract_normal. */
370 static CGEN_INLINE
long
371 extract_1 (CGEN_CPU_DESC cd
,
372 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
377 bfd_vma pc ATTRIBUTE_UNUSED
)
382 x
= cgen_get_insn_value (cd
, bufp
, word_length
);
384 if (CGEN_INSN_LSB0_P
)
385 shift
= (start
+ 1) - length
;
387 shift
= (word_length
- (start
+ length
));
391 #endif /* ! CGEN_INT_INSN_P */
393 /* Default extraction routine.
395 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
396 or sometimes less for cases like the m32r where the base insn size is 32
397 but some insns are 16 bits.
398 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
399 but for generality we take a bitmask of all of them.
400 WORD_OFFSET is the offset in bits from the start of the insn of the value.
401 WORD_LENGTH is the length of the word in bits in which the value resides.
402 START is the starting bit number in the word, architecture origin.
403 LENGTH is the length of VALUE in bits.
404 TOTAL_LENGTH is the total length of the insn in bits.
406 Returns 1 for success, 0 for failure. */
408 /* ??? The return code isn't properly used. wip. */
410 /* ??? This doesn't handle bfd_vma's. Create another function when
414 extract_normal (CGEN_CPU_DESC cd
,
415 #if ! CGEN_INT_INSN_P
416 CGEN_EXTRACT_INFO
*ex_info
,
418 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
420 CGEN_INSN_INT insn_value
,
422 unsigned int word_offset
,
425 unsigned int word_length
,
426 unsigned int total_length
,
427 #if ! CGEN_INT_INSN_P
430 bfd_vma pc ATTRIBUTE_UNUSED
,
436 /* If LENGTH is zero, this operand doesn't contribute to the value
437 so give it a standard value of zero. */
444 if (word_length
> 32)
447 /* For architectures with insns smaller than the insn-base-bitsize,
448 word_length may be too big. */
449 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
451 if (word_offset
+ word_length
> total_length
)
452 word_length
= total_length
- word_offset
;
455 /* Does the value reside in INSN_VALUE, and at the right alignment? */
457 if (CGEN_INT_INSN_P
|| (word_offset
== 0 && word_length
== total_length
))
459 if (CGEN_INSN_LSB0_P
)
460 value
= insn_value
>> ((word_offset
+ start
+ 1) - length
);
462 value
= insn_value
>> (total_length
- ( word_offset
+ start
+ length
));
465 #if ! CGEN_INT_INSN_P
469 unsigned char *bufp
= ex_info
->insn_bytes
+ word_offset
/ 8;
471 if (word_length
> 32)
474 if (fill_cache (cd
, ex_info
, word_offset
/ 8, word_length
/ 8, pc
) == 0)
477 value
= extract_1 (cd
, ex_info
, start
, length
, word_length
, bufp
, pc
);
480 #endif /* ! CGEN_INT_INSN_P */
482 /* Written this way to avoid undefined behaviour. */
483 mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
487 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
)
488 && (value
& (1L << (length
- 1))))
496 /* Default insn extractor.
498 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
499 The extracted fields are stored in FIELDS.
500 EX_INFO is used to handle reading variable length insns.
501 Return the length of the insn in bits, or 0 if no match,
502 or -1 if an error occurs fetching data (memory_error_func will have
506 extract_insn_normal (CGEN_CPU_DESC cd
,
507 const CGEN_INSN
*insn
,
508 CGEN_EXTRACT_INFO
*ex_info
,
509 CGEN_INSN_INT insn_value
,
513 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
514 const CGEN_SYNTAX_CHAR_TYPE
*syn
;
516 CGEN_FIELDS_BITSIZE (fields
) = CGEN_INSN_BITSIZE (insn
);
518 CGEN_INIT_EXTRACT (cd
);
520 for (syn
= CGEN_SYNTAX_STRING (syntax
); *syn
; ++syn
)
524 if (CGEN_SYNTAX_CHAR_P (*syn
))
527 length
= (* cd
->extract_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
528 ex_info
, insn_value
, fields
, pc
);
533 /* We recognized and successfully extracted this insn. */
534 return CGEN_INSN_BITSIZE (insn
);
537 /* Machine generated code added here. */
539 const char * m32c_cgen_insert_operand
540 (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
542 /* Main entry point for operand insertion.
544 This function is basically just a big switch statement. Earlier versions
545 used tables to look up the function to use, but
546 - if the table contains both assembler and disassembler functions then
547 the disassembler contains much of the assembler and vice-versa,
548 - there's a lot of inlining possibilities as things grow,
549 - using a switch statement avoids the function call overhead.
551 This function could be moved into `parse_insn_normal', but keeping it
552 separate makes clear the interface between `parse_insn_normal' and each of
553 the handlers. It's also needed by GAS to insert operands that couldn't be
554 resolved during parsing. */
557 m32c_cgen_insert_operand (CGEN_CPU_DESC cd
,
559 CGEN_FIELDS
* fields
,
560 CGEN_INSN_BYTES_PTR buffer
,
561 bfd_vma pc ATTRIBUTE_UNUSED
)
563 const char * errmsg
= NULL
;
564 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
568 case M32C_OPERAND_A0
:
570 case M32C_OPERAND_A1
:
572 case M32C_OPERAND_AN16_PUSH_S
:
573 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
575 case M32C_OPERAND_BIT16AN
:
576 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
578 case M32C_OPERAND_BIT16RN
:
579 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
581 case M32C_OPERAND_BIT3_S
:
584 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
585 FLD (f_2_2
) = ((((unsigned int) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
587 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
590 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
595 case M32C_OPERAND_BIT32ANPREFIXED
:
596 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
598 case M32C_OPERAND_BIT32ANUNPREFIXED
:
599 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
601 case M32C_OPERAND_BIT32RNPREFIXED
:
603 long value
= fields
->f_dst32_rn_prefixed_QI
;
604 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
605 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
608 case M32C_OPERAND_BIT32RNUNPREFIXED
:
610 long value
= fields
->f_dst32_rn_unprefixed_QI
;
611 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
612 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
615 case M32C_OPERAND_BITBASE16_16_S8
:
616 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
618 case M32C_OPERAND_BITBASE16_16_U16
:
620 long value
= fields
->f_dsp_16_u16
;
621 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
622 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
625 case M32C_OPERAND_BITBASE16_16_U8
:
626 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
628 case M32C_OPERAND_BITBASE16_8_U11_S
:
631 FLD (f_bitno16_S
) = ((FLD (f_bitbase16_u11_S
)) & (7));
632 FLD (f_dsp_8_u8
) = ((((unsigned int) (FLD (f_bitbase16_u11_S
)) >> (3))) & (255));
634 errmsg
= insert_normal (cd
, fields
->f_bitno16_S
, 0, 0, 5, 3, 32, total_length
, buffer
);
637 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
642 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
645 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s11_unprefixed
)) & (7));
646 FLD (f_dsp_16_s8
) = ((int) (FLD (f_bitbase32_16_s11_unprefixed
)) >> (3));
648 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
651 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
656 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
659 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s19_unprefixed
)) & (7));
660 FLD (f_dsp_16_s16
) = ((int) (FLD (f_bitbase32_16_s19_unprefixed
)) >> (3));
662 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
666 long value
= fields
->f_dsp_16_s16
;
667 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
668 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
674 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
677 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u11_unprefixed
)) & (7));
678 FLD (f_dsp_16_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u11_unprefixed
)) >> (3))) & (255));
680 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
683 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
688 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
691 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u19_unprefixed
)) & (7));
692 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u19_unprefixed
)) >> (3))) & (65535));
694 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
698 long value
= fields
->f_dsp_16_u16
;
699 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
700 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
706 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
709 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u27_unprefixed
)) & (7));
710 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (3))) & (65535));
711 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (19))) & (255));
713 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
717 long value
= fields
->f_dsp_16_u16
;
718 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
719 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
723 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
728 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
731 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s11_prefixed
)) & (7));
732 FLD (f_dsp_24_s8
) = ((int) (FLD (f_bitbase32_24_s11_prefixed
)) >> (3));
734 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
737 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
742 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
745 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s19_prefixed
)) & (7));
746 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (3))) & (255));
747 FLD (f_dsp_32_s8
) = ((int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (11));
749 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
752 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
755 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
760 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
763 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u11_prefixed
)) & (7));
764 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u11_prefixed
)) >> (3))) & (255));
766 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
769 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
774 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
777 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u19_prefixed
)) & (7));
778 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (3))) & (255));
779 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (11))) & (255));
781 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
784 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
787 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
792 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
795 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u27_prefixed
)) & (7));
796 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (3))) & (255));
797 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (11))) & (65535));
799 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
802 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
806 long value
= fields
->f_dsp_32_u16
;
807 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
808 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
814 case M32C_OPERAND_BITNO16R
:
815 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
817 case M32C_OPERAND_BITNO32PREFIXED
:
818 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
820 case M32C_OPERAND_BITNO32UNPREFIXED
:
821 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
823 case M32C_OPERAND_DSP_10_U6
:
824 errmsg
= insert_normal (cd
, fields
->f_dsp_10_u6
, 0, 0, 10, 6, 32, total_length
, buffer
);
826 case M32C_OPERAND_DSP_16_S16
:
828 long value
= fields
->f_dsp_16_s16
;
829 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
830 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
833 case M32C_OPERAND_DSP_16_S8
:
834 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
836 case M32C_OPERAND_DSP_16_U16
:
838 long value
= fields
->f_dsp_16_u16
;
839 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
840 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
843 case M32C_OPERAND_DSP_16_U20
:
846 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
847 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
850 long value
= fields
->f_dsp_16_u16
;
851 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
852 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
856 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
861 case M32C_OPERAND_DSP_16_U24
:
864 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
865 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
868 long value
= fields
->f_dsp_16_u16
;
869 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
870 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
874 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
879 case M32C_OPERAND_DSP_16_U8
:
880 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
882 case M32C_OPERAND_DSP_24_S16
:
885 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
886 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
888 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
891 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
896 case M32C_OPERAND_DSP_24_S8
:
897 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
899 case M32C_OPERAND_DSP_24_U16
:
902 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u16
)) & (255));
903 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_u16
)) >> (8))) & (255));
905 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
908 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
913 case M32C_OPERAND_DSP_24_U20
:
916 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
917 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
919 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
923 long value
= fields
->f_dsp_32_u16
;
924 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
925 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
931 case M32C_OPERAND_DSP_24_U24
:
934 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
935 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
937 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
941 long value
= fields
->f_dsp_32_u16
;
942 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
943 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
949 case M32C_OPERAND_DSP_24_U8
:
950 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
952 case M32C_OPERAND_DSP_32_S16
:
954 long value
= fields
->f_dsp_32_s16
;
955 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
956 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
959 case M32C_OPERAND_DSP_32_S8
:
960 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
962 case M32C_OPERAND_DSP_32_U16
:
964 long value
= fields
->f_dsp_32_u16
;
965 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
966 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
969 case M32C_OPERAND_DSP_32_U20
:
971 long value
= fields
->f_dsp_32_u24
;
972 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
973 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
976 case M32C_OPERAND_DSP_32_U24
:
978 long value
= fields
->f_dsp_32_u24
;
979 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
980 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
983 case M32C_OPERAND_DSP_32_U8
:
984 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
986 case M32C_OPERAND_DSP_40_S16
:
988 long value
= fields
->f_dsp_40_s16
;
989 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
990 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
993 case M32C_OPERAND_DSP_40_S8
:
994 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
996 case M32C_OPERAND_DSP_40_U16
:
998 long value
= fields
->f_dsp_40_u16
;
999 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1000 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 16, 32, total_length
, buffer
);
1003 case M32C_OPERAND_DSP_40_U24
:
1005 long value
= fields
->f_dsp_40_u24
;
1006 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1007 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1010 case M32C_OPERAND_DSP_40_U8
:
1011 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1013 case M32C_OPERAND_DSP_48_S16
:
1015 long value
= fields
->f_dsp_48_s16
;
1016 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1017 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1020 case M32C_OPERAND_DSP_48_S8
:
1021 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1023 case M32C_OPERAND_DSP_48_U16
:
1025 long value
= fields
->f_dsp_48_u16
;
1026 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1027 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1030 case M32C_OPERAND_DSP_48_U24
:
1033 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_48_u24
)) >> (16))) & (255));
1034 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u24
)) & (65535));
1037 long value
= fields
->f_dsp_48_u16
;
1038 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1039 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1043 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1048 case M32C_OPERAND_DSP_48_U8
:
1049 errmsg
= insert_normal (cd
, fields
->f_dsp_48_u8
, 0, 32, 16, 8, 32, total_length
, buffer
);
1051 case M32C_OPERAND_DSP_8_S24
:
1053 long value
= fields
->f_dsp_8_s24
;
1054 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
1055 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, buffer
);
1058 case M32C_OPERAND_DSP_8_S8
:
1059 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1061 case M32C_OPERAND_DSP_8_U16
:
1063 long value
= fields
->f_dsp_8_u16
;
1064 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1065 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 16, 32, total_length
, buffer
);
1068 case M32C_OPERAND_DSP_8_U24
:
1070 long value
= fields
->f_dsp_8_u24
;
1071 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1072 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 24, 32, total_length
, buffer
);
1075 case M32C_OPERAND_DSP_8_U6
:
1076 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u6
, 0, 0, 8, 6, 32, total_length
, buffer
);
1078 case M32C_OPERAND_DSP_8_U8
:
1079 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1081 case M32C_OPERAND_DST16AN
:
1082 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1084 case M32C_OPERAND_DST16AN_S
:
1085 errmsg
= insert_normal (cd
, fields
->f_dst16_an_s
, 0, 0, 4, 1, 32, total_length
, buffer
);
1087 case M32C_OPERAND_DST16ANHI
:
1088 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1090 case M32C_OPERAND_DST16ANQI
:
1091 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1093 case M32C_OPERAND_DST16ANQI_S
:
1094 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1096 case M32C_OPERAND_DST16ANSI
:
1097 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1099 case M32C_OPERAND_DST16RNEXTQI
:
1100 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_ext
, 0, 0, 14, 1, 32, total_length
, buffer
);
1102 case M32C_OPERAND_DST16RNHI
:
1103 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1105 case M32C_OPERAND_DST16RNQI
:
1106 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1108 case M32C_OPERAND_DST16RNQI_S
:
1109 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1111 case M32C_OPERAND_DST16RNSI
:
1112 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1114 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
1115 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1117 case M32C_OPERAND_DST32ANPREFIXED
:
1118 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1120 case M32C_OPERAND_DST32ANPREFIXEDHI
:
1121 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1123 case M32C_OPERAND_DST32ANPREFIXEDQI
:
1124 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1126 case M32C_OPERAND_DST32ANPREFIXEDSI
:
1127 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1129 case M32C_OPERAND_DST32ANUNPREFIXED
:
1130 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1132 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
1133 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1135 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
1136 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1138 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
1139 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1141 case M32C_OPERAND_DST32R0HI_S
:
1143 case M32C_OPERAND_DST32R0QI_S
:
1145 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
1146 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1148 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
1149 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1151 case M32C_OPERAND_DST32RNPREFIXEDHI
:
1153 long value
= fields
->f_dst32_rn_prefixed_HI
;
1154 value
= ((((value
) + (2))) % (4));
1155 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1158 case M32C_OPERAND_DST32RNPREFIXEDQI
:
1160 long value
= fields
->f_dst32_rn_prefixed_QI
;
1161 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1162 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1165 case M32C_OPERAND_DST32RNPREFIXEDSI
:
1167 long value
= fields
->f_dst32_rn_prefixed_SI
;
1168 value
= ((value
) + (2));
1169 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1172 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
1174 long value
= fields
->f_dst32_rn_unprefixed_HI
;
1175 value
= ((((value
) + (2))) % (4));
1176 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1179 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
1181 long value
= fields
->f_dst32_rn_unprefixed_QI
;
1182 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1183 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1186 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
1188 long value
= fields
->f_dst32_rn_unprefixed_SI
;
1189 value
= ((value
) + (2));
1190 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1193 case M32C_OPERAND_G
:
1195 case M32C_OPERAND_IMM_12_S4
:
1196 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1198 case M32C_OPERAND_IMM_12_S4N
:
1199 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1201 case M32C_OPERAND_IMM_13_U3
:
1202 errmsg
= insert_normal (cd
, fields
->f_imm_13_u3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1204 case M32C_OPERAND_IMM_16_HI
:
1206 long value
= fields
->f_dsp_16_s16
;
1207 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1208 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
1211 case M32C_OPERAND_IMM_16_QI
:
1212 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
1214 case M32C_OPERAND_IMM_16_SI
:
1217 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_16_s32
)) >> (16))) & (65535));
1218 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_s32
)) & (65535));
1221 long value
= fields
->f_dsp_16_u16
;
1222 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1223 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
1228 long value
= fields
->f_dsp_32_u16
;
1229 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1230 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
1236 case M32C_OPERAND_IMM_20_S4
:
1237 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1239 case M32C_OPERAND_IMM_24_HI
:
1242 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
1243 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
1245 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1248 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1253 case M32C_OPERAND_IMM_24_QI
:
1254 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
1256 case M32C_OPERAND_IMM_24_SI
:
1259 FLD (f_dsp_32_u24
) = ((((unsigned int) (FLD (f_dsp_24_s32
)) >> (8))) & (16777215));
1260 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s32
)) & (255));
1262 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1266 long value
= fields
->f_dsp_32_u24
;
1267 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1268 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
1274 case M32C_OPERAND_IMM_32_HI
:
1276 long value
= fields
->f_dsp_32_s16
;
1277 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1278 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
1281 case M32C_OPERAND_IMM_32_QI
:
1282 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
1284 case M32C_OPERAND_IMM_32_SI
:
1286 long value
= fields
->f_dsp_32_s32
;
1287 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
1288 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, buffer
);
1291 case M32C_OPERAND_IMM_40_HI
:
1293 long value
= fields
->f_dsp_40_s16
;
1294 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1295 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1298 case M32C_OPERAND_IMM_40_QI
:
1299 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1301 case M32C_OPERAND_IMM_40_SI
:
1304 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_40_s32
)) >> (24))) & (255));
1305 FLD (f_dsp_40_u24
) = ((FLD (f_dsp_40_s32
)) & (16777215));
1308 long value
= fields
->f_dsp_40_u24
;
1309 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1310 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1314 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1319 case M32C_OPERAND_IMM_48_HI
:
1321 long value
= fields
->f_dsp_48_s16
;
1322 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1323 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1326 case M32C_OPERAND_IMM_48_QI
:
1327 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1329 case M32C_OPERAND_IMM_48_SI
:
1332 FLD (f_dsp_64_u16
) = ((((unsigned int) (FLD (f_dsp_48_s32
)) >> (16))) & (65535));
1333 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_s32
)) & (65535));
1336 long value
= fields
->f_dsp_48_u16
;
1337 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1338 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1343 long value
= fields
->f_dsp_64_u16
;
1344 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1345 errmsg
= insert_normal (cd
, value
, 0, 64, 0, 16, 32, total_length
, buffer
);
1351 case M32C_OPERAND_IMM_56_HI
:
1354 FLD (f_dsp_56_u8
) = ((FLD (f_dsp_56_s16
)) & (255));
1355 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_56_s16
)) >> (8))) & (255));
1357 errmsg
= insert_normal (cd
, fields
->f_dsp_56_u8
, 0, 32, 24, 8, 32, total_length
, buffer
);
1360 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1365 case M32C_OPERAND_IMM_56_QI
:
1366 errmsg
= insert_normal (cd
, fields
->f_dsp_56_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 24, 8, 32, total_length
, buffer
);
1368 case M32C_OPERAND_IMM_64_HI
:
1370 long value
= fields
->f_dsp_64_s16
;
1371 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1372 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, buffer
);
1375 case M32C_OPERAND_IMM_8_HI
:
1377 long value
= fields
->f_dsp_8_s16
;
1378 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1379 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, buffer
);
1382 case M32C_OPERAND_IMM_8_QI
:
1383 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1385 case M32C_OPERAND_IMM_8_S4
:
1386 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1388 case M32C_OPERAND_IMM_8_S4N
:
1389 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1391 case M32C_OPERAND_IMM_SH_12_S4
:
1392 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1394 case M32C_OPERAND_IMM_SH_20_S4
:
1395 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1397 case M32C_OPERAND_IMM_SH_8_S4
:
1398 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1400 case M32C_OPERAND_IMM1_S
:
1402 long value
= fields
->f_imm1_S
;
1403 value
= ((value
) - (1));
1404 errmsg
= insert_normal (cd
, value
, 0, 0, 2, 1, 32, total_length
, buffer
);
1407 case M32C_OPERAND_IMM3_S
:
1410 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
1411 FLD (f_2_2
) = ((((unsigned int) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
1413 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1416 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1421 case M32C_OPERAND_LAB_16_8
:
1423 long value
= fields
->f_lab_16_8
;
1424 value
= ((value
) - (((pc
) + (2))));
1425 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 16, 8, 32, total_length
, buffer
);
1428 case M32C_OPERAND_LAB_24_8
:
1430 long value
= fields
->f_lab_24_8
;
1431 value
= ((value
) - (((pc
) + (2))));
1432 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 24, 8, 32, total_length
, buffer
);
1435 case M32C_OPERAND_LAB_32_8
:
1437 long value
= fields
->f_lab_32_8
;
1438 value
= ((value
) - (((pc
) + (2))));
1439 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 0, 8, 32, total_length
, buffer
);
1442 case M32C_OPERAND_LAB_40_8
:
1444 long value
= fields
->f_lab_40_8
;
1445 value
= ((value
) - (((pc
) + (2))));
1446 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 8, 8, 32, total_length
, buffer
);
1449 case M32C_OPERAND_LAB_5_3
:
1451 long value
= fields
->f_lab_5_3
;
1452 value
= ((value
) - (((pc
) + (2))));
1453 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, buffer
);
1456 case M32C_OPERAND_LAB_8_16
:
1458 long value
= fields
->f_lab_8_16
;
1459 value
= ((((((((value
) - (((pc
) + (1))))) & (255))) << (8))) | (((unsigned int) (((((value
) - (((pc
) + (1))))) & (65535))) >> (8))));
1460 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGN_OPT
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 16, 32, total_length
, buffer
);
1463 case M32C_OPERAND_LAB_8_24
:
1465 long value
= fields
->f_lab_8_24
;
1466 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1467 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, buffer
);
1470 case M32C_OPERAND_LAB_8_8
:
1472 long value
= fields
->f_lab_8_8
;
1473 value
= ((value
) - (((pc
) + (1))));
1474 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 8, 32, total_length
, buffer
);
1477 case M32C_OPERAND_LAB32_JMP_S
:
1481 tmp_val
= ((((FLD (f_lab32_jmp_s
)) - (pc
))) - (2));
1482 FLD (f_7_1
) = ((tmp_val
) & (1));
1483 FLD (f_2_2
) = ((unsigned int) (tmp_val
) >> (1));
1485 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1488 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1493 case M32C_OPERAND_Q
:
1495 case M32C_OPERAND_R0
:
1497 case M32C_OPERAND_R0H
:
1499 case M32C_OPERAND_R0L
:
1501 case M32C_OPERAND_R1
:
1503 case M32C_OPERAND_R1R2R0
:
1505 case M32C_OPERAND_R2
:
1507 case M32C_OPERAND_R2R0
:
1509 case M32C_OPERAND_R3
:
1511 case M32C_OPERAND_R3R1
:
1513 case M32C_OPERAND_REGSETPOP
:
1514 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1516 case M32C_OPERAND_REGSETPUSH
:
1517 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1519 case M32C_OPERAND_RN16_PUSH_S
:
1520 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
1522 case M32C_OPERAND_S
:
1524 case M32C_OPERAND_SRC16AN
:
1525 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1527 case M32C_OPERAND_SRC16ANHI
:
1528 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1530 case M32C_OPERAND_SRC16ANQI
:
1531 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1533 case M32C_OPERAND_SRC16RNHI
:
1534 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1536 case M32C_OPERAND_SRC16RNQI
:
1537 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1539 case M32C_OPERAND_SRC32ANPREFIXED
:
1540 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1542 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
1543 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1545 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
1546 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1548 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
1549 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1551 case M32C_OPERAND_SRC32ANUNPREFIXED
:
1552 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1554 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
1555 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1557 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
1558 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1560 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
1561 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1563 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
1565 long value
= fields
->f_src32_rn_prefixed_HI
;
1566 value
= ((((value
) + (2))) % (4));
1567 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1570 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
1572 long value
= fields
->f_src32_rn_prefixed_QI
;
1573 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1574 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1577 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
1579 long value
= fields
->f_src32_rn_prefixed_SI
;
1580 value
= ((value
) + (2));
1581 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1584 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
1586 long value
= fields
->f_src32_rn_unprefixed_HI
;
1587 value
= ((((value
) + (2))) % (4));
1588 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1591 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
1593 long value
= fields
->f_src32_rn_unprefixed_QI
;
1594 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1595 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1598 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
1600 long value
= fields
->f_src32_rn_unprefixed_SI
;
1601 value
= ((value
) + (2));
1602 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1605 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
1606 errmsg
= insert_normal (cd
, fields
->f_5_1
, 0, 0, 5, 1, 32, total_length
, buffer
);
1608 case M32C_OPERAND_X
:
1610 case M32C_OPERAND_Z
:
1612 case M32C_OPERAND_COND16_16
:
1613 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1615 case M32C_OPERAND_COND16_24
:
1616 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1618 case M32C_OPERAND_COND16_32
:
1619 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1621 case M32C_OPERAND_COND16C
:
1622 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1624 case M32C_OPERAND_COND16J
:
1625 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1627 case M32C_OPERAND_COND16J5
:
1628 errmsg
= insert_normal (cd
, fields
->f_cond16j_5
, 0, 0, 5, 3, 32, total_length
, buffer
);
1630 case M32C_OPERAND_COND32
:
1633 FLD (f_9_1
) = ((((unsigned int) (FLD (f_cond32
)) >> (3))) & (1));
1634 FLD (f_13_3
) = ((FLD (f_cond32
)) & (7));
1636 errmsg
= insert_normal (cd
, fields
->f_9_1
, 0, 0, 9, 1, 32, total_length
, buffer
);
1639 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1644 case M32C_OPERAND_COND32_16
:
1645 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1647 case M32C_OPERAND_COND32_24
:
1648 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1650 case M32C_OPERAND_COND32_32
:
1651 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1653 case M32C_OPERAND_COND32_40
:
1654 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1656 case M32C_OPERAND_COND32J
:
1659 FLD (f_1_3
) = ((((unsigned int) (FLD (f_cond32j
)) >> (1))) & (7));
1660 FLD (f_7_1
) = ((FLD (f_cond32j
)) & (1));
1662 errmsg
= insert_normal (cd
, fields
->f_1_3
, 0, 0, 1, 3, 32, total_length
, buffer
);
1665 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1670 case M32C_OPERAND_CR1_PREFIXED_32
:
1671 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1673 case M32C_OPERAND_CR1_UNPREFIXED_32
:
1674 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1676 case M32C_OPERAND_CR16
:
1677 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1679 case M32C_OPERAND_CR2_32
:
1680 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1682 case M32C_OPERAND_CR3_PREFIXED_32
:
1683 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1685 case M32C_OPERAND_CR3_UNPREFIXED_32
:
1686 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1688 case M32C_OPERAND_FLAGS16
:
1689 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1691 case M32C_OPERAND_FLAGS32
:
1692 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1694 case M32C_OPERAND_SCCOND32
:
1695 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1697 case M32C_OPERAND_SIZE
:
1701 /* xgettext:c-format */
1702 fprintf (stderr
, _("Unrecognized field %d while building insn.\n"),
1710 int m32c_cgen_extract_operand
1711 (CGEN_CPU_DESC
, int, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
1713 /* Main entry point for operand extraction.
1714 The result is <= 0 for error, >0 for success.
1715 ??? Actual values aren't well defined right now.
1717 This function is basically just a big switch statement. Earlier versions
1718 used tables to look up the function to use, but
1719 - if the table contains both assembler and disassembler functions then
1720 the disassembler contains much of the assembler and vice-versa,
1721 - there's a lot of inlining possibilities as things grow,
1722 - using a switch statement avoids the function call overhead.
1724 This function could be moved into `print_insn_normal', but keeping it
1725 separate makes clear the interface between `print_insn_normal' and each of
1729 m32c_cgen_extract_operand (CGEN_CPU_DESC cd
,
1731 CGEN_EXTRACT_INFO
*ex_info
,
1732 CGEN_INSN_INT insn_value
,
1733 CGEN_FIELDS
* fields
,
1736 /* Assume success (for those operands that are nops). */
1738 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
1742 case M32C_OPERAND_A0
:
1744 case M32C_OPERAND_A1
:
1746 case M32C_OPERAND_AN16_PUSH_S
:
1747 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
1749 case M32C_OPERAND_BIT16AN
:
1750 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
1752 case M32C_OPERAND_BIT16RN
:
1753 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
1755 case M32C_OPERAND_BIT3_S
:
1757 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
1758 if (length
<= 0) break;
1759 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
1760 if (length
<= 0) break;
1762 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
1766 case M32C_OPERAND_BIT32ANPREFIXED
:
1767 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
1769 case M32C_OPERAND_BIT32ANUNPREFIXED
:
1770 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
1772 case M32C_OPERAND_BIT32RNPREFIXED
:
1775 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
1776 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1777 fields
->f_dst32_rn_prefixed_QI
= value
;
1780 case M32C_OPERAND_BIT32RNUNPREFIXED
:
1783 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
1784 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1785 fields
->f_dst32_rn_unprefixed_QI
= value
;
1788 case M32C_OPERAND_BITBASE16_16_S8
:
1789 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
);
1791 case M32C_OPERAND_BITBASE16_16_U16
:
1794 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1795 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1796 fields
->f_dsp_16_u16
= value
;
1799 case M32C_OPERAND_BITBASE16_16_U8
:
1800 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1802 case M32C_OPERAND_BITBASE16_8_U11_S
:
1804 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_bitno16_S
);
1805 if (length
<= 0) break;
1806 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
1807 if (length
<= 0) break;
1809 FLD (f_bitbase16_u11_S
) = ((((FLD (f_dsp_8_u8
)) << (3))) | (FLD (f_bitno16_S
)));
1813 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
1815 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1816 if (length
<= 0) break;
1817 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
);
1818 if (length
<= 0) break;
1820 FLD (f_bitbase32_16_s11_unprefixed
) = ((((FLD (f_dsp_16_s8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1824 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
1826 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1827 if (length
<= 0) break;
1830 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1831 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1832 fields
->f_dsp_16_s16
= value
;
1834 if (length
<= 0) break;
1836 FLD (f_bitbase32_16_s19_unprefixed
) = ((((FLD (f_dsp_16_s16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1840 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
1842 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1843 if (length
<= 0) break;
1844 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1845 if (length
<= 0) break;
1847 FLD (f_bitbase32_16_u11_unprefixed
) = ((((FLD (f_dsp_16_u8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1851 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
1853 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1854 if (length
<= 0) break;
1857 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1858 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1859 fields
->f_dsp_16_u16
= value
;
1861 if (length
<= 0) break;
1863 FLD (f_bitbase32_16_u19_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1867 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
1869 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1870 if (length
<= 0) break;
1873 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1874 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1875 fields
->f_dsp_16_u16
= value
;
1877 if (length
<= 0) break;
1878 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1879 if (length
<= 0) break;
1881 FLD (f_bitbase32_16_u27_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (19))) | (FLD (f_bitno32_unprefixed
)))));
1885 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
1887 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1888 if (length
<= 0) break;
1889 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
);
1890 if (length
<= 0) break;
1892 FLD (f_bitbase32_24_s11_prefixed
) = ((((FLD (f_dsp_24_s8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1896 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
1898 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1899 if (length
<= 0) break;
1900 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1901 if (length
<= 0) break;
1902 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
);
1903 if (length
<= 0) break;
1905 FLD (f_bitbase32_24_s19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_s8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1909 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
1911 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1912 if (length
<= 0) break;
1913 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1914 if (length
<= 0) break;
1916 FLD (f_bitbase32_24_u11_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1920 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
1922 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1923 if (length
<= 0) break;
1924 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1925 if (length
<= 0) break;
1926 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1927 if (length
<= 0) break;
1929 FLD (f_bitbase32_24_u19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1933 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
1935 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1936 if (length
<= 0) break;
1937 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1938 if (length
<= 0) break;
1941 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
1942 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1943 fields
->f_dsp_32_u16
= value
;
1945 if (length
<= 0) break;
1947 FLD (f_bitbase32_24_u27_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u16
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1951 case M32C_OPERAND_BITNO16R
:
1952 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1954 case M32C_OPERAND_BITNO32PREFIXED
:
1955 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1957 case M32C_OPERAND_BITNO32UNPREFIXED
:
1958 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1960 case M32C_OPERAND_DSP_10_U6
:
1961 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 6, 32, total_length
, pc
, & fields
->f_dsp_10_u6
);
1963 case M32C_OPERAND_DSP_16_S16
:
1966 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1967 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1968 fields
->f_dsp_16_s16
= value
;
1971 case M32C_OPERAND_DSP_16_S8
:
1972 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
);
1974 case M32C_OPERAND_DSP_16_U16
:
1977 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1978 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1979 fields
->f_dsp_16_u16
= value
;
1982 case M32C_OPERAND_DSP_16_U20
:
1986 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1987 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1988 fields
->f_dsp_16_u16
= value
;
1990 if (length
<= 0) break;
1991 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1992 if (length
<= 0) break;
1994 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
1998 case M32C_OPERAND_DSP_16_U24
:
2002 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2003 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2004 fields
->f_dsp_16_u16
= value
;
2006 if (length
<= 0) break;
2007 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2008 if (length
<= 0) break;
2010 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
2014 case M32C_OPERAND_DSP_16_U8
:
2015 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2017 case M32C_OPERAND_DSP_24_S16
:
2019 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2020 if (length
<= 0) break;
2021 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2022 if (length
<= 0) break;
2024 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2028 case M32C_OPERAND_DSP_24_S8
:
2029 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
);
2031 case M32C_OPERAND_DSP_24_U16
:
2033 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2034 if (length
<= 0) break;
2035 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2036 if (length
<= 0) break;
2038 FLD (f_dsp_24_u16
) = ((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
)));
2042 case M32C_OPERAND_DSP_24_U20
:
2044 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2045 if (length
<= 0) break;
2048 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2049 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2050 fields
->f_dsp_32_u16
= value
;
2052 if (length
<= 0) break;
2054 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2058 case M32C_OPERAND_DSP_24_U24
:
2060 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2061 if (length
<= 0) break;
2064 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2065 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2066 fields
->f_dsp_32_u16
= value
;
2068 if (length
<= 0) break;
2070 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2074 case M32C_OPERAND_DSP_24_U8
:
2075 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2077 case M32C_OPERAND_DSP_32_S16
:
2080 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2081 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2082 fields
->f_dsp_32_s16
= value
;
2085 case M32C_OPERAND_DSP_32_S8
:
2086 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
);
2088 case M32C_OPERAND_DSP_32_U16
:
2091 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2092 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2093 fields
->f_dsp_32_u16
= value
;
2096 case M32C_OPERAND_DSP_32_U20
:
2099 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2100 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2101 fields
->f_dsp_32_u24
= value
;
2104 case M32C_OPERAND_DSP_32_U24
:
2107 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2108 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2109 fields
->f_dsp_32_u24
= value
;
2112 case M32C_OPERAND_DSP_32_U8
:
2113 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2115 case M32C_OPERAND_DSP_40_S16
:
2118 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2119 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2120 fields
->f_dsp_40_s16
= value
;
2123 case M32C_OPERAND_DSP_40_S8
:
2124 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
);
2126 case M32C_OPERAND_DSP_40_U16
:
2129 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 16, 32, total_length
, pc
, & value
);
2130 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2131 fields
->f_dsp_40_u16
= value
;
2134 case M32C_OPERAND_DSP_40_U24
:
2137 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2138 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2139 fields
->f_dsp_40_u24
= value
;
2142 case M32C_OPERAND_DSP_40_U8
:
2143 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2145 case M32C_OPERAND_DSP_48_S16
:
2148 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2149 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2150 fields
->f_dsp_48_s16
= value
;
2153 case M32C_OPERAND_DSP_48_S8
:
2154 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
);
2156 case M32C_OPERAND_DSP_48_U16
:
2159 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2160 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2161 fields
->f_dsp_48_u16
= value
;
2164 case M32C_OPERAND_DSP_48_U24
:
2168 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2169 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2170 fields
->f_dsp_48_u16
= value
;
2172 if (length
<= 0) break;
2173 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2174 if (length
<= 0) break;
2176 FLD (f_dsp_48_u24
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (16711680))));
2180 case M32C_OPERAND_DSP_48_U8
:
2181 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_48_u8
);
2183 case M32C_OPERAND_DSP_8_S24
:
2186 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, pc
, & value
);
2187 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
2188 fields
->f_dsp_8_s24
= value
;
2191 case M32C_OPERAND_DSP_8_S8
:
2192 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
);
2194 case M32C_OPERAND_DSP_8_U16
:
2197 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 16, 32, total_length
, pc
, & value
);
2198 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2199 fields
->f_dsp_8_u16
= value
;
2202 case M32C_OPERAND_DSP_8_U24
:
2205 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 24, 32, total_length
, pc
, & value
);
2206 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2207 fields
->f_dsp_8_u24
= value
;
2210 case M32C_OPERAND_DSP_8_U6
:
2211 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 6, 32, total_length
, pc
, & fields
->f_dsp_8_u6
);
2213 case M32C_OPERAND_DSP_8_U8
:
2214 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
2216 case M32C_OPERAND_DST16AN
:
2217 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2219 case M32C_OPERAND_DST16AN_S
:
2220 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_dst16_an_s
);
2222 case M32C_OPERAND_DST16ANHI
:
2223 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2225 case M32C_OPERAND_DST16ANQI
:
2226 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2228 case M32C_OPERAND_DST16ANQI_S
:
2229 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2231 case M32C_OPERAND_DST16ANSI
:
2232 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2234 case M32C_OPERAND_DST16RNEXTQI
:
2235 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_ext
);
2237 case M32C_OPERAND_DST16RNHI
:
2238 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2240 case M32C_OPERAND_DST16RNQI
:
2241 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2243 case M32C_OPERAND_DST16RNQI_S
:
2244 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2246 case M32C_OPERAND_DST16RNSI
:
2247 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2249 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
2250 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2252 case M32C_OPERAND_DST32ANPREFIXED
:
2253 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2255 case M32C_OPERAND_DST32ANPREFIXEDHI
:
2256 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2258 case M32C_OPERAND_DST32ANPREFIXEDQI
:
2259 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2261 case M32C_OPERAND_DST32ANPREFIXEDSI
:
2262 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2264 case M32C_OPERAND_DST32ANUNPREFIXED
:
2265 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2267 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
2268 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2270 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
2271 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2273 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
2274 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2276 case M32C_OPERAND_DST32R0HI_S
:
2278 case M32C_OPERAND_DST32R0QI_S
:
2280 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
2281 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2283 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
2284 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2286 case M32C_OPERAND_DST32RNPREFIXEDHI
:
2289 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2290 value
= ((((value
) + (2))) % (4));
2291 fields
->f_dst32_rn_prefixed_HI
= value
;
2294 case M32C_OPERAND_DST32RNPREFIXEDQI
:
2297 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2298 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2299 fields
->f_dst32_rn_prefixed_QI
= value
;
2302 case M32C_OPERAND_DST32RNPREFIXEDSI
:
2305 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2306 value
= ((value
) - (2));
2307 fields
->f_dst32_rn_prefixed_SI
= value
;
2310 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
2313 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2314 value
= ((((value
) + (2))) % (4));
2315 fields
->f_dst32_rn_unprefixed_HI
= value
;
2318 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
2321 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2322 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2323 fields
->f_dst32_rn_unprefixed_QI
= value
;
2326 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
2329 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2330 value
= ((value
) - (2));
2331 fields
->f_dst32_rn_unprefixed_SI
= value
;
2334 case M32C_OPERAND_G
:
2336 case M32C_OPERAND_IMM_12_S4
:
2337 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
);
2339 case M32C_OPERAND_IMM_12_S4N
:
2340 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
);
2342 case M32C_OPERAND_IMM_13_U3
:
2343 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_imm_13_u3
);
2345 case M32C_OPERAND_IMM_16_HI
:
2348 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2349 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2350 fields
->f_dsp_16_s16
= value
;
2353 case M32C_OPERAND_IMM_16_QI
:
2354 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
);
2356 case M32C_OPERAND_IMM_16_SI
:
2360 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2361 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2362 fields
->f_dsp_16_u16
= value
;
2364 if (length
<= 0) break;
2367 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2368 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2369 fields
->f_dsp_32_u16
= value
;
2371 if (length
<= 0) break;
2373 FLD (f_dsp_16_s32
) = ((((FLD (f_dsp_16_u16
)) & (65535))) | (((((FLD (f_dsp_32_u16
)) << (16))) & (0xffff0000))));
2377 case M32C_OPERAND_IMM_20_S4
:
2378 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
);
2380 case M32C_OPERAND_IMM_24_HI
:
2382 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2383 if (length
<= 0) break;
2384 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2385 if (length
<= 0) break;
2387 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2391 case M32C_OPERAND_IMM_24_QI
:
2392 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
);
2394 case M32C_OPERAND_IMM_24_SI
:
2396 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2397 if (length
<= 0) break;
2400 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2401 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2402 fields
->f_dsp_32_u24
= value
;
2404 if (length
<= 0) break;
2406 FLD (f_dsp_24_s32
) = ((((FLD (f_dsp_24_u8
)) & (255))) | (((((FLD (f_dsp_32_u24
)) << (8))) & (0xffffff00))));
2410 case M32C_OPERAND_IMM_32_HI
:
2413 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2414 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2415 fields
->f_dsp_32_s16
= value
;
2418 case M32C_OPERAND_IMM_32_QI
:
2419 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
);
2421 case M32C_OPERAND_IMM_32_SI
:
2424 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, pc
, & value
);
2425 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
2426 fields
->f_dsp_32_s32
= value
;
2429 case M32C_OPERAND_IMM_40_HI
:
2432 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2433 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2434 fields
->f_dsp_40_s16
= value
;
2437 case M32C_OPERAND_IMM_40_QI
:
2438 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
);
2440 case M32C_OPERAND_IMM_40_SI
:
2444 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2445 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2446 fields
->f_dsp_40_u24
= value
;
2448 if (length
<= 0) break;
2449 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2450 if (length
<= 0) break;
2452 FLD (f_dsp_40_s32
) = ((((FLD (f_dsp_40_u24
)) & (16777215))) | (((((FLD (f_dsp_64_u8
)) << (24))) & (0xff000000))));
2456 case M32C_OPERAND_IMM_48_HI
:
2459 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2460 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2461 fields
->f_dsp_48_s16
= value
;
2464 case M32C_OPERAND_IMM_48_QI
:
2465 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
);
2467 case M32C_OPERAND_IMM_48_SI
:
2471 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2472 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2473 fields
->f_dsp_48_u16
= value
;
2475 if (length
<= 0) break;
2478 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 16, 32, total_length
, pc
, & value
);
2479 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2480 fields
->f_dsp_64_u16
= value
;
2482 if (length
<= 0) break;
2484 FLD (f_dsp_48_s32
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u16
)) << (16))) & (0xffff0000))));
2488 case M32C_OPERAND_IMM_56_HI
:
2490 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_56_u8
);
2491 if (length
<= 0) break;
2492 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2493 if (length
<= 0) break;
2495 FLD (f_dsp_56_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_64_u8
)) << (8))) | (FLD (f_dsp_56_u8
))))));
2499 case M32C_OPERAND_IMM_56_QI
:
2500 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
);
2502 case M32C_OPERAND_IMM_64_HI
:
2505 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, pc
, & value
);
2506 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2507 fields
->f_dsp_64_s16
= value
;
2510 case M32C_OPERAND_IMM_8_HI
:
2513 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, pc
, & value
);
2514 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2515 fields
->f_dsp_8_s16
= value
;
2518 case M32C_OPERAND_IMM_8_QI
:
2519 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
);
2521 case M32C_OPERAND_IMM_8_S4
:
2522 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
);
2524 case M32C_OPERAND_IMM_8_S4N
:
2525 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
);
2527 case M32C_OPERAND_IMM_SH_12_S4
:
2528 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
);
2530 case M32C_OPERAND_IMM_SH_20_S4
:
2531 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
);
2533 case M32C_OPERAND_IMM_SH_8_S4
:
2534 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
);
2536 case M32C_OPERAND_IMM1_S
:
2539 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 1, 32, total_length
, pc
, & value
);
2540 value
= ((value
) + (1));
2541 fields
->f_imm1_S
= value
;
2544 case M32C_OPERAND_IMM3_S
:
2546 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2547 if (length
<= 0) break;
2548 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2549 if (length
<= 0) break;
2551 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
2555 case M32C_OPERAND_LAB_16_8
:
2558 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
);
2559 value
= ((value
) + (((pc
) + (2))));
2560 fields
->f_lab_16_8
= value
;
2563 case M32C_OPERAND_LAB_24_8
:
2566 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
);
2567 value
= ((value
) + (((pc
) + (2))));
2568 fields
->f_lab_24_8
= value
;
2571 case M32C_OPERAND_LAB_32_8
:
2574 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
);
2575 value
= ((value
) + (((pc
) + (2))));
2576 fields
->f_lab_32_8
= value
;
2579 case M32C_OPERAND_LAB_40_8
:
2582 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
);
2583 value
= ((value
) + (((pc
) + (2))));
2584 fields
->f_lab_40_8
= value
;
2587 case M32C_OPERAND_LAB_5_3
:
2590 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, pc
, & value
);
2591 value
= ((value
) + (((pc
) + (2))));
2592 fields
->f_lab_5_3
= value
;
2595 case M32C_OPERAND_LAB_8_16
:
2598 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
);
2599 value
= ((((((unsigned int) (((value
) & (65535))) >> (8))) | (((int) (((((value
) & (255))) << (24))) >> (16))))) + (((pc
) + (1))));
2600 fields
->f_lab_8_16
= value
;
2603 case M32C_OPERAND_LAB_8_24
:
2606 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, pc
, & value
);
2607 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2608 fields
->f_lab_8_24
= value
;
2611 case M32C_OPERAND_LAB_8_8
:
2614 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
);
2615 value
= ((value
) + (((pc
) + (1))));
2616 fields
->f_lab_8_8
= value
;
2619 case M32C_OPERAND_LAB32_JMP_S
:
2621 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2622 if (length
<= 0) break;
2623 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2624 if (length
<= 0) break;
2626 FLD (f_lab32_jmp_s
) = ((pc
) + (((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (2))));
2630 case M32C_OPERAND_Q
:
2632 case M32C_OPERAND_R0
:
2634 case M32C_OPERAND_R0H
:
2636 case M32C_OPERAND_R0L
:
2638 case M32C_OPERAND_R1
:
2640 case M32C_OPERAND_R1R2R0
:
2642 case M32C_OPERAND_R2
:
2644 case M32C_OPERAND_R2R0
:
2646 case M32C_OPERAND_R3
:
2648 case M32C_OPERAND_R3R1
:
2650 case M32C_OPERAND_REGSETPOP
:
2651 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2653 case M32C_OPERAND_REGSETPUSH
:
2654 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2656 case M32C_OPERAND_RN16_PUSH_S
:
2657 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
2659 case M32C_OPERAND_S
:
2661 case M32C_OPERAND_SRC16AN
:
2662 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2664 case M32C_OPERAND_SRC16ANHI
:
2665 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2667 case M32C_OPERAND_SRC16ANQI
:
2668 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2670 case M32C_OPERAND_SRC16RNHI
:
2671 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2673 case M32C_OPERAND_SRC16RNQI
:
2674 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2676 case M32C_OPERAND_SRC32ANPREFIXED
:
2677 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2679 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
2680 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2682 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
2683 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2685 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
2686 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2688 case M32C_OPERAND_SRC32ANUNPREFIXED
:
2689 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2691 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
2692 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2694 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
2695 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2697 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
2698 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2700 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
2703 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2704 value
= ((((value
) + (2))) % (4));
2705 fields
->f_src32_rn_prefixed_HI
= value
;
2708 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
2711 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2712 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2713 fields
->f_src32_rn_prefixed_QI
= value
;
2716 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
2719 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2720 value
= ((value
) - (2));
2721 fields
->f_src32_rn_prefixed_SI
= value
;
2724 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
2727 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2728 value
= ((((value
) + (2))) % (4));
2729 fields
->f_src32_rn_unprefixed_HI
= value
;
2732 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
2735 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2736 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2737 fields
->f_src32_rn_unprefixed_QI
= value
;
2740 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
2743 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2744 value
= ((value
) - (2));
2745 fields
->f_src32_rn_unprefixed_SI
= value
;
2748 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
2749 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_5_1
);
2751 case M32C_OPERAND_X
:
2753 case M32C_OPERAND_Z
:
2755 case M32C_OPERAND_COND16_16
:
2756 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2758 case M32C_OPERAND_COND16_24
:
2759 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2761 case M32C_OPERAND_COND16_32
:
2762 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2764 case M32C_OPERAND_COND16C
:
2765 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2767 case M32C_OPERAND_COND16J
:
2768 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2770 case M32C_OPERAND_COND16J5
:
2771 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_cond16j_5
);
2773 case M32C_OPERAND_COND32
:
2775 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_9_1
);
2776 if (length
<= 0) break;
2777 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2778 if (length
<= 0) break;
2780 FLD (f_cond32
) = ((((FLD (f_9_1
)) << (3))) | (FLD (f_13_3
)));
2784 case M32C_OPERAND_COND32_16
:
2785 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2787 case M32C_OPERAND_COND32_24
:
2788 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2790 case M32C_OPERAND_COND32_32
:
2791 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2793 case M32C_OPERAND_COND32_40
:
2794 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2796 case M32C_OPERAND_COND32J
:
2798 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 1, 3, 32, total_length
, pc
, & fields
->f_1_3
);
2799 if (length
<= 0) break;
2800 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2801 if (length
<= 0) break;
2803 FLD (f_cond32j
) = ((((FLD (f_1_3
)) << (1))) | (FLD (f_7_1
)));
2807 case M32C_OPERAND_CR1_PREFIXED_32
:
2808 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2810 case M32C_OPERAND_CR1_UNPREFIXED_32
:
2811 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2813 case M32C_OPERAND_CR16
:
2814 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2816 case M32C_OPERAND_CR2_32
:
2817 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2819 case M32C_OPERAND_CR3_PREFIXED_32
:
2820 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2822 case M32C_OPERAND_CR3_UNPREFIXED_32
:
2823 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2825 case M32C_OPERAND_FLAGS16
:
2826 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2828 case M32C_OPERAND_FLAGS32
:
2829 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2831 case M32C_OPERAND_SCCOND32
:
2832 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2834 case M32C_OPERAND_SIZE
:
2838 /* xgettext:c-format */
2839 fprintf (stderr
, _("Unrecognized field %d while decoding insn.\n"),
2847 cgen_insert_fn
* const m32c_cgen_insert_handlers
[] =
2852 cgen_extract_fn
* const m32c_cgen_extract_handlers
[] =
2854 extract_insn_normal
,
2857 int m32c_cgen_get_int_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2858 bfd_vma
m32c_cgen_get_vma_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2860 /* Getting values from cgen_fields is handled by a collection of functions.
2861 They are distinguished by the type of the VALUE argument they return.
2862 TODO: floating point, inlining support, remove cases where result type
2866 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
2868 const CGEN_FIELDS
* fields
)
2874 case M32C_OPERAND_A0
:
2877 case M32C_OPERAND_A1
:
2880 case M32C_OPERAND_AN16_PUSH_S
:
2881 value
= fields
->f_4_1
;
2883 case M32C_OPERAND_BIT16AN
:
2884 value
= fields
->f_dst16_an
;
2886 case M32C_OPERAND_BIT16RN
:
2887 value
= fields
->f_dst16_rn
;
2889 case M32C_OPERAND_BIT3_S
:
2890 value
= fields
->f_imm3_S
;
2892 case M32C_OPERAND_BIT32ANPREFIXED
:
2893 value
= fields
->f_dst32_an_prefixed
;
2895 case M32C_OPERAND_BIT32ANUNPREFIXED
:
2896 value
= fields
->f_dst32_an_unprefixed
;
2898 case M32C_OPERAND_BIT32RNPREFIXED
:
2899 value
= fields
->f_dst32_rn_prefixed_QI
;
2901 case M32C_OPERAND_BIT32RNUNPREFIXED
:
2902 value
= fields
->f_dst32_rn_unprefixed_QI
;
2904 case M32C_OPERAND_BITBASE16_16_S8
:
2905 value
= fields
->f_dsp_16_s8
;
2907 case M32C_OPERAND_BITBASE16_16_U16
:
2908 value
= fields
->f_dsp_16_u16
;
2910 case M32C_OPERAND_BITBASE16_16_U8
:
2911 value
= fields
->f_dsp_16_u8
;
2913 case M32C_OPERAND_BITBASE16_8_U11_S
:
2914 value
= fields
->f_bitbase16_u11_S
;
2916 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
2917 value
= fields
->f_bitbase32_16_s11_unprefixed
;
2919 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
2920 value
= fields
->f_bitbase32_16_s19_unprefixed
;
2922 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
2923 value
= fields
->f_bitbase32_16_u11_unprefixed
;
2925 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
2926 value
= fields
->f_bitbase32_16_u19_unprefixed
;
2928 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
2929 value
= fields
->f_bitbase32_16_u27_unprefixed
;
2931 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
2932 value
= fields
->f_bitbase32_24_s11_prefixed
;
2934 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
2935 value
= fields
->f_bitbase32_24_s19_prefixed
;
2937 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
2938 value
= fields
->f_bitbase32_24_u11_prefixed
;
2940 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
2941 value
= fields
->f_bitbase32_24_u19_prefixed
;
2943 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
2944 value
= fields
->f_bitbase32_24_u27_prefixed
;
2946 case M32C_OPERAND_BITNO16R
:
2947 value
= fields
->f_dsp_16_u8
;
2949 case M32C_OPERAND_BITNO32PREFIXED
:
2950 value
= fields
->f_bitno32_prefixed
;
2952 case M32C_OPERAND_BITNO32UNPREFIXED
:
2953 value
= fields
->f_bitno32_unprefixed
;
2955 case M32C_OPERAND_DSP_10_U6
:
2956 value
= fields
->f_dsp_10_u6
;
2958 case M32C_OPERAND_DSP_16_S16
:
2959 value
= fields
->f_dsp_16_s16
;
2961 case M32C_OPERAND_DSP_16_S8
:
2962 value
= fields
->f_dsp_16_s8
;
2964 case M32C_OPERAND_DSP_16_U16
:
2965 value
= fields
->f_dsp_16_u16
;
2967 case M32C_OPERAND_DSP_16_U20
:
2968 value
= fields
->f_dsp_16_u24
;
2970 case M32C_OPERAND_DSP_16_U24
:
2971 value
= fields
->f_dsp_16_u24
;
2973 case M32C_OPERAND_DSP_16_U8
:
2974 value
= fields
->f_dsp_16_u8
;
2976 case M32C_OPERAND_DSP_24_S16
:
2977 value
= fields
->f_dsp_24_s16
;
2979 case M32C_OPERAND_DSP_24_S8
:
2980 value
= fields
->f_dsp_24_s8
;
2982 case M32C_OPERAND_DSP_24_U16
:
2983 value
= fields
->f_dsp_24_u16
;
2985 case M32C_OPERAND_DSP_24_U20
:
2986 value
= fields
->f_dsp_24_u24
;
2988 case M32C_OPERAND_DSP_24_U24
:
2989 value
= fields
->f_dsp_24_u24
;
2991 case M32C_OPERAND_DSP_24_U8
:
2992 value
= fields
->f_dsp_24_u8
;
2994 case M32C_OPERAND_DSP_32_S16
:
2995 value
= fields
->f_dsp_32_s16
;
2997 case M32C_OPERAND_DSP_32_S8
:
2998 value
= fields
->f_dsp_32_s8
;
3000 case M32C_OPERAND_DSP_32_U16
:
3001 value
= fields
->f_dsp_32_u16
;
3003 case M32C_OPERAND_DSP_32_U20
:
3004 value
= fields
->f_dsp_32_u24
;
3006 case M32C_OPERAND_DSP_32_U24
:
3007 value
= fields
->f_dsp_32_u24
;
3009 case M32C_OPERAND_DSP_32_U8
:
3010 value
= fields
->f_dsp_32_u8
;
3012 case M32C_OPERAND_DSP_40_S16
:
3013 value
= fields
->f_dsp_40_s16
;
3015 case M32C_OPERAND_DSP_40_S8
:
3016 value
= fields
->f_dsp_40_s8
;
3018 case M32C_OPERAND_DSP_40_U16
:
3019 value
= fields
->f_dsp_40_u16
;
3021 case M32C_OPERAND_DSP_40_U24
:
3022 value
= fields
->f_dsp_40_u24
;
3024 case M32C_OPERAND_DSP_40_U8
:
3025 value
= fields
->f_dsp_40_u8
;
3027 case M32C_OPERAND_DSP_48_S16
:
3028 value
= fields
->f_dsp_48_s16
;
3030 case M32C_OPERAND_DSP_48_S8
:
3031 value
= fields
->f_dsp_48_s8
;
3033 case M32C_OPERAND_DSP_48_U16
:
3034 value
= fields
->f_dsp_48_u16
;
3036 case M32C_OPERAND_DSP_48_U24
:
3037 value
= fields
->f_dsp_48_u24
;
3039 case M32C_OPERAND_DSP_48_U8
:
3040 value
= fields
->f_dsp_48_u8
;
3042 case M32C_OPERAND_DSP_8_S24
:
3043 value
= fields
->f_dsp_8_s24
;
3045 case M32C_OPERAND_DSP_8_S8
:
3046 value
= fields
->f_dsp_8_s8
;
3048 case M32C_OPERAND_DSP_8_U16
:
3049 value
= fields
->f_dsp_8_u16
;
3051 case M32C_OPERAND_DSP_8_U24
:
3052 value
= fields
->f_dsp_8_u24
;
3054 case M32C_OPERAND_DSP_8_U6
:
3055 value
= fields
->f_dsp_8_u6
;
3057 case M32C_OPERAND_DSP_8_U8
:
3058 value
= fields
->f_dsp_8_u8
;
3060 case M32C_OPERAND_DST16AN
:
3061 value
= fields
->f_dst16_an
;
3063 case M32C_OPERAND_DST16AN_S
:
3064 value
= fields
->f_dst16_an_s
;
3066 case M32C_OPERAND_DST16ANHI
:
3067 value
= fields
->f_dst16_an
;
3069 case M32C_OPERAND_DST16ANQI
:
3070 value
= fields
->f_dst16_an
;
3072 case M32C_OPERAND_DST16ANQI_S
:
3073 value
= fields
->f_dst16_rn_QI_s
;
3075 case M32C_OPERAND_DST16ANSI
:
3076 value
= fields
->f_dst16_an
;
3078 case M32C_OPERAND_DST16RNEXTQI
:
3079 value
= fields
->f_dst16_rn_ext
;
3081 case M32C_OPERAND_DST16RNHI
:
3082 value
= fields
->f_dst16_rn
;
3084 case M32C_OPERAND_DST16RNQI
:
3085 value
= fields
->f_dst16_rn
;
3087 case M32C_OPERAND_DST16RNQI_S
:
3088 value
= fields
->f_dst16_rn_QI_s
;
3090 case M32C_OPERAND_DST16RNSI
:
3091 value
= fields
->f_dst16_rn
;
3093 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3094 value
= fields
->f_dst32_an_unprefixed
;
3096 case M32C_OPERAND_DST32ANPREFIXED
:
3097 value
= fields
->f_dst32_an_prefixed
;
3099 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3100 value
= fields
->f_dst32_an_prefixed
;
3102 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3103 value
= fields
->f_dst32_an_prefixed
;
3105 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3106 value
= fields
->f_dst32_an_prefixed
;
3108 case M32C_OPERAND_DST32ANUNPREFIXED
:
3109 value
= fields
->f_dst32_an_unprefixed
;
3111 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3112 value
= fields
->f_dst32_an_unprefixed
;
3114 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3115 value
= fields
->f_dst32_an_unprefixed
;
3117 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3118 value
= fields
->f_dst32_an_unprefixed
;
3120 case M32C_OPERAND_DST32R0HI_S
:
3123 case M32C_OPERAND_DST32R0QI_S
:
3126 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3127 value
= fields
->f_dst32_rn_ext_unprefixed
;
3129 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3130 value
= fields
->f_dst32_rn_ext_unprefixed
;
3132 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3133 value
= fields
->f_dst32_rn_prefixed_HI
;
3135 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3136 value
= fields
->f_dst32_rn_prefixed_QI
;
3138 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3139 value
= fields
->f_dst32_rn_prefixed_SI
;
3141 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3142 value
= fields
->f_dst32_rn_unprefixed_HI
;
3144 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3145 value
= fields
->f_dst32_rn_unprefixed_QI
;
3147 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3148 value
= fields
->f_dst32_rn_unprefixed_SI
;
3150 case M32C_OPERAND_G
:
3153 case M32C_OPERAND_IMM_12_S4
:
3154 value
= fields
->f_imm_12_s4
;
3156 case M32C_OPERAND_IMM_12_S4N
:
3157 value
= fields
->f_imm_12_s4
;
3159 case M32C_OPERAND_IMM_13_U3
:
3160 value
= fields
->f_imm_13_u3
;
3162 case M32C_OPERAND_IMM_16_HI
:
3163 value
= fields
->f_dsp_16_s16
;
3165 case M32C_OPERAND_IMM_16_QI
:
3166 value
= fields
->f_dsp_16_s8
;
3168 case M32C_OPERAND_IMM_16_SI
:
3169 value
= fields
->f_dsp_16_s32
;
3171 case M32C_OPERAND_IMM_20_S4
:
3172 value
= fields
->f_imm_20_s4
;
3174 case M32C_OPERAND_IMM_24_HI
:
3175 value
= fields
->f_dsp_24_s16
;
3177 case M32C_OPERAND_IMM_24_QI
:
3178 value
= fields
->f_dsp_24_s8
;
3180 case M32C_OPERAND_IMM_24_SI
:
3181 value
= fields
->f_dsp_24_s32
;
3183 case M32C_OPERAND_IMM_32_HI
:
3184 value
= fields
->f_dsp_32_s16
;
3186 case M32C_OPERAND_IMM_32_QI
:
3187 value
= fields
->f_dsp_32_s8
;
3189 case M32C_OPERAND_IMM_32_SI
:
3190 value
= fields
->f_dsp_32_s32
;
3192 case M32C_OPERAND_IMM_40_HI
:
3193 value
= fields
->f_dsp_40_s16
;
3195 case M32C_OPERAND_IMM_40_QI
:
3196 value
= fields
->f_dsp_40_s8
;
3198 case M32C_OPERAND_IMM_40_SI
:
3199 value
= fields
->f_dsp_40_s32
;
3201 case M32C_OPERAND_IMM_48_HI
:
3202 value
= fields
->f_dsp_48_s16
;
3204 case M32C_OPERAND_IMM_48_QI
:
3205 value
= fields
->f_dsp_48_s8
;
3207 case M32C_OPERAND_IMM_48_SI
:
3208 value
= fields
->f_dsp_48_s32
;
3210 case M32C_OPERAND_IMM_56_HI
:
3211 value
= fields
->f_dsp_56_s16
;
3213 case M32C_OPERAND_IMM_56_QI
:
3214 value
= fields
->f_dsp_56_s8
;
3216 case M32C_OPERAND_IMM_64_HI
:
3217 value
= fields
->f_dsp_64_s16
;
3219 case M32C_OPERAND_IMM_8_HI
:
3220 value
= fields
->f_dsp_8_s16
;
3222 case M32C_OPERAND_IMM_8_QI
:
3223 value
= fields
->f_dsp_8_s8
;
3225 case M32C_OPERAND_IMM_8_S4
:
3226 value
= fields
->f_imm_8_s4
;
3228 case M32C_OPERAND_IMM_8_S4N
:
3229 value
= fields
->f_imm_8_s4
;
3231 case M32C_OPERAND_IMM_SH_12_S4
:
3232 value
= fields
->f_imm_12_s4
;
3234 case M32C_OPERAND_IMM_SH_20_S4
:
3235 value
= fields
->f_imm_20_s4
;
3237 case M32C_OPERAND_IMM_SH_8_S4
:
3238 value
= fields
->f_imm_8_s4
;
3240 case M32C_OPERAND_IMM1_S
:
3241 value
= fields
->f_imm1_S
;
3243 case M32C_OPERAND_IMM3_S
:
3244 value
= fields
->f_imm3_S
;
3246 case M32C_OPERAND_LAB_16_8
:
3247 value
= fields
->f_lab_16_8
;
3249 case M32C_OPERAND_LAB_24_8
:
3250 value
= fields
->f_lab_24_8
;
3252 case M32C_OPERAND_LAB_32_8
:
3253 value
= fields
->f_lab_32_8
;
3255 case M32C_OPERAND_LAB_40_8
:
3256 value
= fields
->f_lab_40_8
;
3258 case M32C_OPERAND_LAB_5_3
:
3259 value
= fields
->f_lab_5_3
;
3261 case M32C_OPERAND_LAB_8_16
:
3262 value
= fields
->f_lab_8_16
;
3264 case M32C_OPERAND_LAB_8_24
:
3265 value
= fields
->f_lab_8_24
;
3267 case M32C_OPERAND_LAB_8_8
:
3268 value
= fields
->f_lab_8_8
;
3270 case M32C_OPERAND_LAB32_JMP_S
:
3271 value
= fields
->f_lab32_jmp_s
;
3273 case M32C_OPERAND_Q
:
3276 case M32C_OPERAND_R0
:
3279 case M32C_OPERAND_R0H
:
3282 case M32C_OPERAND_R0L
:
3285 case M32C_OPERAND_R1
:
3288 case M32C_OPERAND_R1R2R0
:
3291 case M32C_OPERAND_R2
:
3294 case M32C_OPERAND_R2R0
:
3297 case M32C_OPERAND_R3
:
3300 case M32C_OPERAND_R3R1
:
3303 case M32C_OPERAND_REGSETPOP
:
3304 value
= fields
->f_8_8
;
3306 case M32C_OPERAND_REGSETPUSH
:
3307 value
= fields
->f_8_8
;
3309 case M32C_OPERAND_RN16_PUSH_S
:
3310 value
= fields
->f_4_1
;
3312 case M32C_OPERAND_S
:
3315 case M32C_OPERAND_SRC16AN
:
3316 value
= fields
->f_src16_an
;
3318 case M32C_OPERAND_SRC16ANHI
:
3319 value
= fields
->f_src16_an
;
3321 case M32C_OPERAND_SRC16ANQI
:
3322 value
= fields
->f_src16_an
;
3324 case M32C_OPERAND_SRC16RNHI
:
3325 value
= fields
->f_src16_rn
;
3327 case M32C_OPERAND_SRC16RNQI
:
3328 value
= fields
->f_src16_rn
;
3330 case M32C_OPERAND_SRC32ANPREFIXED
:
3331 value
= fields
->f_src32_an_prefixed
;
3333 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3334 value
= fields
->f_src32_an_prefixed
;
3336 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3337 value
= fields
->f_src32_an_prefixed
;
3339 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3340 value
= fields
->f_src32_an_prefixed
;
3342 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3343 value
= fields
->f_src32_an_unprefixed
;
3345 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3346 value
= fields
->f_src32_an_unprefixed
;
3348 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3349 value
= fields
->f_src32_an_unprefixed
;
3351 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3352 value
= fields
->f_src32_an_unprefixed
;
3354 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3355 value
= fields
->f_src32_rn_prefixed_HI
;
3357 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3358 value
= fields
->f_src32_rn_prefixed_QI
;
3360 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3361 value
= fields
->f_src32_rn_prefixed_SI
;
3363 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3364 value
= fields
->f_src32_rn_unprefixed_HI
;
3366 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3367 value
= fields
->f_src32_rn_unprefixed_QI
;
3369 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3370 value
= fields
->f_src32_rn_unprefixed_SI
;
3372 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3373 value
= fields
->f_5_1
;
3375 case M32C_OPERAND_X
:
3378 case M32C_OPERAND_Z
:
3381 case M32C_OPERAND_COND16_16
:
3382 value
= fields
->f_dsp_16_u8
;
3384 case M32C_OPERAND_COND16_24
:
3385 value
= fields
->f_dsp_24_u8
;
3387 case M32C_OPERAND_COND16_32
:
3388 value
= fields
->f_dsp_32_u8
;
3390 case M32C_OPERAND_COND16C
:
3391 value
= fields
->f_cond16
;
3393 case M32C_OPERAND_COND16J
:
3394 value
= fields
->f_cond16
;
3396 case M32C_OPERAND_COND16J5
:
3397 value
= fields
->f_cond16j_5
;
3399 case M32C_OPERAND_COND32
:
3400 value
= fields
->f_cond32
;
3402 case M32C_OPERAND_COND32_16
:
3403 value
= fields
->f_dsp_16_u8
;
3405 case M32C_OPERAND_COND32_24
:
3406 value
= fields
->f_dsp_24_u8
;
3408 case M32C_OPERAND_COND32_32
:
3409 value
= fields
->f_dsp_32_u8
;
3411 case M32C_OPERAND_COND32_40
:
3412 value
= fields
->f_dsp_40_u8
;
3414 case M32C_OPERAND_COND32J
:
3415 value
= fields
->f_cond32j
;
3417 case M32C_OPERAND_CR1_PREFIXED_32
:
3418 value
= fields
->f_21_3
;
3420 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3421 value
= fields
->f_13_3
;
3423 case M32C_OPERAND_CR16
:
3424 value
= fields
->f_9_3
;
3426 case M32C_OPERAND_CR2_32
:
3427 value
= fields
->f_13_3
;
3429 case M32C_OPERAND_CR3_PREFIXED_32
:
3430 value
= fields
->f_21_3
;
3432 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3433 value
= fields
->f_13_3
;
3435 case M32C_OPERAND_FLAGS16
:
3436 value
= fields
->f_9_3
;
3438 case M32C_OPERAND_FLAGS32
:
3439 value
= fields
->f_13_3
;
3441 case M32C_OPERAND_SCCOND32
:
3442 value
= fields
->f_cond16
;
3444 case M32C_OPERAND_SIZE
:
3449 /* xgettext:c-format */
3450 fprintf (stderr
, _("Unrecognized field %d while getting int operand.\n"),
3459 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3461 const CGEN_FIELDS
* fields
)
3467 case M32C_OPERAND_A0
:
3470 case M32C_OPERAND_A1
:
3473 case M32C_OPERAND_AN16_PUSH_S
:
3474 value
= fields
->f_4_1
;
3476 case M32C_OPERAND_BIT16AN
:
3477 value
= fields
->f_dst16_an
;
3479 case M32C_OPERAND_BIT16RN
:
3480 value
= fields
->f_dst16_rn
;
3482 case M32C_OPERAND_BIT3_S
:
3483 value
= fields
->f_imm3_S
;
3485 case M32C_OPERAND_BIT32ANPREFIXED
:
3486 value
= fields
->f_dst32_an_prefixed
;
3488 case M32C_OPERAND_BIT32ANUNPREFIXED
:
3489 value
= fields
->f_dst32_an_unprefixed
;
3491 case M32C_OPERAND_BIT32RNPREFIXED
:
3492 value
= fields
->f_dst32_rn_prefixed_QI
;
3494 case M32C_OPERAND_BIT32RNUNPREFIXED
:
3495 value
= fields
->f_dst32_rn_unprefixed_QI
;
3497 case M32C_OPERAND_BITBASE16_16_S8
:
3498 value
= fields
->f_dsp_16_s8
;
3500 case M32C_OPERAND_BITBASE16_16_U16
:
3501 value
= fields
->f_dsp_16_u16
;
3503 case M32C_OPERAND_BITBASE16_16_U8
:
3504 value
= fields
->f_dsp_16_u8
;
3506 case M32C_OPERAND_BITBASE16_8_U11_S
:
3507 value
= fields
->f_bitbase16_u11_S
;
3509 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
3510 value
= fields
->f_bitbase32_16_s11_unprefixed
;
3512 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
3513 value
= fields
->f_bitbase32_16_s19_unprefixed
;
3515 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
3516 value
= fields
->f_bitbase32_16_u11_unprefixed
;
3518 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
3519 value
= fields
->f_bitbase32_16_u19_unprefixed
;
3521 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
3522 value
= fields
->f_bitbase32_16_u27_unprefixed
;
3524 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
3525 value
= fields
->f_bitbase32_24_s11_prefixed
;
3527 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
3528 value
= fields
->f_bitbase32_24_s19_prefixed
;
3530 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
3531 value
= fields
->f_bitbase32_24_u11_prefixed
;
3533 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3534 value
= fields
->f_bitbase32_24_u19_prefixed
;
3536 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3537 value
= fields
->f_bitbase32_24_u27_prefixed
;
3539 case M32C_OPERAND_BITNO16R
:
3540 value
= fields
->f_dsp_16_u8
;
3542 case M32C_OPERAND_BITNO32PREFIXED
:
3543 value
= fields
->f_bitno32_prefixed
;
3545 case M32C_OPERAND_BITNO32UNPREFIXED
:
3546 value
= fields
->f_bitno32_unprefixed
;
3548 case M32C_OPERAND_DSP_10_U6
:
3549 value
= fields
->f_dsp_10_u6
;
3551 case M32C_OPERAND_DSP_16_S16
:
3552 value
= fields
->f_dsp_16_s16
;
3554 case M32C_OPERAND_DSP_16_S8
:
3555 value
= fields
->f_dsp_16_s8
;
3557 case M32C_OPERAND_DSP_16_U16
:
3558 value
= fields
->f_dsp_16_u16
;
3560 case M32C_OPERAND_DSP_16_U20
:
3561 value
= fields
->f_dsp_16_u24
;
3563 case M32C_OPERAND_DSP_16_U24
:
3564 value
= fields
->f_dsp_16_u24
;
3566 case M32C_OPERAND_DSP_16_U8
:
3567 value
= fields
->f_dsp_16_u8
;
3569 case M32C_OPERAND_DSP_24_S16
:
3570 value
= fields
->f_dsp_24_s16
;
3572 case M32C_OPERAND_DSP_24_S8
:
3573 value
= fields
->f_dsp_24_s8
;
3575 case M32C_OPERAND_DSP_24_U16
:
3576 value
= fields
->f_dsp_24_u16
;
3578 case M32C_OPERAND_DSP_24_U20
:
3579 value
= fields
->f_dsp_24_u24
;
3581 case M32C_OPERAND_DSP_24_U24
:
3582 value
= fields
->f_dsp_24_u24
;
3584 case M32C_OPERAND_DSP_24_U8
:
3585 value
= fields
->f_dsp_24_u8
;
3587 case M32C_OPERAND_DSP_32_S16
:
3588 value
= fields
->f_dsp_32_s16
;
3590 case M32C_OPERAND_DSP_32_S8
:
3591 value
= fields
->f_dsp_32_s8
;
3593 case M32C_OPERAND_DSP_32_U16
:
3594 value
= fields
->f_dsp_32_u16
;
3596 case M32C_OPERAND_DSP_32_U20
:
3597 value
= fields
->f_dsp_32_u24
;
3599 case M32C_OPERAND_DSP_32_U24
:
3600 value
= fields
->f_dsp_32_u24
;
3602 case M32C_OPERAND_DSP_32_U8
:
3603 value
= fields
->f_dsp_32_u8
;
3605 case M32C_OPERAND_DSP_40_S16
:
3606 value
= fields
->f_dsp_40_s16
;
3608 case M32C_OPERAND_DSP_40_S8
:
3609 value
= fields
->f_dsp_40_s8
;
3611 case M32C_OPERAND_DSP_40_U16
:
3612 value
= fields
->f_dsp_40_u16
;
3614 case M32C_OPERAND_DSP_40_U24
:
3615 value
= fields
->f_dsp_40_u24
;
3617 case M32C_OPERAND_DSP_40_U8
:
3618 value
= fields
->f_dsp_40_u8
;
3620 case M32C_OPERAND_DSP_48_S16
:
3621 value
= fields
->f_dsp_48_s16
;
3623 case M32C_OPERAND_DSP_48_S8
:
3624 value
= fields
->f_dsp_48_s8
;
3626 case M32C_OPERAND_DSP_48_U16
:
3627 value
= fields
->f_dsp_48_u16
;
3629 case M32C_OPERAND_DSP_48_U24
:
3630 value
= fields
->f_dsp_48_u24
;
3632 case M32C_OPERAND_DSP_48_U8
:
3633 value
= fields
->f_dsp_48_u8
;
3635 case M32C_OPERAND_DSP_8_S24
:
3636 value
= fields
->f_dsp_8_s24
;
3638 case M32C_OPERAND_DSP_8_S8
:
3639 value
= fields
->f_dsp_8_s8
;
3641 case M32C_OPERAND_DSP_8_U16
:
3642 value
= fields
->f_dsp_8_u16
;
3644 case M32C_OPERAND_DSP_8_U24
:
3645 value
= fields
->f_dsp_8_u24
;
3647 case M32C_OPERAND_DSP_8_U6
:
3648 value
= fields
->f_dsp_8_u6
;
3650 case M32C_OPERAND_DSP_8_U8
:
3651 value
= fields
->f_dsp_8_u8
;
3653 case M32C_OPERAND_DST16AN
:
3654 value
= fields
->f_dst16_an
;
3656 case M32C_OPERAND_DST16AN_S
:
3657 value
= fields
->f_dst16_an_s
;
3659 case M32C_OPERAND_DST16ANHI
:
3660 value
= fields
->f_dst16_an
;
3662 case M32C_OPERAND_DST16ANQI
:
3663 value
= fields
->f_dst16_an
;
3665 case M32C_OPERAND_DST16ANQI_S
:
3666 value
= fields
->f_dst16_rn_QI_s
;
3668 case M32C_OPERAND_DST16ANSI
:
3669 value
= fields
->f_dst16_an
;
3671 case M32C_OPERAND_DST16RNEXTQI
:
3672 value
= fields
->f_dst16_rn_ext
;
3674 case M32C_OPERAND_DST16RNHI
:
3675 value
= fields
->f_dst16_rn
;
3677 case M32C_OPERAND_DST16RNQI
:
3678 value
= fields
->f_dst16_rn
;
3680 case M32C_OPERAND_DST16RNQI_S
:
3681 value
= fields
->f_dst16_rn_QI_s
;
3683 case M32C_OPERAND_DST16RNSI
:
3684 value
= fields
->f_dst16_rn
;
3686 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3687 value
= fields
->f_dst32_an_unprefixed
;
3689 case M32C_OPERAND_DST32ANPREFIXED
:
3690 value
= fields
->f_dst32_an_prefixed
;
3692 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3693 value
= fields
->f_dst32_an_prefixed
;
3695 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3696 value
= fields
->f_dst32_an_prefixed
;
3698 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3699 value
= fields
->f_dst32_an_prefixed
;
3701 case M32C_OPERAND_DST32ANUNPREFIXED
:
3702 value
= fields
->f_dst32_an_unprefixed
;
3704 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3705 value
= fields
->f_dst32_an_unprefixed
;
3707 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3708 value
= fields
->f_dst32_an_unprefixed
;
3710 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3711 value
= fields
->f_dst32_an_unprefixed
;
3713 case M32C_OPERAND_DST32R0HI_S
:
3716 case M32C_OPERAND_DST32R0QI_S
:
3719 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3720 value
= fields
->f_dst32_rn_ext_unprefixed
;
3722 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3723 value
= fields
->f_dst32_rn_ext_unprefixed
;
3725 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3726 value
= fields
->f_dst32_rn_prefixed_HI
;
3728 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3729 value
= fields
->f_dst32_rn_prefixed_QI
;
3731 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3732 value
= fields
->f_dst32_rn_prefixed_SI
;
3734 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3735 value
= fields
->f_dst32_rn_unprefixed_HI
;
3737 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3738 value
= fields
->f_dst32_rn_unprefixed_QI
;
3740 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3741 value
= fields
->f_dst32_rn_unprefixed_SI
;
3743 case M32C_OPERAND_G
:
3746 case M32C_OPERAND_IMM_12_S4
:
3747 value
= fields
->f_imm_12_s4
;
3749 case M32C_OPERAND_IMM_12_S4N
:
3750 value
= fields
->f_imm_12_s4
;
3752 case M32C_OPERAND_IMM_13_U3
:
3753 value
= fields
->f_imm_13_u3
;
3755 case M32C_OPERAND_IMM_16_HI
:
3756 value
= fields
->f_dsp_16_s16
;
3758 case M32C_OPERAND_IMM_16_QI
:
3759 value
= fields
->f_dsp_16_s8
;
3761 case M32C_OPERAND_IMM_16_SI
:
3762 value
= fields
->f_dsp_16_s32
;
3764 case M32C_OPERAND_IMM_20_S4
:
3765 value
= fields
->f_imm_20_s4
;
3767 case M32C_OPERAND_IMM_24_HI
:
3768 value
= fields
->f_dsp_24_s16
;
3770 case M32C_OPERAND_IMM_24_QI
:
3771 value
= fields
->f_dsp_24_s8
;
3773 case M32C_OPERAND_IMM_24_SI
:
3774 value
= fields
->f_dsp_24_s32
;
3776 case M32C_OPERAND_IMM_32_HI
:
3777 value
= fields
->f_dsp_32_s16
;
3779 case M32C_OPERAND_IMM_32_QI
:
3780 value
= fields
->f_dsp_32_s8
;
3782 case M32C_OPERAND_IMM_32_SI
:
3783 value
= fields
->f_dsp_32_s32
;
3785 case M32C_OPERAND_IMM_40_HI
:
3786 value
= fields
->f_dsp_40_s16
;
3788 case M32C_OPERAND_IMM_40_QI
:
3789 value
= fields
->f_dsp_40_s8
;
3791 case M32C_OPERAND_IMM_40_SI
:
3792 value
= fields
->f_dsp_40_s32
;
3794 case M32C_OPERAND_IMM_48_HI
:
3795 value
= fields
->f_dsp_48_s16
;
3797 case M32C_OPERAND_IMM_48_QI
:
3798 value
= fields
->f_dsp_48_s8
;
3800 case M32C_OPERAND_IMM_48_SI
:
3801 value
= fields
->f_dsp_48_s32
;
3803 case M32C_OPERAND_IMM_56_HI
:
3804 value
= fields
->f_dsp_56_s16
;
3806 case M32C_OPERAND_IMM_56_QI
:
3807 value
= fields
->f_dsp_56_s8
;
3809 case M32C_OPERAND_IMM_64_HI
:
3810 value
= fields
->f_dsp_64_s16
;
3812 case M32C_OPERAND_IMM_8_HI
:
3813 value
= fields
->f_dsp_8_s16
;
3815 case M32C_OPERAND_IMM_8_QI
:
3816 value
= fields
->f_dsp_8_s8
;
3818 case M32C_OPERAND_IMM_8_S4
:
3819 value
= fields
->f_imm_8_s4
;
3821 case M32C_OPERAND_IMM_8_S4N
:
3822 value
= fields
->f_imm_8_s4
;
3824 case M32C_OPERAND_IMM_SH_12_S4
:
3825 value
= fields
->f_imm_12_s4
;
3827 case M32C_OPERAND_IMM_SH_20_S4
:
3828 value
= fields
->f_imm_20_s4
;
3830 case M32C_OPERAND_IMM_SH_8_S4
:
3831 value
= fields
->f_imm_8_s4
;
3833 case M32C_OPERAND_IMM1_S
:
3834 value
= fields
->f_imm1_S
;
3836 case M32C_OPERAND_IMM3_S
:
3837 value
= fields
->f_imm3_S
;
3839 case M32C_OPERAND_LAB_16_8
:
3840 value
= fields
->f_lab_16_8
;
3842 case M32C_OPERAND_LAB_24_8
:
3843 value
= fields
->f_lab_24_8
;
3845 case M32C_OPERAND_LAB_32_8
:
3846 value
= fields
->f_lab_32_8
;
3848 case M32C_OPERAND_LAB_40_8
:
3849 value
= fields
->f_lab_40_8
;
3851 case M32C_OPERAND_LAB_5_3
:
3852 value
= fields
->f_lab_5_3
;
3854 case M32C_OPERAND_LAB_8_16
:
3855 value
= fields
->f_lab_8_16
;
3857 case M32C_OPERAND_LAB_8_24
:
3858 value
= fields
->f_lab_8_24
;
3860 case M32C_OPERAND_LAB_8_8
:
3861 value
= fields
->f_lab_8_8
;
3863 case M32C_OPERAND_LAB32_JMP_S
:
3864 value
= fields
->f_lab32_jmp_s
;
3866 case M32C_OPERAND_Q
:
3869 case M32C_OPERAND_R0
:
3872 case M32C_OPERAND_R0H
:
3875 case M32C_OPERAND_R0L
:
3878 case M32C_OPERAND_R1
:
3881 case M32C_OPERAND_R1R2R0
:
3884 case M32C_OPERAND_R2
:
3887 case M32C_OPERAND_R2R0
:
3890 case M32C_OPERAND_R3
:
3893 case M32C_OPERAND_R3R1
:
3896 case M32C_OPERAND_REGSETPOP
:
3897 value
= fields
->f_8_8
;
3899 case M32C_OPERAND_REGSETPUSH
:
3900 value
= fields
->f_8_8
;
3902 case M32C_OPERAND_RN16_PUSH_S
:
3903 value
= fields
->f_4_1
;
3905 case M32C_OPERAND_S
:
3908 case M32C_OPERAND_SRC16AN
:
3909 value
= fields
->f_src16_an
;
3911 case M32C_OPERAND_SRC16ANHI
:
3912 value
= fields
->f_src16_an
;
3914 case M32C_OPERAND_SRC16ANQI
:
3915 value
= fields
->f_src16_an
;
3917 case M32C_OPERAND_SRC16RNHI
:
3918 value
= fields
->f_src16_rn
;
3920 case M32C_OPERAND_SRC16RNQI
:
3921 value
= fields
->f_src16_rn
;
3923 case M32C_OPERAND_SRC32ANPREFIXED
:
3924 value
= fields
->f_src32_an_prefixed
;
3926 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3927 value
= fields
->f_src32_an_prefixed
;
3929 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3930 value
= fields
->f_src32_an_prefixed
;
3932 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3933 value
= fields
->f_src32_an_prefixed
;
3935 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3936 value
= fields
->f_src32_an_unprefixed
;
3938 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3939 value
= fields
->f_src32_an_unprefixed
;
3941 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3942 value
= fields
->f_src32_an_unprefixed
;
3944 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3945 value
= fields
->f_src32_an_unprefixed
;
3947 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3948 value
= fields
->f_src32_rn_prefixed_HI
;
3950 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3951 value
= fields
->f_src32_rn_prefixed_QI
;
3953 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3954 value
= fields
->f_src32_rn_prefixed_SI
;
3956 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3957 value
= fields
->f_src32_rn_unprefixed_HI
;
3959 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3960 value
= fields
->f_src32_rn_unprefixed_QI
;
3962 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3963 value
= fields
->f_src32_rn_unprefixed_SI
;
3965 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3966 value
= fields
->f_5_1
;
3968 case M32C_OPERAND_X
:
3971 case M32C_OPERAND_Z
:
3974 case M32C_OPERAND_COND16_16
:
3975 value
= fields
->f_dsp_16_u8
;
3977 case M32C_OPERAND_COND16_24
:
3978 value
= fields
->f_dsp_24_u8
;
3980 case M32C_OPERAND_COND16_32
:
3981 value
= fields
->f_dsp_32_u8
;
3983 case M32C_OPERAND_COND16C
:
3984 value
= fields
->f_cond16
;
3986 case M32C_OPERAND_COND16J
:
3987 value
= fields
->f_cond16
;
3989 case M32C_OPERAND_COND16J5
:
3990 value
= fields
->f_cond16j_5
;
3992 case M32C_OPERAND_COND32
:
3993 value
= fields
->f_cond32
;
3995 case M32C_OPERAND_COND32_16
:
3996 value
= fields
->f_dsp_16_u8
;
3998 case M32C_OPERAND_COND32_24
:
3999 value
= fields
->f_dsp_24_u8
;
4001 case M32C_OPERAND_COND32_32
:
4002 value
= fields
->f_dsp_32_u8
;
4004 case M32C_OPERAND_COND32_40
:
4005 value
= fields
->f_dsp_40_u8
;
4007 case M32C_OPERAND_COND32J
:
4008 value
= fields
->f_cond32j
;
4010 case M32C_OPERAND_CR1_PREFIXED_32
:
4011 value
= fields
->f_21_3
;
4013 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4014 value
= fields
->f_13_3
;
4016 case M32C_OPERAND_CR16
:
4017 value
= fields
->f_9_3
;
4019 case M32C_OPERAND_CR2_32
:
4020 value
= fields
->f_13_3
;
4022 case M32C_OPERAND_CR3_PREFIXED_32
:
4023 value
= fields
->f_21_3
;
4025 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4026 value
= fields
->f_13_3
;
4028 case M32C_OPERAND_FLAGS16
:
4029 value
= fields
->f_9_3
;
4031 case M32C_OPERAND_FLAGS32
:
4032 value
= fields
->f_13_3
;
4034 case M32C_OPERAND_SCCOND32
:
4035 value
= fields
->f_cond16
;
4037 case M32C_OPERAND_SIZE
:
4042 /* xgettext:c-format */
4043 fprintf (stderr
, _("Unrecognized field %d while getting vma operand.\n"),
4051 void m32c_cgen_set_int_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, int);
4052 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, bfd_vma
);
4054 /* Stuffing values in cgen_fields is handled by a collection of functions.
4055 They are distinguished by the type of the VALUE argument they accept.
4056 TODO: floating point, inlining support, remove cases where argument type
4060 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4062 CGEN_FIELDS
* fields
,
4067 case M32C_OPERAND_A0
:
4069 case M32C_OPERAND_A1
:
4071 case M32C_OPERAND_AN16_PUSH_S
:
4072 fields
->f_4_1
= value
;
4074 case M32C_OPERAND_BIT16AN
:
4075 fields
->f_dst16_an
= value
;
4077 case M32C_OPERAND_BIT16RN
:
4078 fields
->f_dst16_rn
= value
;
4080 case M32C_OPERAND_BIT3_S
:
4081 fields
->f_imm3_S
= value
;
4083 case M32C_OPERAND_BIT32ANPREFIXED
:
4084 fields
->f_dst32_an_prefixed
= value
;
4086 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4087 fields
->f_dst32_an_unprefixed
= value
;
4089 case M32C_OPERAND_BIT32RNPREFIXED
:
4090 fields
->f_dst32_rn_prefixed_QI
= value
;
4092 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4093 fields
->f_dst32_rn_unprefixed_QI
= value
;
4095 case M32C_OPERAND_BITBASE16_16_S8
:
4096 fields
->f_dsp_16_s8
= value
;
4098 case M32C_OPERAND_BITBASE16_16_U16
:
4099 fields
->f_dsp_16_u16
= value
;
4101 case M32C_OPERAND_BITBASE16_16_U8
:
4102 fields
->f_dsp_16_u8
= value
;
4104 case M32C_OPERAND_BITBASE16_8_U11_S
:
4105 fields
->f_bitbase16_u11_S
= value
;
4107 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4108 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4110 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4111 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4113 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4114 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4116 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4117 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4119 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4120 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4122 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4123 fields
->f_bitbase32_24_s11_prefixed
= value
;
4125 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4126 fields
->f_bitbase32_24_s19_prefixed
= value
;
4128 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4129 fields
->f_bitbase32_24_u11_prefixed
= value
;
4131 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4132 fields
->f_bitbase32_24_u19_prefixed
= value
;
4134 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4135 fields
->f_bitbase32_24_u27_prefixed
= value
;
4137 case M32C_OPERAND_BITNO16R
:
4138 fields
->f_dsp_16_u8
= value
;
4140 case M32C_OPERAND_BITNO32PREFIXED
:
4141 fields
->f_bitno32_prefixed
= value
;
4143 case M32C_OPERAND_BITNO32UNPREFIXED
:
4144 fields
->f_bitno32_unprefixed
= value
;
4146 case M32C_OPERAND_DSP_10_U6
:
4147 fields
->f_dsp_10_u6
= value
;
4149 case M32C_OPERAND_DSP_16_S16
:
4150 fields
->f_dsp_16_s16
= value
;
4152 case M32C_OPERAND_DSP_16_S8
:
4153 fields
->f_dsp_16_s8
= value
;
4155 case M32C_OPERAND_DSP_16_U16
:
4156 fields
->f_dsp_16_u16
= value
;
4158 case M32C_OPERAND_DSP_16_U20
:
4159 fields
->f_dsp_16_u24
= value
;
4161 case M32C_OPERAND_DSP_16_U24
:
4162 fields
->f_dsp_16_u24
= value
;
4164 case M32C_OPERAND_DSP_16_U8
:
4165 fields
->f_dsp_16_u8
= value
;
4167 case M32C_OPERAND_DSP_24_S16
:
4168 fields
->f_dsp_24_s16
= value
;
4170 case M32C_OPERAND_DSP_24_S8
:
4171 fields
->f_dsp_24_s8
= value
;
4173 case M32C_OPERAND_DSP_24_U16
:
4174 fields
->f_dsp_24_u16
= value
;
4176 case M32C_OPERAND_DSP_24_U20
:
4177 fields
->f_dsp_24_u24
= value
;
4179 case M32C_OPERAND_DSP_24_U24
:
4180 fields
->f_dsp_24_u24
= value
;
4182 case M32C_OPERAND_DSP_24_U8
:
4183 fields
->f_dsp_24_u8
= value
;
4185 case M32C_OPERAND_DSP_32_S16
:
4186 fields
->f_dsp_32_s16
= value
;
4188 case M32C_OPERAND_DSP_32_S8
:
4189 fields
->f_dsp_32_s8
= value
;
4191 case M32C_OPERAND_DSP_32_U16
:
4192 fields
->f_dsp_32_u16
= value
;
4194 case M32C_OPERAND_DSP_32_U20
:
4195 fields
->f_dsp_32_u24
= value
;
4197 case M32C_OPERAND_DSP_32_U24
:
4198 fields
->f_dsp_32_u24
= value
;
4200 case M32C_OPERAND_DSP_32_U8
:
4201 fields
->f_dsp_32_u8
= value
;
4203 case M32C_OPERAND_DSP_40_S16
:
4204 fields
->f_dsp_40_s16
= value
;
4206 case M32C_OPERAND_DSP_40_S8
:
4207 fields
->f_dsp_40_s8
= value
;
4209 case M32C_OPERAND_DSP_40_U16
:
4210 fields
->f_dsp_40_u16
= value
;
4212 case M32C_OPERAND_DSP_40_U24
:
4213 fields
->f_dsp_40_u24
= value
;
4215 case M32C_OPERAND_DSP_40_U8
:
4216 fields
->f_dsp_40_u8
= value
;
4218 case M32C_OPERAND_DSP_48_S16
:
4219 fields
->f_dsp_48_s16
= value
;
4221 case M32C_OPERAND_DSP_48_S8
:
4222 fields
->f_dsp_48_s8
= value
;
4224 case M32C_OPERAND_DSP_48_U16
:
4225 fields
->f_dsp_48_u16
= value
;
4227 case M32C_OPERAND_DSP_48_U24
:
4228 fields
->f_dsp_48_u24
= value
;
4230 case M32C_OPERAND_DSP_48_U8
:
4231 fields
->f_dsp_48_u8
= value
;
4233 case M32C_OPERAND_DSP_8_S24
:
4234 fields
->f_dsp_8_s24
= value
;
4236 case M32C_OPERAND_DSP_8_S8
:
4237 fields
->f_dsp_8_s8
= value
;
4239 case M32C_OPERAND_DSP_8_U16
:
4240 fields
->f_dsp_8_u16
= value
;
4242 case M32C_OPERAND_DSP_8_U24
:
4243 fields
->f_dsp_8_u24
= value
;
4245 case M32C_OPERAND_DSP_8_U6
:
4246 fields
->f_dsp_8_u6
= value
;
4248 case M32C_OPERAND_DSP_8_U8
:
4249 fields
->f_dsp_8_u8
= value
;
4251 case M32C_OPERAND_DST16AN
:
4252 fields
->f_dst16_an
= value
;
4254 case M32C_OPERAND_DST16AN_S
:
4255 fields
->f_dst16_an_s
= value
;
4257 case M32C_OPERAND_DST16ANHI
:
4258 fields
->f_dst16_an
= value
;
4260 case M32C_OPERAND_DST16ANQI
:
4261 fields
->f_dst16_an
= value
;
4263 case M32C_OPERAND_DST16ANQI_S
:
4264 fields
->f_dst16_rn_QI_s
= value
;
4266 case M32C_OPERAND_DST16ANSI
:
4267 fields
->f_dst16_an
= value
;
4269 case M32C_OPERAND_DST16RNEXTQI
:
4270 fields
->f_dst16_rn_ext
= value
;
4272 case M32C_OPERAND_DST16RNHI
:
4273 fields
->f_dst16_rn
= value
;
4275 case M32C_OPERAND_DST16RNQI
:
4276 fields
->f_dst16_rn
= value
;
4278 case M32C_OPERAND_DST16RNQI_S
:
4279 fields
->f_dst16_rn_QI_s
= value
;
4281 case M32C_OPERAND_DST16RNSI
:
4282 fields
->f_dst16_rn
= value
;
4284 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4285 fields
->f_dst32_an_unprefixed
= value
;
4287 case M32C_OPERAND_DST32ANPREFIXED
:
4288 fields
->f_dst32_an_prefixed
= value
;
4290 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4291 fields
->f_dst32_an_prefixed
= value
;
4293 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4294 fields
->f_dst32_an_prefixed
= value
;
4296 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4297 fields
->f_dst32_an_prefixed
= value
;
4299 case M32C_OPERAND_DST32ANUNPREFIXED
:
4300 fields
->f_dst32_an_unprefixed
= value
;
4302 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4303 fields
->f_dst32_an_unprefixed
= value
;
4305 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4306 fields
->f_dst32_an_unprefixed
= value
;
4308 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4309 fields
->f_dst32_an_unprefixed
= value
;
4311 case M32C_OPERAND_DST32R0HI_S
:
4313 case M32C_OPERAND_DST32R0QI_S
:
4315 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4316 fields
->f_dst32_rn_ext_unprefixed
= value
;
4318 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4319 fields
->f_dst32_rn_ext_unprefixed
= value
;
4321 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4322 fields
->f_dst32_rn_prefixed_HI
= value
;
4324 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4325 fields
->f_dst32_rn_prefixed_QI
= value
;
4327 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4328 fields
->f_dst32_rn_prefixed_SI
= value
;
4330 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4331 fields
->f_dst32_rn_unprefixed_HI
= value
;
4333 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4334 fields
->f_dst32_rn_unprefixed_QI
= value
;
4336 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4337 fields
->f_dst32_rn_unprefixed_SI
= value
;
4339 case M32C_OPERAND_G
:
4341 case M32C_OPERAND_IMM_12_S4
:
4342 fields
->f_imm_12_s4
= value
;
4344 case M32C_OPERAND_IMM_12_S4N
:
4345 fields
->f_imm_12_s4
= value
;
4347 case M32C_OPERAND_IMM_13_U3
:
4348 fields
->f_imm_13_u3
= value
;
4350 case M32C_OPERAND_IMM_16_HI
:
4351 fields
->f_dsp_16_s16
= value
;
4353 case M32C_OPERAND_IMM_16_QI
:
4354 fields
->f_dsp_16_s8
= value
;
4356 case M32C_OPERAND_IMM_16_SI
:
4357 fields
->f_dsp_16_s32
= value
;
4359 case M32C_OPERAND_IMM_20_S4
:
4360 fields
->f_imm_20_s4
= value
;
4362 case M32C_OPERAND_IMM_24_HI
:
4363 fields
->f_dsp_24_s16
= value
;
4365 case M32C_OPERAND_IMM_24_QI
:
4366 fields
->f_dsp_24_s8
= value
;
4368 case M32C_OPERAND_IMM_24_SI
:
4369 fields
->f_dsp_24_s32
= value
;
4371 case M32C_OPERAND_IMM_32_HI
:
4372 fields
->f_dsp_32_s16
= value
;
4374 case M32C_OPERAND_IMM_32_QI
:
4375 fields
->f_dsp_32_s8
= value
;
4377 case M32C_OPERAND_IMM_32_SI
:
4378 fields
->f_dsp_32_s32
= value
;
4380 case M32C_OPERAND_IMM_40_HI
:
4381 fields
->f_dsp_40_s16
= value
;
4383 case M32C_OPERAND_IMM_40_QI
:
4384 fields
->f_dsp_40_s8
= value
;
4386 case M32C_OPERAND_IMM_40_SI
:
4387 fields
->f_dsp_40_s32
= value
;
4389 case M32C_OPERAND_IMM_48_HI
:
4390 fields
->f_dsp_48_s16
= value
;
4392 case M32C_OPERAND_IMM_48_QI
:
4393 fields
->f_dsp_48_s8
= value
;
4395 case M32C_OPERAND_IMM_48_SI
:
4396 fields
->f_dsp_48_s32
= value
;
4398 case M32C_OPERAND_IMM_56_HI
:
4399 fields
->f_dsp_56_s16
= value
;
4401 case M32C_OPERAND_IMM_56_QI
:
4402 fields
->f_dsp_56_s8
= value
;
4404 case M32C_OPERAND_IMM_64_HI
:
4405 fields
->f_dsp_64_s16
= value
;
4407 case M32C_OPERAND_IMM_8_HI
:
4408 fields
->f_dsp_8_s16
= value
;
4410 case M32C_OPERAND_IMM_8_QI
:
4411 fields
->f_dsp_8_s8
= value
;
4413 case M32C_OPERAND_IMM_8_S4
:
4414 fields
->f_imm_8_s4
= value
;
4416 case M32C_OPERAND_IMM_8_S4N
:
4417 fields
->f_imm_8_s4
= value
;
4419 case M32C_OPERAND_IMM_SH_12_S4
:
4420 fields
->f_imm_12_s4
= value
;
4422 case M32C_OPERAND_IMM_SH_20_S4
:
4423 fields
->f_imm_20_s4
= value
;
4425 case M32C_OPERAND_IMM_SH_8_S4
:
4426 fields
->f_imm_8_s4
= value
;
4428 case M32C_OPERAND_IMM1_S
:
4429 fields
->f_imm1_S
= value
;
4431 case M32C_OPERAND_IMM3_S
:
4432 fields
->f_imm3_S
= value
;
4434 case M32C_OPERAND_LAB_16_8
:
4435 fields
->f_lab_16_8
= value
;
4437 case M32C_OPERAND_LAB_24_8
:
4438 fields
->f_lab_24_8
= value
;
4440 case M32C_OPERAND_LAB_32_8
:
4441 fields
->f_lab_32_8
= value
;
4443 case M32C_OPERAND_LAB_40_8
:
4444 fields
->f_lab_40_8
= value
;
4446 case M32C_OPERAND_LAB_5_3
:
4447 fields
->f_lab_5_3
= value
;
4449 case M32C_OPERAND_LAB_8_16
:
4450 fields
->f_lab_8_16
= value
;
4452 case M32C_OPERAND_LAB_8_24
:
4453 fields
->f_lab_8_24
= value
;
4455 case M32C_OPERAND_LAB_8_8
:
4456 fields
->f_lab_8_8
= value
;
4458 case M32C_OPERAND_LAB32_JMP_S
:
4459 fields
->f_lab32_jmp_s
= value
;
4461 case M32C_OPERAND_Q
:
4463 case M32C_OPERAND_R0
:
4465 case M32C_OPERAND_R0H
:
4467 case M32C_OPERAND_R0L
:
4469 case M32C_OPERAND_R1
:
4471 case M32C_OPERAND_R1R2R0
:
4473 case M32C_OPERAND_R2
:
4475 case M32C_OPERAND_R2R0
:
4477 case M32C_OPERAND_R3
:
4479 case M32C_OPERAND_R3R1
:
4481 case M32C_OPERAND_REGSETPOP
:
4482 fields
->f_8_8
= value
;
4484 case M32C_OPERAND_REGSETPUSH
:
4485 fields
->f_8_8
= value
;
4487 case M32C_OPERAND_RN16_PUSH_S
:
4488 fields
->f_4_1
= value
;
4490 case M32C_OPERAND_S
:
4492 case M32C_OPERAND_SRC16AN
:
4493 fields
->f_src16_an
= value
;
4495 case M32C_OPERAND_SRC16ANHI
:
4496 fields
->f_src16_an
= value
;
4498 case M32C_OPERAND_SRC16ANQI
:
4499 fields
->f_src16_an
= value
;
4501 case M32C_OPERAND_SRC16RNHI
:
4502 fields
->f_src16_rn
= value
;
4504 case M32C_OPERAND_SRC16RNQI
:
4505 fields
->f_src16_rn
= value
;
4507 case M32C_OPERAND_SRC32ANPREFIXED
:
4508 fields
->f_src32_an_prefixed
= value
;
4510 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4511 fields
->f_src32_an_prefixed
= value
;
4513 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4514 fields
->f_src32_an_prefixed
= value
;
4516 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4517 fields
->f_src32_an_prefixed
= value
;
4519 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4520 fields
->f_src32_an_unprefixed
= value
;
4522 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4523 fields
->f_src32_an_unprefixed
= value
;
4525 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4526 fields
->f_src32_an_unprefixed
= value
;
4528 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4529 fields
->f_src32_an_unprefixed
= value
;
4531 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4532 fields
->f_src32_rn_prefixed_HI
= value
;
4534 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4535 fields
->f_src32_rn_prefixed_QI
= value
;
4537 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4538 fields
->f_src32_rn_prefixed_SI
= value
;
4540 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4541 fields
->f_src32_rn_unprefixed_HI
= value
;
4543 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4544 fields
->f_src32_rn_unprefixed_QI
= value
;
4546 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4547 fields
->f_src32_rn_unprefixed_SI
= value
;
4549 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4550 fields
->f_5_1
= value
;
4552 case M32C_OPERAND_X
:
4554 case M32C_OPERAND_Z
:
4556 case M32C_OPERAND_COND16_16
:
4557 fields
->f_dsp_16_u8
= value
;
4559 case M32C_OPERAND_COND16_24
:
4560 fields
->f_dsp_24_u8
= value
;
4562 case M32C_OPERAND_COND16_32
:
4563 fields
->f_dsp_32_u8
= value
;
4565 case M32C_OPERAND_COND16C
:
4566 fields
->f_cond16
= value
;
4568 case M32C_OPERAND_COND16J
:
4569 fields
->f_cond16
= value
;
4571 case M32C_OPERAND_COND16J5
:
4572 fields
->f_cond16j_5
= value
;
4574 case M32C_OPERAND_COND32
:
4575 fields
->f_cond32
= value
;
4577 case M32C_OPERAND_COND32_16
:
4578 fields
->f_dsp_16_u8
= value
;
4580 case M32C_OPERAND_COND32_24
:
4581 fields
->f_dsp_24_u8
= value
;
4583 case M32C_OPERAND_COND32_32
:
4584 fields
->f_dsp_32_u8
= value
;
4586 case M32C_OPERAND_COND32_40
:
4587 fields
->f_dsp_40_u8
= value
;
4589 case M32C_OPERAND_COND32J
:
4590 fields
->f_cond32j
= value
;
4592 case M32C_OPERAND_CR1_PREFIXED_32
:
4593 fields
->f_21_3
= value
;
4595 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4596 fields
->f_13_3
= value
;
4598 case M32C_OPERAND_CR16
:
4599 fields
->f_9_3
= value
;
4601 case M32C_OPERAND_CR2_32
:
4602 fields
->f_13_3
= value
;
4604 case M32C_OPERAND_CR3_PREFIXED_32
:
4605 fields
->f_21_3
= value
;
4607 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4608 fields
->f_13_3
= value
;
4610 case M32C_OPERAND_FLAGS16
:
4611 fields
->f_9_3
= value
;
4613 case M32C_OPERAND_FLAGS32
:
4614 fields
->f_13_3
= value
;
4616 case M32C_OPERAND_SCCOND32
:
4617 fields
->f_cond16
= value
;
4619 case M32C_OPERAND_SIZE
:
4623 /* xgettext:c-format */
4624 fprintf (stderr
, _("Unrecognized field %d while setting int operand.\n"),
4631 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4633 CGEN_FIELDS
* fields
,
4638 case M32C_OPERAND_A0
:
4640 case M32C_OPERAND_A1
:
4642 case M32C_OPERAND_AN16_PUSH_S
:
4643 fields
->f_4_1
= value
;
4645 case M32C_OPERAND_BIT16AN
:
4646 fields
->f_dst16_an
= value
;
4648 case M32C_OPERAND_BIT16RN
:
4649 fields
->f_dst16_rn
= value
;
4651 case M32C_OPERAND_BIT3_S
:
4652 fields
->f_imm3_S
= value
;
4654 case M32C_OPERAND_BIT32ANPREFIXED
:
4655 fields
->f_dst32_an_prefixed
= value
;
4657 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4658 fields
->f_dst32_an_unprefixed
= value
;
4660 case M32C_OPERAND_BIT32RNPREFIXED
:
4661 fields
->f_dst32_rn_prefixed_QI
= value
;
4663 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4664 fields
->f_dst32_rn_unprefixed_QI
= value
;
4666 case M32C_OPERAND_BITBASE16_16_S8
:
4667 fields
->f_dsp_16_s8
= value
;
4669 case M32C_OPERAND_BITBASE16_16_U16
:
4670 fields
->f_dsp_16_u16
= value
;
4672 case M32C_OPERAND_BITBASE16_16_U8
:
4673 fields
->f_dsp_16_u8
= value
;
4675 case M32C_OPERAND_BITBASE16_8_U11_S
:
4676 fields
->f_bitbase16_u11_S
= value
;
4678 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4679 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4681 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4682 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4684 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4685 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4687 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4688 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4690 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4691 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4693 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4694 fields
->f_bitbase32_24_s11_prefixed
= value
;
4696 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4697 fields
->f_bitbase32_24_s19_prefixed
= value
;
4699 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4700 fields
->f_bitbase32_24_u11_prefixed
= value
;
4702 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4703 fields
->f_bitbase32_24_u19_prefixed
= value
;
4705 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4706 fields
->f_bitbase32_24_u27_prefixed
= value
;
4708 case M32C_OPERAND_BITNO16R
:
4709 fields
->f_dsp_16_u8
= value
;
4711 case M32C_OPERAND_BITNO32PREFIXED
:
4712 fields
->f_bitno32_prefixed
= value
;
4714 case M32C_OPERAND_BITNO32UNPREFIXED
:
4715 fields
->f_bitno32_unprefixed
= value
;
4717 case M32C_OPERAND_DSP_10_U6
:
4718 fields
->f_dsp_10_u6
= value
;
4720 case M32C_OPERAND_DSP_16_S16
:
4721 fields
->f_dsp_16_s16
= value
;
4723 case M32C_OPERAND_DSP_16_S8
:
4724 fields
->f_dsp_16_s8
= value
;
4726 case M32C_OPERAND_DSP_16_U16
:
4727 fields
->f_dsp_16_u16
= value
;
4729 case M32C_OPERAND_DSP_16_U20
:
4730 fields
->f_dsp_16_u24
= value
;
4732 case M32C_OPERAND_DSP_16_U24
:
4733 fields
->f_dsp_16_u24
= value
;
4735 case M32C_OPERAND_DSP_16_U8
:
4736 fields
->f_dsp_16_u8
= value
;
4738 case M32C_OPERAND_DSP_24_S16
:
4739 fields
->f_dsp_24_s16
= value
;
4741 case M32C_OPERAND_DSP_24_S8
:
4742 fields
->f_dsp_24_s8
= value
;
4744 case M32C_OPERAND_DSP_24_U16
:
4745 fields
->f_dsp_24_u16
= value
;
4747 case M32C_OPERAND_DSP_24_U20
:
4748 fields
->f_dsp_24_u24
= value
;
4750 case M32C_OPERAND_DSP_24_U24
:
4751 fields
->f_dsp_24_u24
= value
;
4753 case M32C_OPERAND_DSP_24_U8
:
4754 fields
->f_dsp_24_u8
= value
;
4756 case M32C_OPERAND_DSP_32_S16
:
4757 fields
->f_dsp_32_s16
= value
;
4759 case M32C_OPERAND_DSP_32_S8
:
4760 fields
->f_dsp_32_s8
= value
;
4762 case M32C_OPERAND_DSP_32_U16
:
4763 fields
->f_dsp_32_u16
= value
;
4765 case M32C_OPERAND_DSP_32_U20
:
4766 fields
->f_dsp_32_u24
= value
;
4768 case M32C_OPERAND_DSP_32_U24
:
4769 fields
->f_dsp_32_u24
= value
;
4771 case M32C_OPERAND_DSP_32_U8
:
4772 fields
->f_dsp_32_u8
= value
;
4774 case M32C_OPERAND_DSP_40_S16
:
4775 fields
->f_dsp_40_s16
= value
;
4777 case M32C_OPERAND_DSP_40_S8
:
4778 fields
->f_dsp_40_s8
= value
;
4780 case M32C_OPERAND_DSP_40_U16
:
4781 fields
->f_dsp_40_u16
= value
;
4783 case M32C_OPERAND_DSP_40_U24
:
4784 fields
->f_dsp_40_u24
= value
;
4786 case M32C_OPERAND_DSP_40_U8
:
4787 fields
->f_dsp_40_u8
= value
;
4789 case M32C_OPERAND_DSP_48_S16
:
4790 fields
->f_dsp_48_s16
= value
;
4792 case M32C_OPERAND_DSP_48_S8
:
4793 fields
->f_dsp_48_s8
= value
;
4795 case M32C_OPERAND_DSP_48_U16
:
4796 fields
->f_dsp_48_u16
= value
;
4798 case M32C_OPERAND_DSP_48_U24
:
4799 fields
->f_dsp_48_u24
= value
;
4801 case M32C_OPERAND_DSP_48_U8
:
4802 fields
->f_dsp_48_u8
= value
;
4804 case M32C_OPERAND_DSP_8_S24
:
4805 fields
->f_dsp_8_s24
= value
;
4807 case M32C_OPERAND_DSP_8_S8
:
4808 fields
->f_dsp_8_s8
= value
;
4810 case M32C_OPERAND_DSP_8_U16
:
4811 fields
->f_dsp_8_u16
= value
;
4813 case M32C_OPERAND_DSP_8_U24
:
4814 fields
->f_dsp_8_u24
= value
;
4816 case M32C_OPERAND_DSP_8_U6
:
4817 fields
->f_dsp_8_u6
= value
;
4819 case M32C_OPERAND_DSP_8_U8
:
4820 fields
->f_dsp_8_u8
= value
;
4822 case M32C_OPERAND_DST16AN
:
4823 fields
->f_dst16_an
= value
;
4825 case M32C_OPERAND_DST16AN_S
:
4826 fields
->f_dst16_an_s
= value
;
4828 case M32C_OPERAND_DST16ANHI
:
4829 fields
->f_dst16_an
= value
;
4831 case M32C_OPERAND_DST16ANQI
:
4832 fields
->f_dst16_an
= value
;
4834 case M32C_OPERAND_DST16ANQI_S
:
4835 fields
->f_dst16_rn_QI_s
= value
;
4837 case M32C_OPERAND_DST16ANSI
:
4838 fields
->f_dst16_an
= value
;
4840 case M32C_OPERAND_DST16RNEXTQI
:
4841 fields
->f_dst16_rn_ext
= value
;
4843 case M32C_OPERAND_DST16RNHI
:
4844 fields
->f_dst16_rn
= value
;
4846 case M32C_OPERAND_DST16RNQI
:
4847 fields
->f_dst16_rn
= value
;
4849 case M32C_OPERAND_DST16RNQI_S
:
4850 fields
->f_dst16_rn_QI_s
= value
;
4852 case M32C_OPERAND_DST16RNSI
:
4853 fields
->f_dst16_rn
= value
;
4855 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4856 fields
->f_dst32_an_unprefixed
= value
;
4858 case M32C_OPERAND_DST32ANPREFIXED
:
4859 fields
->f_dst32_an_prefixed
= value
;
4861 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4862 fields
->f_dst32_an_prefixed
= value
;
4864 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4865 fields
->f_dst32_an_prefixed
= value
;
4867 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4868 fields
->f_dst32_an_prefixed
= value
;
4870 case M32C_OPERAND_DST32ANUNPREFIXED
:
4871 fields
->f_dst32_an_unprefixed
= value
;
4873 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4874 fields
->f_dst32_an_unprefixed
= value
;
4876 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4877 fields
->f_dst32_an_unprefixed
= value
;
4879 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4880 fields
->f_dst32_an_unprefixed
= value
;
4882 case M32C_OPERAND_DST32R0HI_S
:
4884 case M32C_OPERAND_DST32R0QI_S
:
4886 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4887 fields
->f_dst32_rn_ext_unprefixed
= value
;
4889 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4890 fields
->f_dst32_rn_ext_unprefixed
= value
;
4892 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4893 fields
->f_dst32_rn_prefixed_HI
= value
;
4895 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4896 fields
->f_dst32_rn_prefixed_QI
= value
;
4898 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4899 fields
->f_dst32_rn_prefixed_SI
= value
;
4901 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4902 fields
->f_dst32_rn_unprefixed_HI
= value
;
4904 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4905 fields
->f_dst32_rn_unprefixed_QI
= value
;
4907 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4908 fields
->f_dst32_rn_unprefixed_SI
= value
;
4910 case M32C_OPERAND_G
:
4912 case M32C_OPERAND_IMM_12_S4
:
4913 fields
->f_imm_12_s4
= value
;
4915 case M32C_OPERAND_IMM_12_S4N
:
4916 fields
->f_imm_12_s4
= value
;
4918 case M32C_OPERAND_IMM_13_U3
:
4919 fields
->f_imm_13_u3
= value
;
4921 case M32C_OPERAND_IMM_16_HI
:
4922 fields
->f_dsp_16_s16
= value
;
4924 case M32C_OPERAND_IMM_16_QI
:
4925 fields
->f_dsp_16_s8
= value
;
4927 case M32C_OPERAND_IMM_16_SI
:
4928 fields
->f_dsp_16_s32
= value
;
4930 case M32C_OPERAND_IMM_20_S4
:
4931 fields
->f_imm_20_s4
= value
;
4933 case M32C_OPERAND_IMM_24_HI
:
4934 fields
->f_dsp_24_s16
= value
;
4936 case M32C_OPERAND_IMM_24_QI
:
4937 fields
->f_dsp_24_s8
= value
;
4939 case M32C_OPERAND_IMM_24_SI
:
4940 fields
->f_dsp_24_s32
= value
;
4942 case M32C_OPERAND_IMM_32_HI
:
4943 fields
->f_dsp_32_s16
= value
;
4945 case M32C_OPERAND_IMM_32_QI
:
4946 fields
->f_dsp_32_s8
= value
;
4948 case M32C_OPERAND_IMM_32_SI
:
4949 fields
->f_dsp_32_s32
= value
;
4951 case M32C_OPERAND_IMM_40_HI
:
4952 fields
->f_dsp_40_s16
= value
;
4954 case M32C_OPERAND_IMM_40_QI
:
4955 fields
->f_dsp_40_s8
= value
;
4957 case M32C_OPERAND_IMM_40_SI
:
4958 fields
->f_dsp_40_s32
= value
;
4960 case M32C_OPERAND_IMM_48_HI
:
4961 fields
->f_dsp_48_s16
= value
;
4963 case M32C_OPERAND_IMM_48_QI
:
4964 fields
->f_dsp_48_s8
= value
;
4966 case M32C_OPERAND_IMM_48_SI
:
4967 fields
->f_dsp_48_s32
= value
;
4969 case M32C_OPERAND_IMM_56_HI
:
4970 fields
->f_dsp_56_s16
= value
;
4972 case M32C_OPERAND_IMM_56_QI
:
4973 fields
->f_dsp_56_s8
= value
;
4975 case M32C_OPERAND_IMM_64_HI
:
4976 fields
->f_dsp_64_s16
= value
;
4978 case M32C_OPERAND_IMM_8_HI
:
4979 fields
->f_dsp_8_s16
= value
;
4981 case M32C_OPERAND_IMM_8_QI
:
4982 fields
->f_dsp_8_s8
= value
;
4984 case M32C_OPERAND_IMM_8_S4
:
4985 fields
->f_imm_8_s4
= value
;
4987 case M32C_OPERAND_IMM_8_S4N
:
4988 fields
->f_imm_8_s4
= value
;
4990 case M32C_OPERAND_IMM_SH_12_S4
:
4991 fields
->f_imm_12_s4
= value
;
4993 case M32C_OPERAND_IMM_SH_20_S4
:
4994 fields
->f_imm_20_s4
= value
;
4996 case M32C_OPERAND_IMM_SH_8_S4
:
4997 fields
->f_imm_8_s4
= value
;
4999 case M32C_OPERAND_IMM1_S
:
5000 fields
->f_imm1_S
= value
;
5002 case M32C_OPERAND_IMM3_S
:
5003 fields
->f_imm3_S
= value
;
5005 case M32C_OPERAND_LAB_16_8
:
5006 fields
->f_lab_16_8
= value
;
5008 case M32C_OPERAND_LAB_24_8
:
5009 fields
->f_lab_24_8
= value
;
5011 case M32C_OPERAND_LAB_32_8
:
5012 fields
->f_lab_32_8
= value
;
5014 case M32C_OPERAND_LAB_40_8
:
5015 fields
->f_lab_40_8
= value
;
5017 case M32C_OPERAND_LAB_5_3
:
5018 fields
->f_lab_5_3
= value
;
5020 case M32C_OPERAND_LAB_8_16
:
5021 fields
->f_lab_8_16
= value
;
5023 case M32C_OPERAND_LAB_8_24
:
5024 fields
->f_lab_8_24
= value
;
5026 case M32C_OPERAND_LAB_8_8
:
5027 fields
->f_lab_8_8
= value
;
5029 case M32C_OPERAND_LAB32_JMP_S
:
5030 fields
->f_lab32_jmp_s
= value
;
5032 case M32C_OPERAND_Q
:
5034 case M32C_OPERAND_R0
:
5036 case M32C_OPERAND_R0H
:
5038 case M32C_OPERAND_R0L
:
5040 case M32C_OPERAND_R1
:
5042 case M32C_OPERAND_R1R2R0
:
5044 case M32C_OPERAND_R2
:
5046 case M32C_OPERAND_R2R0
:
5048 case M32C_OPERAND_R3
:
5050 case M32C_OPERAND_R3R1
:
5052 case M32C_OPERAND_REGSETPOP
:
5053 fields
->f_8_8
= value
;
5055 case M32C_OPERAND_REGSETPUSH
:
5056 fields
->f_8_8
= value
;
5058 case M32C_OPERAND_RN16_PUSH_S
:
5059 fields
->f_4_1
= value
;
5061 case M32C_OPERAND_S
:
5063 case M32C_OPERAND_SRC16AN
:
5064 fields
->f_src16_an
= value
;
5066 case M32C_OPERAND_SRC16ANHI
:
5067 fields
->f_src16_an
= value
;
5069 case M32C_OPERAND_SRC16ANQI
:
5070 fields
->f_src16_an
= value
;
5072 case M32C_OPERAND_SRC16RNHI
:
5073 fields
->f_src16_rn
= value
;
5075 case M32C_OPERAND_SRC16RNQI
:
5076 fields
->f_src16_rn
= value
;
5078 case M32C_OPERAND_SRC32ANPREFIXED
:
5079 fields
->f_src32_an_prefixed
= value
;
5081 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
5082 fields
->f_src32_an_prefixed
= value
;
5084 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
5085 fields
->f_src32_an_prefixed
= value
;
5087 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
5088 fields
->f_src32_an_prefixed
= value
;
5090 case M32C_OPERAND_SRC32ANUNPREFIXED
:
5091 fields
->f_src32_an_unprefixed
= value
;
5093 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
5094 fields
->f_src32_an_unprefixed
= value
;
5096 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
5097 fields
->f_src32_an_unprefixed
= value
;
5099 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
5100 fields
->f_src32_an_unprefixed
= value
;
5102 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
5103 fields
->f_src32_rn_prefixed_HI
= value
;
5105 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
5106 fields
->f_src32_rn_prefixed_QI
= value
;
5108 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
5109 fields
->f_src32_rn_prefixed_SI
= value
;
5111 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
5112 fields
->f_src32_rn_unprefixed_HI
= value
;
5114 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
5115 fields
->f_src32_rn_unprefixed_QI
= value
;
5117 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
5118 fields
->f_src32_rn_unprefixed_SI
= value
;
5120 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
5121 fields
->f_5_1
= value
;
5123 case M32C_OPERAND_X
:
5125 case M32C_OPERAND_Z
:
5127 case M32C_OPERAND_COND16_16
:
5128 fields
->f_dsp_16_u8
= value
;
5130 case M32C_OPERAND_COND16_24
:
5131 fields
->f_dsp_24_u8
= value
;
5133 case M32C_OPERAND_COND16_32
:
5134 fields
->f_dsp_32_u8
= value
;
5136 case M32C_OPERAND_COND16C
:
5137 fields
->f_cond16
= value
;
5139 case M32C_OPERAND_COND16J
:
5140 fields
->f_cond16
= value
;
5142 case M32C_OPERAND_COND16J5
:
5143 fields
->f_cond16j_5
= value
;
5145 case M32C_OPERAND_COND32
:
5146 fields
->f_cond32
= value
;
5148 case M32C_OPERAND_COND32_16
:
5149 fields
->f_dsp_16_u8
= value
;
5151 case M32C_OPERAND_COND32_24
:
5152 fields
->f_dsp_24_u8
= value
;
5154 case M32C_OPERAND_COND32_32
:
5155 fields
->f_dsp_32_u8
= value
;
5157 case M32C_OPERAND_COND32_40
:
5158 fields
->f_dsp_40_u8
= value
;
5160 case M32C_OPERAND_COND32J
:
5161 fields
->f_cond32j
= value
;
5163 case M32C_OPERAND_CR1_PREFIXED_32
:
5164 fields
->f_21_3
= value
;
5166 case M32C_OPERAND_CR1_UNPREFIXED_32
:
5167 fields
->f_13_3
= value
;
5169 case M32C_OPERAND_CR16
:
5170 fields
->f_9_3
= value
;
5172 case M32C_OPERAND_CR2_32
:
5173 fields
->f_13_3
= value
;
5175 case M32C_OPERAND_CR3_PREFIXED_32
:
5176 fields
->f_21_3
= value
;
5178 case M32C_OPERAND_CR3_UNPREFIXED_32
:
5179 fields
->f_13_3
= value
;
5181 case M32C_OPERAND_FLAGS16
:
5182 fields
->f_9_3
= value
;
5184 case M32C_OPERAND_FLAGS32
:
5185 fields
->f_13_3
= value
;
5187 case M32C_OPERAND_SCCOND32
:
5188 fields
->f_cond16
= value
;
5190 case M32C_OPERAND_SIZE
:
5194 /* xgettext:c-format */
5195 fprintf (stderr
, _("Unrecognized field %d while setting vma operand.\n"),
5201 /* Function to call before using the instruction builder tables. */
5204 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd
)
5206 cd
->insert_handlers
= & m32c_cgen_insert_handlers
[0];
5207 cd
->extract_handlers
= & m32c_cgen_extract_handlers
[0];
5209 cd
->insert_operand
= m32c_cgen_insert_operand
;
5210 cd
->extract_operand
= m32c_cgen_extract_operand
;
5212 cd
->get_int_operand
= m32c_cgen_get_int_operand
;
5213 cd
->set_int_operand
= m32c_cgen_set_int_operand
;
5214 cd
->get_vma_operand
= m32c_cgen_get_vma_operand
;
5215 cd
->set_vma_operand
= m32c_cgen_set_vma_operand
;