X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fm32c-ibld.c;h=6ad4da967da56711f3fa00bedc90f1c9f886219e;hb=4d91c2a4677b90802c8d369190927921bf8ee97d;hp=31d5f9f99cf6a3064a4b733bd5e5c55721fd463c;hpb=01f0fe5e0450edf168c1f612feb93cf588e4e7ea;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/m32c-ibld.c b/opcodes/m32c-ibld.c index 31d5f9f99c..6ad4da967d 100644 --- a/opcodes/m32c-ibld.c +++ b/opcodes/m32c-ibld.c @@ -1,22 +1,22 @@ +/* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */ /* Instruction building/extraction support for m32c. -*- C -*- THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator. - the resultant file is machine generated, cgen-ibld.in isn't - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1996-2020 Free Software Foundation, Inc. - This file is part of the GNU Binutils and GDB, the GNU debugger. + This file is part of libopcodes. - This program is free software; you can redistribute it and/or modify + This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) + the Free Software Foundation; either version 3, or (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + It is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., @@ -33,6 +33,7 @@ #include "symcat.h" #include "m32c-desc.h" #include "m32c-opc.h" +#include "cgen/basic-modes.h" #include "opintl.h" #include "safe-ctype.h" @@ -87,7 +88,7 @@ insert_1 (CGEN_CPU_DESC cd, unsigned long x,mask; int shift; - x = cgen_get_insn_value (cd, bufp, word_length); + x = cgen_get_insn_value (cd, bufp, word_length, cd->endian); /* Written this way to avoid undefined behaviour. */ mask = (((1L << (length - 1)) - 1) << 1) | 1; @@ -97,7 +98,7 @@ insert_1 (CGEN_CPU_DESC cd, shift = (word_length - (start + length)); x = (x & ~(mask << shift)) | ((value & mask) << shift); - cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x); + cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x, cd->endian); } #endif /* ! CGEN_INT_INSN_P */ @@ -137,7 +138,7 @@ insert_normal (CGEN_CPU_DESC cd, if (length == 0) return NULL; - if (word_length > 32) + if (word_length > 8 * sizeof (CGEN_INSN_INT)) abort (); /* For architectures with insns smaller than the base-insn-bitsize, @@ -154,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd, { long minval = - (1L << (length - 1)); unsigned long maxval = mask; - + if ((value > 0 && (unsigned long) value > maxval) || value < minval) { @@ -192,7 +193,7 @@ insert_normal (CGEN_CPU_DESC cd, { long minval = - (1L << (length - 1)); long maxval = (1L << (length - 1)) - 1; - + if (value < minval || value > maxval) { sprintf @@ -207,12 +208,19 @@ insert_normal (CGEN_CPU_DESC cd, #if CGEN_INT_INSN_P { - int shift; + int shift_within_word, shift_to_word, shift; + /* How to shift the value to BIT0 of the word. */ + shift_to_word = total_length - (word_offset + word_length); + + /* How to shift the value to the field within the word. */ if (CGEN_INSN_LSB0_P) - shift = (word_offset + start + 1) - length; + shift_within_word = start + 1 - length; else - shift = total_length - (word_offset + start + length); + shift_within_word = word_length - start - length; + + /* The total SHIFT, then mask in the value. */ + shift = shift_to_word + shift_within_word; *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift); } @@ -261,8 +269,8 @@ insert_insn_normal (CGEN_CPU_DESC cd, #else cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize, - (unsigned) CGEN_FIELDS_BITSIZE (fields)), - value); + (unsigned) CGEN_FIELDS_BITSIZE (fields)), + value, cd->insn_endian); #endif /* ! CGEN_INT_INSN_P */ @@ -379,7 +387,7 @@ extract_1 (CGEN_CPU_DESC cd, unsigned long x; int shift; - x = cgen_get_insn_value (cd, bufp, word_length); + x = cgen_get_insn_value (cd, bufp, word_length, cd->endian); if (CGEN_INSN_LSB0_P) shift = (start + 1) - length; @@ -441,7 +449,7 @@ extract_normal (CGEN_CPU_DESC cd, return 1; } - if (word_length > 32) + if (word_length > 8 * sizeof (CGEN_INSN_INT)) abort (); /* For architectures with insns smaller than the insn-base-bitsize, @@ -468,11 +476,14 @@ extract_normal (CGEN_CPU_DESC cd, { unsigned char *bufp = ex_info->insn_bytes + word_offset / 8; - if (word_length > 32) + if (word_length > 8 * sizeof (CGEN_INSN_INT)) abort (); if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0) - return 0; + { + *valuep = 0; + return 0; + } value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc); } @@ -582,7 +593,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_7_1) = ((((FLD (f_imm3_S)) - (1))) & (1)); - FLD (f_2_2) = ((((unsigned int) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3)); + FLD (f_2_2) = ((((UINT) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3)); } errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer); if (errmsg) @@ -601,14 +612,14 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_BIT32RNPREFIXED : { long value = fields->f_dst32_rn_prefixed_QI; - value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1)))); + value = (((((~ (((value) << (1))))) & (2))) | (((((USI) (value) >> (1))) & (1)))); errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer); } break; case M32C_OPERAND_BIT32RNUNPREFIXED : { long value = fields->f_dst32_rn_unprefixed_QI; - value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1)))); + value = (((((~ (((value) << (1))))) & (2))) | (((((USI) (value) >> (1))) & (1)))); errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer); } break; @@ -618,7 +629,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_BITBASE16_16_U16 : { long value = fields->f_dsp_16_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer); } break; @@ -629,7 +640,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno16_S) = ((FLD (f_bitbase16_u11_S)) & (7)); - FLD (f_dsp_8_u8) = ((((unsigned int) (FLD (f_bitbase16_u11_S)) >> (3))) & (255)); + FLD (f_dsp_8_u8) = ((((UINT) (FLD (f_bitbase16_u11_S)) >> (3))) & (255)); } errmsg = insert_normal (cd, fields->f_bitno16_S, 0, 0, 5, 3, 32, total_length, buffer); if (errmsg) @@ -643,7 +654,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s11_unprefixed)) & (7)); - FLD (f_dsp_16_s8) = ((int) (FLD (f_bitbase32_16_s11_unprefixed)) >> (3)); + FLD (f_dsp_16_s8) = ((INT) (FLD (f_bitbase32_16_s11_unprefixed)) >> (3)); } errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer); if (errmsg) @@ -657,14 +668,14 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_s19_unprefixed)) & (7)); - FLD (f_dsp_16_s16) = ((int) (FLD (f_bitbase32_16_s19_unprefixed)) >> (3)); + FLD (f_dsp_16_s16) = ((INT) (FLD (f_bitbase32_16_s19_unprefixed)) >> (3)); } errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer); if (errmsg) break; { long value = fields->f_dsp_16_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<> (3))) & (255)); + FLD (f_dsp_16_u8) = ((((UINT) (FLD (f_bitbase32_16_u11_unprefixed)) >> (3))) & (255)); } errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer); if (errmsg) @@ -689,14 +700,14 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u19_unprefixed)) & (7)); - FLD (f_dsp_16_u16) = ((((unsigned int) (FLD (f_bitbase32_16_u19_unprefixed)) >> (3))) & (65535)); + FLD (f_dsp_16_u16) = ((((UINT) (FLD (f_bitbase32_16_u19_unprefixed)) >> (3))) & (65535)); } errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer); if (errmsg) break; { long value = fields->f_dsp_16_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer); } if (errmsg) @@ -707,15 +718,15 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno32_unprefixed) = ((FLD (f_bitbase32_16_u27_unprefixed)) & (7)); - FLD (f_dsp_16_u16) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed)) >> (3))) & (65535)); - FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_bitbase32_16_u27_unprefixed)) >> (19))) & (255)); + FLD (f_dsp_16_u16) = ((((UINT) (FLD (f_bitbase32_16_u27_unprefixed)) >> (3))) & (65535)); + FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_bitbase32_16_u27_unprefixed)) >> (19))) & (255)); } errmsg = insert_normal (cd, fields->f_bitno32_unprefixed, 0, 0, 13, 3, 32, total_length, buffer); if (errmsg) break; { long value = fields->f_dsp_16_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer); } if (errmsg) @@ -729,7 +740,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s11_prefixed)) & (7)); - FLD (f_dsp_24_s8) = ((int) (FLD (f_bitbase32_24_s11_prefixed)) >> (3)); + FLD (f_dsp_24_s8) = ((INT) (FLD (f_bitbase32_24_s11_prefixed)) >> (3)); } errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer); if (errmsg) @@ -743,8 +754,8 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_s19_prefixed)) & (7)); - FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_s19_prefixed)) >> (3))) & (255)); - FLD (f_dsp_32_s8) = ((int) (FLD (f_bitbase32_24_s19_prefixed)) >> (11)); + FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_s19_prefixed)) >> (3))) & (255)); + FLD (f_dsp_32_s8) = ((INT) (FLD (f_bitbase32_24_s19_prefixed)) >> (11)); } errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer); if (errmsg) @@ -761,7 +772,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u11_prefixed)) & (7)); - FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u11_prefixed)) >> (3))) & (255)); + FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_u11_prefixed)) >> (3))) & (255)); } errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer); if (errmsg) @@ -775,8 +786,8 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u19_prefixed)) & (7)); - FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed)) >> (3))) & (255)); - FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u19_prefixed)) >> (11))) & (255)); + FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_u19_prefixed)) >> (3))) & (255)); + FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_bitbase32_24_u19_prefixed)) >> (11))) & (255)); } errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer); if (errmsg) @@ -793,8 +804,8 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_bitno32_prefixed) = ((FLD (f_bitbase32_24_u27_prefixed)) & (7)); - FLD (f_dsp_24_u8) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed)) >> (3))) & (255)); - FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_bitbase32_24_u27_prefixed)) >> (11))) & (65535)); + FLD (f_dsp_24_u8) = ((((UINT) (FLD (f_bitbase32_24_u27_prefixed)) >> (3))) & (255)); + FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_bitbase32_24_u27_prefixed)) >> (11))) & (65535)); } errmsg = insert_normal (cd, fields->f_bitno32_prefixed, 0, 0, 21, 3, 32, total_length, buffer); if (errmsg) @@ -804,7 +815,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, break; { long value = fields->f_dsp_32_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer); } if (errmsg) @@ -826,7 +837,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_DSP_16_S16 : { long value = fields->f_dsp_16_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<f_dsp_16_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer); } break; @@ -844,11 +855,11 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535)); - FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_16_u24)) >> (16))) & (255)); + FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_16_u24)) >> (16))) & (255)); } { long value = fields->f_dsp_16_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer); } if (errmsg) @@ -862,11 +873,11 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_u24)) & (65535)); - FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_16_u24)) >> (16))) & (255)); + FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_16_u24)) >> (16))) & (255)); } { long value = fields->f_dsp_16_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer); } if (errmsg) @@ -883,7 +894,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255)); - FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_24_s16)) >> (8))) & (255)); + FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_24_s16)) >> (8))) & (255)); } errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer); if (errmsg) @@ -900,7 +911,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u16)) & (255)); - FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_24_u16)) >> (8))) & (255)); + FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_24_u16)) >> (8))) & (255)); } errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer); if (errmsg) @@ -914,14 +925,14 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255)); - FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_dsp_24_u24)) >> (8))) & (65535)); + FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_dsp_24_u24)) >> (8))) & (65535)); } errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer); if (errmsg) break; { long value = fields->f_dsp_32_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer); } if (errmsg) @@ -932,14 +943,14 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_u24)) & (255)); - FLD (f_dsp_32_u16) = ((((unsigned int) (FLD (f_dsp_24_u24)) >> (8))) & (65535)); + FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_dsp_24_u24)) >> (8))) & (65535)); } errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer); if (errmsg) break; { long value = fields->f_dsp_32_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer); } if (errmsg) @@ -952,7 +963,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_DSP_32_S16 : { long value = fields->f_dsp_32_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<f_dsp_32_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer); } break; case M32C_OPERAND_DSP_32_U20 : { long value = fields->f_dsp_32_u24; - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer); } break; case M32C_OPERAND_DSP_32_U24 : { long value = fields->f_dsp_32_u24; - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer); } break; @@ -986,7 +997,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_DSP_40_S16 : { long value = fields->f_dsp_40_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<f_dsp_40_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 32, 8, 16, 32, total_length, buffer); } break; + case M32C_OPERAND_DSP_40_U20 : + { + long value = fields->f_dsp_40_u20; + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040)))); + errmsg = insert_normal (cd, value, 0, 32, 8, 20, 32, total_length, buffer); + } + break; case M32C_OPERAND_DSP_40_U24 : { long value = fields->f_dsp_40_u24; - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); errmsg = insert_normal (cd, value, 0, 32, 8, 24, 32, total_length, buffer); } break; @@ -1013,7 +1031,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_DSP_48_S16 : { long value = fields->f_dsp_48_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<f_dsp_48_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer); } break; + case M32C_OPERAND_DSP_48_U20 : + { +{ + FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_48_u20)) >> (16))) & (15)); + FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_u20)) & (65535)); +} + { + long value = fields->f_dsp_48_u16; + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer); + } + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_dsp_64_u8, 0, 64, 0, 8, 32, total_length, buffer); + if (errmsg) + break; + } + break; case M32C_OPERAND_DSP_48_U24 : { { - FLD (f_dsp_64_u8) = ((((unsigned int) (FLD (f_dsp_48_u24)) >> (16))) & (255)); + FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_48_u24)) >> (16))) & (255)); FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_u24)) & (65535)); } { long value = fields->f_dsp_48_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer); } if (errmsg) @@ -1051,7 +1087,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_DSP_8_S24 : { long value = fields->f_dsp_8_s24; - value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16)))); + value = ((((((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) & (255))) << (16))))) ^ (8388608))) - (8388608)); errmsg = insert_normal (cd, value, 0|(1<f_dsp_8_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 0, 8, 16, 32, total_length, buffer); } break; case M32C_OPERAND_DSP_8_U24 : { long value = fields->f_dsp_8_u24; - value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); + value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); errmsg = insert_normal (cd, value, 0, 0, 8, 24, 32, total_length, buffer); } break; @@ -1158,7 +1194,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_DST32RNPREFIXEDQI : { long value = fields->f_dst32_rn_prefixed_QI; - value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1)))); + value = (((((~ (((value) << (1))))) & (2))) | (((((USI) (value) >> (1))) & (1)))); errmsg = insert_normal (cd, value, 0, 0, 16, 2, 32, total_length, buffer); } break; @@ -1179,7 +1215,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_DST32RNUNPREFIXEDQI : { long value = fields->f_dst32_rn_unprefixed_QI; - value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1)))); + value = (((((~ (((value) << (1))))) & (2))) | (((((USI) (value) >> (1))) & (1)))); errmsg = insert_normal (cd, value, 0, 0, 8, 2, 32, total_length, buffer); } break; @@ -1204,7 +1240,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_IMM_16_HI : { long value = fields->f_dsp_16_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<> (16))) & (65535)); + FLD (f_dsp_32_u16) = ((((UINT) (FLD (f_dsp_16_s32)) >> (16))) & (65535)); FLD (f_dsp_16_u16) = ((FLD (f_dsp_16_s32)) & (65535)); } { long value = fields->f_dsp_16_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 0, 16, 16, 32, total_length, buffer); } if (errmsg) break; { long value = fields->f_dsp_32_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 32, 0, 16, 32, total_length, buffer); } if (errmsg) @@ -1240,7 +1276,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s16)) & (255)); - FLD (f_dsp_32_u8) = ((((unsigned int) (FLD (f_dsp_24_s16)) >> (8))) & (255)); + FLD (f_dsp_32_u8) = ((((UINT) (FLD (f_dsp_24_s16)) >> (8))) & (255)); } errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer); if (errmsg) @@ -1256,7 +1292,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_IMM_24_SI : { { - FLD (f_dsp_32_u24) = ((((unsigned int) (FLD (f_dsp_24_s32)) >> (8))) & (16777215)); + FLD (f_dsp_32_u24) = ((((UINT) (FLD (f_dsp_24_s32)) >> (8))) & (16777215)); FLD (f_dsp_24_u8) = ((FLD (f_dsp_24_s32)) & (255)); } errmsg = insert_normal (cd, fields->f_dsp_24_u8, 0, 0, 24, 8, 32, total_length, buffer); @@ -1264,7 +1300,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, break; { long value = fields->f_dsp_32_u24; - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); errmsg = insert_normal (cd, value, 0, 32, 0, 24, 32, total_length, buffer); } if (errmsg) @@ -1274,7 +1310,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_IMM_32_HI : { long value = fields->f_dsp_32_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<f_dsp_32_s32; - value = EXTSISI (((((((((unsigned int) (value) >> (24))) & (255))) | (((((unsigned int) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000))))))); + value = EXTSISI (((((((((UINT) (value) >> (24))) & (255))) | (((((UINT) (value) >> (8))) & (65280))))) | (((((((value) & (65280))) << (8))) | (((((value) & (255))) << (24))))))); errmsg = insert_normal (cd, value, 0|(1<f_dsp_40_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<> (24))) & (255)); + FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_40_s32)) >> (24))) & (255)); FLD (f_dsp_40_u24) = ((FLD (f_dsp_40_s32)) & (16777215)); } { long value = fields->f_dsp_40_u24; - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); errmsg = insert_normal (cd, value, 0, 32, 8, 24, 32, total_length, buffer); } if (errmsg) @@ -1319,7 +1355,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_IMM_48_HI : { long value = fields->f_dsp_48_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<> (16))) & (65535)); + FLD (f_dsp_64_u16) = ((((UINT) (FLD (f_dsp_48_s32)) >> (16))) & (65535)); FLD (f_dsp_48_u16) = ((FLD (f_dsp_48_s32)) & (65535)); } { long value = fields->f_dsp_48_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 32, 16, 16, 32, total_length, buffer); } if (errmsg) break; { long value = fields->f_dsp_64_u16; - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); errmsg = insert_normal (cd, value, 0, 64, 0, 16, 32, total_length, buffer); } if (errmsg) @@ -1352,7 +1388,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, { { FLD (f_dsp_56_u8) = ((FLD (f_dsp_56_s16)) & (255)); - FLD (f_dsp_64_u8) = ((((unsigned int) (FLD (f_dsp_56_s16)) >> (8))) & (255)); + FLD (f_dsp_64_u8) = ((((UINT) (FLD (f_dsp_56_s16)) >> (8))) & (255)); } errmsg = insert_normal (cd, fields->f_dsp_56_u8, 0, 32, 24, 8, 32, total_length, buffer); if (errmsg) @@ -1368,14 +1404,14 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_IMM_64_HI : { long value = fields->f_dsp_64_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<f_dsp_8_s16; - value = EXTHISI (((HI) (INT) (((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); errmsg = insert_normal (cd, value, 0|(1<> (1))) & (3)); + FLD (f_2_2) = ((((UINT) (((FLD (f_imm3_S)) - (1))) >> (1))) & (3)); } errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer); if (errmsg) @@ -1456,14 +1492,14 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_LAB_8_16 : { long value = fields->f_lab_8_16; - value = ((((((((value) - (((pc) + (1))))) & (255))) << (8))) | (((unsigned int) (((((value) - (((pc) + (1))))) & (65535))) >> (8)))); + value = ((((((((value) - (((pc) + (1))))) & (255))) << (8))) | (((USI) (((((value) - (((pc) + (1))))) & (65280))) >> (8)))); errmsg = insert_normal (cd, value, 0|(1<f_lab_8_24; - value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); + value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); errmsg = insert_normal (cd, value, 0|(1<> (1)); + FLD (f_2_2) = ((USI) (tmp_val) >> (1)); } errmsg = insert_normal (cd, fields->f_2_2, 0, 0, 2, 2, 32, total_length, buffer); if (errmsg) @@ -1570,7 +1606,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_SRC32RNPREFIXEDQI : { long value = fields->f_src32_rn_prefixed_QI; - value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1)))); + value = (((((~ (((value) << (1))))) & (2))) | (((((USI) (value) >> (1))) & (1)))); errmsg = insert_normal (cd, value, 0, 0, 18, 2, 32, total_length, buffer); } break; @@ -1591,7 +1627,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_SRC32RNUNPREFIXEDQI : { long value = fields->f_src32_rn_unprefixed_QI; - value = (((((((~ (value))) << (1))) & (2))) | (((((unsigned int) (value) >> (1))) & (1)))); + value = (((((~ (((value) << (1))))) & (2))) | (((((USI) (value) >> (1))) & (1)))); errmsg = insert_normal (cd, value, 0, 0, 10, 2, 32, total_length, buffer); } break; @@ -1630,7 +1666,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_COND32 : { { - FLD (f_9_1) = ((((unsigned int) (FLD (f_cond32)) >> (3))) & (1)); + FLD (f_9_1) = ((((UINT) (FLD (f_cond32)) >> (3))) & (1)); FLD (f_13_3) = ((FLD (f_cond32)) & (7)); } errmsg = insert_normal (cd, fields->f_9_1, 0, 0, 9, 1, 32, total_length, buffer); @@ -1656,7 +1692,7 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, case M32C_OPERAND_COND32J : { { - FLD (f_1_3) = ((((unsigned int) (FLD (f_cond32j)) >> (1))) & (7)); + FLD (f_1_3) = ((((UINT) (FLD (f_cond32j)) >> (1))) & (7)); FLD (f_7_1) = ((FLD (f_cond32j)) & (1)); } errmsg = insert_normal (cd, fields->f_1_3, 0, 0, 1, 3, 32, total_length, buffer); @@ -1699,8 +1735,9 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd, default : /* xgettext:c-format */ - fprintf (stderr, _("Unrecognized field %d while building insn.\n"), - opindex); + opcodes_error_handler + (_("internal error: unrecognized field %d while building insn"), + opindex); abort (); } @@ -1773,7 +1810,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value); - value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); fields->f_dst32_rn_prefixed_QI = value; } break; @@ -1781,7 +1818,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value); - value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); fields->f_dst32_rn_unprefixed_QI = value; } break; @@ -1792,7 +1829,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_16_u16 = value; } break; @@ -1817,7 +1854,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, length = extract_normal (cd, ex_info, insn_value, 0|(1<f_dsp_16_s8); if (length <= 0) break; { - FLD (f_bitbase32_16_s11_unprefixed) = ((((FLD (f_dsp_16_s8)) << (3))) | (FLD (f_bitno32_unprefixed))); + FLD (f_bitbase32_16_s11_unprefixed) = ((((FLD (f_dsp_16_s8)) * (8))) | (FLD (f_bitno32_unprefixed))); } } break; @@ -1828,12 +1865,12 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_16_s16 = value; } if (length <= 0) break; { - FLD (f_bitbase32_16_s19_unprefixed) = ((((FLD (f_dsp_16_s16)) << (3))) | (FLD (f_bitno32_unprefixed))); + FLD (f_bitbase32_16_s19_unprefixed) = ((((FLD (f_dsp_16_s16)) * (8))) | (FLD (f_bitno32_unprefixed))); } } break; @@ -1855,7 +1892,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_16_u16 = value; } if (length <= 0) break; @@ -1871,7 +1908,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_16_u16 = value; } if (length <= 0) break; @@ -1889,7 +1926,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, length = extract_normal (cd, ex_info, insn_value, 0|(1<f_dsp_24_s8); if (length <= 0) break; { - FLD (f_bitbase32_24_s11_prefixed) = ((((FLD (f_dsp_24_s8)) << (3))) | (FLD (f_bitno32_prefixed))); + FLD (f_bitbase32_24_s11_prefixed) = ((((FLD (f_dsp_24_s8)) * (8))) | (FLD (f_bitno32_prefixed))); } } break; @@ -1902,7 +1939,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, length = extract_normal (cd, ex_info, insn_value, 0|(1<f_dsp_32_s8); if (length <= 0) break; { - FLD (f_bitbase32_24_s19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_s8)) << (11))) | (FLD (f_bitno32_prefixed))))); + FLD (f_bitbase32_24_s19_prefixed) = ((((FLD (f_dsp_24_u8)) << (3))) | (((((FLD (f_dsp_32_s8)) * (2048))) | (FLD (f_bitno32_prefixed))))); } } break; @@ -1939,7 +1976,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_32_u16 = value; } if (length <= 0) break; @@ -1964,7 +2001,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_16_s16 = value; } break; @@ -1975,7 +2012,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_16_u16 = value; } break; @@ -1984,7 +2021,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_16_u16 = value; } if (length <= 0) break; @@ -2000,7 +2037,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_16_u16 = value; } if (length <= 0) break; @@ -2046,7 +2083,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_32_u16 = value; } if (length <= 0) break; @@ -2062,7 +2099,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_32_u16 = value; } if (length <= 0) break; @@ -2078,7 +2115,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_32_s16 = value; } break; @@ -2089,7 +2126,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_32_u16 = value; } break; @@ -2097,7 +2134,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value); - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); fields->f_dsp_32_u24 = value; } break; @@ -2105,7 +2142,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value); - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); fields->f_dsp_32_u24 = value; } break; @@ -2116,7 +2153,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_40_s16 = value; } break; @@ -2127,15 +2164,23 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_40_u16 = value; } break; + case M32C_OPERAND_DSP_40_U20 : + { + long value; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 20, 32, total_length, pc, & value); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040)))); + fields->f_dsp_40_u20 = value; + } + break; case M32C_OPERAND_DSP_40_U24 : { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value); - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); fields->f_dsp_40_u24 = value; } break; @@ -2146,7 +2191,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_48_s16 = value; } break; @@ -2157,8 +2202,24 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); + fields->f_dsp_48_u16 = value; + } + break; + case M32C_OPERAND_DSP_48_U20 : + { + { + long value; + length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_48_u16 = value; + } + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 8, 32, total_length, pc, & fields->f_dsp_64_u8); + if (length <= 0) break; +{ + FLD (f_dsp_48_u20) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u8)) << (16))) & (983040)))); +} } break; case M32C_OPERAND_DSP_48_U24 : @@ -2166,7 +2227,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_48_u16 = value; } if (length <= 0) break; @@ -2184,7 +2245,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (16))) | (((value) & (65280))))) | (((EXTQISI (TRUNCSIQI (((value) & (255))))) << (16)))); + value = ((((((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) & (255))) << (16))))) ^ (8388608))) - (8388608)); fields->f_dsp_8_s24 = value; } break; @@ -2195,7 +2256,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_8_u16 = value; } break; @@ -2203,7 +2264,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 24, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); + value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); fields->f_dsp_8_u24 = value; } break; @@ -2295,7 +2356,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 2, 32, total_length, pc, & value); - value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); fields->f_dst32_rn_prefixed_QI = value; } break; @@ -2319,7 +2380,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 2, 32, total_length, pc, & value); - value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); fields->f_dst32_rn_unprefixed_QI = value; } break; @@ -2346,7 +2407,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_16_s16 = value; } break; @@ -2358,14 +2419,14 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_16_u16 = value; } if (length <= 0) break; { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_32_u16 = value; } if (length <= 0) break; @@ -2398,7 +2459,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 0, 24, 32, total_length, pc, & value); - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); fields->f_dsp_32_u24 = value; } if (length <= 0) break; @@ -2411,7 +2472,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_32_s16 = value; } break; @@ -2422,7 +2483,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (24))) & (255))) | (((((unsigned int) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000))))))); + value = EXTSISI (((((((((UINT) (value) >> (24))) & (255))) | (((((UINT) (value) >> (8))) & (65280))))) | (((((((value) & (65280))) << (8))) | (((((value) & (255))) << (24))))))); fields->f_dsp_32_s32 = value; } break; @@ -2430,7 +2491,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_40_s16 = value; } break; @@ -2442,7 +2503,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 8, 24, 32, total_length, pc, & value); - value = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); + value = ((((((((USI) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (16711680)))); fields->f_dsp_40_u24 = value; } if (length <= 0) break; @@ -2457,7 +2518,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_48_s16 = value; } break; @@ -2469,19 +2530,19 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 32, 16, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_48_u16 = value; } if (length <= 0) break; { long value; length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 16, 32, total_length, pc, & value); - value = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))); + value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); fields->f_dsp_64_u16 = value; } if (length <= 0) break; { - FLD (f_dsp_48_s32) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u16)) << (16))) & (0xffff0000)))); + FLD (f_dsp_48_s32) = ((((FLD (f_dsp_48_u16)) & (65535))) | (((((FLD (f_dsp_64_u16)) & (65535))) << (16)))); } } break; @@ -2503,7 +2564,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_64_s16 = value; } break; @@ -2511,7 +2572,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) & (255))) | (((((value) << (8))) & (65280))))))); + value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); fields->f_dsp_8_s16 = value; } break; @@ -2596,7 +2657,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (8))) | (((int) (((((value) & (255))) << (24))) >> (16))))) + (((pc) + (1)))); + value = ((((((((((USI) (((value) & (65280))) >> (8))) | (((((value) & (255))) << (8))))) ^ (32768))) - (32768))) + (((pc) + (1)))); fields->f_lab_8_16 = value; } break; @@ -2604,7 +2665,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0|(1<> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); + value = ((((((USI) (value) >> (16))) | (((value) & (65280))))) | (((((value) & (255))) << (16)))); fields->f_lab_8_24 = value; } break; @@ -2709,7 +2770,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 18, 2, 32, total_length, pc, & value); - value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); fields->f_src32_rn_prefixed_QI = value; } break; @@ -2733,7 +2794,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, { long value; length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value); - value = (((((~ (((unsigned int) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); + value = (((((~ (((USI) (value) >> (1))))) & (1))) | (((((value) << (1))) & (2)))); fields->f_src32_rn_unprefixed_QI = value; } break; @@ -2836,20 +2897,21 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd, default : /* xgettext:c-format */ - fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), - opindex); + opcodes_error_handler + (_("internal error: unrecognized field %d while decoding insn"), + opindex); abort (); } return length; } -cgen_insert_fn * const m32c_cgen_insert_handlers[] = +cgen_insert_fn * const m32c_cgen_insert_handlers[] = { insert_insn_normal, }; -cgen_extract_fn * const m32c_cgen_extract_handlers[] = +cgen_extract_fn * const m32c_cgen_extract_handlers[] = { extract_insn_normal, }; @@ -3018,6 +3080,9 @@ m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case M32C_OPERAND_DSP_40_U16 : value = fields->f_dsp_40_u16; break; + case M32C_OPERAND_DSP_40_U20 : + value = fields->f_dsp_40_u20; + break; case M32C_OPERAND_DSP_40_U24 : value = fields->f_dsp_40_u24; break; @@ -3033,6 +3098,9 @@ m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case M32C_OPERAND_DSP_48_U16 : value = fields->f_dsp_48_u16; break; + case M32C_OPERAND_DSP_48_U20 : + value = fields->f_dsp_48_u20; + break; case M32C_OPERAND_DSP_48_U24 : value = fields->f_dsp_48_u24; break; @@ -3447,8 +3515,9 @@ m32c_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, default : /* xgettext:c-format */ - fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), - opindex); + opcodes_error_handler + (_("internal error: unrecognized field %d while getting int operand"), + opindex); abort (); } @@ -3611,6 +3680,9 @@ m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case M32C_OPERAND_DSP_40_U16 : value = fields->f_dsp_40_u16; break; + case M32C_OPERAND_DSP_40_U20 : + value = fields->f_dsp_40_u20; + break; case M32C_OPERAND_DSP_40_U24 : value = fields->f_dsp_40_u24; break; @@ -3626,6 +3698,9 @@ m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case M32C_OPERAND_DSP_48_U16 : value = fields->f_dsp_48_u16; break; + case M32C_OPERAND_DSP_48_U20 : + value = fields->f_dsp_48_u20; + break; case M32C_OPERAND_DSP_48_U24 : value = fields->f_dsp_48_u24; break; @@ -4040,8 +4115,9 @@ m32c_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, default : /* xgettext:c-format */ - fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), - opindex); + opcodes_error_handler + (_("internal error: unrecognized field %d while getting vma operand"), + opindex); abort (); } @@ -4209,6 +4285,9 @@ m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case M32C_OPERAND_DSP_40_U16 : fields->f_dsp_40_u16 = value; break; + case M32C_OPERAND_DSP_40_U20 : + fields->f_dsp_40_u20 = value; + break; case M32C_OPERAND_DSP_40_U24 : fields->f_dsp_40_u24 = value; break; @@ -4224,6 +4303,9 @@ m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case M32C_OPERAND_DSP_48_U16 : fields->f_dsp_48_u16 = value; break; + case M32C_OPERAND_DSP_48_U20 : + fields->f_dsp_48_u20 = value; + break; case M32C_OPERAND_DSP_48_U24 : fields->f_dsp_48_u24 = value; break; @@ -4621,8 +4703,9 @@ m32c_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, default : /* xgettext:c-format */ - fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), - opindex); + opcodes_error_handler + (_("internal error: unrecognized field %d while setting int operand"), + opindex); abort (); } } @@ -4780,6 +4863,9 @@ m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case M32C_OPERAND_DSP_40_U16 : fields->f_dsp_40_u16 = value; break; + case M32C_OPERAND_DSP_40_U20 : + fields->f_dsp_40_u20 = value; + break; case M32C_OPERAND_DSP_40_U24 : fields->f_dsp_40_u24 = value; break; @@ -4795,6 +4881,9 @@ m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case M32C_OPERAND_DSP_48_U16 : fields->f_dsp_48_u16 = value; break; + case M32C_OPERAND_DSP_48_U20 : + fields->f_dsp_48_u20 = value; + break; case M32C_OPERAND_DSP_48_U24 : fields->f_dsp_48_u24 = value; break; @@ -5192,8 +5281,9 @@ m32c_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, default : /* xgettext:c-format */ - fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), - opindex); + opcodes_error_handler + (_("internal error: unrecognized field %d while setting vma operand"), + opindex); abort (); } }