Search
lxdream.org :: lxdream/src/cpu.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/cpu.h
changeset 43:0cf3e339cc59
prev30:89b30313d757
next303:41786e056449
author nkeynes
date Mon Dec 26 11:47:15 2005 +0000 (14 years ago)
permissions -rw-r--r--
last change Add sh4 + arm breakpoints
Hook up break button in GUI
Enable ARM slice in main loop
file annotate diff log raw
1.1 --- a/src/cpu.h Sun Dec 25 05:57:00 2005 +0000
1.2 +++ b/src/cpu.h Mon Dec 26 11:47:15 2005 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: cpu.h,v 1.6 2005-12-25 05:56:55 nkeynes Exp $
1.6 + * $Id: cpu.h,v 1.7 2005-12-26 11:47:12 nkeynes Exp $
1.7 *
1.8 * Generic CPU definitions, primarily for providing information to the GUI.
1.9 *
1.10 @@ -37,9 +37,6 @@
1.11 */
1.12 typedef uint32_t (*disasm_func_t)(uint32_t pc, char *buffer, int buflen, char *opcode );
1.13
1.14 -typedef int (*is_valid_page_t)(uint32_t pc);
1.15 -typedef gboolean (*step_func_t)();
1.16 -
1.17 #define REG_INT 0
1.18 #define REG_FLT 1
1.19 #define REG_SPECIAL 2
1.20 @@ -57,16 +54,19 @@
1.21 * CPU definition structure - basic information and support functions.
1.22 */
1.23 typedef struct cpu_desc_struct {
1.24 - char *name; /* CPU Name */
1.25 - disasm_func_t disasm_func; /* Disassembly function */
1.26 - step_func_t step_func; /* Single step function */
1.27 - is_valid_page_t is_valid_page_func; /* Test for valid memory page */
1.28 - size_t instr_size; /* Size of instruction */
1.29 - char *regs; /* Pointer to start of registers */
1.30 - size_t regs_size; /* Size of register structure in bytes */
1.31 - const struct reg_desc_struct *regs_info; /* Description of all registers */
1.32 - uint32_t *pc; /* Pointer to PC register */
1.33 - uint32_t *icount; /* Pointer to instruction counter */
1.34 + char *name; /* CPU Name */
1.35 + disasm_func_t disasm_func; /* Disassembly function */
1.36 + gboolean (*step_func)(); /* Single step function */
1.37 + int (*is_valid_page_func)(uint32_t); /* Test for valid memory page */
1.38 + void (*set_breakpoint)(uint32_t, int);
1.39 + gboolean (*clear_breakpoint)(uint32_t, int);
1.40 + int (*get_breakpoint)(uint32_t);
1.41 + size_t instr_size; /* Size of instruction */
1.42 + char *regs; /* Pointer to start of registers */
1.43 + size_t regs_size; /* Size of register structure in bytes */
1.44 + const struct reg_desc_struct *regs_info; /* Description of all registers */
1.45 + uint32_t *pc; /* Pointer to PC register */
1.46 + uint32_t *icount; /* Pointer to instruction counter */
1.47 } *cpu_desc_t;
1.48
1.49 #ifdef __cplusplus
.