--- hatari/src/uae-cpu/newcpu.h 2019/04/01 07:11:37 1.1.1.7 +++ hatari/src/uae-cpu/newcpu.h 2019/04/01 07:13:12 1.1.1.9 @@ -56,8 +56,8 @@ #define COPY_CARRY (SET_XFLG (GET_CFLG)) #endif -extern int areg_byteinc[]; -extern int imm8_table[]; +extern const int areg_byteinc[]; +extern const int imm8_table[]; extern int movem_index1[256]; extern int movem_index2[256]; @@ -152,9 +152,9 @@ STATIC_INLINE uaecptr m68k_getpc_p (uae_ return regs.pc + ((char *)p - (char *)regs.pc_oldp); } -#define get_ibyte(o) do_get_mem_byte((uae_u8 *)(regs.pc_p + (o) + 1)) -#define get_iword(o) do_get_mem_word((uae_u16 *)(regs.pc_p + (o))) -#define get_ilong(o) do_get_mem_long((uae_u32 *)(regs.pc_p + (o))) +#define get_ibyte(o) do_get_mem_byte(regs.pc_p + (o) + 1) +#define get_iword(o) do_get_mem_word(regs.pc_p + (o)) +#define get_ilong(o) do_get_mem_long(regs.pc_p + (o)) STATIC_INLINE void refill_prefetch (uae_u32 currpc, uae_u32 offs) { @@ -166,7 +166,7 @@ STATIC_INLINE void refill_prefetch (uae_ r = *(uae_u32 *)ptr; regs.prefetch = r; #else - r = do_get_mem_long ((uae_u32 *)ptr); + r = do_get_mem_long (ptr); do_put_mem_long (®s.prefetch, r); #endif /* printf ("PC %lx T %lx PCPOFFS %d R %lx\n", currpc, t, pc_p_offs, r); */ @@ -199,7 +199,7 @@ STATIC_INLINE uae_u32 get_iword_prefetch refill_prefetch (currpc, o); offs = addr - regs.prefetch_pc; } - v = do_get_mem_word ((uae_u16 *)(((uae_u8 *)®s.prefetch) + offs)); + v = do_get_mem_word (((uae_u8 *)®s.prefetch) + offs); if (offs >= 2) refill_prefetch (currpc, 2); /* printf ("get_iword PC %lx ADDR %lx OFFS %lx V %lx\n", currpc, addr, offs, v); */ @@ -321,17 +321,17 @@ extern uaecptr last_fault_for_exception_ #define CPU_OP_NAME(a) op ## a /* 68040 */ -extern struct cputbl op_smalltbl_0_ff[]; +extern const struct cputbl op_smalltbl_0_ff[]; /* 68020 + 68881 */ -extern struct cputbl op_smalltbl_1_ff[]; +extern const struct cputbl op_smalltbl_1_ff[]; /* 68020 */ -extern struct cputbl op_smalltbl_2_ff[]; +extern const struct cputbl op_smalltbl_2_ff[]; /* 68010 */ -extern struct cputbl op_smalltbl_3_ff[]; +extern const struct cputbl op_smalltbl_3_ff[]; /* 68000 */ -extern struct cputbl op_smalltbl_4_ff[]; +extern const struct cputbl op_smalltbl_4_ff[]; /* 68000 slow but compatible. */ -extern struct cputbl op_smalltbl_5_ff[]; +extern const struct cputbl op_smalltbl_5_ff[]; extern cpuop_func *cpufunctbl[65536];