aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/new_dynarec
diff options
context:
space:
mode:
authorfrangarcj2016-09-06 16:44:21 +0200
committerfrangarcj2016-09-06 16:44:21 +0200
commit1c2e3fc3baf93e7c17f678d0d187e9f424360bb2 (patch)
tree101ef9a9dd42f6b4283e9ab02186db3b17957912 /libpcsxcore/new_dynarec
parentd9e6b42f224f10d8b6f2454da1f5d80735f8e0d6 (diff)
downloadpcsx_rearmed-1c2e3fc3baf93e7c17f678d0d187e9f424360bb2.tar.gz
pcsx_rearmed-1c2e3fc3baf93e7c17f678d0d187e9f424360bb2.tar.bz2
pcsx_rearmed-1c2e3fc3baf93e7c17f678d0d187e9f424360bb2.zip
(VITA) More dynarec fixes
Diffstat (limited to 'libpcsxcore/new_dynarec')
-rw-r--r--libpcsxcore/new_dynarec/new_dynarec.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c
index 56c8a0b..757b781 100644
--- a/libpcsxcore/new_dynarec/new_dynarec.c
+++ b/libpcsxcore/new_dynarec/new_dynarec.c
@@ -1236,6 +1236,9 @@ void invalidate_addr(u_int addr)
void invalidate_all_pages()
{
u_int page,n;
+ #if defined(VITA)
+ sceKernelOpenVMDomain();
+ #endif
for(page=0;page<4096;page++)
invalidate_page(page);
for(page=0;page<1048576;page++)
@@ -1244,6 +1247,9 @@ void invalidate_all_pages()
restore_candidate[((page&2047)>>3)+256]|=1<<(page&7);
}
#ifdef __arm__
+ #if defined(VITA)
+ sceKernelCloseVMDomain();
+ #endif
__clear_cache((void *)BASE_ADDR,(void *)BASE_ADDR+(1<<TARGET_SIZE_2));
#endif
#ifdef USE_MINI_HT
@@ -7927,12 +7933,18 @@ static void disassemble_inst(int i) {}
static int new_dynarec_test(void)
{
+ #if defined(VITA)
+ sceKernelOpenVMDomain();
+ #endif
int (*testfunc)(void) = (void *)out;
int ret;
emit_movimm(DRC_TEST_VAL,0); // test
emit_jmpreg(14);
literal_pool(0);
#ifdef __arm__
+#if defined(VITA)
+ sceKernelCloseVMDomain();
+#endif
__clear_cache((void *)testfunc, out);
#endif
SysPrintf("testing if we can run recompiled code..\n");
@@ -7982,7 +7994,7 @@ void new_dynarec_init()
SysPrintf("Init new dynarec\n");
#if defined(VITA)
- BASE_ADDR=mmap(BASE_ADDR, 1<<TARGET_SIZE_2,
+ out=(u_char *)mmap(translation_cache, 1<<TARGET_SIZE_2,
0,
0,
-1, 0);
@@ -8226,6 +8238,9 @@ int new_recompile_block(int addr)
start = (u_int)addr&~3;
//assert(((u_int)addr&1)==0);
new_dynarec_did_compile=1;
+#if defined(VITA)
+ sceKernelOpenVMDomain();
+#endif
if (Config.HLE && start == 0x80001000) // hlecall
{
// XXX: is this enough? Maybe check hleSoftCall?
@@ -8237,6 +8252,9 @@ int new_recompile_block(int addr)
emit_jmp((int)new_dyna_leave);
literal_pool(0);
#ifdef __arm__
+ #if defined(VITA)
+ sceKernelCloseVMDomain();
+ #endif
__clear_cache((void *)beginning,out);
#endif
ll_add_flags(jump_in+page,start,state_rflags,(void *)beginning);
@@ -11607,6 +11625,9 @@ int new_recompile_block(int addr)
copy+=slen*4;
#ifdef __arm__
+ #if defined(VITA)
+ sceKernelCloseVMDomain();
+ #endif
__clear_cache((void *)beginning,out);
#endif