diff options
author | DJ Delorie <dj@redhat.com> | 2009-04-08 20:39:35 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2009-04-08 20:39:35 +0000 |
commit | 40493983ad5cdac9625b3f2a1f92e41e094fde4c (patch) | |
tree | 5a6507a0f4eb9522713a559264034119240ee31c /opcodes/mep-ibld.c | |
parent | 3c72fdec4e1915da62fbb6c279f3c9c0cd486873 (diff) | |
download | gdb-40493983ad5cdac9625b3f2a1f92e41e094fde4c.zip gdb-40493983ad5cdac9625b3f2a1f92e41e094fde4c.tar.gz gdb-40493983ad5cdac9625b3f2a1f92e41e094fde4c.tar.bz2 |
[cgen]
* cpu/mep-c5.cpu: New.
* cpu/mep-core.cpu: Add C5 support.
* cpu/mep.opc: Likewise.
[opcodes]
* mep-asm.c: Regenerate.
* mep-desc.c: Regenerate.
* mep-desc.h: Regenerate.
* mep-dis.c: Regenerate.
* mep-ibld.c: Regenerate.
* mep-opc.c: Regenerate.
* mep-opc.h: Regenerate.
[sid]
* component/cache/cache.cxx (cache_component::cache_component):
Add write_hint_pin(). Attach it to write-hint.
(cache_component::write_hint): New.
* component/cache/cache.h (write_hint_pin): New.
(write_hint): New.
* component/cgen-cpu/mep/Makefile.am: Regenerate.
* component/cgen-cpu/mep/Makefile.in: Regenerate.
* component/cgen-cpu/mep/mep-core1-decode.cxx: Regenerate.
* component/cgen-cpu/mep/mep-core1-decode.h: Regenerate.
* component/cgen-cpu/mep/mep-core1-defs.h: Regenerate.
* component/cgen-cpu/mep/mep-core1-model.cxx: Regenerate.
* component/cgen-cpu/mep/mep-core1-model.h: Regenerate.
* component/cgen-cpu/mep/mep-core1-sem.cxx: Regenerate.
* component/cgen-cpu/mep/mep-decode.cxx: Regenerate.
* component/cgen-cpu/mep/mep-decode.h: Regenerate.
* component/cgen-cpu/mep/mep-defs.h: Regenerate.
* component/cgen-cpu/mep/mep-desc.h: Regenerate.
* component/cgen-cpu/mep/mep-model.cxx: Regenerate.
* component/cgen-cpu/mep/mep-model.h: Regenerate.
* component/cgen-cpu/mep/mep-sem.cxx: Regenerate.
* component/cgen-cpu/mep/mep.cxx (mep_cpu): Connect
write-hint pin.
(do_cache): Add C5 support.
(do_cache_prefetch): Likewise.
(do_casb3, do_cash3, do_casw3): New.
* component/cgen-cpu/mep/mep.h: Add C5 support and write-hint pin.
(do_casb3, do_cash3, do_casw3): New.
* component/families/mep/Makefile.in: Regenerate.
* component/families/mep/dsu.in: Add C5 support.
* main/dynamic/mainDynamic.cxx: Add C5 support.
* main/dynamic/mepCfg.cxx: Connect write-hint pin.
* main/dynamic/mepCfg.h: Add C5 support.
Diffstat (limited to 'opcodes/mep-ibld.c')
-rw-r--r-- | opcodes/mep-ibld.c | 239 |
1 files changed, 179 insertions, 60 deletions
diff --git a/opcodes/mep-ibld.c b/opcodes/mep-ibld.c index ac44ee2..9473906 100644 --- a/opcodes/mep-ibld.c +++ b/opcodes/mep-ibld.c @@ -579,6 +579,34 @@ mep_cgen_insert_operand (CGEN_CPU_DESC cd, break; } break; + case MEP_OPERAND_C5RMUIMM20 : + { +{ + FLD (f_c5_rm) = ((unsigned int) (FLD (f_c5_rmuimm20)) >> (16)); + FLD (f_c5_16u16) = ((FLD (f_c5_rmuimm20)) & (65535)); +} + errmsg = insert_normal (cd, fields->f_c5_rm, 0, 0, 8, 4, 32, total_length, buffer); + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_c5_16u16, 0, 0, 16, 16, 32, total_length, buffer); + if (errmsg) + break; + } + break; + case MEP_OPERAND_C5RNMUIMM24 : + { +{ + FLD (f_c5_rnm) = ((unsigned int) (FLD (f_c5_rnmuimm24)) >> (16)); + FLD (f_c5_16u16) = ((FLD (f_c5_rnmuimm24)) & (65535)); +} + errmsg = insert_normal (cd, fields->f_c5_rnm, 0, 0, 4, 8, 32, total_length, buffer); + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_c5_16u16, 0, 0, 16, 16, 32, total_length, buffer); + if (errmsg) + break; + } + break; case MEP_OPERAND_CALLNUM : { { @@ -618,30 +646,37 @@ mep_cgen_insert_operand (CGEN_CPU_DESC cd, break; } break; - case MEP_OPERAND_CDISP8 : - errmsg = insert_normal (cd, fields->f_8s24, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer); + case MEP_OPERAND_CDISP10 : + { + long value = fields->f_cdisp10; + value = ((((((value) & (128))) ? (((value) ^ (768))) : (value)) & (512))) ? ((((((value) & (128))) ? (((value) ^ (768))) : (value)) - (1024))) : ((((value) & (128))) ? (((value) ^ (768))) : (value)); + errmsg = insert_normal (cd, value, 0, 0, 22, 10, 32, total_length, buffer); + } break; - case MEP_OPERAND_CDISP8A2 : + case MEP_OPERAND_CDISP10A2 : { - long value = fields->f_8s24a2; - value = ((int) (value) >> (1)); - errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 7, 32, total_length, buffer); + long value = fields->f_cdisp10; + value = ((((((value) & (128))) ? (((value) ^ (768))) : (value)) & (512))) ? ((((((value) & (128))) ? (((value) ^ (768))) : (value)) - (1024))) : ((((value) & (128))) ? (((value) ^ (768))) : (value)); + errmsg = insert_normal (cd, value, 0, 0, 22, 10, 32, total_length, buffer); } break; - case MEP_OPERAND_CDISP8A4 : + case MEP_OPERAND_CDISP10A4 : { - long value = fields->f_8s24a4; - value = ((int) (value) >> (2)); - errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 6, 32, total_length, buffer); + long value = fields->f_cdisp10; + value = ((((((value) & (128))) ? (((value) ^ (768))) : (value)) & (512))) ? ((((((value) & (128))) ? (((value) ^ (768))) : (value)) - (1024))) : ((((value) & (128))) ? (((value) ^ (768))) : (value)); + errmsg = insert_normal (cd, value, 0, 0, 22, 10, 32, total_length, buffer); } break; - case MEP_OPERAND_CDISP8A8 : + case MEP_OPERAND_CDISP10A8 : { - long value = fields->f_8s24a8; - value = ((int) (value) >> (3)); - errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 5, 32, total_length, buffer); + long value = fields->f_cdisp10; + value = ((((((value) & (128))) ? (((value) ^ (768))) : (value)) & (512))) ? ((((((value) & (128))) ? (((value) ^ (768))) : (value)) - (1024))) : ((((value) & (128))) ? (((value) ^ (768))) : (value)); + errmsg = insert_normal (cd, value, 0, 0, 22, 10, 32, total_length, buffer); } break; + case MEP_OPERAND_CDISP12 : + errmsg = insert_normal (cd, fields->f_12s20, 0, 0, 20, 12, 32, total_length, buffer); + break; case MEP_OPERAND_CIMM4 : errmsg = insert_normal (cd, fields->f_rn, 0, 0, 4, 4, 32, total_length, buffer); break; @@ -814,6 +849,9 @@ mep_cgen_insert_operand (CGEN_CPU_DESC cd, case MEP_OPERAND_RL : errmsg = insert_normal (cd, fields->f_rl, 0, 0, 12, 4, 32, total_length, buffer); break; + case MEP_OPERAND_RL5 : + errmsg = insert_normal (cd, fields->f_rl5, 0, 0, 20, 4, 32, total_length, buffer); + break; case MEP_OPERAND_RM : errmsg = insert_normal (cd, fields->f_rm, 0, 0, 8, 4, 32, total_length, buffer); break; @@ -994,6 +1032,28 @@ mep_cgen_extract_operand (CGEN_CPU_DESC cd, FLD (f_24u8a4n) = ((((FLD (f_24u8a4n_hi)) << (8))) | (((FLD (f_24u8a4n_lo)) << (2)))); } break; + case MEP_OPERAND_C5RMUIMM20 : + { + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_c5_rm); + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & fields->f_c5_16u16); + if (length <= 0) break; +{ + FLD (f_c5_rmuimm20) = ((FLD (f_c5_16u16)) | (((FLD (f_c5_rm)) << (16)))); +} + } + break; + case MEP_OPERAND_C5RNMUIMM24 : + { + length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 8, 32, total_length, pc, & fields->f_c5_rnm); + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & fields->f_c5_16u16); + if (length <= 0) break; +{ + FLD (f_c5_rnmuimm24) = ((FLD (f_c5_16u16)) | (((FLD (f_c5_rnm)) << (16)))); +} + } + break; case MEP_OPERAND_CALLNUM : { length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_5); @@ -1019,33 +1079,41 @@ mep_cgen_extract_operand (CGEN_CPU_DESC cd, FLD (f_ccrn) = ((((FLD (f_ccrn_hi)) << (4))) | (FLD (f_ccrn_lo))); } break; - case MEP_OPERAND_CDISP8 : - length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, pc, & fields->f_8s24); + case MEP_OPERAND_CDISP10 : + { + long value; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 22, 10, 32, total_length, pc, & value); + value = ((((((value) & (128))) ? (((value) ^ (768))) : (value)) & (512))) ? ((((((value) & (128))) ? (((value) ^ (768))) : (value)) - (1024))) : ((((value) & (128))) ? (((value) ^ (768))) : (value)); + fields->f_cdisp10 = value; + } break; - case MEP_OPERAND_CDISP8A2 : + case MEP_OPERAND_CDISP10A2 : { long value; - length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 7, 32, total_length, pc, & value); - value = ((value) << (1)); - fields->f_8s24a2 = value; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 22, 10, 32, total_length, pc, & value); + value = ((((((value) & (128))) ? (((value) ^ (768))) : (value)) & (512))) ? ((((((value) & (128))) ? (((value) ^ (768))) : (value)) - (1024))) : ((((value) & (128))) ? (((value) ^ (768))) : (value)); + fields->f_cdisp10 = value; } break; - case MEP_OPERAND_CDISP8A4 : + case MEP_OPERAND_CDISP10A4 : { long value; - length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 6, 32, total_length, pc, & value); - value = ((value) << (2)); - fields->f_8s24a4 = value; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 22, 10, 32, total_length, pc, & value); + value = ((((((value) & (128))) ? (((value) ^ (768))) : (value)) & (512))) ? ((((((value) & (128))) ? (((value) ^ (768))) : (value)) - (1024))) : ((((value) & (128))) ? (((value) ^ (768))) : (value)); + fields->f_cdisp10 = value; } break; - case MEP_OPERAND_CDISP8A8 : + case MEP_OPERAND_CDISP10A8 : { long value; - length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 5, 32, total_length, pc, & value); - value = ((value) << (3)); - fields->f_8s24a8 = value; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 22, 10, 32, total_length, pc, & value); + value = ((((((value) & (128))) ? (((value) ^ (768))) : (value)) & (512))) ? ((((((value) & (128))) ? (((value) ^ (768))) : (value)) - (1024))) : ((((value) & (128))) ? (((value) ^ (768))) : (value)); + fields->f_cdisp10 = value; } break; + case MEP_OPERAND_CDISP12 : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 12, 32, total_length, pc, & fields->f_12s20); + break; case MEP_OPERAND_CIMM4 : length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_rn); break; @@ -1185,6 +1253,9 @@ mep_cgen_extract_operand (CGEN_CPU_DESC cd, case MEP_OPERAND_RL : length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_rl); break; + case MEP_OPERAND_RL5 : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 4, 32, total_length, pc, & fields->f_rl5); + break; case MEP_OPERAND_RM : length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_rm); break; @@ -1352,6 +1423,12 @@ mep_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_ADDR24A4 : value = fields->f_24u8a4n; break; + case MEP_OPERAND_C5RMUIMM20 : + value = fields->f_c5_rmuimm20; + break; + case MEP_OPERAND_C5RNMUIMM24 : + value = fields->f_c5_rnmuimm24; + break; case MEP_OPERAND_CALLNUM : value = fields->f_callnum; break; @@ -1361,17 +1438,20 @@ mep_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_CCRN : value = fields->f_ccrn; break; - case MEP_OPERAND_CDISP8 : - value = fields->f_8s24; + case MEP_OPERAND_CDISP10 : + value = fields->f_cdisp10; break; - case MEP_OPERAND_CDISP8A2 : - value = fields->f_8s24a2; + case MEP_OPERAND_CDISP10A2 : + value = fields->f_cdisp10; break; - case MEP_OPERAND_CDISP8A4 : - value = fields->f_8s24a4; + case MEP_OPERAND_CDISP10A4 : + value = fields->f_cdisp10; break; - case MEP_OPERAND_CDISP8A8 : - value = fields->f_8s24a8; + case MEP_OPERAND_CDISP10A8 : + value = fields->f_cdisp10; + break; + case MEP_OPERAND_CDISP12 : + value = fields->f_12s20; break; case MEP_OPERAND_CIMM4 : value = fields->f_rn; @@ -1472,6 +1552,9 @@ mep_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_RL : value = fields->f_rl; break; + case MEP_OPERAND_RL5 : + value = fields->f_rl5; + break; case MEP_OPERAND_RM : value = fields->f_rm; break; @@ -1606,6 +1689,12 @@ mep_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_ADDR24A4 : value = fields->f_24u8a4n; break; + case MEP_OPERAND_C5RMUIMM20 : + value = fields->f_c5_rmuimm20; + break; + case MEP_OPERAND_C5RNMUIMM24 : + value = fields->f_c5_rnmuimm24; + break; case MEP_OPERAND_CALLNUM : value = fields->f_callnum; break; @@ -1615,17 +1704,20 @@ mep_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_CCRN : value = fields->f_ccrn; break; - case MEP_OPERAND_CDISP8 : - value = fields->f_8s24; + case MEP_OPERAND_CDISP10 : + value = fields->f_cdisp10; break; - case MEP_OPERAND_CDISP8A2 : - value = fields->f_8s24a2; + case MEP_OPERAND_CDISP10A2 : + value = fields->f_cdisp10; break; - case MEP_OPERAND_CDISP8A4 : - value = fields->f_8s24a4; + case MEP_OPERAND_CDISP10A4 : + value = fields->f_cdisp10; break; - case MEP_OPERAND_CDISP8A8 : - value = fields->f_8s24a8; + case MEP_OPERAND_CDISP10A8 : + value = fields->f_cdisp10; + break; + case MEP_OPERAND_CDISP12 : + value = fields->f_12s20; break; case MEP_OPERAND_CIMM4 : value = fields->f_rn; @@ -1726,6 +1818,9 @@ mep_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_RL : value = fields->f_rl; break; + case MEP_OPERAND_RL5 : + value = fields->f_rl5; + break; case MEP_OPERAND_RM : value = fields->f_rm; break; @@ -1867,6 +1962,12 @@ mep_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_ADDR24A4 : fields->f_24u8a4n = value; break; + case MEP_OPERAND_C5RMUIMM20 : + fields->f_c5_rmuimm20 = value; + break; + case MEP_OPERAND_C5RNMUIMM24 : + fields->f_c5_rnmuimm24 = value; + break; case MEP_OPERAND_CALLNUM : fields->f_callnum = value; break; @@ -1876,17 +1977,20 @@ mep_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_CCRN : fields->f_ccrn = value; break; - case MEP_OPERAND_CDISP8 : - fields->f_8s24 = value; + case MEP_OPERAND_CDISP10 : + fields->f_cdisp10 = value; + break; + case MEP_OPERAND_CDISP10A2 : + fields->f_cdisp10 = value; break; - case MEP_OPERAND_CDISP8A2 : - fields->f_8s24a2 = value; + case MEP_OPERAND_CDISP10A4 : + fields->f_cdisp10 = value; break; - case MEP_OPERAND_CDISP8A4 : - fields->f_8s24a4 = value; + case MEP_OPERAND_CDISP10A8 : + fields->f_cdisp10 = value; break; - case MEP_OPERAND_CDISP8A8 : - fields->f_8s24a8 = value; + case MEP_OPERAND_CDISP12 : + fields->f_12s20 = value; break; case MEP_OPERAND_CIMM4 : fields->f_rn = value; @@ -1970,6 +2074,9 @@ mep_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_RL : fields->f_rl = value; break; + case MEP_OPERAND_RL5 : + fields->f_rl5 = value; + break; case MEP_OPERAND_RM : fields->f_rm = value; break; @@ -2095,6 +2202,12 @@ mep_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_ADDR24A4 : fields->f_24u8a4n = value; break; + case MEP_OPERAND_C5RMUIMM20 : + fields->f_c5_rmuimm20 = value; + break; + case MEP_OPERAND_C5RNMUIMM24 : + fields->f_c5_rnmuimm24 = value; + break; case MEP_OPERAND_CALLNUM : fields->f_callnum = value; break; @@ -2104,17 +2217,20 @@ mep_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_CCRN : fields->f_ccrn = value; break; - case MEP_OPERAND_CDISP8 : - fields->f_8s24 = value; + case MEP_OPERAND_CDISP10 : + fields->f_cdisp10 = value; + break; + case MEP_OPERAND_CDISP10A2 : + fields->f_cdisp10 = value; break; - case MEP_OPERAND_CDISP8A2 : - fields->f_8s24a2 = value; + case MEP_OPERAND_CDISP10A4 : + fields->f_cdisp10 = value; break; - case MEP_OPERAND_CDISP8A4 : - fields->f_8s24a4 = value; + case MEP_OPERAND_CDISP10A8 : + fields->f_cdisp10 = value; break; - case MEP_OPERAND_CDISP8A8 : - fields->f_8s24a8 = value; + case MEP_OPERAND_CDISP12 : + fields->f_12s20 = value; break; case MEP_OPERAND_CIMM4 : fields->f_rn = value; @@ -2198,6 +2314,9 @@ mep_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case MEP_OPERAND_RL : fields->f_rl = value; break; + case MEP_OPERAND_RL5 : + fields->f_rl5 = value; + break; case MEP_OPERAND_RM : fields->f_rm = value; break; |