Search
lxdream.org :: lxdream/src/aica/armdasm.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/aica/armdasm.c
changeset 998:1754a8c6a9cf
prev813:262efed79218
next1091:186558374345
author nkeynes
date Tue Mar 24 11:15:57 2009 +0000 (14 years ago)
permissions -rw-r--r--
last change Add preliminary implementation of the GDB remote debugging server - attaches to
either or both the SH4 and ARM
file annotate diff log raw
1.1 --- a/src/aica/armdasm.c Mon Aug 18 12:16:55 2008 +0000
1.2 +++ b/src/aica/armdasm.c Tue Mar 24 11:15:57 2009 +0000
1.3 @@ -57,19 +57,40 @@
1.4 {"R10",REG_INT, &armr.r[10]}, {"R11",REG_INT, &armr.r[11]},
1.5 {"R12",REG_INT, &armr.r[12]}, {"R13",REG_INT, &armr.r[13]},
1.6 {"R14",REG_INT, &armr.r[14]}, {"R15",REG_INT, &armr.r[15]},
1.7 +
1.8 + /* Block of FPA registers (arm-elf-gdb seems to expect these).
1.9 + * Oddly enough the ARM7TDMI doesn't have them */
1.10 + {"F0",REG_NONE, NULL}, {"F1",REG_NONE, NULL},
1.11 + {"F2",REG_NONE, NULL}, {"F3",REG_NONE, NULL},
1.12 + {"F4",REG_NONE, NULL}, {"F5",REG_NONE, NULL},
1.13 + {"F6",REG_NONE, NULL}, {"F7",REG_NONE, NULL},
1.14 + {"FPS",REG_NONE, NULL},
1.15 +
1.16 + /* System registers */
1.17 {"CPSR", REG_INT, &armr.cpsr}, {"SPSR", REG_INT, &armr.spsr},
1.18 {NULL, 0, NULL} };
1.19
1.20 +/* Implementation of get_register - ARM has no pseudo registers so this
1.21 + * is pretty simple
1.22 + */
1.23 +void *arm_get_register( int reg )
1.24 +{
1.25 + if( reg < 0 || reg >= 27 )
1.26 + return NULL;
1.27 + return arm_reg_map[reg].value;
1.28 +}
1.29
1.30 const struct cpu_desc_struct arm_cpu_desc =
1.31 -{ "ARM7", arm_disasm_instruction, arm_execute_instruction, arm_has_page,
1.32 - arm_set_breakpoint, arm_clear_breakpoint, arm_get_breakpoint, 4,
1.33 - (char *)&armr, sizeof(armr), arm_reg_map,
1.34 +{ "ARM7", arm_disasm_instruction, arm_get_register, arm_has_page,
1.35 + arm_read_phys, arm_write_phys, arm_read_phys, arm_write_phys,
1.36 + arm_execute_instruction, arm_set_breakpoint, arm_clear_breakpoint,
1.37 + arm_get_breakpoint, 4, (char *)&armr, sizeof(armr), arm_reg_map, 26, 26,
1.38 &armr.r[15] };
1.39 const struct cpu_desc_struct armt_cpu_desc =
1.40 -{ "ARM7T", armt_disasm_instruction, arm_execute_instruction, arm_has_page,
1.41 - arm_set_breakpoint, arm_clear_breakpoint, arm_get_breakpoint, 2,
1.42 - (char*)&armr, sizeof(armr), arm_reg_map,
1.43 +{ "ARM7T", armt_disasm_instruction, arm_get_register, arm_has_page,
1.44 + arm_read_phys, arm_write_phys, arm_read_phys, arm_write_phys,
1.45 + arm_execute_instruction, arm_set_breakpoint, arm_clear_breakpoint,
1.46 + arm_get_breakpoint, 2, (char*)&armr, sizeof(armr), arm_reg_map, 26, 26,
1.47 &armr.r[15] };
1.48
1.49
.