mirror of
https://github.com/izzy2lost/PSX1.git
synced 2026-03-26 16:38:52 -07:00
drc: rework for 64bit, part 3
This commit is contained in:
+137
-132
File diff suppressed because it is too large
Load Diff
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user