summaryrefslogtreecommitdiff
path: root/utils/atj2137/adfuload/test_binary/backlight_c/crt0.S
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2014-03-04 11:07:07 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2014-03-04 11:07:07 +0100
commitc64b59fc5eea973ae82430f98046d4cd2af15160 (patch)
tree583f9a19d7b5220d35f698090315f6d0b090e0bf /utils/atj2137/adfuload/test_binary/backlight_c/crt0.S
parent2f21f77ade790a9fbd4a92f103f57f6d4bbb5af2 (diff)
downloadrockbox-c64b59fc5eea973ae82430f98046d4cd2af15160.tar.gz
rockbox-c64b59fc5eea973ae82430f98046d4cd2af15160.zip
atj213x: various fixes in sample code snippets
Change-Id: I78781e1a56cb6705d011ee2296f1789b497a566a
Diffstat (limited to 'utils/atj2137/adfuload/test_binary/backlight_c/crt0.S')
-rw-r--r--utils/atj2137/adfuload/test_binary/backlight_c/crt0.S15
1 files changed, 8 insertions, 7 deletions
diff --git a/utils/atj2137/adfuload/test_binary/backlight_c/crt0.S b/utils/atj2137/adfuload/test_binary/backlight_c/crt0.S
index e03b8b5439..485a4fc26c 100644
--- a/utils/atj2137/adfuload/test_binary/backlight_c/crt0.S
+++ b/utils/atj2137/adfuload/test_binary/backlight_c/crt0.S
@@ -26,9 +26,9 @@ load_addr:
26reloc_loop: 26reloc_loop:
27 lw t2, 0(v0) # src 27 lw t2, 0(v0) # src
28 addiu v0, 4 # inc src addr 28 addiu v0, 4 # inc src addr
29 sw t2, 0(t0) # dst
30 bne t0, t1, reloc_loop
31 addiu t0, 4 # inc dst addr 29 addiu t0, 4 # inc dst addr
30 bne t0, t1, reloc_loop
31 sw t2, -4(t0) # dst
32 32
33entry_point_jump: 33entry_point_jump:
34 la t0, entry_point 34 la t0, entry_point
@@ -49,17 +49,18 @@ entry_point:
49cache_init_loop: 49cache_init_loop:
50 cache 8, 0(t0) # index store icache tag 50 cache 8, 0(t0) # index store icache tag
51 cache 9, 0(t0) # index store dcache tag 51 cache 9, 0(t0) # index store dcache tag
52 bne t0, t1, cache_init_loop
53 addiu t0, t0, 0x10 52 addiu t0, t0, 0x10
53 bne t0, t1, cache_init_loop
54 nop
54 55
55 # clear bss 56 # clear bss
56 la t0, bssbegin 57 la t0, bssbegin
57 la t1, bssend 58 la t1, bssend
58 59
59clear_bss_loop: 60clear_bss_loop:
60 sw zero, 0(t0)
61 bne t0, t1, clear_bss_loop
62 addiu t0, 4 61 addiu t0, 4
62 bne t0, t1, clear_bss_loop
63 sw zero, -4(t0)
63 64
64 # setup stack 65 # setup stack
65 la sp, stackend 66 la sp, stackend
@@ -67,9 +68,9 @@ clear_bss_loop:
67 li t1, 0xdeadbeef 68 li t1, 0xdeadbeef
68 69
69stack_munge_loop: 70stack_munge_loop:
70 sw t1, 0(t0)
71 bne t0, sp, stack_munge_loop
72 addiu t0, 4 71 addiu t0, 4
72 bne t0, sp, stack_munge_loop
73 sw t1, -4(t0)
73 74
74 # jump to C code 75 # jump to C code
75 j main 76 j main