drc: rework for 64bit, part 3

This commit is contained in:
notaz
2021-11-01 21:57:53 +02:00
parent 1a4301c419
commit 643aeae322
4 changed files with 304 additions and 301 deletions
File diff suppressed because it is too large Load Diff
+4 -6
View File
@@ -43,15 +43,13 @@ extern char *invc_ptr;
// "round" address helpful for debug
// this produces best code, but not many platforms allow it,
// only use if you are sure this range is always free
#define BASE_ADDR 0x1000000
#define translation_cache (char *)BASE_ADDR
#define BASE_ADDR_ 0x1000000
#define translation_cache (u_char *)BASE_ADDR_
#elif defined(BASE_ADDR_DYNAMIC)
// for platforms that can't just use .bss buffer, like vita
// otherwise better to use the next option for closer branches
extern char *translation_cache;
#define BASE_ADDR (u_int)translation_cache
extern u_char *translation_cache;
#else
// using a static buffer in .bss
extern char translation_cache[1 << TARGET_SIZE_2];
#define BASE_ADDR (u_int)translation_cache
extern u_char translation_cache[1 << TARGET_SIZE_2];
#endif
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -15,10 +15,10 @@ static int pcsx_direct_read(int type, u_int addr, int cc_adj, int cc, int rs, in
case 0x1120: // rcnt2 count
if (rt < 0) goto dont_care;
if (cc < 0) return 0;
emit_readword((int)&rcnts[2].mode, HOST_TEMPREG);
emit_readword((int)&rcnts[2].cycleStart, rt);
emit_readword(&rcnts[2].mode, HOST_TEMPREG);
emit_readword(&rcnts[2].cycleStart, rt);
emit_testimm(HOST_TEMPREG, 0x200);
emit_readword((int)&last_count, HOST_TEMPREG);
emit_readword(&last_count, HOST_TEMPREG);
emit_sub(HOST_TEMPREG, rt, HOST_TEMPREG);
emit_add(HOST_TEMPREG, cc, HOST_TEMPREG);
if (cc_adj)
@@ -31,9 +31,9 @@ static int pcsx_direct_read(int type, u_int addr, int cc_adj, int cc, int rs, in
case 0x1124: // rcnt mode
if (rt < 0) return 0;
t = (addr >> 4) & 3;
emit_readword((int)&rcnts[t].mode, rt);
emit_readword(&rcnts[t].mode, rt);
emit_andimm(rt, ~0x1800, HOST_TEMPREG);
emit_writeword(HOST_TEMPREG, (int)&rcnts[t].mode);
emit_writeword(HOST_TEMPREG, &rcnts[t].mode);
mov_loadtype_adj(type, rt, rt);
goto hit;
}