1 /* Instruction building/extraction support for m32c. -*- C -*-
3 THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
4 - the resultant file is machine generated, cgen-ibld.in isn't
6 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006, 2007,
7 2008 Free Software Foundation, Inc.
9 This file is part of libopcodes.
11 This library is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3, or (at your option)
16 It is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
19 License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
25 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
34 #include "m32c-desc.h"
37 #include "safe-ctype.h"
40 #define min(a,b) ((a) < (b) ? (a) : (b))
42 #define max(a,b) ((a) > (b) ? (a) : (b))
44 /* Used by the ifield rtx function. */
45 #define FLD(f) (fields->f)
47 static const char * insert_normal
48 (CGEN_CPU_DESC
, long, unsigned int, unsigned int, unsigned int,
49 unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR
);
50 static const char * insert_insn_normal
51 (CGEN_CPU_DESC
, const CGEN_INSN
*,
52 CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
53 static int extract_normal
54 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
,
55 unsigned int, unsigned int, unsigned int, unsigned int,
56 unsigned int, unsigned int, bfd_vma
, long *);
57 static int extract_insn_normal
58 (CGEN_CPU_DESC
, const CGEN_INSN
*, CGEN_EXTRACT_INFO
*,
59 CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
61 static void put_insn_int_value
62 (CGEN_CPU_DESC
, CGEN_INSN_BYTES_PTR
, int, int, CGEN_INSN_INT
);
65 static CGEN_INLINE
void insert_1
66 (CGEN_CPU_DESC
, unsigned long, int, int, int, unsigned char *);
67 static CGEN_INLINE
int fill_cache
68 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, int, int, bfd_vma
);
69 static CGEN_INLINE
long extract_1
70 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, int, int, int, unsigned char *, bfd_vma
);
73 /* Operand insertion. */
77 /* Subroutine of insert_normal. */
79 static CGEN_INLINE
void
80 insert_1 (CGEN_CPU_DESC cd
,
90 x
= cgen_get_insn_value (cd
, bufp
, word_length
);
92 /* Written this way to avoid undefined behaviour. */
93 mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
95 shift
= (start
+ 1) - length
;
97 shift
= (word_length
- (start
+ length
));
98 x
= (x
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
100 cgen_put_insn_value (cd
, bufp
, word_length
, (bfd_vma
) x
);
103 #endif /* ! CGEN_INT_INSN_P */
105 /* Default insertion routine.
107 ATTRS is a mask of the boolean attributes.
108 WORD_OFFSET is the offset in bits from the start of the insn of the value.
109 WORD_LENGTH is the length of the word in bits in which the value resides.
110 START is the starting bit number in the word, architecture origin.
111 LENGTH is the length of VALUE in bits.
112 TOTAL_LENGTH is the total length of the insn in bits.
114 The result is an error message or NULL if success. */
116 /* ??? This duplicates functionality with bfd's howto table and
117 bfd_install_relocation. */
118 /* ??? This doesn't handle bfd_vma's. Create another function when
122 insert_normal (CGEN_CPU_DESC cd
,
125 unsigned int word_offset
,
128 unsigned int word_length
,
129 unsigned int total_length
,
130 CGEN_INSN_BYTES_PTR buffer
)
132 static char errbuf
[100];
133 /* Written this way to avoid undefined behaviour. */
134 unsigned long mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
136 /* If LENGTH is zero, this operand doesn't contribute to the value. */
140 if (word_length
> 32)
143 /* For architectures with insns smaller than the base-insn-bitsize,
144 word_length may be too big. */
145 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
148 && word_length
> total_length
)
149 word_length
= total_length
;
152 /* Ensure VALUE will fit. */
153 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGN_OPT
))
155 long minval
= - (1L << (length
- 1));
156 unsigned long maxval
= mask
;
158 if ((value
> 0 && (unsigned long) value
> maxval
)
161 /* xgettext:c-format */
163 _("operand out of range (%ld not between %ld and %lu)"),
164 value
, minval
, maxval
);
168 else if (! CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
))
170 unsigned long maxval
= mask
;
171 unsigned long val
= (unsigned long) value
;
173 /* For hosts with a word size > 32 check to see if value has been sign
174 extended beyond 32 bits. If so then ignore these higher sign bits
175 as the user is attempting to store a 32-bit signed value into an
176 unsigned 32-bit field which is allowed. */
177 if (sizeof (unsigned long) > 4 && ((value
>> 32) == -1))
182 /* xgettext:c-format */
184 _("operand out of range (0x%lx not between 0 and 0x%lx)"),
191 if (! cgen_signed_overflow_ok_p (cd
))
193 long minval
= - (1L << (length
- 1));
194 long maxval
= (1L << (length
- 1)) - 1;
196 if (value
< minval
|| value
> maxval
)
199 /* xgettext:c-format */
200 (errbuf
, _("operand out of range (%ld not between %ld and %ld)"),
201 value
, minval
, maxval
);
212 if (CGEN_INSN_LSB0_P
)
213 shift
= (word_offset
+ start
+ 1) - length
;
215 shift
= total_length
- (word_offset
+ start
+ length
);
216 *buffer
= (*buffer
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
219 #else /* ! CGEN_INT_INSN_P */
222 unsigned char *bufp
= (unsigned char *) buffer
+ word_offset
/ 8;
224 insert_1 (cd
, value
, start
, length
, word_length
, bufp
);
227 #endif /* ! CGEN_INT_INSN_P */
232 /* Default insn builder (insert handler).
233 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
234 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
235 recorded in host byte order, otherwise BUFFER is an array of bytes
236 and the value is recorded in target byte order).
237 The result is an error message or NULL if success. */
240 insert_insn_normal (CGEN_CPU_DESC cd
,
241 const CGEN_INSN
* insn
,
242 CGEN_FIELDS
* fields
,
243 CGEN_INSN_BYTES_PTR buffer
,
246 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
248 const CGEN_SYNTAX_CHAR_TYPE
* syn
;
250 CGEN_INIT_INSERT (cd
);
251 value
= CGEN_INSN_BASE_VALUE (insn
);
253 /* If we're recording insns as numbers (rather than a string of bytes),
254 target byte order handling is deferred until later. */
258 put_insn_int_value (cd
, buffer
, cd
->base_insn_bitsize
,
259 CGEN_FIELDS_BITSIZE (fields
), value
);
263 cgen_put_insn_value (cd
, buffer
, min ((unsigned) cd
->base_insn_bitsize
,
264 (unsigned) CGEN_FIELDS_BITSIZE (fields
)),
267 #endif /* ! CGEN_INT_INSN_P */
269 /* ??? It would be better to scan the format's fields.
270 Still need to be able to insert a value based on the operand though;
271 e.g. storing a branch displacement that got resolved later.
272 Needs more thought first. */
274 for (syn
= CGEN_SYNTAX_STRING (syntax
); * syn
; ++ syn
)
278 if (CGEN_SYNTAX_CHAR_P (* syn
))
281 errmsg
= (* cd
->insert_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
291 /* Cover function to store an insn value into an integral insn. Must go here
292 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
295 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
296 CGEN_INSN_BYTES_PTR buf
,
301 /* For architectures with insns smaller than the base-insn-bitsize,
302 length may be too big. */
303 if (length
> insn_length
)
307 int shift
= insn_length
- length
;
308 /* Written this way to avoid undefined behaviour. */
309 CGEN_INSN_INT mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
311 *buf
= (*buf
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
316 /* Operand extraction. */
318 #if ! CGEN_INT_INSN_P
320 /* Subroutine of extract_normal.
321 Ensure sufficient bytes are cached in EX_INFO.
322 OFFSET is the offset in bytes from the start of the insn of the value.
323 BYTES is the length of the needed value.
324 Returns 1 for success, 0 for failure. */
326 static CGEN_INLINE
int
327 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
328 CGEN_EXTRACT_INFO
*ex_info
,
333 /* It's doubtful that the middle part has already been fetched so
334 we don't optimize that case. kiss. */
336 disassemble_info
*info
= (disassemble_info
*) ex_info
->dis_info
;
338 /* First do a quick check. */
339 mask
= (1 << bytes
) - 1;
340 if (((ex_info
->valid
>> offset
) & mask
) == mask
)
343 /* Search for the first byte we need to read. */
344 for (mask
= 1 << offset
; bytes
> 0; --bytes
, ++offset
, mask
<<= 1)
345 if (! (mask
& ex_info
->valid
))
353 status
= (*info
->read_memory_func
)
354 (pc
, ex_info
->insn_bytes
+ offset
, bytes
, info
);
358 (*info
->memory_error_func
) (status
, pc
, info
);
362 ex_info
->valid
|= ((1 << bytes
) - 1) << offset
;
368 /* Subroutine of extract_normal. */
370 static CGEN_INLINE
long
371 extract_1 (CGEN_CPU_DESC cd
,
372 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
377 bfd_vma pc ATTRIBUTE_UNUSED
)
382 x
= cgen_get_insn_value (cd
, bufp
, word_length
);
384 if (CGEN_INSN_LSB0_P
)
385 shift
= (start
+ 1) - length
;
387 shift
= (word_length
- (start
+ length
));
391 #endif /* ! CGEN_INT_INSN_P */
393 /* Default extraction routine.
395 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
396 or sometimes less for cases like the m32r where the base insn size is 32
397 but some insns are 16 bits.
398 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
399 but for generality we take a bitmask of all of them.
400 WORD_OFFSET is the offset in bits from the start of the insn of the value.
401 WORD_LENGTH is the length of the word in bits in which the value resides.
402 START is the starting bit number in the word, architecture origin.
403 LENGTH is the length of VALUE in bits.
404 TOTAL_LENGTH is the total length of the insn in bits.
406 Returns 1 for success, 0 for failure. */
408 /* ??? The return code isn't properly used. wip. */
410 /* ??? This doesn't handle bfd_vma's. Create another function when
414 extract_normal (CGEN_CPU_DESC cd
,
415 #if ! CGEN_INT_INSN_P
416 CGEN_EXTRACT_INFO
*ex_info
,
418 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
420 CGEN_INSN_INT insn_value
,
422 unsigned int word_offset
,
425 unsigned int word_length
,
426 unsigned int total_length
,
427 #if ! CGEN_INT_INSN_P
430 bfd_vma pc ATTRIBUTE_UNUSED
,
436 /* If LENGTH is zero, this operand doesn't contribute to the value
437 so give it a standard value of zero. */
444 if (word_length
> 32)
447 /* For architectures with insns smaller than the insn-base-bitsize,
448 word_length may be too big. */
449 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
451 if (word_offset
+ word_length
> total_length
)
452 word_length
= total_length
- word_offset
;
455 /* Does the value reside in INSN_VALUE, and at the right alignment? */
457 if (CGEN_INT_INSN_P
|| (word_offset
== 0 && word_length
== total_length
))
459 if (CGEN_INSN_LSB0_P
)
460 value
= insn_value
>> ((word_offset
+ start
+ 1) - length
);
462 value
= insn_value
>> (total_length
- ( word_offset
+ start
+ length
));
465 #if ! CGEN_INT_INSN_P
469 unsigned char *bufp
= ex_info
->insn_bytes
+ word_offset
/ 8;
471 if (word_length
> 32)
474 if (fill_cache (cd
, ex_info
, word_offset
/ 8, word_length
/ 8, pc
) == 0)
477 value
= extract_1 (cd
, ex_info
, start
, length
, word_length
, bufp
, pc
);
480 #endif /* ! CGEN_INT_INSN_P */
482 /* Written this way to avoid undefined behaviour. */
483 mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
487 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
)
488 && (value
& (1L << (length
- 1))))
496 /* Default insn extractor.
498 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
499 The extracted fields are stored in FIELDS.
500 EX_INFO is used to handle reading variable length insns.
501 Return the length of the insn in bits, or 0 if no match,
502 or -1 if an error occurs fetching data (memory_error_func will have
506 extract_insn_normal (CGEN_CPU_DESC cd
,
507 const CGEN_INSN
*insn
,
508 CGEN_EXTRACT_INFO
*ex_info
,
509 CGEN_INSN_INT insn_value
,
513 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
514 const CGEN_SYNTAX_CHAR_TYPE
*syn
;
516 CGEN_FIELDS_BITSIZE (fields
) = CGEN_INSN_BITSIZE (insn
);
518 CGEN_INIT_EXTRACT (cd
);
520 for (syn
= CGEN_SYNTAX_STRING (syntax
); *syn
; ++syn
)
524 if (CGEN_SYNTAX_CHAR_P (*syn
))
527 length
= (* cd
->extract_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
528 ex_info
, insn_value
, fields
, pc
);
533 /* We recognized and successfully extracted this insn. */
534 return CGEN_INSN_BITSIZE (insn
);
537 /* Machine generated code added here. */
539 const char * m32c_cgen_insert_operand
540 (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
542 /* Main entry point for operand insertion.
544 This function is basically just a big switch statement. Earlier versions
545 used tables to look up the function to use, but
546 - if the table contains both assembler and disassembler functions then
547 the disassembler contains much of the assembler and vice-versa,
548 - there's a lot of inlining possibilities as things grow,
549 - using a switch statement avoids the function call overhead.
551 This function could be moved into `parse_insn_normal', but keeping it
552 separate makes clear the interface between `parse_insn_normal' and each of
553 the handlers. It's also needed by GAS to insert operands that couldn't be
554 resolved during parsing. */
557 m32c_cgen_insert_operand (CGEN_CPU_DESC cd
,
559 CGEN_FIELDS
* fields
,
560 CGEN_INSN_BYTES_PTR buffer
,
561 bfd_vma pc ATTRIBUTE_UNUSED
)
563 const char * errmsg
= NULL
;
564 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
568 case M32C_OPERAND_A0
:
570 case M32C_OPERAND_A1
:
572 case M32C_OPERAND_AN16_PUSH_S
:
573 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
575 case M32C_OPERAND_BIT16AN
:
576 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
578 case M32C_OPERAND_BIT16RN
:
579 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
581 case M32C_OPERAND_BIT3_S
:
584 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
585 FLD (f_2_2
) = ((((unsigned int) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
587 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
590 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
595 case M32C_OPERAND_BIT32ANPREFIXED
:
596 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
598 case M32C_OPERAND_BIT32ANUNPREFIXED
:
599 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
601 case M32C_OPERAND_BIT32RNPREFIXED
:
603 long value
= fields
->f_dst32_rn_prefixed_QI
;
604 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
605 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
608 case M32C_OPERAND_BIT32RNUNPREFIXED
:
610 long value
= fields
->f_dst32_rn_unprefixed_QI
;
611 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
612 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
615 case M32C_OPERAND_BITBASE16_16_S8
:
616 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
618 case M32C_OPERAND_BITBASE16_16_U16
:
620 long value
= fields
->f_dsp_16_u16
;
621 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
622 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
625 case M32C_OPERAND_BITBASE16_16_U8
:
626 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
628 case M32C_OPERAND_BITBASE16_8_U11_S
:
631 FLD (f_bitno16_S
) = ((FLD (f_bitbase16_u11_S
)) & (7));
632 FLD (f_dsp_8_u8
) = ((((unsigned int) (FLD (f_bitbase16_u11_S
)) >> (3))) & (255));
634 errmsg
= insert_normal (cd
, fields
->f_bitno16_S
, 0, 0, 5, 3, 32, total_length
, buffer
);
637 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
642 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
645 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s11_unprefixed
)) & (7));
646 FLD (f_dsp_16_s8
) = ((int) (FLD (f_bitbase32_16_s11_unprefixed
)) >> (3));
648 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
651 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
656 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
659 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s19_unprefixed
)) & (7));
660 FLD (f_dsp_16_s16
) = ((int) (FLD (f_bitbase32_16_s19_unprefixed
)) >> (3));
662 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
666 long value
= fields
->f_dsp_16_s16
;
667 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
668 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
674 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
677 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u11_unprefixed
)) & (7));
678 FLD (f_dsp_16_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u11_unprefixed
)) >> (3))) & (255));
680 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
683 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
688 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
691 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u19_unprefixed
)) & (7));
692 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u19_unprefixed
)) >> (3))) & (65535));
694 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
698 long value
= fields
->f_dsp_16_u16
;
699 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
700 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
706 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
709 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u27_unprefixed
)) & (7));
710 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (3))) & (65535));
711 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (19))) & (255));
713 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
717 long value
= fields
->f_dsp_16_u16
;
718 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
719 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
723 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
728 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
731 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s11_prefixed
)) & (7));
732 FLD (f_dsp_24_s8
) = ((int) (FLD (f_bitbase32_24_s11_prefixed
)) >> (3));
734 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
737 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
742 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
745 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s19_prefixed
)) & (7));
746 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (3))) & (255));
747 FLD (f_dsp_32_s8
) = ((int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (11));
749 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
752 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
755 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
760 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
763 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u11_prefixed
)) & (7));
764 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u11_prefixed
)) >> (3))) & (255));
766 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
769 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
774 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
777 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u19_prefixed
)) & (7));
778 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (3))) & (255));
779 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (11))) & (255));
781 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
784 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
787 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
792 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
795 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u27_prefixed
)) & (7));
796 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (3))) & (255));
797 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (11))) & (65535));
799 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
802 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
806 long value
= fields
->f_dsp_32_u16
;
807 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
808 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
814 case M32C_OPERAND_BITNO16R
:
815 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
817 case M32C_OPERAND_BITNO32PREFIXED
:
818 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
820 case M32C_OPERAND_BITNO32UNPREFIXED
:
821 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
823 case M32C_OPERAND_DSP_10_U6
:
824 errmsg
= insert_normal (cd
, fields
->f_dsp_10_u6
, 0, 0, 10, 6, 32, total_length
, buffer
);
826 case M32C_OPERAND_DSP_16_S16
:
828 long value
= fields
->f_dsp_16_s16
;
829 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
830 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
833 case M32C_OPERAND_DSP_16_S8
:
834 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
836 case M32C_OPERAND_DSP_16_U16
:
838 long value
= fields
->f_dsp_16_u16
;
839 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
840 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
843 case M32C_OPERAND_DSP_16_U20
:
846 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
847 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
850 long value
= fields
->f_dsp_16_u16
;
851 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
852 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
856 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
861 case M32C_OPERAND_DSP_16_U24
:
864 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
865 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
868 long value
= fields
->f_dsp_16_u16
;
869 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
870 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
874 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
879 case M32C_OPERAND_DSP_16_U8
:
880 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
882 case M32C_OPERAND_DSP_24_S16
:
885 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
886 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
888 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
891 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
896 case M32C_OPERAND_DSP_24_S8
:
897 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
899 case M32C_OPERAND_DSP_24_U16
:
902 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u16
)) & (255));
903 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_u16
)) >> (8))) & (255));
905 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
908 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
913 case M32C_OPERAND_DSP_24_U20
:
916 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
917 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
919 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
923 long value
= fields
->f_dsp_32_u16
;
924 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
925 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
931 case M32C_OPERAND_DSP_24_U24
:
934 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
935 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
937 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
941 long value
= fields
->f_dsp_32_u16
;
942 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
943 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
949 case M32C_OPERAND_DSP_24_U8
:
950 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
952 case M32C_OPERAND_DSP_32_S16
:
954 long value
= fields
->f_dsp_32_s16
;
955 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
956 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
959 case M32C_OPERAND_DSP_32_S8
:
960 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
962 case M32C_OPERAND_DSP_32_U16
:
964 long value
= fields
->f_dsp_32_u16
;
965 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
966 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
969 case M32C_OPERAND_DSP_32_U20
:
971 long value
= fields
->f_dsp_32_u24
;
972 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
973 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
976 case M32C_OPERAND_DSP_32_U24
:
978 long value
= fields
->f_dsp_32_u24
;
979 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
980 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
983 case M32C_OPERAND_DSP_32_U8
:
984 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
986 case M32C_OPERAND_DSP_40_S16
:
988 long value
= fields
->f_dsp_40_s16
;
989 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
990 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
993 case M32C_OPERAND_DSP_40_S8
:
994 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
996 case M32C_OPERAND_DSP_40_U16
:
998 long value
= fields
->f_dsp_40_u16
;
999 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1000 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 16, 32, total_length
, buffer
);
1003 case M32C_OPERAND_DSP_40_U20
:
1005 long value
= fields
->f_dsp_40_u20
;
1006 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (983040))));
1007 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 20, 32, total_length
, buffer
);
1010 case M32C_OPERAND_DSP_40_U24
:
1012 long value
= fields
->f_dsp_40_u24
;
1013 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1014 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1017 case M32C_OPERAND_DSP_40_U8
:
1018 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1020 case M32C_OPERAND_DSP_48_S16
:
1022 long value
= fields
->f_dsp_48_s16
;
1023 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1024 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1027 case M32C_OPERAND_DSP_48_S8
:
1028 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1030 case M32C_OPERAND_DSP_48_U16
:
1032 long value
= fields
->f_dsp_48_u16
;
1033 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1034 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1037 case M32C_OPERAND_DSP_48_U20
:
1040 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_48_u20
)) >> (16))) & (15));
1041 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u20
)) & (65535));
1044 long value
= fields
->f_dsp_48_u16
;
1045 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1046 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1050 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1055 case M32C_OPERAND_DSP_48_U24
:
1058 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_48_u24
)) >> (16))) & (255));
1059 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u24
)) & (65535));
1062 long value
= fields
->f_dsp_48_u16
;
1063 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1064 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1068 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1073 case M32C_OPERAND_DSP_48_U8
:
1074 errmsg
= insert_normal (cd
, fields
->f_dsp_48_u8
, 0, 32, 16, 8, 32, total_length
, buffer
);
1076 case M32C_OPERAND_DSP_8_S24
:
1078 long value
= fields
->f_dsp_8_s24
;
1079 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
1080 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, buffer
);
1083 case M32C_OPERAND_DSP_8_S8
:
1084 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1086 case M32C_OPERAND_DSP_8_U16
:
1088 long value
= fields
->f_dsp_8_u16
;
1089 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1090 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 16, 32, total_length
, buffer
);
1093 case M32C_OPERAND_DSP_8_U24
:
1095 long value
= fields
->f_dsp_8_u24
;
1096 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1097 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 24, 32, total_length
, buffer
);
1100 case M32C_OPERAND_DSP_8_U6
:
1101 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u6
, 0, 0, 8, 6, 32, total_length
, buffer
);
1103 case M32C_OPERAND_DSP_8_U8
:
1104 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1106 case M32C_OPERAND_DST16AN
:
1107 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1109 case M32C_OPERAND_DST16AN_S
:
1110 errmsg
= insert_normal (cd
, fields
->f_dst16_an_s
, 0, 0, 4, 1, 32, total_length
, buffer
);
1112 case M32C_OPERAND_DST16ANHI
:
1113 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1115 case M32C_OPERAND_DST16ANQI
:
1116 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1118 case M32C_OPERAND_DST16ANQI_S
:
1119 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1121 case M32C_OPERAND_DST16ANSI
:
1122 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1124 case M32C_OPERAND_DST16RNEXTQI
:
1125 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_ext
, 0, 0, 14, 1, 32, total_length
, buffer
);
1127 case M32C_OPERAND_DST16RNHI
:
1128 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1130 case M32C_OPERAND_DST16RNQI
:
1131 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1133 case M32C_OPERAND_DST16RNQI_S
:
1134 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1136 case M32C_OPERAND_DST16RNSI
:
1137 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1139 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
1140 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1142 case M32C_OPERAND_DST32ANPREFIXED
:
1143 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1145 case M32C_OPERAND_DST32ANPREFIXEDHI
:
1146 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1148 case M32C_OPERAND_DST32ANPREFIXEDQI
:
1149 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1151 case M32C_OPERAND_DST32ANPREFIXEDSI
:
1152 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1154 case M32C_OPERAND_DST32ANUNPREFIXED
:
1155 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1157 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
1158 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1160 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
1161 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1163 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
1164 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1166 case M32C_OPERAND_DST32R0HI_S
:
1168 case M32C_OPERAND_DST32R0QI_S
:
1170 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
1171 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1173 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
1174 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1176 case M32C_OPERAND_DST32RNPREFIXEDHI
:
1178 long value
= fields
->f_dst32_rn_prefixed_HI
;
1179 value
= ((((value
) + (2))) % (4));
1180 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1183 case M32C_OPERAND_DST32RNPREFIXEDQI
:
1185 long value
= fields
->f_dst32_rn_prefixed_QI
;
1186 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1187 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1190 case M32C_OPERAND_DST32RNPREFIXEDSI
:
1192 long value
= fields
->f_dst32_rn_prefixed_SI
;
1193 value
= ((value
) + (2));
1194 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1197 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
1199 long value
= fields
->f_dst32_rn_unprefixed_HI
;
1200 value
= ((((value
) + (2))) % (4));
1201 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1204 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
1206 long value
= fields
->f_dst32_rn_unprefixed_QI
;
1207 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1208 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1211 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
1213 long value
= fields
->f_dst32_rn_unprefixed_SI
;
1214 value
= ((value
) + (2));
1215 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1218 case M32C_OPERAND_G
:
1220 case M32C_OPERAND_IMM_12_S4
:
1221 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1223 case M32C_OPERAND_IMM_12_S4N
:
1224 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1226 case M32C_OPERAND_IMM_13_U3
:
1227 errmsg
= insert_normal (cd
, fields
->f_imm_13_u3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1229 case M32C_OPERAND_IMM_16_HI
:
1231 long value
= fields
->f_dsp_16_s16
;
1232 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1233 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
1236 case M32C_OPERAND_IMM_16_QI
:
1237 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
1239 case M32C_OPERAND_IMM_16_SI
:
1242 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_16_s32
)) >> (16))) & (65535));
1243 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_s32
)) & (65535));
1246 long value
= fields
->f_dsp_16_u16
;
1247 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1248 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
1253 long value
= fields
->f_dsp_32_u16
;
1254 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1255 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
1261 case M32C_OPERAND_IMM_20_S4
:
1262 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1264 case M32C_OPERAND_IMM_24_HI
:
1267 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
1268 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
1270 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1273 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1278 case M32C_OPERAND_IMM_24_QI
:
1279 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
1281 case M32C_OPERAND_IMM_24_SI
:
1284 FLD (f_dsp_32_u24
) = ((((unsigned int) (FLD (f_dsp_24_s32
)) >> (8))) & (16777215));
1285 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s32
)) & (255));
1287 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1291 long value
= fields
->f_dsp_32_u24
;
1292 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1293 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
1299 case M32C_OPERAND_IMM_32_HI
:
1301 long value
= fields
->f_dsp_32_s16
;
1302 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1303 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
1306 case M32C_OPERAND_IMM_32_QI
:
1307 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
1309 case M32C_OPERAND_IMM_32_SI
:
1311 long value
= fields
->f_dsp_32_s32
;
1312 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
1313 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, buffer
);
1316 case M32C_OPERAND_IMM_40_HI
:
1318 long value
= fields
->f_dsp_40_s16
;
1319 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1320 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1323 case M32C_OPERAND_IMM_40_QI
:
1324 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1326 case M32C_OPERAND_IMM_40_SI
:
1329 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_40_s32
)) >> (24))) & (255));
1330 FLD (f_dsp_40_u24
) = ((FLD (f_dsp_40_s32
)) & (16777215));
1333 long value
= fields
->f_dsp_40_u24
;
1334 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1335 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1339 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1344 case M32C_OPERAND_IMM_48_HI
:
1346 long value
= fields
->f_dsp_48_s16
;
1347 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1348 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1351 case M32C_OPERAND_IMM_48_QI
:
1352 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1354 case M32C_OPERAND_IMM_48_SI
:
1357 FLD (f_dsp_64_u16
) = ((((unsigned int) (FLD (f_dsp_48_s32
)) >> (16))) & (65535));
1358 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_s32
)) & (65535));
1361 long value
= fields
->f_dsp_48_u16
;
1362 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1363 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1368 long value
= fields
->f_dsp_64_u16
;
1369 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1370 errmsg
= insert_normal (cd
, value
, 0, 64, 0, 16, 32, total_length
, buffer
);
1376 case M32C_OPERAND_IMM_56_HI
:
1379 FLD (f_dsp_56_u8
) = ((FLD (f_dsp_56_s16
)) & (255));
1380 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_56_s16
)) >> (8))) & (255));
1382 errmsg
= insert_normal (cd
, fields
->f_dsp_56_u8
, 0, 32, 24, 8, 32, total_length
, buffer
);
1385 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1390 case M32C_OPERAND_IMM_56_QI
:
1391 errmsg
= insert_normal (cd
, fields
->f_dsp_56_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 24, 8, 32, total_length
, buffer
);
1393 case M32C_OPERAND_IMM_64_HI
:
1395 long value
= fields
->f_dsp_64_s16
;
1396 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1397 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, buffer
);
1400 case M32C_OPERAND_IMM_8_HI
:
1402 long value
= fields
->f_dsp_8_s16
;
1403 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1404 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, buffer
);
1407 case M32C_OPERAND_IMM_8_QI
:
1408 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1410 case M32C_OPERAND_IMM_8_S4
:
1411 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1413 case M32C_OPERAND_IMM_8_S4N
:
1414 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1416 case M32C_OPERAND_IMM_SH_12_S4
:
1417 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1419 case M32C_OPERAND_IMM_SH_20_S4
:
1420 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1422 case M32C_OPERAND_IMM_SH_8_S4
:
1423 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1425 case M32C_OPERAND_IMM1_S
:
1427 long value
= fields
->f_imm1_S
;
1428 value
= ((value
) - (1));
1429 errmsg
= insert_normal (cd
, value
, 0, 0, 2, 1, 32, total_length
, buffer
);
1432 case M32C_OPERAND_IMM3_S
:
1435 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
1436 FLD (f_2_2
) = ((((unsigned int) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
1438 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1441 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1446 case M32C_OPERAND_LAB_16_8
:
1448 long value
= fields
->f_lab_16_8
;
1449 value
= ((value
) - (((pc
) + (2))));
1450 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 16, 8, 32, total_length
, buffer
);
1453 case M32C_OPERAND_LAB_24_8
:
1455 long value
= fields
->f_lab_24_8
;
1456 value
= ((value
) - (((pc
) + (2))));
1457 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 24, 8, 32, total_length
, buffer
);
1460 case M32C_OPERAND_LAB_32_8
:
1462 long value
= fields
->f_lab_32_8
;
1463 value
= ((value
) - (((pc
) + (2))));
1464 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 0, 8, 32, total_length
, buffer
);
1467 case M32C_OPERAND_LAB_40_8
:
1469 long value
= fields
->f_lab_40_8
;
1470 value
= ((value
) - (((pc
) + (2))));
1471 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 8, 8, 32, total_length
, buffer
);
1474 case M32C_OPERAND_LAB_5_3
:
1476 long value
= fields
->f_lab_5_3
;
1477 value
= ((value
) - (((pc
) + (2))));
1478 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, buffer
);
1481 case M32C_OPERAND_LAB_8_16
:
1483 long value
= fields
->f_lab_8_16
;
1484 value
= ((((((((value
) - (((pc
) + (1))))) & (255))) << (8))) | (((unsigned int) (((((value
) - (((pc
) + (1))))) & (65535))) >> (8))));
1485 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGN_OPT
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 16, 32, total_length
, buffer
);
1488 case M32C_OPERAND_LAB_8_24
:
1490 long value
= fields
->f_lab_8_24
;
1491 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1492 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, buffer
);
1495 case M32C_OPERAND_LAB_8_8
:
1497 long value
= fields
->f_lab_8_8
;
1498 value
= ((value
) - (((pc
) + (1))));
1499 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 8, 32, total_length
, buffer
);
1502 case M32C_OPERAND_LAB32_JMP_S
:
1506 tmp_val
= ((((FLD (f_lab32_jmp_s
)) - (pc
))) - (2));
1507 FLD (f_7_1
) = ((tmp_val
) & (1));
1508 FLD (f_2_2
) = ((unsigned int) (tmp_val
) >> (1));
1510 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1513 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1518 case M32C_OPERAND_Q
:
1520 case M32C_OPERAND_R0
:
1522 case M32C_OPERAND_R0H
:
1524 case M32C_OPERAND_R0L
:
1526 case M32C_OPERAND_R1
:
1528 case M32C_OPERAND_R1R2R0
:
1530 case M32C_OPERAND_R2
:
1532 case M32C_OPERAND_R2R0
:
1534 case M32C_OPERAND_R3
:
1536 case M32C_OPERAND_R3R1
:
1538 case M32C_OPERAND_REGSETPOP
:
1539 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1541 case M32C_OPERAND_REGSETPUSH
:
1542 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1544 case M32C_OPERAND_RN16_PUSH_S
:
1545 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
1547 case M32C_OPERAND_S
:
1549 case M32C_OPERAND_SRC16AN
:
1550 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1552 case M32C_OPERAND_SRC16ANHI
:
1553 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1555 case M32C_OPERAND_SRC16ANQI
:
1556 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1558 case M32C_OPERAND_SRC16RNHI
:
1559 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1561 case M32C_OPERAND_SRC16RNQI
:
1562 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1564 case M32C_OPERAND_SRC32ANPREFIXED
:
1565 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1567 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
1568 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1570 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
1571 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1573 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
1574 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1576 case M32C_OPERAND_SRC32ANUNPREFIXED
:
1577 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1579 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
1580 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1582 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
1583 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1585 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
1586 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1588 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
1590 long value
= fields
->f_src32_rn_prefixed_HI
;
1591 value
= ((((value
) + (2))) % (4));
1592 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1595 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
1597 long value
= fields
->f_src32_rn_prefixed_QI
;
1598 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1599 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1602 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
1604 long value
= fields
->f_src32_rn_prefixed_SI
;
1605 value
= ((value
) + (2));
1606 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1609 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
1611 long value
= fields
->f_src32_rn_unprefixed_HI
;
1612 value
= ((((value
) + (2))) % (4));
1613 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1616 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
1618 long value
= fields
->f_src32_rn_unprefixed_QI
;
1619 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1620 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1623 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
1625 long value
= fields
->f_src32_rn_unprefixed_SI
;
1626 value
= ((value
) + (2));
1627 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1630 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
1631 errmsg
= insert_normal (cd
, fields
->f_5_1
, 0, 0, 5, 1, 32, total_length
, buffer
);
1633 case M32C_OPERAND_X
:
1635 case M32C_OPERAND_Z
:
1637 case M32C_OPERAND_COND16_16
:
1638 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1640 case M32C_OPERAND_COND16_24
:
1641 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1643 case M32C_OPERAND_COND16_32
:
1644 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1646 case M32C_OPERAND_COND16C
:
1647 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1649 case M32C_OPERAND_COND16J
:
1650 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1652 case M32C_OPERAND_COND16J5
:
1653 errmsg
= insert_normal (cd
, fields
->f_cond16j_5
, 0, 0, 5, 3, 32, total_length
, buffer
);
1655 case M32C_OPERAND_COND32
:
1658 FLD (f_9_1
) = ((((unsigned int) (FLD (f_cond32
)) >> (3))) & (1));
1659 FLD (f_13_3
) = ((FLD (f_cond32
)) & (7));
1661 errmsg
= insert_normal (cd
, fields
->f_9_1
, 0, 0, 9, 1, 32, total_length
, buffer
);
1664 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1669 case M32C_OPERAND_COND32_16
:
1670 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1672 case M32C_OPERAND_COND32_24
:
1673 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1675 case M32C_OPERAND_COND32_32
:
1676 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1678 case M32C_OPERAND_COND32_40
:
1679 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1681 case M32C_OPERAND_COND32J
:
1684 FLD (f_1_3
) = ((((unsigned int) (FLD (f_cond32j
)) >> (1))) & (7));
1685 FLD (f_7_1
) = ((FLD (f_cond32j
)) & (1));
1687 errmsg
= insert_normal (cd
, fields
->f_1_3
, 0, 0, 1, 3, 32, total_length
, buffer
);
1690 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1695 case M32C_OPERAND_CR1_PREFIXED_32
:
1696 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1698 case M32C_OPERAND_CR1_UNPREFIXED_32
:
1699 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1701 case M32C_OPERAND_CR16
:
1702 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1704 case M32C_OPERAND_CR2_32
:
1705 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1707 case M32C_OPERAND_CR3_PREFIXED_32
:
1708 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1710 case M32C_OPERAND_CR3_UNPREFIXED_32
:
1711 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1713 case M32C_OPERAND_FLAGS16
:
1714 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1716 case M32C_OPERAND_FLAGS32
:
1717 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1719 case M32C_OPERAND_SCCOND32
:
1720 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1722 case M32C_OPERAND_SIZE
:
1726 /* xgettext:c-format */
1727 fprintf (stderr
, _("Unrecognized field %d while building insn.\n"),
1735 int m32c_cgen_extract_operand
1736 (CGEN_CPU_DESC
, int, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
1738 /* Main entry point for operand extraction.
1739 The result is <= 0 for error, >0 for success.
1740 ??? Actual values aren't well defined right now.
1742 This function is basically just a big switch statement. Earlier versions
1743 used tables to look up the function to use, but
1744 - if the table contains both assembler and disassembler functions then
1745 the disassembler contains much of the assembler and vice-versa,
1746 - there's a lot of inlining possibilities as things grow,
1747 - using a switch statement avoids the function call overhead.
1749 This function could be moved into `print_insn_normal', but keeping it
1750 separate makes clear the interface between `print_insn_normal' and each of
1754 m32c_cgen_extract_operand (CGEN_CPU_DESC cd
,
1756 CGEN_EXTRACT_INFO
*ex_info
,
1757 CGEN_INSN_INT insn_value
,
1758 CGEN_FIELDS
* fields
,
1761 /* Assume success (for those operands that are nops). */
1763 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
1767 case M32C_OPERAND_A0
:
1769 case M32C_OPERAND_A1
:
1771 case M32C_OPERAND_AN16_PUSH_S
:
1772 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
1774 case M32C_OPERAND_BIT16AN
:
1775 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
1777 case M32C_OPERAND_BIT16RN
:
1778 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
1780 case M32C_OPERAND_BIT3_S
:
1782 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
1783 if (length
<= 0) break;
1784 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
1785 if (length
<= 0) break;
1787 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
1791 case M32C_OPERAND_BIT32ANPREFIXED
:
1792 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
1794 case M32C_OPERAND_BIT32ANUNPREFIXED
:
1795 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
1797 case M32C_OPERAND_BIT32RNPREFIXED
:
1800 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
1801 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1802 fields
->f_dst32_rn_prefixed_QI
= value
;
1805 case M32C_OPERAND_BIT32RNUNPREFIXED
:
1808 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
1809 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1810 fields
->f_dst32_rn_unprefixed_QI
= value
;
1813 case M32C_OPERAND_BITBASE16_16_S8
:
1814 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
);
1816 case M32C_OPERAND_BITBASE16_16_U16
:
1819 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1820 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1821 fields
->f_dsp_16_u16
= value
;
1824 case M32C_OPERAND_BITBASE16_16_U8
:
1825 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1827 case M32C_OPERAND_BITBASE16_8_U11_S
:
1829 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_bitno16_S
);
1830 if (length
<= 0) break;
1831 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
1832 if (length
<= 0) break;
1834 FLD (f_bitbase16_u11_S
) = ((((FLD (f_dsp_8_u8
)) << (3))) | (FLD (f_bitno16_S
)));
1838 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
1840 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1841 if (length
<= 0) break;
1842 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
);
1843 if (length
<= 0) break;
1845 FLD (f_bitbase32_16_s11_unprefixed
) = ((((FLD (f_dsp_16_s8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1849 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
1851 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1852 if (length
<= 0) break;
1855 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1856 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1857 fields
->f_dsp_16_s16
= value
;
1859 if (length
<= 0) break;
1861 FLD (f_bitbase32_16_s19_unprefixed
) = ((((FLD (f_dsp_16_s16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1865 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
1867 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1868 if (length
<= 0) break;
1869 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1870 if (length
<= 0) break;
1872 FLD (f_bitbase32_16_u11_unprefixed
) = ((((FLD (f_dsp_16_u8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1876 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
1878 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1879 if (length
<= 0) break;
1882 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1883 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1884 fields
->f_dsp_16_u16
= value
;
1886 if (length
<= 0) break;
1888 FLD (f_bitbase32_16_u19_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1892 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
1894 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1895 if (length
<= 0) break;
1898 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1899 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1900 fields
->f_dsp_16_u16
= value
;
1902 if (length
<= 0) break;
1903 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1904 if (length
<= 0) break;
1906 FLD (f_bitbase32_16_u27_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (19))) | (FLD (f_bitno32_unprefixed
)))));
1910 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
1912 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1913 if (length
<= 0) break;
1914 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
);
1915 if (length
<= 0) break;
1917 FLD (f_bitbase32_24_s11_prefixed
) = ((((FLD (f_dsp_24_s8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1921 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
1923 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1924 if (length
<= 0) break;
1925 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1926 if (length
<= 0) break;
1927 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
);
1928 if (length
<= 0) break;
1930 FLD (f_bitbase32_24_s19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_s8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1934 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
1936 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1937 if (length
<= 0) break;
1938 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1939 if (length
<= 0) break;
1941 FLD (f_bitbase32_24_u11_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1945 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
1947 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1948 if (length
<= 0) break;
1949 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1950 if (length
<= 0) break;
1951 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1952 if (length
<= 0) break;
1954 FLD (f_bitbase32_24_u19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1958 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
1960 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1961 if (length
<= 0) break;
1962 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1963 if (length
<= 0) break;
1966 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
1967 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1968 fields
->f_dsp_32_u16
= value
;
1970 if (length
<= 0) break;
1972 FLD (f_bitbase32_24_u27_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u16
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1976 case M32C_OPERAND_BITNO16R
:
1977 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1979 case M32C_OPERAND_BITNO32PREFIXED
:
1980 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1982 case M32C_OPERAND_BITNO32UNPREFIXED
:
1983 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1985 case M32C_OPERAND_DSP_10_U6
:
1986 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 6, 32, total_length
, pc
, & fields
->f_dsp_10_u6
);
1988 case M32C_OPERAND_DSP_16_S16
:
1991 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1992 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1993 fields
->f_dsp_16_s16
= value
;
1996 case M32C_OPERAND_DSP_16_S8
:
1997 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
);
1999 case M32C_OPERAND_DSP_16_U16
:
2002 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2003 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2004 fields
->f_dsp_16_u16
= value
;
2007 case M32C_OPERAND_DSP_16_U20
:
2011 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2012 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2013 fields
->f_dsp_16_u16
= value
;
2015 if (length
<= 0) break;
2016 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2017 if (length
<= 0) break;
2019 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
2023 case M32C_OPERAND_DSP_16_U24
:
2027 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2028 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2029 fields
->f_dsp_16_u16
= value
;
2031 if (length
<= 0) break;
2032 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2033 if (length
<= 0) break;
2035 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
2039 case M32C_OPERAND_DSP_16_U8
:
2040 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2042 case M32C_OPERAND_DSP_24_S16
:
2044 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2045 if (length
<= 0) break;
2046 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2047 if (length
<= 0) break;
2049 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2053 case M32C_OPERAND_DSP_24_S8
:
2054 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
);
2056 case M32C_OPERAND_DSP_24_U16
:
2058 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2059 if (length
<= 0) break;
2060 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2061 if (length
<= 0) break;
2063 FLD (f_dsp_24_u16
) = ((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
)));
2067 case M32C_OPERAND_DSP_24_U20
:
2069 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2070 if (length
<= 0) break;
2073 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2074 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2075 fields
->f_dsp_32_u16
= value
;
2077 if (length
<= 0) break;
2079 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2083 case M32C_OPERAND_DSP_24_U24
:
2085 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2086 if (length
<= 0) break;
2089 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2090 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2091 fields
->f_dsp_32_u16
= value
;
2093 if (length
<= 0) break;
2095 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2099 case M32C_OPERAND_DSP_24_U8
:
2100 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2102 case M32C_OPERAND_DSP_32_S16
:
2105 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2106 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2107 fields
->f_dsp_32_s16
= value
;
2110 case M32C_OPERAND_DSP_32_S8
:
2111 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
);
2113 case M32C_OPERAND_DSP_32_U16
:
2116 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2117 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2118 fields
->f_dsp_32_u16
= value
;
2121 case M32C_OPERAND_DSP_32_U20
:
2124 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2125 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2126 fields
->f_dsp_32_u24
= value
;
2129 case M32C_OPERAND_DSP_32_U24
:
2132 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2133 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2134 fields
->f_dsp_32_u24
= value
;
2137 case M32C_OPERAND_DSP_32_U8
:
2138 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2140 case M32C_OPERAND_DSP_40_S16
:
2143 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2144 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2145 fields
->f_dsp_40_s16
= value
;
2148 case M32C_OPERAND_DSP_40_S8
:
2149 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
);
2151 case M32C_OPERAND_DSP_40_U16
:
2154 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 16, 32, total_length
, pc
, & value
);
2155 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2156 fields
->f_dsp_40_u16
= value
;
2159 case M32C_OPERAND_DSP_40_U20
:
2162 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 20, 32, total_length
, pc
, & value
);
2163 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (983040))));
2164 fields
->f_dsp_40_u20
= value
;
2167 case M32C_OPERAND_DSP_40_U24
:
2170 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2171 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2172 fields
->f_dsp_40_u24
= value
;
2175 case M32C_OPERAND_DSP_40_U8
:
2176 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2178 case M32C_OPERAND_DSP_48_S16
:
2181 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2182 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2183 fields
->f_dsp_48_s16
= value
;
2186 case M32C_OPERAND_DSP_48_S8
:
2187 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
);
2189 case M32C_OPERAND_DSP_48_U16
:
2192 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2193 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2194 fields
->f_dsp_48_u16
= value
;
2197 case M32C_OPERAND_DSP_48_U20
:
2201 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2202 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2203 fields
->f_dsp_48_u16
= value
;
2205 if (length
<= 0) break;
2206 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2207 if (length
<= 0) break;
2209 FLD (f_dsp_48_u20
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (983040))));
2213 case M32C_OPERAND_DSP_48_U24
:
2217 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2218 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2219 fields
->f_dsp_48_u16
= value
;
2221 if (length
<= 0) break;
2222 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2223 if (length
<= 0) break;
2225 FLD (f_dsp_48_u24
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (16711680))));
2229 case M32C_OPERAND_DSP_48_U8
:
2230 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_48_u8
);
2232 case M32C_OPERAND_DSP_8_S24
:
2235 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, pc
, & value
);
2236 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
2237 fields
->f_dsp_8_s24
= value
;
2240 case M32C_OPERAND_DSP_8_S8
:
2241 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
);
2243 case M32C_OPERAND_DSP_8_U16
:
2246 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 16, 32, total_length
, pc
, & value
);
2247 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2248 fields
->f_dsp_8_u16
= value
;
2251 case M32C_OPERAND_DSP_8_U24
:
2254 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 24, 32, total_length
, pc
, & value
);
2255 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2256 fields
->f_dsp_8_u24
= value
;
2259 case M32C_OPERAND_DSP_8_U6
:
2260 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 6, 32, total_length
, pc
, & fields
->f_dsp_8_u6
);
2262 case M32C_OPERAND_DSP_8_U8
:
2263 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
2265 case M32C_OPERAND_DST16AN
:
2266 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2268 case M32C_OPERAND_DST16AN_S
:
2269 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_dst16_an_s
);
2271 case M32C_OPERAND_DST16ANHI
:
2272 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2274 case M32C_OPERAND_DST16ANQI
:
2275 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2277 case M32C_OPERAND_DST16ANQI_S
:
2278 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2280 case M32C_OPERAND_DST16ANSI
:
2281 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2283 case M32C_OPERAND_DST16RNEXTQI
:
2284 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_ext
);
2286 case M32C_OPERAND_DST16RNHI
:
2287 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2289 case M32C_OPERAND_DST16RNQI
:
2290 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2292 case M32C_OPERAND_DST16RNQI_S
:
2293 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2295 case M32C_OPERAND_DST16RNSI
:
2296 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2298 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
2299 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2301 case M32C_OPERAND_DST32ANPREFIXED
:
2302 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2304 case M32C_OPERAND_DST32ANPREFIXEDHI
:
2305 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2307 case M32C_OPERAND_DST32ANPREFIXEDQI
:
2308 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2310 case M32C_OPERAND_DST32ANPREFIXEDSI
:
2311 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2313 case M32C_OPERAND_DST32ANUNPREFIXED
:
2314 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2316 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
2317 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2319 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
2320 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2322 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
2323 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2325 case M32C_OPERAND_DST32R0HI_S
:
2327 case M32C_OPERAND_DST32R0QI_S
:
2329 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
2330 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2332 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
2333 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2335 case M32C_OPERAND_DST32RNPREFIXEDHI
:
2338 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2339 value
= ((((value
) + (2))) % (4));
2340 fields
->f_dst32_rn_prefixed_HI
= value
;
2343 case M32C_OPERAND_DST32RNPREFIXEDQI
:
2346 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2347 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2348 fields
->f_dst32_rn_prefixed_QI
= value
;
2351 case M32C_OPERAND_DST32RNPREFIXEDSI
:
2354 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2355 value
= ((value
) - (2));
2356 fields
->f_dst32_rn_prefixed_SI
= value
;
2359 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
2362 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2363 value
= ((((value
) + (2))) % (4));
2364 fields
->f_dst32_rn_unprefixed_HI
= value
;
2367 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
2370 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2371 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2372 fields
->f_dst32_rn_unprefixed_QI
= value
;
2375 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
2378 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2379 value
= ((value
) - (2));
2380 fields
->f_dst32_rn_unprefixed_SI
= value
;
2383 case M32C_OPERAND_G
:
2385 case M32C_OPERAND_IMM_12_S4
:
2386 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
);
2388 case M32C_OPERAND_IMM_12_S4N
:
2389 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
);
2391 case M32C_OPERAND_IMM_13_U3
:
2392 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_imm_13_u3
);
2394 case M32C_OPERAND_IMM_16_HI
:
2397 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2398 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2399 fields
->f_dsp_16_s16
= value
;
2402 case M32C_OPERAND_IMM_16_QI
:
2403 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
);
2405 case M32C_OPERAND_IMM_16_SI
:
2409 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2410 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2411 fields
->f_dsp_16_u16
= value
;
2413 if (length
<= 0) break;
2416 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2417 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2418 fields
->f_dsp_32_u16
= value
;
2420 if (length
<= 0) break;
2422 FLD (f_dsp_16_s32
) = ((((FLD (f_dsp_16_u16
)) & (65535))) | (((((FLD (f_dsp_32_u16
)) << (16))) & (0xffff0000))));
2426 case M32C_OPERAND_IMM_20_S4
:
2427 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
);
2429 case M32C_OPERAND_IMM_24_HI
:
2431 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2432 if (length
<= 0) break;
2433 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2434 if (length
<= 0) break;
2436 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2440 case M32C_OPERAND_IMM_24_QI
:
2441 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
);
2443 case M32C_OPERAND_IMM_24_SI
:
2445 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2446 if (length
<= 0) break;
2449 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2450 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2451 fields
->f_dsp_32_u24
= value
;
2453 if (length
<= 0) break;
2455 FLD (f_dsp_24_s32
) = ((((FLD (f_dsp_24_u8
)) & (255))) | (((((FLD (f_dsp_32_u24
)) << (8))) & (0xffffff00))));
2459 case M32C_OPERAND_IMM_32_HI
:
2462 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2463 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2464 fields
->f_dsp_32_s16
= value
;
2467 case M32C_OPERAND_IMM_32_QI
:
2468 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
);
2470 case M32C_OPERAND_IMM_32_SI
:
2473 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, pc
, & value
);
2474 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
2475 fields
->f_dsp_32_s32
= value
;
2478 case M32C_OPERAND_IMM_40_HI
:
2481 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2482 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2483 fields
->f_dsp_40_s16
= value
;
2486 case M32C_OPERAND_IMM_40_QI
:
2487 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
);
2489 case M32C_OPERAND_IMM_40_SI
:
2493 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2494 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2495 fields
->f_dsp_40_u24
= value
;
2497 if (length
<= 0) break;
2498 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2499 if (length
<= 0) break;
2501 FLD (f_dsp_40_s32
) = ((((FLD (f_dsp_40_u24
)) & (16777215))) | (((((FLD (f_dsp_64_u8
)) << (24))) & (0xff000000))));
2505 case M32C_OPERAND_IMM_48_HI
:
2508 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2509 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2510 fields
->f_dsp_48_s16
= value
;
2513 case M32C_OPERAND_IMM_48_QI
:
2514 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
);
2516 case M32C_OPERAND_IMM_48_SI
:
2520 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2521 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2522 fields
->f_dsp_48_u16
= value
;
2524 if (length
<= 0) break;
2527 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 16, 32, total_length
, pc
, & value
);
2528 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2529 fields
->f_dsp_64_u16
= value
;
2531 if (length
<= 0) break;
2533 FLD (f_dsp_48_s32
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u16
)) << (16))) & (0xffff0000))));
2537 case M32C_OPERAND_IMM_56_HI
:
2539 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_56_u8
);
2540 if (length
<= 0) break;
2541 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2542 if (length
<= 0) break;
2544 FLD (f_dsp_56_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_64_u8
)) << (8))) | (FLD (f_dsp_56_u8
))))));
2548 case M32C_OPERAND_IMM_56_QI
:
2549 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
);
2551 case M32C_OPERAND_IMM_64_HI
:
2554 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, pc
, & value
);
2555 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2556 fields
->f_dsp_64_s16
= value
;
2559 case M32C_OPERAND_IMM_8_HI
:
2562 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, pc
, & value
);
2563 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2564 fields
->f_dsp_8_s16
= value
;
2567 case M32C_OPERAND_IMM_8_QI
:
2568 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
);
2570 case M32C_OPERAND_IMM_8_S4
:
2571 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
);
2573 case M32C_OPERAND_IMM_8_S4N
:
2574 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
);
2576 case M32C_OPERAND_IMM_SH_12_S4
:
2577 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
);
2579 case M32C_OPERAND_IMM_SH_20_S4
:
2580 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
);
2582 case M32C_OPERAND_IMM_SH_8_S4
:
2583 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, pc
, & fields
->f_imm_8_s4
);
2585 case M32C_OPERAND_IMM1_S
:
2588 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 1, 32, total_length
, pc
, & value
);
2589 value
= ((value
) + (1));
2590 fields
->f_imm1_S
= value
;
2593 case M32C_OPERAND_IMM3_S
:
2595 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2596 if (length
<= 0) break;
2597 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2598 if (length
<= 0) break;
2600 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
2604 case M32C_OPERAND_LAB_16_8
:
2607 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
);
2608 value
= ((value
) + (((pc
) + (2))));
2609 fields
->f_lab_16_8
= value
;
2612 case M32C_OPERAND_LAB_24_8
:
2615 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
);
2616 value
= ((value
) + (((pc
) + (2))));
2617 fields
->f_lab_24_8
= value
;
2620 case M32C_OPERAND_LAB_32_8
:
2623 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
);
2624 value
= ((value
) + (((pc
) + (2))));
2625 fields
->f_lab_32_8
= value
;
2628 case M32C_OPERAND_LAB_40_8
:
2631 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
);
2632 value
= ((value
) + (((pc
) + (2))));
2633 fields
->f_lab_40_8
= value
;
2636 case M32C_OPERAND_LAB_5_3
:
2639 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, pc
, & value
);
2640 value
= ((value
) + (((pc
) + (2))));
2641 fields
->f_lab_5_3
= value
;
2644 case M32C_OPERAND_LAB_8_16
:
2647 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
);
2648 value
= ((((((unsigned int) (((value
) & (65535))) >> (8))) | (((int) (((((value
) & (255))) << (24))) >> (16))))) + (((pc
) + (1))));
2649 fields
->f_lab_8_16
= value
;
2652 case M32C_OPERAND_LAB_8_24
:
2655 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, pc
, & value
);
2656 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2657 fields
->f_lab_8_24
= value
;
2660 case M32C_OPERAND_LAB_8_8
:
2663 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
);
2664 value
= ((value
) + (((pc
) + (1))));
2665 fields
->f_lab_8_8
= value
;
2668 case M32C_OPERAND_LAB32_JMP_S
:
2670 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2671 if (length
<= 0) break;
2672 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2673 if (length
<= 0) break;
2675 FLD (f_lab32_jmp_s
) = ((pc
) + (((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (2))));
2679 case M32C_OPERAND_Q
:
2681 case M32C_OPERAND_R0
:
2683 case M32C_OPERAND_R0H
:
2685 case M32C_OPERAND_R0L
:
2687 case M32C_OPERAND_R1
:
2689 case M32C_OPERAND_R1R2R0
:
2691 case M32C_OPERAND_R2
:
2693 case M32C_OPERAND_R2R0
:
2695 case M32C_OPERAND_R3
:
2697 case M32C_OPERAND_R3R1
:
2699 case M32C_OPERAND_REGSETPOP
:
2700 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2702 case M32C_OPERAND_REGSETPUSH
:
2703 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2705 case M32C_OPERAND_RN16_PUSH_S
:
2706 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
2708 case M32C_OPERAND_S
:
2710 case M32C_OPERAND_SRC16AN
:
2711 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2713 case M32C_OPERAND_SRC16ANHI
:
2714 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2716 case M32C_OPERAND_SRC16ANQI
:
2717 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2719 case M32C_OPERAND_SRC16RNHI
:
2720 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2722 case M32C_OPERAND_SRC16RNQI
:
2723 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2725 case M32C_OPERAND_SRC32ANPREFIXED
:
2726 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2728 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
2729 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2731 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
2732 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2734 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
2735 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2737 case M32C_OPERAND_SRC32ANUNPREFIXED
:
2738 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2740 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
2741 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2743 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
2744 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2746 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
2747 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2749 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
2752 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2753 value
= ((((value
) + (2))) % (4));
2754 fields
->f_src32_rn_prefixed_HI
= value
;
2757 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
2760 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2761 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2762 fields
->f_src32_rn_prefixed_QI
= value
;
2765 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
2768 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2769 value
= ((value
) - (2));
2770 fields
->f_src32_rn_prefixed_SI
= value
;
2773 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
2776 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2777 value
= ((((value
) + (2))) % (4));
2778 fields
->f_src32_rn_unprefixed_HI
= value
;
2781 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
2784 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2785 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2786 fields
->f_src32_rn_unprefixed_QI
= value
;
2789 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
2792 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2793 value
= ((value
) - (2));
2794 fields
->f_src32_rn_unprefixed_SI
= value
;
2797 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
2798 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_5_1
);
2800 case M32C_OPERAND_X
:
2802 case M32C_OPERAND_Z
:
2804 case M32C_OPERAND_COND16_16
:
2805 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2807 case M32C_OPERAND_COND16_24
:
2808 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2810 case M32C_OPERAND_COND16_32
:
2811 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2813 case M32C_OPERAND_COND16C
:
2814 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2816 case M32C_OPERAND_COND16J
:
2817 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2819 case M32C_OPERAND_COND16J5
:
2820 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_cond16j_5
);
2822 case M32C_OPERAND_COND32
:
2824 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_9_1
);
2825 if (length
<= 0) break;
2826 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2827 if (length
<= 0) break;
2829 FLD (f_cond32
) = ((((FLD (f_9_1
)) << (3))) | (FLD (f_13_3
)));
2833 case M32C_OPERAND_COND32_16
:
2834 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2836 case M32C_OPERAND_COND32_24
:
2837 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2839 case M32C_OPERAND_COND32_32
:
2840 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2842 case M32C_OPERAND_COND32_40
:
2843 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2845 case M32C_OPERAND_COND32J
:
2847 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 1, 3, 32, total_length
, pc
, & fields
->f_1_3
);
2848 if (length
<= 0) break;
2849 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2850 if (length
<= 0) break;
2852 FLD (f_cond32j
) = ((((FLD (f_1_3
)) << (1))) | (FLD (f_7_1
)));
2856 case M32C_OPERAND_CR1_PREFIXED_32
:
2857 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2859 case M32C_OPERAND_CR1_UNPREFIXED_32
:
2860 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2862 case M32C_OPERAND_CR16
:
2863 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2865 case M32C_OPERAND_CR2_32
:
2866 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2868 case M32C_OPERAND_CR3_PREFIXED_32
:
2869 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2871 case M32C_OPERAND_CR3_UNPREFIXED_32
:
2872 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2874 case M32C_OPERAND_FLAGS16
:
2875 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2877 case M32C_OPERAND_FLAGS32
:
2878 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2880 case M32C_OPERAND_SCCOND32
:
2881 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2883 case M32C_OPERAND_SIZE
:
2887 /* xgettext:c-format */
2888 fprintf (stderr
, _("Unrecognized field %d while decoding insn.\n"),
2896 cgen_insert_fn
* const m32c_cgen_insert_handlers
[] =
2901 cgen_extract_fn
* const m32c_cgen_extract_handlers
[] =
2903 extract_insn_normal
,
2906 int m32c_cgen_get_int_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2907 bfd_vma
m32c_cgen_get_vma_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2909 /* Getting values from cgen_fields is handled by a collection of functions.
2910 They are distinguished by the type of the VALUE argument they return.
2911 TODO: floating point, inlining support, remove cases where result type
2915 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
2917 const CGEN_FIELDS
* fields
)
2923 case M32C_OPERAND_A0
:
2926 case M32C_OPERAND_A1
:
2929 case M32C_OPERAND_AN16_PUSH_S
:
2930 value
= fields
->f_4_1
;
2932 case M32C_OPERAND_BIT16AN
:
2933 value
= fields
->f_dst16_an
;
2935 case M32C_OPERAND_BIT16RN
:
2936 value
= fields
->f_dst16_rn
;
2938 case M32C_OPERAND_BIT3_S
:
2939 value
= fields
->f_imm3_S
;
2941 case M32C_OPERAND_BIT32ANPREFIXED
:
2942 value
= fields
->f_dst32_an_prefixed
;
2944 case M32C_OPERAND_BIT32ANUNPREFIXED
:
2945 value
= fields
->f_dst32_an_unprefixed
;
2947 case M32C_OPERAND_BIT32RNPREFIXED
:
2948 value
= fields
->f_dst32_rn_prefixed_QI
;
2950 case M32C_OPERAND_BIT32RNUNPREFIXED
:
2951 value
= fields
->f_dst32_rn_unprefixed_QI
;
2953 case M32C_OPERAND_BITBASE16_16_S8
:
2954 value
= fields
->f_dsp_16_s8
;
2956 case M32C_OPERAND_BITBASE16_16_U16
:
2957 value
= fields
->f_dsp_16_u16
;
2959 case M32C_OPERAND_BITBASE16_16_U8
:
2960 value
= fields
->f_dsp_16_u8
;
2962 case M32C_OPERAND_BITBASE16_8_U11_S
:
2963 value
= fields
->f_bitbase16_u11_S
;
2965 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
2966 value
= fields
->f_bitbase32_16_s11_unprefixed
;
2968 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
2969 value
= fields
->f_bitbase32_16_s19_unprefixed
;
2971 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
2972 value
= fields
->f_bitbase32_16_u11_unprefixed
;
2974 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
2975 value
= fields
->f_bitbase32_16_u19_unprefixed
;
2977 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
2978 value
= fields
->f_bitbase32_16_u27_unprefixed
;
2980 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
2981 value
= fields
->f_bitbase32_24_s11_prefixed
;
2983 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
2984 value
= fields
->f_bitbase32_24_s19_prefixed
;
2986 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
2987 value
= fields
->f_bitbase32_24_u11_prefixed
;
2989 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
2990 value
= fields
->f_bitbase32_24_u19_prefixed
;
2992 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
2993 value
= fields
->f_bitbase32_24_u27_prefixed
;
2995 case M32C_OPERAND_BITNO16R
:
2996 value
= fields
->f_dsp_16_u8
;
2998 case M32C_OPERAND_BITNO32PREFIXED
:
2999 value
= fields
->f_bitno32_prefixed
;
3001 case M32C_OPERAND_BITNO32UNPREFIXED
:
3002 value
= fields
->f_bitno32_unprefixed
;
3004 case M32C_OPERAND_DSP_10_U6
:
3005 value
= fields
->f_dsp_10_u6
;
3007 case M32C_OPERAND_DSP_16_S16
:
3008 value
= fields
->f_dsp_16_s16
;
3010 case M32C_OPERAND_DSP_16_S8
:
3011 value
= fields
->f_dsp_16_s8
;
3013 case M32C_OPERAND_DSP_16_U16
:
3014 value
= fields
->f_dsp_16_u16
;
3016 case M32C_OPERAND_DSP_16_U20
:
3017 value
= fields
->f_dsp_16_u24
;
3019 case M32C_OPERAND_DSP_16_U24
:
3020 value
= fields
->f_dsp_16_u24
;
3022 case M32C_OPERAND_DSP_16_U8
:
3023 value
= fields
->f_dsp_16_u8
;
3025 case M32C_OPERAND_DSP_24_S16
:
3026 value
= fields
->f_dsp_24_s16
;
3028 case M32C_OPERAND_DSP_24_S8
:
3029 value
= fields
->f_dsp_24_s8
;
3031 case M32C_OPERAND_DSP_24_U16
:
3032 value
= fields
->f_dsp_24_u16
;
3034 case M32C_OPERAND_DSP_24_U20
:
3035 value
= fields
->f_dsp_24_u24
;
3037 case M32C_OPERAND_DSP_24_U24
:
3038 value
= fields
->f_dsp_24_u24
;
3040 case M32C_OPERAND_DSP_24_U8
:
3041 value
= fields
->f_dsp_24_u8
;
3043 case M32C_OPERAND_DSP_32_S16
:
3044 value
= fields
->f_dsp_32_s16
;
3046 case M32C_OPERAND_DSP_32_S8
:
3047 value
= fields
->f_dsp_32_s8
;
3049 case M32C_OPERAND_DSP_32_U16
:
3050 value
= fields
->f_dsp_32_u16
;
3052 case M32C_OPERAND_DSP_32_U20
:
3053 value
= fields
->f_dsp_32_u24
;
3055 case M32C_OPERAND_DSP_32_U24
:
3056 value
= fields
->f_dsp_32_u24
;
3058 case M32C_OPERAND_DSP_32_U8
:
3059 value
= fields
->f_dsp_32_u8
;
3061 case M32C_OPERAND_DSP_40_S16
:
3062 value
= fields
->f_dsp_40_s16
;
3064 case M32C_OPERAND_DSP_40_S8
:
3065 value
= fields
->f_dsp_40_s8
;
3067 case M32C_OPERAND_DSP_40_U16
:
3068 value
= fields
->f_dsp_40_u16
;
3070 case M32C_OPERAND_DSP_40_U20
:
3071 value
= fields
->f_dsp_40_u20
;
3073 case M32C_OPERAND_DSP_40_U24
:
3074 value
= fields
->f_dsp_40_u24
;
3076 case M32C_OPERAND_DSP_40_U8
:
3077 value
= fields
->f_dsp_40_u8
;
3079 case M32C_OPERAND_DSP_48_S16
:
3080 value
= fields
->f_dsp_48_s16
;
3082 case M32C_OPERAND_DSP_48_S8
:
3083 value
= fields
->f_dsp_48_s8
;
3085 case M32C_OPERAND_DSP_48_U16
:
3086 value
= fields
->f_dsp_48_u16
;
3088 case M32C_OPERAND_DSP_48_U20
:
3089 value
= fields
->f_dsp_48_u20
;
3091 case M32C_OPERAND_DSP_48_U24
:
3092 value
= fields
->f_dsp_48_u24
;
3094 case M32C_OPERAND_DSP_48_U8
:
3095 value
= fields
->f_dsp_48_u8
;
3097 case M32C_OPERAND_DSP_8_S24
:
3098 value
= fields
->f_dsp_8_s24
;
3100 case M32C_OPERAND_DSP_8_S8
:
3101 value
= fields
->f_dsp_8_s8
;
3103 case M32C_OPERAND_DSP_8_U16
:
3104 value
= fields
->f_dsp_8_u16
;
3106 case M32C_OPERAND_DSP_8_U24
:
3107 value
= fields
->f_dsp_8_u24
;
3109 case M32C_OPERAND_DSP_8_U6
:
3110 value
= fields
->f_dsp_8_u6
;
3112 case M32C_OPERAND_DSP_8_U8
:
3113 value
= fields
->f_dsp_8_u8
;
3115 case M32C_OPERAND_DST16AN
:
3116 value
= fields
->f_dst16_an
;
3118 case M32C_OPERAND_DST16AN_S
:
3119 value
= fields
->f_dst16_an_s
;
3121 case M32C_OPERAND_DST16ANHI
:
3122 value
= fields
->f_dst16_an
;
3124 case M32C_OPERAND_DST16ANQI
:
3125 value
= fields
->f_dst16_an
;
3127 case M32C_OPERAND_DST16ANQI_S
:
3128 value
= fields
->f_dst16_rn_QI_s
;
3130 case M32C_OPERAND_DST16ANSI
:
3131 value
= fields
->f_dst16_an
;
3133 case M32C_OPERAND_DST16RNEXTQI
:
3134 value
= fields
->f_dst16_rn_ext
;
3136 case M32C_OPERAND_DST16RNHI
:
3137 value
= fields
->f_dst16_rn
;
3139 case M32C_OPERAND_DST16RNQI
:
3140 value
= fields
->f_dst16_rn
;
3142 case M32C_OPERAND_DST16RNQI_S
:
3143 value
= fields
->f_dst16_rn_QI_s
;
3145 case M32C_OPERAND_DST16RNSI
:
3146 value
= fields
->f_dst16_rn
;
3148 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3149 value
= fields
->f_dst32_an_unprefixed
;
3151 case M32C_OPERAND_DST32ANPREFIXED
:
3152 value
= fields
->f_dst32_an_prefixed
;
3154 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3155 value
= fields
->f_dst32_an_prefixed
;
3157 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3158 value
= fields
->f_dst32_an_prefixed
;
3160 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3161 value
= fields
->f_dst32_an_prefixed
;
3163 case M32C_OPERAND_DST32ANUNPREFIXED
:
3164 value
= fields
->f_dst32_an_unprefixed
;
3166 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3167 value
= fields
->f_dst32_an_unprefixed
;
3169 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3170 value
= fields
->f_dst32_an_unprefixed
;
3172 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3173 value
= fields
->f_dst32_an_unprefixed
;
3175 case M32C_OPERAND_DST32R0HI_S
:
3178 case M32C_OPERAND_DST32R0QI_S
:
3181 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3182 value
= fields
->f_dst32_rn_ext_unprefixed
;
3184 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3185 value
= fields
->f_dst32_rn_ext_unprefixed
;
3187 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3188 value
= fields
->f_dst32_rn_prefixed_HI
;
3190 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3191 value
= fields
->f_dst32_rn_prefixed_QI
;
3193 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3194 value
= fields
->f_dst32_rn_prefixed_SI
;
3196 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3197 value
= fields
->f_dst32_rn_unprefixed_HI
;
3199 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3200 value
= fields
->f_dst32_rn_unprefixed_QI
;
3202 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3203 value
= fields
->f_dst32_rn_unprefixed_SI
;
3205 case M32C_OPERAND_G
:
3208 case M32C_OPERAND_IMM_12_S4
:
3209 value
= fields
->f_imm_12_s4
;
3211 case M32C_OPERAND_IMM_12_S4N
:
3212 value
= fields
->f_imm_12_s4
;
3214 case M32C_OPERAND_IMM_13_U3
:
3215 value
= fields
->f_imm_13_u3
;
3217 case M32C_OPERAND_IMM_16_HI
:
3218 value
= fields
->f_dsp_16_s16
;
3220 case M32C_OPERAND_IMM_16_QI
:
3221 value
= fields
->f_dsp_16_s8
;
3223 case M32C_OPERAND_IMM_16_SI
:
3224 value
= fields
->f_dsp_16_s32
;
3226 case M32C_OPERAND_IMM_20_S4
:
3227 value
= fields
->f_imm_20_s4
;
3229 case M32C_OPERAND_IMM_24_HI
:
3230 value
= fields
->f_dsp_24_s16
;
3232 case M32C_OPERAND_IMM_24_QI
:
3233 value
= fields
->f_dsp_24_s8
;
3235 case M32C_OPERAND_IMM_24_SI
:
3236 value
= fields
->f_dsp_24_s32
;
3238 case M32C_OPERAND_IMM_32_HI
:
3239 value
= fields
->f_dsp_32_s16
;
3241 case M32C_OPERAND_IMM_32_QI
:
3242 value
= fields
->f_dsp_32_s8
;
3244 case M32C_OPERAND_IMM_32_SI
:
3245 value
= fields
->f_dsp_32_s32
;
3247 case M32C_OPERAND_IMM_40_HI
:
3248 value
= fields
->f_dsp_40_s16
;
3250 case M32C_OPERAND_IMM_40_QI
:
3251 value
= fields
->f_dsp_40_s8
;
3253 case M32C_OPERAND_IMM_40_SI
:
3254 value
= fields
->f_dsp_40_s32
;
3256 case M32C_OPERAND_IMM_48_HI
:
3257 value
= fields
->f_dsp_48_s16
;
3259 case M32C_OPERAND_IMM_48_QI
:
3260 value
= fields
->f_dsp_48_s8
;
3262 case M32C_OPERAND_IMM_48_SI
:
3263 value
= fields
->f_dsp_48_s32
;
3265 case M32C_OPERAND_IMM_56_HI
:
3266 value
= fields
->f_dsp_56_s16
;
3268 case M32C_OPERAND_IMM_56_QI
:
3269 value
= fields
->f_dsp_56_s8
;
3271 case M32C_OPERAND_IMM_64_HI
:
3272 value
= fields
->f_dsp_64_s16
;
3274 case M32C_OPERAND_IMM_8_HI
:
3275 value
= fields
->f_dsp_8_s16
;
3277 case M32C_OPERAND_IMM_8_QI
:
3278 value
= fields
->f_dsp_8_s8
;
3280 case M32C_OPERAND_IMM_8_S4
:
3281 value
= fields
->f_imm_8_s4
;
3283 case M32C_OPERAND_IMM_8_S4N
:
3284 value
= fields
->f_imm_8_s4
;
3286 case M32C_OPERAND_IMM_SH_12_S4
:
3287 value
= fields
->f_imm_12_s4
;
3289 case M32C_OPERAND_IMM_SH_20_S4
:
3290 value
= fields
->f_imm_20_s4
;
3292 case M32C_OPERAND_IMM_SH_8_S4
:
3293 value
= fields
->f_imm_8_s4
;
3295 case M32C_OPERAND_IMM1_S
:
3296 value
= fields
->f_imm1_S
;
3298 case M32C_OPERAND_IMM3_S
:
3299 value
= fields
->f_imm3_S
;
3301 case M32C_OPERAND_LAB_16_8
:
3302 value
= fields
->f_lab_16_8
;
3304 case M32C_OPERAND_LAB_24_8
:
3305 value
= fields
->f_lab_24_8
;
3307 case M32C_OPERAND_LAB_32_8
:
3308 value
= fields
->f_lab_32_8
;
3310 case M32C_OPERAND_LAB_40_8
:
3311 value
= fields
->f_lab_40_8
;
3313 case M32C_OPERAND_LAB_5_3
:
3314 value
= fields
->f_lab_5_3
;
3316 case M32C_OPERAND_LAB_8_16
:
3317 value
= fields
->f_lab_8_16
;
3319 case M32C_OPERAND_LAB_8_24
:
3320 value
= fields
->f_lab_8_24
;
3322 case M32C_OPERAND_LAB_8_8
:
3323 value
= fields
->f_lab_8_8
;
3325 case M32C_OPERAND_LAB32_JMP_S
:
3326 value
= fields
->f_lab32_jmp_s
;
3328 case M32C_OPERAND_Q
:
3331 case M32C_OPERAND_R0
:
3334 case M32C_OPERAND_R0H
:
3337 case M32C_OPERAND_R0L
:
3340 case M32C_OPERAND_R1
:
3343 case M32C_OPERAND_R1R2R0
:
3346 case M32C_OPERAND_R2
:
3349 case M32C_OPERAND_R2R0
:
3352 case M32C_OPERAND_R3
:
3355 case M32C_OPERAND_R3R1
:
3358 case M32C_OPERAND_REGSETPOP
:
3359 value
= fields
->f_8_8
;
3361 case M32C_OPERAND_REGSETPUSH
:
3362 value
= fields
->f_8_8
;
3364 case M32C_OPERAND_RN16_PUSH_S
:
3365 value
= fields
->f_4_1
;
3367 case M32C_OPERAND_S
:
3370 case M32C_OPERAND_SRC16AN
:
3371 value
= fields
->f_src16_an
;
3373 case M32C_OPERAND_SRC16ANHI
:
3374 value
= fields
->f_src16_an
;
3376 case M32C_OPERAND_SRC16ANQI
:
3377 value
= fields
->f_src16_an
;
3379 case M32C_OPERAND_SRC16RNHI
:
3380 value
= fields
->f_src16_rn
;
3382 case M32C_OPERAND_SRC16RNQI
:
3383 value
= fields
->f_src16_rn
;
3385 case M32C_OPERAND_SRC32ANPREFIXED
:
3386 value
= fields
->f_src32_an_prefixed
;
3388 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3389 value
= fields
->f_src32_an_prefixed
;
3391 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3392 value
= fields
->f_src32_an_prefixed
;
3394 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3395 value
= fields
->f_src32_an_prefixed
;
3397 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3398 value
= fields
->f_src32_an_unprefixed
;
3400 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3401 value
= fields
->f_src32_an_unprefixed
;
3403 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3404 value
= fields
->f_src32_an_unprefixed
;
3406 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3407 value
= fields
->f_src32_an_unprefixed
;
3409 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3410 value
= fields
->f_src32_rn_prefixed_HI
;
3412 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3413 value
= fields
->f_src32_rn_prefixed_QI
;
3415 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3416 value
= fields
->f_src32_rn_prefixed_SI
;
3418 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3419 value
= fields
->f_src32_rn_unprefixed_HI
;
3421 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3422 value
= fields
->f_src32_rn_unprefixed_QI
;
3424 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3425 value
= fields
->f_src32_rn_unprefixed_SI
;
3427 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3428 value
= fields
->f_5_1
;
3430 case M32C_OPERAND_X
:
3433 case M32C_OPERAND_Z
:
3436 case M32C_OPERAND_COND16_16
:
3437 value
= fields
->f_dsp_16_u8
;
3439 case M32C_OPERAND_COND16_24
:
3440 value
= fields
->f_dsp_24_u8
;
3442 case M32C_OPERAND_COND16_32
:
3443 value
= fields
->f_dsp_32_u8
;
3445 case M32C_OPERAND_COND16C
:
3446 value
= fields
->f_cond16
;
3448 case M32C_OPERAND_COND16J
:
3449 value
= fields
->f_cond16
;
3451 case M32C_OPERAND_COND16J5
:
3452 value
= fields
->f_cond16j_5
;
3454 case M32C_OPERAND_COND32
:
3455 value
= fields
->f_cond32
;
3457 case M32C_OPERAND_COND32_16
:
3458 value
= fields
->f_dsp_16_u8
;
3460 case M32C_OPERAND_COND32_24
:
3461 value
= fields
->f_dsp_24_u8
;
3463 case M32C_OPERAND_COND32_32
:
3464 value
= fields
->f_dsp_32_u8
;
3466 case M32C_OPERAND_COND32_40
:
3467 value
= fields
->f_dsp_40_u8
;
3469 case M32C_OPERAND_COND32J
:
3470 value
= fields
->f_cond32j
;
3472 case M32C_OPERAND_CR1_PREFIXED_32
:
3473 value
= fields
->f_21_3
;
3475 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3476 value
= fields
->f_13_3
;
3478 case M32C_OPERAND_CR16
:
3479 value
= fields
->f_9_3
;
3481 case M32C_OPERAND_CR2_32
:
3482 value
= fields
->f_13_3
;
3484 case M32C_OPERAND_CR3_PREFIXED_32
:
3485 value
= fields
->f_21_3
;
3487 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3488 value
= fields
->f_13_3
;
3490 case M32C_OPERAND_FLAGS16
:
3491 value
= fields
->f_9_3
;
3493 case M32C_OPERAND_FLAGS32
:
3494 value
= fields
->f_13_3
;
3496 case M32C_OPERAND_SCCOND32
:
3497 value
= fields
->f_cond16
;
3499 case M32C_OPERAND_SIZE
:
3504 /* xgettext:c-format */
3505 fprintf (stderr
, _("Unrecognized field %d while getting int operand.\n"),
3514 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3516 const CGEN_FIELDS
* fields
)
3522 case M32C_OPERAND_A0
:
3525 case M32C_OPERAND_A1
:
3528 case M32C_OPERAND_AN16_PUSH_S
:
3529 value
= fields
->f_4_1
;
3531 case M32C_OPERAND_BIT16AN
:
3532 value
= fields
->f_dst16_an
;
3534 case M32C_OPERAND_BIT16RN
:
3535 value
= fields
->f_dst16_rn
;
3537 case M32C_OPERAND_BIT3_S
:
3538 value
= fields
->f_imm3_S
;
3540 case M32C_OPERAND_BIT32ANPREFIXED
:
3541 value
= fields
->f_dst32_an_prefixed
;
3543 case M32C_OPERAND_BIT32ANUNPREFIXED
:
3544 value
= fields
->f_dst32_an_unprefixed
;
3546 case M32C_OPERAND_BIT32RNPREFIXED
:
3547 value
= fields
->f_dst32_rn_prefixed_QI
;
3549 case M32C_OPERAND_BIT32RNUNPREFIXED
:
3550 value
= fields
->f_dst32_rn_unprefixed_QI
;
3552 case M32C_OPERAND_BITBASE16_16_S8
:
3553 value
= fields
->f_dsp_16_s8
;
3555 case M32C_OPERAND_BITBASE16_16_U16
:
3556 value
= fields
->f_dsp_16_u16
;
3558 case M32C_OPERAND_BITBASE16_16_U8
:
3559 value
= fields
->f_dsp_16_u8
;
3561 case M32C_OPERAND_BITBASE16_8_U11_S
:
3562 value
= fields
->f_bitbase16_u11_S
;
3564 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
3565 value
= fields
->f_bitbase32_16_s11_unprefixed
;
3567 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
3568 value
= fields
->f_bitbase32_16_s19_unprefixed
;
3570 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
3571 value
= fields
->f_bitbase32_16_u11_unprefixed
;
3573 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
3574 value
= fields
->f_bitbase32_16_u19_unprefixed
;
3576 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
3577 value
= fields
->f_bitbase32_16_u27_unprefixed
;
3579 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
3580 value
= fields
->f_bitbase32_24_s11_prefixed
;
3582 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
3583 value
= fields
->f_bitbase32_24_s19_prefixed
;
3585 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
3586 value
= fields
->f_bitbase32_24_u11_prefixed
;
3588 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3589 value
= fields
->f_bitbase32_24_u19_prefixed
;
3591 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3592 value
= fields
->f_bitbase32_24_u27_prefixed
;
3594 case M32C_OPERAND_BITNO16R
:
3595 value
= fields
->f_dsp_16_u8
;
3597 case M32C_OPERAND_BITNO32PREFIXED
:
3598 value
= fields
->f_bitno32_prefixed
;
3600 case M32C_OPERAND_BITNO32UNPREFIXED
:
3601 value
= fields
->f_bitno32_unprefixed
;
3603 case M32C_OPERAND_DSP_10_U6
:
3604 value
= fields
->f_dsp_10_u6
;
3606 case M32C_OPERAND_DSP_16_S16
:
3607 value
= fields
->f_dsp_16_s16
;
3609 case M32C_OPERAND_DSP_16_S8
:
3610 value
= fields
->f_dsp_16_s8
;
3612 case M32C_OPERAND_DSP_16_U16
:
3613 value
= fields
->f_dsp_16_u16
;
3615 case M32C_OPERAND_DSP_16_U20
:
3616 value
= fields
->f_dsp_16_u24
;
3618 case M32C_OPERAND_DSP_16_U24
:
3619 value
= fields
->f_dsp_16_u24
;
3621 case M32C_OPERAND_DSP_16_U8
:
3622 value
= fields
->f_dsp_16_u8
;
3624 case M32C_OPERAND_DSP_24_S16
:
3625 value
= fields
->f_dsp_24_s16
;
3627 case M32C_OPERAND_DSP_24_S8
:
3628 value
= fields
->f_dsp_24_s8
;
3630 case M32C_OPERAND_DSP_24_U16
:
3631 value
= fields
->f_dsp_24_u16
;
3633 case M32C_OPERAND_DSP_24_U20
:
3634 value
= fields
->f_dsp_24_u24
;
3636 case M32C_OPERAND_DSP_24_U24
:
3637 value
= fields
->f_dsp_24_u24
;
3639 case M32C_OPERAND_DSP_24_U8
:
3640 value
= fields
->f_dsp_24_u8
;
3642 case M32C_OPERAND_DSP_32_S16
:
3643 value
= fields
->f_dsp_32_s16
;
3645 case M32C_OPERAND_DSP_32_S8
:
3646 value
= fields
->f_dsp_32_s8
;
3648 case M32C_OPERAND_DSP_32_U16
:
3649 value
= fields
->f_dsp_32_u16
;
3651 case M32C_OPERAND_DSP_32_U20
:
3652 value
= fields
->f_dsp_32_u24
;
3654 case M32C_OPERAND_DSP_32_U24
:
3655 value
= fields
->f_dsp_32_u24
;
3657 case M32C_OPERAND_DSP_32_U8
:
3658 value
= fields
->f_dsp_32_u8
;
3660 case M32C_OPERAND_DSP_40_S16
:
3661 value
= fields
->f_dsp_40_s16
;
3663 case M32C_OPERAND_DSP_40_S8
:
3664 value
= fields
->f_dsp_40_s8
;
3666 case M32C_OPERAND_DSP_40_U16
:
3667 value
= fields
->f_dsp_40_u16
;
3669 case M32C_OPERAND_DSP_40_U20
:
3670 value
= fields
->f_dsp_40_u20
;
3672 case M32C_OPERAND_DSP_40_U24
:
3673 value
= fields
->f_dsp_40_u24
;
3675 case M32C_OPERAND_DSP_40_U8
:
3676 value
= fields
->f_dsp_40_u8
;
3678 case M32C_OPERAND_DSP_48_S16
:
3679 value
= fields
->f_dsp_48_s16
;
3681 case M32C_OPERAND_DSP_48_S8
:
3682 value
= fields
->f_dsp_48_s8
;
3684 case M32C_OPERAND_DSP_48_U16
:
3685 value
= fields
->f_dsp_48_u16
;
3687 case M32C_OPERAND_DSP_48_U20
:
3688 value
= fields
->f_dsp_48_u20
;
3690 case M32C_OPERAND_DSP_48_U24
:
3691 value
= fields
->f_dsp_48_u24
;
3693 case M32C_OPERAND_DSP_48_U8
:
3694 value
= fields
->f_dsp_48_u8
;
3696 case M32C_OPERAND_DSP_8_S24
:
3697 value
= fields
->f_dsp_8_s24
;
3699 case M32C_OPERAND_DSP_8_S8
:
3700 value
= fields
->f_dsp_8_s8
;
3702 case M32C_OPERAND_DSP_8_U16
:
3703 value
= fields
->f_dsp_8_u16
;
3705 case M32C_OPERAND_DSP_8_U24
:
3706 value
= fields
->f_dsp_8_u24
;
3708 case M32C_OPERAND_DSP_8_U6
:
3709 value
= fields
->f_dsp_8_u6
;
3711 case M32C_OPERAND_DSP_8_U8
:
3712 value
= fields
->f_dsp_8_u8
;
3714 case M32C_OPERAND_DST16AN
:
3715 value
= fields
->f_dst16_an
;
3717 case M32C_OPERAND_DST16AN_S
:
3718 value
= fields
->f_dst16_an_s
;
3720 case M32C_OPERAND_DST16ANHI
:
3721 value
= fields
->f_dst16_an
;
3723 case M32C_OPERAND_DST16ANQI
:
3724 value
= fields
->f_dst16_an
;
3726 case M32C_OPERAND_DST16ANQI_S
:
3727 value
= fields
->f_dst16_rn_QI_s
;
3729 case M32C_OPERAND_DST16ANSI
:
3730 value
= fields
->f_dst16_an
;
3732 case M32C_OPERAND_DST16RNEXTQI
:
3733 value
= fields
->f_dst16_rn_ext
;
3735 case M32C_OPERAND_DST16RNHI
:
3736 value
= fields
->f_dst16_rn
;
3738 case M32C_OPERAND_DST16RNQI
:
3739 value
= fields
->f_dst16_rn
;
3741 case M32C_OPERAND_DST16RNQI_S
:
3742 value
= fields
->f_dst16_rn_QI_s
;
3744 case M32C_OPERAND_DST16RNSI
:
3745 value
= fields
->f_dst16_rn
;
3747 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3748 value
= fields
->f_dst32_an_unprefixed
;
3750 case M32C_OPERAND_DST32ANPREFIXED
:
3751 value
= fields
->f_dst32_an_prefixed
;
3753 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3754 value
= fields
->f_dst32_an_prefixed
;
3756 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3757 value
= fields
->f_dst32_an_prefixed
;
3759 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3760 value
= fields
->f_dst32_an_prefixed
;
3762 case M32C_OPERAND_DST32ANUNPREFIXED
:
3763 value
= fields
->f_dst32_an_unprefixed
;
3765 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3766 value
= fields
->f_dst32_an_unprefixed
;
3768 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3769 value
= fields
->f_dst32_an_unprefixed
;
3771 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3772 value
= fields
->f_dst32_an_unprefixed
;
3774 case M32C_OPERAND_DST32R0HI_S
:
3777 case M32C_OPERAND_DST32R0QI_S
:
3780 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3781 value
= fields
->f_dst32_rn_ext_unprefixed
;
3783 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3784 value
= fields
->f_dst32_rn_ext_unprefixed
;
3786 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3787 value
= fields
->f_dst32_rn_prefixed_HI
;
3789 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3790 value
= fields
->f_dst32_rn_prefixed_QI
;
3792 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3793 value
= fields
->f_dst32_rn_prefixed_SI
;
3795 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3796 value
= fields
->f_dst32_rn_unprefixed_HI
;
3798 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3799 value
= fields
->f_dst32_rn_unprefixed_QI
;
3801 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3802 value
= fields
->f_dst32_rn_unprefixed_SI
;
3804 case M32C_OPERAND_G
:
3807 case M32C_OPERAND_IMM_12_S4
:
3808 value
= fields
->f_imm_12_s4
;
3810 case M32C_OPERAND_IMM_12_S4N
:
3811 value
= fields
->f_imm_12_s4
;
3813 case M32C_OPERAND_IMM_13_U3
:
3814 value
= fields
->f_imm_13_u3
;
3816 case M32C_OPERAND_IMM_16_HI
:
3817 value
= fields
->f_dsp_16_s16
;
3819 case M32C_OPERAND_IMM_16_QI
:
3820 value
= fields
->f_dsp_16_s8
;
3822 case M32C_OPERAND_IMM_16_SI
:
3823 value
= fields
->f_dsp_16_s32
;
3825 case M32C_OPERAND_IMM_20_S4
:
3826 value
= fields
->f_imm_20_s4
;
3828 case M32C_OPERAND_IMM_24_HI
:
3829 value
= fields
->f_dsp_24_s16
;
3831 case M32C_OPERAND_IMM_24_QI
:
3832 value
= fields
->f_dsp_24_s8
;
3834 case M32C_OPERAND_IMM_24_SI
:
3835 value
= fields
->f_dsp_24_s32
;
3837 case M32C_OPERAND_IMM_32_HI
:
3838 value
= fields
->f_dsp_32_s16
;
3840 case M32C_OPERAND_IMM_32_QI
:
3841 value
= fields
->f_dsp_32_s8
;
3843 case M32C_OPERAND_IMM_32_SI
:
3844 value
= fields
->f_dsp_32_s32
;
3846 case M32C_OPERAND_IMM_40_HI
:
3847 value
= fields
->f_dsp_40_s16
;
3849 case M32C_OPERAND_IMM_40_QI
:
3850 value
= fields
->f_dsp_40_s8
;
3852 case M32C_OPERAND_IMM_40_SI
:
3853 value
= fields
->f_dsp_40_s32
;
3855 case M32C_OPERAND_IMM_48_HI
:
3856 value
= fields
->f_dsp_48_s16
;
3858 case M32C_OPERAND_IMM_48_QI
:
3859 value
= fields
->f_dsp_48_s8
;
3861 case M32C_OPERAND_IMM_48_SI
:
3862 value
= fields
->f_dsp_48_s32
;
3864 case M32C_OPERAND_IMM_56_HI
:
3865 value
= fields
->f_dsp_56_s16
;
3867 case M32C_OPERAND_IMM_56_QI
:
3868 value
= fields
->f_dsp_56_s8
;
3870 case M32C_OPERAND_IMM_64_HI
:
3871 value
= fields
->f_dsp_64_s16
;
3873 case M32C_OPERAND_IMM_8_HI
:
3874 value
= fields
->f_dsp_8_s16
;
3876 case M32C_OPERAND_IMM_8_QI
:
3877 value
= fields
->f_dsp_8_s8
;
3879 case M32C_OPERAND_IMM_8_S4
:
3880 value
= fields
->f_imm_8_s4
;
3882 case M32C_OPERAND_IMM_8_S4N
:
3883 value
= fields
->f_imm_8_s4
;
3885 case M32C_OPERAND_IMM_SH_12_S4
:
3886 value
= fields
->f_imm_12_s4
;
3888 case M32C_OPERAND_IMM_SH_20_S4
:
3889 value
= fields
->f_imm_20_s4
;
3891 case M32C_OPERAND_IMM_SH_8_S4
:
3892 value
= fields
->f_imm_8_s4
;
3894 case M32C_OPERAND_IMM1_S
:
3895 value
= fields
->f_imm1_S
;
3897 case M32C_OPERAND_IMM3_S
:
3898 value
= fields
->f_imm3_S
;
3900 case M32C_OPERAND_LAB_16_8
:
3901 value
= fields
->f_lab_16_8
;
3903 case M32C_OPERAND_LAB_24_8
:
3904 value
= fields
->f_lab_24_8
;
3906 case M32C_OPERAND_LAB_32_8
:
3907 value
= fields
->f_lab_32_8
;
3909 case M32C_OPERAND_LAB_40_8
:
3910 value
= fields
->f_lab_40_8
;
3912 case M32C_OPERAND_LAB_5_3
:
3913 value
= fields
->f_lab_5_3
;
3915 case M32C_OPERAND_LAB_8_16
:
3916 value
= fields
->f_lab_8_16
;
3918 case M32C_OPERAND_LAB_8_24
:
3919 value
= fields
->f_lab_8_24
;
3921 case M32C_OPERAND_LAB_8_8
:
3922 value
= fields
->f_lab_8_8
;
3924 case M32C_OPERAND_LAB32_JMP_S
:
3925 value
= fields
->f_lab32_jmp_s
;
3927 case M32C_OPERAND_Q
:
3930 case M32C_OPERAND_R0
:
3933 case M32C_OPERAND_R0H
:
3936 case M32C_OPERAND_R0L
:
3939 case M32C_OPERAND_R1
:
3942 case M32C_OPERAND_R1R2R0
:
3945 case M32C_OPERAND_R2
:
3948 case M32C_OPERAND_R2R0
:
3951 case M32C_OPERAND_R3
:
3954 case M32C_OPERAND_R3R1
:
3957 case M32C_OPERAND_REGSETPOP
:
3958 value
= fields
->f_8_8
;
3960 case M32C_OPERAND_REGSETPUSH
:
3961 value
= fields
->f_8_8
;
3963 case M32C_OPERAND_RN16_PUSH_S
:
3964 value
= fields
->f_4_1
;
3966 case M32C_OPERAND_S
:
3969 case M32C_OPERAND_SRC16AN
:
3970 value
= fields
->f_src16_an
;
3972 case M32C_OPERAND_SRC16ANHI
:
3973 value
= fields
->f_src16_an
;
3975 case M32C_OPERAND_SRC16ANQI
:
3976 value
= fields
->f_src16_an
;
3978 case M32C_OPERAND_SRC16RNHI
:
3979 value
= fields
->f_src16_rn
;
3981 case M32C_OPERAND_SRC16RNQI
:
3982 value
= fields
->f_src16_rn
;
3984 case M32C_OPERAND_SRC32ANPREFIXED
:
3985 value
= fields
->f_src32_an_prefixed
;
3987 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3988 value
= fields
->f_src32_an_prefixed
;
3990 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3991 value
= fields
->f_src32_an_prefixed
;
3993 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3994 value
= fields
->f_src32_an_prefixed
;
3996 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3997 value
= fields
->f_src32_an_unprefixed
;
3999 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4000 value
= fields
->f_src32_an_unprefixed
;
4002 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4003 value
= fields
->f_src32_an_unprefixed
;
4005 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4006 value
= fields
->f_src32_an_unprefixed
;
4008 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4009 value
= fields
->f_src32_rn_prefixed_HI
;
4011 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4012 value
= fields
->f_src32_rn_prefixed_QI
;
4014 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4015 value
= fields
->f_src32_rn_prefixed_SI
;
4017 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4018 value
= fields
->f_src32_rn_unprefixed_HI
;
4020 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4021 value
= fields
->f_src32_rn_unprefixed_QI
;
4023 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4024 value
= fields
->f_src32_rn_unprefixed_SI
;
4026 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4027 value
= fields
->f_5_1
;
4029 case M32C_OPERAND_X
:
4032 case M32C_OPERAND_Z
:
4035 case M32C_OPERAND_COND16_16
:
4036 value
= fields
->f_dsp_16_u8
;
4038 case M32C_OPERAND_COND16_24
:
4039 value
= fields
->f_dsp_24_u8
;
4041 case M32C_OPERAND_COND16_32
:
4042 value
= fields
->f_dsp_32_u8
;
4044 case M32C_OPERAND_COND16C
:
4045 value
= fields
->f_cond16
;
4047 case M32C_OPERAND_COND16J
:
4048 value
= fields
->f_cond16
;
4050 case M32C_OPERAND_COND16J5
:
4051 value
= fields
->f_cond16j_5
;
4053 case M32C_OPERAND_COND32
:
4054 value
= fields
->f_cond32
;
4056 case M32C_OPERAND_COND32_16
:
4057 value
= fields
->f_dsp_16_u8
;
4059 case M32C_OPERAND_COND32_24
:
4060 value
= fields
->f_dsp_24_u8
;
4062 case M32C_OPERAND_COND32_32
:
4063 value
= fields
->f_dsp_32_u8
;
4065 case M32C_OPERAND_COND32_40
:
4066 value
= fields
->f_dsp_40_u8
;
4068 case M32C_OPERAND_COND32J
:
4069 value
= fields
->f_cond32j
;
4071 case M32C_OPERAND_CR1_PREFIXED_32
:
4072 value
= fields
->f_21_3
;
4074 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4075 value
= fields
->f_13_3
;
4077 case M32C_OPERAND_CR16
:
4078 value
= fields
->f_9_3
;
4080 case M32C_OPERAND_CR2_32
:
4081 value
= fields
->f_13_3
;
4083 case M32C_OPERAND_CR3_PREFIXED_32
:
4084 value
= fields
->f_21_3
;
4086 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4087 value
= fields
->f_13_3
;
4089 case M32C_OPERAND_FLAGS16
:
4090 value
= fields
->f_9_3
;
4092 case M32C_OPERAND_FLAGS32
:
4093 value
= fields
->f_13_3
;
4095 case M32C_OPERAND_SCCOND32
:
4096 value
= fields
->f_cond16
;
4098 case M32C_OPERAND_SIZE
:
4103 /* xgettext:c-format */
4104 fprintf (stderr
, _("Unrecognized field %d while getting vma operand.\n"),
4112 void m32c_cgen_set_int_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, int);
4113 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, bfd_vma
);
4115 /* Stuffing values in cgen_fields is handled by a collection of functions.
4116 They are distinguished by the type of the VALUE argument they accept.
4117 TODO: floating point, inlining support, remove cases where argument type
4121 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4123 CGEN_FIELDS
* fields
,
4128 case M32C_OPERAND_A0
:
4130 case M32C_OPERAND_A1
:
4132 case M32C_OPERAND_AN16_PUSH_S
:
4133 fields
->f_4_1
= value
;
4135 case M32C_OPERAND_BIT16AN
:
4136 fields
->f_dst16_an
= value
;
4138 case M32C_OPERAND_BIT16RN
:
4139 fields
->f_dst16_rn
= value
;
4141 case M32C_OPERAND_BIT3_S
:
4142 fields
->f_imm3_S
= value
;
4144 case M32C_OPERAND_BIT32ANPREFIXED
:
4145 fields
->f_dst32_an_prefixed
= value
;
4147 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4148 fields
->f_dst32_an_unprefixed
= value
;
4150 case M32C_OPERAND_BIT32RNPREFIXED
:
4151 fields
->f_dst32_rn_prefixed_QI
= value
;
4153 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4154 fields
->f_dst32_rn_unprefixed_QI
= value
;
4156 case M32C_OPERAND_BITBASE16_16_S8
:
4157 fields
->f_dsp_16_s8
= value
;
4159 case M32C_OPERAND_BITBASE16_16_U16
:
4160 fields
->f_dsp_16_u16
= value
;
4162 case M32C_OPERAND_BITBASE16_16_U8
:
4163 fields
->f_dsp_16_u8
= value
;
4165 case M32C_OPERAND_BITBASE16_8_U11_S
:
4166 fields
->f_bitbase16_u11_S
= value
;
4168 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4169 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4171 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4172 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4174 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4175 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4177 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4178 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4180 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4181 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4183 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4184 fields
->f_bitbase32_24_s11_prefixed
= value
;
4186 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4187 fields
->f_bitbase32_24_s19_prefixed
= value
;
4189 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4190 fields
->f_bitbase32_24_u11_prefixed
= value
;
4192 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4193 fields
->f_bitbase32_24_u19_prefixed
= value
;
4195 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4196 fields
->f_bitbase32_24_u27_prefixed
= value
;
4198 case M32C_OPERAND_BITNO16R
:
4199 fields
->f_dsp_16_u8
= value
;
4201 case M32C_OPERAND_BITNO32PREFIXED
:
4202 fields
->f_bitno32_prefixed
= value
;
4204 case M32C_OPERAND_BITNO32UNPREFIXED
:
4205 fields
->f_bitno32_unprefixed
= value
;
4207 case M32C_OPERAND_DSP_10_U6
:
4208 fields
->f_dsp_10_u6
= value
;
4210 case M32C_OPERAND_DSP_16_S16
:
4211 fields
->f_dsp_16_s16
= value
;
4213 case M32C_OPERAND_DSP_16_S8
:
4214 fields
->f_dsp_16_s8
= value
;
4216 case M32C_OPERAND_DSP_16_U16
:
4217 fields
->f_dsp_16_u16
= value
;
4219 case M32C_OPERAND_DSP_16_U20
:
4220 fields
->f_dsp_16_u24
= value
;
4222 case M32C_OPERAND_DSP_16_U24
:
4223 fields
->f_dsp_16_u24
= value
;
4225 case M32C_OPERAND_DSP_16_U8
:
4226 fields
->f_dsp_16_u8
= value
;
4228 case M32C_OPERAND_DSP_24_S16
:
4229 fields
->f_dsp_24_s16
= value
;
4231 case M32C_OPERAND_DSP_24_S8
:
4232 fields
->f_dsp_24_s8
= value
;
4234 case M32C_OPERAND_DSP_24_U16
:
4235 fields
->f_dsp_24_u16
= value
;
4237 case M32C_OPERAND_DSP_24_U20
:
4238 fields
->f_dsp_24_u24
= value
;
4240 case M32C_OPERAND_DSP_24_U24
:
4241 fields
->f_dsp_24_u24
= value
;
4243 case M32C_OPERAND_DSP_24_U8
:
4244 fields
->f_dsp_24_u8
= value
;
4246 case M32C_OPERAND_DSP_32_S16
:
4247 fields
->f_dsp_32_s16
= value
;
4249 case M32C_OPERAND_DSP_32_S8
:
4250 fields
->f_dsp_32_s8
= value
;
4252 case M32C_OPERAND_DSP_32_U16
:
4253 fields
->f_dsp_32_u16
= value
;
4255 case M32C_OPERAND_DSP_32_U20
:
4256 fields
->f_dsp_32_u24
= value
;
4258 case M32C_OPERAND_DSP_32_U24
:
4259 fields
->f_dsp_32_u24
= value
;
4261 case M32C_OPERAND_DSP_32_U8
:
4262 fields
->f_dsp_32_u8
= value
;
4264 case M32C_OPERAND_DSP_40_S16
:
4265 fields
->f_dsp_40_s16
= value
;
4267 case M32C_OPERAND_DSP_40_S8
:
4268 fields
->f_dsp_40_s8
= value
;
4270 case M32C_OPERAND_DSP_40_U16
:
4271 fields
->f_dsp_40_u16
= value
;
4273 case M32C_OPERAND_DSP_40_U20
:
4274 fields
->f_dsp_40_u20
= value
;
4276 case M32C_OPERAND_DSP_40_U24
:
4277 fields
->f_dsp_40_u24
= value
;
4279 case M32C_OPERAND_DSP_40_U8
:
4280 fields
->f_dsp_40_u8
= value
;
4282 case M32C_OPERAND_DSP_48_S16
:
4283 fields
->f_dsp_48_s16
= value
;
4285 case M32C_OPERAND_DSP_48_S8
:
4286 fields
->f_dsp_48_s8
= value
;
4288 case M32C_OPERAND_DSP_48_U16
:
4289 fields
->f_dsp_48_u16
= value
;
4291 case M32C_OPERAND_DSP_48_U20
:
4292 fields
->f_dsp_48_u20
= value
;
4294 case M32C_OPERAND_DSP_48_U24
:
4295 fields
->f_dsp_48_u24
= value
;
4297 case M32C_OPERAND_DSP_48_U8
:
4298 fields
->f_dsp_48_u8
= value
;
4300 case M32C_OPERAND_DSP_8_S24
:
4301 fields
->f_dsp_8_s24
= value
;
4303 case M32C_OPERAND_DSP_8_S8
:
4304 fields
->f_dsp_8_s8
= value
;
4306 case M32C_OPERAND_DSP_8_U16
:
4307 fields
->f_dsp_8_u16
= value
;
4309 case M32C_OPERAND_DSP_8_U24
:
4310 fields
->f_dsp_8_u24
= value
;
4312 case M32C_OPERAND_DSP_8_U6
:
4313 fields
->f_dsp_8_u6
= value
;
4315 case M32C_OPERAND_DSP_8_U8
:
4316 fields
->f_dsp_8_u8
= value
;
4318 case M32C_OPERAND_DST16AN
:
4319 fields
->f_dst16_an
= value
;
4321 case M32C_OPERAND_DST16AN_S
:
4322 fields
->f_dst16_an_s
= value
;
4324 case M32C_OPERAND_DST16ANHI
:
4325 fields
->f_dst16_an
= value
;
4327 case M32C_OPERAND_DST16ANQI
:
4328 fields
->f_dst16_an
= value
;
4330 case M32C_OPERAND_DST16ANQI_S
:
4331 fields
->f_dst16_rn_QI_s
= value
;
4333 case M32C_OPERAND_DST16ANSI
:
4334 fields
->f_dst16_an
= value
;
4336 case M32C_OPERAND_DST16RNEXTQI
:
4337 fields
->f_dst16_rn_ext
= value
;
4339 case M32C_OPERAND_DST16RNHI
:
4340 fields
->f_dst16_rn
= value
;
4342 case M32C_OPERAND_DST16RNQI
:
4343 fields
->f_dst16_rn
= value
;
4345 case M32C_OPERAND_DST16RNQI_S
:
4346 fields
->f_dst16_rn_QI_s
= value
;
4348 case M32C_OPERAND_DST16RNSI
:
4349 fields
->f_dst16_rn
= value
;
4351 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4352 fields
->f_dst32_an_unprefixed
= value
;
4354 case M32C_OPERAND_DST32ANPREFIXED
:
4355 fields
->f_dst32_an_prefixed
= value
;
4357 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4358 fields
->f_dst32_an_prefixed
= value
;
4360 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4361 fields
->f_dst32_an_prefixed
= value
;
4363 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4364 fields
->f_dst32_an_prefixed
= value
;
4366 case M32C_OPERAND_DST32ANUNPREFIXED
:
4367 fields
->f_dst32_an_unprefixed
= value
;
4369 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4370 fields
->f_dst32_an_unprefixed
= value
;
4372 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4373 fields
->f_dst32_an_unprefixed
= value
;
4375 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4376 fields
->f_dst32_an_unprefixed
= value
;
4378 case M32C_OPERAND_DST32R0HI_S
:
4380 case M32C_OPERAND_DST32R0QI_S
:
4382 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4383 fields
->f_dst32_rn_ext_unprefixed
= value
;
4385 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4386 fields
->f_dst32_rn_ext_unprefixed
= value
;
4388 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4389 fields
->f_dst32_rn_prefixed_HI
= value
;
4391 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4392 fields
->f_dst32_rn_prefixed_QI
= value
;
4394 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4395 fields
->f_dst32_rn_prefixed_SI
= value
;
4397 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4398 fields
->f_dst32_rn_unprefixed_HI
= value
;
4400 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4401 fields
->f_dst32_rn_unprefixed_QI
= value
;
4403 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4404 fields
->f_dst32_rn_unprefixed_SI
= value
;
4406 case M32C_OPERAND_G
:
4408 case M32C_OPERAND_IMM_12_S4
:
4409 fields
->f_imm_12_s4
= value
;
4411 case M32C_OPERAND_IMM_12_S4N
:
4412 fields
->f_imm_12_s4
= value
;
4414 case M32C_OPERAND_IMM_13_U3
:
4415 fields
->f_imm_13_u3
= value
;
4417 case M32C_OPERAND_IMM_16_HI
:
4418 fields
->f_dsp_16_s16
= value
;
4420 case M32C_OPERAND_IMM_16_QI
:
4421 fields
->f_dsp_16_s8
= value
;
4423 case M32C_OPERAND_IMM_16_SI
:
4424 fields
->f_dsp_16_s32
= value
;
4426 case M32C_OPERAND_IMM_20_S4
:
4427 fields
->f_imm_20_s4
= value
;
4429 case M32C_OPERAND_IMM_24_HI
:
4430 fields
->f_dsp_24_s16
= value
;
4432 case M32C_OPERAND_IMM_24_QI
:
4433 fields
->f_dsp_24_s8
= value
;
4435 case M32C_OPERAND_IMM_24_SI
:
4436 fields
->f_dsp_24_s32
= value
;
4438 case M32C_OPERAND_IMM_32_HI
:
4439 fields
->f_dsp_32_s16
= value
;
4441 case M32C_OPERAND_IMM_32_QI
:
4442 fields
->f_dsp_32_s8
= value
;
4444 case M32C_OPERAND_IMM_32_SI
:
4445 fields
->f_dsp_32_s32
= value
;
4447 case M32C_OPERAND_IMM_40_HI
:
4448 fields
->f_dsp_40_s16
= value
;
4450 case M32C_OPERAND_IMM_40_QI
:
4451 fields
->f_dsp_40_s8
= value
;
4453 case M32C_OPERAND_IMM_40_SI
:
4454 fields
->f_dsp_40_s32
= value
;
4456 case M32C_OPERAND_IMM_48_HI
:
4457 fields
->f_dsp_48_s16
= value
;
4459 case M32C_OPERAND_IMM_48_QI
:
4460 fields
->f_dsp_48_s8
= value
;
4462 case M32C_OPERAND_IMM_48_SI
:
4463 fields
->f_dsp_48_s32
= value
;
4465 case M32C_OPERAND_IMM_56_HI
:
4466 fields
->f_dsp_56_s16
= value
;
4468 case M32C_OPERAND_IMM_56_QI
:
4469 fields
->f_dsp_56_s8
= value
;
4471 case M32C_OPERAND_IMM_64_HI
:
4472 fields
->f_dsp_64_s16
= value
;
4474 case M32C_OPERAND_IMM_8_HI
:
4475 fields
->f_dsp_8_s16
= value
;
4477 case M32C_OPERAND_IMM_8_QI
:
4478 fields
->f_dsp_8_s8
= value
;
4480 case M32C_OPERAND_IMM_8_S4
:
4481 fields
->f_imm_8_s4
= value
;
4483 case M32C_OPERAND_IMM_8_S4N
:
4484 fields
->f_imm_8_s4
= value
;
4486 case M32C_OPERAND_IMM_SH_12_S4
:
4487 fields
->f_imm_12_s4
= value
;
4489 case M32C_OPERAND_IMM_SH_20_S4
:
4490 fields
->f_imm_20_s4
= value
;
4492 case M32C_OPERAND_IMM_SH_8_S4
:
4493 fields
->f_imm_8_s4
= value
;
4495 case M32C_OPERAND_IMM1_S
:
4496 fields
->f_imm1_S
= value
;
4498 case M32C_OPERAND_IMM3_S
:
4499 fields
->f_imm3_S
= value
;
4501 case M32C_OPERAND_LAB_16_8
:
4502 fields
->f_lab_16_8
= value
;
4504 case M32C_OPERAND_LAB_24_8
:
4505 fields
->f_lab_24_8
= value
;
4507 case M32C_OPERAND_LAB_32_8
:
4508 fields
->f_lab_32_8
= value
;
4510 case M32C_OPERAND_LAB_40_8
:
4511 fields
->f_lab_40_8
= value
;
4513 case M32C_OPERAND_LAB_5_3
:
4514 fields
->f_lab_5_3
= value
;
4516 case M32C_OPERAND_LAB_8_16
:
4517 fields
->f_lab_8_16
= value
;
4519 case M32C_OPERAND_LAB_8_24
:
4520 fields
->f_lab_8_24
= value
;
4522 case M32C_OPERAND_LAB_8_8
:
4523 fields
->f_lab_8_8
= value
;
4525 case M32C_OPERAND_LAB32_JMP_S
:
4526 fields
->f_lab32_jmp_s
= value
;
4528 case M32C_OPERAND_Q
:
4530 case M32C_OPERAND_R0
:
4532 case M32C_OPERAND_R0H
:
4534 case M32C_OPERAND_R0L
:
4536 case M32C_OPERAND_R1
:
4538 case M32C_OPERAND_R1R2R0
:
4540 case M32C_OPERAND_R2
:
4542 case M32C_OPERAND_R2R0
:
4544 case M32C_OPERAND_R3
:
4546 case M32C_OPERAND_R3R1
:
4548 case M32C_OPERAND_REGSETPOP
:
4549 fields
->f_8_8
= value
;
4551 case M32C_OPERAND_REGSETPUSH
:
4552 fields
->f_8_8
= value
;
4554 case M32C_OPERAND_RN16_PUSH_S
:
4555 fields
->f_4_1
= value
;
4557 case M32C_OPERAND_S
:
4559 case M32C_OPERAND_SRC16AN
:
4560 fields
->f_src16_an
= value
;
4562 case M32C_OPERAND_SRC16ANHI
:
4563 fields
->f_src16_an
= value
;
4565 case M32C_OPERAND_SRC16ANQI
:
4566 fields
->f_src16_an
= value
;
4568 case M32C_OPERAND_SRC16RNHI
:
4569 fields
->f_src16_rn
= value
;
4571 case M32C_OPERAND_SRC16RNQI
:
4572 fields
->f_src16_rn
= value
;
4574 case M32C_OPERAND_SRC32ANPREFIXED
:
4575 fields
->f_src32_an_prefixed
= value
;
4577 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4578 fields
->f_src32_an_prefixed
= value
;
4580 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4581 fields
->f_src32_an_prefixed
= value
;
4583 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4584 fields
->f_src32_an_prefixed
= value
;
4586 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4587 fields
->f_src32_an_unprefixed
= value
;
4589 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4590 fields
->f_src32_an_unprefixed
= value
;
4592 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4593 fields
->f_src32_an_unprefixed
= value
;
4595 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4596 fields
->f_src32_an_unprefixed
= value
;
4598 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4599 fields
->f_src32_rn_prefixed_HI
= value
;
4601 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4602 fields
->f_src32_rn_prefixed_QI
= value
;
4604 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4605 fields
->f_src32_rn_prefixed_SI
= value
;
4607 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4608 fields
->f_src32_rn_unprefixed_HI
= value
;
4610 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4611 fields
->f_src32_rn_unprefixed_QI
= value
;
4613 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4614 fields
->f_src32_rn_unprefixed_SI
= value
;
4616 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4617 fields
->f_5_1
= value
;
4619 case M32C_OPERAND_X
:
4621 case M32C_OPERAND_Z
:
4623 case M32C_OPERAND_COND16_16
:
4624 fields
->f_dsp_16_u8
= value
;
4626 case M32C_OPERAND_COND16_24
:
4627 fields
->f_dsp_24_u8
= value
;
4629 case M32C_OPERAND_COND16_32
:
4630 fields
->f_dsp_32_u8
= value
;
4632 case M32C_OPERAND_COND16C
:
4633 fields
->f_cond16
= value
;
4635 case M32C_OPERAND_COND16J
:
4636 fields
->f_cond16
= value
;
4638 case M32C_OPERAND_COND16J5
:
4639 fields
->f_cond16j_5
= value
;
4641 case M32C_OPERAND_COND32
:
4642 fields
->f_cond32
= value
;
4644 case M32C_OPERAND_COND32_16
:
4645 fields
->f_dsp_16_u8
= value
;
4647 case M32C_OPERAND_COND32_24
:
4648 fields
->f_dsp_24_u8
= value
;
4650 case M32C_OPERAND_COND32_32
:
4651 fields
->f_dsp_32_u8
= value
;
4653 case M32C_OPERAND_COND32_40
:
4654 fields
->f_dsp_40_u8
= value
;
4656 case M32C_OPERAND_COND32J
:
4657 fields
->f_cond32j
= value
;
4659 case M32C_OPERAND_CR1_PREFIXED_32
:
4660 fields
->f_21_3
= value
;
4662 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4663 fields
->f_13_3
= value
;
4665 case M32C_OPERAND_CR16
:
4666 fields
->f_9_3
= value
;
4668 case M32C_OPERAND_CR2_32
:
4669 fields
->f_13_3
= value
;
4671 case M32C_OPERAND_CR3_PREFIXED_32
:
4672 fields
->f_21_3
= value
;
4674 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4675 fields
->f_13_3
= value
;
4677 case M32C_OPERAND_FLAGS16
:
4678 fields
->f_9_3
= value
;
4680 case M32C_OPERAND_FLAGS32
:
4681 fields
->f_13_3
= value
;
4683 case M32C_OPERAND_SCCOND32
:
4684 fields
->f_cond16
= value
;
4686 case M32C_OPERAND_SIZE
:
4690 /* xgettext:c-format */
4691 fprintf (stderr
, _("Unrecognized field %d while setting int operand.\n"),
4698 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4700 CGEN_FIELDS
* fields
,
4705 case M32C_OPERAND_A0
:
4707 case M32C_OPERAND_A1
:
4709 case M32C_OPERAND_AN16_PUSH_S
:
4710 fields
->f_4_1
= value
;
4712 case M32C_OPERAND_BIT16AN
:
4713 fields
->f_dst16_an
= value
;
4715 case M32C_OPERAND_BIT16RN
:
4716 fields
->f_dst16_rn
= value
;
4718 case M32C_OPERAND_BIT3_S
:
4719 fields
->f_imm3_S
= value
;
4721 case M32C_OPERAND_BIT32ANPREFIXED
:
4722 fields
->f_dst32_an_prefixed
= value
;
4724 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4725 fields
->f_dst32_an_unprefixed
= value
;
4727 case M32C_OPERAND_BIT32RNPREFIXED
:
4728 fields
->f_dst32_rn_prefixed_QI
= value
;
4730 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4731 fields
->f_dst32_rn_unprefixed_QI
= value
;
4733 case M32C_OPERAND_BITBASE16_16_S8
:
4734 fields
->f_dsp_16_s8
= value
;
4736 case M32C_OPERAND_BITBASE16_16_U16
:
4737 fields
->f_dsp_16_u16
= value
;
4739 case M32C_OPERAND_BITBASE16_16_U8
:
4740 fields
->f_dsp_16_u8
= value
;
4742 case M32C_OPERAND_BITBASE16_8_U11_S
:
4743 fields
->f_bitbase16_u11_S
= value
;
4745 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4746 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4748 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4749 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4751 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4752 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4754 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4755 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4757 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4758 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4760 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4761 fields
->f_bitbase32_24_s11_prefixed
= value
;
4763 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4764 fields
->f_bitbase32_24_s19_prefixed
= value
;
4766 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4767 fields
->f_bitbase32_24_u11_prefixed
= value
;
4769 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4770 fields
->f_bitbase32_24_u19_prefixed
= value
;
4772 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4773 fields
->f_bitbase32_24_u27_prefixed
= value
;
4775 case M32C_OPERAND_BITNO16R
:
4776 fields
->f_dsp_16_u8
= value
;
4778 case M32C_OPERAND_BITNO32PREFIXED
:
4779 fields
->f_bitno32_prefixed
= value
;
4781 case M32C_OPERAND_BITNO32UNPREFIXED
:
4782 fields
->f_bitno32_unprefixed
= value
;
4784 case M32C_OPERAND_DSP_10_U6
:
4785 fields
->f_dsp_10_u6
= value
;
4787 case M32C_OPERAND_DSP_16_S16
:
4788 fields
->f_dsp_16_s16
= value
;
4790 case M32C_OPERAND_DSP_16_S8
:
4791 fields
->f_dsp_16_s8
= value
;
4793 case M32C_OPERAND_DSP_16_U16
:
4794 fields
->f_dsp_16_u16
= value
;
4796 case M32C_OPERAND_DSP_16_U20
:
4797 fields
->f_dsp_16_u24
= value
;
4799 case M32C_OPERAND_DSP_16_U24
:
4800 fields
->f_dsp_16_u24
= value
;
4802 case M32C_OPERAND_DSP_16_U8
:
4803 fields
->f_dsp_16_u8
= value
;
4805 case M32C_OPERAND_DSP_24_S16
:
4806 fields
->f_dsp_24_s16
= value
;
4808 case M32C_OPERAND_DSP_24_S8
:
4809 fields
->f_dsp_24_s8
= value
;
4811 case M32C_OPERAND_DSP_24_U16
:
4812 fields
->f_dsp_24_u16
= value
;
4814 case M32C_OPERAND_DSP_24_U20
:
4815 fields
->f_dsp_24_u24
= value
;
4817 case M32C_OPERAND_DSP_24_U24
:
4818 fields
->f_dsp_24_u24
= value
;
4820 case M32C_OPERAND_DSP_24_U8
:
4821 fields
->f_dsp_24_u8
= value
;
4823 case M32C_OPERAND_DSP_32_S16
:
4824 fields
->f_dsp_32_s16
= value
;
4826 case M32C_OPERAND_DSP_32_S8
:
4827 fields
->f_dsp_32_s8
= value
;
4829 case M32C_OPERAND_DSP_32_U16
:
4830 fields
->f_dsp_32_u16
= value
;
4832 case M32C_OPERAND_DSP_32_U20
:
4833 fields
->f_dsp_32_u24
= value
;
4835 case M32C_OPERAND_DSP_32_U24
:
4836 fields
->f_dsp_32_u24
= value
;
4838 case M32C_OPERAND_DSP_32_U8
:
4839 fields
->f_dsp_32_u8
= value
;
4841 case M32C_OPERAND_DSP_40_S16
:
4842 fields
->f_dsp_40_s16
= value
;
4844 case M32C_OPERAND_DSP_40_S8
:
4845 fields
->f_dsp_40_s8
= value
;
4847 case M32C_OPERAND_DSP_40_U16
:
4848 fields
->f_dsp_40_u16
= value
;
4850 case M32C_OPERAND_DSP_40_U20
:
4851 fields
->f_dsp_40_u20
= value
;
4853 case M32C_OPERAND_DSP_40_U24
:
4854 fields
->f_dsp_40_u24
= value
;
4856 case M32C_OPERAND_DSP_40_U8
:
4857 fields
->f_dsp_40_u8
= value
;
4859 case M32C_OPERAND_DSP_48_S16
:
4860 fields
->f_dsp_48_s16
= value
;
4862 case M32C_OPERAND_DSP_48_S8
:
4863 fields
->f_dsp_48_s8
= value
;
4865 case M32C_OPERAND_DSP_48_U16
:
4866 fields
->f_dsp_48_u16
= value
;
4868 case M32C_OPERAND_DSP_48_U20
:
4869 fields
->f_dsp_48_u20
= value
;
4871 case M32C_OPERAND_DSP_48_U24
:
4872 fields
->f_dsp_48_u24
= value
;
4874 case M32C_OPERAND_DSP_48_U8
:
4875 fields
->f_dsp_48_u8
= value
;
4877 case M32C_OPERAND_DSP_8_S24
:
4878 fields
->f_dsp_8_s24
= value
;
4880 case M32C_OPERAND_DSP_8_S8
:
4881 fields
->f_dsp_8_s8
= value
;
4883 case M32C_OPERAND_DSP_8_U16
:
4884 fields
->f_dsp_8_u16
= value
;
4886 case M32C_OPERAND_DSP_8_U24
:
4887 fields
->f_dsp_8_u24
= value
;
4889 case M32C_OPERAND_DSP_8_U6
:
4890 fields
->f_dsp_8_u6
= value
;
4892 case M32C_OPERAND_DSP_8_U8
:
4893 fields
->f_dsp_8_u8
= value
;
4895 case M32C_OPERAND_DST16AN
:
4896 fields
->f_dst16_an
= value
;
4898 case M32C_OPERAND_DST16AN_S
:
4899 fields
->f_dst16_an_s
= value
;
4901 case M32C_OPERAND_DST16ANHI
:
4902 fields
->f_dst16_an
= value
;
4904 case M32C_OPERAND_DST16ANQI
:
4905 fields
->f_dst16_an
= value
;
4907 case M32C_OPERAND_DST16ANQI_S
:
4908 fields
->f_dst16_rn_QI_s
= value
;
4910 case M32C_OPERAND_DST16ANSI
:
4911 fields
->f_dst16_an
= value
;
4913 case M32C_OPERAND_DST16RNEXTQI
:
4914 fields
->f_dst16_rn_ext
= value
;
4916 case M32C_OPERAND_DST16RNHI
:
4917 fields
->f_dst16_rn
= value
;
4919 case M32C_OPERAND_DST16RNQI
:
4920 fields
->f_dst16_rn
= value
;
4922 case M32C_OPERAND_DST16RNQI_S
:
4923 fields
->f_dst16_rn_QI_s
= value
;
4925 case M32C_OPERAND_DST16RNSI
:
4926 fields
->f_dst16_rn
= value
;
4928 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4929 fields
->f_dst32_an_unprefixed
= value
;
4931 case M32C_OPERAND_DST32ANPREFIXED
:
4932 fields
->f_dst32_an_prefixed
= value
;
4934 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4935 fields
->f_dst32_an_prefixed
= value
;
4937 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4938 fields
->f_dst32_an_prefixed
= value
;
4940 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4941 fields
->f_dst32_an_prefixed
= value
;
4943 case M32C_OPERAND_DST32ANUNPREFIXED
:
4944 fields
->f_dst32_an_unprefixed
= value
;
4946 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4947 fields
->f_dst32_an_unprefixed
= value
;
4949 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4950 fields
->f_dst32_an_unprefixed
= value
;
4952 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4953 fields
->f_dst32_an_unprefixed
= value
;
4955 case M32C_OPERAND_DST32R0HI_S
:
4957 case M32C_OPERAND_DST32R0QI_S
:
4959 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4960 fields
->f_dst32_rn_ext_unprefixed
= value
;
4962 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4963 fields
->f_dst32_rn_ext_unprefixed
= value
;
4965 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4966 fields
->f_dst32_rn_prefixed_HI
= value
;
4968 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4969 fields
->f_dst32_rn_prefixed_QI
= value
;
4971 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4972 fields
->f_dst32_rn_prefixed_SI
= value
;
4974 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4975 fields
->f_dst32_rn_unprefixed_HI
= value
;
4977 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4978 fields
->f_dst32_rn_unprefixed_QI
= value
;
4980 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4981 fields
->f_dst32_rn_unprefixed_SI
= value
;
4983 case M32C_OPERAND_G
:
4985 case M32C_OPERAND_IMM_12_S4
:
4986 fields
->f_imm_12_s4
= value
;
4988 case M32C_OPERAND_IMM_12_S4N
:
4989 fields
->f_imm_12_s4
= value
;
4991 case M32C_OPERAND_IMM_13_U3
:
4992 fields
->f_imm_13_u3
= value
;
4994 case M32C_OPERAND_IMM_16_HI
:
4995 fields
->f_dsp_16_s16
= value
;
4997 case M32C_OPERAND_IMM_16_QI
:
4998 fields
->f_dsp_16_s8
= value
;
5000 case M32C_OPERAND_IMM_16_SI
:
5001 fields
->f_dsp_16_s32
= value
;
5003 case M32C_OPERAND_IMM_20_S4
:
5004 fields
->f_imm_20_s4
= value
;
5006 case M32C_OPERAND_IMM_24_HI
:
5007 fields
->f_dsp_24_s16
= value
;
5009 case M32C_OPERAND_IMM_24_QI
:
5010 fields
->f_dsp_24_s8
= value
;
5012 case M32C_OPERAND_IMM_24_SI
:
5013 fields
->f_dsp_24_s32
= value
;
5015 case M32C_OPERAND_IMM_32_HI
:
5016 fields
->f_dsp_32_s16
= value
;
5018 case M32C_OPERAND_IMM_32_QI
:
5019 fields
->f_dsp_32_s8
= value
;
5021 case M32C_OPERAND_IMM_32_SI
:
5022 fields
->f_dsp_32_s32
= value
;
5024 case M32C_OPERAND_IMM_40_HI
:
5025 fields
->f_dsp_40_s16
= value
;
5027 case M32C_OPERAND_IMM_40_QI
:
5028 fields
->f_dsp_40_s8
= value
;
5030 case M32C_OPERAND_IMM_40_SI
:
5031 fields
->f_dsp_40_s32
= value
;
5033 case M32C_OPERAND_IMM_48_HI
:
5034 fields
->f_dsp_48_s16
= value
;
5036 case M32C_OPERAND_IMM_48_QI
:
5037 fields
->f_dsp_48_s8
= value
;
5039 case M32C_OPERAND_IMM_48_SI
:
5040 fields
->f_dsp_48_s32
= value
;
5042 case M32C_OPERAND_IMM_56_HI
:
5043 fields
->f_dsp_56_s16
= value
;
5045 case M32C_OPERAND_IMM_56_QI
:
5046 fields
->f_dsp_56_s8
= value
;
5048 case M32C_OPERAND_IMM_64_HI
:
5049 fields
->f_dsp_64_s16
= value
;
5051 case M32C_OPERAND_IMM_8_HI
:
5052 fields
->f_dsp_8_s16
= value
;
5054 case M32C_OPERAND_IMM_8_QI
:
5055 fields
->f_dsp_8_s8
= value
;
5057 case M32C_OPERAND_IMM_8_S4
:
5058 fields
->f_imm_8_s4
= value
;
5060 case M32C_OPERAND_IMM_8_S4N
:
5061 fields
->f_imm_8_s4
= value
;
5063 case M32C_OPERAND_IMM_SH_12_S4
:
5064 fields
->f_imm_12_s4
= value
;
5066 case M32C_OPERAND_IMM_SH_20_S4
:
5067 fields
->f_imm_20_s4
= value
;
5069 case M32C_OPERAND_IMM_SH_8_S4
:
5070 fields
->f_imm_8_s4
= value
;
5072 case M32C_OPERAND_IMM1_S
:
5073 fields
->f_imm1_S
= value
;
5075 case M32C_OPERAND_IMM3_S
:
5076 fields
->f_imm3_S
= value
;
5078 case M32C_OPERAND_LAB_16_8
:
5079 fields
->f_lab_16_8
= value
;
5081 case M32C_OPERAND_LAB_24_8
:
5082 fields
->f_lab_24_8
= value
;
5084 case M32C_OPERAND_LAB_32_8
:
5085 fields
->f_lab_32_8
= value
;
5087 case M32C_OPERAND_LAB_40_8
:
5088 fields
->f_lab_40_8
= value
;
5090 case M32C_OPERAND_LAB_5_3
:
5091 fields
->f_lab_5_3
= value
;
5093 case M32C_OPERAND_LAB_8_16
:
5094 fields
->f_lab_8_16
= value
;
5096 case M32C_OPERAND_LAB_8_24
:
5097 fields
->f_lab_8_24
= value
;
5099 case M32C_OPERAND_LAB_8_8
:
5100 fields
->f_lab_8_8
= value
;
5102 case M32C_OPERAND_LAB32_JMP_S
:
5103 fields
->f_lab32_jmp_s
= value
;
5105 case M32C_OPERAND_Q
:
5107 case M32C_OPERAND_R0
:
5109 case M32C_OPERAND_R0H
:
5111 case M32C_OPERAND_R0L
:
5113 case M32C_OPERAND_R1
:
5115 case M32C_OPERAND_R1R2R0
:
5117 case M32C_OPERAND_R2
:
5119 case M32C_OPERAND_R2R0
:
5121 case M32C_OPERAND_R3
:
5123 case M32C_OPERAND_R3R1
:
5125 case M32C_OPERAND_REGSETPOP
:
5126 fields
->f_8_8
= value
;
5128 case M32C_OPERAND_REGSETPUSH
:
5129 fields
->f_8_8
= value
;
5131 case M32C_OPERAND_RN16_PUSH_S
:
5132 fields
->f_4_1
= value
;
5134 case M32C_OPERAND_S
:
5136 case M32C_OPERAND_SRC16AN
:
5137 fields
->f_src16_an
= value
;
5139 case M32C_OPERAND_SRC16ANHI
:
5140 fields
->f_src16_an
= value
;
5142 case M32C_OPERAND_SRC16ANQI
:
5143 fields
->f_src16_an
= value
;
5145 case M32C_OPERAND_SRC16RNHI
:
5146 fields
->f_src16_rn
= value
;
5148 case M32C_OPERAND_SRC16RNQI
:
5149 fields
->f_src16_rn
= value
;
5151 case M32C_OPERAND_SRC32ANPREFIXED
:
5152 fields
->f_src32_an_prefixed
= value
;
5154 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
5155 fields
->f_src32_an_prefixed
= value
;
5157 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
5158 fields
->f_src32_an_prefixed
= value
;
5160 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
5161 fields
->f_src32_an_prefixed
= value
;
5163 case M32C_OPERAND_SRC32ANUNPREFIXED
:
5164 fields
->f_src32_an_unprefixed
= value
;
5166 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
5167 fields
->f_src32_an_unprefixed
= value
;
5169 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
5170 fields
->f_src32_an_unprefixed
= value
;
5172 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
5173 fields
->f_src32_an_unprefixed
= value
;
5175 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
5176 fields
->f_src32_rn_prefixed_HI
= value
;
5178 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
5179 fields
->f_src32_rn_prefixed_QI
= value
;
5181 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
5182 fields
->f_src32_rn_prefixed_SI
= value
;
5184 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
5185 fields
->f_src32_rn_unprefixed_HI
= value
;
5187 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
5188 fields
->f_src32_rn_unprefixed_QI
= value
;
5190 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
5191 fields
->f_src32_rn_unprefixed_SI
= value
;
5193 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
5194 fields
->f_5_1
= value
;
5196 case M32C_OPERAND_X
:
5198 case M32C_OPERAND_Z
:
5200 case M32C_OPERAND_COND16_16
:
5201 fields
->f_dsp_16_u8
= value
;
5203 case M32C_OPERAND_COND16_24
:
5204 fields
->f_dsp_24_u8
= value
;
5206 case M32C_OPERAND_COND16_32
:
5207 fields
->f_dsp_32_u8
= value
;
5209 case M32C_OPERAND_COND16C
:
5210 fields
->f_cond16
= value
;
5212 case M32C_OPERAND_COND16J
:
5213 fields
->f_cond16
= value
;
5215 case M32C_OPERAND_COND16J5
:
5216 fields
->f_cond16j_5
= value
;
5218 case M32C_OPERAND_COND32
:
5219 fields
->f_cond32
= value
;
5221 case M32C_OPERAND_COND32_16
:
5222 fields
->f_dsp_16_u8
= value
;
5224 case M32C_OPERAND_COND32_24
:
5225 fields
->f_dsp_24_u8
= value
;
5227 case M32C_OPERAND_COND32_32
:
5228 fields
->f_dsp_32_u8
= value
;
5230 case M32C_OPERAND_COND32_40
:
5231 fields
->f_dsp_40_u8
= value
;
5233 case M32C_OPERAND_COND32J
:
5234 fields
->f_cond32j
= value
;
5236 case M32C_OPERAND_CR1_PREFIXED_32
:
5237 fields
->f_21_3
= value
;
5239 case M32C_OPERAND_CR1_UNPREFIXED_32
:
5240 fields
->f_13_3
= value
;
5242 case M32C_OPERAND_CR16
:
5243 fields
->f_9_3
= value
;
5245 case M32C_OPERAND_CR2_32
:
5246 fields
->f_13_3
= value
;
5248 case M32C_OPERAND_CR3_PREFIXED_32
:
5249 fields
->f_21_3
= value
;
5251 case M32C_OPERAND_CR3_UNPREFIXED_32
:
5252 fields
->f_13_3
= value
;
5254 case M32C_OPERAND_FLAGS16
:
5255 fields
->f_9_3
= value
;
5257 case M32C_OPERAND_FLAGS32
:
5258 fields
->f_13_3
= value
;
5260 case M32C_OPERAND_SCCOND32
:
5261 fields
->f_cond16
= value
;
5263 case M32C_OPERAND_SIZE
:
5267 /* xgettext:c-format */
5268 fprintf (stderr
, _("Unrecognized field %d while setting vma operand.\n"),
5274 /* Function to call before using the instruction builder tables. */
5277 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd
)
5279 cd
->insert_handlers
= & m32c_cgen_insert_handlers
[0];
5280 cd
->extract_handlers
= & m32c_cgen_extract_handlers
[0];
5282 cd
->insert_operand
= m32c_cgen_insert_operand
;
5283 cd
->extract_operand
= m32c_cgen_extract_operand
;
5285 cd
->get_int_operand
= m32c_cgen_get_int_operand
;
5286 cd
->set_int_operand
= m32c_cgen_set_int_operand
;
5287 cd
->get_vma_operand
= m32c_cgen_get_vma_operand
;
5288 cd
->set_vma_operand
= m32c_cgen_set_vma_operand
;