summaryrefslogtreecommitdiff
path: root/src/asm_util.S
diff options
context:
space:
mode:
authoraliaspider2015-11-05 16:11:47 +0100
committeraliaspider2015-11-05 18:26:44 +0100
commit8bd5927278af004e494eb75e892c95fdc8280b58 (patch)
treea409ec373c914a821e3a75d86d1b1148c050d6ce /src/asm_util.S
parentf2895ec98422b53ee04f531b9556aed94e709c08 (diff)
downloadsnes9x2002-8bd5927278af004e494eb75e892c95fdc8280b58.tar.gz
snes9x2002-8bd5927278af004e494eb75e892c95fdc8280b58.tar.bz2
snes9x2002-8bd5927278af004e494eb75e892c95fdc8280b58.zip
more cleanups
Diffstat (limited to 'src/asm_util.S')
-rw-r--r--src/asm_util.S85
1 files changed, 0 insertions, 85 deletions
diff --git a/src/asm_util.S b/src/asm_util.S
deleted file mode 100644
index cc9a887..0000000
--- a/src/asm_util.S
+++ /dev/null
@@ -1,85 +0,0 @@
-.global invalidate_cache_region
-.global invoke_kernel_custom_code
-.global invalidate_icache_all
-.global invalidate_dcache_all
-
-.equ CACHE_SIZE, (16 * 1024)
-.equ CACHE_LINE_SIZE, 32
-.equ CACHE_LINES, (CACHE_SIZE / CACHE_LINE_SIZE)
-.equ CACHE_WAYS, 4
-
-#define nop16b() \
- nop; \
- nop; \
- nop; \
- nop \
-
-#define nop64b() \
- nop16b(); \
- nop16b(); \
- nop16b(); \
- nop16b() \
-
-#define nop256b() \
- nop64b(); \
- nop64b(); \
- nop64b(); \
- nop64b() \
-
-#define nop1kb() \
- nop256b(); \
- nop256b(); \
- nop256b(); \
- nop256b() \
-
-#define nop4kb() \
- nop1kb(); \
- nop1kb(); \
- nop1kb(); \
- nop1kb() \
-
-#define nop16kb() \
- nop4kb(); \
- nop4kb(); \
- nop4kb(); \
- nop4kb() \
-
-invalidate_cache_region:
- mov r2, #0x0
- swi 0x9f0002
-
- bx lr
-
-invoke_kernel_custom_code:
- swi 0x90007a
-
- bx lr
-
-
-invalidate_dcache_all:
- ldr r0, dcache_buffer
- mov r1, #(CACHE_SIZE / 2)
-
-1:
- ldr r2, [r0], #4
- subs r1, r1, #1
- bne 1b
-
- bx lr
-
-dcache_buffer:
- .word _dcache_buffer
-
-.balign 16384
-
-invalidate_icache_all:
- nop16kb()
- bx lr
-
-
-.section bss
-
-.balign 32768
-
-.comm _dcache_buffer (CACHE_SIZE * 2)
-