summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
authorMihail Zenkov <mihail.zenkov@gmail.com>2015-06-05 01:57:07 +0000
committerSolomon Peachy <pizza@shaftnet.org>2020-11-04 13:00:01 +0000
commitb200cd7e4a63eb887962778212130d72a6e8856a (patch)
tree746ba6e4f675c64e351d6c125a5c46ce2d52ccc4 /apps/plugins
parentdb87e1aae5d51f58cf2e0387c26550c0a28b5302 (diff)
downloadrockbox-b200cd7e4a63eb887962778212130d72a6e8856a.tar.gz
rockbox-b200cd7e4a63eb887962778212130d72a6e8856a.tar.bz2
rockbox-b200cd7e4a63eb887962778212130d72a6e8856a.zip
test_mem: fix asm variant of read/write test
Change-Id: I865691e7540d4a6d18be34e8b81d0b3056837fa0
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/test_mem.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/apps/plugins/test_mem.c b/apps/plugins/test_mem.c
index f17ea7a05d..2c887539e9 100644
--- a/apps/plugins/test_mem.c
+++ b/apps/plugins/test_mem.c
@@ -79,21 +79,17 @@ static void write_test(volatile int *buf, int buf_size, int loop_cnt)
{
#if defined(CPU_ARM)
asm volatile (
- "mov r0, #0 \n"
- "mov r1, #1 \n"
- "mov r2, #2 \n"
- "mov r3, #3 \n"
- "mov r6, %[loops] \n"
- ".outer_loop_read: \n"
- "mov r4, %[buf_p] \n"
- "mov r5, %[size] \n"
- ".inner_loop_read: \n"
- "stmia r4!, {r0-r3} \n"
- "stmia r4!, {r0-r3} \n"
- "subs r5, r5, #8 \n"
- "bgt .inner_loop_read \n"
- "subs r6, r6, #1 \n"
- "bgt .outer_loop_read \n"
+ "mov r6, %[loops] \n"
+ ".outer_loop_write: \n"
+ "mov r4, %[buf_p] \n"
+ "mov r5, %[size] \n"
+ ".inner_loop_write: \n"
+ "ldmia r4!, {r0-r3} \n"
+ "subs r5, r5, #8 \n"
+ "ldmia r4!, {r0-r3} \n"
+ "bgt .inner_loop_write \n"
+ "subs r6, r6, #1 \n"
+ "bgt .outer_loop_write \n"
:
: [loops] "r" (loop_cnt), [size] "r" (buf_size), [buf_p] "r" (buf)
: "r0", "r1", "r2", "r3", "r4", "r5", "r6", "memory", "cc"
@@ -116,17 +112,21 @@ static void read_test(volatile int *buf, int buf_size, int loop_cnt)
{
#if defined(CPU_ARM)
asm volatile (
- "mov r6, %[loops] \n"
- ".outer_loop_write: \n"
- "mov r4, %[buf_p] \n"
- "mov r5, %[size] \n"
- ".inner_loop_write: \n"
- "ldmia r4!, {r0-r3} \n"
- "subs r5, r5, #8 \n"
- "ldmia r4!, {r0-r3} \n"
- "bgt .inner_loop_write \n"
- "subs r6, r6, #1 \n"
- "bgt .outer_loop_write \n"
+ "mov r0, #0 \n"
+ "mov r1, #1 \n"
+ "mov r2, #2 \n"
+ "mov r3, #3 \n"
+ "mov r6, %[loops] \n"
+ ".outer_loop_read: \n"
+ "mov r4, %[buf_p] \n"
+ "mov r5, %[size] \n"
+ ".inner_loop_read: \n"
+ "stmia r4!, {r0-r3} \n"
+ "stmia r4!, {r0-r3} \n"
+ "subs r5, r5, #8 \n"
+ "bgt .inner_loop_read \n"
+ "subs r6, r6, #1 \n"
+ "bgt .outer_loop_read \n"
:
: [loops] "r" (loop_cnt), [size] "r" (buf_size), [buf_p] "r" (buf)
: "r0", "r1", "r2", "r3", "r4", "r5", "r6", "memory", "cc"