1 /* Instruction building/extraction support for m32c. -*- C -*-
3 THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
4 - the resultant file is machine generated, cgen-ibld.in isn't
6 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006
7 Free Software Foundation, Inc.
9 This file is part of the GNU Binutils and GDB, the GNU debugger.
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
25 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
34 #include "m32c-desc.h"
37 #include "safe-ctype.h"
40 #define min(a,b) ((a) < (b) ? (a) : (b))
42 #define max(a,b) ((a) > (b) ? (a) : (b))
44 /* Used by the ifield rtx function. */
45 #define FLD(f) (fields->f)
47 static const char * insert_normal
48 (CGEN_CPU_DESC
, long, unsigned int, unsigned int, unsigned int,
49 unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR
);
50 static const char * insert_insn_normal
51 (CGEN_CPU_DESC
, const CGEN_INSN
*,
52 CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
53 static int extract_normal
54 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
,
55 unsigned int, unsigned int, unsigned int, unsigned int,
56 unsigned int, unsigned int, bfd_vma
, long *);
57 static int extract_insn_normal
58 (CGEN_CPU_DESC
, const CGEN_INSN
*, CGEN_EXTRACT_INFO
*,
59 CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
61 static void put_insn_int_value
62 (CGEN_CPU_DESC
, CGEN_INSN_BYTES_PTR
, int, int, CGEN_INSN_INT
);
65 static CGEN_INLINE
void insert_1
66 (CGEN_CPU_DESC
, unsigned long, int, int, int, unsigned char *);
67 static CGEN_INLINE
int fill_cache
68 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, int, int, bfd_vma
);
69 static CGEN_INLINE
long extract_1
70 (CGEN_CPU_DESC
, CGEN_EXTRACT_INFO
*, int, int, int, unsigned char *, bfd_vma
);
73 /* Operand insertion. */
77 /* Subroutine of insert_normal. */
79 static CGEN_INLINE
void
80 insert_1 (CGEN_CPU_DESC cd
,
90 x
= cgen_get_insn_value (cd
, bufp
, word_length
);
92 /* Written this way to avoid undefined behaviour. */
93 mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
95 shift
= (start
+ 1) - length
;
97 shift
= (word_length
- (start
+ length
));
98 x
= (x
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
100 cgen_put_insn_value (cd
, bufp
, word_length
, (bfd_vma
) x
);
103 #endif /* ! CGEN_INT_INSN_P */
105 /* Default insertion routine.
107 ATTRS is a mask of the boolean attributes.
108 WORD_OFFSET is the offset in bits from the start of the insn of the value.
109 WORD_LENGTH is the length of the word in bits in which the value resides.
110 START is the starting bit number in the word, architecture origin.
111 LENGTH is the length of VALUE in bits.
112 TOTAL_LENGTH is the total length of the insn in bits.
114 The result is an error message or NULL if success. */
116 /* ??? This duplicates functionality with bfd's howto table and
117 bfd_install_relocation. */
118 /* ??? This doesn't handle bfd_vma's. Create another function when
122 insert_normal (CGEN_CPU_DESC cd
,
125 unsigned int word_offset
,
128 unsigned int word_length
,
129 unsigned int total_length
,
130 CGEN_INSN_BYTES_PTR buffer
)
132 static char errbuf
[100];
133 /* Written this way to avoid undefined behaviour. */
134 unsigned long mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
136 /* If LENGTH is zero, this operand doesn't contribute to the value. */
140 if (word_length
> 32)
143 /* For architectures with insns smaller than the base-insn-bitsize,
144 word_length may be too big. */
145 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
148 && word_length
> total_length
)
149 word_length
= total_length
;
152 /* Ensure VALUE will fit. */
153 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGN_OPT
))
155 long minval
= - (1L << (length
- 1));
156 unsigned long maxval
= mask
;
158 if ((value
> 0 && (unsigned long) value
> maxval
)
161 /* xgettext:c-format */
163 _("operand out of range (%ld not between %ld and %lu)"),
164 value
, minval
, maxval
);
168 else if (! CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
))
170 unsigned long maxval
= mask
;
172 if ((unsigned long) value
> maxval
)
174 /* xgettext:c-format */
176 _("operand out of range (%lu not between 0 and %lu)"),
183 if (! cgen_signed_overflow_ok_p (cd
))
185 long minval
= - (1L << (length
- 1));
186 long maxval
= (1L << (length
- 1)) - 1;
188 if (value
< minval
|| value
> maxval
)
191 /* xgettext:c-format */
192 (errbuf
, _("operand out of range (%ld not between %ld and %ld)"),
193 value
, minval
, maxval
);
204 if (CGEN_INSN_LSB0_P
)
205 shift
= (word_offset
+ start
+ 1) - length
;
207 shift
= total_length
- (word_offset
+ start
+ length
);
208 *buffer
= (*buffer
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
211 #else /* ! CGEN_INT_INSN_P */
214 unsigned char *bufp
= (unsigned char *) buffer
+ word_offset
/ 8;
216 insert_1 (cd
, value
, start
, length
, word_length
, bufp
);
219 #endif /* ! CGEN_INT_INSN_P */
224 /* Default insn builder (insert handler).
225 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
226 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
227 recorded in host byte order, otherwise BUFFER is an array of bytes
228 and the value is recorded in target byte order).
229 The result is an error message or NULL if success. */
232 insert_insn_normal (CGEN_CPU_DESC cd
,
233 const CGEN_INSN
* insn
,
234 CGEN_FIELDS
* fields
,
235 CGEN_INSN_BYTES_PTR buffer
,
238 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
240 const CGEN_SYNTAX_CHAR_TYPE
* syn
;
242 CGEN_INIT_INSERT (cd
);
243 value
= CGEN_INSN_BASE_VALUE (insn
);
245 /* If we're recording insns as numbers (rather than a string of bytes),
246 target byte order handling is deferred until later. */
250 put_insn_int_value (cd
, buffer
, cd
->base_insn_bitsize
,
251 CGEN_FIELDS_BITSIZE (fields
), value
);
255 cgen_put_insn_value (cd
, buffer
, min ((unsigned) cd
->base_insn_bitsize
,
256 (unsigned) CGEN_FIELDS_BITSIZE (fields
)),
259 #endif /* ! CGEN_INT_INSN_P */
261 /* ??? It would be better to scan the format's fields.
262 Still need to be able to insert a value based on the operand though;
263 e.g. storing a branch displacement that got resolved later.
264 Needs more thought first. */
266 for (syn
= CGEN_SYNTAX_STRING (syntax
); * syn
; ++ syn
)
270 if (CGEN_SYNTAX_CHAR_P (* syn
))
273 errmsg
= (* cd
->insert_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
283 /* Cover function to store an insn value into an integral insn. Must go here
284 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
287 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
288 CGEN_INSN_BYTES_PTR buf
,
293 /* For architectures with insns smaller than the base-insn-bitsize,
294 length may be too big. */
295 if (length
> insn_length
)
299 int shift
= insn_length
- length
;
300 /* Written this way to avoid undefined behaviour. */
301 CGEN_INSN_INT mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
303 *buf
= (*buf
& ~(mask
<< shift
)) | ((value
& mask
) << shift
);
308 /* Operand extraction. */
310 #if ! CGEN_INT_INSN_P
312 /* Subroutine of extract_normal.
313 Ensure sufficient bytes are cached in EX_INFO.
314 OFFSET is the offset in bytes from the start of the insn of the value.
315 BYTES is the length of the needed value.
316 Returns 1 for success, 0 for failure. */
318 static CGEN_INLINE
int
319 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
320 CGEN_EXTRACT_INFO
*ex_info
,
325 /* It's doubtful that the middle part has already been fetched so
326 we don't optimize that case. kiss. */
328 disassemble_info
*info
= (disassemble_info
*) ex_info
->dis_info
;
330 /* First do a quick check. */
331 mask
= (1 << bytes
) - 1;
332 if (((ex_info
->valid
>> offset
) & mask
) == mask
)
335 /* Search for the first byte we need to read. */
336 for (mask
= 1 << offset
; bytes
> 0; --bytes
, ++offset
, mask
<<= 1)
337 if (! (mask
& ex_info
->valid
))
345 status
= (*info
->read_memory_func
)
346 (pc
, ex_info
->insn_bytes
+ offset
, bytes
, info
);
350 (*info
->memory_error_func
) (status
, pc
, info
);
354 ex_info
->valid
|= ((1 << bytes
) - 1) << offset
;
360 /* Subroutine of extract_normal. */
362 static CGEN_INLINE
long
363 extract_1 (CGEN_CPU_DESC cd
,
364 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
369 bfd_vma pc ATTRIBUTE_UNUSED
)
374 x
= cgen_get_insn_value (cd
, bufp
, word_length
);
376 if (CGEN_INSN_LSB0_P
)
377 shift
= (start
+ 1) - length
;
379 shift
= (word_length
- (start
+ length
));
383 #endif /* ! CGEN_INT_INSN_P */
385 /* Default extraction routine.
387 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
388 or sometimes less for cases like the m32r where the base insn size is 32
389 but some insns are 16 bits.
390 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
391 but for generality we take a bitmask of all of them.
392 WORD_OFFSET is the offset in bits from the start of the insn of the value.
393 WORD_LENGTH is the length of the word in bits in which the value resides.
394 START is the starting bit number in the word, architecture origin.
395 LENGTH is the length of VALUE in bits.
396 TOTAL_LENGTH is the total length of the insn in bits.
398 Returns 1 for success, 0 for failure. */
400 /* ??? The return code isn't properly used. wip. */
402 /* ??? This doesn't handle bfd_vma's. Create another function when
406 extract_normal (CGEN_CPU_DESC cd
,
407 #if ! CGEN_INT_INSN_P
408 CGEN_EXTRACT_INFO
*ex_info
,
410 CGEN_EXTRACT_INFO
*ex_info ATTRIBUTE_UNUSED
,
412 CGEN_INSN_INT insn_value
,
414 unsigned int word_offset
,
417 unsigned int word_length
,
418 unsigned int total_length
,
419 #if ! CGEN_INT_INSN_P
422 bfd_vma pc ATTRIBUTE_UNUSED
,
428 /* If LENGTH is zero, this operand doesn't contribute to the value
429 so give it a standard value of zero. */
436 if (word_length
> 32)
439 /* For architectures with insns smaller than the insn-base-bitsize,
440 word_length may be too big. */
441 if (cd
->min_insn_bitsize
< cd
->base_insn_bitsize
)
443 if (word_offset
+ word_length
> total_length
)
444 word_length
= total_length
- word_offset
;
447 /* Does the value reside in INSN_VALUE, and at the right alignment? */
449 if (CGEN_INT_INSN_P
|| (word_offset
== 0 && word_length
== total_length
))
451 if (CGEN_INSN_LSB0_P
)
452 value
= insn_value
>> ((word_offset
+ start
+ 1) - length
);
454 value
= insn_value
>> (total_length
- ( word_offset
+ start
+ length
));
457 #if ! CGEN_INT_INSN_P
461 unsigned char *bufp
= ex_info
->insn_bytes
+ word_offset
/ 8;
463 if (word_length
> 32)
466 if (fill_cache (cd
, ex_info
, word_offset
/ 8, word_length
/ 8, pc
) == 0)
469 value
= extract_1 (cd
, ex_info
, start
, length
, word_length
, bufp
, pc
);
472 #endif /* ! CGEN_INT_INSN_P */
474 /* Written this way to avoid undefined behaviour. */
475 mask
= (((1L << (length
- 1)) - 1) << 1) | 1;
479 if (CGEN_BOOL_ATTR (attrs
, CGEN_IFLD_SIGNED
)
480 && (value
& (1L << (length
- 1))))
488 /* Default insn extractor.
490 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
491 The extracted fields are stored in FIELDS.
492 EX_INFO is used to handle reading variable length insns.
493 Return the length of the insn in bits, or 0 if no match,
494 or -1 if an error occurs fetching data (memory_error_func will have
498 extract_insn_normal (CGEN_CPU_DESC cd
,
499 const CGEN_INSN
*insn
,
500 CGEN_EXTRACT_INFO
*ex_info
,
501 CGEN_INSN_INT insn_value
,
505 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
506 const CGEN_SYNTAX_CHAR_TYPE
*syn
;
508 CGEN_FIELDS_BITSIZE (fields
) = CGEN_INSN_BITSIZE (insn
);
510 CGEN_INIT_EXTRACT (cd
);
512 for (syn
= CGEN_SYNTAX_STRING (syntax
); *syn
; ++syn
)
516 if (CGEN_SYNTAX_CHAR_P (*syn
))
519 length
= (* cd
->extract_operand
) (cd
, CGEN_SYNTAX_FIELD (*syn
),
520 ex_info
, insn_value
, fields
, pc
);
525 /* We recognized and successfully extracted this insn. */
526 return CGEN_INSN_BITSIZE (insn
);
529 /* Machine generated code added here. */
531 const char * m32c_cgen_insert_operand
532 (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, CGEN_INSN_BYTES_PTR
, bfd_vma
);
534 /* Main entry point for operand insertion.
536 This function is basically just a big switch statement. Earlier versions
537 used tables to look up the function to use, but
538 - if the table contains both assembler and disassembler functions then
539 the disassembler contains much of the assembler and vice-versa,
540 - there's a lot of inlining possibilities as things grow,
541 - using a switch statement avoids the function call overhead.
543 This function could be moved into `parse_insn_normal', but keeping it
544 separate makes clear the interface between `parse_insn_normal' and each of
545 the handlers. It's also needed by GAS to insert operands that couldn't be
546 resolved during parsing. */
549 m32c_cgen_insert_operand (CGEN_CPU_DESC cd
,
551 CGEN_FIELDS
* fields
,
552 CGEN_INSN_BYTES_PTR buffer
,
553 bfd_vma pc ATTRIBUTE_UNUSED
)
555 const char * errmsg
= NULL
;
556 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
560 case M32C_OPERAND_A0
:
562 case M32C_OPERAND_A1
:
564 case M32C_OPERAND_AN16_PUSH_S
:
565 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
567 case M32C_OPERAND_BIT16AN
:
568 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
570 case M32C_OPERAND_BIT16RN
:
571 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
573 case M32C_OPERAND_BIT32ANPREFIXED
:
574 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
576 case M32C_OPERAND_BIT32ANUNPREFIXED
:
577 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
579 case M32C_OPERAND_BIT32RNPREFIXED
:
581 long value
= fields
->f_dst32_rn_prefixed_QI
;
582 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
583 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
586 case M32C_OPERAND_BIT32RNUNPREFIXED
:
588 long value
= fields
->f_dst32_rn_unprefixed_QI
;
589 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
590 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
593 case M32C_OPERAND_BITBASE16_16_S8
:
594 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
596 case M32C_OPERAND_BITBASE16_16_U16
:
598 long value
= fields
->f_dsp_16_u16
;
599 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
600 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
603 case M32C_OPERAND_BITBASE16_16_U8
:
604 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
606 case M32C_OPERAND_BITBASE16_8_U11_S
:
609 FLD (f_bitno16_S
) = ((FLD (f_bitbase16_u11_S
)) & (7));
610 FLD (f_dsp_8_u8
) = ((((unsigned int) (FLD (f_bitbase16_u11_S
)) >> (3))) & (255));
612 errmsg
= insert_normal (cd
, fields
->f_bitno16_S
, 0, 0, 5, 3, 32, total_length
, buffer
);
615 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
620 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
623 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s11_unprefixed
)) & (7));
624 FLD (f_dsp_16_s8
) = ((int) (FLD (f_bitbase32_16_s11_unprefixed
)) >> (3));
626 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
629 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
634 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
637 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_s19_unprefixed
)) & (7));
638 FLD (f_dsp_16_s16
) = ((int) (FLD (f_bitbase32_16_s19_unprefixed
)) >> (3));
640 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
644 long value
= fields
->f_dsp_16_s16
;
645 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
646 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
652 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
655 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u11_unprefixed
)) & (7));
656 FLD (f_dsp_16_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u11_unprefixed
)) >> (3))) & (255));
658 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
661 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
666 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
669 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u19_unprefixed
)) & (7));
670 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u19_unprefixed
)) >> (3))) & (65535));
672 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
676 long value
= fields
->f_dsp_16_u16
;
677 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
678 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
684 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
687 FLD (f_bitno32_unprefixed
) = ((FLD (f_bitbase32_16_u27_unprefixed
)) & (7));
688 FLD (f_dsp_16_u16
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (3))) & (65535));
689 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed
)) >> (19))) & (255));
691 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
695 long value
= fields
->f_dsp_16_u16
;
696 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
697 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
701 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
706 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
709 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s11_prefixed
)) & (7));
710 FLD (f_dsp_24_s8
) = ((int) (FLD (f_bitbase32_24_s11_prefixed
)) >> (3));
712 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
715 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
720 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
723 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_s19_prefixed
)) & (7));
724 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (3))) & (255));
725 FLD (f_dsp_32_s8
) = ((int) (FLD (f_bitbase32_24_s19_prefixed
)) >> (11));
727 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
730 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
733 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
738 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
741 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u11_prefixed
)) & (7));
742 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u11_prefixed
)) >> (3))) & (255));
744 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
747 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
752 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
755 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u19_prefixed
)) & (7));
756 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (3))) & (255));
757 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed
)) >> (11))) & (255));
759 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
762 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
765 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
770 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
773 FLD (f_bitno32_prefixed
) = ((FLD (f_bitbase32_24_u27_prefixed
)) & (7));
774 FLD (f_dsp_24_u8
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (3))) & (255));
775 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed
)) >> (11))) & (65535));
777 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
780 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
784 long value
= fields
->f_dsp_32_u16
;
785 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
786 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
792 case M32C_OPERAND_BITNO16R
:
793 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
795 case M32C_OPERAND_BITNO32PREFIXED
:
796 errmsg
= insert_normal (cd
, fields
->f_bitno32_prefixed
, 0, 0, 21, 3, 32, total_length
, buffer
);
798 case M32C_OPERAND_BITNO32UNPREFIXED
:
799 errmsg
= insert_normal (cd
, fields
->f_bitno32_unprefixed
, 0, 0, 13, 3, 32, total_length
, buffer
);
801 case M32C_OPERAND_DSP_10_U6
:
802 errmsg
= insert_normal (cd
, fields
->f_dsp_10_u6
, 0, 0, 10, 6, 32, total_length
, buffer
);
804 case M32C_OPERAND_DSP_16_S16
:
806 long value
= fields
->f_dsp_16_s16
;
807 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
808 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
811 case M32C_OPERAND_DSP_16_S8
:
812 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
814 case M32C_OPERAND_DSP_16_U16
:
816 long value
= fields
->f_dsp_16_u16
;
817 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
818 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
821 case M32C_OPERAND_DSP_16_U20
:
824 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
825 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
828 long value
= fields
->f_dsp_16_u16
;
829 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
830 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
834 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
839 case M32C_OPERAND_DSP_16_U24
:
842 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_u24
)) & (65535));
843 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_16_u24
)) >> (16))) & (255));
846 long value
= fields
->f_dsp_16_u16
;
847 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
848 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
852 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
857 case M32C_OPERAND_DSP_16_U8
:
858 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
860 case M32C_OPERAND_DSP_24_S16
:
863 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
864 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
866 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
869 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
874 case M32C_OPERAND_DSP_24_S8
:
875 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
877 case M32C_OPERAND_DSP_24_U16
:
880 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u16
)) & (255));
881 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_u16
)) >> (8))) & (255));
883 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
886 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
891 case M32C_OPERAND_DSP_24_U20
:
894 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
895 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
897 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
901 long value
= fields
->f_dsp_32_u16
;
902 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
903 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
909 case M32C_OPERAND_DSP_24_U24
:
912 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_u24
)) & (255));
913 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_24_u24
)) >> (8))) & (65535));
915 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
919 long value
= fields
->f_dsp_32_u16
;
920 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
921 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
927 case M32C_OPERAND_DSP_24_U8
:
928 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
930 case M32C_OPERAND_DSP_32_S16
:
932 long value
= fields
->f_dsp_32_s16
;
933 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
934 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
937 case M32C_OPERAND_DSP_32_S8
:
938 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
940 case M32C_OPERAND_DSP_32_U16
:
942 long value
= fields
->f_dsp_32_u16
;
943 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
944 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
947 case M32C_OPERAND_DSP_32_U20
:
949 long value
= fields
->f_dsp_32_u24
;
950 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
951 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
954 case M32C_OPERAND_DSP_32_U24
:
956 long value
= fields
->f_dsp_32_u24
;
957 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
958 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
961 case M32C_OPERAND_DSP_32_U8
:
962 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
964 case M32C_OPERAND_DSP_40_S16
:
966 long value
= fields
->f_dsp_40_s16
;
967 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
968 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
971 case M32C_OPERAND_DSP_40_S8
:
972 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
974 case M32C_OPERAND_DSP_40_U16
:
976 long value
= fields
->f_dsp_40_u16
;
977 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
978 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 16, 32, total_length
, buffer
);
981 case M32C_OPERAND_DSP_40_U24
:
983 long value
= fields
->f_dsp_40_u24
;
984 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
985 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
988 case M32C_OPERAND_DSP_40_U8
:
989 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
991 case M32C_OPERAND_DSP_48_S16
:
993 long value
= fields
->f_dsp_48_s16
;
994 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
995 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
998 case M32C_OPERAND_DSP_48_S8
:
999 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1001 case M32C_OPERAND_DSP_48_U16
:
1003 long value
= fields
->f_dsp_48_u16
;
1004 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1005 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1008 case M32C_OPERAND_DSP_48_U24
:
1011 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_48_u24
)) >> (16))) & (255));
1012 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_u24
)) & (65535));
1015 long value
= fields
->f_dsp_48_u16
;
1016 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1017 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1021 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1026 case M32C_OPERAND_DSP_48_U8
:
1027 errmsg
= insert_normal (cd
, fields
->f_dsp_48_u8
, 0, 32, 16, 8, 32, total_length
, buffer
);
1029 case M32C_OPERAND_DSP_8_S24
:
1031 long value
= fields
->f_dsp_8_s24
;
1032 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
1033 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, buffer
);
1036 case M32C_OPERAND_DSP_8_S8
:
1037 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1039 case M32C_OPERAND_DSP_8_U16
:
1041 long value
= fields
->f_dsp_8_u16
;
1042 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1043 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 16, 32, total_length
, buffer
);
1046 case M32C_OPERAND_DSP_8_U24
:
1048 long value
= fields
->f_dsp_8_u24
;
1049 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1050 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 24, 32, total_length
, buffer
);
1053 case M32C_OPERAND_DSP_8_U6
:
1054 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u6
, 0, 0, 8, 6, 32, total_length
, buffer
);
1056 case M32C_OPERAND_DSP_8_U8
:
1057 errmsg
= insert_normal (cd
, fields
->f_dsp_8_u8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1059 case M32C_OPERAND_DST16AN
:
1060 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1062 case M32C_OPERAND_DST16AN_S
:
1063 errmsg
= insert_normal (cd
, fields
->f_dst16_an_s
, 0, 0, 4, 1, 32, total_length
, buffer
);
1065 case M32C_OPERAND_DST16ANHI
:
1066 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1068 case M32C_OPERAND_DST16ANQI
:
1069 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1071 case M32C_OPERAND_DST16ANQI_S
:
1072 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1074 case M32C_OPERAND_DST16ANSI
:
1075 errmsg
= insert_normal (cd
, fields
->f_dst16_an
, 0, 0, 15, 1, 32, total_length
, buffer
);
1077 case M32C_OPERAND_DST16RNEXTQI
:
1078 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_ext
, 0, 0, 14, 1, 32, total_length
, buffer
);
1080 case M32C_OPERAND_DST16RNHI
:
1081 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1083 case M32C_OPERAND_DST16RNQI
:
1084 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1086 case M32C_OPERAND_DST16RNQI_S
:
1087 errmsg
= insert_normal (cd
, fields
->f_dst16_rn_QI_s
, 0, 0, 5, 1, 32, total_length
, buffer
);
1089 case M32C_OPERAND_DST16RNSI
:
1090 errmsg
= insert_normal (cd
, fields
->f_dst16_rn
, 0, 0, 14, 2, 32, total_length
, buffer
);
1092 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
1093 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1095 case M32C_OPERAND_DST32ANPREFIXED
:
1096 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1098 case M32C_OPERAND_DST32ANPREFIXEDHI
:
1099 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1101 case M32C_OPERAND_DST32ANPREFIXEDQI
:
1102 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1104 case M32C_OPERAND_DST32ANPREFIXEDSI
:
1105 errmsg
= insert_normal (cd
, fields
->f_dst32_an_prefixed
, 0, 0, 17, 1, 32, total_length
, buffer
);
1107 case M32C_OPERAND_DST32ANUNPREFIXED
:
1108 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1110 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
1111 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1113 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
1114 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1116 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
1117 errmsg
= insert_normal (cd
, fields
->f_dst32_an_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1119 case M32C_OPERAND_DST32R0HI_S
:
1121 case M32C_OPERAND_DST32R0QI_S
:
1123 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
1124 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1126 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
1127 errmsg
= insert_normal (cd
, fields
->f_dst32_rn_ext_unprefixed
, 0, 0, 9, 1, 32, total_length
, buffer
);
1129 case M32C_OPERAND_DST32RNPREFIXEDHI
:
1131 long value
= fields
->f_dst32_rn_prefixed_HI
;
1132 value
= ((((value
) + (2))) % (4));
1133 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1136 case M32C_OPERAND_DST32RNPREFIXEDQI
:
1138 long value
= fields
->f_dst32_rn_prefixed_QI
;
1139 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1140 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1143 case M32C_OPERAND_DST32RNPREFIXEDSI
:
1145 long value
= fields
->f_dst32_rn_prefixed_SI
;
1146 value
= ((value
) + (2));
1147 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 2, 32, total_length
, buffer
);
1150 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
1152 long value
= fields
->f_dst32_rn_unprefixed_HI
;
1153 value
= ((((value
) + (2))) % (4));
1154 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1157 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
1159 long value
= fields
->f_dst32_rn_unprefixed_QI
;
1160 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1161 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1164 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
1166 long value
= fields
->f_dst32_rn_unprefixed_SI
;
1167 value
= ((value
) + (2));
1168 errmsg
= insert_normal (cd
, value
, 0, 0, 8, 2, 32, total_length
, buffer
);
1171 case M32C_OPERAND_G
:
1173 case M32C_OPERAND_IMM_12_S4
:
1174 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1176 case M32C_OPERAND_IMM_12_S4N
:
1177 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1179 case M32C_OPERAND_IMM_13_U3
:
1180 errmsg
= insert_normal (cd
, fields
->f_imm_13_u3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1182 case M32C_OPERAND_IMM_16_HI
:
1184 long value
= fields
->f_dsp_16_s16
;
1185 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1186 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, buffer
);
1189 case M32C_OPERAND_IMM_16_QI
:
1190 errmsg
= insert_normal (cd
, fields
->f_dsp_16_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 8, 32, total_length
, buffer
);
1192 case M32C_OPERAND_IMM_16_SI
:
1195 FLD (f_dsp_32_u16
) = ((((unsigned int) (FLD (f_dsp_16_s32
)) >> (16))) & (65535));
1196 FLD (f_dsp_16_u16
) = ((FLD (f_dsp_16_s32
)) & (65535));
1199 long value
= fields
->f_dsp_16_u16
;
1200 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1201 errmsg
= insert_normal (cd
, value
, 0, 0, 16, 16, 32, total_length
, buffer
);
1206 long value
= fields
->f_dsp_32_u16
;
1207 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1208 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 16, 32, total_length
, buffer
);
1214 case M32C_OPERAND_IMM_20_S4
:
1215 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1217 case M32C_OPERAND_IMM_24_HI
:
1220 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s16
)) & (255));
1221 FLD (f_dsp_32_u8
) = ((((unsigned int) (FLD (f_dsp_24_s16
)) >> (8))) & (255));
1223 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1226 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1231 case M32C_OPERAND_IMM_24_QI
:
1232 errmsg
= insert_normal (cd
, fields
->f_dsp_24_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 24, 8, 32, total_length
, buffer
);
1234 case M32C_OPERAND_IMM_24_SI
:
1237 FLD (f_dsp_32_u24
) = ((((unsigned int) (FLD (f_dsp_24_s32
)) >> (8))) & (16777215));
1238 FLD (f_dsp_24_u8
) = ((FLD (f_dsp_24_s32
)) & (255));
1240 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1244 long value
= fields
->f_dsp_32_u24
;
1245 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1246 errmsg
= insert_normal (cd
, value
, 0, 32, 0, 24, 32, total_length
, buffer
);
1252 case M32C_OPERAND_IMM_32_HI
:
1254 long value
= fields
->f_dsp_32_s16
;
1255 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1256 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, buffer
);
1259 case M32C_OPERAND_IMM_32_QI
:
1260 errmsg
= insert_normal (cd
, fields
->f_dsp_32_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 8, 32, total_length
, buffer
);
1262 case M32C_OPERAND_IMM_32_SI
:
1264 long value
= fields
->f_dsp_32_s32
;
1265 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
1266 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, buffer
);
1269 case M32C_OPERAND_IMM_40_HI
:
1271 long value
= fields
->f_dsp_40_s16
;
1272 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1273 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, buffer
);
1276 case M32C_OPERAND_IMM_40_QI
:
1277 errmsg
= insert_normal (cd
, fields
->f_dsp_40_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 8, 32, total_length
, buffer
);
1279 case M32C_OPERAND_IMM_40_SI
:
1282 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_40_s32
)) >> (24))) & (255));
1283 FLD (f_dsp_40_u24
) = ((FLD (f_dsp_40_s32
)) & (16777215));
1286 long value
= fields
->f_dsp_40_u24
;
1287 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
1288 errmsg
= insert_normal (cd
, value
, 0, 32, 8, 24, 32, total_length
, buffer
);
1292 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1297 case M32C_OPERAND_IMM_48_HI
:
1299 long value
= fields
->f_dsp_48_s16
;
1300 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1301 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, buffer
);
1304 case M32C_OPERAND_IMM_48_QI
:
1305 errmsg
= insert_normal (cd
, fields
->f_dsp_48_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 8, 32, total_length
, buffer
);
1307 case M32C_OPERAND_IMM_48_SI
:
1310 FLD (f_dsp_64_u16
) = ((((unsigned int) (FLD (f_dsp_48_s32
)) >> (16))) & (65535));
1311 FLD (f_dsp_48_u16
) = ((FLD (f_dsp_48_s32
)) & (65535));
1314 long value
= fields
->f_dsp_48_u16
;
1315 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1316 errmsg
= insert_normal (cd
, value
, 0, 32, 16, 16, 32, total_length
, buffer
);
1321 long value
= fields
->f_dsp_64_u16
;
1322 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1323 errmsg
= insert_normal (cd
, value
, 0, 64, 0, 16, 32, total_length
, buffer
);
1329 case M32C_OPERAND_IMM_56_HI
:
1332 FLD (f_dsp_56_u8
) = ((FLD (f_dsp_56_s16
)) & (255));
1333 FLD (f_dsp_64_u8
) = ((((unsigned int) (FLD (f_dsp_56_s16
)) >> (8))) & (255));
1335 errmsg
= insert_normal (cd
, fields
->f_dsp_56_u8
, 0, 32, 24, 8, 32, total_length
, buffer
);
1338 errmsg
= insert_normal (cd
, fields
->f_dsp_64_u8
, 0, 64, 0, 8, 32, total_length
, buffer
);
1343 case M32C_OPERAND_IMM_56_QI
:
1344 errmsg
= insert_normal (cd
, fields
->f_dsp_56_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 24, 8, 32, total_length
, buffer
);
1346 case M32C_OPERAND_IMM_64_HI
:
1348 long value
= fields
->f_dsp_64_s16
;
1349 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1350 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, buffer
);
1353 case M32C_OPERAND_IMM_8_HI
:
1355 long value
= fields
->f_dsp_8_s16
;
1356 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1357 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, buffer
);
1360 case M32C_OPERAND_IMM_8_QI
:
1361 errmsg
= insert_normal (cd
, fields
->f_dsp_8_s8
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 8, 32, total_length
, buffer
);
1363 case M32C_OPERAND_IMM_8_S4
:
1364 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1366 case M32C_OPERAND_IMM_8_S4N
:
1367 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1369 case M32C_OPERAND_IMM_SH_12_S4
:
1370 errmsg
= insert_normal (cd
, fields
->f_imm_12_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 12, 4, 32, total_length
, buffer
);
1372 case M32C_OPERAND_IMM_SH_20_S4
:
1373 errmsg
= insert_normal (cd
, fields
->f_imm_20_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 20, 4, 32, total_length
, buffer
);
1375 case M32C_OPERAND_IMM_SH_8_S4
:
1376 errmsg
= insert_normal (cd
, fields
->f_imm_8_s4
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 4, 32, total_length
, buffer
);
1378 case M32C_OPERAND_IMM1_S
:
1380 long value
= fields
->f_imm1_S
;
1381 value
= ((value
) - (1));
1382 errmsg
= insert_normal (cd
, value
, 0, 0, 2, 1, 32, total_length
, buffer
);
1385 case M32C_OPERAND_IMM3_S
:
1388 FLD (f_7_1
) = ((((FLD (f_imm3_S
)) - (1))) & (1));
1389 FLD (f_2_2
) = ((((unsigned int) (((FLD (f_imm3_S
)) - (1))) >> (1))) & (3));
1391 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1394 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1399 case M32C_OPERAND_LAB_16_8
:
1401 long value
= fields
->f_lab_16_8
;
1402 value
= ((value
) - (((pc
) + (2))));
1403 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 16, 8, 32, total_length
, buffer
);
1406 case M32C_OPERAND_LAB_24_8
:
1408 long value
= fields
->f_lab_24_8
;
1409 value
= ((value
) - (((pc
) + (2))));
1410 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 24, 8, 32, total_length
, buffer
);
1413 case M32C_OPERAND_LAB_32_8
:
1415 long value
= fields
->f_lab_32_8
;
1416 value
= ((value
) - (((pc
) + (2))));
1417 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 0, 8, 32, total_length
, buffer
);
1420 case M32C_OPERAND_LAB_40_8
:
1422 long value
= fields
->f_lab_40_8
;
1423 value
= ((value
) - (((pc
) + (2))));
1424 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 32, 8, 8, 32, total_length
, buffer
);
1427 case M32C_OPERAND_LAB_5_3
:
1429 long value
= fields
->f_lab_5_3
;
1430 value
= ((value
) - (((pc
) + (2))));
1431 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, buffer
);
1434 case M32C_OPERAND_LAB_8_16
:
1436 long value
= fields
->f_lab_8_16
;
1437 value
= ((((((((value
) - (((pc
) + (1))))) & (255))) << (8))) | (((unsigned int) (((((value
) - (((pc
) + (1))))) & (65535))) >> (8))));
1438 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGN_OPT
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 16, 32, total_length
, buffer
);
1441 case M32C_OPERAND_LAB_8_24
:
1443 long value
= fields
->f_lab_8_24
;
1444 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
1445 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, buffer
);
1448 case M32C_OPERAND_LAB_8_8
:
1450 long value
= fields
->f_lab_8_8
;
1451 value
= ((value
) - (((pc
) + (1))));
1452 errmsg
= insert_normal (cd
, value
, 0|(1<<CGEN_IFLD_SIGNED
)|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 8, 8, 32, total_length
, buffer
);
1455 case M32C_OPERAND_LAB32_JMP_S
:
1459 tmp_val
= ((((FLD (f_lab32_jmp_s
)) - (pc
))) - (2));
1460 FLD (f_7_1
) = ((tmp_val
) & (1));
1461 FLD (f_2_2
) = ((unsigned int) (tmp_val
) >> (1));
1463 errmsg
= insert_normal (cd
, fields
->f_2_2
, 0, 0, 2, 2, 32, total_length
, buffer
);
1466 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1471 case M32C_OPERAND_Q
:
1473 case M32C_OPERAND_R0
:
1475 case M32C_OPERAND_R0H
:
1477 case M32C_OPERAND_R0L
:
1479 case M32C_OPERAND_R1
:
1481 case M32C_OPERAND_R1R2R0
:
1483 case M32C_OPERAND_R2
:
1485 case M32C_OPERAND_R2R0
:
1487 case M32C_OPERAND_R3
:
1489 case M32C_OPERAND_R3R1
:
1491 case M32C_OPERAND_REGSETPOP
:
1492 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1494 case M32C_OPERAND_REGSETPUSH
:
1495 errmsg
= insert_normal (cd
, fields
->f_8_8
, 0, 0, 8, 8, 32, total_length
, buffer
);
1497 case M32C_OPERAND_RN16_PUSH_S
:
1498 errmsg
= insert_normal (cd
, fields
->f_4_1
, 0, 0, 4, 1, 32, total_length
, buffer
);
1500 case M32C_OPERAND_S
:
1502 case M32C_OPERAND_SRC16AN
:
1503 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1505 case M32C_OPERAND_SRC16ANHI
:
1506 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1508 case M32C_OPERAND_SRC16ANQI
:
1509 errmsg
= insert_normal (cd
, fields
->f_src16_an
, 0, 0, 11, 1, 32, total_length
, buffer
);
1511 case M32C_OPERAND_SRC16RNHI
:
1512 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1514 case M32C_OPERAND_SRC16RNQI
:
1515 errmsg
= insert_normal (cd
, fields
->f_src16_rn
, 0, 0, 10, 2, 32, total_length
, buffer
);
1517 case M32C_OPERAND_SRC32ANPREFIXED
:
1518 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1520 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
1521 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1523 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
1524 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1526 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
1527 errmsg
= insert_normal (cd
, fields
->f_src32_an_prefixed
, 0, 0, 19, 1, 32, total_length
, buffer
);
1529 case M32C_OPERAND_SRC32ANUNPREFIXED
:
1530 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1532 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
1533 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1535 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
1536 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1538 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
1539 errmsg
= insert_normal (cd
, fields
->f_src32_an_unprefixed
, 0, 0, 11, 1, 32, total_length
, buffer
);
1541 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
1543 long value
= fields
->f_src32_rn_prefixed_HI
;
1544 value
= ((((value
) + (2))) % (4));
1545 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1548 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
1550 long value
= fields
->f_src32_rn_prefixed_QI
;
1551 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1552 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1555 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
1557 long value
= fields
->f_src32_rn_prefixed_SI
;
1558 value
= ((value
) + (2));
1559 errmsg
= insert_normal (cd
, value
, 0, 0, 18, 2, 32, total_length
, buffer
);
1562 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
1564 long value
= fields
->f_src32_rn_unprefixed_HI
;
1565 value
= ((((value
) + (2))) % (4));
1566 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1569 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
1571 long value
= fields
->f_src32_rn_unprefixed_QI
;
1572 value
= (((((((~ (value
))) << (1))) & (2))) | (((((unsigned int) (value
) >> (1))) & (1))));
1573 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1576 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
1578 long value
= fields
->f_src32_rn_unprefixed_SI
;
1579 value
= ((value
) + (2));
1580 errmsg
= insert_normal (cd
, value
, 0, 0, 10, 2, 32, total_length
, buffer
);
1583 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
1584 errmsg
= insert_normal (cd
, fields
->f_5_1
, 0, 0, 5, 1, 32, total_length
, buffer
);
1586 case M32C_OPERAND_X
:
1588 case M32C_OPERAND_Z
:
1590 case M32C_OPERAND_COND16_16
:
1591 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1593 case M32C_OPERAND_COND16_24
:
1594 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1596 case M32C_OPERAND_COND16_32
:
1597 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1599 case M32C_OPERAND_COND16C
:
1600 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1602 case M32C_OPERAND_COND16J
:
1603 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1605 case M32C_OPERAND_COND16J5
:
1606 errmsg
= insert_normal (cd
, fields
->f_cond16j_5
, 0, 0, 5, 3, 32, total_length
, buffer
);
1608 case M32C_OPERAND_COND32
:
1611 FLD (f_9_1
) = ((((unsigned int) (FLD (f_cond32
)) >> (3))) & (1));
1612 FLD (f_13_3
) = ((FLD (f_cond32
)) & (7));
1614 errmsg
= insert_normal (cd
, fields
->f_9_1
, 0, 0, 9, 1, 32, total_length
, buffer
);
1617 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1622 case M32C_OPERAND_COND32_16
:
1623 errmsg
= insert_normal (cd
, fields
->f_dsp_16_u8
, 0, 0, 16, 8, 32, total_length
, buffer
);
1625 case M32C_OPERAND_COND32_24
:
1626 errmsg
= insert_normal (cd
, fields
->f_dsp_24_u8
, 0, 0, 24, 8, 32, total_length
, buffer
);
1628 case M32C_OPERAND_COND32_32
:
1629 errmsg
= insert_normal (cd
, fields
->f_dsp_32_u8
, 0, 32, 0, 8, 32, total_length
, buffer
);
1631 case M32C_OPERAND_COND32_40
:
1632 errmsg
= insert_normal (cd
, fields
->f_dsp_40_u8
, 0, 32, 8, 8, 32, total_length
, buffer
);
1634 case M32C_OPERAND_COND32J
:
1637 FLD (f_1_3
) = ((((unsigned int) (FLD (f_cond32j
)) >> (1))) & (7));
1638 FLD (f_7_1
) = ((FLD (f_cond32j
)) & (1));
1640 errmsg
= insert_normal (cd
, fields
->f_1_3
, 0, 0, 1, 3, 32, total_length
, buffer
);
1643 errmsg
= insert_normal (cd
, fields
->f_7_1
, 0, 0, 7, 1, 32, total_length
, buffer
);
1648 case M32C_OPERAND_CR1_PREFIXED_32
:
1649 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1651 case M32C_OPERAND_CR1_UNPREFIXED_32
:
1652 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1654 case M32C_OPERAND_CR16
:
1655 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1657 case M32C_OPERAND_CR2_32
:
1658 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1660 case M32C_OPERAND_CR3_PREFIXED_32
:
1661 errmsg
= insert_normal (cd
, fields
->f_21_3
, 0, 0, 21, 3, 32, total_length
, buffer
);
1663 case M32C_OPERAND_CR3_UNPREFIXED_32
:
1664 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1666 case M32C_OPERAND_FLAGS16
:
1667 errmsg
= insert_normal (cd
, fields
->f_9_3
, 0, 0, 9, 3, 32, total_length
, buffer
);
1669 case M32C_OPERAND_FLAGS32
:
1670 errmsg
= insert_normal (cd
, fields
->f_13_3
, 0, 0, 13, 3, 32, total_length
, buffer
);
1672 case M32C_OPERAND_SCCOND32
:
1673 errmsg
= insert_normal (cd
, fields
->f_cond16
, 0, 0, 12, 4, 32, total_length
, buffer
);
1675 case M32C_OPERAND_SIZE
:
1679 /* xgettext:c-format */
1680 fprintf (stderr
, _("Unrecognized field %d while building insn.\n"),
1688 int m32c_cgen_extract_operand
1689 (CGEN_CPU_DESC
, int, CGEN_EXTRACT_INFO
*, CGEN_INSN_INT
, CGEN_FIELDS
*, bfd_vma
);
1691 /* Main entry point for operand extraction.
1692 The result is <= 0 for error, >0 for success.
1693 ??? Actual values aren't well defined right now.
1695 This function is basically just a big switch statement. Earlier versions
1696 used tables to look up the function to use, but
1697 - if the table contains both assembler and disassembler functions then
1698 the disassembler contains much of the assembler and vice-versa,
1699 - there's a lot of inlining possibilities as things grow,
1700 - using a switch statement avoids the function call overhead.
1702 This function could be moved into `print_insn_normal', but keeping it
1703 separate makes clear the interface between `print_insn_normal' and each of
1707 m32c_cgen_extract_operand (CGEN_CPU_DESC cd
,
1709 CGEN_EXTRACT_INFO
*ex_info
,
1710 CGEN_INSN_INT insn_value
,
1711 CGEN_FIELDS
* fields
,
1714 /* Assume success (for those operands that are nops). */
1716 unsigned int total_length
= CGEN_FIELDS_BITSIZE (fields
);
1720 case M32C_OPERAND_A0
:
1722 case M32C_OPERAND_A1
:
1724 case M32C_OPERAND_AN16_PUSH_S
:
1725 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
1727 case M32C_OPERAND_BIT16AN
:
1728 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
1730 case M32C_OPERAND_BIT16RN
:
1731 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
1733 case M32C_OPERAND_BIT32ANPREFIXED
:
1734 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
1736 case M32C_OPERAND_BIT32ANUNPREFIXED
:
1737 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
1739 case M32C_OPERAND_BIT32RNPREFIXED
:
1742 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
1743 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1744 fields
->f_dst32_rn_prefixed_QI
= value
;
1747 case M32C_OPERAND_BIT32RNUNPREFIXED
:
1750 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
1751 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
1752 fields
->f_dst32_rn_unprefixed_QI
= value
;
1755 case M32C_OPERAND_BITBASE16_16_S8
:
1756 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
);
1758 case M32C_OPERAND_BITBASE16_16_U16
:
1761 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1762 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1763 fields
->f_dsp_16_u16
= value
;
1766 case M32C_OPERAND_BITBASE16_16_U8
:
1767 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1769 case M32C_OPERAND_BITBASE16_8_U11_S
:
1771 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_bitno16_S
);
1772 if (length
<= 0) break;
1773 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
1774 if (length
<= 0) break;
1776 FLD (f_bitbase16_u11_S
) = ((((FLD (f_dsp_8_u8
)) << (3))) | (FLD (f_bitno16_S
)));
1780 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
1782 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1783 if (length
<= 0) break;
1784 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
);
1785 if (length
<= 0) break;
1787 FLD (f_bitbase32_16_s11_unprefixed
) = ((((FLD (f_dsp_16_s8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1791 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
1793 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1794 if (length
<= 0) break;
1797 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1798 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1799 fields
->f_dsp_16_s16
= value
;
1801 if (length
<= 0) break;
1803 FLD (f_bitbase32_16_s19_unprefixed
) = ((((FLD (f_dsp_16_s16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1807 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
1809 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1810 if (length
<= 0) break;
1811 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1812 if (length
<= 0) break;
1814 FLD (f_bitbase32_16_u11_unprefixed
) = ((((FLD (f_dsp_16_u8
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1818 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
1820 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1821 if (length
<= 0) break;
1824 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1825 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1826 fields
->f_dsp_16_u16
= value
;
1828 if (length
<= 0) break;
1830 FLD (f_bitbase32_16_u19_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (FLD (f_bitno32_unprefixed
)));
1834 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
1836 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1837 if (length
<= 0) break;
1840 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1841 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1842 fields
->f_dsp_16_u16
= value
;
1844 if (length
<= 0) break;
1845 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1846 if (length
<= 0) break;
1848 FLD (f_bitbase32_16_u27_unprefixed
) = ((((FLD (f_dsp_16_u16
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (19))) | (FLD (f_bitno32_unprefixed
)))));
1852 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
1854 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1855 if (length
<= 0) break;
1856 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
);
1857 if (length
<= 0) break;
1859 FLD (f_bitbase32_24_s11_prefixed
) = ((((FLD (f_dsp_24_s8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1863 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
1865 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1866 if (length
<= 0) break;
1867 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1868 if (length
<= 0) break;
1869 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
);
1870 if (length
<= 0) break;
1872 FLD (f_bitbase32_24_s19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_s8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1876 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
1878 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1879 if (length
<= 0) break;
1880 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1881 if (length
<= 0) break;
1883 FLD (f_bitbase32_24_u11_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (FLD (f_bitno32_prefixed
)));
1887 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
1889 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1890 if (length
<= 0) break;
1891 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1892 if (length
<= 0) break;
1893 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1894 if (length
<= 0) break;
1896 FLD (f_bitbase32_24_u19_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u8
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1900 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
1902 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1903 if (length
<= 0) break;
1904 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1905 if (length
<= 0) break;
1908 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
1909 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1910 fields
->f_dsp_32_u16
= value
;
1912 if (length
<= 0) break;
1914 FLD (f_bitbase32_24_u27_prefixed
) = ((((FLD (f_dsp_24_u8
)) << (3))) | (((((FLD (f_dsp_32_u16
)) << (11))) | (FLD (f_bitno32_prefixed
)))));
1918 case M32C_OPERAND_BITNO16R
:
1919 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1921 case M32C_OPERAND_BITNO32PREFIXED
:
1922 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_bitno32_prefixed
);
1924 case M32C_OPERAND_BITNO32UNPREFIXED
:
1925 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_bitno32_unprefixed
);
1927 case M32C_OPERAND_DSP_10_U6
:
1928 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 6, 32, total_length
, pc
, & fields
->f_dsp_10_u6
);
1930 case M32C_OPERAND_DSP_16_S16
:
1933 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
1934 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
1935 fields
->f_dsp_16_s16
= value
;
1938 case M32C_OPERAND_DSP_16_S8
:
1939 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
);
1941 case M32C_OPERAND_DSP_16_U16
:
1944 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1945 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1946 fields
->f_dsp_16_u16
= value
;
1949 case M32C_OPERAND_DSP_16_U20
:
1953 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1954 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1955 fields
->f_dsp_16_u16
= value
;
1957 if (length
<= 0) break;
1958 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1959 if (length
<= 0) break;
1961 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
1965 case M32C_OPERAND_DSP_16_U24
:
1969 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
1970 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
1971 fields
->f_dsp_16_u16
= value
;
1973 if (length
<= 0) break;
1974 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1975 if (length
<= 0) break;
1977 FLD (f_dsp_16_u24
) = ((((FLD (f_dsp_32_u8
)) << (16))) | (FLD (f_dsp_16_u16
)));
1981 case M32C_OPERAND_DSP_16_U8
:
1982 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
1984 case M32C_OPERAND_DSP_24_S16
:
1986 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
1987 if (length
<= 0) break;
1988 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
1989 if (length
<= 0) break;
1991 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
1995 case M32C_OPERAND_DSP_24_S8
:
1996 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
);
1998 case M32C_OPERAND_DSP_24_U16
:
2000 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2001 if (length
<= 0) break;
2002 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2003 if (length
<= 0) break;
2005 FLD (f_dsp_24_u16
) = ((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
)));
2009 case M32C_OPERAND_DSP_24_U20
:
2011 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2012 if (length
<= 0) break;
2015 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2016 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2017 fields
->f_dsp_32_u16
= value
;
2019 if (length
<= 0) break;
2021 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2025 case M32C_OPERAND_DSP_24_U24
:
2027 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2028 if (length
<= 0) break;
2031 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2032 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2033 fields
->f_dsp_32_u16
= value
;
2035 if (length
<= 0) break;
2037 FLD (f_dsp_24_u24
) = ((((FLD (f_dsp_32_u16
)) << (8))) | (FLD (f_dsp_24_u8
)));
2041 case M32C_OPERAND_DSP_24_U8
:
2042 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2044 case M32C_OPERAND_DSP_32_S16
:
2047 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2048 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2049 fields
->f_dsp_32_s16
= value
;
2052 case M32C_OPERAND_DSP_32_S8
:
2053 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
);
2055 case M32C_OPERAND_DSP_32_U16
:
2058 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2059 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2060 fields
->f_dsp_32_u16
= value
;
2063 case M32C_OPERAND_DSP_32_U20
:
2066 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2067 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2068 fields
->f_dsp_32_u24
= value
;
2071 case M32C_OPERAND_DSP_32_U24
:
2074 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2075 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2076 fields
->f_dsp_32_u24
= value
;
2079 case M32C_OPERAND_DSP_32_U8
:
2080 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2082 case M32C_OPERAND_DSP_40_S16
:
2085 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2086 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2087 fields
->f_dsp_40_s16
= value
;
2090 case M32C_OPERAND_DSP_40_S8
:
2091 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
);
2093 case M32C_OPERAND_DSP_40_U16
:
2096 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 16, 32, total_length
, pc
, & value
);
2097 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2098 fields
->f_dsp_40_u16
= value
;
2101 case M32C_OPERAND_DSP_40_U24
:
2104 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2105 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2106 fields
->f_dsp_40_u24
= value
;
2109 case M32C_OPERAND_DSP_40_U8
:
2110 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2112 case M32C_OPERAND_DSP_48_S16
:
2115 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2116 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2117 fields
->f_dsp_48_s16
= value
;
2120 case M32C_OPERAND_DSP_48_S8
:
2121 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
);
2123 case M32C_OPERAND_DSP_48_U16
:
2126 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2127 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2128 fields
->f_dsp_48_u16
= value
;
2131 case M32C_OPERAND_DSP_48_U24
:
2135 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2136 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2137 fields
->f_dsp_48_u16
= value
;
2139 if (length
<= 0) break;
2140 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2141 if (length
<= 0) break;
2143 FLD (f_dsp_48_u24
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u8
)) << (16))) & (16711680))));
2147 case M32C_OPERAND_DSP_48_U8
:
2148 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_48_u8
);
2150 case M32C_OPERAND_DSP_8_S24
:
2153 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 24, 32, total_length
, pc
, & value
);
2154 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value
) & (255))))) << (16))));
2155 fields
->f_dsp_8_s24
= value
;
2158 case M32C_OPERAND_DSP_8_S8
:
2159 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
);
2161 case M32C_OPERAND_DSP_8_U16
:
2164 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 16, 32, total_length
, pc
, & value
);
2165 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2166 fields
->f_dsp_8_u16
= value
;
2169 case M32C_OPERAND_DSP_8_U24
:
2172 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 24, 32, total_length
, pc
, & value
);
2173 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2174 fields
->f_dsp_8_u24
= value
;
2177 case M32C_OPERAND_DSP_8_U6
:
2178 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 6, 32, total_length
, pc
, & fields
->f_dsp_8_u6
);
2180 case M32C_OPERAND_DSP_8_U8
:
2181 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_8_u8
);
2183 case M32C_OPERAND_DST16AN
:
2184 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2186 case M32C_OPERAND_DST16AN_S
:
2187 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_dst16_an_s
);
2189 case M32C_OPERAND_DST16ANHI
:
2190 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2192 case M32C_OPERAND_DST16ANQI
:
2193 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2195 case M32C_OPERAND_DST16ANQI_S
:
2196 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2198 case M32C_OPERAND_DST16ANSI
:
2199 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 15, 1, 32, total_length
, pc
, & fields
->f_dst16_an
);
2201 case M32C_OPERAND_DST16RNEXTQI
:
2202 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_ext
);
2204 case M32C_OPERAND_DST16RNHI
:
2205 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2207 case M32C_OPERAND_DST16RNQI
:
2208 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2210 case M32C_OPERAND_DST16RNQI_S
:
2211 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_dst16_rn_QI_s
);
2213 case M32C_OPERAND_DST16RNSI
:
2214 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 14, 2, 32, total_length
, pc
, & fields
->f_dst16_rn
);
2216 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
2217 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2219 case M32C_OPERAND_DST32ANPREFIXED
:
2220 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2222 case M32C_OPERAND_DST32ANPREFIXEDHI
:
2223 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2225 case M32C_OPERAND_DST32ANPREFIXEDQI
:
2226 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2228 case M32C_OPERAND_DST32ANPREFIXEDSI
:
2229 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 17, 1, 32, total_length
, pc
, & fields
->f_dst32_an_prefixed
);
2231 case M32C_OPERAND_DST32ANUNPREFIXED
:
2232 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2234 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
2235 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2237 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
2238 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2240 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
2241 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_an_unprefixed
);
2243 case M32C_OPERAND_DST32R0HI_S
:
2245 case M32C_OPERAND_DST32R0QI_S
:
2247 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
2248 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2250 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
2251 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_dst32_rn_ext_unprefixed
);
2253 case M32C_OPERAND_DST32RNPREFIXEDHI
:
2256 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2257 value
= ((((value
) + (2))) % (4));
2258 fields
->f_dst32_rn_prefixed_HI
= value
;
2261 case M32C_OPERAND_DST32RNPREFIXEDQI
:
2264 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2265 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2266 fields
->f_dst32_rn_prefixed_QI
= value
;
2269 case M32C_OPERAND_DST32RNPREFIXEDSI
:
2272 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 2, 32, total_length
, pc
, & value
);
2273 value
= ((value
) - (2));
2274 fields
->f_dst32_rn_prefixed_SI
= value
;
2277 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
2280 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2281 value
= ((((value
) + (2))) % (4));
2282 fields
->f_dst32_rn_unprefixed_HI
= value
;
2285 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
2288 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2289 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2290 fields
->f_dst32_rn_unprefixed_QI
= value
;
2293 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
2296 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 2, 32, total_length
, pc
, & value
);
2297 value
= ((value
) - (2));
2298 fields
->f_dst32_rn_unprefixed_SI
= value
;
2301 case M32C_OPERAND_G
:
2303 case M32C_OPERAND_IMM_12_S4
:
2304 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
);
2306 case M32C_OPERAND_IMM_12_S4N
:
2307 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
);
2309 case M32C_OPERAND_IMM_13_U3
:
2310 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_imm_13_u3
);
2312 case M32C_OPERAND_IMM_16_HI
:
2315 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 16, 16, 32, total_length
, pc
, & value
);
2316 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2317 fields
->f_dsp_16_s16
= value
;
2320 case M32C_OPERAND_IMM_16_QI
:
2321 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
);
2323 case M32C_OPERAND_IMM_16_SI
:
2327 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 16, 32, total_length
, pc
, & value
);
2328 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2329 fields
->f_dsp_16_u16
= value
;
2331 if (length
<= 0) break;
2334 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 16, 32, total_length
, pc
, & value
);
2335 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2336 fields
->f_dsp_32_u16
= value
;
2338 if (length
<= 0) break;
2340 FLD (f_dsp_16_s32
) = ((((FLD (f_dsp_16_u16
)) & (65535))) | (((((FLD (f_dsp_32_u16
)) << (16))) & (0xffff0000))));
2344 case M32C_OPERAND_IMM_20_S4
:
2345 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
);
2347 case M32C_OPERAND_IMM_24_HI
:
2349 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2350 if (length
<= 0) break;
2351 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2352 if (length
<= 0) break;
2354 FLD (f_dsp_24_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_32_u8
)) << (8))) | (FLD (f_dsp_24_u8
))))));
2358 case M32C_OPERAND_IMM_24_QI
:
2359 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
);
2361 case M32C_OPERAND_IMM_24_SI
:
2363 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2364 if (length
<= 0) break;
2367 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 24, 32, total_length
, pc
, & value
);
2368 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2369 fields
->f_dsp_32_u24
= value
;
2371 if (length
<= 0) break;
2373 FLD (f_dsp_24_s32
) = ((((FLD (f_dsp_24_u8
)) & (255))) | (((((FLD (f_dsp_32_u24
)) << (8))) & (0xffffff00))));
2377 case M32C_OPERAND_IMM_32_HI
:
2380 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 16, 32, total_length
, pc
, & value
);
2381 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2382 fields
->f_dsp_32_s16
= value
;
2385 case M32C_OPERAND_IMM_32_QI
:
2386 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
);
2388 case M32C_OPERAND_IMM_32_SI
:
2391 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 0, 32, 32, total_length
, pc
, & value
);
2392 value
= EXTSISI (((((((((unsigned int) (value
) >> (24))) & (255))) | (((((unsigned int) (value
) >> (8))) & (65280))))) | (((((((value
) << (8))) & (16711680))) | (((((value
) << (24))) & (0xff000000)))))));
2393 fields
->f_dsp_32_s32
= value
;
2396 case M32C_OPERAND_IMM_40_HI
:
2399 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 8, 16, 32, total_length
, pc
, & value
);
2400 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2401 fields
->f_dsp_40_s16
= value
;
2404 case M32C_OPERAND_IMM_40_QI
:
2405 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
);
2407 case M32C_OPERAND_IMM_40_SI
:
2411 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 24, 32, total_length
, pc
, & value
);
2412 value
= ((((((((unsigned int) (value
) >> (16))) & (255))) | (((value
) & (65280))))) | (((((value
) << (16))) & (16711680))));
2413 fields
->f_dsp_40_u24
= value
;
2415 if (length
<= 0) break;
2416 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2417 if (length
<= 0) break;
2419 FLD (f_dsp_40_s32
) = ((((FLD (f_dsp_40_u24
)) & (16777215))) | (((((FLD (f_dsp_64_u8
)) << (24))) & (0xff000000))));
2423 case M32C_OPERAND_IMM_48_HI
:
2426 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 32, 16, 16, 32, total_length
, pc
, & value
);
2427 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2428 fields
->f_dsp_48_s16
= value
;
2431 case M32C_OPERAND_IMM_48_QI
:
2432 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
);
2434 case M32C_OPERAND_IMM_48_SI
:
2438 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 16, 16, 32, total_length
, pc
, & value
);
2439 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2440 fields
->f_dsp_48_u16
= value
;
2442 if (length
<= 0) break;
2445 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 16, 32, total_length
, pc
, & value
);
2446 value
= ((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280))));
2447 fields
->f_dsp_64_u16
= value
;
2449 if (length
<= 0) break;
2451 FLD (f_dsp_48_s32
) = ((((FLD (f_dsp_48_u16
)) & (65535))) | (((((FLD (f_dsp_64_u16
)) << (16))) & (0xffff0000))));
2455 case M32C_OPERAND_IMM_56_HI
:
2457 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_56_u8
);
2458 if (length
<= 0) break;
2459 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 64, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_64_u8
);
2460 if (length
<= 0) break;
2462 FLD (f_dsp_56_s16
) = EXTHISI (((HI
) (UINT
) (((((FLD (f_dsp_64_u8
)) << (8))) | (FLD (f_dsp_56_u8
))))));
2466 case M32C_OPERAND_IMM_56_QI
:
2467 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
);
2469 case M32C_OPERAND_IMM_64_HI
:
2472 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 64, 0, 16, 32, total_length
, pc
, & value
);
2473 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2474 fields
->f_dsp_64_s16
= value
;
2477 case M32C_OPERAND_IMM_8_HI
:
2480 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_SIGNED
), 0, 8, 16, 32, total_length
, pc
, & value
);
2481 value
= EXTHISI (((HI
) (INT
) (((((((unsigned int) (value
) >> (8))) & (255))) | (((((value
) << (8))) & (65280)))))));
2482 fields
->f_dsp_8_s16
= value
;
2485 case M32C_OPERAND_IMM_8_QI
:
2486 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
);
2488 case M32C_OPERAND_IMM_8_S4
:
2489 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
);
2491 case M32C_OPERAND_IMM_8_S4N
:
2492 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
);
2494 case M32C_OPERAND_IMM_SH_12_S4
:
2495 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
);
2497 case M32C_OPERAND_IMM_SH_20_S4
:
2498 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
);
2500 case M32C_OPERAND_IMM_SH_8_S4
:
2501 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
);
2503 case M32C_OPERAND_IMM1_S
:
2506 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 1, 32, total_length
, pc
, & value
);
2507 value
= ((value
) + (1));
2508 fields
->f_imm1_S
= value
;
2511 case M32C_OPERAND_IMM3_S
:
2513 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2514 if (length
<= 0) break;
2515 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2516 if (length
<= 0) break;
2518 FLD (f_imm3_S
) = ((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (1));
2522 case M32C_OPERAND_LAB_16_8
:
2525 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
);
2526 value
= ((value
) + (((pc
) + (2))));
2527 fields
->f_lab_16_8
= value
;
2530 case M32C_OPERAND_LAB_24_8
:
2533 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
);
2534 value
= ((value
) + (((pc
) + (2))));
2535 fields
->f_lab_24_8
= value
;
2538 case M32C_OPERAND_LAB_32_8
:
2541 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
);
2542 value
= ((value
) + (((pc
) + (2))));
2543 fields
->f_lab_32_8
= value
;
2546 case M32C_OPERAND_LAB_40_8
:
2549 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
);
2550 value
= ((value
) + (((pc
) + (2))));
2551 fields
->f_lab_40_8
= value
;
2554 case M32C_OPERAND_LAB_5_3
:
2557 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_PCREL_ADDR
), 0, 5, 3, 32, total_length
, pc
, & value
);
2558 value
= ((value
) + (((pc
) + (2))));
2559 fields
->f_lab_5_3
= value
;
2562 case M32C_OPERAND_LAB_8_16
:
2565 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
);
2566 value
= ((((((unsigned int) (((value
) & (65535))) >> (8))) | (((int) (((((value
) & (255))) << (24))) >> (16))))) + (((pc
) + (1))));
2567 fields
->f_lab_8_16
= value
;
2570 case M32C_OPERAND_LAB_8_24
:
2573 length
= extract_normal (cd
, ex_info
, insn_value
, 0|(1<<CGEN_IFLD_ABS_ADDR
), 0, 8, 24, 32, total_length
, pc
, & value
);
2574 value
= ((((((unsigned int) (value
) >> (16))) | (((value
) & (65280))))) | (((((value
) & (255))) << (16))));
2575 fields
->f_lab_8_24
= value
;
2578 case M32C_OPERAND_LAB_8_8
:
2581 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
);
2582 value
= ((value
) + (((pc
) + (1))));
2583 fields
->f_lab_8_8
= value
;
2586 case M32C_OPERAND_LAB32_JMP_S
:
2588 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 2, 2, 32, total_length
, pc
, & fields
->f_2_2
);
2589 if (length
<= 0) break;
2590 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2591 if (length
<= 0) break;
2593 FLD (f_lab32_jmp_s
) = ((pc
) + (((((((FLD (f_2_2
)) << (1))) | (FLD (f_7_1
)))) + (2))));
2597 case M32C_OPERAND_Q
:
2599 case M32C_OPERAND_R0
:
2601 case M32C_OPERAND_R0H
:
2603 case M32C_OPERAND_R0L
:
2605 case M32C_OPERAND_R1
:
2607 case M32C_OPERAND_R1R2R0
:
2609 case M32C_OPERAND_R2
:
2611 case M32C_OPERAND_R2R0
:
2613 case M32C_OPERAND_R3
:
2615 case M32C_OPERAND_R3R1
:
2617 case M32C_OPERAND_REGSETPOP
:
2618 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2620 case M32C_OPERAND_REGSETPUSH
:
2621 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 8, 8, 32, total_length
, pc
, & fields
->f_8_8
);
2623 case M32C_OPERAND_RN16_PUSH_S
:
2624 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 4, 1, 32, total_length
, pc
, & fields
->f_4_1
);
2626 case M32C_OPERAND_S
:
2628 case M32C_OPERAND_SRC16AN
:
2629 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2631 case M32C_OPERAND_SRC16ANHI
:
2632 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2634 case M32C_OPERAND_SRC16ANQI
:
2635 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src16_an
);
2637 case M32C_OPERAND_SRC16RNHI
:
2638 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2640 case M32C_OPERAND_SRC16RNQI
:
2641 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & fields
->f_src16_rn
);
2643 case M32C_OPERAND_SRC32ANPREFIXED
:
2644 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2646 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
2647 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2649 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
2650 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2652 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
2653 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 19, 1, 32, total_length
, pc
, & fields
->f_src32_an_prefixed
);
2655 case M32C_OPERAND_SRC32ANUNPREFIXED
:
2656 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2658 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
2659 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2661 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
2662 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2664 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
2665 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 11, 1, 32, total_length
, pc
, & fields
->f_src32_an_unprefixed
);
2667 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
2670 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2671 value
= ((((value
) + (2))) % (4));
2672 fields
->f_src32_rn_prefixed_HI
= value
;
2675 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
2678 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2679 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2680 fields
->f_src32_rn_prefixed_QI
= value
;
2683 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
2686 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 18, 2, 32, total_length
, pc
, & value
);
2687 value
= ((value
) - (2));
2688 fields
->f_src32_rn_prefixed_SI
= value
;
2691 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
2694 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2695 value
= ((((value
) + (2))) % (4));
2696 fields
->f_src32_rn_unprefixed_HI
= value
;
2699 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
2702 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2703 value
= (((((~ (((unsigned int) (value
) >> (1))))) & (1))) | (((((value
) << (1))) & (2))));
2704 fields
->f_src32_rn_unprefixed_QI
= value
;
2707 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
2710 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 10, 2, 32, total_length
, pc
, & value
);
2711 value
= ((value
) - (2));
2712 fields
->f_src32_rn_unprefixed_SI
= value
;
2715 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
2716 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 1, 32, total_length
, pc
, & fields
->f_5_1
);
2718 case M32C_OPERAND_X
:
2720 case M32C_OPERAND_Z
:
2722 case M32C_OPERAND_COND16_16
:
2723 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2725 case M32C_OPERAND_COND16_24
:
2726 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2728 case M32C_OPERAND_COND16_32
:
2729 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2731 case M32C_OPERAND_COND16C
:
2732 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2734 case M32C_OPERAND_COND16J
:
2735 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2737 case M32C_OPERAND_COND16J5
:
2738 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 5, 3, 32, total_length
, pc
, & fields
->f_cond16j_5
);
2740 case M32C_OPERAND_COND32
:
2742 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 1, 32, total_length
, pc
, & fields
->f_9_1
);
2743 if (length
<= 0) break;
2744 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2745 if (length
<= 0) break;
2747 FLD (f_cond32
) = ((((FLD (f_9_1
)) << (3))) | (FLD (f_13_3
)));
2751 case M32C_OPERAND_COND32_16
:
2752 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 16, 8, 32, total_length
, pc
, & fields
->f_dsp_16_u8
);
2754 case M32C_OPERAND_COND32_24
:
2755 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 24, 8, 32, total_length
, pc
, & fields
->f_dsp_24_u8
);
2757 case M32C_OPERAND_COND32_32
:
2758 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 0, 8, 32, total_length
, pc
, & fields
->f_dsp_32_u8
);
2760 case M32C_OPERAND_COND32_40
:
2761 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 32, 8, 8, 32, total_length
, pc
, & fields
->f_dsp_40_u8
);
2763 case M32C_OPERAND_COND32J
:
2765 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 1, 3, 32, total_length
, pc
, & fields
->f_1_3
);
2766 if (length
<= 0) break;
2767 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 7, 1, 32, total_length
, pc
, & fields
->f_7_1
);
2768 if (length
<= 0) break;
2770 FLD (f_cond32j
) = ((((FLD (f_1_3
)) << (1))) | (FLD (f_7_1
)));
2774 case M32C_OPERAND_CR1_PREFIXED_32
:
2775 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2777 case M32C_OPERAND_CR1_UNPREFIXED_32
:
2778 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2780 case M32C_OPERAND_CR16
:
2781 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2783 case M32C_OPERAND_CR2_32
:
2784 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2786 case M32C_OPERAND_CR3_PREFIXED_32
:
2787 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 21, 3, 32, total_length
, pc
, & fields
->f_21_3
);
2789 case M32C_OPERAND_CR3_UNPREFIXED_32
:
2790 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2792 case M32C_OPERAND_FLAGS16
:
2793 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 9, 3, 32, total_length
, pc
, & fields
->f_9_3
);
2795 case M32C_OPERAND_FLAGS32
:
2796 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 13, 3, 32, total_length
, pc
, & fields
->f_13_3
);
2798 case M32C_OPERAND_SCCOND32
:
2799 length
= extract_normal (cd
, ex_info
, insn_value
, 0, 0, 12, 4, 32, total_length
, pc
, & fields
->f_cond16
);
2801 case M32C_OPERAND_SIZE
:
2805 /* xgettext:c-format */
2806 fprintf (stderr
, _("Unrecognized field %d while decoding insn.\n"),
2814 cgen_insert_fn
* const m32c_cgen_insert_handlers
[] =
2819 cgen_extract_fn
* const m32c_cgen_extract_handlers
[] =
2821 extract_insn_normal
,
2824 int m32c_cgen_get_int_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2825 bfd_vma
m32c_cgen_get_vma_operand (CGEN_CPU_DESC
, int, const CGEN_FIELDS
*);
2827 /* Getting values from cgen_fields is handled by a collection of functions.
2828 They are distinguished by the type of the VALUE argument they return.
2829 TODO: floating point, inlining support, remove cases where result type
2833 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
2835 const CGEN_FIELDS
* fields
)
2841 case M32C_OPERAND_A0
:
2844 case M32C_OPERAND_A1
:
2847 case M32C_OPERAND_AN16_PUSH_S
:
2848 value
= fields
->f_4_1
;
2850 case M32C_OPERAND_BIT16AN
:
2851 value
= fields
->f_dst16_an
;
2853 case M32C_OPERAND_BIT16RN
:
2854 value
= fields
->f_dst16_rn
;
2856 case M32C_OPERAND_BIT32ANPREFIXED
:
2857 value
= fields
->f_dst32_an_prefixed
;
2859 case M32C_OPERAND_BIT32ANUNPREFIXED
:
2860 value
= fields
->f_dst32_an_unprefixed
;
2862 case M32C_OPERAND_BIT32RNPREFIXED
:
2863 value
= fields
->f_dst32_rn_prefixed_QI
;
2865 case M32C_OPERAND_BIT32RNUNPREFIXED
:
2866 value
= fields
->f_dst32_rn_unprefixed_QI
;
2868 case M32C_OPERAND_BITBASE16_16_S8
:
2869 value
= fields
->f_dsp_16_s8
;
2871 case M32C_OPERAND_BITBASE16_16_U16
:
2872 value
= fields
->f_dsp_16_u16
;
2874 case M32C_OPERAND_BITBASE16_16_U8
:
2875 value
= fields
->f_dsp_16_u8
;
2877 case M32C_OPERAND_BITBASE16_8_U11_S
:
2878 value
= fields
->f_bitbase16_u11_S
;
2880 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
2881 value
= fields
->f_bitbase32_16_s11_unprefixed
;
2883 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
2884 value
= fields
->f_bitbase32_16_s19_unprefixed
;
2886 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
2887 value
= fields
->f_bitbase32_16_u11_unprefixed
;
2889 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
2890 value
= fields
->f_bitbase32_16_u19_unprefixed
;
2892 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
2893 value
= fields
->f_bitbase32_16_u27_unprefixed
;
2895 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
2896 value
= fields
->f_bitbase32_24_s11_prefixed
;
2898 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
2899 value
= fields
->f_bitbase32_24_s19_prefixed
;
2901 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
2902 value
= fields
->f_bitbase32_24_u11_prefixed
;
2904 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
2905 value
= fields
->f_bitbase32_24_u19_prefixed
;
2907 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
2908 value
= fields
->f_bitbase32_24_u27_prefixed
;
2910 case M32C_OPERAND_BITNO16R
:
2911 value
= fields
->f_dsp_16_u8
;
2913 case M32C_OPERAND_BITNO32PREFIXED
:
2914 value
= fields
->f_bitno32_prefixed
;
2916 case M32C_OPERAND_BITNO32UNPREFIXED
:
2917 value
= fields
->f_bitno32_unprefixed
;
2919 case M32C_OPERAND_DSP_10_U6
:
2920 value
= fields
->f_dsp_10_u6
;
2922 case M32C_OPERAND_DSP_16_S16
:
2923 value
= fields
->f_dsp_16_s16
;
2925 case M32C_OPERAND_DSP_16_S8
:
2926 value
= fields
->f_dsp_16_s8
;
2928 case M32C_OPERAND_DSP_16_U16
:
2929 value
= fields
->f_dsp_16_u16
;
2931 case M32C_OPERAND_DSP_16_U20
:
2932 value
= fields
->f_dsp_16_u24
;
2934 case M32C_OPERAND_DSP_16_U24
:
2935 value
= fields
->f_dsp_16_u24
;
2937 case M32C_OPERAND_DSP_16_U8
:
2938 value
= fields
->f_dsp_16_u8
;
2940 case M32C_OPERAND_DSP_24_S16
:
2941 value
= fields
->f_dsp_24_s16
;
2943 case M32C_OPERAND_DSP_24_S8
:
2944 value
= fields
->f_dsp_24_s8
;
2946 case M32C_OPERAND_DSP_24_U16
:
2947 value
= fields
->f_dsp_24_u16
;
2949 case M32C_OPERAND_DSP_24_U20
:
2950 value
= fields
->f_dsp_24_u24
;
2952 case M32C_OPERAND_DSP_24_U24
:
2953 value
= fields
->f_dsp_24_u24
;
2955 case M32C_OPERAND_DSP_24_U8
:
2956 value
= fields
->f_dsp_24_u8
;
2958 case M32C_OPERAND_DSP_32_S16
:
2959 value
= fields
->f_dsp_32_s16
;
2961 case M32C_OPERAND_DSP_32_S8
:
2962 value
= fields
->f_dsp_32_s8
;
2964 case M32C_OPERAND_DSP_32_U16
:
2965 value
= fields
->f_dsp_32_u16
;
2967 case M32C_OPERAND_DSP_32_U20
:
2968 value
= fields
->f_dsp_32_u24
;
2970 case M32C_OPERAND_DSP_32_U24
:
2971 value
= fields
->f_dsp_32_u24
;
2973 case M32C_OPERAND_DSP_32_U8
:
2974 value
= fields
->f_dsp_32_u8
;
2976 case M32C_OPERAND_DSP_40_S16
:
2977 value
= fields
->f_dsp_40_s16
;
2979 case M32C_OPERAND_DSP_40_S8
:
2980 value
= fields
->f_dsp_40_s8
;
2982 case M32C_OPERAND_DSP_40_U16
:
2983 value
= fields
->f_dsp_40_u16
;
2985 case M32C_OPERAND_DSP_40_U24
:
2986 value
= fields
->f_dsp_40_u24
;
2988 case M32C_OPERAND_DSP_40_U8
:
2989 value
= fields
->f_dsp_40_u8
;
2991 case M32C_OPERAND_DSP_48_S16
:
2992 value
= fields
->f_dsp_48_s16
;
2994 case M32C_OPERAND_DSP_48_S8
:
2995 value
= fields
->f_dsp_48_s8
;
2997 case M32C_OPERAND_DSP_48_U16
:
2998 value
= fields
->f_dsp_48_u16
;
3000 case M32C_OPERAND_DSP_48_U24
:
3001 value
= fields
->f_dsp_48_u24
;
3003 case M32C_OPERAND_DSP_48_U8
:
3004 value
= fields
->f_dsp_48_u8
;
3006 case M32C_OPERAND_DSP_8_S24
:
3007 value
= fields
->f_dsp_8_s24
;
3009 case M32C_OPERAND_DSP_8_S8
:
3010 value
= fields
->f_dsp_8_s8
;
3012 case M32C_OPERAND_DSP_8_U16
:
3013 value
= fields
->f_dsp_8_u16
;
3015 case M32C_OPERAND_DSP_8_U24
:
3016 value
= fields
->f_dsp_8_u24
;
3018 case M32C_OPERAND_DSP_8_U6
:
3019 value
= fields
->f_dsp_8_u6
;
3021 case M32C_OPERAND_DSP_8_U8
:
3022 value
= fields
->f_dsp_8_u8
;
3024 case M32C_OPERAND_DST16AN
:
3025 value
= fields
->f_dst16_an
;
3027 case M32C_OPERAND_DST16AN_S
:
3028 value
= fields
->f_dst16_an_s
;
3030 case M32C_OPERAND_DST16ANHI
:
3031 value
= fields
->f_dst16_an
;
3033 case M32C_OPERAND_DST16ANQI
:
3034 value
= fields
->f_dst16_an
;
3036 case M32C_OPERAND_DST16ANQI_S
:
3037 value
= fields
->f_dst16_rn_QI_s
;
3039 case M32C_OPERAND_DST16ANSI
:
3040 value
= fields
->f_dst16_an
;
3042 case M32C_OPERAND_DST16RNEXTQI
:
3043 value
= fields
->f_dst16_rn_ext
;
3045 case M32C_OPERAND_DST16RNHI
:
3046 value
= fields
->f_dst16_rn
;
3048 case M32C_OPERAND_DST16RNQI
:
3049 value
= fields
->f_dst16_rn
;
3051 case M32C_OPERAND_DST16RNQI_S
:
3052 value
= fields
->f_dst16_rn_QI_s
;
3054 case M32C_OPERAND_DST16RNSI
:
3055 value
= fields
->f_dst16_rn
;
3057 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3058 value
= fields
->f_dst32_an_unprefixed
;
3060 case M32C_OPERAND_DST32ANPREFIXED
:
3061 value
= fields
->f_dst32_an_prefixed
;
3063 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3064 value
= fields
->f_dst32_an_prefixed
;
3066 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3067 value
= fields
->f_dst32_an_prefixed
;
3069 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3070 value
= fields
->f_dst32_an_prefixed
;
3072 case M32C_OPERAND_DST32ANUNPREFIXED
:
3073 value
= fields
->f_dst32_an_unprefixed
;
3075 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3076 value
= fields
->f_dst32_an_unprefixed
;
3078 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3079 value
= fields
->f_dst32_an_unprefixed
;
3081 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3082 value
= fields
->f_dst32_an_unprefixed
;
3084 case M32C_OPERAND_DST32R0HI_S
:
3087 case M32C_OPERAND_DST32R0QI_S
:
3090 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3091 value
= fields
->f_dst32_rn_ext_unprefixed
;
3093 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3094 value
= fields
->f_dst32_rn_ext_unprefixed
;
3096 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3097 value
= fields
->f_dst32_rn_prefixed_HI
;
3099 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3100 value
= fields
->f_dst32_rn_prefixed_QI
;
3102 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3103 value
= fields
->f_dst32_rn_prefixed_SI
;
3105 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3106 value
= fields
->f_dst32_rn_unprefixed_HI
;
3108 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3109 value
= fields
->f_dst32_rn_unprefixed_QI
;
3111 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3112 value
= fields
->f_dst32_rn_unprefixed_SI
;
3114 case M32C_OPERAND_G
:
3117 case M32C_OPERAND_IMM_12_S4
:
3118 value
= fields
->f_imm_12_s4
;
3120 case M32C_OPERAND_IMM_12_S4N
:
3121 value
= fields
->f_imm_12_s4
;
3123 case M32C_OPERAND_IMM_13_U3
:
3124 value
= fields
->f_imm_13_u3
;
3126 case M32C_OPERAND_IMM_16_HI
:
3127 value
= fields
->f_dsp_16_s16
;
3129 case M32C_OPERAND_IMM_16_QI
:
3130 value
= fields
->f_dsp_16_s8
;
3132 case M32C_OPERAND_IMM_16_SI
:
3133 value
= fields
->f_dsp_16_s32
;
3135 case M32C_OPERAND_IMM_20_S4
:
3136 value
= fields
->f_imm_20_s4
;
3138 case M32C_OPERAND_IMM_24_HI
:
3139 value
= fields
->f_dsp_24_s16
;
3141 case M32C_OPERAND_IMM_24_QI
:
3142 value
= fields
->f_dsp_24_s8
;
3144 case M32C_OPERAND_IMM_24_SI
:
3145 value
= fields
->f_dsp_24_s32
;
3147 case M32C_OPERAND_IMM_32_HI
:
3148 value
= fields
->f_dsp_32_s16
;
3150 case M32C_OPERAND_IMM_32_QI
:
3151 value
= fields
->f_dsp_32_s8
;
3153 case M32C_OPERAND_IMM_32_SI
:
3154 value
= fields
->f_dsp_32_s32
;
3156 case M32C_OPERAND_IMM_40_HI
:
3157 value
= fields
->f_dsp_40_s16
;
3159 case M32C_OPERAND_IMM_40_QI
:
3160 value
= fields
->f_dsp_40_s8
;
3162 case M32C_OPERAND_IMM_40_SI
:
3163 value
= fields
->f_dsp_40_s32
;
3165 case M32C_OPERAND_IMM_48_HI
:
3166 value
= fields
->f_dsp_48_s16
;
3168 case M32C_OPERAND_IMM_48_QI
:
3169 value
= fields
->f_dsp_48_s8
;
3171 case M32C_OPERAND_IMM_48_SI
:
3172 value
= fields
->f_dsp_48_s32
;
3174 case M32C_OPERAND_IMM_56_HI
:
3175 value
= fields
->f_dsp_56_s16
;
3177 case M32C_OPERAND_IMM_56_QI
:
3178 value
= fields
->f_dsp_56_s8
;
3180 case M32C_OPERAND_IMM_64_HI
:
3181 value
= fields
->f_dsp_64_s16
;
3183 case M32C_OPERAND_IMM_8_HI
:
3184 value
= fields
->f_dsp_8_s16
;
3186 case M32C_OPERAND_IMM_8_QI
:
3187 value
= fields
->f_dsp_8_s8
;
3189 case M32C_OPERAND_IMM_8_S4
:
3190 value
= fields
->f_imm_8_s4
;
3192 case M32C_OPERAND_IMM_8_S4N
:
3193 value
= fields
->f_imm_8_s4
;
3195 case M32C_OPERAND_IMM_SH_12_S4
:
3196 value
= fields
->f_imm_12_s4
;
3198 case M32C_OPERAND_IMM_SH_20_S4
:
3199 value
= fields
->f_imm_20_s4
;
3201 case M32C_OPERAND_IMM_SH_8_S4
:
3202 value
= fields
->f_imm_8_s4
;
3204 case M32C_OPERAND_IMM1_S
:
3205 value
= fields
->f_imm1_S
;
3207 case M32C_OPERAND_IMM3_S
:
3208 value
= fields
->f_imm3_S
;
3210 case M32C_OPERAND_LAB_16_8
:
3211 value
= fields
->f_lab_16_8
;
3213 case M32C_OPERAND_LAB_24_8
:
3214 value
= fields
->f_lab_24_8
;
3216 case M32C_OPERAND_LAB_32_8
:
3217 value
= fields
->f_lab_32_8
;
3219 case M32C_OPERAND_LAB_40_8
:
3220 value
= fields
->f_lab_40_8
;
3222 case M32C_OPERAND_LAB_5_3
:
3223 value
= fields
->f_lab_5_3
;
3225 case M32C_OPERAND_LAB_8_16
:
3226 value
= fields
->f_lab_8_16
;
3228 case M32C_OPERAND_LAB_8_24
:
3229 value
= fields
->f_lab_8_24
;
3231 case M32C_OPERAND_LAB_8_8
:
3232 value
= fields
->f_lab_8_8
;
3234 case M32C_OPERAND_LAB32_JMP_S
:
3235 value
= fields
->f_lab32_jmp_s
;
3237 case M32C_OPERAND_Q
:
3240 case M32C_OPERAND_R0
:
3243 case M32C_OPERAND_R0H
:
3246 case M32C_OPERAND_R0L
:
3249 case M32C_OPERAND_R1
:
3252 case M32C_OPERAND_R1R2R0
:
3255 case M32C_OPERAND_R2
:
3258 case M32C_OPERAND_R2R0
:
3261 case M32C_OPERAND_R3
:
3264 case M32C_OPERAND_R3R1
:
3267 case M32C_OPERAND_REGSETPOP
:
3268 value
= fields
->f_8_8
;
3270 case M32C_OPERAND_REGSETPUSH
:
3271 value
= fields
->f_8_8
;
3273 case M32C_OPERAND_RN16_PUSH_S
:
3274 value
= fields
->f_4_1
;
3276 case M32C_OPERAND_S
:
3279 case M32C_OPERAND_SRC16AN
:
3280 value
= fields
->f_src16_an
;
3282 case M32C_OPERAND_SRC16ANHI
:
3283 value
= fields
->f_src16_an
;
3285 case M32C_OPERAND_SRC16ANQI
:
3286 value
= fields
->f_src16_an
;
3288 case M32C_OPERAND_SRC16RNHI
:
3289 value
= fields
->f_src16_rn
;
3291 case M32C_OPERAND_SRC16RNQI
:
3292 value
= fields
->f_src16_rn
;
3294 case M32C_OPERAND_SRC32ANPREFIXED
:
3295 value
= fields
->f_src32_an_prefixed
;
3297 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3298 value
= fields
->f_src32_an_prefixed
;
3300 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3301 value
= fields
->f_src32_an_prefixed
;
3303 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3304 value
= fields
->f_src32_an_prefixed
;
3306 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3307 value
= fields
->f_src32_an_unprefixed
;
3309 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3310 value
= fields
->f_src32_an_unprefixed
;
3312 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3313 value
= fields
->f_src32_an_unprefixed
;
3315 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3316 value
= fields
->f_src32_an_unprefixed
;
3318 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3319 value
= fields
->f_src32_rn_prefixed_HI
;
3321 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3322 value
= fields
->f_src32_rn_prefixed_QI
;
3324 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3325 value
= fields
->f_src32_rn_prefixed_SI
;
3327 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3328 value
= fields
->f_src32_rn_unprefixed_HI
;
3330 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3331 value
= fields
->f_src32_rn_unprefixed_QI
;
3333 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3334 value
= fields
->f_src32_rn_unprefixed_SI
;
3336 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3337 value
= fields
->f_5_1
;
3339 case M32C_OPERAND_X
:
3342 case M32C_OPERAND_Z
:
3345 case M32C_OPERAND_COND16_16
:
3346 value
= fields
->f_dsp_16_u8
;
3348 case M32C_OPERAND_COND16_24
:
3349 value
= fields
->f_dsp_24_u8
;
3351 case M32C_OPERAND_COND16_32
:
3352 value
= fields
->f_dsp_32_u8
;
3354 case M32C_OPERAND_COND16C
:
3355 value
= fields
->f_cond16
;
3357 case M32C_OPERAND_COND16J
:
3358 value
= fields
->f_cond16
;
3360 case M32C_OPERAND_COND16J5
:
3361 value
= fields
->f_cond16j_5
;
3363 case M32C_OPERAND_COND32
:
3364 value
= fields
->f_cond32
;
3366 case M32C_OPERAND_COND32_16
:
3367 value
= fields
->f_dsp_16_u8
;
3369 case M32C_OPERAND_COND32_24
:
3370 value
= fields
->f_dsp_24_u8
;
3372 case M32C_OPERAND_COND32_32
:
3373 value
= fields
->f_dsp_32_u8
;
3375 case M32C_OPERAND_COND32_40
:
3376 value
= fields
->f_dsp_40_u8
;
3378 case M32C_OPERAND_COND32J
:
3379 value
= fields
->f_cond32j
;
3381 case M32C_OPERAND_CR1_PREFIXED_32
:
3382 value
= fields
->f_21_3
;
3384 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3385 value
= fields
->f_13_3
;
3387 case M32C_OPERAND_CR16
:
3388 value
= fields
->f_9_3
;
3390 case M32C_OPERAND_CR2_32
:
3391 value
= fields
->f_13_3
;
3393 case M32C_OPERAND_CR3_PREFIXED_32
:
3394 value
= fields
->f_21_3
;
3396 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3397 value
= fields
->f_13_3
;
3399 case M32C_OPERAND_FLAGS16
:
3400 value
= fields
->f_9_3
;
3402 case M32C_OPERAND_FLAGS32
:
3403 value
= fields
->f_13_3
;
3405 case M32C_OPERAND_SCCOND32
:
3406 value
= fields
->f_cond16
;
3408 case M32C_OPERAND_SIZE
:
3413 /* xgettext:c-format */
3414 fprintf (stderr
, _("Unrecognized field %d while getting int operand.\n"),
3423 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
3425 const CGEN_FIELDS
* fields
)
3431 case M32C_OPERAND_A0
:
3434 case M32C_OPERAND_A1
:
3437 case M32C_OPERAND_AN16_PUSH_S
:
3438 value
= fields
->f_4_1
;
3440 case M32C_OPERAND_BIT16AN
:
3441 value
= fields
->f_dst16_an
;
3443 case M32C_OPERAND_BIT16RN
:
3444 value
= fields
->f_dst16_rn
;
3446 case M32C_OPERAND_BIT32ANPREFIXED
:
3447 value
= fields
->f_dst32_an_prefixed
;
3449 case M32C_OPERAND_BIT32ANUNPREFIXED
:
3450 value
= fields
->f_dst32_an_unprefixed
;
3452 case M32C_OPERAND_BIT32RNPREFIXED
:
3453 value
= fields
->f_dst32_rn_prefixed_QI
;
3455 case M32C_OPERAND_BIT32RNUNPREFIXED
:
3456 value
= fields
->f_dst32_rn_unprefixed_QI
;
3458 case M32C_OPERAND_BITBASE16_16_S8
:
3459 value
= fields
->f_dsp_16_s8
;
3461 case M32C_OPERAND_BITBASE16_16_U16
:
3462 value
= fields
->f_dsp_16_u16
;
3464 case M32C_OPERAND_BITBASE16_16_U8
:
3465 value
= fields
->f_dsp_16_u8
;
3467 case M32C_OPERAND_BITBASE16_8_U11_S
:
3468 value
= fields
->f_bitbase16_u11_S
;
3470 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
3471 value
= fields
->f_bitbase32_16_s11_unprefixed
;
3473 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
3474 value
= fields
->f_bitbase32_16_s19_unprefixed
;
3476 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
3477 value
= fields
->f_bitbase32_16_u11_unprefixed
;
3479 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
3480 value
= fields
->f_bitbase32_16_u19_unprefixed
;
3482 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
3483 value
= fields
->f_bitbase32_16_u27_unprefixed
;
3485 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
3486 value
= fields
->f_bitbase32_24_s11_prefixed
;
3488 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
3489 value
= fields
->f_bitbase32_24_s19_prefixed
;
3491 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
3492 value
= fields
->f_bitbase32_24_u11_prefixed
;
3494 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
3495 value
= fields
->f_bitbase32_24_u19_prefixed
;
3497 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
3498 value
= fields
->f_bitbase32_24_u27_prefixed
;
3500 case M32C_OPERAND_BITNO16R
:
3501 value
= fields
->f_dsp_16_u8
;
3503 case M32C_OPERAND_BITNO32PREFIXED
:
3504 value
= fields
->f_bitno32_prefixed
;
3506 case M32C_OPERAND_BITNO32UNPREFIXED
:
3507 value
= fields
->f_bitno32_unprefixed
;
3509 case M32C_OPERAND_DSP_10_U6
:
3510 value
= fields
->f_dsp_10_u6
;
3512 case M32C_OPERAND_DSP_16_S16
:
3513 value
= fields
->f_dsp_16_s16
;
3515 case M32C_OPERAND_DSP_16_S8
:
3516 value
= fields
->f_dsp_16_s8
;
3518 case M32C_OPERAND_DSP_16_U16
:
3519 value
= fields
->f_dsp_16_u16
;
3521 case M32C_OPERAND_DSP_16_U20
:
3522 value
= fields
->f_dsp_16_u24
;
3524 case M32C_OPERAND_DSP_16_U24
:
3525 value
= fields
->f_dsp_16_u24
;
3527 case M32C_OPERAND_DSP_16_U8
:
3528 value
= fields
->f_dsp_16_u8
;
3530 case M32C_OPERAND_DSP_24_S16
:
3531 value
= fields
->f_dsp_24_s16
;
3533 case M32C_OPERAND_DSP_24_S8
:
3534 value
= fields
->f_dsp_24_s8
;
3536 case M32C_OPERAND_DSP_24_U16
:
3537 value
= fields
->f_dsp_24_u16
;
3539 case M32C_OPERAND_DSP_24_U20
:
3540 value
= fields
->f_dsp_24_u24
;
3542 case M32C_OPERAND_DSP_24_U24
:
3543 value
= fields
->f_dsp_24_u24
;
3545 case M32C_OPERAND_DSP_24_U8
:
3546 value
= fields
->f_dsp_24_u8
;
3548 case M32C_OPERAND_DSP_32_S16
:
3549 value
= fields
->f_dsp_32_s16
;
3551 case M32C_OPERAND_DSP_32_S8
:
3552 value
= fields
->f_dsp_32_s8
;
3554 case M32C_OPERAND_DSP_32_U16
:
3555 value
= fields
->f_dsp_32_u16
;
3557 case M32C_OPERAND_DSP_32_U20
:
3558 value
= fields
->f_dsp_32_u24
;
3560 case M32C_OPERAND_DSP_32_U24
:
3561 value
= fields
->f_dsp_32_u24
;
3563 case M32C_OPERAND_DSP_32_U8
:
3564 value
= fields
->f_dsp_32_u8
;
3566 case M32C_OPERAND_DSP_40_S16
:
3567 value
= fields
->f_dsp_40_s16
;
3569 case M32C_OPERAND_DSP_40_S8
:
3570 value
= fields
->f_dsp_40_s8
;
3572 case M32C_OPERAND_DSP_40_U16
:
3573 value
= fields
->f_dsp_40_u16
;
3575 case M32C_OPERAND_DSP_40_U24
:
3576 value
= fields
->f_dsp_40_u24
;
3578 case M32C_OPERAND_DSP_40_U8
:
3579 value
= fields
->f_dsp_40_u8
;
3581 case M32C_OPERAND_DSP_48_S16
:
3582 value
= fields
->f_dsp_48_s16
;
3584 case M32C_OPERAND_DSP_48_S8
:
3585 value
= fields
->f_dsp_48_s8
;
3587 case M32C_OPERAND_DSP_48_U16
:
3588 value
= fields
->f_dsp_48_u16
;
3590 case M32C_OPERAND_DSP_48_U24
:
3591 value
= fields
->f_dsp_48_u24
;
3593 case M32C_OPERAND_DSP_48_U8
:
3594 value
= fields
->f_dsp_48_u8
;
3596 case M32C_OPERAND_DSP_8_S24
:
3597 value
= fields
->f_dsp_8_s24
;
3599 case M32C_OPERAND_DSP_8_S8
:
3600 value
= fields
->f_dsp_8_s8
;
3602 case M32C_OPERAND_DSP_8_U16
:
3603 value
= fields
->f_dsp_8_u16
;
3605 case M32C_OPERAND_DSP_8_U24
:
3606 value
= fields
->f_dsp_8_u24
;
3608 case M32C_OPERAND_DSP_8_U6
:
3609 value
= fields
->f_dsp_8_u6
;
3611 case M32C_OPERAND_DSP_8_U8
:
3612 value
= fields
->f_dsp_8_u8
;
3614 case M32C_OPERAND_DST16AN
:
3615 value
= fields
->f_dst16_an
;
3617 case M32C_OPERAND_DST16AN_S
:
3618 value
= fields
->f_dst16_an_s
;
3620 case M32C_OPERAND_DST16ANHI
:
3621 value
= fields
->f_dst16_an
;
3623 case M32C_OPERAND_DST16ANQI
:
3624 value
= fields
->f_dst16_an
;
3626 case M32C_OPERAND_DST16ANQI_S
:
3627 value
= fields
->f_dst16_rn_QI_s
;
3629 case M32C_OPERAND_DST16ANSI
:
3630 value
= fields
->f_dst16_an
;
3632 case M32C_OPERAND_DST16RNEXTQI
:
3633 value
= fields
->f_dst16_rn_ext
;
3635 case M32C_OPERAND_DST16RNHI
:
3636 value
= fields
->f_dst16_rn
;
3638 case M32C_OPERAND_DST16RNQI
:
3639 value
= fields
->f_dst16_rn
;
3641 case M32C_OPERAND_DST16RNQI_S
:
3642 value
= fields
->f_dst16_rn_QI_s
;
3644 case M32C_OPERAND_DST16RNSI
:
3645 value
= fields
->f_dst16_rn
;
3647 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
3648 value
= fields
->f_dst32_an_unprefixed
;
3650 case M32C_OPERAND_DST32ANPREFIXED
:
3651 value
= fields
->f_dst32_an_prefixed
;
3653 case M32C_OPERAND_DST32ANPREFIXEDHI
:
3654 value
= fields
->f_dst32_an_prefixed
;
3656 case M32C_OPERAND_DST32ANPREFIXEDQI
:
3657 value
= fields
->f_dst32_an_prefixed
;
3659 case M32C_OPERAND_DST32ANPREFIXEDSI
:
3660 value
= fields
->f_dst32_an_prefixed
;
3662 case M32C_OPERAND_DST32ANUNPREFIXED
:
3663 value
= fields
->f_dst32_an_unprefixed
;
3665 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
3666 value
= fields
->f_dst32_an_unprefixed
;
3668 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
3669 value
= fields
->f_dst32_an_unprefixed
;
3671 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
3672 value
= fields
->f_dst32_an_unprefixed
;
3674 case M32C_OPERAND_DST32R0HI_S
:
3677 case M32C_OPERAND_DST32R0QI_S
:
3680 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
3681 value
= fields
->f_dst32_rn_ext_unprefixed
;
3683 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
3684 value
= fields
->f_dst32_rn_ext_unprefixed
;
3686 case M32C_OPERAND_DST32RNPREFIXEDHI
:
3687 value
= fields
->f_dst32_rn_prefixed_HI
;
3689 case M32C_OPERAND_DST32RNPREFIXEDQI
:
3690 value
= fields
->f_dst32_rn_prefixed_QI
;
3692 case M32C_OPERAND_DST32RNPREFIXEDSI
:
3693 value
= fields
->f_dst32_rn_prefixed_SI
;
3695 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
3696 value
= fields
->f_dst32_rn_unprefixed_HI
;
3698 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
3699 value
= fields
->f_dst32_rn_unprefixed_QI
;
3701 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
3702 value
= fields
->f_dst32_rn_unprefixed_SI
;
3704 case M32C_OPERAND_G
:
3707 case M32C_OPERAND_IMM_12_S4
:
3708 value
= fields
->f_imm_12_s4
;
3710 case M32C_OPERAND_IMM_12_S4N
:
3711 value
= fields
->f_imm_12_s4
;
3713 case M32C_OPERAND_IMM_13_U3
:
3714 value
= fields
->f_imm_13_u3
;
3716 case M32C_OPERAND_IMM_16_HI
:
3717 value
= fields
->f_dsp_16_s16
;
3719 case M32C_OPERAND_IMM_16_QI
:
3720 value
= fields
->f_dsp_16_s8
;
3722 case M32C_OPERAND_IMM_16_SI
:
3723 value
= fields
->f_dsp_16_s32
;
3725 case M32C_OPERAND_IMM_20_S4
:
3726 value
= fields
->f_imm_20_s4
;
3728 case M32C_OPERAND_IMM_24_HI
:
3729 value
= fields
->f_dsp_24_s16
;
3731 case M32C_OPERAND_IMM_24_QI
:
3732 value
= fields
->f_dsp_24_s8
;
3734 case M32C_OPERAND_IMM_24_SI
:
3735 value
= fields
->f_dsp_24_s32
;
3737 case M32C_OPERAND_IMM_32_HI
:
3738 value
= fields
->f_dsp_32_s16
;
3740 case M32C_OPERAND_IMM_32_QI
:
3741 value
= fields
->f_dsp_32_s8
;
3743 case M32C_OPERAND_IMM_32_SI
:
3744 value
= fields
->f_dsp_32_s32
;
3746 case M32C_OPERAND_IMM_40_HI
:
3747 value
= fields
->f_dsp_40_s16
;
3749 case M32C_OPERAND_IMM_40_QI
:
3750 value
= fields
->f_dsp_40_s8
;
3752 case M32C_OPERAND_IMM_40_SI
:
3753 value
= fields
->f_dsp_40_s32
;
3755 case M32C_OPERAND_IMM_48_HI
:
3756 value
= fields
->f_dsp_48_s16
;
3758 case M32C_OPERAND_IMM_48_QI
:
3759 value
= fields
->f_dsp_48_s8
;
3761 case M32C_OPERAND_IMM_48_SI
:
3762 value
= fields
->f_dsp_48_s32
;
3764 case M32C_OPERAND_IMM_56_HI
:
3765 value
= fields
->f_dsp_56_s16
;
3767 case M32C_OPERAND_IMM_56_QI
:
3768 value
= fields
->f_dsp_56_s8
;
3770 case M32C_OPERAND_IMM_64_HI
:
3771 value
= fields
->f_dsp_64_s16
;
3773 case M32C_OPERAND_IMM_8_HI
:
3774 value
= fields
->f_dsp_8_s16
;
3776 case M32C_OPERAND_IMM_8_QI
:
3777 value
= fields
->f_dsp_8_s8
;
3779 case M32C_OPERAND_IMM_8_S4
:
3780 value
= fields
->f_imm_8_s4
;
3782 case M32C_OPERAND_IMM_8_S4N
:
3783 value
= fields
->f_imm_8_s4
;
3785 case M32C_OPERAND_IMM_SH_12_S4
:
3786 value
= fields
->f_imm_12_s4
;
3788 case M32C_OPERAND_IMM_SH_20_S4
:
3789 value
= fields
->f_imm_20_s4
;
3791 case M32C_OPERAND_IMM_SH_8_S4
:
3792 value
= fields
->f_imm_8_s4
;
3794 case M32C_OPERAND_IMM1_S
:
3795 value
= fields
->f_imm1_S
;
3797 case M32C_OPERAND_IMM3_S
:
3798 value
= fields
->f_imm3_S
;
3800 case M32C_OPERAND_LAB_16_8
:
3801 value
= fields
->f_lab_16_8
;
3803 case M32C_OPERAND_LAB_24_8
:
3804 value
= fields
->f_lab_24_8
;
3806 case M32C_OPERAND_LAB_32_8
:
3807 value
= fields
->f_lab_32_8
;
3809 case M32C_OPERAND_LAB_40_8
:
3810 value
= fields
->f_lab_40_8
;
3812 case M32C_OPERAND_LAB_5_3
:
3813 value
= fields
->f_lab_5_3
;
3815 case M32C_OPERAND_LAB_8_16
:
3816 value
= fields
->f_lab_8_16
;
3818 case M32C_OPERAND_LAB_8_24
:
3819 value
= fields
->f_lab_8_24
;
3821 case M32C_OPERAND_LAB_8_8
:
3822 value
= fields
->f_lab_8_8
;
3824 case M32C_OPERAND_LAB32_JMP_S
:
3825 value
= fields
->f_lab32_jmp_s
;
3827 case M32C_OPERAND_Q
:
3830 case M32C_OPERAND_R0
:
3833 case M32C_OPERAND_R0H
:
3836 case M32C_OPERAND_R0L
:
3839 case M32C_OPERAND_R1
:
3842 case M32C_OPERAND_R1R2R0
:
3845 case M32C_OPERAND_R2
:
3848 case M32C_OPERAND_R2R0
:
3851 case M32C_OPERAND_R3
:
3854 case M32C_OPERAND_R3R1
:
3857 case M32C_OPERAND_REGSETPOP
:
3858 value
= fields
->f_8_8
;
3860 case M32C_OPERAND_REGSETPUSH
:
3861 value
= fields
->f_8_8
;
3863 case M32C_OPERAND_RN16_PUSH_S
:
3864 value
= fields
->f_4_1
;
3866 case M32C_OPERAND_S
:
3869 case M32C_OPERAND_SRC16AN
:
3870 value
= fields
->f_src16_an
;
3872 case M32C_OPERAND_SRC16ANHI
:
3873 value
= fields
->f_src16_an
;
3875 case M32C_OPERAND_SRC16ANQI
:
3876 value
= fields
->f_src16_an
;
3878 case M32C_OPERAND_SRC16RNHI
:
3879 value
= fields
->f_src16_rn
;
3881 case M32C_OPERAND_SRC16RNQI
:
3882 value
= fields
->f_src16_rn
;
3884 case M32C_OPERAND_SRC32ANPREFIXED
:
3885 value
= fields
->f_src32_an_prefixed
;
3887 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
3888 value
= fields
->f_src32_an_prefixed
;
3890 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
3891 value
= fields
->f_src32_an_prefixed
;
3893 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
3894 value
= fields
->f_src32_an_prefixed
;
3896 case M32C_OPERAND_SRC32ANUNPREFIXED
:
3897 value
= fields
->f_src32_an_unprefixed
;
3899 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
3900 value
= fields
->f_src32_an_unprefixed
;
3902 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
3903 value
= fields
->f_src32_an_unprefixed
;
3905 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
3906 value
= fields
->f_src32_an_unprefixed
;
3908 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
3909 value
= fields
->f_src32_rn_prefixed_HI
;
3911 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
3912 value
= fields
->f_src32_rn_prefixed_QI
;
3914 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
3915 value
= fields
->f_src32_rn_prefixed_SI
;
3917 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
3918 value
= fields
->f_src32_rn_unprefixed_HI
;
3920 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
3921 value
= fields
->f_src32_rn_unprefixed_QI
;
3923 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
3924 value
= fields
->f_src32_rn_unprefixed_SI
;
3926 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
3927 value
= fields
->f_5_1
;
3929 case M32C_OPERAND_X
:
3932 case M32C_OPERAND_Z
:
3935 case M32C_OPERAND_COND16_16
:
3936 value
= fields
->f_dsp_16_u8
;
3938 case M32C_OPERAND_COND16_24
:
3939 value
= fields
->f_dsp_24_u8
;
3941 case M32C_OPERAND_COND16_32
:
3942 value
= fields
->f_dsp_32_u8
;
3944 case M32C_OPERAND_COND16C
:
3945 value
= fields
->f_cond16
;
3947 case M32C_OPERAND_COND16J
:
3948 value
= fields
->f_cond16
;
3950 case M32C_OPERAND_COND16J5
:
3951 value
= fields
->f_cond16j_5
;
3953 case M32C_OPERAND_COND32
:
3954 value
= fields
->f_cond32
;
3956 case M32C_OPERAND_COND32_16
:
3957 value
= fields
->f_dsp_16_u8
;
3959 case M32C_OPERAND_COND32_24
:
3960 value
= fields
->f_dsp_24_u8
;
3962 case M32C_OPERAND_COND32_32
:
3963 value
= fields
->f_dsp_32_u8
;
3965 case M32C_OPERAND_COND32_40
:
3966 value
= fields
->f_dsp_40_u8
;
3968 case M32C_OPERAND_COND32J
:
3969 value
= fields
->f_cond32j
;
3971 case M32C_OPERAND_CR1_PREFIXED_32
:
3972 value
= fields
->f_21_3
;
3974 case M32C_OPERAND_CR1_UNPREFIXED_32
:
3975 value
= fields
->f_13_3
;
3977 case M32C_OPERAND_CR16
:
3978 value
= fields
->f_9_3
;
3980 case M32C_OPERAND_CR2_32
:
3981 value
= fields
->f_13_3
;
3983 case M32C_OPERAND_CR3_PREFIXED_32
:
3984 value
= fields
->f_21_3
;
3986 case M32C_OPERAND_CR3_UNPREFIXED_32
:
3987 value
= fields
->f_13_3
;
3989 case M32C_OPERAND_FLAGS16
:
3990 value
= fields
->f_9_3
;
3992 case M32C_OPERAND_FLAGS32
:
3993 value
= fields
->f_13_3
;
3995 case M32C_OPERAND_SCCOND32
:
3996 value
= fields
->f_cond16
;
3998 case M32C_OPERAND_SIZE
:
4003 /* xgettext:c-format */
4004 fprintf (stderr
, _("Unrecognized field %d while getting vma operand.\n"),
4012 void m32c_cgen_set_int_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, int);
4013 void m32c_cgen_set_vma_operand (CGEN_CPU_DESC
, int, CGEN_FIELDS
*, bfd_vma
);
4015 /* Stuffing values in cgen_fields is handled by a collection of functions.
4016 They are distinguished by the type of the VALUE argument they accept.
4017 TODO: floating point, inlining support, remove cases where argument type
4021 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4023 CGEN_FIELDS
* fields
,
4028 case M32C_OPERAND_A0
:
4030 case M32C_OPERAND_A1
:
4032 case M32C_OPERAND_AN16_PUSH_S
:
4033 fields
->f_4_1
= value
;
4035 case M32C_OPERAND_BIT16AN
:
4036 fields
->f_dst16_an
= value
;
4038 case M32C_OPERAND_BIT16RN
:
4039 fields
->f_dst16_rn
= value
;
4041 case M32C_OPERAND_BIT32ANPREFIXED
:
4042 fields
->f_dst32_an_prefixed
= value
;
4044 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4045 fields
->f_dst32_an_unprefixed
= value
;
4047 case M32C_OPERAND_BIT32RNPREFIXED
:
4048 fields
->f_dst32_rn_prefixed_QI
= value
;
4050 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4051 fields
->f_dst32_rn_unprefixed_QI
= value
;
4053 case M32C_OPERAND_BITBASE16_16_S8
:
4054 fields
->f_dsp_16_s8
= value
;
4056 case M32C_OPERAND_BITBASE16_16_U16
:
4057 fields
->f_dsp_16_u16
= value
;
4059 case M32C_OPERAND_BITBASE16_16_U8
:
4060 fields
->f_dsp_16_u8
= value
;
4062 case M32C_OPERAND_BITBASE16_8_U11_S
:
4063 fields
->f_bitbase16_u11_S
= value
;
4065 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4066 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4068 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4069 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4071 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4072 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4074 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4075 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4077 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4078 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4080 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4081 fields
->f_bitbase32_24_s11_prefixed
= value
;
4083 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4084 fields
->f_bitbase32_24_s19_prefixed
= value
;
4086 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4087 fields
->f_bitbase32_24_u11_prefixed
= value
;
4089 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4090 fields
->f_bitbase32_24_u19_prefixed
= value
;
4092 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4093 fields
->f_bitbase32_24_u27_prefixed
= value
;
4095 case M32C_OPERAND_BITNO16R
:
4096 fields
->f_dsp_16_u8
= value
;
4098 case M32C_OPERAND_BITNO32PREFIXED
:
4099 fields
->f_bitno32_prefixed
= value
;
4101 case M32C_OPERAND_BITNO32UNPREFIXED
:
4102 fields
->f_bitno32_unprefixed
= value
;
4104 case M32C_OPERAND_DSP_10_U6
:
4105 fields
->f_dsp_10_u6
= value
;
4107 case M32C_OPERAND_DSP_16_S16
:
4108 fields
->f_dsp_16_s16
= value
;
4110 case M32C_OPERAND_DSP_16_S8
:
4111 fields
->f_dsp_16_s8
= value
;
4113 case M32C_OPERAND_DSP_16_U16
:
4114 fields
->f_dsp_16_u16
= value
;
4116 case M32C_OPERAND_DSP_16_U20
:
4117 fields
->f_dsp_16_u24
= value
;
4119 case M32C_OPERAND_DSP_16_U24
:
4120 fields
->f_dsp_16_u24
= value
;
4122 case M32C_OPERAND_DSP_16_U8
:
4123 fields
->f_dsp_16_u8
= value
;
4125 case M32C_OPERAND_DSP_24_S16
:
4126 fields
->f_dsp_24_s16
= value
;
4128 case M32C_OPERAND_DSP_24_S8
:
4129 fields
->f_dsp_24_s8
= value
;
4131 case M32C_OPERAND_DSP_24_U16
:
4132 fields
->f_dsp_24_u16
= value
;
4134 case M32C_OPERAND_DSP_24_U20
:
4135 fields
->f_dsp_24_u24
= value
;
4137 case M32C_OPERAND_DSP_24_U24
:
4138 fields
->f_dsp_24_u24
= value
;
4140 case M32C_OPERAND_DSP_24_U8
:
4141 fields
->f_dsp_24_u8
= value
;
4143 case M32C_OPERAND_DSP_32_S16
:
4144 fields
->f_dsp_32_s16
= value
;
4146 case M32C_OPERAND_DSP_32_S8
:
4147 fields
->f_dsp_32_s8
= value
;
4149 case M32C_OPERAND_DSP_32_U16
:
4150 fields
->f_dsp_32_u16
= value
;
4152 case M32C_OPERAND_DSP_32_U20
:
4153 fields
->f_dsp_32_u24
= value
;
4155 case M32C_OPERAND_DSP_32_U24
:
4156 fields
->f_dsp_32_u24
= value
;
4158 case M32C_OPERAND_DSP_32_U8
:
4159 fields
->f_dsp_32_u8
= value
;
4161 case M32C_OPERAND_DSP_40_S16
:
4162 fields
->f_dsp_40_s16
= value
;
4164 case M32C_OPERAND_DSP_40_S8
:
4165 fields
->f_dsp_40_s8
= value
;
4167 case M32C_OPERAND_DSP_40_U16
:
4168 fields
->f_dsp_40_u16
= value
;
4170 case M32C_OPERAND_DSP_40_U24
:
4171 fields
->f_dsp_40_u24
= value
;
4173 case M32C_OPERAND_DSP_40_U8
:
4174 fields
->f_dsp_40_u8
= value
;
4176 case M32C_OPERAND_DSP_48_S16
:
4177 fields
->f_dsp_48_s16
= value
;
4179 case M32C_OPERAND_DSP_48_S8
:
4180 fields
->f_dsp_48_s8
= value
;
4182 case M32C_OPERAND_DSP_48_U16
:
4183 fields
->f_dsp_48_u16
= value
;
4185 case M32C_OPERAND_DSP_48_U24
:
4186 fields
->f_dsp_48_u24
= value
;
4188 case M32C_OPERAND_DSP_48_U8
:
4189 fields
->f_dsp_48_u8
= value
;
4191 case M32C_OPERAND_DSP_8_S24
:
4192 fields
->f_dsp_8_s24
= value
;
4194 case M32C_OPERAND_DSP_8_S8
:
4195 fields
->f_dsp_8_s8
= value
;
4197 case M32C_OPERAND_DSP_8_U16
:
4198 fields
->f_dsp_8_u16
= value
;
4200 case M32C_OPERAND_DSP_8_U24
:
4201 fields
->f_dsp_8_u24
= value
;
4203 case M32C_OPERAND_DSP_8_U6
:
4204 fields
->f_dsp_8_u6
= value
;
4206 case M32C_OPERAND_DSP_8_U8
:
4207 fields
->f_dsp_8_u8
= value
;
4209 case M32C_OPERAND_DST16AN
:
4210 fields
->f_dst16_an
= value
;
4212 case M32C_OPERAND_DST16AN_S
:
4213 fields
->f_dst16_an_s
= value
;
4215 case M32C_OPERAND_DST16ANHI
:
4216 fields
->f_dst16_an
= value
;
4218 case M32C_OPERAND_DST16ANQI
:
4219 fields
->f_dst16_an
= value
;
4221 case M32C_OPERAND_DST16ANQI_S
:
4222 fields
->f_dst16_rn_QI_s
= value
;
4224 case M32C_OPERAND_DST16ANSI
:
4225 fields
->f_dst16_an
= value
;
4227 case M32C_OPERAND_DST16RNEXTQI
:
4228 fields
->f_dst16_rn_ext
= value
;
4230 case M32C_OPERAND_DST16RNHI
:
4231 fields
->f_dst16_rn
= value
;
4233 case M32C_OPERAND_DST16RNQI
:
4234 fields
->f_dst16_rn
= value
;
4236 case M32C_OPERAND_DST16RNQI_S
:
4237 fields
->f_dst16_rn_QI_s
= value
;
4239 case M32C_OPERAND_DST16RNSI
:
4240 fields
->f_dst16_rn
= value
;
4242 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4243 fields
->f_dst32_an_unprefixed
= value
;
4245 case M32C_OPERAND_DST32ANPREFIXED
:
4246 fields
->f_dst32_an_prefixed
= value
;
4248 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4249 fields
->f_dst32_an_prefixed
= value
;
4251 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4252 fields
->f_dst32_an_prefixed
= value
;
4254 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4255 fields
->f_dst32_an_prefixed
= value
;
4257 case M32C_OPERAND_DST32ANUNPREFIXED
:
4258 fields
->f_dst32_an_unprefixed
= value
;
4260 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4261 fields
->f_dst32_an_unprefixed
= value
;
4263 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4264 fields
->f_dst32_an_unprefixed
= value
;
4266 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4267 fields
->f_dst32_an_unprefixed
= value
;
4269 case M32C_OPERAND_DST32R0HI_S
:
4271 case M32C_OPERAND_DST32R0QI_S
:
4273 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4274 fields
->f_dst32_rn_ext_unprefixed
= value
;
4276 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4277 fields
->f_dst32_rn_ext_unprefixed
= value
;
4279 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4280 fields
->f_dst32_rn_prefixed_HI
= value
;
4282 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4283 fields
->f_dst32_rn_prefixed_QI
= value
;
4285 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4286 fields
->f_dst32_rn_prefixed_SI
= value
;
4288 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4289 fields
->f_dst32_rn_unprefixed_HI
= value
;
4291 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4292 fields
->f_dst32_rn_unprefixed_QI
= value
;
4294 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4295 fields
->f_dst32_rn_unprefixed_SI
= value
;
4297 case M32C_OPERAND_G
:
4299 case M32C_OPERAND_IMM_12_S4
:
4300 fields
->f_imm_12_s4
= value
;
4302 case M32C_OPERAND_IMM_12_S4N
:
4303 fields
->f_imm_12_s4
= value
;
4305 case M32C_OPERAND_IMM_13_U3
:
4306 fields
->f_imm_13_u3
= value
;
4308 case M32C_OPERAND_IMM_16_HI
:
4309 fields
->f_dsp_16_s16
= value
;
4311 case M32C_OPERAND_IMM_16_QI
:
4312 fields
->f_dsp_16_s8
= value
;
4314 case M32C_OPERAND_IMM_16_SI
:
4315 fields
->f_dsp_16_s32
= value
;
4317 case M32C_OPERAND_IMM_20_S4
:
4318 fields
->f_imm_20_s4
= value
;
4320 case M32C_OPERAND_IMM_24_HI
:
4321 fields
->f_dsp_24_s16
= value
;
4323 case M32C_OPERAND_IMM_24_QI
:
4324 fields
->f_dsp_24_s8
= value
;
4326 case M32C_OPERAND_IMM_24_SI
:
4327 fields
->f_dsp_24_s32
= value
;
4329 case M32C_OPERAND_IMM_32_HI
:
4330 fields
->f_dsp_32_s16
= value
;
4332 case M32C_OPERAND_IMM_32_QI
:
4333 fields
->f_dsp_32_s8
= value
;
4335 case M32C_OPERAND_IMM_32_SI
:
4336 fields
->f_dsp_32_s32
= value
;
4338 case M32C_OPERAND_IMM_40_HI
:
4339 fields
->f_dsp_40_s16
= value
;
4341 case M32C_OPERAND_IMM_40_QI
:
4342 fields
->f_dsp_40_s8
= value
;
4344 case M32C_OPERAND_IMM_40_SI
:
4345 fields
->f_dsp_40_s32
= value
;
4347 case M32C_OPERAND_IMM_48_HI
:
4348 fields
->f_dsp_48_s16
= value
;
4350 case M32C_OPERAND_IMM_48_QI
:
4351 fields
->f_dsp_48_s8
= value
;
4353 case M32C_OPERAND_IMM_48_SI
:
4354 fields
->f_dsp_48_s32
= value
;
4356 case M32C_OPERAND_IMM_56_HI
:
4357 fields
->f_dsp_56_s16
= value
;
4359 case M32C_OPERAND_IMM_56_QI
:
4360 fields
->f_dsp_56_s8
= value
;
4362 case M32C_OPERAND_IMM_64_HI
:
4363 fields
->f_dsp_64_s16
= value
;
4365 case M32C_OPERAND_IMM_8_HI
:
4366 fields
->f_dsp_8_s16
= value
;
4368 case M32C_OPERAND_IMM_8_QI
:
4369 fields
->f_dsp_8_s8
= value
;
4371 case M32C_OPERAND_IMM_8_S4
:
4372 fields
->f_imm_8_s4
= value
;
4374 case M32C_OPERAND_IMM_8_S4N
:
4375 fields
->f_imm_8_s4
= value
;
4377 case M32C_OPERAND_IMM_SH_12_S4
:
4378 fields
->f_imm_12_s4
= value
;
4380 case M32C_OPERAND_IMM_SH_20_S4
:
4381 fields
->f_imm_20_s4
= value
;
4383 case M32C_OPERAND_IMM_SH_8_S4
:
4384 fields
->f_imm_8_s4
= value
;
4386 case M32C_OPERAND_IMM1_S
:
4387 fields
->f_imm1_S
= value
;
4389 case M32C_OPERAND_IMM3_S
:
4390 fields
->f_imm3_S
= value
;
4392 case M32C_OPERAND_LAB_16_8
:
4393 fields
->f_lab_16_8
= value
;
4395 case M32C_OPERAND_LAB_24_8
:
4396 fields
->f_lab_24_8
= value
;
4398 case M32C_OPERAND_LAB_32_8
:
4399 fields
->f_lab_32_8
= value
;
4401 case M32C_OPERAND_LAB_40_8
:
4402 fields
->f_lab_40_8
= value
;
4404 case M32C_OPERAND_LAB_5_3
:
4405 fields
->f_lab_5_3
= value
;
4407 case M32C_OPERAND_LAB_8_16
:
4408 fields
->f_lab_8_16
= value
;
4410 case M32C_OPERAND_LAB_8_24
:
4411 fields
->f_lab_8_24
= value
;
4413 case M32C_OPERAND_LAB_8_8
:
4414 fields
->f_lab_8_8
= value
;
4416 case M32C_OPERAND_LAB32_JMP_S
:
4417 fields
->f_lab32_jmp_s
= value
;
4419 case M32C_OPERAND_Q
:
4421 case M32C_OPERAND_R0
:
4423 case M32C_OPERAND_R0H
:
4425 case M32C_OPERAND_R0L
:
4427 case M32C_OPERAND_R1
:
4429 case M32C_OPERAND_R1R2R0
:
4431 case M32C_OPERAND_R2
:
4433 case M32C_OPERAND_R2R0
:
4435 case M32C_OPERAND_R3
:
4437 case M32C_OPERAND_R3R1
:
4439 case M32C_OPERAND_REGSETPOP
:
4440 fields
->f_8_8
= value
;
4442 case M32C_OPERAND_REGSETPUSH
:
4443 fields
->f_8_8
= value
;
4445 case M32C_OPERAND_RN16_PUSH_S
:
4446 fields
->f_4_1
= value
;
4448 case M32C_OPERAND_S
:
4450 case M32C_OPERAND_SRC16AN
:
4451 fields
->f_src16_an
= value
;
4453 case M32C_OPERAND_SRC16ANHI
:
4454 fields
->f_src16_an
= value
;
4456 case M32C_OPERAND_SRC16ANQI
:
4457 fields
->f_src16_an
= value
;
4459 case M32C_OPERAND_SRC16RNHI
:
4460 fields
->f_src16_rn
= value
;
4462 case M32C_OPERAND_SRC16RNQI
:
4463 fields
->f_src16_rn
= value
;
4465 case M32C_OPERAND_SRC32ANPREFIXED
:
4466 fields
->f_src32_an_prefixed
= value
;
4468 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
4469 fields
->f_src32_an_prefixed
= value
;
4471 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
4472 fields
->f_src32_an_prefixed
= value
;
4474 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
4475 fields
->f_src32_an_prefixed
= value
;
4477 case M32C_OPERAND_SRC32ANUNPREFIXED
:
4478 fields
->f_src32_an_unprefixed
= value
;
4480 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
4481 fields
->f_src32_an_unprefixed
= value
;
4483 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
4484 fields
->f_src32_an_unprefixed
= value
;
4486 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
4487 fields
->f_src32_an_unprefixed
= value
;
4489 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
4490 fields
->f_src32_rn_prefixed_HI
= value
;
4492 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
4493 fields
->f_src32_rn_prefixed_QI
= value
;
4495 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
4496 fields
->f_src32_rn_prefixed_SI
= value
;
4498 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
4499 fields
->f_src32_rn_unprefixed_HI
= value
;
4501 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
4502 fields
->f_src32_rn_unprefixed_QI
= value
;
4504 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
4505 fields
->f_src32_rn_unprefixed_SI
= value
;
4507 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
4508 fields
->f_5_1
= value
;
4510 case M32C_OPERAND_X
:
4512 case M32C_OPERAND_Z
:
4514 case M32C_OPERAND_COND16_16
:
4515 fields
->f_dsp_16_u8
= value
;
4517 case M32C_OPERAND_COND16_24
:
4518 fields
->f_dsp_24_u8
= value
;
4520 case M32C_OPERAND_COND16_32
:
4521 fields
->f_dsp_32_u8
= value
;
4523 case M32C_OPERAND_COND16C
:
4524 fields
->f_cond16
= value
;
4526 case M32C_OPERAND_COND16J
:
4527 fields
->f_cond16
= value
;
4529 case M32C_OPERAND_COND16J5
:
4530 fields
->f_cond16j_5
= value
;
4532 case M32C_OPERAND_COND32
:
4533 fields
->f_cond32
= value
;
4535 case M32C_OPERAND_COND32_16
:
4536 fields
->f_dsp_16_u8
= value
;
4538 case M32C_OPERAND_COND32_24
:
4539 fields
->f_dsp_24_u8
= value
;
4541 case M32C_OPERAND_COND32_32
:
4542 fields
->f_dsp_32_u8
= value
;
4544 case M32C_OPERAND_COND32_40
:
4545 fields
->f_dsp_40_u8
= value
;
4547 case M32C_OPERAND_COND32J
:
4548 fields
->f_cond32j
= value
;
4550 case M32C_OPERAND_CR1_PREFIXED_32
:
4551 fields
->f_21_3
= value
;
4553 case M32C_OPERAND_CR1_UNPREFIXED_32
:
4554 fields
->f_13_3
= value
;
4556 case M32C_OPERAND_CR16
:
4557 fields
->f_9_3
= value
;
4559 case M32C_OPERAND_CR2_32
:
4560 fields
->f_13_3
= value
;
4562 case M32C_OPERAND_CR3_PREFIXED_32
:
4563 fields
->f_21_3
= value
;
4565 case M32C_OPERAND_CR3_UNPREFIXED_32
:
4566 fields
->f_13_3
= value
;
4568 case M32C_OPERAND_FLAGS16
:
4569 fields
->f_9_3
= value
;
4571 case M32C_OPERAND_FLAGS32
:
4572 fields
->f_13_3
= value
;
4574 case M32C_OPERAND_SCCOND32
:
4575 fields
->f_cond16
= value
;
4577 case M32C_OPERAND_SIZE
:
4581 /* xgettext:c-format */
4582 fprintf (stderr
, _("Unrecognized field %d while setting int operand.\n"),
4589 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED
,
4591 CGEN_FIELDS
* fields
,
4596 case M32C_OPERAND_A0
:
4598 case M32C_OPERAND_A1
:
4600 case M32C_OPERAND_AN16_PUSH_S
:
4601 fields
->f_4_1
= value
;
4603 case M32C_OPERAND_BIT16AN
:
4604 fields
->f_dst16_an
= value
;
4606 case M32C_OPERAND_BIT16RN
:
4607 fields
->f_dst16_rn
= value
;
4609 case M32C_OPERAND_BIT32ANPREFIXED
:
4610 fields
->f_dst32_an_prefixed
= value
;
4612 case M32C_OPERAND_BIT32ANUNPREFIXED
:
4613 fields
->f_dst32_an_unprefixed
= value
;
4615 case M32C_OPERAND_BIT32RNPREFIXED
:
4616 fields
->f_dst32_rn_prefixed_QI
= value
;
4618 case M32C_OPERAND_BIT32RNUNPREFIXED
:
4619 fields
->f_dst32_rn_unprefixed_QI
= value
;
4621 case M32C_OPERAND_BITBASE16_16_S8
:
4622 fields
->f_dsp_16_s8
= value
;
4624 case M32C_OPERAND_BITBASE16_16_U16
:
4625 fields
->f_dsp_16_u16
= value
;
4627 case M32C_OPERAND_BITBASE16_16_U8
:
4628 fields
->f_dsp_16_u8
= value
;
4630 case M32C_OPERAND_BITBASE16_8_U11_S
:
4631 fields
->f_bitbase16_u11_S
= value
;
4633 case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED
:
4634 fields
->f_bitbase32_16_s11_unprefixed
= value
;
4636 case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED
:
4637 fields
->f_bitbase32_16_s19_unprefixed
= value
;
4639 case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED
:
4640 fields
->f_bitbase32_16_u11_unprefixed
= value
;
4642 case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED
:
4643 fields
->f_bitbase32_16_u19_unprefixed
= value
;
4645 case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED
:
4646 fields
->f_bitbase32_16_u27_unprefixed
= value
;
4648 case M32C_OPERAND_BITBASE32_24_S11_PREFIXED
:
4649 fields
->f_bitbase32_24_s11_prefixed
= value
;
4651 case M32C_OPERAND_BITBASE32_24_S19_PREFIXED
:
4652 fields
->f_bitbase32_24_s19_prefixed
= value
;
4654 case M32C_OPERAND_BITBASE32_24_U11_PREFIXED
:
4655 fields
->f_bitbase32_24_u11_prefixed
= value
;
4657 case M32C_OPERAND_BITBASE32_24_U19_PREFIXED
:
4658 fields
->f_bitbase32_24_u19_prefixed
= value
;
4660 case M32C_OPERAND_BITBASE32_24_U27_PREFIXED
:
4661 fields
->f_bitbase32_24_u27_prefixed
= value
;
4663 case M32C_OPERAND_BITNO16R
:
4664 fields
->f_dsp_16_u8
= value
;
4666 case M32C_OPERAND_BITNO32PREFIXED
:
4667 fields
->f_bitno32_prefixed
= value
;
4669 case M32C_OPERAND_BITNO32UNPREFIXED
:
4670 fields
->f_bitno32_unprefixed
= value
;
4672 case M32C_OPERAND_DSP_10_U6
:
4673 fields
->f_dsp_10_u6
= value
;
4675 case M32C_OPERAND_DSP_16_S16
:
4676 fields
->f_dsp_16_s16
= value
;
4678 case M32C_OPERAND_DSP_16_S8
:
4679 fields
->f_dsp_16_s8
= value
;
4681 case M32C_OPERAND_DSP_16_U16
:
4682 fields
->f_dsp_16_u16
= value
;
4684 case M32C_OPERAND_DSP_16_U20
:
4685 fields
->f_dsp_16_u24
= value
;
4687 case M32C_OPERAND_DSP_16_U24
:
4688 fields
->f_dsp_16_u24
= value
;
4690 case M32C_OPERAND_DSP_16_U8
:
4691 fields
->f_dsp_16_u8
= value
;
4693 case M32C_OPERAND_DSP_24_S16
:
4694 fields
->f_dsp_24_s16
= value
;
4696 case M32C_OPERAND_DSP_24_S8
:
4697 fields
->f_dsp_24_s8
= value
;
4699 case M32C_OPERAND_DSP_24_U16
:
4700 fields
->f_dsp_24_u16
= value
;
4702 case M32C_OPERAND_DSP_24_U20
:
4703 fields
->f_dsp_24_u24
= value
;
4705 case M32C_OPERAND_DSP_24_U24
:
4706 fields
->f_dsp_24_u24
= value
;
4708 case M32C_OPERAND_DSP_24_U8
:
4709 fields
->f_dsp_24_u8
= value
;
4711 case M32C_OPERAND_DSP_32_S16
:
4712 fields
->f_dsp_32_s16
= value
;
4714 case M32C_OPERAND_DSP_32_S8
:
4715 fields
->f_dsp_32_s8
= value
;
4717 case M32C_OPERAND_DSP_32_U16
:
4718 fields
->f_dsp_32_u16
= value
;
4720 case M32C_OPERAND_DSP_32_U20
:
4721 fields
->f_dsp_32_u24
= value
;
4723 case M32C_OPERAND_DSP_32_U24
:
4724 fields
->f_dsp_32_u24
= value
;
4726 case M32C_OPERAND_DSP_32_U8
:
4727 fields
->f_dsp_32_u8
= value
;
4729 case M32C_OPERAND_DSP_40_S16
:
4730 fields
->f_dsp_40_s16
= value
;
4732 case M32C_OPERAND_DSP_40_S8
:
4733 fields
->f_dsp_40_s8
= value
;
4735 case M32C_OPERAND_DSP_40_U16
:
4736 fields
->f_dsp_40_u16
= value
;
4738 case M32C_OPERAND_DSP_40_U24
:
4739 fields
->f_dsp_40_u24
= value
;
4741 case M32C_OPERAND_DSP_40_U8
:
4742 fields
->f_dsp_40_u8
= value
;
4744 case M32C_OPERAND_DSP_48_S16
:
4745 fields
->f_dsp_48_s16
= value
;
4747 case M32C_OPERAND_DSP_48_S8
:
4748 fields
->f_dsp_48_s8
= value
;
4750 case M32C_OPERAND_DSP_48_U16
:
4751 fields
->f_dsp_48_u16
= value
;
4753 case M32C_OPERAND_DSP_48_U24
:
4754 fields
->f_dsp_48_u24
= value
;
4756 case M32C_OPERAND_DSP_48_U8
:
4757 fields
->f_dsp_48_u8
= value
;
4759 case M32C_OPERAND_DSP_8_S24
:
4760 fields
->f_dsp_8_s24
= value
;
4762 case M32C_OPERAND_DSP_8_S8
:
4763 fields
->f_dsp_8_s8
= value
;
4765 case M32C_OPERAND_DSP_8_U16
:
4766 fields
->f_dsp_8_u16
= value
;
4768 case M32C_OPERAND_DSP_8_U24
:
4769 fields
->f_dsp_8_u24
= value
;
4771 case M32C_OPERAND_DSP_8_U6
:
4772 fields
->f_dsp_8_u6
= value
;
4774 case M32C_OPERAND_DSP_8_U8
:
4775 fields
->f_dsp_8_u8
= value
;
4777 case M32C_OPERAND_DST16AN
:
4778 fields
->f_dst16_an
= value
;
4780 case M32C_OPERAND_DST16AN_S
:
4781 fields
->f_dst16_an_s
= value
;
4783 case M32C_OPERAND_DST16ANHI
:
4784 fields
->f_dst16_an
= value
;
4786 case M32C_OPERAND_DST16ANQI
:
4787 fields
->f_dst16_an
= value
;
4789 case M32C_OPERAND_DST16ANQI_S
:
4790 fields
->f_dst16_rn_QI_s
= value
;
4792 case M32C_OPERAND_DST16ANSI
:
4793 fields
->f_dst16_an
= value
;
4795 case M32C_OPERAND_DST16RNEXTQI
:
4796 fields
->f_dst16_rn_ext
= value
;
4798 case M32C_OPERAND_DST16RNHI
:
4799 fields
->f_dst16_rn
= value
;
4801 case M32C_OPERAND_DST16RNQI
:
4802 fields
->f_dst16_rn
= value
;
4804 case M32C_OPERAND_DST16RNQI_S
:
4805 fields
->f_dst16_rn_QI_s
= value
;
4807 case M32C_OPERAND_DST16RNSI
:
4808 fields
->f_dst16_rn
= value
;
4810 case M32C_OPERAND_DST32ANEXTUNPREFIXED
:
4811 fields
->f_dst32_an_unprefixed
= value
;
4813 case M32C_OPERAND_DST32ANPREFIXED
:
4814 fields
->f_dst32_an_prefixed
= value
;
4816 case M32C_OPERAND_DST32ANPREFIXEDHI
:
4817 fields
->f_dst32_an_prefixed
= value
;
4819 case M32C_OPERAND_DST32ANPREFIXEDQI
:
4820 fields
->f_dst32_an_prefixed
= value
;
4822 case M32C_OPERAND_DST32ANPREFIXEDSI
:
4823 fields
->f_dst32_an_prefixed
= value
;
4825 case M32C_OPERAND_DST32ANUNPREFIXED
:
4826 fields
->f_dst32_an_unprefixed
= value
;
4828 case M32C_OPERAND_DST32ANUNPREFIXEDHI
:
4829 fields
->f_dst32_an_unprefixed
= value
;
4831 case M32C_OPERAND_DST32ANUNPREFIXEDQI
:
4832 fields
->f_dst32_an_unprefixed
= value
;
4834 case M32C_OPERAND_DST32ANUNPREFIXEDSI
:
4835 fields
->f_dst32_an_unprefixed
= value
;
4837 case M32C_OPERAND_DST32R0HI_S
:
4839 case M32C_OPERAND_DST32R0QI_S
:
4841 case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI
:
4842 fields
->f_dst32_rn_ext_unprefixed
= value
;
4844 case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI
:
4845 fields
->f_dst32_rn_ext_unprefixed
= value
;
4847 case M32C_OPERAND_DST32RNPREFIXEDHI
:
4848 fields
->f_dst32_rn_prefixed_HI
= value
;
4850 case M32C_OPERAND_DST32RNPREFIXEDQI
:
4851 fields
->f_dst32_rn_prefixed_QI
= value
;
4853 case M32C_OPERAND_DST32RNPREFIXEDSI
:
4854 fields
->f_dst32_rn_prefixed_SI
= value
;
4856 case M32C_OPERAND_DST32RNUNPREFIXEDHI
:
4857 fields
->f_dst32_rn_unprefixed_HI
= value
;
4859 case M32C_OPERAND_DST32RNUNPREFIXEDQI
:
4860 fields
->f_dst32_rn_unprefixed_QI
= value
;
4862 case M32C_OPERAND_DST32RNUNPREFIXEDSI
:
4863 fields
->f_dst32_rn_unprefixed_SI
= value
;
4865 case M32C_OPERAND_G
:
4867 case M32C_OPERAND_IMM_12_S4
:
4868 fields
->f_imm_12_s4
= value
;
4870 case M32C_OPERAND_IMM_12_S4N
:
4871 fields
->f_imm_12_s4
= value
;
4873 case M32C_OPERAND_IMM_13_U3
:
4874 fields
->f_imm_13_u3
= value
;
4876 case M32C_OPERAND_IMM_16_HI
:
4877 fields
->f_dsp_16_s16
= value
;
4879 case M32C_OPERAND_IMM_16_QI
:
4880 fields
->f_dsp_16_s8
= value
;
4882 case M32C_OPERAND_IMM_16_SI
:
4883 fields
->f_dsp_16_s32
= value
;
4885 case M32C_OPERAND_IMM_20_S4
:
4886 fields
->f_imm_20_s4
= value
;
4888 case M32C_OPERAND_IMM_24_HI
:
4889 fields
->f_dsp_24_s16
= value
;
4891 case M32C_OPERAND_IMM_24_QI
:
4892 fields
->f_dsp_24_s8
= value
;
4894 case M32C_OPERAND_IMM_24_SI
:
4895 fields
->f_dsp_24_s32
= value
;
4897 case M32C_OPERAND_IMM_32_HI
:
4898 fields
->f_dsp_32_s16
= value
;
4900 case M32C_OPERAND_IMM_32_QI
:
4901 fields
->f_dsp_32_s8
= value
;
4903 case M32C_OPERAND_IMM_32_SI
:
4904 fields
->f_dsp_32_s32
= value
;
4906 case M32C_OPERAND_IMM_40_HI
:
4907 fields
->f_dsp_40_s16
= value
;
4909 case M32C_OPERAND_IMM_40_QI
:
4910 fields
->f_dsp_40_s8
= value
;
4912 case M32C_OPERAND_IMM_40_SI
:
4913 fields
->f_dsp_40_s32
= value
;
4915 case M32C_OPERAND_IMM_48_HI
:
4916 fields
->f_dsp_48_s16
= value
;
4918 case M32C_OPERAND_IMM_48_QI
:
4919 fields
->f_dsp_48_s8
= value
;
4921 case M32C_OPERAND_IMM_48_SI
:
4922 fields
->f_dsp_48_s32
= value
;
4924 case M32C_OPERAND_IMM_56_HI
:
4925 fields
->f_dsp_56_s16
= value
;
4927 case M32C_OPERAND_IMM_56_QI
:
4928 fields
->f_dsp_56_s8
= value
;
4930 case M32C_OPERAND_IMM_64_HI
:
4931 fields
->f_dsp_64_s16
= value
;
4933 case M32C_OPERAND_IMM_8_HI
:
4934 fields
->f_dsp_8_s16
= value
;
4936 case M32C_OPERAND_IMM_8_QI
:
4937 fields
->f_dsp_8_s8
= value
;
4939 case M32C_OPERAND_IMM_8_S4
:
4940 fields
->f_imm_8_s4
= value
;
4942 case M32C_OPERAND_IMM_8_S4N
:
4943 fields
->f_imm_8_s4
= value
;
4945 case M32C_OPERAND_IMM_SH_12_S4
:
4946 fields
->f_imm_12_s4
= value
;
4948 case M32C_OPERAND_IMM_SH_20_S4
:
4949 fields
->f_imm_20_s4
= value
;
4951 case M32C_OPERAND_IMM_SH_8_S4
:
4952 fields
->f_imm_8_s4
= value
;
4954 case M32C_OPERAND_IMM1_S
:
4955 fields
->f_imm1_S
= value
;
4957 case M32C_OPERAND_IMM3_S
:
4958 fields
->f_imm3_S
= value
;
4960 case M32C_OPERAND_LAB_16_8
:
4961 fields
->f_lab_16_8
= value
;
4963 case M32C_OPERAND_LAB_24_8
:
4964 fields
->f_lab_24_8
= value
;
4966 case M32C_OPERAND_LAB_32_8
:
4967 fields
->f_lab_32_8
= value
;
4969 case M32C_OPERAND_LAB_40_8
:
4970 fields
->f_lab_40_8
= value
;
4972 case M32C_OPERAND_LAB_5_3
:
4973 fields
->f_lab_5_3
= value
;
4975 case M32C_OPERAND_LAB_8_16
:
4976 fields
->f_lab_8_16
= value
;
4978 case M32C_OPERAND_LAB_8_24
:
4979 fields
->f_lab_8_24
= value
;
4981 case M32C_OPERAND_LAB_8_8
:
4982 fields
->f_lab_8_8
= value
;
4984 case M32C_OPERAND_LAB32_JMP_S
:
4985 fields
->f_lab32_jmp_s
= value
;
4987 case M32C_OPERAND_Q
:
4989 case M32C_OPERAND_R0
:
4991 case M32C_OPERAND_R0H
:
4993 case M32C_OPERAND_R0L
:
4995 case M32C_OPERAND_R1
:
4997 case M32C_OPERAND_R1R2R0
:
4999 case M32C_OPERAND_R2
:
5001 case M32C_OPERAND_R2R0
:
5003 case M32C_OPERAND_R3
:
5005 case M32C_OPERAND_R3R1
:
5007 case M32C_OPERAND_REGSETPOP
:
5008 fields
->f_8_8
= value
;
5010 case M32C_OPERAND_REGSETPUSH
:
5011 fields
->f_8_8
= value
;
5013 case M32C_OPERAND_RN16_PUSH_S
:
5014 fields
->f_4_1
= value
;
5016 case M32C_OPERAND_S
:
5018 case M32C_OPERAND_SRC16AN
:
5019 fields
->f_src16_an
= value
;
5021 case M32C_OPERAND_SRC16ANHI
:
5022 fields
->f_src16_an
= value
;
5024 case M32C_OPERAND_SRC16ANQI
:
5025 fields
->f_src16_an
= value
;
5027 case M32C_OPERAND_SRC16RNHI
:
5028 fields
->f_src16_rn
= value
;
5030 case M32C_OPERAND_SRC16RNQI
:
5031 fields
->f_src16_rn
= value
;
5033 case M32C_OPERAND_SRC32ANPREFIXED
:
5034 fields
->f_src32_an_prefixed
= value
;
5036 case M32C_OPERAND_SRC32ANPREFIXEDHI
:
5037 fields
->f_src32_an_prefixed
= value
;
5039 case M32C_OPERAND_SRC32ANPREFIXEDQI
:
5040 fields
->f_src32_an_prefixed
= value
;
5042 case M32C_OPERAND_SRC32ANPREFIXEDSI
:
5043 fields
->f_src32_an_prefixed
= value
;
5045 case M32C_OPERAND_SRC32ANUNPREFIXED
:
5046 fields
->f_src32_an_unprefixed
= value
;
5048 case M32C_OPERAND_SRC32ANUNPREFIXEDHI
:
5049 fields
->f_src32_an_unprefixed
= value
;
5051 case M32C_OPERAND_SRC32ANUNPREFIXEDQI
:
5052 fields
->f_src32_an_unprefixed
= value
;
5054 case M32C_OPERAND_SRC32ANUNPREFIXEDSI
:
5055 fields
->f_src32_an_unprefixed
= value
;
5057 case M32C_OPERAND_SRC32RNPREFIXEDHI
:
5058 fields
->f_src32_rn_prefixed_HI
= value
;
5060 case M32C_OPERAND_SRC32RNPREFIXEDQI
:
5061 fields
->f_src32_rn_prefixed_QI
= value
;
5063 case M32C_OPERAND_SRC32RNPREFIXEDSI
:
5064 fields
->f_src32_rn_prefixed_SI
= value
;
5066 case M32C_OPERAND_SRC32RNUNPREFIXEDHI
:
5067 fields
->f_src32_rn_unprefixed_HI
= value
;
5069 case M32C_OPERAND_SRC32RNUNPREFIXEDQI
:
5070 fields
->f_src32_rn_unprefixed_QI
= value
;
5072 case M32C_OPERAND_SRC32RNUNPREFIXEDSI
:
5073 fields
->f_src32_rn_unprefixed_SI
= value
;
5075 case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL
:
5076 fields
->f_5_1
= value
;
5078 case M32C_OPERAND_X
:
5080 case M32C_OPERAND_Z
:
5082 case M32C_OPERAND_COND16_16
:
5083 fields
->f_dsp_16_u8
= value
;
5085 case M32C_OPERAND_COND16_24
:
5086 fields
->f_dsp_24_u8
= value
;
5088 case M32C_OPERAND_COND16_32
:
5089 fields
->f_dsp_32_u8
= value
;
5091 case M32C_OPERAND_COND16C
:
5092 fields
->f_cond16
= value
;
5094 case M32C_OPERAND_COND16J
:
5095 fields
->f_cond16
= value
;
5097 case M32C_OPERAND_COND16J5
:
5098 fields
->f_cond16j_5
= value
;
5100 case M32C_OPERAND_COND32
:
5101 fields
->f_cond32
= value
;
5103 case M32C_OPERAND_COND32_16
:
5104 fields
->f_dsp_16_u8
= value
;
5106 case M32C_OPERAND_COND32_24
:
5107 fields
->f_dsp_24_u8
= value
;
5109 case M32C_OPERAND_COND32_32
:
5110 fields
->f_dsp_32_u8
= value
;
5112 case M32C_OPERAND_COND32_40
:
5113 fields
->f_dsp_40_u8
= value
;
5115 case M32C_OPERAND_COND32J
:
5116 fields
->f_cond32j
= value
;
5118 case M32C_OPERAND_CR1_PREFIXED_32
:
5119 fields
->f_21_3
= value
;
5121 case M32C_OPERAND_CR1_UNPREFIXED_32
:
5122 fields
->f_13_3
= value
;
5124 case M32C_OPERAND_CR16
:
5125 fields
->f_9_3
= value
;
5127 case M32C_OPERAND_CR2_32
:
5128 fields
->f_13_3
= value
;
5130 case M32C_OPERAND_CR3_PREFIXED_32
:
5131 fields
->f_21_3
= value
;
5133 case M32C_OPERAND_CR3_UNPREFIXED_32
:
5134 fields
->f_13_3
= value
;
5136 case M32C_OPERAND_FLAGS16
:
5137 fields
->f_9_3
= value
;
5139 case M32C_OPERAND_FLAGS32
:
5140 fields
->f_13_3
= value
;
5142 case M32C_OPERAND_SCCOND32
:
5143 fields
->f_cond16
= value
;
5145 case M32C_OPERAND_SIZE
:
5149 /* xgettext:c-format */
5150 fprintf (stderr
, _("Unrecognized field %d while setting vma operand.\n"),
5156 /* Function to call before using the instruction builder tables. */
5159 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd
)
5161 cd
->insert_handlers
= & m32c_cgen_insert_handlers
[0];
5162 cd
->extract_handlers
= & m32c_cgen_extract_handlers
[0];
5164 cd
->insert_operand
= m32c_cgen_insert_operand
;
5165 cd
->extract_operand
= m32c_cgen_extract_operand
;
5167 cd
->get_int_operand
= m32c_cgen_get_int_operand
;
5168 cd
->set_int_operand
= m32c_cgen_set_int_operand
;
5169 cd
->get_vma_operand
= m32c_cgen_get_vma_operand
;
5170 cd
->set_vma_operand
= m32c_cgen_set_vma_operand
;