X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fsh2%2Fsh2.h;h=9d6f0d2103e155e3e5e212e181c371c808404a4d;hb=8beb44303e3775fc574a92a558f5237bdd72fda3;hp=264bb4e8365931e7a885f4bbd76db678f371688b;hpb=80599a42dbc06f3e86a09dae9dc98dccbb84b48c;p=picodrive.git diff --git a/cpu/sh2/sh2.h b/cpu/sh2/sh2.h index 264bb4e..9d6f0d2 100644 --- a/cpu/sh2/sh2.h +++ b/cpu/sh2/sh2.h @@ -1,6 +1,13 @@ #ifndef __SH2_H__ #define __SH2_H__ +// registers - matches structure order +typedef enum { + SHR_R0 = 0, SHR_SP = 15, + SHR_PC, SHR_PPC, SHR_PR, SHR_SR, + SHR_GBR, SHR_VBR, SHR_MACH, SHR_MACL, +} sh2_reg_e; + typedef struct { unsigned int r[16]; // 00 @@ -11,20 +18,20 @@ typedef struct unsigned int gbr, vbr; // 50 unsigned int mach, macl; // 58 - // interpreter stuff - int icount; // 60 cycles left in current timeslice - unsigned int ea; - unsigned int delay; - unsigned int test_irq; - // common - const void *read8_map; // 70 + const void *read8_map; // 60 const void *read16_map; const void **write8_tab; const void **write16_tab; // drc stuff - //void **pc_hashtab; // 80 + int drc_tmp; // 70 + + // interpreter stuff + int icount; // cycles left in current timeslice + unsigned int ea; + unsigned int delay; + unsigned int test_irq; int pending_level; // MAX(pending_irl, pending_int_irq) int pending_irl; @@ -37,7 +44,7 @@ typedef struct unsigned int cycles_done; } SH2; -extern SH2 *sh2; // active sh2 +extern SH2 *sh2; // active sh2. XXX: consider removing int sh2_init(SH2 *sh2, int is_slave); void sh2_finish(SH2 *sh2);