summaryrefslogtreecommitdiff
path: root/cpu_threaded.c
diff options
context:
space:
mode:
authortwinaphex2016-08-15 03:48:39 +0200
committertwinaphex2016-08-15 03:48:39 +0200
commit7313c9cd615a3fc31439ad6fc597304f33ca4f0a (patch)
treeb8241a69a3e2e4128609bc20e735beeafe18f6ea /cpu_threaded.c
parent08e3423a8c61a93f81b8460a67431fe0f1c197a6 (diff)
downloadpicogpsp-7313c9cd615a3fc31439ad6fc597304f33ca4f0a.tar.gz
picogpsp-7313c9cd615a3fc31439ad6fc597304f33ca4f0a.tar.bz2
picogpsp-7313c9cd615a3fc31439ad6fc597304f33ca4f0a.zip
Fix build issues
Diffstat (limited to 'cpu_threaded.c')
-rw-r--r--cpu_threaded.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/cpu_threaded.c b/cpu_threaded.c
index ca5b99e..63f258d 100644
--- a/cpu_threaded.c
+++ b/cpu_threaded.c
@@ -241,13 +241,25 @@ extern u8 bit_count[256];
#endif
+static INLINE void RW_INIT(void)
+{
+#ifdef VITA
+ sceKernelOpenVMDomain();
+#endif
+}
+
+static INLINE void RW_END(void)
+{
+#ifdef VITA
+ sceKernelCloseVMDomain();
+#endif
+}
+
/* Cache invalidation */
#if defined(PSP_BUILD)
#define translate_invalidate_dcache() sceKernelDcacheWritebackAll()
#elif defined(VITA)
-#define RW_INIT sceKernelOpenVMDomain
-#define RW_END sceKernelCloseVMDomain
#define translate_invalidate_dcache() (void)0
#define invalidate_icache_region(addr, size) \
@@ -257,8 +269,10 @@ extern u8 bit_count[256];
#elif defined(_3DS)
#include "3ds/3ds_utils.h"
+
#define translate_invalidate_dcache() ctr_flush_invalidate_cache()
#define invalidate_icache_region(addr, size) (void)0
+
#elif defined(ARM_ARCH)
static int sys_cacheflush(void *addr, unsigned long size)
{
@@ -3293,7 +3307,7 @@ s32 translate_block_arm(u32 pc, translation_region_type
s32 i;
u32 flag_status;
block_exit_type external_block_exits[MAX_EXITS];
- RW_INIT();
+ RW_INIT();
generate_block_extra_vars_arm();
arm_fix_pc();
@@ -3513,7 +3527,7 @@ s32 translate_block_thumb(u32 pc, translation_region_type
s32 i;
u32 flag_status;
block_exit_type external_block_exits[MAX_EXITS];
- RW_INIT();
+ RW_INIT();
generate_block_extra_vars_thumb();
thumb_fix_pc();