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_A1A0
:
567 case M32C_OPERAND_AN16_PUSH_S
:
568 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
570 case M32C_OPERAND_BIT16AN
:
571 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
573 case M32C_OPERAND_BIT16RN
:
574 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
576 case M32C_OPERAND_BIT32ANPREFIXED
:
577 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
579 case M32C_OPERAND_BIT32ANUNPREFIXED
:
580 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
582 case M32C_OPERAND_BIT32RNPREFIXED
:
584 long value
= fields
->f_dst32_rn_prefixed_QI
;
585 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
586 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
589 case M32C_OPERAND_BIT32RNUNPREFIXED
:
591 long value
= fields
->f_dst32_rn_unprefixed_QI
;
592 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
593 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
596 case M32C_OPERAND_BITBASE16_16_S8
:
597 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
599 case M32C_OPERAND_BITBASE16_16_U16
:
601 long value
= fields
->f_dsp_16_u16
;
602 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
603 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
606 case M32C_OPERAND_BITBASE16_16_U8
:
607 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
609 case M32C_OPERAND_BITBASE16_8_U11_S
:
612 FLD (f_bitno16_S
) = ((FLD (f_bitbase16_u11_S
)) & (7));
613 FLD (f_dsp_8_u8
) = ((((unsigned int) (FLD (f_bitbase16_u11_S
)) >> (3))) & (255));
615 errmsg
= insert_normal (cd
, fields
->f_bitno16_S
, 0, 0, 5, 3, 32, total_length
, buffer
);
618 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
623 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
626 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s11_unprefixed
)) & (7));
627 FLD (f_dsp_16_s8
) = ((int) (FLD (f_bitbase32_16_s11_unprefixed
)) >> (3));
629 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
632 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
637 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
640 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s19_unprefixed
)) & (7));
641 FLD (f_dsp_16_s16
) = ((int) (FLD (f_bitbase32_16_s19_unprefixed
)) >> (3));
643 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
647 long value
= fields
->f_dsp_16_s16
;
648 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
649 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
655 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
658 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u11_unprefixed
)) & (7));
659 FLD (f_dsp_16_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u11_unprefixed
)) >> (3))) & (255));
661 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
664 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
669 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
672 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u19_unprefixed
)) & (7));
673 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u19_unprefixed
)) >> (3))) & (65535));
675 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
679 long value
= fields
->f_dsp_16_u16
;
680 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
681 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
687 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
690 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u27_unprefixed
)) & (7));
691 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (3))) & (65535));
692 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (19))) & (255));
694 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
698 long value
= fields
->f_dsp_16_u16
;
699 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
700 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
704 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
709 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
712 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s11_prefixed
)) & (7));
713 FLD (f_dsp_24_s8
) = ((int) (FLD (f_bitbase32_24_s11_prefixed
)) >> (3));
715 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
718 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
723 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
726 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s19_prefixed
)) & (7));
727 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (3))) & (255));
728 FLD (f_dsp_32_s8
) = ((int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (11));
730 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
733 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
736 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
741 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
744 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u11_prefixed
)) & (7));
745 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u11_prefixed
)) >> (3))) & (255));
747 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
750 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
755 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
758 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u19_prefixed
)) & (7));
759 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (3))) & (255));
760 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (11))) & (255));
762 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
765 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
768 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
773 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
776 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u27_prefixed
)) & (7));
777 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (3))) & (255));
778 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (11))) & (65535));
780 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
783 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
787 long value
= fields
->f_dsp_32_u16
;
788 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
789 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
795 case M32C_OPERAND_BITNO16R
:
796 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
798 case M32C_OPERAND_BITNO32PREFIXED
:
799 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
801 case M32C_OPERAND_BITNO32UNPREFIXED
:
802 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
804 case M32C_OPERAND_DSP_10_U6
:
805 errmsg
= insert_normal (cd
, fields
->f_dsp_10_u6
, 0, 0, 10, 6, 32, total_length
, buffer
);
807 case M32C_OPERAND_DSP_16_S16
:
809 long value
= fields
->f_dsp_16_s16
;
810 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
811 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
814 case M32C_OPERAND_DSP_16_S8
:
815 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
817 case M32C_OPERAND_DSP_16_U16
:
819 long value
= fields
->f_dsp_16_u16
;
820 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
821 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
824 case M32C_OPERAND_DSP_16_U20
:
827 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
828 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
831 long value
= fields
->f_dsp_16_u16
;
832 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
833 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
837 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
842 case M32C_OPERAND_DSP_16_U24
:
845 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
846 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
849 long value
= fields
->f_dsp_16_u16
;
850 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
851 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
855 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
860 case M32C_OPERAND_DSP_16_U8
:
861 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
863 case M32C_OPERAND_DSP_24_S16
:
866 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
867 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
869 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
872 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
877 case M32C_OPERAND_DSP_24_S8
:
878 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
880 case M32C_OPERAND_DSP_24_U16
:
883 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u16
)) & (255));
884 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_u16
)) >> (8))) & (255));
886 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
889 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
894 case M32C_OPERAND_DSP_24_U20
:
897 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
898 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
900 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
904 long value
= fields
->f_dsp_32_u16
;
905 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
906 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
912 case M32C_OPERAND_DSP_24_U24
:
915 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
916 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
918 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
922 long value
= fields
->f_dsp_32_u16
;
923 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
924 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
930 case M32C_OPERAND_DSP_24_U8
:
931 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
933 case M32C_OPERAND_DSP_32_S16
:
935 long value
= fields
->f_dsp_32_s16
;
936 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
937 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
940 case M32C_OPERAND_DSP_32_S8
:
941 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
943 case M32C_OPERAND_DSP_32_U16
:
945 long value
= fields
->f_dsp_32_u16
;
946 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
947 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
950 case M32C_OPERAND_DSP_32_U20
:
952 long value
= fields
->f_dsp_32_u24
;
953 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
954 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
957 case M32C_OPERAND_DSP_32_U24
:
959 long value
= fields
->f_dsp_32_u24
;
960 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
961 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
964 case M32C_OPERAND_DSP_32_U8
:
965 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
967 case M32C_OPERAND_DSP_40_S16
:
969 long value
= fields
->f_dsp_40_s16
;
970 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
971 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
974 case M32C_OPERAND_DSP_40_S8
:
975 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
977 case M32C_OPERAND_DSP_40_U16
:
979 long value
= fields
->f_dsp_40_u16
;
980 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
981 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 16, 32, total_length
, buffer
);
984 case M32C_OPERAND_DSP_40_U24
:
986 long value
= fields
->f_dsp_40_u24
;
987 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
988 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
991 case M32C_OPERAND_DSP_40_U8
:
992 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
994 case M32C_OPERAND_DSP_48_S16
:
996 long value
= fields
->f_dsp_48_s16
;
997 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
998 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1001 case M32C_OPERAND_DSP_48_S8
:
1002 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1004 case M32C_OPERAND_DSP_48_U16
:
1006 long value
= fields
->f_dsp_48_u16
;
1007 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1008 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1011 case M32C_OPERAND_DSP_48_U24
:
1014 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_48_u24
)) >> (16))) & (255));
1015 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u24
)) & (65535));
1018 long value
= fields
->f_dsp_48_u16
;
1019 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1020 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1024 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1029 case M32C_OPERAND_DSP_48_U8
:
1030 errmsg
= insert_normal (cd
, fields
->f_dsp_48_u8
, 0, 32, 16, 8, 32, total_length
, buffer
);
1032 case M32C_OPERAND_DSP_8_S8
:
1033 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1035 case M32C_OPERAND_DSP_8_U16
:
1037 long value
= fields
->f_dsp_8_u16
;
1038 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1039 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 16, 32, total_length
, buffer
);
1042 case M32C_OPERAND_DSP_8_U24
:
1044 long value
= fields
->f_dsp_8_u24
;
1045 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1046 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 24, 32, total_length
, buffer
);
1049 case M32C_OPERAND_DSP_8_U6
:
1050 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u6
, 0, 0, 8, 6, 32, total_length
, buffer
);
1052 case M32C_OPERAND_DSP_8_U8
:
1053 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1055 case M32C_OPERAND_DST16AN
:
1056 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1058 case M32C_OPERAND_DST16AN_S
:
1059 errmsg
= insert_normal (cd
, fields
->f_dst16_an_s
, 0, 0, 4, 1, 32, total_length
, buffer
);
1061 case M32C_OPERAND_DST16ANHI
:
1062 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1064 case M32C_OPERAND_DST16ANQI
:
1065 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1067 case M32C_OPERAND_DST16ANQI_S
:
1068 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1070 case M32C_OPERAND_DST16ANSI
:
1071 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1073 case M32C_OPERAND_DST16RNEXTQI
:
1074 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_ext
, 0, 0, 14, 1, 32, total_length
, buffer
);
1076 case M32C_OPERAND_DST16RNHI
:
1077 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1079 case M32C_OPERAND_DST16RNQI
:
1080 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1082 case M32C_OPERAND_DST16RNQI_S
:
1083 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1085 case M32C_OPERAND_DST16RNSI
:
1086 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1088 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
1089 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1091 case M32C_OPERAND_DST32ANPREFIXED
:
1092 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1094 case M32C_OPERAND_DST32ANPREFIXEDHI
:
1095 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1097 case M32C_OPERAND_DST32ANPREFIXEDQI
:
1098 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1100 case M32C_OPERAND_DST32ANPREFIXEDSI
:
1101 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1103 case M32C_OPERAND_DST32ANUNPREFIXED
:
1104 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1106 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
1107 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1109 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
1110 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1112 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
1113 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1115 case M32C_OPERAND_DST32R0HI_S
:
1117 case M32C_OPERAND_DST32R0QI_S
:
1119 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
1120 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1122 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
1123 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1125 case M32C_OPERAND_DST32RNPREFIXEDHI
:
1127 long value
= fields
->f_dst32_rn_prefixed_HI
;
1128 value
= ((((value
) + (2))) % (4));
1129 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1132 case M32C_OPERAND_DST32RNPREFIXEDQI
:
1134 long value
= fields
->f_dst32_rn_prefixed_QI
;
1135 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1136 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1139 case M32C_OPERAND_DST32RNPREFIXEDSI
:
1141 long value
= fields
->f_dst32_rn_prefixed_SI
;
1142 value
= ((value
) + (2));
1143 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1146 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
1148 long value
= fields
->f_dst32_rn_unprefixed_HI
;
1149 value
= ((((value
) + (2))) % (4));
1150 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1153 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
1155 long value
= fields
->f_dst32_rn_unprefixed_QI
;
1156 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1157 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1160 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
1162 long value
= fields
->f_dst32_rn_unprefixed_SI
;
1163 value
= ((value
) + (2));
1164 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1167 case M32C_OPERAND_G
:
1169 case M32C_OPERAND_IMM_12_S4
:
1170 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1172 case M32C_OPERAND_IMM_13_U3
:
1173 errmsg
= insert_normal (cd
, fields
->f_imm_13_u3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1175 case M32C_OPERAND_IMM_16_HI
:
1177 long value
= fields
->f_dsp_16_s16
;
1178 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1179 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
1182 case M32C_OPERAND_IMM_16_QI
:
1183 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
1185 case M32C_OPERAND_IMM_16_SI
:
1188 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_16_s32
)) >> (16))) & (65535));
1189 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_s32
)) & (65535));
1192 long value
= fields
->f_dsp_16_u16
;
1193 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1194 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
1199 long value
= fields
->f_dsp_32_u16
;
1200 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1201 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
1207 case M32C_OPERAND_IMM_20_S4
:
1208 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1210 case M32C_OPERAND_IMM_24_HI
:
1213 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
1214 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
1216 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1219 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1224 case M32C_OPERAND_IMM_24_QI
:
1225 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
1227 case M32C_OPERAND_IMM_24_SI
:
1230 FLD (f_dsp_32_u24
) = ((((unsigned int) (FLD (f_dsp_24_s32
)) >> (8))) & (16777215));
1231 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s32
)) & (255));
1233 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1237 long value
= fields
->f_dsp_32_u24
;
1238 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1239 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
1245 case M32C_OPERAND_IMM_32_HI
:
1247 long value
= fields
->f_dsp_32_s16
;
1248 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1249 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
1252 case M32C_OPERAND_IMM_32_QI
:
1253 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
1255 case M32C_OPERAND_IMM_32_SI
:
1257 long value
= fields
->f_dsp_32_s32
;
1258 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
1259 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, buffer
);
1262 case M32C_OPERAND_IMM_40_HI
:
1264 long value
= fields
->f_dsp_40_s16
;
1265 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1266 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1269 case M32C_OPERAND_IMM_40_QI
:
1270 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1272 case M32C_OPERAND_IMM_40_SI
:
1275 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_40_s32
)) >> (24))) & (255));
1276 FLD (f_dsp_40_u24
) = ((FLD (f_dsp_40_s32
)) & (16777215));
1279 long value
= fields
->f_dsp_40_u24
;
1280 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1281 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1285 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1290 case M32C_OPERAND_IMM_48_HI
:
1292 long value
= fields
->f_dsp_48_s16
;
1293 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1294 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1297 case M32C_OPERAND_IMM_48_QI
:
1298 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1300 case M32C_OPERAND_IMM_48_SI
:
1303 FLD (f_dsp_64_u16
) = ((((unsigned int) (FLD (f_dsp_48_s32
)) >> (16))) & (65535));
1304 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_s32
)) & (65535));
1307 long value
= fields
->f_dsp_48_u16
;
1308 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1309 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1314 long value
= fields
->f_dsp_64_u16
;
1315 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1316 errmsg
= insert_normal (cd
, value
, 0, 64, 0, 16, 32, total_length
, buffer
);
1322 case M32C_OPERAND_IMM_56_HI
:
1325 FLD (f_dsp_56_u8
) = ((FLD (f_dsp_56_s16
)) & (255));
1326 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_56_s16
)) >> (8))) & (255));
1328 errmsg
= insert_normal (cd
, fields
->f_dsp_56_u8
, 0, 32, 24, 8, 32, total_length
, buffer
);
1331 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1336 case M32C_OPERAND_IMM_56_QI
:
1337 errmsg
= insert_normal (cd
, fields
->f_dsp_56_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 24, 8, 32, total_length
, buffer
);
1339 case M32C_OPERAND_IMM_64_HI
:
1341 long value
= fields
->f_dsp_64_s16
;
1342 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1343 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, buffer
);
1346 case M32C_OPERAND_IMM_8_HI
:
1348 long value
= fields
->f_dsp_8_s16
;
1349 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1350 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, buffer
);
1353 case M32C_OPERAND_IMM_8_QI
:
1354 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1356 case M32C_OPERAND_IMM_8_S4
:
1357 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1359 case M32C_OPERAND_IMM_SH_12_S4
:
1360 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1362 case M32C_OPERAND_IMM_SH_20_S4
:
1363 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1365 case M32C_OPERAND_IMM_SH_8_S4
:
1366 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1368 case M32C_OPERAND_IMM1_S
:
1370 long value
= fields
->f_imm1_S
;
1371 value
= ((value
) - (1));
1372 errmsg
= insert_normal (cd
, value
, 0, 0, 2, 1, 32, total_length
, buffer
);
1375 case M32C_OPERAND_IMM3_S
:
1378 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
1379 FLD (f_2_2
) = ((((unsigned int) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
1381 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1384 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1389 case M32C_OPERAND_LAB_16_8
:
1391 long value
= fields
->f_lab_16_8
;
1392 value
= ((value
) - (((pc
) + (2))));
1393 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 16, 8, 32, total_length
, buffer
);
1396 case M32C_OPERAND_LAB_24_8
:
1398 long value
= fields
->f_lab_24_8
;
1399 value
= ((value
) - (((pc
) + (2))));
1400 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 24, 8, 32, total_length
, buffer
);
1403 case M32C_OPERAND_LAB_32_8
:
1405 long value
= fields
->f_lab_32_8
;
1406 value
= ((value
) - (((pc
) + (2))));
1407 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 0, 8, 32, total_length
, buffer
);
1410 case M32C_OPERAND_LAB_40_8
:
1412 long value
= fields
->f_lab_40_8
;
1413 value
= ((value
) - (((pc
) + (2))));
1414 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 8, 8, 32, total_length
, buffer
);
1417 case M32C_OPERAND_LAB_5_3
:
1419 long value
= fields
->f_lab_5_3
;
1420 value
= ((value
) - (((pc
) + (2))));
1421 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, buffer
);
1424 case M32C_OPERAND_LAB_8_16
:
1426 long value
= fields
->f_lab_8_16
;
1427 value
= ((((((((value
) - (((pc
) + (1))))) & (255))) << (8))) | (((unsigned int) (((((value
) - (((pc
) + (1))))) & (65535))) >> (8))));
1428 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGN_OPT
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 16, 32, total_length
, buffer
);
1431 case M32C_OPERAND_LAB_8_24
:
1433 long value
= fields
->f_lab_8_24
;
1434 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1435 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, buffer
);
1438 case M32C_OPERAND_LAB_8_8
:
1440 long value
= fields
->f_lab_8_8
;
1441 value
= ((value
) - (((pc
) + (1))));
1442 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 8, 32, total_length
, buffer
);
1445 case M32C_OPERAND_LAB32_JMP_S
:
1449 tmp_val
= ((((FLD (f_lab32_jmp_s
)) - (pc
))) - (2));
1450 FLD (f_7_1
) = ((tmp_val
) & (1));
1451 FLD (f_2_2
) = ((unsigned int) (tmp_val
) >> (1));
1453 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1456 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1461 case M32C_OPERAND_Q
:
1463 case M32C_OPERAND_R0
:
1465 case M32C_OPERAND_R0H
:
1467 case M32C_OPERAND_R0L
:
1469 case M32C_OPERAND_R1
:
1471 case M32C_OPERAND_R1R2R0
:
1473 case M32C_OPERAND_R2
:
1475 case M32C_OPERAND_R2R0
:
1477 case M32C_OPERAND_R3
:
1479 case M32C_OPERAND_R3R1
:
1481 case M32C_OPERAND_REGSETPOP
:
1482 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1484 case M32C_OPERAND_REGSETPUSH
:
1485 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1487 case M32C_OPERAND_RN16_PUSH_S
:
1488 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
1490 case M32C_OPERAND_S
:
1492 case M32C_OPERAND_SRC16AN
:
1493 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1495 case M32C_OPERAND_SRC16ANHI
:
1496 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1498 case M32C_OPERAND_SRC16ANQI
:
1499 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1501 case M32C_OPERAND_SRC16RNHI
:
1502 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1504 case M32C_OPERAND_SRC16RNQI
:
1505 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1507 case M32C_OPERAND_SRC32ANPREFIXED
:
1508 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1510 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
1511 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1513 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
1514 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1516 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
1517 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1519 case M32C_OPERAND_SRC32ANUNPREFIXED
:
1520 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1522 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
1523 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1525 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
1526 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1528 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
1529 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1531 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
1533 long value
= fields
->f_src32_rn_prefixed_HI
;
1534 value
= ((((value
) + (2))) % (4));
1535 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1538 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
1540 long value
= fields
->f_src32_rn_prefixed_QI
;
1541 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1542 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1545 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
1547 long value
= fields
->f_src32_rn_prefixed_SI
;
1548 value
= ((value
) + (2));
1549 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1552 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
1554 long value
= fields
->f_src32_rn_unprefixed_HI
;
1555 value
= ((((value
) + (2))) % (4));
1556 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1559 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
1561 long value
= fields
->f_src32_rn_unprefixed_QI
;
1562 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1563 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1566 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
1568 long value
= fields
->f_src32_rn_unprefixed_SI
;
1569 value
= ((value
) + (2));
1570 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1573 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
1574 errmsg
= insert_normal (cd
, fields
->f_5_1
, 0, 0, 5, 1, 32, total_length
, buffer
);
1576 case M32C_OPERAND_X
:
1578 case M32C_OPERAND_Z
:
1580 case M32C_OPERAND_COND16_16
:
1581 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1583 case M32C_OPERAND_COND16_24
:
1584 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1586 case M32C_OPERAND_COND16_32
:
1587 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1589 case M32C_OPERAND_COND16C
:
1590 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1592 case M32C_OPERAND_COND16J
:
1593 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1595 case M32C_OPERAND_COND16J5
:
1596 errmsg
= insert_normal (cd
, fields
->f_cond16j_5
, 0, 0, 5, 3, 32, total_length
, buffer
);
1598 case M32C_OPERAND_COND32
:
1601 FLD (f_9_1
) = ((((unsigned int) (FLD (f_cond32
)) >> (3))) & (1));
1602 FLD (f_13_3
) = ((FLD (f_cond32
)) & (7));
1604 errmsg
= insert_normal (cd
, fields
->f_9_1
, 0, 0, 9, 1, 32, total_length
, buffer
);
1607 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1612 case M32C_OPERAND_COND32_16
:
1613 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1615 case M32C_OPERAND_COND32_24
:
1616 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1618 case M32C_OPERAND_COND32_32
:
1619 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1621 case M32C_OPERAND_COND32_40
:
1622 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1624 case M32C_OPERAND_COND32J
:
1627 FLD (f_1_3
) = ((((unsigned int) (FLD (f_cond32j
)) >> (1))) & (7));
1628 FLD (f_7_1
) = ((FLD (f_cond32j
)) & (1));
1630 errmsg
= insert_normal (cd
, fields
->f_1_3
, 0, 0, 1, 3, 32, total_length
, buffer
);
1633 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1638 case M32C_OPERAND_CR1_PREFIXED_32
:
1639 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1641 case M32C_OPERAND_CR1_UNPREFIXED_32
:
1642 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1644 case M32C_OPERAND_CR16
:
1645 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1647 case M32C_OPERAND_CR2_32
:
1648 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1650 case M32C_OPERAND_CR3_PREFIXED_32
:
1651 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1653 case M32C_OPERAND_CR3_UNPREFIXED_32
:
1654 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1656 case M32C_OPERAND_FLAGS16
:
1657 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1659 case M32C_OPERAND_FLAGS32
:
1660 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1662 case M32C_OPERAND_SCCOND32
:
1663 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1665 case M32C_OPERAND_SIZE
:
1669 /* xgettext:c-format */
1670 fprintf (stderr
, _("Unrecognized field %d while building insn.\n"),
1678 int m32c_cgen_extract_operand
1679 (CGEN_CPU_DESC
, int, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
1681 /* Main entry point for operand extraction.
1682 The result is <= 0 for error, >0 for success.
1683 ??? Actual values aren't well defined right now.
1685 This function is basically just a big switch statement. Earlier versions
1686 used tables to look up the function to use, but
1687 - if the table contains both assembler and disassembler functions then
1688 the disassembler contains much of the assembler and vice-versa,
1689 - there's a lot of inlining possibilities as things grow,
1690 - using a switch statement avoids the function call overhead.
1692 This function could be moved into `print_insn_normal', but keeping it
1693 separate makes clear the interface between `print_insn_normal' and each of
1697 m32c_cgen_extract_operand (CGEN_CPU_DESC cd
,
1699 CGEN_EXTRACT_INFO
*ex_info
,
1700 CGEN_INSN_INT insn_value
,
1701 CGEN_FIELDS
* fields
,
1704 /* Assume success (for those operands that are nops). */
1706 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
1710 case M32C_OPERAND_A0
:
1712 case M32C_OPERAND_A1
:
1714 case M32C_OPERAND_A1A0
:
1716 case M32C_OPERAND_AN16_PUSH_S
:
1717 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
1719 case M32C_OPERAND_BIT16AN
:
1720 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
1722 case M32C_OPERAND_BIT16RN
:
1723 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
1725 case M32C_OPERAND_BIT32ANPREFIXED
:
1726 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
1728 case M32C_OPERAND_BIT32ANUNPREFIXED
:
1729 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
1731 case M32C_OPERAND_BIT32RNPREFIXED
:
1734 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
1735 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1736 fields
->f_dst32_rn_prefixed_QI
= value
;
1739 case M32C_OPERAND_BIT32RNUNPREFIXED
:
1742 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
1743 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1744 fields
->f_dst32_rn_unprefixed_QI
= value
;
1747 case M32C_OPERAND_BITBASE16_16_S8
:
1748 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
);
1750 case M32C_OPERAND_BITBASE16_16_U16
:
1753 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1754 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1755 fields
->f_dsp_16_u16
= value
;
1758 case M32C_OPERAND_BITBASE16_16_U8
:
1759 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1761 case M32C_OPERAND_BITBASE16_8_U11_S
:
1763 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_bitno16_S
);
1764 if (length
<= 0) break;
1765 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
1766 if (length
<= 0) break;
1768 FLD (f_bitbase16_u11_S
) = ((((FLD (f_dsp_8_u8
)) << (3))) | (FLD (f_bitno16_S
)));
1772 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
1774 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1775 if (length
<= 0) break;
1776 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
);
1777 if (length
<= 0) break;
1779 FLD (f_bitbase32_16_s11_unprefixed
) = ((((FLD (f_dsp_16_s8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1783 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
1785 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1786 if (length
<= 0) break;
1789 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1790 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1791 fields
->f_dsp_16_s16
= value
;
1793 if (length
<= 0) break;
1795 FLD (f_bitbase32_16_s19_unprefixed
) = ((((FLD (f_dsp_16_s16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1799 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
1801 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1802 if (length
<= 0) break;
1803 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1804 if (length
<= 0) break;
1806 FLD (f_bitbase32_16_u11_unprefixed
) = ((((FLD (f_dsp_16_u8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1810 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
1812 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1813 if (length
<= 0) break;
1816 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1817 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1818 fields
->f_dsp_16_u16
= value
;
1820 if (length
<= 0) break;
1822 FLD (f_bitbase32_16_u19_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1826 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
1828 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1829 if (length
<= 0) break;
1832 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1833 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1834 fields
->f_dsp_16_u16
= value
;
1836 if (length
<= 0) break;
1837 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1838 if (length
<= 0) break;
1840 FLD (f_bitbase32_16_u27_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (19))) | (FLD (f_bitno32_unprefixed
)))));
1844 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
1846 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1847 if (length
<= 0) break;
1848 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
);
1849 if (length
<= 0) break;
1851 FLD (f_bitbase32_24_s11_prefixed
) = ((((FLD (f_dsp_24_s8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1855 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
1857 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1858 if (length
<= 0) break;
1859 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1860 if (length
<= 0) break;
1861 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
);
1862 if (length
<= 0) break;
1864 FLD (f_bitbase32_24_s19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_s8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1868 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
1870 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1871 if (length
<= 0) break;
1872 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1873 if (length
<= 0) break;
1875 FLD (f_bitbase32_24_u11_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1879 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
1881 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1882 if (length
<= 0) break;
1883 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1884 if (length
<= 0) break;
1885 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1886 if (length
<= 0) break;
1888 FLD (f_bitbase32_24_u19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1892 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
1894 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1895 if (length
<= 0) break;
1896 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1897 if (length
<= 0) break;
1900 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
1901 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1902 fields
->f_dsp_32_u16
= value
;
1904 if (length
<= 0) break;
1906 FLD (f_bitbase32_24_u27_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u16
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1910 case M32C_OPERAND_BITNO16R
:
1911 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1913 case M32C_OPERAND_BITNO32PREFIXED
:
1914 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1916 case M32C_OPERAND_BITNO32UNPREFIXED
:
1917 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1919 case M32C_OPERAND_DSP_10_U6
:
1920 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 6, 32, total_length
, pc
, & fields
->f_dsp_10_u6
);
1922 case M32C_OPERAND_DSP_16_S16
:
1925 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1926 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1927 fields
->f_dsp_16_s16
= value
;
1930 case M32C_OPERAND_DSP_16_S8
:
1931 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
);
1933 case M32C_OPERAND_DSP_16_U16
:
1936 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1937 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1938 fields
->f_dsp_16_u16
= value
;
1941 case M32C_OPERAND_DSP_16_U20
:
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
;
1949 if (length
<= 0) break;
1950 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1951 if (length
<= 0) break;
1953 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
1957 case M32C_OPERAND_DSP_16_U24
:
1961 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1962 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1963 fields
->f_dsp_16_u16
= value
;
1965 if (length
<= 0) break;
1966 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1967 if (length
<= 0) break;
1969 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
1973 case M32C_OPERAND_DSP_16_U8
:
1974 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1976 case M32C_OPERAND_DSP_24_S16
:
1978 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1979 if (length
<= 0) break;
1980 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1981 if (length
<= 0) break;
1983 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
1987 case M32C_OPERAND_DSP_24_S8
:
1988 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
);
1990 case M32C_OPERAND_DSP_24_U16
:
1992 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1993 if (length
<= 0) break;
1994 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1995 if (length
<= 0) break;
1997 FLD (f_dsp_24_u16
) = ((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
)));
2001 case M32C_OPERAND_DSP_24_U20
:
2003 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2004 if (length
<= 0) break;
2007 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2008 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2009 fields
->f_dsp_32_u16
= value
;
2011 if (length
<= 0) break;
2013 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2017 case M32C_OPERAND_DSP_24_U24
:
2019 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2020 if (length
<= 0) break;
2023 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2024 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2025 fields
->f_dsp_32_u16
= value
;
2027 if (length
<= 0) break;
2029 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2033 case M32C_OPERAND_DSP_24_U8
:
2034 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2036 case M32C_OPERAND_DSP_32_S16
:
2039 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2040 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2041 fields
->f_dsp_32_s16
= value
;
2044 case M32C_OPERAND_DSP_32_S8
:
2045 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
);
2047 case M32C_OPERAND_DSP_32_U16
:
2050 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2051 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2052 fields
->f_dsp_32_u16
= value
;
2055 case M32C_OPERAND_DSP_32_U20
:
2058 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2059 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2060 fields
->f_dsp_32_u24
= value
;
2063 case M32C_OPERAND_DSP_32_U24
:
2066 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2067 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2068 fields
->f_dsp_32_u24
= value
;
2071 case M32C_OPERAND_DSP_32_U8
:
2072 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2074 case M32C_OPERAND_DSP_40_S16
:
2077 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2078 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2079 fields
->f_dsp_40_s16
= value
;
2082 case M32C_OPERAND_DSP_40_S8
:
2083 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
);
2085 case M32C_OPERAND_DSP_40_U16
:
2088 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 16, 32, total_length
, pc
, & value
);
2089 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2090 fields
->f_dsp_40_u16
= value
;
2093 case M32C_OPERAND_DSP_40_U24
:
2096 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2097 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2098 fields
->f_dsp_40_u24
= value
;
2101 case M32C_OPERAND_DSP_40_U8
:
2102 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2104 case M32C_OPERAND_DSP_48_S16
:
2107 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2108 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2109 fields
->f_dsp_48_s16
= value
;
2112 case M32C_OPERAND_DSP_48_S8
:
2113 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
);
2115 case M32C_OPERAND_DSP_48_U16
:
2118 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2119 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2120 fields
->f_dsp_48_u16
= value
;
2123 case M32C_OPERAND_DSP_48_U24
:
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
;
2131 if (length
<= 0) break;
2132 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2133 if (length
<= 0) break;
2135 FLD (f_dsp_48_u24
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (16711680))));
2139 case M32C_OPERAND_DSP_48_U8
:
2140 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_48_u8
);
2142 case M32C_OPERAND_DSP_8_S8
:
2143 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
);
2145 case M32C_OPERAND_DSP_8_U16
:
2148 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 16, 32, total_length
, pc
, & value
);
2149 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2150 fields
->f_dsp_8_u16
= value
;
2153 case M32C_OPERAND_DSP_8_U24
:
2156 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 24, 32, total_length
, pc
, & value
);
2157 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2158 fields
->f_dsp_8_u24
= value
;
2161 case M32C_OPERAND_DSP_8_U6
:
2162 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 6, 32, total_length
, pc
, & fields
->f_dsp_8_u6
);
2164 case M32C_OPERAND_DSP_8_U8
:
2165 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
2167 case M32C_OPERAND_DST16AN
:
2168 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2170 case M32C_OPERAND_DST16AN_S
:
2171 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_dst16_an_s
);
2173 case M32C_OPERAND_DST16ANHI
:
2174 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2176 case M32C_OPERAND_DST16ANQI
:
2177 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2179 case M32C_OPERAND_DST16ANQI_S
:
2180 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2182 case M32C_OPERAND_DST16ANSI
:
2183 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2185 case M32C_OPERAND_DST16RNEXTQI
:
2186 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_ext
);
2188 case M32C_OPERAND_DST16RNHI
:
2189 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2191 case M32C_OPERAND_DST16RNQI
:
2192 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2194 case M32C_OPERAND_DST16RNQI_S
:
2195 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2197 case M32C_OPERAND_DST16RNSI
:
2198 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2200 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
2201 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2203 case M32C_OPERAND_DST32ANPREFIXED
:
2204 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2206 case M32C_OPERAND_DST32ANPREFIXEDHI
:
2207 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2209 case M32C_OPERAND_DST32ANPREFIXEDQI
:
2210 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2212 case M32C_OPERAND_DST32ANPREFIXEDSI
:
2213 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2215 case M32C_OPERAND_DST32ANUNPREFIXED
:
2216 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2218 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
2219 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2221 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
2222 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2224 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
2225 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2227 case M32C_OPERAND_DST32R0HI_S
:
2229 case M32C_OPERAND_DST32R0QI_S
:
2231 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
2232 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2234 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
2235 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2237 case M32C_OPERAND_DST32RNPREFIXEDHI
:
2240 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2241 value
= ((((value
) + (2))) % (4));
2242 fields
->f_dst32_rn_prefixed_HI
= value
;
2245 case M32C_OPERAND_DST32RNPREFIXEDQI
:
2248 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2249 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2250 fields
->f_dst32_rn_prefixed_QI
= value
;
2253 case M32C_OPERAND_DST32RNPREFIXEDSI
:
2256 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2257 value
= ((value
) - (2));
2258 fields
->f_dst32_rn_prefixed_SI
= value
;
2261 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
2264 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2265 value
= ((((value
) + (2))) % (4));
2266 fields
->f_dst32_rn_unprefixed_HI
= value
;
2269 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
2272 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2273 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2274 fields
->f_dst32_rn_unprefixed_QI
= value
;
2277 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
2280 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2281 value
= ((value
) - (2));
2282 fields
->f_dst32_rn_unprefixed_SI
= value
;
2285 case M32C_OPERAND_G
:
2287 case M32C_OPERAND_IMM_12_S4
:
2288 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
);
2290 case M32C_OPERAND_IMM_13_U3
:
2291 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_imm_13_u3
);
2293 case M32C_OPERAND_IMM_16_HI
:
2296 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2297 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2298 fields
->f_dsp_16_s16
= value
;
2301 case M32C_OPERAND_IMM_16_QI
:
2302 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
);
2304 case M32C_OPERAND_IMM_16_SI
:
2308 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2309 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2310 fields
->f_dsp_16_u16
= value
;
2312 if (length
<= 0) break;
2315 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2316 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2317 fields
->f_dsp_32_u16
= value
;
2319 if (length
<= 0) break;
2321 FLD (f_dsp_16_s32
) = ((((FLD (f_dsp_16_u16
)) & (65535))) | (((((FLD (f_dsp_32_u16
)) << (16))) & (0xffff0000))));
2325 case M32C_OPERAND_IMM_20_S4
:
2326 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
);
2328 case M32C_OPERAND_IMM_24_HI
:
2330 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2331 if (length
<= 0) break;
2332 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2333 if (length
<= 0) break;
2335 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2339 case M32C_OPERAND_IMM_24_QI
:
2340 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
);
2342 case M32C_OPERAND_IMM_24_SI
:
2344 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2345 if (length
<= 0) break;
2348 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2349 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2350 fields
->f_dsp_32_u24
= value
;
2352 if (length
<= 0) break;
2354 FLD (f_dsp_24_s32
) = ((((FLD (f_dsp_24_u8
)) & (255))) | (((((FLD (f_dsp_32_u24
)) << (8))) & (0xffffff00))));
2358 case M32C_OPERAND_IMM_32_HI
:
2361 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2362 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2363 fields
->f_dsp_32_s16
= value
;
2366 case M32C_OPERAND_IMM_32_QI
:
2367 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
);
2369 case M32C_OPERAND_IMM_32_SI
:
2372 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, pc
, & value
);
2373 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
2374 fields
->f_dsp_32_s32
= value
;
2377 case M32C_OPERAND_IMM_40_HI
:
2380 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2381 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2382 fields
->f_dsp_40_s16
= value
;
2385 case M32C_OPERAND_IMM_40_QI
:
2386 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
);
2388 case M32C_OPERAND_IMM_40_SI
:
2392 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2393 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2394 fields
->f_dsp_40_u24
= value
;
2396 if (length
<= 0) break;
2397 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2398 if (length
<= 0) break;
2400 FLD (f_dsp_40_s32
) = ((((FLD (f_dsp_40_u24
)) & (16777215))) | (((((FLD (f_dsp_64_u8
)) << (24))) & (0xff000000))));
2404 case M32C_OPERAND_IMM_48_HI
:
2407 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2408 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2409 fields
->f_dsp_48_s16
= value
;
2412 case M32C_OPERAND_IMM_48_QI
:
2413 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
);
2415 case M32C_OPERAND_IMM_48_SI
:
2419 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2420 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2421 fields
->f_dsp_48_u16
= value
;
2423 if (length
<= 0) break;
2426 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 16, 32, total_length
, pc
, & value
);
2427 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2428 fields
->f_dsp_64_u16
= value
;
2430 if (length
<= 0) break;
2432 FLD (f_dsp_48_s32
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u16
)) << (16))) & (0xffff0000))));
2436 case M32C_OPERAND_IMM_56_HI
:
2438 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_56_u8
);
2439 if (length
<= 0) break;
2440 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2441 if (length
<= 0) break;
2443 FLD (f_dsp_56_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_64_u8
)) << (8))) | (FLD (f_dsp_56_u8
))))));
2447 case M32C_OPERAND_IMM_56_QI
:
2448 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
);
2450 case M32C_OPERAND_IMM_64_HI
:
2453 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, pc
, & value
);
2454 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2455 fields
->f_dsp_64_s16
= value
;
2458 case M32C_OPERAND_IMM_8_HI
:
2461 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, pc
, & value
);
2462 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2463 fields
->f_dsp_8_s16
= value
;
2466 case M32C_OPERAND_IMM_8_QI
:
2467 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
);
2469 case M32C_OPERAND_IMM_8_S4
:
2470 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
);
2472 case M32C_OPERAND_IMM_SH_12_S4
:
2473 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
);
2475 case M32C_OPERAND_IMM_SH_20_S4
:
2476 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
);
2478 case M32C_OPERAND_IMM_SH_8_S4
:
2479 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
);
2481 case M32C_OPERAND_IMM1_S
:
2484 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 1, 32, total_length
, pc
, & value
);
2485 value
= ((value
) + (1));
2486 fields
->f_imm1_S
= value
;
2489 case M32C_OPERAND_IMM3_S
:
2491 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2492 if (length
<= 0) break;
2493 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2494 if (length
<= 0) break;
2496 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
2500 case M32C_OPERAND_LAB_16_8
:
2503 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
);
2504 value
= ((value
) + (((pc
) + (2))));
2505 fields
->f_lab_16_8
= value
;
2508 case M32C_OPERAND_LAB_24_8
:
2511 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
);
2512 value
= ((value
) + (((pc
) + (2))));
2513 fields
->f_lab_24_8
= value
;
2516 case M32C_OPERAND_LAB_32_8
:
2519 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
);
2520 value
= ((value
) + (((pc
) + (2))));
2521 fields
->f_lab_32_8
= value
;
2524 case M32C_OPERAND_LAB_40_8
:
2527 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
);
2528 value
= ((value
) + (((pc
) + (2))));
2529 fields
->f_lab_40_8
= value
;
2532 case M32C_OPERAND_LAB_5_3
:
2535 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, pc
, & value
);
2536 value
= ((value
) + (((pc
) + (2))));
2537 fields
->f_lab_5_3
= value
;
2540 case M32C_OPERAND_LAB_8_16
:
2543 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
);
2544 value
= ((((((unsigned int) (((value
) & (65535))) >> (8))) | (((int) (((((value
) & (255))) << (24))) >> (16))))) + (((pc
) + (1))));
2545 fields
->f_lab_8_16
= value
;
2548 case M32C_OPERAND_LAB_8_24
:
2551 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, pc
, & value
);
2552 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2553 fields
->f_lab_8_24
= value
;
2556 case M32C_OPERAND_LAB_8_8
:
2559 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
);
2560 value
= ((value
) + (((pc
) + (1))));
2561 fields
->f_lab_8_8
= value
;
2564 case M32C_OPERAND_LAB32_JMP_S
:
2566 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2567 if (length
<= 0) break;
2568 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2569 if (length
<= 0) break;
2571 FLD (f_lab32_jmp_s
) = ((pc
) + (((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (2))));
2575 case M32C_OPERAND_Q
:
2577 case M32C_OPERAND_R0
:
2579 case M32C_OPERAND_R0H
:
2581 case M32C_OPERAND_R0L
:
2583 case M32C_OPERAND_R1
:
2585 case M32C_OPERAND_R1R2R0
:
2587 case M32C_OPERAND_R2
:
2589 case M32C_OPERAND_R2R0
:
2591 case M32C_OPERAND_R3
:
2593 case M32C_OPERAND_R3R1
:
2595 case M32C_OPERAND_REGSETPOP
:
2596 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2598 case M32C_OPERAND_REGSETPUSH
:
2599 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2601 case M32C_OPERAND_RN16_PUSH_S
:
2602 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
2604 case M32C_OPERAND_S
:
2606 case M32C_OPERAND_SRC16AN
:
2607 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2609 case M32C_OPERAND_SRC16ANHI
:
2610 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2612 case M32C_OPERAND_SRC16ANQI
:
2613 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2615 case M32C_OPERAND_SRC16RNHI
:
2616 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2618 case M32C_OPERAND_SRC16RNQI
:
2619 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2621 case M32C_OPERAND_SRC32ANPREFIXED
:
2622 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2624 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
2625 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2627 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
2628 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2630 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
2631 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2633 case M32C_OPERAND_SRC32ANUNPREFIXED
:
2634 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2636 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
2637 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2639 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
2640 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2642 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
2643 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2645 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
2648 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2649 value
= ((((value
) + (2))) % (4));
2650 fields
->f_src32_rn_prefixed_HI
= value
;
2653 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
2656 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2657 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2658 fields
->f_src32_rn_prefixed_QI
= value
;
2661 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
2664 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2665 value
= ((value
) - (2));
2666 fields
->f_src32_rn_prefixed_SI
= value
;
2669 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
2672 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2673 value
= ((((value
) + (2))) % (4));
2674 fields
->f_src32_rn_unprefixed_HI
= value
;
2677 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
2680 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2681 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2682 fields
->f_src32_rn_unprefixed_QI
= value
;
2685 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
2688 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2689 value
= ((value
) - (2));
2690 fields
->f_src32_rn_unprefixed_SI
= value
;
2693 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
2694 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_5_1
);
2696 case M32C_OPERAND_X
:
2698 case M32C_OPERAND_Z
:
2700 case M32C_OPERAND_COND16_16
:
2701 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2703 case M32C_OPERAND_COND16_24
:
2704 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2706 case M32C_OPERAND_COND16_32
:
2707 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2709 case M32C_OPERAND_COND16C
:
2710 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2712 case M32C_OPERAND_COND16J
:
2713 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2715 case M32C_OPERAND_COND16J5
:
2716 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_cond16j_5
);
2718 case M32C_OPERAND_COND32
:
2720 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_9_1
);
2721 if (length
<= 0) break;
2722 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2723 if (length
<= 0) break;
2725 FLD (f_cond32
) = ((((FLD (f_9_1
)) << (3))) | (FLD (f_13_3
)));
2729 case M32C_OPERAND_COND32_16
:
2730 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2732 case M32C_OPERAND_COND32_24
:
2733 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2735 case M32C_OPERAND_COND32_32
:
2736 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2738 case M32C_OPERAND_COND32_40
:
2739 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2741 case M32C_OPERAND_COND32J
:
2743 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 1, 3, 32, total_length
, pc
, & fields
->f_1_3
);
2744 if (length
<= 0) break;
2745 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2746 if (length
<= 0) break;
2748 FLD (f_cond32j
) = ((((FLD (f_1_3
)) << (1))) | (FLD (f_7_1
)));
2752 case M32C_OPERAND_CR1_PREFIXED_32
:
2753 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2755 case M32C_OPERAND_CR1_UNPREFIXED_32
:
2756 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2758 case M32C_OPERAND_CR16
:
2759 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2761 case M32C_OPERAND_CR2_32
:
2762 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2764 case M32C_OPERAND_CR3_PREFIXED_32
:
2765 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2767 case M32C_OPERAND_CR3_UNPREFIXED_32
:
2768 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2770 case M32C_OPERAND_FLAGS16
:
2771 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2773 case M32C_OPERAND_FLAGS32
:
2774 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2776 case M32C_OPERAND_SCCOND32
:
2777 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2779 case M32C_OPERAND_SIZE
:
2783 /* xgettext:c-format */
2784 fprintf (stderr
, _("Unrecognized field %d while decoding insn.\n"),
2792 cgen_insert_fn
* const m32c_cgen_insert_handlers
[] =
2797 cgen_extract_fn
* const m32c_cgen_extract_handlers
[] =
2799 extract_insn_normal
,
2802 int m32c_cgen_get_int_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2803 bfd_vma
m32c_cgen_get_vma_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2805 /* Getting values from cgen_fields is handled by a collection of functions.
2806 They are distinguished by the type of the VALUE argument they return.
2807 TODO: floating point, inlining support, remove cases where result type
2811 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
2813 const CGEN_FIELDS
* fields
)
2819 case M32C_OPERAND_A0
:
2822 case M32C_OPERAND_A1
:
2825 case M32C_OPERAND_A1A0
:
2828 case M32C_OPERAND_AN16_PUSH_S
:
2829 value
= fields
->f_4_1
;
2831 case M32C_OPERAND_BIT16AN
:
2832 value
= fields
->f_dst16_an
;
2834 case M32C_OPERAND_BIT16RN
:
2835 value
= fields
->f_dst16_rn
;
2837 case M32C_OPERAND_BIT32ANPREFIXED
:
2838 value
= fields
->f_dst32_an_prefixed
;
2840 case M32C_OPERAND_BIT32ANUNPREFIXED
:
2841 value
= fields
->f_dst32_an_unprefixed
;
2843 case M32C_OPERAND_BIT32RNPREFIXED
:
2844 value
= fields
->f_dst32_rn_prefixed_QI
;
2846 case M32C_OPERAND_BIT32RNUNPREFIXED
:
2847 value
= fields
->f_dst32_rn_unprefixed_QI
;
2849 case M32C_OPERAND_BITBASE16_16_S8
:
2850 value
= fields
->f_dsp_16_s8
;
2852 case M32C_OPERAND_BITBASE16_16_U16
:
2853 value
= fields
->f_dsp_16_u16
;
2855 case M32C_OPERAND_BITBASE16_16_U8
:
2856 value
= fields
->f_dsp_16_u8
;
2858 case M32C_OPERAND_BITBASE16_8_U11_S
:
2859 value
= fields
->f_bitbase16_u11_S
;
2861 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
2862 value
= fields
->f_bitbase32_16_s11_unprefixed
;
2864 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
2865 value
= fields
->f_bitbase32_16_s19_unprefixed
;
2867 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
2868 value
= fields
->f_bitbase32_16_u11_unprefixed
;
2870 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
2871 value
= fields
->f_bitbase32_16_u19_unprefixed
;
2873 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
2874 value
= fields
->f_bitbase32_16_u27_unprefixed
;
2876 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
2877 value
= fields
->f_bitbase32_24_s11_prefixed
;
2879 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
2880 value
= fields
->f_bitbase32_24_s19_prefixed
;
2882 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
2883 value
= fields
->f_bitbase32_24_u11_prefixed
;
2885 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
2886 value
= fields
->f_bitbase32_24_u19_prefixed
;
2888 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
2889 value
= fields
->f_bitbase32_24_u27_prefixed
;
2891 case M32C_OPERAND_BITNO16R
:
2892 value
= fields
->f_dsp_16_u8
;
2894 case M32C_OPERAND_BITNO32PREFIXED
:
2895 value
= fields
->f_bitno32_prefixed
;
2897 case M32C_OPERAND_BITNO32UNPREFIXED
:
2898 value
= fields
->f_bitno32_unprefixed
;
2900 case M32C_OPERAND_DSP_10_U6
:
2901 value
= fields
->f_dsp_10_u6
;
2903 case M32C_OPERAND_DSP_16_S16
:
2904 value
= fields
->f_dsp_16_s16
;
2906 case M32C_OPERAND_DSP_16_S8
:
2907 value
= fields
->f_dsp_16_s8
;
2909 case M32C_OPERAND_DSP_16_U16
:
2910 value
= fields
->f_dsp_16_u16
;
2912 case M32C_OPERAND_DSP_16_U20
:
2913 value
= fields
->f_dsp_16_u24
;
2915 case M32C_OPERAND_DSP_16_U24
:
2916 value
= fields
->f_dsp_16_u24
;
2918 case M32C_OPERAND_DSP_16_U8
:
2919 value
= fields
->f_dsp_16_u8
;
2921 case M32C_OPERAND_DSP_24_S16
:
2922 value
= fields
->f_dsp_24_s16
;
2924 case M32C_OPERAND_DSP_24_S8
:
2925 value
= fields
->f_dsp_24_s8
;
2927 case M32C_OPERAND_DSP_24_U16
:
2928 value
= fields
->f_dsp_24_u16
;
2930 case M32C_OPERAND_DSP_24_U20
:
2931 value
= fields
->f_dsp_24_u24
;
2933 case M32C_OPERAND_DSP_24_U24
:
2934 value
= fields
->f_dsp_24_u24
;
2936 case M32C_OPERAND_DSP_24_U8
:
2937 value
= fields
->f_dsp_24_u8
;
2939 case M32C_OPERAND_DSP_32_S16
:
2940 value
= fields
->f_dsp_32_s16
;
2942 case M32C_OPERAND_DSP_32_S8
:
2943 value
= fields
->f_dsp_32_s8
;
2945 case M32C_OPERAND_DSP_32_U16
:
2946 value
= fields
->f_dsp_32_u16
;
2948 case M32C_OPERAND_DSP_32_U20
:
2949 value
= fields
->f_dsp_32_u24
;
2951 case M32C_OPERAND_DSP_32_U24
:
2952 value
= fields
->f_dsp_32_u24
;
2954 case M32C_OPERAND_DSP_32_U8
:
2955 value
= fields
->f_dsp_32_u8
;
2957 case M32C_OPERAND_DSP_40_S16
:
2958 value
= fields
->f_dsp_40_s16
;
2960 case M32C_OPERAND_DSP_40_S8
:
2961 value
= fields
->f_dsp_40_s8
;
2963 case M32C_OPERAND_DSP_40_U16
:
2964 value
= fields
->f_dsp_40_u16
;
2966 case M32C_OPERAND_DSP_40_U24
:
2967 value
= fields
->f_dsp_40_u24
;
2969 case M32C_OPERAND_DSP_40_U8
:
2970 value
= fields
->f_dsp_40_u8
;
2972 case M32C_OPERAND_DSP_48_S16
:
2973 value
= fields
->f_dsp_48_s16
;
2975 case M32C_OPERAND_DSP_48_S8
:
2976 value
= fields
->f_dsp_48_s8
;
2978 case M32C_OPERAND_DSP_48_U16
:
2979 value
= fields
->f_dsp_48_u16
;
2981 case M32C_OPERAND_DSP_48_U24
:
2982 value
= fields
->f_dsp_48_u24
;
2984 case M32C_OPERAND_DSP_48_U8
:
2985 value
= fields
->f_dsp_48_u8
;
2987 case M32C_OPERAND_DSP_8_S8
:
2988 value
= fields
->f_dsp_8_s8
;
2990 case M32C_OPERAND_DSP_8_U16
:
2991 value
= fields
->f_dsp_8_u16
;
2993 case M32C_OPERAND_DSP_8_U24
:
2994 value
= fields
->f_dsp_8_u24
;
2996 case M32C_OPERAND_DSP_8_U6
:
2997 value
= fields
->f_dsp_8_u6
;
2999 case M32C_OPERAND_DSP_8_U8
:
3000 value
= fields
->f_dsp_8_u8
;
3002 case M32C_OPERAND_DST16AN
:
3003 value
= fields
->f_dst16_an
;
3005 case M32C_OPERAND_DST16AN_S
:
3006 value
= fields
->f_dst16_an_s
;
3008 case M32C_OPERAND_DST16ANHI
:
3009 value
= fields
->f_dst16_an
;
3011 case M32C_OPERAND_DST16ANQI
:
3012 value
= fields
->f_dst16_an
;
3014 case M32C_OPERAND_DST16ANQI_S
:
3015 value
= fields
->f_dst16_rn_QI_s
;
3017 case M32C_OPERAND_DST16ANSI
:
3018 value
= fields
->f_dst16_an
;
3020 case M32C_OPERAND_DST16RNEXTQI
:
3021 value
= fields
->f_dst16_rn_ext
;
3023 case M32C_OPERAND_DST16RNHI
:
3024 value
= fields
->f_dst16_rn
;
3026 case M32C_OPERAND_DST16RNQI
:
3027 value
= fields
->f_dst16_rn
;
3029 case M32C_OPERAND_DST16RNQI_S
:
3030 value
= fields
->f_dst16_rn_QI_s
;
3032 case M32C_OPERAND_DST16RNSI
:
3033 value
= fields
->f_dst16_rn
;
3035 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3036 value
= fields
->f_dst32_an_unprefixed
;
3038 case M32C_OPERAND_DST32ANPREFIXED
:
3039 value
= fields
->f_dst32_an_prefixed
;
3041 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3042 value
= fields
->f_dst32_an_prefixed
;
3044 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3045 value
= fields
->f_dst32_an_prefixed
;
3047 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3048 value
= fields
->f_dst32_an_prefixed
;
3050 case M32C_OPERAND_DST32ANUNPREFIXED
:
3051 value
= fields
->f_dst32_an_unprefixed
;
3053 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3054 value
= fields
->f_dst32_an_unprefixed
;
3056 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3057 value
= fields
->f_dst32_an_unprefixed
;
3059 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3060 value
= fields
->f_dst32_an_unprefixed
;
3062 case M32C_OPERAND_DST32R0HI_S
:
3065 case M32C_OPERAND_DST32R0QI_S
:
3068 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3069 value
= fields
->f_dst32_rn_ext_unprefixed
;
3071 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3072 value
= fields
->f_dst32_rn_ext_unprefixed
;
3074 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3075 value
= fields
->f_dst32_rn_prefixed_HI
;
3077 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3078 value
= fields
->f_dst32_rn_prefixed_QI
;
3080 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3081 value
= fields
->f_dst32_rn_prefixed_SI
;
3083 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3084 value
= fields
->f_dst32_rn_unprefixed_HI
;
3086 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3087 value
= fields
->f_dst32_rn_unprefixed_QI
;
3089 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3090 value
= fields
->f_dst32_rn_unprefixed_SI
;
3092 case M32C_OPERAND_G
:
3095 case M32C_OPERAND_IMM_12_S4
:
3096 value
= fields
->f_imm_12_s4
;
3098 case M32C_OPERAND_IMM_13_U3
:
3099 value
= fields
->f_imm_13_u3
;
3101 case M32C_OPERAND_IMM_16_HI
:
3102 value
= fields
->f_dsp_16_s16
;
3104 case M32C_OPERAND_IMM_16_QI
:
3105 value
= fields
->f_dsp_16_s8
;
3107 case M32C_OPERAND_IMM_16_SI
:
3108 value
= fields
->f_dsp_16_s32
;
3110 case M32C_OPERAND_IMM_20_S4
:
3111 value
= fields
->f_imm_20_s4
;
3113 case M32C_OPERAND_IMM_24_HI
:
3114 value
= fields
->f_dsp_24_s16
;
3116 case M32C_OPERAND_IMM_24_QI
:
3117 value
= fields
->f_dsp_24_s8
;
3119 case M32C_OPERAND_IMM_24_SI
:
3120 value
= fields
->f_dsp_24_s32
;
3122 case M32C_OPERAND_IMM_32_HI
:
3123 value
= fields
->f_dsp_32_s16
;
3125 case M32C_OPERAND_IMM_32_QI
:
3126 value
= fields
->f_dsp_32_s8
;
3128 case M32C_OPERAND_IMM_32_SI
:
3129 value
= fields
->f_dsp_32_s32
;
3131 case M32C_OPERAND_IMM_40_HI
:
3132 value
= fields
->f_dsp_40_s16
;
3134 case M32C_OPERAND_IMM_40_QI
:
3135 value
= fields
->f_dsp_40_s8
;
3137 case M32C_OPERAND_IMM_40_SI
:
3138 value
= fields
->f_dsp_40_s32
;
3140 case M32C_OPERAND_IMM_48_HI
:
3141 value
= fields
->f_dsp_48_s16
;
3143 case M32C_OPERAND_IMM_48_QI
:
3144 value
= fields
->f_dsp_48_s8
;
3146 case M32C_OPERAND_IMM_48_SI
:
3147 value
= fields
->f_dsp_48_s32
;
3149 case M32C_OPERAND_IMM_56_HI
:
3150 value
= fields
->f_dsp_56_s16
;
3152 case M32C_OPERAND_IMM_56_QI
:
3153 value
= fields
->f_dsp_56_s8
;
3155 case M32C_OPERAND_IMM_64_HI
:
3156 value
= fields
->f_dsp_64_s16
;
3158 case M32C_OPERAND_IMM_8_HI
:
3159 value
= fields
->f_dsp_8_s16
;
3161 case M32C_OPERAND_IMM_8_QI
:
3162 value
= fields
->f_dsp_8_s8
;
3164 case M32C_OPERAND_IMM_8_S4
:
3165 value
= fields
->f_imm_8_s4
;
3167 case M32C_OPERAND_IMM_SH_12_S4
:
3168 value
= fields
->f_imm_12_s4
;
3170 case M32C_OPERAND_IMM_SH_20_S4
:
3171 value
= fields
->f_imm_20_s4
;
3173 case M32C_OPERAND_IMM_SH_8_S4
:
3174 value
= fields
->f_imm_8_s4
;
3176 case M32C_OPERAND_IMM1_S
:
3177 value
= fields
->f_imm1_S
;
3179 case M32C_OPERAND_IMM3_S
:
3180 value
= fields
->f_imm3_S
;
3182 case M32C_OPERAND_LAB_16_8
:
3183 value
= fields
->f_lab_16_8
;
3185 case M32C_OPERAND_LAB_24_8
:
3186 value
= fields
->f_lab_24_8
;
3188 case M32C_OPERAND_LAB_32_8
:
3189 value
= fields
->f_lab_32_8
;
3191 case M32C_OPERAND_LAB_40_8
:
3192 value
= fields
->f_lab_40_8
;
3194 case M32C_OPERAND_LAB_5_3
:
3195 value
= fields
->f_lab_5_3
;
3197 case M32C_OPERAND_LAB_8_16
:
3198 value
= fields
->f_lab_8_16
;
3200 case M32C_OPERAND_LAB_8_24
:
3201 value
= fields
->f_lab_8_24
;
3203 case M32C_OPERAND_LAB_8_8
:
3204 value
= fields
->f_lab_8_8
;
3206 case M32C_OPERAND_LAB32_JMP_S
:
3207 value
= fields
->f_lab32_jmp_s
;
3209 case M32C_OPERAND_Q
:
3212 case M32C_OPERAND_R0
:
3215 case M32C_OPERAND_R0H
:
3218 case M32C_OPERAND_R0L
:
3221 case M32C_OPERAND_R1
:
3224 case M32C_OPERAND_R1R2R0
:
3227 case M32C_OPERAND_R2
:
3230 case M32C_OPERAND_R2R0
:
3233 case M32C_OPERAND_R3
:
3236 case M32C_OPERAND_R3R1
:
3239 case M32C_OPERAND_REGSETPOP
:
3240 value
= fields
->f_8_8
;
3242 case M32C_OPERAND_REGSETPUSH
:
3243 value
= fields
->f_8_8
;
3245 case M32C_OPERAND_RN16_PUSH_S
:
3246 value
= fields
->f_4_1
;
3248 case M32C_OPERAND_S
:
3251 case M32C_OPERAND_SRC16AN
:
3252 value
= fields
->f_src16_an
;
3254 case M32C_OPERAND_SRC16ANHI
:
3255 value
= fields
->f_src16_an
;
3257 case M32C_OPERAND_SRC16ANQI
:
3258 value
= fields
->f_src16_an
;
3260 case M32C_OPERAND_SRC16RNHI
:
3261 value
= fields
->f_src16_rn
;
3263 case M32C_OPERAND_SRC16RNQI
:
3264 value
= fields
->f_src16_rn
;
3266 case M32C_OPERAND_SRC32ANPREFIXED
:
3267 value
= fields
->f_src32_an_prefixed
;
3269 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3270 value
= fields
->f_src32_an_prefixed
;
3272 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3273 value
= fields
->f_src32_an_prefixed
;
3275 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3276 value
= fields
->f_src32_an_prefixed
;
3278 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3279 value
= fields
->f_src32_an_unprefixed
;
3281 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3282 value
= fields
->f_src32_an_unprefixed
;
3284 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3285 value
= fields
->f_src32_an_unprefixed
;
3287 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3288 value
= fields
->f_src32_an_unprefixed
;
3290 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3291 value
= fields
->f_src32_rn_prefixed_HI
;
3293 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3294 value
= fields
->f_src32_rn_prefixed_QI
;
3296 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3297 value
= fields
->f_src32_rn_prefixed_SI
;
3299 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3300 value
= fields
->f_src32_rn_unprefixed_HI
;
3302 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3303 value
= fields
->f_src32_rn_unprefixed_QI
;
3305 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3306 value
= fields
->f_src32_rn_unprefixed_SI
;
3308 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3309 value
= fields
->f_5_1
;
3311 case M32C_OPERAND_X
:
3314 case M32C_OPERAND_Z
:
3317 case M32C_OPERAND_COND16_16
:
3318 value
= fields
->f_dsp_16_u8
;
3320 case M32C_OPERAND_COND16_24
:
3321 value
= fields
->f_dsp_24_u8
;
3323 case M32C_OPERAND_COND16_32
:
3324 value
= fields
->f_dsp_32_u8
;
3326 case M32C_OPERAND_COND16C
:
3327 value
= fields
->f_cond16
;
3329 case M32C_OPERAND_COND16J
:
3330 value
= fields
->f_cond16
;
3332 case M32C_OPERAND_COND16J5
:
3333 value
= fields
->f_cond16j_5
;
3335 case M32C_OPERAND_COND32
:
3336 value
= fields
->f_cond32
;
3338 case M32C_OPERAND_COND32_16
:
3339 value
= fields
->f_dsp_16_u8
;
3341 case M32C_OPERAND_COND32_24
:
3342 value
= fields
->f_dsp_24_u8
;
3344 case M32C_OPERAND_COND32_32
:
3345 value
= fields
->f_dsp_32_u8
;
3347 case M32C_OPERAND_COND32_40
:
3348 value
= fields
->f_dsp_40_u8
;
3350 case M32C_OPERAND_COND32J
:
3351 value
= fields
->f_cond32j
;
3353 case M32C_OPERAND_CR1_PREFIXED_32
:
3354 value
= fields
->f_21_3
;
3356 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3357 value
= fields
->f_13_3
;
3359 case M32C_OPERAND_CR16
:
3360 value
= fields
->f_9_3
;
3362 case M32C_OPERAND_CR2_32
:
3363 value
= fields
->f_13_3
;
3365 case M32C_OPERAND_CR3_PREFIXED_32
:
3366 value
= fields
->f_21_3
;
3368 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3369 value
= fields
->f_13_3
;
3371 case M32C_OPERAND_FLAGS16
:
3372 value
= fields
->f_9_3
;
3374 case M32C_OPERAND_FLAGS32
:
3375 value
= fields
->f_13_3
;
3377 case M32C_OPERAND_SCCOND32
:
3378 value
= fields
->f_cond16
;
3380 case M32C_OPERAND_SIZE
:
3385 /* xgettext:c-format */
3386 fprintf (stderr
, _("Unrecognized field %d while getting int operand.\n"),
3395 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3397 const CGEN_FIELDS
* fields
)
3403 case M32C_OPERAND_A0
:
3406 case M32C_OPERAND_A1
:
3409 case M32C_OPERAND_A1A0
:
3412 case M32C_OPERAND_AN16_PUSH_S
:
3413 value
= fields
->f_4_1
;
3415 case M32C_OPERAND_BIT16AN
:
3416 value
= fields
->f_dst16_an
;
3418 case M32C_OPERAND_BIT16RN
:
3419 value
= fields
->f_dst16_rn
;
3421 case M32C_OPERAND_BIT32ANPREFIXED
:
3422 value
= fields
->f_dst32_an_prefixed
;
3424 case M32C_OPERAND_BIT32ANUNPREFIXED
:
3425 value
= fields
->f_dst32_an_unprefixed
;
3427 case M32C_OPERAND_BIT32RNPREFIXED
:
3428 value
= fields
->f_dst32_rn_prefixed_QI
;
3430 case M32C_OPERAND_BIT32RNUNPREFIXED
:
3431 value
= fields
->f_dst32_rn_unprefixed_QI
;
3433 case M32C_OPERAND_BITBASE16_16_S8
:
3434 value
= fields
->f_dsp_16_s8
;
3436 case M32C_OPERAND_BITBASE16_16_U16
:
3437 value
= fields
->f_dsp_16_u16
;
3439 case M32C_OPERAND_BITBASE16_16_U8
:
3440 value
= fields
->f_dsp_16_u8
;
3442 case M32C_OPERAND_BITBASE16_8_U11_S
:
3443 value
= fields
->f_bitbase16_u11_S
;
3445 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
3446 value
= fields
->f_bitbase32_16_s11_unprefixed
;
3448 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
3449 value
= fields
->f_bitbase32_16_s19_unprefixed
;
3451 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
3452 value
= fields
->f_bitbase32_16_u11_unprefixed
;
3454 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
3455 value
= fields
->f_bitbase32_16_u19_unprefixed
;
3457 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
3458 value
= fields
->f_bitbase32_16_u27_unprefixed
;
3460 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
3461 value
= fields
->f_bitbase32_24_s11_prefixed
;
3463 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
3464 value
= fields
->f_bitbase32_24_s19_prefixed
;
3466 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
3467 value
= fields
->f_bitbase32_24_u11_prefixed
;
3469 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3470 value
= fields
->f_bitbase32_24_u19_prefixed
;
3472 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3473 value
= fields
->f_bitbase32_24_u27_prefixed
;
3475 case M32C_OPERAND_BITNO16R
:
3476 value
= fields
->f_dsp_16_u8
;
3478 case M32C_OPERAND_BITNO32PREFIXED
:
3479 value
= fields
->f_bitno32_prefixed
;
3481 case M32C_OPERAND_BITNO32UNPREFIXED
:
3482 value
= fields
->f_bitno32_unprefixed
;
3484 case M32C_OPERAND_DSP_10_U6
:
3485 value
= fields
->f_dsp_10_u6
;
3487 case M32C_OPERAND_DSP_16_S16
:
3488 value
= fields
->f_dsp_16_s16
;
3490 case M32C_OPERAND_DSP_16_S8
:
3491 value
= fields
->f_dsp_16_s8
;
3493 case M32C_OPERAND_DSP_16_U16
:
3494 value
= fields
->f_dsp_16_u16
;
3496 case M32C_OPERAND_DSP_16_U20
:
3497 value
= fields
->f_dsp_16_u24
;
3499 case M32C_OPERAND_DSP_16_U24
:
3500 value
= fields
->f_dsp_16_u24
;
3502 case M32C_OPERAND_DSP_16_U8
:
3503 value
= fields
->f_dsp_16_u8
;
3505 case M32C_OPERAND_DSP_24_S16
:
3506 value
= fields
->f_dsp_24_s16
;
3508 case M32C_OPERAND_DSP_24_S8
:
3509 value
= fields
->f_dsp_24_s8
;
3511 case M32C_OPERAND_DSP_24_U16
:
3512 value
= fields
->f_dsp_24_u16
;
3514 case M32C_OPERAND_DSP_24_U20
:
3515 value
= fields
->f_dsp_24_u24
;
3517 case M32C_OPERAND_DSP_24_U24
:
3518 value
= fields
->f_dsp_24_u24
;
3520 case M32C_OPERAND_DSP_24_U8
:
3521 value
= fields
->f_dsp_24_u8
;
3523 case M32C_OPERAND_DSP_32_S16
:
3524 value
= fields
->f_dsp_32_s16
;
3526 case M32C_OPERAND_DSP_32_S8
:
3527 value
= fields
->f_dsp_32_s8
;
3529 case M32C_OPERAND_DSP_32_U16
:
3530 value
= fields
->f_dsp_32_u16
;
3532 case M32C_OPERAND_DSP_32_U20
:
3533 value
= fields
->f_dsp_32_u24
;
3535 case M32C_OPERAND_DSP_32_U24
:
3536 value
= fields
->f_dsp_32_u24
;
3538 case M32C_OPERAND_DSP_32_U8
:
3539 value
= fields
->f_dsp_32_u8
;
3541 case M32C_OPERAND_DSP_40_S16
:
3542 value
= fields
->f_dsp_40_s16
;
3544 case M32C_OPERAND_DSP_40_S8
:
3545 value
= fields
->f_dsp_40_s8
;
3547 case M32C_OPERAND_DSP_40_U16
:
3548 value
= fields
->f_dsp_40_u16
;
3550 case M32C_OPERAND_DSP_40_U24
:
3551 value
= fields
->f_dsp_40_u24
;
3553 case M32C_OPERAND_DSP_40_U8
:
3554 value
= fields
->f_dsp_40_u8
;
3556 case M32C_OPERAND_DSP_48_S16
:
3557 value
= fields
->f_dsp_48_s16
;
3559 case M32C_OPERAND_DSP_48_S8
:
3560 value
= fields
->f_dsp_48_s8
;
3562 case M32C_OPERAND_DSP_48_U16
:
3563 value
= fields
->f_dsp_48_u16
;
3565 case M32C_OPERAND_DSP_48_U24
:
3566 value
= fields
->f_dsp_48_u24
;
3568 case M32C_OPERAND_DSP_48_U8
:
3569 value
= fields
->f_dsp_48_u8
;
3571 case M32C_OPERAND_DSP_8_S8
:
3572 value
= fields
->f_dsp_8_s8
;
3574 case M32C_OPERAND_DSP_8_U16
:
3575 value
= fields
->f_dsp_8_u16
;
3577 case M32C_OPERAND_DSP_8_U24
:
3578 value
= fields
->f_dsp_8_u24
;
3580 case M32C_OPERAND_DSP_8_U6
:
3581 value
= fields
->f_dsp_8_u6
;
3583 case M32C_OPERAND_DSP_8_U8
:
3584 value
= fields
->f_dsp_8_u8
;
3586 case M32C_OPERAND_DST16AN
:
3587 value
= fields
->f_dst16_an
;
3589 case M32C_OPERAND_DST16AN_S
:
3590 value
= fields
->f_dst16_an_s
;
3592 case M32C_OPERAND_DST16ANHI
:
3593 value
= fields
->f_dst16_an
;
3595 case M32C_OPERAND_DST16ANQI
:
3596 value
= fields
->f_dst16_an
;
3598 case M32C_OPERAND_DST16ANQI_S
:
3599 value
= fields
->f_dst16_rn_QI_s
;
3601 case M32C_OPERAND_DST16ANSI
:
3602 value
= fields
->f_dst16_an
;
3604 case M32C_OPERAND_DST16RNEXTQI
:
3605 value
= fields
->f_dst16_rn_ext
;
3607 case M32C_OPERAND_DST16RNHI
:
3608 value
= fields
->f_dst16_rn
;
3610 case M32C_OPERAND_DST16RNQI
:
3611 value
= fields
->f_dst16_rn
;
3613 case M32C_OPERAND_DST16RNQI_S
:
3614 value
= fields
->f_dst16_rn_QI_s
;
3616 case M32C_OPERAND_DST16RNSI
:
3617 value
= fields
->f_dst16_rn
;
3619 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3620 value
= fields
->f_dst32_an_unprefixed
;
3622 case M32C_OPERAND_DST32ANPREFIXED
:
3623 value
= fields
->f_dst32_an_prefixed
;
3625 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3626 value
= fields
->f_dst32_an_prefixed
;
3628 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3629 value
= fields
->f_dst32_an_prefixed
;
3631 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3632 value
= fields
->f_dst32_an_prefixed
;
3634 case M32C_OPERAND_DST32ANUNPREFIXED
:
3635 value
= fields
->f_dst32_an_unprefixed
;
3637 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3638 value
= fields
->f_dst32_an_unprefixed
;
3640 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3641 value
= fields
->f_dst32_an_unprefixed
;
3643 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3644 value
= fields
->f_dst32_an_unprefixed
;
3646 case M32C_OPERAND_DST32R0HI_S
:
3649 case M32C_OPERAND_DST32R0QI_S
:
3652 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3653 value
= fields
->f_dst32_rn_ext_unprefixed
;
3655 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3656 value
= fields
->f_dst32_rn_ext_unprefixed
;
3658 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3659 value
= fields
->f_dst32_rn_prefixed_HI
;
3661 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3662 value
= fields
->f_dst32_rn_prefixed_QI
;
3664 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3665 value
= fields
->f_dst32_rn_prefixed_SI
;
3667 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3668 value
= fields
->f_dst32_rn_unprefixed_HI
;
3670 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3671 value
= fields
->f_dst32_rn_unprefixed_QI
;
3673 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3674 value
= fields
->f_dst32_rn_unprefixed_SI
;
3676 case M32C_OPERAND_G
:
3679 case M32C_OPERAND_IMM_12_S4
:
3680 value
= fields
->f_imm_12_s4
;
3682 case M32C_OPERAND_IMM_13_U3
:
3683 value
= fields
->f_imm_13_u3
;
3685 case M32C_OPERAND_IMM_16_HI
:
3686 value
= fields
->f_dsp_16_s16
;
3688 case M32C_OPERAND_IMM_16_QI
:
3689 value
= fields
->f_dsp_16_s8
;
3691 case M32C_OPERAND_IMM_16_SI
:
3692 value
= fields
->f_dsp_16_s32
;
3694 case M32C_OPERAND_IMM_20_S4
:
3695 value
= fields
->f_imm_20_s4
;
3697 case M32C_OPERAND_IMM_24_HI
:
3698 value
= fields
->f_dsp_24_s16
;
3700 case M32C_OPERAND_IMM_24_QI
:
3701 value
= fields
->f_dsp_24_s8
;
3703 case M32C_OPERAND_IMM_24_SI
:
3704 value
= fields
->f_dsp_24_s32
;
3706 case M32C_OPERAND_IMM_32_HI
:
3707 value
= fields
->f_dsp_32_s16
;
3709 case M32C_OPERAND_IMM_32_QI
:
3710 value
= fields
->f_dsp_32_s8
;
3712 case M32C_OPERAND_IMM_32_SI
:
3713 value
= fields
->f_dsp_32_s32
;
3715 case M32C_OPERAND_IMM_40_HI
:
3716 value
= fields
->f_dsp_40_s16
;
3718 case M32C_OPERAND_IMM_40_QI
:
3719 value
= fields
->f_dsp_40_s8
;
3721 case M32C_OPERAND_IMM_40_SI
:
3722 value
= fields
->f_dsp_40_s32
;
3724 case M32C_OPERAND_IMM_48_HI
:
3725 value
= fields
->f_dsp_48_s16
;
3727 case M32C_OPERAND_IMM_48_QI
:
3728 value
= fields
->f_dsp_48_s8
;
3730 case M32C_OPERAND_IMM_48_SI
:
3731 value
= fields
->f_dsp_48_s32
;
3733 case M32C_OPERAND_IMM_56_HI
:
3734 value
= fields
->f_dsp_56_s16
;
3736 case M32C_OPERAND_IMM_56_QI
:
3737 value
= fields
->f_dsp_56_s8
;
3739 case M32C_OPERAND_IMM_64_HI
:
3740 value
= fields
->f_dsp_64_s16
;
3742 case M32C_OPERAND_IMM_8_HI
:
3743 value
= fields
->f_dsp_8_s16
;
3745 case M32C_OPERAND_IMM_8_QI
:
3746 value
= fields
->f_dsp_8_s8
;
3748 case M32C_OPERAND_IMM_8_S4
:
3749 value
= fields
->f_imm_8_s4
;
3751 case M32C_OPERAND_IMM_SH_12_S4
:
3752 value
= fields
->f_imm_12_s4
;
3754 case M32C_OPERAND_IMM_SH_20_S4
:
3755 value
= fields
->f_imm_20_s4
;
3757 case M32C_OPERAND_IMM_SH_8_S4
:
3758 value
= fields
->f_imm_8_s4
;
3760 case M32C_OPERAND_IMM1_S
:
3761 value
= fields
->f_imm1_S
;
3763 case M32C_OPERAND_IMM3_S
:
3764 value
= fields
->f_imm3_S
;
3766 case M32C_OPERAND_LAB_16_8
:
3767 value
= fields
->f_lab_16_8
;
3769 case M32C_OPERAND_LAB_24_8
:
3770 value
= fields
->f_lab_24_8
;
3772 case M32C_OPERAND_LAB_32_8
:
3773 value
= fields
->f_lab_32_8
;
3775 case M32C_OPERAND_LAB_40_8
:
3776 value
= fields
->f_lab_40_8
;
3778 case M32C_OPERAND_LAB_5_3
:
3779 value
= fields
->f_lab_5_3
;
3781 case M32C_OPERAND_LAB_8_16
:
3782 value
= fields
->f_lab_8_16
;
3784 case M32C_OPERAND_LAB_8_24
:
3785 value
= fields
->f_lab_8_24
;
3787 case M32C_OPERAND_LAB_8_8
:
3788 value
= fields
->f_lab_8_8
;
3790 case M32C_OPERAND_LAB32_JMP_S
:
3791 value
= fields
->f_lab32_jmp_s
;
3793 case M32C_OPERAND_Q
:
3796 case M32C_OPERAND_R0
:
3799 case M32C_OPERAND_R0H
:
3802 case M32C_OPERAND_R0L
:
3805 case M32C_OPERAND_R1
:
3808 case M32C_OPERAND_R1R2R0
:
3811 case M32C_OPERAND_R2
:
3814 case M32C_OPERAND_R2R0
:
3817 case M32C_OPERAND_R3
:
3820 case M32C_OPERAND_R3R1
:
3823 case M32C_OPERAND_REGSETPOP
:
3824 value
= fields
->f_8_8
;
3826 case M32C_OPERAND_REGSETPUSH
:
3827 value
= fields
->f_8_8
;
3829 case M32C_OPERAND_RN16_PUSH_S
:
3830 value
= fields
->f_4_1
;
3832 case M32C_OPERAND_S
:
3835 case M32C_OPERAND_SRC16AN
:
3836 value
= fields
->f_src16_an
;
3838 case M32C_OPERAND_SRC16ANHI
:
3839 value
= fields
->f_src16_an
;
3841 case M32C_OPERAND_SRC16ANQI
:
3842 value
= fields
->f_src16_an
;
3844 case M32C_OPERAND_SRC16RNHI
:
3845 value
= fields
->f_src16_rn
;
3847 case M32C_OPERAND_SRC16RNQI
:
3848 value
= fields
->f_src16_rn
;
3850 case M32C_OPERAND_SRC32ANPREFIXED
:
3851 value
= fields
->f_src32_an_prefixed
;
3853 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3854 value
= fields
->f_src32_an_prefixed
;
3856 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3857 value
= fields
->f_src32_an_prefixed
;
3859 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3860 value
= fields
->f_src32_an_prefixed
;
3862 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3863 value
= fields
->f_src32_an_unprefixed
;
3865 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3866 value
= fields
->f_src32_an_unprefixed
;
3868 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3869 value
= fields
->f_src32_an_unprefixed
;
3871 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3872 value
= fields
->f_src32_an_unprefixed
;
3874 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3875 value
= fields
->f_src32_rn_prefixed_HI
;
3877 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3878 value
= fields
->f_src32_rn_prefixed_QI
;
3880 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3881 value
= fields
->f_src32_rn_prefixed_SI
;
3883 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3884 value
= fields
->f_src32_rn_unprefixed_HI
;
3886 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3887 value
= fields
->f_src32_rn_unprefixed_QI
;
3889 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3890 value
= fields
->f_src32_rn_unprefixed_SI
;
3892 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3893 value
= fields
->f_5_1
;
3895 case M32C_OPERAND_X
:
3898 case M32C_OPERAND_Z
:
3901 case M32C_OPERAND_COND16_16
:
3902 value
= fields
->f_dsp_16_u8
;
3904 case M32C_OPERAND_COND16_24
:
3905 value
= fields
->f_dsp_24_u8
;
3907 case M32C_OPERAND_COND16_32
:
3908 value
= fields
->f_dsp_32_u8
;
3910 case M32C_OPERAND_COND16C
:
3911 value
= fields
->f_cond16
;
3913 case M32C_OPERAND_COND16J
:
3914 value
= fields
->f_cond16
;
3916 case M32C_OPERAND_COND16J5
:
3917 value
= fields
->f_cond16j_5
;
3919 case M32C_OPERAND_COND32
:
3920 value
= fields
->f_cond32
;
3922 case M32C_OPERAND_COND32_16
:
3923 value
= fields
->f_dsp_16_u8
;
3925 case M32C_OPERAND_COND32_24
:
3926 value
= fields
->f_dsp_24_u8
;
3928 case M32C_OPERAND_COND32_32
:
3929 value
= fields
->f_dsp_32_u8
;
3931 case M32C_OPERAND_COND32_40
:
3932 value
= fields
->f_dsp_40_u8
;
3934 case M32C_OPERAND_COND32J
:
3935 value
= fields
->f_cond32j
;
3937 case M32C_OPERAND_CR1_PREFIXED_32
:
3938 value
= fields
->f_21_3
;
3940 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3941 value
= fields
->f_13_3
;
3943 case M32C_OPERAND_CR16
:
3944 value
= fields
->f_9_3
;
3946 case M32C_OPERAND_CR2_32
:
3947 value
= fields
->f_13_3
;
3949 case M32C_OPERAND_CR3_PREFIXED_32
:
3950 value
= fields
->f_21_3
;
3952 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3953 value
= fields
->f_13_3
;
3955 case M32C_OPERAND_FLAGS16
:
3956 value
= fields
->f_9_3
;
3958 case M32C_OPERAND_FLAGS32
:
3959 value
= fields
->f_13_3
;
3961 case M32C_OPERAND_SCCOND32
:
3962 value
= fields
->f_cond16
;
3964 case M32C_OPERAND_SIZE
:
3969 /* xgettext:c-format */
3970 fprintf (stderr
, _("Unrecognized field %d while getting vma operand.\n"),
3978 void m32c_cgen_set_int_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, int);
3979 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, bfd_vma
);
3981 /* Stuffing values in cgen_fields is handled by a collection of functions.
3982 They are distinguished by the type of the VALUE argument they accept.
3983 TODO: floating point, inlining support, remove cases where argument type
3987 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3989 CGEN_FIELDS
* fields
,
3994 case M32C_OPERAND_A0
:
3996 case M32C_OPERAND_A1
:
3998 case M32C_OPERAND_A1A0
:
4000 case M32C_OPERAND_AN16_PUSH_S
:
4001 fields
->f_4_1
= value
;
4003 case M32C_OPERAND_BIT16AN
:
4004 fields
->f_dst16_an
= value
;
4006 case M32C_OPERAND_BIT16RN
:
4007 fields
->f_dst16_rn
= value
;
4009 case M32C_OPERAND_BIT32ANPREFIXED
:
4010 fields
->f_dst32_an_prefixed
= value
;
4012 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4013 fields
->f_dst32_an_unprefixed
= value
;
4015 case M32C_OPERAND_BIT32RNPREFIXED
:
4016 fields
->f_dst32_rn_prefixed_QI
= value
;
4018 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4019 fields
->f_dst32_rn_unprefixed_QI
= value
;
4021 case M32C_OPERAND_BITBASE16_16_S8
:
4022 fields
->f_dsp_16_s8
= value
;
4024 case M32C_OPERAND_BITBASE16_16_U16
:
4025 fields
->f_dsp_16_u16
= value
;
4027 case M32C_OPERAND_BITBASE16_16_U8
:
4028 fields
->f_dsp_16_u8
= value
;
4030 case M32C_OPERAND_BITBASE16_8_U11_S
:
4031 fields
->f_bitbase16_u11_S
= value
;
4033 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4034 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4036 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4037 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4039 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4040 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4042 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4043 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4045 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4046 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4048 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4049 fields
->f_bitbase32_24_s11_prefixed
= value
;
4051 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4052 fields
->f_bitbase32_24_s19_prefixed
= value
;
4054 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4055 fields
->f_bitbase32_24_u11_prefixed
= value
;
4057 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4058 fields
->f_bitbase32_24_u19_prefixed
= value
;
4060 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4061 fields
->f_bitbase32_24_u27_prefixed
= value
;
4063 case M32C_OPERAND_BITNO16R
:
4064 fields
->f_dsp_16_u8
= value
;
4066 case M32C_OPERAND_BITNO32PREFIXED
:
4067 fields
->f_bitno32_prefixed
= value
;
4069 case M32C_OPERAND_BITNO32UNPREFIXED
:
4070 fields
->f_bitno32_unprefixed
= value
;
4072 case M32C_OPERAND_DSP_10_U6
:
4073 fields
->f_dsp_10_u6
= value
;
4075 case M32C_OPERAND_DSP_16_S16
:
4076 fields
->f_dsp_16_s16
= value
;
4078 case M32C_OPERAND_DSP_16_S8
:
4079 fields
->f_dsp_16_s8
= value
;
4081 case M32C_OPERAND_DSP_16_U16
:
4082 fields
->f_dsp_16_u16
= value
;
4084 case M32C_OPERAND_DSP_16_U20
:
4085 fields
->f_dsp_16_u24
= value
;
4087 case M32C_OPERAND_DSP_16_U24
:
4088 fields
->f_dsp_16_u24
= value
;
4090 case M32C_OPERAND_DSP_16_U8
:
4091 fields
->f_dsp_16_u8
= value
;
4093 case M32C_OPERAND_DSP_24_S16
:
4094 fields
->f_dsp_24_s16
= value
;
4096 case M32C_OPERAND_DSP_24_S8
:
4097 fields
->f_dsp_24_s8
= value
;
4099 case M32C_OPERAND_DSP_24_U16
:
4100 fields
->f_dsp_24_u16
= value
;
4102 case M32C_OPERAND_DSP_24_U20
:
4103 fields
->f_dsp_24_u24
= value
;
4105 case M32C_OPERAND_DSP_24_U24
:
4106 fields
->f_dsp_24_u24
= value
;
4108 case M32C_OPERAND_DSP_24_U8
:
4109 fields
->f_dsp_24_u8
= value
;
4111 case M32C_OPERAND_DSP_32_S16
:
4112 fields
->f_dsp_32_s16
= value
;
4114 case M32C_OPERAND_DSP_32_S8
:
4115 fields
->f_dsp_32_s8
= value
;
4117 case M32C_OPERAND_DSP_32_U16
:
4118 fields
->f_dsp_32_u16
= value
;
4120 case M32C_OPERAND_DSP_32_U20
:
4121 fields
->f_dsp_32_u24
= value
;
4123 case M32C_OPERAND_DSP_32_U24
:
4124 fields
->f_dsp_32_u24
= value
;
4126 case M32C_OPERAND_DSP_32_U8
:
4127 fields
->f_dsp_32_u8
= value
;
4129 case M32C_OPERAND_DSP_40_S16
:
4130 fields
->f_dsp_40_s16
= value
;
4132 case M32C_OPERAND_DSP_40_S8
:
4133 fields
->f_dsp_40_s8
= value
;
4135 case M32C_OPERAND_DSP_40_U16
:
4136 fields
->f_dsp_40_u16
= value
;
4138 case M32C_OPERAND_DSP_40_U24
:
4139 fields
->f_dsp_40_u24
= value
;
4141 case M32C_OPERAND_DSP_40_U8
:
4142 fields
->f_dsp_40_u8
= value
;
4144 case M32C_OPERAND_DSP_48_S16
:
4145 fields
->f_dsp_48_s16
= value
;
4147 case M32C_OPERAND_DSP_48_S8
:
4148 fields
->f_dsp_48_s8
= value
;
4150 case M32C_OPERAND_DSP_48_U16
:
4151 fields
->f_dsp_48_u16
= value
;
4153 case M32C_OPERAND_DSP_48_U24
:
4154 fields
->f_dsp_48_u24
= value
;
4156 case M32C_OPERAND_DSP_48_U8
:
4157 fields
->f_dsp_48_u8
= value
;
4159 case M32C_OPERAND_DSP_8_S8
:
4160 fields
->f_dsp_8_s8
= value
;
4162 case M32C_OPERAND_DSP_8_U16
:
4163 fields
->f_dsp_8_u16
= value
;
4165 case M32C_OPERAND_DSP_8_U24
:
4166 fields
->f_dsp_8_u24
= value
;
4168 case M32C_OPERAND_DSP_8_U6
:
4169 fields
->f_dsp_8_u6
= value
;
4171 case M32C_OPERAND_DSP_8_U8
:
4172 fields
->f_dsp_8_u8
= value
;
4174 case M32C_OPERAND_DST16AN
:
4175 fields
->f_dst16_an
= value
;
4177 case M32C_OPERAND_DST16AN_S
:
4178 fields
->f_dst16_an_s
= value
;
4180 case M32C_OPERAND_DST16ANHI
:
4181 fields
->f_dst16_an
= value
;
4183 case M32C_OPERAND_DST16ANQI
:
4184 fields
->f_dst16_an
= value
;
4186 case M32C_OPERAND_DST16ANQI_S
:
4187 fields
->f_dst16_rn_QI_s
= value
;
4189 case M32C_OPERAND_DST16ANSI
:
4190 fields
->f_dst16_an
= value
;
4192 case M32C_OPERAND_DST16RNEXTQI
:
4193 fields
->f_dst16_rn_ext
= value
;
4195 case M32C_OPERAND_DST16RNHI
:
4196 fields
->f_dst16_rn
= value
;
4198 case M32C_OPERAND_DST16RNQI
:
4199 fields
->f_dst16_rn
= value
;
4201 case M32C_OPERAND_DST16RNQI_S
:
4202 fields
->f_dst16_rn_QI_s
= value
;
4204 case M32C_OPERAND_DST16RNSI
:
4205 fields
->f_dst16_rn
= value
;
4207 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4208 fields
->f_dst32_an_unprefixed
= value
;
4210 case M32C_OPERAND_DST32ANPREFIXED
:
4211 fields
->f_dst32_an_prefixed
= value
;
4213 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4214 fields
->f_dst32_an_prefixed
= value
;
4216 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4217 fields
->f_dst32_an_prefixed
= value
;
4219 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4220 fields
->f_dst32_an_prefixed
= value
;
4222 case M32C_OPERAND_DST32ANUNPREFIXED
:
4223 fields
->f_dst32_an_unprefixed
= value
;
4225 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4226 fields
->f_dst32_an_unprefixed
= value
;
4228 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4229 fields
->f_dst32_an_unprefixed
= value
;
4231 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4232 fields
->f_dst32_an_unprefixed
= value
;
4234 case M32C_OPERAND_DST32R0HI_S
:
4236 case M32C_OPERAND_DST32R0QI_S
:
4238 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4239 fields
->f_dst32_rn_ext_unprefixed
= value
;
4241 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4242 fields
->f_dst32_rn_ext_unprefixed
= value
;
4244 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4245 fields
->f_dst32_rn_prefixed_HI
= value
;
4247 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4248 fields
->f_dst32_rn_prefixed_QI
= value
;
4250 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4251 fields
->f_dst32_rn_prefixed_SI
= value
;
4253 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4254 fields
->f_dst32_rn_unprefixed_HI
= value
;
4256 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4257 fields
->f_dst32_rn_unprefixed_QI
= value
;
4259 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4260 fields
->f_dst32_rn_unprefixed_SI
= value
;
4262 case M32C_OPERAND_G
:
4264 case M32C_OPERAND_IMM_12_S4
:
4265 fields
->f_imm_12_s4
= value
;
4267 case M32C_OPERAND_IMM_13_U3
:
4268 fields
->f_imm_13_u3
= value
;
4270 case M32C_OPERAND_IMM_16_HI
:
4271 fields
->f_dsp_16_s16
= value
;
4273 case M32C_OPERAND_IMM_16_QI
:
4274 fields
->f_dsp_16_s8
= value
;
4276 case M32C_OPERAND_IMM_16_SI
:
4277 fields
->f_dsp_16_s32
= value
;
4279 case M32C_OPERAND_IMM_20_S4
:
4280 fields
->f_imm_20_s4
= value
;
4282 case M32C_OPERAND_IMM_24_HI
:
4283 fields
->f_dsp_24_s16
= value
;
4285 case M32C_OPERAND_IMM_24_QI
:
4286 fields
->f_dsp_24_s8
= value
;
4288 case M32C_OPERAND_IMM_24_SI
:
4289 fields
->f_dsp_24_s32
= value
;
4291 case M32C_OPERAND_IMM_32_HI
:
4292 fields
->f_dsp_32_s16
= value
;
4294 case M32C_OPERAND_IMM_32_QI
:
4295 fields
->f_dsp_32_s8
= value
;
4297 case M32C_OPERAND_IMM_32_SI
:
4298 fields
->f_dsp_32_s32
= value
;
4300 case M32C_OPERAND_IMM_40_HI
:
4301 fields
->f_dsp_40_s16
= value
;
4303 case M32C_OPERAND_IMM_40_QI
:
4304 fields
->f_dsp_40_s8
= value
;
4306 case M32C_OPERAND_IMM_40_SI
:
4307 fields
->f_dsp_40_s32
= value
;
4309 case M32C_OPERAND_IMM_48_HI
:
4310 fields
->f_dsp_48_s16
= value
;
4312 case M32C_OPERAND_IMM_48_QI
:
4313 fields
->f_dsp_48_s8
= value
;
4315 case M32C_OPERAND_IMM_48_SI
:
4316 fields
->f_dsp_48_s32
= value
;
4318 case M32C_OPERAND_IMM_56_HI
:
4319 fields
->f_dsp_56_s16
= value
;
4321 case M32C_OPERAND_IMM_56_QI
:
4322 fields
->f_dsp_56_s8
= value
;
4324 case M32C_OPERAND_IMM_64_HI
:
4325 fields
->f_dsp_64_s16
= value
;
4327 case M32C_OPERAND_IMM_8_HI
:
4328 fields
->f_dsp_8_s16
= value
;
4330 case M32C_OPERAND_IMM_8_QI
:
4331 fields
->f_dsp_8_s8
= value
;
4333 case M32C_OPERAND_IMM_8_S4
:
4334 fields
->f_imm_8_s4
= value
;
4336 case M32C_OPERAND_IMM_SH_12_S4
:
4337 fields
->f_imm_12_s4
= value
;
4339 case M32C_OPERAND_IMM_SH_20_S4
:
4340 fields
->f_imm_20_s4
= value
;
4342 case M32C_OPERAND_IMM_SH_8_S4
:
4343 fields
->f_imm_8_s4
= value
;
4345 case M32C_OPERAND_IMM1_S
:
4346 fields
->f_imm1_S
= value
;
4348 case M32C_OPERAND_IMM3_S
:
4349 fields
->f_imm3_S
= value
;
4351 case M32C_OPERAND_LAB_16_8
:
4352 fields
->f_lab_16_8
= value
;
4354 case M32C_OPERAND_LAB_24_8
:
4355 fields
->f_lab_24_8
= value
;
4357 case M32C_OPERAND_LAB_32_8
:
4358 fields
->f_lab_32_8
= value
;
4360 case M32C_OPERAND_LAB_40_8
:
4361 fields
->f_lab_40_8
= value
;
4363 case M32C_OPERAND_LAB_5_3
:
4364 fields
->f_lab_5_3
= value
;
4366 case M32C_OPERAND_LAB_8_16
:
4367 fields
->f_lab_8_16
= value
;
4369 case M32C_OPERAND_LAB_8_24
:
4370 fields
->f_lab_8_24
= value
;
4372 case M32C_OPERAND_LAB_8_8
:
4373 fields
->f_lab_8_8
= value
;
4375 case M32C_OPERAND_LAB32_JMP_S
:
4376 fields
->f_lab32_jmp_s
= value
;
4378 case M32C_OPERAND_Q
:
4380 case M32C_OPERAND_R0
:
4382 case M32C_OPERAND_R0H
:
4384 case M32C_OPERAND_R0L
:
4386 case M32C_OPERAND_R1
:
4388 case M32C_OPERAND_R1R2R0
:
4390 case M32C_OPERAND_R2
:
4392 case M32C_OPERAND_R2R0
:
4394 case M32C_OPERAND_R3
:
4396 case M32C_OPERAND_R3R1
:
4398 case M32C_OPERAND_REGSETPOP
:
4399 fields
->f_8_8
= value
;
4401 case M32C_OPERAND_REGSETPUSH
:
4402 fields
->f_8_8
= value
;
4404 case M32C_OPERAND_RN16_PUSH_S
:
4405 fields
->f_4_1
= value
;
4407 case M32C_OPERAND_S
:
4409 case M32C_OPERAND_SRC16AN
:
4410 fields
->f_src16_an
= value
;
4412 case M32C_OPERAND_SRC16ANHI
:
4413 fields
->f_src16_an
= value
;
4415 case M32C_OPERAND_SRC16ANQI
:
4416 fields
->f_src16_an
= value
;
4418 case M32C_OPERAND_SRC16RNHI
:
4419 fields
->f_src16_rn
= value
;
4421 case M32C_OPERAND_SRC16RNQI
:
4422 fields
->f_src16_rn
= value
;
4424 case M32C_OPERAND_SRC32ANPREFIXED
:
4425 fields
->f_src32_an_prefixed
= value
;
4427 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4428 fields
->f_src32_an_prefixed
= value
;
4430 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4431 fields
->f_src32_an_prefixed
= value
;
4433 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4434 fields
->f_src32_an_prefixed
= value
;
4436 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4437 fields
->f_src32_an_unprefixed
= value
;
4439 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4440 fields
->f_src32_an_unprefixed
= value
;
4442 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4443 fields
->f_src32_an_unprefixed
= value
;
4445 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4446 fields
->f_src32_an_unprefixed
= value
;
4448 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4449 fields
->f_src32_rn_prefixed_HI
= value
;
4451 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4452 fields
->f_src32_rn_prefixed_QI
= value
;
4454 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4455 fields
->f_src32_rn_prefixed_SI
= value
;
4457 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4458 fields
->f_src32_rn_unprefixed_HI
= value
;
4460 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4461 fields
->f_src32_rn_unprefixed_QI
= value
;
4463 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4464 fields
->f_src32_rn_unprefixed_SI
= value
;
4466 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4467 fields
->f_5_1
= value
;
4469 case M32C_OPERAND_X
:
4471 case M32C_OPERAND_Z
:
4473 case M32C_OPERAND_COND16_16
:
4474 fields
->f_dsp_16_u8
= value
;
4476 case M32C_OPERAND_COND16_24
:
4477 fields
->f_dsp_24_u8
= value
;
4479 case M32C_OPERAND_COND16_32
:
4480 fields
->f_dsp_32_u8
= value
;
4482 case M32C_OPERAND_COND16C
:
4483 fields
->f_cond16
= value
;
4485 case M32C_OPERAND_COND16J
:
4486 fields
->f_cond16
= value
;
4488 case M32C_OPERAND_COND16J5
:
4489 fields
->f_cond16j_5
= value
;
4491 case M32C_OPERAND_COND32
:
4492 fields
->f_cond32
= value
;
4494 case M32C_OPERAND_COND32_16
:
4495 fields
->f_dsp_16_u8
= value
;
4497 case M32C_OPERAND_COND32_24
:
4498 fields
->f_dsp_24_u8
= value
;
4500 case M32C_OPERAND_COND32_32
:
4501 fields
->f_dsp_32_u8
= value
;
4503 case M32C_OPERAND_COND32_40
:
4504 fields
->f_dsp_40_u8
= value
;
4506 case M32C_OPERAND_COND32J
:
4507 fields
->f_cond32j
= value
;
4509 case M32C_OPERAND_CR1_PREFIXED_32
:
4510 fields
->f_21_3
= value
;
4512 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4513 fields
->f_13_3
= value
;
4515 case M32C_OPERAND_CR16
:
4516 fields
->f_9_3
= value
;
4518 case M32C_OPERAND_CR2_32
:
4519 fields
->f_13_3
= value
;
4521 case M32C_OPERAND_CR3_PREFIXED_32
:
4522 fields
->f_21_3
= value
;
4524 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4525 fields
->f_13_3
= value
;
4527 case M32C_OPERAND_FLAGS16
:
4528 fields
->f_9_3
= value
;
4530 case M32C_OPERAND_FLAGS32
:
4531 fields
->f_13_3
= value
;
4533 case M32C_OPERAND_SCCOND32
:
4534 fields
->f_cond16
= value
;
4536 case M32C_OPERAND_SIZE
:
4540 /* xgettext:c-format */
4541 fprintf (stderr
, _("Unrecognized field %d while setting int operand.\n"),
4548 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4550 CGEN_FIELDS
* fields
,
4555 case M32C_OPERAND_A0
:
4557 case M32C_OPERAND_A1
:
4559 case M32C_OPERAND_A1A0
:
4561 case M32C_OPERAND_AN16_PUSH_S
:
4562 fields
->f_4_1
= value
;
4564 case M32C_OPERAND_BIT16AN
:
4565 fields
->f_dst16_an
= value
;
4567 case M32C_OPERAND_BIT16RN
:
4568 fields
->f_dst16_rn
= value
;
4570 case M32C_OPERAND_BIT32ANPREFIXED
:
4571 fields
->f_dst32_an_prefixed
= value
;
4573 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4574 fields
->f_dst32_an_unprefixed
= value
;
4576 case M32C_OPERAND_BIT32RNPREFIXED
:
4577 fields
->f_dst32_rn_prefixed_QI
= value
;
4579 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4580 fields
->f_dst32_rn_unprefixed_QI
= value
;
4582 case M32C_OPERAND_BITBASE16_16_S8
:
4583 fields
->f_dsp_16_s8
= value
;
4585 case M32C_OPERAND_BITBASE16_16_U16
:
4586 fields
->f_dsp_16_u16
= value
;
4588 case M32C_OPERAND_BITBASE16_16_U8
:
4589 fields
->f_dsp_16_u8
= value
;
4591 case M32C_OPERAND_BITBASE16_8_U11_S
:
4592 fields
->f_bitbase16_u11_S
= value
;
4594 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4595 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4597 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4598 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4600 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4601 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4603 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4604 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4606 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4607 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4609 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4610 fields
->f_bitbase32_24_s11_prefixed
= value
;
4612 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4613 fields
->f_bitbase32_24_s19_prefixed
= value
;
4615 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4616 fields
->f_bitbase32_24_u11_prefixed
= value
;
4618 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4619 fields
->f_bitbase32_24_u19_prefixed
= value
;
4621 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4622 fields
->f_bitbase32_24_u27_prefixed
= value
;
4624 case M32C_OPERAND_BITNO16R
:
4625 fields
->f_dsp_16_u8
= value
;
4627 case M32C_OPERAND_BITNO32PREFIXED
:
4628 fields
->f_bitno32_prefixed
= value
;
4630 case M32C_OPERAND_BITNO32UNPREFIXED
:
4631 fields
->f_bitno32_unprefixed
= value
;
4633 case M32C_OPERAND_DSP_10_U6
:
4634 fields
->f_dsp_10_u6
= value
;
4636 case M32C_OPERAND_DSP_16_S16
:
4637 fields
->f_dsp_16_s16
= value
;
4639 case M32C_OPERAND_DSP_16_S8
:
4640 fields
->f_dsp_16_s8
= value
;
4642 case M32C_OPERAND_DSP_16_U16
:
4643 fields
->f_dsp_16_u16
= value
;
4645 case M32C_OPERAND_DSP_16_U20
:
4646 fields
->f_dsp_16_u24
= value
;
4648 case M32C_OPERAND_DSP_16_U24
:
4649 fields
->f_dsp_16_u24
= value
;
4651 case M32C_OPERAND_DSP_16_U8
:
4652 fields
->f_dsp_16_u8
= value
;
4654 case M32C_OPERAND_DSP_24_S16
:
4655 fields
->f_dsp_24_s16
= value
;
4657 case M32C_OPERAND_DSP_24_S8
:
4658 fields
->f_dsp_24_s8
= value
;
4660 case M32C_OPERAND_DSP_24_U16
:
4661 fields
->f_dsp_24_u16
= value
;
4663 case M32C_OPERAND_DSP_24_U20
:
4664 fields
->f_dsp_24_u24
= value
;
4666 case M32C_OPERAND_DSP_24_U24
:
4667 fields
->f_dsp_24_u24
= value
;
4669 case M32C_OPERAND_DSP_24_U8
:
4670 fields
->f_dsp_24_u8
= value
;
4672 case M32C_OPERAND_DSP_32_S16
:
4673 fields
->f_dsp_32_s16
= value
;
4675 case M32C_OPERAND_DSP_32_S8
:
4676 fields
->f_dsp_32_s8
= value
;
4678 case M32C_OPERAND_DSP_32_U16
:
4679 fields
->f_dsp_32_u16
= value
;
4681 case M32C_OPERAND_DSP_32_U20
:
4682 fields
->f_dsp_32_u24
= value
;
4684 case M32C_OPERAND_DSP_32_U24
:
4685 fields
->f_dsp_32_u24
= value
;
4687 case M32C_OPERAND_DSP_32_U8
:
4688 fields
->f_dsp_32_u8
= value
;
4690 case M32C_OPERAND_DSP_40_S16
:
4691 fields
->f_dsp_40_s16
= value
;
4693 case M32C_OPERAND_DSP_40_S8
:
4694 fields
->f_dsp_40_s8
= value
;
4696 case M32C_OPERAND_DSP_40_U16
:
4697 fields
->f_dsp_40_u16
= value
;
4699 case M32C_OPERAND_DSP_40_U24
:
4700 fields
->f_dsp_40_u24
= value
;
4702 case M32C_OPERAND_DSP_40_U8
:
4703 fields
->f_dsp_40_u8
= value
;
4705 case M32C_OPERAND_DSP_48_S16
:
4706 fields
->f_dsp_48_s16
= value
;
4708 case M32C_OPERAND_DSP_48_S8
:
4709 fields
->f_dsp_48_s8
= value
;
4711 case M32C_OPERAND_DSP_48_U16
:
4712 fields
->f_dsp_48_u16
= value
;
4714 case M32C_OPERAND_DSP_48_U24
:
4715 fields
->f_dsp_48_u24
= value
;
4717 case M32C_OPERAND_DSP_48_U8
:
4718 fields
->f_dsp_48_u8
= value
;
4720 case M32C_OPERAND_DSP_8_S8
:
4721 fields
->f_dsp_8_s8
= value
;
4723 case M32C_OPERAND_DSP_8_U16
:
4724 fields
->f_dsp_8_u16
= value
;
4726 case M32C_OPERAND_DSP_8_U24
:
4727 fields
->f_dsp_8_u24
= value
;
4729 case M32C_OPERAND_DSP_8_U6
:
4730 fields
->f_dsp_8_u6
= value
;
4732 case M32C_OPERAND_DSP_8_U8
:
4733 fields
->f_dsp_8_u8
= value
;
4735 case M32C_OPERAND_DST16AN
:
4736 fields
->f_dst16_an
= value
;
4738 case M32C_OPERAND_DST16AN_S
:
4739 fields
->f_dst16_an_s
= value
;
4741 case M32C_OPERAND_DST16ANHI
:
4742 fields
->f_dst16_an
= value
;
4744 case M32C_OPERAND_DST16ANQI
:
4745 fields
->f_dst16_an
= value
;
4747 case M32C_OPERAND_DST16ANQI_S
:
4748 fields
->f_dst16_rn_QI_s
= value
;
4750 case M32C_OPERAND_DST16ANSI
:
4751 fields
->f_dst16_an
= value
;
4753 case M32C_OPERAND_DST16RNEXTQI
:
4754 fields
->f_dst16_rn_ext
= value
;
4756 case M32C_OPERAND_DST16RNHI
:
4757 fields
->f_dst16_rn
= value
;
4759 case M32C_OPERAND_DST16RNQI
:
4760 fields
->f_dst16_rn
= value
;
4762 case M32C_OPERAND_DST16RNQI_S
:
4763 fields
->f_dst16_rn_QI_s
= value
;
4765 case M32C_OPERAND_DST16RNSI
:
4766 fields
->f_dst16_rn
= value
;
4768 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4769 fields
->f_dst32_an_unprefixed
= value
;
4771 case M32C_OPERAND_DST32ANPREFIXED
:
4772 fields
->f_dst32_an_prefixed
= value
;
4774 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4775 fields
->f_dst32_an_prefixed
= value
;
4777 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4778 fields
->f_dst32_an_prefixed
= value
;
4780 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4781 fields
->f_dst32_an_prefixed
= value
;
4783 case M32C_OPERAND_DST32ANUNPREFIXED
:
4784 fields
->f_dst32_an_unprefixed
= value
;
4786 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4787 fields
->f_dst32_an_unprefixed
= value
;
4789 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4790 fields
->f_dst32_an_unprefixed
= value
;
4792 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4793 fields
->f_dst32_an_unprefixed
= value
;
4795 case M32C_OPERAND_DST32R0HI_S
:
4797 case M32C_OPERAND_DST32R0QI_S
:
4799 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4800 fields
->f_dst32_rn_ext_unprefixed
= value
;
4802 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4803 fields
->f_dst32_rn_ext_unprefixed
= value
;
4805 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4806 fields
->f_dst32_rn_prefixed_HI
= value
;
4808 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4809 fields
->f_dst32_rn_prefixed_QI
= value
;
4811 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4812 fields
->f_dst32_rn_prefixed_SI
= value
;
4814 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4815 fields
->f_dst32_rn_unprefixed_HI
= value
;
4817 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4818 fields
->f_dst32_rn_unprefixed_QI
= value
;
4820 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4821 fields
->f_dst32_rn_unprefixed_SI
= value
;
4823 case M32C_OPERAND_G
:
4825 case M32C_OPERAND_IMM_12_S4
:
4826 fields
->f_imm_12_s4
= value
;
4828 case M32C_OPERAND_IMM_13_U3
:
4829 fields
->f_imm_13_u3
= value
;
4831 case M32C_OPERAND_IMM_16_HI
:
4832 fields
->f_dsp_16_s16
= value
;
4834 case M32C_OPERAND_IMM_16_QI
:
4835 fields
->f_dsp_16_s8
= value
;
4837 case M32C_OPERAND_IMM_16_SI
:
4838 fields
->f_dsp_16_s32
= value
;
4840 case M32C_OPERAND_IMM_20_S4
:
4841 fields
->f_imm_20_s4
= value
;
4843 case M32C_OPERAND_IMM_24_HI
:
4844 fields
->f_dsp_24_s16
= value
;
4846 case M32C_OPERAND_IMM_24_QI
:
4847 fields
->f_dsp_24_s8
= value
;
4849 case M32C_OPERAND_IMM_24_SI
:
4850 fields
->f_dsp_24_s32
= value
;
4852 case M32C_OPERAND_IMM_32_HI
:
4853 fields
->f_dsp_32_s16
= value
;
4855 case M32C_OPERAND_IMM_32_QI
:
4856 fields
->f_dsp_32_s8
= value
;
4858 case M32C_OPERAND_IMM_32_SI
:
4859 fields
->f_dsp_32_s32
= value
;
4861 case M32C_OPERAND_IMM_40_HI
:
4862 fields
->f_dsp_40_s16
= value
;
4864 case M32C_OPERAND_IMM_40_QI
:
4865 fields
->f_dsp_40_s8
= value
;
4867 case M32C_OPERAND_IMM_40_SI
:
4868 fields
->f_dsp_40_s32
= value
;
4870 case M32C_OPERAND_IMM_48_HI
:
4871 fields
->f_dsp_48_s16
= value
;
4873 case M32C_OPERAND_IMM_48_QI
:
4874 fields
->f_dsp_48_s8
= value
;
4876 case M32C_OPERAND_IMM_48_SI
:
4877 fields
->f_dsp_48_s32
= value
;
4879 case M32C_OPERAND_IMM_56_HI
:
4880 fields
->f_dsp_56_s16
= value
;
4882 case M32C_OPERAND_IMM_56_QI
:
4883 fields
->f_dsp_56_s8
= value
;
4885 case M32C_OPERAND_IMM_64_HI
:
4886 fields
->f_dsp_64_s16
= value
;
4888 case M32C_OPERAND_IMM_8_HI
:
4889 fields
->f_dsp_8_s16
= value
;
4891 case M32C_OPERAND_IMM_8_QI
:
4892 fields
->f_dsp_8_s8
= value
;
4894 case M32C_OPERAND_IMM_8_S4
:
4895 fields
->f_imm_8_s4
= value
;
4897 case M32C_OPERAND_IMM_SH_12_S4
:
4898 fields
->f_imm_12_s4
= value
;
4900 case M32C_OPERAND_IMM_SH_20_S4
:
4901 fields
->f_imm_20_s4
= value
;
4903 case M32C_OPERAND_IMM_SH_8_S4
:
4904 fields
->f_imm_8_s4
= value
;
4906 case M32C_OPERAND_IMM1_S
:
4907 fields
->f_imm1_S
= value
;
4909 case M32C_OPERAND_IMM3_S
:
4910 fields
->f_imm3_S
= value
;
4912 case M32C_OPERAND_LAB_16_8
:
4913 fields
->f_lab_16_8
= value
;
4915 case M32C_OPERAND_LAB_24_8
:
4916 fields
->f_lab_24_8
= value
;
4918 case M32C_OPERAND_LAB_32_8
:
4919 fields
->f_lab_32_8
= value
;
4921 case M32C_OPERAND_LAB_40_8
:
4922 fields
->f_lab_40_8
= value
;
4924 case M32C_OPERAND_LAB_5_3
:
4925 fields
->f_lab_5_3
= value
;
4927 case M32C_OPERAND_LAB_8_16
:
4928 fields
->f_lab_8_16
= value
;
4930 case M32C_OPERAND_LAB_8_24
:
4931 fields
->f_lab_8_24
= value
;
4933 case M32C_OPERAND_LAB_8_8
:
4934 fields
->f_lab_8_8
= value
;
4936 case M32C_OPERAND_LAB32_JMP_S
:
4937 fields
->f_lab32_jmp_s
= value
;
4939 case M32C_OPERAND_Q
:
4941 case M32C_OPERAND_R0
:
4943 case M32C_OPERAND_R0H
:
4945 case M32C_OPERAND_R0L
:
4947 case M32C_OPERAND_R1
:
4949 case M32C_OPERAND_R1R2R0
:
4951 case M32C_OPERAND_R2
:
4953 case M32C_OPERAND_R2R0
:
4955 case M32C_OPERAND_R3
:
4957 case M32C_OPERAND_R3R1
:
4959 case M32C_OPERAND_REGSETPOP
:
4960 fields
->f_8_8
= value
;
4962 case M32C_OPERAND_REGSETPUSH
:
4963 fields
->f_8_8
= value
;
4965 case M32C_OPERAND_RN16_PUSH_S
:
4966 fields
->f_4_1
= value
;
4968 case M32C_OPERAND_S
:
4970 case M32C_OPERAND_SRC16AN
:
4971 fields
->f_src16_an
= value
;
4973 case M32C_OPERAND_SRC16ANHI
:
4974 fields
->f_src16_an
= value
;
4976 case M32C_OPERAND_SRC16ANQI
:
4977 fields
->f_src16_an
= value
;
4979 case M32C_OPERAND_SRC16RNHI
:
4980 fields
->f_src16_rn
= value
;
4982 case M32C_OPERAND_SRC16RNQI
:
4983 fields
->f_src16_rn
= value
;
4985 case M32C_OPERAND_SRC32ANPREFIXED
:
4986 fields
->f_src32_an_prefixed
= value
;
4988 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4989 fields
->f_src32_an_prefixed
= value
;
4991 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4992 fields
->f_src32_an_prefixed
= value
;
4994 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4995 fields
->f_src32_an_prefixed
= value
;
4997 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4998 fields
->f_src32_an_unprefixed
= value
;
5000 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
5001 fields
->f_src32_an_unprefixed
= value
;
5003 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
5004 fields
->f_src32_an_unprefixed
= value
;
5006 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
5007 fields
->f_src32_an_unprefixed
= value
;
5009 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
5010 fields
->f_src32_rn_prefixed_HI
= value
;
5012 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
5013 fields
->f_src32_rn_prefixed_QI
= value
;
5015 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
5016 fields
->f_src32_rn_prefixed_SI
= value
;
5018 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
5019 fields
->f_src32_rn_unprefixed_HI
= value
;
5021 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
5022 fields
->f_src32_rn_unprefixed_QI
= value
;
5024 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
5025 fields
->f_src32_rn_unprefixed_SI
= value
;
5027 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
5028 fields
->f_5_1
= value
;
5030 case M32C_OPERAND_X
:
5032 case M32C_OPERAND_Z
:
5034 case M32C_OPERAND_COND16_16
:
5035 fields
->f_dsp_16_u8
= value
;
5037 case M32C_OPERAND_COND16_24
:
5038 fields
->f_dsp_24_u8
= value
;
5040 case M32C_OPERAND_COND16_32
:
5041 fields
->f_dsp_32_u8
= value
;
5043 case M32C_OPERAND_COND16C
:
5044 fields
->f_cond16
= value
;
5046 case M32C_OPERAND_COND16J
:
5047 fields
->f_cond16
= value
;
5049 case M32C_OPERAND_COND16J5
:
5050 fields
->f_cond16j_5
= value
;
5052 case M32C_OPERAND_COND32
:
5053 fields
->f_cond32
= value
;
5055 case M32C_OPERAND_COND32_16
:
5056 fields
->f_dsp_16_u8
= value
;
5058 case M32C_OPERAND_COND32_24
:
5059 fields
->f_dsp_24_u8
= value
;
5061 case M32C_OPERAND_COND32_32
:
5062 fields
->f_dsp_32_u8
= value
;
5064 case M32C_OPERAND_COND32_40
:
5065 fields
->f_dsp_40_u8
= value
;
5067 case M32C_OPERAND_COND32J
:
5068 fields
->f_cond32j
= value
;
5070 case M32C_OPERAND_CR1_PREFIXED_32
:
5071 fields
->f_21_3
= value
;
5073 case M32C_OPERAND_CR1_UNPREFIXED_32
:
5074 fields
->f_13_3
= value
;
5076 case M32C_OPERAND_CR16
:
5077 fields
->f_9_3
= value
;
5079 case M32C_OPERAND_CR2_32
:
5080 fields
->f_13_3
= value
;
5082 case M32C_OPERAND_CR3_PREFIXED_32
:
5083 fields
->f_21_3
= value
;
5085 case M32C_OPERAND_CR3_UNPREFIXED_32
:
5086 fields
->f_13_3
= value
;
5088 case M32C_OPERAND_FLAGS16
:
5089 fields
->f_9_3
= value
;
5091 case M32C_OPERAND_FLAGS32
:
5092 fields
->f_13_3
= value
;
5094 case M32C_OPERAND_SCCOND32
:
5095 fields
->f_cond16
= value
;
5097 case M32C_OPERAND_SIZE
:
5101 /* xgettext:c-format */
5102 fprintf (stderr
, _("Unrecognized field %d while setting vma operand.\n"),
5108 /* Function to call before using the instruction builder tables. */
5111 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd
)
5113 cd
->insert_handlers
= & m32c_cgen_insert_handlers
[0];
5114 cd
->extract_handlers
= & m32c_cgen_extract_handlers
[0];
5116 cd
->insert_operand
= m32c_cgen_insert_operand
;
5117 cd
->extract_operand
= m32c_cgen_extract_operand
;
5119 cd
->get_int_operand
= m32c_cgen_get_int_operand
;
5120 cd
->set_int_operand
= m32c_cgen_set_int_operand
;
5121 cd
->get_vma_operand
= m32c_cgen_get_vma_operand
;
5122 cd
->set_vma_operand
= m32c_cgen_set_vma_operand
;