--- trunk/src/include/cpu_arm.h 2007/10/08 16:19:16 19 +++ trunk/src/include/cpu_arm.h 2007/10/08 16:19:23 20 @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * - * $Id: cpu_arm.h,v 1.53 2005/10/27 14:01:15 debug Exp $ + * $Id: cpu_arm.h,v 1.57 2005/11/16 21:15:19 debug Exp $ */ #include "misc.h" @@ -92,6 +92,11 @@ }; +#define ARM_F_N 8 /* Same as ARM_FLAG_*, but */ +#define ARM_F_Z 4 /* for the 'flags' field instead */ +#define ARM_F_C 2 /* of cpsr. */ +#define ARM_F_V 1 + #define ARM_FLAG_N 0x80000000 /* Negative flag */ #define ARM_FLAG_Z 0x40000000 /* Zero flag */ #define ARM_FLAG_C 0x20000000 /* Carry flag */ @@ -134,12 +139,11 @@ #define ARM_MAX_VPH_TLB_ENTRIES 128 struct arm_vpg_tlb_entry { - int valid; - int writeflag; - int64_t timestamp; - unsigned char *host_page; + unsigned char valid; + unsigned char writeflag; uint32_t vaddr_page; uint32_t paddr_page; + unsigned char *host_page; }; @@ -173,7 +177,14 @@ uint32_t tmp_pc; /* Used for load/stores */ - /* Flag/status registers: */ + /* + * Flag/status registers: + * + * NOTE: 'flags' just contains the 4 flag bits. When cpsr is read, + * the flags should be copied from 'flags', and when cpsr is written + * to, 'flags' should be updated as well. + */ + size_t flags; uint32_t cpsr; uint32_t spsr_svc; uint32_t spsr_abt; @@ -214,6 +225,8 @@ struct arm_instr_call *cur_ic_page; struct arm_instr_call *next_ic; + void (*combination_check)(struct cpu *, + struct arm_instr_call *, int low_addr); /* * Virtual -> physical -> host address translation: @@ -230,10 +243,10 @@ struct arm_tc_physpage *phys_page[ARM_N_VPH_ENTRIES]; uint32_t phystranslation[ARM_N_VPH_ENTRIES/32]; - int16_t vaddr_to_tlbindex[ARM_N_VPH_ENTRIES]; + uint8_t vaddr_to_tlbindex[ARM_N_VPH_ENTRIES]; /* ARM specific: */ - unsigned char is_userpage[ARM_N_VPH_ENTRIES/8]; + uint32_t is_userpage[ARM_N_VPH_ENTRIES/32]; };