summaryrefslogtreecommitdiff
path: root/arm
diff options
context:
space:
mode:
authorTwinaphex2016-08-08 00:53:54 +0200
committerGitHub2016-08-08 00:53:54 +0200
commitbeeee745ab0961a246f3413f3fbd7d65ad75c4ba (patch)
treea1033bb0339d2b52656a494b00c6418539f20e17 /arm
parent70fff8152ff39b6a781c4331c20963ef1fc4f8a2 (diff)
parent6ab0992ecfe714cb31f67038c4d5c92ab23204a9 (diff)
downloadpicogpsp-beeee745ab0961a246f3413f3fbd7d65ad75c4ba.tar.gz
picogpsp-beeee745ab0961a246f3413f3fbd7d65ad75c4ba.tar.bz2
picogpsp-beeee745ab0961a246f3413f3fbd7d65ad75c4ba.zip
Merge pull request #26 from frangarcj/master
(VITA) Dynarec WIP
Diffstat (limited to 'arm')
-rw-r--r--arm/arm_emit.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/arm/arm_emit.h b/arm/arm_emit.h
index db894d1..bfd1c49 100644
--- a/arm/arm_emit.h
+++ b/arm/arm_emit.h
@@ -21,7 +21,10 @@
#define ARM_EMIT_H
#include "arm_codegen.h"
-
+#if defined(VITA)
+#define VITA_RW_INIT sceKernelOpenVMDomain
+#define VITA_RW_END sceKernelCloseVMDomain
+#endif
u32 arm_update_gba_arm(u32 pc);
u32 arm_update_gba_thumb(u32 pc);
u32 arm_update_gba_idle_arm(u32 pc);
@@ -46,9 +49,11 @@ void execute_swi_thumb(u32 pc);
void execute_store_u32_safe(u32 address, u32 source);
#define write32(value) \
+ VITA_RW_INIT(); \
*((u32 *)translation_ptr) = value; \
- translation_ptr += 4 \
-
+ translation_ptr += 4; \
+ VITA_RW_END() \
+
#define arm_relative_offset(source, offset) \
(((((u32)offset - (u32)source) - 8) >> 2) & 0xFFFFFF) \
@@ -404,12 +409,17 @@ u32 arm_disect_imm_32bit(u32 imm, u32 *stores, u32 *rotations)
cycle_count = 0 \
#define generate_branch_patch_conditional(dest, offset) \
+ VITA_RW_INIT(); \
*((u32 *)(dest)) = (*((u32 *)dest) & 0xFF000000) | \
- arm_relative_offset(dest, offset) \
+ arm_relative_offset(dest, offset); \
+ VITA_RW_END(); \
+
#define generate_branch_patch_unconditional(dest, offset) \
+ VITA_RW_INIT(); \
*((u32 *)(dest)) = (*((u32 *)dest) & 0xFF000000) | \
- arm_relative_offset(dest, offset) \
+ arm_relative_offset(dest, offset); \
+ VITA_RW_END(); \
// A different function is called for idle updates because of the relative
// location of the embedded PC. The idle version could be optimized to put
@@ -1931,4 +1941,3 @@ void execute_swi_hle_div_c()
generate_indirect_branch_no_cycle_update(type) \
#endif
-