aboutsummaryrefslogtreecommitdiff
path: root/opcodes/m32c-ibld.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2007-03-21 02:53:50 +0000
committerDJ Delorie <dj@redhat.com>2007-03-21 02:53:50 +0000
commit75b06e7b7a1972cba3f0f3b1e36010eb7cd99d78 (patch)
tree40c867aed411c4970792ff9e369a842854ddd368 /opcodes/m32c-ibld.c
parent78f1dc9ebe3609f6b3c67b0d1f6ebe97250dfd5e (diff)
downloadgdb-75b06e7b7a1972cba3f0f3b1e36010eb7cd99d78.zip
gdb-75b06e7b7a1972cba3f0f3b1e36010eb7cd99d78.tar.gz
gdb-75b06e7b7a1972cba3f0f3b1e36010eb7cd99d78.tar.bz2
* m32c.cpu (f-dsp-40-u20, f-dsp-48-u20, Dsp-40-u20, Dsp-40-u20,
mem20): New. (src16-16-20-An-relative-*): New. (dst16-*-20-An-relative-*): New. (dst16-16-16sa-*): New (dst16-16-16ar-*): New (dst32-16-16sa-Unprefixed-*): New (jsri): Fix operands. (setzx): Fix encoding. * m32c-asm.c: Regenerate. * m32c-desc.c: Regenerate. * m32c-desc.h: Regenerate. * m32c-dis.h: Regenerate. * m32c-ibld.c: Regenerate. * m32c-opc.c: Regenerate. * m32c-opc.h: Regenerate.
Diffstat (limited to 'opcodes/m32c-ibld.c')
-rw-r--r--opcodes/m32c-ibld.c73
1 files changed, 73 insertions, 0 deletions
diff --git a/opcodes/m32c-ibld.c b/opcodes/m32c-ibld.c
index 31d5f9f..5ccde34 100644
--- a/opcodes/m32c-ibld.c
+++ b/opcodes/m32c-ibld.c
@@ -1000,6 +1000,13 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd,
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 = ((((((((unsigned int) (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;
@@ -1027,6 +1034,24 @@ m32c_cgen_insert_operand (CGEN_CPU_DESC cd,
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) = ((((unsigned int) (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 = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
+ 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 :
{
{
@@ -2131,6 +2156,14 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd,
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 = ((((((((unsigned int) (value) >> (16))) & (255))) | (((value) & (65280))))) | (((((value) << (16))) & (983040))));
+ fields->f_dsp_40_u20 = value;
+ }
+ break;
case M32C_OPERAND_DSP_40_U24 :
{
long value;
@@ -2161,6 +2194,22 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC cd,
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 = ((((((unsigned int) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280))));
+ 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 :
{
{
@@ -3018,6 +3067,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 +3085,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;
@@ -3611,6 +3666,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 +3684,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;
@@ -4209,6 +4270,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 +4288,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;
@@ -4780,6 +4847,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 +4865,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;