partially working menu
[fceu.git] / drivers / gp2x / asmutils.s
index a7f123f..3db4e30 100644 (file)
@@ -54,6 +54,18 @@ block_loop_andor:
     bx      lr
 
 
+.global spend_cycles @ c
+
+spend_cycles:
+    mov     r0, r0, lsr #2  @ 4 cycles/iteration
+    sub     r0, r0, #2      @ entry/exit/init
+.sc_loop:
+    subs    r0, r0, #1
+    bpl     .sc_loop
+
+    bx      lr
+
+
 
 /* buggy and slow, probably because function call overhead
 @ renderer helper, based on bitbank's method