Back to index

cell-binutils  2.17cvs20070401
m32c-ibld.c
Go to the documentation of this file.
00001 /* Instruction building/extraction support for m32c. -*- C -*-
00002 
00003    THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
00004    - the resultant file is machine generated, cgen-ibld.in isn't
00005 
00006    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006
00007    Free Software Foundation, Inc.
00008 
00009    This file is part of the GNU Binutils and GDB, the GNU debugger.
00010 
00011    This program is free software; you can redistribute it and/or modify
00012    it under the terms of the GNU General Public License as published by
00013    the Free Software Foundation; either version 2, or (at your option)
00014    any later version.
00015 
00016    This program is distributed in the hope that it will be useful,
00017    but WITHOUT ANY WARRANTY; without even the implied warranty of
00018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019    GNU General Public License for more details.
00020 
00021    You should have received a copy of the GNU General Public License
00022    along with this program; if not, write to the Free Software Foundation, Inc.,
00023    51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00024 
00025 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
00026    Keep that in mind.  */
00027 
00028 #include "sysdep.h"
00029 #include <stdio.h>
00030 #include "ansidecl.h"
00031 #include "dis-asm.h"
00032 #include "bfd.h"
00033 #include "symcat.h"
00034 #include "m32c-desc.h"
00035 #include "m32c-opc.h"
00036 #include "opintl.h"
00037 #include "safe-ctype.h"
00038 
00039 #undef  min
00040 #define min(a,b) ((a) < (b) ? (a) : (b))
00041 #undef  max
00042 #define max(a,b) ((a) > (b) ? (a) : (b))
00043 
00044 /* Used by the ifield rtx function.  */
00045 #define FLD(f) (fields->f)
00046 
00047 static const char * insert_normal
00048   (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
00049    unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
00050 static const char * insert_insn_normal
00051   (CGEN_CPU_DESC, const CGEN_INSN *,
00052    CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
00053 static int extract_normal
00054   (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
00055    unsigned int, unsigned int, unsigned int, unsigned int,
00056    unsigned int, unsigned int, bfd_vma, long *);
00057 static int extract_insn_normal
00058   (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
00059    CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
00060 #if CGEN_INT_INSN_P
00061 static void put_insn_int_value
00062   (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
00063 #endif
00064 #if ! CGEN_INT_INSN_P
00065 static CGEN_INLINE void insert_1
00066   (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
00067 static CGEN_INLINE int fill_cache
00068   (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *,  int, int, bfd_vma);
00069 static CGEN_INLINE long extract_1
00070   (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
00071 #endif
00072 
00073 /* Operand insertion.  */
00074 
00075 #if ! CGEN_INT_INSN_P
00076 
00077 /* Subroutine of insert_normal.  */
00078 
00079 static CGEN_INLINE void
00080 insert_1 (CGEN_CPU_DESC cd,
00081          unsigned long value,
00082          int start,
00083          int length,
00084          int word_length,
00085          unsigned char *bufp)
00086 {
00087   unsigned long x,mask;
00088   int shift;
00089 
00090   x = cgen_get_insn_value (cd, bufp, word_length);
00091 
00092   /* Written this way to avoid undefined behaviour.  */
00093   mask = (((1L << (length - 1)) - 1) << 1) | 1;
00094   if (CGEN_INSN_LSB0_P)
00095     shift = (start + 1) - length;
00096   else
00097     shift = (word_length - (start + length));
00098   x = (x & ~(mask << shift)) | ((value & mask) << shift);
00099 
00100   cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x);
00101 }
00102 
00103 #endif /* ! CGEN_INT_INSN_P */
00104 
00105 /* Default insertion routine.
00106 
00107    ATTRS is a mask of the boolean attributes.
00108    WORD_OFFSET is the offset in bits from the start of the insn of the value.
00109    WORD_LENGTH is the length of the word in bits in which the value resides.
00110    START is the starting bit number in the word, architecture origin.
00111    LENGTH is the length of VALUE in bits.
00112    TOTAL_LENGTH is the total length of the insn in bits.
00113 
00114    The result is an error message or NULL if success.  */
00115 
00116 /* ??? This duplicates functionality with bfd's howto table and
00117    bfd_install_relocation.  */
00118 /* ??? This doesn't handle bfd_vma's.  Create another function when
00119    necessary.  */
00120 
00121 static const char *
00122 insert_normal (CGEN_CPU_DESC cd,
00123               long value,
00124               unsigned int attrs,
00125               unsigned int word_offset,
00126               unsigned int start,
00127               unsigned int length,
00128               unsigned int word_length,
00129               unsigned int total_length,
00130               CGEN_INSN_BYTES_PTR buffer)
00131 {
00132   static char errbuf[100];
00133   /* Written this way to avoid undefined behaviour.  */
00134   unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1;
00135 
00136   /* If LENGTH is zero, this operand doesn't contribute to the value.  */
00137   if (length == 0)
00138     return NULL;
00139 
00140   if (word_length > 32)
00141     abort ();
00142 
00143   /* For architectures with insns smaller than the base-insn-bitsize,
00144      word_length may be too big.  */
00145   if (cd->min_insn_bitsize < cd->base_insn_bitsize)
00146     {
00147       if (word_offset == 0
00148          && word_length > total_length)
00149        word_length = total_length;
00150     }
00151 
00152   /* Ensure VALUE will fit.  */
00153   if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
00154     {
00155       long minval = - (1L << (length - 1));
00156       unsigned long maxval = mask;
00157       
00158       if ((value > 0 && (unsigned long) value > maxval)
00159          || value < minval)
00160        {
00161          /* xgettext:c-format */
00162          sprintf (errbuf,
00163                  _("operand out of range (%ld not between %ld and %lu)"),
00164                  value, minval, maxval);
00165          return errbuf;
00166        }
00167     }
00168   else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
00169     {
00170       unsigned long maxval = mask;
00171       unsigned long val = (unsigned long) value;
00172 
00173       /* For hosts with a word size > 32 check to see if value has been sign
00174         extended beyond 32 bits.  If so then ignore these higher sign bits
00175         as the user is attempting to store a 32-bit signed value into an
00176         unsigned 32-bit field which is allowed.  */
00177       if (sizeof (unsigned long) > 4 && ((value >> 32) == -1))
00178        val &= 0xFFFFFFFF;
00179 
00180       if (val > maxval)
00181        {
00182          /* xgettext:c-format */
00183          sprintf (errbuf,
00184                  _("operand out of range (0x%lx not between 0 and 0x%lx)"),
00185                  val, maxval);
00186          return errbuf;
00187        }
00188     }
00189   else
00190     {
00191       if (! cgen_signed_overflow_ok_p (cd))
00192        {
00193          long minval = - (1L << (length - 1));
00194          long maxval =   (1L << (length - 1)) - 1;
00195          
00196          if (value < minval || value > maxval)
00197            {
00198              sprintf
00199               /* xgettext:c-format */
00200               (errbuf, _("operand out of range (%ld not between %ld and %ld)"),
00201                value, minval, maxval);
00202              return errbuf;
00203            }
00204        }
00205     }
00206 
00207 #if CGEN_INT_INSN_P
00208 
00209   {
00210     int shift;
00211 
00212     if (CGEN_INSN_LSB0_P)
00213       shift = (word_offset + start + 1) - length;
00214     else
00215       shift = total_length - (word_offset + start + length);
00216     *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
00217   }
00218 
00219 #else /* ! CGEN_INT_INSN_P */
00220 
00221   {
00222     unsigned char *bufp = (unsigned char *) buffer + word_offset / 8;
00223 
00224     insert_1 (cd, value, start, length, word_length, bufp);
00225   }
00226 
00227 #endif /* ! CGEN_INT_INSN_P */
00228 
00229   return NULL;
00230 }
00231 
00232 /* Default insn builder (insert handler).
00233    The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
00234    that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
00235    recorded in host byte order, otherwise BUFFER is an array of bytes
00236    and the value is recorded in target byte order).
00237    The result is an error message or NULL if success.  */
00238 
00239 static const char *
00240 insert_insn_normal (CGEN_CPU_DESC cd,
00241                   const CGEN_INSN * insn,
00242                   CGEN_FIELDS * fields,
00243                   CGEN_INSN_BYTES_PTR buffer,
00244                   bfd_vma pc)
00245 {
00246   const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
00247   unsigned long value;
00248   const CGEN_SYNTAX_CHAR_TYPE * syn;
00249 
00250   CGEN_INIT_INSERT (cd);
00251   value = CGEN_INSN_BASE_VALUE (insn);
00252 
00253   /* If we're recording insns as numbers (rather than a string of bytes),
00254      target byte order handling is deferred until later.  */
00255 
00256 #if CGEN_INT_INSN_P
00257 
00258   put_insn_int_value (cd, buffer, cd->base_insn_bitsize,
00259                     CGEN_FIELDS_BITSIZE (fields), value);
00260 
00261 #else
00262 
00263   cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
00264                                    (unsigned) CGEN_FIELDS_BITSIZE (fields)),
00265                      value);
00266 
00267 #endif /* ! CGEN_INT_INSN_P */
00268 
00269   /* ??? It would be better to scan the format's fields.
00270      Still need to be able to insert a value based on the operand though;
00271      e.g. storing a branch displacement that got resolved later.
00272      Needs more thought first.  */
00273 
00274   for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn)
00275     {
00276       const char *errmsg;
00277 
00278       if (CGEN_SYNTAX_CHAR_P (* syn))
00279        continue;
00280 
00281       errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
00282                                    fields, buffer, pc);
00283       if (errmsg)
00284        return errmsg;
00285     }
00286 
00287   return NULL;
00288 }
00289 
00290 #if CGEN_INT_INSN_P
00291 /* Cover function to store an insn value into an integral insn.  Must go here
00292    because it needs <prefix>-desc.h for CGEN_INT_INSN_P.  */
00293 
00294 static void
00295 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
00296                   CGEN_INSN_BYTES_PTR buf,
00297                   int length,
00298                   int insn_length,
00299                   CGEN_INSN_INT value)
00300 {
00301   /* For architectures with insns smaller than the base-insn-bitsize,
00302      length may be too big.  */
00303   if (length > insn_length)
00304     *buf = value;
00305   else
00306     {
00307       int shift = insn_length - length;
00308       /* Written this way to avoid undefined behaviour.  */
00309       CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1;
00310 
00311       *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift);
00312     }
00313 }
00314 #endif
00315 
00316 /* Operand extraction.  */
00317 
00318 #if ! CGEN_INT_INSN_P
00319 
00320 /* Subroutine of extract_normal.
00321    Ensure sufficient bytes are cached in EX_INFO.
00322    OFFSET is the offset in bytes from the start of the insn of the value.
00323    BYTES is the length of the needed value.
00324    Returns 1 for success, 0 for failure.  */
00325 
00326 static CGEN_INLINE int
00327 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
00328            CGEN_EXTRACT_INFO *ex_info,
00329            int offset,
00330            int bytes,
00331            bfd_vma pc)
00332 {
00333   /* It's doubtful that the middle part has already been fetched so
00334      we don't optimize that case.  kiss.  */
00335   unsigned int mask;
00336   disassemble_info *info = (disassemble_info *) ex_info->dis_info;
00337 
00338   /* First do a quick check.  */
00339   mask = (1 << bytes) - 1;
00340   if (((ex_info->valid >> offset) & mask) == mask)
00341     return 1;
00342 
00343   /* Search for the first byte we need to read.  */
00344   for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1)
00345     if (! (mask & ex_info->valid))
00346       break;
00347 
00348   if (bytes)
00349     {
00350       int status;
00351 
00352       pc += offset;
00353       status = (*info->read_memory_func)
00354        (pc, ex_info->insn_bytes + offset, bytes, info);
00355 
00356       if (status != 0)
00357        {
00358          (*info->memory_error_func) (status, pc, info);
00359          return 0;
00360        }
00361 
00362       ex_info->valid |= ((1 << bytes) - 1) << offset;
00363     }
00364 
00365   return 1;
00366 }
00367 
00368 /* Subroutine of extract_normal.  */
00369 
00370 static CGEN_INLINE long
00371 extract_1 (CGEN_CPU_DESC cd,
00372           CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
00373           int start,
00374           int length,
00375           int word_length,
00376           unsigned char *bufp,
00377           bfd_vma pc ATTRIBUTE_UNUSED)
00378 {
00379   unsigned long x;
00380   int shift;
00381 
00382   x = cgen_get_insn_value (cd, bufp, word_length);
00383 
00384   if (CGEN_INSN_LSB0_P)
00385     shift = (start + 1) - length;
00386   else
00387     shift = (word_length - (start + length));
00388   return x >> shift;
00389 }
00390 
00391 #endif /* ! CGEN_INT_INSN_P */
00392 
00393 /* Default extraction routine.
00394 
00395    INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
00396    or sometimes less for cases like the m32r where the base insn size is 32
00397    but some insns are 16 bits.
00398    ATTRS is a mask of the boolean attributes.  We only need `SIGNED',
00399    but for generality we take a bitmask of all of them.
00400    WORD_OFFSET is the offset in bits from the start of the insn of the value.
00401    WORD_LENGTH is the length of the word in bits in which the value resides.
00402    START is the starting bit number in the word, architecture origin.
00403    LENGTH is the length of VALUE in bits.
00404    TOTAL_LENGTH is the total length of the insn in bits.
00405 
00406    Returns 1 for success, 0 for failure.  */
00407 
00408 /* ??? The return code isn't properly used.  wip.  */
00409 
00410 /* ??? This doesn't handle bfd_vma's.  Create another function when
00411    necessary.  */
00412 
00413 static int
00414 extract_normal (CGEN_CPU_DESC cd,
00415 #if ! CGEN_INT_INSN_P
00416               CGEN_EXTRACT_INFO *ex_info,
00417 #else
00418               CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
00419 #endif
00420               CGEN_INSN_INT insn_value,
00421               unsigned int attrs,
00422               unsigned int word_offset,
00423               unsigned int start,
00424               unsigned int length,
00425               unsigned int word_length,
00426               unsigned int total_length,
00427 #if ! CGEN_INT_INSN_P
00428               bfd_vma pc,
00429 #else
00430               bfd_vma pc ATTRIBUTE_UNUSED,
00431 #endif
00432               long *valuep)
00433 {
00434   long value, mask;
00435 
00436   /* If LENGTH is zero, this operand doesn't contribute to the value
00437      so give it a standard value of zero.  */
00438   if (length == 0)
00439     {
00440       *valuep = 0;
00441       return 1;
00442     }
00443 
00444   if (word_length > 32)
00445     abort ();
00446 
00447   /* For architectures with insns smaller than the insn-base-bitsize,
00448      word_length may be too big.  */
00449   if (cd->min_insn_bitsize < cd->base_insn_bitsize)
00450     {
00451       if (word_offset + word_length > total_length)
00452        word_length = total_length - word_offset;
00453     }
00454 
00455   /* Does the value reside in INSN_VALUE, and at the right alignment?  */
00456 
00457   if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length))
00458     {
00459       if (CGEN_INSN_LSB0_P)
00460        value = insn_value >> ((word_offset + start + 1) - length);
00461       else
00462        value = insn_value >> (total_length - ( word_offset + start + length));
00463     }
00464 
00465 #if ! CGEN_INT_INSN_P
00466 
00467   else
00468     {
00469       unsigned char *bufp = ex_info->insn_bytes + word_offset / 8;
00470 
00471       if (word_length > 32)
00472        abort ();
00473 
00474       if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0)
00475        return 0;
00476 
00477       value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc);
00478     }
00479 
00480 #endif /* ! CGEN_INT_INSN_P */
00481 
00482   /* Written this way to avoid undefined behaviour.  */
00483   mask = (((1L << (length - 1)) - 1) << 1) | 1;
00484 
00485   value &= mask;
00486   /* sign extend? */
00487   if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
00488       && (value & (1L << (length - 1))))
00489     value |= ~mask;
00490 
00491   *valuep = value;
00492 
00493   return 1;
00494 }
00495 
00496 /* Default insn extractor.
00497 
00498    INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
00499    The extracted fields are stored in FIELDS.
00500    EX_INFO is used to handle reading variable length insns.
00501    Return the length of the insn in bits, or 0 if no match,
00502    or -1 if an error occurs fetching data (memory_error_func will have
00503    been called).  */
00504 
00505 static int
00506 extract_insn_normal (CGEN_CPU_DESC cd,
00507                    const CGEN_INSN *insn,
00508                    CGEN_EXTRACT_INFO *ex_info,
00509                    CGEN_INSN_INT insn_value,
00510                    CGEN_FIELDS *fields,
00511                    bfd_vma pc)
00512 {
00513   const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
00514   const CGEN_SYNTAX_CHAR_TYPE *syn;
00515 
00516   CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
00517 
00518   CGEN_INIT_EXTRACT (cd);
00519 
00520   for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
00521     {
00522       int length;
00523 
00524       if (CGEN_SYNTAX_CHAR_P (*syn))
00525        continue;
00526 
00527       length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
00528                                    ex_info, insn_value, fields, pc);
00529       if (length <= 0)
00530        return length;
00531     }
00532 
00533   /* We recognized and successfully extracted this insn.  */
00534   return CGEN_INSN_BITSIZE (insn);
00535 }
00536 
00537 /* Machine generated code added here.  */
00538 
00539 const char * m32c_cgen_insert_operand
00540   (CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
00541 
00542 /* Main entry point for operand insertion.
00543 
00544    This function is basically just a big switch statement.  Earlier versions
00545    used tables to look up the function to use, but
00546    - if the table contains both assembler and disassembler functions then
00547      the disassembler contains much of the assembler and vice-versa,
00548    - there's a lot of inlining possibilities as things grow,
00549    - using a switch statement avoids the function call overhead.
00550 
00551    This function could be moved into `parse_insn_normal', but keeping it
00552    separate makes clear the interface between `parse_insn_normal' and each of
00553    the handlers.  It's also needed by GAS to insert operands that couldn't be
00554    resolved during parsing.  */
00555 
00556 const char *
00557 m32c_cgen_insert_operand (CGEN_CPU_DESC cd,
00558                           int opindex,
00559                           CGEN_FIELDS * fields,
00560                           CGEN_INSN_BYTES_PTR buffer,
00561                           bfd_vma pc ATTRIBUTE_UNUSED)
00562 {
00563   const char * errmsg = NULL;
00564   unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
00565 
00566   switch (opindex)
00567     {
00568     case M32C_OPERAND_A0 :
00569       break;
00570     case M32C_OPERAND_A1 :
00571       break;
00572     case M32C_OPERAND_AN16_PUSH_S :
00573       errmsg = insert_normal (cd, fields->f_4_1, 0, 0, 4, 1, 32, total_length, buffer);
00574       break;
00575     case M32C_OPERAND_BIT16AN :
00576       errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
00577       break;
00578     case M32C_OPERAND_BIT16RN :
00579       errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
00580       break;
00581     case M32C_OPERAND_BIT3_S :
00582       {
00583 {
00584   FLD (f_7_1) = ((((FLD (f_imm3_S)) - (1))) & (1));
00585   FLD (f_2_2) = ((((unsigned int) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3));
00586 }
00587         errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
00588         if (errmsg)
00589           break;
00590         errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
00591         if (errmsg)
00592           break;
00593       }
00594       break;
00595     case M32C_OPERAND_BIT32ANPREFIXED :
00596       errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
00597       break;
00598     case M32C_OPERAND_BIT32ANUNPREFIXED :
00599       errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
00600       break;
00601     case M32C_OPERAND_BIT32RNPREFIXED :
00602       {
00603         long value = fields->f_dst32_rn_prefixed_QI;
00604         value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
00605         errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
00606       }
00607       break;
00608     case M32C_OPERAND_BIT32RNUNPREFIXED :
00609       {
00610         long value = fields->f_dst32_rn_unprefixed_QI;
00611         value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
00612         errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
00613       }
00614       break;
00615     case M32C_OPERAND_BITBASE16_16_S8 :
00616       errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
00617       break;
00618     case M32C_OPERAND_BITBASE16_16_U16 :
00619       {
00620         long value = fields->f_dsp_16_u16;
00621         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00622         errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
00623       }
00624       break;
00625     case M32C_OPERAND_BITBASE16_16_U8 :
00626       errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
00627       break;
00628     case M32C_OPERAND_BITBASE16_8_U11_S :
00629       {
00630 {
00631   FLD (f_bitno16_S) = ((FLD (f_bitbase16_u11_S)) & (7));
00632   FLD (f_dsp_8_u8) = ((((unsigned int) (FLD (f_bitbase16_u11_S)) >> (3))) & (255));
00633 }
00634         errmsg = insert_normal (cd, fields->f_bitno16_S, 0, 0, 5, 3, 32, total_length, buffer);
00635         if (errmsg)
00636           break;
00637         errmsg = insert_normal (cd, fields->f_dsp_8_u8, 0, 0, 8, 8, 32, total_length, buffer);
00638         if (errmsg)
00639           break;
00640       }
00641       break;
00642     case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
00643       {
00644 {
00645   FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s11_unprefixed)) & (7));
00646   FLD (f_dsp_16_s8) = ((int) (FLD (f_bitbase32_16_s11_unprefixed)) >> (3));
00647 }
00648         errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
00649         if (errmsg)
00650           break;
00651         errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
00652         if (errmsg)
00653           break;
00654       }
00655       break;
00656     case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
00657       {
00658 {
00659   FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s19_unprefixed)) & (7));
00660   FLD (f_dsp_16_s16) = ((int) (FLD (f_bitbase32_16_s19_unprefixed)) >> (3));
00661 }
00662         errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
00663         if (errmsg)
00664           break;
00665         {
00666         long value = fields->f_dsp_16_s16;
00667         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
00668         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
00669       }
00670         if (errmsg)
00671           break;
00672       }
00673       break;
00674     case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
00675       {
00676 {
00677   FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u11_unprefixed)) & (7));
00678   FLD (f_dsp_16_u8) = ((((unsigned int) (FLD (f_bitbase32_16_u11_unprefixed)) >> (3))) & (255));
00679 }
00680         errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
00681         if (errmsg)
00682           break;
00683         errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
00684         if (errmsg)
00685           break;
00686       }
00687       break;
00688     case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
00689       {
00690 {
00691   FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u19_unprefixed)) & (7));
00692   FLD (f_dsp_16_u16) = ((((unsigned int) (FLD (f_bitbase32_16_u19_unprefixed)) >> (3))) & (65535));
00693 }
00694         errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
00695         if (errmsg)
00696           break;
00697         {
00698         long value = fields->f_dsp_16_u16;
00699         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00700         errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
00701       }
00702         if (errmsg)
00703           break;
00704       }
00705       break;
00706     case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
00707       {
00708 {
00709   FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u27_unprefixed)) & (7));
00710   FLD (f_dsp_16_u16) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed)) >> (3))) & (65535));
00711   FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed)) >> (19))) & (255));
00712 }
00713         errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
00714         if (errmsg)
00715           break;
00716         {
00717         long value = fields->f_dsp_16_u16;
00718         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00719         errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
00720       }
00721         if (errmsg)
00722           break;
00723         errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
00724         if (errmsg)
00725           break;
00726       }
00727       break;
00728     case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
00729       {
00730 {
00731   FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s11_prefixed)) & (7));
00732   FLD (f_dsp_24_s8) = ((int) (FLD (f_bitbase32_24_s11_prefixed)) >> (3));
00733 }
00734         errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
00735         if (errmsg)
00736           break;
00737         errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
00738         if (errmsg)
00739           break;
00740       }
00741       break;
00742     case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
00743       {
00744 {
00745   FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s19_prefixed)) & (7));
00746   FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_s19_prefixed)) >> (3))) & (255));
00747   FLD (f_dsp_32_s8) = ((int) (FLD (f_bitbase32_24_s19_prefixed)) >> (11));
00748 }
00749         errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
00750         if (errmsg)
00751           break;
00752         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
00753         if (errmsg)
00754           break;
00755         errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
00756         if (errmsg)
00757           break;
00758       }
00759       break;
00760     case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
00761       {
00762 {
00763   FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u11_prefixed)) & (7));
00764   FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u11_prefixed)) >> (3))) & (255));
00765 }
00766         errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
00767         if (errmsg)
00768           break;
00769         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
00770         if (errmsg)
00771           break;
00772       }
00773       break;
00774     case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
00775       {
00776 {
00777   FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u19_prefixed)) & (7));
00778   FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed)) >> (3))) & (255));
00779   FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed)) >> (11))) & (255));
00780 }
00781         errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
00782         if (errmsg)
00783           break;
00784         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
00785         if (errmsg)
00786           break;
00787         errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
00788         if (errmsg)
00789           break;
00790       }
00791       break;
00792     case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
00793       {
00794 {
00795   FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u27_prefixed)) & (7));
00796   FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed)) >> (3))) & (255));
00797   FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed)) >> (11))) & (65535));
00798 }
00799         errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
00800         if (errmsg)
00801           break;
00802         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
00803         if (errmsg)
00804           break;
00805         {
00806         long value = fields->f_dsp_32_u16;
00807         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00808         errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
00809       }
00810         if (errmsg)
00811           break;
00812       }
00813       break;
00814     case M32C_OPERAND_BITNO16R :
00815       errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
00816       break;
00817     case M32C_OPERAND_BITNO32PREFIXED :
00818       errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer);
00819       break;
00820     case M32C_OPERAND_BITNO32UNPREFIXED :
00821       errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer);
00822       break;
00823     case M32C_OPERAND_DSP_10_U6 :
00824       errmsg = insert_normal (cd, fields->f_dsp_10_u6, 0, 0, 10, 6, 32, total_length, buffer);
00825       break;
00826     case M32C_OPERAND_DSP_16_S16 :
00827       {
00828         long value = fields->f_dsp_16_s16;
00829         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
00830         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
00831       }
00832       break;
00833     case M32C_OPERAND_DSP_16_S8 :
00834       errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
00835       break;
00836     case M32C_OPERAND_DSP_16_U16 :
00837       {
00838         long value = fields->f_dsp_16_u16;
00839         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00840         errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
00841       }
00842       break;
00843     case M32C_OPERAND_DSP_16_U20 :
00844       {
00845 {
00846   FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535));
00847   FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_16_u24)) >> (16))) & (255));
00848 }
00849         {
00850         long value = fields->f_dsp_16_u16;
00851         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00852         errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
00853       }
00854         if (errmsg)
00855           break;
00856         errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
00857         if (errmsg)
00858           break;
00859       }
00860       break;
00861     case M32C_OPERAND_DSP_16_U24 :
00862       {
00863 {
00864   FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535));
00865   FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_16_u24)) >> (16))) & (255));
00866 }
00867         {
00868         long value = fields->f_dsp_16_u16;
00869         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00870         errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
00871       }
00872         if (errmsg)
00873           break;
00874         errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
00875         if (errmsg)
00876           break;
00877       }
00878       break;
00879     case M32C_OPERAND_DSP_16_U8 :
00880       errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
00881       break;
00882     case M32C_OPERAND_DSP_24_S16 :
00883       {
00884 {
00885   FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255));
00886   FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_24_s16)) >> (8))) & (255));
00887 }
00888         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
00889         if (errmsg)
00890           break;
00891         errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
00892         if (errmsg)
00893           break;
00894       }
00895       break;
00896     case M32C_OPERAND_DSP_24_S8 :
00897       errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
00898       break;
00899     case M32C_OPERAND_DSP_24_U16 :
00900       {
00901 {
00902   FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u16)) & (255));
00903   FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_24_u16)) >> (8))) & (255));
00904 }
00905         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
00906         if (errmsg)
00907           break;
00908         errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
00909         if (errmsg)
00910           break;
00911       }
00912       break;
00913     case M32C_OPERAND_DSP_24_U20 :
00914       {
00915 {
00916   FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255));
00917   FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_dsp_24_u24)) >> (8))) & (65535));
00918 }
00919         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
00920         if (errmsg)
00921           break;
00922         {
00923         long value = fields->f_dsp_32_u16;
00924         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00925         errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
00926       }
00927         if (errmsg)
00928           break;
00929       }
00930       break;
00931     case M32C_OPERAND_DSP_24_U24 :
00932       {
00933 {
00934   FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255));
00935   FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_dsp_24_u24)) >> (8))) & (65535));
00936 }
00937         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
00938         if (errmsg)
00939           break;
00940         {
00941         long value = fields->f_dsp_32_u16;
00942         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00943         errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
00944       }
00945         if (errmsg)
00946           break;
00947       }
00948       break;
00949     case M32C_OPERAND_DSP_24_U8 :
00950       errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
00951       break;
00952     case M32C_OPERAND_DSP_32_S16 :
00953       {
00954         long value = fields->f_dsp_32_s16;
00955         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
00956         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, buffer);
00957       }
00958       break;
00959     case M32C_OPERAND_DSP_32_S8 :
00960       errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
00961       break;
00962     case M32C_OPERAND_DSP_32_U16 :
00963       {
00964         long value = fields->f_dsp_32_u16;
00965         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
00966         errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
00967       }
00968       break;
00969     case M32C_OPERAND_DSP_32_U20 :
00970       {
00971         long value = fields->f_dsp_32_u24;
00972         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
00973         errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
00974       }
00975       break;
00976     case M32C_OPERAND_DSP_32_U24 :
00977       {
00978         long value = fields->f_dsp_32_u24;
00979         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
00980         errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
00981       }
00982       break;
00983     case M32C_OPERAND_DSP_32_U8 :
00984       errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
00985       break;
00986     case M32C_OPERAND_DSP_40_S16 :
00987       {
00988         long value = fields->f_dsp_40_s16;
00989         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
00990         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, buffer);
00991       }
00992       break;
00993     case M32C_OPERAND_DSP_40_S8 :
00994       errmsg = insert_normal (cd, fields->f_dsp_40_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, buffer);
00995       break;
00996     case M32C_OPERAND_DSP_40_U16 :
00997       {
00998         long value = fields->f_dsp_40_u16;
00999         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01000         errmsg = insert_normal (cd, value, 0, 32, 8, 16, 32, total_length, buffer);
01001       }
01002       break;
01003     case M32C_OPERAND_DSP_40_U20 :
01004       {
01005         long value = fields->f_dsp_40_u20;
01006         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040))));
01007         errmsg = insert_normal (cd, value, 0, 32, 8, 20, 32, total_length, buffer);
01008       }
01009       break;
01010     case M32C_OPERAND_DSP_40_U24 :
01011       {
01012         long value = fields->f_dsp_40_u24;
01013         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
01014         errmsg = insert_normal (cd, value, 0, 32, 8, 24, 32, total_length, buffer);
01015       }
01016       break;
01017     case M32C_OPERAND_DSP_40_U8 :
01018       errmsg = insert_normal (cd, fields->f_dsp_40_u8, 0, 32, 8, 8, 32, total_length, buffer);
01019       break;
01020     case M32C_OPERAND_DSP_48_S16 :
01021       {
01022         long value = fields->f_dsp_48_s16;
01023         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
01024         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, buffer);
01025       }
01026       break;
01027     case M32C_OPERAND_DSP_48_S8 :
01028       errmsg = insert_normal (cd, fields->f_dsp_48_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, buffer);
01029       break;
01030     case M32C_OPERAND_DSP_48_U16 :
01031       {
01032         long value = fields->f_dsp_48_u16;
01033         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01034         errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
01035       }
01036       break;
01037     case M32C_OPERAND_DSP_48_U20 :
01038       {
01039 {
01040   FLD (f_dsp_64_u8) = ((((unsigned int) (FLD (f_dsp_48_u20)) >> (16))) & (15));
01041   FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_u20)) & (65535));
01042 }
01043         {
01044         long value = fields->f_dsp_48_u16;
01045         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01046         errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
01047       }
01048         if (errmsg)
01049           break;
01050         errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
01051         if (errmsg)
01052           break;
01053       }
01054       break;
01055     case M32C_OPERAND_DSP_48_U24 :
01056       {
01057 {
01058   FLD (f_dsp_64_u8) = ((((unsigned int) (FLD (f_dsp_48_u24)) >> (16))) & (255));
01059   FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_u24)) & (65535));
01060 }
01061         {
01062         long value = fields->f_dsp_48_u16;
01063         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01064         errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
01065       }
01066         if (errmsg)
01067           break;
01068         errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
01069         if (errmsg)
01070           break;
01071       }
01072       break;
01073     case M32C_OPERAND_DSP_48_U8 :
01074       errmsg = insert_normal (cd, fields->f_dsp_48_u8, 0, 32, 16, 8, 32, total_length, buffer);
01075       break;
01076     case M32C_OPERAND_DSP_8_S24 :
01077       {
01078         long value = fields->f_dsp_8_s24;
01079         value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16))));
01080         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 24, 32, total_length, buffer);
01081       }
01082       break;
01083     case M32C_OPERAND_DSP_8_S8 :
01084       errmsg = insert_normal (cd, fields->f_dsp_8_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, buffer);
01085       break;
01086     case M32C_OPERAND_DSP_8_U16 :
01087       {
01088         long value = fields->f_dsp_8_u16;
01089         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01090         errmsg = insert_normal (cd, value, 0, 0, 8, 16, 32, total_length, buffer);
01091       }
01092       break;
01093     case M32C_OPERAND_DSP_8_U24 :
01094       {
01095         long value = fields->f_dsp_8_u24;
01096         value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
01097         errmsg = insert_normal (cd, value, 0, 0, 8, 24, 32, total_length, buffer);
01098       }
01099       break;
01100     case M32C_OPERAND_DSP_8_U6 :
01101       errmsg = insert_normal (cd, fields->f_dsp_8_u6, 0, 0, 8, 6, 32, total_length, buffer);
01102       break;
01103     case M32C_OPERAND_DSP_8_U8 :
01104       errmsg = insert_normal (cd, fields->f_dsp_8_u8, 0, 0, 8, 8, 32, total_length, buffer);
01105       break;
01106     case M32C_OPERAND_DST16AN :
01107       errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
01108       break;
01109     case M32C_OPERAND_DST16AN_S :
01110       errmsg = insert_normal (cd, fields->f_dst16_an_s, 0, 0, 4, 1, 32, total_length, buffer);
01111       break;
01112     case M32C_OPERAND_DST16ANHI :
01113       errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
01114       break;
01115     case M32C_OPERAND_DST16ANQI :
01116       errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
01117       break;
01118     case M32C_OPERAND_DST16ANQI_S :
01119       errmsg = insert_normal (cd, fields->f_dst16_rn_QI_s, 0, 0, 5, 1, 32, total_length, buffer);
01120       break;
01121     case M32C_OPERAND_DST16ANSI :
01122       errmsg = insert_normal (cd, fields->f_dst16_an, 0, 0, 15, 1, 32, total_length, buffer);
01123       break;
01124     case M32C_OPERAND_DST16RNEXTQI :
01125       errmsg = insert_normal (cd, fields->f_dst16_rn_ext, 0, 0, 14, 1, 32, total_length, buffer);
01126       break;
01127     case M32C_OPERAND_DST16RNHI :
01128       errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
01129       break;
01130     case M32C_OPERAND_DST16RNQI :
01131       errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
01132       break;
01133     case M32C_OPERAND_DST16RNQI_S :
01134       errmsg = insert_normal (cd, fields->f_dst16_rn_QI_s, 0, 0, 5, 1, 32, total_length, buffer);
01135       break;
01136     case M32C_OPERAND_DST16RNSI :
01137       errmsg = insert_normal (cd, fields->f_dst16_rn, 0, 0, 14, 2, 32, total_length, buffer);
01138       break;
01139     case M32C_OPERAND_DST32ANEXTUNPREFIXED :
01140       errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
01141       break;
01142     case M32C_OPERAND_DST32ANPREFIXED :
01143       errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
01144       break;
01145     case M32C_OPERAND_DST32ANPREFIXEDHI :
01146       errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
01147       break;
01148     case M32C_OPERAND_DST32ANPREFIXEDQI :
01149       errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
01150       break;
01151     case M32C_OPERAND_DST32ANPREFIXEDSI :
01152       errmsg = insert_normal (cd, fields->f_dst32_an_prefixed, 0, 0, 17, 1, 32, total_length, buffer);
01153       break;
01154     case M32C_OPERAND_DST32ANUNPREFIXED :
01155       errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
01156       break;
01157     case M32C_OPERAND_DST32ANUNPREFIXEDHI :
01158       errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
01159       break;
01160     case M32C_OPERAND_DST32ANUNPREFIXEDQI :
01161       errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
01162       break;
01163     case M32C_OPERAND_DST32ANUNPREFIXEDSI :
01164       errmsg = insert_normal (cd, fields->f_dst32_an_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
01165       break;
01166     case M32C_OPERAND_DST32R0HI_S :
01167       break;
01168     case M32C_OPERAND_DST32R0QI_S :
01169       break;
01170     case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
01171       errmsg = insert_normal (cd, fields->f_dst32_rn_ext_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
01172       break;
01173     case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
01174       errmsg = insert_normal (cd, fields->f_dst32_rn_ext_unprefixed, 0, 0, 9, 1, 32, total_length, buffer);
01175       break;
01176     case M32C_OPERAND_DST32RNPREFIXEDHI :
01177       {
01178         long value = fields->f_dst32_rn_prefixed_HI;
01179         value = ((((value) + (2))) % (4));
01180         errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
01181       }
01182       break;
01183     case M32C_OPERAND_DST32RNPREFIXEDQI :
01184       {
01185         long value = fields->f_dst32_rn_prefixed_QI;
01186         value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
01187         errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
01188       }
01189       break;
01190     case M32C_OPERAND_DST32RNPREFIXEDSI :
01191       {
01192         long value = fields->f_dst32_rn_prefixed_SI;
01193         value = ((value) + (2));
01194         errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer);
01195       }
01196       break;
01197     case M32C_OPERAND_DST32RNUNPREFIXEDHI :
01198       {
01199         long value = fields->f_dst32_rn_unprefixed_HI;
01200         value = ((((value) + (2))) % (4));
01201         errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
01202       }
01203       break;
01204     case M32C_OPERAND_DST32RNUNPREFIXEDQI :
01205       {
01206         long value = fields->f_dst32_rn_unprefixed_QI;
01207         value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
01208         errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
01209       }
01210       break;
01211     case M32C_OPERAND_DST32RNUNPREFIXEDSI :
01212       {
01213         long value = fields->f_dst32_rn_unprefixed_SI;
01214         value = ((value) + (2));
01215         errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer);
01216       }
01217       break;
01218     case M32C_OPERAND_G :
01219       break;
01220     case M32C_OPERAND_IMM_12_S4 :
01221       errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
01222       break;
01223     case M32C_OPERAND_IMM_12_S4N :
01224       errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
01225       break;
01226     case M32C_OPERAND_IMM_13_U3 :
01227       errmsg = insert_normal (cd, fields->f_imm_13_u3, 0, 0, 13, 3, 32, total_length, buffer);
01228       break;
01229     case M32C_OPERAND_IMM_16_HI :
01230       {
01231         long value = fields->f_dsp_16_s16;
01232         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
01233         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
01234       }
01235       break;
01236     case M32C_OPERAND_IMM_16_QI :
01237       errmsg = insert_normal (cd, fields->f_dsp_16_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 8, 32, total_length, buffer);
01238       break;
01239     case M32C_OPERAND_IMM_16_SI :
01240       {
01241 {
01242   FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_dsp_16_s32)) >> (16))) & (65535));
01243   FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_s32)) & (65535));
01244 }
01245         {
01246         long value = fields->f_dsp_16_u16;
01247         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01248         errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer);
01249       }
01250         if (errmsg)
01251           break;
01252         {
01253         long value = fields->f_dsp_32_u16;
01254         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01255         errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer);
01256       }
01257         if (errmsg)
01258           break;
01259       }
01260       break;
01261     case M32C_OPERAND_IMM_20_S4 :
01262       errmsg = insert_normal (cd, fields->f_imm_20_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, buffer);
01263       break;
01264     case M32C_OPERAND_IMM_24_HI :
01265       {
01266 {
01267   FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255));
01268   FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_24_s16)) >> (8))) & (255));
01269 }
01270         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
01271         if (errmsg)
01272           break;
01273         errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
01274         if (errmsg)
01275           break;
01276       }
01277       break;
01278     case M32C_OPERAND_IMM_24_QI :
01279       errmsg = insert_normal (cd, fields->f_dsp_24_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
01280       break;
01281     case M32C_OPERAND_IMM_24_SI :
01282       {
01283 {
01284   FLD (f_dsp_32_u24) = ((((unsigned int) (FLD (f_dsp_24_s32)) >> (8))) & (16777215));
01285   FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s32)) & (255));
01286 }
01287         errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
01288         if (errmsg)
01289           break;
01290         {
01291         long value = fields->f_dsp_32_u24;
01292         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
01293         errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer);
01294       }
01295         if (errmsg)
01296           break;
01297       }
01298       break;
01299     case M32C_OPERAND_IMM_32_HI :
01300       {
01301         long value = fields->f_dsp_32_s16;
01302         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
01303         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, buffer);
01304       }
01305       break;
01306     case M32C_OPERAND_IMM_32_QI :
01307       errmsg = insert_normal (cd, fields->f_dsp_32_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 8, 32, total_length, buffer);
01308       break;
01309     case M32C_OPERAND_IMM_32_SI :
01310       {
01311         long value = fields->f_dsp_32_s32;
01312         value = EXTSISI (((((((((unsigned int) (value) >> (24))) & (255))) | (((((unsigned int) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000)))))));
01313         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 32, 32, total_length, buffer);
01314       }
01315       break;
01316     case M32C_OPERAND_IMM_40_HI :
01317       {
01318         long value = fields->f_dsp_40_s16;
01319         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
01320         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, buffer);
01321       }
01322       break;
01323     case M32C_OPERAND_IMM_40_QI :
01324       errmsg = insert_normal (cd, fields->f_dsp_40_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 8, 32, total_length, buffer);
01325       break;
01326     case M32C_OPERAND_IMM_40_SI :
01327       {
01328 {
01329   FLD (f_dsp_64_u8) = ((((unsigned int) (FLD (f_dsp_40_s32)) >> (24))) & (255));
01330   FLD (f_dsp_40_u24) = ((FLD (f_dsp_40_s32)) & (16777215));
01331 }
01332         {
01333         long value = fields->f_dsp_40_u24;
01334         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
01335         errmsg = insert_normal (cd, value, 0, 32, 8, 24, 32, total_length, buffer);
01336       }
01337         if (errmsg)
01338           break;
01339         errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
01340         if (errmsg)
01341           break;
01342       }
01343       break;
01344     case M32C_OPERAND_IMM_48_HI :
01345       {
01346         long value = fields->f_dsp_48_s16;
01347         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
01348         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, buffer);
01349       }
01350       break;
01351     case M32C_OPERAND_IMM_48_QI :
01352       errmsg = insert_normal (cd, fields->f_dsp_48_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 8, 32, total_length, buffer);
01353       break;
01354     case M32C_OPERAND_IMM_48_SI :
01355       {
01356 {
01357   FLD (f_dsp_64_u16) = ((((unsigned int) (FLD (f_dsp_48_s32)) >> (16))) & (65535));
01358   FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_s32)) & (65535));
01359 }
01360         {
01361         long value = fields->f_dsp_48_u16;
01362         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01363         errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer);
01364       }
01365         if (errmsg)
01366           break;
01367         {
01368         long value = fields->f_dsp_64_u16;
01369         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01370         errmsg = insert_normal (cd, value, 0, 64, 0, 16, 32, total_length, buffer);
01371       }
01372         if (errmsg)
01373           break;
01374       }
01375       break;
01376     case M32C_OPERAND_IMM_56_HI :
01377       {
01378 {
01379   FLD (f_dsp_56_u8) = ((FLD (f_dsp_56_s16)) & (255));
01380   FLD (f_dsp_64_u8) = ((((unsigned int) (FLD (f_dsp_56_s16)) >> (8))) & (255));
01381 }
01382         errmsg = insert_normal (cd, fields->f_dsp_56_u8, 0, 32, 24, 8, 32, total_length, buffer);
01383         if (errmsg)
01384           break;
01385         errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer);
01386         if (errmsg)
01387           break;
01388       }
01389       break;
01390     case M32C_OPERAND_IMM_56_QI :
01391       errmsg = insert_normal (cd, fields->f_dsp_56_s8, 0|(1<<CGEN_IFLD_SIGNED), 32, 24, 8, 32, total_length, buffer);
01392       break;
01393     case M32C_OPERAND_IMM_64_HI :
01394       {
01395         long value = fields->f_dsp_64_s16;
01396         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
01397         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 64, 0, 16, 32, total_length, buffer);
01398       }
01399       break;
01400     case M32C_OPERAND_IMM_8_HI :
01401       {
01402         long value = fields->f_dsp_8_s16;
01403         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
01404         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 16, 32, total_length, buffer);
01405       }
01406       break;
01407     case M32C_OPERAND_IMM_8_QI :
01408       errmsg = insert_normal (cd, fields->f_dsp_8_s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, buffer);
01409       break;
01410     case M32C_OPERAND_IMM_8_S4 :
01411       errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
01412       break;
01413     case M32C_OPERAND_IMM_8_S4N :
01414       errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
01415       break;
01416     case M32C_OPERAND_IMM_SH_12_S4 :
01417       errmsg = insert_normal (cd, fields->f_imm_12_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 12, 4, 32, total_length, buffer);
01418       break;
01419     case M32C_OPERAND_IMM_SH_20_S4 :
01420       errmsg = insert_normal (cd, fields->f_imm_20_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 4, 32, total_length, buffer);
01421       break;
01422     case M32C_OPERAND_IMM_SH_8_S4 :
01423       errmsg = insert_normal (cd, fields->f_imm_8_s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 4, 32, total_length, buffer);
01424       break;
01425     case M32C_OPERAND_IMM1_S :
01426       {
01427         long value = fields->f_imm1_S;
01428         value = ((value) - (1));
01429         errmsg = insert_normal (cd, value, 0, 0, 2, 1, 32, total_length, buffer);
01430       }
01431       break;
01432     case M32C_OPERAND_IMM3_S :
01433       {
01434 {
01435   FLD (f_7_1) = ((((FLD (f_imm3_S)) - (1))) & (1));
01436   FLD (f_2_2) = ((((unsigned int) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3));
01437 }
01438         errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
01439         if (errmsg)
01440           break;
01441         errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
01442         if (errmsg)
01443           break;
01444       }
01445       break;
01446     case M32C_OPERAND_LAB_16_8 :
01447       {
01448         long value = fields->f_lab_16_8;
01449         value = ((value) - (((pc) + (2))));
01450         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 8, 32, total_length, buffer);
01451       }
01452       break;
01453     case M32C_OPERAND_LAB_24_8 :
01454       {
01455         long value = fields->f_lab_24_8;
01456         value = ((value) - (((pc) + (2))));
01457         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 24, 8, 32, total_length, buffer);
01458       }
01459       break;
01460     case M32C_OPERAND_LAB_32_8 :
01461       {
01462         long value = fields->f_lab_32_8;
01463         value = ((value) - (((pc) + (2))));
01464         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 0, 8, 32, total_length, buffer);
01465       }
01466       break;
01467     case M32C_OPERAND_LAB_40_8 :
01468       {
01469         long value = fields->f_lab_40_8;
01470         value = ((value) - (((pc) + (2))));
01471         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 32, 8, 8, 32, total_length, buffer);
01472       }
01473       break;
01474     case M32C_OPERAND_LAB_5_3 :
01475       {
01476         long value = fields->f_lab_5_3;
01477         value = ((value) - (((pc) + (2))));
01478         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 3, 32, total_length, buffer);
01479       }
01480       break;
01481     case M32C_OPERAND_LAB_8_16 :
01482       {
01483         long value = fields->f_lab_8_16;
01484         value = ((((((((value) - (((pc) + (1))))) & (255))) << (8))) | (((unsigned int) (((((value) - (((pc) + (1))))) & (65535))) >> (8))));
01485         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGN_OPT)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 16, 32, total_length, buffer);
01486       }
01487       break;
01488     case M32C_OPERAND_LAB_8_24 :
01489       {
01490         long value = fields->f_lab_8_24;
01491         value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
01492         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 24, 32, total_length, buffer);
01493       }
01494       break;
01495     case M32C_OPERAND_LAB_8_8 :
01496       {
01497         long value = fields->f_lab_8_8;
01498         value = ((value) - (((pc) + (1))));
01499         errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 8, 32, total_length, buffer);
01500       }
01501       break;
01502     case M32C_OPERAND_LAB32_JMP_S :
01503       {
01504 {
01505   SI tmp_val;
01506   tmp_val = ((((FLD (f_lab32_jmp_s)) - (pc))) - (2));
01507   FLD (f_7_1) = ((tmp_val) & (1));
01508   FLD (f_2_2) = ((unsigned int) (tmp_val) >> (1));
01509 }
01510         errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer);
01511         if (errmsg)
01512           break;
01513         errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
01514         if (errmsg)
01515           break;
01516       }
01517       break;
01518     case M32C_OPERAND_Q :
01519       break;
01520     case M32C_OPERAND_R0 :
01521       break;
01522     case M32C_OPERAND_R0H :
01523       break;
01524     case M32C_OPERAND_R0L :
01525       break;
01526     case M32C_OPERAND_R1 :
01527       break;
01528     case M32C_OPERAND_R1R2R0 :
01529       break;
01530     case M32C_OPERAND_R2 :
01531       break;
01532     case M32C_OPERAND_R2R0 :
01533       break;
01534     case M32C_OPERAND_R3 :
01535       break;
01536     case M32C_OPERAND_R3R1 :
01537       break;
01538     case M32C_OPERAND_REGSETPOP :
01539       errmsg = insert_normal (cd, fields->f_8_8, 0, 0, 8, 8, 32, total_length, buffer);
01540       break;
01541     case M32C_OPERAND_REGSETPUSH :
01542       errmsg = insert_normal (cd, fields->f_8_8, 0, 0, 8, 8, 32, total_length, buffer);
01543       break;
01544     case M32C_OPERAND_RN16_PUSH_S :
01545       errmsg = insert_normal (cd, fields->f_4_1, 0, 0, 4, 1, 32, total_length, buffer);
01546       break;
01547     case M32C_OPERAND_S :
01548       break;
01549     case M32C_OPERAND_SRC16AN :
01550       errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
01551       break;
01552     case M32C_OPERAND_SRC16ANHI :
01553       errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
01554       break;
01555     case M32C_OPERAND_SRC16ANQI :
01556       errmsg = insert_normal (cd, fields->f_src16_an, 0, 0, 11, 1, 32, total_length, buffer);
01557       break;
01558     case M32C_OPERAND_SRC16RNHI :
01559       errmsg = insert_normal (cd, fields->f_src16_rn, 0, 0, 10, 2, 32, total_length, buffer);
01560       break;
01561     case M32C_OPERAND_SRC16RNQI :
01562       errmsg = insert_normal (cd, fields->f_src16_rn, 0, 0, 10, 2, 32, total_length, buffer);
01563       break;
01564     case M32C_OPERAND_SRC32ANPREFIXED :
01565       errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
01566       break;
01567     case M32C_OPERAND_SRC32ANPREFIXEDHI :
01568       errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
01569       break;
01570     case M32C_OPERAND_SRC32ANPREFIXEDQI :
01571       errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
01572       break;
01573     case M32C_OPERAND_SRC32ANPREFIXEDSI :
01574       errmsg = insert_normal (cd, fields->f_src32_an_prefixed, 0, 0, 19, 1, 32, total_length, buffer);
01575       break;
01576     case M32C_OPERAND_SRC32ANUNPREFIXED :
01577       errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
01578       break;
01579     case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
01580       errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
01581       break;
01582     case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
01583       errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
01584       break;
01585     case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
01586       errmsg = insert_normal (cd, fields->f_src32_an_unprefixed, 0, 0, 11, 1, 32, total_length, buffer);
01587       break;
01588     case M32C_OPERAND_SRC32RNPREFIXEDHI :
01589       {
01590         long value = fields->f_src32_rn_prefixed_HI;
01591         value = ((((value) + (2))) % (4));
01592         errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
01593       }
01594       break;
01595     case M32C_OPERAND_SRC32RNPREFIXEDQI :
01596       {
01597         long value = fields->f_src32_rn_prefixed_QI;
01598         value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
01599         errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
01600       }
01601       break;
01602     case M32C_OPERAND_SRC32RNPREFIXEDSI :
01603       {
01604         long value = fields->f_src32_rn_prefixed_SI;
01605         value = ((value) + (2));
01606         errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer);
01607       }
01608       break;
01609     case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
01610       {
01611         long value = fields->f_src32_rn_unprefixed_HI;
01612         value = ((((value) + (2))) % (4));
01613         errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
01614       }
01615       break;
01616     case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
01617       {
01618         long value = fields->f_src32_rn_unprefixed_QI;
01619         value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1))));
01620         errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
01621       }
01622       break;
01623     case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
01624       {
01625         long value = fields->f_src32_rn_unprefixed_SI;
01626         value = ((value) + (2));
01627         errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer);
01628       }
01629       break;
01630     case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
01631       errmsg = insert_normal (cd, fields->f_5_1, 0, 0, 5, 1, 32, total_length, buffer);
01632       break;
01633     case M32C_OPERAND_X :
01634       break;
01635     case M32C_OPERAND_Z :
01636       break;
01637     case M32C_OPERAND_COND16_16 :
01638       errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
01639       break;
01640     case M32C_OPERAND_COND16_24 :
01641       errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
01642       break;
01643     case M32C_OPERAND_COND16_32 :
01644       errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
01645       break;
01646     case M32C_OPERAND_COND16C :
01647       errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
01648       break;
01649     case M32C_OPERAND_COND16J :
01650       errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
01651       break;
01652     case M32C_OPERAND_COND16J5 :
01653       errmsg = insert_normal (cd, fields->f_cond16j_5, 0, 0, 5, 3, 32, total_length, buffer);
01654       break;
01655     case M32C_OPERAND_COND32 :
01656       {
01657 {
01658   FLD (f_9_1) = ((((unsigned int) (FLD (f_cond32)) >> (3))) & (1));
01659   FLD (f_13_3) = ((FLD (f_cond32)) & (7));
01660 }
01661         errmsg = insert_normal (cd, fields->f_9_1, 0, 0, 9, 1, 32, total_length, buffer);
01662         if (errmsg)
01663           break;
01664         errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
01665         if (errmsg)
01666           break;
01667       }
01668       break;
01669     case M32C_OPERAND_COND32_16 :
01670       errmsg = insert_normal (cd, fields->f_dsp_16_u8, 0, 0, 16, 8, 32, total_length, buffer);
01671       break;
01672     case M32C_OPERAND_COND32_24 :
01673       errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer);
01674       break;
01675     case M32C_OPERAND_COND32_32 :
01676       errmsg = insert_normal (cd, fields->f_dsp_32_u8, 0, 32, 0, 8, 32, total_length, buffer);
01677       break;
01678     case M32C_OPERAND_COND32_40 :
01679       errmsg = insert_normal (cd, fields->f_dsp_40_u8, 0, 32, 8, 8, 32, total_length, buffer);
01680       break;
01681     case M32C_OPERAND_COND32J :
01682       {
01683 {
01684   FLD (f_1_3) = ((((unsigned int) (FLD (f_cond32j)) >> (1))) & (7));
01685   FLD (f_7_1) = ((FLD (f_cond32j)) & (1));
01686 }
01687         errmsg = insert_normal (cd, fields->f_1_3, 0, 0, 1, 3, 32, total_length, buffer);
01688         if (errmsg)
01689           break;
01690         errmsg = insert_normal (cd, fields->f_7_1, 0, 0, 7, 1, 32, total_length, buffer);
01691         if (errmsg)
01692           break;
01693       }
01694       break;
01695     case M32C_OPERAND_CR1_PREFIXED_32 :
01696       errmsg = insert_normal (cd, fields->f_21_3, 0, 0, 21, 3, 32, total_length, buffer);
01697       break;
01698     case M32C_OPERAND_CR1_UNPREFIXED_32 :
01699       errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
01700       break;
01701     case M32C_OPERAND_CR16 :
01702       errmsg = insert_normal (cd, fields->f_9_3, 0, 0, 9, 3, 32, total_length, buffer);
01703       break;
01704     case M32C_OPERAND_CR2_32 :
01705       errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
01706       break;
01707     case M32C_OPERAND_CR3_PREFIXED_32 :
01708       errmsg = insert_normal (cd, fields->f_21_3, 0, 0, 21, 3, 32, total_length, buffer);
01709       break;
01710     case M32C_OPERAND_CR3_UNPREFIXED_32 :
01711       errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
01712       break;
01713     case M32C_OPERAND_FLAGS16 :
01714       errmsg = insert_normal (cd, fields->f_9_3, 0, 0, 9, 3, 32, total_length, buffer);
01715       break;
01716     case M32C_OPERAND_FLAGS32 :
01717       errmsg = insert_normal (cd, fields->f_13_3, 0, 0, 13, 3, 32, total_length, buffer);
01718       break;
01719     case M32C_OPERAND_SCCOND32 :
01720       errmsg = insert_normal (cd, fields->f_cond16, 0, 0, 12, 4, 32, total_length, buffer);
01721       break;
01722     case M32C_OPERAND_SIZE :
01723       break;
01724 
01725     default :
01726       /* xgettext:c-format */
01727       fprintf (stderr, _("Unrecognized field %d while building insn.\n"),
01728               opindex);
01729       abort ();
01730   }
01731 
01732   return errmsg;
01733 }
01734 
01735 int m32c_cgen_extract_operand
01736   (CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
01737 
01738 /* Main entry point for operand extraction.
01739    The result is <= 0 for error, >0 for success.
01740    ??? Actual values aren't well defined right now.
01741 
01742    This function is basically just a big switch statement.  Earlier versions
01743    used tables to look up the function to use, but
01744    - if the table contains both assembler and disassembler functions then
01745      the disassembler contains much of the assembler and vice-versa,
01746    - there's a lot of inlining possibilities as things grow,
01747    - using a switch statement avoids the function call overhead.
01748 
01749    This function could be moved into `print_insn_normal', but keeping it
01750    separate makes clear the interface between `print_insn_normal' and each of
01751    the handlers.  */
01752 
01753 int
01754 m32c_cgen_extract_operand (CGEN_CPU_DESC cd,
01755                           int opindex,
01756                           CGEN_EXTRACT_INFO *ex_info,
01757                           CGEN_INSN_INT insn_value,
01758                           CGEN_FIELDS * fields,
01759                           bfd_vma pc)
01760 {
01761   /* Assume success (for those operands that are nops).  */
01762   int length = 1;
01763   unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
01764 
01765   switch (opindex)
01766     {
01767     case M32C_OPERAND_A0 :
01768       break;
01769     case M32C_OPERAND_A1 :
01770       break;
01771     case M32C_OPERAND_AN16_PUSH_S :
01772       length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_4_1);
01773       break;
01774     case M32C_OPERAND_BIT16AN :
01775       length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
01776       break;
01777     case M32C_OPERAND_BIT16RN :
01778       length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
01779       break;
01780     case M32C_OPERAND_BIT3_S :
01781       {
01782         length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
01783         if (length <= 0) break;
01784         length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
01785         if (length <= 0) break;
01786 {
01787   FLD (f_imm3_S) = ((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (1));
01788 }
01789       }
01790       break;
01791     case M32C_OPERAND_BIT32ANPREFIXED :
01792       length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
01793       break;
01794     case M32C_OPERAND_BIT32ANUNPREFIXED :
01795       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
01796       break;
01797     case M32C_OPERAND_BIT32RNPREFIXED :
01798       {
01799         long value;
01800         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
01801         value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
01802         fields->f_dst32_rn_prefixed_QI = value;
01803       }
01804       break;
01805     case M32C_OPERAND_BIT32RNUNPREFIXED :
01806       {
01807         long value;
01808         length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
01809         value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
01810         fields->f_dst32_rn_unprefixed_QI = value;
01811       }
01812       break;
01813     case M32C_OPERAND_BITBASE16_16_S8 :
01814       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);
01815       break;
01816     case M32C_OPERAND_BITBASE16_16_U16 :
01817       {
01818         long value;
01819         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
01820         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01821         fields->f_dsp_16_u16 = value;
01822       }
01823       break;
01824     case M32C_OPERAND_BITBASE16_16_U8 :
01825       length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
01826       break;
01827     case M32C_OPERAND_BITBASE16_8_U11_S :
01828       {
01829         length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_bitno16_S);
01830         if (length <= 0) break;
01831         length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_u8);
01832         if (length <= 0) break;
01833 {
01834   FLD (f_bitbase16_u11_S) = ((((FLD (f_dsp_8_u8)) << (3))) | (FLD (f_bitno16_S)));
01835 }
01836       }
01837       break;
01838     case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
01839       {
01840         length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
01841         if (length <= 0) break;
01842         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);
01843         if (length <= 0) break;
01844 {
01845   FLD (f_bitbase32_16_s11_unprefixed) = ((((FLD (f_dsp_16_s8)) << (3))) | (FLD (f_bitno32_unprefixed)));
01846 }
01847       }
01848       break;
01849     case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
01850       {
01851         length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
01852         if (length <= 0) break;
01853         {
01854         long value;
01855         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
01856         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
01857         fields->f_dsp_16_s16 = value;
01858       }
01859         if (length <= 0) break;
01860 {
01861   FLD (f_bitbase32_16_s19_unprefixed) = ((((FLD (f_dsp_16_s16)) << (3))) | (FLD (f_bitno32_unprefixed)));
01862 }
01863       }
01864       break;
01865     case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
01866       {
01867         length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
01868         if (length <= 0) break;
01869         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
01870         if (length <= 0) break;
01871 {
01872   FLD (f_bitbase32_16_u11_unprefixed) = ((((FLD (f_dsp_16_u8)) << (3))) | (FLD (f_bitno32_unprefixed)));
01873 }
01874       }
01875       break;
01876     case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
01877       {
01878         length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
01879         if (length <= 0) break;
01880         {
01881         long value;
01882         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
01883         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01884         fields->f_dsp_16_u16 = value;
01885       }
01886         if (length <= 0) break;
01887 {
01888   FLD (f_bitbase32_16_u19_unprefixed) = ((((FLD (f_dsp_16_u16)) << (3))) | (FLD (f_bitno32_unprefixed)));
01889 }
01890       }
01891       break;
01892     case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
01893       {
01894         length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
01895         if (length <= 0) break;
01896         {
01897         long value;
01898         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
01899         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01900         fields->f_dsp_16_u16 = value;
01901       }
01902         if (length <= 0) break;
01903         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
01904         if (length <= 0) break;
01905 {
01906   FLD (f_bitbase32_16_u27_unprefixed) = ((((FLD (f_dsp_16_u16)) << (3))) | (((((FLD (f_dsp_32_u8)) << (19))) | (FLD (f_bitno32_unprefixed)))));
01907 }
01908       }
01909       break;
01910     case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
01911       {
01912         length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
01913         if (length <= 0) break;
01914         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);
01915         if (length <= 0) break;
01916 {
01917   FLD (f_bitbase32_24_s11_prefixed) = ((((FLD (f_dsp_24_s8)) << (3))) | (FLD (f_bitno32_prefixed)));
01918 }
01919       }
01920       break;
01921     case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
01922       {
01923         length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
01924         if (length <= 0) break;
01925         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
01926         if (length <= 0) break;
01927         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);
01928         if (length <= 0) break;
01929 {
01930   FLD (f_bitbase32_24_s19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_s8)) << (11))) | (FLD (f_bitno32_prefixed)))));
01931 }
01932       }
01933       break;
01934     case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
01935       {
01936         length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
01937         if (length <= 0) break;
01938         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
01939         if (length <= 0) break;
01940 {
01941   FLD (f_bitbase32_24_u11_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (FLD (f_bitno32_prefixed)));
01942 }
01943       }
01944       break;
01945     case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
01946       {
01947         length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
01948         if (length <= 0) break;
01949         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
01950         if (length <= 0) break;
01951         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
01952         if (length <= 0) break;
01953 {
01954   FLD (f_bitbase32_24_u19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_u8)) << (11))) | (FLD (f_bitno32_prefixed)))));
01955 }
01956       }
01957       break;
01958     case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
01959       {
01960         length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
01961         if (length <= 0) break;
01962         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
01963         if (length <= 0) break;
01964         {
01965         long value;
01966         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
01967         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
01968         fields->f_dsp_32_u16 = value;
01969       }
01970         if (length <= 0) break;
01971 {
01972   FLD (f_bitbase32_24_u27_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_u16)) << (11))) | (FLD (f_bitno32_prefixed)))));
01973 }
01974       }
01975       break;
01976     case M32C_OPERAND_BITNO16R :
01977       length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
01978       break;
01979     case M32C_OPERAND_BITNO32PREFIXED :
01980       length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_bitno32_prefixed);
01981       break;
01982     case M32C_OPERAND_BITNO32UNPREFIXED :
01983       length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_bitno32_unprefixed);
01984       break;
01985     case M32C_OPERAND_DSP_10_U6 :
01986       length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 6, 32, total_length, pc, & fields->f_dsp_10_u6);
01987       break;
01988     case M32C_OPERAND_DSP_16_S16 :
01989       {
01990         long value;
01991         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
01992         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
01993         fields->f_dsp_16_s16 = value;
01994       }
01995       break;
01996     case M32C_OPERAND_DSP_16_S8 :
01997       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);
01998       break;
01999     case M32C_OPERAND_DSP_16_U16 :
02000       {
02001         long value;
02002         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
02003         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02004         fields->f_dsp_16_u16 = value;
02005       }
02006       break;
02007     case M32C_OPERAND_DSP_16_U20 :
02008       {
02009         {
02010         long value;
02011         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
02012         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02013         fields->f_dsp_16_u16 = value;
02014       }
02015         if (length <= 0) break;
02016         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
02017         if (length <= 0) break;
02018 {
02019   FLD (f_dsp_16_u24) = ((((FLD (f_dsp_32_u8)) << (16))) | (FLD (f_dsp_16_u16)));
02020 }
02021       }
02022       break;
02023     case M32C_OPERAND_DSP_16_U24 :
02024       {
02025         {
02026         long value;
02027         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
02028         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02029         fields->f_dsp_16_u16 = value;
02030       }
02031         if (length <= 0) break;
02032         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
02033         if (length <= 0) break;
02034 {
02035   FLD (f_dsp_16_u24) = ((((FLD (f_dsp_32_u8)) << (16))) | (FLD (f_dsp_16_u16)));
02036 }
02037       }
02038       break;
02039     case M32C_OPERAND_DSP_16_U8 :
02040       length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
02041       break;
02042     case M32C_OPERAND_DSP_24_S16 :
02043       {
02044         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
02045         if (length <= 0) break;
02046         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
02047         if (length <= 0) break;
02048 {
02049   FLD (f_dsp_24_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8))))));
02050 }
02051       }
02052       break;
02053     case M32C_OPERAND_DSP_24_S8 :
02054       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);
02055       break;
02056     case M32C_OPERAND_DSP_24_U16 :
02057       {
02058         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
02059         if (length <= 0) break;
02060         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
02061         if (length <= 0) break;
02062 {
02063   FLD (f_dsp_24_u16) = ((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8)));
02064 }
02065       }
02066       break;
02067     case M32C_OPERAND_DSP_24_U20 :
02068       {
02069         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
02070         if (length <= 0) break;
02071         {
02072         long value;
02073         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
02074         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02075         fields->f_dsp_32_u16 = value;
02076       }
02077         if (length <= 0) break;
02078 {
02079   FLD (f_dsp_24_u24) = ((((FLD (f_dsp_32_u16)) << (8))) | (FLD (f_dsp_24_u8)));
02080 }
02081       }
02082       break;
02083     case M32C_OPERAND_DSP_24_U24 :
02084       {
02085         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
02086         if (length <= 0) break;
02087         {
02088         long value;
02089         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
02090         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02091         fields->f_dsp_32_u16 = value;
02092       }
02093         if (length <= 0) break;
02094 {
02095   FLD (f_dsp_24_u24) = ((((FLD (f_dsp_32_u16)) << (8))) | (FLD (f_dsp_24_u8)));
02096 }
02097       }
02098       break;
02099     case M32C_OPERAND_DSP_24_U8 :
02100       length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
02101       break;
02102     case M32C_OPERAND_DSP_32_S16 :
02103       {
02104         long value;
02105         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value);
02106         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
02107         fields->f_dsp_32_s16 = value;
02108       }
02109       break;
02110     case M32C_OPERAND_DSP_32_S8 :
02111       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);
02112       break;
02113     case M32C_OPERAND_DSP_32_U16 :
02114       {
02115         long value;
02116         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
02117         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02118         fields->f_dsp_32_u16 = value;
02119       }
02120       break;
02121     case M32C_OPERAND_DSP_32_U20 :
02122       {
02123         long value;
02124         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
02125         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
02126         fields->f_dsp_32_u24 = value;
02127       }
02128       break;
02129     case M32C_OPERAND_DSP_32_U24 :
02130       {
02131         long value;
02132         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
02133         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
02134         fields->f_dsp_32_u24 = value;
02135       }
02136       break;
02137     case M32C_OPERAND_DSP_32_U8 :
02138       length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
02139       break;
02140     case M32C_OPERAND_DSP_40_S16 :
02141       {
02142         long value;
02143         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, pc, & value);
02144         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
02145         fields->f_dsp_40_s16 = value;
02146       }
02147       break;
02148     case M32C_OPERAND_DSP_40_S8 :
02149       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);
02150       break;
02151     case M32C_OPERAND_DSP_40_U16 :
02152       {
02153         long value;
02154         length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 16, 32, total_length, pc, & value);
02155         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02156         fields->f_dsp_40_u16 = value;
02157       }
02158       break;
02159     case M32C_OPERAND_DSP_40_U20 :
02160       {
02161         long value;
02162         length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 20, 32, total_length, pc, & value);
02163         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040))));
02164         fields->f_dsp_40_u20 = value;
02165       }
02166       break;
02167     case M32C_OPERAND_DSP_40_U24 :
02168       {
02169         long value;
02170         length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value);
02171         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
02172         fields->f_dsp_40_u24 = value;
02173       }
02174       break;
02175     case M32C_OPERAND_DSP_40_U8 :
02176       length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_u8);
02177       break;
02178     case M32C_OPERAND_DSP_48_S16 :
02179       {
02180         long value;
02181         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, pc, & value);
02182         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
02183         fields->f_dsp_48_s16 = value;
02184       }
02185       break;
02186     case M32C_OPERAND_DSP_48_S8 :
02187       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);
02188       break;
02189     case M32C_OPERAND_DSP_48_U16 :
02190       {
02191         long value;
02192         length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
02193         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02194         fields->f_dsp_48_u16 = value;
02195       }
02196       break;
02197     case M32C_OPERAND_DSP_48_U20 :
02198       {
02199         {
02200         long value;
02201         length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
02202         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02203         fields->f_dsp_48_u16 = value;
02204       }
02205         if (length <= 0) break;
02206         length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
02207         if (length <= 0) break;
02208 {
02209   FLD (f_dsp_48_u20) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u8)) << (16))) & (983040))));
02210 }
02211       }
02212       break;
02213     case M32C_OPERAND_DSP_48_U24 :
02214       {
02215         {
02216         long value;
02217         length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
02218         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02219         fields->f_dsp_48_u16 = value;
02220       }
02221         if (length <= 0) break;
02222         length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
02223         if (length <= 0) break;
02224 {
02225   FLD (f_dsp_48_u24) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u8)) << (16))) & (16711680))));
02226 }
02227       }
02228       break;
02229     case M32C_OPERAND_DSP_48_U8 :
02230       length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 8, 32, total_length, pc, & fields->f_dsp_48_u8);
02231       break;
02232     case M32C_OPERAND_DSP_8_S24 :
02233       {
02234         long value;
02235         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 24, 32, total_length, pc, & value);
02236         value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16))));
02237         fields->f_dsp_8_s24 = value;
02238       }
02239       break;
02240     case M32C_OPERAND_DSP_8_S8 :
02241       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);
02242       break;
02243     case M32C_OPERAND_DSP_8_U16 :
02244       {
02245         long value;
02246         length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 16, 32, total_length, pc, & value);
02247         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02248         fields->f_dsp_8_u16 = value;
02249       }
02250       break;
02251     case M32C_OPERAND_DSP_8_U24 :
02252       {
02253         long value;
02254         length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 24, 32, total_length, pc, & value);
02255         value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
02256         fields->f_dsp_8_u24 = value;
02257       }
02258       break;
02259     case M32C_OPERAND_DSP_8_U6 :
02260       length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 6, 32, total_length, pc, & fields->f_dsp_8_u6);
02261       break;
02262     case M32C_OPERAND_DSP_8_U8 :
02263       length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_dsp_8_u8);
02264       break;
02265     case M32C_OPERAND_DST16AN :
02266       length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
02267       break;
02268     case M32C_OPERAND_DST16AN_S :
02269       length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_dst16_an_s);
02270       break;
02271     case M32C_OPERAND_DST16ANHI :
02272       length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
02273       break;
02274     case M32C_OPERAND_DST16ANQI :
02275       length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
02276       break;
02277     case M32C_OPERAND_DST16ANQI_S :
02278       length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_dst16_rn_QI_s);
02279       break;
02280     case M32C_OPERAND_DST16ANSI :
02281       length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_dst16_an);
02282       break;
02283     case M32C_OPERAND_DST16RNEXTQI :
02284       length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 1, 32, total_length, pc, & fields->f_dst16_rn_ext);
02285       break;
02286     case M32C_OPERAND_DST16RNHI :
02287       length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
02288       break;
02289     case M32C_OPERAND_DST16RNQI :
02290       length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
02291       break;
02292     case M32C_OPERAND_DST16RNQI_S :
02293       length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_dst16_rn_QI_s);
02294       break;
02295     case M32C_OPERAND_DST16RNSI :
02296       length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 2, 32, total_length, pc, & fields->f_dst16_rn);
02297       break;
02298     case M32C_OPERAND_DST32ANEXTUNPREFIXED :
02299       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
02300       break;
02301     case M32C_OPERAND_DST32ANPREFIXED :
02302       length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
02303       break;
02304     case M32C_OPERAND_DST32ANPREFIXEDHI :
02305       length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
02306       break;
02307     case M32C_OPERAND_DST32ANPREFIXEDQI :
02308       length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
02309       break;
02310     case M32C_OPERAND_DST32ANPREFIXEDSI :
02311       length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_dst32_an_prefixed);
02312       break;
02313     case M32C_OPERAND_DST32ANUNPREFIXED :
02314       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
02315       break;
02316     case M32C_OPERAND_DST32ANUNPREFIXEDHI :
02317       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
02318       break;
02319     case M32C_OPERAND_DST32ANUNPREFIXEDQI :
02320       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
02321       break;
02322     case M32C_OPERAND_DST32ANUNPREFIXEDSI :
02323       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_an_unprefixed);
02324       break;
02325     case M32C_OPERAND_DST32R0HI_S :
02326       break;
02327     case M32C_OPERAND_DST32R0QI_S :
02328       break;
02329     case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
02330       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_rn_ext_unprefixed);
02331       break;
02332     case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
02333       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_dst32_rn_ext_unprefixed);
02334       break;
02335     case M32C_OPERAND_DST32RNPREFIXEDHI :
02336       {
02337         long value;
02338         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
02339         value = ((((value) + (2))) % (4));
02340         fields->f_dst32_rn_prefixed_HI = value;
02341       }
02342       break;
02343     case M32C_OPERAND_DST32RNPREFIXEDQI :
02344       {
02345         long value;
02346         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
02347         value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
02348         fields->f_dst32_rn_prefixed_QI = value;
02349       }
02350       break;
02351     case M32C_OPERAND_DST32RNPREFIXEDSI :
02352       {
02353         long value;
02354         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value);
02355         value = ((value) - (2));
02356         fields->f_dst32_rn_prefixed_SI = value;
02357       }
02358       break;
02359     case M32C_OPERAND_DST32RNUNPREFIXEDHI :
02360       {
02361         long value;
02362         length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
02363         value = ((((value) + (2))) % (4));
02364         fields->f_dst32_rn_unprefixed_HI = value;
02365       }
02366       break;
02367     case M32C_OPERAND_DST32RNUNPREFIXEDQI :
02368       {
02369         long value;
02370         length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
02371         value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
02372         fields->f_dst32_rn_unprefixed_QI = value;
02373       }
02374       break;
02375     case M32C_OPERAND_DST32RNUNPREFIXEDSI :
02376       {
02377         long value;
02378         length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value);
02379         value = ((value) - (2));
02380         fields->f_dst32_rn_unprefixed_SI = value;
02381       }
02382       break;
02383     case M32C_OPERAND_G :
02384       break;
02385     case M32C_OPERAND_IMM_12_S4 :
02386       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);
02387       break;
02388     case M32C_OPERAND_IMM_12_S4N :
02389       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);
02390       break;
02391     case M32C_OPERAND_IMM_13_U3 :
02392       length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_imm_13_u3);
02393       break;
02394     case M32C_OPERAND_IMM_16_HI :
02395       {
02396         long value;
02397         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & value);
02398         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
02399         fields->f_dsp_16_s16 = value;
02400       }
02401       break;
02402     case M32C_OPERAND_IMM_16_QI :
02403       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);
02404       break;
02405     case M32C_OPERAND_IMM_16_SI :
02406       {
02407         {
02408         long value;
02409         length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value);
02410         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02411         fields->f_dsp_16_u16 = value;
02412       }
02413         if (length <= 0) break;
02414         {
02415         long value;
02416         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value);
02417         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02418         fields->f_dsp_32_u16 = value;
02419       }
02420         if (length <= 0) break;
02421 {
02422   FLD (f_dsp_16_s32) = ((((FLD (f_dsp_16_u16)) & (65535))) | (((((FLD (f_dsp_32_u16)) << (16))) & (0xffff0000))));
02423 }
02424       }
02425       break;
02426     case M32C_OPERAND_IMM_20_S4 :
02427       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);
02428       break;
02429     case M32C_OPERAND_IMM_24_HI :
02430       {
02431         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
02432         if (length <= 0) break;
02433         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
02434         if (length <= 0) break;
02435 {
02436   FLD (f_dsp_24_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_32_u8)) << (8))) | (FLD (f_dsp_24_u8))))));
02437 }
02438       }
02439       break;
02440     case M32C_OPERAND_IMM_24_QI :
02441       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);
02442       break;
02443     case M32C_OPERAND_IMM_24_SI :
02444       {
02445         length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
02446         if (length <= 0) break;
02447         {
02448         long value;
02449         length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value);
02450         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
02451         fields->f_dsp_32_u24 = value;
02452       }
02453         if (length <= 0) break;
02454 {
02455   FLD (f_dsp_24_s32) = ((((FLD (f_dsp_24_u8)) & (255))) | (((((FLD (f_dsp_32_u24)) << (8))) & (0xffffff00))));
02456 }
02457       }
02458       break;
02459     case M32C_OPERAND_IMM_32_HI :
02460       {
02461         long value;
02462         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value);
02463         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
02464         fields->f_dsp_32_s16 = value;
02465       }
02466       break;
02467     case M32C_OPERAND_IMM_32_QI :
02468       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);
02469       break;
02470     case M32C_OPERAND_IMM_32_SI :
02471       {
02472         long value;
02473         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 32, 32, total_length, pc, & value);
02474         value = EXTSISI (((((((((unsigned int) (value) >> (24))) & (255))) | (((((unsigned int) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000)))))));
02475         fields->f_dsp_32_s32 = value;
02476       }
02477       break;
02478     case M32C_OPERAND_IMM_40_HI :
02479       {
02480         long value;
02481         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 8, 16, 32, total_length, pc, & value);
02482         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
02483         fields->f_dsp_40_s16 = value;
02484       }
02485       break;
02486     case M32C_OPERAND_IMM_40_QI :
02487       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);
02488       break;
02489     case M32C_OPERAND_IMM_40_SI :
02490       {
02491         {
02492         long value;
02493         length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value);
02494         value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680))));
02495         fields->f_dsp_40_u24 = value;
02496       }
02497         if (length <= 0) break;
02498         length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
02499         if (length <= 0) break;
02500 {
02501   FLD (f_dsp_40_s32) = ((((FLD (f_dsp_40_u24)) & (16777215))) | (((((FLD (f_dsp_64_u8)) << (24))) & (0xff000000))));
02502 }
02503       }
02504       break;
02505     case M32C_OPERAND_IMM_48_HI :
02506       {
02507         long value;
02508         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 16, 16, 32, total_length, pc, & value);
02509         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
02510         fields->f_dsp_48_s16 = value;
02511       }
02512       break;
02513     case M32C_OPERAND_IMM_48_QI :
02514       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);
02515       break;
02516     case M32C_OPERAND_IMM_48_SI :
02517       {
02518         {
02519         long value;
02520         length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value);
02521         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02522         fields->f_dsp_48_u16 = value;
02523       }
02524         if (length <= 0) break;
02525         {
02526         long value;
02527         length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 16, 32, total_length, pc, & value);
02528         value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
02529         fields->f_dsp_64_u16 = value;
02530       }
02531         if (length <= 0) break;
02532 {
02533   FLD (f_dsp_48_s32) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u16)) << (16))) & (0xffff0000))));
02534 }
02535       }
02536       break;
02537     case M32C_OPERAND_IMM_56_HI :
02538       {
02539         length = extract_normal (cd, ex_info, insn_value, 0, 32, 24, 8, 32, total_length, pc, & fields->f_dsp_56_u8);
02540         if (length <= 0) break;
02541         length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8);
02542         if (length <= 0) break;
02543 {
02544   FLD (f_dsp_56_s16) = EXTHISI (((HI) (UINT) (((((FLD (f_dsp_64_u8)) << (8))) | (FLD (f_dsp_56_u8))))));
02545 }
02546       }
02547       break;
02548     case M32C_OPERAND_IMM_56_QI :
02549       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);
02550       break;
02551     case M32C_OPERAND_IMM_64_HI :
02552       {
02553         long value;
02554         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 64, 0, 16, 32, total_length, pc, & value);
02555         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
02556         fields->f_dsp_64_s16 = value;
02557       }
02558       break;
02559     case M32C_OPERAND_IMM_8_HI :
02560       {
02561         long value;
02562         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 16, 32, total_length, pc, & value);
02563         value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
02564         fields->f_dsp_8_s16 = value;
02565       }
02566       break;
02567     case M32C_OPERAND_IMM_8_QI :
02568       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);
02569       break;
02570     case M32C_OPERAND_IMM_8_S4 :
02571       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);
02572       break;
02573     case M32C_OPERAND_IMM_8_S4N :
02574       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);
02575       break;
02576     case M32C_OPERAND_IMM_SH_12_S4 :
02577       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);
02578       break;
02579     case M32C_OPERAND_IMM_SH_20_S4 :
02580       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);
02581       break;
02582     case M32C_OPERAND_IMM_SH_8_S4 :
02583       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);
02584       break;
02585     case M32C_OPERAND_IMM1_S :
02586       {
02587         long value;
02588         length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 1, 32, total_length, pc, & value);
02589         value = ((value) + (1));
02590         fields->f_imm1_S = value;
02591       }
02592       break;
02593     case M32C_OPERAND_IMM3_S :
02594       {
02595         length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
02596         if (length <= 0) break;
02597         length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
02598         if (length <= 0) break;
02599 {
02600   FLD (f_imm3_S) = ((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (1));
02601 }
02602       }
02603       break;
02604     case M32C_OPERAND_LAB_16_8 :
02605       {
02606         long value;
02607         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);
02608         value = ((value) + (((pc) + (2))));
02609         fields->f_lab_16_8 = value;
02610       }
02611       break;
02612     case M32C_OPERAND_LAB_24_8 :
02613       {
02614         long value;
02615         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);
02616         value = ((value) + (((pc) + (2))));
02617         fields->f_lab_24_8 = value;
02618       }
02619       break;
02620     case M32C_OPERAND_LAB_32_8 :
02621       {
02622         long value;
02623         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);
02624         value = ((value) + (((pc) + (2))));
02625         fields->f_lab_32_8 = value;
02626       }
02627       break;
02628     case M32C_OPERAND_LAB_40_8 :
02629       {
02630         long value;
02631         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);
02632         value = ((value) + (((pc) + (2))));
02633         fields->f_lab_40_8 = value;
02634       }
02635       break;
02636     case M32C_OPERAND_LAB_5_3 :
02637       {
02638         long value;
02639         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 3, 32, total_length, pc, & value);
02640         value = ((value) + (((pc) + (2))));
02641         fields->f_lab_5_3 = value;
02642       }
02643       break;
02644     case M32C_OPERAND_LAB_8_16 :
02645       {
02646         long value;
02647         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);
02648         value = ((((((unsigned int) (((value) & (65535))) >> (8))) | (((int) (((((value) & (255))) << (24))) >> (16))))) + (((pc) + (1))));
02649         fields->f_lab_8_16 = value;
02650       }
02651       break;
02652     case M32C_OPERAND_LAB_8_24 :
02653       {
02654         long value;
02655         length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 24, 32, total_length, pc, & value);
02656         value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16))));
02657         fields->f_lab_8_24 = value;
02658       }
02659       break;
02660     case M32C_OPERAND_LAB_8_8 :
02661       {
02662         long value;
02663         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);
02664         value = ((value) + (((pc) + (1))));
02665         fields->f_lab_8_8 = value;
02666       }
02667       break;
02668     case M32C_OPERAND_LAB32_JMP_S :
02669       {
02670         length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 2, 32, total_length, pc, & fields->f_2_2);
02671         if (length <= 0) break;
02672         length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
02673         if (length <= 0) break;
02674 {
02675   FLD (f_lab32_jmp_s) = ((pc) + (((((((FLD (f_2_2)) << (1))) | (FLD (f_7_1)))) + (2))));
02676 }
02677       }
02678       break;
02679     case M32C_OPERAND_Q :
02680       break;
02681     case M32C_OPERAND_R0 :
02682       break;
02683     case M32C_OPERAND_R0H :
02684       break;
02685     case M32C_OPERAND_R0L :
02686       break;
02687     case M32C_OPERAND_R1 :
02688       break;
02689     case M32C_OPERAND_R1R2R0 :
02690       break;
02691     case M32C_OPERAND_R2 :
02692       break;
02693     case M32C_OPERAND_R2R0 :
02694       break;
02695     case M32C_OPERAND_R3 :
02696       break;
02697     case M32C_OPERAND_R3R1 :
02698       break;
02699     case M32C_OPERAND_REGSETPOP :
02700       length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_8_8);
02701       break;
02702     case M32C_OPERAND_REGSETPUSH :
02703       length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_8_8);
02704       break;
02705     case M32C_OPERAND_RN16_PUSH_S :
02706       length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 1, 32, total_length, pc, & fields->f_4_1);
02707       break;
02708     case M32C_OPERAND_S :
02709       break;
02710     case M32C_OPERAND_SRC16AN :
02711       length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
02712       break;
02713     case M32C_OPERAND_SRC16ANHI :
02714       length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
02715       break;
02716     case M32C_OPERAND_SRC16ANQI :
02717       length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src16_an);
02718       break;
02719     case M32C_OPERAND_SRC16RNHI :
02720       length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_src16_rn);
02721       break;
02722     case M32C_OPERAND_SRC16RNQI :
02723       length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_src16_rn);
02724       break;
02725     case M32C_OPERAND_SRC32ANPREFIXED :
02726       length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
02727       break;
02728     case M32C_OPERAND_SRC32ANPREFIXEDHI :
02729       length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
02730       break;
02731     case M32C_OPERAND_SRC32ANPREFIXEDQI :
02732       length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
02733       break;
02734     case M32C_OPERAND_SRC32ANPREFIXEDSI :
02735       length = extract_normal (cd, ex_info, insn_value, 0, 0, 19, 1, 32, total_length, pc, & fields->f_src32_an_prefixed);
02736       break;
02737     case M32C_OPERAND_SRC32ANUNPREFIXED :
02738       length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
02739       break;
02740     case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
02741       length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
02742       break;
02743     case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
02744       length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
02745       break;
02746     case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
02747       length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_src32_an_unprefixed);
02748       break;
02749     case M32C_OPERAND_SRC32RNPREFIXEDHI :
02750       {
02751         long value;
02752         length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
02753         value = ((((value) + (2))) % (4));
02754         fields->f_src32_rn_prefixed_HI = value;
02755       }
02756       break;
02757     case M32C_OPERAND_SRC32RNPREFIXEDQI :
02758       {
02759         long value;
02760         length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
02761         value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
02762         fields->f_src32_rn_prefixed_QI = value;
02763       }
02764       break;
02765     case M32C_OPERAND_SRC32RNPREFIXEDSI :
02766       {
02767         long value;
02768         length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value);
02769         value = ((value) - (2));
02770         fields->f_src32_rn_prefixed_SI = value;
02771       }
02772       break;
02773     case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
02774       {
02775         long value;
02776         length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
02777         value = ((((value) + (2))) % (4));
02778         fields->f_src32_rn_unprefixed_HI = value;
02779       }
02780       break;
02781     case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
02782       {
02783         long value;
02784         length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
02785         value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2))));
02786         fields->f_src32_rn_unprefixed_QI = value;
02787       }
02788       break;
02789     case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
02790       {
02791         long value;
02792         length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
02793         value = ((value) - (2));
02794         fields->f_src32_rn_unprefixed_SI = value;
02795       }
02796       break;
02797     case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
02798       length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_5_1);
02799       break;
02800     case M32C_OPERAND_X :
02801       break;
02802     case M32C_OPERAND_Z :
02803       break;
02804     case M32C_OPERAND_COND16_16 :
02805       length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
02806       break;
02807     case M32C_OPERAND_COND16_24 :
02808       length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
02809       break;
02810     case M32C_OPERAND_COND16_32 :
02811       length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
02812       break;
02813     case M32C_OPERAND_COND16C :
02814       length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
02815       break;
02816     case M32C_OPERAND_COND16J :
02817       length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
02818       break;
02819     case M32C_OPERAND_COND16J5 :
02820       length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_cond16j_5);
02821       break;
02822     case M32C_OPERAND_COND32 :
02823       {
02824         length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_9_1);
02825         if (length <= 0) break;
02826         length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
02827         if (length <= 0) break;
02828 {
02829   FLD (f_cond32) = ((((FLD (f_9_1)) << (3))) | (FLD (f_13_3)));
02830 }
02831       }
02832       break;
02833     case M32C_OPERAND_COND32_16 :
02834       length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 8, 32, total_length, pc, & fields->f_dsp_16_u8);
02835       break;
02836     case M32C_OPERAND_COND32_24 :
02837       length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 8, 32, total_length, pc, & fields->f_dsp_24_u8);
02838       break;
02839     case M32C_OPERAND_COND32_32 :
02840       length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 8, 32, total_length, pc, & fields->f_dsp_32_u8);
02841       break;
02842     case M32C_OPERAND_COND32_40 :
02843       length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 8, 32, total_length, pc, & fields->f_dsp_40_u8);
02844       break;
02845     case M32C_OPERAND_COND32J :
02846       {
02847         length = extract_normal (cd, ex_info, insn_value, 0, 0, 1, 3, 32, total_length, pc, & fields->f_1_3);
02848         if (length <= 0) break;
02849         length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7_1);
02850         if (length <= 0) break;
02851 {
02852   FLD (f_cond32j) = ((((FLD (f_1_3)) << (1))) | (FLD (f_7_1)));
02853 }
02854       }
02855       break;
02856     case M32C_OPERAND_CR1_PREFIXED_32 :
02857       length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_21_3);
02858       break;
02859     case M32C_OPERAND_CR1_UNPREFIXED_32 :
02860       length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
02861       break;
02862     case M32C_OPERAND_CR16 :
02863       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 3, 32, total_length, pc, & fields->f_9_3);
02864       break;
02865     case M32C_OPERAND_CR2_32 :
02866       length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
02867       break;
02868     case M32C_OPERAND_CR3_PREFIXED_32 :
02869       length = extract_normal (cd, ex_info, insn_value, 0, 0, 21, 3, 32, total_length, pc, & fields->f_21_3);
02870       break;
02871     case M32C_OPERAND_CR3_UNPREFIXED_32 :
02872       length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
02873       break;
02874     case M32C_OPERAND_FLAGS16 :
02875       length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 3, 32, total_length, pc, & fields->f_9_3);
02876       break;
02877     case M32C_OPERAND_FLAGS32 :
02878       length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_13_3);
02879       break;
02880     case M32C_OPERAND_SCCOND32 :
02881       length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_cond16);
02882       break;
02883     case M32C_OPERAND_SIZE :
02884       break;
02885 
02886     default :
02887       /* xgettext:c-format */
02888       fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"),
02889               opindex);
02890       abort ();
02891     }
02892 
02893   return length;
02894 }
02895 
02896 cgen_insert_fn * const m32c_cgen_insert_handlers[] = 
02897 {
02898   insert_insn_normal,
02899 };
02900 
02901 cgen_extract_fn * const m32c_cgen_extract_handlers[] = 
02902 {
02903   extract_insn_normal,
02904 };
02905 
02906 int m32c_cgen_get_int_operand     (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
02907 bfd_vma m32c_cgen_get_vma_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
02908 
02909 /* Getting values from cgen_fields is handled by a collection of functions.
02910    They are distinguished by the type of the VALUE argument they return.
02911    TODO: floating point, inlining support, remove cases where result type
02912    not appropriate.  */
02913 
02914 int
02915 m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
02916                           int opindex,
02917                           const CGEN_FIELDS * fields)
02918 {
02919   int value;
02920 
02921   switch (opindex)
02922     {
02923     case M32C_OPERAND_A0 :
02924       value = 0;
02925       break;
02926     case M32C_OPERAND_A1 :
02927       value = 0;
02928       break;
02929     case M32C_OPERAND_AN16_PUSH_S :
02930       value = fields->f_4_1;
02931       break;
02932     case M32C_OPERAND_BIT16AN :
02933       value = fields->f_dst16_an;
02934       break;
02935     case M32C_OPERAND_BIT16RN :
02936       value = fields->f_dst16_rn;
02937       break;
02938     case M32C_OPERAND_BIT3_S :
02939       value = fields->f_imm3_S;
02940       break;
02941     case M32C_OPERAND_BIT32ANPREFIXED :
02942       value = fields->f_dst32_an_prefixed;
02943       break;
02944     case M32C_OPERAND_BIT32ANUNPREFIXED :
02945       value = fields->f_dst32_an_unprefixed;
02946       break;
02947     case M32C_OPERAND_BIT32RNPREFIXED :
02948       value = fields->f_dst32_rn_prefixed_QI;
02949       break;
02950     case M32C_OPERAND_BIT32RNUNPREFIXED :
02951       value = fields->f_dst32_rn_unprefixed_QI;
02952       break;
02953     case M32C_OPERAND_BITBASE16_16_S8 :
02954       value = fields->f_dsp_16_s8;
02955       break;
02956     case M32C_OPERAND_BITBASE16_16_U16 :
02957       value = fields->f_dsp_16_u16;
02958       break;
02959     case M32C_OPERAND_BITBASE16_16_U8 :
02960       value = fields->f_dsp_16_u8;
02961       break;
02962     case M32C_OPERAND_BITBASE16_8_U11_S :
02963       value = fields->f_bitbase16_u11_S;
02964       break;
02965     case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
02966       value = fields->f_bitbase32_16_s11_unprefixed;
02967       break;
02968     case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
02969       value = fields->f_bitbase32_16_s19_unprefixed;
02970       break;
02971     case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
02972       value = fields->f_bitbase32_16_u11_unprefixed;
02973       break;
02974     case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
02975       value = fields->f_bitbase32_16_u19_unprefixed;
02976       break;
02977     case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
02978       value = fields->f_bitbase32_16_u27_unprefixed;
02979       break;
02980     case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
02981       value = fields->f_bitbase32_24_s11_prefixed;
02982       break;
02983     case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
02984       value = fields->f_bitbase32_24_s19_prefixed;
02985       break;
02986     case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
02987       value = fields->f_bitbase32_24_u11_prefixed;
02988       break;
02989     case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
02990       value = fields->f_bitbase32_24_u19_prefixed;
02991       break;
02992     case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
02993       value = fields->f_bitbase32_24_u27_prefixed;
02994       break;
02995     case M32C_OPERAND_BITNO16R :
02996       value = fields->f_dsp_16_u8;
02997       break;
02998     case M32C_OPERAND_BITNO32PREFIXED :
02999       value = fields->f_bitno32_prefixed;
03000       break;
03001     case M32C_OPERAND_BITNO32UNPREFIXED :
03002       value = fields->f_bitno32_unprefixed;
03003       break;
03004     case M32C_OPERAND_DSP_10_U6 :
03005       value = fields->f_dsp_10_u6;
03006       break;
03007     case M32C_OPERAND_DSP_16_S16 :
03008       value = fields->f_dsp_16_s16;
03009       break;
03010     case M32C_OPERAND_DSP_16_S8 :
03011       value = fields->f_dsp_16_s8;
03012       break;
03013     case M32C_OPERAND_DSP_16_U16 :
03014       value = fields->f_dsp_16_u16;
03015       break;
03016     case M32C_OPERAND_DSP_16_U20 :
03017       value = fields->f_dsp_16_u24;
03018       break;
03019     case M32C_OPERAND_DSP_16_U24 :
03020       value = fields->f_dsp_16_u24;
03021       break;
03022     case M32C_OPERAND_DSP_16_U8 :
03023       value = fields->f_dsp_16_u8;
03024       break;
03025     case M32C_OPERAND_DSP_24_S16 :
03026       value = fields->f_dsp_24_s16;
03027       break;
03028     case M32C_OPERAND_DSP_24_S8 :
03029       value = fields->f_dsp_24_s8;
03030       break;
03031     case M32C_OPERAND_DSP_24_U16 :
03032       value = fields->f_dsp_24_u16;
03033       break;
03034     case M32C_OPERAND_DSP_24_U20 :
03035       value = fields->f_dsp_24_u24;
03036       break;
03037     case M32C_OPERAND_DSP_24_U24 :
03038       value = fields->f_dsp_24_u24;
03039       break;
03040     case M32C_OPERAND_DSP_24_U8 :
03041       value = fields->f_dsp_24_u8;
03042       break;
03043     case M32C_OPERAND_DSP_32_S16 :
03044       value = fields->f_dsp_32_s16;
03045       break;
03046     case M32C_OPERAND_DSP_32_S8 :
03047       value = fields->f_dsp_32_s8;
03048       break;
03049     case M32C_OPERAND_DSP_32_U16 :
03050       value = fields->f_dsp_32_u16;
03051       break;
03052     case M32C_OPERAND_DSP_32_U20 :
03053       value = fields->f_dsp_32_u24;
03054       break;
03055     case M32C_OPERAND_DSP_32_U24 :
03056       value = fields->f_dsp_32_u24;
03057       break;
03058     case M32C_OPERAND_DSP_32_U8 :
03059       value = fields->f_dsp_32_u8;
03060       break;
03061     case M32C_OPERAND_DSP_40_S16 :
03062       value = fields->f_dsp_40_s16;
03063       break;
03064     case M32C_OPERAND_DSP_40_S8 :
03065       value = fields->f_dsp_40_s8;
03066       break;
03067     case M32C_OPERAND_DSP_40_U16 :
03068       value = fields->f_dsp_40_u16;
03069       break;
03070     case M32C_OPERAND_DSP_40_U20 :
03071       value = fields->f_dsp_40_u20;
03072       break;
03073     case M32C_OPERAND_DSP_40_U24 :
03074       value = fields->f_dsp_40_u24;
03075       break;
03076     case M32C_OPERAND_DSP_40_U8 :
03077       value = fields->f_dsp_40_u8;
03078       break;
03079     case M32C_OPERAND_DSP_48_S16 :
03080       value = fields->f_dsp_48_s16;
03081       break;
03082     case M32C_OPERAND_DSP_48_S8 :
03083       value = fields->f_dsp_48_s8;
03084       break;
03085     case M32C_OPERAND_DSP_48_U16 :
03086       value = fields->f_dsp_48_u16;
03087       break;
03088     case M32C_OPERAND_DSP_48_U20 :
03089       value = fields->f_dsp_48_u20;
03090       break;
03091     case M32C_OPERAND_DSP_48_U24 :
03092       value = fields->f_dsp_48_u24;
03093       break;
03094     case M32C_OPERAND_DSP_48_U8 :
03095       value = fields->f_dsp_48_u8;
03096       break;
03097     case M32C_OPERAND_DSP_8_S24 :
03098       value = fields->f_dsp_8_s24;
03099       break;
03100     case M32C_OPERAND_DSP_8_S8 :
03101       value = fields->f_dsp_8_s8;
03102       break;
03103     case M32C_OPERAND_DSP_8_U16 :
03104       value = fields->f_dsp_8_u16;
03105       break;
03106     case M32C_OPERAND_DSP_8_U24 :
03107       value = fields->f_dsp_8_u24;
03108       break;
03109     case M32C_OPERAND_DSP_8_U6 :
03110       value = fields->f_dsp_8_u6;
03111       break;
03112     case M32C_OPERAND_DSP_8_U8 :
03113       value = fields->f_dsp_8_u8;
03114       break;
03115     case M32C_OPERAND_DST16AN :
03116       value = fields->f_dst16_an;
03117       break;
03118     case M32C_OPERAND_DST16AN_S :
03119       value = fields->f_dst16_an_s;
03120       break;
03121     case M32C_OPERAND_DST16ANHI :
03122       value = fields->f_dst16_an;
03123       break;
03124     case M32C_OPERAND_DST16ANQI :
03125       value = fields->f_dst16_an;
03126       break;
03127     case M32C_OPERAND_DST16ANQI_S :
03128       value = fields->f_dst16_rn_QI_s;
03129       break;
03130     case M32C_OPERAND_DST16ANSI :
03131       value = fields->f_dst16_an;
03132       break;
03133     case M32C_OPERAND_DST16RNEXTQI :
03134       value = fields->f_dst16_rn_ext;
03135       break;
03136     case M32C_OPERAND_DST16RNHI :
03137       value = fields->f_dst16_rn;
03138       break;
03139     case M32C_OPERAND_DST16RNQI :
03140       value = fields->f_dst16_rn;
03141       break;
03142     case M32C_OPERAND_DST16RNQI_S :
03143       value = fields->f_dst16_rn_QI_s;
03144       break;
03145     case M32C_OPERAND_DST16RNSI :
03146       value = fields->f_dst16_rn;
03147       break;
03148     case M32C_OPERAND_DST32ANEXTUNPREFIXED :
03149       value = fields->f_dst32_an_unprefixed;
03150       break;
03151     case M32C_OPERAND_DST32ANPREFIXED :
03152       value = fields->f_dst32_an_prefixed;
03153       break;
03154     case M32C_OPERAND_DST32ANPREFIXEDHI :
03155       value = fields->f_dst32_an_prefixed;
03156       break;
03157     case M32C_OPERAND_DST32ANPREFIXEDQI :
03158       value = fields->f_dst32_an_prefixed;
03159       break;
03160     case M32C_OPERAND_DST32ANPREFIXEDSI :
03161       value = fields->f_dst32_an_prefixed;
03162       break;
03163     case M32C_OPERAND_DST32ANUNPREFIXED :
03164       value = fields->f_dst32_an_unprefixed;
03165       break;
03166     case M32C_OPERAND_DST32ANUNPREFIXEDHI :
03167       value = fields->f_dst32_an_unprefixed;
03168       break;
03169     case M32C_OPERAND_DST32ANUNPREFIXEDQI :
03170       value = fields->f_dst32_an_unprefixed;
03171       break;
03172     case M32C_OPERAND_DST32ANUNPREFIXEDSI :
03173       value = fields->f_dst32_an_unprefixed;
03174       break;
03175     case M32C_OPERAND_DST32R0HI_S :
03176       value = 0;
03177       break;
03178     case M32C_OPERAND_DST32R0QI_S :
03179       value = 0;
03180       break;
03181     case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
03182       value = fields->f_dst32_rn_ext_unprefixed;
03183       break;
03184     case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
03185       value = fields->f_dst32_rn_ext_unprefixed;
03186       break;
03187     case M32C_OPERAND_DST32RNPREFIXEDHI :
03188       value = fields->f_dst32_rn_prefixed_HI;
03189       break;
03190     case M32C_OPERAND_DST32RNPREFIXEDQI :
03191       value = fields->f_dst32_rn_prefixed_QI;
03192       break;
03193     case M32C_OPERAND_DST32RNPREFIXEDSI :
03194       value = fields->f_dst32_rn_prefixed_SI;
03195       break;
03196     case M32C_OPERAND_DST32RNUNPREFIXEDHI :
03197       value = fields->f_dst32_rn_unprefixed_HI;
03198       break;
03199     case M32C_OPERAND_DST32RNUNPREFIXEDQI :
03200       value = fields->f_dst32_rn_unprefixed_QI;
03201       break;
03202     case M32C_OPERAND_DST32RNUNPREFIXEDSI :
03203       value = fields->f_dst32_rn_unprefixed_SI;
03204       break;
03205     case M32C_OPERAND_G :
03206       value = 0;
03207       break;
03208     case M32C_OPERAND_IMM_12_S4 :
03209       value = fields->f_imm_12_s4;
03210       break;
03211     case M32C_OPERAND_IMM_12_S4N :
03212       value = fields->f_imm_12_s4;
03213       break;
03214     case M32C_OPERAND_IMM_13_U3 :
03215       value = fields->f_imm_13_u3;
03216       break;
03217     case M32C_OPERAND_IMM_16_HI :
03218       value = fields->f_dsp_16_s16;
03219       break;
03220     case M32C_OPERAND_IMM_16_QI :
03221       value = fields->f_dsp_16_s8;
03222       break;
03223     case M32C_OPERAND_IMM_16_SI :
03224       value = fields->f_dsp_16_s32;
03225       break;
03226     case M32C_OPERAND_IMM_20_S4 :
03227       value = fields->f_imm_20_s4;
03228       break;
03229     case M32C_OPERAND_IMM_24_HI :
03230       value = fields->f_dsp_24_s16;
03231       break;
03232     case M32C_OPERAND_IMM_24_QI :
03233       value = fields->f_dsp_24_s8;
03234       break;
03235     case M32C_OPERAND_IMM_24_SI :
03236       value = fields->f_dsp_24_s32;
03237       break;
03238     case M32C_OPERAND_IMM_32_HI :
03239       value = fields->f_dsp_32_s16;
03240       break;
03241     case M32C_OPERAND_IMM_32_QI :
03242       value = fields->f_dsp_32_s8;
03243       break;
03244     case M32C_OPERAND_IMM_32_SI :
03245       value = fields->f_dsp_32_s32;
03246       break;
03247     case M32C_OPERAND_IMM_40_HI :
03248       value = fields->f_dsp_40_s16;
03249       break;
03250     case M32C_OPERAND_IMM_40_QI :
03251       value = fields->f_dsp_40_s8;
03252       break;
03253     case M32C_OPERAND_IMM_40_SI :
03254       value = fields->f_dsp_40_s32;
03255       break;
03256     case M32C_OPERAND_IMM_48_HI :
03257       value = fields->f_dsp_48_s16;
03258       break;
03259     case M32C_OPERAND_IMM_48_QI :
03260       value = fields->f_dsp_48_s8;
03261       break;
03262     case M32C_OPERAND_IMM_48_SI :
03263       value = fields->f_dsp_48_s32;
03264       break;
03265     case M32C_OPERAND_IMM_56_HI :
03266       value = fields->f_dsp_56_s16;
03267       break;
03268     case M32C_OPERAND_IMM_56_QI :
03269       value = fields->f_dsp_56_s8;
03270       break;
03271     case M32C_OPERAND_IMM_64_HI :
03272       value = fields->f_dsp_64_s16;
03273       break;
03274     case M32C_OPERAND_IMM_8_HI :
03275       value = fields->f_dsp_8_s16;
03276       break;
03277     case M32C_OPERAND_IMM_8_QI :
03278       value = fields->f_dsp_8_s8;
03279       break;
03280     case M32C_OPERAND_IMM_8_S4 :
03281       value = fields->f_imm_8_s4;
03282       break;
03283     case M32C_OPERAND_IMM_8_S4N :
03284       value = fields->f_imm_8_s4;
03285       break;
03286     case M32C_OPERAND_IMM_SH_12_S4 :
03287       value = fields->f_imm_12_s4;
03288       break;
03289     case M32C_OPERAND_IMM_SH_20_S4 :
03290       value = fields->f_imm_20_s4;
03291       break;
03292     case M32C_OPERAND_IMM_SH_8_S4 :
03293       value = fields->f_imm_8_s4;
03294       break;
03295     case M32C_OPERAND_IMM1_S :
03296       value = fields->f_imm1_S;
03297       break;
03298     case M32C_OPERAND_IMM3_S :
03299       value = fields->f_imm3_S;
03300       break;
03301     case M32C_OPERAND_LAB_16_8 :
03302       value = fields->f_lab_16_8;
03303       break;
03304     case M32C_OPERAND_LAB_24_8 :
03305       value = fields->f_lab_24_8;
03306       break;
03307     case M32C_OPERAND_LAB_32_8 :
03308       value = fields->f_lab_32_8;
03309       break;
03310     case M32C_OPERAND_LAB_40_8 :
03311       value = fields->f_lab_40_8;
03312       break;
03313     case M32C_OPERAND_LAB_5_3 :
03314       value = fields->f_lab_5_3;
03315       break;
03316     case M32C_OPERAND_LAB_8_16 :
03317       value = fields->f_lab_8_16;
03318       break;
03319     case M32C_OPERAND_LAB_8_24 :
03320       value = fields->f_lab_8_24;
03321       break;
03322     case M32C_OPERAND_LAB_8_8 :
03323       value = fields->f_lab_8_8;
03324       break;
03325     case M32C_OPERAND_LAB32_JMP_S :
03326       value = fields->f_lab32_jmp_s;
03327       break;
03328     case M32C_OPERAND_Q :
03329       value = 0;
03330       break;
03331     case M32C_OPERAND_R0 :
03332       value = 0;
03333       break;
03334     case M32C_OPERAND_R0H :
03335       value = 0;
03336       break;
03337     case M32C_OPERAND_R0L :
03338       value = 0;
03339       break;
03340     case M32C_OPERAND_R1 :
03341       value = 0;
03342       break;
03343     case M32C_OPERAND_R1R2R0 :
03344       value = 0;
03345       break;
03346     case M32C_OPERAND_R2 :
03347       value = 0;
03348       break;
03349     case M32C_OPERAND_R2R0 :
03350       value = 0;
03351       break;
03352     case M32C_OPERAND_R3 :
03353       value = 0;
03354       break;
03355     case M32C_OPERAND_R3R1 :
03356       value = 0;
03357       break;
03358     case M32C_OPERAND_REGSETPOP :
03359       value = fields->f_8_8;
03360       break;
03361     case M32C_OPERAND_REGSETPUSH :
03362       value = fields->f_8_8;
03363       break;
03364     case M32C_OPERAND_RN16_PUSH_S :
03365       value = fields->f_4_1;
03366       break;
03367     case M32C_OPERAND_S :
03368       value = 0;
03369       break;
03370     case M32C_OPERAND_SRC16AN :
03371       value = fields->f_src16_an;
03372       break;
03373     case M32C_OPERAND_SRC16ANHI :
03374       value = fields->f_src16_an;
03375       break;
03376     case M32C_OPERAND_SRC16ANQI :
03377       value = fields->f_src16_an;
03378       break;
03379     case M32C_OPERAND_SRC16RNHI :
03380       value = fields->f_src16_rn;
03381       break;
03382     case M32C_OPERAND_SRC16RNQI :
03383       value = fields->f_src16_rn;
03384       break;
03385     case M32C_OPERAND_SRC32ANPREFIXED :
03386       value = fields->f_src32_an_prefixed;
03387       break;
03388     case M32C_OPERAND_SRC32ANPREFIXEDHI :
03389       value = fields->f_src32_an_prefixed;
03390       break;
03391     case M32C_OPERAND_SRC32ANPREFIXEDQI :
03392       value = fields->f_src32_an_prefixed;
03393       break;
03394     case M32C_OPERAND_SRC32ANPREFIXEDSI :
03395       value = fields->f_src32_an_prefixed;
03396       break;
03397     case M32C_OPERAND_SRC32ANUNPREFIXED :
03398       value = fields->f_src32_an_unprefixed;
03399       break;
03400     case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
03401       value = fields->f_src32_an_unprefixed;
03402       break;
03403     case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
03404       value = fields->f_src32_an_unprefixed;
03405       break;
03406     case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
03407       value = fields->f_src32_an_unprefixed;
03408       break;
03409     case M32C_OPERAND_SRC32RNPREFIXEDHI :
03410       value = fields->f_src32_rn_prefixed_HI;
03411       break;
03412     case M32C_OPERAND_SRC32RNPREFIXEDQI :
03413       value = fields->f_src32_rn_prefixed_QI;
03414       break;
03415     case M32C_OPERAND_SRC32RNPREFIXEDSI :
03416       value = fields->f_src32_rn_prefixed_SI;
03417       break;
03418     case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
03419       value = fields->f_src32_rn_unprefixed_HI;
03420       break;
03421     case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
03422       value = fields->f_src32_rn_unprefixed_QI;
03423       break;
03424     case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
03425       value = fields->f_src32_rn_unprefixed_SI;
03426       break;
03427     case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
03428       value = fields->f_5_1;
03429       break;
03430     case M32C_OPERAND_X :
03431       value = 0;
03432       break;
03433     case M32C_OPERAND_Z :
03434       value = 0;
03435       break;
03436     case M32C_OPERAND_COND16_16 :
03437       value = fields->f_dsp_16_u8;
03438       break;
03439     case M32C_OPERAND_COND16_24 :
03440       value = fields->f_dsp_24_u8;
03441       break;
03442     case M32C_OPERAND_COND16_32 :
03443       value = fields->f_dsp_32_u8;
03444       break;
03445     case M32C_OPERAND_COND16C :
03446       value = fields->f_cond16;
03447       break;
03448     case M32C_OPERAND_COND16J :
03449       value = fields->f_cond16;
03450       break;
03451     case M32C_OPERAND_COND16J5 :
03452       value = fields->f_cond16j_5;
03453       break;
03454     case M32C_OPERAND_COND32 :
03455       value = fields->f_cond32;
03456       break;
03457     case M32C_OPERAND_COND32_16 :
03458       value = fields->f_dsp_16_u8;
03459       break;
03460     case M32C_OPERAND_COND32_24 :
03461       value = fields->f_dsp_24_u8;
03462       break;
03463     case M32C_OPERAND_COND32_32 :
03464       value = fields->f_dsp_32_u8;
03465       break;
03466     case M32C_OPERAND_COND32_40 :
03467       value = fields->f_dsp_40_u8;
03468       break;
03469     case M32C_OPERAND_COND32J :
03470       value = fields->f_cond32j;
03471       break;
03472     case M32C_OPERAND_CR1_PREFIXED_32 :
03473       value = fields->f_21_3;
03474       break;
03475     case M32C_OPERAND_CR1_UNPREFIXED_32 :
03476       value = fields->f_13_3;
03477       break;
03478     case M32C_OPERAND_CR16 :
03479       value = fields->f_9_3;
03480       break;
03481     case M32C_OPERAND_CR2_32 :
03482       value = fields->f_13_3;
03483       break;
03484     case M32C_OPERAND_CR3_PREFIXED_32 :
03485       value = fields->f_21_3;
03486       break;
03487     case M32C_OPERAND_CR3_UNPREFIXED_32 :
03488       value = fields->f_13_3;
03489       break;
03490     case M32C_OPERAND_FLAGS16 :
03491       value = fields->f_9_3;
03492       break;
03493     case M32C_OPERAND_FLAGS32 :
03494       value = fields->f_13_3;
03495       break;
03496     case M32C_OPERAND_SCCOND32 :
03497       value = fields->f_cond16;
03498       break;
03499     case M32C_OPERAND_SIZE :
03500       value = 0;
03501       break;
03502 
03503     default :
03504       /* xgettext:c-format */
03505       fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
03506                      opindex);
03507       abort ();
03508   }
03509 
03510   return value;
03511 }
03512 
03513 bfd_vma
03514 m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
03515                           int opindex,
03516                           const CGEN_FIELDS * fields)
03517 {
03518   bfd_vma value;
03519 
03520   switch (opindex)
03521     {
03522     case M32C_OPERAND_A0 :
03523       value = 0;
03524       break;
03525     case M32C_OPERAND_A1 :
03526       value = 0;
03527       break;
03528     case M32C_OPERAND_AN16_PUSH_S :
03529       value = fields->f_4_1;
03530       break;
03531     case M32C_OPERAND_BIT16AN :
03532       value = fields->f_dst16_an;
03533       break;
03534     case M32C_OPERAND_BIT16RN :
03535       value = fields->f_dst16_rn;
03536       break;
03537     case M32C_OPERAND_BIT3_S :
03538       value = fields->f_imm3_S;
03539       break;
03540     case M32C_OPERAND_BIT32ANPREFIXED :
03541       value = fields->f_dst32_an_prefixed;
03542       break;
03543     case M32C_OPERAND_BIT32ANUNPREFIXED :
03544       value = fields->f_dst32_an_unprefixed;
03545       break;
03546     case M32C_OPERAND_BIT32RNPREFIXED :
03547       value = fields->f_dst32_rn_prefixed_QI;
03548       break;
03549     case M32C_OPERAND_BIT32RNUNPREFIXED :
03550       value = fields->f_dst32_rn_unprefixed_QI;
03551       break;
03552     case M32C_OPERAND_BITBASE16_16_S8 :
03553       value = fields->f_dsp_16_s8;
03554       break;
03555     case M32C_OPERAND_BITBASE16_16_U16 :
03556       value = fields->f_dsp_16_u16;
03557       break;
03558     case M32C_OPERAND_BITBASE16_16_U8 :
03559       value = fields->f_dsp_16_u8;
03560       break;
03561     case M32C_OPERAND_BITBASE16_8_U11_S :
03562       value = fields->f_bitbase16_u11_S;
03563       break;
03564     case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
03565       value = fields->f_bitbase32_16_s11_unprefixed;
03566       break;
03567     case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
03568       value = fields->f_bitbase32_16_s19_unprefixed;
03569       break;
03570     case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
03571       value = fields->f_bitbase32_16_u11_unprefixed;
03572       break;
03573     case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
03574       value = fields->f_bitbase32_16_u19_unprefixed;
03575       break;
03576     case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
03577       value = fields->f_bitbase32_16_u27_unprefixed;
03578       break;
03579     case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
03580       value = fields->f_bitbase32_24_s11_prefixed;
03581       break;
03582     case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
03583       value = fields->f_bitbase32_24_s19_prefixed;
03584       break;
03585     case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
03586       value = fields->f_bitbase32_24_u11_prefixed;
03587       break;
03588     case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
03589       value = fields->f_bitbase32_24_u19_prefixed;
03590       break;
03591     case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
03592       value = fields->f_bitbase32_24_u27_prefixed;
03593       break;
03594     case M32C_OPERAND_BITNO16R :
03595       value = fields->f_dsp_16_u8;
03596       break;
03597     case M32C_OPERAND_BITNO32PREFIXED :
03598       value = fields->f_bitno32_prefixed;
03599       break;
03600     case M32C_OPERAND_BITNO32UNPREFIXED :
03601       value = fields->f_bitno32_unprefixed;
03602       break;
03603     case M32C_OPERAND_DSP_10_U6 :
03604       value = fields->f_dsp_10_u6;
03605       break;
03606     case M32C_OPERAND_DSP_16_S16 :
03607       value = fields->f_dsp_16_s16;
03608       break;
03609     case M32C_OPERAND_DSP_16_S8 :
03610       value = fields->f_dsp_16_s8;
03611       break;
03612     case M32C_OPERAND_DSP_16_U16 :
03613       value = fields->f_dsp_16_u16;
03614       break;
03615     case M32C_OPERAND_DSP_16_U20 :
03616       value = fields->f_dsp_16_u24;
03617       break;
03618     case M32C_OPERAND_DSP_16_U24 :
03619       value = fields->f_dsp_16_u24;
03620       break;
03621     case M32C_OPERAND_DSP_16_U8 :
03622       value = fields->f_dsp_16_u8;
03623       break;
03624     case M32C_OPERAND_DSP_24_S16 :
03625       value = fields->f_dsp_24_s16;
03626       break;
03627     case M32C_OPERAND_DSP_24_S8 :
03628       value = fields->f_dsp_24_s8;
03629       break;
03630     case M32C_OPERAND_DSP_24_U16 :
03631       value = fields->f_dsp_24_u16;
03632       break;
03633     case M32C_OPERAND_DSP_24_U20 :
03634       value = fields->f_dsp_24_u24;
03635       break;
03636     case M32C_OPERAND_DSP_24_U24 :
03637       value = fields->f_dsp_24_u24;
03638       break;
03639     case M32C_OPERAND_DSP_24_U8 :
03640       value = fields->f_dsp_24_u8;
03641       break;
03642     case M32C_OPERAND_DSP_32_S16 :
03643       value = fields->f_dsp_32_s16;
03644       break;
03645     case M32C_OPERAND_DSP_32_S8 :
03646       value = fields->f_dsp_32_s8;
03647       break;
03648     case M32C_OPERAND_DSP_32_U16 :
03649       value = fields->f_dsp_32_u16;
03650       break;
03651     case M32C_OPERAND_DSP_32_U20 :
03652       value = fields->f_dsp_32_u24;
03653       break;
03654     case M32C_OPERAND_DSP_32_U24 :
03655       value = fields->f_dsp_32_u24;
03656       break;
03657     case M32C_OPERAND_DSP_32_U8 :
03658       value = fields->f_dsp_32_u8;
03659       break;
03660     case M32C_OPERAND_DSP_40_S16 :
03661       value = fields->f_dsp_40_s16;
03662       break;
03663     case M32C_OPERAND_DSP_40_S8 :
03664       value = fields->f_dsp_40_s8;
03665       break;
03666     case M32C_OPERAND_DSP_40_U16 :
03667       value = fields->f_dsp_40_u16;
03668       break;
03669     case M32C_OPERAND_DSP_40_U20 :
03670       value = fields->f_dsp_40_u20;
03671       break;
03672     case M32C_OPERAND_DSP_40_U24 :
03673       value = fields->f_dsp_40_u24;
03674       break;
03675     case M32C_OPERAND_DSP_40_U8 :
03676       value = fields->f_dsp_40_u8;
03677       break;
03678     case M32C_OPERAND_DSP_48_S16 :
03679       value = fields->f_dsp_48_s16;
03680       break;
03681     case M32C_OPERAND_DSP_48_S8 :
03682       value = fields->f_dsp_48_s8;
03683       break;
03684     case M32C_OPERAND_DSP_48_U16 :
03685       value = fields->f_dsp_48_u16;
03686       break;
03687     case M32C_OPERAND_DSP_48_U20 :
03688       value = fields->f_dsp_48_u20;
03689       break;
03690     case M32C_OPERAND_DSP_48_U24 :
03691       value = fields->f_dsp_48_u24;
03692       break;
03693     case M32C_OPERAND_DSP_48_U8 :
03694       value = fields->f_dsp_48_u8;
03695       break;
03696     case M32C_OPERAND_DSP_8_S24 :
03697       value = fields->f_dsp_8_s24;
03698       break;
03699     case M32C_OPERAND_DSP_8_S8 :
03700       value = fields->f_dsp_8_s8;
03701       break;
03702     case M32C_OPERAND_DSP_8_U16 :
03703       value = fields->f_dsp_8_u16;
03704       break;
03705     case M32C_OPERAND_DSP_8_U24 :
03706       value = fields->f_dsp_8_u24;
03707       break;
03708     case M32C_OPERAND_DSP_8_U6 :
03709       value = fields->f_dsp_8_u6;
03710       break;
03711     case M32C_OPERAND_DSP_8_U8 :
03712       value = fields->f_dsp_8_u8;
03713       break;
03714     case M32C_OPERAND_DST16AN :
03715       value = fields->f_dst16_an;
03716       break;
03717     case M32C_OPERAND_DST16AN_S :
03718       value = fields->f_dst16_an_s;
03719       break;
03720     case M32C_OPERAND_DST16ANHI :
03721       value = fields->f_dst16_an;
03722       break;
03723     case M32C_OPERAND_DST16ANQI :
03724       value = fields->f_dst16_an;
03725       break;
03726     case M32C_OPERAND_DST16ANQI_S :
03727       value = fields->f_dst16_rn_QI_s;
03728       break;
03729     case M32C_OPERAND_DST16ANSI :
03730       value = fields->f_dst16_an;
03731       break;
03732     case M32C_OPERAND_DST16RNEXTQI :
03733       value = fields->f_dst16_rn_ext;
03734       break;
03735     case M32C_OPERAND_DST16RNHI :
03736       value = fields->f_dst16_rn;
03737       break;
03738     case M32C_OPERAND_DST16RNQI :
03739       value = fields->f_dst16_rn;
03740       break;
03741     case M32C_OPERAND_DST16RNQI_S :
03742       value = fields->f_dst16_rn_QI_s;
03743       break;
03744     case M32C_OPERAND_DST16RNSI :
03745       value = fields->f_dst16_rn;
03746       break;
03747     case M32C_OPERAND_DST32ANEXTUNPREFIXED :
03748       value = fields->f_dst32_an_unprefixed;
03749       break;
03750     case M32C_OPERAND_DST32ANPREFIXED :
03751       value = fields->f_dst32_an_prefixed;
03752       break;
03753     case M32C_OPERAND_DST32ANPREFIXEDHI :
03754       value = fields->f_dst32_an_prefixed;
03755       break;
03756     case M32C_OPERAND_DST32ANPREFIXEDQI :
03757       value = fields->f_dst32_an_prefixed;
03758       break;
03759     case M32C_OPERAND_DST32ANPREFIXEDSI :
03760       value = fields->f_dst32_an_prefixed;
03761       break;
03762     case M32C_OPERAND_DST32ANUNPREFIXED :
03763       value = fields->f_dst32_an_unprefixed;
03764       break;
03765     case M32C_OPERAND_DST32ANUNPREFIXEDHI :
03766       value = fields->f_dst32_an_unprefixed;
03767       break;
03768     case M32C_OPERAND_DST32ANUNPREFIXEDQI :
03769       value = fields->f_dst32_an_unprefixed;
03770       break;
03771     case M32C_OPERAND_DST32ANUNPREFIXEDSI :
03772       value = fields->f_dst32_an_unprefixed;
03773       break;
03774     case M32C_OPERAND_DST32R0HI_S :
03775       value = 0;
03776       break;
03777     case M32C_OPERAND_DST32R0QI_S :
03778       value = 0;
03779       break;
03780     case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
03781       value = fields->f_dst32_rn_ext_unprefixed;
03782       break;
03783     case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
03784       value = fields->f_dst32_rn_ext_unprefixed;
03785       break;
03786     case M32C_OPERAND_DST32RNPREFIXEDHI :
03787       value = fields->f_dst32_rn_prefixed_HI;
03788       break;
03789     case M32C_OPERAND_DST32RNPREFIXEDQI :
03790       value = fields->f_dst32_rn_prefixed_QI;
03791       break;
03792     case M32C_OPERAND_DST32RNPREFIXEDSI :
03793       value = fields->f_dst32_rn_prefixed_SI;
03794       break;
03795     case M32C_OPERAND_DST32RNUNPREFIXEDHI :
03796       value = fields->f_dst32_rn_unprefixed_HI;
03797       break;
03798     case M32C_OPERAND_DST32RNUNPREFIXEDQI :
03799       value = fields->f_dst32_rn_unprefixed_QI;
03800       break;
03801     case M32C_OPERAND_DST32RNUNPREFIXEDSI :
03802       value = fields->f_dst32_rn_unprefixed_SI;
03803       break;
03804     case M32C_OPERAND_G :
03805       value = 0;
03806       break;
03807     case M32C_OPERAND_IMM_12_S4 :
03808       value = fields->f_imm_12_s4;
03809       break;
03810     case M32C_OPERAND_IMM_12_S4N :
03811       value = fields->f_imm_12_s4;
03812       break;
03813     case M32C_OPERAND_IMM_13_U3 :
03814       value = fields->f_imm_13_u3;
03815       break;
03816     case M32C_OPERAND_IMM_16_HI :
03817       value = fields->f_dsp_16_s16;
03818       break;
03819     case M32C_OPERAND_IMM_16_QI :
03820       value = fields->f_dsp_16_s8;
03821       break;
03822     case M32C_OPERAND_IMM_16_SI :
03823       value = fields->f_dsp_16_s32;
03824       break;
03825     case M32C_OPERAND_IMM_20_S4 :
03826       value = fields->f_imm_20_s4;
03827       break;
03828     case M32C_OPERAND_IMM_24_HI :
03829       value = fields->f_dsp_24_s16;
03830       break;
03831     case M32C_OPERAND_IMM_24_QI :
03832       value = fields->f_dsp_24_s8;
03833       break;
03834     case M32C_OPERAND_IMM_24_SI :
03835       value = fields->f_dsp_24_s32;
03836       break;
03837     case M32C_OPERAND_IMM_32_HI :
03838       value = fields->f_dsp_32_s16;
03839       break;
03840     case M32C_OPERAND_IMM_32_QI :
03841       value = fields->f_dsp_32_s8;
03842       break;
03843     case M32C_OPERAND_IMM_32_SI :
03844       value = fields->f_dsp_32_s32;
03845       break;
03846     case M32C_OPERAND_IMM_40_HI :
03847       value = fields->f_dsp_40_s16;
03848       break;
03849     case M32C_OPERAND_IMM_40_QI :
03850       value = fields->f_dsp_40_s8;
03851       break;
03852     case M32C_OPERAND_IMM_40_SI :
03853       value = fields->f_dsp_40_s32;
03854       break;
03855     case M32C_OPERAND_IMM_48_HI :
03856       value = fields->f_dsp_48_s16;
03857       break;
03858     case M32C_OPERAND_IMM_48_QI :
03859       value = fields->f_dsp_48_s8;
03860       break;
03861     case M32C_OPERAND_IMM_48_SI :
03862       value = fields->f_dsp_48_s32;
03863       break;
03864     case M32C_OPERAND_IMM_56_HI :
03865       value = fields->f_dsp_56_s16;
03866       break;
03867     case M32C_OPERAND_IMM_56_QI :
03868       value = fields->f_dsp_56_s8;
03869       break;
03870     case M32C_OPERAND_IMM_64_HI :
03871       value = fields->f_dsp_64_s16;
03872       break;
03873     case M32C_OPERAND_IMM_8_HI :
03874       value = fields->f_dsp_8_s16;
03875       break;
03876     case M32C_OPERAND_IMM_8_QI :
03877       value = fields->f_dsp_8_s8;
03878       break;
03879     case M32C_OPERAND_IMM_8_S4 :
03880       value = fields->f_imm_8_s4;
03881       break;
03882     case M32C_OPERAND_IMM_8_S4N :
03883       value = fields->f_imm_8_s4;
03884       break;
03885     case M32C_OPERAND_IMM_SH_12_S4 :
03886       value = fields->f_imm_12_s4;
03887       break;
03888     case M32C_OPERAND_IMM_SH_20_S4 :
03889       value = fields->f_imm_20_s4;
03890       break;
03891     case M32C_OPERAND_IMM_SH_8_S4 :
03892       value = fields->f_imm_8_s4;
03893       break;
03894     case M32C_OPERAND_IMM1_S :
03895       value = fields->f_imm1_S;
03896       break;
03897     case M32C_OPERAND_IMM3_S :
03898       value = fields->f_imm3_S;
03899       break;
03900     case M32C_OPERAND_LAB_16_8 :
03901       value = fields->f_lab_16_8;
03902       break;
03903     case M32C_OPERAND_LAB_24_8 :
03904       value = fields->f_lab_24_8;
03905       break;
03906     case M32C_OPERAND_LAB_32_8 :
03907       value = fields->f_lab_32_8;
03908       break;
03909     case M32C_OPERAND_LAB_40_8 :
03910       value = fields->f_lab_40_8;
03911       break;
03912     case M32C_OPERAND_LAB_5_3 :
03913       value = fields->f_lab_5_3;
03914       break;
03915     case M32C_OPERAND_LAB_8_16 :
03916       value = fields->f_lab_8_16;
03917       break;
03918     case M32C_OPERAND_LAB_8_24 :
03919       value = fields->f_lab_8_24;
03920       break;
03921     case M32C_OPERAND_LAB_8_8 :
03922       value = fields->f_lab_8_8;
03923       break;
03924     case M32C_OPERAND_LAB32_JMP_S :
03925       value = fields->f_lab32_jmp_s;
03926       break;
03927     case M32C_OPERAND_Q :
03928       value = 0;
03929       break;
03930     case M32C_OPERAND_R0 :
03931       value = 0;
03932       break;
03933     case M32C_OPERAND_R0H :
03934       value = 0;
03935       break;
03936     case M32C_OPERAND_R0L :
03937       value = 0;
03938       break;
03939     case M32C_OPERAND_R1 :
03940       value = 0;
03941       break;
03942     case M32C_OPERAND_R1R2R0 :
03943       value = 0;
03944       break;
03945     case M32C_OPERAND_R2 :
03946       value = 0;
03947       break;
03948     case M32C_OPERAND_R2R0 :
03949       value = 0;
03950       break;
03951     case M32C_OPERAND_R3 :
03952       value = 0;
03953       break;
03954     case M32C_OPERAND_R3R1 :
03955       value = 0;
03956       break;
03957     case M32C_OPERAND_REGSETPOP :
03958       value = fields->f_8_8;
03959       break;
03960     case M32C_OPERAND_REGSETPUSH :
03961       value = fields->f_8_8;
03962       break;
03963     case M32C_OPERAND_RN16_PUSH_S :
03964       value = fields->f_4_1;
03965       break;
03966     case M32C_OPERAND_S :
03967       value = 0;
03968       break;
03969     case M32C_OPERAND_SRC16AN :
03970       value = fields->f_src16_an;
03971       break;
03972     case M32C_OPERAND_SRC16ANHI :
03973       value = fields->f_src16_an;
03974       break;
03975     case M32C_OPERAND_SRC16ANQI :
03976       value = fields->f_src16_an;
03977       break;
03978     case M32C_OPERAND_SRC16RNHI :
03979       value = fields->f_src16_rn;
03980       break;
03981     case M32C_OPERAND_SRC16RNQI :
03982       value = fields->f_src16_rn;
03983       break;
03984     case M32C_OPERAND_SRC32ANPREFIXED :
03985       value = fields->f_src32_an_prefixed;
03986       break;
03987     case M32C_OPERAND_SRC32ANPREFIXEDHI :
03988       value = fields->f_src32_an_prefixed;
03989       break;
03990     case M32C_OPERAND_SRC32ANPREFIXEDQI :
03991       value = fields->f_src32_an_prefixed;
03992       break;
03993     case M32C_OPERAND_SRC32ANPREFIXEDSI :
03994       value = fields->f_src32_an_prefixed;
03995       break;
03996     case M32C_OPERAND_SRC32ANUNPREFIXED :
03997       value = fields->f_src32_an_unprefixed;
03998       break;
03999     case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
04000       value = fields->f_src32_an_unprefixed;
04001       break;
04002     case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
04003       value = fields->f_src32_an_unprefixed;
04004       break;
04005     case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
04006       value = fields->f_src32_an_unprefixed;
04007       break;
04008     case M32C_OPERAND_SRC32RNPREFIXEDHI :
04009       value = fields->f_src32_rn_prefixed_HI;
04010       break;
04011     case M32C_OPERAND_SRC32RNPREFIXEDQI :
04012       value = fields->f_src32_rn_prefixed_QI;
04013       break;
04014     case M32C_OPERAND_SRC32RNPREFIXEDSI :
04015       value = fields->f_src32_rn_prefixed_SI;
04016       break;
04017     case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
04018       value = fields->f_src32_rn_unprefixed_HI;
04019       break;
04020     case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
04021       value = fields->f_src32_rn_unprefixed_QI;
04022       break;
04023     case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
04024       value = fields->f_src32_rn_unprefixed_SI;
04025       break;
04026     case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
04027       value = fields->f_5_1;
04028       break;
04029     case M32C_OPERAND_X :
04030       value = 0;
04031       break;
04032     case M32C_OPERAND_Z :
04033       value = 0;
04034       break;
04035     case M32C_OPERAND_COND16_16 :
04036       value = fields->f_dsp_16_u8;
04037       break;
04038     case M32C_OPERAND_COND16_24 :
04039       value = fields->f_dsp_24_u8;
04040       break;
04041     case M32C_OPERAND_COND16_32 :
04042       value = fields->f_dsp_32_u8;
04043       break;
04044     case M32C_OPERAND_COND16C :
04045       value = fields->f_cond16;
04046       break;
04047     case M32C_OPERAND_COND16J :
04048       value = fields->f_cond16;
04049       break;
04050     case M32C_OPERAND_COND16J5 :
04051       value = fields->f_cond16j_5;
04052       break;
04053     case M32C_OPERAND_COND32 :
04054       value = fields->f_cond32;
04055       break;
04056     case M32C_OPERAND_COND32_16 :
04057       value = fields->f_dsp_16_u8;
04058       break;
04059     case M32C_OPERAND_COND32_24 :
04060       value = fields->f_dsp_24_u8;
04061       break;
04062     case M32C_OPERAND_COND32_32 :
04063       value = fields->f_dsp_32_u8;
04064       break;
04065     case M32C_OPERAND_COND32_40 :
04066       value = fields->f_dsp_40_u8;
04067       break;
04068     case M32C_OPERAND_COND32J :
04069       value = fields->f_cond32j;
04070       break;
04071     case M32C_OPERAND_CR1_PREFIXED_32 :
04072       value = fields->f_21_3;
04073       break;
04074     case M32C_OPERAND_CR1_UNPREFIXED_32 :
04075       value = fields->f_13_3;
04076       break;
04077     case M32C_OPERAND_CR16 :
04078       value = fields->f_9_3;
04079       break;
04080     case M32C_OPERAND_CR2_32 :
04081       value = fields->f_13_3;
04082       break;
04083     case M32C_OPERAND_CR3_PREFIXED_32 :
04084       value = fields->f_21_3;
04085       break;
04086     case M32C_OPERAND_CR3_UNPREFIXED_32 :
04087       value = fields->f_13_3;
04088       break;
04089     case M32C_OPERAND_FLAGS16 :
04090       value = fields->f_9_3;
04091       break;
04092     case M32C_OPERAND_FLAGS32 :
04093       value = fields->f_13_3;
04094       break;
04095     case M32C_OPERAND_SCCOND32 :
04096       value = fields->f_cond16;
04097       break;
04098     case M32C_OPERAND_SIZE :
04099       value = 0;
04100       break;
04101 
04102     default :
04103       /* xgettext:c-format */
04104       fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
04105                      opindex);
04106       abort ();
04107   }
04108 
04109   return value;
04110 }
04111 
04112 void m32c_cgen_set_int_operand  (CGEN_CPU_DESC, int, CGEN_FIELDS *, int);
04113 void m32c_cgen_set_vma_operand  (CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma);
04114 
04115 /* Stuffing values in cgen_fields is handled by a collection of functions.
04116    They are distinguished by the type of the VALUE argument they accept.
04117    TODO: floating point, inlining support, remove cases where argument type
04118    not appropriate.  */
04119 
04120 void
04121 m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
04122                           int opindex,
04123                           CGEN_FIELDS * fields,
04124                           int value)
04125 {
04126   switch (opindex)
04127     {
04128     case M32C_OPERAND_A0 :
04129       break;
04130     case M32C_OPERAND_A1 :
04131       break;
04132     case M32C_OPERAND_AN16_PUSH_S :
04133       fields->f_4_1 = value;
04134       break;
04135     case M32C_OPERAND_BIT16AN :
04136       fields->f_dst16_an = value;
04137       break;
04138     case M32C_OPERAND_BIT16RN :
04139       fields->f_dst16_rn = value;
04140       break;
04141     case M32C_OPERAND_BIT3_S :
04142       fields->f_imm3_S = value;
04143       break;
04144     case M32C_OPERAND_BIT32ANPREFIXED :
04145       fields->f_dst32_an_prefixed = value;
04146       break;
04147     case M32C_OPERAND_BIT32ANUNPREFIXED :
04148       fields->f_dst32_an_unprefixed = value;
04149       break;
04150     case M32C_OPERAND_BIT32RNPREFIXED :
04151       fields->f_dst32_rn_prefixed_QI = value;
04152       break;
04153     case M32C_OPERAND_BIT32RNUNPREFIXED :
04154       fields->f_dst32_rn_unprefixed_QI = value;
04155       break;
04156     case M32C_OPERAND_BITBASE16_16_S8 :
04157       fields->f_dsp_16_s8 = value;
04158       break;
04159     case M32C_OPERAND_BITBASE16_16_U16 :
04160       fields->f_dsp_16_u16 = value;
04161       break;
04162     case M32C_OPERAND_BITBASE16_16_U8 :
04163       fields->f_dsp_16_u8 = value;
04164       break;
04165     case M32C_OPERAND_BITBASE16_8_U11_S :
04166       fields->f_bitbase16_u11_S = value;
04167       break;
04168     case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
04169       fields->f_bitbase32_16_s11_unprefixed = value;
04170       break;
04171     case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
04172       fields->f_bitbase32_16_s19_unprefixed = value;
04173       break;
04174     case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
04175       fields->f_bitbase32_16_u11_unprefixed = value;
04176       break;
04177     case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
04178       fields->f_bitbase32_16_u19_unprefixed = value;
04179       break;
04180     case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
04181       fields->f_bitbase32_16_u27_unprefixed = value;
04182       break;
04183     case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
04184       fields->f_bitbase32_24_s11_prefixed = value;
04185       break;
04186     case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
04187       fields->f_bitbase32_24_s19_prefixed = value;
04188       break;
04189     case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
04190       fields->f_bitbase32_24_u11_prefixed = value;
04191       break;
04192     case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
04193       fields->f_bitbase32_24_u19_prefixed = value;
04194       break;
04195     case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
04196       fields->f_bitbase32_24_u27_prefixed = value;
04197       break;
04198     case M32C_OPERAND_BITNO16R :
04199       fields->f_dsp_16_u8 = value;
04200       break;
04201     case M32C_OPERAND_BITNO32PREFIXED :
04202       fields->f_bitno32_prefixed = value;
04203       break;
04204     case M32C_OPERAND_BITNO32UNPREFIXED :
04205       fields->f_bitno32_unprefixed = value;
04206       break;
04207     case M32C_OPERAND_DSP_10_U6 :
04208       fields->f_dsp_10_u6 = value;
04209       break;
04210     case M32C_OPERAND_DSP_16_S16 :
04211       fields->f_dsp_16_s16 = value;
04212       break;
04213     case M32C_OPERAND_DSP_16_S8 :
04214       fields->f_dsp_16_s8 = value;
04215       break;
04216     case M32C_OPERAND_DSP_16_U16 :
04217       fields->f_dsp_16_u16 = value;
04218       break;
04219     case M32C_OPERAND_DSP_16_U20 :
04220       fields->f_dsp_16_u24 = value;
04221       break;
04222     case M32C_OPERAND_DSP_16_U24 :
04223       fields->f_dsp_16_u24 = value;
04224       break;
04225     case M32C_OPERAND_DSP_16_U8 :
04226       fields->f_dsp_16_u8 = value;
04227       break;
04228     case M32C_OPERAND_DSP_24_S16 :
04229       fields->f_dsp_24_s16 = value;
04230       break;
04231     case M32C_OPERAND_DSP_24_S8 :
04232       fields->f_dsp_24_s8 = value;
04233       break;
04234     case M32C_OPERAND_DSP_24_U16 :
04235       fields->f_dsp_24_u16 = value;
04236       break;
04237     case M32C_OPERAND_DSP_24_U20 :
04238       fields->f_dsp_24_u24 = value;
04239       break;
04240     case M32C_OPERAND_DSP_24_U24 :
04241       fields->f_dsp_24_u24 = value;
04242       break;
04243     case M32C_OPERAND_DSP_24_U8 :
04244       fields->f_dsp_24_u8 = value;
04245       break;
04246     case M32C_OPERAND_DSP_32_S16 :
04247       fields->f_dsp_32_s16 = value;
04248       break;
04249     case M32C_OPERAND_DSP_32_S8 :
04250       fields->f_dsp_32_s8 = value;
04251       break;
04252     case M32C_OPERAND_DSP_32_U16 :
04253       fields->f_dsp_32_u16 = value;
04254       break;
04255     case M32C_OPERAND_DSP_32_U20 :
04256       fields->f_dsp_32_u24 = value;
04257       break;
04258     case M32C_OPERAND_DSP_32_U24 :
04259       fields->f_dsp_32_u24 = value;
04260       break;
04261     case M32C_OPERAND_DSP_32_U8 :
04262       fields->f_dsp_32_u8 = value;
04263       break;
04264     case M32C_OPERAND_DSP_40_S16 :
04265       fields->f_dsp_40_s16 = value;
04266       break;
04267     case M32C_OPERAND_DSP_40_S8 :
04268       fields->f_dsp_40_s8 = value;
04269       break;
04270     case M32C_OPERAND_DSP_40_U16 :
04271       fields->f_dsp_40_u16 = value;
04272       break;
04273     case M32C_OPERAND_DSP_40_U20 :
04274       fields->f_dsp_40_u20 = value;
04275       break;
04276     case M32C_OPERAND_DSP_40_U24 :
04277       fields->f_dsp_40_u24 = value;
04278       break;
04279     case M32C_OPERAND_DSP_40_U8 :
04280       fields->f_dsp_40_u8 = value;
04281       break;
04282     case M32C_OPERAND_DSP_48_S16 :
04283       fields->f_dsp_48_s16 = value;
04284       break;
04285     case M32C_OPERAND_DSP_48_S8 :
04286       fields->f_dsp_48_s8 = value;
04287       break;
04288     case M32C_OPERAND_DSP_48_U16 :
04289       fields->f_dsp_48_u16 = value;
04290       break;
04291     case M32C_OPERAND_DSP_48_U20 :
04292       fields->f_dsp_48_u20 = value;
04293       break;
04294     case M32C_OPERAND_DSP_48_U24 :
04295       fields->f_dsp_48_u24 = value;
04296       break;
04297     case M32C_OPERAND_DSP_48_U8 :
04298       fields->f_dsp_48_u8 = value;
04299       break;
04300     case M32C_OPERAND_DSP_8_S24 :
04301       fields->f_dsp_8_s24 = value;
04302       break;
04303     case M32C_OPERAND_DSP_8_S8 :
04304       fields->f_dsp_8_s8 = value;
04305       break;
04306     case M32C_OPERAND_DSP_8_U16 :
04307       fields->f_dsp_8_u16 = value;
04308       break;
04309     case M32C_OPERAND_DSP_8_U24 :
04310       fields->f_dsp_8_u24 = value;
04311       break;
04312     case M32C_OPERAND_DSP_8_U6 :
04313       fields->f_dsp_8_u6 = value;
04314       break;
04315     case M32C_OPERAND_DSP_8_U8 :
04316       fields->f_dsp_8_u8 = value;
04317       break;
04318     case M32C_OPERAND_DST16AN :
04319       fields->f_dst16_an = value;
04320       break;
04321     case M32C_OPERAND_DST16AN_S :
04322       fields->f_dst16_an_s = value;
04323       break;
04324     case M32C_OPERAND_DST16ANHI :
04325       fields->f_dst16_an = value;
04326       break;
04327     case M32C_OPERAND_DST16ANQI :
04328       fields->f_dst16_an = value;
04329       break;
04330     case M32C_OPERAND_DST16ANQI_S :
04331       fields->f_dst16_rn_QI_s = value;
04332       break;
04333     case M32C_OPERAND_DST16ANSI :
04334       fields->f_dst16_an = value;
04335       break;
04336     case M32C_OPERAND_DST16RNEXTQI :
04337       fields->f_dst16_rn_ext = value;
04338       break;
04339     case M32C_OPERAND_DST16RNHI :
04340       fields->f_dst16_rn = value;
04341       break;
04342     case M32C_OPERAND_DST16RNQI :
04343       fields->f_dst16_rn = value;
04344       break;
04345     case M32C_OPERAND_DST16RNQI_S :
04346       fields->f_dst16_rn_QI_s = value;
04347       break;
04348     case M32C_OPERAND_DST16RNSI :
04349       fields->f_dst16_rn = value;
04350       break;
04351     case M32C_OPERAND_DST32ANEXTUNPREFIXED :
04352       fields->f_dst32_an_unprefixed = value;
04353       break;
04354     case M32C_OPERAND_DST32ANPREFIXED :
04355       fields->f_dst32_an_prefixed = value;
04356       break;
04357     case M32C_OPERAND_DST32ANPREFIXEDHI :
04358       fields->f_dst32_an_prefixed = value;
04359       break;
04360     case M32C_OPERAND_DST32ANPREFIXEDQI :
04361       fields->f_dst32_an_prefixed = value;
04362       break;
04363     case M32C_OPERAND_DST32ANPREFIXEDSI :
04364       fields->f_dst32_an_prefixed = value;
04365       break;
04366     case M32C_OPERAND_DST32ANUNPREFIXED :
04367       fields->f_dst32_an_unprefixed = value;
04368       break;
04369     case M32C_OPERAND_DST32ANUNPREFIXEDHI :
04370       fields->f_dst32_an_unprefixed = value;
04371       break;
04372     case M32C_OPERAND_DST32ANUNPREFIXEDQI :
04373       fields->f_dst32_an_unprefixed = value;
04374       break;
04375     case M32C_OPERAND_DST32ANUNPREFIXEDSI :
04376       fields->f_dst32_an_unprefixed = value;
04377       break;
04378     case M32C_OPERAND_DST32R0HI_S :
04379       break;
04380     case M32C_OPERAND_DST32R0QI_S :
04381       break;
04382     case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
04383       fields->f_dst32_rn_ext_unprefixed = value;
04384       break;
04385     case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
04386       fields->f_dst32_rn_ext_unprefixed = value;
04387       break;
04388     case M32C_OPERAND_DST32RNPREFIXEDHI :
04389       fields->f_dst32_rn_prefixed_HI = value;
04390       break;
04391     case M32C_OPERAND_DST32RNPREFIXEDQI :
04392       fields->f_dst32_rn_prefixed_QI = value;
04393       break;
04394     case M32C_OPERAND_DST32RNPREFIXEDSI :
04395       fields->f_dst32_rn_prefixed_SI = value;
04396       break;
04397     case M32C_OPERAND_DST32RNUNPREFIXEDHI :
04398       fields->f_dst32_rn_unprefixed_HI = value;
04399       break;
04400     case M32C_OPERAND_DST32RNUNPREFIXEDQI :
04401       fields->f_dst32_rn_unprefixed_QI = value;
04402       break;
04403     case M32C_OPERAND_DST32RNUNPREFIXEDSI :
04404       fields->f_dst32_rn_unprefixed_SI = value;
04405       break;
04406     case M32C_OPERAND_G :
04407       break;
04408     case M32C_OPERAND_IMM_12_S4 :
04409       fields->f_imm_12_s4 = value;
04410       break;
04411     case M32C_OPERAND_IMM_12_S4N :
04412       fields->f_imm_12_s4 = value;
04413       break;
04414     case M32C_OPERAND_IMM_13_U3 :
04415       fields->f_imm_13_u3 = value;
04416       break;
04417     case M32C_OPERAND_IMM_16_HI :
04418       fields->f_dsp_16_s16 = value;
04419       break;
04420     case M32C_OPERAND_IMM_16_QI :
04421       fields->f_dsp_16_s8 = value;
04422       break;
04423     case M32C_OPERAND_IMM_16_SI :
04424       fields->f_dsp_16_s32 = value;
04425       break;
04426     case M32C_OPERAND_IMM_20_S4 :
04427       fields->f_imm_20_s4 = value;
04428       break;
04429     case M32C_OPERAND_IMM_24_HI :
04430       fields->f_dsp_24_s16 = value;
04431       break;
04432     case M32C_OPERAND_IMM_24_QI :
04433       fields->f_dsp_24_s8 = value;
04434       break;
04435     case M32C_OPERAND_IMM_24_SI :
04436       fields->f_dsp_24_s32 = value;
04437       break;
04438     case M32C_OPERAND_IMM_32_HI :
04439       fields->f_dsp_32_s16 = value;
04440       break;
04441     case M32C_OPERAND_IMM_32_QI :
04442       fields->f_dsp_32_s8 = value;
04443       break;
04444     case M32C_OPERAND_IMM_32_SI :
04445       fields->f_dsp_32_s32 = value;
04446       break;
04447     case M32C_OPERAND_IMM_40_HI :
04448       fields->f_dsp_40_s16 = value;
04449       break;
04450     case M32C_OPERAND_IMM_40_QI :
04451       fields->f_dsp_40_s8 = value;
04452       break;
04453     case M32C_OPERAND_IMM_40_SI :
04454       fields->f_dsp_40_s32 = value;
04455       break;
04456     case M32C_OPERAND_IMM_48_HI :
04457       fields->f_dsp_48_s16 = value;
04458       break;
04459     case M32C_OPERAND_IMM_48_QI :
04460       fields->f_dsp_48_s8 = value;
04461       break;
04462     case M32C_OPERAND_IMM_48_SI :
04463       fields->f_dsp_48_s32 = value;
04464       break;
04465     case M32C_OPERAND_IMM_56_HI :
04466       fields->f_dsp_56_s16 = value;
04467       break;
04468     case M32C_OPERAND_IMM_56_QI :
04469       fields->f_dsp_56_s8 = value;
04470       break;
04471     case M32C_OPERAND_IMM_64_HI :
04472       fields->f_dsp_64_s16 = value;
04473       break;
04474     case M32C_OPERAND_IMM_8_HI :
04475       fields->f_dsp_8_s16 = value;
04476       break;
04477     case M32C_OPERAND_IMM_8_QI :
04478       fields->f_dsp_8_s8 = value;
04479       break;
04480     case M32C_OPERAND_IMM_8_S4 :
04481       fields->f_imm_8_s4 = value;
04482       break;
04483     case M32C_OPERAND_IMM_8_S4N :
04484       fields->f_imm_8_s4 = value;
04485       break;
04486     case M32C_OPERAND_IMM_SH_12_S4 :
04487       fields->f_imm_12_s4 = value;
04488       break;
04489     case M32C_OPERAND_IMM_SH_20_S4 :
04490       fields->f_imm_20_s4 = value;
04491       break;
04492     case M32C_OPERAND_IMM_SH_8_S4 :
04493       fields->f_imm_8_s4 = value;
04494       break;
04495     case M32C_OPERAND_IMM1_S :
04496       fields->f_imm1_S = value;
04497       break;
04498     case M32C_OPERAND_IMM3_S :
04499       fields->f_imm3_S = value;
04500       break;
04501     case M32C_OPERAND_LAB_16_8 :
04502       fields->f_lab_16_8 = value;
04503       break;
04504     case M32C_OPERAND_LAB_24_8 :
04505       fields->f_lab_24_8 = value;
04506       break;
04507     case M32C_OPERAND_LAB_32_8 :
04508       fields->f_lab_32_8 = value;
04509       break;
04510     case M32C_OPERAND_LAB_40_8 :
04511       fields->f_lab_40_8 = value;
04512       break;
04513     case M32C_OPERAND_LAB_5_3 :
04514       fields->f_lab_5_3 = value;
04515       break;
04516     case M32C_OPERAND_LAB_8_16 :
04517       fields->f_lab_8_16 = value;
04518       break;
04519     case M32C_OPERAND_LAB_8_24 :
04520       fields->f_lab_8_24 = value;
04521       break;
04522     case M32C_OPERAND_LAB_8_8 :
04523       fields->f_lab_8_8 = value;
04524       break;
04525     case M32C_OPERAND_LAB32_JMP_S :
04526       fields->f_lab32_jmp_s = value;
04527       break;
04528     case M32C_OPERAND_Q :
04529       break;
04530     case M32C_OPERAND_R0 :
04531       break;
04532     case M32C_OPERAND_R0H :
04533       break;
04534     case M32C_OPERAND_R0L :
04535       break;
04536     case M32C_OPERAND_R1 :
04537       break;
04538     case M32C_OPERAND_R1R2R0 :
04539       break;
04540     case M32C_OPERAND_R2 :
04541       break;
04542     case M32C_OPERAND_R2R0 :
04543       break;
04544     case M32C_OPERAND_R3 :
04545       break;
04546     case M32C_OPERAND_R3R1 :
04547       break;
04548     case M32C_OPERAND_REGSETPOP :
04549       fields->f_8_8 = value;
04550       break;
04551     case M32C_OPERAND_REGSETPUSH :
04552       fields->f_8_8 = value;
04553       break;
04554     case M32C_OPERAND_RN16_PUSH_S :
04555       fields->f_4_1 = value;
04556       break;
04557     case M32C_OPERAND_S :
04558       break;
04559     case M32C_OPERAND_SRC16AN :
04560       fields->f_src16_an = value;
04561       break;
04562     case M32C_OPERAND_SRC16ANHI :
04563       fields->f_src16_an = value;
04564       break;
04565     case M32C_OPERAND_SRC16ANQI :
04566       fields->f_src16_an = value;
04567       break;
04568     case M32C_OPERAND_SRC16RNHI :
04569       fields->f_src16_rn = value;
04570       break;
04571     case M32C_OPERAND_SRC16RNQI :
04572       fields->f_src16_rn = value;
04573       break;
04574     case M32C_OPERAND_SRC32ANPREFIXED :
04575       fields->f_src32_an_prefixed = value;
04576       break;
04577     case M32C_OPERAND_SRC32ANPREFIXEDHI :
04578       fields->f_src32_an_prefixed = value;
04579       break;
04580     case M32C_OPERAND_SRC32ANPREFIXEDQI :
04581       fields->f_src32_an_prefixed = value;
04582       break;
04583     case M32C_OPERAND_SRC32ANPREFIXEDSI :
04584       fields->f_src32_an_prefixed = value;
04585       break;
04586     case M32C_OPERAND_SRC32ANUNPREFIXED :
04587       fields->f_src32_an_unprefixed = value;
04588       break;
04589     case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
04590       fields->f_src32_an_unprefixed = value;
04591       break;
04592     case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
04593       fields->f_src32_an_unprefixed = value;
04594       break;
04595     case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
04596       fields->f_src32_an_unprefixed = value;
04597       break;
04598     case M32C_OPERAND_SRC32RNPREFIXEDHI :
04599       fields->f_src32_rn_prefixed_HI = value;
04600       break;
04601     case M32C_OPERAND_SRC32RNPREFIXEDQI :
04602       fields->f_src32_rn_prefixed_QI = value;
04603       break;
04604     case M32C_OPERAND_SRC32RNPREFIXEDSI :
04605       fields->f_src32_rn_prefixed_SI = value;
04606       break;
04607     case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
04608       fields->f_src32_rn_unprefixed_HI = value;
04609       break;
04610     case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
04611       fields->f_src32_rn_unprefixed_QI = value;
04612       break;
04613     case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
04614       fields->f_src32_rn_unprefixed_SI = value;
04615       break;
04616     case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
04617       fields->f_5_1 = value;
04618       break;
04619     case M32C_OPERAND_X :
04620       break;
04621     case M32C_OPERAND_Z :
04622       break;
04623     case M32C_OPERAND_COND16_16 :
04624       fields->f_dsp_16_u8 = value;
04625       break;
04626     case M32C_OPERAND_COND16_24 :
04627       fields->f_dsp_24_u8 = value;
04628       break;
04629     case M32C_OPERAND_COND16_32 :
04630       fields->f_dsp_32_u8 = value;
04631       break;
04632     case M32C_OPERAND_COND16C :
04633       fields->f_cond16 = value;
04634       break;
04635     case M32C_OPERAND_COND16J :
04636       fields->f_cond16 = value;
04637       break;
04638     case M32C_OPERAND_COND16J5 :
04639       fields->f_cond16j_5 = value;
04640       break;
04641     case M32C_OPERAND_COND32 :
04642       fields->f_cond32 = value;
04643       break;
04644     case M32C_OPERAND_COND32_16 :
04645       fields->f_dsp_16_u8 = value;
04646       break;
04647     case M32C_OPERAND_COND32_24 :
04648       fields->f_dsp_24_u8 = value;
04649       break;
04650     case M32C_OPERAND_COND32_32 :
04651       fields->f_dsp_32_u8 = value;
04652       break;
04653     case M32C_OPERAND_COND32_40 :
04654       fields->f_dsp_40_u8 = value;
04655       break;
04656     case M32C_OPERAND_COND32J :
04657       fields->f_cond32j = value;
04658       break;
04659     case M32C_OPERAND_CR1_PREFIXED_32 :
04660       fields->f_21_3 = value;
04661       break;
04662     case M32C_OPERAND_CR1_UNPREFIXED_32 :
04663       fields->f_13_3 = value;
04664       break;
04665     case M32C_OPERAND_CR16 :
04666       fields->f_9_3 = value;
04667       break;
04668     case M32C_OPERAND_CR2_32 :
04669       fields->f_13_3 = value;
04670       break;
04671     case M32C_OPERAND_CR3_PREFIXED_32 :
04672       fields->f_21_3 = value;
04673       break;
04674     case M32C_OPERAND_CR3_UNPREFIXED_32 :
04675       fields->f_13_3 = value;
04676       break;
04677     case M32C_OPERAND_FLAGS16 :
04678       fields->f_9_3 = value;
04679       break;
04680     case M32C_OPERAND_FLAGS32 :
04681       fields->f_13_3 = value;
04682       break;
04683     case M32C_OPERAND_SCCOND32 :
04684       fields->f_cond16 = value;
04685       break;
04686     case M32C_OPERAND_SIZE :
04687       break;
04688 
04689     default :
04690       /* xgettext:c-format */
04691       fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
04692                      opindex);
04693       abort ();
04694   }
04695 }
04696 
04697 void
04698 m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
04699                           int opindex,
04700                           CGEN_FIELDS * fields,
04701                           bfd_vma value)
04702 {
04703   switch (opindex)
04704     {
04705     case M32C_OPERAND_A0 :
04706       break;
04707     case M32C_OPERAND_A1 :
04708       break;
04709     case M32C_OPERAND_AN16_PUSH_S :
04710       fields->f_4_1 = value;
04711       break;
04712     case M32C_OPERAND_BIT16AN :
04713       fields->f_dst16_an = value;
04714       break;
04715     case M32C_OPERAND_BIT16RN :
04716       fields->f_dst16_rn = value;
04717       break;
04718     case M32C_OPERAND_BIT3_S :
04719       fields->f_imm3_S = value;
04720       break;
04721     case M32C_OPERAND_BIT32ANPREFIXED :
04722       fields->f_dst32_an_prefixed = value;
04723       break;
04724     case M32C_OPERAND_BIT32ANUNPREFIXED :
04725       fields->f_dst32_an_unprefixed = value;
04726       break;
04727     case M32C_OPERAND_BIT32RNPREFIXED :
04728       fields->f_dst32_rn_prefixed_QI = value;
04729       break;
04730     case M32C_OPERAND_BIT32RNUNPREFIXED :
04731       fields->f_dst32_rn_unprefixed_QI = value;
04732       break;
04733     case M32C_OPERAND_BITBASE16_16_S8 :
04734       fields->f_dsp_16_s8 = value;
04735       break;
04736     case M32C_OPERAND_BITBASE16_16_U16 :
04737       fields->f_dsp_16_u16 = value;
04738       break;
04739     case M32C_OPERAND_BITBASE16_16_U8 :
04740       fields->f_dsp_16_u8 = value;
04741       break;
04742     case M32C_OPERAND_BITBASE16_8_U11_S :
04743       fields->f_bitbase16_u11_S = value;
04744       break;
04745     case M32C_OPERAND_BITBASE32_16_S11_UNPREFIXED :
04746       fields->f_bitbase32_16_s11_unprefixed = value;
04747       break;
04748     case M32C_OPERAND_BITBASE32_16_S19_UNPREFIXED :
04749       fields->f_bitbase32_16_s19_unprefixed = value;
04750       break;
04751     case M32C_OPERAND_BITBASE32_16_U11_UNPREFIXED :
04752       fields->f_bitbase32_16_u11_unprefixed = value;
04753       break;
04754     case M32C_OPERAND_BITBASE32_16_U19_UNPREFIXED :
04755       fields->f_bitbase32_16_u19_unprefixed = value;
04756       break;
04757     case M32C_OPERAND_BITBASE32_16_U27_UNPREFIXED :
04758       fields->f_bitbase32_16_u27_unprefixed = value;
04759       break;
04760     case M32C_OPERAND_BITBASE32_24_S11_PREFIXED :
04761       fields->f_bitbase32_24_s11_prefixed = value;
04762       break;
04763     case M32C_OPERAND_BITBASE32_24_S19_PREFIXED :
04764       fields->f_bitbase32_24_s19_prefixed = value;
04765       break;
04766     case M32C_OPERAND_BITBASE32_24_U11_PREFIXED :
04767       fields->f_bitbase32_24_u11_prefixed = value;
04768       break;
04769     case M32C_OPERAND_BITBASE32_24_U19_PREFIXED :
04770       fields->f_bitbase32_24_u19_prefixed = value;
04771       break;
04772     case M32C_OPERAND_BITBASE32_24_U27_PREFIXED :
04773       fields->f_bitbase32_24_u27_prefixed = value;
04774       break;
04775     case M32C_OPERAND_BITNO16R :
04776       fields->f_dsp_16_u8 = value;
04777       break;
04778     case M32C_OPERAND_BITNO32PREFIXED :
04779       fields->f_bitno32_prefixed = value;
04780       break;
04781     case M32C_OPERAND_BITNO32UNPREFIXED :
04782       fields->f_bitno32_unprefixed = value;
04783       break;
04784     case M32C_OPERAND_DSP_10_U6 :
04785       fields->f_dsp_10_u6 = value;
04786       break;
04787     case M32C_OPERAND_DSP_16_S16 :
04788       fields->f_dsp_16_s16 = value;
04789       break;
04790     case M32C_OPERAND_DSP_16_S8 :
04791       fields->f_dsp_16_s8 = value;
04792       break;
04793     case M32C_OPERAND_DSP_16_U16 :
04794       fields->f_dsp_16_u16 = value;
04795       break;
04796     case M32C_OPERAND_DSP_16_U20 :
04797       fields->f_dsp_16_u24 = value;
04798       break;
04799     case M32C_OPERAND_DSP_16_U24 :
04800       fields->f_dsp_16_u24 = value;
04801       break;
04802     case M32C_OPERAND_DSP_16_U8 :
04803       fields->f_dsp_16_u8 = value;
04804       break;
04805     case M32C_OPERAND_DSP_24_S16 :
04806       fields->f_dsp_24_s16 = value;
04807       break;
04808     case M32C_OPERAND_DSP_24_S8 :
04809       fields->f_dsp_24_s8 = value;
04810       break;
04811     case M32C_OPERAND_DSP_24_U16 :
04812       fields->f_dsp_24_u16 = value;
04813       break;
04814     case M32C_OPERAND_DSP_24_U20 :
04815       fields->f_dsp_24_u24 = value;
04816       break;
04817     case M32C_OPERAND_DSP_24_U24 :
04818       fields->f_dsp_24_u24 = value;
04819       break;
04820     case M32C_OPERAND_DSP_24_U8 :
04821       fields->f_dsp_24_u8 = value;
04822       break;
04823     case M32C_OPERAND_DSP_32_S16 :
04824       fields->f_dsp_32_s16 = value;
04825       break;
04826     case M32C_OPERAND_DSP_32_S8 :
04827       fields->f_dsp_32_s8 = value;
04828       break;
04829     case M32C_OPERAND_DSP_32_U16 :
04830       fields->f_dsp_32_u16 = value;
04831       break;
04832     case M32C_OPERAND_DSP_32_U20 :
04833       fields->f_dsp_32_u24 = value;
04834       break;
04835     case M32C_OPERAND_DSP_32_U24 :
04836       fields->f_dsp_32_u24 = value;
04837       break;
04838     case M32C_OPERAND_DSP_32_U8 :
04839       fields->f_dsp_32_u8 = value;
04840       break;
04841     case M32C_OPERAND_DSP_40_S16 :
04842       fields->f_dsp_40_s16 = value;
04843       break;
04844     case M32C_OPERAND_DSP_40_S8 :
04845       fields->f_dsp_40_s8 = value;
04846       break;
04847     case M32C_OPERAND_DSP_40_U16 :
04848       fields->f_dsp_40_u16 = value;
04849       break;
04850     case M32C_OPERAND_DSP_40_U20 :
04851       fields->f_dsp_40_u20 = value;
04852       break;
04853     case M32C_OPERAND_DSP_40_U24 :
04854       fields->f_dsp_40_u24 = value;
04855       break;
04856     case M32C_OPERAND_DSP_40_U8 :
04857       fields->f_dsp_40_u8 = value;
04858       break;
04859     case M32C_OPERAND_DSP_48_S16 :
04860       fields->f_dsp_48_s16 = value;
04861       break;
04862     case M32C_OPERAND_DSP_48_S8 :
04863       fields->f_dsp_48_s8 = value;
04864       break;
04865     case M32C_OPERAND_DSP_48_U16 :
04866       fields->f_dsp_48_u16 = value;
04867       break;
04868     case M32C_OPERAND_DSP_48_U20 :
04869       fields->f_dsp_48_u20 = value;
04870       break;
04871     case M32C_OPERAND_DSP_48_U24 :
04872       fields->f_dsp_48_u24 = value;
04873       break;
04874     case M32C_OPERAND_DSP_48_U8 :
04875       fields->f_dsp_48_u8 = value;
04876       break;
04877     case M32C_OPERAND_DSP_8_S24 :
04878       fields->f_dsp_8_s24 = value;
04879       break;
04880     case M32C_OPERAND_DSP_8_S8 :
04881       fields->f_dsp_8_s8 = value;
04882       break;
04883     case M32C_OPERAND_DSP_8_U16 :
04884       fields->f_dsp_8_u16 = value;
04885       break;
04886     case M32C_OPERAND_DSP_8_U24 :
04887       fields->f_dsp_8_u24 = value;
04888       break;
04889     case M32C_OPERAND_DSP_8_U6 :
04890       fields->f_dsp_8_u6 = value;
04891       break;
04892     case M32C_OPERAND_DSP_8_U8 :
04893       fields->f_dsp_8_u8 = value;
04894       break;
04895     case M32C_OPERAND_DST16AN :
04896       fields->f_dst16_an = value;
04897       break;
04898     case M32C_OPERAND_DST16AN_S :
04899       fields->f_dst16_an_s = value;
04900       break;
04901     case M32C_OPERAND_DST16ANHI :
04902       fields->f_dst16_an = value;
04903       break;
04904     case M32C_OPERAND_DST16ANQI :
04905       fields->f_dst16_an = value;
04906       break;
04907     case M32C_OPERAND_DST16ANQI_S :
04908       fields->f_dst16_rn_QI_s = value;
04909       break;
04910     case M32C_OPERAND_DST16ANSI :
04911       fields->f_dst16_an = value;
04912       break;
04913     case M32C_OPERAND_DST16RNEXTQI :
04914       fields->f_dst16_rn_ext = value;
04915       break;
04916     case M32C_OPERAND_DST16RNHI :
04917       fields->f_dst16_rn = value;
04918       break;
04919     case M32C_OPERAND_DST16RNQI :
04920       fields->f_dst16_rn = value;
04921       break;
04922     case M32C_OPERAND_DST16RNQI_S :
04923       fields->f_dst16_rn_QI_s = value;
04924       break;
04925     case M32C_OPERAND_DST16RNSI :
04926       fields->f_dst16_rn = value;
04927       break;
04928     case M32C_OPERAND_DST32ANEXTUNPREFIXED :
04929       fields->f_dst32_an_unprefixed = value;
04930       break;
04931     case M32C_OPERAND_DST32ANPREFIXED :
04932       fields->f_dst32_an_prefixed = value;
04933       break;
04934     case M32C_OPERAND_DST32ANPREFIXEDHI :
04935       fields->f_dst32_an_prefixed = value;
04936       break;
04937     case M32C_OPERAND_DST32ANPREFIXEDQI :
04938       fields->f_dst32_an_prefixed = value;
04939       break;
04940     case M32C_OPERAND_DST32ANPREFIXEDSI :
04941       fields->f_dst32_an_prefixed = value;
04942       break;
04943     case M32C_OPERAND_DST32ANUNPREFIXED :
04944       fields->f_dst32_an_unprefixed = value;
04945       break;
04946     case M32C_OPERAND_DST32ANUNPREFIXEDHI :
04947       fields->f_dst32_an_unprefixed = value;
04948       break;
04949     case M32C_OPERAND_DST32ANUNPREFIXEDQI :
04950       fields->f_dst32_an_unprefixed = value;
04951       break;
04952     case M32C_OPERAND_DST32ANUNPREFIXEDSI :
04953       fields->f_dst32_an_unprefixed = value;
04954       break;
04955     case M32C_OPERAND_DST32R0HI_S :
04956       break;
04957     case M32C_OPERAND_DST32R0QI_S :
04958       break;
04959     case M32C_OPERAND_DST32RNEXTUNPREFIXEDHI :
04960       fields->f_dst32_rn_ext_unprefixed = value;
04961       break;
04962     case M32C_OPERAND_DST32RNEXTUNPREFIXEDQI :
04963       fields->f_dst32_rn_ext_unprefixed = value;
04964       break;
04965     case M32C_OPERAND_DST32RNPREFIXEDHI :
04966       fields->f_dst32_rn_prefixed_HI = value;
04967       break;
04968     case M32C_OPERAND_DST32RNPREFIXEDQI :
04969       fields->f_dst32_rn_prefixed_QI = value;
04970       break;
04971     case M32C_OPERAND_DST32RNPREFIXEDSI :
04972       fields->f_dst32_rn_prefixed_SI = value;
04973       break;
04974     case M32C_OPERAND_DST32RNUNPREFIXEDHI :
04975       fields->f_dst32_rn_unprefixed_HI = value;
04976       break;
04977     case M32C_OPERAND_DST32RNUNPREFIXEDQI :
04978       fields->f_dst32_rn_unprefixed_QI = value;
04979       break;
04980     case M32C_OPERAND_DST32RNUNPREFIXEDSI :
04981       fields->f_dst32_rn_unprefixed_SI = value;
04982       break;
04983     case M32C_OPERAND_G :
04984       break;
04985     case M32C_OPERAND_IMM_12_S4 :
04986       fields->f_imm_12_s4 = value;
04987       break;
04988     case M32C_OPERAND_IMM_12_S4N :
04989       fields->f_imm_12_s4 = value;
04990       break;
04991     case M32C_OPERAND_IMM_13_U3 :
04992       fields->f_imm_13_u3 = value;
04993       break;
04994     case M32C_OPERAND_IMM_16_HI :
04995       fields->f_dsp_16_s16 = value;
04996       break;
04997     case M32C_OPERAND_IMM_16_QI :
04998       fields->f_dsp_16_s8 = value;
04999       break;
05000     case M32C_OPERAND_IMM_16_SI :
05001       fields->f_dsp_16_s32 = value;
05002       break;
05003     case M32C_OPERAND_IMM_20_S4 :
05004       fields->f_imm_20_s4 = value;
05005       break;
05006     case M32C_OPERAND_IMM_24_HI :
05007       fields->f_dsp_24_s16 = value;
05008       break;
05009     case M32C_OPERAND_IMM_24_QI :
05010       fields->f_dsp_24_s8 = value;
05011       break;
05012     case M32C_OPERAND_IMM_24_SI :
05013       fields->f_dsp_24_s32 = value;
05014       break;
05015     case M32C_OPERAND_IMM_32_HI :
05016       fields->f_dsp_32_s16 = value;
05017       break;
05018     case M32C_OPERAND_IMM_32_QI :
05019       fields->f_dsp_32_s8 = value;
05020       break;
05021     case M32C_OPERAND_IMM_32_SI :
05022       fields->f_dsp_32_s32 = value;
05023       break;
05024     case M32C_OPERAND_IMM_40_HI :
05025       fields->f_dsp_40_s16 = value;
05026       break;
05027     case M32C_OPERAND_IMM_40_QI :
05028       fields->f_dsp_40_s8 = value;
05029       break;
05030     case M32C_OPERAND_IMM_40_SI :
05031       fields->f_dsp_40_s32 = value;
05032       break;
05033     case M32C_OPERAND_IMM_48_HI :
05034       fields->f_dsp_48_s16 = value;
05035       break;
05036     case M32C_OPERAND_IMM_48_QI :
05037       fields->f_dsp_48_s8 = value;
05038       break;
05039     case M32C_OPERAND_IMM_48_SI :
05040       fields->f_dsp_48_s32 = value;
05041       break;
05042     case M32C_OPERAND_IMM_56_HI :
05043       fields->f_dsp_56_s16 = value;
05044       break;
05045     case M32C_OPERAND_IMM_56_QI :
05046       fields->f_dsp_56_s8 = value;
05047       break;
05048     case M32C_OPERAND_IMM_64_HI :
05049       fields->f_dsp_64_s16 = value;
05050       break;
05051     case M32C_OPERAND_IMM_8_HI :
05052       fields->f_dsp_8_s16 = value;
05053       break;
05054     case M32C_OPERAND_IMM_8_QI :
05055       fields->f_dsp_8_s8 = value;
05056       break;
05057     case M32C_OPERAND_IMM_8_S4 :
05058       fields->f_imm_8_s4 = value;
05059       break;
05060     case M32C_OPERAND_IMM_8_S4N :
05061       fields->f_imm_8_s4 = value;
05062       break;
05063     case M32C_OPERAND_IMM_SH_12_S4 :
05064       fields->f_imm_12_s4 = value;
05065       break;
05066     case M32C_OPERAND_IMM_SH_20_S4 :
05067       fields->f_imm_20_s4 = value;
05068       break;
05069     case M32C_OPERAND_IMM_SH_8_S4 :
05070       fields->f_imm_8_s4 = value;
05071       break;
05072     case M32C_OPERAND_IMM1_S :
05073       fields->f_imm1_S = value;
05074       break;
05075     case M32C_OPERAND_IMM3_S :
05076       fields->f_imm3_S = value;
05077       break;
05078     case M32C_OPERAND_LAB_16_8 :
05079       fields->f_lab_16_8 = value;
05080       break;
05081     case M32C_OPERAND_LAB_24_8 :
05082       fields->f_lab_24_8 = value;
05083       break;
05084     case M32C_OPERAND_LAB_32_8 :
05085       fields->f_lab_32_8 = value;
05086       break;
05087     case M32C_OPERAND_LAB_40_8 :
05088       fields->f_lab_40_8 = value;
05089       break;
05090     case M32C_OPERAND_LAB_5_3 :
05091       fields->f_lab_5_3 = value;
05092       break;
05093     case M32C_OPERAND_LAB_8_16 :
05094       fields->f_lab_8_16 = value;
05095       break;
05096     case M32C_OPERAND_LAB_8_24 :
05097       fields->f_lab_8_24 = value;
05098       break;
05099     case M32C_OPERAND_LAB_8_8 :
05100       fields->f_lab_8_8 = value;
05101       break;
05102     case M32C_OPERAND_LAB32_JMP_S :
05103       fields->f_lab32_jmp_s = value;
05104       break;
05105     case M32C_OPERAND_Q :
05106       break;
05107     case M32C_OPERAND_R0 :
05108       break;
05109     case M32C_OPERAND_R0H :
05110       break;
05111     case M32C_OPERAND_R0L :
05112       break;
05113     case M32C_OPERAND_R1 :
05114       break;
05115     case M32C_OPERAND_R1R2R0 :
05116       break;
05117     case M32C_OPERAND_R2 :
05118       break;
05119     case M32C_OPERAND_R2R0 :
05120       break;
05121     case M32C_OPERAND_R3 :
05122       break;
05123     case M32C_OPERAND_R3R1 :
05124       break;
05125     case M32C_OPERAND_REGSETPOP :
05126       fields->f_8_8 = value;
05127       break;
05128     case M32C_OPERAND_REGSETPUSH :
05129       fields->f_8_8 = value;
05130       break;
05131     case M32C_OPERAND_RN16_PUSH_S :
05132       fields->f_4_1 = value;
05133       break;
05134     case M32C_OPERAND_S :
05135       break;
05136     case M32C_OPERAND_SRC16AN :
05137       fields->f_src16_an = value;
05138       break;
05139     case M32C_OPERAND_SRC16ANHI :
05140       fields->f_src16_an = value;
05141       break;
05142     case M32C_OPERAND_SRC16ANQI :
05143       fields->f_src16_an = value;
05144       break;
05145     case M32C_OPERAND_SRC16RNHI :
05146       fields->f_src16_rn = value;
05147       break;
05148     case M32C_OPERAND_SRC16RNQI :
05149       fields->f_src16_rn = value;
05150       break;
05151     case M32C_OPERAND_SRC32ANPREFIXED :
05152       fields->f_src32_an_prefixed = value;
05153       break;
05154     case M32C_OPERAND_SRC32ANPREFIXEDHI :
05155       fields->f_src32_an_prefixed = value;
05156       break;
05157     case M32C_OPERAND_SRC32ANPREFIXEDQI :
05158       fields->f_src32_an_prefixed = value;
05159       break;
05160     case M32C_OPERAND_SRC32ANPREFIXEDSI :
05161       fields->f_src32_an_prefixed = value;
05162       break;
05163     case M32C_OPERAND_SRC32ANUNPREFIXED :
05164       fields->f_src32_an_unprefixed = value;
05165       break;
05166     case M32C_OPERAND_SRC32ANUNPREFIXEDHI :
05167       fields->f_src32_an_unprefixed = value;
05168       break;
05169     case M32C_OPERAND_SRC32ANUNPREFIXEDQI :
05170       fields->f_src32_an_unprefixed = value;
05171       break;
05172     case M32C_OPERAND_SRC32ANUNPREFIXEDSI :
05173       fields->f_src32_an_unprefixed = value;
05174       break;
05175     case M32C_OPERAND_SRC32RNPREFIXEDHI :
05176       fields->f_src32_rn_prefixed_HI = value;
05177       break;
05178     case M32C_OPERAND_SRC32RNPREFIXEDQI :
05179       fields->f_src32_rn_prefixed_QI = value;
05180       break;
05181     case M32C_OPERAND_SRC32RNPREFIXEDSI :
05182       fields->f_src32_rn_prefixed_SI = value;
05183       break;
05184     case M32C_OPERAND_SRC32RNUNPREFIXEDHI :
05185       fields->f_src32_rn_unprefixed_HI = value;
05186       break;
05187     case M32C_OPERAND_SRC32RNUNPREFIXEDQI :
05188       fields->f_src32_rn_unprefixed_QI = value;
05189       break;
05190     case M32C_OPERAND_SRC32RNUNPREFIXEDSI :
05191       fields->f_src32_rn_unprefixed_SI = value;
05192       break;
05193     case M32C_OPERAND_SRCDST16_R0L_R0H_S_NORMAL :
05194       fields->f_5_1 = value;
05195       break;
05196     case M32C_OPERAND_X :
05197       break;
05198     case M32C_OPERAND_Z :
05199       break;
05200     case M32C_OPERAND_COND16_16 :
05201       fields->f_dsp_16_u8 = value;
05202       break;
05203     case M32C_OPERAND_COND16_24 :
05204       fields->f_dsp_24_u8 = value;
05205       break;
05206     case M32C_OPERAND_COND16_32 :
05207       fields->f_dsp_32_u8 = value;
05208       break;
05209     case M32C_OPERAND_COND16C :
05210       fields->f_cond16 = value;
05211       break;
05212     case M32C_OPERAND_COND16J :
05213       fields->f_cond16 = value;
05214       break;
05215     case M32C_OPERAND_COND16J5 :
05216       fields->f_cond16j_5 = value;
05217       break;
05218     case M32C_OPERAND_COND32 :
05219       fields->f_cond32 = value;
05220       break;
05221     case M32C_OPERAND_COND32_16 :
05222       fields->f_dsp_16_u8 = value;
05223       break;
05224     case M32C_OPERAND_COND32_24 :
05225       fields->f_dsp_24_u8 = value;
05226       break;
05227     case M32C_OPERAND_COND32_32 :
05228       fields->f_dsp_32_u8 = value;
05229       break;
05230     case M32C_OPERAND_COND32_40 :
05231       fields->f_dsp_40_u8 = value;
05232       break;
05233     case M32C_OPERAND_COND32J :
05234       fields->f_cond32j = value;
05235       break;
05236     case M32C_OPERAND_CR1_PREFIXED_32 :
05237       fields->f_21_3 = value;
05238       break;
05239     case M32C_OPERAND_CR1_UNPREFIXED_32 :
05240       fields->f_13_3 = value;
05241       break;
05242     case M32C_OPERAND_CR16 :
05243       fields->f_9_3 = value;
05244       break;
05245     case M32C_OPERAND_CR2_32 :
05246       fields->f_13_3 = value;
05247       break;
05248     case M32C_OPERAND_CR3_PREFIXED_32 :
05249       fields->f_21_3 = value;
05250       break;
05251     case M32C_OPERAND_CR3_UNPREFIXED_32 :
05252       fields->f_13_3 = value;
05253       break;
05254     case M32C_OPERAND_FLAGS16 :
05255       fields->f_9_3 = value;
05256       break;
05257     case M32C_OPERAND_FLAGS32 :
05258       fields->f_13_3 = value;
05259       break;
05260     case M32C_OPERAND_SCCOND32 :
05261       fields->f_cond16 = value;
05262       break;
05263     case M32C_OPERAND_SIZE :
05264       break;
05265 
05266     default :
05267       /* xgettext:c-format */
05268       fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"),
05269                      opindex);
05270       abort ();
05271   }
05272 }
05273 
05274 /* Function to call before using the instruction builder tables.  */
05275 
05276 void
05277 m32c_cgen_init_ibld_table (CGEN_CPU_DESC cd)
05278 {
05279   cd->insert_handlers = & m32c_cgen_insert_handlers[0];
05280   cd->extract_handlers = & m32c_cgen_extract_handlers[0];
05281 
05282   cd->insert_operand = m32c_cgen_insert_operand;
05283   cd->extract_operand = m32c_cgen_extract_operand;
05284 
05285   cd->get_int_operand = m32c_cgen_get_int_operand;
05286   cd->set_int_operand = m32c_cgen_set_int_operand;
05287   cd->get_vma_operand = m32c_cgen_get_vma_operand;
05288   cd->set_vma_operand = m32c_cgen_set_vma_operand;
05289 }