*/
#include "arm_features.h"
+#include "new_dynarec/linkage_offsets.h"
.syntax unified
-
-.bss
-.align 6 @ cacheline
-
-scratch:
-.rept 8*8*2/4
- .word 0
-.endr
-
.text
.align 2
-.macro ldr_scratch rd
-#ifndef __PIC__
- movw \rd, #:lower16:scratch
- movt \rd, #:upper16:scratch
-#else
- ldr \rd, =scratch
-#endif
-.endm
-
@ XXX: gteMAC calc shouldn't be saturating, but it is here
@ approximate gteMAC|123 flags
push {r4-r6,lr}
@ fmrx r4, fpscr @ vmrs? at least 40 cycle hit
- ldr_scratch r1
+ ldr r1, [r0, #LO_cop2_to_scratch_buf]
mov r12, #0
vldmia r0, {d8} @ VXYZ(0)
FUNCTION(gteRTPT_neon): @ r0=CP2 (d,c),
push {r4-r11,lr}
- ldr_scratch r1
+ ldr r1, [r0, #LO_cop2_to_scratch_buf]
mov r12, #0
rtpx_preload
#define evprintf(...)
char invalid_code[0x100000];
+static u32 scratch_buf[8*8*2] __attribute__((aligned(64)));
u32 event_cycles[PSXINT_COUNT];
static void schedule_timeslice(void)
#endif
psxH_ptr = psxH;
zeromem_ptr = zero_mem;
+ scratch_buf_ptr = scratch_buf;
return 0;
}
void *psxH_ptr;
void *zeromem_ptr;
u8 zero_mem[0x1000];
+void *scratch_buf_ptr;
void new_dynarec_init() { (void)ari64_execute; }
void new_dyna_start() {}
void new_dynarec_cleanup() {}
extern unsigned int address;
extern void *psxH_ptr;
extern void *zeromem_ptr;
+extern void *scratch_buf_ptr;
// same as invalid_code, just a region for ram write checks (inclusive)
extern u32 inv_code_start, inv_code_end;
DRC_VAR(inv_code_start, 4)
DRC_VAR(inv_code_end, 4)
DRC_VAR(branch_target, 4)
-@DRC_VAR(align0, 16) /* unused/alignment */
+DRC_VAR(scratch_buf_ptr, 4)
+@DRC_VAR(align0, 12) /* unused/alignment */
DRC_VAR(mini_ht, 256)
DRC_VAR(restore_candidate, 512)
#define LO_inv_code_start (LO_zeromem_ptr + 4)
#define LO_inv_code_end (LO_inv_code_start + 4)
#define LO_branch_target (LO_inv_code_end + 4)
-#define LO_align0 (LO_branch_target + 4)
-#define LO_mini_ht (LO_align0 + 16)
+#define LO_scratch_buf_ptr (LO_branch_target + 4)
+#define LO_align0 (LO_scratch_buf_ptr + 4)
+#define LO_mini_ht (LO_align0 + 12)
#define LO_restore_candidate (LO_mini_ht + 256)
#define LO_dynarec_local_size (LO_restore_candidate + 512)
#define LO_FCR0 (LO_align0)
#define LO_FCR31 (LO_align0)
+
+#define LO_cop2_to_scratch_buf (LO_scratch_buf_ptr - LO_reg_cop2d)