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_S24
:
1032 long value
= fields
->f_dsp_8_s24
;
1033 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
1034 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, buffer
);
1037 case M32C_OPERAND_DSP_8_S8
:
1038 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1040 case M32C_OPERAND_DSP_8_U16
:
1042 long value
= fields
->f_dsp_8_u16
;
1043 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1044 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 16, 32, total_length
, buffer
);
1047 case M32C_OPERAND_DSP_8_U24
:
1049 long value
= fields
->f_dsp_8_u24
;
1050 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1051 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 24, 32, total_length
, buffer
);
1054 case M32C_OPERAND_DSP_8_U6
:
1055 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u6
, 0, 0, 8, 6, 32, total_length
, buffer
);
1057 case M32C_OPERAND_DSP_8_U8
:
1058 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1060 case M32C_OPERAND_DST16AN
:
1061 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1063 case M32C_OPERAND_DST16AN_S
:
1064 errmsg
= insert_normal (cd
, fields
->f_dst16_an_s
, 0, 0, 4, 1, 32, total_length
, buffer
);
1066 case M32C_OPERAND_DST16ANHI
:
1067 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1069 case M32C_OPERAND_DST16ANQI
:
1070 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1072 case M32C_OPERAND_DST16ANQI_S
:
1073 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1075 case M32C_OPERAND_DST16ANSI
:
1076 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1078 case M32C_OPERAND_DST16RNEXTQI
:
1079 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_ext
, 0, 0, 14, 1, 32, total_length
, buffer
);
1081 case M32C_OPERAND_DST16RNHI
:
1082 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1084 case M32C_OPERAND_DST16RNQI
:
1085 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1087 case M32C_OPERAND_DST16RNQI_S
:
1088 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1090 case M32C_OPERAND_DST16RNSI
:
1091 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1093 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
1094 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1096 case M32C_OPERAND_DST32ANPREFIXED
:
1097 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1099 case M32C_OPERAND_DST32ANPREFIXEDHI
:
1100 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1102 case M32C_OPERAND_DST32ANPREFIXEDQI
:
1103 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1105 case M32C_OPERAND_DST32ANPREFIXEDSI
:
1106 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1108 case M32C_OPERAND_DST32ANUNPREFIXED
:
1109 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1111 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
1112 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1114 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
1115 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1117 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
1118 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1120 case M32C_OPERAND_DST32R0HI_S
:
1122 case M32C_OPERAND_DST32R0QI_S
:
1124 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
1125 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1127 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
1128 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1130 case M32C_OPERAND_DST32RNPREFIXEDHI
:
1132 long value
= fields
->f_dst32_rn_prefixed_HI
;
1133 value
= ((((value
) + (2))) % (4));
1134 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1137 case M32C_OPERAND_DST32RNPREFIXEDQI
:
1139 long value
= fields
->f_dst32_rn_prefixed_QI
;
1140 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1141 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1144 case M32C_OPERAND_DST32RNPREFIXEDSI
:
1146 long value
= fields
->f_dst32_rn_prefixed_SI
;
1147 value
= ((value
) + (2));
1148 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1151 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
1153 long value
= fields
->f_dst32_rn_unprefixed_HI
;
1154 value
= ((((value
) + (2))) % (4));
1155 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1158 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
1160 long value
= fields
->f_dst32_rn_unprefixed_QI
;
1161 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1162 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1165 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
1167 long value
= fields
->f_dst32_rn_unprefixed_SI
;
1168 value
= ((value
) + (2));
1169 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1172 case M32C_OPERAND_G
:
1174 case M32C_OPERAND_IMM_12_S4
:
1175 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1177 case M32C_OPERAND_IMM_12_S4N
:
1178 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1180 case M32C_OPERAND_IMM_13_U3
:
1181 errmsg
= insert_normal (cd
, fields
->f_imm_13_u3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1183 case M32C_OPERAND_IMM_16_HI
:
1185 long value
= fields
->f_dsp_16_s16
;
1186 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1187 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
1190 case M32C_OPERAND_IMM_16_QI
:
1191 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
1193 case M32C_OPERAND_IMM_16_SI
:
1196 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_16_s32
)) >> (16))) & (65535));
1197 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_s32
)) & (65535));
1200 long value
= fields
->f_dsp_16_u16
;
1201 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1202 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
1207 long value
= fields
->f_dsp_32_u16
;
1208 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1209 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
1215 case M32C_OPERAND_IMM_20_S4
:
1216 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1218 case M32C_OPERAND_IMM_24_HI
:
1221 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
1222 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
1224 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1227 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1232 case M32C_OPERAND_IMM_24_QI
:
1233 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
1235 case M32C_OPERAND_IMM_24_SI
:
1238 FLD (f_dsp_32_u24
) = ((((unsigned int) (FLD (f_dsp_24_s32
)) >> (8))) & (16777215));
1239 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s32
)) & (255));
1241 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1245 long value
= fields
->f_dsp_32_u24
;
1246 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1247 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
1253 case M32C_OPERAND_IMM_32_HI
:
1255 long value
= fields
->f_dsp_32_s16
;
1256 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1257 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
1260 case M32C_OPERAND_IMM_32_QI
:
1261 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
1263 case M32C_OPERAND_IMM_32_SI
:
1265 long value
= fields
->f_dsp_32_s32
;
1266 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
1267 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, buffer
);
1270 case M32C_OPERAND_IMM_40_HI
:
1272 long value
= fields
->f_dsp_40_s16
;
1273 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1274 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1277 case M32C_OPERAND_IMM_40_QI
:
1278 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1280 case M32C_OPERAND_IMM_40_SI
:
1283 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_40_s32
)) >> (24))) & (255));
1284 FLD (f_dsp_40_u24
) = ((FLD (f_dsp_40_s32
)) & (16777215));
1287 long value
= fields
->f_dsp_40_u24
;
1288 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1289 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1293 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1298 case M32C_OPERAND_IMM_48_HI
:
1300 long value
= fields
->f_dsp_48_s16
;
1301 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1302 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1305 case M32C_OPERAND_IMM_48_QI
:
1306 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1308 case M32C_OPERAND_IMM_48_SI
:
1311 FLD (f_dsp_64_u16
) = ((((unsigned int) (FLD (f_dsp_48_s32
)) >> (16))) & (65535));
1312 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_s32
)) & (65535));
1315 long value
= fields
->f_dsp_48_u16
;
1316 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1317 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1322 long value
= fields
->f_dsp_64_u16
;
1323 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1324 errmsg
= insert_normal (cd
, value
, 0, 64, 0, 16, 32, total_length
, buffer
);
1330 case M32C_OPERAND_IMM_56_HI
:
1333 FLD (f_dsp_56_u8
) = ((FLD (f_dsp_56_s16
)) & (255));
1334 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_56_s16
)) >> (8))) & (255));
1336 errmsg
= insert_normal (cd
, fields
->f_dsp_56_u8
, 0, 32, 24, 8, 32, total_length
, buffer
);
1339 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1344 case M32C_OPERAND_IMM_56_QI
:
1345 errmsg
= insert_normal (cd
, fields
->f_dsp_56_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 24, 8, 32, total_length
, buffer
);
1347 case M32C_OPERAND_IMM_64_HI
:
1349 long value
= fields
->f_dsp_64_s16
;
1350 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1351 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, buffer
);
1354 case M32C_OPERAND_IMM_8_HI
:
1356 long value
= fields
->f_dsp_8_s16
;
1357 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1358 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, buffer
);
1361 case M32C_OPERAND_IMM_8_QI
:
1362 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1364 case M32C_OPERAND_IMM_8_S4
:
1365 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1367 case M32C_OPERAND_IMM_8_S4N
:
1368 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1370 case M32C_OPERAND_IMM_SH_12_S4
:
1371 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1373 case M32C_OPERAND_IMM_SH_20_S4
:
1374 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1376 case M32C_OPERAND_IMM_SH_8_S4
:
1377 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1379 case M32C_OPERAND_IMM1_S
:
1381 long value
= fields
->f_imm1_S
;
1382 value
= ((value
) - (1));
1383 errmsg
= insert_normal (cd
, value
, 0, 0, 2, 1, 32, total_length
, buffer
);
1386 case M32C_OPERAND_IMM3_S
:
1389 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
1390 FLD (f_2_2
) = ((((unsigned int) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
1392 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1395 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1400 case M32C_OPERAND_LAB_16_8
:
1402 long value
= fields
->f_lab_16_8
;
1403 value
= ((value
) - (((pc
) + (2))));
1404 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 16, 8, 32, total_length
, buffer
);
1407 case M32C_OPERAND_LAB_24_8
:
1409 long value
= fields
->f_lab_24_8
;
1410 value
= ((value
) - (((pc
) + (2))));
1411 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 24, 8, 32, total_length
, buffer
);
1414 case M32C_OPERAND_LAB_32_8
:
1416 long value
= fields
->f_lab_32_8
;
1417 value
= ((value
) - (((pc
) + (2))));
1418 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 0, 8, 32, total_length
, buffer
);
1421 case M32C_OPERAND_LAB_40_8
:
1423 long value
= fields
->f_lab_40_8
;
1424 value
= ((value
) - (((pc
) + (2))));
1425 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 8, 8, 32, total_length
, buffer
);
1428 case M32C_OPERAND_LAB_5_3
:
1430 long value
= fields
->f_lab_5_3
;
1431 value
= ((value
) - (((pc
) + (2))));
1432 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, buffer
);
1435 case M32C_OPERAND_LAB_8_16
:
1437 long value
= fields
->f_lab_8_16
;
1438 value
= ((((((((value
) - (((pc
) + (1))))) & (255))) << (8))) | (((unsigned int) (((((value
) - (((pc
) + (1))))) & (65535))) >> (8))));
1439 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGN_OPT
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 16, 32, total_length
, buffer
);
1442 case M32C_OPERAND_LAB_8_24
:
1444 long value
= fields
->f_lab_8_24
;
1445 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1446 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, buffer
);
1449 case M32C_OPERAND_LAB_8_8
:
1451 long value
= fields
->f_lab_8_8
;
1452 value
= ((value
) - (((pc
) + (1))));
1453 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 8, 32, total_length
, buffer
);
1456 case M32C_OPERAND_LAB32_JMP_S
:
1460 tmp_val
= ((((FLD (f_lab32_jmp_s
)) - (pc
))) - (2));
1461 FLD (f_7_1
) = ((tmp_val
) & (1));
1462 FLD (f_2_2
) = ((unsigned int) (tmp_val
) >> (1));
1464 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1467 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1472 case M32C_OPERAND_Q
:
1474 case M32C_OPERAND_R0
:
1476 case M32C_OPERAND_R0H
:
1478 case M32C_OPERAND_R0L
:
1480 case M32C_OPERAND_R1
:
1482 case M32C_OPERAND_R1R2R0
:
1484 case M32C_OPERAND_R2
:
1486 case M32C_OPERAND_R2R0
:
1488 case M32C_OPERAND_R3
:
1490 case M32C_OPERAND_R3R1
:
1492 case M32C_OPERAND_REGSETPOP
:
1493 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1495 case M32C_OPERAND_REGSETPUSH
:
1496 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1498 case M32C_OPERAND_RN16_PUSH_S
:
1499 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
1501 case M32C_OPERAND_S
:
1503 case M32C_OPERAND_SRC16AN
:
1504 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1506 case M32C_OPERAND_SRC16ANHI
:
1507 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1509 case M32C_OPERAND_SRC16ANQI
:
1510 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1512 case M32C_OPERAND_SRC16RNHI
:
1513 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1515 case M32C_OPERAND_SRC16RNQI
:
1516 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1518 case M32C_OPERAND_SRC32ANPREFIXED
:
1519 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1521 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
1522 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1524 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
1525 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1527 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
1528 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1530 case M32C_OPERAND_SRC32ANUNPREFIXED
:
1531 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1533 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
1534 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1536 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
1537 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1539 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
1540 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1542 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
1544 long value
= fields
->f_src32_rn_prefixed_HI
;
1545 value
= ((((value
) + (2))) % (4));
1546 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1549 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
1551 long value
= fields
->f_src32_rn_prefixed_QI
;
1552 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1553 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1556 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
1558 long value
= fields
->f_src32_rn_prefixed_SI
;
1559 value
= ((value
) + (2));
1560 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1563 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
1565 long value
= fields
->f_src32_rn_unprefixed_HI
;
1566 value
= ((((value
) + (2))) % (4));
1567 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1570 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
1572 long value
= fields
->f_src32_rn_unprefixed_QI
;
1573 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1574 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1577 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
1579 long value
= fields
->f_src32_rn_unprefixed_SI
;
1580 value
= ((value
) + (2));
1581 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1584 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
1585 errmsg
= insert_normal (cd
, fields
->f_5_1
, 0, 0, 5, 1, 32, total_length
, buffer
);
1587 case M32C_OPERAND_X
:
1589 case M32C_OPERAND_Z
:
1591 case M32C_OPERAND_COND16_16
:
1592 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1594 case M32C_OPERAND_COND16_24
:
1595 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1597 case M32C_OPERAND_COND16_32
:
1598 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1600 case M32C_OPERAND_COND16C
:
1601 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1603 case M32C_OPERAND_COND16J
:
1604 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1606 case M32C_OPERAND_COND16J5
:
1607 errmsg
= insert_normal (cd
, fields
->f_cond16j_5
, 0, 0, 5, 3, 32, total_length
, buffer
);
1609 case M32C_OPERAND_COND32
:
1612 FLD (f_9_1
) = ((((unsigned int) (FLD (f_cond32
)) >> (3))) & (1));
1613 FLD (f_13_3
) = ((FLD (f_cond32
)) & (7));
1615 errmsg
= insert_normal (cd
, fields
->f_9_1
, 0, 0, 9, 1, 32, total_length
, buffer
);
1618 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1623 case M32C_OPERAND_COND32_16
:
1624 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1626 case M32C_OPERAND_COND32_24
:
1627 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1629 case M32C_OPERAND_COND32_32
:
1630 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1632 case M32C_OPERAND_COND32_40
:
1633 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1635 case M32C_OPERAND_COND32J
:
1638 FLD (f_1_3
) = ((((unsigned int) (FLD (f_cond32j
)) >> (1))) & (7));
1639 FLD (f_7_1
) = ((FLD (f_cond32j
)) & (1));
1641 errmsg
= insert_normal (cd
, fields
->f_1_3
, 0, 0, 1, 3, 32, total_length
, buffer
);
1644 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1649 case M32C_OPERAND_CR1_PREFIXED_32
:
1650 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1652 case M32C_OPERAND_CR1_UNPREFIXED_32
:
1653 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1655 case M32C_OPERAND_CR16
:
1656 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1658 case M32C_OPERAND_CR2_32
:
1659 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1661 case M32C_OPERAND_CR3_PREFIXED_32
:
1662 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1664 case M32C_OPERAND_CR3_UNPREFIXED_32
:
1665 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1667 case M32C_OPERAND_FLAGS16
:
1668 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1670 case M32C_OPERAND_FLAGS32
:
1671 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1673 case M32C_OPERAND_SCCOND32
:
1674 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1676 case M32C_OPERAND_SIZE
:
1680 /* xgettext:c-format */
1681 fprintf (stderr
, _("Unrecognized field %d while building insn.\n"),
1689 int m32c_cgen_extract_operand
1690 (CGEN_CPU_DESC
, int, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
1692 /* Main entry point for operand extraction.
1693 The result is <= 0 for error, >0 for success.
1694 ??? Actual values aren't well defined right now.
1696 This function is basically just a big switch statement. Earlier versions
1697 used tables to look up the function to use, but
1698 - if the table contains both assembler and disassembler functions then
1699 the disassembler contains much of the assembler and vice-versa,
1700 - there's a lot of inlining possibilities as things grow,
1701 - using a switch statement avoids the function call overhead.
1703 This function could be moved into `print_insn_normal', but keeping it
1704 separate makes clear the interface between `print_insn_normal' and each of
1708 m32c_cgen_extract_operand (CGEN_CPU_DESC cd
,
1710 CGEN_EXTRACT_INFO
*ex_info
,
1711 CGEN_INSN_INT insn_value
,
1712 CGEN_FIELDS
* fields
,
1715 /* Assume success (for those operands that are nops). */
1717 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
1721 case M32C_OPERAND_A0
:
1723 case M32C_OPERAND_A1
:
1725 case M32C_OPERAND_AN16_PUSH_S
:
1726 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
1728 case M32C_OPERAND_BIT16AN
:
1729 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
1731 case M32C_OPERAND_BIT16RN
:
1732 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
1734 case M32C_OPERAND_BIT32ANPREFIXED
:
1735 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
1737 case M32C_OPERAND_BIT32ANUNPREFIXED
:
1738 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
1740 case M32C_OPERAND_BIT32RNPREFIXED
:
1743 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
1744 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1745 fields
->f_dst32_rn_prefixed_QI
= value
;
1748 case M32C_OPERAND_BIT32RNUNPREFIXED
:
1751 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
1752 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1753 fields
->f_dst32_rn_unprefixed_QI
= value
;
1756 case M32C_OPERAND_BITBASE16_16_S8
:
1757 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
);
1759 case M32C_OPERAND_BITBASE16_16_U16
:
1762 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1763 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1764 fields
->f_dsp_16_u16
= value
;
1767 case M32C_OPERAND_BITBASE16_16_U8
:
1768 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1770 case M32C_OPERAND_BITBASE16_8_U11_S
:
1772 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_bitno16_S
);
1773 if (length
<= 0) break;
1774 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
1775 if (length
<= 0) break;
1777 FLD (f_bitbase16_u11_S
) = ((((FLD (f_dsp_8_u8
)) << (3))) | (FLD (f_bitno16_S
)));
1781 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
1783 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1784 if (length
<= 0) break;
1785 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
);
1786 if (length
<= 0) break;
1788 FLD (f_bitbase32_16_s11_unprefixed
) = ((((FLD (f_dsp_16_s8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1792 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
1794 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1795 if (length
<= 0) break;
1798 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1799 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1800 fields
->f_dsp_16_s16
= value
;
1802 if (length
<= 0) break;
1804 FLD (f_bitbase32_16_s19_unprefixed
) = ((((FLD (f_dsp_16_s16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1808 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
1810 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1811 if (length
<= 0) break;
1812 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1813 if (length
<= 0) break;
1815 FLD (f_bitbase32_16_u11_unprefixed
) = ((((FLD (f_dsp_16_u8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1819 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
1821 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1822 if (length
<= 0) break;
1825 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1826 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1827 fields
->f_dsp_16_u16
= value
;
1829 if (length
<= 0) break;
1831 FLD (f_bitbase32_16_u19_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1835 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
1837 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1838 if (length
<= 0) break;
1841 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1842 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1843 fields
->f_dsp_16_u16
= value
;
1845 if (length
<= 0) break;
1846 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1847 if (length
<= 0) break;
1849 FLD (f_bitbase32_16_u27_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (19))) | (FLD (f_bitno32_unprefixed
)))));
1853 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
1855 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1856 if (length
<= 0) break;
1857 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
);
1858 if (length
<= 0) break;
1860 FLD (f_bitbase32_24_s11_prefixed
) = ((((FLD (f_dsp_24_s8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1864 case M32C_OPERAND_BITBASE32_24_S19_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;
1870 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
);
1871 if (length
<= 0) break;
1873 FLD (f_bitbase32_24_s19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_s8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1877 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
1879 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1880 if (length
<= 0) break;
1881 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1882 if (length
<= 0) break;
1884 FLD (f_bitbase32_24_u11_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1888 case M32C_OPERAND_BITBASE32_24_U19_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;
1894 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1895 if (length
<= 0) break;
1897 FLD (f_bitbase32_24_u19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1901 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
1903 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1904 if (length
<= 0) break;
1905 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1906 if (length
<= 0) break;
1909 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
1910 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1911 fields
->f_dsp_32_u16
= value
;
1913 if (length
<= 0) break;
1915 FLD (f_bitbase32_24_u27_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u16
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1919 case M32C_OPERAND_BITNO16R
:
1920 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1922 case M32C_OPERAND_BITNO32PREFIXED
:
1923 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1925 case M32C_OPERAND_BITNO32UNPREFIXED
:
1926 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1928 case M32C_OPERAND_DSP_10_U6
:
1929 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 6, 32, total_length
, pc
, & fields
->f_dsp_10_u6
);
1931 case M32C_OPERAND_DSP_16_S16
:
1934 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1935 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1936 fields
->f_dsp_16_s16
= value
;
1939 case M32C_OPERAND_DSP_16_S8
:
1940 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
);
1942 case M32C_OPERAND_DSP_16_U16
:
1945 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1946 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1947 fields
->f_dsp_16_u16
= value
;
1950 case M32C_OPERAND_DSP_16_U20
:
1954 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1955 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1956 fields
->f_dsp_16_u16
= value
;
1958 if (length
<= 0) break;
1959 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1960 if (length
<= 0) break;
1962 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
1966 case M32C_OPERAND_DSP_16_U24
:
1970 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1971 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1972 fields
->f_dsp_16_u16
= value
;
1974 if (length
<= 0) break;
1975 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1976 if (length
<= 0) break;
1978 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
1982 case M32C_OPERAND_DSP_16_U8
:
1983 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1985 case M32C_OPERAND_DSP_24_S16
:
1987 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1988 if (length
<= 0) break;
1989 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1990 if (length
<= 0) break;
1992 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
1996 case M32C_OPERAND_DSP_24_S8
:
1997 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
);
1999 case M32C_OPERAND_DSP_24_U16
:
2001 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2002 if (length
<= 0) break;
2003 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2004 if (length
<= 0) break;
2006 FLD (f_dsp_24_u16
) = ((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
)));
2010 case M32C_OPERAND_DSP_24_U20
:
2012 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2013 if (length
<= 0) break;
2016 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2017 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2018 fields
->f_dsp_32_u16
= value
;
2020 if (length
<= 0) break;
2022 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2026 case M32C_OPERAND_DSP_24_U24
:
2028 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2029 if (length
<= 0) break;
2032 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2033 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2034 fields
->f_dsp_32_u16
= value
;
2036 if (length
<= 0) break;
2038 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2042 case M32C_OPERAND_DSP_24_U8
:
2043 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2045 case M32C_OPERAND_DSP_32_S16
:
2048 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2049 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2050 fields
->f_dsp_32_s16
= value
;
2053 case M32C_OPERAND_DSP_32_S8
:
2054 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
);
2056 case M32C_OPERAND_DSP_32_U16
:
2059 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2060 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2061 fields
->f_dsp_32_u16
= value
;
2064 case M32C_OPERAND_DSP_32_U20
:
2067 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2068 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2069 fields
->f_dsp_32_u24
= value
;
2072 case M32C_OPERAND_DSP_32_U24
:
2075 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2076 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2077 fields
->f_dsp_32_u24
= value
;
2080 case M32C_OPERAND_DSP_32_U8
:
2081 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2083 case M32C_OPERAND_DSP_40_S16
:
2086 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2087 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2088 fields
->f_dsp_40_s16
= value
;
2091 case M32C_OPERAND_DSP_40_S8
:
2092 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
);
2094 case M32C_OPERAND_DSP_40_U16
:
2097 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 16, 32, total_length
, pc
, & value
);
2098 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2099 fields
->f_dsp_40_u16
= value
;
2102 case M32C_OPERAND_DSP_40_U24
:
2105 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2106 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2107 fields
->f_dsp_40_u24
= value
;
2110 case M32C_OPERAND_DSP_40_U8
:
2111 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2113 case M32C_OPERAND_DSP_48_S16
:
2116 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2117 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2118 fields
->f_dsp_48_s16
= value
;
2121 case M32C_OPERAND_DSP_48_S8
:
2122 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
);
2124 case M32C_OPERAND_DSP_48_U16
:
2127 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2128 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2129 fields
->f_dsp_48_u16
= value
;
2132 case M32C_OPERAND_DSP_48_U24
:
2136 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2137 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2138 fields
->f_dsp_48_u16
= value
;
2140 if (length
<= 0) break;
2141 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2142 if (length
<= 0) break;
2144 FLD (f_dsp_48_u24
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (16711680))));
2148 case M32C_OPERAND_DSP_48_U8
:
2149 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_48_u8
);
2151 case M32C_OPERAND_DSP_8_S24
:
2154 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, pc
, & value
);
2155 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
2156 fields
->f_dsp_8_s24
= value
;
2159 case M32C_OPERAND_DSP_8_S8
:
2160 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
);
2162 case M32C_OPERAND_DSP_8_U16
:
2165 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 16, 32, total_length
, pc
, & value
);
2166 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2167 fields
->f_dsp_8_u16
= value
;
2170 case M32C_OPERAND_DSP_8_U24
:
2173 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 24, 32, total_length
, pc
, & value
);
2174 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2175 fields
->f_dsp_8_u24
= value
;
2178 case M32C_OPERAND_DSP_8_U6
:
2179 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 6, 32, total_length
, pc
, & fields
->f_dsp_8_u6
);
2181 case M32C_OPERAND_DSP_8_U8
:
2182 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
2184 case M32C_OPERAND_DST16AN
:
2185 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2187 case M32C_OPERAND_DST16AN_S
:
2188 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_dst16_an_s
);
2190 case M32C_OPERAND_DST16ANHI
:
2191 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2193 case M32C_OPERAND_DST16ANQI
:
2194 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2196 case M32C_OPERAND_DST16ANQI_S
:
2197 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2199 case M32C_OPERAND_DST16ANSI
:
2200 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2202 case M32C_OPERAND_DST16RNEXTQI
:
2203 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_ext
);
2205 case M32C_OPERAND_DST16RNHI
:
2206 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2208 case M32C_OPERAND_DST16RNQI
:
2209 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2211 case M32C_OPERAND_DST16RNQI_S
:
2212 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2214 case M32C_OPERAND_DST16RNSI
:
2215 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2217 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
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_DST32ANPREFIXED
:
2221 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2223 case M32C_OPERAND_DST32ANPREFIXEDHI
:
2224 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2226 case M32C_OPERAND_DST32ANPREFIXEDQI
:
2227 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2229 case M32C_OPERAND_DST32ANPREFIXEDSI
:
2230 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2232 case M32C_OPERAND_DST32ANUNPREFIXED
:
2233 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2235 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
2236 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2238 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
2239 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2241 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
2242 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2244 case M32C_OPERAND_DST32R0HI_S
:
2246 case M32C_OPERAND_DST32R0QI_S
:
2248 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
2249 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2251 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
2252 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2254 case M32C_OPERAND_DST32RNPREFIXEDHI
:
2257 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2258 value
= ((((value
) + (2))) % (4));
2259 fields
->f_dst32_rn_prefixed_HI
= value
;
2262 case M32C_OPERAND_DST32RNPREFIXEDQI
:
2265 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2266 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2267 fields
->f_dst32_rn_prefixed_QI
= value
;
2270 case M32C_OPERAND_DST32RNPREFIXEDSI
:
2273 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2274 value
= ((value
) - (2));
2275 fields
->f_dst32_rn_prefixed_SI
= value
;
2278 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
2281 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2282 value
= ((((value
) + (2))) % (4));
2283 fields
->f_dst32_rn_unprefixed_HI
= value
;
2286 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
2289 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2290 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2291 fields
->f_dst32_rn_unprefixed_QI
= value
;
2294 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
2297 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2298 value
= ((value
) - (2));
2299 fields
->f_dst32_rn_unprefixed_SI
= value
;
2302 case M32C_OPERAND_G
:
2304 case M32C_OPERAND_IMM_12_S4
:
2305 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
);
2307 case M32C_OPERAND_IMM_12_S4N
:
2308 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
);
2310 case M32C_OPERAND_IMM_13_U3
:
2311 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_imm_13_u3
);
2313 case M32C_OPERAND_IMM_16_HI
:
2316 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2317 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2318 fields
->f_dsp_16_s16
= value
;
2321 case M32C_OPERAND_IMM_16_QI
:
2322 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
);
2324 case M32C_OPERAND_IMM_16_SI
:
2328 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2329 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2330 fields
->f_dsp_16_u16
= value
;
2332 if (length
<= 0) break;
2335 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2336 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2337 fields
->f_dsp_32_u16
= value
;
2339 if (length
<= 0) break;
2341 FLD (f_dsp_16_s32
) = ((((FLD (f_dsp_16_u16
)) & (65535))) | (((((FLD (f_dsp_32_u16
)) << (16))) & (0xffff0000))));
2345 case M32C_OPERAND_IMM_20_S4
:
2346 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
);
2348 case M32C_OPERAND_IMM_24_HI
:
2350 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2351 if (length
<= 0) break;
2352 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2353 if (length
<= 0) break;
2355 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2359 case M32C_OPERAND_IMM_24_QI
:
2360 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
);
2362 case M32C_OPERAND_IMM_24_SI
:
2364 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2365 if (length
<= 0) break;
2368 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2369 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2370 fields
->f_dsp_32_u24
= value
;
2372 if (length
<= 0) break;
2374 FLD (f_dsp_24_s32
) = ((((FLD (f_dsp_24_u8
)) & (255))) | (((((FLD (f_dsp_32_u24
)) << (8))) & (0xffffff00))));
2378 case M32C_OPERAND_IMM_32_HI
:
2381 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2382 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2383 fields
->f_dsp_32_s16
= value
;
2386 case M32C_OPERAND_IMM_32_QI
:
2387 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
);
2389 case M32C_OPERAND_IMM_32_SI
:
2392 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, pc
, & value
);
2393 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
2394 fields
->f_dsp_32_s32
= value
;
2397 case M32C_OPERAND_IMM_40_HI
:
2400 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2401 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2402 fields
->f_dsp_40_s16
= value
;
2405 case M32C_OPERAND_IMM_40_QI
:
2406 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
);
2408 case M32C_OPERAND_IMM_40_SI
:
2412 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2413 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2414 fields
->f_dsp_40_u24
= value
;
2416 if (length
<= 0) break;
2417 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2418 if (length
<= 0) break;
2420 FLD (f_dsp_40_s32
) = ((((FLD (f_dsp_40_u24
)) & (16777215))) | (((((FLD (f_dsp_64_u8
)) << (24))) & (0xff000000))));
2424 case M32C_OPERAND_IMM_48_HI
:
2427 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2428 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2429 fields
->f_dsp_48_s16
= value
;
2432 case M32C_OPERAND_IMM_48_QI
:
2433 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
);
2435 case M32C_OPERAND_IMM_48_SI
:
2439 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2440 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2441 fields
->f_dsp_48_u16
= value
;
2443 if (length
<= 0) break;
2446 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 16, 32, total_length
, pc
, & value
);
2447 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2448 fields
->f_dsp_64_u16
= value
;
2450 if (length
<= 0) break;
2452 FLD (f_dsp_48_s32
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u16
)) << (16))) & (0xffff0000))));
2456 case M32C_OPERAND_IMM_56_HI
:
2458 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_56_u8
);
2459 if (length
<= 0) break;
2460 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2461 if (length
<= 0) break;
2463 FLD (f_dsp_56_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_64_u8
)) << (8))) | (FLD (f_dsp_56_u8
))))));
2467 case M32C_OPERAND_IMM_56_QI
:
2468 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
);
2470 case M32C_OPERAND_IMM_64_HI
:
2473 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, pc
, & value
);
2474 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2475 fields
->f_dsp_64_s16
= value
;
2478 case M32C_OPERAND_IMM_8_HI
:
2481 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, pc
, & value
);
2482 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2483 fields
->f_dsp_8_s16
= value
;
2486 case M32C_OPERAND_IMM_8_QI
:
2487 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
);
2489 case M32C_OPERAND_IMM_8_S4
:
2490 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
);
2492 case M32C_OPERAND_IMM_8_S4N
:
2493 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
);
2495 case M32C_OPERAND_IMM_SH_12_S4
:
2496 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
);
2498 case M32C_OPERAND_IMM_SH_20_S4
:
2499 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
);
2501 case M32C_OPERAND_IMM_SH_8_S4
:
2502 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
);
2504 case M32C_OPERAND_IMM1_S
:
2507 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 1, 32, total_length
, pc
, & value
);
2508 value
= ((value
) + (1));
2509 fields
->f_imm1_S
= value
;
2512 case M32C_OPERAND_IMM3_S
:
2514 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2515 if (length
<= 0) break;
2516 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2517 if (length
<= 0) break;
2519 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
2523 case M32C_OPERAND_LAB_16_8
:
2526 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
);
2527 value
= ((value
) + (((pc
) + (2))));
2528 fields
->f_lab_16_8
= value
;
2531 case M32C_OPERAND_LAB_24_8
:
2534 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
);
2535 value
= ((value
) + (((pc
) + (2))));
2536 fields
->f_lab_24_8
= value
;
2539 case M32C_OPERAND_LAB_32_8
:
2542 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
);
2543 value
= ((value
) + (((pc
) + (2))));
2544 fields
->f_lab_32_8
= value
;
2547 case M32C_OPERAND_LAB_40_8
:
2550 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
);
2551 value
= ((value
) + (((pc
) + (2))));
2552 fields
->f_lab_40_8
= value
;
2555 case M32C_OPERAND_LAB_5_3
:
2558 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, pc
, & value
);
2559 value
= ((value
) + (((pc
) + (2))));
2560 fields
->f_lab_5_3
= value
;
2563 case M32C_OPERAND_LAB_8_16
:
2566 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
);
2567 value
= ((((((unsigned int) (((value
) & (65535))) >> (8))) | (((int) (((((value
) & (255))) << (24))) >> (16))))) + (((pc
) + (1))));
2568 fields
->f_lab_8_16
= value
;
2571 case M32C_OPERAND_LAB_8_24
:
2574 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, pc
, & value
);
2575 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2576 fields
->f_lab_8_24
= value
;
2579 case M32C_OPERAND_LAB_8_8
:
2582 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
);
2583 value
= ((value
) + (((pc
) + (1))));
2584 fields
->f_lab_8_8
= value
;
2587 case M32C_OPERAND_LAB32_JMP_S
:
2589 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2590 if (length
<= 0) break;
2591 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2592 if (length
<= 0) break;
2594 FLD (f_lab32_jmp_s
) = ((pc
) + (((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (2))));
2598 case M32C_OPERAND_Q
:
2600 case M32C_OPERAND_R0
:
2602 case M32C_OPERAND_R0H
:
2604 case M32C_OPERAND_R0L
:
2606 case M32C_OPERAND_R1
:
2608 case M32C_OPERAND_R1R2R0
:
2610 case M32C_OPERAND_R2
:
2612 case M32C_OPERAND_R2R0
:
2614 case M32C_OPERAND_R3
:
2616 case M32C_OPERAND_R3R1
:
2618 case M32C_OPERAND_REGSETPOP
:
2619 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2621 case M32C_OPERAND_REGSETPUSH
:
2622 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2624 case M32C_OPERAND_RN16_PUSH_S
:
2625 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
2627 case M32C_OPERAND_S
:
2629 case M32C_OPERAND_SRC16AN
:
2630 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2632 case M32C_OPERAND_SRC16ANHI
:
2633 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2635 case M32C_OPERAND_SRC16ANQI
:
2636 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2638 case M32C_OPERAND_SRC16RNHI
:
2639 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2641 case M32C_OPERAND_SRC16RNQI
:
2642 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2644 case M32C_OPERAND_SRC32ANPREFIXED
:
2645 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2647 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
2648 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2650 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
2651 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2653 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
2654 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2656 case M32C_OPERAND_SRC32ANUNPREFIXED
:
2657 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2659 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
2660 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2662 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
2663 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2665 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
2666 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2668 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
2671 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2672 value
= ((((value
) + (2))) % (4));
2673 fields
->f_src32_rn_prefixed_HI
= value
;
2676 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
2679 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2680 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2681 fields
->f_src32_rn_prefixed_QI
= value
;
2684 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
2687 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2688 value
= ((value
) - (2));
2689 fields
->f_src32_rn_prefixed_SI
= value
;
2692 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
2695 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2696 value
= ((((value
) + (2))) % (4));
2697 fields
->f_src32_rn_unprefixed_HI
= value
;
2700 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
2703 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2704 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2705 fields
->f_src32_rn_unprefixed_QI
= value
;
2708 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
2711 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2712 value
= ((value
) - (2));
2713 fields
->f_src32_rn_unprefixed_SI
= value
;
2716 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
2717 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_5_1
);
2719 case M32C_OPERAND_X
:
2721 case M32C_OPERAND_Z
:
2723 case M32C_OPERAND_COND16_16
:
2724 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2726 case M32C_OPERAND_COND16_24
:
2727 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2729 case M32C_OPERAND_COND16_32
:
2730 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2732 case M32C_OPERAND_COND16C
:
2733 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2735 case M32C_OPERAND_COND16J
:
2736 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2738 case M32C_OPERAND_COND16J5
:
2739 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_cond16j_5
);
2741 case M32C_OPERAND_COND32
:
2743 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_9_1
);
2744 if (length
<= 0) break;
2745 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2746 if (length
<= 0) break;
2748 FLD (f_cond32
) = ((((FLD (f_9_1
)) << (3))) | (FLD (f_13_3
)));
2752 case M32C_OPERAND_COND32_16
:
2753 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2755 case M32C_OPERAND_COND32_24
:
2756 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2758 case M32C_OPERAND_COND32_32
:
2759 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2761 case M32C_OPERAND_COND32_40
:
2762 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2764 case M32C_OPERAND_COND32J
:
2766 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 1, 3, 32, total_length
, pc
, & fields
->f_1_3
);
2767 if (length
<= 0) break;
2768 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2769 if (length
<= 0) break;
2771 FLD (f_cond32j
) = ((((FLD (f_1_3
)) << (1))) | (FLD (f_7_1
)));
2775 case M32C_OPERAND_CR1_PREFIXED_32
:
2776 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2778 case M32C_OPERAND_CR1_UNPREFIXED_32
:
2779 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2781 case M32C_OPERAND_CR16
:
2782 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2784 case M32C_OPERAND_CR2_32
:
2785 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2787 case M32C_OPERAND_CR3_PREFIXED_32
:
2788 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2790 case M32C_OPERAND_CR3_UNPREFIXED_32
:
2791 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2793 case M32C_OPERAND_FLAGS16
:
2794 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2796 case M32C_OPERAND_FLAGS32
:
2797 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2799 case M32C_OPERAND_SCCOND32
:
2800 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2802 case M32C_OPERAND_SIZE
:
2806 /* xgettext:c-format */
2807 fprintf (stderr
, _("Unrecognized field %d while decoding insn.\n"),
2815 cgen_insert_fn
* const m32c_cgen_insert_handlers
[] =
2820 cgen_extract_fn
* const m32c_cgen_extract_handlers
[] =
2822 extract_insn_normal
,
2825 int m32c_cgen_get_int_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2826 bfd_vma
m32c_cgen_get_vma_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2828 /* Getting values from cgen_fields is handled by a collection of functions.
2829 They are distinguished by the type of the VALUE argument they return.
2830 TODO: floating point, inlining support, remove cases where result type
2834 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
2836 const CGEN_FIELDS
* fields
)
2842 case M32C_OPERAND_A0
:
2845 case M32C_OPERAND_A1
:
2848 case M32C_OPERAND_AN16_PUSH_S
:
2849 value
= fields
->f_4_1
;
2851 case M32C_OPERAND_BIT16AN
:
2852 value
= fields
->f_dst16_an
;
2854 case M32C_OPERAND_BIT16RN
:
2855 value
= fields
->f_dst16_rn
;
2857 case M32C_OPERAND_BIT32ANPREFIXED
:
2858 value
= fields
->f_dst32_an_prefixed
;
2860 case M32C_OPERAND_BIT32ANUNPREFIXED
:
2861 value
= fields
->f_dst32_an_unprefixed
;
2863 case M32C_OPERAND_BIT32RNPREFIXED
:
2864 value
= fields
->f_dst32_rn_prefixed_QI
;
2866 case M32C_OPERAND_BIT32RNUNPREFIXED
:
2867 value
= fields
->f_dst32_rn_unprefixed_QI
;
2869 case M32C_OPERAND_BITBASE16_16_S8
:
2870 value
= fields
->f_dsp_16_s8
;
2872 case M32C_OPERAND_BITBASE16_16_U16
:
2873 value
= fields
->f_dsp_16_u16
;
2875 case M32C_OPERAND_BITBASE16_16_U8
:
2876 value
= fields
->f_dsp_16_u8
;
2878 case M32C_OPERAND_BITBASE16_8_U11_S
:
2879 value
= fields
->f_bitbase16_u11_S
;
2881 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
2882 value
= fields
->f_bitbase32_16_s11_unprefixed
;
2884 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
2885 value
= fields
->f_bitbase32_16_s19_unprefixed
;
2887 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
2888 value
= fields
->f_bitbase32_16_u11_unprefixed
;
2890 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
2891 value
= fields
->f_bitbase32_16_u19_unprefixed
;
2893 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
2894 value
= fields
->f_bitbase32_16_u27_unprefixed
;
2896 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
2897 value
= fields
->f_bitbase32_24_s11_prefixed
;
2899 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
2900 value
= fields
->f_bitbase32_24_s19_prefixed
;
2902 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
2903 value
= fields
->f_bitbase32_24_u11_prefixed
;
2905 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
2906 value
= fields
->f_bitbase32_24_u19_prefixed
;
2908 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
2909 value
= fields
->f_bitbase32_24_u27_prefixed
;
2911 case M32C_OPERAND_BITNO16R
:
2912 value
= fields
->f_dsp_16_u8
;
2914 case M32C_OPERAND_BITNO32PREFIXED
:
2915 value
= fields
->f_bitno32_prefixed
;
2917 case M32C_OPERAND_BITNO32UNPREFIXED
:
2918 value
= fields
->f_bitno32_unprefixed
;
2920 case M32C_OPERAND_DSP_10_U6
:
2921 value
= fields
->f_dsp_10_u6
;
2923 case M32C_OPERAND_DSP_16_S16
:
2924 value
= fields
->f_dsp_16_s16
;
2926 case M32C_OPERAND_DSP_16_S8
:
2927 value
= fields
->f_dsp_16_s8
;
2929 case M32C_OPERAND_DSP_16_U16
:
2930 value
= fields
->f_dsp_16_u16
;
2932 case M32C_OPERAND_DSP_16_U20
:
2933 value
= fields
->f_dsp_16_u24
;
2935 case M32C_OPERAND_DSP_16_U24
:
2936 value
= fields
->f_dsp_16_u24
;
2938 case M32C_OPERAND_DSP_16_U8
:
2939 value
= fields
->f_dsp_16_u8
;
2941 case M32C_OPERAND_DSP_24_S16
:
2942 value
= fields
->f_dsp_24_s16
;
2944 case M32C_OPERAND_DSP_24_S8
:
2945 value
= fields
->f_dsp_24_s8
;
2947 case M32C_OPERAND_DSP_24_U16
:
2948 value
= fields
->f_dsp_24_u16
;
2950 case M32C_OPERAND_DSP_24_U20
:
2951 value
= fields
->f_dsp_24_u24
;
2953 case M32C_OPERAND_DSP_24_U24
:
2954 value
= fields
->f_dsp_24_u24
;
2956 case M32C_OPERAND_DSP_24_U8
:
2957 value
= fields
->f_dsp_24_u8
;
2959 case M32C_OPERAND_DSP_32_S16
:
2960 value
= fields
->f_dsp_32_s16
;
2962 case M32C_OPERAND_DSP_32_S8
:
2963 value
= fields
->f_dsp_32_s8
;
2965 case M32C_OPERAND_DSP_32_U16
:
2966 value
= fields
->f_dsp_32_u16
;
2968 case M32C_OPERAND_DSP_32_U20
:
2969 value
= fields
->f_dsp_32_u24
;
2971 case M32C_OPERAND_DSP_32_U24
:
2972 value
= fields
->f_dsp_32_u24
;
2974 case M32C_OPERAND_DSP_32_U8
:
2975 value
= fields
->f_dsp_32_u8
;
2977 case M32C_OPERAND_DSP_40_S16
:
2978 value
= fields
->f_dsp_40_s16
;
2980 case M32C_OPERAND_DSP_40_S8
:
2981 value
= fields
->f_dsp_40_s8
;
2983 case M32C_OPERAND_DSP_40_U16
:
2984 value
= fields
->f_dsp_40_u16
;
2986 case M32C_OPERAND_DSP_40_U24
:
2987 value
= fields
->f_dsp_40_u24
;
2989 case M32C_OPERAND_DSP_40_U8
:
2990 value
= fields
->f_dsp_40_u8
;
2992 case M32C_OPERAND_DSP_48_S16
:
2993 value
= fields
->f_dsp_48_s16
;
2995 case M32C_OPERAND_DSP_48_S8
:
2996 value
= fields
->f_dsp_48_s8
;
2998 case M32C_OPERAND_DSP_48_U16
:
2999 value
= fields
->f_dsp_48_u16
;
3001 case M32C_OPERAND_DSP_48_U24
:
3002 value
= fields
->f_dsp_48_u24
;
3004 case M32C_OPERAND_DSP_48_U8
:
3005 value
= fields
->f_dsp_48_u8
;
3007 case M32C_OPERAND_DSP_8_S24
:
3008 value
= fields
->f_dsp_8_s24
;
3010 case M32C_OPERAND_DSP_8_S8
:
3011 value
= fields
->f_dsp_8_s8
;
3013 case M32C_OPERAND_DSP_8_U16
:
3014 value
= fields
->f_dsp_8_u16
;
3016 case M32C_OPERAND_DSP_8_U24
:
3017 value
= fields
->f_dsp_8_u24
;
3019 case M32C_OPERAND_DSP_8_U6
:
3020 value
= fields
->f_dsp_8_u6
;
3022 case M32C_OPERAND_DSP_8_U8
:
3023 value
= fields
->f_dsp_8_u8
;
3025 case M32C_OPERAND_DST16AN
:
3026 value
= fields
->f_dst16_an
;
3028 case M32C_OPERAND_DST16AN_S
:
3029 value
= fields
->f_dst16_an_s
;
3031 case M32C_OPERAND_DST16ANHI
:
3032 value
= fields
->f_dst16_an
;
3034 case M32C_OPERAND_DST16ANQI
:
3035 value
= fields
->f_dst16_an
;
3037 case M32C_OPERAND_DST16ANQI_S
:
3038 value
= fields
->f_dst16_rn_QI_s
;
3040 case M32C_OPERAND_DST16ANSI
:
3041 value
= fields
->f_dst16_an
;
3043 case M32C_OPERAND_DST16RNEXTQI
:
3044 value
= fields
->f_dst16_rn_ext
;
3046 case M32C_OPERAND_DST16RNHI
:
3047 value
= fields
->f_dst16_rn
;
3049 case M32C_OPERAND_DST16RNQI
:
3050 value
= fields
->f_dst16_rn
;
3052 case M32C_OPERAND_DST16RNQI_S
:
3053 value
= fields
->f_dst16_rn_QI_s
;
3055 case M32C_OPERAND_DST16RNSI
:
3056 value
= fields
->f_dst16_rn
;
3058 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3059 value
= fields
->f_dst32_an_unprefixed
;
3061 case M32C_OPERAND_DST32ANPREFIXED
:
3062 value
= fields
->f_dst32_an_prefixed
;
3064 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3065 value
= fields
->f_dst32_an_prefixed
;
3067 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3068 value
= fields
->f_dst32_an_prefixed
;
3070 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3071 value
= fields
->f_dst32_an_prefixed
;
3073 case M32C_OPERAND_DST32ANUNPREFIXED
:
3074 value
= fields
->f_dst32_an_unprefixed
;
3076 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3077 value
= fields
->f_dst32_an_unprefixed
;
3079 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3080 value
= fields
->f_dst32_an_unprefixed
;
3082 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3083 value
= fields
->f_dst32_an_unprefixed
;
3085 case M32C_OPERAND_DST32R0HI_S
:
3088 case M32C_OPERAND_DST32R0QI_S
:
3091 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3092 value
= fields
->f_dst32_rn_ext_unprefixed
;
3094 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3095 value
= fields
->f_dst32_rn_ext_unprefixed
;
3097 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3098 value
= fields
->f_dst32_rn_prefixed_HI
;
3100 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3101 value
= fields
->f_dst32_rn_prefixed_QI
;
3103 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3104 value
= fields
->f_dst32_rn_prefixed_SI
;
3106 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3107 value
= fields
->f_dst32_rn_unprefixed_HI
;
3109 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3110 value
= fields
->f_dst32_rn_unprefixed_QI
;
3112 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3113 value
= fields
->f_dst32_rn_unprefixed_SI
;
3115 case M32C_OPERAND_G
:
3118 case M32C_OPERAND_IMM_12_S4
:
3119 value
= fields
->f_imm_12_s4
;
3121 case M32C_OPERAND_IMM_12_S4N
:
3122 value
= fields
->f_imm_12_s4
;
3124 case M32C_OPERAND_IMM_13_U3
:
3125 value
= fields
->f_imm_13_u3
;
3127 case M32C_OPERAND_IMM_16_HI
:
3128 value
= fields
->f_dsp_16_s16
;
3130 case M32C_OPERAND_IMM_16_QI
:
3131 value
= fields
->f_dsp_16_s8
;
3133 case M32C_OPERAND_IMM_16_SI
:
3134 value
= fields
->f_dsp_16_s32
;
3136 case M32C_OPERAND_IMM_20_S4
:
3137 value
= fields
->f_imm_20_s4
;
3139 case M32C_OPERAND_IMM_24_HI
:
3140 value
= fields
->f_dsp_24_s16
;
3142 case M32C_OPERAND_IMM_24_QI
:
3143 value
= fields
->f_dsp_24_s8
;
3145 case M32C_OPERAND_IMM_24_SI
:
3146 value
= fields
->f_dsp_24_s32
;
3148 case M32C_OPERAND_IMM_32_HI
:
3149 value
= fields
->f_dsp_32_s16
;
3151 case M32C_OPERAND_IMM_32_QI
:
3152 value
= fields
->f_dsp_32_s8
;
3154 case M32C_OPERAND_IMM_32_SI
:
3155 value
= fields
->f_dsp_32_s32
;
3157 case M32C_OPERAND_IMM_40_HI
:
3158 value
= fields
->f_dsp_40_s16
;
3160 case M32C_OPERAND_IMM_40_QI
:
3161 value
= fields
->f_dsp_40_s8
;
3163 case M32C_OPERAND_IMM_40_SI
:
3164 value
= fields
->f_dsp_40_s32
;
3166 case M32C_OPERAND_IMM_48_HI
:
3167 value
= fields
->f_dsp_48_s16
;
3169 case M32C_OPERAND_IMM_48_QI
:
3170 value
= fields
->f_dsp_48_s8
;
3172 case M32C_OPERAND_IMM_48_SI
:
3173 value
= fields
->f_dsp_48_s32
;
3175 case M32C_OPERAND_IMM_56_HI
:
3176 value
= fields
->f_dsp_56_s16
;
3178 case M32C_OPERAND_IMM_56_QI
:
3179 value
= fields
->f_dsp_56_s8
;
3181 case M32C_OPERAND_IMM_64_HI
:
3182 value
= fields
->f_dsp_64_s16
;
3184 case M32C_OPERAND_IMM_8_HI
:
3185 value
= fields
->f_dsp_8_s16
;
3187 case M32C_OPERAND_IMM_8_QI
:
3188 value
= fields
->f_dsp_8_s8
;
3190 case M32C_OPERAND_IMM_8_S4
:
3191 value
= fields
->f_imm_8_s4
;
3193 case M32C_OPERAND_IMM_8_S4N
:
3194 value
= fields
->f_imm_8_s4
;
3196 case M32C_OPERAND_IMM_SH_12_S4
:
3197 value
= fields
->f_imm_12_s4
;
3199 case M32C_OPERAND_IMM_SH_20_S4
:
3200 value
= fields
->f_imm_20_s4
;
3202 case M32C_OPERAND_IMM_SH_8_S4
:
3203 value
= fields
->f_imm_8_s4
;
3205 case M32C_OPERAND_IMM1_S
:
3206 value
= fields
->f_imm1_S
;
3208 case M32C_OPERAND_IMM3_S
:
3209 value
= fields
->f_imm3_S
;
3211 case M32C_OPERAND_LAB_16_8
:
3212 value
= fields
->f_lab_16_8
;
3214 case M32C_OPERAND_LAB_24_8
:
3215 value
= fields
->f_lab_24_8
;
3217 case M32C_OPERAND_LAB_32_8
:
3218 value
= fields
->f_lab_32_8
;
3220 case M32C_OPERAND_LAB_40_8
:
3221 value
= fields
->f_lab_40_8
;
3223 case M32C_OPERAND_LAB_5_3
:
3224 value
= fields
->f_lab_5_3
;
3226 case M32C_OPERAND_LAB_8_16
:
3227 value
= fields
->f_lab_8_16
;
3229 case M32C_OPERAND_LAB_8_24
:
3230 value
= fields
->f_lab_8_24
;
3232 case M32C_OPERAND_LAB_8_8
:
3233 value
= fields
->f_lab_8_8
;
3235 case M32C_OPERAND_LAB32_JMP_S
:
3236 value
= fields
->f_lab32_jmp_s
;
3238 case M32C_OPERAND_Q
:
3241 case M32C_OPERAND_R0
:
3244 case M32C_OPERAND_R0H
:
3247 case M32C_OPERAND_R0L
:
3250 case M32C_OPERAND_R1
:
3253 case M32C_OPERAND_R1R2R0
:
3256 case M32C_OPERAND_R2
:
3259 case M32C_OPERAND_R2R0
:
3262 case M32C_OPERAND_R3
:
3265 case M32C_OPERAND_R3R1
:
3268 case M32C_OPERAND_REGSETPOP
:
3269 value
= fields
->f_8_8
;
3271 case M32C_OPERAND_REGSETPUSH
:
3272 value
= fields
->f_8_8
;
3274 case M32C_OPERAND_RN16_PUSH_S
:
3275 value
= fields
->f_4_1
;
3277 case M32C_OPERAND_S
:
3280 case M32C_OPERAND_SRC16AN
:
3281 value
= fields
->f_src16_an
;
3283 case M32C_OPERAND_SRC16ANHI
:
3284 value
= fields
->f_src16_an
;
3286 case M32C_OPERAND_SRC16ANQI
:
3287 value
= fields
->f_src16_an
;
3289 case M32C_OPERAND_SRC16RNHI
:
3290 value
= fields
->f_src16_rn
;
3292 case M32C_OPERAND_SRC16RNQI
:
3293 value
= fields
->f_src16_rn
;
3295 case M32C_OPERAND_SRC32ANPREFIXED
:
3296 value
= fields
->f_src32_an_prefixed
;
3298 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3299 value
= fields
->f_src32_an_prefixed
;
3301 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3302 value
= fields
->f_src32_an_prefixed
;
3304 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3305 value
= fields
->f_src32_an_prefixed
;
3307 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3308 value
= fields
->f_src32_an_unprefixed
;
3310 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3311 value
= fields
->f_src32_an_unprefixed
;
3313 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3314 value
= fields
->f_src32_an_unprefixed
;
3316 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3317 value
= fields
->f_src32_an_unprefixed
;
3319 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3320 value
= fields
->f_src32_rn_prefixed_HI
;
3322 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3323 value
= fields
->f_src32_rn_prefixed_QI
;
3325 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3326 value
= fields
->f_src32_rn_prefixed_SI
;
3328 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3329 value
= fields
->f_src32_rn_unprefixed_HI
;
3331 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3332 value
= fields
->f_src32_rn_unprefixed_QI
;
3334 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3335 value
= fields
->f_src32_rn_unprefixed_SI
;
3337 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3338 value
= fields
->f_5_1
;
3340 case M32C_OPERAND_X
:
3343 case M32C_OPERAND_Z
:
3346 case M32C_OPERAND_COND16_16
:
3347 value
= fields
->f_dsp_16_u8
;
3349 case M32C_OPERAND_COND16_24
:
3350 value
= fields
->f_dsp_24_u8
;
3352 case M32C_OPERAND_COND16_32
:
3353 value
= fields
->f_dsp_32_u8
;
3355 case M32C_OPERAND_COND16C
:
3356 value
= fields
->f_cond16
;
3358 case M32C_OPERAND_COND16J
:
3359 value
= fields
->f_cond16
;
3361 case M32C_OPERAND_COND16J5
:
3362 value
= fields
->f_cond16j_5
;
3364 case M32C_OPERAND_COND32
:
3365 value
= fields
->f_cond32
;
3367 case M32C_OPERAND_COND32_16
:
3368 value
= fields
->f_dsp_16_u8
;
3370 case M32C_OPERAND_COND32_24
:
3371 value
= fields
->f_dsp_24_u8
;
3373 case M32C_OPERAND_COND32_32
:
3374 value
= fields
->f_dsp_32_u8
;
3376 case M32C_OPERAND_COND32_40
:
3377 value
= fields
->f_dsp_40_u8
;
3379 case M32C_OPERAND_COND32J
:
3380 value
= fields
->f_cond32j
;
3382 case M32C_OPERAND_CR1_PREFIXED_32
:
3383 value
= fields
->f_21_3
;
3385 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3386 value
= fields
->f_13_3
;
3388 case M32C_OPERAND_CR16
:
3389 value
= fields
->f_9_3
;
3391 case M32C_OPERAND_CR2_32
:
3392 value
= fields
->f_13_3
;
3394 case M32C_OPERAND_CR3_PREFIXED_32
:
3395 value
= fields
->f_21_3
;
3397 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3398 value
= fields
->f_13_3
;
3400 case M32C_OPERAND_FLAGS16
:
3401 value
= fields
->f_9_3
;
3403 case M32C_OPERAND_FLAGS32
:
3404 value
= fields
->f_13_3
;
3406 case M32C_OPERAND_SCCOND32
:
3407 value
= fields
->f_cond16
;
3409 case M32C_OPERAND_SIZE
:
3414 /* xgettext:c-format */
3415 fprintf (stderr
, _("Unrecognized field %d while getting int operand.\n"),
3424 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3426 const CGEN_FIELDS
* fields
)
3432 case M32C_OPERAND_A0
:
3435 case M32C_OPERAND_A1
:
3438 case M32C_OPERAND_AN16_PUSH_S
:
3439 value
= fields
->f_4_1
;
3441 case M32C_OPERAND_BIT16AN
:
3442 value
= fields
->f_dst16_an
;
3444 case M32C_OPERAND_BIT16RN
:
3445 value
= fields
->f_dst16_rn
;
3447 case M32C_OPERAND_BIT32ANPREFIXED
:
3448 value
= fields
->f_dst32_an_prefixed
;
3450 case M32C_OPERAND_BIT32ANUNPREFIXED
:
3451 value
= fields
->f_dst32_an_unprefixed
;
3453 case M32C_OPERAND_BIT32RNPREFIXED
:
3454 value
= fields
->f_dst32_rn_prefixed_QI
;
3456 case M32C_OPERAND_BIT32RNUNPREFIXED
:
3457 value
= fields
->f_dst32_rn_unprefixed_QI
;
3459 case M32C_OPERAND_BITBASE16_16_S8
:
3460 value
= fields
->f_dsp_16_s8
;
3462 case M32C_OPERAND_BITBASE16_16_U16
:
3463 value
= fields
->f_dsp_16_u16
;
3465 case M32C_OPERAND_BITBASE16_16_U8
:
3466 value
= fields
->f_dsp_16_u8
;
3468 case M32C_OPERAND_BITBASE16_8_U11_S
:
3469 value
= fields
->f_bitbase16_u11_S
;
3471 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
3472 value
= fields
->f_bitbase32_16_s11_unprefixed
;
3474 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
3475 value
= fields
->f_bitbase32_16_s19_unprefixed
;
3477 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
3478 value
= fields
->f_bitbase32_16_u11_unprefixed
;
3480 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
3481 value
= fields
->f_bitbase32_16_u19_unprefixed
;
3483 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
3484 value
= fields
->f_bitbase32_16_u27_unprefixed
;
3486 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
3487 value
= fields
->f_bitbase32_24_s11_prefixed
;
3489 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
3490 value
= fields
->f_bitbase32_24_s19_prefixed
;
3492 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
3493 value
= fields
->f_bitbase32_24_u11_prefixed
;
3495 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3496 value
= fields
->f_bitbase32_24_u19_prefixed
;
3498 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3499 value
= fields
->f_bitbase32_24_u27_prefixed
;
3501 case M32C_OPERAND_BITNO16R
:
3502 value
= fields
->f_dsp_16_u8
;
3504 case M32C_OPERAND_BITNO32PREFIXED
:
3505 value
= fields
->f_bitno32_prefixed
;
3507 case M32C_OPERAND_BITNO32UNPREFIXED
:
3508 value
= fields
->f_bitno32_unprefixed
;
3510 case M32C_OPERAND_DSP_10_U6
:
3511 value
= fields
->f_dsp_10_u6
;
3513 case M32C_OPERAND_DSP_16_S16
:
3514 value
= fields
->f_dsp_16_s16
;
3516 case M32C_OPERAND_DSP_16_S8
:
3517 value
= fields
->f_dsp_16_s8
;
3519 case M32C_OPERAND_DSP_16_U16
:
3520 value
= fields
->f_dsp_16_u16
;
3522 case M32C_OPERAND_DSP_16_U20
:
3523 value
= fields
->f_dsp_16_u24
;
3525 case M32C_OPERAND_DSP_16_U24
:
3526 value
= fields
->f_dsp_16_u24
;
3528 case M32C_OPERAND_DSP_16_U8
:
3529 value
= fields
->f_dsp_16_u8
;
3531 case M32C_OPERAND_DSP_24_S16
:
3532 value
= fields
->f_dsp_24_s16
;
3534 case M32C_OPERAND_DSP_24_S8
:
3535 value
= fields
->f_dsp_24_s8
;
3537 case M32C_OPERAND_DSP_24_U16
:
3538 value
= fields
->f_dsp_24_u16
;
3540 case M32C_OPERAND_DSP_24_U20
:
3541 value
= fields
->f_dsp_24_u24
;
3543 case M32C_OPERAND_DSP_24_U24
:
3544 value
= fields
->f_dsp_24_u24
;
3546 case M32C_OPERAND_DSP_24_U8
:
3547 value
= fields
->f_dsp_24_u8
;
3549 case M32C_OPERAND_DSP_32_S16
:
3550 value
= fields
->f_dsp_32_s16
;
3552 case M32C_OPERAND_DSP_32_S8
:
3553 value
= fields
->f_dsp_32_s8
;
3555 case M32C_OPERAND_DSP_32_U16
:
3556 value
= fields
->f_dsp_32_u16
;
3558 case M32C_OPERAND_DSP_32_U20
:
3559 value
= fields
->f_dsp_32_u24
;
3561 case M32C_OPERAND_DSP_32_U24
:
3562 value
= fields
->f_dsp_32_u24
;
3564 case M32C_OPERAND_DSP_32_U8
:
3565 value
= fields
->f_dsp_32_u8
;
3567 case M32C_OPERAND_DSP_40_S16
:
3568 value
= fields
->f_dsp_40_s16
;
3570 case M32C_OPERAND_DSP_40_S8
:
3571 value
= fields
->f_dsp_40_s8
;
3573 case M32C_OPERAND_DSP_40_U16
:
3574 value
= fields
->f_dsp_40_u16
;
3576 case M32C_OPERAND_DSP_40_U24
:
3577 value
= fields
->f_dsp_40_u24
;
3579 case M32C_OPERAND_DSP_40_U8
:
3580 value
= fields
->f_dsp_40_u8
;
3582 case M32C_OPERAND_DSP_48_S16
:
3583 value
= fields
->f_dsp_48_s16
;
3585 case M32C_OPERAND_DSP_48_S8
:
3586 value
= fields
->f_dsp_48_s8
;
3588 case M32C_OPERAND_DSP_48_U16
:
3589 value
= fields
->f_dsp_48_u16
;
3591 case M32C_OPERAND_DSP_48_U24
:
3592 value
= fields
->f_dsp_48_u24
;
3594 case M32C_OPERAND_DSP_48_U8
:
3595 value
= fields
->f_dsp_48_u8
;
3597 case M32C_OPERAND_DSP_8_S24
:
3598 value
= fields
->f_dsp_8_s24
;
3600 case M32C_OPERAND_DSP_8_S8
:
3601 value
= fields
->f_dsp_8_s8
;
3603 case M32C_OPERAND_DSP_8_U16
:
3604 value
= fields
->f_dsp_8_u16
;
3606 case M32C_OPERAND_DSP_8_U24
:
3607 value
= fields
->f_dsp_8_u24
;
3609 case M32C_OPERAND_DSP_8_U6
:
3610 value
= fields
->f_dsp_8_u6
;
3612 case M32C_OPERAND_DSP_8_U8
:
3613 value
= fields
->f_dsp_8_u8
;
3615 case M32C_OPERAND_DST16AN
:
3616 value
= fields
->f_dst16_an
;
3618 case M32C_OPERAND_DST16AN_S
:
3619 value
= fields
->f_dst16_an_s
;
3621 case M32C_OPERAND_DST16ANHI
:
3622 value
= fields
->f_dst16_an
;
3624 case M32C_OPERAND_DST16ANQI
:
3625 value
= fields
->f_dst16_an
;
3627 case M32C_OPERAND_DST16ANQI_S
:
3628 value
= fields
->f_dst16_rn_QI_s
;
3630 case M32C_OPERAND_DST16ANSI
:
3631 value
= fields
->f_dst16_an
;
3633 case M32C_OPERAND_DST16RNEXTQI
:
3634 value
= fields
->f_dst16_rn_ext
;
3636 case M32C_OPERAND_DST16RNHI
:
3637 value
= fields
->f_dst16_rn
;
3639 case M32C_OPERAND_DST16RNQI
:
3640 value
= fields
->f_dst16_rn
;
3642 case M32C_OPERAND_DST16RNQI_S
:
3643 value
= fields
->f_dst16_rn_QI_s
;
3645 case M32C_OPERAND_DST16RNSI
:
3646 value
= fields
->f_dst16_rn
;
3648 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3649 value
= fields
->f_dst32_an_unprefixed
;
3651 case M32C_OPERAND_DST32ANPREFIXED
:
3652 value
= fields
->f_dst32_an_prefixed
;
3654 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3655 value
= fields
->f_dst32_an_prefixed
;
3657 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3658 value
= fields
->f_dst32_an_prefixed
;
3660 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3661 value
= fields
->f_dst32_an_prefixed
;
3663 case M32C_OPERAND_DST32ANUNPREFIXED
:
3664 value
= fields
->f_dst32_an_unprefixed
;
3666 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3667 value
= fields
->f_dst32_an_unprefixed
;
3669 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3670 value
= fields
->f_dst32_an_unprefixed
;
3672 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3673 value
= fields
->f_dst32_an_unprefixed
;
3675 case M32C_OPERAND_DST32R0HI_S
:
3678 case M32C_OPERAND_DST32R0QI_S
:
3681 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3682 value
= fields
->f_dst32_rn_ext_unprefixed
;
3684 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3685 value
= fields
->f_dst32_rn_ext_unprefixed
;
3687 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3688 value
= fields
->f_dst32_rn_prefixed_HI
;
3690 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3691 value
= fields
->f_dst32_rn_prefixed_QI
;
3693 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3694 value
= fields
->f_dst32_rn_prefixed_SI
;
3696 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3697 value
= fields
->f_dst32_rn_unprefixed_HI
;
3699 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3700 value
= fields
->f_dst32_rn_unprefixed_QI
;
3702 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3703 value
= fields
->f_dst32_rn_unprefixed_SI
;
3705 case M32C_OPERAND_G
:
3708 case M32C_OPERAND_IMM_12_S4
:
3709 value
= fields
->f_imm_12_s4
;
3711 case M32C_OPERAND_IMM_12_S4N
:
3712 value
= fields
->f_imm_12_s4
;
3714 case M32C_OPERAND_IMM_13_U3
:
3715 value
= fields
->f_imm_13_u3
;
3717 case M32C_OPERAND_IMM_16_HI
:
3718 value
= fields
->f_dsp_16_s16
;
3720 case M32C_OPERAND_IMM_16_QI
:
3721 value
= fields
->f_dsp_16_s8
;
3723 case M32C_OPERAND_IMM_16_SI
:
3724 value
= fields
->f_dsp_16_s32
;
3726 case M32C_OPERAND_IMM_20_S4
:
3727 value
= fields
->f_imm_20_s4
;
3729 case M32C_OPERAND_IMM_24_HI
:
3730 value
= fields
->f_dsp_24_s16
;
3732 case M32C_OPERAND_IMM_24_QI
:
3733 value
= fields
->f_dsp_24_s8
;
3735 case M32C_OPERAND_IMM_24_SI
:
3736 value
= fields
->f_dsp_24_s32
;
3738 case M32C_OPERAND_IMM_32_HI
:
3739 value
= fields
->f_dsp_32_s16
;
3741 case M32C_OPERAND_IMM_32_QI
:
3742 value
= fields
->f_dsp_32_s8
;
3744 case M32C_OPERAND_IMM_32_SI
:
3745 value
= fields
->f_dsp_32_s32
;
3747 case M32C_OPERAND_IMM_40_HI
:
3748 value
= fields
->f_dsp_40_s16
;
3750 case M32C_OPERAND_IMM_40_QI
:
3751 value
= fields
->f_dsp_40_s8
;
3753 case M32C_OPERAND_IMM_40_SI
:
3754 value
= fields
->f_dsp_40_s32
;
3756 case M32C_OPERAND_IMM_48_HI
:
3757 value
= fields
->f_dsp_48_s16
;
3759 case M32C_OPERAND_IMM_48_QI
:
3760 value
= fields
->f_dsp_48_s8
;
3762 case M32C_OPERAND_IMM_48_SI
:
3763 value
= fields
->f_dsp_48_s32
;
3765 case M32C_OPERAND_IMM_56_HI
:
3766 value
= fields
->f_dsp_56_s16
;
3768 case M32C_OPERAND_IMM_56_QI
:
3769 value
= fields
->f_dsp_56_s8
;
3771 case M32C_OPERAND_IMM_64_HI
:
3772 value
= fields
->f_dsp_64_s16
;
3774 case M32C_OPERAND_IMM_8_HI
:
3775 value
= fields
->f_dsp_8_s16
;
3777 case M32C_OPERAND_IMM_8_QI
:
3778 value
= fields
->f_dsp_8_s8
;
3780 case M32C_OPERAND_IMM_8_S4
:
3781 value
= fields
->f_imm_8_s4
;
3783 case M32C_OPERAND_IMM_8_S4N
:
3784 value
= fields
->f_imm_8_s4
;
3786 case M32C_OPERAND_IMM_SH_12_S4
:
3787 value
= fields
->f_imm_12_s4
;
3789 case M32C_OPERAND_IMM_SH_20_S4
:
3790 value
= fields
->f_imm_20_s4
;
3792 case M32C_OPERAND_IMM_SH_8_S4
:
3793 value
= fields
->f_imm_8_s4
;
3795 case M32C_OPERAND_IMM1_S
:
3796 value
= fields
->f_imm1_S
;
3798 case M32C_OPERAND_IMM3_S
:
3799 value
= fields
->f_imm3_S
;
3801 case M32C_OPERAND_LAB_16_8
:
3802 value
= fields
->f_lab_16_8
;
3804 case M32C_OPERAND_LAB_24_8
:
3805 value
= fields
->f_lab_24_8
;
3807 case M32C_OPERAND_LAB_32_8
:
3808 value
= fields
->f_lab_32_8
;
3810 case M32C_OPERAND_LAB_40_8
:
3811 value
= fields
->f_lab_40_8
;
3813 case M32C_OPERAND_LAB_5_3
:
3814 value
= fields
->f_lab_5_3
;
3816 case M32C_OPERAND_LAB_8_16
:
3817 value
= fields
->f_lab_8_16
;
3819 case M32C_OPERAND_LAB_8_24
:
3820 value
= fields
->f_lab_8_24
;
3822 case M32C_OPERAND_LAB_8_8
:
3823 value
= fields
->f_lab_8_8
;
3825 case M32C_OPERAND_LAB32_JMP_S
:
3826 value
= fields
->f_lab32_jmp_s
;
3828 case M32C_OPERAND_Q
:
3831 case M32C_OPERAND_R0
:
3834 case M32C_OPERAND_R0H
:
3837 case M32C_OPERAND_R0L
:
3840 case M32C_OPERAND_R1
:
3843 case M32C_OPERAND_R1R2R0
:
3846 case M32C_OPERAND_R2
:
3849 case M32C_OPERAND_R2R0
:
3852 case M32C_OPERAND_R3
:
3855 case M32C_OPERAND_R3R1
:
3858 case M32C_OPERAND_REGSETPOP
:
3859 value
= fields
->f_8_8
;
3861 case M32C_OPERAND_REGSETPUSH
:
3862 value
= fields
->f_8_8
;
3864 case M32C_OPERAND_RN16_PUSH_S
:
3865 value
= fields
->f_4_1
;
3867 case M32C_OPERAND_S
:
3870 case M32C_OPERAND_SRC16AN
:
3871 value
= fields
->f_src16_an
;
3873 case M32C_OPERAND_SRC16ANHI
:
3874 value
= fields
->f_src16_an
;
3876 case M32C_OPERAND_SRC16ANQI
:
3877 value
= fields
->f_src16_an
;
3879 case M32C_OPERAND_SRC16RNHI
:
3880 value
= fields
->f_src16_rn
;
3882 case M32C_OPERAND_SRC16RNQI
:
3883 value
= fields
->f_src16_rn
;
3885 case M32C_OPERAND_SRC32ANPREFIXED
:
3886 value
= fields
->f_src32_an_prefixed
;
3888 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3889 value
= fields
->f_src32_an_prefixed
;
3891 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3892 value
= fields
->f_src32_an_prefixed
;
3894 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3895 value
= fields
->f_src32_an_prefixed
;
3897 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3898 value
= fields
->f_src32_an_unprefixed
;
3900 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3901 value
= fields
->f_src32_an_unprefixed
;
3903 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3904 value
= fields
->f_src32_an_unprefixed
;
3906 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3907 value
= fields
->f_src32_an_unprefixed
;
3909 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3910 value
= fields
->f_src32_rn_prefixed_HI
;
3912 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3913 value
= fields
->f_src32_rn_prefixed_QI
;
3915 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3916 value
= fields
->f_src32_rn_prefixed_SI
;
3918 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3919 value
= fields
->f_src32_rn_unprefixed_HI
;
3921 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3922 value
= fields
->f_src32_rn_unprefixed_QI
;
3924 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3925 value
= fields
->f_src32_rn_unprefixed_SI
;
3927 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3928 value
= fields
->f_5_1
;
3930 case M32C_OPERAND_X
:
3933 case M32C_OPERAND_Z
:
3936 case M32C_OPERAND_COND16_16
:
3937 value
= fields
->f_dsp_16_u8
;
3939 case M32C_OPERAND_COND16_24
:
3940 value
= fields
->f_dsp_24_u8
;
3942 case M32C_OPERAND_COND16_32
:
3943 value
= fields
->f_dsp_32_u8
;
3945 case M32C_OPERAND_COND16C
:
3946 value
= fields
->f_cond16
;
3948 case M32C_OPERAND_COND16J
:
3949 value
= fields
->f_cond16
;
3951 case M32C_OPERAND_COND16J5
:
3952 value
= fields
->f_cond16j_5
;
3954 case M32C_OPERAND_COND32
:
3955 value
= fields
->f_cond32
;
3957 case M32C_OPERAND_COND32_16
:
3958 value
= fields
->f_dsp_16_u8
;
3960 case M32C_OPERAND_COND32_24
:
3961 value
= fields
->f_dsp_24_u8
;
3963 case M32C_OPERAND_COND32_32
:
3964 value
= fields
->f_dsp_32_u8
;
3966 case M32C_OPERAND_COND32_40
:
3967 value
= fields
->f_dsp_40_u8
;
3969 case M32C_OPERAND_COND32J
:
3970 value
= fields
->f_cond32j
;
3972 case M32C_OPERAND_CR1_PREFIXED_32
:
3973 value
= fields
->f_21_3
;
3975 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3976 value
= fields
->f_13_3
;
3978 case M32C_OPERAND_CR16
:
3979 value
= fields
->f_9_3
;
3981 case M32C_OPERAND_CR2_32
:
3982 value
= fields
->f_13_3
;
3984 case M32C_OPERAND_CR3_PREFIXED_32
:
3985 value
= fields
->f_21_3
;
3987 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3988 value
= fields
->f_13_3
;
3990 case M32C_OPERAND_FLAGS16
:
3991 value
= fields
->f_9_3
;
3993 case M32C_OPERAND_FLAGS32
:
3994 value
= fields
->f_13_3
;
3996 case M32C_OPERAND_SCCOND32
:
3997 value
= fields
->f_cond16
;
3999 case M32C_OPERAND_SIZE
:
4004 /* xgettext:c-format */
4005 fprintf (stderr
, _("Unrecognized field %d while getting vma operand.\n"),
4013 void m32c_cgen_set_int_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, int);
4014 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, bfd_vma
);
4016 /* Stuffing values in cgen_fields is handled by a collection of functions.
4017 They are distinguished by the type of the VALUE argument they accept.
4018 TODO: floating point, inlining support, remove cases where argument type
4022 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4024 CGEN_FIELDS
* fields
,
4029 case M32C_OPERAND_A0
:
4031 case M32C_OPERAND_A1
:
4033 case M32C_OPERAND_AN16_PUSH_S
:
4034 fields
->f_4_1
= value
;
4036 case M32C_OPERAND_BIT16AN
:
4037 fields
->f_dst16_an
= value
;
4039 case M32C_OPERAND_BIT16RN
:
4040 fields
->f_dst16_rn
= value
;
4042 case M32C_OPERAND_BIT32ANPREFIXED
:
4043 fields
->f_dst32_an_prefixed
= value
;
4045 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4046 fields
->f_dst32_an_unprefixed
= value
;
4048 case M32C_OPERAND_BIT32RNPREFIXED
:
4049 fields
->f_dst32_rn_prefixed_QI
= value
;
4051 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4052 fields
->f_dst32_rn_unprefixed_QI
= value
;
4054 case M32C_OPERAND_BITBASE16_16_S8
:
4055 fields
->f_dsp_16_s8
= value
;
4057 case M32C_OPERAND_BITBASE16_16_U16
:
4058 fields
->f_dsp_16_u16
= value
;
4060 case M32C_OPERAND_BITBASE16_16_U8
:
4061 fields
->f_dsp_16_u8
= value
;
4063 case M32C_OPERAND_BITBASE16_8_U11_S
:
4064 fields
->f_bitbase16_u11_S
= value
;
4066 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4067 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4069 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4070 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4072 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4073 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4075 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4076 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4078 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4079 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4081 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4082 fields
->f_bitbase32_24_s11_prefixed
= value
;
4084 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4085 fields
->f_bitbase32_24_s19_prefixed
= value
;
4087 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4088 fields
->f_bitbase32_24_u11_prefixed
= value
;
4090 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4091 fields
->f_bitbase32_24_u19_prefixed
= value
;
4093 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4094 fields
->f_bitbase32_24_u27_prefixed
= value
;
4096 case M32C_OPERAND_BITNO16R
:
4097 fields
->f_dsp_16_u8
= value
;
4099 case M32C_OPERAND_BITNO32PREFIXED
:
4100 fields
->f_bitno32_prefixed
= value
;
4102 case M32C_OPERAND_BITNO32UNPREFIXED
:
4103 fields
->f_bitno32_unprefixed
= value
;
4105 case M32C_OPERAND_DSP_10_U6
:
4106 fields
->f_dsp_10_u6
= value
;
4108 case M32C_OPERAND_DSP_16_S16
:
4109 fields
->f_dsp_16_s16
= value
;
4111 case M32C_OPERAND_DSP_16_S8
:
4112 fields
->f_dsp_16_s8
= value
;
4114 case M32C_OPERAND_DSP_16_U16
:
4115 fields
->f_dsp_16_u16
= value
;
4117 case M32C_OPERAND_DSP_16_U20
:
4118 fields
->f_dsp_16_u24
= value
;
4120 case M32C_OPERAND_DSP_16_U24
:
4121 fields
->f_dsp_16_u24
= value
;
4123 case M32C_OPERAND_DSP_16_U8
:
4124 fields
->f_dsp_16_u8
= value
;
4126 case M32C_OPERAND_DSP_24_S16
:
4127 fields
->f_dsp_24_s16
= value
;
4129 case M32C_OPERAND_DSP_24_S8
:
4130 fields
->f_dsp_24_s8
= value
;
4132 case M32C_OPERAND_DSP_24_U16
:
4133 fields
->f_dsp_24_u16
= value
;
4135 case M32C_OPERAND_DSP_24_U20
:
4136 fields
->f_dsp_24_u24
= value
;
4138 case M32C_OPERAND_DSP_24_U24
:
4139 fields
->f_dsp_24_u24
= value
;
4141 case M32C_OPERAND_DSP_24_U8
:
4142 fields
->f_dsp_24_u8
= value
;
4144 case M32C_OPERAND_DSP_32_S16
:
4145 fields
->f_dsp_32_s16
= value
;
4147 case M32C_OPERAND_DSP_32_S8
:
4148 fields
->f_dsp_32_s8
= value
;
4150 case M32C_OPERAND_DSP_32_U16
:
4151 fields
->f_dsp_32_u16
= value
;
4153 case M32C_OPERAND_DSP_32_U20
:
4154 fields
->f_dsp_32_u24
= value
;
4156 case M32C_OPERAND_DSP_32_U24
:
4157 fields
->f_dsp_32_u24
= value
;
4159 case M32C_OPERAND_DSP_32_U8
:
4160 fields
->f_dsp_32_u8
= value
;
4162 case M32C_OPERAND_DSP_40_S16
:
4163 fields
->f_dsp_40_s16
= value
;
4165 case M32C_OPERAND_DSP_40_S8
:
4166 fields
->f_dsp_40_s8
= value
;
4168 case M32C_OPERAND_DSP_40_U16
:
4169 fields
->f_dsp_40_u16
= value
;
4171 case M32C_OPERAND_DSP_40_U24
:
4172 fields
->f_dsp_40_u24
= value
;
4174 case M32C_OPERAND_DSP_40_U8
:
4175 fields
->f_dsp_40_u8
= value
;
4177 case M32C_OPERAND_DSP_48_S16
:
4178 fields
->f_dsp_48_s16
= value
;
4180 case M32C_OPERAND_DSP_48_S8
:
4181 fields
->f_dsp_48_s8
= value
;
4183 case M32C_OPERAND_DSP_48_U16
:
4184 fields
->f_dsp_48_u16
= value
;
4186 case M32C_OPERAND_DSP_48_U24
:
4187 fields
->f_dsp_48_u24
= value
;
4189 case M32C_OPERAND_DSP_48_U8
:
4190 fields
->f_dsp_48_u8
= value
;
4192 case M32C_OPERAND_DSP_8_S24
:
4193 fields
->f_dsp_8_s24
= value
;
4195 case M32C_OPERAND_DSP_8_S8
:
4196 fields
->f_dsp_8_s8
= value
;
4198 case M32C_OPERAND_DSP_8_U16
:
4199 fields
->f_dsp_8_u16
= value
;
4201 case M32C_OPERAND_DSP_8_U24
:
4202 fields
->f_dsp_8_u24
= value
;
4204 case M32C_OPERAND_DSP_8_U6
:
4205 fields
->f_dsp_8_u6
= value
;
4207 case M32C_OPERAND_DSP_8_U8
:
4208 fields
->f_dsp_8_u8
= value
;
4210 case M32C_OPERAND_DST16AN
:
4211 fields
->f_dst16_an
= value
;
4213 case M32C_OPERAND_DST16AN_S
:
4214 fields
->f_dst16_an_s
= value
;
4216 case M32C_OPERAND_DST16ANHI
:
4217 fields
->f_dst16_an
= value
;
4219 case M32C_OPERAND_DST16ANQI
:
4220 fields
->f_dst16_an
= value
;
4222 case M32C_OPERAND_DST16ANQI_S
:
4223 fields
->f_dst16_rn_QI_s
= value
;
4225 case M32C_OPERAND_DST16ANSI
:
4226 fields
->f_dst16_an
= value
;
4228 case M32C_OPERAND_DST16RNEXTQI
:
4229 fields
->f_dst16_rn_ext
= value
;
4231 case M32C_OPERAND_DST16RNHI
:
4232 fields
->f_dst16_rn
= value
;
4234 case M32C_OPERAND_DST16RNQI
:
4235 fields
->f_dst16_rn
= value
;
4237 case M32C_OPERAND_DST16RNQI_S
:
4238 fields
->f_dst16_rn_QI_s
= value
;
4240 case M32C_OPERAND_DST16RNSI
:
4241 fields
->f_dst16_rn
= value
;
4243 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4244 fields
->f_dst32_an_unprefixed
= value
;
4246 case M32C_OPERAND_DST32ANPREFIXED
:
4247 fields
->f_dst32_an_prefixed
= value
;
4249 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4250 fields
->f_dst32_an_prefixed
= value
;
4252 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4253 fields
->f_dst32_an_prefixed
= value
;
4255 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4256 fields
->f_dst32_an_prefixed
= value
;
4258 case M32C_OPERAND_DST32ANUNPREFIXED
:
4259 fields
->f_dst32_an_unprefixed
= value
;
4261 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4262 fields
->f_dst32_an_unprefixed
= value
;
4264 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4265 fields
->f_dst32_an_unprefixed
= value
;
4267 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4268 fields
->f_dst32_an_unprefixed
= value
;
4270 case M32C_OPERAND_DST32R0HI_S
:
4272 case M32C_OPERAND_DST32R0QI_S
:
4274 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4275 fields
->f_dst32_rn_ext_unprefixed
= value
;
4277 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4278 fields
->f_dst32_rn_ext_unprefixed
= value
;
4280 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4281 fields
->f_dst32_rn_prefixed_HI
= value
;
4283 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4284 fields
->f_dst32_rn_prefixed_QI
= value
;
4286 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4287 fields
->f_dst32_rn_prefixed_SI
= value
;
4289 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4290 fields
->f_dst32_rn_unprefixed_HI
= value
;
4292 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4293 fields
->f_dst32_rn_unprefixed_QI
= value
;
4295 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4296 fields
->f_dst32_rn_unprefixed_SI
= value
;
4298 case M32C_OPERAND_G
:
4300 case M32C_OPERAND_IMM_12_S4
:
4301 fields
->f_imm_12_s4
= value
;
4303 case M32C_OPERAND_IMM_12_S4N
:
4304 fields
->f_imm_12_s4
= value
;
4306 case M32C_OPERAND_IMM_13_U3
:
4307 fields
->f_imm_13_u3
= value
;
4309 case M32C_OPERAND_IMM_16_HI
:
4310 fields
->f_dsp_16_s16
= value
;
4312 case M32C_OPERAND_IMM_16_QI
:
4313 fields
->f_dsp_16_s8
= value
;
4315 case M32C_OPERAND_IMM_16_SI
:
4316 fields
->f_dsp_16_s32
= value
;
4318 case M32C_OPERAND_IMM_20_S4
:
4319 fields
->f_imm_20_s4
= value
;
4321 case M32C_OPERAND_IMM_24_HI
:
4322 fields
->f_dsp_24_s16
= value
;
4324 case M32C_OPERAND_IMM_24_QI
:
4325 fields
->f_dsp_24_s8
= value
;
4327 case M32C_OPERAND_IMM_24_SI
:
4328 fields
->f_dsp_24_s32
= value
;
4330 case M32C_OPERAND_IMM_32_HI
:
4331 fields
->f_dsp_32_s16
= value
;
4333 case M32C_OPERAND_IMM_32_QI
:
4334 fields
->f_dsp_32_s8
= value
;
4336 case M32C_OPERAND_IMM_32_SI
:
4337 fields
->f_dsp_32_s32
= value
;
4339 case M32C_OPERAND_IMM_40_HI
:
4340 fields
->f_dsp_40_s16
= value
;
4342 case M32C_OPERAND_IMM_40_QI
:
4343 fields
->f_dsp_40_s8
= value
;
4345 case M32C_OPERAND_IMM_40_SI
:
4346 fields
->f_dsp_40_s32
= value
;
4348 case M32C_OPERAND_IMM_48_HI
:
4349 fields
->f_dsp_48_s16
= value
;
4351 case M32C_OPERAND_IMM_48_QI
:
4352 fields
->f_dsp_48_s8
= value
;
4354 case M32C_OPERAND_IMM_48_SI
:
4355 fields
->f_dsp_48_s32
= value
;
4357 case M32C_OPERAND_IMM_56_HI
:
4358 fields
->f_dsp_56_s16
= value
;
4360 case M32C_OPERAND_IMM_56_QI
:
4361 fields
->f_dsp_56_s8
= value
;
4363 case M32C_OPERAND_IMM_64_HI
:
4364 fields
->f_dsp_64_s16
= value
;
4366 case M32C_OPERAND_IMM_8_HI
:
4367 fields
->f_dsp_8_s16
= value
;
4369 case M32C_OPERAND_IMM_8_QI
:
4370 fields
->f_dsp_8_s8
= value
;
4372 case M32C_OPERAND_IMM_8_S4
:
4373 fields
->f_imm_8_s4
= value
;
4375 case M32C_OPERAND_IMM_8_S4N
:
4376 fields
->f_imm_8_s4
= value
;
4378 case M32C_OPERAND_IMM_SH_12_S4
:
4379 fields
->f_imm_12_s4
= value
;
4381 case M32C_OPERAND_IMM_SH_20_S4
:
4382 fields
->f_imm_20_s4
= value
;
4384 case M32C_OPERAND_IMM_SH_8_S4
:
4385 fields
->f_imm_8_s4
= value
;
4387 case M32C_OPERAND_IMM1_S
:
4388 fields
->f_imm1_S
= value
;
4390 case M32C_OPERAND_IMM3_S
:
4391 fields
->f_imm3_S
= value
;
4393 case M32C_OPERAND_LAB_16_8
:
4394 fields
->f_lab_16_8
= value
;
4396 case M32C_OPERAND_LAB_24_8
:
4397 fields
->f_lab_24_8
= value
;
4399 case M32C_OPERAND_LAB_32_8
:
4400 fields
->f_lab_32_8
= value
;
4402 case M32C_OPERAND_LAB_40_8
:
4403 fields
->f_lab_40_8
= value
;
4405 case M32C_OPERAND_LAB_5_3
:
4406 fields
->f_lab_5_3
= value
;
4408 case M32C_OPERAND_LAB_8_16
:
4409 fields
->f_lab_8_16
= value
;
4411 case M32C_OPERAND_LAB_8_24
:
4412 fields
->f_lab_8_24
= value
;
4414 case M32C_OPERAND_LAB_8_8
:
4415 fields
->f_lab_8_8
= value
;
4417 case M32C_OPERAND_LAB32_JMP_S
:
4418 fields
->f_lab32_jmp_s
= value
;
4420 case M32C_OPERAND_Q
:
4422 case M32C_OPERAND_R0
:
4424 case M32C_OPERAND_R0H
:
4426 case M32C_OPERAND_R0L
:
4428 case M32C_OPERAND_R1
:
4430 case M32C_OPERAND_R1R2R0
:
4432 case M32C_OPERAND_R2
:
4434 case M32C_OPERAND_R2R0
:
4436 case M32C_OPERAND_R3
:
4438 case M32C_OPERAND_R3R1
:
4440 case M32C_OPERAND_REGSETPOP
:
4441 fields
->f_8_8
= value
;
4443 case M32C_OPERAND_REGSETPUSH
:
4444 fields
->f_8_8
= value
;
4446 case M32C_OPERAND_RN16_PUSH_S
:
4447 fields
->f_4_1
= value
;
4449 case M32C_OPERAND_S
:
4451 case M32C_OPERAND_SRC16AN
:
4452 fields
->f_src16_an
= value
;
4454 case M32C_OPERAND_SRC16ANHI
:
4455 fields
->f_src16_an
= value
;
4457 case M32C_OPERAND_SRC16ANQI
:
4458 fields
->f_src16_an
= value
;
4460 case M32C_OPERAND_SRC16RNHI
:
4461 fields
->f_src16_rn
= value
;
4463 case M32C_OPERAND_SRC16RNQI
:
4464 fields
->f_src16_rn
= value
;
4466 case M32C_OPERAND_SRC32ANPREFIXED
:
4467 fields
->f_src32_an_prefixed
= value
;
4469 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4470 fields
->f_src32_an_prefixed
= value
;
4472 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4473 fields
->f_src32_an_prefixed
= value
;
4475 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4476 fields
->f_src32_an_prefixed
= value
;
4478 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4479 fields
->f_src32_an_unprefixed
= value
;
4481 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4482 fields
->f_src32_an_unprefixed
= value
;
4484 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4485 fields
->f_src32_an_unprefixed
= value
;
4487 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4488 fields
->f_src32_an_unprefixed
= value
;
4490 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4491 fields
->f_src32_rn_prefixed_HI
= value
;
4493 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4494 fields
->f_src32_rn_prefixed_QI
= value
;
4496 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4497 fields
->f_src32_rn_prefixed_SI
= value
;
4499 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4500 fields
->f_src32_rn_unprefixed_HI
= value
;
4502 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4503 fields
->f_src32_rn_unprefixed_QI
= value
;
4505 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4506 fields
->f_src32_rn_unprefixed_SI
= value
;
4508 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4509 fields
->f_5_1
= value
;
4511 case M32C_OPERAND_X
:
4513 case M32C_OPERAND_Z
:
4515 case M32C_OPERAND_COND16_16
:
4516 fields
->f_dsp_16_u8
= value
;
4518 case M32C_OPERAND_COND16_24
:
4519 fields
->f_dsp_24_u8
= value
;
4521 case M32C_OPERAND_COND16_32
:
4522 fields
->f_dsp_32_u8
= value
;
4524 case M32C_OPERAND_COND16C
:
4525 fields
->f_cond16
= value
;
4527 case M32C_OPERAND_COND16J
:
4528 fields
->f_cond16
= value
;
4530 case M32C_OPERAND_COND16J5
:
4531 fields
->f_cond16j_5
= value
;
4533 case M32C_OPERAND_COND32
:
4534 fields
->f_cond32
= value
;
4536 case M32C_OPERAND_COND32_16
:
4537 fields
->f_dsp_16_u8
= value
;
4539 case M32C_OPERAND_COND32_24
:
4540 fields
->f_dsp_24_u8
= value
;
4542 case M32C_OPERAND_COND32_32
:
4543 fields
->f_dsp_32_u8
= value
;
4545 case M32C_OPERAND_COND32_40
:
4546 fields
->f_dsp_40_u8
= value
;
4548 case M32C_OPERAND_COND32J
:
4549 fields
->f_cond32j
= value
;
4551 case M32C_OPERAND_CR1_PREFIXED_32
:
4552 fields
->f_21_3
= value
;
4554 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4555 fields
->f_13_3
= value
;
4557 case M32C_OPERAND_CR16
:
4558 fields
->f_9_3
= value
;
4560 case M32C_OPERAND_CR2_32
:
4561 fields
->f_13_3
= value
;
4563 case M32C_OPERAND_CR3_PREFIXED_32
:
4564 fields
->f_21_3
= value
;
4566 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4567 fields
->f_13_3
= value
;
4569 case M32C_OPERAND_FLAGS16
:
4570 fields
->f_9_3
= value
;
4572 case M32C_OPERAND_FLAGS32
:
4573 fields
->f_13_3
= value
;
4575 case M32C_OPERAND_SCCOND32
:
4576 fields
->f_cond16
= value
;
4578 case M32C_OPERAND_SIZE
:
4582 /* xgettext:c-format */
4583 fprintf (stderr
, _("Unrecognized field %d while setting int operand.\n"),
4590 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4592 CGEN_FIELDS
* fields
,
4597 case M32C_OPERAND_A0
:
4599 case M32C_OPERAND_A1
:
4601 case M32C_OPERAND_AN16_PUSH_S
:
4602 fields
->f_4_1
= value
;
4604 case M32C_OPERAND_BIT16AN
:
4605 fields
->f_dst16_an
= value
;
4607 case M32C_OPERAND_BIT16RN
:
4608 fields
->f_dst16_rn
= value
;
4610 case M32C_OPERAND_BIT32ANPREFIXED
:
4611 fields
->f_dst32_an_prefixed
= value
;
4613 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4614 fields
->f_dst32_an_unprefixed
= value
;
4616 case M32C_OPERAND_BIT32RNPREFIXED
:
4617 fields
->f_dst32_rn_prefixed_QI
= value
;
4619 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4620 fields
->f_dst32_rn_unprefixed_QI
= value
;
4622 case M32C_OPERAND_BITBASE16_16_S8
:
4623 fields
->f_dsp_16_s8
= value
;
4625 case M32C_OPERAND_BITBASE16_16_U16
:
4626 fields
->f_dsp_16_u16
= value
;
4628 case M32C_OPERAND_BITBASE16_16_U8
:
4629 fields
->f_dsp_16_u8
= value
;
4631 case M32C_OPERAND_BITBASE16_8_U11_S
:
4632 fields
->f_bitbase16_u11_S
= value
;
4634 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4635 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4637 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4638 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4640 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4641 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4643 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4644 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4646 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4647 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4649 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4650 fields
->f_bitbase32_24_s11_prefixed
= value
;
4652 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4653 fields
->f_bitbase32_24_s19_prefixed
= value
;
4655 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4656 fields
->f_bitbase32_24_u11_prefixed
= value
;
4658 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4659 fields
->f_bitbase32_24_u19_prefixed
= value
;
4661 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4662 fields
->f_bitbase32_24_u27_prefixed
= value
;
4664 case M32C_OPERAND_BITNO16R
:
4665 fields
->f_dsp_16_u8
= value
;
4667 case M32C_OPERAND_BITNO32PREFIXED
:
4668 fields
->f_bitno32_prefixed
= value
;
4670 case M32C_OPERAND_BITNO32UNPREFIXED
:
4671 fields
->f_bitno32_unprefixed
= value
;
4673 case M32C_OPERAND_DSP_10_U6
:
4674 fields
->f_dsp_10_u6
= value
;
4676 case M32C_OPERAND_DSP_16_S16
:
4677 fields
->f_dsp_16_s16
= value
;
4679 case M32C_OPERAND_DSP_16_S8
:
4680 fields
->f_dsp_16_s8
= value
;
4682 case M32C_OPERAND_DSP_16_U16
:
4683 fields
->f_dsp_16_u16
= value
;
4685 case M32C_OPERAND_DSP_16_U20
:
4686 fields
->f_dsp_16_u24
= value
;
4688 case M32C_OPERAND_DSP_16_U24
:
4689 fields
->f_dsp_16_u24
= value
;
4691 case M32C_OPERAND_DSP_16_U8
:
4692 fields
->f_dsp_16_u8
= value
;
4694 case M32C_OPERAND_DSP_24_S16
:
4695 fields
->f_dsp_24_s16
= value
;
4697 case M32C_OPERAND_DSP_24_S8
:
4698 fields
->f_dsp_24_s8
= value
;
4700 case M32C_OPERAND_DSP_24_U16
:
4701 fields
->f_dsp_24_u16
= value
;
4703 case M32C_OPERAND_DSP_24_U20
:
4704 fields
->f_dsp_24_u24
= value
;
4706 case M32C_OPERAND_DSP_24_U24
:
4707 fields
->f_dsp_24_u24
= value
;
4709 case M32C_OPERAND_DSP_24_U8
:
4710 fields
->f_dsp_24_u8
= value
;
4712 case M32C_OPERAND_DSP_32_S16
:
4713 fields
->f_dsp_32_s16
= value
;
4715 case M32C_OPERAND_DSP_32_S8
:
4716 fields
->f_dsp_32_s8
= value
;
4718 case M32C_OPERAND_DSP_32_U16
:
4719 fields
->f_dsp_32_u16
= value
;
4721 case M32C_OPERAND_DSP_32_U20
:
4722 fields
->f_dsp_32_u24
= value
;
4724 case M32C_OPERAND_DSP_32_U24
:
4725 fields
->f_dsp_32_u24
= value
;
4727 case M32C_OPERAND_DSP_32_U8
:
4728 fields
->f_dsp_32_u8
= value
;
4730 case M32C_OPERAND_DSP_40_S16
:
4731 fields
->f_dsp_40_s16
= value
;
4733 case M32C_OPERAND_DSP_40_S8
:
4734 fields
->f_dsp_40_s8
= value
;
4736 case M32C_OPERAND_DSP_40_U16
:
4737 fields
->f_dsp_40_u16
= value
;
4739 case M32C_OPERAND_DSP_40_U24
:
4740 fields
->f_dsp_40_u24
= value
;
4742 case M32C_OPERAND_DSP_40_U8
:
4743 fields
->f_dsp_40_u8
= value
;
4745 case M32C_OPERAND_DSP_48_S16
:
4746 fields
->f_dsp_48_s16
= value
;
4748 case M32C_OPERAND_DSP_48_S8
:
4749 fields
->f_dsp_48_s8
= value
;
4751 case M32C_OPERAND_DSP_48_U16
:
4752 fields
->f_dsp_48_u16
= value
;
4754 case M32C_OPERAND_DSP_48_U24
:
4755 fields
->f_dsp_48_u24
= value
;
4757 case M32C_OPERAND_DSP_48_U8
:
4758 fields
->f_dsp_48_u8
= value
;
4760 case M32C_OPERAND_DSP_8_S24
:
4761 fields
->f_dsp_8_s24
= value
;
4763 case M32C_OPERAND_DSP_8_S8
:
4764 fields
->f_dsp_8_s8
= value
;
4766 case M32C_OPERAND_DSP_8_U16
:
4767 fields
->f_dsp_8_u16
= value
;
4769 case M32C_OPERAND_DSP_8_U24
:
4770 fields
->f_dsp_8_u24
= value
;
4772 case M32C_OPERAND_DSP_8_U6
:
4773 fields
->f_dsp_8_u6
= value
;
4775 case M32C_OPERAND_DSP_8_U8
:
4776 fields
->f_dsp_8_u8
= value
;
4778 case M32C_OPERAND_DST16AN
:
4779 fields
->f_dst16_an
= value
;
4781 case M32C_OPERAND_DST16AN_S
:
4782 fields
->f_dst16_an_s
= value
;
4784 case M32C_OPERAND_DST16ANHI
:
4785 fields
->f_dst16_an
= value
;
4787 case M32C_OPERAND_DST16ANQI
:
4788 fields
->f_dst16_an
= value
;
4790 case M32C_OPERAND_DST16ANQI_S
:
4791 fields
->f_dst16_rn_QI_s
= value
;
4793 case M32C_OPERAND_DST16ANSI
:
4794 fields
->f_dst16_an
= value
;
4796 case M32C_OPERAND_DST16RNEXTQI
:
4797 fields
->f_dst16_rn_ext
= value
;
4799 case M32C_OPERAND_DST16RNHI
:
4800 fields
->f_dst16_rn
= value
;
4802 case M32C_OPERAND_DST16RNQI
:
4803 fields
->f_dst16_rn
= value
;
4805 case M32C_OPERAND_DST16RNQI_S
:
4806 fields
->f_dst16_rn_QI_s
= value
;
4808 case M32C_OPERAND_DST16RNSI
:
4809 fields
->f_dst16_rn
= value
;
4811 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4812 fields
->f_dst32_an_unprefixed
= value
;
4814 case M32C_OPERAND_DST32ANPREFIXED
:
4815 fields
->f_dst32_an_prefixed
= value
;
4817 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4818 fields
->f_dst32_an_prefixed
= value
;
4820 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4821 fields
->f_dst32_an_prefixed
= value
;
4823 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4824 fields
->f_dst32_an_prefixed
= value
;
4826 case M32C_OPERAND_DST32ANUNPREFIXED
:
4827 fields
->f_dst32_an_unprefixed
= value
;
4829 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4830 fields
->f_dst32_an_unprefixed
= value
;
4832 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4833 fields
->f_dst32_an_unprefixed
= value
;
4835 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4836 fields
->f_dst32_an_unprefixed
= value
;
4838 case M32C_OPERAND_DST32R0HI_S
:
4840 case M32C_OPERAND_DST32R0QI_S
:
4842 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4843 fields
->f_dst32_rn_ext_unprefixed
= value
;
4845 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4846 fields
->f_dst32_rn_ext_unprefixed
= value
;
4848 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4849 fields
->f_dst32_rn_prefixed_HI
= value
;
4851 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4852 fields
->f_dst32_rn_prefixed_QI
= value
;
4854 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4855 fields
->f_dst32_rn_prefixed_SI
= value
;
4857 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4858 fields
->f_dst32_rn_unprefixed_HI
= value
;
4860 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4861 fields
->f_dst32_rn_unprefixed_QI
= value
;
4863 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4864 fields
->f_dst32_rn_unprefixed_SI
= value
;
4866 case M32C_OPERAND_G
:
4868 case M32C_OPERAND_IMM_12_S4
:
4869 fields
->f_imm_12_s4
= value
;
4871 case M32C_OPERAND_IMM_12_S4N
:
4872 fields
->f_imm_12_s4
= value
;
4874 case M32C_OPERAND_IMM_13_U3
:
4875 fields
->f_imm_13_u3
= value
;
4877 case M32C_OPERAND_IMM_16_HI
:
4878 fields
->f_dsp_16_s16
= value
;
4880 case M32C_OPERAND_IMM_16_QI
:
4881 fields
->f_dsp_16_s8
= value
;
4883 case M32C_OPERAND_IMM_16_SI
:
4884 fields
->f_dsp_16_s32
= value
;
4886 case M32C_OPERAND_IMM_20_S4
:
4887 fields
->f_imm_20_s4
= value
;
4889 case M32C_OPERAND_IMM_24_HI
:
4890 fields
->f_dsp_24_s16
= value
;
4892 case M32C_OPERAND_IMM_24_QI
:
4893 fields
->f_dsp_24_s8
= value
;
4895 case M32C_OPERAND_IMM_24_SI
:
4896 fields
->f_dsp_24_s32
= value
;
4898 case M32C_OPERAND_IMM_32_HI
:
4899 fields
->f_dsp_32_s16
= value
;
4901 case M32C_OPERAND_IMM_32_QI
:
4902 fields
->f_dsp_32_s8
= value
;
4904 case M32C_OPERAND_IMM_32_SI
:
4905 fields
->f_dsp_32_s32
= value
;
4907 case M32C_OPERAND_IMM_40_HI
:
4908 fields
->f_dsp_40_s16
= value
;
4910 case M32C_OPERAND_IMM_40_QI
:
4911 fields
->f_dsp_40_s8
= value
;
4913 case M32C_OPERAND_IMM_40_SI
:
4914 fields
->f_dsp_40_s32
= value
;
4916 case M32C_OPERAND_IMM_48_HI
:
4917 fields
->f_dsp_48_s16
= value
;
4919 case M32C_OPERAND_IMM_48_QI
:
4920 fields
->f_dsp_48_s8
= value
;
4922 case M32C_OPERAND_IMM_48_SI
:
4923 fields
->f_dsp_48_s32
= value
;
4925 case M32C_OPERAND_IMM_56_HI
:
4926 fields
->f_dsp_56_s16
= value
;
4928 case M32C_OPERAND_IMM_56_QI
:
4929 fields
->f_dsp_56_s8
= value
;
4931 case M32C_OPERAND_IMM_64_HI
:
4932 fields
->f_dsp_64_s16
= value
;
4934 case M32C_OPERAND_IMM_8_HI
:
4935 fields
->f_dsp_8_s16
= value
;
4937 case M32C_OPERAND_IMM_8_QI
:
4938 fields
->f_dsp_8_s8
= value
;
4940 case M32C_OPERAND_IMM_8_S4
:
4941 fields
->f_imm_8_s4
= value
;
4943 case M32C_OPERAND_IMM_8_S4N
:
4944 fields
->f_imm_8_s4
= value
;
4946 case M32C_OPERAND_IMM_SH_12_S4
:
4947 fields
->f_imm_12_s4
= value
;
4949 case M32C_OPERAND_IMM_SH_20_S4
:
4950 fields
->f_imm_20_s4
= value
;
4952 case M32C_OPERAND_IMM_SH_8_S4
:
4953 fields
->f_imm_8_s4
= value
;
4955 case M32C_OPERAND_IMM1_S
:
4956 fields
->f_imm1_S
= value
;
4958 case M32C_OPERAND_IMM3_S
:
4959 fields
->f_imm3_S
= value
;
4961 case M32C_OPERAND_LAB_16_8
:
4962 fields
->f_lab_16_8
= value
;
4964 case M32C_OPERAND_LAB_24_8
:
4965 fields
->f_lab_24_8
= value
;
4967 case M32C_OPERAND_LAB_32_8
:
4968 fields
->f_lab_32_8
= value
;
4970 case M32C_OPERAND_LAB_40_8
:
4971 fields
->f_lab_40_8
= value
;
4973 case M32C_OPERAND_LAB_5_3
:
4974 fields
->f_lab_5_3
= value
;
4976 case M32C_OPERAND_LAB_8_16
:
4977 fields
->f_lab_8_16
= value
;
4979 case M32C_OPERAND_LAB_8_24
:
4980 fields
->f_lab_8_24
= value
;
4982 case M32C_OPERAND_LAB_8_8
:
4983 fields
->f_lab_8_8
= value
;
4985 case M32C_OPERAND_LAB32_JMP_S
:
4986 fields
->f_lab32_jmp_s
= value
;
4988 case M32C_OPERAND_Q
:
4990 case M32C_OPERAND_R0
:
4992 case M32C_OPERAND_R0H
:
4994 case M32C_OPERAND_R0L
:
4996 case M32C_OPERAND_R1
:
4998 case M32C_OPERAND_R1R2R0
:
5000 case M32C_OPERAND_R2
:
5002 case M32C_OPERAND_R2R0
:
5004 case M32C_OPERAND_R3
:
5006 case M32C_OPERAND_R3R1
:
5008 case M32C_OPERAND_REGSETPOP
:
5009 fields
->f_8_8
= value
;
5011 case M32C_OPERAND_REGSETPUSH
:
5012 fields
->f_8_8
= value
;
5014 case M32C_OPERAND_RN16_PUSH_S
:
5015 fields
->f_4_1
= value
;
5017 case M32C_OPERAND_S
:
5019 case M32C_OPERAND_SRC16AN
:
5020 fields
->f_src16_an
= value
;
5022 case M32C_OPERAND_SRC16ANHI
:
5023 fields
->f_src16_an
= value
;
5025 case M32C_OPERAND_SRC16ANQI
:
5026 fields
->f_src16_an
= value
;
5028 case M32C_OPERAND_SRC16RNHI
:
5029 fields
->f_src16_rn
= value
;
5031 case M32C_OPERAND_SRC16RNQI
:
5032 fields
->f_src16_rn
= value
;
5034 case M32C_OPERAND_SRC32ANPREFIXED
:
5035 fields
->f_src32_an_prefixed
= value
;
5037 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
5038 fields
->f_src32_an_prefixed
= value
;
5040 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
5041 fields
->f_src32_an_prefixed
= value
;
5043 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
5044 fields
->f_src32_an_prefixed
= value
;
5046 case M32C_OPERAND_SRC32ANUNPREFIXED
:
5047 fields
->f_src32_an_unprefixed
= value
;
5049 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
5050 fields
->f_src32_an_unprefixed
= value
;
5052 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
5053 fields
->f_src32_an_unprefixed
= value
;
5055 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
5056 fields
->f_src32_an_unprefixed
= value
;
5058 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
5059 fields
->f_src32_rn_prefixed_HI
= value
;
5061 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
5062 fields
->f_src32_rn_prefixed_QI
= value
;
5064 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
5065 fields
->f_src32_rn_prefixed_SI
= value
;
5067 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
5068 fields
->f_src32_rn_unprefixed_HI
= value
;
5070 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
5071 fields
->f_src32_rn_unprefixed_QI
= value
;
5073 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
5074 fields
->f_src32_rn_unprefixed_SI
= value
;
5076 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
5077 fields
->f_5_1
= value
;
5079 case M32C_OPERAND_X
:
5081 case M32C_OPERAND_Z
:
5083 case M32C_OPERAND_COND16_16
:
5084 fields
->f_dsp_16_u8
= value
;
5086 case M32C_OPERAND_COND16_24
:
5087 fields
->f_dsp_24_u8
= value
;
5089 case M32C_OPERAND_COND16_32
:
5090 fields
->f_dsp_32_u8
= value
;
5092 case M32C_OPERAND_COND16C
:
5093 fields
->f_cond16
= value
;
5095 case M32C_OPERAND_COND16J
:
5096 fields
->f_cond16
= value
;
5098 case M32C_OPERAND_COND16J5
:
5099 fields
->f_cond16j_5
= value
;
5101 case M32C_OPERAND_COND32
:
5102 fields
->f_cond32
= value
;
5104 case M32C_OPERAND_COND32_16
:
5105 fields
->f_dsp_16_u8
= value
;
5107 case M32C_OPERAND_COND32_24
:
5108 fields
->f_dsp_24_u8
= value
;
5110 case M32C_OPERAND_COND32_32
:
5111 fields
->f_dsp_32_u8
= value
;
5113 case M32C_OPERAND_COND32_40
:
5114 fields
->f_dsp_40_u8
= value
;
5116 case M32C_OPERAND_COND32J
:
5117 fields
->f_cond32j
= value
;
5119 case M32C_OPERAND_CR1_PREFIXED_32
:
5120 fields
->f_21_3
= value
;
5122 case M32C_OPERAND_CR1_UNPREFIXED_32
:
5123 fields
->f_13_3
= value
;
5125 case M32C_OPERAND_CR16
:
5126 fields
->f_9_3
= value
;
5128 case M32C_OPERAND_CR2_32
:
5129 fields
->f_13_3
= value
;
5131 case M32C_OPERAND_CR3_PREFIXED_32
:
5132 fields
->f_21_3
= value
;
5134 case M32C_OPERAND_CR3_UNPREFIXED_32
:
5135 fields
->f_13_3
= value
;
5137 case M32C_OPERAND_FLAGS16
:
5138 fields
->f_9_3
= value
;
5140 case M32C_OPERAND_FLAGS32
:
5141 fields
->f_13_3
= value
;
5143 case M32C_OPERAND_SCCOND32
:
5144 fields
->f_cond16
= value
;
5146 case M32C_OPERAND_SIZE
:
5150 /* xgettext:c-format */
5151 fprintf (stderr
, _("Unrecognized field %d while setting vma operand.\n"),
5157 /* Function to call before using the instruction builder tables. */
5160 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd
)
5162 cd
->insert_handlers
= & m32c_cgen_insert_handlers
[0];
5163 cd
->extract_handlers
= & m32c_cgen_extract_handlers
[0];
5165 cd
->insert_operand
= m32c_cgen_insert_operand
;
5166 cd
->extract_operand
= m32c_cgen_extract_operand
;
5168 cd
->get_int_operand
= m32c_cgen_get_int_operand
;
5169 cd
->set_int_operand
= m32c_cgen_set_int_operand
;
5170 cd
->get_vma_operand
= m32c_cgen_get_vma_operand
;
5171 cd
->set_vma_operand
= m32c_cgen_set_vma_operand
;