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
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
;
172 if ((unsigned long) value
> maxval
)
174 /* xgettext:c-format */
176 _("operand out of range (%lu not between 0 and %lu)"),
183 if (! cgen_signed_overflow_ok_p (cd
))
185 long minval
= - (1L << (length
- 1));
186 long maxval
= (1L << (length
- 1)) - 1;
188 if (value
< minval
|| value
> maxval
)
191 /* xgettext:c-format */
192 (errbuf
, _("operand out of range (%ld not between %ld and %ld)"),
193 value
, minval
, maxval
);
204 if (CGEN_INSN_LSB0_P
)
205 shift
= (word_offset
+ start
+ 1) - length
;
207 shift
= total_length
- (word_offset
+ start
+ length
);
208 *buffer
= (*buffer
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
211 #else /* ! CGEN_INT_INSN_P */
214 unsigned char *bufp
= (unsigned char *) buffer
+ word_offset
/ 8;
216 insert_1 (cd
, value
, start
, length
, word_length
, bufp
);
219 #endif /* ! CGEN_INT_INSN_P */
224 /* Default insn builder (insert handler).
225 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
226 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
227 recorded in host byte order, otherwise BUFFER is an array of bytes
228 and the value is recorded in target byte order).
229 The result is an error message or NULL if success. */
232 insert_insn_normal (CGEN_CPU_DESC cd
,
233 const CGEN_INSN
* insn
,
234 CGEN_FIELDS
* fields
,
235 CGEN_INSN_BYTES_PTR buffer
,
238 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
240 const CGEN_SYNTAX_CHAR_TYPE
* syn
;
242 CGEN_INIT_INSERT (cd
);
243 value
= CGEN_INSN_BASE_VALUE (insn
);
245 /* If we're recording insns as numbers (rather than a string of bytes),
246 target byte order handling is deferred until later. */
250 put_insn_int_value (cd
, buffer
, cd
->base_insn_bitsize
,
251 CGEN_FIELDS_BITSIZE (fields
), value
);
255 cgen_put_insn_value (cd
, buffer
, min ((unsigned) cd
->base_insn_bitsize
,
256 (unsigned) CGEN_FIELDS_BITSIZE (fields
)),
259 #endif /* ! CGEN_INT_INSN_P */
261 /* ??? It would be better to scan the format's fields.
262 Still need to be able to insert a value based on the operand though;
263 e.g. storing a branch displacement that got resolved later.
264 Needs more thought first. */
266 for (syn
= CGEN_SYNTAX_STRING (syntax
); * syn
; ++ syn
)
270 if (CGEN_SYNTAX_CHAR_P (* syn
))
273 errmsg
= (* cd
->insert_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
283 /* Cover function to store an insn value into an integral insn. Must go here
284 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
287 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
288 CGEN_INSN_BYTES_PTR buf
,
293 /* For architectures with insns smaller than the base-insn-bitsize,
294 length may be too big. */
295 if (length
> insn_length
)
299 int shift
= insn_length
- length
;
300 /* Written this way to avoid undefined behaviour. */
301 CGEN_INSN_INT mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
303 *buf
= (*buf
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
308 /* Operand extraction. */
310 #if ! CGEN_INT_INSN_P
312 /* Subroutine of extract_normal.
313 Ensure sufficient bytes are cached in EX_INFO.
314 OFFSET is the offset in bytes from the start of the insn of the value.
315 BYTES is the length of the needed value.
316 Returns 1 for success, 0 for failure. */
318 static CGEN_INLINE
int
319 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
320 CGEN_EXTRACT_INFO
*ex_info
,
325 /* It's doubtful that the middle part has already been fetched so
326 we don't optimize that case. kiss. */
328 disassemble_info
*info
= (disassemble_info
*) ex_info
->dis_info
;
330 /* First do a quick check. */
331 mask
= (1 << bytes
) - 1;
332 if (((ex_info
->valid
>> offset
) & mask
) == mask
)
335 /* Search for the first byte we need to read. */
336 for (mask
= 1 << offset
; bytes
> 0; --bytes
, ++offset
, mask
<<= 1)
337 if (! (mask
& ex_info
->valid
))
345 status
= (*info
->read_memory_func
)
346 (pc
, ex_info
->insn_bytes
+ offset
, bytes
, info
);
350 (*info
->memory_error_func
) (status
, pc
, info
);
354 ex_info
->valid
|= ((1 << bytes
) - 1) << offset
;
360 /* Subroutine of extract_normal. */
362 static CGEN_INLINE
long
363 extract_1 (CGEN_CPU_DESC cd
,
364 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
369 bfd_vma pc ATTRIBUTE_UNUSED
)
374 x
= cgen_get_insn_value (cd
, bufp
, word_length
);
376 if (CGEN_INSN_LSB0_P
)
377 shift
= (start
+ 1) - length
;
379 shift
= (word_length
- (start
+ length
));
383 #endif /* ! CGEN_INT_INSN_P */
385 /* Default extraction routine.
387 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
388 or sometimes less for cases like the m32r where the base insn size is 32
389 but some insns are 16 bits.
390 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
391 but for generality we take a bitmask of all of them.
392 WORD_OFFSET is the offset in bits from the start of the insn of the value.
393 WORD_LENGTH is the length of the word in bits in which the value resides.
394 START is the starting bit number in the word, architecture origin.
395 LENGTH is the length of VALUE in bits.
396 TOTAL_LENGTH is the total length of the insn in bits.
398 Returns 1 for success, 0 for failure. */
400 /* ??? The return code isn't properly used. wip. */
402 /* ??? This doesn't handle bfd_vma's. Create another function when
406 extract_normal (CGEN_CPU_DESC cd
,
407 #if ! CGEN_INT_INSN_P
408 CGEN_EXTRACT_INFO
*ex_info
,
410 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
412 CGEN_INSN_INT insn_value
,
414 unsigned int word_offset
,
417 unsigned int word_length
,
418 unsigned int total_length
,
419 #if ! CGEN_INT_INSN_P
422 bfd_vma pc ATTRIBUTE_UNUSED
,
428 /* If LENGTH is zero, this operand doesn't contribute to the value
429 so give it a standard value of zero. */
436 if (word_length
> 32)
439 /* For architectures with insns smaller than the insn-base-bitsize,
440 word_length may be too big. */
441 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
444 && word_length
> total_length
)
445 word_length
= total_length
;
448 /* Does the value reside in INSN_VALUE, and at the right alignment? */
450 if (CGEN_INT_INSN_P
|| (word_offset
== 0 && word_length
== total_length
))
452 if (CGEN_INSN_LSB0_P
)
453 value
= insn_value
>> ((word_offset
+ start
+ 1) - length
);
455 value
= insn_value
>> (total_length
- ( word_offset
+ start
+ length
));
458 #if ! CGEN_INT_INSN_P
462 unsigned char *bufp
= ex_info
->insn_bytes
+ word_offset
/ 8;
464 if (word_length
> 32)
467 if (fill_cache (cd
, ex_info
, word_offset
/ 8, word_length
/ 8, pc
) == 0)
470 value
= extract_1 (cd
, ex_info
, start
, length
, word_length
, bufp
, pc
);
473 #endif /* ! CGEN_INT_INSN_P */
475 /* Written this way to avoid undefined behaviour. */
476 mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
480 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
)
481 && (value
& (1L << (length
- 1))))
489 /* Default insn extractor.
491 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
492 The extracted fields are stored in FIELDS.
493 EX_INFO is used to handle reading variable length insns.
494 Return the length of the insn in bits, or 0 if no match,
495 or -1 if an error occurs fetching data (memory_error_func will have
499 extract_insn_normal (CGEN_CPU_DESC cd
,
500 const CGEN_INSN
*insn
,
501 CGEN_EXTRACT_INFO
*ex_info
,
502 CGEN_INSN_INT insn_value
,
506 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
507 const CGEN_SYNTAX_CHAR_TYPE
*syn
;
509 CGEN_FIELDS_BITSIZE (fields
) = CGEN_INSN_BITSIZE (insn
);
511 CGEN_INIT_EXTRACT (cd
);
513 for (syn
= CGEN_SYNTAX_STRING (syntax
); *syn
; ++syn
)
517 if (CGEN_SYNTAX_CHAR_P (*syn
))
520 length
= (* cd
->extract_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
521 ex_info
, insn_value
, fields
, pc
);
526 /* We recognized and successfully extracted this insn. */
527 return CGEN_INSN_BITSIZE (insn
);
530 /* Machine generated code added here. */
532 const char * m32c_cgen_insert_operand
533 (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
535 /* Main entry point for operand insertion.
537 This function is basically just a big switch statement. Earlier versions
538 used tables to look up the function to use, but
539 - if the table contains both assembler and disassembler functions then
540 the disassembler contains much of the assembler and vice-versa,
541 - there's a lot of inlining possibilities as things grow,
542 - using a switch statement avoids the function call overhead.
544 This function could be moved into `parse_insn_normal', but keeping it
545 separate makes clear the interface between `parse_insn_normal' and each of
546 the handlers. It's also needed by GAS to insert operands that couldn't be
547 resolved during parsing. */
550 m32c_cgen_insert_operand (CGEN_CPU_DESC cd
,
552 CGEN_FIELDS
* fields
,
553 CGEN_INSN_BYTES_PTR buffer
,
554 bfd_vma pc ATTRIBUTE_UNUSED
)
556 const char * errmsg
= NULL
;
557 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
561 case M32C_OPERAND_A0
:
563 case M32C_OPERAND_A1
:
565 case M32C_OPERAND_AN16_PUSH_S
:
566 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
568 case M32C_OPERAND_BIT16AN
:
569 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
571 case M32C_OPERAND_BIT16RN
:
572 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
574 case M32C_OPERAND_BIT32ANPREFIXED
:
575 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
577 case M32C_OPERAND_BIT32ANUNPREFIXED
:
578 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
580 case M32C_OPERAND_BIT32RNPREFIXED
:
582 long value
= fields
->f_dst32_rn_prefixed_QI
;
583 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
584 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
587 case M32C_OPERAND_BIT32RNUNPREFIXED
:
589 long value
= fields
->f_dst32_rn_unprefixed_QI
;
590 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
591 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
594 case M32C_OPERAND_BITBASE16_16_S8
:
595 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
597 case M32C_OPERAND_BITBASE16_16_U16
:
599 long value
= fields
->f_dsp_16_u16
;
600 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
601 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
604 case M32C_OPERAND_BITBASE16_16_U8
:
605 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
607 case M32C_OPERAND_BITBASE16_8_U11_S
:
610 FLD (f_bitno16_S
) = ((FLD (f_bitbase16_u11_S
)) & (7));
611 FLD (f_dsp_8_u8
) = ((((unsigned int) (FLD (f_bitbase16_u11_S
)) >> (3))) & (255));
613 errmsg
= insert_normal (cd
, fields
->f_bitno16_S
, 0, 0, 5, 3, 32, total_length
, buffer
);
616 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
621 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
624 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s11_unprefixed
)) & (7));
625 FLD (f_dsp_16_s8
) = ((int) (FLD (f_bitbase32_16_s11_unprefixed
)) >> (3));
627 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
630 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
635 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
638 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s19_unprefixed
)) & (7));
639 FLD (f_dsp_16_s16
) = ((int) (FLD (f_bitbase32_16_s19_unprefixed
)) >> (3));
641 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
645 long value
= fields
->f_dsp_16_s16
;
646 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
647 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
653 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
656 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u11_unprefixed
)) & (7));
657 FLD (f_dsp_16_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u11_unprefixed
)) >> (3))) & (255));
659 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
662 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
667 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
670 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u19_unprefixed
)) & (7));
671 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u19_unprefixed
)) >> (3))) & (65535));
673 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
677 long value
= fields
->f_dsp_16_u16
;
678 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
679 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
685 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
688 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u27_unprefixed
)) & (7));
689 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (3))) & (65535));
690 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (19))) & (255));
692 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
696 long value
= fields
->f_dsp_16_u16
;
697 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
698 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
702 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
707 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
710 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s11_prefixed
)) & (7));
711 FLD (f_dsp_24_s8
) = ((int) (FLD (f_bitbase32_24_s11_prefixed
)) >> (3));
713 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
716 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
721 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
724 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s19_prefixed
)) & (7));
725 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (3))) & (255));
726 FLD (f_dsp_32_s8
) = ((int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (11));
728 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
731 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
734 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
739 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
742 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u11_prefixed
)) & (7));
743 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u11_prefixed
)) >> (3))) & (255));
745 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
748 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
753 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
756 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u19_prefixed
)) & (7));
757 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (3))) & (255));
758 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (11))) & (255));
760 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
763 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
766 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
771 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
774 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u27_prefixed
)) & (7));
775 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (3))) & (255));
776 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (11))) & (65535));
778 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
781 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
785 long value
= fields
->f_dsp_32_u16
;
786 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
787 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
793 case M32C_OPERAND_BITNO16R
:
794 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
796 case M32C_OPERAND_BITNO32PREFIXED
:
797 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
799 case M32C_OPERAND_BITNO32UNPREFIXED
:
800 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
802 case M32C_OPERAND_DSP_10_U6
:
803 errmsg
= insert_normal (cd
, fields
->f_dsp_10_u6
, 0, 0, 10, 6, 32, total_length
, buffer
);
805 case M32C_OPERAND_DSP_16_S16
:
807 long value
= fields
->f_dsp_16_s16
;
808 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
809 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
812 case M32C_OPERAND_DSP_16_S8
:
813 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
815 case M32C_OPERAND_DSP_16_U16
:
817 long value
= fields
->f_dsp_16_u16
;
818 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
819 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
822 case M32C_OPERAND_DSP_16_U20
:
825 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
826 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
829 long value
= fields
->f_dsp_16_u16
;
830 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
831 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
835 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
840 case M32C_OPERAND_DSP_16_U24
:
843 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
844 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
847 long value
= fields
->f_dsp_16_u16
;
848 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
849 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
853 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
858 case M32C_OPERAND_DSP_16_U8
:
859 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
861 case M32C_OPERAND_DSP_24_S16
:
864 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
865 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
867 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
870 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
875 case M32C_OPERAND_DSP_24_S8
:
876 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
878 case M32C_OPERAND_DSP_24_U16
:
881 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u16
)) & (255));
882 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_u16
)) >> (8))) & (255));
884 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
887 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
892 case M32C_OPERAND_DSP_24_U20
:
895 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
896 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
898 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
902 long value
= fields
->f_dsp_32_u16
;
903 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
904 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
910 case M32C_OPERAND_DSP_24_U24
:
913 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
914 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
916 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
920 long value
= fields
->f_dsp_32_u16
;
921 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
922 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
928 case M32C_OPERAND_DSP_24_U8
:
929 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
931 case M32C_OPERAND_DSP_32_S16
:
933 long value
= fields
->f_dsp_32_s16
;
934 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
935 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
938 case M32C_OPERAND_DSP_32_S8
:
939 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
941 case M32C_OPERAND_DSP_32_U16
:
943 long value
= fields
->f_dsp_32_u16
;
944 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
945 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
948 case M32C_OPERAND_DSP_32_U20
:
950 long value
= fields
->f_dsp_32_u24
;
951 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
952 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
955 case M32C_OPERAND_DSP_32_U24
:
957 long value
= fields
->f_dsp_32_u24
;
958 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
959 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
962 case M32C_OPERAND_DSP_32_U8
:
963 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
965 case M32C_OPERAND_DSP_40_S16
:
967 long value
= fields
->f_dsp_40_s16
;
968 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
969 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
972 case M32C_OPERAND_DSP_40_S8
:
973 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
975 case M32C_OPERAND_DSP_40_U16
:
977 long value
= fields
->f_dsp_40_u16
;
978 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
979 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 16, 32, total_length
, buffer
);
982 case M32C_OPERAND_DSP_40_U24
:
984 long value
= fields
->f_dsp_40_u24
;
985 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
986 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
989 case M32C_OPERAND_DSP_40_U8
:
990 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
992 case M32C_OPERAND_DSP_48_S16
:
994 long value
= fields
->f_dsp_48_s16
;
995 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
996 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
999 case M32C_OPERAND_DSP_48_S8
:
1000 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1002 case M32C_OPERAND_DSP_48_U16
:
1004 long value
= fields
->f_dsp_48_u16
;
1005 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1006 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1009 case M32C_OPERAND_DSP_48_U24
:
1012 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_48_u24
)) >> (16))) & (255));
1013 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u24
)) & (65535));
1016 long value
= fields
->f_dsp_48_u16
;
1017 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1018 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1022 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1027 case M32C_OPERAND_DSP_48_U8
:
1028 errmsg
= insert_normal (cd
, fields
->f_dsp_48_u8
, 0, 32, 16, 8, 32, total_length
, buffer
);
1030 case M32C_OPERAND_DSP_8_S8
:
1031 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1033 case M32C_OPERAND_DSP_8_U16
:
1035 long value
= fields
->f_dsp_8_u16
;
1036 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1037 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 16, 32, total_length
, buffer
);
1040 case M32C_OPERAND_DSP_8_U24
:
1042 long value
= fields
->f_dsp_8_u24
;
1043 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1044 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 24, 32, total_length
, buffer
);
1047 case M32C_OPERAND_DSP_8_U6
:
1048 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u6
, 0, 0, 8, 6, 32, total_length
, buffer
);
1050 case M32C_OPERAND_DSP_8_U8
:
1051 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1053 case M32C_OPERAND_DST16AN
:
1054 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1056 case M32C_OPERAND_DST16AN_S
:
1057 errmsg
= insert_normal (cd
, fields
->f_dst16_an_s
, 0, 0, 4, 1, 32, total_length
, buffer
);
1059 case M32C_OPERAND_DST16ANHI
:
1060 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1062 case M32C_OPERAND_DST16ANQI
:
1063 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1065 case M32C_OPERAND_DST16ANQI_S
:
1066 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1068 case M32C_OPERAND_DST16ANSI
:
1069 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1071 case M32C_OPERAND_DST16RNEXTQI
:
1072 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_ext
, 0, 0, 14, 1, 32, total_length
, buffer
);
1074 case M32C_OPERAND_DST16RNHI
:
1075 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1077 case M32C_OPERAND_DST16RNQI
:
1078 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1080 case M32C_OPERAND_DST16RNQI_S
:
1081 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1083 case M32C_OPERAND_DST16RNSI
:
1084 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1086 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
1087 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1089 case M32C_OPERAND_DST32ANPREFIXED
:
1090 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1092 case M32C_OPERAND_DST32ANPREFIXEDHI
:
1093 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1095 case M32C_OPERAND_DST32ANPREFIXEDQI
:
1096 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1098 case M32C_OPERAND_DST32ANPREFIXEDSI
:
1099 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1101 case M32C_OPERAND_DST32ANUNPREFIXED
:
1102 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1104 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
1105 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1107 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
1108 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1110 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
1111 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1113 case M32C_OPERAND_DST32R0HI_S
:
1115 case M32C_OPERAND_DST32R0QI_S
:
1117 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
1118 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1120 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
1121 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1123 case M32C_OPERAND_DST32RNPREFIXEDHI
:
1125 long value
= fields
->f_dst32_rn_prefixed_HI
;
1126 value
= ((((value
) + (2))) % (4));
1127 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1130 case M32C_OPERAND_DST32RNPREFIXEDQI
:
1132 long value
= fields
->f_dst32_rn_prefixed_QI
;
1133 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1134 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1137 case M32C_OPERAND_DST32RNPREFIXEDSI
:
1139 long value
= fields
->f_dst32_rn_prefixed_SI
;
1140 value
= ((value
) + (2));
1141 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1144 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
1146 long value
= fields
->f_dst32_rn_unprefixed_HI
;
1147 value
= ((((value
) + (2))) % (4));
1148 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1151 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
1153 long value
= fields
->f_dst32_rn_unprefixed_QI
;
1154 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1155 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1158 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
1160 long value
= fields
->f_dst32_rn_unprefixed_SI
;
1161 value
= ((value
) + (2));
1162 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1165 case M32C_OPERAND_G
:
1167 case M32C_OPERAND_IMM_12_S4
:
1168 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1170 case M32C_OPERAND_IMM_13_U3
:
1171 errmsg
= insert_normal (cd
, fields
->f_imm_13_u3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1173 case M32C_OPERAND_IMM_16_HI
:
1175 long value
= fields
->f_dsp_16_s16
;
1176 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1177 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
1180 case M32C_OPERAND_IMM_16_QI
:
1181 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
1183 case M32C_OPERAND_IMM_16_SI
:
1186 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_16_s32
)) >> (16))) & (65535));
1187 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_s32
)) & (65535));
1190 long value
= fields
->f_dsp_16_u16
;
1191 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1192 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
1197 long value
= fields
->f_dsp_32_u16
;
1198 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1199 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
1205 case M32C_OPERAND_IMM_20_S4
:
1206 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1208 case M32C_OPERAND_IMM_24_HI
:
1211 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
1212 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
1214 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1217 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1222 case M32C_OPERAND_IMM_24_QI
:
1223 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
1225 case M32C_OPERAND_IMM_24_SI
:
1228 FLD (f_dsp_32_u24
) = ((((unsigned int) (FLD (f_dsp_24_s32
)) >> (8))) & (16777215));
1229 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s32
)) & (255));
1231 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1235 long value
= fields
->f_dsp_32_u24
;
1236 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1237 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
1243 case M32C_OPERAND_IMM_32_HI
:
1245 long value
= fields
->f_dsp_32_s16
;
1246 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1247 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
1250 case M32C_OPERAND_IMM_32_QI
:
1251 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
1253 case M32C_OPERAND_IMM_32_SI
:
1255 long value
= fields
->f_dsp_32_s32
;
1256 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
1257 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, buffer
);
1260 case M32C_OPERAND_IMM_40_HI
:
1262 long value
= fields
->f_dsp_40_s16
;
1263 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1264 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1267 case M32C_OPERAND_IMM_40_QI
:
1268 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1270 case M32C_OPERAND_IMM_40_SI
:
1273 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_40_s32
)) >> (24))) & (255));
1274 FLD (f_dsp_40_u24
) = ((FLD (f_dsp_40_s32
)) & (16777215));
1277 long value
= fields
->f_dsp_40_u24
;
1278 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1279 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1283 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1288 case M32C_OPERAND_IMM_48_HI
:
1290 long value
= fields
->f_dsp_48_s16
;
1291 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1292 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1295 case M32C_OPERAND_IMM_48_QI
:
1296 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1298 case M32C_OPERAND_IMM_48_SI
:
1301 FLD (f_dsp_64_u16
) = ((((unsigned int) (FLD (f_dsp_48_s32
)) >> (16))) & (65535));
1302 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_s32
)) & (65535));
1305 long value
= fields
->f_dsp_48_u16
;
1306 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1307 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1312 long value
= fields
->f_dsp_64_u16
;
1313 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1314 errmsg
= insert_normal (cd
, value
, 0, 64, 0, 16, 32, total_length
, buffer
);
1320 case M32C_OPERAND_IMM_56_HI
:
1323 FLD (f_dsp_56_u8
) = ((FLD (f_dsp_56_s16
)) & (255));
1324 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_56_s16
)) >> (8))) & (255));
1326 errmsg
= insert_normal (cd
, fields
->f_dsp_56_u8
, 0, 32, 24, 8, 32, total_length
, buffer
);
1329 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1334 case M32C_OPERAND_IMM_56_QI
:
1335 errmsg
= insert_normal (cd
, fields
->f_dsp_56_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 24, 8, 32, total_length
, buffer
);
1337 case M32C_OPERAND_IMM_64_HI
:
1339 long value
= fields
->f_dsp_64_s16
;
1340 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1341 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, buffer
);
1344 case M32C_OPERAND_IMM_8_HI
:
1346 long value
= fields
->f_dsp_8_s16
;
1347 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1348 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, buffer
);
1351 case M32C_OPERAND_IMM_8_QI
:
1352 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1354 case M32C_OPERAND_IMM_8_S4
:
1355 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1357 case M32C_OPERAND_IMM_SH_12_S4
:
1358 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1360 case M32C_OPERAND_IMM_SH_20_S4
:
1361 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1363 case M32C_OPERAND_IMM_SH_8_S4
:
1364 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1366 case M32C_OPERAND_IMM1_S
:
1368 long value
= fields
->f_imm1_S
;
1369 value
= ((value
) - (1));
1370 errmsg
= insert_normal (cd
, value
, 0, 0, 2, 1, 32, total_length
, buffer
);
1373 case M32C_OPERAND_IMM3_S
:
1376 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
1377 FLD (f_2_2
) = ((((unsigned int) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
1379 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1382 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1387 case M32C_OPERAND_LAB_16_8
:
1389 long value
= fields
->f_lab_16_8
;
1390 value
= ((value
) - (((pc
) + (2))));
1391 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 16, 8, 32, total_length
, buffer
);
1394 case M32C_OPERAND_LAB_24_8
:
1396 long value
= fields
->f_lab_24_8
;
1397 value
= ((value
) - (((pc
) + (2))));
1398 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 24, 8, 32, total_length
, buffer
);
1401 case M32C_OPERAND_LAB_32_8
:
1403 long value
= fields
->f_lab_32_8
;
1404 value
= ((value
) - (((pc
) + (2))));
1405 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 0, 8, 32, total_length
, buffer
);
1408 case M32C_OPERAND_LAB_40_8
:
1410 long value
= fields
->f_lab_40_8
;
1411 value
= ((value
) - (((pc
) + (2))));
1412 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 8, 8, 32, total_length
, buffer
);
1415 case M32C_OPERAND_LAB_5_3
:
1417 long value
= fields
->f_lab_5_3
;
1418 value
= ((value
) - (((pc
) + (2))));
1419 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, buffer
);
1422 case M32C_OPERAND_LAB_8_16
:
1424 long value
= fields
->f_lab_8_16
;
1425 value
= ((((((((value
) - (((pc
) + (1))))) & (255))) << (8))) | (((unsigned int) (((((value
) - (((pc
) + (1))))) & (65535))) >> (8))));
1426 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGN_OPT
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 16, 32, total_length
, buffer
);
1429 case M32C_OPERAND_LAB_8_24
:
1431 long value
= fields
->f_lab_8_24
;
1432 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1433 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, buffer
);
1436 case M32C_OPERAND_LAB_8_8
:
1438 long value
= fields
->f_lab_8_8
;
1439 value
= ((value
) - (((pc
) + (1))));
1440 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 8, 32, total_length
, buffer
);
1443 case M32C_OPERAND_LAB32_JMP_S
:
1447 tmp_val
= ((((FLD (f_lab32_jmp_s
)) - (pc
))) - (2));
1448 FLD (f_7_1
) = ((tmp_val
) & (1));
1449 FLD (f_2_2
) = ((unsigned int) (tmp_val
) >> (1));
1451 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1454 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1459 case M32C_OPERAND_Q
:
1461 case M32C_OPERAND_R0
:
1463 case M32C_OPERAND_R0H
:
1465 case M32C_OPERAND_R0L
:
1467 case M32C_OPERAND_R1
:
1469 case M32C_OPERAND_R1R2R0
:
1471 case M32C_OPERAND_R2
:
1473 case M32C_OPERAND_R2R0
:
1475 case M32C_OPERAND_R3
:
1477 case M32C_OPERAND_R3R1
:
1479 case M32C_OPERAND_REGSETPOP
:
1480 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1482 case M32C_OPERAND_REGSETPUSH
:
1483 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1485 case M32C_OPERAND_RN16_PUSH_S
:
1486 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
1488 case M32C_OPERAND_S
:
1490 case M32C_OPERAND_SRC16AN
:
1491 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1493 case M32C_OPERAND_SRC16ANHI
:
1494 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1496 case M32C_OPERAND_SRC16ANQI
:
1497 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1499 case M32C_OPERAND_SRC16RNHI
:
1500 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1502 case M32C_OPERAND_SRC16RNQI
:
1503 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1505 case M32C_OPERAND_SRC32ANPREFIXED
:
1506 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1508 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
1509 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1511 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
1512 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1514 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
1515 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1517 case M32C_OPERAND_SRC32ANUNPREFIXED
:
1518 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1520 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
1521 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1523 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
1524 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1526 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
1527 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1529 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
1531 long value
= fields
->f_src32_rn_prefixed_HI
;
1532 value
= ((((value
) + (2))) % (4));
1533 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1536 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
1538 long value
= fields
->f_src32_rn_prefixed_QI
;
1539 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1540 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1543 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
1545 long value
= fields
->f_src32_rn_prefixed_SI
;
1546 value
= ((value
) + (2));
1547 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1550 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
1552 long value
= fields
->f_src32_rn_unprefixed_HI
;
1553 value
= ((((value
) + (2))) % (4));
1554 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1557 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
1559 long value
= fields
->f_src32_rn_unprefixed_QI
;
1560 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1561 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1564 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
1566 long value
= fields
->f_src32_rn_unprefixed_SI
;
1567 value
= ((value
) + (2));
1568 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1571 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
1572 errmsg
= insert_normal (cd
, fields
->f_5_1
, 0, 0, 5, 1, 32, total_length
, buffer
);
1574 case M32C_OPERAND_X
:
1576 case M32C_OPERAND_Z
:
1578 case M32C_OPERAND_COND16_16
:
1579 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1581 case M32C_OPERAND_COND16_24
:
1582 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1584 case M32C_OPERAND_COND16_32
:
1585 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1587 case M32C_OPERAND_COND16C
:
1588 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1590 case M32C_OPERAND_COND16J
:
1591 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1593 case M32C_OPERAND_COND16J5
:
1594 errmsg
= insert_normal (cd
, fields
->f_cond16j_5
, 0, 0, 5, 3, 32, total_length
, buffer
);
1596 case M32C_OPERAND_COND32
:
1599 FLD (f_9_1
) = ((((unsigned int) (FLD (f_cond32
)) >> (3))) & (1));
1600 FLD (f_13_3
) = ((FLD (f_cond32
)) & (7));
1602 errmsg
= insert_normal (cd
, fields
->f_9_1
, 0, 0, 9, 1, 32, total_length
, buffer
);
1605 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1610 case M32C_OPERAND_COND32_16
:
1611 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1613 case M32C_OPERAND_COND32_24
:
1614 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1616 case M32C_OPERAND_COND32_32
:
1617 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1619 case M32C_OPERAND_COND32_40
:
1620 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1622 case M32C_OPERAND_COND32J
:
1625 FLD (f_1_3
) = ((((unsigned int) (FLD (f_cond32j
)) >> (1))) & (7));
1626 FLD (f_7_1
) = ((FLD (f_cond32j
)) & (1));
1628 errmsg
= insert_normal (cd
, fields
->f_1_3
, 0, 0, 1, 3, 32, total_length
, buffer
);
1631 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1636 case M32C_OPERAND_CR1_PREFIXED_32
:
1637 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1639 case M32C_OPERAND_CR1_UNPREFIXED_32
:
1640 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1642 case M32C_OPERAND_CR16
:
1643 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1645 case M32C_OPERAND_CR2_32
:
1646 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1648 case M32C_OPERAND_CR3_PREFIXED_32
:
1649 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1651 case M32C_OPERAND_CR3_UNPREFIXED_32
:
1652 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1654 case M32C_OPERAND_FLAGS16
:
1655 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1657 case M32C_OPERAND_FLAGS32
:
1658 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1660 case M32C_OPERAND_SCCOND32
:
1661 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1663 case M32C_OPERAND_SIZE
:
1667 /* xgettext:c-format */
1668 fprintf (stderr
, _("Unrecognized field %d while building insn.\n"),
1676 int m32c_cgen_extract_operand
1677 (CGEN_CPU_DESC
, int, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
1679 /* Main entry point for operand extraction.
1680 The result is <= 0 for error, >0 for success.
1681 ??? Actual values aren't well defined right now.
1683 This function is basically just a big switch statement. Earlier versions
1684 used tables to look up the function to use, but
1685 - if the table contains both assembler and disassembler functions then
1686 the disassembler contains much of the assembler and vice-versa,
1687 - there's a lot of inlining possibilities as things grow,
1688 - using a switch statement avoids the function call overhead.
1690 This function could be moved into `print_insn_normal', but keeping it
1691 separate makes clear the interface between `print_insn_normal' and each of
1695 m32c_cgen_extract_operand (CGEN_CPU_DESC cd
,
1697 CGEN_EXTRACT_INFO
*ex_info
,
1698 CGEN_INSN_INT insn_value
,
1699 CGEN_FIELDS
* fields
,
1702 /* Assume success (for those operands that are nops). */
1704 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
1708 case M32C_OPERAND_A0
:
1710 case M32C_OPERAND_A1
:
1712 case M32C_OPERAND_AN16_PUSH_S
:
1713 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
1715 case M32C_OPERAND_BIT16AN
:
1716 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
1718 case M32C_OPERAND_BIT16RN
:
1719 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
1721 case M32C_OPERAND_BIT32ANPREFIXED
:
1722 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
1724 case M32C_OPERAND_BIT32ANUNPREFIXED
:
1725 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
1727 case M32C_OPERAND_BIT32RNPREFIXED
:
1730 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
1731 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1732 fields
->f_dst32_rn_prefixed_QI
= value
;
1735 case M32C_OPERAND_BIT32RNUNPREFIXED
:
1738 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
1739 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1740 fields
->f_dst32_rn_unprefixed_QI
= value
;
1743 case M32C_OPERAND_BITBASE16_16_S8
:
1744 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
);
1746 case M32C_OPERAND_BITBASE16_16_U16
:
1749 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1750 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1751 fields
->f_dsp_16_u16
= value
;
1754 case M32C_OPERAND_BITBASE16_16_U8
:
1755 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1757 case M32C_OPERAND_BITBASE16_8_U11_S
:
1759 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_bitno16_S
);
1760 if (length
<= 0) break;
1761 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
1762 if (length
<= 0) break;
1764 FLD (f_bitbase16_u11_S
) = ((((FLD (f_dsp_8_u8
)) << (3))) | (FLD (f_bitno16_S
)));
1768 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
1770 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1771 if (length
<= 0) break;
1772 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
);
1773 if (length
<= 0) break;
1775 FLD (f_bitbase32_16_s11_unprefixed
) = ((((FLD (f_dsp_16_s8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1779 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
1781 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1782 if (length
<= 0) break;
1785 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1786 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1787 fields
->f_dsp_16_s16
= value
;
1789 if (length
<= 0) break;
1791 FLD (f_bitbase32_16_s19_unprefixed
) = ((((FLD (f_dsp_16_s16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1795 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
1797 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1798 if (length
<= 0) break;
1799 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1800 if (length
<= 0) break;
1802 FLD (f_bitbase32_16_u11_unprefixed
) = ((((FLD (f_dsp_16_u8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1806 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
1808 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1809 if (length
<= 0) break;
1812 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1813 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1814 fields
->f_dsp_16_u16
= value
;
1816 if (length
<= 0) break;
1818 FLD (f_bitbase32_16_u19_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1822 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
1824 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1825 if (length
<= 0) break;
1828 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1829 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1830 fields
->f_dsp_16_u16
= value
;
1832 if (length
<= 0) break;
1833 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1834 if (length
<= 0) break;
1836 FLD (f_bitbase32_16_u27_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (19))) | (FLD (f_bitno32_unprefixed
)))));
1840 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
1842 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1843 if (length
<= 0) break;
1844 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
);
1845 if (length
<= 0) break;
1847 FLD (f_bitbase32_24_s11_prefixed
) = ((((FLD (f_dsp_24_s8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1851 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
1853 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1854 if (length
<= 0) break;
1855 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1856 if (length
<= 0) break;
1857 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
);
1858 if (length
<= 0) break;
1860 FLD (f_bitbase32_24_s19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_s8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1864 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
1866 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1867 if (length
<= 0) break;
1868 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1869 if (length
<= 0) break;
1871 FLD (f_bitbase32_24_u11_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1875 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
1877 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1878 if (length
<= 0) break;
1879 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1880 if (length
<= 0) break;
1881 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1882 if (length
<= 0) break;
1884 FLD (f_bitbase32_24_u19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1888 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
1890 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1891 if (length
<= 0) break;
1892 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1893 if (length
<= 0) break;
1896 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
1897 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1898 fields
->f_dsp_32_u16
= value
;
1900 if (length
<= 0) break;
1902 FLD (f_bitbase32_24_u27_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u16
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1906 case M32C_OPERAND_BITNO16R
:
1907 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1909 case M32C_OPERAND_BITNO32PREFIXED
:
1910 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1912 case M32C_OPERAND_BITNO32UNPREFIXED
:
1913 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1915 case M32C_OPERAND_DSP_10_U6
:
1916 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 6, 32, total_length
, pc
, & fields
->f_dsp_10_u6
);
1918 case M32C_OPERAND_DSP_16_S16
:
1921 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1922 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1923 fields
->f_dsp_16_s16
= value
;
1926 case M32C_OPERAND_DSP_16_S8
:
1927 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
);
1929 case M32C_OPERAND_DSP_16_U16
:
1932 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1933 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1934 fields
->f_dsp_16_u16
= value
;
1937 case M32C_OPERAND_DSP_16_U20
:
1941 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1942 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1943 fields
->f_dsp_16_u16
= value
;
1945 if (length
<= 0) break;
1946 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1947 if (length
<= 0) break;
1949 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
1953 case M32C_OPERAND_DSP_16_U24
:
1957 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1958 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1959 fields
->f_dsp_16_u16
= value
;
1961 if (length
<= 0) break;
1962 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1963 if (length
<= 0) break;
1965 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
1969 case M32C_OPERAND_DSP_16_U8
:
1970 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1972 case M32C_OPERAND_DSP_24_S16
:
1974 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1975 if (length
<= 0) break;
1976 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1977 if (length
<= 0) break;
1979 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
1983 case M32C_OPERAND_DSP_24_S8
:
1984 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
);
1986 case M32C_OPERAND_DSP_24_U16
:
1988 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1989 if (length
<= 0) break;
1990 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1991 if (length
<= 0) break;
1993 FLD (f_dsp_24_u16
) = ((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
)));
1997 case M32C_OPERAND_DSP_24_U20
:
1999 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2000 if (length
<= 0) break;
2003 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2004 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2005 fields
->f_dsp_32_u16
= value
;
2007 if (length
<= 0) break;
2009 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2013 case M32C_OPERAND_DSP_24_U24
:
2015 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2016 if (length
<= 0) break;
2019 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2020 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2021 fields
->f_dsp_32_u16
= value
;
2023 if (length
<= 0) break;
2025 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2029 case M32C_OPERAND_DSP_24_U8
:
2030 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2032 case M32C_OPERAND_DSP_32_S16
:
2035 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2036 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2037 fields
->f_dsp_32_s16
= value
;
2040 case M32C_OPERAND_DSP_32_S8
:
2041 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
);
2043 case M32C_OPERAND_DSP_32_U16
:
2046 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2047 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2048 fields
->f_dsp_32_u16
= value
;
2051 case M32C_OPERAND_DSP_32_U20
:
2054 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2055 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2056 fields
->f_dsp_32_u24
= value
;
2059 case M32C_OPERAND_DSP_32_U24
:
2062 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2063 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2064 fields
->f_dsp_32_u24
= value
;
2067 case M32C_OPERAND_DSP_32_U8
:
2068 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2070 case M32C_OPERAND_DSP_40_S16
:
2073 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2074 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2075 fields
->f_dsp_40_s16
= value
;
2078 case M32C_OPERAND_DSP_40_S8
:
2079 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
);
2081 case M32C_OPERAND_DSP_40_U16
:
2084 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 16, 32, total_length
, pc
, & value
);
2085 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2086 fields
->f_dsp_40_u16
= value
;
2089 case M32C_OPERAND_DSP_40_U24
:
2092 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2093 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2094 fields
->f_dsp_40_u24
= value
;
2097 case M32C_OPERAND_DSP_40_U8
:
2098 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2100 case M32C_OPERAND_DSP_48_S16
:
2103 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2104 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2105 fields
->f_dsp_48_s16
= value
;
2108 case M32C_OPERAND_DSP_48_S8
:
2109 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
);
2111 case M32C_OPERAND_DSP_48_U16
:
2114 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2115 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2116 fields
->f_dsp_48_u16
= value
;
2119 case M32C_OPERAND_DSP_48_U24
:
2123 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2124 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2125 fields
->f_dsp_48_u16
= value
;
2127 if (length
<= 0) break;
2128 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2129 if (length
<= 0) break;
2131 FLD (f_dsp_48_u24
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (16711680))));
2135 case M32C_OPERAND_DSP_48_U8
:
2136 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_48_u8
);
2138 case M32C_OPERAND_DSP_8_S8
:
2139 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
);
2141 case M32C_OPERAND_DSP_8_U16
:
2144 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 16, 32, total_length
, pc
, & value
);
2145 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2146 fields
->f_dsp_8_u16
= value
;
2149 case M32C_OPERAND_DSP_8_U24
:
2152 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 24, 32, total_length
, pc
, & value
);
2153 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2154 fields
->f_dsp_8_u24
= value
;
2157 case M32C_OPERAND_DSP_8_U6
:
2158 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 6, 32, total_length
, pc
, & fields
->f_dsp_8_u6
);
2160 case M32C_OPERAND_DSP_8_U8
:
2161 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
2163 case M32C_OPERAND_DST16AN
:
2164 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2166 case M32C_OPERAND_DST16AN_S
:
2167 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_dst16_an_s
);
2169 case M32C_OPERAND_DST16ANHI
:
2170 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2172 case M32C_OPERAND_DST16ANQI
:
2173 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2175 case M32C_OPERAND_DST16ANQI_S
:
2176 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2178 case M32C_OPERAND_DST16ANSI
:
2179 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2181 case M32C_OPERAND_DST16RNEXTQI
:
2182 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_ext
);
2184 case M32C_OPERAND_DST16RNHI
:
2185 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2187 case M32C_OPERAND_DST16RNQI
:
2188 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2190 case M32C_OPERAND_DST16RNQI_S
:
2191 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2193 case M32C_OPERAND_DST16RNSI
:
2194 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2196 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
2197 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2199 case M32C_OPERAND_DST32ANPREFIXED
:
2200 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2202 case M32C_OPERAND_DST32ANPREFIXEDHI
:
2203 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2205 case M32C_OPERAND_DST32ANPREFIXEDQI
:
2206 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2208 case M32C_OPERAND_DST32ANPREFIXEDSI
:
2209 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2211 case M32C_OPERAND_DST32ANUNPREFIXED
:
2212 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2214 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
2215 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2217 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
2218 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2220 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
2221 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2223 case M32C_OPERAND_DST32R0HI_S
:
2225 case M32C_OPERAND_DST32R0QI_S
:
2227 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
2228 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2230 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
2231 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2233 case M32C_OPERAND_DST32RNPREFIXEDHI
:
2236 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2237 value
= ((((value
) + (2))) % (4));
2238 fields
->f_dst32_rn_prefixed_HI
= value
;
2241 case M32C_OPERAND_DST32RNPREFIXEDQI
:
2244 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2245 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2246 fields
->f_dst32_rn_prefixed_QI
= value
;
2249 case M32C_OPERAND_DST32RNPREFIXEDSI
:
2252 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2253 value
= ((value
) - (2));
2254 fields
->f_dst32_rn_prefixed_SI
= value
;
2257 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
2260 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2261 value
= ((((value
) + (2))) % (4));
2262 fields
->f_dst32_rn_unprefixed_HI
= value
;
2265 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
2268 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2269 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2270 fields
->f_dst32_rn_unprefixed_QI
= value
;
2273 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
2276 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2277 value
= ((value
) - (2));
2278 fields
->f_dst32_rn_unprefixed_SI
= value
;
2281 case M32C_OPERAND_G
:
2283 case M32C_OPERAND_IMM_12_S4
:
2284 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
);
2286 case M32C_OPERAND_IMM_13_U3
:
2287 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_imm_13_u3
);
2289 case M32C_OPERAND_IMM_16_HI
:
2292 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2293 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2294 fields
->f_dsp_16_s16
= value
;
2297 case M32C_OPERAND_IMM_16_QI
:
2298 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
);
2300 case M32C_OPERAND_IMM_16_SI
:
2304 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2305 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2306 fields
->f_dsp_16_u16
= value
;
2308 if (length
<= 0) break;
2311 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2312 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2313 fields
->f_dsp_32_u16
= value
;
2315 if (length
<= 0) break;
2317 FLD (f_dsp_16_s32
) = ((((FLD (f_dsp_16_u16
)) & (65535))) | (((((FLD (f_dsp_32_u16
)) << (16))) & (0xffff0000))));
2321 case M32C_OPERAND_IMM_20_S4
:
2322 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
);
2324 case M32C_OPERAND_IMM_24_HI
:
2326 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2327 if (length
<= 0) break;
2328 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2329 if (length
<= 0) break;
2331 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2335 case M32C_OPERAND_IMM_24_QI
:
2336 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
);
2338 case M32C_OPERAND_IMM_24_SI
:
2340 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2341 if (length
<= 0) break;
2344 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2345 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2346 fields
->f_dsp_32_u24
= value
;
2348 if (length
<= 0) break;
2350 FLD (f_dsp_24_s32
) = ((((FLD (f_dsp_24_u8
)) & (255))) | (((((FLD (f_dsp_32_u24
)) << (8))) & (0xffffff00))));
2354 case M32C_OPERAND_IMM_32_HI
:
2357 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2358 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2359 fields
->f_dsp_32_s16
= value
;
2362 case M32C_OPERAND_IMM_32_QI
:
2363 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
);
2365 case M32C_OPERAND_IMM_32_SI
:
2368 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, pc
, & value
);
2369 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
2370 fields
->f_dsp_32_s32
= value
;
2373 case M32C_OPERAND_IMM_40_HI
:
2376 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2377 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2378 fields
->f_dsp_40_s16
= value
;
2381 case M32C_OPERAND_IMM_40_QI
:
2382 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
);
2384 case M32C_OPERAND_IMM_40_SI
:
2388 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2389 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2390 fields
->f_dsp_40_u24
= value
;
2392 if (length
<= 0) break;
2393 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2394 if (length
<= 0) break;
2396 FLD (f_dsp_40_s32
) = ((((FLD (f_dsp_40_u24
)) & (16777215))) | (((((FLD (f_dsp_64_u8
)) << (24))) & (0xff000000))));
2400 case M32C_OPERAND_IMM_48_HI
:
2403 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2404 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2405 fields
->f_dsp_48_s16
= value
;
2408 case M32C_OPERAND_IMM_48_QI
:
2409 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
);
2411 case M32C_OPERAND_IMM_48_SI
:
2415 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2416 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2417 fields
->f_dsp_48_u16
= value
;
2419 if (length
<= 0) break;
2422 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 16, 32, total_length
, pc
, & value
);
2423 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2424 fields
->f_dsp_64_u16
= value
;
2426 if (length
<= 0) break;
2428 FLD (f_dsp_48_s32
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u16
)) << (16))) & (0xffff0000))));
2432 case M32C_OPERAND_IMM_56_HI
:
2434 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_56_u8
);
2435 if (length
<= 0) break;
2436 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2437 if (length
<= 0) break;
2439 FLD (f_dsp_56_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_64_u8
)) << (8))) | (FLD (f_dsp_56_u8
))))));
2443 case M32C_OPERAND_IMM_56_QI
:
2444 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
);
2446 case M32C_OPERAND_IMM_64_HI
:
2449 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, pc
, & value
);
2450 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2451 fields
->f_dsp_64_s16
= value
;
2454 case M32C_OPERAND_IMM_8_HI
:
2457 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, pc
, & value
);
2458 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2459 fields
->f_dsp_8_s16
= value
;
2462 case M32C_OPERAND_IMM_8_QI
:
2463 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
);
2465 case M32C_OPERAND_IMM_8_S4
:
2466 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
);
2468 case M32C_OPERAND_IMM_SH_12_S4
:
2469 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
);
2471 case M32C_OPERAND_IMM_SH_20_S4
:
2472 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
);
2474 case M32C_OPERAND_IMM_SH_8_S4
:
2475 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
);
2477 case M32C_OPERAND_IMM1_S
:
2480 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 1, 32, total_length
, pc
, & value
);
2481 value
= ((value
) + (1));
2482 fields
->f_imm1_S
= value
;
2485 case M32C_OPERAND_IMM3_S
:
2487 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2488 if (length
<= 0) break;
2489 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2490 if (length
<= 0) break;
2492 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
2496 case M32C_OPERAND_LAB_16_8
:
2499 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
);
2500 value
= ((value
) + (((pc
) + (2))));
2501 fields
->f_lab_16_8
= value
;
2504 case M32C_OPERAND_LAB_24_8
:
2507 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
);
2508 value
= ((value
) + (((pc
) + (2))));
2509 fields
->f_lab_24_8
= value
;
2512 case M32C_OPERAND_LAB_32_8
:
2515 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
);
2516 value
= ((value
) + (((pc
) + (2))));
2517 fields
->f_lab_32_8
= value
;
2520 case M32C_OPERAND_LAB_40_8
:
2523 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
);
2524 value
= ((value
) + (((pc
) + (2))));
2525 fields
->f_lab_40_8
= value
;
2528 case M32C_OPERAND_LAB_5_3
:
2531 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, pc
, & value
);
2532 value
= ((value
) + (((pc
) + (2))));
2533 fields
->f_lab_5_3
= value
;
2536 case M32C_OPERAND_LAB_8_16
:
2539 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
);
2540 value
= ((((((unsigned int) (((value
) & (65535))) >> (8))) | (((int) (((((value
) & (255))) << (24))) >> (16))))) + (((pc
) + (1))));
2541 fields
->f_lab_8_16
= value
;
2544 case M32C_OPERAND_LAB_8_24
:
2547 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, pc
, & value
);
2548 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2549 fields
->f_lab_8_24
= value
;
2552 case M32C_OPERAND_LAB_8_8
:
2555 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
);
2556 value
= ((value
) + (((pc
) + (1))));
2557 fields
->f_lab_8_8
= value
;
2560 case M32C_OPERAND_LAB32_JMP_S
:
2562 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2563 if (length
<= 0) break;
2564 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2565 if (length
<= 0) break;
2567 FLD (f_lab32_jmp_s
) = ((pc
) + (((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (2))));
2571 case M32C_OPERAND_Q
:
2573 case M32C_OPERAND_R0
:
2575 case M32C_OPERAND_R0H
:
2577 case M32C_OPERAND_R0L
:
2579 case M32C_OPERAND_R1
:
2581 case M32C_OPERAND_R1R2R0
:
2583 case M32C_OPERAND_R2
:
2585 case M32C_OPERAND_R2R0
:
2587 case M32C_OPERAND_R3
:
2589 case M32C_OPERAND_R3R1
:
2591 case M32C_OPERAND_REGSETPOP
:
2592 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2594 case M32C_OPERAND_REGSETPUSH
:
2595 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2597 case M32C_OPERAND_RN16_PUSH_S
:
2598 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
2600 case M32C_OPERAND_S
:
2602 case M32C_OPERAND_SRC16AN
:
2603 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2605 case M32C_OPERAND_SRC16ANHI
:
2606 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2608 case M32C_OPERAND_SRC16ANQI
:
2609 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2611 case M32C_OPERAND_SRC16RNHI
:
2612 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2614 case M32C_OPERAND_SRC16RNQI
:
2615 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2617 case M32C_OPERAND_SRC32ANPREFIXED
:
2618 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2620 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
2621 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2623 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
2624 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2626 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
2627 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2629 case M32C_OPERAND_SRC32ANUNPREFIXED
:
2630 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2632 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
2633 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2635 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
2636 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2638 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
2639 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2641 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
2644 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2645 value
= ((((value
) + (2))) % (4));
2646 fields
->f_src32_rn_prefixed_HI
= value
;
2649 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
2652 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2653 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2654 fields
->f_src32_rn_prefixed_QI
= value
;
2657 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
2660 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2661 value
= ((value
) - (2));
2662 fields
->f_src32_rn_prefixed_SI
= value
;
2665 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
2668 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2669 value
= ((((value
) + (2))) % (4));
2670 fields
->f_src32_rn_unprefixed_HI
= value
;
2673 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
2676 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2677 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2678 fields
->f_src32_rn_unprefixed_QI
= value
;
2681 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
2684 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2685 value
= ((value
) - (2));
2686 fields
->f_src32_rn_unprefixed_SI
= value
;
2689 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
2690 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_5_1
);
2692 case M32C_OPERAND_X
:
2694 case M32C_OPERAND_Z
:
2696 case M32C_OPERAND_COND16_16
:
2697 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2699 case M32C_OPERAND_COND16_24
:
2700 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2702 case M32C_OPERAND_COND16_32
:
2703 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2705 case M32C_OPERAND_COND16C
:
2706 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2708 case M32C_OPERAND_COND16J
:
2709 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2711 case M32C_OPERAND_COND16J5
:
2712 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_cond16j_5
);
2714 case M32C_OPERAND_COND32
:
2716 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_9_1
);
2717 if (length
<= 0) break;
2718 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2719 if (length
<= 0) break;
2721 FLD (f_cond32
) = ((((FLD (f_9_1
)) << (3))) | (FLD (f_13_3
)));
2725 case M32C_OPERAND_COND32_16
:
2726 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2728 case M32C_OPERAND_COND32_24
:
2729 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2731 case M32C_OPERAND_COND32_32
:
2732 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2734 case M32C_OPERAND_COND32_40
:
2735 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2737 case M32C_OPERAND_COND32J
:
2739 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 1, 3, 32, total_length
, pc
, & fields
->f_1_3
);
2740 if (length
<= 0) break;
2741 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2742 if (length
<= 0) break;
2744 FLD (f_cond32j
) = ((((FLD (f_1_3
)) << (1))) | (FLD (f_7_1
)));
2748 case M32C_OPERAND_CR1_PREFIXED_32
:
2749 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2751 case M32C_OPERAND_CR1_UNPREFIXED_32
:
2752 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2754 case M32C_OPERAND_CR16
:
2755 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2757 case M32C_OPERAND_CR2_32
:
2758 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2760 case M32C_OPERAND_CR3_PREFIXED_32
:
2761 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2763 case M32C_OPERAND_CR3_UNPREFIXED_32
:
2764 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2766 case M32C_OPERAND_FLAGS16
:
2767 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2769 case M32C_OPERAND_FLAGS32
:
2770 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2772 case M32C_OPERAND_SCCOND32
:
2773 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2775 case M32C_OPERAND_SIZE
:
2779 /* xgettext:c-format */
2780 fprintf (stderr
, _("Unrecognized field %d while decoding insn.\n"),
2788 cgen_insert_fn
* const m32c_cgen_insert_handlers
[] =
2793 cgen_extract_fn
* const m32c_cgen_extract_handlers
[] =
2795 extract_insn_normal
,
2798 int m32c_cgen_get_int_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2799 bfd_vma
m32c_cgen_get_vma_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2801 /* Getting values from cgen_fields is handled by a collection of functions.
2802 They are distinguished by the type of the VALUE argument they return.
2803 TODO: floating point, inlining support, remove cases where result type
2807 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
2809 const CGEN_FIELDS
* fields
)
2815 case M32C_OPERAND_A0
:
2818 case M32C_OPERAND_A1
:
2821 case M32C_OPERAND_AN16_PUSH_S
:
2822 value
= fields
->f_4_1
;
2824 case M32C_OPERAND_BIT16AN
:
2825 value
= fields
->f_dst16_an
;
2827 case M32C_OPERAND_BIT16RN
:
2828 value
= fields
->f_dst16_rn
;
2830 case M32C_OPERAND_BIT32ANPREFIXED
:
2831 value
= fields
->f_dst32_an_prefixed
;
2833 case M32C_OPERAND_BIT32ANUNPREFIXED
:
2834 value
= fields
->f_dst32_an_unprefixed
;
2836 case M32C_OPERAND_BIT32RNPREFIXED
:
2837 value
= fields
->f_dst32_rn_prefixed_QI
;
2839 case M32C_OPERAND_BIT32RNUNPREFIXED
:
2840 value
= fields
->f_dst32_rn_unprefixed_QI
;
2842 case M32C_OPERAND_BITBASE16_16_S8
:
2843 value
= fields
->f_dsp_16_s8
;
2845 case M32C_OPERAND_BITBASE16_16_U16
:
2846 value
= fields
->f_dsp_16_u16
;
2848 case M32C_OPERAND_BITBASE16_16_U8
:
2849 value
= fields
->f_dsp_16_u8
;
2851 case M32C_OPERAND_BITBASE16_8_U11_S
:
2852 value
= fields
->f_bitbase16_u11_S
;
2854 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
2855 value
= fields
->f_bitbase32_16_s11_unprefixed
;
2857 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
2858 value
= fields
->f_bitbase32_16_s19_unprefixed
;
2860 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
2861 value
= fields
->f_bitbase32_16_u11_unprefixed
;
2863 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
2864 value
= fields
->f_bitbase32_16_u19_unprefixed
;
2866 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
2867 value
= fields
->f_bitbase32_16_u27_unprefixed
;
2869 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
2870 value
= fields
->f_bitbase32_24_s11_prefixed
;
2872 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
2873 value
= fields
->f_bitbase32_24_s19_prefixed
;
2875 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
2876 value
= fields
->f_bitbase32_24_u11_prefixed
;
2878 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
2879 value
= fields
->f_bitbase32_24_u19_prefixed
;
2881 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
2882 value
= fields
->f_bitbase32_24_u27_prefixed
;
2884 case M32C_OPERAND_BITNO16R
:
2885 value
= fields
->f_dsp_16_u8
;
2887 case M32C_OPERAND_BITNO32PREFIXED
:
2888 value
= fields
->f_bitno32_prefixed
;
2890 case M32C_OPERAND_BITNO32UNPREFIXED
:
2891 value
= fields
->f_bitno32_unprefixed
;
2893 case M32C_OPERAND_DSP_10_U6
:
2894 value
= fields
->f_dsp_10_u6
;
2896 case M32C_OPERAND_DSP_16_S16
:
2897 value
= fields
->f_dsp_16_s16
;
2899 case M32C_OPERAND_DSP_16_S8
:
2900 value
= fields
->f_dsp_16_s8
;
2902 case M32C_OPERAND_DSP_16_U16
:
2903 value
= fields
->f_dsp_16_u16
;
2905 case M32C_OPERAND_DSP_16_U20
:
2906 value
= fields
->f_dsp_16_u24
;
2908 case M32C_OPERAND_DSP_16_U24
:
2909 value
= fields
->f_dsp_16_u24
;
2911 case M32C_OPERAND_DSP_16_U8
:
2912 value
= fields
->f_dsp_16_u8
;
2914 case M32C_OPERAND_DSP_24_S16
:
2915 value
= fields
->f_dsp_24_s16
;
2917 case M32C_OPERAND_DSP_24_S8
:
2918 value
= fields
->f_dsp_24_s8
;
2920 case M32C_OPERAND_DSP_24_U16
:
2921 value
= fields
->f_dsp_24_u16
;
2923 case M32C_OPERAND_DSP_24_U20
:
2924 value
= fields
->f_dsp_24_u24
;
2926 case M32C_OPERAND_DSP_24_U24
:
2927 value
= fields
->f_dsp_24_u24
;
2929 case M32C_OPERAND_DSP_24_U8
:
2930 value
= fields
->f_dsp_24_u8
;
2932 case M32C_OPERAND_DSP_32_S16
:
2933 value
= fields
->f_dsp_32_s16
;
2935 case M32C_OPERAND_DSP_32_S8
:
2936 value
= fields
->f_dsp_32_s8
;
2938 case M32C_OPERAND_DSP_32_U16
:
2939 value
= fields
->f_dsp_32_u16
;
2941 case M32C_OPERAND_DSP_32_U20
:
2942 value
= fields
->f_dsp_32_u24
;
2944 case M32C_OPERAND_DSP_32_U24
:
2945 value
= fields
->f_dsp_32_u24
;
2947 case M32C_OPERAND_DSP_32_U8
:
2948 value
= fields
->f_dsp_32_u8
;
2950 case M32C_OPERAND_DSP_40_S16
:
2951 value
= fields
->f_dsp_40_s16
;
2953 case M32C_OPERAND_DSP_40_S8
:
2954 value
= fields
->f_dsp_40_s8
;
2956 case M32C_OPERAND_DSP_40_U16
:
2957 value
= fields
->f_dsp_40_u16
;
2959 case M32C_OPERAND_DSP_40_U24
:
2960 value
= fields
->f_dsp_40_u24
;
2962 case M32C_OPERAND_DSP_40_U8
:
2963 value
= fields
->f_dsp_40_u8
;
2965 case M32C_OPERAND_DSP_48_S16
:
2966 value
= fields
->f_dsp_48_s16
;
2968 case M32C_OPERAND_DSP_48_S8
:
2969 value
= fields
->f_dsp_48_s8
;
2971 case M32C_OPERAND_DSP_48_U16
:
2972 value
= fields
->f_dsp_48_u16
;
2974 case M32C_OPERAND_DSP_48_U24
:
2975 value
= fields
->f_dsp_48_u24
;
2977 case M32C_OPERAND_DSP_48_U8
:
2978 value
= fields
->f_dsp_48_u8
;
2980 case M32C_OPERAND_DSP_8_S8
:
2981 value
= fields
->f_dsp_8_s8
;
2983 case M32C_OPERAND_DSP_8_U16
:
2984 value
= fields
->f_dsp_8_u16
;
2986 case M32C_OPERAND_DSP_8_U24
:
2987 value
= fields
->f_dsp_8_u24
;
2989 case M32C_OPERAND_DSP_8_U6
:
2990 value
= fields
->f_dsp_8_u6
;
2992 case M32C_OPERAND_DSP_8_U8
:
2993 value
= fields
->f_dsp_8_u8
;
2995 case M32C_OPERAND_DST16AN
:
2996 value
= fields
->f_dst16_an
;
2998 case M32C_OPERAND_DST16AN_S
:
2999 value
= fields
->f_dst16_an_s
;
3001 case M32C_OPERAND_DST16ANHI
:
3002 value
= fields
->f_dst16_an
;
3004 case M32C_OPERAND_DST16ANQI
:
3005 value
= fields
->f_dst16_an
;
3007 case M32C_OPERAND_DST16ANQI_S
:
3008 value
= fields
->f_dst16_rn_QI_s
;
3010 case M32C_OPERAND_DST16ANSI
:
3011 value
= fields
->f_dst16_an
;
3013 case M32C_OPERAND_DST16RNEXTQI
:
3014 value
= fields
->f_dst16_rn_ext
;
3016 case M32C_OPERAND_DST16RNHI
:
3017 value
= fields
->f_dst16_rn
;
3019 case M32C_OPERAND_DST16RNQI
:
3020 value
= fields
->f_dst16_rn
;
3022 case M32C_OPERAND_DST16RNQI_S
:
3023 value
= fields
->f_dst16_rn_QI_s
;
3025 case M32C_OPERAND_DST16RNSI
:
3026 value
= fields
->f_dst16_rn
;
3028 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3029 value
= fields
->f_dst32_an_unprefixed
;
3031 case M32C_OPERAND_DST32ANPREFIXED
:
3032 value
= fields
->f_dst32_an_prefixed
;
3034 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3035 value
= fields
->f_dst32_an_prefixed
;
3037 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3038 value
= fields
->f_dst32_an_prefixed
;
3040 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3041 value
= fields
->f_dst32_an_prefixed
;
3043 case M32C_OPERAND_DST32ANUNPREFIXED
:
3044 value
= fields
->f_dst32_an_unprefixed
;
3046 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3047 value
= fields
->f_dst32_an_unprefixed
;
3049 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3050 value
= fields
->f_dst32_an_unprefixed
;
3052 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3053 value
= fields
->f_dst32_an_unprefixed
;
3055 case M32C_OPERAND_DST32R0HI_S
:
3058 case M32C_OPERAND_DST32R0QI_S
:
3061 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3062 value
= fields
->f_dst32_rn_ext_unprefixed
;
3064 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3065 value
= fields
->f_dst32_rn_ext_unprefixed
;
3067 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3068 value
= fields
->f_dst32_rn_prefixed_HI
;
3070 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3071 value
= fields
->f_dst32_rn_prefixed_QI
;
3073 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3074 value
= fields
->f_dst32_rn_prefixed_SI
;
3076 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3077 value
= fields
->f_dst32_rn_unprefixed_HI
;
3079 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3080 value
= fields
->f_dst32_rn_unprefixed_QI
;
3082 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3083 value
= fields
->f_dst32_rn_unprefixed_SI
;
3085 case M32C_OPERAND_G
:
3088 case M32C_OPERAND_IMM_12_S4
:
3089 value
= fields
->f_imm_12_s4
;
3091 case M32C_OPERAND_IMM_13_U3
:
3092 value
= fields
->f_imm_13_u3
;
3094 case M32C_OPERAND_IMM_16_HI
:
3095 value
= fields
->f_dsp_16_s16
;
3097 case M32C_OPERAND_IMM_16_QI
:
3098 value
= fields
->f_dsp_16_s8
;
3100 case M32C_OPERAND_IMM_16_SI
:
3101 value
= fields
->f_dsp_16_s32
;
3103 case M32C_OPERAND_IMM_20_S4
:
3104 value
= fields
->f_imm_20_s4
;
3106 case M32C_OPERAND_IMM_24_HI
:
3107 value
= fields
->f_dsp_24_s16
;
3109 case M32C_OPERAND_IMM_24_QI
:
3110 value
= fields
->f_dsp_24_s8
;
3112 case M32C_OPERAND_IMM_24_SI
:
3113 value
= fields
->f_dsp_24_s32
;
3115 case M32C_OPERAND_IMM_32_HI
:
3116 value
= fields
->f_dsp_32_s16
;
3118 case M32C_OPERAND_IMM_32_QI
:
3119 value
= fields
->f_dsp_32_s8
;
3121 case M32C_OPERAND_IMM_32_SI
:
3122 value
= fields
->f_dsp_32_s32
;
3124 case M32C_OPERAND_IMM_40_HI
:
3125 value
= fields
->f_dsp_40_s16
;
3127 case M32C_OPERAND_IMM_40_QI
:
3128 value
= fields
->f_dsp_40_s8
;
3130 case M32C_OPERAND_IMM_40_SI
:
3131 value
= fields
->f_dsp_40_s32
;
3133 case M32C_OPERAND_IMM_48_HI
:
3134 value
= fields
->f_dsp_48_s16
;
3136 case M32C_OPERAND_IMM_48_QI
:
3137 value
= fields
->f_dsp_48_s8
;
3139 case M32C_OPERAND_IMM_48_SI
:
3140 value
= fields
->f_dsp_48_s32
;
3142 case M32C_OPERAND_IMM_56_HI
:
3143 value
= fields
->f_dsp_56_s16
;
3145 case M32C_OPERAND_IMM_56_QI
:
3146 value
= fields
->f_dsp_56_s8
;
3148 case M32C_OPERAND_IMM_64_HI
:
3149 value
= fields
->f_dsp_64_s16
;
3151 case M32C_OPERAND_IMM_8_HI
:
3152 value
= fields
->f_dsp_8_s16
;
3154 case M32C_OPERAND_IMM_8_QI
:
3155 value
= fields
->f_dsp_8_s8
;
3157 case M32C_OPERAND_IMM_8_S4
:
3158 value
= fields
->f_imm_8_s4
;
3160 case M32C_OPERAND_IMM_SH_12_S4
:
3161 value
= fields
->f_imm_12_s4
;
3163 case M32C_OPERAND_IMM_SH_20_S4
:
3164 value
= fields
->f_imm_20_s4
;
3166 case M32C_OPERAND_IMM_SH_8_S4
:
3167 value
= fields
->f_imm_8_s4
;
3169 case M32C_OPERAND_IMM1_S
:
3170 value
= fields
->f_imm1_S
;
3172 case M32C_OPERAND_IMM3_S
:
3173 value
= fields
->f_imm3_S
;
3175 case M32C_OPERAND_LAB_16_8
:
3176 value
= fields
->f_lab_16_8
;
3178 case M32C_OPERAND_LAB_24_8
:
3179 value
= fields
->f_lab_24_8
;
3181 case M32C_OPERAND_LAB_32_8
:
3182 value
= fields
->f_lab_32_8
;
3184 case M32C_OPERAND_LAB_40_8
:
3185 value
= fields
->f_lab_40_8
;
3187 case M32C_OPERAND_LAB_5_3
:
3188 value
= fields
->f_lab_5_3
;
3190 case M32C_OPERAND_LAB_8_16
:
3191 value
= fields
->f_lab_8_16
;
3193 case M32C_OPERAND_LAB_8_24
:
3194 value
= fields
->f_lab_8_24
;
3196 case M32C_OPERAND_LAB_8_8
:
3197 value
= fields
->f_lab_8_8
;
3199 case M32C_OPERAND_LAB32_JMP_S
:
3200 value
= fields
->f_lab32_jmp_s
;
3202 case M32C_OPERAND_Q
:
3205 case M32C_OPERAND_R0
:
3208 case M32C_OPERAND_R0H
:
3211 case M32C_OPERAND_R0L
:
3214 case M32C_OPERAND_R1
:
3217 case M32C_OPERAND_R1R2R0
:
3220 case M32C_OPERAND_R2
:
3223 case M32C_OPERAND_R2R0
:
3226 case M32C_OPERAND_R3
:
3229 case M32C_OPERAND_R3R1
:
3232 case M32C_OPERAND_REGSETPOP
:
3233 value
= fields
->f_8_8
;
3235 case M32C_OPERAND_REGSETPUSH
:
3236 value
= fields
->f_8_8
;
3238 case M32C_OPERAND_RN16_PUSH_S
:
3239 value
= fields
->f_4_1
;
3241 case M32C_OPERAND_S
:
3244 case M32C_OPERAND_SRC16AN
:
3245 value
= fields
->f_src16_an
;
3247 case M32C_OPERAND_SRC16ANHI
:
3248 value
= fields
->f_src16_an
;
3250 case M32C_OPERAND_SRC16ANQI
:
3251 value
= fields
->f_src16_an
;
3253 case M32C_OPERAND_SRC16RNHI
:
3254 value
= fields
->f_src16_rn
;
3256 case M32C_OPERAND_SRC16RNQI
:
3257 value
= fields
->f_src16_rn
;
3259 case M32C_OPERAND_SRC32ANPREFIXED
:
3260 value
= fields
->f_src32_an_prefixed
;
3262 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3263 value
= fields
->f_src32_an_prefixed
;
3265 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3266 value
= fields
->f_src32_an_prefixed
;
3268 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3269 value
= fields
->f_src32_an_prefixed
;
3271 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3272 value
= fields
->f_src32_an_unprefixed
;
3274 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3275 value
= fields
->f_src32_an_unprefixed
;
3277 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3278 value
= fields
->f_src32_an_unprefixed
;
3280 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3281 value
= fields
->f_src32_an_unprefixed
;
3283 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3284 value
= fields
->f_src32_rn_prefixed_HI
;
3286 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3287 value
= fields
->f_src32_rn_prefixed_QI
;
3289 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3290 value
= fields
->f_src32_rn_prefixed_SI
;
3292 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3293 value
= fields
->f_src32_rn_unprefixed_HI
;
3295 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3296 value
= fields
->f_src32_rn_unprefixed_QI
;
3298 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3299 value
= fields
->f_src32_rn_unprefixed_SI
;
3301 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3302 value
= fields
->f_5_1
;
3304 case M32C_OPERAND_X
:
3307 case M32C_OPERAND_Z
:
3310 case M32C_OPERAND_COND16_16
:
3311 value
= fields
->f_dsp_16_u8
;
3313 case M32C_OPERAND_COND16_24
:
3314 value
= fields
->f_dsp_24_u8
;
3316 case M32C_OPERAND_COND16_32
:
3317 value
= fields
->f_dsp_32_u8
;
3319 case M32C_OPERAND_COND16C
:
3320 value
= fields
->f_cond16
;
3322 case M32C_OPERAND_COND16J
:
3323 value
= fields
->f_cond16
;
3325 case M32C_OPERAND_COND16J5
:
3326 value
= fields
->f_cond16j_5
;
3328 case M32C_OPERAND_COND32
:
3329 value
= fields
->f_cond32
;
3331 case M32C_OPERAND_COND32_16
:
3332 value
= fields
->f_dsp_16_u8
;
3334 case M32C_OPERAND_COND32_24
:
3335 value
= fields
->f_dsp_24_u8
;
3337 case M32C_OPERAND_COND32_32
:
3338 value
= fields
->f_dsp_32_u8
;
3340 case M32C_OPERAND_COND32_40
:
3341 value
= fields
->f_dsp_40_u8
;
3343 case M32C_OPERAND_COND32J
:
3344 value
= fields
->f_cond32j
;
3346 case M32C_OPERAND_CR1_PREFIXED_32
:
3347 value
= fields
->f_21_3
;
3349 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3350 value
= fields
->f_13_3
;
3352 case M32C_OPERAND_CR16
:
3353 value
= fields
->f_9_3
;
3355 case M32C_OPERAND_CR2_32
:
3356 value
= fields
->f_13_3
;
3358 case M32C_OPERAND_CR3_PREFIXED_32
:
3359 value
= fields
->f_21_3
;
3361 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3362 value
= fields
->f_13_3
;
3364 case M32C_OPERAND_FLAGS16
:
3365 value
= fields
->f_9_3
;
3367 case M32C_OPERAND_FLAGS32
:
3368 value
= fields
->f_13_3
;
3370 case M32C_OPERAND_SCCOND32
:
3371 value
= fields
->f_cond16
;
3373 case M32C_OPERAND_SIZE
:
3378 /* xgettext:c-format */
3379 fprintf (stderr
, _("Unrecognized field %d while getting int operand.\n"),
3388 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3390 const CGEN_FIELDS
* fields
)
3396 case M32C_OPERAND_A0
:
3399 case M32C_OPERAND_A1
:
3402 case M32C_OPERAND_AN16_PUSH_S
:
3403 value
= fields
->f_4_1
;
3405 case M32C_OPERAND_BIT16AN
:
3406 value
= fields
->f_dst16_an
;
3408 case M32C_OPERAND_BIT16RN
:
3409 value
= fields
->f_dst16_rn
;
3411 case M32C_OPERAND_BIT32ANPREFIXED
:
3412 value
= fields
->f_dst32_an_prefixed
;
3414 case M32C_OPERAND_BIT32ANUNPREFIXED
:
3415 value
= fields
->f_dst32_an_unprefixed
;
3417 case M32C_OPERAND_BIT32RNPREFIXED
:
3418 value
= fields
->f_dst32_rn_prefixed_QI
;
3420 case M32C_OPERAND_BIT32RNUNPREFIXED
:
3421 value
= fields
->f_dst32_rn_unprefixed_QI
;
3423 case M32C_OPERAND_BITBASE16_16_S8
:
3424 value
= fields
->f_dsp_16_s8
;
3426 case M32C_OPERAND_BITBASE16_16_U16
:
3427 value
= fields
->f_dsp_16_u16
;
3429 case M32C_OPERAND_BITBASE16_16_U8
:
3430 value
= fields
->f_dsp_16_u8
;
3432 case M32C_OPERAND_BITBASE16_8_U11_S
:
3433 value
= fields
->f_bitbase16_u11_S
;
3435 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
3436 value
= fields
->f_bitbase32_16_s11_unprefixed
;
3438 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
3439 value
= fields
->f_bitbase32_16_s19_unprefixed
;
3441 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
3442 value
= fields
->f_bitbase32_16_u11_unprefixed
;
3444 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
3445 value
= fields
->f_bitbase32_16_u19_unprefixed
;
3447 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
3448 value
= fields
->f_bitbase32_16_u27_unprefixed
;
3450 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
3451 value
= fields
->f_bitbase32_24_s11_prefixed
;
3453 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
3454 value
= fields
->f_bitbase32_24_s19_prefixed
;
3456 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
3457 value
= fields
->f_bitbase32_24_u11_prefixed
;
3459 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3460 value
= fields
->f_bitbase32_24_u19_prefixed
;
3462 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3463 value
= fields
->f_bitbase32_24_u27_prefixed
;
3465 case M32C_OPERAND_BITNO16R
:
3466 value
= fields
->f_dsp_16_u8
;
3468 case M32C_OPERAND_BITNO32PREFIXED
:
3469 value
= fields
->f_bitno32_prefixed
;
3471 case M32C_OPERAND_BITNO32UNPREFIXED
:
3472 value
= fields
->f_bitno32_unprefixed
;
3474 case M32C_OPERAND_DSP_10_U6
:
3475 value
= fields
->f_dsp_10_u6
;
3477 case M32C_OPERAND_DSP_16_S16
:
3478 value
= fields
->f_dsp_16_s16
;
3480 case M32C_OPERAND_DSP_16_S8
:
3481 value
= fields
->f_dsp_16_s8
;
3483 case M32C_OPERAND_DSP_16_U16
:
3484 value
= fields
->f_dsp_16_u16
;
3486 case M32C_OPERAND_DSP_16_U20
:
3487 value
= fields
->f_dsp_16_u24
;
3489 case M32C_OPERAND_DSP_16_U24
:
3490 value
= fields
->f_dsp_16_u24
;
3492 case M32C_OPERAND_DSP_16_U8
:
3493 value
= fields
->f_dsp_16_u8
;
3495 case M32C_OPERAND_DSP_24_S16
:
3496 value
= fields
->f_dsp_24_s16
;
3498 case M32C_OPERAND_DSP_24_S8
:
3499 value
= fields
->f_dsp_24_s8
;
3501 case M32C_OPERAND_DSP_24_U16
:
3502 value
= fields
->f_dsp_24_u16
;
3504 case M32C_OPERAND_DSP_24_U20
:
3505 value
= fields
->f_dsp_24_u24
;
3507 case M32C_OPERAND_DSP_24_U24
:
3508 value
= fields
->f_dsp_24_u24
;
3510 case M32C_OPERAND_DSP_24_U8
:
3511 value
= fields
->f_dsp_24_u8
;
3513 case M32C_OPERAND_DSP_32_S16
:
3514 value
= fields
->f_dsp_32_s16
;
3516 case M32C_OPERAND_DSP_32_S8
:
3517 value
= fields
->f_dsp_32_s8
;
3519 case M32C_OPERAND_DSP_32_U16
:
3520 value
= fields
->f_dsp_32_u16
;
3522 case M32C_OPERAND_DSP_32_U20
:
3523 value
= fields
->f_dsp_32_u24
;
3525 case M32C_OPERAND_DSP_32_U24
:
3526 value
= fields
->f_dsp_32_u24
;
3528 case M32C_OPERAND_DSP_32_U8
:
3529 value
= fields
->f_dsp_32_u8
;
3531 case M32C_OPERAND_DSP_40_S16
:
3532 value
= fields
->f_dsp_40_s16
;
3534 case M32C_OPERAND_DSP_40_S8
:
3535 value
= fields
->f_dsp_40_s8
;
3537 case M32C_OPERAND_DSP_40_U16
:
3538 value
= fields
->f_dsp_40_u16
;
3540 case M32C_OPERAND_DSP_40_U24
:
3541 value
= fields
->f_dsp_40_u24
;
3543 case M32C_OPERAND_DSP_40_U8
:
3544 value
= fields
->f_dsp_40_u8
;
3546 case M32C_OPERAND_DSP_48_S16
:
3547 value
= fields
->f_dsp_48_s16
;
3549 case M32C_OPERAND_DSP_48_S8
:
3550 value
= fields
->f_dsp_48_s8
;
3552 case M32C_OPERAND_DSP_48_U16
:
3553 value
= fields
->f_dsp_48_u16
;
3555 case M32C_OPERAND_DSP_48_U24
:
3556 value
= fields
->f_dsp_48_u24
;
3558 case M32C_OPERAND_DSP_48_U8
:
3559 value
= fields
->f_dsp_48_u8
;
3561 case M32C_OPERAND_DSP_8_S8
:
3562 value
= fields
->f_dsp_8_s8
;
3564 case M32C_OPERAND_DSP_8_U16
:
3565 value
= fields
->f_dsp_8_u16
;
3567 case M32C_OPERAND_DSP_8_U24
:
3568 value
= fields
->f_dsp_8_u24
;
3570 case M32C_OPERAND_DSP_8_U6
:
3571 value
= fields
->f_dsp_8_u6
;
3573 case M32C_OPERAND_DSP_8_U8
:
3574 value
= fields
->f_dsp_8_u8
;
3576 case M32C_OPERAND_DST16AN
:
3577 value
= fields
->f_dst16_an
;
3579 case M32C_OPERAND_DST16AN_S
:
3580 value
= fields
->f_dst16_an_s
;
3582 case M32C_OPERAND_DST16ANHI
:
3583 value
= fields
->f_dst16_an
;
3585 case M32C_OPERAND_DST16ANQI
:
3586 value
= fields
->f_dst16_an
;
3588 case M32C_OPERAND_DST16ANQI_S
:
3589 value
= fields
->f_dst16_rn_QI_s
;
3591 case M32C_OPERAND_DST16ANSI
:
3592 value
= fields
->f_dst16_an
;
3594 case M32C_OPERAND_DST16RNEXTQI
:
3595 value
= fields
->f_dst16_rn_ext
;
3597 case M32C_OPERAND_DST16RNHI
:
3598 value
= fields
->f_dst16_rn
;
3600 case M32C_OPERAND_DST16RNQI
:
3601 value
= fields
->f_dst16_rn
;
3603 case M32C_OPERAND_DST16RNQI_S
:
3604 value
= fields
->f_dst16_rn_QI_s
;
3606 case M32C_OPERAND_DST16RNSI
:
3607 value
= fields
->f_dst16_rn
;
3609 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3610 value
= fields
->f_dst32_an_unprefixed
;
3612 case M32C_OPERAND_DST32ANPREFIXED
:
3613 value
= fields
->f_dst32_an_prefixed
;
3615 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3616 value
= fields
->f_dst32_an_prefixed
;
3618 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3619 value
= fields
->f_dst32_an_prefixed
;
3621 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3622 value
= fields
->f_dst32_an_prefixed
;
3624 case M32C_OPERAND_DST32ANUNPREFIXED
:
3625 value
= fields
->f_dst32_an_unprefixed
;
3627 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3628 value
= fields
->f_dst32_an_unprefixed
;
3630 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3631 value
= fields
->f_dst32_an_unprefixed
;
3633 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3634 value
= fields
->f_dst32_an_unprefixed
;
3636 case M32C_OPERAND_DST32R0HI_S
:
3639 case M32C_OPERAND_DST32R0QI_S
:
3642 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3643 value
= fields
->f_dst32_rn_ext_unprefixed
;
3645 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3646 value
= fields
->f_dst32_rn_ext_unprefixed
;
3648 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3649 value
= fields
->f_dst32_rn_prefixed_HI
;
3651 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3652 value
= fields
->f_dst32_rn_prefixed_QI
;
3654 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3655 value
= fields
->f_dst32_rn_prefixed_SI
;
3657 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3658 value
= fields
->f_dst32_rn_unprefixed_HI
;
3660 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3661 value
= fields
->f_dst32_rn_unprefixed_QI
;
3663 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3664 value
= fields
->f_dst32_rn_unprefixed_SI
;
3666 case M32C_OPERAND_G
:
3669 case M32C_OPERAND_IMM_12_S4
:
3670 value
= fields
->f_imm_12_s4
;
3672 case M32C_OPERAND_IMM_13_U3
:
3673 value
= fields
->f_imm_13_u3
;
3675 case M32C_OPERAND_IMM_16_HI
:
3676 value
= fields
->f_dsp_16_s16
;
3678 case M32C_OPERAND_IMM_16_QI
:
3679 value
= fields
->f_dsp_16_s8
;
3681 case M32C_OPERAND_IMM_16_SI
:
3682 value
= fields
->f_dsp_16_s32
;
3684 case M32C_OPERAND_IMM_20_S4
:
3685 value
= fields
->f_imm_20_s4
;
3687 case M32C_OPERAND_IMM_24_HI
:
3688 value
= fields
->f_dsp_24_s16
;
3690 case M32C_OPERAND_IMM_24_QI
:
3691 value
= fields
->f_dsp_24_s8
;
3693 case M32C_OPERAND_IMM_24_SI
:
3694 value
= fields
->f_dsp_24_s32
;
3696 case M32C_OPERAND_IMM_32_HI
:
3697 value
= fields
->f_dsp_32_s16
;
3699 case M32C_OPERAND_IMM_32_QI
:
3700 value
= fields
->f_dsp_32_s8
;
3702 case M32C_OPERAND_IMM_32_SI
:
3703 value
= fields
->f_dsp_32_s32
;
3705 case M32C_OPERAND_IMM_40_HI
:
3706 value
= fields
->f_dsp_40_s16
;
3708 case M32C_OPERAND_IMM_40_QI
:
3709 value
= fields
->f_dsp_40_s8
;
3711 case M32C_OPERAND_IMM_40_SI
:
3712 value
= fields
->f_dsp_40_s32
;
3714 case M32C_OPERAND_IMM_48_HI
:
3715 value
= fields
->f_dsp_48_s16
;
3717 case M32C_OPERAND_IMM_48_QI
:
3718 value
= fields
->f_dsp_48_s8
;
3720 case M32C_OPERAND_IMM_48_SI
:
3721 value
= fields
->f_dsp_48_s32
;
3723 case M32C_OPERAND_IMM_56_HI
:
3724 value
= fields
->f_dsp_56_s16
;
3726 case M32C_OPERAND_IMM_56_QI
:
3727 value
= fields
->f_dsp_56_s8
;
3729 case M32C_OPERAND_IMM_64_HI
:
3730 value
= fields
->f_dsp_64_s16
;
3732 case M32C_OPERAND_IMM_8_HI
:
3733 value
= fields
->f_dsp_8_s16
;
3735 case M32C_OPERAND_IMM_8_QI
:
3736 value
= fields
->f_dsp_8_s8
;
3738 case M32C_OPERAND_IMM_8_S4
:
3739 value
= fields
->f_imm_8_s4
;
3741 case M32C_OPERAND_IMM_SH_12_S4
:
3742 value
= fields
->f_imm_12_s4
;
3744 case M32C_OPERAND_IMM_SH_20_S4
:
3745 value
= fields
->f_imm_20_s4
;
3747 case M32C_OPERAND_IMM_SH_8_S4
:
3748 value
= fields
->f_imm_8_s4
;
3750 case M32C_OPERAND_IMM1_S
:
3751 value
= fields
->f_imm1_S
;
3753 case M32C_OPERAND_IMM3_S
:
3754 value
= fields
->f_imm3_S
;
3756 case M32C_OPERAND_LAB_16_8
:
3757 value
= fields
->f_lab_16_8
;
3759 case M32C_OPERAND_LAB_24_8
:
3760 value
= fields
->f_lab_24_8
;
3762 case M32C_OPERAND_LAB_32_8
:
3763 value
= fields
->f_lab_32_8
;
3765 case M32C_OPERAND_LAB_40_8
:
3766 value
= fields
->f_lab_40_8
;
3768 case M32C_OPERAND_LAB_5_3
:
3769 value
= fields
->f_lab_5_3
;
3771 case M32C_OPERAND_LAB_8_16
:
3772 value
= fields
->f_lab_8_16
;
3774 case M32C_OPERAND_LAB_8_24
:
3775 value
= fields
->f_lab_8_24
;
3777 case M32C_OPERAND_LAB_8_8
:
3778 value
= fields
->f_lab_8_8
;
3780 case M32C_OPERAND_LAB32_JMP_S
:
3781 value
= fields
->f_lab32_jmp_s
;
3783 case M32C_OPERAND_Q
:
3786 case M32C_OPERAND_R0
:
3789 case M32C_OPERAND_R0H
:
3792 case M32C_OPERAND_R0L
:
3795 case M32C_OPERAND_R1
:
3798 case M32C_OPERAND_R1R2R0
:
3801 case M32C_OPERAND_R2
:
3804 case M32C_OPERAND_R2R0
:
3807 case M32C_OPERAND_R3
:
3810 case M32C_OPERAND_R3R1
:
3813 case M32C_OPERAND_REGSETPOP
:
3814 value
= fields
->f_8_8
;
3816 case M32C_OPERAND_REGSETPUSH
:
3817 value
= fields
->f_8_8
;
3819 case M32C_OPERAND_RN16_PUSH_S
:
3820 value
= fields
->f_4_1
;
3822 case M32C_OPERAND_S
:
3825 case M32C_OPERAND_SRC16AN
:
3826 value
= fields
->f_src16_an
;
3828 case M32C_OPERAND_SRC16ANHI
:
3829 value
= fields
->f_src16_an
;
3831 case M32C_OPERAND_SRC16ANQI
:
3832 value
= fields
->f_src16_an
;
3834 case M32C_OPERAND_SRC16RNHI
:
3835 value
= fields
->f_src16_rn
;
3837 case M32C_OPERAND_SRC16RNQI
:
3838 value
= fields
->f_src16_rn
;
3840 case M32C_OPERAND_SRC32ANPREFIXED
:
3841 value
= fields
->f_src32_an_prefixed
;
3843 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3844 value
= fields
->f_src32_an_prefixed
;
3846 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3847 value
= fields
->f_src32_an_prefixed
;
3849 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3850 value
= fields
->f_src32_an_prefixed
;
3852 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3853 value
= fields
->f_src32_an_unprefixed
;
3855 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3856 value
= fields
->f_src32_an_unprefixed
;
3858 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3859 value
= fields
->f_src32_an_unprefixed
;
3861 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3862 value
= fields
->f_src32_an_unprefixed
;
3864 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3865 value
= fields
->f_src32_rn_prefixed_HI
;
3867 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3868 value
= fields
->f_src32_rn_prefixed_QI
;
3870 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3871 value
= fields
->f_src32_rn_prefixed_SI
;
3873 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3874 value
= fields
->f_src32_rn_unprefixed_HI
;
3876 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3877 value
= fields
->f_src32_rn_unprefixed_QI
;
3879 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3880 value
= fields
->f_src32_rn_unprefixed_SI
;
3882 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3883 value
= fields
->f_5_1
;
3885 case M32C_OPERAND_X
:
3888 case M32C_OPERAND_Z
:
3891 case M32C_OPERAND_COND16_16
:
3892 value
= fields
->f_dsp_16_u8
;
3894 case M32C_OPERAND_COND16_24
:
3895 value
= fields
->f_dsp_24_u8
;
3897 case M32C_OPERAND_COND16_32
:
3898 value
= fields
->f_dsp_32_u8
;
3900 case M32C_OPERAND_COND16C
:
3901 value
= fields
->f_cond16
;
3903 case M32C_OPERAND_COND16J
:
3904 value
= fields
->f_cond16
;
3906 case M32C_OPERAND_COND16J5
:
3907 value
= fields
->f_cond16j_5
;
3909 case M32C_OPERAND_COND32
:
3910 value
= fields
->f_cond32
;
3912 case M32C_OPERAND_COND32_16
:
3913 value
= fields
->f_dsp_16_u8
;
3915 case M32C_OPERAND_COND32_24
:
3916 value
= fields
->f_dsp_24_u8
;
3918 case M32C_OPERAND_COND32_32
:
3919 value
= fields
->f_dsp_32_u8
;
3921 case M32C_OPERAND_COND32_40
:
3922 value
= fields
->f_dsp_40_u8
;
3924 case M32C_OPERAND_COND32J
:
3925 value
= fields
->f_cond32j
;
3927 case M32C_OPERAND_CR1_PREFIXED_32
:
3928 value
= fields
->f_21_3
;
3930 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3931 value
= fields
->f_13_3
;
3933 case M32C_OPERAND_CR16
:
3934 value
= fields
->f_9_3
;
3936 case M32C_OPERAND_CR2_32
:
3937 value
= fields
->f_13_3
;
3939 case M32C_OPERAND_CR3_PREFIXED_32
:
3940 value
= fields
->f_21_3
;
3942 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3943 value
= fields
->f_13_3
;
3945 case M32C_OPERAND_FLAGS16
:
3946 value
= fields
->f_9_3
;
3948 case M32C_OPERAND_FLAGS32
:
3949 value
= fields
->f_13_3
;
3951 case M32C_OPERAND_SCCOND32
:
3952 value
= fields
->f_cond16
;
3954 case M32C_OPERAND_SIZE
:
3959 /* xgettext:c-format */
3960 fprintf (stderr
, _("Unrecognized field %d while getting vma operand.\n"),
3968 void m32c_cgen_set_int_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, int);
3969 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, bfd_vma
);
3971 /* Stuffing values in cgen_fields is handled by a collection of functions.
3972 They are distinguished by the type of the VALUE argument they accept.
3973 TODO: floating point, inlining support, remove cases where argument type
3977 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3979 CGEN_FIELDS
* fields
,
3984 case M32C_OPERAND_A0
:
3986 case M32C_OPERAND_A1
:
3988 case M32C_OPERAND_AN16_PUSH_S
:
3989 fields
->f_4_1
= value
;
3991 case M32C_OPERAND_BIT16AN
:
3992 fields
->f_dst16_an
= value
;
3994 case M32C_OPERAND_BIT16RN
:
3995 fields
->f_dst16_rn
= value
;
3997 case M32C_OPERAND_BIT32ANPREFIXED
:
3998 fields
->f_dst32_an_prefixed
= value
;
4000 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4001 fields
->f_dst32_an_unprefixed
= value
;
4003 case M32C_OPERAND_BIT32RNPREFIXED
:
4004 fields
->f_dst32_rn_prefixed_QI
= value
;
4006 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4007 fields
->f_dst32_rn_unprefixed_QI
= value
;
4009 case M32C_OPERAND_BITBASE16_16_S8
:
4010 fields
->f_dsp_16_s8
= value
;
4012 case M32C_OPERAND_BITBASE16_16_U16
:
4013 fields
->f_dsp_16_u16
= value
;
4015 case M32C_OPERAND_BITBASE16_16_U8
:
4016 fields
->f_dsp_16_u8
= value
;
4018 case M32C_OPERAND_BITBASE16_8_U11_S
:
4019 fields
->f_bitbase16_u11_S
= value
;
4021 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4022 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4024 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4025 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4027 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4028 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4030 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4031 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4033 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4034 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4036 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4037 fields
->f_bitbase32_24_s11_prefixed
= value
;
4039 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4040 fields
->f_bitbase32_24_s19_prefixed
= value
;
4042 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4043 fields
->f_bitbase32_24_u11_prefixed
= value
;
4045 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4046 fields
->f_bitbase32_24_u19_prefixed
= value
;
4048 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4049 fields
->f_bitbase32_24_u27_prefixed
= value
;
4051 case M32C_OPERAND_BITNO16R
:
4052 fields
->f_dsp_16_u8
= value
;
4054 case M32C_OPERAND_BITNO32PREFIXED
:
4055 fields
->f_bitno32_prefixed
= value
;
4057 case M32C_OPERAND_BITNO32UNPREFIXED
:
4058 fields
->f_bitno32_unprefixed
= value
;
4060 case M32C_OPERAND_DSP_10_U6
:
4061 fields
->f_dsp_10_u6
= value
;
4063 case M32C_OPERAND_DSP_16_S16
:
4064 fields
->f_dsp_16_s16
= value
;
4066 case M32C_OPERAND_DSP_16_S8
:
4067 fields
->f_dsp_16_s8
= value
;
4069 case M32C_OPERAND_DSP_16_U16
:
4070 fields
->f_dsp_16_u16
= value
;
4072 case M32C_OPERAND_DSP_16_U20
:
4073 fields
->f_dsp_16_u24
= value
;
4075 case M32C_OPERAND_DSP_16_U24
:
4076 fields
->f_dsp_16_u24
= value
;
4078 case M32C_OPERAND_DSP_16_U8
:
4079 fields
->f_dsp_16_u8
= value
;
4081 case M32C_OPERAND_DSP_24_S16
:
4082 fields
->f_dsp_24_s16
= value
;
4084 case M32C_OPERAND_DSP_24_S8
:
4085 fields
->f_dsp_24_s8
= value
;
4087 case M32C_OPERAND_DSP_24_U16
:
4088 fields
->f_dsp_24_u16
= value
;
4090 case M32C_OPERAND_DSP_24_U20
:
4091 fields
->f_dsp_24_u24
= value
;
4093 case M32C_OPERAND_DSP_24_U24
:
4094 fields
->f_dsp_24_u24
= value
;
4096 case M32C_OPERAND_DSP_24_U8
:
4097 fields
->f_dsp_24_u8
= value
;
4099 case M32C_OPERAND_DSP_32_S16
:
4100 fields
->f_dsp_32_s16
= value
;
4102 case M32C_OPERAND_DSP_32_S8
:
4103 fields
->f_dsp_32_s8
= value
;
4105 case M32C_OPERAND_DSP_32_U16
:
4106 fields
->f_dsp_32_u16
= value
;
4108 case M32C_OPERAND_DSP_32_U20
:
4109 fields
->f_dsp_32_u24
= value
;
4111 case M32C_OPERAND_DSP_32_U24
:
4112 fields
->f_dsp_32_u24
= value
;
4114 case M32C_OPERAND_DSP_32_U8
:
4115 fields
->f_dsp_32_u8
= value
;
4117 case M32C_OPERAND_DSP_40_S16
:
4118 fields
->f_dsp_40_s16
= value
;
4120 case M32C_OPERAND_DSP_40_S8
:
4121 fields
->f_dsp_40_s8
= value
;
4123 case M32C_OPERAND_DSP_40_U16
:
4124 fields
->f_dsp_40_u16
= value
;
4126 case M32C_OPERAND_DSP_40_U24
:
4127 fields
->f_dsp_40_u24
= value
;
4129 case M32C_OPERAND_DSP_40_U8
:
4130 fields
->f_dsp_40_u8
= value
;
4132 case M32C_OPERAND_DSP_48_S16
:
4133 fields
->f_dsp_48_s16
= value
;
4135 case M32C_OPERAND_DSP_48_S8
:
4136 fields
->f_dsp_48_s8
= value
;
4138 case M32C_OPERAND_DSP_48_U16
:
4139 fields
->f_dsp_48_u16
= value
;
4141 case M32C_OPERAND_DSP_48_U24
:
4142 fields
->f_dsp_48_u24
= value
;
4144 case M32C_OPERAND_DSP_48_U8
:
4145 fields
->f_dsp_48_u8
= value
;
4147 case M32C_OPERAND_DSP_8_S8
:
4148 fields
->f_dsp_8_s8
= value
;
4150 case M32C_OPERAND_DSP_8_U16
:
4151 fields
->f_dsp_8_u16
= value
;
4153 case M32C_OPERAND_DSP_8_U24
:
4154 fields
->f_dsp_8_u24
= value
;
4156 case M32C_OPERAND_DSP_8_U6
:
4157 fields
->f_dsp_8_u6
= value
;
4159 case M32C_OPERAND_DSP_8_U8
:
4160 fields
->f_dsp_8_u8
= value
;
4162 case M32C_OPERAND_DST16AN
:
4163 fields
->f_dst16_an
= value
;
4165 case M32C_OPERAND_DST16AN_S
:
4166 fields
->f_dst16_an_s
= value
;
4168 case M32C_OPERAND_DST16ANHI
:
4169 fields
->f_dst16_an
= value
;
4171 case M32C_OPERAND_DST16ANQI
:
4172 fields
->f_dst16_an
= value
;
4174 case M32C_OPERAND_DST16ANQI_S
:
4175 fields
->f_dst16_rn_QI_s
= value
;
4177 case M32C_OPERAND_DST16ANSI
:
4178 fields
->f_dst16_an
= value
;
4180 case M32C_OPERAND_DST16RNEXTQI
:
4181 fields
->f_dst16_rn_ext
= value
;
4183 case M32C_OPERAND_DST16RNHI
:
4184 fields
->f_dst16_rn
= value
;
4186 case M32C_OPERAND_DST16RNQI
:
4187 fields
->f_dst16_rn
= value
;
4189 case M32C_OPERAND_DST16RNQI_S
:
4190 fields
->f_dst16_rn_QI_s
= value
;
4192 case M32C_OPERAND_DST16RNSI
:
4193 fields
->f_dst16_rn
= value
;
4195 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4196 fields
->f_dst32_an_unprefixed
= value
;
4198 case M32C_OPERAND_DST32ANPREFIXED
:
4199 fields
->f_dst32_an_prefixed
= value
;
4201 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4202 fields
->f_dst32_an_prefixed
= value
;
4204 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4205 fields
->f_dst32_an_prefixed
= value
;
4207 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4208 fields
->f_dst32_an_prefixed
= value
;
4210 case M32C_OPERAND_DST32ANUNPREFIXED
:
4211 fields
->f_dst32_an_unprefixed
= value
;
4213 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4214 fields
->f_dst32_an_unprefixed
= value
;
4216 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4217 fields
->f_dst32_an_unprefixed
= value
;
4219 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4220 fields
->f_dst32_an_unprefixed
= value
;
4222 case M32C_OPERAND_DST32R0HI_S
:
4224 case M32C_OPERAND_DST32R0QI_S
:
4226 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4227 fields
->f_dst32_rn_ext_unprefixed
= value
;
4229 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4230 fields
->f_dst32_rn_ext_unprefixed
= value
;
4232 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4233 fields
->f_dst32_rn_prefixed_HI
= value
;
4235 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4236 fields
->f_dst32_rn_prefixed_QI
= value
;
4238 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4239 fields
->f_dst32_rn_prefixed_SI
= value
;
4241 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4242 fields
->f_dst32_rn_unprefixed_HI
= value
;
4244 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4245 fields
->f_dst32_rn_unprefixed_QI
= value
;
4247 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4248 fields
->f_dst32_rn_unprefixed_SI
= value
;
4250 case M32C_OPERAND_G
:
4252 case M32C_OPERAND_IMM_12_S4
:
4253 fields
->f_imm_12_s4
= value
;
4255 case M32C_OPERAND_IMM_13_U3
:
4256 fields
->f_imm_13_u3
= value
;
4258 case M32C_OPERAND_IMM_16_HI
:
4259 fields
->f_dsp_16_s16
= value
;
4261 case M32C_OPERAND_IMM_16_QI
:
4262 fields
->f_dsp_16_s8
= value
;
4264 case M32C_OPERAND_IMM_16_SI
:
4265 fields
->f_dsp_16_s32
= value
;
4267 case M32C_OPERAND_IMM_20_S4
:
4268 fields
->f_imm_20_s4
= value
;
4270 case M32C_OPERAND_IMM_24_HI
:
4271 fields
->f_dsp_24_s16
= value
;
4273 case M32C_OPERAND_IMM_24_QI
:
4274 fields
->f_dsp_24_s8
= value
;
4276 case M32C_OPERAND_IMM_24_SI
:
4277 fields
->f_dsp_24_s32
= value
;
4279 case M32C_OPERAND_IMM_32_HI
:
4280 fields
->f_dsp_32_s16
= value
;
4282 case M32C_OPERAND_IMM_32_QI
:
4283 fields
->f_dsp_32_s8
= value
;
4285 case M32C_OPERAND_IMM_32_SI
:
4286 fields
->f_dsp_32_s32
= value
;
4288 case M32C_OPERAND_IMM_40_HI
:
4289 fields
->f_dsp_40_s16
= value
;
4291 case M32C_OPERAND_IMM_40_QI
:
4292 fields
->f_dsp_40_s8
= value
;
4294 case M32C_OPERAND_IMM_40_SI
:
4295 fields
->f_dsp_40_s32
= value
;
4297 case M32C_OPERAND_IMM_48_HI
:
4298 fields
->f_dsp_48_s16
= value
;
4300 case M32C_OPERAND_IMM_48_QI
:
4301 fields
->f_dsp_48_s8
= value
;
4303 case M32C_OPERAND_IMM_48_SI
:
4304 fields
->f_dsp_48_s32
= value
;
4306 case M32C_OPERAND_IMM_56_HI
:
4307 fields
->f_dsp_56_s16
= value
;
4309 case M32C_OPERAND_IMM_56_QI
:
4310 fields
->f_dsp_56_s8
= value
;
4312 case M32C_OPERAND_IMM_64_HI
:
4313 fields
->f_dsp_64_s16
= value
;
4315 case M32C_OPERAND_IMM_8_HI
:
4316 fields
->f_dsp_8_s16
= value
;
4318 case M32C_OPERAND_IMM_8_QI
:
4319 fields
->f_dsp_8_s8
= value
;
4321 case M32C_OPERAND_IMM_8_S4
:
4322 fields
->f_imm_8_s4
= value
;
4324 case M32C_OPERAND_IMM_SH_12_S4
:
4325 fields
->f_imm_12_s4
= value
;
4327 case M32C_OPERAND_IMM_SH_20_S4
:
4328 fields
->f_imm_20_s4
= value
;
4330 case M32C_OPERAND_IMM_SH_8_S4
:
4331 fields
->f_imm_8_s4
= value
;
4333 case M32C_OPERAND_IMM1_S
:
4334 fields
->f_imm1_S
= value
;
4336 case M32C_OPERAND_IMM3_S
:
4337 fields
->f_imm3_S
= value
;
4339 case M32C_OPERAND_LAB_16_8
:
4340 fields
->f_lab_16_8
= value
;
4342 case M32C_OPERAND_LAB_24_8
:
4343 fields
->f_lab_24_8
= value
;
4345 case M32C_OPERAND_LAB_32_8
:
4346 fields
->f_lab_32_8
= value
;
4348 case M32C_OPERAND_LAB_40_8
:
4349 fields
->f_lab_40_8
= value
;
4351 case M32C_OPERAND_LAB_5_3
:
4352 fields
->f_lab_5_3
= value
;
4354 case M32C_OPERAND_LAB_8_16
:
4355 fields
->f_lab_8_16
= value
;
4357 case M32C_OPERAND_LAB_8_24
:
4358 fields
->f_lab_8_24
= value
;
4360 case M32C_OPERAND_LAB_8_8
:
4361 fields
->f_lab_8_8
= value
;
4363 case M32C_OPERAND_LAB32_JMP_S
:
4364 fields
->f_lab32_jmp_s
= value
;
4366 case M32C_OPERAND_Q
:
4368 case M32C_OPERAND_R0
:
4370 case M32C_OPERAND_R0H
:
4372 case M32C_OPERAND_R0L
:
4374 case M32C_OPERAND_R1
:
4376 case M32C_OPERAND_R1R2R0
:
4378 case M32C_OPERAND_R2
:
4380 case M32C_OPERAND_R2R0
:
4382 case M32C_OPERAND_R3
:
4384 case M32C_OPERAND_R3R1
:
4386 case M32C_OPERAND_REGSETPOP
:
4387 fields
->f_8_8
= value
;
4389 case M32C_OPERAND_REGSETPUSH
:
4390 fields
->f_8_8
= value
;
4392 case M32C_OPERAND_RN16_PUSH_S
:
4393 fields
->f_4_1
= value
;
4395 case M32C_OPERAND_S
:
4397 case M32C_OPERAND_SRC16AN
:
4398 fields
->f_src16_an
= value
;
4400 case M32C_OPERAND_SRC16ANHI
:
4401 fields
->f_src16_an
= value
;
4403 case M32C_OPERAND_SRC16ANQI
:
4404 fields
->f_src16_an
= value
;
4406 case M32C_OPERAND_SRC16RNHI
:
4407 fields
->f_src16_rn
= value
;
4409 case M32C_OPERAND_SRC16RNQI
:
4410 fields
->f_src16_rn
= value
;
4412 case M32C_OPERAND_SRC32ANPREFIXED
:
4413 fields
->f_src32_an_prefixed
= value
;
4415 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4416 fields
->f_src32_an_prefixed
= value
;
4418 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4419 fields
->f_src32_an_prefixed
= value
;
4421 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4422 fields
->f_src32_an_prefixed
= value
;
4424 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4425 fields
->f_src32_an_unprefixed
= value
;
4427 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4428 fields
->f_src32_an_unprefixed
= value
;
4430 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4431 fields
->f_src32_an_unprefixed
= value
;
4433 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4434 fields
->f_src32_an_unprefixed
= value
;
4436 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4437 fields
->f_src32_rn_prefixed_HI
= value
;
4439 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4440 fields
->f_src32_rn_prefixed_QI
= value
;
4442 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4443 fields
->f_src32_rn_prefixed_SI
= value
;
4445 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4446 fields
->f_src32_rn_unprefixed_HI
= value
;
4448 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4449 fields
->f_src32_rn_unprefixed_QI
= value
;
4451 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4452 fields
->f_src32_rn_unprefixed_SI
= value
;
4454 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4455 fields
->f_5_1
= value
;
4457 case M32C_OPERAND_X
:
4459 case M32C_OPERAND_Z
:
4461 case M32C_OPERAND_COND16_16
:
4462 fields
->f_dsp_16_u8
= value
;
4464 case M32C_OPERAND_COND16_24
:
4465 fields
->f_dsp_24_u8
= value
;
4467 case M32C_OPERAND_COND16_32
:
4468 fields
->f_dsp_32_u8
= value
;
4470 case M32C_OPERAND_COND16C
:
4471 fields
->f_cond16
= value
;
4473 case M32C_OPERAND_COND16J
:
4474 fields
->f_cond16
= value
;
4476 case M32C_OPERAND_COND16J5
:
4477 fields
->f_cond16j_5
= value
;
4479 case M32C_OPERAND_COND32
:
4480 fields
->f_cond32
= value
;
4482 case M32C_OPERAND_COND32_16
:
4483 fields
->f_dsp_16_u8
= value
;
4485 case M32C_OPERAND_COND32_24
:
4486 fields
->f_dsp_24_u8
= value
;
4488 case M32C_OPERAND_COND32_32
:
4489 fields
->f_dsp_32_u8
= value
;
4491 case M32C_OPERAND_COND32_40
:
4492 fields
->f_dsp_40_u8
= value
;
4494 case M32C_OPERAND_COND32J
:
4495 fields
->f_cond32j
= value
;
4497 case M32C_OPERAND_CR1_PREFIXED_32
:
4498 fields
->f_21_3
= value
;
4500 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4501 fields
->f_13_3
= value
;
4503 case M32C_OPERAND_CR16
:
4504 fields
->f_9_3
= value
;
4506 case M32C_OPERAND_CR2_32
:
4507 fields
->f_13_3
= value
;
4509 case M32C_OPERAND_CR3_PREFIXED_32
:
4510 fields
->f_21_3
= value
;
4512 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4513 fields
->f_13_3
= value
;
4515 case M32C_OPERAND_FLAGS16
:
4516 fields
->f_9_3
= value
;
4518 case M32C_OPERAND_FLAGS32
:
4519 fields
->f_13_3
= value
;
4521 case M32C_OPERAND_SCCOND32
:
4522 fields
->f_cond16
= value
;
4524 case M32C_OPERAND_SIZE
:
4528 /* xgettext:c-format */
4529 fprintf (stderr
, _("Unrecognized field %d while setting int operand.\n"),
4536 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4538 CGEN_FIELDS
* fields
,
4543 case M32C_OPERAND_A0
:
4545 case M32C_OPERAND_A1
:
4547 case M32C_OPERAND_AN16_PUSH_S
:
4548 fields
->f_4_1
= value
;
4550 case M32C_OPERAND_BIT16AN
:
4551 fields
->f_dst16_an
= value
;
4553 case M32C_OPERAND_BIT16RN
:
4554 fields
->f_dst16_rn
= value
;
4556 case M32C_OPERAND_BIT32ANPREFIXED
:
4557 fields
->f_dst32_an_prefixed
= value
;
4559 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4560 fields
->f_dst32_an_unprefixed
= value
;
4562 case M32C_OPERAND_BIT32RNPREFIXED
:
4563 fields
->f_dst32_rn_prefixed_QI
= value
;
4565 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4566 fields
->f_dst32_rn_unprefixed_QI
= value
;
4568 case M32C_OPERAND_BITBASE16_16_S8
:
4569 fields
->f_dsp_16_s8
= value
;
4571 case M32C_OPERAND_BITBASE16_16_U16
:
4572 fields
->f_dsp_16_u16
= value
;
4574 case M32C_OPERAND_BITBASE16_16_U8
:
4575 fields
->f_dsp_16_u8
= value
;
4577 case M32C_OPERAND_BITBASE16_8_U11_S
:
4578 fields
->f_bitbase16_u11_S
= value
;
4580 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4581 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4583 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4584 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4586 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4587 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4589 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4590 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4592 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4593 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4595 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4596 fields
->f_bitbase32_24_s11_prefixed
= value
;
4598 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4599 fields
->f_bitbase32_24_s19_prefixed
= value
;
4601 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4602 fields
->f_bitbase32_24_u11_prefixed
= value
;
4604 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4605 fields
->f_bitbase32_24_u19_prefixed
= value
;
4607 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4608 fields
->f_bitbase32_24_u27_prefixed
= value
;
4610 case M32C_OPERAND_BITNO16R
:
4611 fields
->f_dsp_16_u8
= value
;
4613 case M32C_OPERAND_BITNO32PREFIXED
:
4614 fields
->f_bitno32_prefixed
= value
;
4616 case M32C_OPERAND_BITNO32UNPREFIXED
:
4617 fields
->f_bitno32_unprefixed
= value
;
4619 case M32C_OPERAND_DSP_10_U6
:
4620 fields
->f_dsp_10_u6
= value
;
4622 case M32C_OPERAND_DSP_16_S16
:
4623 fields
->f_dsp_16_s16
= value
;
4625 case M32C_OPERAND_DSP_16_S8
:
4626 fields
->f_dsp_16_s8
= value
;
4628 case M32C_OPERAND_DSP_16_U16
:
4629 fields
->f_dsp_16_u16
= value
;
4631 case M32C_OPERAND_DSP_16_U20
:
4632 fields
->f_dsp_16_u24
= value
;
4634 case M32C_OPERAND_DSP_16_U24
:
4635 fields
->f_dsp_16_u24
= value
;
4637 case M32C_OPERAND_DSP_16_U8
:
4638 fields
->f_dsp_16_u8
= value
;
4640 case M32C_OPERAND_DSP_24_S16
:
4641 fields
->f_dsp_24_s16
= value
;
4643 case M32C_OPERAND_DSP_24_S8
:
4644 fields
->f_dsp_24_s8
= value
;
4646 case M32C_OPERAND_DSP_24_U16
:
4647 fields
->f_dsp_24_u16
= value
;
4649 case M32C_OPERAND_DSP_24_U20
:
4650 fields
->f_dsp_24_u24
= value
;
4652 case M32C_OPERAND_DSP_24_U24
:
4653 fields
->f_dsp_24_u24
= value
;
4655 case M32C_OPERAND_DSP_24_U8
:
4656 fields
->f_dsp_24_u8
= value
;
4658 case M32C_OPERAND_DSP_32_S16
:
4659 fields
->f_dsp_32_s16
= value
;
4661 case M32C_OPERAND_DSP_32_S8
:
4662 fields
->f_dsp_32_s8
= value
;
4664 case M32C_OPERAND_DSP_32_U16
:
4665 fields
->f_dsp_32_u16
= value
;
4667 case M32C_OPERAND_DSP_32_U20
:
4668 fields
->f_dsp_32_u24
= value
;
4670 case M32C_OPERAND_DSP_32_U24
:
4671 fields
->f_dsp_32_u24
= value
;
4673 case M32C_OPERAND_DSP_32_U8
:
4674 fields
->f_dsp_32_u8
= value
;
4676 case M32C_OPERAND_DSP_40_S16
:
4677 fields
->f_dsp_40_s16
= value
;
4679 case M32C_OPERAND_DSP_40_S8
:
4680 fields
->f_dsp_40_s8
= value
;
4682 case M32C_OPERAND_DSP_40_U16
:
4683 fields
->f_dsp_40_u16
= value
;
4685 case M32C_OPERAND_DSP_40_U24
:
4686 fields
->f_dsp_40_u24
= value
;
4688 case M32C_OPERAND_DSP_40_U8
:
4689 fields
->f_dsp_40_u8
= value
;
4691 case M32C_OPERAND_DSP_48_S16
:
4692 fields
->f_dsp_48_s16
= value
;
4694 case M32C_OPERAND_DSP_48_S8
:
4695 fields
->f_dsp_48_s8
= value
;
4697 case M32C_OPERAND_DSP_48_U16
:
4698 fields
->f_dsp_48_u16
= value
;
4700 case M32C_OPERAND_DSP_48_U24
:
4701 fields
->f_dsp_48_u24
= value
;
4703 case M32C_OPERAND_DSP_48_U8
:
4704 fields
->f_dsp_48_u8
= value
;
4706 case M32C_OPERAND_DSP_8_S8
:
4707 fields
->f_dsp_8_s8
= value
;
4709 case M32C_OPERAND_DSP_8_U16
:
4710 fields
->f_dsp_8_u16
= value
;
4712 case M32C_OPERAND_DSP_8_U24
:
4713 fields
->f_dsp_8_u24
= value
;
4715 case M32C_OPERAND_DSP_8_U6
:
4716 fields
->f_dsp_8_u6
= value
;
4718 case M32C_OPERAND_DSP_8_U8
:
4719 fields
->f_dsp_8_u8
= value
;
4721 case M32C_OPERAND_DST16AN
:
4722 fields
->f_dst16_an
= value
;
4724 case M32C_OPERAND_DST16AN_S
:
4725 fields
->f_dst16_an_s
= value
;
4727 case M32C_OPERAND_DST16ANHI
:
4728 fields
->f_dst16_an
= value
;
4730 case M32C_OPERAND_DST16ANQI
:
4731 fields
->f_dst16_an
= value
;
4733 case M32C_OPERAND_DST16ANQI_S
:
4734 fields
->f_dst16_rn_QI_s
= value
;
4736 case M32C_OPERAND_DST16ANSI
:
4737 fields
->f_dst16_an
= value
;
4739 case M32C_OPERAND_DST16RNEXTQI
:
4740 fields
->f_dst16_rn_ext
= value
;
4742 case M32C_OPERAND_DST16RNHI
:
4743 fields
->f_dst16_rn
= value
;
4745 case M32C_OPERAND_DST16RNQI
:
4746 fields
->f_dst16_rn
= value
;
4748 case M32C_OPERAND_DST16RNQI_S
:
4749 fields
->f_dst16_rn_QI_s
= value
;
4751 case M32C_OPERAND_DST16RNSI
:
4752 fields
->f_dst16_rn
= value
;
4754 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4755 fields
->f_dst32_an_unprefixed
= value
;
4757 case M32C_OPERAND_DST32ANPREFIXED
:
4758 fields
->f_dst32_an_prefixed
= value
;
4760 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4761 fields
->f_dst32_an_prefixed
= value
;
4763 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4764 fields
->f_dst32_an_prefixed
= value
;
4766 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4767 fields
->f_dst32_an_prefixed
= value
;
4769 case M32C_OPERAND_DST32ANUNPREFIXED
:
4770 fields
->f_dst32_an_unprefixed
= value
;
4772 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4773 fields
->f_dst32_an_unprefixed
= value
;
4775 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4776 fields
->f_dst32_an_unprefixed
= value
;
4778 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4779 fields
->f_dst32_an_unprefixed
= value
;
4781 case M32C_OPERAND_DST32R0HI_S
:
4783 case M32C_OPERAND_DST32R0QI_S
:
4785 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4786 fields
->f_dst32_rn_ext_unprefixed
= value
;
4788 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4789 fields
->f_dst32_rn_ext_unprefixed
= value
;
4791 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4792 fields
->f_dst32_rn_prefixed_HI
= value
;
4794 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4795 fields
->f_dst32_rn_prefixed_QI
= value
;
4797 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4798 fields
->f_dst32_rn_prefixed_SI
= value
;
4800 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4801 fields
->f_dst32_rn_unprefixed_HI
= value
;
4803 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4804 fields
->f_dst32_rn_unprefixed_QI
= value
;
4806 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4807 fields
->f_dst32_rn_unprefixed_SI
= value
;
4809 case M32C_OPERAND_G
:
4811 case M32C_OPERAND_IMM_12_S4
:
4812 fields
->f_imm_12_s4
= value
;
4814 case M32C_OPERAND_IMM_13_U3
:
4815 fields
->f_imm_13_u3
= value
;
4817 case M32C_OPERAND_IMM_16_HI
:
4818 fields
->f_dsp_16_s16
= value
;
4820 case M32C_OPERAND_IMM_16_QI
:
4821 fields
->f_dsp_16_s8
= value
;
4823 case M32C_OPERAND_IMM_16_SI
:
4824 fields
->f_dsp_16_s32
= value
;
4826 case M32C_OPERAND_IMM_20_S4
:
4827 fields
->f_imm_20_s4
= value
;
4829 case M32C_OPERAND_IMM_24_HI
:
4830 fields
->f_dsp_24_s16
= value
;
4832 case M32C_OPERAND_IMM_24_QI
:
4833 fields
->f_dsp_24_s8
= value
;
4835 case M32C_OPERAND_IMM_24_SI
:
4836 fields
->f_dsp_24_s32
= value
;
4838 case M32C_OPERAND_IMM_32_HI
:
4839 fields
->f_dsp_32_s16
= value
;
4841 case M32C_OPERAND_IMM_32_QI
:
4842 fields
->f_dsp_32_s8
= value
;
4844 case M32C_OPERAND_IMM_32_SI
:
4845 fields
->f_dsp_32_s32
= value
;
4847 case M32C_OPERAND_IMM_40_HI
:
4848 fields
->f_dsp_40_s16
= value
;
4850 case M32C_OPERAND_IMM_40_QI
:
4851 fields
->f_dsp_40_s8
= value
;
4853 case M32C_OPERAND_IMM_40_SI
:
4854 fields
->f_dsp_40_s32
= value
;
4856 case M32C_OPERAND_IMM_48_HI
:
4857 fields
->f_dsp_48_s16
= value
;
4859 case M32C_OPERAND_IMM_48_QI
:
4860 fields
->f_dsp_48_s8
= value
;
4862 case M32C_OPERAND_IMM_48_SI
:
4863 fields
->f_dsp_48_s32
= value
;
4865 case M32C_OPERAND_IMM_56_HI
:
4866 fields
->f_dsp_56_s16
= value
;
4868 case M32C_OPERAND_IMM_56_QI
:
4869 fields
->f_dsp_56_s8
= value
;
4871 case M32C_OPERAND_IMM_64_HI
:
4872 fields
->f_dsp_64_s16
= value
;
4874 case M32C_OPERAND_IMM_8_HI
:
4875 fields
->f_dsp_8_s16
= value
;
4877 case M32C_OPERAND_IMM_8_QI
:
4878 fields
->f_dsp_8_s8
= value
;
4880 case M32C_OPERAND_IMM_8_S4
:
4881 fields
->f_imm_8_s4
= value
;
4883 case M32C_OPERAND_IMM_SH_12_S4
:
4884 fields
->f_imm_12_s4
= value
;
4886 case M32C_OPERAND_IMM_SH_20_S4
:
4887 fields
->f_imm_20_s4
= value
;
4889 case M32C_OPERAND_IMM_SH_8_S4
:
4890 fields
->f_imm_8_s4
= value
;
4892 case M32C_OPERAND_IMM1_S
:
4893 fields
->f_imm1_S
= value
;
4895 case M32C_OPERAND_IMM3_S
:
4896 fields
->f_imm3_S
= value
;
4898 case M32C_OPERAND_LAB_16_8
:
4899 fields
->f_lab_16_8
= value
;
4901 case M32C_OPERAND_LAB_24_8
:
4902 fields
->f_lab_24_8
= value
;
4904 case M32C_OPERAND_LAB_32_8
:
4905 fields
->f_lab_32_8
= value
;
4907 case M32C_OPERAND_LAB_40_8
:
4908 fields
->f_lab_40_8
= value
;
4910 case M32C_OPERAND_LAB_5_3
:
4911 fields
->f_lab_5_3
= value
;
4913 case M32C_OPERAND_LAB_8_16
:
4914 fields
->f_lab_8_16
= value
;
4916 case M32C_OPERAND_LAB_8_24
:
4917 fields
->f_lab_8_24
= value
;
4919 case M32C_OPERAND_LAB_8_8
:
4920 fields
->f_lab_8_8
= value
;
4922 case M32C_OPERAND_LAB32_JMP_S
:
4923 fields
->f_lab32_jmp_s
= value
;
4925 case M32C_OPERAND_Q
:
4927 case M32C_OPERAND_R0
:
4929 case M32C_OPERAND_R0H
:
4931 case M32C_OPERAND_R0L
:
4933 case M32C_OPERAND_R1
:
4935 case M32C_OPERAND_R1R2R0
:
4937 case M32C_OPERAND_R2
:
4939 case M32C_OPERAND_R2R0
:
4941 case M32C_OPERAND_R3
:
4943 case M32C_OPERAND_R3R1
:
4945 case M32C_OPERAND_REGSETPOP
:
4946 fields
->f_8_8
= value
;
4948 case M32C_OPERAND_REGSETPUSH
:
4949 fields
->f_8_8
= value
;
4951 case M32C_OPERAND_RN16_PUSH_S
:
4952 fields
->f_4_1
= value
;
4954 case M32C_OPERAND_S
:
4956 case M32C_OPERAND_SRC16AN
:
4957 fields
->f_src16_an
= value
;
4959 case M32C_OPERAND_SRC16ANHI
:
4960 fields
->f_src16_an
= value
;
4962 case M32C_OPERAND_SRC16ANQI
:
4963 fields
->f_src16_an
= value
;
4965 case M32C_OPERAND_SRC16RNHI
:
4966 fields
->f_src16_rn
= value
;
4968 case M32C_OPERAND_SRC16RNQI
:
4969 fields
->f_src16_rn
= value
;
4971 case M32C_OPERAND_SRC32ANPREFIXED
:
4972 fields
->f_src32_an_prefixed
= value
;
4974 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4975 fields
->f_src32_an_prefixed
= value
;
4977 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4978 fields
->f_src32_an_prefixed
= value
;
4980 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4981 fields
->f_src32_an_prefixed
= value
;
4983 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4984 fields
->f_src32_an_unprefixed
= value
;
4986 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4987 fields
->f_src32_an_unprefixed
= value
;
4989 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4990 fields
->f_src32_an_unprefixed
= value
;
4992 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4993 fields
->f_src32_an_unprefixed
= value
;
4995 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4996 fields
->f_src32_rn_prefixed_HI
= value
;
4998 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4999 fields
->f_src32_rn_prefixed_QI
= value
;
5001 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
5002 fields
->f_src32_rn_prefixed_SI
= value
;
5004 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
5005 fields
->f_src32_rn_unprefixed_HI
= value
;
5007 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
5008 fields
->f_src32_rn_unprefixed_QI
= value
;
5010 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
5011 fields
->f_src32_rn_unprefixed_SI
= value
;
5013 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
5014 fields
->f_5_1
= value
;
5016 case M32C_OPERAND_X
:
5018 case M32C_OPERAND_Z
:
5020 case M32C_OPERAND_COND16_16
:
5021 fields
->f_dsp_16_u8
= value
;
5023 case M32C_OPERAND_COND16_24
:
5024 fields
->f_dsp_24_u8
= value
;
5026 case M32C_OPERAND_COND16_32
:
5027 fields
->f_dsp_32_u8
= value
;
5029 case M32C_OPERAND_COND16C
:
5030 fields
->f_cond16
= value
;
5032 case M32C_OPERAND_COND16J
:
5033 fields
->f_cond16
= value
;
5035 case M32C_OPERAND_COND16J5
:
5036 fields
->f_cond16j_5
= value
;
5038 case M32C_OPERAND_COND32
:
5039 fields
->f_cond32
= value
;
5041 case M32C_OPERAND_COND32_16
:
5042 fields
->f_dsp_16_u8
= value
;
5044 case M32C_OPERAND_COND32_24
:
5045 fields
->f_dsp_24_u8
= value
;
5047 case M32C_OPERAND_COND32_32
:
5048 fields
->f_dsp_32_u8
= value
;
5050 case M32C_OPERAND_COND32_40
:
5051 fields
->f_dsp_40_u8
= value
;
5053 case M32C_OPERAND_COND32J
:
5054 fields
->f_cond32j
= value
;
5056 case M32C_OPERAND_CR1_PREFIXED_32
:
5057 fields
->f_21_3
= value
;
5059 case M32C_OPERAND_CR1_UNPREFIXED_32
:
5060 fields
->f_13_3
= value
;
5062 case M32C_OPERAND_CR16
:
5063 fields
->f_9_3
= value
;
5065 case M32C_OPERAND_CR2_32
:
5066 fields
->f_13_3
= value
;
5068 case M32C_OPERAND_CR3_PREFIXED_32
:
5069 fields
->f_21_3
= value
;
5071 case M32C_OPERAND_CR3_UNPREFIXED_32
:
5072 fields
->f_13_3
= value
;
5074 case M32C_OPERAND_FLAGS16
:
5075 fields
->f_9_3
= value
;
5077 case M32C_OPERAND_FLAGS32
:
5078 fields
->f_13_3
= value
;
5080 case M32C_OPERAND_SCCOND32
:
5081 fields
->f_cond16
= value
;
5083 case M32C_OPERAND_SIZE
:
5087 /* xgettext:c-format */
5088 fprintf (stderr
, _("Unrecognized field %d while setting vma operand.\n"),
5094 /* Function to call before using the instruction builder tables. */
5097 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd
)
5099 cd
->insert_handlers
= & m32c_cgen_insert_handlers
[0];
5100 cd
->extract_handlers
= & m32c_cgen_extract_handlers
[0];
5102 cd
->insert_operand
= m32c_cgen_insert_operand
;
5103 cd
->extract_operand
= m32c_cgen_extract_operand
;
5105 cd
->get_int_operand
= m32c_cgen_get_int_operand
;
5106 cd
->set_int_operand
= m32c_cgen_set_int_operand
;
5107 cd
->get_vma_operand
= m32c_cgen_get_vma_operand
;
5108 cd
->set_vma_operand
= m32c_cgen_set_vma_operand
;