1 |
5 |
sergeykhbr |
|
2 |
|
|
zephyr.elf: file format elf64-littleriscv
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
Disassembly of section text:
|
6 |
|
|
|
7 |
|
|
0000000010000000 <__start>:
|
8 |
|
|
*/
|
9 |
|
|
|
10 |
|
|
.section ".text"
|
11 |
|
|
.globl __start
|
12 |
|
|
__start:
|
13 |
|
|
jal _Cstart;
|
14 |
|
|
10000000: 556030ef jal ra,10003556 <_Cstart>
|
15 |
|
|
|
16 |
|
|
0000000010000004 <_Swap>:
|
17 |
|
|
|
18 |
|
|
.section ".text"
|
19 |
|
|
.globl _Swap
|
20 |
|
|
_Swap:
|
21 |
|
|
_save_context(tp)
|
22 |
|
|
10000004: 00123023 sd ra,0(tp) # 0 <__memory_pool_quad_block_size-0x10>
|
23 |
|
|
10000008: 00823423 sd s0,8(tp) # 8 <__memory_pool_quad_block_size-0x8>
|
24 |
|
|
1000000c: 00923823 sd s1,16(tp) # 10 <__memory_pool_quad_block_size>
|
25 |
|
|
10000010: 01223c23 sd s2,24(tp) # 18 <__memory_pool_quad_block_size+0x8>
|
26 |
|
|
10000014: 03323023 sd s3,32(tp) # 20 <__memory_pool_quad_block_size+0x10>
|
27 |
|
|
10000018: 03423423 sd s4,40(tp) # 28 <__memory_pool_quad_block_size+0x18>
|
28 |
|
|
1000001c: 03523823 sd s5,48(tp) # 30 <__memory_pool_quad_block_size+0x20>
|
29 |
|
|
10000020: 03623c23 sd s6,56(tp) # 38 <__memory_pool_quad_block_size+0x28>
|
30 |
|
|
10000024: 05723023 sd s7,64(tp) # 40 <__memory_pool_quad_block_size+0x30>
|
31 |
|
|
10000028: 05823423 sd s8,72(tp) # 48 <__memory_pool_quad_block_size+0x38>
|
32 |
|
|
1000002c: 05923823 sd s9,80(tp) # 50 <__memory_pool_quad_block_size+0x40>
|
33 |
|
|
10000030: 05a23c23 sd s10,88(tp) # 58 <__memory_pool_quad_block_size+0x48>
|
34 |
|
|
10000034: 07b23023 sd s11,96(tp) # 60 <__memory_pool_quad_block_size+0x50>
|
35 |
|
|
10000038: 06223423 sd sp,104(tp) # 68 <__memory_pool_quad_block_size+0x58>
|
36 |
|
|
1000003c: 07023c23 sd a6,120(tp) # 78 <__memory_pool_quad_block_size+0x68>
|
37 |
|
|
10000040: 09123023 sd a7,128(tp) # 80 <__memory_pool_quad_block_size+0x70>
|
38 |
|
|
10000044: 08a23423 sd a0,136(tp) # 88 <__memory_pool_quad_block_size+0x78>
|
39 |
|
|
10000048: 08b23823 sd a1,144(tp) # 90 <__memory_pool_quad_block_size+0x80>
|
40 |
|
|
1000004c: 08c23c23 sd a2,152(tp) # 98 <__memory_pool_quad_block_size+0x88>
|
41 |
|
|
10000050: 0ad23023 sd a3,160(tp) # a0 <__memory_pool_quad_block_size+0x90>
|
42 |
|
|
10000054: 0ae23423 sd a4,168(tp) # a8 <__memory_pool_quad_block_size+0x98>
|
43 |
|
|
10000058: 0af23823 sd a5,176(tp) # b0 <__memory_pool_quad_block_size+0xa0>
|
44 |
|
|
1000005c: 0b023c23 sd a6,184(tp) # b8 <__memory_pool_quad_block_size+0xa8>
|
45 |
|
|
10000060: 0d123023 sd a7,192(tp) # c0 <__memory_pool_quad_block_size+0xb0>
|
46 |
|
|
10000064: 0c523423 sd t0,200(tp) # c8 <__memory_pool_quad_block_size+0xb8>
|
47 |
|
|
10000068: 0c623823 sd t1,208(tp) # d0 <__memory_pool_quad_block_size+0xc0>
|
48 |
|
|
1000006c: 0c723c23 sd t2,216(tp) # d8 <__memory_pool_quad_block_size+0xc8>
|
49 |
|
|
10000070: 0fc23023 sd t3,224(tp) # e0 <__memory_pool_quad_block_size+0xd0>
|
50 |
|
|
10000074: 0fd23423 sd t4,232(tp) # e8 <__memory_pool_quad_block_size+0xd8>
|
51 |
|
|
10000078: 0e323823 sd gp,240(tp) # f0 <__memory_pool_quad_block_size+0xe0>
|
52 |
|
|
la s0, _kernel
|
53 |
|
|
1000007c: 00006417 auipc s0,0x6
|
54 |
|
|
10000080: d4440413 addi s0,s0,-700 # 10005dc0 <_kernel>
|
55 |
|
|
ld s1,_kernel_offset_to_current(s0) # s1 = _kernel.current
|
56 |
|
|
10000084: 6804 ld s1,16(s0)
|
57 |
|
|
addi s2,s1,_thread_offset_to_callee_saved # s2 = &next_thread->callee_saved
|
58 |
|
|
10000086: 06048913 addi s2,s1,96
|
59 |
|
|
sd a0,_callee_saved_offset_to_key(s2) # _kernel.current->callee_saved.key = fl
|
60 |
|
|
1000008a: 10a93023 sd a0,256(s2)
|
61 |
|
|
|
62 |
|
|
## Populate default return value
|
63 |
|
|
lw a1,_k_neg_eagain
|
64 |
|
|
1000008e: 00005597 auipc a1,0x5
|
65 |
|
|
10000092: f825a583 lw a1,-126(a1) # 10005010 <__data_rom_start>
|
66 |
|
|
sd a1, _callee_saved_offset_to_retval(s2)
|
67 |
|
|
10000096: 10b93423 sd a1,264(s2)
|
68 |
|
|
|
69 |
|
|
## This thread was switched preemptively
|
70 |
|
|
li a1,0
|
71 |
|
|
1000009a: 4581 li a1,0
|
72 |
|
|
sd a1,_callee_saved_offset_to_preemptive(s2)
|
73 |
|
|
1000009c: 10b93823 sd a1,272(s2)
|
74 |
|
|
|
75 |
|
|
jal _get_next_ready_thread
|
76 |
|
|
100000a0: 033030ef jal ra,100038d2 <_get_next_ready_thread>
|
77 |
|
|
mv s1,a0
|
78 |
|
|
100000a4: 84aa mv s1,a0
|
79 |
|
|
sd s1,_kernel_offset_to_current(s0) # _kernel.current = _get_next_ready_thread()
|
80 |
|
|
100000a6: e804 sd s1,16(s0)
|
81 |
|
|
addi tp,s1,_thread_offset_to_callee_saved # tp = &next_thread->callee_saved
|
82 |
|
|
100000a8: 06048213 addi tp,s1,96
|
83 |
|
|
|
84 |
|
|
ld a0,_callee_saved_offset_to_key(tp) # a0 = callee_saved.key
|
85 |
|
|
100000ac: 10023503 ld a0,256(tp) # 100 <__memory_pool_quad_block_size+0xf0>
|
86 |
|
|
jal _arch_irq_unlock # _arch_irq_unlock(callee_saved.key)
|
87 |
|
|
100000b0: 77f020ef jal ra,1000302e <_arch_irq_unlock>
|
88 |
|
|
|
89 |
|
|
_restore_context(tp)
|
90 |
|
|
100000b4: 00023083 ld ra,0(tp) # 0 <__memory_pool_quad_block_size-0x10>
|
91 |
|
|
100000b8: 00823403 ld s0,8(tp) # 8 <__memory_pool_quad_block_size-0x8>
|
92 |
|
|
100000bc: 01023483 ld s1,16(tp) # 10 <__memory_pool_quad_block_size>
|
93 |
|
|
100000c0: 01823903 ld s2,24(tp) # 18 <__memory_pool_quad_block_size+0x8>
|
94 |
|
|
100000c4: 02023983 ld s3,32(tp) # 20 <__memory_pool_quad_block_size+0x10>
|
95 |
|
|
100000c8: 02823a03 ld s4,40(tp) # 28 <__memory_pool_quad_block_size+0x18>
|
96 |
|
|
100000cc: 03023a83 ld s5,48(tp) # 30 <__memory_pool_quad_block_size+0x20>
|
97 |
|
|
100000d0: 03823b03 ld s6,56(tp) # 38 <__memory_pool_quad_block_size+0x28>
|
98 |
|
|
100000d4: 04023b83 ld s7,64(tp) # 40 <__memory_pool_quad_block_size+0x30>
|
99 |
|
|
100000d8: 04823c03 ld s8,72(tp) # 48 <__memory_pool_quad_block_size+0x38>
|
100 |
|
|
100000dc: 05023c83 ld s9,80(tp) # 50 <__memory_pool_quad_block_size+0x40>
|
101 |
|
|
100000e0: 05823d03 ld s10,88(tp) # 58 <__memory_pool_quad_block_size+0x48>
|
102 |
|
|
100000e4: 06023d83 ld s11,96(tp) # 60 <__memory_pool_quad_block_size+0x50>
|
103 |
|
|
100000e8: 06823103 ld sp,104(tp) # 68 <__memory_pool_quad_block_size+0x58>
|
104 |
|
|
100000ec: 07823803 ld a6,120(tp) # 78 <__memory_pool_quad_block_size+0x68>
|
105 |
|
|
100000f0: 08023883 ld a7,128(tp) # 80 <__memory_pool_quad_block_size+0x70>
|
106 |
|
|
100000f4: 08823503 ld a0,136(tp) # 88 <__memory_pool_quad_block_size+0x78>
|
107 |
|
|
100000f8: 09023583 ld a1,144(tp) # 90 <__memory_pool_quad_block_size+0x80>
|
108 |
|
|
100000fc: 09823603 ld a2,152(tp) # 98 <__memory_pool_quad_block_size+0x88>
|
109 |
|
|
10000100: 0a023683 ld a3,160(tp) # a0 <__memory_pool_quad_block_size+0x90>
|
110 |
|
|
10000104: 0a823703 ld a4,168(tp) # a8 <__memory_pool_quad_block_size+0x98>
|
111 |
|
|
10000108: 0b023783 ld a5,176(tp) # b0 <__memory_pool_quad_block_size+0xa0>
|
112 |
|
|
1000010c: 0b823803 ld a6,184(tp) # b8 <__memory_pool_quad_block_size+0xa8>
|
113 |
|
|
10000110: 0c023883 ld a7,192(tp) # c0 <__memory_pool_quad_block_size+0xb0>
|
114 |
|
|
10000114: 0c823283 ld t0,200(tp) # c8 <__memory_pool_quad_block_size+0xb8>
|
115 |
|
|
10000118: 0d023303 ld t1,208(tp) # d0 <__memory_pool_quad_block_size+0xc0>
|
116 |
|
|
1000011c: 0d823383 ld t2,216(tp) # d8 <__memory_pool_quad_block_size+0xc8>
|
117 |
|
|
10000120: 0e023e03 ld t3,224(tp) # e0 <__memory_pool_quad_block_size+0xd0>
|
118 |
|
|
10000124: 0e823e83 ld t4,232(tp) # e8 <__memory_pool_quad_block_size+0xd8>
|
119 |
|
|
10000128: 0f023183 ld gp,240(tp) # f0 <__memory_pool_quad_block_size+0xe0>
|
120 |
|
|
ld t4,_callee_saved_offset_to_preemptive(tp)
|
121 |
|
|
1000012c: 11023e83 ld t4,272(tp) # 110 <__memory_pool_quad_block_size+0x100>
|
122 |
|
|
bnez t4,__swap_preemptive
|
123 |
|
|
10000130: 000e9363 bnez t4,10000136 <__swap_preemptive>
|
124 |
|
|
|
125 |
|
|
0000000010000134 <__swap_cooperative>:
|
126 |
|
|
__swap_cooperative:
|
127 |
|
|
ret
|
128 |
|
|
10000134: 8082 ret
|
129 |
|
|
|
130 |
|
|
0000000010000136 <__swap_preemptive>:
|
131 |
|
|
__swap_preemptive:
|
132 |
|
|
ld t4,COOP_REG_MEPC(tp)
|
133 |
|
|
10000136: 07023e83 ld t4,112(tp) # 70 <__memory_pool_quad_block_size+0x60>
|
134 |
|
|
jalr t4
|
135 |
|
|
1000013a: 9e82 jalr t4
|
136 |
|
|
|
137 |
|
|
000000001000013c <_IsrWrapper>:
|
138 |
|
|
# a0 store IRQ index,
|
139 |
|
|
# a1 equals NULL
|
140 |
|
|
#
|
141 |
|
|
.globl _IsrWrapper
|
142 |
|
|
_IsrWrapper:
|
143 |
|
|
addi sp,sp,-32
|
144 |
|
|
1000013c: 1101 addi sp,sp,-32
|
145 |
|
|
sd ra,0(sp)
|
146 |
|
|
1000013e: e006 sd ra,0(sp)
|
147 |
|
|
sd s0,8(sp)
|
148 |
|
|
10000140: e422 sd s0,8(sp)
|
149 |
|
|
sd s1,16(sp)
|
150 |
|
|
10000142: e826 sd s1,16(sp)
|
151 |
|
|
sd s2,24(sp)
|
152 |
|
|
10000144: ec4a sd s2,24(sp)
|
153 |
|
|
|
154 |
|
|
# Grab a reference to _kernel in r10 so we can determine the
|
155 |
|
|
# current irq stack pointer
|
156 |
|
|
#
|
157 |
|
|
la a1,_kernel
|
158 |
|
|
10000146: 00006597 auipc a1,0x6
|
159 |
|
|
1000014a: c7a58593 addi a1,a1,-902 # 10005dc0 <_kernel>
|
160 |
|
|
|
161 |
|
|
# Stash a copy of thread's sp in r12 so that we can put it on the IRQ
|
162 |
|
|
# stack
|
163 |
|
|
#
|
164 |
|
|
mv a2,sp
|
165 |
|
|
1000014e: 860a mv a2,sp
|
166 |
|
|
|
167 |
|
|
# Switch to interrupt stack
|
168 |
|
|
ld sp,_kernel_offset_to_irq_stack(a1)
|
169 |
|
|
10000150: 0085b103 ld sp,8(a1)
|
170 |
|
|
|
171 |
|
|
# Store thread stack pointer onto IRQ stack
|
172 |
|
|
addi sp,sp,-8
|
173 |
|
|
10000154: 1161 addi sp,sp,-8
|
174 |
|
|
sd a2,0(sp)
|
175 |
|
|
10000156: e032 sd a2,0(sp)
|
176 |
|
|
|
177 |
|
|
call run_isr_handler
|
178 |
|
|
10000158: 65f020ef jal ra,10002fb6
|
179 |
|
|
|
180 |
|
|
ld sp,0(sp)
|
181 |
|
|
1000015c: 6102 ld sp,0(sp)
|
182 |
|
|
|
183 |
|
|
# Check reschedule condition
|
184 |
|
|
jal _get_next_ready_thread
|
185 |
|
|
1000015e: 774030ef jal ra,100038d2 <_get_next_ready_thread>
|
186 |
|
|
beqz a0,_IsrExit_ending # _get_next_ready_thread() == 0 goto ending
|
187 |
|
|
10000162: c921 beqz a0,100001b2 <_IsrExit_ending>
|
188 |
|
|
|
189 |
|
|
## Do not reschedule coop threads (threads that have negative prio)
|
190 |
|
|
lw s1, _thread_offset_to_prio(a0)
|
191 |
|
|
10000164: 4944 lw s1,20(a0)
|
192 |
|
|
blt s1,zero,_IsrExit_ending
|
193 |
|
|
10000166: 0404c663 bltz s1,100001b2 <_IsrExit_ending>
|
194 |
|
|
|
195 |
|
|
## Do not reschedule if scheduler is locked
|
196 |
|
|
lw s1, _thread_offset_to_sched_locked(a0)
|
197 |
|
|
1000016a: 4d04 lw s1,24(a0)
|
198 |
|
|
bne s1,zero,_IsrExit_ending
|
199 |
|
|
1000016c: 04049363 bnez s1,100001b2 <_IsrExit_ending>
|
200 |
|
|
|
201 |
|
|
## Call into the kernel to see if a scheduling decision is necessary
|
202 |
|
|
mv s1,a0 # s1 = next_thread
|
203 |
|
|
10000170: 84aa mv s1,a0
|
204 |
|
|
jal _is_next_thread_current
|
205 |
|
|
10000172: 027030ef jal ra,10003998 <_is_next_thread_current>
|
206 |
|
|
bne a0,zero,_IsrExit_ending
|
207 |
|
|
10000176: 02051e63 bnez a0,100001b2 <_IsrExit_ending>
|
208 |
|
|
|
209 |
|
|
## Flag current thread that it was switched preemptively
|
210 |
|
|
la s0, _kernel
|
211 |
|
|
1000017a: 00006417 auipc s0,0x6
|
212 |
|
|
1000017e: c4640413 addi s0,s0,-954 # 10005dc0 <_kernel>
|
213 |
|
|
ld s0,_kernel_offset_to_current(s0) # s0 = _kernel.current
|
214 |
|
|
10000182: 6800 ld s0,16(s0)
|
215 |
|
|
addi s2,s0,_thread_offset_to_callee_saved # s2 = &next_thread->callee_saved
|
216 |
|
|
10000184: 06040913 addi s2,s0,96
|
217 |
|
|
li a0,1
|
218 |
|
|
10000188: 4505 li a0,1
|
219 |
|
|
sd a0,_callee_saved_offset_to_preemptive(s2)
|
220 |
|
|
1000018a: 10a93823 sd a0,272(s2)
|
221 |
|
|
|
222 |
|
|
# Store IRQ key
|
223 |
|
|
jal _arch_irq_lock_state # a0 = _arch_irq_lock_state()
|
224 |
|
|
1000018e: 6bb020ef jal ra,10003048 <_arch_irq_lock_state>
|
225 |
|
|
sd a0,_callee_saved_offset_to_key(s2)
|
226 |
|
|
10000192: 10a93023 sd a0,256(s2)
|
227 |
|
|
|
228 |
|
|
##
|
229 |
|
|
# Switch to the new thread.
|
230 |
|
|
#
|
231 |
|
|
addi tp,s1,_thread_offset_to_callee_saved # tp = &next_thread->callee_saved
|
232 |
|
|
10000196: 06048213 addi tp,s1,96
|
233 |
|
|
|
234 |
|
|
ld a0,_callee_saved_offset_to_key(tp) # a0 = callee_saved.key
|
235 |
|
|
1000019a: 10023503 ld a0,256(tp) # 100 <__memory_pool_quad_block_size+0xf0>
|
236 |
|
|
jal _arch_irq_unlock # _arch_irq_unlock(callee_saved.key)
|
237 |
|
|
1000019e: 691020ef jal ra,1000302e <_arch_irq_unlock>
|
238 |
|
|
|
239 |
|
|
ld t4,_callee_saved_offset_to_preemptive(tp)
|
240 |
|
|
100001a2: 11023e83 ld t4,272(tp) # 110 <__memory_pool_quad_block_size+0x100>
|
241 |
|
|
bnez t4,_IsrExit_ending
|
242 |
|
|
100001a6: 000e9663 bnez t4,100001b2 <_IsrExit_ending>
|
243 |
|
|
|
244 |
|
|
## Next thread was switched cooperative so,set MEPC to ra
|
245 |
|
|
ld a0,COOP_REG_RA(tp)
|
246 |
|
|
100001aa: 00023503 ld a0,0(tp) # 0 <__memory_pool_quad_block_size-0x10>
|
247 |
|
|
sd a0,COOP_REG_MEPC(tp)
|
248 |
|
|
100001ae: 06a23823 sd a0,112(tp) # 70 <__memory_pool_quad_block_size+0x60>
|
249 |
|
|
|
250 |
|
|
00000000100001b2 <_IsrExit_ending>:
|
251 |
|
|
|
252 |
|
|
|
253 |
|
|
_IsrExit_ending:
|
254 |
|
|
ld s2,24(sp)
|
255 |
|
|
100001b2: 6962 ld s2,24(sp)
|
256 |
|
|
ld s1,16(sp)
|
257 |
|
|
100001b4: 64c2 ld s1,16(sp)
|
258 |
|
|
ld s0,8(sp)
|
259 |
|
|
100001b6: 6422 ld s0,8(sp)
|
260 |
|
|
ld ra,0(sp)
|
261 |
|
|
100001b8: 6082 ld ra,0(sp)
|
262 |
|
|
addi sp,sp,32
|
263 |
|
|
100001ba: 6105 addi sp,sp,32
|
264 |
|
|
ret
|
265 |
|
|
100001bc: 8082 ret
|
266 |
|
|
|
267 |
|
|
00000000100001be :
|
268 |
|
|
#else
|
269 |
|
|
"__memory_pool_quad_block_size = %c0\n\t"
|
270 |
|
|
#endif
|
271 |
|
|
:
|
272 |
|
|
: "n"(sizeof(struct k_mem_pool_quad_block)));
|
273 |
|
|
}
|
274 |
|
|
100001be: 1141 addi sp,sp,-16
|
275 |
|
|
100001c0: e022 sd s0,0(sp)
|
276 |
|
|
100001c2: e406 sd ra,8(sp)
|
277 |
|
|
100001c4: 0800 addi s0,sp,16
|
278 |
|
|
100001c6: 6190 ld a2,0(a1)
|
279 |
|
|
100001c8: 85aa mv a1,a0
|
280 |
|
|
100001ca: 10004537 lui a0,0x10004
|
281 |
|
|
100001ce: 06850513 addi a0,a0,104 # 10004068 <__devconfig_end>
|
282 |
|
|
100001d2: 064020ef jal ra,10002236
|
283 |
|
|
100001d6: 60a2 ld ra,8(sp)
|
284 |
|
|
100001d8: 6402 ld s0,0(sp)
|
285 |
|
|
100001da: 4501 li a0,0
|
286 |
|
|
100001dc: 0141 addi sp,sp,16
|
287 |
|
|
100001de: 8082 ret
|
288 |
|
|
|
289 |
|
|
00000000100001e0 :
|
290 |
|
|
100001e0: 1141 addi sp,sp,-16
|
291 |
|
|
100001e2: e022 sd s0,0(sp)
|
292 |
|
|
100001e4: e406 sd ra,8(sp)
|
293 |
|
|
100001e6: 0800 addi s0,sp,16
|
294 |
|
|
100001e8: 10004537 lui a0,0x10004
|
295 |
|
|
100001ec: 08850513 addi a0,a0,136 # 10004088 <__devconfig_end+0x20>
|
296 |
|
|
100001f0: 046020ef jal ra,10002236
|
297 |
|
|
100001f4: 60a2 ld ra,8(sp)
|
298 |
|
|
100001f6: 6402 ld s0,0(sp)
|
299 |
|
|
100001f8: 4501 li a0,0
|
300 |
|
|
100001fa: 0141 addi sp,sp,16
|
301 |
|
|
100001fc: 8082 ret
|
302 |
|
|
|
303 |
|
|
00000000100001fe :
|
304 |
|
|
{ NULL, NULL }
|
305 |
|
|
};
|
306 |
|
|
|
307 |
|
|
|
308 |
|
|
void main(void)
|
309 |
|
|
{
|
310 |
|
|
100001fe: 1141 addi sp,sp,-16
|
311 |
|
|
10000200: e422 sd s0,8(sp)
|
312 |
|
|
10000202: 0800 addi s0,sp,16
|
313 |
|
|
SHELL_REGISTER(MY_SHELL_MODULE, commands);
|
314 |
|
|
}
|
315 |
|
|
10000204: 6422 ld s0,8(sp)
|
316 |
|
|
10000206: 0141 addi sp,sp,16
|
317 |
|
|
10000208: 8082 ret
|
318 |
|
|
|
319 |
|
|
000000001000020a :
|
320 |
|
|
#include
|
321 |
|
|
|
322 |
|
|
#define SHELL_PROMPT "shell> "
|
323 |
|
|
|
324 |
|
|
int shell_run(struct device *dev)
|
325 |
|
|
{
|
326 |
|
|
1000020a: 1141 addi sp,sp,-16
|
327 |
|
|
1000020c: e022 sd s0,0(sp)
|
328 |
|
|
1000020e: e406 sd ra,8(sp)
|
329 |
|
|
10000210: 0800 addi s0,sp,16
|
330 |
|
|
ARG_UNUSED(dev);
|
331 |
|
|
|
332 |
|
|
shell_init(SHELL_PROMPT);
|
333 |
|
|
10000212: 10004537 lui a0,0x10004
|
334 |
|
|
10000216: 0c050513 addi a0,a0,192 # 100040c0 <__devconfig_end+0x58>
|
335 |
|
|
1000021a: 013000ef jal ra,10000a2c
|
336 |
|
|
return 0;
|
337 |
|
|
}
|
338 |
|
|
1000021e: 60a2 ld ra,8(sp)
|
339 |
|
|
10000220: 6402 ld s0,0(sp)
|
340 |
|
|
10000222: 4501 li a0,0
|
341 |
|
|
10000224: 0141 addi sp,sp,16
|
342 |
|
|
10000226: 8082 ret
|
343 |
|
|
|
344 |
|
|
0000000010000228 :
|
345 |
|
|
|
346 |
|
|
return 0;
|
347 |
|
|
}
|
348 |
|
|
|
349 |
|
|
static int shell_cmd_cycles(int argc, char *argv[])
|
350 |
|
|
{
|
351 |
|
|
10000228: 1141 addi sp,sp,-16
|
352 |
|
|
1000022a: e406 sd ra,8(sp)
|
353 |
|
|
1000022c: e022 sd s0,0(sp)
|
354 |
|
|
1000022e: 0800 addi s0,sp,16
|
355 |
|
|
printk("cycles: %u hw cycles\n", k_cycle_get_32());
|
356 |
|
|
10000230: 1e0010ef jal ra,10001410
|
357 |
|
|
10000234: 0005059b sext.w a1,a0
|
358 |
|
|
10000238: 10004537 lui a0,0x10004
|
359 |
|
|
1000023c: 16050513 addi a0,a0,352 # 10004160 <__devconfig_end+0xf8>
|
360 |
|
|
10000240: 7f7010ef jal ra,10002236
|
361 |
|
|
|
362 |
|
|
return 0;
|
363 |
|
|
}
|
364 |
|
|
10000244: 60a2 ld ra,8(sp)
|
365 |
|
|
10000246: 6402 ld s0,0(sp)
|
366 |
|
|
10000248: 4501 li a0,0
|
367 |
|
|
1000024a: 0141 addi sp,sp,16
|
368 |
|
|
1000024c: 8082 ret
|
369 |
|
|
|
370 |
|
|
000000001000024e :
|
371 |
|
|
{
|
372 |
|
|
1000024e: 1141 addi sp,sp,-16
|
373 |
|
|
10000250: e406 sd ra,8(sp)
|
374 |
|
|
10000252: e022 sd s0,0(sp)
|
375 |
|
|
10000254: 0800 addi s0,sp,16
|
376 |
|
|
printk("uptime: %u ms\n", k_uptime_get_32());
|
377 |
|
|
10000256: 001030ef jal ra,10003a56
|
378 |
|
|
1000025a: 0005059b sext.w a1,a0
|
379 |
|
|
1000025e: 10004537 lui a0,0x10004
|
380 |
|
|
10000262: 17850513 addi a0,a0,376 # 10004178 <__devconfig_end+0x110>
|
381 |
|
|
10000266: 7d1010ef jal ra,10002236
|
382 |
|
|
}
|
383 |
|
|
1000026a: 60a2 ld ra,8(sp)
|
384 |
|
|
1000026c: 6402 ld s0,0(sp)
|
385 |
|
|
1000026e: 4501 li a0,0
|
386 |
|
|
10000270: 0141 addi sp,sp,16
|
387 |
|
|
10000272: 8082 ret
|
388 |
|
|
|
389 |
|
|
0000000010000274 :
|
390 |
|
|
{
|
391 |
|
|
10000274: 1141 addi sp,sp,-16
|
392 |
|
|
10000276: e406 sd ra,8(sp)
|
393 |
|
|
10000278: e022 sd s0,0(sp)
|
394 |
|
|
1000027a: 0800 addi s0,sp,16
|
395 |
|
|
uint32_t version = sys_kernel_version_get();
|
396 |
|
|
1000027c: 254010ef jal ra,100014d0
|
397 |
|
|
10000280: 2501 sext.w a0,a0
|
398 |
|
|
SYS_KERNEL_VER_PATCHLEVEL(version));
|
399 |
|
|
10000282: 0085569b srliw a3,a0,0x8
|
400 |
|
|
SYS_KERNEL_VER_MINOR(version),
|
401 |
|
|
10000286: 0105561b srliw a2,a0,0x10
|
402 |
|
|
printk("Zephyr version %d.%d.%d\n",
|
403 |
|
|
1000028a: 0185559b srliw a1,a0,0x18
|
404 |
|
|
1000028e: 10004537 lui a0,0x10004
|
405 |
|
|
10000292: 18850513 addi a0,a0,392 # 10004188 <__devconfig_end+0x120>
|
406 |
|
|
10000296: 0ff6f693 andi a3,a3,255
|
407 |
|
|
1000029a: 0ff67613 andi a2,a2,255
|
408 |
|
|
1000029e: 2581 sext.w a1,a1
|
409 |
|
|
100002a0: 797010ef jal ra,10002236
|
410 |
|
|
}
|
411 |
|
|
100002a4: 60a2 ld ra,8(sp)
|
412 |
|
|
100002a6: 6402 ld s0,0(sp)
|
413 |
|
|
100002a8: 4501 li a0,0
|
414 |
|
|
100002aa: 0141 addi sp,sp,16
|
415 |
|
|
100002ac: 8082 ret
|
416 |
|
|
|
417 |
|
|
00000000100002ae :
|
418 |
|
|
100002ae: 7179 addi sp,sp,-48
|
419 |
|
|
100002b0: ec26 sd s1,24(sp)
|
420 |
|
|
100002b2: 100057b7 lui a5,0x10005
|
421 |
|
|
100002b6: 100054b7 lui s1,0x10005
|
422 |
|
|
100002ba: 23078713 addi a4,a5,560 # 10005230 <__device_MICROKERNEL_start>
|
423 |
|
|
100002be: 26048493 addi s1,s1,608 # 10005260 <__shell_cmd_end>
|
424 |
|
|
100002c2: f022 sd s0,32(sp)
|
425 |
|
|
100002c4: e84a sd s2,16(sp)
|
426 |
|
|
100002c6: e44e sd s3,8(sp)
|
427 |
|
|
100002c8: e052 sd s4,0(sp)
|
428 |
|
|
100002ca: f406 sd ra,40(sp)
|
429 |
|
|
100002cc: 1800 addi s0,sp,48
|
430 |
|
|
100002ce: 8c99 sub s1,s1,a4
|
431 |
|
|
100002d0: 8a2a mv s4,a0
|
432 |
|
|
100002d2: 8491 srai s1,s1,0x4
|
433 |
|
|
100002d4: 4901 li s2,0
|
434 |
|
|
100002d6: 23078993 addi s3,a5,560
|
435 |
|
|
100002da: 00994c63 blt s2,s1,100002f2
|
436 |
|
|
100002de: 597d li s2,-1
|
437 |
|
|
100002e0: 70a2 ld ra,40(sp)
|
438 |
|
|
100002e2: 7402 ld s0,32(sp)
|
439 |
|
|
100002e4: 854a mv a0,s2
|
440 |
|
|
100002e6: 64e2 ld s1,24(sp)
|
441 |
|
|
100002e8: 6942 ld s2,16(sp)
|
442 |
|
|
100002ea: 69a2 ld s3,8(sp)
|
443 |
|
|
100002ec: 6a02 ld s4,0(sp)
|
444 |
|
|
100002ee: 6145 addi sp,sp,48
|
445 |
|
|
100002f0: 8082 ret
|
446 |
|
|
100002f2: 00491793 slli a5,s2,0x4
|
447 |
|
|
100002f6: 97ce add a5,a5,s3
|
448 |
|
|
100002f8: 638c ld a1,0(a5)
|
449 |
|
|
100002fa: 4651 li a2,20
|
450 |
|
|
100002fc: 8552 mv a0,s4
|
451 |
|
|
100002fe: 52b010ef jal ra,10002028
|
452 |
|
|
10000302: dd79 beqz a0,100002e0
|
453 |
|
|
10000304: 2905 addiw s2,s2,1
|
454 |
|
|
10000306: bfd1 j 100002da
|
455 |
|
|
|
456 |
|
|
0000000010000308 :
|
457 |
|
|
10000308: 7179 addi sp,sp,-48
|
458 |
|
|
1000030a: f022 sd s0,32(sp)
|
459 |
|
|
1000030c: f406 sd ra,40(sp)
|
460 |
|
|
1000030e: 1800 addi s0,sp,48
|
461 |
|
|
10000310: ec26 sd s1,24(sp)
|
462 |
|
|
10000312: fca43c23 sd a0,-40(s0)
|
463 |
|
|
10000316: 4cf010ef jal ra,10001fe4
|
464 |
|
|
1000031a: 47d1 li a5,20
|
465 |
|
|
1000031c: fd843583 ld a1,-40(s0)
|
466 |
|
|
10000320: 00a7ff63 bleu a0,a5,1000033e
|
467 |
|
|
10000324: 10004537 lui a0,0x10004
|
468 |
|
|
10000328: 22050513 addi a0,a0,544 # 10004220 <__devconfig_end+0x1b8>
|
469 |
|
|
1000032c: 70b010ef jal ra,10002236
|
470 |
|
|
10000330: 54fd li s1,-1
|
471 |
|
|
10000332: 70a2 ld ra,40(sp)
|
472 |
|
|
10000334: 7402 ld s0,32(sp)
|
473 |
|
|
10000336: 8526 mv a0,s1
|
474 |
|
|
10000338: 64e2 ld s1,24(sp)
|
475 |
|
|
1000033a: 6145 addi sp,sp,48
|
476 |
|
|
1000033c: 8082 ret
|
477 |
|
|
1000033e: 852e mv a0,a1
|
478 |
|
|
10000340: fcb43c23 sd a1,-40(s0)
|
479 |
|
|
10000344: f6bff0ef jal ra,100002ae
|
480 |
|
|
10000348: 57fd li a5,-1
|
481 |
|
|
1000034a: 84aa mv s1,a0
|
482 |
|
|
1000034c: fd843583 ld a1,-40(s0)
|
483 |
|
|
10000350: 00f51963 bne a0,a5,10000362
|
484 |
|
|
10000354: 10004537 lui a0,0x10004
|
485 |
|
|
10000358: 25850513 addi a0,a0,600 # 10004258 <__devconfig_end+0x1f0>
|
486 |
|
|
1000035c: 6db010ef jal ra,10002236
|
487 |
|
|
10000360: bfc9 j 10000332
|
488 |
|
|
10000362: 100057b7 lui a5,0x10005
|
489 |
|
|
10000366: 100054b7 lui s1,0x10005
|
490 |
|
|
1000036a: 26a7a023 sw a0,608(a5) # 10005260 <__shell_cmd_end>
|
491 |
|
|
1000036e: 4651 li a2,20
|
492 |
|
|
10000370: 5d848513 addi a0,s1,1496 # 100055d8
|
493 |
|
|
10000374: 419010ef jal ra,10001f8c
|
494 |
|
|
10000378: 100045b7 lui a1,0x10004
|
495 |
|
|
1000037c: 5d848513 addi a0,s1,1496
|
496 |
|
|
10000380: 28858593 addi a1,a1,648 # 10004288 <__devconfig_end+0x220>
|
497 |
|
|
10000384: 4d3010ef jal ra,10002056
|
498 |
|
|
10000388: 4481 li s1,0
|
499 |
|
|
1000038a: b765 j 10000332
|
500 |
|
|
|
501 |
|
|
000000001000038c :
|
502 |
|
|
1000038c: 4785 li a5,1
|
503 |
|
|
1000038e: 00f51963 bne a0,a5,100003a0
|
504 |
|
|
10000392: 100057b7 lui a5,0x10005
|
505 |
|
|
10000396: 577d li a4,-1
|
506 |
|
|
10000398: 26e7a023 sw a4,608(a5) # 10005260 <__shell_cmd_end>
|
507 |
|
|
1000039c: 4501 li a0,0
|
508 |
|
|
1000039e: 8082 ret
|
509 |
|
|
100003a0: 1141 addi sp,sp,-16
|
510 |
|
|
100003a2: e022 sd s0,0(sp)
|
511 |
|
|
100003a4: e406 sd ra,8(sp)
|
512 |
|
|
100003a6: 0800 addi s0,sp,16
|
513 |
|
|
100003a8: 6588 ld a0,8(a1)
|
514 |
|
|
100003aa: f5fff0ef jal ra,10000308
|
515 |
|
|
100003ae: 60a2 ld ra,8(sp)
|
516 |
|
|
100003b0: 6402 ld s0,0(sp)
|
517 |
|
|
100003b2: 4501 li a0,0
|
518 |
|
|
100003b4: 0141 addi sp,sp,16
|
519 |
|
|
100003b6: 8082 ret
|
520 |
|
|
|
521 |
|
|
00000000100003b8 :
|
522 |
|
|
100003b8: 1000a7b7 lui a5,0x1000a
|
523 |
|
|
100003bc: d107b783 ld a5,-752(a5) # 10009d10
|
524 |
|
|
100003c0: ef89 bnez a5,100003da
|
525 |
|
|
100003c2: 100057b7 lui a5,0x10005
|
526 |
|
|
100003c6: 2607a703 lw a4,608(a5) # 10005260 <__shell_cmd_end>
|
527 |
|
|
100003ca: 57fd li a5,-1
|
528 |
|
|
100003cc: 04f71163 bne a4,a5,1000040e
|
529 |
|
|
100003d0: 1000a7b7 lui a5,0x1000a
|
530 |
|
|
100003d4: d187b503 ld a0,-744(a5) # 10009d18
|
531 |
|
|
100003d8: 8082 ret
|
532 |
|
|
100003da: 1141 addi sp,sp,-16
|
533 |
|
|
100003dc: e022 sd s0,0(sp)
|
534 |
|
|
100003de: e406 sd ra,8(sp)
|
535 |
|
|
100003e0: 0800 addi s0,sp,16
|
536 |
|
|
100003e2: 9782 jalr a5
|
537 |
|
|
100003e4: ed01 bnez a0,100003fc
|
538 |
|
|
100003e6: 100057b7 lui a5,0x10005
|
539 |
|
|
100003ea: 2607a703 lw a4,608(a5) # 10005260 <__shell_cmd_end>
|
540 |
|
|
100003ee: 57fd li a5,-1
|
541 |
|
|
100003f0: 00f71a63 bne a4,a5,10000404
|
542 |
|
|
100003f4: 1000a7b7 lui a5,0x1000a
|
543 |
|
|
100003f8: d187b503 ld a0,-744(a5) # 10009d18
|
544 |
|
|
100003fc: 60a2 ld ra,8(sp)
|
545 |
|
|
100003fe: 6402 ld s0,0(sp)
|
546 |
|
|
10000400: 0141 addi sp,sp,16
|
547 |
|
|
10000402: 8082 ret
|
548 |
|
|
10000404: 10005537 lui a0,0x10005
|
549 |
|
|
10000408: 5d850513 addi a0,a0,1496 # 100055d8
|
550 |
|
|
1000040c: bfc5 j 100003fc
|
551 |
|
|
1000040e: 10005537 lui a0,0x10005
|
552 |
|
|
10000412: 5d850513 addi a0,a0,1496 # 100055d8
|
553 |
|
|
10000416: 8082 ret
|
554 |
|
|
|
555 |
|
|
0000000010000418 :
|
556 |
|
|
10000418: 7139 addi sp,sp,-64
|
557 |
|
|
1000041a: f822 sd s0,48(sp)
|
558 |
|
|
1000041c: f426 sd s1,40(sp)
|
559 |
|
|
1000041e: fc06 sd ra,56(sp)
|
560 |
|
|
10000420: f04a sd s2,32(sp)
|
561 |
|
|
10000422: ec4e sd s3,24(sp)
|
562 |
|
|
10000424: 0080 addi s0,sp,64
|
563 |
|
|
10000426: 6104 ld s1,0(a0)
|
564 |
|
|
10000428: 57fd li a5,-1
|
565 |
|
|
1000042a: c19c sw a5,0(a1)
|
566 |
|
|
1000042c: ec99 bnez s1,1000044a
|
567 |
|
|
1000042e: 10004537 lui a0,0x10004
|
568 |
|
|
10000432: 1d050513 addi a0,a0,464 # 100041d0 <__devconfig_end+0x168>
|
569 |
|
|
10000436: 601010ef jal ra,10002236
|
570 |
|
|
1000043a: 70e2 ld ra,56(sp)
|
571 |
|
|
1000043c: 7442 ld s0,48(sp)
|
572 |
|
|
1000043e: 8526 mv a0,s1
|
573 |
|
|
10000440: 7902 ld s2,32(sp)
|
574 |
|
|
10000442: 74a2 ld s1,40(sp)
|
575 |
|
|
10000444: 69e2 ld s3,24(sp)
|
576 |
|
|
10000446: 6121 addi sp,sp,64
|
577 |
|
|
10000448: 8082 ret
|
578 |
|
|
1000044a: 100057b7 lui a5,0x10005
|
579 |
|
|
1000044e: 2607a983 lw s3,608(a5) # 10005260 <__shell_cmd_end>
|
580 |
|
|
10000452: 57fd li a5,-1
|
581 |
|
|
10000454: 04f99563 bne s3,a5,1000049e
|
582 |
|
|
10000458: 651c ld a5,8(a0)
|
583 |
|
|
1000045a: 892a mv s2,a0
|
584 |
|
|
1000045c: c781 beqz a5,10000464
|
585 |
|
|
1000045e: 0007c783 lbu a5,0(a5)
|
586 |
|
|
10000462: eb91 bnez a5,10000476
|
587 |
|
|
10000464: 10004537 lui a0,0x10004
|
588 |
|
|
10000468: 85a6 mv a1,s1
|
589 |
|
|
1000046a: 1e850513 addi a0,a0,488 # 100041e8 <__devconfig_end+0x180>
|
590 |
|
|
1000046e: 5c9010ef jal ra,10002236
|
591 |
|
|
10000472: 4481 li s1,0
|
592 |
|
|
10000474: b7d9 j 1000043a
|
593 |
|
|
10000476: 8526 mv a0,s1
|
594 |
|
|
10000478: fcb43423 sd a1,-56(s0)
|
595 |
|
|
1000047c: e33ff0ef jal ra,100002ae
|
596 |
|
|
10000480: fc843583 ld a1,-56(s0)
|
597 |
|
|
10000484: c188 sw a0,0(a1)
|
598 |
|
|
10000486: 01351963 bne a0,s3,10000498
|
599 |
|
|
1000048a: 10004537 lui a0,0x10004
|
600 |
|
|
1000048e: 00093583 ld a1,0(s2)
|
601 |
|
|
10000492: 20850513 addi a0,a0,520 # 10004208 <__devconfig_end+0x1a0>
|
602 |
|
|
10000496: bfe1 j 1000046e
|
603 |
|
|
10000498: 00893483 ld s1,8(s2)
|
604 |
|
|
1000049c: bf79 j 1000043a
|
605 |
|
|
1000049e: 0135a023 sw s3,0(a1)
|
606 |
|
|
100004a2: bf61 j 1000043a
|
607 |
|
|
|
608 |
|
|
00000000100004a4 :
|
609 |
|
|
100004a4: 04400793 li a5,68
|
610 |
|
|
100004a8: 00b7f463 bleu a1,a5,100004b0
|
611 |
|
|
100004ac: 4501 li a0,0
|
612 |
|
|
100004ae: 8082 ret
|
613 |
|
|
100004b0: 7175 addi sp,sp,-144
|
614 |
|
|
100004b2: e122 sd s0,128(sp)
|
615 |
|
|
100004b4: fca6 sd s1,120(sp)
|
616 |
|
|
100004b6: f8ca sd s2,112(sp)
|
617 |
|
|
100004b8: f4ce sd s3,104(sp)
|
618 |
|
|
100004ba: e506 sd ra,136(sp)
|
619 |
|
|
100004bc: f0d2 sd s4,96(sp)
|
620 |
|
|
100004be: ecd6 sd s5,88(sp)
|
621 |
|
|
100004c0: e8da sd s6,80(sp)
|
622 |
|
|
100004c2: e4de sd s7,72(sp)
|
623 |
|
|
100004c4: e0e2 sd s8,64(sp)
|
624 |
|
|
100004c6: fc66 sd s9,56(sp)
|
625 |
|
|
100004c8: f86a sd s10,48(sp)
|
626 |
|
|
100004ca: f46e sd s11,40(sp)
|
627 |
|
|
100004cc: 0900 addi s0,sp,144
|
628 |
|
|
100004ce: 00b507b3 add a5,a0,a1
|
629 |
|
|
100004d2: 89aa mv s3,a0
|
630 |
|
|
100004d4: 892e mv s2,a1
|
631 |
|
|
100004d6: 00078023 sb zero,0(a5)
|
632 |
|
|
100004da: 84aa mv s1,a0
|
633 |
|
|
100004dc: 02000713 li a4,32
|
634 |
|
|
100004e0: 0004c783 lbu a5,0(s1)
|
635 |
|
|
100004e4: 02e78363 beq a5,a4,1000050a
|
636 |
|
|
100004e8: e39d bnez a5,1000050e
|
637 |
|
|
100004ea: 4501 li a0,0
|
638 |
|
|
100004ec: 60aa ld ra,136(sp)
|
639 |
|
|
100004ee: 640a ld s0,128(sp)
|
640 |
|
|
100004f0: 74e6 ld s1,120(sp)
|
641 |
|
|
100004f2: 7946 ld s2,112(sp)
|
642 |
|
|
100004f4: 79a6 ld s3,104(sp)
|
643 |
|
|
100004f6: 7a06 ld s4,96(sp)
|
644 |
|
|
100004f8: 6ae6 ld s5,88(sp)
|
645 |
|
|
100004fa: 6b46 ld s6,80(sp)
|
646 |
|
|
100004fc: 6ba6 ld s7,72(sp)
|
647 |
|
|
100004fe: 6c06 ld s8,64(sp)
|
648 |
|
|
10000500: 7ce2 ld s9,56(sp)
|
649 |
|
|
10000502: 7d42 ld s10,48(sp)
|
650 |
|
|
10000504: 7da2 ld s11,40(sp)
|
651 |
|
|
10000506: 6149 addi sp,sp,144
|
652 |
|
|
10000508: 8082 ret
|
653 |
|
|
1000050a: 0485 addi s1,s1,1
|
654 |
|
|
1000050c: bfd1 j 100004e0
|
655 |
|
|
1000050e: 100057b7 lui a5,0x10005
|
656 |
|
|
10000512: 2607ac83 lw s9,608(a5) # 10005260 <__shell_cmd_end>
|
657 |
|
|
10000516: 577d li a4,-1
|
658 |
|
|
10000518: 26078b13 addi s6,a5,608
|
659 |
|
|
1000051c: 00ec8363 beq s9,a4,10000522
|
660 |
|
|
10000520: 8aa6 mv s5,s1
|
661 |
|
|
10000522: 02000593 li a1,32
|
662 |
|
|
10000526: 8526 mv a0,s1
|
663 |
|
|
10000528: 29b010ef jal ra,10001fc2
|
664 |
|
|
1000052c: 000b2b03 lw s6,0(s6)
|
665 |
|
|
10000530: 57fd li a5,-1
|
666 |
|
|
10000532: 8a2a mv s4,a0
|
667 |
|
|
10000534: 00fb0663 beq s6,a5,10000540
|
668 |
|
|
10000538: f94d bnez a0,100004ea
|
669 |
|
|
1000053a: fafc88e3 beq s9,a5,100004ea
|
670 |
|
|
1000053e: a091 j 10000582
|
671 |
|
|
10000540: d54d beqz a0,100004ea
|
672 |
|
|
10000542: 40950ab3 sub s5,a0,s1
|
673 |
|
|
10000546: 001a8613 addi a2,s5,1
|
674 |
|
|
1000054a: 47cd li a5,19
|
675 |
|
|
1000054c: f8c7cfe3 blt a5,a2,100004ea
|
676 |
|
|
10000550: 85a6 mv a1,s1
|
677 |
|
|
10000552: f7840513 addi a0,s0,-136
|
678 |
|
|
10000556: 237010ef jal ra,10001f8c
|
679 |
|
|
1000055a: f9040793 addi a5,s0,-112
|
680 |
|
|
1000055e: 9abe add s5,s5,a5
|
681 |
|
|
10000560: f7840513 addi a0,s0,-136
|
682 |
|
|
10000564: fe0a8423 sb zero,-24(s5)
|
683 |
|
|
10000568: d47ff0ef jal ra,100002ae
|
684 |
|
|
1000056c: 8caa mv s9,a0
|
685 |
|
|
1000056e: f7650ee3 beq a0,s6,100004ea
|
686 |
|
|
10000572: 001a0a93 addi s5,s4,1
|
687 |
|
|
10000576: 02000593 li a1,32
|
688 |
|
|
1000057a: 8556 mv a0,s5
|
689 |
|
|
1000057c: 247010ef jal ra,10001fc2
|
690 |
|
|
10000580: f52d bnez a0,100004ea
|
691 |
|
|
10000582: 8556 mv a0,s5
|
692 |
|
|
10000584: 261010ef jal ra,10001fe4
|
693 |
|
|
10000588: 10005737 lui a4,0x10005
|
694 |
|
|
1000058c: 0c92 slli s9,s9,0x4
|
695 |
|
|
1000058e: 23070713 addi a4,a4,560 # 10005230 <__device_MICROKERNEL_start>
|
696 |
|
|
10000592: 01970db3 add s11,a4,s9
|
697 |
|
|
10000596: 8baa mv s7,a0
|
698 |
|
|
10000598: 00050a1b sext.w s4,a0
|
699 |
|
|
1000059c: 4b01 li s6,0
|
700 |
|
|
1000059e: 5c7d li s8,-1
|
701 |
|
|
100005a0: 4481 li s1,0
|
702 |
|
|
100005a2: 8cee mv s9,s11
|
703 |
|
|
100005a4: 47e1 li a5,24
|
704 |
|
|
100005a6: 02fb0d33 mul s10,s6,a5
|
705 |
|
|
100005aa: 008db683 ld a3,8(s11)
|
706 |
|
|
100005ae: 96ea add a3,a3,s10
|
707 |
|
|
100005b0: 628c ld a1,0(a3)
|
708 |
|
|
100005b2: eda1 bnez a1,1000060a
|
709 |
|
|
100005b4: d89d beqz s1,100004ea
|
710 |
|
|
100005b6: 0c0c4463 bltz s8,1000067e
|
711 |
|
|
100005ba: dffff0ef jal ra,100003b8
|
712 |
|
|
100005be: 10004ab7 lui s5,0x10004
|
713 |
|
|
100005c2: 85aa mv a1,a0
|
714 |
|
|
100005c4: 1b8a8513 addi a0,s5,440 # 100041b8 <__devconfig_end+0x150>
|
715 |
|
|
100005c8: 46f010ef jal ra,10002236
|
716 |
|
|
100005cc: 1b8a8513 addi a0,s5,440
|
717 |
|
|
100005d0: 85ce mv a1,s3
|
718 |
|
|
100005d2: 465010ef jal ra,10002236
|
719 |
|
|
100005d6: 4a81 li s5,0
|
720 |
|
|
100005d8: 94d2 add s1,s1,s4
|
721 |
|
|
100005da: 10004b37 lui s6,0x10004
|
722 |
|
|
100005de: 0b8a4763 blt s4,s8,1000068c
|
723 |
|
|
100005e2: 000a8d63 beqz s5,100005fc
|
724 |
|
|
100005e6: 10004537 lui a0,0x10004
|
725 |
|
|
100005ea: 1c850513 addi a0,a0,456 # 100041c8 <__devconfig_end+0x160>
|
726 |
|
|
100005ee: 449010ef jal ra,10002236
|
727 |
|
|
100005f2: 994e add s2,s2,s3
|
728 |
|
|
100005f4: 02000713 li a4,32
|
729 |
|
|
100005f8: 00e90023 sb a4,0(s2)
|
730 |
|
|
100005fc: 015c053b addw a0,s8,s5
|
731 |
|
|
10000600: 4175053b subw a0,a0,s7
|
732 |
|
|
10000604: 0ff57513 andi a0,a0,255
|
733 |
|
|
10000608: b5d5 j 100004ec
|
734 |
|
|
1000060a: 8652 mv a2,s4
|
735 |
|
|
1000060c: 8556 mv a0,s5
|
736 |
|
|
1000060e: 21b010ef jal ra,10002028
|
737 |
|
|
10000612: e901 bnez a0,10000622
|
738 |
|
|
10000614: e889 bnez s1,10000626
|
739 |
|
|
10000616: 008db683 ld a3,8(s11)
|
740 |
|
|
1000061a: 01a68833 add a6,a3,s10
|
741 |
|
|
1000061e: 00083483 ld s1,0(a6)
|
742 |
|
|
10000622: 2b05 addiw s6,s6,1
|
743 |
|
|
10000624: b741 j 100005a4
|
744 |
|
|
10000626: 000c5e63 bgez s8,10000642
|
745 |
|
|
1000062a: 100047b7 lui a5,0x10004
|
746 |
|
|
1000062e: 1a878513 addi a0,a5,424 # 100041a8 <__devconfig_end+0x140>
|
747 |
|
|
10000632: 85a6 mv a1,s1
|
748 |
|
|
10000634: 403010ef jal ra,10002236
|
749 |
|
|
10000638: 8526 mv a0,s1
|
750 |
|
|
1000063a: 1ab010ef jal ra,10001fe4
|
751 |
|
|
1000063e: 00050c1b sext.w s8,a0
|
752 |
|
|
10000642: 008cb683 ld a3,8(s9)
|
753 |
|
|
10000646: 01a68833 add a6,a3,s10
|
754 |
|
|
1000064a: 00083583 ld a1,0(a6)
|
755 |
|
|
1000064e: 4681 li a3,0
|
756 |
|
|
10000650: 00068d1b sext.w s10,a3
|
757 |
|
|
10000654: 018d5d63 ble s8,s10,1000066e
|
758 |
|
|
10000658: 00d48533 add a0,s1,a3
|
759 |
|
|
1000065c: 00054803 lbu a6,0(a0)
|
760 |
|
|
10000660: 00d58533 add a0,a1,a3
|
761 |
|
|
10000664: 00054503 lbu a0,0(a0)
|
762 |
|
|
10000668: 0685 addi a3,a3,1
|
763 |
|
|
1000066a: fea803e3 beq a6,a0,10000650
|
764 |
|
|
1000066e: 100047b7 lui a5,0x10004
|
765 |
|
|
10000672: 1b078513 addi a0,a5,432 # 100041b0 <__devconfig_end+0x148>
|
766 |
|
|
10000676: 3c1010ef jal ra,10002236
|
767 |
|
|
1000067a: 8c6a mv s8,s10
|
768 |
|
|
1000067c: b75d j 10000622
|
769 |
|
|
1000067e: 8526 mv a0,s1
|
770 |
|
|
10000680: 165010ef jal ra,10001fe4
|
771 |
|
|
10000684: 00050c1b sext.w s8,a0
|
772 |
|
|
10000688: 4a85 li s5,1
|
773 |
|
|
1000068a: b7b9 j 100005d8
|
774 |
|
|
1000068c: 0004c583 lbu a1,0(s1)
|
775 |
|
|
10000690: 1c0b0513 addi a0,s6,448 # 100041c0 <__devconfig_end+0x158>
|
776 |
|
|
10000694: 2a05 addiw s4,s4,1
|
777 |
|
|
10000696: 3a1010ef jal ra,10002236
|
778 |
|
|
1000069a: 0004c683 lbu a3,0(s1)
|
779 |
|
|
1000069e: 0019071b addiw a4,s2,1
|
780 |
|
|
100006a2: 994e add s2,s2,s3
|
781 |
|
|
100006a4: 00d90023 sb a3,0(s2)
|
782 |
|
|
100006a8: 0485 addi s1,s1,1
|
783 |
|
|
100006aa: 0ff77913 andi s2,a4,255
|
784 |
|
|
100006ae: bf05 j 100005de
|
785 |
|
|
|
786 |
|
|
00000000100006b0 :
|
787 |
|
|
100006b0: 715d addi sp,sp,-80
|
788 |
|
|
100006b2: e0a2 sd s0,64(sp)
|
789 |
|
|
100006b4: f052 sd s4,32(sp)
|
790 |
|
|
100006b6: 0880 addi s0,sp,80
|
791 |
|
|
100006b8: e486 sd ra,72(sp)
|
792 |
|
|
100006ba: fc26 sd s1,56(sp)
|
793 |
|
|
100006bc: f84a sd s2,48(sp)
|
794 |
|
|
100006be: f44e sd s3,40(sp)
|
795 |
|
|
100006c0: ec56 sd s5,24(sp)
|
796 |
|
|
100006c2: e85a sd s6,16(sp)
|
797 |
|
|
100006c4: 57fd li a5,-1
|
798 |
|
|
100006c6: fbc40593 addi a1,s0,-68
|
799 |
|
|
100006ca: faf42e23 sw a5,-68(s0)
|
800 |
|
|
100006ce: 8a2a mv s4,a0
|
801 |
|
|
100006d0: d49ff0ef jal ra,10000418
|
802 |
|
|
100006d4: fbc42783 lw a5,-68(s0)
|
803 |
|
|
100006d8: 577d li a4,-1
|
804 |
|
|
100006da: 04e78e63 beq a5,a4,10000736
|
805 |
|
|
100006de: 8aaa mv s5,a0
|
806 |
|
|
100006e0: c939 beqz a0,10000736
|
807 |
|
|
100006e2: 100054b7 lui s1,0x10005
|
808 |
|
|
100006e6: 0792 slli a5,a5,0x4
|
809 |
|
|
100006e8: 23048493 addi s1,s1,560 # 10005230 <__device_MICROKERNEL_start>
|
810 |
|
|
100006ec: 4901 li s2,0
|
811 |
|
|
100006ee: 4b61 li s6,24
|
812 |
|
|
100006f0: 94be add s1,s1,a5
|
813 |
|
|
100006f2: 036909b3 mul s3,s2,s6
|
814 |
|
|
100006f6: 6498 ld a4,8(s1)
|
815 |
|
|
100006f8: 974e add a4,a4,s3
|
816 |
|
|
100006fa: 630c ld a1,0(a4)
|
817 |
|
|
100006fc: e991 bnez a1,10000710
|
818 |
|
|
100006fe: 000a3583 ld a1,0(s4)
|
819 |
|
|
10000702: 10004537 lui a0,0x10004
|
820 |
|
|
10000706: 1e850513 addi a0,a0,488 # 100041e8 <__devconfig_end+0x180>
|
821 |
|
|
1000070a: 32d010ef jal ra,10002236
|
822 |
|
|
1000070e: a025 j 10000736
|
823 |
|
|
10000710: 8556 mv a0,s5
|
824 |
|
|
10000712: 0f1010ef jal ra,10002002
|
825 |
|
|
10000716: e91d bnez a0,1000074c
|
826 |
|
|
10000718: 649c ld a5,8(s1)
|
827 |
|
|
1000071a: 97ce add a5,a5,s3
|
828 |
|
|
1000071c: 6b90 ld a2,16(a5)
|
829 |
|
|
1000071e: 638c ld a1,0(a5)
|
830 |
|
|
10000720: e609 bnez a2,1000072a
|
831 |
|
|
10000722: 10005637 lui a2,0x10005
|
832 |
|
|
10000726: c3860613 addi a2,a2,-968 # 10004c38
|
833 |
|
|
1000072a: 10004537 lui a0,0x10004
|
834 |
|
|
1000072e: 32850513 addi a0,a0,808 # 10004328 <__devconfig_end+0x2c0>
|
835 |
|
|
10000732: 305010ef jal ra,10002236
|
836 |
|
|
10000736: 60a6 ld ra,72(sp)
|
837 |
|
|
10000738: 6406 ld s0,64(sp)
|
838 |
|
|
1000073a: 74e2 ld s1,56(sp)
|
839 |
|
|
1000073c: 7942 ld s2,48(sp)
|
840 |
|
|
1000073e: 79a2 ld s3,40(sp)
|
841 |
|
|
10000740: 7a02 ld s4,32(sp)
|
842 |
|
|
10000742: 6ae2 ld s5,24(sp)
|
843 |
|
|
10000744: 6b42 ld s6,16(sp)
|
844 |
|
|
10000746: 4501 li a0,0
|
845 |
|
|
10000748: 6161 addi sp,sp,80
|
846 |
|
|
1000074a: 8082 ret
|
847 |
|
|
1000074c: 2905 addiw s2,s2,1
|
848 |
|
|
1000074e: b755 j 100006f2
|
849 |
|
|
|
850 |
|
|
0000000010000750 :
|
851 |
|
|
10000750: 4789 li a5,2
|
852 |
|
|
10000752: 10a7c163 blt a5,a0,10000854
|
853 |
|
|
10000756: 7179 addi sp,sp,-48
|
854 |
|
|
10000758: f022 sd s0,32(sp)
|
855 |
|
|
1000075a: ec26 sd s1,24(sp)
|
856 |
|
|
1000075c: e84a sd s2,16(sp)
|
857 |
|
|
1000075e: e44e sd s3,8(sp)
|
858 |
|
|
10000760: f406 sd ra,40(sp)
|
859 |
|
|
10000762: e052 sd s4,0(sp)
|
860 |
|
|
10000764: 1800 addi s0,sp,48
|
861 |
|
|
10000766: 10005737 lui a4,0x10005
|
862 |
|
|
1000076a: 26072483 lw s1,608(a4) # 10005260 <__shell_cmd_end>
|
863 |
|
|
1000076e: 577d li a4,-1
|
864 |
|
|
10000770: 892e mv s2,a1
|
865 |
|
|
10000772: 89a6 mv s3,s1
|
866 |
|
|
10000774: 0ae48663 beq s1,a4,10000820
|
867 |
|
|
10000778: 00f51d63 bne a0,a5,10000792
|
868 |
|
|
1000077c: 7402 ld s0,32(sp)
|
869 |
|
|
1000077e: 70a2 ld ra,40(sp)
|
870 |
|
|
10000780: 64e2 ld s1,24(sp)
|
871 |
|
|
10000782: 6942 ld s2,16(sp)
|
872 |
|
|
10000784: 69a2 ld s3,8(sp)
|
873 |
|
|
10000786: 6a02 ld s4,0(sp)
|
874 |
|
|
10000788: 00858513 addi a0,a1,8
|
875 |
|
|
1000078c: 6145 addi sp,sp,48
|
876 |
|
|
1000078e: f23ff06f j 100006b0
|
877 |
|
|
10000792: 4785 li a5,1
|
878 |
|
|
10000794: 02f51e63 bne a0,a5,100007d0
|
879 |
|
|
10000798: 10004537 lui a0,0x10004
|
880 |
|
|
1000079c: 33050513 addi a0,a0,816 # 10004330 <__devconfig_end+0x2c8>
|
881 |
|
|
100007a0: 297010ef jal ra,10002236
|
882 |
|
|
100007a4: 100057b7 lui a5,0x10005
|
883 |
|
|
100007a8: 0492 slli s1,s1,0x4
|
884 |
|
|
100007aa: 23078793 addi a5,a5,560 # 10005230 <__device_MICROKERNEL_start>
|
885 |
|
|
100007ae: 4901 li s2,0
|
886 |
|
|
100007b0: 94be add s1,s1,a5
|
887 |
|
|
100007b2: 49e1 li s3,24
|
888 |
|
|
100007b4: 10004a37 lui s4,0x10004
|
889 |
|
|
100007b8: 03390733 mul a4,s2,s3
|
890 |
|
|
100007bc: 649c ld a5,8(s1)
|
891 |
|
|
100007be: 97ba add a5,a5,a4
|
892 |
|
|
100007c0: 638c ld a1,0(a5)
|
893 |
|
|
100007c2: c1c1 beqz a1,10000842
|
894 |
|
|
100007c4: 1b0a0513 addi a0,s4,432 # 100041b0 <__devconfig_end+0x148>
|
895 |
|
|
100007c8: 26f010ef jal ra,10002236
|
896 |
|
|
100007cc: 2905 addiw s2,s2,1
|
897 |
|
|
100007ce: b7ed j 100007b8
|
898 |
|
|
100007d0: 10004537 lui a0,0x10004
|
899 |
|
|
100007d4: 33850513 addi a0,a0,824 # 10004338 <__devconfig_end+0x2d0>
|
900 |
|
|
100007d8: 25f010ef jal ra,10002236
|
901 |
|
|
100007dc: 100057b7 lui a5,0x10005
|
902 |
|
|
100007e0: 100054b7 lui s1,0x10005
|
903 |
|
|
100007e4: 23078713 addi a4,a5,560 # 10005230 <__device_MICROKERNEL_start>
|
904 |
|
|
100007e8: 26048493 addi s1,s1,608 # 10005260 <__shell_cmd_end>
|
905 |
|
|
100007ec: 8c99 sub s1,s1,a4
|
906 |
|
|
100007ee: 8491 srai s1,s1,0x4
|
907 |
|
|
100007f0: 4901 li s2,0
|
908 |
|
|
100007f2: 23078993 addi s3,a5,560
|
909 |
|
|
100007f6: 10004a37 lui s4,0x10004
|
910 |
|
|
100007fa: 00994963 blt s2,s1,1000080c
|
911 |
|
|
100007fe: 10004537 lui a0,0x10004
|
912 |
|
|
10000802: 35050513 addi a0,a0,848 # 10004350 <__devconfig_end+0x2e8>
|
913 |
|
|
10000806: 231010ef jal ra,10002236
|
914 |
|
|
1000080a: a825 j 10000842
|
915 |
|
|
1000080c: 00491793 slli a5,s2,0x4
|
916 |
|
|
10000810: 97ce add a5,a5,s3
|
917 |
|
|
10000812: 638c ld a1,0(a5)
|
918 |
|
|
10000814: 1b0a0513 addi a0,s4,432 # 100041b0 <__devconfig_end+0x148>
|
919 |
|
|
10000818: 2905 addiw s2,s2,1
|
920 |
|
|
1000081a: 21d010ef jal ra,10002236
|
921 |
|
|
1000081e: bff1 j 100007fa
|
922 |
|
|
10000820: faf518e3 bne a0,a5,100007d0
|
923 |
|
|
10000824: 00893503 ld a0,8(s2)
|
924 |
|
|
10000828: a87ff0ef jal ra,100002ae
|
925 |
|
|
1000082c: 84aa mv s1,a0
|
926 |
|
|
1000082e: f73515e3 bne a0,s3,10000798
|
927 |
|
|
10000832: 00893583 ld a1,8(s2)
|
928 |
|
|
10000836: 10004537 lui a0,0x10004
|
929 |
|
|
1000083a: 20850513 addi a0,a0,520 # 10004208 <__devconfig_end+0x1a0>
|
930 |
|
|
1000083e: 1f9010ef jal ra,10002236
|
931 |
|
|
10000842: 70a2 ld ra,40(sp)
|
932 |
|
|
10000844: 7402 ld s0,32(sp)
|
933 |
|
|
10000846: 64e2 ld s1,24(sp)
|
934 |
|
|
10000848: 6942 ld s2,16(sp)
|
935 |
|
|
1000084a: 69a2 ld s3,8(sp)
|
936 |
|
|
1000084c: 6a02 ld s4,0(sp)
|
937 |
|
|
1000084e: 4501 li a0,0
|
938 |
|
|
10000850: 6145 addi sp,sp,48
|
939 |
|
|
10000852: 8082 ret
|
940 |
|
|
10000854: 00858513 addi a0,a1,8
|
941 |
|
|
10000858: bf1d j 1000078e
|
942 |
|
|
|
943 |
|
|
000000001000085a :
|
944 |
|
|
1000085a: 7115 addi sp,sp,-224
|
945 |
|
|
1000085c: e9a2 sd s0,208(sp)
|
946 |
|
|
1000085e: fd4e sd s3,184(sp)
|
947 |
|
|
10000860: f556 sd s5,168(sp)
|
948 |
|
|
10000862: f15a sd s6,160(sp)
|
949 |
|
|
10000864: ed5e sd s7,152(sp)
|
950 |
|
|
10000866: e962 sd s8,144(sp)
|
951 |
|
|
10000868: ed86 sd ra,216(sp)
|
952 |
|
|
1000086a: e5a6 sd s1,200(sp)
|
953 |
|
|
1000086c: e1ca sd s2,192(sp)
|
954 |
|
|
1000086e: f952 sd s4,176(sp)
|
955 |
|
|
10000870: e566 sd s9,136(sp)
|
956 |
|
|
10000872: e16a sd s10,128(sp)
|
957 |
|
|
10000874: fcee sd s11,120(sp)
|
958 |
|
|
10000876: 1180 addi s0,sp,224
|
959 |
|
|
10000878: 10000ab7 lui s5,0x10000
|
960 |
|
|
1000087c: 100009b7 lui s3,0x10000
|
961 |
|
|
10000880: 10005b37 lui s6,0x10005
|
962 |
|
|
10000884: 10004bb7 lui s7,0x10004
|
963 |
|
|
10000888: 10005c37 lui s8,0x10005
|
964 |
|
|
1000088c: 750a8a93 addi s5,s5,1872 # 10000750
|
965 |
|
|
10000890: 38c98993 addi s3,s3,908 # 1000038c
|
966 |
|
|
10000894: 230b0b13 addi s6,s6,560 # 10005230 <__device_MICROKERNEL_start>
|
967 |
|
|
10000898: b21ff0ef jal ra,100003b8
|
968 |
|
|
1000089c: 85aa mv a1,a0
|
969 |
|
|
1000089e: 1b8b8513 addi a0,s7,440 # 100041b8 <__devconfig_end+0x150>
|
970 |
|
|
100008a2: 195010ef jal ra,10002236
|
971 |
|
|
100008a6: 55fd li a1,-1
|
972 |
|
|
100008a8: 5b8c0513 addi a0,s8,1464 # 100055b8
|
973 |
|
|
100008ac: 3f9020ef jal ra,100034a4
|
974 |
|
|
100008b0: 00850493 addi s1,a0,8
|
975 |
|
|
100008b4: 892a mv s2,a0
|
976 |
|
|
100008b6: 8526 mv a0,s1
|
977 |
|
|
100008b8: 72c010ef jal ra,10001fe4
|
978 |
|
|
100008bc: 02000713 li a4,32
|
979 |
|
|
100008c0: e911 bnez a0,100008d4
|
980 |
|
|
100008c2: 10005537 lui a0,0x10005
|
981 |
|
|
100008c6: 85ca mv a1,s2
|
982 |
|
|
100008c8: 28050513 addi a0,a0,640 # 10005280 <__data_ram_end>
|
983 |
|
|
100008cc: 337020ef jal ra,10003402
|
984 |
|
|
100008d0: b7e1 j 10000898
|
985 |
|
|
100008d2: 0485 addi s1,s1,1
|
986 |
|
|
100008d4: 0004c783 lbu a5,0(s1)
|
987 |
|
|
100008d8: fee78de3 beq a5,a4,100008d2
|
988 |
|
|
100008dc: d3fd beqz a5,100008c2
|
989 |
|
|
100008de: f3840c93 addi s9,s0,-200
|
990 |
|
|
100008e2: f2943c23 sd s1,-200(s0)
|
991 |
|
|
100008e6: 4d05 li s10,1
|
992 |
|
|
100008e8: 8a66 mv s4,s9
|
993 |
|
|
100008ea: 4dad li s11,11
|
994 |
|
|
100008ec: 02000593 li a1,32
|
995 |
|
|
100008f0: 8526 mv a0,s1
|
996 |
|
|
100008f2: 6d0010ef jal ra,10001fc2
|
997 |
|
|
100008f6: cd01 beqz a0,1000090e
|
998 |
|
|
100008f8: 00150493 addi s1,a0,1
|
999 |
|
|
100008fc: 00050023 sb zero,0(a0)
|
1000 |
|
|
10000900: 02000713 li a4,32
|
1001 |
|
|
10000904: 0004c783 lbu a5,0(s1)
|
1002 |
|
|
10000908: 04e78c63 beq a5,a4,10000960
|
1003 |
|
|
1000090c: efa1 bnez a5,10000964
|
1004 |
|
|
1000090e: 003d1793 slli a5,s10,0x3
|
1005 |
|
|
10000912: f9040713 addi a4,s0,-112
|
1006 |
|
|
10000916: 97ba add a5,a5,a4
|
1007 |
|
|
10000918: fa07b423 sd zero,-88(a5)
|
1008 |
|
|
1000091c: f3843483 ld s1,-200(s0)
|
1009 |
|
|
10000920: 57fd li a5,-1
|
1010 |
|
|
10000922: f2f42a23 sw a5,-204(s0)
|
1011 |
|
|
10000926: 000d0c9b sext.w s9,s10
|
1012 |
|
|
1000092a: e8b9 bnez s1,10000980
|
1013 |
|
|
1000092c: 10004537 lui a0,0x10004
|
1014 |
|
|
10000930: 2b050513 addi a0,a0,688 # 100042b0 <__devconfig_end+0x248>
|
1015 |
|
|
10000934: 103010ef jal ra,10002236
|
1016 |
|
|
10000938: 1000a7b7 lui a5,0x1000a
|
1017 |
|
|
1000093c: d087b783 ld a5,-760(a5) # 10009d08 <_end>
|
1018 |
|
|
10000940: ebe9 bnez a5,10000a12
|
1019 |
|
|
10000942: f3843583 ld a1,-200(s0)
|
1020 |
|
|
10000946: 10004537 lui a0,0x10004
|
1021 |
|
|
1000094a: 1e850513 addi a0,a0,488 # 100041e8 <__devconfig_end+0x180>
|
1022 |
|
|
1000094e: 0e9010ef jal ra,10002236
|
1023 |
|
|
10000952: 10004537 lui a0,0x10004
|
1024 |
|
|
10000956: 2f850513 addi a0,a0,760 # 100042f8 <__devconfig_end+0x290>
|
1025 |
|
|
1000095a: 0dd010ef jal ra,10002236
|
1026 |
|
|
1000095e: b795 j 100008c2
|
1027 |
|
|
10000960: 0485 addi s1,s1,1
|
1028 |
|
|
10000962: b74d j 10000904
|
1029 |
|
|
10000964: 009cb423 sd s1,8(s9)
|
1030 |
|
|
10000968: 0d05 addi s10,s10,1
|
1031 |
|
|
1000096a: 0ca1 addi s9,s9,8
|
1032 |
|
|
1000096c: f9bd10e3 bne s10,s11,100008ec
|
1033 |
|
|
10000970: 10004537 lui a0,0x10004
|
1034 |
|
|
10000974: 45a9 li a1,10
|
1035 |
|
|
10000976: 29050513 addi a0,a0,656 # 10004290 <__devconfig_end+0x228>
|
1036 |
|
|
1000097a: 0bd010ef jal ra,10002236
|
1037 |
|
|
1000097e: b791 j 100008c2
|
1038 |
|
|
10000980: 0004c783 lbu a5,0(s1)
|
1039 |
|
|
10000984: d7c5 beqz a5,1000092c
|
1040 |
|
|
10000986: 100045b7 lui a1,0x10004
|
1041 |
|
|
1000098a: 2c858593 addi a1,a1,712 # 100042c8 <__devconfig_end+0x260>
|
1042 |
|
|
1000098e: 8526 mv a0,s1
|
1043 |
|
|
10000990: 672010ef jal ra,10002002
|
1044 |
|
|
10000994: 87d6 mv a5,s5
|
1045 |
|
|
10000996: cd35 beqz a0,10000a12
|
1046 |
|
|
10000998: 100045b7 lui a1,0x10004
|
1047 |
|
|
1000099c: 2d058593 addi a1,a1,720 # 100042d0 <__devconfig_end+0x268>
|
1048 |
|
|
100009a0: 8526 mv a0,s1
|
1049 |
|
|
100009a2: 660010ef jal ra,10002002
|
1050 |
|
|
100009a6: c149 beqz a0,10000a28
|
1051 |
|
|
100009a8: 4785 li a5,1
|
1052 |
|
|
100009aa: 00fd1e63 bne s10,a5,100009c6
|
1053 |
|
|
100009ae: 100057b7 lui a5,0x10005
|
1054 |
|
|
100009b2: 2607a703 lw a4,608(a5) # 10005260 <__shell_cmd_end>
|
1055 |
|
|
100009b6: 57fd li a5,-1
|
1056 |
|
|
100009b8: 00f71763 bne a4,a5,100009c6
|
1057 |
|
|
100009bc: 10004537 lui a0,0x10004
|
1058 |
|
|
100009c0: 2e050513 addi a0,a0,736 # 100042e0 <__devconfig_end+0x278>
|
1059 |
|
|
100009c4: bf85 j 10000934
|
1060 |
|
|
100009c6: f3440593 addi a1,s0,-204
|
1061 |
|
|
100009ca: 8552 mv a0,s4
|
1062 |
|
|
100009cc: a4dff0ef jal ra,10000418
|
1063 |
|
|
100009d0: f3442483 lw s1,-204(s0)
|
1064 |
|
|
100009d4: 57fd li a5,-1
|
1065 |
|
|
100009d6: 872a mv a4,a0
|
1066 |
|
|
100009d8: f6f480e3 beq s1,a5,10000938
|
1067 |
|
|
100009dc: dd31 beqz a0,10000938
|
1068 |
|
|
100009de: 0492 slli s1,s1,0x4
|
1069 |
|
|
100009e0: 4d01 li s10,0
|
1070 |
|
|
100009e2: 46e1 li a3,24
|
1071 |
|
|
100009e4: 94da add s1,s1,s6
|
1072 |
|
|
100009e6: 02dd0db3 mul s11,s10,a3
|
1073 |
|
|
100009ea: 649c ld a5,8(s1)
|
1074 |
|
|
100009ec: 97ee add a5,a5,s11
|
1075 |
|
|
100009ee: 638c ld a1,0(a5)
|
1076 |
|
|
100009f0: d5a1 beqz a1,10000938
|
1077 |
|
|
100009f2: 853a mv a0,a4
|
1078 |
|
|
100009f4: f2d43023 sd a3,-224(s0)
|
1079 |
|
|
100009f8: f2e43423 sd a4,-216(s0)
|
1080 |
|
|
100009fc: 606010ef jal ra,10002002
|
1081 |
|
|
10000a00: f2843703 ld a4,-216(s0)
|
1082 |
|
|
10000a04: f2043683 ld a3,-224(s0)
|
1083 |
|
|
10000a08: ed11 bnez a0,10000a24
|
1084 |
|
|
10000a0a: 649c ld a5,8(s1)
|
1085 |
|
|
10000a0c: 97ee add a5,a5,s11
|
1086 |
|
|
10000a0e: 679c ld a5,8(a5)
|
1087 |
|
|
10000a10: d785 beqz a5,10000938
|
1088 |
|
|
10000a12: 85d2 mv a1,s4
|
1089 |
|
|
10000a14: 8566 mv a0,s9
|
1090 |
|
|
10000a16: 9782 jalr a5
|
1091 |
|
|
10000a18: ea0555e3 bgez a0,100008c2
|
1092 |
|
|
10000a1c: 8552 mv a0,s4
|
1093 |
|
|
10000a1e: c93ff0ef jal ra,100006b0
|
1094 |
|
|
10000a22: b545 j 100008c2
|
1095 |
|
|
10000a24: 2d05 addiw s10,s10,1
|
1096 |
|
|
10000a26: b7c1 j 100009e6
|
1097 |
|
|
10000a28: 87ce mv a5,s3
|
1098 |
|
|
10000a2a: b7e5 j 10000a12
|
1099 |
|
|
|
1100 |
|
|
0000000010000a2c :
|
1101 |
|
|
|
1102 |
|
|
return common_chars - command_len + space;
|
1103 |
|
|
}
|
1104 |
|
|
|
1105 |
|
|
void shell_init(const char *str)
|
1106 |
|
|
{
|
1107 |
|
|
10000a2c: 7139 addi sp,sp,-64
|
1108 |
|
|
10000a2e: fc06 sd ra,56(sp)
|
1109 |
|
|
10000a30: f822 sd s0,48(sp)
|
1110 |
|
|
10000a32: f426 sd s1,40(sp)
|
1111 |
|
|
10000a34: 0080 addi s0,sp,64
|
1112 |
|
|
10000a36: f04a sd s2,32(sp)
|
1113 |
|
|
10000a38: ec4e sd s3,24(sp)
|
1114 |
|
|
10000a3a: e852 sd s4,16(sp)
|
1115 |
|
|
k_fifo_init(&cmds_queue);
|
1116 |
|
|
10000a3c: 100059b7 lui s3,0x10005
|
1117 |
|
|
{
|
1118 |
|
|
10000a40: 892a mv s2,a0
|
1119 |
|
|
k_fifo_init(&cmds_queue);
|
1120 |
|
|
10000a42: 5b898513 addi a0,s3,1464 # 100055b8
|
1121 |
|
|
k_fifo_init(&avail_queue);
|
1122 |
|
|
10000a46: 100054b7 lui s1,0x10005
|
1123 |
|
|
k_fifo_init(&cmds_queue);
|
1124 |
|
|
10000a4a: 1a1020ef jal ra,100033ea
|
1125 |
|
|
k_fifo_init(&avail_queue);
|
1126 |
|
|
10000a4e: 28048513 addi a0,s1,640 # 10005280 <__data_ram_end>
|
1127 |
|
|
10000a52: 199020ef jal ra,100033ea
|
1128 |
|
|
k_fifo_put(&avail_queue, &buf[i]);
|
1129 |
|
|
10000a56: 100055b7 lui a1,0x10005
|
1130 |
|
|
10000a5a: 2a058a13 addi s4,a1,672 # 100052a0
|
1131 |
|
|
10000a5e: 28048513 addi a0,s1,640
|
1132 |
|
|
10000a62: 2a058593 addi a1,a1,672
|
1133 |
|
|
10000a66: 19d020ef jal ra,10003402
|
1134 |
|
|
10000a6a: 108a0593 addi a1,s4,264
|
1135 |
|
|
10000a6e: 28048513 addi a0,s1,640
|
1136 |
|
|
10000a72: 191020ef jal ra,10003402
|
1137 |
|
|
10000a76: 210a0593 addi a1,s4,528
|
1138 |
|
|
10000a7a: 28048513 addi a0,s1,640
|
1139 |
|
|
10000a7e: 185020ef jal ra,10003402
|
1140 |
|
|
|
1141 |
|
|
line_queue_init();
|
1142 |
|
|
|
1143 |
|
|
prompt = str ? str : "";
|
1144 |
|
|
10000a82: 00091663 bnez s2,10000a8e
|
1145 |
|
|
10000a86: 10005937 lui s2,0x10005
|
1146 |
|
|
10000a8a: c3890913 addi s2,s2,-968 # 10004c38
|
1147 |
|
|
10000a8e: 1000a7b7 lui a5,0x1000a
|
1148 |
|
|
|
1149 |
|
|
k_thread_spawn(stack, STACKSIZE, shell, NULL, NULL, NULL,
|
1150 |
|
|
10000a92: 10001637 lui a2,0x10001
|
1151 |
|
|
10000a96: 10005537 lui a0,0x10005
|
1152 |
|
|
prompt = str ? str : "";
|
1153 |
|
|
10000a9a: d127bc23 sd s2,-744(a5) # 10009d18
|
1154 |
|
|
k_thread_spawn(stack, STACKSIZE, shell, NULL, NULL, NULL,
|
1155 |
|
|
10000a9e: e002 sd zero,0(sp)
|
1156 |
|
|
10000aa0: 85a60613 addi a2,a2,-1958 # 1000085a
|
1157 |
|
|
10000aa4: 7d000593 li a1,2000
|
1158 |
|
|
10000aa8: 4881 li a7,0
|
1159 |
|
|
10000aaa: 585d li a6,-9
|
1160 |
|
|
10000aac: 4781 li a5,0
|
1161 |
|
|
10000aae: 4701 li a4,0
|
1162 |
|
|
10000ab0: 4681 li a3,0
|
1163 |
|
|
10000ab2: 5f050513 addi a0,a0,1520 # 100055f0
|
1164 |
|
|
10000ab6: 2d0030ef jal ra,10003d86
|
1165 |
|
|
K_PRIO_COOP(7), 0, K_NO_WAIT);
|
1166 |
|
|
|
1167 |
|
|
/* Register serial console handler */
|
1168 |
|
|
uart_register_input(&avail_queue, &cmds_queue, completion);
|
1169 |
|
|
}
|
1170 |
|
|
10000aba: 7442 ld s0,48(sp)
|
1171 |
|
|
10000abc: 70e2 ld ra,56(sp)
|
1172 |
|
|
10000abe: 7902 ld s2,32(sp)
|
1173 |
|
|
10000ac0: 6a42 ld s4,16(sp)
|
1174 |
|
|
uart_register_input(&avail_queue, &cmds_queue, completion);
|
1175 |
|
|
10000ac2: 5b898593 addi a1,s3,1464
|
1176 |
|
|
10000ac6: 28048513 addi a0,s1,640
|
1177 |
|
|
}
|
1178 |
|
|
10000aca: 69e2 ld s3,24(sp)
|
1179 |
|
|
10000acc: 74a2 ld s1,40(sp)
|
1180 |
|
|
uart_register_input(&avail_queue, &cmds_queue, completion);
|
1181 |
|
|
10000ace: 10000637 lui a2,0x10000
|
1182 |
|
|
10000ad2: 4a460613 addi a2,a2,1188 # 100004a4
|
1183 |
|
|
}
|
1184 |
|
|
10000ad6: 6121 addi sp,sp,64
|
1185 |
|
|
uart_register_input(&avail_queue, &cmds_queue, completion);
|
1186 |
|
|
10000ad8: 5740006f j 1000104c
|
1187 |
|
|
|
1188 |
|
|
0000000010000adc :
|
1189 |
|
|
10000adc: 1141 addi sp,sp,-16
|
1190 |
|
|
10000ade: e422 sd s0,8(sp)
|
1191 |
|
|
10000ae0: 0800 addi s0,sp,16
|
1192 |
|
|
10000ae2: 651c ld a5,8(a0)
|
1193 |
|
|
10000ae4: 6422 ld s0,8(sp)
|
1194 |
|
|
10000ae6: 0087b303 ld t1,8(a5)
|
1195 |
|
|
10000aea: 0141 addi sp,sp,16
|
1196 |
|
|
10000aec: 8302 jr t1
|
1197 |
|
|
|
1198 |
|
|
0000000010000aee :
|
1199 |
|
|
10000aee: 1141 addi sp,sp,-16
|
1200 |
|
|
10000af0: e422 sd s0,8(sp)
|
1201 |
|
|
10000af2: 0800 addi s0,sp,16
|
1202 |
|
|
10000af4: 651c ld a5,8(a0)
|
1203 |
|
|
10000af6: 0487b303 ld t1,72(a5)
|
1204 |
|
|
10000afa: 00030563 beqz t1,10000b04
|
1205 |
|
|
10000afe: 6422 ld s0,8(sp)
|
1206 |
|
|
10000b00: 0141 addi sp,sp,16
|
1207 |
|
|
10000b02: 8302 jr t1
|
1208 |
|
|
10000b04: 6422 ld s0,8(sp)
|
1209 |
|
|
10000b06: 0141 addi sp,sp,16
|
1210 |
|
|
10000b08: 8082 ret
|
1211 |
|
|
|
1212 |
|
|
0000000010000b0a :
|
1213 |
|
|
10000b0a: 1101 addi sp,sp,-32
|
1214 |
|
|
10000b0c: e822 sd s0,16(sp)
|
1215 |
|
|
10000b0e: e426 sd s1,8(sp)
|
1216 |
|
|
10000b10: e04a sd s2,0(sp)
|
1217 |
|
|
10000b12: ec06 sd ra,24(sp)
|
1218 |
|
|
10000b14: 1000 addi s0,sp,32
|
1219 |
|
|
10000b16: 1000a4b7 lui s1,0x1000a
|
1220 |
|
|
10000b1a: 47a9 li a5,10
|
1221 |
|
|
10000b1c: 892a mv s2,a0
|
1222 |
|
|
10000b1e: d5048493 addi s1,s1,-688 # 10009d50
|
1223 |
|
|
10000b22: 00f51663 bne a0,a5,10000b2e
|
1224 |
|
|
10000b26: 6088 ld a0,0(s1)
|
1225 |
|
|
10000b28: 45b5 li a1,13
|
1226 |
|
|
10000b2a: fb3ff0ef jal ra,10000adc
|
1227 |
|
|
10000b2e: 6088 ld a0,0(s1)
|
1228 |
|
|
10000b30: 0ff97593 andi a1,s2,255
|
1229 |
|
|
10000b34: fa9ff0ef jal ra,10000adc
|
1230 |
|
|
10000b38: 60e2 ld ra,24(sp)
|
1231 |
|
|
10000b3a: 6442 ld s0,16(sp)
|
1232 |
|
|
10000b3c: 854a mv a0,s2
|
1233 |
|
|
10000b3e: 64a2 ld s1,8(sp)
|
1234 |
|
|
10000b40: 6902 ld s2,0(sp)
|
1235 |
|
|
10000b42: 6105 addi sp,sp,32
|
1236 |
|
|
10000b44: 8082 ret
|
1237 |
|
|
|
1238 |
|
|
0000000010000b46 :
|
1239 |
|
|
10000b46: 7179 addi sp,sp,-48
|
1240 |
|
|
10000b48: f022 sd s0,32(sp)
|
1241 |
|
|
10000b4a: ec26 sd s1,24(sp)
|
1242 |
|
|
10000b4c: e84a sd s2,16(sp)
|
1243 |
|
|
10000b4e: e44e sd s3,8(sp)
|
1244 |
|
|
10000b50: e052 sd s4,0(sp)
|
1245 |
|
|
10000b52: f406 sd ra,40(sp)
|
1246 |
|
|
10000b54: 1800 addi s0,sp,48
|
1247 |
|
|
10000b56: 1000a937 lui s2,0x1000a
|
1248 |
|
|
10000b5a: d5090a13 addi s4,s2,-688 # 10009d50
|
1249 |
|
|
10000b5e: 89aa mv s3,a0
|
1250 |
|
|
10000b60: 000a3503 ld a0,0(s4)
|
1251 |
|
|
10000b64: 84ae mv s1,a1
|
1252 |
|
|
10000b66: 45a1 li a1,8
|
1253 |
|
|
10000b68: f75ff0ef jal ra,10000adc
|
1254 |
|
|
10000b6c: e09d bnez s1,10000b92
|
1255 |
|
|
10000b6e: 000a3503 ld a0,0(s4)
|
1256 |
|
|
10000b72: 02000593 li a1,32
|
1257 |
|
|
10000b76: f67ff0ef jal ra,10000adc
|
1258 |
|
|
10000b7a: 7402 ld s0,32(sp)
|
1259 |
|
|
10000b7c: 000a3503 ld a0,0(s4)
|
1260 |
|
|
10000b80: 70a2 ld ra,40(sp)
|
1261 |
|
|
10000b82: 64e2 ld s1,24(sp)
|
1262 |
|
|
10000b84: 6942 ld s2,16(sp)
|
1263 |
|
|
10000b86: 69a2 ld s3,8(sp)
|
1264 |
|
|
10000b88: 6a02 ld s4,0(sp)
|
1265 |
|
|
10000b8a: 45a1 li a1,8
|
1266 |
|
|
10000b8c: 6145 addi sp,sp,48
|
1267 |
|
|
10000b8e: f4fff06f j 10000adc
|
1268 |
|
|
10000b92: 10004537 lui a0,0x10004
|
1269 |
|
|
10000b96: 38850513 addi a0,a0,904 # 10004388 <__devconfig_end+0x320>
|
1270 |
|
|
10000b9a: d5090913 addi s2,s2,-688
|
1271 |
|
|
10000b9e: 698010ef jal ra,10002236
|
1272 |
|
|
10000ba2: 0ff00a13 li s4,255
|
1273 |
|
|
10000ba6: 34fd addiw s1,s1,-1
|
1274 |
|
|
10000ba8: 0ff4f493 andi s1,s1,255
|
1275 |
|
|
10000bac: 00093503 ld a0,0(s2)
|
1276 |
|
|
10000bb0: 03449363 bne s1,s4,10000bd6
|
1277 |
|
|
10000bb4: 02000593 li a1,32
|
1278 |
|
|
10000bb8: f25ff0ef jal ra,10000adc
|
1279 |
|
|
10000bbc: 7402 ld s0,32(sp)
|
1280 |
|
|
10000bbe: 70a2 ld ra,40(sp)
|
1281 |
|
|
10000bc0: 64e2 ld s1,24(sp)
|
1282 |
|
|
10000bc2: 6942 ld s2,16(sp)
|
1283 |
|
|
10000bc4: 69a2 ld s3,8(sp)
|
1284 |
|
|
10000bc6: 6a02 ld s4,0(sp)
|
1285 |
|
|
10000bc8: 10004537 lui a0,0x10004
|
1286 |
|
|
10000bcc: 39050513 addi a0,a0,912 # 10004390 <__devconfig_end+0x328>
|
1287 |
|
|
10000bd0: 6145 addi sp,sp,48
|
1288 |
|
|
10000bd2: 6640106f j 10002236
|
1289 |
|
|
10000bd6: 0019c583 lbu a1,1(s3)
|
1290 |
|
|
10000bda: 0985 addi s3,s3,1
|
1291 |
|
|
10000bdc: feb98fa3 sb a1,-1(s3)
|
1292 |
|
|
10000be0: efdff0ef jal ra,10000adc
|
1293 |
|
|
10000be4: b7c9 j 10000ba6
|
1294 |
|
|
|
1295 |
|
|
0000000010000be6 :
|
1296 |
|
|
10000be6: 7175 addi sp,sp,-144
|
1297 |
|
|
10000be8: e122 sd s0,128(sp)
|
1298 |
|
|
10000bea: fca6 sd s1,120(sp)
|
1299 |
|
|
10000bec: f8ca sd s2,112(sp)
|
1300 |
|
|
10000bee: f4ce sd s3,104(sp)
|
1301 |
|
|
10000bf0: e8da sd s6,80(sp)
|
1302 |
|
|
10000bf2: e4de sd s7,72(sp)
|
1303 |
|
|
10000bf4: fc66 sd s9,56(sp)
|
1304 |
|
|
10000bf6: e506 sd ra,136(sp)
|
1305 |
|
|
10000bf8: f0d2 sd s4,96(sp)
|
1306 |
|
|
10000bfa: ecd6 sd s5,88(sp)
|
1307 |
|
|
10000bfc: e0e2 sd s8,64(sp)
|
1308 |
|
|
10000bfe: f86a sd s10,48(sp)
|
1309 |
|
|
10000c00: f46e sd s11,40(sp)
|
1310 |
|
|
10000c02: 0900 addi s0,sp,144
|
1311 |
|
|
10000c04: 1000ab37 lui s6,0x1000a
|
1312 |
|
|
10000c08: 1000abb7 lui s7,0x1000a
|
1313 |
|
|
10000c0c: 1000a4b7 lui s1,0x1000a
|
1314 |
|
|
10000c10: 1000a937 lui s2,0x1000a
|
1315 |
|
|
10000c14: 1000a9b7 lui s3,0x1000a
|
1316 |
|
|
10000c18: 10004cb7 lui s9,0x10004
|
1317 |
|
|
10000c1c: d50b0a13 addi s4,s6,-688 # 10009d50
|
1318 |
|
|
10000c20: 000a3503 ld a0,0(s4)
|
1319 |
|
|
10000c24: d50b0a93 addi s5,s6,-688
|
1320 |
|
|
10000c28: 651c ld a5,8(a0)
|
1321 |
|
|
10000c2a: 7fbc ld a5,120(a5)
|
1322 |
|
|
10000c2c: c3b1 beqz a5,10000c70
|
1323 |
|
|
10000c2e: 9782 jalr a5
|
1324 |
|
|
10000c30: c121 beqz a0,10000c70
|
1325 |
|
|
10000c32: 000a3503 ld a0,0(s4)
|
1326 |
|
|
10000c36: 651c ld a5,8(a0)
|
1327 |
|
|
10000c38: 7bbc ld a5,112(a5)
|
1328 |
|
|
10000c3a: cb9d beqz a5,10000c70
|
1329 |
|
|
10000c3c: 9782 jalr a5
|
1330 |
|
|
10000c3e: c90d beqz a0,10000c70
|
1331 |
|
|
10000c40: 000a3503 ld a0,0(s4)
|
1332 |
|
|
10000c44: 651c ld a5,8(a0)
|
1333 |
|
|
10000c46: 6fbc ld a5,88(a5)
|
1334 |
|
|
10000c48: dbf1 beqz a5,10000c1c
|
1335 |
|
|
10000c4a: 9782 jalr a5
|
1336 |
|
|
10000c4c: d961 beqz a0,10000c1c
|
1337 |
|
|
10000c4e: 000a3a03 ld s4,0(s4)
|
1338 |
|
|
10000c52: 008a3783 ld a5,8(s4)
|
1339 |
|
|
10000c56: 739c ld a5,32(a5)
|
1340 |
|
|
10000c58: 36078763 beqz a5,10000fc6
|
1341 |
|
|
10000c5c: 4605 li a2,1
|
1342 |
|
|
10000c5e: f8f40593 addi a1,s0,-113
|
1343 |
|
|
10000c62: 8552 mv a0,s4
|
1344 |
|
|
10000c64: 9782 jalr a5
|
1345 |
|
|
10000c66: 36055063 bgez a0,10000fc6
|
1346 |
|
|
10000c6a: 8552 mv a0,s4
|
1347 |
|
|
10000c6c: e83ff0ef jal ra,10000aee
|
1348 |
|
|
10000c70: 60aa ld ra,136(sp)
|
1349 |
|
|
10000c72: 640a ld s0,128(sp)
|
1350 |
|
|
10000c74: 74e6 ld s1,120(sp)
|
1351 |
|
|
10000c76: 7946 ld s2,112(sp)
|
1352 |
|
|
10000c78: 79a6 ld s3,104(sp)
|
1353 |
|
|
10000c7a: 7a06 ld s4,96(sp)
|
1354 |
|
|
10000c7c: 6ae6 ld s5,88(sp)
|
1355 |
|
|
10000c7e: 6b46 ld s6,80(sp)
|
1356 |
|
|
10000c80: 6ba6 ld s7,72(sp)
|
1357 |
|
|
10000c82: 6c06 ld s8,64(sp)
|
1358 |
|
|
10000c84: 7ce2 ld s9,56(sp)
|
1359 |
|
|
10000c86: 7d42 ld s10,48(sp)
|
1360 |
|
|
10000c88: 7da2 ld s11,40(sp)
|
1361 |
|
|
10000c8a: 6149 addi sp,sp,144
|
1362 |
|
|
10000c8c: 8082 ret
|
1363 |
|
|
10000c8e: 45a1 li a1,8
|
1364 |
|
|
10000c90: d4448513 addi a0,s1,-700 # 10009d44
|
1365 |
|
|
10000c94: 5ba020ef jal ra,1000324e
|
1366 |
|
|
10000c98: 1000a7b7 lui a5,0x1000a
|
1367 |
|
|
10000c9c: 01baa023 sw s11,0(s5)
|
1368 |
|
|
10000ca0: d207a223 sw zero,-732(a5) # 10009d24
|
1369 |
|
|
10000ca4: bfa5 j 10000c1c
|
1370 |
|
|
10000ca6: d4448513 addi a0,s1,-700
|
1371 |
|
|
10000caa: 596020ef jal ra,10003240
|
1372 |
|
|
10000cae: 8921 andi a0,a0,8
|
1373 |
|
|
10000cb0: 36050a63 beqz a0,10001024
|
1374 |
|
|
10000cb4: 000a0a9b sext.w s5,s4
|
1375 |
|
|
10000cb8: fd0a871b addiw a4,s5,-48
|
1376 |
|
|
10000cbc: 47a5 li a5,9
|
1377 |
|
|
10000cbe: 02e7eb63 bltu a5,a4,10000cf4
|
1378 |
|
|
10000cc2: d4448513 addi a0,s1,-700
|
1379 |
|
|
10000cc6: 57a020ef jal ra,10003240
|
1380 |
|
|
10000cca: 8941 andi a0,a0,16
|
1381 |
|
|
10000ccc: cd19 beqz a0,10000cea
|
1382 |
|
|
10000cce: 1000a737 lui a4,0x1000a
|
1383 |
|
|
10000cd2: d2470713 addi a4,a4,-732 # 10009d24
|
1384 |
|
|
10000cd6: 4314 lw a3,0(a4)
|
1385 |
|
|
10000cd8: 47a9 li a5,10
|
1386 |
|
|
10000cda: 02d787bb mulw a5,a5,a3
|
1387 |
|
|
10000cde: 015787bb addw a5,a5,s5
|
1388 |
|
|
10000ce2: fd07879b addiw a5,a5,-48
|
1389 |
|
|
10000ce6: c31c sw a5,0(a4)
|
1390 |
|
|
10000ce8: bf15 j 10000c1c
|
1391 |
|
|
10000cea: 1000a737 lui a4,0x1000a
|
1392 |
|
|
10000cee: d2070713 addi a4,a4,-736 # 10009d20
|
1393 |
|
|
10000cf2: b7d5 j 10000cd6
|
1394 |
|
|
10000cf4: 03b00793 li a5,59
|
1395 |
|
|
10000cf8: 00fa0d63 beq s4,a5,10000d12
|
1396 |
|
|
10000cfc: 55dd li a1,-9
|
1397 |
|
|
10000cfe: d4448513 addi a0,s1,-700
|
1398 |
|
|
10000d02: 584020ef jal ra,10003286
|
1399 |
|
|
10000d06: 55bd li a1,-17
|
1400 |
|
|
10000d08: d4448513 addi a0,s1,-700
|
1401 |
|
|
10000d0c: 57a020ef jal ra,10003286
|
1402 |
|
|
10000d10: ae11 j 10001024
|
1403 |
|
|
10000d12: 45c1 li a1,16
|
1404 |
|
|
10000d14: d4448513 addi a0,s1,-700
|
1405 |
|
|
10000d18: 536020ef jal ra,1000324e
|
1406 |
|
|
10000d1c: 8941 andi a0,a0,16
|
1407 |
|
|
10000d1e: fd79 bnez a0,10000cfc
|
1408 |
|
|
10000d20: bdf5 j 10000c1c
|
1409 |
|
|
10000d22: 04800793 li a5,72
|
1410 |
|
|
10000d26: 0afa0963 beq s4,a5,10000dd8
|
1411 |
|
|
10000d2a: 07e00793 li a5,126
|
1412 |
|
|
10000d2e: 30fa1963 bne s4,a5,10001040
|
1413 |
|
|
10000d32: d4198a13 addi s4,s3,-703 # 10009d41
|
1414 |
|
|
10000d36: 000a4783 lbu a5,0(s4)
|
1415 |
|
|
10000d3a: 30078363 beqz a5,10001040
|
1416 |
|
|
10000d3e: 10004537 lui a0,0x10004
|
1417 |
|
|
10000d42: 4585 li a1,1
|
1418 |
|
|
10000d44: 3a050513 addi a0,a0,928 # 100043a0 <__devconfig_end+0x338>
|
1419 |
|
|
10000d48: 4ee010ef jal ra,10002236
|
1420 |
|
|
10000d4c: 000a4583 lbu a1,0(s4)
|
1421 |
|
|
10000d50: d4094503 lbu a0,-704(s2) # 10009d40
|
1422 |
|
|
10000d54: 0d21 addi s10,s10,8
|
1423 |
|
|
10000d56: 35fd addiw a1,a1,-1
|
1424 |
|
|
10000d58: 0ff5f593 andi a1,a1,255
|
1425 |
|
|
10000d5c: 956a add a0,a0,s10
|
1426 |
|
|
10000d5e: 00ba0023 sb a1,0(s4)
|
1427 |
|
|
10000d62: de5ff0ef jal ra,10000b46
|
1428 |
|
|
10000d66: ace9 j 10001040
|
1429 |
|
|
10000d68: d4090693 addi a3,s2,-704
|
1430 |
|
|
10000d6c: 1000a737 lui a4,0x1000a
|
1431 |
|
|
10000d70: 0006c783 lbu a5,0(a3)
|
1432 |
|
|
10000d74: d2072583 lw a1,-736(a4) # 10009d20
|
1433 |
|
|
10000d78: 2cb7e463 bltu a5,a1,10001040
|
1434 |
|
|
10000d7c: d4198513 addi a0,s3,-703
|
1435 |
|
|
10000d80: 00054703 lbu a4,0(a0)
|
1436 |
|
|
10000d84: 0ff5f613 andi a2,a1,255
|
1437 |
|
|
10000d88: 9f91 subw a5,a5,a2
|
1438 |
|
|
10000d8a: 9f31 addw a4,a4,a2
|
1439 |
|
|
10000d8c: 00e50023 sb a4,0(a0)
|
1440 |
|
|
10000d90: 10004537 lui a0,0x10004
|
1441 |
|
|
10000d94: 00f68023 sb a5,0(a3)
|
1442 |
|
|
10000d98: 39850513 addi a0,a0,920 # 10004398 <__devconfig_end+0x330>
|
1443 |
|
|
10000d9c: 49a010ef jal ra,10002236
|
1444 |
|
|
10000da0: a445 j 10001040
|
1445 |
|
|
10000da2: d4198713 addi a4,s3,-703
|
1446 |
|
|
10000da6: 1000a6b7 lui a3,0x1000a
|
1447 |
|
|
10000daa: 00074783 lbu a5,0(a4)
|
1448 |
|
|
10000dae: d206a583 lw a1,-736(a3) # 10009d20
|
1449 |
|
|
10000db2: 28b7e763 bltu a5,a1,10001040
|
1450 |
|
|
10000db6: 0ff5f693 andi a3,a1,255
|
1451 |
|
|
10000dba: 9f95 subw a5,a5,a3
|
1452 |
|
|
10000dbc: 00f70023 sb a5,0(a4)
|
1453 |
|
|
10000dc0: d4090713 addi a4,s2,-704
|
1454 |
|
|
10000dc4: 00074783 lbu a5,0(a4)
|
1455 |
|
|
10000dc8: 10004537 lui a0,0x10004
|
1456 |
|
|
10000dcc: 3a050513 addi a0,a0,928 # 100043a0 <__devconfig_end+0x338>
|
1457 |
|
|
10000dd0: 9fb5 addw a5,a5,a3
|
1458 |
|
|
10000dd2: 00f70023 sb a5,0(a4)
|
1459 |
|
|
10000dd6: b7d9 j 10000d9c
|
1460 |
|
|
10000dd8: d4090a13 addi s4,s2,-704
|
1461 |
|
|
10000ddc: 000a4583 lbu a1,0(s4)
|
1462 |
|
|
10000de0: 26058063 beqz a1,10001040
|
1463 |
|
|
10000de4: 10004537 lui a0,0x10004
|
1464 |
|
|
10000de8: 39850513 addi a0,a0,920 # 10004398 <__devconfig_end+0x330>
|
1465 |
|
|
10000dec: 44a010ef jal ra,10002236
|
1466 |
|
|
10000df0: d4198713 addi a4,s3,-703
|
1467 |
|
|
10000df4: 00074783 lbu a5,0(a4)
|
1468 |
|
|
10000df8: 000a4683 lbu a3,0(s4)
|
1469 |
|
|
10000dfc: 9fb5 addw a5,a5,a3
|
1470 |
|
|
10000dfe: 00f70023 sb a5,0(a4)
|
1471 |
|
|
10000e02: 000a0023 sb zero,0(s4)
|
1472 |
|
|
10000e06: ac2d j 10001040
|
1473 |
|
|
10000e08: d4198a13 addi s4,s3,-703
|
1474 |
|
|
10000e0c: 000a4583 lbu a1,0(s4)
|
1475 |
|
|
10000e10: 22058863 beqz a1,10001040
|
1476 |
|
|
10000e14: 10004537 lui a0,0x10004
|
1477 |
|
|
10000e18: 3a050513 addi a0,a0,928 # 100043a0 <__devconfig_end+0x338>
|
1478 |
|
|
10000e1c: 41a010ef jal ra,10002236
|
1479 |
|
|
10000e20: d4090713 addi a4,s2,-704
|
1480 |
|
|
10000e24: bfc1 j 10000df4
|
1481 |
|
|
10000e26: 55f9 li a1,-2
|
1482 |
|
|
10000e28: d4448513 addi a0,s1,-700
|
1483 |
|
|
10000e2c: 45a020ef jal ra,10003286
|
1484 |
|
|
10000e30: 8905 andi a0,a0,1
|
1485 |
|
|
10000e32: c115 beqz a0,10000e56
|
1486 |
|
|
10000e34: f8f44703 lbu a4,-113(s0)
|
1487 |
|
|
10000e38: 05b00793 li a5,91
|
1488 |
|
|
10000e3c: def710e3 bne a4,a5,10000c1c
|
1489 |
|
|
10000e40: 4589 li a1,2
|
1490 |
|
|
10000e42: d4448513 addi a0,s1,-700
|
1491 |
|
|
10000e46: 408020ef jal ra,1000324e
|
1492 |
|
|
10000e4a: 4591 li a1,4
|
1493 |
|
|
10000e4c: d4448513 addi a0,s1,-700
|
1494 |
|
|
10000e50: 3fe020ef jal ra,1000324e
|
1495 |
|
|
10000e54: b3e1 j 10000c1c
|
1496 |
|
|
10000e56: f8f44d03 lbu s10,-113(s0)
|
1497 |
|
|
10000e5a: 05e00793 li a5,94
|
1498 |
|
|
10000e5e: fe0d071b addiw a4,s10,-32
|
1499 |
|
|
10000e62: 0ce7f663 bleu a4,a5,10000f2e
|
1500 |
|
|
10000e66: 47b5 li a5,13
|
1501 |
|
|
10000e68: 06fd0c63 beq s10,a5,10000ee0
|
1502 |
|
|
10000e6c: 03a7ed63 bltu a5,s10,10000ea6
|
1503 |
|
|
10000e70: 47a5 li a5,9
|
1504 |
|
|
10000e72: dafd15e3 bne s10,a5,10000c1c
|
1505 |
|
|
10000e76: 1000a7b7 lui a5,0x1000a
|
1506 |
|
|
10000e7a: d387b783 ld a5,-712(a5) # 10009d38
|
1507 |
|
|
10000e7e: d8078fe3 beqz a5,10000c1c
|
1508 |
|
|
10000e82: d419c703 lbu a4,-703(s3)
|
1509 |
|
|
10000e86: d8071be3 bnez a4,10000c1c
|
1510 |
|
|
10000e8a: d4090a13 addi s4,s2,-704
|
1511 |
|
|
10000e8e: 000db503 ld a0,0(s11)
|
1512 |
|
|
10000e92: 000a4583 lbu a1,0(s4)
|
1513 |
|
|
10000e96: 0521 addi a0,a0,8
|
1514 |
|
|
10000e98: 9782 jalr a5
|
1515 |
|
|
10000e9a: 000a4783 lbu a5,0(s4)
|
1516 |
|
|
10000e9e: 9d3d addw a0,a0,a5
|
1517 |
|
|
10000ea0: 00aa0023 sb a0,0(s4)
|
1518 |
|
|
10000ea4: bba5 j 10000c1c
|
1519 |
|
|
10000ea6: 47ed li a5,27
|
1520 |
|
|
10000ea8: 02fd0a63 beq s10,a5,10000edc
|
1521 |
|
|
10000eac: 07f00793 li a5,127
|
1522 |
|
|
10000eb0: d6fd16e3 bne s10,a5,10000c1c
|
1523 |
|
|
10000eb4: d4090713 addi a4,s2,-704
|
1524 |
|
|
10000eb8: 00074783 lbu a5,0(a4)
|
1525 |
|
|
10000ebc: d60780e3 beqz a5,10000c1c
|
1526 |
|
|
10000ec0: 000db503 ld a0,0(s11)
|
1527 |
|
|
10000ec4: 37fd addiw a5,a5,-1
|
1528 |
|
|
10000ec6: 0ff7f793 andi a5,a5,255
|
1529 |
|
|
10000eca: d419c583 lbu a1,-703(s3)
|
1530 |
|
|
10000ece: 00f70023 sb a5,0(a4)
|
1531 |
|
|
10000ed2: 07a1 addi a5,a5,8
|
1532 |
|
|
10000ed4: 953e add a0,a0,a5
|
1533 |
|
|
10000ed6: c71ff0ef jal ra,10000b46
|
1534 |
|
|
10000eda: b389 j 10000c1c
|
1535 |
|
|
10000edc: 4585 li a1,1
|
1536 |
|
|
10000ede: b7bd j 10000e4c
|
1537 |
|
|
10000ee0: d4090d13 addi s10,s2,-704
|
1538 |
|
|
10000ee4: d4198a13 addi s4,s3,-703
|
1539 |
|
|
10000ee8: 000a4683 lbu a3,0(s4)
|
1540 |
|
|
10000eec: 000d4703 lbu a4,0(s10)
|
1541 |
|
|
10000ef0: 000db783 ld a5,0(s11)
|
1542 |
|
|
10000ef4: 000ab503 ld a0,0(s5)
|
1543 |
|
|
10000ef8: 9736 add a4,a4,a3
|
1544 |
|
|
10000efa: 97ba add a5,a5,a4
|
1545 |
|
|
10000efc: 00078423 sb zero,8(a5)
|
1546 |
|
|
10000f00: 45b5 li a1,13
|
1547 |
|
|
10000f02: bdbff0ef jal ra,10000adc
|
1548 |
|
|
10000f06: 000ab503 ld a0,0(s5)
|
1549 |
|
|
10000f0a: 45a9 li a1,10
|
1550 |
|
|
10000f0c: bd1ff0ef jal ra,10000adc
|
1551 |
|
|
10000f10: 1000a7b7 lui a5,0x1000a
|
1552 |
|
|
10000f14: 000db583 ld a1,0(s11)
|
1553 |
|
|
10000f18: d487b503 ld a0,-696(a5) # 10009d48
|
1554 |
|
|
10000f1c: 000d0023 sb zero,0(s10)
|
1555 |
|
|
10000f20: 000a0023 sb zero,0(s4)
|
1556 |
|
|
10000f24: 4de020ef jal ra,10003402
|
1557 |
|
|
10000f28: 000db023 sd zero,0(s11)
|
1558 |
|
|
10000f2c: b9c5 j 10000c1c
|
1559 |
|
|
10000f2e: d4090613 addi a2,s2,-704
|
1560 |
|
|
10000f32: 00064683 lbu a3,0(a2)
|
1561 |
|
|
10000f36: d419cc03 lbu s8,-703(s3)
|
1562 |
|
|
10000f3a: 0fe00593 li a1,254
|
1563 |
|
|
10000f3e: 0006871b sext.w a4,a3
|
1564 |
|
|
10000f42: 00ec0533 add a0,s8,a4
|
1565 |
|
|
10000f46: cca5cbe3 blt a1,a0,10000c1c
|
1566 |
|
|
10000f4a: 000ab503 ld a0,0(s5)
|
1567 |
|
|
10000f4e: 0016859b addiw a1,a3,1
|
1568 |
|
|
10000f52: 00b60023 sb a1,0(a2)
|
1569 |
|
|
10000f56: 85ea mv a1,s10
|
1570 |
|
|
10000f58: f6e43823 sd a4,-144(s0)
|
1571 |
|
|
10000f5c: 000dba03 ld s4,0(s11)
|
1572 |
|
|
10000f60: f6d43c23 sd a3,-136(s0)
|
1573 |
|
|
10000f64: b79ff0ef jal ra,10000adc
|
1574 |
|
|
10000f68: f7043703 ld a4,-144(s0)
|
1575 |
|
|
10000f6c: f7843683 ld a3,-136(s0)
|
1576 |
|
|
10000f70: 9752 add a4,a4,s4
|
1577 |
|
|
10000f72: 000c1563 bnez s8,10000f7c
|
1578 |
|
|
10000f76: 01a70423 sb s10,8(a4)
|
1579 |
|
|
10000f7a: b14d j 10000c1c
|
1580 |
|
|
10000f7c: 100047b7 lui a5,0x10004
|
1581 |
|
|
10000f80: 00874d83 lbu s11,8(a4)
|
1582 |
|
|
10000f84: 06a5 addi a3,a3,9
|
1583 |
|
|
10000f86: 01a70423 sb s10,8(a4)
|
1584 |
|
|
10000f8a: 38878513 addi a0,a5,904 # 10004388 <__devconfig_end+0x320>
|
1585 |
|
|
10000f8e: 9a36 add s4,s4,a3
|
1586 |
|
|
10000f90: 0ff00d13 li s10,255
|
1587 |
|
|
10000f94: 2a2010ef jal ra,10002236
|
1588 |
|
|
10000f98: fffc079b addiw a5,s8,-1
|
1589 |
|
|
10000f9c: 0ff7fc13 andi s8,a5,255
|
1590 |
|
|
10000fa0: 01ac1763 bne s8,s10,10000fae
|
1591 |
|
|
10000fa4: 390c8513 addi a0,s9,912 # 10004390 <__devconfig_end+0x328>
|
1592 |
|
|
10000fa8: 28e010ef jal ra,10002236
|
1593 |
|
|
10000fac: b985 j 10000c1c
|
1594 |
|
|
10000fae: 000ab503 ld a0,0(s5)
|
1595 |
|
|
10000fb2: 85ee mv a1,s11
|
1596 |
|
|
10000fb4: 0a05 addi s4,s4,1
|
1597 |
|
|
10000fb6: b27ff0ef jal ra,10000adc
|
1598 |
|
|
10000fba: fffa4703 lbu a4,-1(s4)
|
1599 |
|
|
10000fbe: ffba0fa3 sb s11,-1(s4)
|
1600 |
|
|
10000fc2: 8dba mv s11,a4
|
1601 |
|
|
10000fc4: bfd1 j 10000f98
|
1602 |
|
|
10000fc6: d30bb783 ld a5,-720(s7) # 10009d30
|
1603 |
|
|
10000fca: d30b8d93 addi s11,s7,-720
|
1604 |
|
|
10000fce: ef81 bnez a5,10000fe6
|
1605 |
|
|
10000fd0: 1000a7b7 lui a5,0x1000a
|
1606 |
|
|
10000fd4: d287b503 ld a0,-728(a5) # 10009d28
|
1607 |
|
|
10000fd8: 4581 li a1,0
|
1608 |
|
|
10000fda: 4ca020ef jal ra,100034a4
|
1609 |
|
|
10000fde: 00adb023 sd a0,0(s11)
|
1610 |
|
|
10000fe2: c80507e3 beqz a0,10000c70
|
1611 |
|
|
10000fe6: d4448513 addi a0,s1,-700
|
1612 |
|
|
10000fea: 256020ef jal ra,10003240
|
1613 |
|
|
10000fee: 8909 andi a0,a0,2
|
1614 |
|
|
10000ff0: e2050be3 beqz a0,10000e26
|
1615 |
|
|
10000ff4: 55ed li a1,-5
|
1616 |
|
|
10000ff6: d4448513 addi a0,s1,-700
|
1617 |
|
|
10000ffa: f8f44a03 lbu s4,-113(s0)
|
1618 |
|
|
10000ffe: 000dbd03 ld s10,0(s11)
|
1619 |
|
|
10001002: 284020ef jal ra,10003286
|
1620 |
|
|
10001006: 8911 andi a0,a0,4
|
1621 |
|
|
10001008: c8050fe3 beqz a0,10000ca6
|
1622 |
|
|
1000100c: 1000aab7 lui s5,0x1000a
|
1623 |
|
|
10001010: fd0a0d9b addiw s11,s4,-48
|
1624 |
|
|
10001014: 47a5 li a5,9
|
1625 |
|
|
10001016: d20a8a93 addi s5,s5,-736 # 10009d20
|
1626 |
|
|
1000101a: c7b7fae3 bleu s11,a5,10000c8e
|
1627 |
|
|
1000101e: 4785 li a5,1
|
1628 |
|
|
10001020: 00faa023 sw a5,0(s5)
|
1629 |
|
|
10001024: 04600793 li a5,70
|
1630 |
|
|
10001028: defa00e3 beq s4,a5,10000e08
|
1631 |
|
|
1000102c: cf47ebe3 bltu a5,s4,10000d22
|
1632 |
|
|
10001030: 04300793 li a5,67
|
1633 |
|
|
10001034: d6fa07e3 beq s4,a5,10000da2
|
1634 |
|
|
10001038: 04400793 li a5,68
|
1635 |
|
|
1000103c: d2fa06e3 beq s4,a5,10000d68
|
1636 |
|
|
10001040: 55f5 li a1,-3
|
1637 |
|
|
10001042: d4448513 addi a0,s1,-700
|
1638 |
|
|
10001046: 240020ef jal ra,10003286
|
1639 |
|
|
1000104a: bec9 j 10000c1c
|
1640 |
|
|
|
1641 |
|
|
000000001000104c :
|
1642 |
|
|
uart_irq_rx_enable(uart_console_dev);
|
1643 |
|
|
}
|
1644 |
|
|
|
1645 |
|
|
void uart_register_input(struct k_fifo *avail, struct k_fifo *lines,
|
1646 |
|
|
uint8_t (*completion)(char *str, uint8_t len))
|
1647 |
|
|
{
|
1648 |
|
|
1000104c: 7179 addi sp,sp,-48
|
1649 |
|
|
1000104e: f022 sd s0,32(sp)
|
1650 |
|
|
10001050: ec26 sd s1,24(sp)
|
1651 |
|
|
10001052: e84a sd s2,16(sp)
|
1652 |
|
|
10001054: f406 sd ra,40(sp)
|
1653 |
|
|
10001056: 1800 addi s0,sp,48
|
1654 |
|
|
uart_irq_rx_disable(uart_console_dev);
|
1655 |
|
|
10001058: 1000a4b7 lui s1,0x1000a
|
1656 |
|
|
1000105c: d5048913 addi s2,s1,-688 # 10009d50
|
1657 |
|
|
avail_queue = avail;
|
1658 |
|
|
10001060: 1000a7b7 lui a5,0x1000a
|
1659 |
|
|
10001064: d2a7b423 sd a0,-728(a5) # 10009d28
|
1660 |
|
|
uart_irq_rx_disable(uart_console_dev);
|
1661 |
|
|
10001068: 00093503 ld a0,0(s2)
|
1662 |
|
|
lines_queue = lines;
|
1663 |
|
|
1000106c: 1000a7b7 lui a5,0x1000a
|
1664 |
|
|
10001070: d4b7b423 sd a1,-696(a5) # 10009d48
|
1665 |
|
|
completion_cb = completion;
|
1666 |
|
|
10001074: 1000a7b7 lui a5,0x1000a
|
1667 |
|
|
10001078: d2c7bc23 sd a2,-712(a5) # 10009d38
|
1668 |
|
|
uart_irq_rx_disable(uart_console_dev);
|
1669 |
|
|
1000107c: a73ff0ef jal ra,10000aee
|
1670 |
|
|
uart_irq_tx_disable(uart_console_dev);
|
1671 |
|
|
10001080: 00093503 ld a0,0(s2)
|
1672 |
|
|
10001084: d5048493 addi s1,s1,-688
|
1673 |
|
|
*/
|
1674 |
|
|
static inline void uart_irq_tx_disable(struct device *dev)
|
1675 |
|
|
{
|
1676 |
|
|
const struct uart_driver_api *api = dev->driver_api;
|
1677 |
|
|
|
1678 |
|
|
if (api->irq_tx_disable) {
|
1679 |
|
|
10001088: 651c ld a5,8(a0)
|
1680 |
|
|
1000108a: 7b9c ld a5,48(a5)
|
1681 |
|
|
1000108c: c391 beqz a5,10001090
|
1682 |
|
|
api->irq_tx_disable(dev);
|
1683 |
|
|
1000108e: 9782 jalr a5
|
1684 |
|
|
uart_irq_callback_set(uart_console_dev, uart_console_isr);
|
1685 |
|
|
10001090: 6088 ld a0,0(s1)
|
1686 |
|
|
* @return N/A
|
1687 |
|
|
*/
|
1688 |
|
|
static inline void uart_irq_callback_set(struct device *dev,
|
1689 |
|
|
uart_irq_callback_t cb)
|
1690 |
|
|
{
|
1691 |
|
|
const struct uart_driver_api *api = dev->driver_api;
|
1692 |
|
|
10001092: 651c ld a5,8(a0)
|
1693 |
|
|
|
1694 |
|
|
if ((api != NULL) && (api->irq_callback_set != NULL)) {
|
1695 |
|
|
10001094: cb81 beqz a5,100010a4
|
1696 |
|
|
10001096: 63dc ld a5,128(a5)
|
1697 |
|
|
10001098: c791 beqz a5,100010a4
|
1698 |
|
|
api->irq_callback_set(dev, cb);
|
1699 |
|
|
1000109a: 100015b7 lui a1,0x10001
|
1700 |
|
|
1000109e: be658593 addi a1,a1,-1050 # 10000be6
|
1701 |
|
|
100010a2: 9782 jalr a5
|
1702 |
|
|
while (uart_irq_rx_ready(uart_console_dev)) {
|
1703 |
|
|
100010a4: 6088 ld a0,0(s1)
|
1704 |
|
|
if (api->irq_rx_ready) {
|
1705 |
|
|
100010a6: 651c ld a5,8(a0)
|
1706 |
|
|
100010a8: 6fbc ld a5,88(a5)
|
1707 |
|
|
100010aa: eb99 bnez a5,100010c0
|
1708 |
|
|
uart_irq_rx_enable(uart_console_dev);
|
1709 |
|
|
100010ac: 6088 ld a0,0(s1)
|
1710 |
|
|
if (api->irq_rx_enable) {
|
1711 |
|
|
100010ae: 651c ld a5,8(a0)
|
1712 |
|
|
100010b0: 63bc ld a5,64(a5)
|
1713 |
|
|
100010b2: e395 bnez a5,100010d6
|
1714 |
|
|
|
1715 |
|
|
console_input_init();
|
1716 |
|
|
}
|
1717 |
|
|
100010b4: 70a2 ld ra,40(sp)
|
1718 |
|
|
100010b6: 7402 ld s0,32(sp)
|
1719 |
|
|
100010b8: 64e2 ld s1,24(sp)
|
1720 |
|
|
100010ba: 6942 ld s2,16(sp)
|
1721 |
|
|
100010bc: 6145 addi sp,sp,48
|
1722 |
|
|
100010be: 8082 ret
|
1723 |
|
|
return api->irq_rx_ready(dev);
|
1724 |
|
|
100010c0: 9782 jalr a5
|
1725 |
|
|
while (uart_irq_rx_ready(uart_console_dev)) {
|
1726 |
|
|
100010c2: d56d beqz a0,100010ac
|
1727 |
|
|
uart_fifo_read(uart_console_dev, &c, 1);
|
1728 |
|
|
100010c4: 6088 ld a0,0(s1)
|
1729 |
|
|
if (api->fifo_read) {
|
1730 |
|
|
100010c6: 651c ld a5,8(a0)
|
1731 |
|
|
100010c8: 739c ld a5,32(a5)
|
1732 |
|
|
100010ca: dfe9 beqz a5,100010a4
|
1733 |
|
|
return api->fifo_read(dev, rx_data, size);
|
1734 |
|
|
100010cc: 4605 li a2,1
|
1735 |
|
|
100010ce: fdf40593 addi a1,s0,-33
|
1736 |
|
|
100010d2: 9782 jalr a5
|
1737 |
|
|
100010d4: bfc1 j 100010a4
|
1738 |
|
|
api->irq_rx_enable(dev);
|
1739 |
|
|
100010d6: 9782 jalr a5
|
1740 |
|
|
}
|
1741 |
|
|
100010d8: bff1 j 100010b4
|
1742 |
|
|
|
1743 |
|
|
00000000100010da :
|
1744 |
|
|
*
|
1745 |
|
|
* @return N/A
|
1746 |
|
|
*/
|
1747 |
|
|
|
1748 |
|
|
void uart_console_hook_install(void)
|
1749 |
|
|
{
|
1750 |
|
|
100010da: 1101 addi sp,sp,-32
|
1751 |
|
|
100010dc: e822 sd s0,16(sp)
|
1752 |
|
|
100010de: e426 sd s1,8(sp)
|
1753 |
|
|
100010e0: ec06 sd ra,24(sp)
|
1754 |
|
|
100010e2: 1000 addi s0,sp,32
|
1755 |
|
|
__stdout_hook_install(console_out);
|
1756 |
|
|
100010e4: 100014b7 lui s1,0x10001
|
1757 |
|
|
100010e8: b0a48513 addi a0,s1,-1270 # 10000b0a
|
1758 |
|
|
100010ec: 649000ef jal ra,10001f34 <__stdout_hook_install>
|
1759 |
|
|
__printk_hook_install(console_out);
|
1760 |
|
|
}
|
1761 |
|
|
100010f0: 6442 ld s0,16(sp)
|
1762 |
|
|
100010f2: 60e2 ld ra,24(sp)
|
1763 |
|
|
__printk_hook_install(console_out);
|
1764 |
|
|
100010f4: b0a48513 addi a0,s1,-1270
|
1765 |
|
|
}
|
1766 |
|
|
100010f8: 64a2 ld s1,8(sp)
|
1767 |
|
|
100010fa: 6105 addi sp,sp,32
|
1768 |
|
|
__printk_hook_install(console_out);
|
1769 |
|
|
100010fc: 1260106f j 10002222 <__printk_hook_install>
|
1770 |
|
|
|
1771 |
|
|
0000000010001100 :
|
1772 |
|
|
* @brief Initialize one UART as the console/debug port
|
1773 |
|
|
*
|
1774 |
|
|
* @return 0 if successful, otherwise failed.
|
1775 |
|
|
*/
|
1776 |
|
|
static int uart_console_init(struct device *arg)
|
1777 |
|
|
{
|
1778 |
|
|
10001100: 1141 addi sp,sp,-16
|
1779 |
|
|
10001102: e406 sd ra,8(sp)
|
1780 |
|
|
10001104: e022 sd s0,0(sp)
|
1781 |
|
|
|
1782 |
|
|
ARG_UNUSED(arg);
|
1783 |
|
|
|
1784 |
|
|
uart_console_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);
|
1785 |
|
|
10001106: 10004537 lui a0,0x10004
|
1786 |
|
|
{
|
1787 |
|
|
1000110a: 0800 addi s0,sp,16
|
1788 |
|
|
uart_console_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);
|
1789 |
|
|
1000110c: 14850513 addi a0,a0,328 # 10004148 <__devconfig_end+0xe0>
|
1790 |
|
|
10001110: 1f0020ef jal ra,10003300
|
1791 |
|
|
10001114: 1000a7b7 lui a5,0x1000a
|
1792 |
|
|
10001118: d4a7b823 sd a0,-688(a5) # 10009d50
|
1793 |
|
|
}
|
1794 |
|
|
}
|
1795 |
|
|
sys_thread_busy_wait(1000000);
|
1796 |
|
|
#endif
|
1797 |
|
|
|
1798 |
|
|
uart_console_hook_install();
|
1799 |
|
|
1000111c: fbfff0ef jal ra,100010da
|
1800 |
|
|
|
1801 |
|
|
return 0;
|
1802 |
|
|
}
|
1803 |
|
|
10001120: 60a2 ld ra,8(sp)
|
1804 |
|
|
10001122: 6402 ld s0,0(sp)
|
1805 |
|
|
10001124: 4501 li a0,0
|
1806 |
|
|
10001126: 0141 addi sp,sp,16
|
1807 |
|
|
10001128: 8082 ret
|
1808 |
|
|
|
1809 |
|
|
000000001000112a :
|
1810 |
|
|
*
|
1811 |
|
|
* @param arg Argument to ISR.
|
1812 |
|
|
*
|
1813 |
|
|
* @return N/A
|
1814 |
|
|
*/
|
1815 |
|
|
void uart_gnss_isr(void *arg) {
|
1816 |
|
|
1000112a: 1141 addi sp,sp,-16
|
1817 |
|
|
1000112c: e422 sd s0,8(sp)
|
1818 |
|
|
1000112e: 0800 addi s0,sp,16
|
1819 |
|
|
struct device *dev = (struct device *)arg;
|
1820 |
|
|
struct uart_gnss_dev_data_t *data =
|
1821 |
|
|
(struct uart_gnss_dev_data_t *)dev->driver_data;
|
1822 |
|
|
if (data->cb) {
|
1823 |
|
|
10001130: 691c ld a5,16(a0)
|
1824 |
|
|
10001132: 0087b303 ld t1,8(a5)
|
1825 |
|
|
10001136: 00030563 beqz t1,10001140
|
1826 |
|
|
data->cb(dev);
|
1827 |
|
|
}
|
1828 |
|
|
}
|
1829 |
|
|
1000113a: 6422 ld s0,8(sp)
|
1830 |
|
|
1000113c: 0141 addi sp,sp,16
|
1831 |
|
|
data->cb(dev);
|
1832 |
|
|
1000113e: 8302 jr t1
|
1833 |
|
|
}
|
1834 |
|
|
10001140: 6422 ld s0,8(sp)
|
1835 |
|
|
10001142: 0141 addi sp,sp,16
|
1836 |
|
|
10001144: 8082 ret
|
1837 |
|
|
|
1838 |
|
|
0000000010001146 :
|
1839 |
|
|
WRITE32(&__UART1->data, c);
|
1840 |
|
|
return c;
|
1841 |
|
|
}
|
1842 |
|
|
|
1843 |
|
|
static int uart_gnss_poll_in(struct device *dev, unsigned char *c)
|
1844 |
|
|
{
|
1845 |
|
|
10001146: 1141 addi sp,sp,-16
|
1846 |
|
|
10001148: e422 sd s0,8(sp)
|
1847 |
|
|
1000114a: 0800 addi s0,sp,16
|
1848 |
|
|
return -ENOTSUP;
|
1849 |
|
|
|
1850 |
|
|
}
|
1851 |
|
|
1000114c: 6422 ld s0,8(sp)
|
1852 |
|
|
1000114e: fdd00513 li a0,-35
|
1853 |
|
|
10001152: 0141 addi sp,sp,16
|
1854 |
|
|
10001154: 8082 ret
|
1855 |
|
|
|
1856 |
|
|
0000000010001156 :
|
1857 |
|
|
* @param dev UART device struct
|
1858 |
|
|
*
|
1859 |
|
|
* @return Always 1
|
1860 |
|
|
*/
|
1861 |
|
|
static int uart_gnss_irq_update(struct device *dev)
|
1862 |
|
|
{
|
1863 |
|
|
10001156: 1141 addi sp,sp,-16
|
1864 |
|
|
10001158: e422 sd s0,8(sp)
|
1865 |
|
|
1000115a: 0800 addi s0,sp,16
|
1866 |
|
|
return 1;
|
1867 |
|
|
}
|
1868 |
|
|
1000115c: 6422 ld s0,8(sp)
|
1869 |
|
|
1000115e: 4505 li a0,1
|
1870 |
|
|
10001160: 0141 addi sp,sp,16
|
1871 |
|
|
10001162: 8082 ret
|
1872 |
|
|
|
1873 |
|
|
0000000010001164 :
|
1874 |
|
|
*
|
1875 |
|
|
* @return N/A
|
1876 |
|
|
*/
|
1877 |
|
|
static void uart_gnss_irq_callback_set(struct device *dev,
|
1878 |
|
|
uart_irq_callback_t cb)
|
1879 |
|
|
{
|
1880 |
|
|
10001164: 1141 addi sp,sp,-16
|
1881 |
|
|
10001166: e422 sd s0,8(sp)
|
1882 |
|
|
10001168: 0800 addi s0,sp,16
|
1883 |
|
|
struct uart_gnss_dev_data_t * const dev_data = dev->driver_data;
|
1884 |
|
|
dev_data->cb = cb;
|
1885 |
|
|
1000116a: 691c ld a5,16(a0)
|
1886 |
|
|
}
|
1887 |
|
|
1000116c: 6422 ld s0,8(sp)
|
1888 |
|
|
dev_data->cb = cb;
|
1889 |
|
|
1000116e: e78c sd a1,8(a5)
|
1890 |
|
|
}
|
1891 |
|
|
10001170: 0141 addi sp,sp,16
|
1892 |
|
|
10001172: 8082 ret
|
1893 |
|
|
|
1894 |
|
|
0000000010001174 :
|
1895 |
|
|
int uart_gnss_irq_tx_empty(struct device *dev) {
|
1896 |
|
|
10001174: 1141 addi sp,sp,-16
|
1897 |
|
|
uint32_t status = READ32(&__UART1->status);
|
1898 |
|
|
10001176: 00080537 lui a0,0x80
|
1899 |
|
|
int uart_gnss_irq_tx_empty(struct device *dev) {
|
1900 |
|
|
1000117a: e022 sd s0,0(sp)
|
1901 |
|
|
1000117c: e406 sd ra,8(sp)
|
1902 |
|
|
1000117e: 0800 addi s0,sp,16
|
1903 |
|
|
uint32_t status = READ32(&__UART1->status);
|
1904 |
|
|
10001180: 0505 addi a0,a0,1
|
1905 |
|
|
10001182: 0532 slli a0,a0,0xc
|
1906 |
|
|
10001184: 020020ef jal ra,100031a4
|
1907 |
|
|
}
|
1908 |
|
|
10001188: 60a2 ld ra,8(sp)
|
1909 |
|
|
1000118a: 6402 ld s0,0(sp)
|
1910 |
|
|
return ((status & UART_STATUS_TX_EMPTY) ? 1: 0);
|
1911 |
|
|
1000118c: 0015551b srliw a0,a0,0x1
|
1912 |
|
|
}
|
1913 |
|
|
10001190: 8905 andi a0,a0,1
|
1914 |
|
|
10001192: 0141 addi sp,sp,16
|
1915 |
|
|
10001194: 8082 ret
|
1916 |
|
|
|
1917 |
|
|
0000000010001196 :
|
1918 |
|
|
{
|
1919 |
|
|
10001196: 1141 addi sp,sp,-16
|
1920 |
|
|
uint32_t status = READ32(&__UART1->status);
|
1921 |
|
|
10001198: 00080537 lui a0,0x80
|
1922 |
|
|
{
|
1923 |
|
|
1000119c: e022 sd s0,0(sp)
|
1924 |
|
|
1000119e: e406 sd ra,8(sp)
|
1925 |
|
|
100011a0: 0800 addi s0,sp,16
|
1926 |
|
|
uint32_t status = READ32(&__UART1->status);
|
1927 |
|
|
100011a2: 0505 addi a0,a0,1
|
1928 |
|
|
100011a4: 0532 slli a0,a0,0xc
|
1929 |
|
|
100011a6: 7ff010ef jal ra,100031a4
|
1930 |
|
|
}
|
1931 |
|
|
100011aa: 60a2 ld ra,8(sp)
|
1932 |
|
|
100011ac: 6402 ld s0,0(sp)
|
1933 |
|
|
return ((status & UART_STATUS_RX_EMPTY) ? 0: 1);
|
1934 |
|
|
100011ae: 02057513 andi a0,a0,32
|
1935 |
|
|
}
|
1936 |
|
|
100011b2: 00153513 seqz a0,a0
|
1937 |
|
|
100011b6: 0141 addi sp,sp,16
|
1938 |
|
|
100011b8: 8082 ret
|
1939 |
|
|
|
1940 |
|
|
00000000100011ba :
|
1941 |
|
|
{
|
1942 |
|
|
100011ba: 1141 addi sp,sp,-16
|
1943 |
|
|
100011bc: e422 sd s0,8(sp)
|
1944 |
|
|
100011be: 0800 addi s0,sp,16
|
1945 |
|
|
}
|
1946 |
|
|
100011c0: 6422 ld s0,8(sp)
|
1947 |
|
|
100011c2: 0141 addi sp,sp,16
|
1948 |
|
|
return uart_gnss_irq_rx_ready(dev);
|
1949 |
|
|
100011c4: fd3ff06f j 10001196
|
1950 |
|
|
|
1951 |
|
|
00000000100011c8 :
|
1952 |
|
|
{
|
1953 |
|
|
100011c8: 7139 addi sp,sp,-64
|
1954 |
|
|
100011ca: ec4e sd s3,24(sp)
|
1955 |
|
|
uint32_t status = READ32(&__UART1->status);
|
1956 |
|
|
100011cc: 000809b7 lui s3,0x80
|
1957 |
|
|
{
|
1958 |
|
|
100011d0: f822 sd s0,48(sp)
|
1959 |
|
|
100011d2: f426 sd s1,40(sp)
|
1960 |
|
|
100011d4: f04a sd s2,32(sp)
|
1961 |
|
|
100011d6: e852 sd s4,16(sp)
|
1962 |
|
|
100011d8: e456 sd s5,8(sp)
|
1963 |
|
|
100011da: fc06 sd ra,56(sp)
|
1964 |
|
|
100011dc: e05a sd s6,0(sp)
|
1965 |
|
|
100011de: 0080 addi s0,sp,64
|
1966 |
|
|
uint32_t status = READ32(&__UART1->status);
|
1967 |
|
|
100011e0: 0985 addi s3,s3,1
|
1968 |
|
|
100011e2: 00c99513 slli a0,s3,0xc
|
1969 |
|
|
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
|
1970 |
|
|
100011e6: 08000937 lui s2,0x8000
|
1971 |
|
|
{
|
1972 |
|
|
100011ea: 8a2e mv s4,a1
|
1973 |
|
|
100011ec: 8ab2 mv s5,a2
|
1974 |
|
|
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
|
1975 |
|
|
100011ee: 10190913 addi s2,s2,257 # 8000101 <__bss_num_words+0x7fff361>
|
1976 |
|
|
uint32_t status = READ32(&__UART1->status);
|
1977 |
|
|
100011f2: 7b3010ef jal ra,100031a4
|
1978 |
|
|
100011f6: 0005079b sext.w a5,a0
|
1979 |
|
|
uint8_t num_rx = 0;
|
1980 |
|
|
100011fa: 4481 li s1,0
|
1981 |
|
|
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
|
1982 |
|
|
100011fc: 0912 slli s2,s2,0x4
|
1983 |
|
|
status = READ32(&__UART1->status);
|
1984 |
|
|
100011fe: 09b2 slli s3,s3,0xc
|
1985 |
|
|
while ((size - num_rx > 0) && ((status & UART_STATUS_RX_EMPTY) == 0)) {
|
1986 |
|
|
10001200: 0004851b sext.w a0,s1
|
1987 |
|
|
10001204: 40aa873b subw a4,s5,a0
|
1988 |
|
|
10001208: 00e05563 blez a4,10001212
|
1989 |
|
|
1000120c: 0207f793 andi a5,a5,32
|
1990 |
|
|
10001210: cb99 beqz a5,10001226
|
1991 |
|
|
}
|
1992 |
|
|
10001212: 70e2 ld ra,56(sp)
|
1993 |
|
|
10001214: 7442 ld s0,48(sp)
|
1994 |
|
|
10001216: 74a2 ld s1,40(sp)
|
1995 |
|
|
10001218: 7902 ld s2,32(sp)
|
1996 |
|
|
1000121a: 69e2 ld s3,24(sp)
|
1997 |
|
|
1000121c: 6a42 ld s4,16(sp)
|
1998 |
|
|
1000121e: 6aa2 ld s5,8(sp)
|
1999 |
|
|
10001220: 6b02 ld s6,0(sp)
|
2000 |
|
|
10001222: 6121 addi sp,sp,64
|
2001 |
|
|
10001224: 8082 ret
|
2002 |
|
|
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
|
2003 |
|
|
10001226: 854a mv a0,s2
|
2004 |
|
|
10001228: 77d010ef jal ra,100031a4
|
2005 |
|
|
1000122c: 00148b1b addiw s6,s1,1
|
2006 |
|
|
10001230: 94d2 add s1,s1,s4
|
2007 |
|
|
10001232: 00a48023 sb a0,0(s1)
|
2008 |
|
|
status = READ32(&__UART1->status);
|
2009 |
|
|
10001236: 854e mv a0,s3
|
2010 |
|
|
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
|
2011 |
|
|
10001238: 0ffb7b13 andi s6,s6,255
|
2012 |
|
|
status = READ32(&__UART1->status);
|
2013 |
|
|
1000123c: 769010ef jal ra,100031a4
|
2014 |
|
|
10001240: 0005079b sext.w a5,a0
|
2015 |
|
|
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
|
2016 |
|
|
10001244: 84da mv s1,s6
|
2017 |
|
|
10001246: bf6d j 10001200
|
2018 |
|
|
|
2019 |
|
|
0000000010001248 :
|
2020 |
|
|
{
|
2021 |
|
|
10001248: 1101 addi sp,sp,-32
|
2022 |
|
|
1000124a: e426 sd s1,8(sp)
|
2023 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2024 |
|
|
1000124c: 000804b7 lui s1,0x80
|
2025 |
|
|
{
|
2026 |
|
|
10001250: e822 sd s0,16(sp)
|
2027 |
|
|
10001252: e04a sd s2,0(sp)
|
2028 |
|
|
10001254: ec06 sd ra,24(sp)
|
2029 |
|
|
10001256: 1000 addi s0,sp,32
|
2030 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2031 |
|
|
10001258: 0485 addi s1,s1,1
|
2032 |
|
|
1000125a: 00c49513 slli a0,s1,0xc
|
2033 |
|
|
{
|
2034 |
|
|
1000125e: 892e mv s2,a1
|
2035 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2036 |
|
|
10001260: 745010ef jal ra,100031a4
|
2037 |
|
|
10001264: 2501 sext.w a0,a0
|
2038 |
|
|
status = READ32(&__UART1->status);
|
2039 |
|
|
10001266: 04b2 slli s1,s1,0xc
|
2040 |
|
|
while (status & UART_STATUS_TX_FULL) {
|
2041 |
|
|
10001268: 8905 andi a0,a0,1
|
2042 |
|
|
1000126a: e105 bnez a0,1000128a
|
2043 |
|
|
WRITE32(&__UART1->data, c);
|
2044 |
|
|
1000126c: 08000537 lui a0,0x8000
|
2045 |
|
|
10001270: 10150513 addi a0,a0,257 # 8000101 <__bss_num_words+0x7fff361>
|
2046 |
|
|
10001274: 85ca mv a1,s2
|
2047 |
|
|
10001276: 0512 slli a0,a0,0x4
|
2048 |
|
|
10001278: 749010ef jal ra,100031c0
|
2049 |
|
|
}
|
2050 |
|
|
1000127c: 60e2 ld ra,24(sp)
|
2051 |
|
|
1000127e: 6442 ld s0,16(sp)
|
2052 |
|
|
10001280: 854a mv a0,s2
|
2053 |
|
|
10001282: 64a2 ld s1,8(sp)
|
2054 |
|
|
10001284: 6902 ld s2,0(sp)
|
2055 |
|
|
10001286: 6105 addi sp,sp,32
|
2056 |
|
|
10001288: 8082 ret
|
2057 |
|
|
status = READ32(&__UART1->status);
|
2058 |
|
|
1000128a: 8526 mv a0,s1
|
2059 |
|
|
1000128c: 719010ef jal ra,100031a4
|
2060 |
|
|
10001290: 2501 sext.w a0,a0
|
2061 |
|
|
10001292: bfd9 j 10001268
|
2062 |
|
|
|
2063 |
|
|
0000000010001294 :
|
2064 |
|
|
void uart_gnss_irq_tx_enable(struct device *dev) {
|
2065 |
|
|
10001294: 1101 addi sp,sp,-32
|
2066 |
|
|
10001296: e426 sd s1,8(sp)
|
2067 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2068 |
|
|
10001298: 000804b7 lui s1,0x80
|
2069 |
|
|
void uart_gnss_irq_tx_enable(struct device *dev) {
|
2070 |
|
|
1000129c: e822 sd s0,16(sp)
|
2071 |
|
|
1000129e: ec06 sd ra,24(sp)
|
2072 |
|
|
100012a0: 1000 addi s0,sp,32
|
2073 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2074 |
|
|
100012a2: 0485 addi s1,s1,1
|
2075 |
|
|
100012a4: 00c49513 slli a0,s1,0xc
|
2076 |
|
|
100012a8: 6fd010ef jal ra,100031a4
|
2077 |
|
|
}
|
2078 |
|
|
100012ac: 6442 ld s0,16(sp)
|
2079 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2080 |
|
|
100012ae: 0005059b sext.w a1,a0
|
2081 |
|
|
}
|
2082 |
|
|
100012b2: 60e2 ld ra,24(sp)
|
2083 |
|
|
WRITE32(&__UART1->status, status);
|
2084 |
|
|
100012b4: 00c49513 slli a0,s1,0xc
|
2085 |
|
|
}
|
2086 |
|
|
100012b8: 64a2 ld s1,8(sp)
|
2087 |
|
|
WRITE32(&__UART1->status, status);
|
2088 |
|
|
100012ba: 6791 lui a5,0x4
|
2089 |
|
|
100012bc: 8ddd or a1,a1,a5
|
2090 |
|
|
}
|
2091 |
|
|
100012be: 6105 addi sp,sp,32
|
2092 |
|
|
WRITE32(&__UART1->status, status);
|
2093 |
|
|
100012c0: 7010106f j 100031c0
|
2094 |
|
|
|
2095 |
|
|
00000000100012c4 :
|
2096 |
|
|
void uart_gnss_irq_tx_disable(struct device *dev) {
|
2097 |
|
|
100012c4: 1101 addi sp,sp,-32
|
2098 |
|
|
100012c6: e426 sd s1,8(sp)
|
2099 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2100 |
|
|
100012c8: 000804b7 lui s1,0x80
|
2101 |
|
|
void uart_gnss_irq_tx_disable(struct device *dev) {
|
2102 |
|
|
100012cc: e822 sd s0,16(sp)
|
2103 |
|
|
100012ce: ec06 sd ra,24(sp)
|
2104 |
|
|
100012d0: 1000 addi s0,sp,32
|
2105 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2106 |
|
|
100012d2: 0485 addi s1,s1,1
|
2107 |
|
|
100012d4: 00c49513 slli a0,s1,0xc
|
2108 |
|
|
100012d8: 6cd010ef jal ra,100031a4
|
2109 |
|
|
}
|
2110 |
|
|
100012dc: 6442 ld s0,16(sp)
|
2111 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2112 |
|
|
100012de: 0005059b sext.w a1,a0
|
2113 |
|
|
}
|
2114 |
|
|
100012e2: 60e2 ld ra,24(sp)
|
2115 |
|
|
WRITE32(&__UART1->status, status);
|
2116 |
|
|
100012e4: 77f1 lui a5,0xffffc
|
2117 |
|
|
100012e6: 00c49513 slli a0,s1,0xc
|
2118 |
|
|
}
|
2119 |
|
|
100012ea: 64a2 ld s1,8(sp)
|
2120 |
|
|
WRITE32(&__UART1->status, status);
|
2121 |
|
|
100012ec: 17fd addi a5,a5,-1
|
2122 |
|
|
100012ee: 8dfd and a1,a1,a5
|
2123 |
|
|
}
|
2124 |
|
|
100012f0: 6105 addi sp,sp,32
|
2125 |
|
|
WRITE32(&__UART1->status, status);
|
2126 |
|
|
100012f2: 6cf0106f j 100031c0
|
2127 |
|
|
|
2128 |
|
|
00000000100012f6 :
|
2129 |
|
|
void uart_gnss_irq_rx_enable(struct device *dev) {
|
2130 |
|
|
100012f6: 1101 addi sp,sp,-32
|
2131 |
|
|
100012f8: e426 sd s1,8(sp)
|
2132 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2133 |
|
|
100012fa: 000804b7 lui s1,0x80
|
2134 |
|
|
void uart_gnss_irq_rx_enable(struct device *dev) {
|
2135 |
|
|
100012fe: e822 sd s0,16(sp)
|
2136 |
|
|
10001300: ec06 sd ra,24(sp)
|
2137 |
|
|
10001302: 1000 addi s0,sp,32
|
2138 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2139 |
|
|
10001304: 0485 addi s1,s1,1
|
2140 |
|
|
10001306: 00c49513 slli a0,s1,0xc
|
2141 |
|
|
1000130a: 69b010ef jal ra,100031a4
|
2142 |
|
|
}
|
2143 |
|
|
1000130e: 6442 ld s0,16(sp)
|
2144 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2145 |
|
|
10001310: 0005059b sext.w a1,a0
|
2146 |
|
|
}
|
2147 |
|
|
10001314: 60e2 ld ra,24(sp)
|
2148 |
|
|
WRITE32(&__UART1->status, status);
|
2149 |
|
|
10001316: 00c49513 slli a0,s1,0xc
|
2150 |
|
|
}
|
2151 |
|
|
1000131a: 64a2 ld s1,8(sp)
|
2152 |
|
|
WRITE32(&__UART1->status, status);
|
2153 |
|
|
1000131c: 6789 lui a5,0x2
|
2154 |
|
|
1000131e: 8ddd or a1,a1,a5
|
2155 |
|
|
}
|
2156 |
|
|
10001320: 6105 addi sp,sp,32
|
2157 |
|
|
WRITE32(&__UART1->status, status);
|
2158 |
|
|
10001322: 69f0106f j 100031c0
|
2159 |
|
|
|
2160 |
|
|
0000000010001326 :
|
2161 |
|
|
void uart_gnss_irq_rx_disable(struct device *dev) {
|
2162 |
|
|
10001326: 1101 addi sp,sp,-32
|
2163 |
|
|
10001328: e426 sd s1,8(sp)
|
2164 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2165 |
|
|
1000132a: 000804b7 lui s1,0x80
|
2166 |
|
|
void uart_gnss_irq_rx_disable(struct device *dev) {
|
2167 |
|
|
1000132e: e822 sd s0,16(sp)
|
2168 |
|
|
10001330: ec06 sd ra,24(sp)
|
2169 |
|
|
10001332: 1000 addi s0,sp,32
|
2170 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2171 |
|
|
10001334: 0485 addi s1,s1,1
|
2172 |
|
|
10001336: 00c49513 slli a0,s1,0xc
|
2173 |
|
|
1000133a: 66b010ef jal ra,100031a4
|
2174 |
|
|
}
|
2175 |
|
|
1000133e: 6442 ld s0,16(sp)
|
2176 |
|
|
uint32_t status = READ32(&__UART1->status);
|
2177 |
|
|
10001340: 0005059b sext.w a1,a0
|
2178 |
|
|
}
|
2179 |
|
|
10001344: 60e2 ld ra,24(sp)
|
2180 |
|
|
WRITE32(&__UART1->status, status);
|
2181 |
|
|
10001346: 77f9 lui a5,0xffffe
|
2182 |
|
|
10001348: 00c49513 slli a0,s1,0xc
|
2183 |
|
|
}
|
2184 |
|
|
1000134c: 64a2 ld s1,8(sp)
|
2185 |
|
|
WRITE32(&__UART1->status, status);
|
2186 |
|
|
1000134e: 17fd addi a5,a5,-1
|
2187 |
|
|
10001350: 8dfd and a1,a1,a5
|
2188 |
|
|
}
|
2189 |
|
|
10001352: 6105 addi sp,sp,32
|
2190 |
|
|
WRITE32(&__UART1->status, status);
|
2191 |
|
|
10001354: 66d0106f j 100031c0
|
2192 |
|
|
|
2193 |
|
|
0000000010001358 :
|
2194 |
|
|
* @param dev UART device struct
|
2195 |
|
|
*
|
2196 |
|
|
* @return DEV_OK
|
2197 |
|
|
*/
|
2198 |
|
|
static int uart_gnss_init(struct device *dev)
|
2199 |
|
|
{
|
2200 |
|
|
10001358: 1101 addi sp,sp,-32
|
2201 |
|
|
1000135a: e822 sd s0,16(sp)
|
2202 |
|
|
1000135c: e426 sd s1,8(sp)
|
2203 |
|
|
1000135e: ec06 sd ra,24(sp)
|
2204 |
|
|
10001360: 1000 addi s0,sp,32
|
2205 |
|
|
dev->driver_api = &uart_gnss_driver_api;
|
2206 |
|
|
10001362: 100057b7 lui a5,0x10005
|
2207 |
|
|
10001366: 0d078793 addi a5,a5,208 # 100050d0
|
2208 |
|
|
1000136a: e51c sd a5,8(a0)
|
2209 |
|
|
dev->driver_data = &uart_gnss_dev_data_0;
|
2210 |
|
|
1000136c: 100057b7 lui a5,0x10005
|
2211 |
|
|
10001370: 0c078793 addi a5,a5,192 # 100050c0
|
2212 |
|
|
10001374: e91c sd a5,16(a0)
|
2213 |
|
|
{
|
2214 |
|
|
10001376: 84aa mv s1,a0
|
2215 |
|
|
|
2216 |
|
|
// Speed-up RTL simulation avoidig long polling of the status register.
|
2217 |
|
|
if (soc_is_rtl_simulation() != 0) {
|
2218 |
|
|
10001378: 3ac010ef jal ra,10002724
|
2219 |
|
|
1000137c: 0005079b sext.w a5,a0
|
2220 |
|
|
10001380: 20000537 lui a0,0x20000
|
2221 |
|
|
10001384: 40150513 addi a0,a0,1025 # 20000401 <_time_slice_prio_ceiling+0xfff669d>
|
2222 |
|
|
WRITE32(&__UART1->scaler, 20);
|
2223 |
|
|
10001388: 45d1 li a1,20
|
2224 |
|
|
if (soc_is_rtl_simulation() != 0) {
|
2225 |
|
|
1000138a: e399 bnez a5,10001390
|
2226 |
|
|
} else {
|
2227 |
|
|
WRITE32(&__UART1->scaler, CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC/115200/2);
|
2228 |
|
|
1000138c: 0ad00593 li a1,173
|
2229 |
|
|
10001390: 050a slli a0,a0,0x2
|
2230 |
|
|
10001392: 62f010ef jal ra,100031c0
|
2231 |
|
|
}
|
2232 |
|
|
|
2233 |
|
|
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
2234 |
|
|
uart_gnss_irq_rx_enable(dev);
|
2235 |
|
|
10001396: 8526 mv a0,s1
|
2236 |
|
|
10001398: f5fff0ef jal ra,100012f6
|
2237 |
|
|
IRQ_CONNECT(CFG_IRQ_UART1, CFG_IRQ_UART1, uart_gnss_isr, dev, UART_IRQ_FLAGS);
|
2238 |
|
|
1000139c: 10001637 lui a2,0x10001
|
2239 |
|
|
100013a0: 86a6 mv a3,s1
|
2240 |
|
|
100013a2: 4701 li a4,0
|
2241 |
|
|
100013a4: 12a60613 addi a2,a2,298 # 1000112a
|
2242 |
|
|
100013a8: 4585 li a1,1
|
2243 |
|
|
100013aa: 4505 li a0,1
|
2244 |
|
|
100013ac: 53d010ef jal ra,100030e8 <_arch_irq_connect_dynamic>
|
2245 |
|
|
irq_enable(CFG_IRQ_UART1);
|
2246 |
|
|
100013b0: 4505 li a0,1
|
2247 |
|
|
100013b2: 4af010ef jal ra,10003060 <_arch_irq_enable>
|
2248 |
|
|
#endif
|
2249 |
|
|
return 0;
|
2250 |
|
|
}
|
2251 |
|
|
100013b6: 60e2 ld ra,24(sp)
|
2252 |
|
|
100013b8: 6442 ld s0,16(sp)
|
2253 |
|
|
100013ba: 64a2 ld s1,8(sp)
|
2254 |
|
|
100013bc: 4501 li a0,0
|
2255 |
|
|
100013be: 6105 addi sp,sp,32
|
2256 |
|
|
100013c0: 8082 ret
|
2257 |
|
|
|
2258 |
|
|
00000000100013c2 <_timer_int_handler>:
|
2259 |
|
|
100013c2: 1141 addi sp,sp,-16
|
2260 |
|
|
100013c4: 40001537 lui a0,0x40001
|
2261 |
|
|
100013c8: e406 sd ra,8(sp)
|
2262 |
|
|
100013ca: e022 sd s0,0(sp)
|
2263 |
|
|
100013cc: 0506 slli a0,a0,0x1
|
2264 |
|
|
100013ce: 0800 addi s0,sp,16
|
2265 |
|
|
100013d0: 45a1 li a1,8
|
2266 |
|
|
100013d2: 0521 addi a0,a0,8
|
2267 |
|
|
100013d4: 5ed010ef jal ra,100031c0
|
2268 |
|
|
100013d8: 10001537 lui a0,0x10001
|
2269 |
|
|
100013dc: a0150513 addi a0,a0,-1535 # 10000a01
|
2270 |
|
|
100013e0: 050e slli a0,a0,0x3
|
2271 |
|
|
100013e2: 4581 li a1,0
|
2272 |
|
|
100013e4: 5dd010ef jal ra,100031c0
|
2273 |
|
|
100013e8: 1000a7b7 lui a5,0x1000a
|
2274 |
|
|
100013ec: d5878793 addi a5,a5,-680 # 10009d58
|
2275 |
|
|
100013f0: 100096b7 lui a3,0x10009
|
2276 |
|
|
100013f4: 4398 lw a4,0(a5)
|
2277 |
|
|
100013f6: 9006a683 lw a3,-1792(a3) # 10008900 <__bss_end>
|
2278 |
|
|
100013fa: 6402 ld s0,0(sp)
|
2279 |
|
|
100013fc: 60a2 ld ra,8(sp)
|
2280 |
|
|
100013fe: 9f35 addw a4,a4,a3
|
2281 |
|
|
10001400: c398 sw a4,0(a5)
|
2282 |
|
|
10001402: 100057b7 lui a5,0x10005
|
2283 |
|
|
10001406: 2787a503 lw a0,632(a5) # 10005278 <_sys_idle_elapsed_ticks>
|
2284 |
|
|
1000140a: 0141 addi sp,sp,16
|
2285 |
|
|
1000140c: 6700206f j 10003a7c <_nano_sys_clock_tick_announce>
|
2286 |
|
|
|
2287 |
|
|
0000000010001410 :
|
2288 |
|
|
* If this routine is ever enhanced to return all 64 bits of the counter
|
2289 |
|
|
* it will need to call _hpetMainCounterAtomic().
|
2290 |
|
|
*/
|
2291 |
|
|
|
2292 |
|
|
uint32_t k_cycle_get_32(void)
|
2293 |
|
|
{
|
2294 |
|
|
10001410: 1141 addi sp,sp,-16
|
2295 |
|
|
//return (uint32_t)READ64(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].cur_value);
|
2296 |
|
|
return (uint32_t)READ64(&__TIMERS->highcnt);
|
2297 |
|
|
10001412: 00080537 lui a0,0x80
|
2298 |
|
|
{
|
2299 |
|
|
10001416: e022 sd s0,0(sp)
|
2300 |
|
|
10001418: e406 sd ra,8(sp)
|
2301 |
|
|
1000141a: 0800 addi s0,sp,16
|
2302 |
|
|
return (uint32_t)READ64(&__TIMERS->highcnt);
|
2303 |
|
|
1000141c: 0515 addi a0,a0,5
|
2304 |
|
|
1000141e: 0532 slli a0,a0,0xc
|
2305 |
|
|
10001420: 593010ef jal ra,100031b2
|
2306 |
|
|
}
|
2307 |
|
|
10001424: 60a2 ld ra,8(sp)
|
2308 |
|
|
10001426: 6402 ld s0,0(sp)
|
2309 |
|
|
10001428: 2501 sext.w a0,a0
|
2310 |
|
|
1000142a: 0141 addi sp,sp,16
|
2311 |
|
|
1000142c: 8082 ret
|
2312 |
|
|
|
2313 |
|
|
000000001000142e :
|
2314 |
|
|
|
2315 |
|
|
uint64_t k_cycle_get_64(void)
|
2316 |
|
|
{
|
2317 |
|
|
1000142e: 1141 addi sp,sp,-16
|
2318 |
|
|
10001430: e422 sd s0,8(sp)
|
2319 |
|
|
10001432: 0800 addi s0,sp,16
|
2320 |
|
|
return READ64(&__TIMERS->highcnt);
|
2321 |
|
|
}
|
2322 |
|
|
10001434: 6422 ld s0,8(sp)
|
2323 |
|
|
return READ64(&__TIMERS->highcnt);
|
2324 |
|
|
10001436: 00080537 lui a0,0x80
|
2325 |
|
|
1000143a: 0515 addi a0,a0,5
|
2326 |
|
|
1000143c: 0532 slli a0,a0,0xc
|
2327 |
|
|
}
|
2328 |
|
|
1000143e: 0141 addi sp,sp,16
|
2329 |
|
|
return READ64(&__TIMERS->highcnt);
|
2330 |
|
|
10001440: 5730106f j 100031b2
|
2331 |
|
|
|
2332 |
|
|
0000000010001444 <_sys_clock_driver_init>:
|
2333 |
|
|
*
|
2334 |
|
|
* @return N/A
|
2335 |
|
|
*/
|
2336 |
|
|
static void tickless_idle_init(void) {}
|
2337 |
|
|
|
2338 |
|
|
int _sys_clock_driver_init(struct device *device) {
|
2339 |
|
|
10001444: 1101 addi sp,sp,-32
|
2340 |
|
|
10001446: e426 sd s1,8(sp)
|
2341 |
|
|
ARG_UNUSED(device);
|
2342 |
|
|
|
2343 |
|
|
/* ensure that the timer will not generate interrupts */
|
2344 |
|
|
WRITE32(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].control, 0);
|
2345 |
|
|
10001448: 020004b7 lui s1,0x2000
|
2346 |
|
|
int _sys_clock_driver_init(struct device *device) {
|
2347 |
|
|
1000144c: ec06 sd ra,24(sp)
|
2348 |
|
|
1000144e: e822 sd s0,16(sp)
|
2349 |
|
|
10001450: e04a sd s2,0(sp)
|
2350 |
|
|
10001452: 1000 addi s0,sp,32
|
2351 |
|
|
WRITE32(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].control, 0);
|
2352 |
|
|
10001454: 14148493 addi s1,s1,321 # 2000141 <__bss_num_words+0x1fff3a1>
|
2353 |
|
|
10001458: 00649513 slli a0,s1,0x6
|
2354 |
|
|
1000145c: 4581 li a1,0
|
2355 |
|
|
1000145e: 563010ef jal ra,100031c0
|
2356 |
|
|
|
2357 |
|
|
sys_clock_hw_cycles_per_tick = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC /
|
2358 |
|
|
10001462: 000317b7 lui a5,0x31
|
2359 |
|
|
sys_clock_ticks_per_sec;
|
2360 |
|
|
cycles_per_tick = sys_clock_hw_cycles_per_tick;
|
2361 |
|
|
10001466: 10009937 lui s2,0x10009
|
2362 |
|
|
sys_clock_hw_cycles_per_tick = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC /
|
2363 |
|
|
1000146a: d407879b addiw a5,a5,-704
|
2364 |
|
|
cycles_per_tick = sys_clock_hw_cycles_per_tick;
|
2365 |
|
|
1000146e: 90090913 addi s2,s2,-1792 # 10008900 <__bss_end>
|
2366 |
|
|
sys_clock_hw_cycles_per_tick = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC /
|
2367 |
|
|
10001472: 10005737 lui a4,0x10005
|
2368 |
|
|
accumulated_cycle_count = 0;
|
2369 |
|
|
|
2370 |
|
|
IRQ_CONNECT(CFG_IRQ_SYS_TIMER, 0, _timer_int_handler, 0, 0);
|
2371 |
|
|
10001476: 10001637 lui a2,0x10001
|
2372 |
|
|
1000147a: 4681 li a3,0
|
2373 |
|
|
1000147c: 3c260613 addi a2,a2,962 # 100013c2 <_timer_int_handler>
|
2374 |
|
|
sys_clock_hw_cycles_per_tick = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC /
|
2375 |
|
|
10001480: 26f72e23 sw a5,636(a4) # 1000527c
|
2376 |
|
|
cycles_per_tick = sys_clock_hw_cycles_per_tick;
|
2377 |
|
|
10001484: 00f92023 sw a5,0(s2)
|
2378 |
|
|
IRQ_CONNECT(CFG_IRQ_SYS_TIMER, 0, _timer_int_handler, 0, 0);
|
2379 |
|
|
10001488: 4701 li a4,0
|
2380 |
|
|
accumulated_cycle_count = 0;
|
2381 |
|
|
1000148a: 1000a7b7 lui a5,0x1000a
|
2382 |
|
|
IRQ_CONNECT(CFG_IRQ_SYS_TIMER, 0, _timer_int_handler, 0, 0);
|
2383 |
|
|
1000148e: 4581 li a1,0
|
2384 |
|
|
10001490: 450d li a0,3
|
2385 |
|
|
accumulated_cycle_count = 0;
|
2386 |
|
|
10001492: d407ac23 sw zero,-680(a5) # 10009d58
|
2387 |
|
|
IRQ_CONNECT(CFG_IRQ_SYS_TIMER, 0, _timer_int_handler, 0, 0);
|
2388 |
|
|
10001496: 453010ef jal ra,100030e8 <_arch_irq_connect_dynamic>
|
2389 |
|
|
* counter and interrupt generation.
|
2390 |
|
|
*/
|
2391 |
|
|
|
2392 |
|
|
tickless_idle_init();
|
2393 |
|
|
|
2394 |
|
|
WRITE64(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].init_value, cycles_per_tick - 1);
|
2395 |
|
|
1000149a: 00092583 lw a1,0(s2)
|
2396 |
|
|
1000149e: 08000537 lui a0,0x8000
|
2397 |
|
|
100014a2: 50550513 addi a0,a0,1285 # 8000505 <__bss_num_words+0x7fff765>
|
2398 |
|
|
100014a6: 35fd addiw a1,a1,-1
|
2399 |
|
|
100014a8: 1582 slli a1,a1,0x20
|
2400 |
|
|
100014aa: 9181 srli a1,a1,0x20
|
2401 |
|
|
100014ac: 0512 slli a0,a0,0x4
|
2402 |
|
|
100014ae: 521010ef jal ra,100031ce
|
2403 |
|
|
WRITE32(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].control,
|
2404 |
|
|
100014b2: 00649513 slli a0,s1,0x6
|
2405 |
|
|
100014b6: 458d li a1,3
|
2406 |
|
|
100014b8: 509010ef jal ra,100031c0
|
2407 |
|
|
GPTIMER_CONTROL_COUNT_ENA | GPTIMER_CONTROL_IRQ_ENA);
|
2408 |
|
|
|
2409 |
|
|
/* everything has been configured: safe to enable the interrupt */
|
2410 |
|
|
|
2411 |
|
|
irq_enable(CFG_IRQ_SYS_TIMER);
|
2412 |
|
|
100014bc: 450d li a0,3
|
2413 |
|
|
100014be: 3a3010ef jal ra,10003060 <_arch_irq_enable>
|
2414 |
|
|
|
2415 |
|
|
return 0;
|
2416 |
|
|
}
|
2417 |
|
|
100014c2: 60e2 ld ra,24(sp)
|
2418 |
|
|
100014c4: 6442 ld s0,16(sp)
|
2419 |
|
|
100014c6: 64a2 ld s1,8(sp)
|
2420 |
|
|
100014c8: 6902 ld s2,0(sp)
|
2421 |
|
|
100014ca: 4501 li a0,0
|
2422 |
|
|
100014cc: 6105 addi sp,sp,32
|
2423 |
|
|
100014ce: 8082 ret
|
2424 |
|
|
|
2425 |
|
|
00000000100014d0 :
|
2426 |
|
|
* file "kernel_version.h".
|
2427 |
|
|
*
|
2428 |
|
|
* @return kernel version
|
2429 |
|
|
*/
|
2430 |
|
|
uint32_t sys_kernel_version_get(void)
|
2431 |
|
|
{
|
2432 |
|
|
100014d0: 1141 addi sp,sp,-16
|
2433 |
|
|
100014d2: e422 sd s0,8(sp)
|
2434 |
|
|
100014d4: 0800 addi s0,sp,16
|
2435 |
|
|
return kernel_version;
|
2436 |
|
|
}
|
2437 |
|
|
100014d6: 6422 ld s0,8(sp)
|
2438 |
|
|
100014d8: 01060537 lui a0,0x1060
|
2439 |
|
|
100014dc: 0141 addi sp,sp,16
|
2440 |
|
|
100014de: 8082 ret
|
2441 |
|
|
|
2442 |
|
|
00000000100014e0 :
|
2443 |
|
|
|
2444 |
|
|
return r;
|
2445 |
|
|
}
|
2446 |
|
|
|
2447 |
|
|
int printf(const char *_Restrict format, ...)
|
2448 |
|
|
{
|
2449 |
|
|
100014e0: 711d addi sp,sp,-96
|
2450 |
|
|
100014e2: e822 sd s0,16(sp)
|
2451 |
|
|
100014e4: ec06 sd ra,24(sp)
|
2452 |
|
|
100014e6: 1000 addi s0,sp,32
|
2453 |
|
|
100014e8: e810 sd a2,16(s0)
|
2454 |
|
|
va_list vargs;
|
2455 |
|
|
int r;
|
2456 |
|
|
|
2457 |
|
|
va_start(vargs, format);
|
2458 |
|
|
r = _prf(fputc, DESC(stdout), format, vargs);
|
2459 |
|
|
100014ea: 862a mv a2,a0
|
2460 |
|
|
100014ec: 10002537 lui a0,0x10002
|
2461 |
|
|
{
|
2462 |
|
|
100014f0: e40c sd a1,8(s0)
|
2463 |
|
|
100014f2: ec14 sd a3,24(s0)
|
2464 |
|
|
r = _prf(fputc, DESC(stdout), format, vargs);
|
2465 |
|
|
100014f4: 4589 li a1,2
|
2466 |
|
|
va_start(vargs, format);
|
2467 |
|
|
100014f6: 00840693 addi a3,s0,8
|
2468 |
|
|
r = _prf(fputc, DESC(stdout), format, vargs);
|
2469 |
|
|
100014fa: f4850513 addi a0,a0,-184 # 10001f48
|
2470 |
|
|
{
|
2471 |
|
|
100014fe: f018 sd a4,32(s0)
|
2472 |
|
|
10001500: f41c sd a5,40(s0)
|
2473 |
|
|
10001502: 03043823 sd a6,48(s0)
|
2474 |
|
|
10001506: 03143c23 sd a7,56(s0)
|
2475 |
|
|
va_start(vargs, format);
|
2476 |
|
|
1000150a: fed43423 sd a3,-24(s0)
|
2477 |
|
|
r = _prf(fputc, DESC(stdout), format, vargs);
|
2478 |
|
|
1000150e: 0f2000ef jal ra,10001600 <_prf>
|
2479 |
|
|
va_end(vargs);
|
2480 |
|
|
|
2481 |
|
|
return r;
|
2482 |
|
|
}
|
2483 |
|
|
10001512: 60e2 ld ra,24(sp)
|
2484 |
|
|
10001514: 6442 ld s0,16(sp)
|
2485 |
|
|
10001516: 6125 addi sp,sp,96
|
2486 |
|
|
10001518: 8082 ret
|
2487 |
|
|
|
2488 |
|
|
000000001000151a <_to_x>:
|
2489 |
|
|
/* Writes the specified number into the buffer in the given base,
|
2490 |
|
|
* using the digit characters 0-9a-z (i.e. base>36 will start writing
|
2491 |
|
|
* odd bytes), padding with leading zeros up to the minimum length.
|
2492 |
|
|
*/
|
2493 |
|
|
static int _to_x(char *buf, uint32_t n, int base, int minlen)
|
2494 |
|
|
{
|
2495 |
|
|
1000151a: 1141 addi sp,sp,-16
|
2496 |
|
|
1000151c: e422 sd s0,8(sp)
|
2497 |
|
|
1000151e: 0800 addi s0,sp,16
|
2498 |
|
|
10001520: 872a mv a4,a0
|
2499 |
|
|
10001522: 87aa mv a5,a0
|
2500 |
|
|
|
2501 |
|
|
do {
|
2502 |
|
|
int d = n % base;
|
2503 |
|
|
|
2504 |
|
|
n /= base;
|
2505 |
|
|
*buf++ = '0' + d + (d > 9 ? ('a' - '0' - 10) : 0);
|
2506 |
|
|
10001524: 4325 li t1,9
|
2507 |
|
|
int d = n % base;
|
2508 |
|
|
10001526: 02c5f8bb remuw a7,a1,a2
|
2509 |
|
|
*buf++ = '0' + d + (d > 9 ? ('a' - '0' - 10) : 0);
|
2510 |
|
|
1000152a: 02700813 li a6,39
|
2511 |
|
|
n /= base;
|
2512 |
|
|
1000152e: 02c5d5bb divuw a1,a1,a2
|
2513 |
|
|
*buf++ = '0' + d + (d > 9 ? ('a' - '0' - 10) : 0);
|
2514 |
|
|
10001532: 0ff8f513 andi a0,a7,255
|
2515 |
|
|
10001536: 01136363 bltu t1,a7,1000153c <_to_x+0x22>
|
2516 |
|
|
1000153a: 4801 li a6,0
|
2517 |
|
|
1000153c: 0305051b addiw a0,a0,48
|
2518 |
|
|
10001540: 0785 addi a5,a5,1
|
2519 |
|
|
10001542: 0105053b addw a0,a0,a6
|
2520 |
|
|
10001546: fea78fa3 sb a0,-1(a5)
|
2521 |
|
|
} while (n);
|
2522 |
|
|
1000154a: fdf1 bnez a1,10001526 <_to_x+0xc>
|
2523 |
|
|
*end++ = '0';
|
2524 |
|
|
1000154c: 03000613 li a2,48
|
2525 |
|
|
10001550: 40e78533 sub a0,a5,a4
|
2526 |
|
|
while (end - start < minlen) {
|
2527 |
|
|
10001554: 00d54b63 blt a0,a3,1000156a <_to_x+0x50>
|
2528 |
|
|
*end = 0;
|
2529 |
|
|
10001558: 00078023 sb zero,0(a5)
|
2530 |
|
|
len = end - start;
|
2531 |
|
|
1000155c: 2501 sext.w a0,a0
|
2532 |
|
|
for (end--; end > start; end--, start++) {
|
2533 |
|
|
1000155e: 17fd addi a5,a5,-1
|
2534 |
|
|
10001560: 00f76963 bltu a4,a5,10001572 <_to_x+0x58>
|
2535 |
|
|
return _reverse_and_pad(buf0, buf, minlen);
|
2536 |
|
|
}
|
2537 |
|
|
10001564: 6422 ld s0,8(sp)
|
2538 |
|
|
10001566: 0141 addi sp,sp,16
|
2539 |
|
|
10001568: 8082 ret
|
2540 |
|
|
*end++ = '0';
|
2541 |
|
|
1000156a: 0785 addi a5,a5,1
|
2542 |
|
|
1000156c: fec78fa3 sb a2,-1(a5)
|
2543 |
|
|
10001570: b7c5 j 10001550 <_to_x+0x36>
|
2544 |
|
|
*end = *start;
|
2545 |
|
|
10001572: 00074603 lbu a2,0(a4)
|
2546 |
|
|
char tmp = *end;
|
2547 |
|
|
10001576: 0007c683 lbu a3,0(a5)
|
2548 |
|
|
for (end--; end > start; end--, start++) {
|
2549 |
|
|
1000157a: 0705 addi a4,a4,1
|
2550 |
|
|
*end = *start;
|
2551 |
|
|
1000157c: 00c78023 sb a2,0(a5)
|
2552 |
|
|
*start = tmp;
|
2553 |
|
|
10001580: fed70fa3 sb a3,-1(a4)
|
2554 |
|
|
for (end--; end > start; end--, start++) {
|
2555 |
|
|
10001584: 17fd addi a5,a5,-1
|
2556 |
|
|
10001586: bfe9 j 10001560 <_to_x+0x46>
|
2557 |
|
|
|
2558 |
|
|
0000000010001588 <_ldiv5>:
|
2559 |
|
|
* six. This was tested exhaustively through the first ~10B values in
|
2560 |
|
|
* the input space, and for ~2e12 (4 hours runtime) random inputs
|
2561 |
|
|
* taken from the full 64 bit space.
|
2562 |
|
|
*/
|
2563 |
|
|
static void _ldiv5(uint64_t *v)
|
2564 |
|
|
{
|
2565 |
|
|
10001588: 1141 addi sp,sp,-16
|
2566 |
|
|
1000158a: e422 sd s0,8(sp)
|
2567 |
|
|
1000158c: 0800 addi s0,sp,16
|
2568 |
|
|
uint32_t i, hi;
|
2569 |
|
|
uint64_t rem = *v, quot = 0, q;
|
2570 |
|
|
1000158e: 611c ld a5,0(a0)
|
2571 |
|
|
*/
|
2572 |
|
|
rem += 2;
|
2573 |
|
|
|
2574 |
|
|
for (i = 0; i < 3; i++) {
|
2575 |
|
|
hi = rem >> shifts[i];
|
2576 |
|
|
q = (uint64_t)(hi / 5) << shifts[i];
|
2577 |
|
|
10001590: 4615 li a2,5
|
2578 |
|
|
rem -= q * 5;
|
2579 |
|
|
10001592: 4595 li a1,5
|
2580 |
|
|
rem += 2;
|
2581 |
|
|
10001594: 0789 addi a5,a5,2
|
2582 |
|
|
hi = rem >> shifts[i];
|
2583 |
|
|
10001596: 0207d693 srli a3,a5,0x20
|
2584 |
|
|
q = (uint64_t)(hi / 5) << shifts[i];
|
2585 |
|
|
1000159a: 02c6d6bb divuw a3,a3,a2
|
2586 |
|
|
quot += q;
|
2587 |
|
|
}
|
2588 |
|
|
|
2589 |
|
|
*v = quot;
|
2590 |
|
|
}
|
2591 |
|
|
1000159e: 6422 ld s0,8(sp)
|
2592 |
|
|
q = (uint64_t)(hi / 5) << shifts[i];
|
2593 |
|
|
100015a0: 1682 slli a3,a3,0x20
|
2594 |
|
|
rem -= q * 5;
|
2595 |
|
|
100015a2: 02b68733 mul a4,a3,a1
|
2596 |
|
|
100015a6: 8f99 sub a5,a5,a4
|
2597 |
|
|
hi = rem >> shifts[i];
|
2598 |
|
|
100015a8: 0037d713 srli a4,a5,0x3
|
2599 |
|
|
q = (uint64_t)(hi / 5) << shifts[i];
|
2600 |
|
|
100015ac: 02c7573b divuw a4,a4,a2
|
2601 |
|
|
100015b0: 1702 slli a4,a4,0x20
|
2602 |
|
|
100015b2: 8375 srli a4,a4,0x1d
|
2603 |
|
|
quot += q;
|
2604 |
|
|
100015b4: 96ba add a3,a3,a4
|
2605 |
|
|
rem -= q * 5;
|
2606 |
|
|
100015b6: 02b70733 mul a4,a4,a1
|
2607 |
|
|
100015ba: 8f99 sub a5,a5,a4
|
2608 |
|
|
q = (uint64_t)(hi / 5) << shifts[i];
|
2609 |
|
|
100015bc: 02c7d7bb divuw a5,a5,a2
|
2610 |
|
|
100015c0: 1782 slli a5,a5,0x20
|
2611 |
|
|
100015c2: 9381 srli a5,a5,0x20
|
2612 |
|
|
quot += q;
|
2613 |
|
|
100015c4: 97b6 add a5,a5,a3
|
2614 |
|
|
*v = quot;
|
2615 |
|
|
100015c6: e11c sd a5,0(a0)
|
2616 |
|
|
}
|
2617 |
|
|
100015c8: 0141 addi sp,sp,16
|
2618 |
|
|
100015ca: 8082 ret
|
2619 |
|
|
|
2620 |
|
|
00000000100015cc <_get_digit>:
|
2621 |
|
|
|
2622 |
|
|
static char _get_digit(uint64_t *fr, int *digit_count)
|
2623 |
|
|
{
|
2624 |
|
|
100015cc: 1141 addi sp,sp,-16
|
2625 |
|
|
100015ce: e422 sd s0,8(sp)
|
2626 |
|
|
100015d0: 0800 addi s0,sp,16
|
2627 |
|
|
int rval;
|
2628 |
|
|
|
2629 |
|
|
if (*digit_count > 0) {
|
2630 |
|
|
100015d2: 419c lw a5,0(a1)
|
2631 |
|
|
*digit_count -= 1;
|
2632 |
|
|
*fr = *fr * 10;
|
2633 |
|
|
rval = ((*fr >> 60) & 0xF) + '0';
|
2634 |
|
|
*fr &= 0x0FFFFFFFFFFFFFFFull;
|
2635 |
|
|
} else
|
2636 |
|
|
rval = '0';
|
2637 |
|
|
100015d4: 03000713 li a4,48
|
2638 |
|
|
if (*digit_count > 0) {
|
2639 |
|
|
100015d8: 02f05063 blez a5,100015f8 <_get_digit+0x2c>
|
2640 |
|
|
*fr = *fr * 10;
|
2641 |
|
|
100015dc: 6118 ld a4,0(a0)
|
2642 |
|
|
*digit_count -= 1;
|
2643 |
|
|
100015de: 37fd addiw a5,a5,-1
|
2644 |
|
|
100015e0: c19c sw a5,0(a1)
|
2645 |
|
|
*fr = *fr * 10;
|
2646 |
|
|
100015e2: 47a9 li a5,10
|
2647 |
|
|
100015e4: 02e787b3 mul a5,a5,a4
|
2648 |
|
|
*fr &= 0x0FFFFFFFFFFFFFFFull;
|
2649 |
|
|
100015e8: 56fd li a3,-1
|
2650 |
|
|
100015ea: 8291 srli a3,a3,0x4
|
2651 |
|
|
rval = ((*fr >> 60) & 0xF) + '0';
|
2652 |
|
|
100015ec: 03c7d713 srli a4,a5,0x3c
|
2653 |
|
|
*fr &= 0x0FFFFFFFFFFFFFFFull;
|
2654 |
|
|
100015f0: 8ff5 and a5,a5,a3
|
2655 |
|
|
rval = ((*fr >> 60) & 0xF) + '0';
|
2656 |
|
|
100015f2: 03070713 addi a4,a4,48
|
2657 |
|
|
*fr &= 0x0FFFFFFFFFFFFFFFull;
|
2658 |
|
|
100015f6: e11c sd a5,0(a0)
|
2659 |
|
|
return (char) (rval);
|
2660 |
|
|
}
|
2661 |
|
|
100015f8: 6422 ld s0,8(sp)
|
2662 |
|
|
100015fa: 853a mv a0,a4
|
2663 |
|
|
100015fc: 0141 addi sp,sp,16
|
2664 |
|
|
100015fe: 8082 ret
|
2665 |
|
|
|
2666 |
|
|
0000000010001600 <_prf>:
|
2667 |
|
|
*sptr = p;
|
2668 |
|
|
return i;
|
2669 |
|
|
}
|
2670 |
|
|
|
2671 |
|
|
int _prf(int (*func)(), void *dest, char *format, va_list vargs)
|
2672 |
|
|
{
|
2673 |
|
|
10001600: 7161 addi sp,sp,-432
|
2674 |
|
|
10001602: f322 sd s0,416(sp)
|
2675 |
|
|
10001604: ef26 sd s1,408(sp)
|
2676 |
|
|
10001606: 1b00 addi s0,sp,432
|
2677 |
|
|
10001608: e352 sd s4,384(sp)
|
2678 |
|
|
1000160a: f2e2 sd s8,352(sp)
|
2679 |
|
|
1000160c: f706 sd ra,424(sp)
|
2680 |
|
|
1000160e: eb4a sd s2,400(sp)
|
2681 |
|
|
10001610: e74e sd s3,392(sp)
|
2682 |
|
|
10001612: fed6 sd s5,376(sp)
|
2683 |
|
|
10001614: fada sd s6,368(sp)
|
2684 |
|
|
10001616: f6de sd s7,360(sp)
|
2685 |
|
|
10001618: eee6 sd s9,344(sp)
|
2686 |
|
|
1000161a: eaea sd s10,336(sp)
|
2687 |
|
|
1000161c: e6ee sd s11,328(sp)
|
2688 |
|
|
while ((fract >> 32) >= (MAXFP1 / 5)) {
|
2689 |
|
|
1000161e: 333337b7 lui a5,0x33333
|
2690 |
|
|
10001622: 33278793 addi a5,a5,818 # 33333332 <_time_slice_prio_ceiling+0x233295ce>
|
2691 |
|
|
{
|
2692 |
|
|
10001626: e8a43423 sd a0,-376(s0)
|
2693 |
|
|
1000162a: e8b43023 sd a1,-384(s0)
|
2694 |
|
|
1000162e: 84b2 mv s1,a2
|
2695 |
|
|
10001630: 8c36 mv s8,a3
|
2696 |
|
|
int32_t *int32ptr_temp;
|
2697 |
|
|
int32_t int32_temp;
|
2698 |
|
|
uint32_t uint32_temp;
|
2699 |
|
|
uint64_t double_temp;
|
2700 |
|
|
|
2701 |
|
|
count = 0;
|
2702 |
|
|
10001632: 4a01 li s4,0
|
2703 |
|
|
while ((fract >> 32) >= (MAXFP1 / 5)) {
|
2704 |
|
|
10001634: e6f43c23 sd a5,-392(s0)
|
2705 |
|
|
|
2706 |
|
|
while ((c = *format++)) {
|
2707 |
|
|
10001638: 0004c503 lbu a0,0(s1)
|
2708 |
|
|
1000163c: 00148b93 addi s7,s1,1
|
2709 |
|
|
10001640: cd11 beqz a0,1000165c <_prf+0x5c>
|
2710 |
|
|
if (c != '%') {
|
2711 |
|
|
10001642: 02500793 li a5,37
|
2712 |
|
|
10001646: 16f50363 beq a0,a5,100017ac <_prf+0x1ac>
|
2713 |
|
|
if ((*func) (c, dest) == EOF) {
|
2714 |
|
|
1000164a: e8843783 ld a5,-376(s0)
|
2715 |
|
|
1000164e: e8043583 ld a1,-384(s0)
|
2716 |
|
|
10001652: 9782 jalr a5
|
2717 |
|
|
10001654: 57fd li a5,-1
|
2718 |
|
|
10001656: 02f51363 bne a0,a5,1000167c <_prf+0x7c>
|
2719 |
|
|
return EOF;
|
2720 |
|
|
1000165a: 5a7d li s4,-1
|
2721 |
|
|
}
|
2722 |
|
|
}
|
2723 |
|
|
}
|
2724 |
|
|
}
|
2725 |
|
|
return count;
|
2726 |
|
|
}
|
2727 |
|
|
1000165c: 70ba ld ra,424(sp)
|
2728 |
|
|
1000165e: 741a ld s0,416(sp)
|
2729 |
|
|
10001660: 8552 mv a0,s4
|
2730 |
|
|
10001662: 64fa ld s1,408(sp)
|
2731 |
|
|
10001664: 695a ld s2,400(sp)
|
2732 |
|
|
10001666: 69ba ld s3,392(sp)
|
2733 |
|
|
10001668: 6a1a ld s4,384(sp)
|
2734 |
|
|
1000166a: 7af6 ld s5,376(sp)
|
2735 |
|
|
1000166c: 7b56 ld s6,368(sp)
|
2736 |
|
|
1000166e: 7bb6 ld s7,360(sp)
|
2737 |
|
|
10001670: 7c16 ld s8,352(sp)
|
2738 |
|
|
10001672: 6cf6 ld s9,344(sp)
|
2739 |
|
|
10001674: 6d56 ld s10,336(sp)
|
2740 |
|
|
10001676: 6db6 ld s11,328(sp)
|
2741 |
|
|
10001678: 615d addi sp,sp,432
|
2742 |
|
|
1000167a: 8082 ret
|
2743 |
|
|
count++;
|
2744 |
|
|
1000167c: 2a05 addiw s4,s4,1
|
2745 |
|
|
1000167e: 89e2 mv s3,s8
|
2746 |
|
|
while ((c = *format++)) {
|
2747 |
|
|
10001680: 84de mv s1,s7
|
2748 |
|
|
if (c >= MAXFLD + 1)
|
2749 |
|
|
10001682: 8c4e mv s8,s3
|
2750 |
|
|
10001684: bf55 j 10001638 <_prf+0x38>
|
2751 |
|
|
switch (c) {
|
2752 |
|
|
10001686: 11390a63 beq s2,s3,1000179a <_prf+0x19a>
|
2753 |
|
|
1000168a: 0f29ec63 bltu s3,s2,10001782 <_prf+0x182>
|
2754 |
|
|
1000168e: fc0907e3 beqz s2,1000165c <_prf+0x5c>
|
2755 |
|
|
10001692: 11c90263 beq s2,t3,10001796 <_prf+0x196>
|
2756 |
|
|
fplus = true;
|
2757 |
|
|
10001696: 8ba6 mv s7,s1
|
2758 |
|
|
while (strchr("-+ #0", (c = *format++)) != NULL) {
|
2759 |
|
|
10001698: 001b8493 addi s1,s7,1
|
2760 |
|
|
1000169c: fff4c903 lbu s2,-1(s1)
|
2761 |
|
|
100016a0: 100047b7 lui a5,0x10004
|
2762 |
|
|
100016a4: 3a878513 addi a0,a5,936 # 100043a8 <__devconfig_end+0x340>
|
2763 |
|
|
100016a8: 00090a9b sext.w s5,s2
|
2764 |
|
|
100016ac: 85d6 mv a1,s5
|
2765 |
|
|
100016ae: e7c43023 sd t3,-416(s0)
|
2766 |
|
|
100016b2: e6643423 sd t1,-408(s0)
|
2767 |
|
|
100016b6: e6c43823 sd a2,-400(s0)
|
2768 |
|
|
100016ba: 109000ef jal ra,10001fc2
|
2769 |
|
|
100016be: e7043603 ld a2,-400(s0)
|
2770 |
|
|
100016c2: e6843303 ld t1,-408(s0)
|
2771 |
|
|
100016c6: e6043e03 ld t3,-416(s0)
|
2772 |
|
|
100016ca: fd55 bnez a0,10001686 <_prf+0x86>
|
2773 |
|
|
if (c == '*') {
|
2774 |
|
|
100016cc: 02a00713 li a4,42
|
2775 |
|
|
100016d0: 10ea9163 bne s5,a4,100017d2 <_prf+0x1d2>
|
2776 |
|
|
width = (int32_t) va_arg(vargs, int32_t);
|
2777 |
|
|
100016d4: 000c2903 lw s2,0(s8)
|
2778 |
|
|
100016d8: 008c0713 addi a4,s8,8
|
2779 |
|
|
if (width < 0) {
|
2780 |
|
|
100016dc: 00095763 bgez s2,100016ea <_prf+0xea>
|
2781 |
|
|
fminus = true;
|
2782 |
|
|
100016e0: 4785 li a5,1
|
2783 |
|
|
width = -width;
|
2784 |
|
|
100016e2: 4120093b negw s2,s2
|
2785 |
|
|
fminus = true;
|
2786 |
|
|
100016e6: e8f43823 sd a5,-368(s0)
|
2787 |
|
|
c = *format++;
|
2788 |
|
|
100016ea: 0004ca83 lbu s5,0(s1)
|
2789 |
|
|
width = (int32_t) va_arg(vargs, int32_t);
|
2790 |
|
|
100016ee: 8c3a mv s8,a4
|
2791 |
|
|
c = *format++;
|
2792 |
|
|
100016f0: 002b8493 addi s1,s7,2
|
2793 |
|
|
if ((unsigned) width > MAXFLD) {
|
2794 |
|
|
100016f4: 0009071b sext.w a4,s2
|
2795 |
|
|
100016f8: 0c800693 li a3,200
|
2796 |
|
|
100016fc: 00e6f463 bleu a4,a3,10001704 <_prf+0x104>
|
2797 |
|
|
width = MAXFLD;
|
2798 |
|
|
10001700: 0c800913 li s2,200
|
2799 |
|
|
if (c == '.') {
|
2800 |
|
|
10001704: 02e00693 li a3,46
|
2801 |
|
|
precision = -1; /* No precision specified */
|
2802 |
|
|
10001708: 5cfd li s9,-1
|
2803 |
|
|
if (c == '.') {
|
2804 |
|
|
1000170a: 02da9463 bne s5,a3,10001732 <_prf+0x132>
|
2805 |
|
|
if (c == '*') {
|
2806 |
|
|
1000170e: 0004c703 lbu a4,0(s1)
|
2807 |
|
|
10001712: 02a00793 li a5,42
|
2808 |
|
|
10001716: 10f71863 bne a4,a5,10001826 <_prf+0x226>
|
2809 |
|
|
precision = (int32_t)
|
2810 |
|
|
1000171a: 000c2c83 lw s9,0(s8)
|
2811 |
|
|
c = *format++;
|
2812 |
|
|
1000171e: 0485 addi s1,s1,1
|
2813 |
|
|
precision = (int32_t)
|
2814 |
|
|
10001720: 0c21 addi s8,s8,8
|
2815 |
|
|
if (precision > MAXFLD)
|
2816 |
|
|
10001722: 0c800793 li a5,200
|
2817 |
|
|
10001726: 0197d363 ble s9,a5,1000172c <_prf+0x12c>
|
2818 |
|
|
precision = -1;
|
2819 |
|
|
1000172a: 5cfd li s9,-1
|
2820 |
|
|
c = *format++;
|
2821 |
|
|
1000172c: 0004ca83 lbu s5,0(s1)
|
2822 |
|
|
10001730: 0485 addi s1,s1,1
|
2823 |
|
|
if (strchr("hlLz", c) != NULL) {
|
2824 |
|
|
10001732: 100047b7 lui a5,0x10004
|
2825 |
|
|
10001736: 85d6 mv a1,s5
|
2826 |
|
|
10001738: 3b078513 addi a0,a5,944 # 100043b0 <__devconfig_end+0x348>
|
2827 |
|
|
1000173c: 087000ef jal ra,10001fc2
|
2828 |
|
|
10001740: c501 beqz a0,10001748 <_prf+0x148>
|
2829 |
|
|
c = *format++;
|
2830 |
|
|
10001742: 0004ca83 lbu s5,0(s1)
|
2831 |
|
|
10001746: 0485 addi s1,s1,1
|
2832 |
|
|
switch (c) {
|
2833 |
|
|
10001748: 06700693 li a3,103
|
2834 |
|
|
1000174c: 1356cc63 blt a3,s5,10001884 <_prf+0x284>
|
2835 |
|
|
10001750: 06500693 li a3,101
|
2836 |
|
|
10001754: 20dade63 ble a3,s5,10001970 <_prf+0x370>
|
2837 |
|
|
10001758: 04700693 li a3,71
|
2838 |
|
|
1000175c: 20da8a63 beq s5,a3,10001970 <_prf+0x370>
|
2839 |
|
|
10001760: 0d56c763 blt a3,s5,1000182e <_prf+0x22e>
|
2840 |
|
|
10001764: 02500693 li a3,37
|
2841 |
|
|
10001768: 72da8763 beq s5,a3,10001e96 <_prf+0x896>
|
2842 |
|
|
1000176c: 04500693 li a3,69
|
2843 |
|
|
10001770: 20da8063 beq s5,a3,10001970 <_prf+0x370>
|
2844 |
|
|
10001774: ee0a84e3 beqz s5,1000165c <_prf+0x5c>
|
2845 |
|
|
if (c >= MAXFLD + 1)
|
2846 |
|
|
10001778: 0c800713 li a4,200
|
2847 |
|
|
1000177c: 73575863 ble s5,a4,10001eac <_prf+0x8ac>
|
2848 |
|
|
10001780: bde9 j 1000165a <_prf+0x5a>
|
2849 |
|
|
switch (c) {
|
2850 |
|
|
10001782: 03990163 beq s2,s9,100017a4 <_prf+0x1a4>
|
2851 |
|
|
10001786: 00c90c63 beq s2,a2,1000179e <_prf+0x19e>
|
2852 |
|
|
1000178a: f06916e3 bne s2,t1,10001696 <_prf+0x96>
|
2853 |
|
|
fplus = true;
|
2854 |
|
|
1000178e: 4785 li a5,1
|
2855 |
|
|
10001790: e8f43c23 sd a5,-360(s0)
|
2856 |
|
|
break;
|
2857 |
|
|
10001794: b709 j 10001696 <_prf+0x96>
|
2858 |
|
|
fspace = true;
|
2859 |
|
|
10001796: 4d05 li s10,1
|
2860 |
|
|
break;
|
2861 |
|
|
10001798: bdfd j 10001696 <_prf+0x96>
|
2862 |
|
|
falt = true;
|
2863 |
|
|
1000179a: 4d85 li s11,1
|
2864 |
|
|
break;
|
2865 |
|
|
1000179c: bded j 10001696 <_prf+0x96>
|
2866 |
|
|
pad = '0';
|
2867 |
|
|
1000179e: 03000b13 li s6,48
|
2868 |
|
|
break;
|
2869 |
|
|
100017a2: bdd5 j 10001696 <_prf+0x96>
|
2870 |
|
|
fminus = true;
|
2871 |
|
|
100017a4: 4785 li a5,1
|
2872 |
|
|
100017a6: e8f43823 sd a5,-368(s0)
|
2873 |
|
|
100017aa: b5f5 j 10001696 <_prf+0x96>
|
2874 |
|
|
pad = ' '; /* Default pad character */
|
2875 |
|
|
100017ac: 02000b13 li s6,32
|
2876 |
|
|
fminus = fplus = fspace = falt = false;
|
2877 |
|
|
100017b0: 4d01 li s10,0
|
2878 |
|
|
100017b2: e8043c23 sd zero,-360(s0)
|
2879 |
|
|
100017b6: e8043823 sd zero,-368(s0)
|
2880 |
|
|
100017ba: 4d81 li s11,0
|
2881 |
|
|
switch (c) {
|
2882 |
|
|
100017bc: 02300993 li s3,35
|
2883 |
|
|
100017c0: 02d00c93 li s9,45
|
2884 |
|
|
100017c4: 03000613 li a2,48
|
2885 |
|
|
100017c8: 02b00313 li t1,43
|
2886 |
|
|
100017cc: 02000e13 li t3,32
|
2887 |
|
|
100017d0: b5e1 j 10001698 <_prf+0x98>
|
2888 |
|
|
} else if (!isdigit(c))
|
2889 |
|
|
100017d2: fd09071b addiw a4,s2,-48
|
2890 |
|
|
100017d6: 4625 li a2,9
|
2891 |
|
|
width = 0;
|
2892 |
|
|
100017d8: 4901 li s2,0
|
2893 |
|
|
i = 10 * i + *p++ - '0';
|
2894 |
|
|
100017da: 45a9 li a1,10
|
2895 |
|
|
} else if (!isdigit(c))
|
2896 |
|
|
100017dc: f0e66ce3 bltu a2,a4,100016f4 <_prf+0xf4>
|
2897 |
|
|
while (isdigit(((int) *p)))
|
2898 |
|
|
100017e0: 000bc703 lbu a4,0(s7)
|
2899 |
|
|
100017e4: 001b8493 addi s1,s7,1
|
2900 |
|
|
100017e8: 00070a9b sext.w s5,a4
|
2901 |
|
|
100017ec: fd07071b addiw a4,a4,-48
|
2902 |
|
|
100017f0: f0e662e3 bltu a2,a4,100016f4 <_prf+0xf4>
|
2903 |
|
|
i = 10 * i + *p++ - '0';
|
2904 |
|
|
100017f4: 0325893b mulw s2,a1,s2
|
2905 |
|
|
100017f8: 8ba6 mv s7,s1
|
2906 |
|
|
100017fa: 0159093b addw s2,s2,s5
|
2907 |
|
|
100017fe: fd09091b addiw s2,s2,-48
|
2908 |
|
|
10001802: bff9 j 100017e0 <_prf+0x1e0>
|
2909 |
|
|
10001804: 0395073b mulw a4,a0,s9
|
2910 |
|
|
10001808: 84b2 mv s1,a2
|
2911 |
|
|
1000180a: 9f2d addw a4,a4,a1
|
2912 |
|
|
1000180c: fd070c9b addiw s9,a4,-48
|
2913 |
|
|
while (isdigit(((int) *p)))
|
2914 |
|
|
10001810: 0004c783 lbu a5,0(s1)
|
2915 |
|
|
10001814: 00148613 addi a2,s1,1
|
2916 |
|
|
10001818: 0007859b sext.w a1,a5
|
2917 |
|
|
1000181c: fd07879b addiw a5,a5,-48
|
2918 |
|
|
10001820: fef6f2e3 bleu a5,a3,10001804 <_prf+0x204>
|
2919 |
|
|
10001824: bdfd j 10001722 <_prf+0x122>
|
2920 |
|
|
i = 0;
|
2921 |
|
|
10001826: 4c81 li s9,0
|
2922 |
|
|
while (isdigit(((int) *p)))
|
2923 |
|
|
10001828: 46a5 li a3,9
|
2924 |
|
|
i = 10 * i + *p++ - '0';
|
2925 |
|
|
1000182a: 4529 li a0,10
|
2926 |
|
|
1000182c: b7d5 j 10001810 <_prf+0x210>
|
2927 |
|
|
switch (c) {
|
2928 |
|
|
1000182e: 06300693 li a3,99
|
2929 |
|
|
10001832: 10da8163 beq s5,a3,10001934 <_prf+0x334>
|
2930 |
|
|
10001836: 0756c763 blt a3,s5,100018a4 <_prf+0x2a4>
|
2931 |
|
|
1000183a: 05800693 li a3,88
|
2932 |
|
|
1000183e: f2da9de3 bne s5,a3,10001778 <_prf+0x178>
|
2933 |
|
|
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
|
2934 |
|
|
10001842: 008c0993 addi s3,s8,8
|
2935 |
|
|
10001846: 000c2583 lw a1,0(s8)
|
2936 |
|
|
1000184a: ec040c13 addi s8,s0,-320
|
2937 |
|
|
if (alt_form) {
|
2938 |
|
|
1000184e: 8be2 mv s7,s8
|
2939 |
|
|
10001850: 000d8963 beqz s11,10001862 <_prf+0x262>
|
2940 |
|
|
*buf++ = '0';
|
2941 |
|
|
10001854: 76e1 lui a3,0xffff8
|
2942 |
|
|
10001856: 8306c693 xori a3,a3,-2000
|
2943 |
|
|
1000185a: ecd41023 sh a3,-320(s0)
|
2944 |
|
|
*buf++ = 'x';
|
2945 |
|
|
1000185e: ec240b93 addi s7,s0,-318
|
2946 |
|
|
len = _to_x(buf, value, 16, precision);
|
2947 |
|
|
10001862: 86e6 mv a3,s9
|
2948 |
|
|
10001864: 4641 li a2,16
|
2949 |
|
|
10001866: 855e mv a0,s7
|
2950 |
|
|
10001868: cb3ff0ef jal ra,1000151a <_to_x>
|
2951 |
|
|
if (prefix == 'X') {
|
2952 |
|
|
1000186c: 05800693 li a3,88
|
2953 |
|
|
10001870: 62da8063 beq s5,a3,10001e90 <_prf+0x890>
|
2954 |
|
|
return len + (buf - buf0);
|
2955 |
|
|
10001874: 418b8bb3 sub s7,s7,s8
|
2956 |
|
|
prefix = 0;
|
2957 |
|
|
10001878: 01b03d33 snez s10,s11
|
2958 |
|
|
return len + (buf - buf0);
|
2959 |
|
|
1000187c: 00ab853b addw a0,s7,a0
|
2960 |
|
|
prefix = 0;
|
2961 |
|
|
10001880: 0d06 slli s10,s10,0x1
|
2962 |
|
|
10001882: a885 j 100018f2 <_prf+0x2f2>
|
2963 |
|
|
switch (c) {
|
2964 |
|
|
10001884: 07000693 li a3,112
|
2965 |
|
|
10001888: 58da8a63 beq s5,a3,10001e1c <_prf+0x81c>
|
2966 |
|
|
1000188c: 0756c563 blt a3,s5,100018f6 <_prf+0x2f6>
|
2967 |
|
|
10001890: 06e00693 li a3,110
|
2968 |
|
|
10001894: 50da8163 beq s5,a3,10001d96 <_prf+0x796>
|
2969 |
|
|
10001898: 5156c663 blt a3,s5,10001da4 <_prf+0x7a4>
|
2970 |
|
|
1000189c: 06900693 li a3,105
|
2971 |
|
|
100018a0: ecda9ce3 bne s5,a3,10001778 <_prf+0x178>
|
2972 |
|
|
int32_temp = (int32_t) va_arg(vargs, int32_t);
|
2973 |
|
|
100018a4: 000c2a83 lw s5,0(s8)
|
2974 |
|
|
100018a8: 008c0993 addi s3,s8,8
|
2975 |
|
|
100018ac: ec040b93 addi s7,s0,-320
|
2976 |
|
|
if (value < 0) {
|
2977 |
|
|
100018b0: 080add63 bgez s5,1000194a <_prf+0x34a>
|
2978 |
|
|
*buf++ = '-';
|
2979 |
|
|
100018b4: 02d00693 li a3,45
|
2980 |
|
|
100018b8: ecd40023 sb a3,-320(s0)
|
2981 |
|
|
if (value != 0x80000000)
|
2982 |
|
|
100018bc: 800007b7 lui a5,0x80000
|
2983 |
|
|
100018c0: 800005b7 lui a1,0x80000
|
2984 |
|
|
100018c4: 00fa8463 beq s5,a5,100018cc <_prf+0x2cc>
|
2985 |
|
|
value = -value;
|
2986 |
|
|
100018c8: 415005bb negw a1,s5
|
2987 |
|
|
*buf++ = ' ';
|
2988 |
|
|
100018cc: ec140c13 addi s8,s0,-319
|
2989 |
|
|
return _to_x(buf, value, 10, precision);
|
2990 |
|
|
100018d0: 86e6 mv a3,s9
|
2991 |
|
|
100018d2: 4629 li a2,10
|
2992 |
|
|
100018d4: 8562 mv a0,s8
|
2993 |
|
|
100018d6: c45ff0ef jal ra,1000151a <_to_x>
|
2994 |
|
|
if (fplus || fspace || (int32_temp < 0))
|
2995 |
|
|
100018da: e9843783 ld a5,-360(s0)
|
2996 |
|
|
return (buf + _to_udec(buf, (uint32_t) value, precision)) - start;
|
2997 |
|
|
100018de: 9562 add a0,a0,s8
|
2998 |
|
|
100018e0: 4175053b subw a0,a0,s7
|
2999 |
|
|
if (fplus || fspace || (int32_temp < 0))
|
3000 |
|
|
100018e4: e3d9 bnez a5,1000196a <_prf+0x36a>
|
3001 |
|
|
100018e6: 000d1663 bnez s10,100018f2 <_prf+0x2f2>
|
3002 |
|
|
100018ea: 01fad81b srliw a6,s5,0x1f
|
3003 |
|
|
prefix = 0;
|
3004 |
|
|
100018ee: 00080d1b sext.w s10,a6
|
3005 |
|
|
if (precision != -1)
|
3006 |
|
|
100018f2: 57fd li a5,-1
|
3007 |
|
|
100018f4: ab39 j 10001e12 <_prf+0x812>
|
3008 |
|
|
switch (c) {
|
3009 |
|
|
100018f6: 07500693 li a3,117
|
3010 |
|
|
100018fa: 56da8263 beq s5,a3,10001e5e <_prf+0x85e>
|
3011 |
|
|
100018fe: 07800693 li a3,120
|
3012 |
|
|
10001902: f4da80e3 beq s5,a3,10001842 <_prf+0x242>
|
3013 |
|
|
10001906: 07300693 li a3,115
|
3014 |
|
|
1000190a: e6da97e3 bne s5,a3,10001778 <_prf+0x178>
|
3015 |
|
|
cptr_temp = (char *) va_arg(vargs, char *);
|
3016 |
|
|
1000190e: 000c3583 ld a1,0(s8)
|
3017 |
|
|
10001912: 008c0993 addi s3,s8,8
|
3018 |
|
|
for (c = 0; c < MAXFLD; c++) {
|
3019 |
|
|
10001916: 4d81 li s11,0
|
3020 |
|
|
10001918: 87ae mv a5,a1
|
3021 |
|
|
1000191a: 0c800693 li a3,200
|
3022 |
|
|
if (cptr_temp[c] == '\0') {
|
3023 |
|
|
1000191e: 0007c603 lbu a2,0(a5) # ffffffff80000000 <_time_slice_prio_ceiling+0xffffffff6fff629c>
|
3024 |
|
|
10001922: 50060e63 beqz a2,10001e3e <_prf+0x83e>
|
3025 |
|
|
for (c = 0; c < MAXFLD; c++) {
|
3026 |
|
|
10001926: 2d85 addiw s11,s11,1
|
3027 |
|
|
10001928: 0785 addi a5,a5,1
|
3028 |
|
|
1000192a: fedd9ae3 bne s11,a3,1000191e <_prf+0x31e>
|
3029 |
|
|
if ((precision >= 0) && (precision < c))
|
3030 |
|
|
1000192e: 500cda63 bgez s9,10001e42 <_prf+0x842>
|
3031 |
|
|
10001932: a305 j 10001e52 <_prf+0x852>
|
3032 |
|
|
buf[0] = (char) ((int32_t) va_arg(vargs, int32_t));
|
3033 |
|
|
10001934: 000c2783 lw a5,0(s8)
|
3034 |
|
|
10001938: 008c0993 addi s3,s8,8
|
3035 |
|
|
buf[1] = '\0';
|
3036 |
|
|
1000193c: ec0400a3 sb zero,-319(s0)
|
3037 |
|
|
buf[0] = (char) ((int32_t) va_arg(vargs, int32_t));
|
3038 |
|
|
10001940: ecf40023 sb a5,-320(s0)
|
3039 |
|
|
c = 1;
|
3040 |
|
|
10001944: 4d85 li s11,1
|
3041 |
|
|
prefix = 2;
|
3042 |
|
|
10001946: 4d01 li s10,0
|
3043 |
|
|
10001948: a159 j 10001dce <_prf+0x7ce>
|
3044 |
|
|
} else if (fplus)
|
3045 |
|
|
1000194a: e9843783 ld a5,-360(s0)
|
3046 |
|
|
*buf++ = '+';
|
3047 |
|
|
1000194e: 02b00693 li a3,43
|
3048 |
|
|
} else if (fplus)
|
3049 |
|
|
10001952: e789 bnez a5,1000195c <_prf+0x35c>
|
3050 |
|
|
else if (fspace)
|
3051 |
|
|
10001954: 000d0863 beqz s10,10001964 <_prf+0x364>
|
3052 |
|
|
*buf++ = ' ';
|
3053 |
|
|
10001958: 02000693 li a3,32
|
3054 |
|
|
1000195c: ecd40023 sb a3,-320(s0)
|
3055 |
|
|
10001960: 85d6 mv a1,s5
|
3056 |
|
|
10001962: b7ad j 100018cc <_prf+0x2cc>
|
3057 |
|
|
else if (fspace)
|
3058 |
|
|
10001964: 85d6 mv a1,s5
|
3059 |
|
|
10001966: 8c5e mv s8,s7
|
3060 |
|
|
10001968: b7a5 j 100018d0 <_prf+0x2d0>
|
3061 |
|
|
prefix = 1;
|
3062 |
|
|
1000196a: e9843d03 ld s10,-360(s0)
|
3063 |
|
|
1000196e: b751 j 100018f2 <_prf+0x2f2>
|
3064 |
|
|
double_temp = u.i;
|
3065 |
|
|
10001970: 000c3603 ld a2,0(s8)
|
3066 |
|
|
fract = (double_temp << 11) & ~HIGHBIT64;
|
3067 |
|
|
10001974: 55fd li a1,-1
|
3068 |
|
|
10001976: 0015d513 srli a0,a1,0x1
|
3069 |
|
|
1000197a: 00b61693 slli a3,a2,0xb
|
3070 |
|
|
1000197e: 8ee9 and a3,a3,a0
|
3071 |
|
|
u.d = (double) va_arg(vargs, double);
|
3072 |
|
|
10001980: 008c0993 addi s3,s8,8
|
3073 |
|
|
exp = double_temp >> 52 & 0x7ff;
|
3074 |
|
|
10001984: 03465c13 srli s8,a2,0x34
|
3075 |
|
|
10001988: 7ffc7c13 andi s8,s8,2047
|
3076 |
|
|
fract = (double_temp << 11) & ~HIGHBIT64;
|
3077 |
|
|
1000198c: ead43823 sd a3,-336(s0)
|
3078 |
|
|
if (exp == 0x7ff) {
|
3079 |
|
|
10001990: 7ff00513 li a0,2047
|
3080 |
|
|
10001994: 06ac1c63 bne s8,a0,10001a0c <_prf+0x40c>
|
3081 |
|
|
if (!fract) {
|
3082 |
|
|
10001998: eeb1 bnez a3,100019f4 <_prf+0x3f4>
|
3083 |
|
|
*buf++ = sign ? '-' : '+';
|
3084 |
|
|
1000199a: 02b00793 li a5,43
|
3085 |
|
|
1000199e: 00065463 bgez a2,100019a6 <_prf+0x3a6>
|
3086 |
|
|
100019a2: 02d00793 li a5,45
|
3087 |
|
|
100019a6: ecf40023 sb a5,-320(s0)
|
3088 |
|
|
*buf++ = 'I';
|
3089 |
|
|
100019aa: 04900793 li a5,73
|
3090 |
|
|
100019ae: ecf400a3 sb a5,-319(s0)
|
3091 |
|
|
100019b2: 04e00793 li a5,78
|
3092 |
|
|
100019b6: ecf40123 sb a5,-318(s0)
|
3093 |
|
|
*buf++ = 'N';
|
3094 |
|
|
100019ba: 04600793 li a5,70
|
3095 |
|
|
100019be: ecf401a3 sb a5,-317(s0)
|
3096 |
|
|
*buf++ = 'F';
|
3097 |
|
|
100019c2: ec440513 addi a0,s0,-316
|
3098 |
|
|
return buf - start;
|
3099 |
|
|
100019c6: ec040793 addi a5,s0,-320
|
3100 |
|
|
*buf = 0;
|
3101 |
|
|
100019ca: 00050023 sb zero,0(a0)
|
3102 |
|
|
return buf - start;
|
3103 |
|
|
100019ce: 9d1d subw a0,a0,a5
|
3104 |
|
|
if (fplus || fspace || (buf[0] == '-'))
|
3105 |
|
|
100019d0: e9843783 ld a5,-360(s0)
|
3106 |
|
|
100019d4: 54079663 bnez a5,10001f20 <_prf+0x920>
|
3107 |
|
|
100019d8: 000d1863 bnez s10,100019e8 <_prf+0x3e8>
|
3108 |
|
|
100019dc: ec044803 lbu a6,-320(s0)
|
3109 |
|
|
100019e0: fd380813 addi a6,a6,-45
|
3110 |
|
|
prefix = 0;
|
3111 |
|
|
100019e4: 00183d13 seqz s10,a6
|
3112 |
|
|
if (c >= MAXFLD + 1)
|
3113 |
|
|
100019e8: 0c800793 li a5,200
|
3114 |
|
|
100019ec: c6a7c7e3 blt a5,a0,1000165a <_prf+0x5a>
|
3115 |
|
|
100019f0: 8daa mv s11,a0
|
3116 |
|
|
100019f2: aef1 j 10001dce <_prf+0x7ce>
|
3117 |
|
|
*buf++ = 'N';
|
3118 |
|
|
100019f4: 6799 lui a5,0x6
|
3119 |
|
|
100019f6: 14e7879b addiw a5,a5,334
|
3120 |
|
|
100019fa: ecf41023 sh a5,-320(s0)
|
3121 |
|
|
*buf++ = 'a';
|
3122 |
|
|
100019fe: 04e00793 li a5,78
|
3123 |
|
|
10001a02: ecf40123 sb a5,-318(s0)
|
3124 |
|
|
*buf++ = 'N';
|
3125 |
|
|
10001a06: ec340513 addi a0,s0,-317
|
3126 |
|
|
10001a0a: bf75 j 100019c6 <_prf+0x3c6>
|
3127 |
|
|
if ((exp | fract) != 0) {
|
3128 |
|
|
10001a0c: 00dc6533 or a0,s8,a3
|
3129 |
|
|
10001a10: c955 beqz a0,10001ac4 <_prf+0x4c4>
|
3130 |
|
|
fract |= HIGHBIT64;
|
3131 |
|
|
10001a12: 15fe slli a1,a1,0x3f
|
3132 |
|
|
10001a14: 8ecd or a3,a3,a1
|
3133 |
|
|
10001a16: ead43823 sd a3,-336(s0)
|
3134 |
|
|
exp -= (1023 - 1); /* +1 since .1 vs 1. */
|
3135 |
|
|
10001a1a: c02c0c1b addiw s8,s8,-1022
|
3136 |
|
|
*buf++ = '-';
|
3137 |
|
|
10001a1e: 02d00693 li a3,45
|
3138 |
|
|
if (decexp && sign) {
|
3139 |
|
|
10001a22: 00064d63 bltz a2,10001a3c <_prf+0x43c>
|
3140 |
|
|
} else if (fplus) {
|
3141 |
|
|
10001a26: e9843783 ld a5,-360(s0)
|
3142 |
|
|
*buf++ = '+';
|
3143 |
|
|
10001a2a: 02b00693 li a3,43
|
3144 |
|
|
} else if (fplus) {
|
3145 |
|
|
10001a2e: e799 bnez a5,10001a3c <_prf+0x43c>
|
3146 |
|
|
} else if (fspace) {
|
3147 |
|
|
10001a30: ec040313 addi t1,s0,-320
|
3148 |
|
|
10001a34: 000d0863 beqz s10,10001a44 <_prf+0x444>
|
3149 |
|
|
*buf++ = ' ';
|
3150 |
|
|
10001a38: 02000693 li a3,32
|
3151 |
|
|
10001a3c: ecd40023 sb a3,-320(s0)
|
3152 |
|
|
10001a40: ec140313 addi t1,s0,-319
|
3153 |
|
|
10001a44: eb043683 ld a3,-336(s0)
|
3154 |
|
|
10001a48: 4581 li a1,0
|
3155 |
|
|
decexp = 0;
|
3156 |
|
|
10001a4a: 4b81 li s7,0
|
3157 |
|
|
while (exp <= -3) {
|
3158 |
|
|
10001a4c: 5579 li a0,-2
|
3159 |
|
|
fract *= 5;
|
3160 |
|
|
10001a4e: 4e15 li t3,5
|
3161 |
|
|
while (exp <= -3) {
|
3162 |
|
|
10001a50: 08ac4063 blt s8,a0,10001ad0 <_prf+0x4d0>
|
3163 |
|
|
10001a54: c199 beqz a1,10001a5a <_prf+0x45a>
|
3164 |
|
|
10001a56: ead43823 sd a3,-336(s0)
|
3165 |
|
|
while (exp > 0) {
|
3166 |
|
|
10001a5a: 0b804163 bgtz s8,10001afc <_prf+0x4fc>
|
3167 |
|
|
10001a5e: eb043683 ld a3,-336(s0)
|
3168 |
|
|
while (exp < (0 + 4)) {
|
3169 |
|
|
10001a62: 4591 li a1,4
|
3170 |
|
|
*v = (*v & 1) + (*v >> 1);
|
3171 |
|
|
10001a64: 0016f513 andi a0,a3,1
|
3172 |
|
|
exp++;
|
3173 |
|
|
10001a68: 2c05 addiw s8,s8,1
|
3174 |
|
|
*v = (*v & 1) + (*v >> 1);
|
3175 |
|
|
10001a6a: 8285 srli a3,a3,0x1
|
3176 |
|
|
10001a6c: 96aa add a3,a3,a0
|
3177 |
|
|
while (exp < (0 + 4)) {
|
3178 |
|
|
10001a6e: febc1be3 bne s8,a1,10001a64 <_prf+0x464>
|
3179 |
|
|
10001a72: ead43823 sd a3,-336(s0)
|
3180 |
|
|
if (precision < 0)
|
3181 |
|
|
10001a76: 000cd363 bgez s9,10001a7c <_prf+0x47c>
|
3182 |
|
|
precision = 6; /* Default precision if none given */
|
3183 |
|
|
10001a7a: 4c99 li s9,6
|
3184 |
|
|
if ((c == 'g') || (c == 'G')) {
|
3185 |
|
|
10001a7c: 0dfaf693 andi a3,s5,223
|
3186 |
|
|
10001a80: 04700593 li a1,71
|
3187 |
|
|
10001a84: 0ab69563 bne a3,a1,10001b2e <_prf+0x52e>
|
3188 |
|
|
prune_zero = false; /* Assume trailing 0's allowed */
|
3189 |
|
|
10001a88: 4c01 li s8,0
|
3190 |
|
|
if (!falt && (precision > 0))
|
3191 |
|
|
10001a8a: 000d9463 bnez s11,10001a92 <_prf+0x492>
|
3192 |
|
|
prune_zero = false; /* Assume trailing 0's allowed */
|
3193 |
|
|
10001a8e: 01903c33 snez s8,s9
|
3194 |
|
|
if ((decexp < (-4 + 1)) || (decexp > (precision + 1))) {
|
3195 |
|
|
10001a92: 56f5 li a3,-3
|
3196 |
|
|
10001a94: 00dbc663 blt s7,a3,10001aa0 <_prf+0x4a0>
|
3197 |
|
|
10001a98: 001c869b addiw a3,s9,1
|
3198 |
|
|
10001a9c: 0976de63 ble s7,a3,10001b38 <_prf+0x538>
|
3199 |
|
|
if (c == 'g')
|
3200 |
|
|
10001aa0: 06700693 li a3,103
|
3201 |
|
|
10001aa4: 16da8963 beq s5,a3,10001c16 <_prf+0x616>
|
3202 |
|
|
c = 'E';
|
3203 |
|
|
10001aa8: 04500a93 li s5,69
|
3204 |
|
|
exp = precision + 1;
|
3205 |
|
|
10001aac: 001c859b addiw a1,s9,1
|
3206 |
|
|
digit_count = 16;
|
3207 |
|
|
10001ab0: 46c1 li a3,16
|
3208 |
|
|
10001ab2: ead42623 sw a3,-340(s0)
|
3209 |
|
|
10001ab6: 4541 li a0,16
|
3210 |
|
|
10001ab8: 0005869b sext.w a3,a1
|
3211 |
|
|
10001abc: 08b55863 ble a1,a0,10001b4c <_prf+0x54c>
|
3212 |
|
|
10001ac0: 46c1 li a3,16
|
3213 |
|
|
10001ac2: a069 j 10001b4c <_prf+0x54c>
|
3214 |
|
|
if ((exp | fract) != 0) {
|
3215 |
|
|
10001ac4: 4c01 li s8,0
|
3216 |
|
|
10001ac6: b785 j 10001a26 <_prf+0x426>
|
3217 |
|
|
*v = (*v & 1) + (*v >> 1);
|
3218 |
|
|
10001ac8: 0016f593 andi a1,a3,1
|
3219 |
|
|
10001acc: 8285 srli a3,a3,0x1
|
3220 |
|
|
10001ace: 96ae add a3,a3,a1
|
3221 |
|
|
while ((fract >> 32) >= (MAXFP1 / 5)) {
|
3222 |
|
|
10001ad0: e7843783 ld a5,-392(s0)
|
3223 |
|
|
10001ad4: 0206d593 srli a1,a3,0x20
|
3224 |
|
|
10001ad8: 2c05 addiw s8,s8,1
|
3225 |
|
|
10001ada: feb7e7e3 bltu a5,a1,10001ac8 <_prf+0x4c8>
|
3226 |
|
|
fract *= 5;
|
3227 |
|
|
10001ade: 03c686b3 mul a3,a3,t3
|
3228 |
|
|
decexp--;
|
3229 |
|
|
10001ae2: 3bfd addiw s7,s7,-1
|
3230 |
|
|
10001ae4: 4585 li a1,1
|
3231 |
|
|
while ((fract >> 32) <= (MAXFP1 / 2)) {
|
3232 |
|
|
10001ae6: 800007b7 lui a5,0x80000
|
3233 |
|
|
10001aea: 0206de93 srli t4,a3,0x20
|
3234 |
|
|
10001aee: fff7c793 not a5,a5
|
3235 |
|
|
10001af2: f5d7efe3 bltu a5,t4,10001a50 <_prf+0x450>
|
3236 |
|
|
fract <<= 1;
|
3237 |
|
|
10001af6: 0686 slli a3,a3,0x1
|
3238 |
|
|
exp--;
|
3239 |
|
|
10001af8: 3c7d addiw s8,s8,-1
|
3240 |
|
|
10001afa: b7f5 j 10001ae6 <_prf+0x4e6>
|
3241 |
|
|
_ldiv5(&fract);
|
3242 |
|
|
10001afc: eb040513 addi a0,s0,-336
|
3243 |
|
|
10001b00: e6643823 sd t1,-400(s0)
|
3244 |
|
|
10001b04: a85ff0ef jal ra,10001588 <_ldiv5>
|
3245 |
|
|
10001b08: eb043683 ld a3,-336(s0)
|
3246 |
|
|
10001b0c: e7043303 ld t1,-400(s0)
|
3247 |
|
|
exp--;
|
3248 |
|
|
10001b10: 3c7d addiw s8,s8,-1
|
3249 |
|
|
decexp++;
|
3250 |
|
|
10001b12: 2b85 addiw s7,s7,1
|
3251 |
|
|
10001b14: 4581 li a1,0
|
3252 |
|
|
while ((fract >> 32) <= (MAXFP1 / 2)) {
|
3253 |
|
|
10001b16: 800007b7 lui a5,0x80000
|
3254 |
|
|
10001b1a: 0206d513 srli a0,a3,0x20
|
3255 |
|
|
10001b1e: fff7c793 not a5,a5
|
3256 |
|
|
10001b22: f2a7e9e3 bltu a5,a0,10001a54 <_prf+0x454>
|
3257 |
|
|
fract <<= 1;
|
3258 |
|
|
10001b26: 0686 slli a3,a3,0x1
|
3259 |
|
|
exp--;
|
3260 |
|
|
10001b28: 3c7d addiw s8,s8,-1
|
3261 |
|
|
10001b2a: 4585 li a1,1
|
3262 |
|
|
10001b2c: b7ed j 10001b16 <_prf+0x516>
|
3263 |
|
|
if (c == 'f') {
|
3264 |
|
|
10001b2e: 06600693 li a3,102
|
3265 |
|
|
prune_zero = false; /* Assume trailing 0's allowed */
|
3266 |
|
|
10001b32: 4c01 li s8,0
|
3267 |
|
|
if (c == 'f') {
|
3268 |
|
|
10001b34: f6da9ce3 bne s5,a3,10001aac <_prf+0x4ac>
|
3269 |
|
|
exp = precision + decexp;
|
3270 |
|
|
10001b38: 019b85bb addw a1,s7,s9
|
3271 |
|
|
if (exp < 0)
|
3272 |
|
|
10001b3c: 06600a93 li s5,102
|
3273 |
|
|
10001b40: f605d8e3 bgez a1,10001ab0 <_prf+0x4b0>
|
3274 |
|
|
digit_count = 16;
|
3275 |
|
|
10001b44: 46c1 li a3,16
|
3276 |
|
|
10001b46: ead42623 sw a3,-340(s0)
|
3277 |
|
|
exp = 0;
|
3278 |
|
|
10001b4a: 4681 li a3,0
|
3279 |
|
|
ltemp = 0x0800000000000000;
|
3280 |
|
|
10001b4c: 4585 li a1,1
|
3281 |
|
|
10001b4e: 15ee slli a1,a1,0x3b
|
3282 |
|
|
10001b50: eab43c23 sd a1,-328(s0)
|
3283 |
|
|
while (exp--) {
|
3284 |
|
|
10001b54: 5e7d li t3,-1
|
3285 |
|
|
10001b56: 36fd addiw a3,a3,-1
|
3286 |
|
|
10001b58: 0dc69263 bne a3,t3,10001c1c <_prf+0x61c>
|
3287 |
|
|
fract += ltemp;
|
3288 |
|
|
10001b5c: eb043683 ld a3,-336(s0)
|
3289 |
|
|
10001b60: eb843583 ld a1,-328(s0)
|
3290 |
|
|
10001b64: 96ae add a3,a3,a1
|
3291 |
|
|
if ((fract >> 32) & 0xF0000000) {
|
3292 |
|
|
10001b66: 45bd li a1,15
|
3293 |
|
|
fract += ltemp;
|
3294 |
|
|
10001b68: ead43823 sd a3,-336(s0)
|
3295 |
|
|
if ((fract >> 32) & 0xF0000000) {
|
3296 |
|
|
10001b6c: 05f2 slli a1,a1,0x1c
|
3297 |
|
|
10001b6e: 9281 srli a3,a3,0x20
|
3298 |
|
|
10001b70: 8eed and a3,a3,a1
|
3299 |
|
|
10001b72: c295 beqz a3,10001b96 <_prf+0x596>
|
3300 |
|
|
_ldiv5(&fract);
|
3301 |
|
|
10001b74: eb040513 addi a0,s0,-336
|
3302 |
|
|
10001b78: e6643823 sd t1,-400(s0)
|
3303 |
|
|
10001b7c: a0dff0ef jal ra,10001588 <_ldiv5>
|
3304 |
|
|
*v = (*v & 1) + (*v >> 1);
|
3305 |
|
|
10001b80: eb043683 ld a3,-336(s0)
|
3306 |
|
|
decexp++;
|
3307 |
|
|
10001b84: e7043303 ld t1,-400(s0)
|
3308 |
|
|
10001b88: 2b85 addiw s7,s7,1
|
3309 |
|
|
*v = (*v & 1) + (*v >> 1);
|
3310 |
|
|
10001b8a: 0016f593 andi a1,a3,1
|
3311 |
|
|
10001b8e: 8285 srli a3,a3,0x1
|
3312 |
|
|
10001b90: 96ae add a3,a3,a1
|
3313 |
|
|
10001b92: ead43823 sd a3,-336(s0)
|
3314 |
|
|
if (c == 'f') {
|
3315 |
|
|
10001b96: 06600593 li a1,102
|
3316 |
|
|
10001b9a: 00130693 addi a3,t1,1
|
3317 |
|
|
10001b9e: 0eba9d63 bne s5,a1,10001c98 <_prf+0x698>
|
3318 |
|
|
if (decexp > 0) {
|
3319 |
|
|
10001ba2: 0b705663 blez s7,10001c4e <_prf+0x64e>
|
3320 |
|
|
10001ba6: 86de mv a3,s7
|
3321 |
|
|
10001ba8: 8e1a mv t3,t1
|
3322 |
|
|
*buf++ = _get_digit(&fract, &digit_count);
|
3323 |
|
|
10001baa: 0e05 addi t3,t3,1
|
3324 |
|
|
10001bac: eac40593 addi a1,s0,-340
|
3325 |
|
|
10001bb0: eb040513 addi a0,s0,-336
|
3326 |
|
|
10001bb4: e6643023 sd t1,-416(s0)
|
3327 |
|
|
10001bb8: e6d43423 sd a3,-408(s0)
|
3328 |
|
|
10001bbc: e7c43823 sd t3,-400(s0)
|
3329 |
|
|
10001bc0: e5c43c23 sd t3,-424(s0)
|
3330 |
|
|
10001bc4: a09ff0ef jal ra,100015cc <_get_digit>
|
3331 |
|
|
10001bc8: e7043e03 ld t3,-400(s0)
|
3332 |
|
|
decexp--;
|
3333 |
|
|
10001bcc: e6843683 ld a3,-408(s0)
|
3334 |
|
|
while (decexp > 0) {
|
3335 |
|
|
10001bd0: e6043303 ld t1,-416(s0)
|
3336 |
|
|
*buf++ = _get_digit(&fract, &digit_count);
|
3337 |
|
|
10001bd4: feae0fa3 sb a0,-1(t3)
|
3338 |
|
|
decexp--;
|
3339 |
|
|
10001bd8: 36fd addiw a3,a3,-1
|
3340 |
|
|
while (decexp > 0) {
|
3341 |
|
|
10001bda: fae1 bnez a3,10001baa <_prf+0x5aa>
|
3342 |
|
|
10001bdc: fffb851b addiw a0,s7,-1
|
3343 |
|
|
10001be0: 0505 addi a0,a0,1
|
3344 |
|
|
10001be2: 00a306b3 add a3,t1,a0
|
3345 |
|
|
10001be6: 4b81 li s7,0
|
3346 |
|
|
if (falt || (precision > 0))
|
3347 |
|
|
10001be8: 000d9463 bnez s11,10001bf0 <_prf+0x5f0>
|
3348 |
|
|
10001bec: 020c8263 beqz s9,10001c10 <_prf+0x610>
|
3349 |
|
|
*buf++ = '.';
|
3350 |
|
|
10001bf0: 00168d93 addi s11,a3,1 # ffffffffffff8001 <_time_slice_prio_ceiling+0xffffffffeffee29d>
|
3351 |
|
|
10001bf4: 02e00593 li a1,46
|
3352 |
|
|
10001bf8: 00b68023 sb a1,0(a3)
|
3353 |
|
|
10001bfc: 88e6 mv a7,s9
|
3354 |
|
|
10001bfe: 86ee mv a3,s11
|
3355 |
|
|
while (precision-- > 0) {
|
3356 |
|
|
10001c00: 5e7d li t3,-1
|
3357 |
|
|
*buf++ = '0';
|
3358 |
|
|
10001c02: 03000e93 li t4,48
|
3359 |
|
|
while (precision-- > 0) {
|
3360 |
|
|
10001c06: 38fd addiw a7,a7,-1
|
3361 |
|
|
10001c08: 05c89863 bne a7,t3,10001c58 <_prf+0x658>
|
3362 |
|
|
10001c0c: 019d86b3 add a3,s11,s9
|
3363 |
|
|
if (prune_zero) {
|
3364 |
|
|
10001c10: 0c0c1d63 bnez s8,10001cea <_prf+0x6ea>
|
3365 |
|
|
10001c14: a291 j 10001d58 <_prf+0x758>
|
3366 |
|
|
c = 'e';
|
3367 |
|
|
10001c16: 06500a93 li s5,101
|
3368 |
|
|
10001c1a: bd49 j 10001aac <_prf+0x4ac>
|
3369 |
|
|
_ldiv5(<emp);
|
3370 |
|
|
10001c1c: eb840513 addi a0,s0,-328
|
3371 |
|
|
10001c20: e7c43023 sd t3,-416(s0)
|
3372 |
|
|
10001c24: e6643423 sd t1,-408(s0)
|
3373 |
|
|
10001c28: e6d43823 sd a3,-400(s0)
|
3374 |
|
|
10001c2c: 95dff0ef jal ra,10001588 <_ldiv5>
|
3375 |
|
|
*v = (*v & 1) + (*v >> 1);
|
3376 |
|
|
10001c30: eb843583 ld a1,-328(s0)
|
3377 |
|
|
10001c34: e6043e03 ld t3,-416(s0)
|
3378 |
|
|
10001c38: e6843303 ld t1,-408(s0)
|
3379 |
|
|
10001c3c: 0015f513 andi a0,a1,1
|
3380 |
|
|
10001c40: 8185 srli a1,a1,0x1
|
3381 |
|
|
10001c42: 95aa add a1,a1,a0
|
3382 |
|
|
10001c44: eab43c23 sd a1,-328(s0)
|
3383 |
|
|
10001c48: e7043683 ld a3,-400(s0)
|
3384 |
|
|
10001c4c: b729 j 10001b56 <_prf+0x556>
|
3385 |
|
|
*buf++ = '0';
|
3386 |
|
|
10001c4e: 03000593 li a1,48
|
3387 |
|
|
10001c52: 00b30023 sb a1,0(t1)
|
3388 |
|
|
10001c56: bf49 j 10001be8 <_prf+0x5e8>
|
3389 |
|
|
if (decexp < 0) {
|
3390 |
|
|
10001c58: 000b8763 beqz s7,10001c66 <_prf+0x666>
|
3391 |
|
|
*buf++ = '0';
|
3392 |
|
|
10001c5c: 01d68023 sb t4,0(a3)
|
3393 |
|
|
decexp++;
|
3394 |
|
|
10001c60: 2b85 addiw s7,s7,1
|
3395 |
|
|
10001c62: 0685 addi a3,a3,1
|
3396 |
|
|
10001c64: b74d j 10001c06 <_prf+0x606>
|
3397 |
|
|
*buf++ = _get_digit(&fract, &digit_count);
|
3398 |
|
|
10001c66: eac40593 addi a1,s0,-340
|
3399 |
|
|
10001c6a: eb040513 addi a0,s0,-336
|
3400 |
|
|
10001c6e: e5d43c23 sd t4,-424(s0)
|
3401 |
|
|
10001c72: e7c43023 sd t3,-416(s0)
|
3402 |
|
|
10001c76: e7143423 sd a7,-408(s0)
|
3403 |
|
|
10001c7a: e6d43823 sd a3,-400(s0)
|
3404 |
|
|
10001c7e: 94fff0ef jal ra,100015cc <_get_digit>
|
3405 |
|
|
10001c82: e7043683 ld a3,-400(s0)
|
3406 |
|
|
10001c86: e5843e83 ld t4,-424(s0)
|
3407 |
|
|
10001c8a: e6043e03 ld t3,-416(s0)
|
3408 |
|
|
10001c8e: 00a68023 sb a0,0(a3)
|
3409 |
|
|
10001c92: e6843883 ld a7,-408(s0)
|
3410 |
|
|
10001c96: b7f1 j 10001c62 <_prf+0x662>
|
3411 |
|
|
*buf = _get_digit(&fract, &digit_count);
|
3412 |
|
|
10001c98: eac40593 addi a1,s0,-340
|
3413 |
|
|
10001c9c: eb040513 addi a0,s0,-336
|
3414 |
|
|
10001ca0: e6643423 sd t1,-408(s0)
|
3415 |
|
|
10001ca4: e6d43823 sd a3,-400(s0)
|
3416 |
|
|
10001ca8: 925ff0ef jal ra,100015cc <_get_digit>
|
3417 |
|
|
10001cac: e6843303 ld t1,-408(s0)
|
3418 |
|
|
if (*buf++ != '0')
|
3419 |
|
|
10001cb0: 03000593 li a1,48
|
3420 |
|
|
10001cb4: e7043683 ld a3,-400(s0)
|
3421 |
|
|
*buf = _get_digit(&fract, &digit_count);
|
3422 |
|
|
10001cb8: 00a30023 sb a0,0(t1)
|
3423 |
|
|
if (*buf++ != '0')
|
3424 |
|
|
10001cbc: 00b50363 beq a0,a1,10001cc2 <_prf+0x6c2>
|
3425 |
|
|
decexp--;
|
3426 |
|
|
10001cc0: 3bfd addiw s7,s7,-1
|
3427 |
|
|
if (falt || (precision > 0))
|
3428 |
|
|
10001cc2: 000d9463 bnez s11,10001cca <_prf+0x6ca>
|
3429 |
|
|
10001cc6: 020c8063 beqz s9,10001ce6 <_prf+0x6e6>
|
3430 |
|
|
*buf++ = '.';
|
3431 |
|
|
10001cca: 00230d93 addi s11,t1,2
|
3432 |
|
|
10001cce: 02e00593 li a1,46
|
3433 |
|
|
10001cd2: 00b300a3 sb a1,1(t1)
|
3434 |
|
|
10001cd6: 88e6 mv a7,s9
|
3435 |
|
|
10001cd8: 836e mv t1,s11
|
3436 |
|
|
while (precision-- > 0)
|
3437 |
|
|
10001cda: 5e7d li t3,-1
|
3438 |
|
|
10001cdc: 38fd addiw a7,a7,-1
|
3439 |
|
|
10001cde: 09c89463 bne a7,t3,10001d66 <_prf+0x766>
|
3440 |
|
|
10001ce2: 019d86b3 add a3,s11,s9
|
3441 |
|
|
if (prune_zero) {
|
3442 |
|
|
10001ce6: 000c0f63 beqz s8,10001d04 <_prf+0x704>
|
3443 |
|
|
while (*--buf == '0')
|
3444 |
|
|
10001cea: 03000513 li a0,48
|
3445 |
|
|
10001cee: fff6c583 lbu a1,-1(a3)
|
3446 |
|
|
10001cf2: fff68713 addi a4,a3,-1
|
3447 |
|
|
10001cf6: 08a58e63 beq a1,a0,10001d92 <_prf+0x792>
|
3448 |
|
|
if (*buf != '.')
|
3449 |
|
|
10001cfa: 02e00513 li a0,46
|
3450 |
|
|
10001cfe: 00a59363 bne a1,a0,10001d04 <_prf+0x704>
|
3451 |
|
|
while (*--buf == '0')
|
3452 |
|
|
10001d02: 86ba mv a3,a4
|
3453 |
|
|
if ((c == 'e') || (c == 'E')) {
|
3454 |
|
|
10001d04: 0dfaf713 andi a4,s5,223
|
3455 |
|
|
10001d08: 04500593 li a1,69
|
3456 |
|
|
10001d0c: 04b71663 bne a4,a1,10001d58 <_prf+0x758>
|
3457 |
|
|
*buf++ = (char) c;
|
3458 |
|
|
10001d10: 01568023 sb s5,0(a3)
|
3459 |
|
|
*buf++ = '+';
|
3460 |
|
|
10001d14: 02b00793 li a5,43
|
3461 |
|
|
if (decexp < 0) {
|
3462 |
|
|
10001d18: 000bd663 bgez s7,10001d24 <_prf+0x724>
|
3463 |
|
|
decexp = -decexp;
|
3464 |
|
|
10001d1c: 41700bbb negw s7,s7
|
3465 |
|
|
*buf++ = '-';
|
3466 |
|
|
10001d20: 02d00793 li a5,45
|
3467 |
|
|
*buf++ = '+';
|
3468 |
|
|
10001d24: 00f680a3 sb a5,1(a3)
|
3469 |
|
|
*buf++ = (char) ((decexp / 100) + '0');
|
3470 |
|
|
10001d28: 06400793 li a5,100
|
3471 |
|
|
10001d2c: 02fbc73b divw a4,s7,a5
|
3472 |
|
|
*buf++ = (char) (decexp + '0');
|
3473 |
|
|
10001d30: 0695 addi a3,a3,5
|
3474 |
|
|
decexp %= 100;
|
3475 |
|
|
10001d32: 02fbe63b remw a2,s7,a5
|
3476 |
|
|
*buf++ = (char) ((decexp / 100) + '0');
|
3477 |
|
|
10001d36: 0307071b addiw a4,a4,48
|
3478 |
|
|
10001d3a: fee68ea3 sb a4,-3(a3)
|
3479 |
|
|
*buf++ = (char) ((decexp / 10) + '0');
|
3480 |
|
|
10001d3e: 4729 li a4,10
|
3481 |
|
|
10001d40: 02e647bb divw a5,a2,a4
|
3482 |
|
|
decexp %= 10;
|
3483 |
|
|
10001d44: 02e6663b remw a2,a2,a4
|
3484 |
|
|
*buf++ = (char) ((decexp / 10) + '0');
|
3485 |
|
|
10001d48: 0307879b addiw a5,a5,48
|
3486 |
|
|
10001d4c: fef68f23 sb a5,-2(a3)
|
3487 |
|
|
*buf++ = (char) (decexp + '0');
|
3488 |
|
|
10001d50: 0306061b addiw a2,a2,48
|
3489 |
|
|
10001d54: fec68fa3 sb a2,-1(a3)
|
3490 |
|
|
return buf - start;
|
3491 |
|
|
10001d58: ec040513 addi a0,s0,-320
|
3492 |
|
|
*buf = 0;
|
3493 |
|
|
10001d5c: 00068023 sb zero,0(a3)
|
3494 |
|
|
return buf - start;
|
3495 |
|
|
10001d60: 40a6853b subw a0,a3,a0
|
3496 |
|
|
10001d64: b1b5 j 100019d0 <_prf+0x3d0>
|
3497 |
|
|
*buf++ = _get_digit(&fract, &digit_count);
|
3498 |
|
|
10001d66: eac40593 addi a1,s0,-340
|
3499 |
|
|
10001d6a: eb040513 addi a0,s0,-336
|
3500 |
|
|
10001d6e: e7c43023 sd t3,-416(s0)
|
3501 |
|
|
10001d72: e7143423 sd a7,-408(s0)
|
3502 |
|
|
10001d76: e6643823 sd t1,-400(s0)
|
3503 |
|
|
10001d7a: 853ff0ef jal ra,100015cc <_get_digit>
|
3504 |
|
|
10001d7e: e7043303 ld t1,-400(s0)
|
3505 |
|
|
10001d82: e6043e03 ld t3,-416(s0)
|
3506 |
|
|
10001d86: e6843883 ld a7,-408(s0)
|
3507 |
|
|
10001d8a: 00a30023 sb a0,0(t1)
|
3508 |
|
|
10001d8e: 0305 addi t1,t1,1
|
3509 |
|
|
10001d90: b7b1 j 10001cdc <_prf+0x6dc>
|
3510 |
|
|
while (*--buf == '0')
|
3511 |
|
|
10001d92: 86ba mv a3,a4
|
3512 |
|
|
10001d94: bfa9 j 10001cee <_prf+0x6ee>
|
3513 |
|
|
*int32ptr_temp = count;
|
3514 |
|
|
10001d96: 000c3783 ld a5,0(s8)
|
3515 |
|
|
int32ptr_temp = (int32_t *)va_arg(vargs, int32_t *);
|
3516 |
|
|
10001d9a: 008c0993 addi s3,s8,8
|
3517 |
|
|
*int32ptr_temp = count;
|
3518 |
|
|
10001d9e: 0147a023 sw s4,0(a5) # ffffffff80000000 <_time_slice_prio_ceiling+0xffffffff6fff629c>
|
3519 |
|
|
break;
|
3520 |
|
|
10001da2: b0c5 j 10001682 <_prf+0x82>
|
3521 |
|
|
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
|
3522 |
|
|
10001da4: 008c0993 addi s3,s8,8
|
3523 |
|
|
10001da8: 000c2583 lw a1,0(s8)
|
3524 |
|
|
10001dac: ec040c13 addi s8,s0,-320
|
3525 |
|
|
if (alt_form) {
|
3526 |
|
|
10001db0: 040d8563 beqz s11,10001dfa <_prf+0x7fa>
|
3527 |
|
|
*buf++ = '0';
|
3528 |
|
|
10001db4: 03000793 li a5,48
|
3529 |
|
|
10001db8: ecf40023 sb a5,-320(s0)
|
3530 |
|
|
10001dbc: ec140b93 addi s7,s0,-319
|
3531 |
|
|
if (!value) {
|
3532 |
|
|
10001dc0: ed95 bnez a1,10001dfc <_prf+0x7fc>
|
3533 |
|
|
*buf++ = 0;
|
3534 |
|
|
10001dc2: ec0400a3 sb zero,-319(s0)
|
3535 |
|
|
if (precision != -1)
|
3536 |
|
|
10001dc6: 57fd li a5,-1
|
3537 |
|
|
prefix = 0;
|
3538 |
|
|
10001dc8: 4d01 li s10,0
|
3539 |
|
|
if (precision != -1)
|
3540 |
|
|
10001dca: 0efc9463 bne s9,a5,10001eb2 <_prf+0x8b2>
|
3541 |
|
|
if (c < width) {
|
3542 |
|
|
10001dce: 0f2dc563 blt s11,s2,10001eb8 <_prf+0x8b8>
|
3543 |
|
|
10001dd2: 896e mv s2,s11
|
3544 |
|
|
10001dd4: 0149093b addw s2,s2,s4
|
3545 |
|
|
if (pad == ' ')
|
3546 |
|
|
10001dd8: ec040a93 addi s5,s0,-320
|
3547 |
|
|
if ((*func)(*cptr, dest) == EOF)
|
3548 |
|
|
10001ddc: 5b7d li s6,-1
|
3549 |
|
|
for (cptr = buf; c > 0; c--, cptr++, count++) {
|
3550 |
|
|
10001dde: 8b2a02e3 beq s4,s2,10001682 <_prf+0x82>
|
3551 |
|
|
if ((*func)(*cptr, dest) == EOF)
|
3552 |
|
|
10001de2: e8043583 ld a1,-384(s0)
|
3553 |
|
|
10001de6: 000ac503 lbu a0,0(s5)
|
3554 |
|
|
10001dea: e8843783 ld a5,-376(s0)
|
3555 |
|
|
10001dee: 9782 jalr a5
|
3556 |
|
|
10001df0: 876505e3 beq a0,s6,1000165a <_prf+0x5a>
|
3557 |
|
|
for (cptr = buf; c > 0; c--, cptr++, count++) {
|
3558 |
|
|
10001df4: 0a85 addi s5,s5,1
|
3559 |
|
|
10001df6: 2a05 addiw s4,s4,1
|
3560 |
|
|
10001df8: b7dd j 10001dde <_prf+0x7de>
|
3561 |
|
|
if (alt_form) {
|
3562 |
|
|
10001dfa: 8be2 mv s7,s8
|
3563 |
|
|
return (buf - buf0) + _to_x(buf, value, 8, precision);
|
3564 |
|
|
10001dfc: 855e mv a0,s7
|
3565 |
|
|
10001dfe: 86e6 mv a3,s9
|
3566 |
|
|
10001e00: 4621 li a2,8
|
3567 |
|
|
10001e02: f18ff0ef jal ra,1000151a <_to_x>
|
3568 |
|
|
10001e06: 418b8bb3 sub s7,s7,s8
|
3569 |
|
|
10001e0a: 0175053b addw a0,a0,s7
|
3570 |
|
|
if (precision != -1)
|
3571 |
|
|
10001e0e: 57fd li a5,-1
|
3572 |
|
|
prefix = 0;
|
3573 |
|
|
10001e10: 4d01 li s10,0
|
3574 |
|
|
if (precision != -1)
|
3575 |
|
|
10001e12: bcfc8be3 beq s9,a5,100019e8 <_prf+0x3e8>
|
3576 |
|
|
pad = ' ';
|
3577 |
|
|
10001e16: 02000b13 li s6,32
|
3578 |
|
|
10001e1a: b6f9 j 100019e8 <_prf+0x3e8>
|
3579 |
|
|
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
|
3580 |
|
|
10001e1c: 000c2583 lw a1,0(s8)
|
3581 |
|
|
*buf++ = '0';
|
3582 |
|
|
10001e20: 77e1 lui a5,0xffff8
|
3583 |
|
|
10001e22: 8307c793 xori a5,a5,-2000
|
3584 |
|
|
len = _to_x(buf, value, 16, precision);
|
3585 |
|
|
10001e26: 46a1 li a3,8
|
3586 |
|
|
10001e28: 4641 li a2,16
|
3587 |
|
|
10001e2a: ec240513 addi a0,s0,-318
|
3588 |
|
|
*buf++ = '0';
|
3589 |
|
|
10001e2e: ecf41023 sh a5,-320(s0)
|
3590 |
|
|
len = _to_x(buf, value, 16, precision);
|
3591 |
|
|
10001e32: ee8ff0ef jal ra,1000151a <_to_x>
|
3592 |
|
|
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
|
3593 |
|
|
10001e36: 008c0993 addi s3,s8,8
|
3594 |
|
|
return len + (buf - buf0);
|
3595 |
|
|
10001e3a: 2509 addiw a0,a0,2
|
3596 |
|
|
10001e3c: bfc9 j 10001e0e <_prf+0x80e>
|
3597 |
|
|
if ((precision >= 0) && (precision < c))
|
3598 |
|
|
10001e3e: 000cc863 bltz s9,10001e4e <_prf+0x84e>
|
3599 |
|
|
10001e42: 87ee mv a5,s11
|
3600 |
|
|
10001e44: 01bcd363 ble s11,s9,10001e4a <_prf+0x84a>
|
3601 |
|
|
10001e48: 87e6 mv a5,s9
|
3602 |
|
|
10001e4a: 00078d9b sext.w s11,a5
|
3603 |
|
|
if (c > 0) {
|
3604 |
|
|
10001e4e: 820d8ae3 beqz s11,10001682 <_prf+0x82>
|
3605 |
|
|
memcpy(buf, cptr_temp, (size_t) c);
|
3606 |
|
|
10001e52: 866e mv a2,s11
|
3607 |
|
|
10001e54: ec040513 addi a0,s0,-320
|
3608 |
|
|
10001e58: 266000ef jal ra,100020be
|
3609 |
|
|
10001e5c: b4ed j 10001946 <_prf+0x346>
|
3610 |
|
|
return _to_x(buf, value, 10, precision);
|
3611 |
|
|
10001e5e: 000c2583 lw a1,0(s8)
|
3612 |
|
|
10001e62: 86e6 mv a3,s9
|
3613 |
|
|
10001e64: 4629 li a2,10
|
3614 |
|
|
10001e66: ec040513 addi a0,s0,-320
|
3615 |
|
|
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
|
3616 |
|
|
10001e6a: 008c0993 addi s3,s8,8
|
3617 |
|
|
return _to_x(buf, value, 10, precision);
|
3618 |
|
|
10001e6e: eacff0ef jal ra,1000151a <_to_x>
|
3619 |
|
|
10001e72: bf71 j 10001e0e <_prf+0x80e>
|
3620 |
|
|
if (*buf >= 'a' && *buf <= 'z') {
|
3621 |
|
|
10001e74: f9f7861b addiw a2,a5,-97
|
3622 |
|
|
10001e78: 0ff67613 andi a2,a2,255
|
3623 |
|
|
10001e7c: 00c5e563 bltu a1,a2,10001e86 <_prf+0x886>
|
3624 |
|
|
*buf += 'A' - 'a';
|
3625 |
|
|
10001e80: 3781 addiw a5,a5,-32
|
3626 |
|
|
10001e82: 00f68023 sb a5,0(a3)
|
3627 |
|
|
for (/**/; *buf; buf++) {
|
3628 |
|
|
10001e86: 0685 addi a3,a3,1
|
3629 |
|
|
10001e88: 0006c783 lbu a5,0(a3)
|
3630 |
|
|
10001e8c: f7e5 bnez a5,10001e74 <_prf+0x874>
|
3631 |
|
|
10001e8e: b2dd j 10001874 <_prf+0x274>
|
3632 |
|
|
if (prefix == 'X') {
|
3633 |
|
|
10001e90: 86e2 mv a3,s8
|
3634 |
|
|
if (*buf >= 'a' && *buf <= 'z') {
|
3635 |
|
|
10001e92: 45e5 li a1,25
|
3636 |
|
|
10001e94: bfd5 j 10001e88 <_prf+0x888>
|
3637 |
|
|
if ((*func)('%', dest) == EOF) {
|
3638 |
|
|
10001e96: e8843783 ld a5,-376(s0)
|
3639 |
|
|
10001e9a: e8043583 ld a1,-384(s0)
|
3640 |
|
|
10001e9e: 02500513 li a0,37
|
3641 |
|
|
10001ea2: 9782 jalr a5
|
3642 |
|
|
10001ea4: 57fd li a5,-1
|
3643 |
|
|
10001ea6: faf50a63 beq a0,a5,1000165a <_prf+0x5a>
|
3644 |
|
|
count++;
|
3645 |
|
|
10001eaa: 2a05 addiw s4,s4,1
|
3646 |
|
|
if (c >= MAXFLD + 1)
|
3647 |
|
|
10001eac: 89e2 mv s3,s8
|
3648 |
|
|
10001eae: fd4ff06f j 10001682 <_prf+0x82>
|
3649 |
|
|
pad = ' ';
|
3650 |
|
|
10001eb2: 02000b13 li s6,32
|
3651 |
|
|
10001eb6: bf21 j 10001dce <_prf+0x7ce>
|
3652 |
|
|
if (fminus) {
|
3653 |
|
|
10001eb8: e9043703 ld a4,-368(s0)
|
3654 |
|
|
10001ebc: 4781 li a5,0
|
3655 |
|
|
buf[i] = ' ';
|
3656 |
|
|
10001ebe: 02000693 li a3,32
|
3657 |
|
|
if (fminus) {
|
3658 |
|
|
10001ec2: eb31 bnez a4,10001f16 <_prf+0x916>
|
3659 |
|
|
(void) memmove((buf + (width - c)), buf, (size_t) (c
|
3660 |
|
|
10001ec4: 41b9053b subw a0,s2,s11
|
3661 |
|
|
10001ec8: ec040593 addi a1,s0,-320
|
3662 |
|
|
10001ecc: 8baa mv s7,a0
|
3663 |
|
|
10001ece: 001d861b addiw a2,s11,1
|
3664 |
|
|
10001ed2: 952e add a0,a0,a1
|
3665 |
|
|
10001ed4: 1ac000ef jal ra,10002080
|
3666 |
|
|
if (pad == ' ')
|
3667 |
|
|
10001ed8: 02000793 li a5,32
|
3668 |
|
|
10001edc: 00fb0463 beq s6,a5,10001ee4 <_prf+0x8e4>
|
3669 |
|
|
10001ee0: e9a43823 sd s10,-368(s0)
|
3670 |
|
|
c = width - c + prefix;
|
3671 |
|
|
10001ee4: e9043783 ld a5,-368(s0)
|
3672 |
|
|
10001ee8: e9043a83 ld s5,-368(s0)
|
3673 |
|
|
10001eec: 00fb8bbb addw s7,s7,a5
|
3674 |
|
|
for (i = prefix; i < c; i++)
|
3675 |
|
|
10001ef0: 000a879b sext.w a5,s5
|
3676 |
|
|
10001ef4: ef77d0e3 ble s7,a5,10001dd4 <_prf+0x7d4>
|
3677 |
|
|
buf[i] = pad;
|
3678 |
|
|
10001ef8: ec040793 addi a5,s0,-320
|
3679 |
|
|
10001efc: 97d6 add a5,a5,s5
|
3680 |
|
|
10001efe: 01678023 sb s6,0(a5) # ffffffffffff8000 <_time_slice_prio_ceiling+0xffffffffeffee29c>
|
3681 |
|
|
10001f02: 0a85 addi s5,s5,1
|
3682 |
|
|
10001f04: b7f5 j 10001ef0 <_prf+0x8f0>
|
3683 |
|
|
buf[i] = ' ';
|
3684 |
|
|
10001f06: 00fd8733 add a4,s11,a5
|
3685 |
|
|
10001f0a: ec040613 addi a2,s0,-320
|
3686 |
|
|
10001f0e: 9732 add a4,a4,a2
|
3687 |
|
|
10001f10: 00d70023 sb a3,0(a4)
|
3688 |
|
|
10001f14: 0785 addi a5,a5,1
|
3689 |
|
|
for (i = c; i < width; i++)
|
3690 |
|
|
10001f16: 00fd873b addw a4,s11,a5
|
3691 |
|
|
10001f1a: ff2746e3 blt a4,s2,10001f06 <_prf+0x906>
|
3692 |
|
|
10001f1e: bd5d j 10001dd4 <_prf+0x7d4>
|
3693 |
|
|
prefix = 1;
|
3694 |
|
|
10001f20: e9843d03 ld s10,-360(s0)
|
3695 |
|
|
10001f24: b4d1 j 100019e8 <_prf+0x3e8>
|
3696 |
|
|
|
3697 |
|
|
0000000010001f26 <_stdout_hook_default>:
|
3698 |
|
|
|
3699 |
|
|
while (*string != '\0') {
|
3700 |
|
|
if (_stdout_hook((int)*string) == EOF) {
|
3701 |
|
|
return EOF;
|
3702 |
|
|
}
|
3703 |
|
|
string++;
|
3704 |
|
|
10001f26: 1141 addi sp,sp,-16
|
3705 |
|
|
10001f28: e422 sd s0,8(sp)
|
3706 |
|
|
10001f2a: 0800 addi s0,sp,16
|
3707 |
|
|
10001f2c: 6422 ld s0,8(sp)
|
3708 |
|
|
10001f2e: 557d li a0,-1
|
3709 |
|
|
10001f30: 0141 addi sp,sp,16
|
3710 |
|
|
10001f32: 8082 ret
|
3711 |
|
|
|
3712 |
|
|
0000000010001f34 <__stdout_hook_install>:
|
3713 |
|
|
{
|
3714 |
|
|
10001f34: 1141 addi sp,sp,-16
|
3715 |
|
|
10001f36: e422 sd s0,8(sp)
|
3716 |
|
|
10001f38: 0800 addi s0,sp,16
|
3717 |
|
|
}
|
3718 |
|
|
10001f3a: 6422 ld s0,8(sp)
|
3719 |
|
|
_stdout_hook = hook;
|
3720 |
|
|
10001f3c: 100057b7 lui a5,0x10005
|
3721 |
|
|
10001f40: 26a7b423 sd a0,616(a5) # 10005268 <_stdout_hook>
|
3722 |
|
|
}
|
3723 |
|
|
10001f44: 0141 addi sp,sp,16
|
3724 |
|
|
10001f46: 8082 ret
|
3725 |
|
|
|
3726 |
|
|
0000000010001f48 :
|
3727 |
|
|
{
|
3728 |
|
|
10001f48: 1141 addi sp,sp,-16
|
3729 |
|
|
10001f4a: e422 sd s0,8(sp)
|
3730 |
|
|
10001f4c: 0800 addi s0,sp,16
|
3731 |
|
|
return (stdout == stream) ? _stdout_hook(c) : EOF;
|
3732 |
|
|
10001f4e: 4789 li a5,2
|
3733 |
|
|
10001f50: 00f59963 bne a1,a5,10001f62
|
3734 |
|
|
}
|
3735 |
|
|
10001f54: 6422 ld s0,8(sp)
|
3736 |
|
|
return (stdout == stream) ? _stdout_hook(c) : EOF;
|
3737 |
|
|
10001f56: 100057b7 lui a5,0x10005
|
3738 |
|
|
10001f5a: 2687b303 ld t1,616(a5) # 10005268 <_stdout_hook>
|
3739 |
|
|
}
|
3740 |
|
|
10001f5e: 0141 addi sp,sp,16
|
3741 |
|
|
return (stdout == stream) ? _stdout_hook(c) : EOF;
|
3742 |
|
|
10001f60: 8302 jr t1
|
3743 |
|
|
}
|
3744 |
|
|
10001f62: 6422 ld s0,8(sp)
|
3745 |
|
|
10001f64: 557d li a0,-1
|
3746 |
|
|
10001f66: 0141 addi sp,sp,16
|
3747 |
|
|
10001f68: 8082 ret
|
3748 |
|
|
|
3749 |
|
|
0000000010001f6a :
|
3750 |
|
|
{
|
3751 |
|
|
const char *c1 = m1;
|
3752 |
|
|
const char *c2 = m2;
|
3753 |
|
|
|
3754 |
|
|
if (!n)
|
3755 |
|
|
return 0;
|
3756 |
|
|
10001f6a: 1141 addi sp,sp,-16
|
3757 |
|
|
10001f6c: e422 sd s0,8(sp)
|
3758 |
|
|
10001f6e: 0800 addi s0,sp,16
|
3759 |
|
|
10001f70: 87aa mv a5,a0
|
3760 |
|
|
10001f72: 0005c703 lbu a4,0(a1) # ffffffff80000000 <_time_slice_prio_ceiling+0xffffffff6fff629c>
|
3761 |
|
|
10001f76: e711 bnez a4,10001f82
|
3762 |
|
|
10001f78: 00078023 sb zero,0(a5)
|
3763 |
|
|
10001f7c: 6422 ld s0,8(sp)
|
3764 |
|
|
10001f7e: 0141 addi sp,sp,16
|
3765 |
|
|
10001f80: 8082 ret
|
3766 |
|
|
10001f82: 00e78023 sb a4,0(a5)
|
3767 |
|
|
10001f86: 0585 addi a1,a1,1
|
3768 |
|
|
10001f88: 0785 addi a5,a5,1
|
3769 |
|
|
10001f8a: b7e5 j 10001f72
|
3770 |
|
|
|
3771 |
|
|
0000000010001f8c :
|
3772 |
|
|
10001f8c: 1141 addi sp,sp,-16
|
3773 |
|
|
10001f8e: e422 sd s0,8(sp)
|
3774 |
|
|
10001f90: 0800 addi s0,sp,16
|
3775 |
|
|
10001f92: 87aa mv a5,a0
|
3776 |
|
|
10001f94: ce11 beqz a2,10001fb0
|
3777 |
|
|
10001f96: 0005c703 lbu a4,0(a1)
|
3778 |
|
|
10001f9a: 00178693 addi a3,a5,1
|
3779 |
|
|
10001f9e: fff60813 addi a6,a2,-1
|
3780 |
|
|
10001fa2: eb11 bnez a4,10001fb6
|
3781 |
|
|
10001fa4: 963e add a2,a2,a5
|
3782 |
|
|
10001fa6: 00078023 sb zero,0(a5)
|
3783 |
|
|
10001faa: 0785 addi a5,a5,1
|
3784 |
|
|
10001fac: fef61de3 bne a2,a5,10001fa6
|
3785 |
|
|
10001fb0: 6422 ld s0,8(sp)
|
3786 |
|
|
10001fb2: 0141 addi sp,sp,16
|
3787 |
|
|
10001fb4: 8082 ret
|
3788 |
|
|
10001fb6: fee68fa3 sb a4,-1(a3)
|
3789 |
|
|
10001fba: 0585 addi a1,a1,1
|
3790 |
|
|
10001fbc: 8642 mv a2,a6
|
3791 |
|
|
10001fbe: 87b6 mv a5,a3
|
3792 |
|
|
10001fc0: bfd1 j 10001f94
|
3793 |
|
|
|
3794 |
|
|
0000000010001fc2 :
|
3795 |
|
|
10001fc2: 1141 addi sp,sp,-16
|
3796 |
|
|
10001fc4: e422 sd s0,8(sp)
|
3797 |
|
|
10001fc6: 0800 addi s0,sp,16
|
3798 |
|
|
10001fc8: 0ff5f593 andi a1,a1,255
|
3799 |
|
|
10001fcc: 00054783 lbu a5,0(a0)
|
3800 |
|
|
10001fd0: 00b78563 beq a5,a1,10001fda
|
3801 |
|
|
10001fd4: e791 bnez a5,10001fe0
|
3802 |
|
|
10001fd6: c191 beqz a1,10001fda
|
3803 |
|
|
10001fd8: 4501 li a0,0
|
3804 |
|
|
10001fda: 6422 ld s0,8(sp)
|
3805 |
|
|
10001fdc: 0141 addi sp,sp,16
|
3806 |
|
|
10001fde: 8082 ret
|
3807 |
|
|
10001fe0: 0505 addi a0,a0,1
|
3808 |
|
|
10001fe2: b7ed j 10001fcc
|
3809 |
|
|
|
3810 |
|
|
0000000010001fe4 :
|
3811 |
|
|
10001fe4: 1141 addi sp,sp,-16
|
3812 |
|
|
10001fe6: e422 sd s0,8(sp)
|
3813 |
|
|
10001fe8: 0800 addi s0,sp,16
|
3814 |
|
|
10001fea: 872a mv a4,a0
|
3815 |
|
|
10001fec: 87aa mv a5,a0
|
3816 |
|
|
10001fee: 0007c683 lbu a3,0(a5)
|
3817 |
|
|
10001ff2: 40e78533 sub a0,a5,a4
|
3818 |
|
|
10001ff6: e681 bnez a3,10001ffe
|
3819 |
|
|
10001ff8: 6422 ld s0,8(sp)
|
3820 |
|
|
10001ffa: 0141 addi sp,sp,16
|
3821 |
|
|
10001ffc: 8082 ret
|
3822 |
|
|
10001ffe: 0785 addi a5,a5,1
|
3823 |
|
|
10002000: b7fd j 10001fee
|
3824 |
|
|
|
3825 |
|
|
0000000010002002 :
|
3826 |
|
|
10002002: 1141 addi sp,sp,-16
|
3827 |
|
|
10002004: e422 sd s0,8(sp)
|
3828 |
|
|
10002006: 0800 addi s0,sp,16
|
3829 |
|
|
10002008: 00054783 lbu a5,0(a0)
|
3830 |
|
|
1000200c: 0005c703 lbu a4,0(a1)
|
3831 |
|
|
10002010: 00e79463 bne a5,a4,10002018
|
3832 |
|
|
10002014: e799 bnez a5,10002022
|
3833 |
|
|
10002016: 873e mv a4,a5
|
3834 |
|
|
10002018: 6422 ld s0,8(sp)
|
3835 |
|
|
1000201a: 40e7853b subw a0,a5,a4
|
3836 |
|
|
1000201e: 0141 addi sp,sp,16
|
3837 |
|
|
10002020: 8082 ret
|
3838 |
|
|
10002022: 0505 addi a0,a0,1
|
3839 |
|
|
10002024: 0585 addi a1,a1,1
|
3840 |
|
|
10002026: b7cd j 10002008
|
3841 |
|
|
|
3842 |
|
|
0000000010002028 :
|
3843 |
|
|
10002028: 1141 addi sp,sp,-16
|
3844 |
|
|
1000202a: e422 sd s0,8(sp)
|
3845 |
|
|
1000202c: 0800 addi s0,sp,16
|
3846 |
|
|
1000202e: 962a add a2,a2,a0
|
3847 |
|
|
10002030: 00c50f63 beq a0,a2,1000204e
|
3848 |
|
|
10002034: 00054783 lbu a5,0(a0)
|
3849 |
|
|
10002038: 0005c703 lbu a4,0(a1)
|
3850 |
|
|
1000203c: 00e79363 bne a5,a4,10002042
|
3851 |
|
|
10002040: e781 bnez a5,10002048
|
3852 |
|
|
10002042: 40e7853b subw a0,a5,a4
|
3853 |
|
|
10002046: a029 j 10002050
|
3854 |
|
|
10002048: 0505 addi a0,a0,1
|
3855 |
|
|
1000204a: 0585 addi a1,a1,1
|
3856 |
|
|
1000204c: b7d5 j 10002030
|
3857 |
|
|
1000204e: 4501 li a0,0
|
3858 |
|
|
10002050: 6422 ld s0,8(sp)
|
3859 |
|
|
10002052: 0141 addi sp,sp,16
|
3860 |
|
|
10002054: 8082 ret
|
3861 |
|
|
|
3862 |
|
|
0000000010002056 :
|
3863 |
|
|
10002056: 7179 addi sp,sp,-48
|
3864 |
|
|
10002058: f406 sd ra,40(sp)
|
3865 |
|
|
1000205a: f022 sd s0,32(sp)
|
3866 |
|
|
1000205c: ec26 sd s1,24(sp)
|
3867 |
|
|
1000205e: 1800 addi s0,sp,48
|
3868 |
|
|
10002060: 84aa mv s1,a0
|
3869 |
|
|
10002062: fcb43c23 sd a1,-40(s0)
|
3870 |
|
|
10002066: f7fff0ef jal ra,10001fe4
|
3871 |
|
|
1000206a: fd843583 ld a1,-40(s0)
|
3872 |
|
|
1000206e: 9526 add a0,a0,s1
|
3873 |
|
|
10002070: efbff0ef jal ra,10001f6a
|
3874 |
|
|
10002074: 70a2 ld ra,40(sp)
|
3875 |
|
|
10002076: 7402 ld s0,32(sp)
|
3876 |
|
|
10002078: 8526 mv a0,s1
|
3877 |
|
|
1000207a: 64e2 ld s1,24(sp)
|
3878 |
|
|
1000207c: 6145 addi sp,sp,48
|
3879 |
|
|
1000207e: 8082 ret
|
3880 |
|
|
|
3881 |
|
|
0000000010002080 :
|
3882 |
|
|
*
|
3883 |
|
|
* @return pointer to destination buffer
|
3884 |
|
|
*/
|
3885 |
|
|
|
3886 |
|
|
void *memmove(void *d, const void *s, size_t n)
|
3887 |
|
|
{
|
3888 |
|
|
10002080: 1141 addi sp,sp,-16
|
3889 |
|
|
10002082: e422 sd s0,8(sp)
|
3890 |
|
|
10002084: 0800 addi s0,sp,16
|
3891 |
|
|
char *dest = d;
|
3892 |
|
|
const char *src = s;
|
3893 |
|
|
|
3894 |
|
|
if ((size_t) (d - s) < n) {
|
3895 |
|
|
10002086: 40b507b3 sub a5,a0,a1
|
3896 |
|
|
1000208a: 00c7ed63 bltu a5,a2,100020a4
|
3897 |
|
|
1000208e: 962e add a2,a2,a1
|
3898 |
|
|
char *dest = d;
|
3899 |
|
|
10002090: 87aa mv a5,a0
|
3900 |
|
|
n--;
|
3901 |
|
|
dest[n] = src[n];
|
3902 |
|
|
}
|
3903 |
|
|
} else {
|
3904 |
|
|
/* It is safe to perform a forward-copy */
|
3905 |
|
|
while (n > 0) {
|
3906 |
|
|
10002092: 02c58363 beq a1,a2,100020b8
|
3907 |
|
|
*dest = *src;
|
3908 |
|
|
10002096: 0005c703 lbu a4,0(a1)
|
3909 |
|
|
dest++;
|
3910 |
|
|
1000209a: 0785 addi a5,a5,1
|
3911 |
|
|
src++;
|
3912 |
|
|
1000209c: 0585 addi a1,a1,1
|
3913 |
|
|
*dest = *src;
|
3914 |
|
|
1000209e: fee78fa3 sb a4,-1(a5)
|
3915 |
|
|
100020a2: bfc5 j 10002092
|
3916 |
|
|
n--;
|
3917 |
|
|
100020a4: 167d addi a2,a2,-1
|
3918 |
|
|
dest[n] = src[n];
|
3919 |
|
|
100020a6: 00c587b3 add a5,a1,a2
|
3920 |
|
|
100020aa: 0007c703 lbu a4,0(a5)
|
3921 |
|
|
100020ae: 00c507b3 add a5,a0,a2
|
3922 |
|
|
100020b2: 00e78023 sb a4,0(a5)
|
3923 |
|
|
while (n > 0) {
|
3924 |
|
|
100020b6: f67d bnez a2,100020a4
|
3925 |
|
|
n--;
|
3926 |
|
|
}
|
3927 |
|
|
}
|
3928 |
|
|
|
3929 |
|
|
return d;
|
3930 |
|
|
}
|
3931 |
|
|
100020b8: 6422 ld s0,8(sp)
|
3932 |
|
|
100020ba: 0141 addi sp,sp,16
|
3933 |
|
|
100020bc: 8082 ret
|
3934 |
|
|
|
3935 |
|
|
00000000100020be :
|
3936 |
|
|
*
|
3937 |
|
|
* @return pointer to start of destination buffer
|
3938 |
|
|
*/
|
3939 |
|
|
|
3940 |
|
|
void *memcpy(void *_Restrict d, const void *_Restrict s, size_t n)
|
3941 |
|
|
{
|
3942 |
|
|
100020be: 1141 addi sp,sp,-16
|
3943 |
|
|
100020c0: e422 sd s0,8(sp)
|
3944 |
|
|
/* attempt word-sized copying only if buffers have identical alignment */
|
3945 |
|
|
|
3946 |
|
|
unsigned char *d_byte = (unsigned char *)d;
|
3947 |
|
|
const unsigned char *s_byte = (const unsigned char *)s;
|
3948 |
|
|
|
3949 |
|
|
if ((((unsigned int)d ^ (unsigned int)s_byte) & 0x3) == 0) {
|
3950 |
|
|
100020c2: 00b547b3 xor a5,a0,a1
|
3951 |
|
|
{
|
3952 |
|
|
100020c6: 0800 addi s0,sp,16
|
3953 |
|
|
if ((((unsigned int)d ^ (unsigned int)s_byte) & 0x3) == 0) {
|
3954 |
|
|
100020c8: 8b8d andi a5,a5,3
|
3955 |
|
|
100020ca: c7b1 beqz a5,10002116
|
3956 |
|
|
unsigned char *d_byte = (unsigned char *)d;
|
3957 |
|
|
100020cc: 87aa mv a5,a0
|
3958 |
|
|
100020ce: 963e add a2,a2,a5
|
3959 |
|
|
s_byte = (unsigned char *)s_word;
|
3960 |
|
|
}
|
3961 |
|
|
|
3962 |
|
|
/* do byte-sized copying until finished */
|
3963 |
|
|
|
3964 |
|
|
while (n > 0) {
|
3965 |
|
|
100020d0: 04c79c63 bne a5,a2,10002128
|
3966 |
|
|
*(d_byte++) = *(s_byte++);
|
3967 |
|
|
n--;
|
3968 |
|
|
}
|
3969 |
|
|
|
3970 |
|
|
return d;
|
3971 |
|
|
}
|
3972 |
|
|
100020d4: 6422 ld s0,8(sp)
|
3973 |
|
|
100020d6: 0141 addi sp,sp,16
|
3974 |
|
|
100020d8: 8082 ret
|
3975 |
|
|
if (n == 0) {
|
3976 |
|
|
100020da: de6d beqz a2,100020d4
|
3977 |
|
|
*(d_byte++) = *(s_byte++);
|
3978 |
|
|
100020dc: 0585 addi a1,a1,1
|
3979 |
|
|
100020de: fff5c703 lbu a4,-1(a1)
|
3980 |
|
|
100020e2: 0785 addi a5,a5,1
|
3981 |
|
|
n--;
|
3982 |
|
|
100020e4: 167d addi a2,a2,-1
|
3983 |
|
|
*(d_byte++) = *(s_byte++);
|
3984 |
|
|
100020e6: fee78fa3 sb a4,-1(a5)
|
3985 |
|
|
while (((unsigned int)d_byte) & 0x3) {
|
3986 |
|
|
100020ea: 0037f713 andi a4,a5,3
|
3987 |
|
|
100020ee: f775 bnez a4,100020da
|
3988 |
|
|
100020f0: 86ae mv a3,a1
|
3989 |
|
|
100020f2: 873e mv a4,a5
|
3990 |
|
|
100020f4: 00c78333 add t1,a5,a2
|
3991 |
|
|
while (n >= sizeof(unsigned int)) {
|
3992 |
|
|
100020f8: 480d li a6,3
|
3993 |
|
|
100020fa: 40e308b3 sub a7,t1,a4
|
3994 |
|
|
100020fe: 01186e63 bltu a6,a7,1000211a
|
3995 |
|
|
10002102: 00265713 srli a4,a2,0x2
|
3996 |
|
|
10002106: 56f1 li a3,-4
|
3997 |
|
|
10002108: 02d706b3 mul a3,a4,a3
|
3998 |
|
|
1000210c: 070a slli a4,a4,0x2
|
3999 |
|
|
1000210e: 97ba add a5,a5,a4
|
4000 |
|
|
10002110: 95ba add a1,a1,a4
|
4001 |
|
|
10002112: 9636 add a2,a2,a3
|
4002 |
|
|
10002114: bf6d j 100020ce
|
4003 |
|
|
unsigned char *d_byte = (unsigned char *)d;
|
4004 |
|
|
10002116: 87aa mv a5,a0
|
4005 |
|
|
10002118: bfc9 j 100020ea
|
4006 |
|
|
*(d_word++) = *(s_word++);
|
4007 |
|
|
1000211a: 0691 addi a3,a3,4
|
4008 |
|
|
1000211c: ffc6a883 lw a7,-4(a3)
|
4009 |
|
|
10002120: 0711 addi a4,a4,4
|
4010 |
|
|
10002122: ff172e23 sw a7,-4(a4)
|
4011 |
|
|
10002126: bfd1 j 100020fa
|
4012 |
|
|
*(d_byte++) = *(s_byte++);
|
4013 |
|
|
10002128: 0585 addi a1,a1,1
|
4014 |
|
|
1000212a: fff5c703 lbu a4,-1(a1)
|
4015 |
|
|
1000212e: 0785 addi a5,a5,1
|
4016 |
|
|
10002130: fee78fa3 sb a4,-1(a5)
|
4017 |
|
|
10002134: bf71 j 100020d0
|
4018 |
|
|
|
4019 |
|
|
0000000010002136 :
|
4020 |
|
|
*
|
4021 |
|
|
* @return pointer to start of buffer
|
4022 |
|
|
*/
|
4023 |
|
|
|
4024 |
|
|
void *memset(void *buf, int c, size_t n)
|
4025 |
|
|
{
|
4026 |
|
|
10002136: 1141 addi sp,sp,-16
|
4027 |
|
|
10002138: e422 sd s0,8(sp)
|
4028 |
|
|
1000213a: 0800 addi s0,sp,16
|
4029 |
|
|
/* do byte-sized initialization until word-aligned or finished */
|
4030 |
|
|
|
4031 |
|
|
unsigned char *d_byte = (unsigned char *)buf;
|
4032 |
|
|
unsigned char c_byte = (unsigned char)c;
|
4033 |
|
|
1000213c: 0ff5f693 andi a3,a1,255
|
4034 |
|
|
unsigned char *d_byte = (unsigned char *)buf;
|
4035 |
|
|
10002140: 87aa mv a5,a0
|
4036 |
|
|
|
4037 |
|
|
while (((unsigned int)d_byte) & 0x3) {
|
4038 |
|
|
10002142: 0037f713 andi a4,a5,3
|
4039 |
|
|
10002146: e329 bnez a4,10002188
|
4040 |
|
|
};
|
4041 |
|
|
|
4042 |
|
|
/* do word-sized initialization as long as possible */
|
4043 |
|
|
|
4044 |
|
|
unsigned int *d_word = (unsigned int *)d_byte;
|
4045 |
|
|
unsigned int c_word = (unsigned int)(unsigned char)c;
|
4046 |
|
|
10002148: 0ff5f593 andi a1,a1,255
|
4047 |
|
|
|
4048 |
|
|
c_word |= c_word << 8;
|
4049 |
|
|
1000214c: 0085971b slliw a4,a1,0x8
|
4050 |
|
|
10002150: 8dd9 or a1,a1,a4
|
4051 |
|
|
c_word |= c_word << 16;
|
4052 |
|
|
10002152: 0105971b slliw a4,a1,0x10
|
4053 |
|
|
10002156: 8dd9 or a1,a1,a4
|
4054 |
|
|
10002158: 2581 sext.w a1,a1
|
4055 |
|
|
|
4056 |
|
|
while (n >= sizeof(unsigned int)) {
|
4057 |
|
|
1000215a: 873e mv a4,a5
|
4058 |
|
|
1000215c: 00c78333 add t1,a5,a2
|
4059 |
|
|
10002160: 480d li a6,3
|
4060 |
|
|
10002162: 40e308b3 sub a7,t1,a4
|
4061 |
|
|
10002166: 03186763 bltu a6,a7,10002194
|
4062 |
|
|
1000216a: 00265713 srli a4,a2,0x2
|
4063 |
|
|
1000216e: 00271593 slli a1,a4,0x2
|
4064 |
|
|
10002172: 97ae add a5,a5,a1
|
4065 |
|
|
10002174: 55f1 li a1,-4
|
4066 |
|
|
10002176: 02b70733 mul a4,a4,a1
|
4067 |
|
|
1000217a: 9732 add a4,a4,a2
|
4068 |
|
|
1000217c: 973e add a4,a4,a5
|
4069 |
|
|
|
4070 |
|
|
/* do byte-sized initialization until finished */
|
4071 |
|
|
|
4072 |
|
|
d_byte = (unsigned char *)d_word;
|
4073 |
|
|
|
4074 |
|
|
while (n > 0) {
|
4075 |
|
|
1000217e: 00f71f63 bne a4,a5,1000219c
|
4076 |
|
|
*(d_byte++) = c_byte;
|
4077 |
|
|
n--;
|
4078 |
|
|
}
|
4079 |
|
|
|
4080 |
|
|
return buf;
|
4081 |
|
|
}
|
4082 |
|
|
10002182: 6422 ld s0,8(sp)
|
4083 |
|
|
10002184: 0141 addi sp,sp,16
|
4084 |
|
|
10002186: 8082 ret
|
4085 |
|
|
if (n == 0) {
|
4086 |
|
|
10002188: de6d beqz a2,10002182
|
4087 |
|
|
*(d_byte++) = c_byte;
|
4088 |
|
|
1000218a: 0785 addi a5,a5,1
|
4089 |
|
|
1000218c: fed78fa3 sb a3,-1(a5)
|
4090 |
|
|
n--;
|
4091 |
|
|
10002190: 167d addi a2,a2,-1
|
4092 |
|
|
10002192: bf45 j 10002142
|
4093 |
|
|
*(d_word++) = c_word;
|
4094 |
|
|
10002194: 0711 addi a4,a4,4
|
4095 |
|
|
10002196: feb72e23 sw a1,-4(a4)
|
4096 |
|
|
1000219a: b7e1 j 10002162
|
4097 |
|
|
*(d_byte++) = c_byte;
|
4098 |
|
|
1000219c: 0785 addi a5,a5,1
|
4099 |
|
|
1000219e: fed78fa3 sb a3,-1(a5)
|
4100 |
|
|
100021a2: bff1 j 1000217e
|
4101 |
|
|
|
4102 |
|
|
00000000100021a4 <_nop_char_out>:
|
4103 |
|
|
* @param c Character to swallow
|
4104 |
|
|
*
|
4105 |
|
|
* @return 0
|
4106 |
|
|
*/
|
4107 |
|
|
static int _nop_char_out(int c)
|
4108 |
|
|
{
|
4109 |
|
|
100021a4: 1141 addi sp,sp,-16
|
4110 |
|
|
100021a6: e422 sd s0,8(sp)
|
4111 |
|
|
100021a8: 0800 addi s0,sp,16
|
4112 |
|
|
ARG_UNUSED(c);
|
4113 |
|
|
|
4114 |
|
|
/* do nothing */
|
4115 |
|
|
return 0;
|
4116 |
|
|
}
|
4117 |
|
|
100021aa: 6422 ld s0,8(sp)
|
4118 |
|
|
100021ac: 4501 li a0,0
|
4119 |
|
|
100021ae: 0141 addi sp,sp,16
|
4120 |
|
|
100021b0: 8082 ret
|
4121 |
|
|
|
4122 |
|
|
00000000100021b2 <_printk_dec_ulong>:
|
4123 |
|
|
* @param num Number to output
|
4124 |
|
|
*
|
4125 |
|
|
* @return N/A
|
4126 |
|
|
*/
|
4127 |
|
|
static void _printk_dec_ulong(const unsigned long num)
|
4128 |
|
|
{
|
4129 |
|
|
100021b2: 7139 addi sp,sp,-64
|
4130 |
|
|
100021b4: f822 sd s0,48(sp)
|
4131 |
|
|
100021b6: f426 sd s1,40(sp)
|
4132 |
|
|
100021b8: f04a sd s2,32(sp)
|
4133 |
|
|
100021ba: ec4e sd s3,24(sp)
|
4134 |
|
|
100021bc: e456 sd s5,8(sp)
|
4135 |
|
|
100021be: e05a sd s6,0(sp)
|
4136 |
|
|
100021c0: fc06 sd ra,56(sp)
|
4137 |
|
|
100021c2: e852 sd s4,16(sp)
|
4138 |
|
|
100021c4: 0080 addi s0,sp,64
|
4139 |
|
|
unsigned long pos = 999999999;
|
4140 |
|
|
100021c6: 3b9ad4b7 lui s1,0x3b9ad
|
4141 |
|
|
{
|
4142 |
|
|
100021ca: 892a mv s2,a0
|
4143 |
|
|
100021cc: 49a5 li s3,9
|
4144 |
|
|
unsigned long remainder = num;
|
4145 |
|
|
int found_largest_digit = 0;
|
4146 |
|
|
100021ce: 4781 li a5,0
|
4147 |
|
|
unsigned long pos = 999999999;
|
4148 |
|
|
100021d0: 9ff48493 addi s1,s1,-1537 # 3b9ac9ff <_time_slice_prio_ceiling+0x2b9a2c9b>
|
4149 |
|
|
|
4150 |
|
|
while (pos >= 9) {
|
4151 |
|
|
if (found_largest_digit || remainder > pos) {
|
4152 |
|
|
found_largest_digit = 1;
|
4153 |
|
|
_char_out((int)((remainder / (pos + 1)) + 48));
|
4154 |
|
|
100021d4: 10005b37 lui s6,0x10005
|
4155 |
|
|
}
|
4156 |
|
|
remainder %= (pos + 1);
|
4157 |
|
|
pos /= 10;
|
4158 |
|
|
100021d8: 4aa9 li s5,10
|
4159 |
|
|
100021da: 00148a13 addi s4,s1,1
|
4160 |
|
|
if (found_largest_digit || remainder > pos) {
|
4161 |
|
|
100021de: e399 bnez a5,100021e4 <_printk_dec_ulong+0x32>
|
4162 |
|
|
100021e0: 0124fa63 bleu s2,s1,100021f4 <_printk_dec_ulong+0x42>
|
4163 |
|
|
_char_out((int)((remainder / (pos + 1)) + 48));
|
4164 |
|
|
100021e4: 03495533 divu a0,s2,s4
|
4165 |
|
|
100021e8: 270b3783 ld a5,624(s6) # 10005270 <_char_out>
|
4166 |
|
|
100021ec: 0305051b addiw a0,a0,48
|
4167 |
|
|
100021f0: 9782 jalr a5
|
4168 |
|
|
found_largest_digit = 1;
|
4169 |
|
|
100021f2: 4785 li a5,1
|
4170 |
|
|
100021f4: 39fd addiw s3,s3,-1
|
4171 |
|
|
remainder %= (pos + 1);
|
4172 |
|
|
100021f6: 03497933 remu s2,s2,s4
|
4173 |
|
|
pos /= 10;
|
4174 |
|
|
100021fa: 0354d4b3 divu s1,s1,s5
|
4175 |
|
|
while (pos >= 9) {
|
4176 |
|
|
100021fe: fc099ee3 bnez s3,100021da <_printk_dec_ulong+0x28>
|
4177 |
|
|
}
|
4178 |
|
|
_char_out((int)(remainder + 48));
|
4179 |
|
|
}
|
4180 |
|
|
10002202: 7442 ld s0,48(sp)
|
4181 |
|
|
_char_out((int)(remainder + 48));
|
4182 |
|
|
10002204: 100057b7 lui a5,0x10005
|
4183 |
|
|
}
|
4184 |
|
|
10002208: 70e2 ld ra,56(sp)
|
4185 |
|
|
1000220a: 74a2 ld s1,40(sp)
|
4186 |
|
|
1000220c: 69e2 ld s3,24(sp)
|
4187 |
|
|
1000220e: 6a42 ld s4,16(sp)
|
4188 |
|
|
10002210: 6aa2 ld s5,8(sp)
|
4189 |
|
|
10002212: 6b02 ld s6,0(sp)
|
4190 |
|
|
_char_out((int)(remainder + 48));
|
4191 |
|
|
10002214: 2707b303 ld t1,624(a5) # 10005270 <_char_out>
|
4192 |
|
|
10002218: 0309051b addiw a0,s2,48
|
4193 |
|
|
}
|
4194 |
|
|
1000221c: 7902 ld s2,32(sp)
|
4195 |
|
|
1000221e: 6121 addi sp,sp,64
|
4196 |
|
|
_char_out((int)(remainder + 48));
|
4197 |
|
|
10002220: 8302 jr t1
|
4198 |
|
|
|
4199 |
|
|
0000000010002222 <__printk_hook_install>:
|
4200 |
|
|
{
|
4201 |
|
|
10002222: 1141 addi sp,sp,-16
|
4202 |
|
|
10002224: e422 sd s0,8(sp)
|
4203 |
|
|
10002226: 0800 addi s0,sp,16
|
4204 |
|
|
}
|
4205 |
|
|
10002228: 6422 ld s0,8(sp)
|
4206 |
|
|
_char_out = fn;
|
4207 |
|
|
1000222a: 100057b7 lui a5,0x10005
|
4208 |
|
|
1000222e: 26a7b823 sd a0,624(a5) # 10005270 <_char_out>
|
4209 |
|
|
}
|
4210 |
|
|
10002232: 0141 addi sp,sp,16
|
4211 |
|
|
10002234: 8082 ret
|
4212 |
|
|
|
4213 |
|
|
0000000010002236 :
|
4214 |
|
|
{
|
4215 |
|
|
10002236: 7135 addi sp,sp,-160
|
4216 |
|
|
10002238: e8a2 sd s0,80(sp)
|
4217 |
|
|
1000223a: e4a6 sd s1,72(sp)
|
4218 |
|
|
1000223c: 1080 addi s0,sp,96
|
4219 |
|
|
1000223e: e0ca sd s2,64(sp)
|
4220 |
|
|
10002240: fc4e sd s3,56(sp)
|
4221 |
|
|
10002242: f852 sd s4,48(sp)
|
4222 |
|
|
10002244: f456 sd s5,40(sp)
|
4223 |
|
|
10002246: ec86 sd ra,88(sp)
|
4224 |
|
|
10002248: f05a sd s6,32(sp)
|
4225 |
|
|
1000224a: ec5e sd s7,24(sp)
|
4226 |
|
|
1000224c: e862 sd s8,16(sp)
|
4227 |
|
|
va_start(ap, fmt);
|
4228 |
|
|
1000224e: 00840493 addi s1,s0,8
|
4229 |
|
|
{
|
4230 |
|
|
10002252: 8a2a mv s4,a0
|
4231 |
|
|
10002254: e40c sd a1,8(s0)
|
4232 |
|
|
10002256: e810 sd a2,16(s0)
|
4233 |
|
|
10002258: ec14 sd a3,24(s0)
|
4234 |
|
|
1000225a: f018 sd a4,32(s0)
|
4235 |
|
|
1000225c: f41c sd a5,40(s0)
|
4236 |
|
|
1000225e: 03043823 sd a6,48(s0)
|
4237 |
|
|
10002262: 03143c23 sd a7,56(s0)
|
4238 |
|
|
va_start(ap, fmt);
|
4239 |
|
|
10002266: fa943423 sd s1,-88(s0)
|
4240 |
|
|
int might_format = 0; /* 1 if encountered a '%' */
|
4241 |
|
|
1000226a: 4901 li s2,0
|
4242 |
|
|
switch (*fmt) {
|
4243 |
|
|
1000226c: 06900a93 li s5,105
|
4244 |
|
|
_char_out((int)'-');
|
4245 |
|
|
10002270: 100059b7 lui s3,0x10005
|
4246 |
|
|
while (*fmt) {
|
4247 |
|
|
10002274: 000a4503 lbu a0,0(s4)
|
4248 |
|
|
10002278: ed09 bnez a0,10002292
|
4249 |
|
|
}
|
4250 |
|
|
1000227a: 60e6 ld ra,88(sp)
|
4251 |
|
|
1000227c: 6446 ld s0,80(sp)
|
4252 |
|
|
1000227e: 64a6 ld s1,72(sp)
|
4253 |
|
|
10002280: 6906 ld s2,64(sp)
|
4254 |
|
|
10002282: 79e2 ld s3,56(sp)
|
4255 |
|
|
10002284: 7a42 ld s4,48(sp)
|
4256 |
|
|
10002286: 7aa2 ld s5,40(sp)
|
4257 |
|
|
10002288: 7b02 ld s6,32(sp)
|
4258 |
|
|
1000228a: 6be2 ld s7,24(sp)
|
4259 |
|
|
1000228c: 6c42 ld s8,16(sp)
|
4260 |
|
|
1000228e: 610d addi sp,sp,160
|
4261 |
|
|
10002290: 8082 ret
|
4262 |
|
|
if (!might_format) {
|
4263 |
|
|
10002292: 00091b63 bnez s2,100022a8
|
4264 |
|
|
if (*fmt != '%') {
|
4265 |
|
|
10002296: 02500793 li a5,37
|
4266 |
|
|
1000229a: 12f50b63 beq a0,a5,100023d0
|
4267 |
|
|
_char_out((int)*fmt);
|
4268 |
|
|
1000229e: 2709b783 ld a5,624(s3) # 10005270 <_char_out>
|
4269 |
|
|
100022a2: 9782 jalr a5
|
4270 |
|
|
++fmt;
|
4271 |
|
|
100022a4: 0a05 addi s4,s4,1
|
4272 |
|
|
100022a6: b7f9 j 10002274
|
4273 |
|
|
switch (*fmt) {
|
4274 |
|
|
100022a8: 0d550a63 beq a0,s5,1000237c
|
4275 |
|
|
100022ac: 04aae563 bltu s5,a0,100022f6
|
4276 |
|
|
100022b0: 06300793 li a5,99
|
4277 |
|
|
100022b4: 10f50163 beq a0,a5,100023b6
|
4278 |
|
|
100022b8: 02a7e663 bltu a5,a0,100022e4
|
4279 |
|
|
100022bc: 02500793 li a5,37
|
4280 |
|
|
100022c0: 10f50263 beq a0,a5,100023c4
|
4281 |
|
|
100022c4: 05800793 li a5,88
|
4282 |
|
|
100022c8: 06f50163 beq a0,a5,1000232a
|
4283 |
|
|
_char_out((int)'%');
|
4284 |
|
|
100022cc: 27098913 addi s2,s3,624
|
4285 |
|
|
100022d0: 00093783 ld a5,0(s2)
|
4286 |
|
|
100022d4: 02500513 li a0,37
|
4287 |
|
|
100022d8: 9782 jalr a5
|
4288 |
|
|
_char_out((int)*fmt);
|
4289 |
|
|
100022da: 00093783 ld a5,0(s2)
|
4290 |
|
|
100022de: 000a4503 lbu a0,0(s4)
|
4291 |
|
|
100022e2: a0ed j 100023cc
|
4292 |
|
|
switch (*fmt) {
|
4293 |
|
|
100022e4: 06400793 li a5,100
|
4294 |
|
|
100022e8: 08f50a63 beq a0,a5,1000237c
|
4295 |
|
|
100022ec: 06800793 li a5,104
|
4296 |
|
|
100022f0: faf50ae3 beq a0,a5,100022a4
|
4297 |
|
|
100022f4: bfe1 j 100022cc
|
4298 |
|
|
100022f6: 07300793 li a5,115
|
4299 |
|
|
100022fa: 0af50363 beq a0,a5,100023a0
|
4300 |
|
|
100022fe: 04a7ef63 bltu a5,a0,1000235c
|
4301 |
|
|
10002302: 06c00793 li a5,108
|
4302 |
|
|
10002306: f8f50fe3 beq a0,a5,100022a4
|
4303 |
|
|
1000230a: 07000793 li a5,112
|
4304 |
|
|
1000230e: faf51fe3 bne a0,a5,100022cc
|
4305 |
|
|
_char_out('0');
|
4306 |
|
|
10002312: 27098913 addi s2,s3,624
|
4307 |
|
|
10002316: 00093783 ld a5,0(s2)
|
4308 |
|
|
1000231a: 03000513 li a0,48
|
4309 |
|
|
1000231e: 9782 jalr a5
|
4310 |
|
|
_char_out('x');
|
4311 |
|
|
10002320: 00093783 ld a5,0(s2)
|
4312 |
|
|
10002324: 07800513 li a0,120
|
4313 |
|
|
10002328: 9782 jalr a5
|
4314 |
|
|
unsigned long x = va_arg(
|
4315 |
|
|
1000232a: 00848913 addi s2,s1,8
|
4316 |
|
|
1000232e: 0004bb83 ld s7,0(s1)
|
4317 |
|
|
nibble += nibble > 9 ? 87 : 48;
|
4318 |
|
|
10002332: 4c25 li s8,9
|
4319 |
|
|
unsigned long x = va_arg(
|
4320 |
|
|
10002334: 03c00493 li s1,60
|
4321 |
|
|
for (; size; size--) {
|
4322 |
|
|
10002338: 5b71 li s6,-4
|
4323 |
|
|
char nibble = (num >> ((size - 1) << 2) & 0xf);
|
4324 |
|
|
1000233a: 009bd7b3 srl a5,s7,s1
|
4325 |
|
|
1000233e: 8bbd andi a5,a5,15
|
4326 |
|
|
nibble += nibble > 9 ? 87 : 48;
|
4327 |
|
|
10002340: 05700513 li a0,87
|
4328 |
|
|
10002344: 00fc6463 bltu s8,a5,1000234c
|
4329 |
|
|
10002348: 03000513 li a0,48
|
4330 |
|
|
_char_out((int)nibble);
|
4331 |
|
|
1000234c: 2709b703 ld a4,624(s3)
|
4332 |
|
|
10002350: 953e add a0,a0,a5
|
4333 |
|
|
10002352: 34f1 addiw s1,s1,-4
|
4334 |
|
|
10002354: 9702 jalr a4
|
4335 |
|
|
for (; size; size--) {
|
4336 |
|
|
10002356: ff6492e3 bne s1,s6,1000233a
|
4337 |
|
|
1000235a: a081 j 1000239a
|
4338 |
|
|
switch (*fmt) {
|
4339 |
|
|
1000235c: 07800793 li a5,120
|
4340 |
|
|
10002360: fcf505e3 beq a0,a5,1000232a
|
4341 |
|
|
10002364: 07a00793 li a5,122
|
4342 |
|
|
10002368: f2f50ee3 beq a0,a5,100022a4
|
4343 |
|
|
1000236c: 07500793 li a5,117
|
4344 |
|
|
10002370: f4f51ee3 bne a0,a5,100022cc
|
4345 |
|
|
unsigned long u = va_arg(
|
4346 |
|
|
10002374: 00848913 addi s2,s1,8
|
4347 |
|
|
_printk_dec_ulong(u);
|
4348 |
|
|
10002378: 6088 ld a0,0(s1)
|
4349 |
|
|
1000237a: a831 j 10002396
|
4350 |
|
|
long d = va_arg(ap, long);
|
4351 |
|
|
1000237c: 00848913 addi s2,s1,8
|
4352 |
|
|
10002380: 6084 ld s1,0(s1)
|
4353 |
|
|
if (d < 0) {
|
4354 |
|
|
10002382: 0004d963 bgez s1,10002394
|
4355 |
|
|
_char_out((int)'-');
|
4356 |
|
|
10002386: 2709b783 ld a5,624(s3)
|
4357 |
|
|
1000238a: 02d00513 li a0,45
|
4358 |
|
|
d = -d;
|
4359 |
|
|
1000238e: 409004b3 neg s1,s1
|
4360 |
|
|
_char_out((int)'-');
|
4361 |
|
|
10002392: 9782 jalr a5
|
4362 |
|
|
_printk_dec_ulong(d);
|
4363 |
|
|
10002394: 8526 mv a0,s1
|
4364 |
|
|
_printk_dec_ulong(u);
|
4365 |
|
|
10002396: e1dff0ef jal ra,100021b2 <_printk_dec_ulong>
|
4366 |
|
|
int c = va_arg(ap, int);
|
4367 |
|
|
1000239a: 84ca mv s1,s2
|
4368 |
|
|
might_format = 0;
|
4369 |
|
|
1000239c: 4901 li s2,0
|
4370 |
|
|
1000239e: b719 j 100022a4
|
4371 |
|
|
char *s = va_arg(ap, char *);
|
4372 |
|
|
100023a0: 00848913 addi s2,s1,8
|
4373 |
|
|
100023a4: 6084 ld s1,0(s1)
|
4374 |
|
|
while (*s)
|
4375 |
|
|
100023a6: 0004c503 lbu a0,0(s1)
|
4376 |
|
|
100023aa: d965 beqz a0,1000239a
|
4377 |
|
|
_char_out((int)(*s++));
|
4378 |
|
|
100023ac: 2709b783 ld a5,624(s3)
|
4379 |
|
|
100023b0: 0485 addi s1,s1,1
|
4380 |
|
|
100023b2: 9782 jalr a5
|
4381 |
|
|
100023b4: bfcd j 100023a6
|
4382 |
|
|
_char_out(c);
|
4383 |
|
|
100023b6: 2709b783 ld a5,624(s3)
|
4384 |
|
|
100023ba: 4088 lw a0,0(s1)
|
4385 |
|
|
int c = va_arg(ap, int);
|
4386 |
|
|
100023bc: 00848913 addi s2,s1,8
|
4387 |
|
|
_char_out(c);
|
4388 |
|
|
100023c0: 9782 jalr a5
|
4389 |
|
|
100023c2: bfe1 j 1000239a
|
4390 |
|
|
_char_out((int)'%');
|
4391 |
|
|
100023c4: 2709b783 ld a5,624(s3)
|
4392 |
|
|
100023c8: 02500513 li a0,37
|
4393 |
|
|
_char_out((int)*fmt);
|
4394 |
|
|
100023cc: 9782 jalr a5
|
4395 |
|
|
100023ce: b7f9 j 1000239c
|
4396 |
|
|
might_format = 1;
|
4397 |
|
|
100023d0: 4905 li s2,1
|
4398 |
|
|
100023d2: bdc9 j 100022a4
|
4399 |
|
|
|
4400 |
|
|
00000000100023d4 <_ConfigAbsSyms>:
|
4401 |
|
|
/* file is auto-generated, do not modify ! */
|
4402 |
|
|
|
4403 |
|
|
#include
|
4404 |
|
|
|
4405 |
|
|
GEN_ABS_SYM_BEGIN (_ConfigAbsSyms)
|
4406 |
|
|
100023d4: 1141 addi sp,sp,-16
|
4407 |
|
|
100023d6: e422 sd s0,8(sp)
|
4408 |
|
|
100023d8: 0800 addi s0,sp,16
|
4409 |
|
|
GEN_ABSOLUTE_SYM(CONFIG_UART_CONSOLE, 1);
|
4410 |
|
|
GEN_ABSOLUTE_SYM(CONFIG_MICROKERNEL, 1);
|
4411 |
|
|
GEN_ABSOLUTE_SYM(CONFIG_ENABLE_SHELL, 1);
|
4412 |
|
|
GEN_ABSOLUTE_SYM(CONFIG_MEM_POOL_SPLIT_BEFORE_DEFRAG, 1);
|
4413 |
|
|
|
4414 |
|
|
GEN_ABS_SYM_END
|
4415 |
|
|
100023da: 6422 ld s0,8(sp)
|
4416 |
|
|
100023dc: 0141 addi sp,sp,16
|
4417 |
|
|
100023de: 8082 ret
|
4418 |
|
|
|
4419 |
|
|
00000000100023e0 :
|
4420 |
|
|
100023e0: 1141 addi sp,sp,-16
|
4421 |
|
|
100023e2: e406 sd ra,8(sp)
|
4422 |
|
|
100023e4: e022 sd s0,0(sp)
|
4423 |
|
|
100023e6: 10004537 lui a0,0x10004
|
4424 |
|
|
100023ea: 0800 addi s0,sp,16
|
4425 |
|
|
100023ec: 51850513 addi a0,a0,1304 # 10004518
|
4426 |
|
|
100023f0: e47ff0ef jal ra,10002236
|
4427 |
|
|
100023f4: 10004537 lui a0,0x10004
|
4428 |
|
|
100023f8: 55850513 addi a0,a0,1368 # 10004558
|
4429 |
|
|
100023fc: e3bff0ef jal ra,10002236
|
4430 |
|
|
10002400: 10004537 lui a0,0x10004
|
4431 |
|
|
10002404: 58850513 addi a0,a0,1416 # 10004588
|
4432 |
|
|
10002408: e2fff0ef jal ra,10002236
|
4433 |
|
|
1000240c: 60a2 ld ra,8(sp)
|
4434 |
|
|
1000240e: 6402 ld s0,0(sp)
|
4435 |
|
|
10002410: 4501 li a0,0
|
4436 |
|
|
10002412: 0141 addi sp,sp,16
|
4437 |
|
|
10002414: 8082 ret
|
4438 |
|
|
|
4439 |
|
|
0000000010002416 :
|
4440 |
|
|
10002416: 1101 addi sp,sp,-32
|
4441 |
|
|
10002418: e426 sd s1,8(sp)
|
4442 |
|
|
1000241a: 400014b7 lui s1,0x40001
|
4443 |
|
|
1000241e: ec06 sd ra,24(sp)
|
4444 |
|
|
10002420: e822 sd s0,16(sp)
|
4445 |
|
|
10002422: 0486 slli s1,s1,0x1
|
4446 |
|
|
10002424: 1000 addi s0,sp,32
|
4447 |
|
|
10002426: 100005b7 lui a1,0x10000
|
4448 |
|
|
1000242a: 01048513 addi a0,s1,16 # 40001010 <_time_slice_prio_ceiling+0x2fff72ac>
|
4449 |
|
|
1000242e: 13c58593 addi a1,a1,316 # 1000013c <_IsrWrapper>
|
4450 |
|
|
10002432: 59d000ef jal ra,100031ce
|
4451 |
|
|
10002436: 02848513 addi a0,s1,40
|
4452 |
|
|
1000243a: 4581 li a1,0
|
4453 |
|
|
1000243c: 585000ef jal ra,100031c0
|
4454 |
|
|
10002440: 60e2 ld ra,24(sp)
|
4455 |
|
|
10002442: 6442 ld s0,16(sp)
|
4456 |
|
|
10002444: 64a2 ld s1,8(sp)
|
4457 |
|
|
10002446: 4501 li a0,0
|
4458 |
|
|
10002448: 6105 addi sp,sp,32
|
4459 |
|
|
1000244a: 8082 ret
|
4460 |
|
|
|
4461 |
|
|
000000001000244c :
|
4462 |
|
|
1000244c: 1141 addi sp,sp,-16
|
4463 |
|
|
1000244e: e422 sd s0,8(sp)
|
4464 |
|
|
10002450: 0800 addi s0,sp,16
|
4465 |
|
|
10002452: 0f100793 li a5,241
|
4466 |
|
|
10002456: 06f51b63 bne a0,a5,100024cc
|
4467 |
|
|
1000245a: 679d lui a5,0x7
|
4468 |
|
|
1000245c: 0005871b sext.w a4,a1
|
4469 |
|
|
10002460: 75578793 addi a5,a5,1877 # 7755 <__bss_num_words+0x69b5>
|
4470 |
|
|
10002464: 04f70a63 beq a4,a5,100024b8
|
4471 |
|
|
10002468: 6795 lui a5,0x5
|
4472 |
|
|
1000246a: 57778793 addi a5,a5,1399 # 5577 <__bss_num_words+0x47d7>
|
4473 |
|
|
1000246e: 04f70a63 beq a4,a5,100024c2
|
4474 |
|
|
10002472: f985879b addiw a5,a1,-104
|
4475 |
|
|
10002476: 03079693 slli a3,a5,0x30
|
4476 |
|
|
1000247a: 92c1 srli a3,a3,0x30
|
4477 |
|
|
1000247c: 4765 li a4,25
|
4478 |
|
|
1000247e: 00d76d63 bltu a4,a3,10002498
|
4479 |
|
|
10002482: 00379713 slli a4,a5,0x3
|
4480 |
|
|
10002486: 100047b7 lui a5,0x10004
|
4481 |
|
|
1000248a: 3e878793 addi a5,a5,1000 # 100043e8
|
4482 |
|
|
1000248e: 97ba add a5,a5,a4
|
4483 |
|
|
10002490: 6388 ld a0,0(a5)
|
4484 |
|
|
10002492: 6422 ld s0,8(sp)
|
4485 |
|
|
10002494: 0141 addi sp,sp,16
|
4486 |
|
|
10002496: 8082 ret
|
4487 |
|
|
10002498: b005859b addiw a1,a1,-1280
|
4488 |
|
|
1000249c: 03059713 slli a4,a1,0x30
|
4489 |
|
|
100024a0: 9341 srli a4,a4,0x30
|
4490 |
|
|
100024a2: 4795 li a5,5
|
4491 |
|
|
100024a4: 02e7e463 bltu a5,a4,100024cc
|
4492 |
|
|
100024a8: 100047b7 lui a5,0x10004
|
4493 |
|
|
100024ac: 058e slli a1,a1,0x3
|
4494 |
|
|
100024ae: 3b878793 addi a5,a5,952 # 100043b8
|
4495 |
|
|
100024b2: 95be add a1,a1,a5
|
4496 |
|
|
100024b4: 6188 ld a0,0(a1)
|
4497 |
|
|
100024b6: bff1 j 10002492
|
4498 |
|
|
100024b8: 10004537 lui a0,0x10004
|
4499 |
|
|
100024bc: 4c050513 addi a0,a0,1216 # 100044c0
|
4500 |
|
|
100024c0: bfc9 j 10002492
|
4501 |
|
|
100024c2: 10004537 lui a0,0x10004
|
4502 |
|
|
100024c6: 4d850513 addi a0,a0,1240 # 100044d8
|
4503 |
|
|
100024ca: b7e1 j 10002492
|
4504 |
|
|
100024cc: 10004537 lui a0,0x10004
|
4505 |
|
|
100024d0: 4b850513 addi a0,a0,1208 # 100044b8
|
4506 |
|
|
100024d4: bf7d j 10002492
|
4507 |
|
|
|
4508 |
|
|
00000000100024d6 :
|
4509 |
|
|
|
4510 |
|
|
/**
|
4511 |
|
|
* @brief Get technology name
|
4512 |
|
|
*/
|
4513 |
|
|
const char *const get_tech_name(uint32_t tech)
|
4514 |
|
|
{
|
4515 |
|
|
100024d6: 1141 addi sp,sp,-16
|
4516 |
|
|
100024d8: e422 sd s0,8(sp)
|
4517 |
|
|
100024da: 0800 addi s0,sp,16
|
4518 |
|
|
switch (tech) {
|
4519 |
|
|
100024dc: 02400793 li a5,36
|
4520 |
|
|
100024e0: 00f50c63 beq a0,a5,100024f8
|
4521 |
|
|
100024e4: 03100793 li a5,49
|
4522 |
|
|
100024e8: 00f50f63 beq a0,a5,10002506
|
4523 |
|
|
100024ec: e115 bnez a0,10002510
|
4524 |
|
|
case TECH_INFERRED: return "inferred";
|
4525 |
|
|
100024ee: 10004537 lui a0,0x10004
|
4526 |
|
|
100024f2: 4f050513 addi a0,a0,1264 # 100044f0
|
4527 |
|
|
100024f6: a029 j 10002500
|
4528 |
|
|
case TECH_VIRTEX6: return "Virtex6";
|
4529 |
|
|
100024f8: 10004537 lui a0,0x10004
|
4530 |
|
|
100024fc: 50050513 addi a0,a0,1280 # 10004500
|
4531 |
|
|
case TECH_KINTEX7: return "Kintex7";
|
4532 |
|
|
default:;
|
4533 |
|
|
}
|
4534 |
|
|
return "unknown";
|
4535 |
|
|
}
|
4536 |
|
|
10002500: 6422 ld s0,8(sp)
|
4537 |
|
|
10002502: 0141 addi sp,sp,16
|
4538 |
|
|
10002504: 8082 ret
|
4539 |
|
|
case TECH_KINTEX7: return "Kintex7";
|
4540 |
|
|
10002506: 10004537 lui a0,0x10004
|
4541 |
|
|
1000250a: 50850513 addi a0,a0,1288 # 10004508
|
4542 |
|
|
1000250e: bfcd j 10002500
|
4543 |
|
|
return "unknown";
|
4544 |
|
|
10002510: 10004537 lui a0,0x10004
|
4545 |
|
|
10002514: 51050513 addi a0,a0,1296 # 10004510
|
4546 |
|
|
10002518: b7e5 j 10002500
|
4547 |
|
|
|
4548 |
|
|
000000001000251a :
|
4549 |
|
|
*
|
4550 |
|
|
* This function reads information from the PNP slave device that is mapped
|
4551 |
|
|
* into hardcoded address __PNP (0xFFFFF000).
|
4552 |
|
|
*/
|
4553 |
|
|
static int shell_cmd_soc_pnp(int argc, char *argv[])
|
4554 |
|
|
{
|
4555 |
|
|
1000251a: 7119 addi sp,sp,-128
|
4556 |
|
|
adr_type xaddr, xmask, xsize;
|
4557 |
|
|
volatile uint32_t *iter;
|
4558 |
|
|
MasterDescrWord mcfg;
|
4559 |
|
|
int mst_cnt=0, slv_cnt=0;
|
4560 |
|
|
|
4561 |
|
|
tech = READ32(&__PNP->tech);
|
4562 |
|
|
1000251c: 20000537 lui a0,0x20000
|
4563 |
|
|
{
|
4564 |
|
|
10002520: fc86 sd ra,120(sp)
|
4565 |
|
|
10002522: f8a2 sd s0,112(sp)
|
4566 |
|
|
10002524: f4a6 sd s1,104(sp)
|
4567 |
|
|
10002526: 0100 addi s0,sp,128
|
4568 |
|
|
10002528: f0ca sd s2,96(sp)
|
4569 |
|
|
1000252a: ecce sd s3,88(sp)
|
4570 |
|
|
1000252c: e8d2 sd s4,80(sp)
|
4571 |
|
|
1000252e: e4d6 sd s5,72(sp)
|
4572 |
|
|
10002530: e0da sd s6,64(sp)
|
4573 |
|
|
10002532: f862 sd s8,48(sp)
|
4574 |
|
|
10002534: f466 sd s9,40(sp)
|
4575 |
|
|
10002536: f06a sd s10,32(sp)
|
4576 |
|
|
10002538: ec6e sd s11,24(sp)
|
4577 |
|
|
1000253a: fc5e sd s7,56(sp)
|
4578 |
|
|
tech = READ32(&__PNP->tech);
|
4579 |
|
|
1000253c: e0150513 addi a0,a0,-511 # 1ffffe01 <_time_slice_prio_ceiling+0xfff609d>
|
4580 |
|
|
10002540: 050e slli a0,a0,0x3
|
4581 |
|
|
10002542: 463000ef jal ra,100031a4
|
4582 |
|
|
10002546: 0005049b sext.w s1,a0
|
4583 |
|
|
slaves_total = (tech >> 8) & 0xff;
|
4584 |
|
|
printk("# RISC-V: Rocket-Chip demonstration design\n");
|
4585 |
|
|
1000254a: 10004537 lui a0,0x10004
|
4586 |
|
|
1000254e: 5d050513 addi a0,a0,1488 # 100045d0
|
4587 |
|
|
10002552: ce5ff0ef jal ra,10002236
|
4588 |
|
|
hwid = READ32(&__PNP->hwid);
|
4589 |
|
|
10002556: 00100537 lui a0,0x100
|
4590 |
|
|
1000255a: 157d addi a0,a0,-1
|
4591 |
|
|
1000255c: 0532 slli a0,a0,0xc
|
4592 |
|
|
1000255e: 447000ef jal ra,100031a4
|
4593 |
|
|
printk("# HW id: 0x%x\n", hwid);
|
4594 |
|
|
10002562: 0005059b sext.w a1,a0
|
4595 |
|
|
10002566: 10004537 lui a0,0x10004
|
4596 |
|
|
1000256a: 60050513 addi a0,a0,1536 # 10004600
|
4597 |
|
|
1000256e: cc9ff0ef jal ra,10002236
|
4598 |
|
|
hwid = READ32(&__PNP->fwid);
|
4599 |
|
|
10002572: 40000537 lui a0,0x40000
|
4600 |
|
|
10002576: c0150513 addi a0,a0,-1023 # 3ffffc01 <_time_slice_prio_ceiling+0x2fff5e9d>
|
4601 |
|
|
1000257a: 050a slli a0,a0,0x2
|
4602 |
|
|
1000257c: 429000ef jal ra,100031a4
|
4603 |
|
|
printk("# FW id: 0x%x\n", hwid);
|
4604 |
|
|
10002580: 0005059b sext.w a1,a0
|
4605 |
|
|
10002584: 10004537 lui a0,0x10004
|
4606 |
|
|
10002588: 61850513 addi a0,a0,1560 # 10004618
|
4607 |
|
|
1000258c: cabff0ef jal ra,10002236
|
4608 |
|
|
printk("# Target technology: %s\n", get_tech_name(tech & 0xFF));
|
4609 |
|
|
10002590: 0ff4f513 andi a0,s1,255
|
4610 |
|
|
10002594: f43ff0ef jal ra,100024d6
|
4611 |
|
|
10002598: 85aa mv a1,a0
|
4612 |
|
|
1000259a: 10004537 lui a0,0x10004
|
4613 |
|
|
1000259e: 63050513 addi a0,a0,1584 # 10004630
|
4614 |
|
|
|
4615 |
|
|
iter = (volatile uint32_t *)__PNP->cfg_table;
|
4616 |
|
|
mcfg.val = READ32(iter);
|
4617 |
|
|
100025a2: 040004b7 lui s1,0x4000
|
4618 |
|
|
printk("# Target technology: %s\n", get_tech_name(tech & 0xFF));
|
4619 |
|
|
100025a6: c91ff0ef jal ra,10002236
|
4620 |
|
|
mcfg.val = READ32(iter);
|
4621 |
|
|
100025aa: fc148493 addi s1,s1,-63 # 3ffffc1 <__bss_num_words+0x3fff221>
|
4622 |
|
|
100025ae: 00649513 slli a0,s1,0x6
|
4623 |
|
|
100025b2: 3f3000ef jal ra,100031a4
|
4624 |
|
|
return VENDOR_NAME;
|
4625 |
|
|
100025b6: 10004a37 lui s4,0x10004
|
4626 |
|
|
return UNKOWN_ID_NAME;
|
4627 |
|
|
100025ba: 10004ab7 lui s5,0x10004
|
4628 |
|
|
mcfg.val = READ32(iter);
|
4629 |
|
|
100025be: 892a mv s2,a0
|
4630 |
|
|
int mst_cnt=0, slv_cnt=0;
|
4631 |
|
|
100025c0: 4981 li s3,0
|
4632 |
|
|
100025c2: 4b01 li s6,0
|
4633 |
|
|
iter = (volatile uint32_t *)__PNP->cfg_table;
|
4634 |
|
|
100025c4: 049a slli s1,s1,0x6
|
4635 |
|
|
get_vendor_name(vid), get_device_name(vid, did));
|
4636 |
|
|
} else {
|
4637 |
|
|
SlaveConfigType *pslv = (SlaveConfigType *)iter;
|
4638 |
|
|
vid = READ16(&pslv->vid);
|
4639 |
|
|
did = READ16(&pslv->did);
|
4640 |
|
|
printk("# AXI4: slv%d: %s %s\n", slv_cnt++,
|
4641 |
|
|
100025c6: 10004c37 lui s8,0x10004
|
4642 |
|
|
xmask = READ32(&pslv->xmask);
|
4643 |
|
|
xmask ^= 0xFFFFFFFF;
|
4644 |
|
|
xsize = xmask + 1;
|
4645 |
|
|
|
4646 |
|
|
|
4647 |
|
|
printk("# %x...%x, size = ",
|
4648 |
|
|
100025ca: 10004cb7 lui s9,0x10004
|
4649 |
|
|
if (xsize < 1024) {
|
4650 |
|
|
printk("%d bytes\n", (int)xsize);
|
4651 |
|
|
} else if (xsize < 1024*1024) {
|
4652 |
|
|
printk("%d KB\n", (int)(xsize >> 10));
|
4653 |
|
|
} else {
|
4654 |
|
|
printk("%d MB\n", (int)(xsize >> 20));
|
4655 |
|
|
100025ce: 10004d37 lui s10,0x10004
|
4656 |
|
|
printk("%d KB\n", (int)(xsize >> 10));
|
4657 |
|
|
100025d2: 10004db7 lui s11,0x10004
|
4658 |
|
|
return VENDOR_NAME;
|
4659 |
|
|
100025d6: 5b8a0a13 addi s4,s4,1464 # 100045b8
|
4660 |
|
|
return UNKOWN_ID_NAME;
|
4661 |
|
|
100025da: 4b8a8a93 addi s5,s5,1208 # 100044b8
|
4662 |
|
|
while (mcfg.bits.descrtype != PNP_CFG_TYPE_INVALID) {
|
4663 |
|
|
100025de: 0089579b srliw a5,s2,0x8
|
4664 |
|
|
100025e2: 8b8d andi a5,a5,3
|
4665 |
|
|
100025e4: e38d bnez a5,10002606
|
4666 |
|
|
|
4667 |
|
|
iter = (volatile uint32_t *)((uint8_t *)iter + mcfg.bits.descrsize);
|
4668 |
|
|
mcfg.val = READ32(iter);
|
4669 |
|
|
}
|
4670 |
|
|
return 0;
|
4671 |
|
|
}
|
4672 |
|
|
100025e6: 70e6 ld ra,120(sp)
|
4673 |
|
|
100025e8: 7446 ld s0,112(sp)
|
4674 |
|
|
100025ea: 74a6 ld s1,104(sp)
|
4675 |
|
|
100025ec: 7906 ld s2,96(sp)
|
4676 |
|
|
100025ee: 69e6 ld s3,88(sp)
|
4677 |
|
|
100025f0: 6a46 ld s4,80(sp)
|
4678 |
|
|
100025f2: 6aa6 ld s5,72(sp)
|
4679 |
|
|
100025f4: 6b06 ld s6,64(sp)
|
4680 |
|
|
100025f6: 7be2 ld s7,56(sp)
|
4681 |
|
|
100025f8: 7c42 ld s8,48(sp)
|
4682 |
|
|
100025fa: 7ca2 ld s9,40(sp)
|
4683 |
|
|
100025fc: 7d02 ld s10,32(sp)
|
4684 |
|
|
100025fe: 6de2 ld s11,24(sp)
|
4685 |
|
|
10002600: 4501 li a0,0
|
4686 |
|
|
10002602: 6109 addi sp,sp,128
|
4687 |
|
|
10002604: 8082 ret
|
4688 |
|
|
if (mcfg.bits.descrtype == PNP_CFG_TYPE_MASTER) {
|
4689 |
|
|
10002606: 4705 li a4,1
|
4690 |
|
|
10002608: 00648513 addi a0,s1,6
|
4691 |
|
|
1000260c: 00448b93 addi s7,s1,4
|
4692 |
|
|
10002610: 06e79463 bne a5,a4,10002678
|
4693 |
|
|
vid = READ16(&pmst->vid);
|
4694 |
|
|
10002614: 381000ef jal ra,10003194
|
4695 |
|
|
10002618: f8a43423 sd a0,-120(s0)
|
4696 |
|
|
did = READ16(&pmst->did);
|
4697 |
|
|
1000261c: 855e mv a0,s7
|
4698 |
|
|
1000261e: 377000ef jal ra,10003194
|
4699 |
|
|
if (vid != VENDOR_GNSSSENSOR) {
|
4700 |
|
|
10002622: f8843783 ld a5,-120(s0)
|
4701 |
|
|
did = READ16(&pmst->did);
|
4702 |
|
|
10002626: 85aa mv a1,a0
|
4703 |
|
|
if (vid != VENDOR_GNSSSENSOR) {
|
4704 |
|
|
10002628: 0f100693 li a3,241
|
4705 |
|
|
1000262c: 0007851b sext.w a0,a5
|
4706 |
|
|
printk("# AXI4: mst%d: %s %s\n", mst_cnt++,
|
4707 |
|
|
10002630: 001b071b addiw a4,s6,1
|
4708 |
|
|
return VENDOR_NAME;
|
4709 |
|
|
10002634: 8652 mv a2,s4
|
4710 |
|
|
if (vid != VENDOR_GNSSSENSOR) {
|
4711 |
|
|
10002636: 00d50363 beq a0,a3,1000263c
|
4712 |
|
|
return UNKOWN_ID_NAME;
|
4713 |
|
|
1000263a: 8656 mv a2,s5
|
4714 |
|
|
printk("# AXI4: mst%d: %s %s\n", mst_cnt++,
|
4715 |
|
|
1000263c: 853e mv a0,a5
|
4716 |
|
|
1000263e: f8e43023 sd a4,-128(s0)
|
4717 |
|
|
10002642: f8c43423 sd a2,-120(s0)
|
4718 |
|
|
10002646: e07ff0ef jal ra,1000244c
|
4719 |
|
|
1000264a: f8843603 ld a2,-120(s0)
|
4720 |
|
|
1000264e: 86aa mv a3,a0
|
4721 |
|
|
10002650: 10004537 lui a0,0x10004
|
4722 |
|
|
10002654: 85da mv a1,s6
|
4723 |
|
|
10002656: 65050513 addi a0,a0,1616 # 10004650
|
4724 |
|
|
1000265a: bddff0ef jal ra,10002236
|
4725 |
|
|
1000265e: f8043703 ld a4,-128(s0)
|
4726 |
|
|
10002662: 8bce mv s7,s3
|
4727 |
|
|
10002664: 8b3a mv s6,a4
|
4728 |
|
|
iter = (volatile uint32_t *)((uint8_t *)iter + mcfg.bits.descrsize);
|
4729 |
|
|
10002666: 0ff97913 andi s2,s2,255
|
4730 |
|
|
1000266a: 94ca add s1,s1,s2
|
4731 |
|
|
mcfg.val = READ32(iter);
|
4732 |
|
|
1000266c: 8526 mv a0,s1
|
4733 |
|
|
1000266e: 337000ef jal ra,100031a4
|
4734 |
|
|
10002672: 892a mv s2,a0
|
4735 |
|
|
10002674: 89de mv s3,s7
|
4736 |
|
|
10002676: b7a5 j 100025de
|
4737 |
|
|
vid = READ16(&pslv->vid);
|
4738 |
|
|
10002678: 31d000ef jal ra,10003194
|
4739 |
|
|
1000267c: f8a43423 sd a0,-120(s0)
|
4740 |
|
|
did = READ16(&pslv->did);
|
4741 |
|
|
10002680: 855e mv a0,s7
|
4742 |
|
|
10002682: 313000ef jal ra,10003194
|
4743 |
|
|
if (vid != VENDOR_GNSSSENSOR) {
|
4744 |
|
|
10002686: f8843783 ld a5,-120(s0)
|
4745 |
|
|
1000268a: 0f100713 li a4,241
|
4746 |
|
|
did = READ16(&pslv->did);
|
4747 |
|
|
1000268e: 85aa mv a1,a0
|
4748 |
|
|
if (vid != VENDOR_GNSSSENSOR) {
|
4749 |
|
|
10002690: 0007869b sext.w a3,a5
|
4750 |
|
|
printk("# AXI4: slv%d: %s %s\n", slv_cnt++,
|
4751 |
|
|
10002694: 00198b9b addiw s7,s3,1
|
4752 |
|
|
return VENDOR_NAME;
|
4753 |
|
|
10002698: 8652 mv a2,s4
|
4754 |
|
|
if (vid != VENDOR_GNSSSENSOR) {
|
4755 |
|
|
1000269a: 00e68363 beq a3,a4,100026a0
|
4756 |
|
|
return UNKOWN_ID_NAME;
|
4757 |
|
|
1000269e: 8656 mv a2,s5
|
4758 |
|
|
printk("# AXI4: slv%d: %s %s\n", slv_cnt++,
|
4759 |
|
|
100026a0: 853e mv a0,a5
|
4760 |
|
|
100026a2: f8c43423 sd a2,-120(s0)
|
4761 |
|
|
100026a6: da7ff0ef jal ra,1000244c
|
4762 |
|
|
100026aa: f8843603 ld a2,-120(s0)
|
4763 |
|
|
100026ae: 86aa mv a3,a0
|
4764 |
|
|
100026b0: 85ce mv a1,s3
|
4765 |
|
|
100026b2: 670c0513 addi a0,s8,1648 # 10004670
|
4766 |
|
|
100026b6: b81ff0ef jal ra,10002236
|
4767 |
|
|
xaddr = READ32(&pslv->xaddr);
|
4768 |
|
|
100026ba: 00c48513 addi a0,s1,12
|
4769 |
|
|
100026be: 2e7000ef jal ra,100031a4
|
4770 |
|
|
100026c2: 02051593 slli a1,a0,0x20
|
4771 |
|
|
100026c6: 9181 srli a1,a1,0x20
|
4772 |
|
|
xmask = READ32(&pslv->xmask);
|
4773 |
|
|
100026c8: 00848513 addi a0,s1,8
|
4774 |
|
|
xaddr = READ32(&pslv->xaddr);
|
4775 |
|
|
100026cc: f8b43423 sd a1,-120(s0)
|
4776 |
|
|
xmask = READ32(&pslv->xmask);
|
4777 |
|
|
100026d0: 2d5000ef jal ra,100031a4
|
4778 |
|
|
xmask ^= 0xFFFFFFFF;
|
4779 |
|
|
100026d4: fff54613 not a2,a0
|
4780 |
|
|
printk("# %x...%x, size = ",
|
4781 |
|
|
100026d8: f8843583 ld a1,-120(s0)
|
4782 |
|
|
xmask ^= 0xFFFFFFFF;
|
4783 |
|
|
100026dc: 1602 slli a2,a2,0x20
|
4784 |
|
|
100026de: 9201 srli a2,a2,0x20
|
4785 |
|
|
xsize = xmask + 1;
|
4786 |
|
|
100026e0: 00160993 addi s3,a2,1
|
4787 |
|
|
printk("# %x...%x, size = ",
|
4788 |
|
|
100026e4: 690c8513 addi a0,s9,1680 # 10004690
|
4789 |
|
|
100026e8: 962e add a2,a2,a1
|
4790 |
|
|
100026ea: b4dff0ef jal ra,10002236
|
4791 |
|
|
if (xsize < 1024) {
|
4792 |
|
|
100026ee: 3ff00793 li a5,1023
|
4793 |
|
|
100026f2: 0137eb63 bltu a5,s3,10002708
|
4794 |
|
|
printk("%d bytes\n", (int)xsize);
|
4795 |
|
|
100026f6: 10004537 lui a0,0x10004
|
4796 |
|
|
100026fa: 0009859b sext.w a1,s3
|
4797 |
|
|
100026fe: 6a850513 addi a0,a0,1704 # 100046a8
|
4798 |
|
|
printk("%d MB\n", (int)(xsize >> 20));
|
4799 |
|
|
10002702: b35ff0ef jal ra,10002236
|
4800 |
|
|
10002706: b785 j 10002666
|
4801 |
|
|
} else if (xsize < 1024*1024) {
|
4802 |
|
|
10002708: 001007b7 lui a5,0x100
|
4803 |
|
|
1000270c: 00f9f763 bleu a5,s3,1000271a
|
4804 |
|
|
printk("%d KB\n", (int)(xsize >> 10));
|
4805 |
|
|
10002710: 00a9d593 srli a1,s3,0xa
|
4806 |
|
|
10002714: 6b8d8513 addi a0,s11,1720 # 100046b8
|
4807 |
|
|
10002718: b7ed j 10002702
|
4808 |
|
|
printk("%d MB\n", (int)(xsize >> 20));
|
4809 |
|
|
1000271a: 0149d593 srli a1,s3,0x14
|
4810 |
|
|
1000271e: 6c0d0513 addi a0,s10,1728 # 100046c0
|
4811 |
|
|
10002722: b7c5 j 10002702
|
4812 |
|
|
|
4813 |
|
|
0000000010002724 :
|
4814 |
|
|
* @brief Check hardware target configuration is it inferred or not.
|
4815 |
|
|
*
|
4816 |
|
|
* inferred hardware target is used for RTL simulation of the whole SOC design.
|
4817 |
|
|
*/
|
4818 |
|
|
uint32_t soc_is_rtl_simulation()
|
4819 |
|
|
{
|
4820 |
|
|
10002724: 1141 addi sp,sp,-16
|
4821 |
|
|
uint32_t tech = READ32(&__PNP->tech);
|
4822 |
|
|
10002726: 20000537 lui a0,0x20000
|
4823 |
|
|
{
|
4824 |
|
|
1000272a: e022 sd s0,0(sp)
|
4825 |
|
|
1000272c: e406 sd ra,8(sp)
|
4826 |
|
|
1000272e: 0800 addi s0,sp,16
|
4827 |
|
|
uint32_t tech = READ32(&__PNP->tech);
|
4828 |
|
|
10002730: e0150513 addi a0,a0,-511 # 1ffffe01 <_time_slice_prio_ceiling+0xfff609d>
|
4829 |
|
|
10002734: 050e slli a0,a0,0x3
|
4830 |
|
|
10002736: 26f000ef jal ra,100031a4
|
4831 |
|
|
return (tech & 0xff) == TECH_INFERRED ? 1: 0;
|
4832 |
|
|
}
|
4833 |
|
|
1000273a: 60a2 ld ra,8(sp)
|
4834 |
|
|
1000273c: 6402 ld s0,0(sp)
|
4835 |
|
|
return (tech & 0xff) == TECH_INFERRED ? 1: 0;
|
4836 |
|
|
1000273e: 0ff57513 andi a0,a0,255
|
4837 |
|
|
}
|
4838 |
|
|
10002742: 00153513 seqz a0,a0
|
4839 |
|
|
10002746: 0141 addi sp,sp,16
|
4840 |
|
|
10002748: 8082 ret
|
4841 |
|
|
|
4842 |
|
|
000000001000274a :
|
4843 |
|
|
/******************/
|
4844 |
|
|
/* executed once */
|
4845 |
|
|
/* *Int_Par_Ref == 1, becomes 4 */
|
4846 |
|
|
|
4847 |
|
|
One_Fifty *Int_Par_Ref;
|
4848 |
|
|
{
|
4849 |
|
|
1000274a: 1141 addi sp,sp,-16
|
4850 |
|
|
1000274c: e422 sd s0,8(sp)
|
4851 |
|
|
1000274e: 0800 addi s0,sp,16
|
4852 |
|
|
One_Fifty Int_Loc;
|
4853 |
|
|
Enumeration Enum_Loc;
|
4854 |
|
|
|
4855 |
|
|
Int_Loc = *Int_Par_Ref + 10;
|
4856 |
|
|
do /* executed once */
|
4857 |
|
|
if (Ch_1_Glob == 'A')
|
4858 |
|
|
10002750: 100087b7 lui a5,0x10008
|
4859 |
|
|
10002754: 7dc7c703 lbu a4,2012(a5) # 100087dc
|
4860 |
|
|
10002758: 04100793 li a5,65
|
4861 |
|
|
1000275c: 00f71a63 bne a4,a5,10002770
|
4862 |
|
|
/* then, executed */
|
4863 |
|
|
{
|
4864 |
|
|
Int_Loc -= 1;
|
4865 |
|
|
10002760: 411c lw a5,0(a0)
|
4866 |
|
|
*Int_Par_Ref = Int_Loc - Int_Glob;
|
4867 |
|
|
10002762: 10008737 lui a4,0x10008
|
4868 |
|
|
10002766: 7d872703 lw a4,2008(a4) # 100087d8
|
4869 |
|
|
Int_Loc -= 1;
|
4870 |
|
|
1000276a: 27a5 addiw a5,a5,9
|
4871 |
|
|
*Int_Par_Ref = Int_Loc - Int_Glob;
|
4872 |
|
|
1000276c: 9f99 subw a5,a5,a4
|
4873 |
|
|
1000276e: c11c sw a5,0(a0)
|
4874 |
|
|
Enum_Loc = Ident_1;
|
4875 |
|
|
} /* if */
|
4876 |
|
|
while (Enum_Loc != Ident_1); /* true */
|
4877 |
|
|
} /* Proc_2 */
|
4878 |
|
|
10002770: 6422 ld s0,8(sp)
|
4879 |
|
|
10002772: 0141 addi sp,sp,16
|
4880 |
|
|
10002774: 8082 ret
|
4881 |
|
|
|
4882 |
|
|
0000000010002776 :
|
4883 |
|
|
/* executed once */
|
4884 |
|
|
/* Ptr_Ref_Par becomes Ptr_Glob */
|
4885 |
|
|
|
4886 |
|
|
Rec_Pointer *Ptr_Ref_Par;
|
4887 |
|
|
|
4888 |
|
|
{
|
4889 |
|
|
10002776: 1141 addi sp,sp,-16
|
4890 |
|
|
10002778: e422 sd s0,8(sp)
|
4891 |
|
|
1000277a: 0800 addi s0,sp,16
|
4892 |
|
|
if (Ptr_Glob != Null)
|
4893 |
|
|
1000277c: 100087b7 lui a5,0x10008
|
4894 |
|
|
10002780: 7e07b703 ld a4,2016(a5) # 100087e0
|
4895 |
|
|
10002784: c319 beqz a4,1000278a
|
4896 |
|
|
/* then, executed */
|
4897 |
|
|
*Ptr_Ref_Par = Ptr_Glob->Ptr_Comp;
|
4898 |
|
|
10002786: 6318 ld a4,0(a4)
|
4899 |
|
|
10002788: e118 sd a4,0(a0)
|
4900 |
|
|
Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
|
4901 |
|
|
1000278a: 7e07b603 ld a2,2016(a5)
|
4902 |
|
|
} /* Proc_3 */
|
4903 |
|
|
1000278e: 6422 ld s0,8(sp)
|
4904 |
|
|
Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
|
4905 |
|
|
10002790: 100087b7 lui a5,0x10008
|
4906 |
|
|
10002794: 7d87a583 lw a1,2008(a5) # 100087d8
|
4907 |
|
|
10002798: 0641 addi a2,a2,16
|
4908 |
|
|
1000279a: 4529 li a0,10
|
4909 |
|
|
} /* Proc_3 */
|
4910 |
|
|
1000279c: 0141 addi sp,sp,16
|
4911 |
|
|
Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
|
4912 |
|
|
1000279e: 7140006f j 10002eb2
|
4913 |
|
|
|
4914 |
|
|
00000000100027a2 :
|
4915 |
|
|
{
|
4916 |
|
|
100027a2: 7179 addi sp,sp,-48
|
4917 |
|
|
100027a4: f406 sd ra,40(sp)
|
4918 |
|
|
100027a6: f022 sd s0,32(sp)
|
4919 |
|
|
100027a8: ec26 sd s1,24(sp)
|
4920 |
|
|
100027aa: e84a sd s2,16(sp)
|
4921 |
|
|
100027ac: e44e sd s3,8(sp)
|
4922 |
|
|
100027ae: 1800 addi s0,sp,48
|
4923 |
|
|
REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;
|
4924 |
|
|
100027b0: 6104 ld s1,0(a0)
|
4925 |
|
|
structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob);
|
4926 |
|
|
100027b2: 100089b7 lui s3,0x10008
|
4927 |
|
|
100027b6: 7e09b583 ld a1,2016(s3) # 100087e0
|
4928 |
|
|
{
|
4929 |
|
|
100027ba: 892a mv s2,a0
|
4930 |
|
|
structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob);
|
4931 |
|
|
100027bc: 03800613 li a2,56
|
4932 |
|
|
100027c0: 8526 mv a0,s1
|
4933 |
|
|
100027c2: 8fdff0ef jal ra,100020be
|
4934 |
|
|
Ptr_Val_Par->variant.var_1.Int_Comp = 5;
|
4935 |
|
|
100027c6: 4795 li a5,5
|
4936 |
|
|
100027c8: 00f92823 sw a5,16(s2)
|
4937 |
|
|
= Ptr_Val_Par->variant.var_1.Int_Comp;
|
4938 |
|
|
100027cc: c89c sw a5,16(s1)
|
4939 |
|
|
Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
|
4940 |
|
|
100027ce: 00093783 ld a5,0(s2)
|
4941 |
|
|
Proc_3 (&Next_Record->Ptr_Comp);
|
4942 |
|
|
100027d2: 8526 mv a0,s1
|
4943 |
|
|
Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
|
4944 |
|
|
100027d4: e09c sd a5,0(s1)
|
4945 |
|
|
Proc_3 (&Next_Record->Ptr_Comp);
|
4946 |
|
|
100027d6: fa1ff0ef jal ra,10002776
|
4947 |
|
|
if (Next_Record->Discr == Ident_1)
|
4948 |
|
|
100027da: 449c lw a5,8(s1)
|
4949 |
|
|
100027dc: eb8d bnez a5,1000280e
|
4950 |
|
|
Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp,
|
4951 |
|
|
100027de: 00c92503 lw a0,12(s2)
|
4952 |
|
|
Next_Record->variant.var_1.Int_Comp = 6;
|
4953 |
|
|
100027e2: 4799 li a5,6
|
4954 |
|
|
100027e4: c89c sw a5,16(s1)
|
4955 |
|
|
Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp,
|
4956 |
|
|
100027e6: 00c48593 addi a1,s1,12
|
4957 |
|
|
100027ea: 688000ef jal ra,10002e72
|
4958 |
|
|
Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
|
4959 |
|
|
100027ee: 7e09b783 ld a5,2016(s3)
|
4960 |
|
|
} /* Proc_1 */
|
4961 |
|
|
100027f2: 7402 ld s0,32(sp)
|
4962 |
|
|
Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
|
4963 |
|
|
100027f4: 4888 lw a0,16(s1)
|
4964 |
|
|
Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
|
4965 |
|
|
100027f6: 639c ld a5,0(a5)
|
4966 |
|
|
} /* Proc_1 */
|
4967 |
|
|
100027f8: 70a2 ld ra,40(sp)
|
4968 |
|
|
100027fa: 6942 ld s2,16(sp)
|
4969 |
|
|
Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
|
4970 |
|
|
100027fc: e09c sd a5,0(s1)
|
4971 |
|
|
} /* Proc_1 */
|
4972 |
|
|
100027fe: 69a2 ld s3,8(sp)
|
4973 |
|
|
Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
|
4974 |
|
|
10002800: 01048613 addi a2,s1,16
|
4975 |
|
|
} /* Proc_1 */
|
4976 |
|
|
10002804: 64e2 ld s1,24(sp)
|
4977 |
|
|
Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
|
4978 |
|
|
10002806: 45a9 li a1,10
|
4979 |
|
|
} /* Proc_1 */
|
4980 |
|
|
10002808: 6145 addi sp,sp,48
|
4981 |
|
|
Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
|
4982 |
|
|
1000280a: 6a80006f j 10002eb2
|
4983 |
|
|
structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
|
4984 |
|
|
1000280e: 00093583 ld a1,0(s2)
|
4985 |
|
|
10002812: 854a mv a0,s2
|
4986 |
|
|
10002814: 03800613 li a2,56
|
4987 |
|
|
10002818: 8a7ff0ef jal ra,100020be
|
4988 |
|
|
} /* Proc_1 */
|
4989 |
|
|
1000281c: 70a2 ld ra,40(sp)
|
4990 |
|
|
1000281e: 7402 ld s0,32(sp)
|
4991 |
|
|
10002820: 64e2 ld s1,24(sp)
|
4992 |
|
|
10002822: 6942 ld s2,16(sp)
|
4993 |
|
|
10002824: 69a2 ld s3,8(sp)
|
4994 |
|
|
10002826: 6145 addi sp,sp,48
|
4995 |
|
|
10002828: 8082 ret
|
4996 |
|
|
|
4997 |
|
|
000000001000282a :
|
4998 |
|
|
|
4999 |
|
|
|
5000 |
|
|
Proc_4 () /* without parameters */
|
5001 |
|
|
/*******/
|
5002 |
|
|
/* executed once */
|
5003 |
|
|
{
|
5004 |
|
|
1000282a: 1141 addi sp,sp,-16
|
5005 |
|
|
1000282c: e422 sd s0,8(sp)
|
5006 |
|
|
1000282e: 0800 addi s0,sp,16
|
5007 |
|
|
Boolean Bool_Loc;
|
5008 |
|
|
|
5009 |
|
|
Bool_Loc = Ch_1_Glob == 'A';
|
5010 |
|
|
10002830: 100087b7 lui a5,0x10008
|
5011 |
|
|
10002834: 7dc7c783 lbu a5,2012(a5) # 100087dc
|
5012 |
|
|
Bool_Glob = Bool_Loc | Bool_Glob;
|
5013 |
|
|
10002838: 10009737 lui a4,0x10009
|
5014 |
|
|
1000283c: 8e872683 lw a3,-1816(a4) # 100088e8
|
5015 |
|
|
Bool_Loc = Ch_1_Glob == 'A';
|
5016 |
|
|
10002840: fbf78793 addi a5,a5,-65
|
5017 |
|
|
10002844: 0017b793 seqz a5,a5
|
5018 |
|
|
Bool_Glob = Bool_Loc | Bool_Glob;
|
5019 |
|
|
10002848: 8fd5 or a5,a5,a3
|
5020 |
|
|
Ch_2_Glob = 'B';
|
5021 |
|
|
} /* Proc_4 */
|
5022 |
|
|
1000284a: 6422 ld s0,8(sp)
|
5023 |
|
|
Bool_Glob = Bool_Loc | Bool_Glob;
|
5024 |
|
|
1000284c: 8ef72423 sw a5,-1816(a4)
|
5025 |
|
|
Ch_2_Glob = 'B';
|
5026 |
|
|
10002850: 100087b7 lui a5,0x10008
|
5027 |
|
|
10002854: 04200713 li a4,66
|
5028 |
|
|
10002858: 7ce78ea3 sb a4,2013(a5) # 100087dd
|
5029 |
|
|
} /* Proc_4 */
|
5030 |
|
|
1000285c: 0141 addi sp,sp,16
|
5031 |
|
|
1000285e: 8082 ret
|
5032 |
|
|
|
5033 |
|
|
0000000010002860 :
|
5034 |
|
|
|
5035 |
|
|
|
5036 |
|
|
Proc_5 () /* without parameters */
|
5037 |
|
|
/*******/
|
5038 |
|
|
/* executed once */
|
5039 |
|
|
{
|
5040 |
|
|
10002860: 1141 addi sp,sp,-16
|
5041 |
|
|
10002862: e422 sd s0,8(sp)
|
5042 |
|
|
10002864: 0800 addi s0,sp,16
|
5043 |
|
|
Ch_1_Glob = 'A';
|
5044 |
|
|
10002866: 100087b7 lui a5,0x10008
|
5045 |
|
|
Bool_Glob = false;
|
5046 |
|
|
} /* Proc_5 */
|
5047 |
|
|
1000286a: 6422 ld s0,8(sp)
|
5048 |
|
|
Ch_1_Glob = 'A';
|
5049 |
|
|
1000286c: 04100713 li a4,65
|
5050 |
|
|
10002870: 7ce78e23 sb a4,2012(a5) # 100087dc
|
5051 |
|
|
Bool_Glob = false;
|
5052 |
|
|
10002874: 100097b7 lui a5,0x10009
|
5053 |
|
|
10002878: 8e07a423 sw zero,-1816(a5) # 100088e8
|
5054 |
|
|
} /* Proc_5 */
|
5055 |
|
|
1000287c: 0141 addi sp,sp,16
|
5056 |
|
|
1000287e: 8082 ret
|
5057 |
|
|
|
5058 |
|
|
0000000010002880 :
|
5059 |
|
|
{
|
5060 |
|
|
10002880: 7115 addi sp,sp,-224
|
5061 |
|
|
Next_Ptr_Glob = (Rec_Pointer) &_Next_Glob;
|
5062 |
|
|
10002882: 10006737 lui a4,0x10006
|
5063 |
|
|
{
|
5064 |
|
|
10002886: ed86 sd ra,216(sp)
|
5065 |
|
|
10002888: e9a2 sd s0,208(sp)
|
5066 |
|
|
1000288a: e5a6 sd s1,200(sp)
|
5067 |
|
|
1000288c: e1ca sd s2,192(sp)
|
5068 |
|
|
1000288e: fd4e sd s3,184(sp)
|
5069 |
|
|
10002890: f556 sd s5,168(sp)
|
5070 |
|
|
10002892: f952 sd s4,176(sp)
|
5071 |
|
|
10002894: f15a sd s6,160(sp)
|
5072 |
|
|
10002896: ed5e sd s7,152(sp)
|
5073 |
|
|
10002898: e962 sd s8,144(sp)
|
5074 |
|
|
1000289a: e566 sd s9,136(sp)
|
5075 |
|
|
1000289c: e16a sd s10,128(sp)
|
5076 |
|
|
1000289e: fcee sd s11,120(sp)
|
5077 |
|
|
Next_Ptr_Glob = (Rec_Pointer) &_Next_Glob;
|
5078 |
|
|
100028a0: 01870713 addi a4,a4,24 # 10006018 <_Next_Glob>
|
5079 |
|
|
{
|
5080 |
|
|
100028a4: 1180 addi s0,sp,224
|
5081 |
|
|
Ptr_Glob = (Rec_Pointer) &_Glob ;
|
5082 |
|
|
100028a6: 100086b7 lui a3,0x10008
|
5083 |
|
|
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
|
5084 |
|
|
100028aa: 00875613 srli a2,a4,0x8
|
5085 |
|
|
100028ae: 7ec684a3 sb a2,2025(a3) # 100087e9 <_Glob+0x1>
|
5086 |
|
|
100028b2: 01075613 srli a2,a4,0x10
|
5087 |
|
|
100028b6: 7ec68523 sb a2,2026(a3)
|
5088 |
|
|
100028ba: 01875613 srli a2,a4,0x18
|
5089 |
|
|
100028be: 7ec685a3 sb a2,2027(a3)
|
5090 |
|
|
100028c2: 02075613 srli a2,a4,0x20
|
5091 |
|
|
100028c6: 7ec68623 sb a2,2028(a3)
|
5092 |
|
|
Next_Ptr_Glob = (Rec_Pointer) &_Next_Glob;
|
5093 |
|
|
100028ca: 100089b7 lui s3,0x10008
|
5094 |
|
|
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
|
5095 |
|
|
100028ce: 02875613 srli a2,a4,0x28
|
5096 |
|
|
100028d2: 7ee68423 sb a4,2024(a3)
|
5097 |
|
|
100028d6: 7ec686a3 sb a2,2029(a3)
|
5098 |
|
|
Next_Ptr_Glob = (Rec_Pointer) &_Next_Glob;
|
5099 |
|
|
100028da: 76e9b823 sd a4,1904(s3) # 10008770
|
5100 |
|
|
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
|
5101 |
|
|
100028de: 03075613 srli a2,a4,0x30
|
5102 |
|
|
100028e2: 9361 srli a4,a4,0x38
|
5103 |
|
|
Ptr_Glob = (Rec_Pointer) &_Glob ;
|
5104 |
|
|
100028e4: 7e868793 addi a5,a3,2024
|
5105 |
|
|
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
|
5106 |
|
|
100028e8: 7ee687a3 sb a4,2031(a3)
|
5107 |
|
|
Ptr_Glob = (Rec_Pointer) &_Glob ;
|
5108 |
|
|
100028ec: 10008937 lui s2,0x10008
|
5109 |
|
|
Ptr_Glob->variant.var_1.Enum_Comp = Ident_3;
|
5110 |
|
|
100028f0: 4709 li a4,2
|
5111 |
|
|
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
|
5112 |
|
|
100028f2: 7ec68723 sb a2,2030(a3)
|
5113 |
|
|
Ptr_Glob->variant.var_1.Enum_Comp = Ident_3;
|
5114 |
|
|
100028f6: 00e78623 sb a4,12(a5)
|
5115 |
|
|
Ptr_Glob = (Rec_Pointer) &_Glob ;
|
5116 |
|
|
100028fa: 7ef93023 sd a5,2016(s2) # 100087e0
|
5117 |
|
|
Ptr_Glob->Discr = Ident_1;
|
5118 |
|
|
100028fe: 00078423 sb zero,8(a5)
|
5119 |
|
|
10002902: 000784a3 sb zero,9(a5)
|
5120 |
|
|
10002906: 00078523 sb zero,10(a5)
|
5121 |
|
|
1000290a: 000785a3 sb zero,11(a5)
|
5122 |
|
|
Ptr_Glob->variant.var_1.Enum_Comp = Ident_3;
|
5123 |
|
|
1000290e: 000786a3 sb zero,13(a5)
|
5124 |
|
|
10002912: 00078723 sb zero,14(a5)
|
5125 |
|
|
10002916: 000787a3 sb zero,15(a5)
|
5126 |
|
|
Ptr_Glob->variant.var_1.Int_Comp = 40;
|
5127 |
|
|
1000291a: 02800713 li a4,40
|
5128 |
|
|
strcpy (Ptr_Glob->variant.var_1.Str_Comp,
|
5129 |
|
|
1000291e: 100055b7 lui a1,0x10005
|
5130 |
|
|
10002922: 10008537 lui a0,0x10008
|
5131 |
|
|
Ptr_Glob->variant.var_1.Int_Comp = 40;
|
5132 |
|
|
10002926: 00e78823 sb a4,16(a5)
|
5133 |
|
|
strcpy (Ptr_Glob->variant.var_1.Str_Comp,
|
5134 |
|
|
1000292a: 92058593 addi a1,a1,-1760 # 10004920
|
5135 |
|
|
Ptr_Glob->variant.var_1.Int_Comp = 40;
|
5136 |
|
|
1000292e: 000788a3 sb zero,17(a5)
|
5137 |
|
|
10002932: 00078923 sb zero,18(a5)
|
5138 |
|
|
10002936: 000789a3 sb zero,19(a5)
|
5139 |
|
|
strcpy (Ptr_Glob->variant.var_1.Str_Comp,
|
5140 |
|
|
1000293a: 7fc50513 addi a0,a0,2044 # 100087fc <_Glob+0x14>
|
5141 |
|
|
1000293e: e2cff0ef jal ra,10001f6a
|
5142 |
|
|
strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");
|
5143 |
|
|
10002942: 100055b7 lui a1,0x10005
|
5144 |
|
|
10002946: 94058593 addi a1,a1,-1728 # 10004940
|
5145 |
|
|
1000294a: f5040513 addi a0,s0,-176
|
5146 |
|
|
1000294e: e1cff0ef jal ra,10001f6a
|
5147 |
|
|
printf ("\n");
|
5148 |
|
|
10002952: 100054b7 lui s1,0x10005
|
5149 |
|
|
Arr_2_Glob [8][7] = 10;
|
5150 |
|
|
10002956: 10006ab7 lui s5,0x10006
|
5151 |
|
|
1000295a: 058a8793 addi a5,s5,88 # 10006058
|
5152 |
|
|
1000295e: 4729 li a4,10
|
5153 |
|
|
printf ("\n");
|
5154 |
|
|
10002960: bd048513 addi a0,s1,-1072 # 10004bd0
|
5155 |
|
|
Arr_2_Glob [8][7] = 10;
|
5156 |
|
|
10002964: 64e7ae23 sw a4,1628(a5)
|
5157 |
|
|
printf ("\n");
|
5158 |
|
|
10002968: b79fe0ef jal ra,100014e0
|
5159 |
|
|
printf ("Dhrystone Benchmark, Version 2.1 (Language: C)\n");
|
5160 |
|
|
1000296c: 10005537 lui a0,0x10005
|
5161 |
|
|
10002970: 96050513 addi a0,a0,-1696 # 10004960
|
5162 |
|
|
10002974: b6dfe0ef jal ra,100014e0
|
5163 |
|
|
printf ("\n");
|
5164 |
|
|
10002978: bd048513 addi a0,s1,-1072
|
5165 |
|
|
1000297c: b65fe0ef jal ra,100014e0
|
5166 |
|
|
if (Reg)
|
5167 |
|
|
10002980: 1000a7b7 lui a5,0x1000a
|
5168 |
|
|
10002984: d5c7a783 lw a5,-676(a5) # 10009d5c
|
5169 |
|
|
10002988: 40078863 beqz a5,10002d98
|
5170 |
|
|
printf ("Program compiled with 'register' attribute\n");
|
5171 |
|
|
1000298c: 10005537 lui a0,0x10005
|
5172 |
|
|
10002990: 99050513 addi a0,a0,-1648 # 10004990
|
5173 |
|
|
printf ("Program compiled without 'register' attribute\n");
|
5174 |
|
|
10002994: b4dfe0ef jal ra,100014e0
|
5175 |
|
|
printf ("\n");
|
5176 |
|
|
10002998: bd048513 addi a0,s1,-1072
|
5177 |
|
|
1000299c: b45fe0ef jal ra,100014e0
|
5178 |
|
|
printf ("Execution starts, %d runs through Dhrystone\n", Number_Of_Runs);
|
5179 |
|
|
100029a0: 10005537 lui a0,0x10005
|
5180 |
|
|
100029a4: 6591 lui a1,0x4
|
5181 |
|
|
100029a6: 9f050513 addi a0,a0,-1552 # 100049f0
|
5182 |
|
|
100029aa: b37fe0ef jal ra,100014e0
|
5183 |
|
|
return (int)k_cycle_get_64();
|
5184 |
|
|
100029ae: a81fe0ef jal ra,1000142e
|
5185 |
|
|
Begin_Time = (long) clock();
|
5186 |
|
|
100029b2: 100067b7 lui a5,0x10006
|
5187 |
|
|
100029b6: 04a7b823 sd a0,80(a5) # 10006050
|
5188 |
|
|
for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
|
5189 |
|
|
100029ba: 4a05 li s4,1
|
5190 |
|
|
100029bc: f2f43823 sd a5,-208(s0)
|
5191 |
|
|
Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
|
5192 |
|
|
100029c0: 10009c37 lui s8,0x10009
|
5193 |
|
|
Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
|
5194 |
|
|
100029c4: 10009cb7 lui s9,0x10009
|
5195 |
|
|
Int_Glob = Run_Index;
|
5196 |
|
|
100029c8: 10008db7 lui s11,0x10008
|
5197 |
|
|
Proc_5();
|
5198 |
|
|
100029cc: e95ff0ef jal ra,10002860
|
5199 |
|
|
Proc_4();
|
5200 |
|
|
100029d0: e5bff0ef jal ra,1000282a
|
5201 |
|
|
strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
|
5202 |
|
|
100029d4: 100055b7 lui a1,0x10005
|
5203 |
|
|
Int_1_Loc = 2;
|
5204 |
|
|
100029d8: 4789 li a5,2
|
5205 |
|
|
strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
|
5206 |
|
|
100029da: a2058593 addi a1,a1,-1504 # 10004a20
|
5207 |
|
|
100029de: f7040513 addi a0,s0,-144
|
5208 |
|
|
Int_1_Loc = 2;
|
5209 |
|
|
100029e2: f4f42223 sw a5,-188(s0)
|
5210 |
|
|
strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
|
5211 |
|
|
100029e6: d84ff0ef jal ra,10001f6a
|
5212 |
|
|
Enum_Loc = Ident_2;
|
5213 |
|
|
100029ea: 4785 li a5,1
|
5214 |
|
|
Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
|
5215 |
|
|
100029ec: f7040593 addi a1,s0,-144
|
5216 |
|
|
100029f0: f5040513 addi a0,s0,-176
|
5217 |
|
|
Enum_Loc = Ident_2;
|
5218 |
|
|
100029f4: f4f42623 sw a5,-180(s0)
|
5219 |
|
|
Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
|
5220 |
|
|
100029f8: 54c000ef jal ra,10002f44
|
5221 |
|
|
100029fc: 00153513 seqz a0,a0
|
5222 |
|
|
10002a00: 8eac2423 sw a0,-1816(s8) # 100088e8
|
5223 |
|
|
while (Int_1_Loc < Int_2_Loc) /* loop body executed once */
|
5224 |
|
|
10002a04: 4b09 li s6,2
|
5225 |
|
|
Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
|
5226 |
|
|
10002a06: 4b95 li s7,5
|
5227 |
|
|
while (Int_1_Loc < Int_2_Loc) /* loop body executed once */
|
5228 |
|
|
10002a08: f4442503 lw a0,-188(s0)
|
5229 |
|
|
10002a0c: 38ab5b63 ble a0,s6,10002da2
|
5230 |
|
|
Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
|
5231 |
|
|
10002a10: f4842683 lw a3,-184(s0)
|
5232 |
|
|
10002a14: 862a mv a2,a0
|
5233 |
|
|
10002a16: 058a8593 addi a1,s5,88
|
5234 |
|
|
10002a1a: 820c8513 addi a0,s9,-2016 # 10008820
|
5235 |
|
|
10002a1e: 4a6000ef jal ra,10002ec4
|
5236 |
|
|
Proc_1 (Ptr_Glob);
|
5237 |
|
|
10002a22: 7e093503 ld a0,2016(s2)
|
5238 |
|
|
for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
|
5239 |
|
|
10002a26: 04100b13 li s6,65
|
5240 |
|
|
Int_2_Loc = 3;
|
5241 |
|
|
10002a2a: 4d0d li s10,3
|
5242 |
|
|
Proc_1 (Ptr_Glob);
|
5243 |
|
|
10002a2c: d77ff0ef jal ra,100027a2
|
5244 |
|
|
for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
|
5245 |
|
|
10002a30: 10008bb7 lui s7,0x10008
|
5246 |
|
|
10002a34: 7ddbc783 lbu a5,2013(s7) # 100087dd
|
5247 |
|
|
10002a38: 3967f563 bleu s6,a5,10002dc2
|
5248 |
|
|
Int_2_Loc = Int_2_Loc * Int_1_Loc;
|
5249 |
|
|
10002a3c: f4442783 lw a5,-188(s0)
|
5250 |
|
|
Int_1_Loc = Int_2_Loc / Int_3_Loc;
|
5251 |
|
|
10002a40: f4842b03 lw s6,-184(s0)
|
5252 |
|
|
Proc_2 (&Int_1_Loc);
|
5253 |
|
|
10002a44: f4440513 addi a0,s0,-188
|
5254 |
|
|
Int_2_Loc = Int_2_Loc * Int_1_Loc;
|
5255 |
|
|
10002a48: 03a7873b mulw a4,a5,s10
|
5256 |
|
|
for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
|
5257 |
|
|
10002a4c: 2a05 addiw s4,s4,1
|
5258 |
|
|
Int_1_Loc = Int_2_Loc / Int_3_Loc;
|
5259 |
|
|
10002a4e: 03674d3b divw s10,a4,s6
|
5260 |
|
|
Int_2_Loc = Int_2_Loc * Int_1_Loc;
|
5261 |
|
|
10002a52: f2e43c23 sd a4,-200(s0)
|
5262 |
|
|
Int_1_Loc = Int_2_Loc / Int_3_Loc;
|
5263 |
|
|
10002a56: f5a42223 sw s10,-188(s0)
|
5264 |
|
|
Proc_2 (&Int_1_Loc);
|
5265 |
|
|
10002a5a: cf1ff0ef jal ra,1000274a
|
5266 |
|
|
for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
|
5267 |
|
|
10002a5e: 6791 lui a5,0x4
|
5268 |
|
|
10002a60: 0785 addi a5,a5,1
|
5269 |
|
|
10002a62: f6fa15e3 bne s4,a5,100029cc
|
5270 |
|
|
return (int)k_cycle_get_64();
|
5271 |
|
|
10002a66: 9c9fe0ef jal ra,1000142e
|
5272 |
|
|
End_Time = (long) clock();
|
5273 |
|
|
10002a6a: 10008ab7 lui s5,0x10008
|
5274 |
|
|
10002a6e: 76aab423 sd a0,1896(s5) # 10008768
|
5275 |
|
|
printf ("Execution ends\n");
|
5276 |
|
|
10002a72: 10005537 lui a0,0x10005
|
5277 |
|
|
10002a76: a6050513 addi a0,a0,-1440 # 10004a60
|
5278 |
|
|
10002a7a: a67fe0ef jal ra,100014e0
|
5279 |
|
|
printf ("\n");
|
5280 |
|
|
10002a7e: bd048513 addi a0,s1,-1072
|
5281 |
|
|
10002a82: a5ffe0ef jal ra,100014e0
|
5282 |
|
|
printf ("Final values of the variables used in the benchmark:\n");
|
5283 |
|
|
10002a86: 10005537 lui a0,0x10005
|
5284 |
|
|
10002a8a: a7050513 addi a0,a0,-1424 # 10004a70
|
5285 |
|
|
10002a8e: a53fe0ef jal ra,100014e0
|
5286 |
|
|
printf ("\n");
|
5287 |
|
|
10002a92: bd048513 addi a0,s1,-1072
|
5288 |
|
|
10002a96: a4bfe0ef jal ra,100014e0
|
5289 |
|
|
printf ("Int_Glob: %d\n", Int_Glob);
|
5290 |
|
|
10002a9a: 100087b7 lui a5,0x10008
|
5291 |
|
|
10002a9e: 7d87a583 lw a1,2008(a5) # 100087d8
|
5292 |
|
|
10002aa2: 10005537 lui a0,0x10005
|
5293 |
|
|
10002aa6: aa850513 addi a0,a0,-1368 # 10004aa8
|
5294 |
|
|
printf (" should be: %d\n", 5);
|
5295 |
|
|
10002aaa: 10005a37 lui s4,0x10005
|
5296 |
|
|
printf ("Int_Glob: %d\n", Int_Glob);
|
5297 |
|
|
10002aae: a33fe0ef jal ra,100014e0
|
5298 |
|
|
printf (" should be: %d\n", 5);
|
5299 |
|
|
10002ab2: 4595 li a1,5
|
5300 |
|
|
10002ab4: ac8a0513 addi a0,s4,-1336 # 10004ac8
|
5301 |
|
|
10002ab8: a29fe0ef jal ra,100014e0
|
5302 |
|
|
printf ("Bool_Glob: %d\n", Bool_Glob);
|
5303 |
|
|
10002abc: 100097b7 lui a5,0x10009
|
5304 |
|
|
10002ac0: 8e87a583 lw a1,-1816(a5) # 100088e8
|
5305 |
|
|
10002ac4: 10005537 lui a0,0x10005
|
5306 |
|
|
10002ac8: ae850513 addi a0,a0,-1304 # 10004ae8
|
5307 |
|
|
10002acc: a15fe0ef jal ra,100014e0
|
5308 |
|
|
printf (" should be: %d\n", 1);
|
5309 |
|
|
10002ad0: 4585 li a1,1
|
5310 |
|
|
10002ad2: ac8a0513 addi a0,s4,-1336
|
5311 |
|
|
10002ad6: a0bfe0ef jal ra,100014e0
|
5312 |
|
|
printf ("Ch_1_Glob: %c\n", Ch_1_Glob);
|
5313 |
|
|
10002ada: 100087b7 lui a5,0x10008
|
5314 |
|
|
10002ade: 7dc7c583 lbu a1,2012(a5) # 100087dc
|
5315 |
|
|
10002ae2: 10005537 lui a0,0x10005
|
5316 |
|
|
10002ae6: b0850513 addi a0,a0,-1272 # 10004b08
|
5317 |
|
|
10002aea: 9f7fe0ef jal ra,100014e0
|
5318 |
|
|
printf (" should be: %c\n", 'A');
|
5319 |
|
|
10002aee: 10005c37 lui s8,0x10005
|
5320 |
|
|
10002af2: 04100593 li a1,65
|
5321 |
|
|
10002af6: b28c0513 addi a0,s8,-1240 # 10004b28
|
5322 |
|
|
10002afa: 9e7fe0ef jal ra,100014e0
|
5323 |
|
|
printf ("Ch_2_Glob: %c\n", Ch_2_Glob);
|
5324 |
|
|
10002afe: 7ddbc583 lbu a1,2013(s7)
|
5325 |
|
|
10002b02: 10005537 lui a0,0x10005
|
5326 |
|
|
10002b06: b4850513 addi a0,a0,-1208 # 10004b48
|
5327 |
|
|
10002b0a: 9d7fe0ef jal ra,100014e0
|
5328 |
|
|
printf (" should be: %c\n", 'B');
|
5329 |
|
|
10002b0e: 04200593 li a1,66
|
5330 |
|
|
10002b12: b28c0513 addi a0,s8,-1240
|
5331 |
|
|
10002b16: 9cbfe0ef jal ra,100014e0
|
5332 |
|
|
printf ("Arr_1_Glob[8]: %d\n", Arr_1_Glob[8]);
|
5333 |
|
|
10002b1a: 100097b7 lui a5,0x10009
|
5334 |
|
|
10002b1e: 82078793 addi a5,a5,-2016 # 10008820
|
5335 |
|
|
10002b22: 538c lw a1,32(a5)
|
5336 |
|
|
10002b24: 10005537 lui a0,0x10005
|
5337 |
|
|
10002b28: b6850513 addi a0,a0,-1176 # 10004b68
|
5338 |
|
|
10002b2c: 9b5fe0ef jal ra,100014e0
|
5339 |
|
|
printf (" should be: %d\n", 7);
|
5340 |
|
|
10002b30: 459d li a1,7
|
5341 |
|
|
10002b32: ac8a0513 addi a0,s4,-1336
|
5342 |
|
|
10002b36: 9abfe0ef jal ra,100014e0
|
5343 |
|
|
printf ("Arr_2_Glob[8][7]: %d\n", Arr_2_Glob[8][7]);
|
5344 |
|
|
10002b3a: 100067b7 lui a5,0x10006
|
5345 |
|
|
10002b3e: 05878793 addi a5,a5,88 # 10006058
|
5346 |
|
|
10002b42: 65c7a583 lw a1,1628(a5)
|
5347 |
|
|
10002b46: 10005537 lui a0,0x10005
|
5348 |
|
|
10002b4a: b8850513 addi a0,a0,-1144 # 10004b88
|
5349 |
|
|
10002b4e: 993fe0ef jal ra,100014e0
|
5350 |
|
|
printf (" should be: Number_Of_Runs + 10\n");
|
5351 |
|
|
10002b52: 10005537 lui a0,0x10005
|
5352 |
|
|
10002b56: ba850513 addi a0,a0,-1112 # 10004ba8
|
5353 |
|
|
10002b5a: 987fe0ef jal ra,100014e0
|
5354 |
|
|
printf ("Ptr_Glob->\n");
|
5355 |
|
|
10002b5e: 10005537 lui a0,0x10005
|
5356 |
|
|
10002b62: bd850513 addi a0,a0,-1064 # 10004bd8
|
5357 |
|
|
10002b66: 97bfe0ef jal ra,100014e0
|
5358 |
|
|
printf (" Ptr_Comp: %d\n", (int) Ptr_Glob->Ptr_Comp);
|
5359 |
|
|
10002b6a: 7e093783 ld a5,2016(s2)
|
5360 |
|
|
printf (" Discr: %d\n", Ptr_Glob->Discr);
|
5361 |
|
|
10002b6e: 10005db7 lui s11,0x10005
|
5362 |
|
|
printf (" Enum_Comp: %d\n", Ptr_Glob->variant.var_1.Enum_Comp);
|
5363 |
|
|
10002b72: 10005cb7 lui s9,0x10005
|
5364 |
|
|
printf (" Ptr_Comp: %d\n", (int) Ptr_Glob->Ptr_Comp);
|
5365 |
|
|
10002b76: 438c lw a1,0(a5)
|
5366 |
|
|
10002b78: 100057b7 lui a5,0x10005
|
5367 |
|
|
10002b7c: be878513 addi a0,a5,-1048 # 10004be8
|
5368 |
|
|
10002b80: f2f43423 sd a5,-216(s0)
|
5369 |
|
|
10002b84: 95dfe0ef jal ra,100014e0
|
5370 |
|
|
printf (" should be: (implementation-dependent)\n");
|
5371 |
|
|
10002b88: 10005537 lui a0,0x10005
|
5372 |
|
|
10002b8c: c0850513 addi a0,a0,-1016 # 10004c08
|
5373 |
|
|
10002b90: 951fe0ef jal ra,100014e0
|
5374 |
|
|
printf (" Discr: %d\n", Ptr_Glob->Discr);
|
5375 |
|
|
10002b94: 7e093703 ld a4,2016(s2)
|
5376 |
|
|
10002b98: c40d8513 addi a0,s11,-960 # 10004c40
|
5377 |
|
|
printf (" Int_Comp: %d\n", Ptr_Glob->variant.var_1.Int_Comp);
|
5378 |
|
|
10002b9c: 10005c37 lui s8,0x10005
|
5379 |
|
|
printf (" Discr: %d\n", Ptr_Glob->Discr);
|
5380 |
|
|
10002ba0: 470c lw a1,8(a4)
|
5381 |
|
|
printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp);
|
5382 |
|
|
10002ba2: 10005bb7 lui s7,0x10005
|
5383 |
|
|
printf (" Discr: %d\n", Ptr_Glob->Discr);
|
5384 |
|
|
10002ba6: 93bfe0ef jal ra,100014e0
|
5385 |
|
|
printf (" should be: %d\n", 0);
|
5386 |
|
|
10002baa: 4581 li a1,0
|
5387 |
|
|
10002bac: ac8a0513 addi a0,s4,-1336
|
5388 |
|
|
10002bb0: 931fe0ef jal ra,100014e0
|
5389 |
|
|
printf (" Enum_Comp: %d\n", Ptr_Glob->variant.var_1.Enum_Comp);
|
5390 |
|
|
10002bb4: 7e093703 ld a4,2016(s2)
|
5391 |
|
|
10002bb8: c60c8513 addi a0,s9,-928 # 10004c60
|
5392 |
|
|
10002bbc: 474c lw a1,12(a4)
|
5393 |
|
|
10002bbe: 923fe0ef jal ra,100014e0
|
5394 |
|
|
printf (" should be: %d\n", 2);
|
5395 |
|
|
10002bc2: 4589 li a1,2
|
5396 |
|
|
10002bc4: ac8a0513 addi a0,s4,-1336
|
5397 |
|
|
10002bc8: 919fe0ef jal ra,100014e0
|
5398 |
|
|
printf (" Int_Comp: %d\n", Ptr_Glob->variant.var_1.Int_Comp);
|
5399 |
|
|
10002bcc: 7e093703 ld a4,2016(s2)
|
5400 |
|
|
10002bd0: c80c0513 addi a0,s8,-896 # 10004c80
|
5401 |
|
|
10002bd4: 4b0c lw a1,16(a4)
|
5402 |
|
|
10002bd6: 90bfe0ef jal ra,100014e0
|
5403 |
|
|
printf (" should be: %d\n", 17);
|
5404 |
|
|
10002bda: 45c5 li a1,17
|
5405 |
|
|
10002bdc: ac8a0513 addi a0,s4,-1336
|
5406 |
|
|
10002be0: 901fe0ef jal ra,100014e0
|
5407 |
|
|
printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp);
|
5408 |
|
|
10002be4: 7e093583 ld a1,2016(s2)
|
5409 |
|
|
10002be8: ca0b8513 addi a0,s7,-864 # 10004ca0
|
5410 |
|
|
printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
|
5411 |
|
|
10002bec: 10005937 lui s2,0x10005
|
5412 |
|
|
printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp);
|
5413 |
|
|
10002bf0: 05d1 addi a1,a1,20
|
5414 |
|
|
10002bf2: 8effe0ef jal ra,100014e0
|
5415 |
|
|
printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
|
5416 |
|
|
10002bf6: cc090513 addi a0,s2,-832 # 10004cc0
|
5417 |
|
|
10002bfa: 8e7fe0ef jal ra,100014e0
|
5418 |
|
|
printf ("Next_Ptr_Glob->\n");
|
5419 |
|
|
10002bfe: 10005537 lui a0,0x10005
|
5420 |
|
|
10002c02: cf850513 addi a0,a0,-776 # 10004cf8
|
5421 |
|
|
10002c06: 8dbfe0ef jal ra,100014e0
|
5422 |
|
|
printf (" Ptr_Comp: %d\n", (int) Next_Ptr_Glob->Ptr_Comp);
|
5423 |
|
|
10002c0a: 7709b703 ld a4,1904(s3)
|
5424 |
|
|
10002c0e: f2843783 ld a5,-216(s0)
|
5425 |
|
|
10002c12: 430c lw a1,0(a4)
|
5426 |
|
|
10002c14: be878513 addi a0,a5,-1048
|
5427 |
|
|
10002c18: 8c9fe0ef jal ra,100014e0
|
5428 |
|
|
printf (" should be: (implementation-dependent), same as above\n");
|
5429 |
|
|
10002c1c: 10005537 lui a0,0x10005
|
5430 |
|
|
10002c20: d1050513 addi a0,a0,-752 # 10004d10
|
5431 |
|
|
10002c24: 8bdfe0ef jal ra,100014e0
|
5432 |
|
|
printf (" Discr: %d\n", Next_Ptr_Glob->Discr);
|
5433 |
|
|
10002c28: 7709b783 ld a5,1904(s3)
|
5434 |
|
|
10002c2c: c40d8513 addi a0,s11,-960
|
5435 |
|
|
10002c30: 478c lw a1,8(a5)
|
5436 |
|
|
10002c32: 8affe0ef jal ra,100014e0
|
5437 |
|
|
printf (" should be: %d\n", 0);
|
5438 |
|
|
10002c36: 4581 li a1,0
|
5439 |
|
|
10002c38: ac8a0513 addi a0,s4,-1336
|
5440 |
|
|
10002c3c: 8a5fe0ef jal ra,100014e0
|
5441 |
|
|
printf (" Enum_Comp: %d\n", Next_Ptr_Glob->variant.var_1.Enum_Comp);
|
5442 |
|
|
10002c40: 7709b783 ld a5,1904(s3)
|
5443 |
|
|
10002c44: c60c8513 addi a0,s9,-928
|
5444 |
|
|
10002c48: 47cc lw a1,12(a5)
|
5445 |
|
|
10002c4a: 897fe0ef jal ra,100014e0
|
5446 |
|
|
printf (" should be: %d\n", 1);
|
5447 |
|
|
10002c4e: 4585 li a1,1
|
5448 |
|
|
10002c50: ac8a0513 addi a0,s4,-1336
|
5449 |
|
|
10002c54: 88dfe0ef jal ra,100014e0
|
5450 |
|
|
printf (" Int_Comp: %d\n", Next_Ptr_Glob->variant.var_1.Int_Comp);
|
5451 |
|
|
10002c58: 7709b783 ld a5,1904(s3)
|
5452 |
|
|
10002c5c: c80c0513 addi a0,s8,-896
|
5453 |
|
|
10002c60: 4b8c lw a1,16(a5)
|
5454 |
|
|
10002c62: 87ffe0ef jal ra,100014e0
|
5455 |
|
|
printf (" should be: %d\n", 18);
|
5456 |
|
|
10002c66: 45c9 li a1,18
|
5457 |
|
|
10002c68: ac8a0513 addi a0,s4,-1336
|
5458 |
|
|
10002c6c: 875fe0ef jal ra,100014e0
|
5459 |
|
|
Next_Ptr_Glob->variant.var_1.Str_Comp);
|
5460 |
|
|
10002c70: 7709b583 ld a1,1904(s3)
|
5461 |
|
|
printf (" Str_Comp: %s\n",
|
5462 |
|
|
10002c74: ca0b8513 addi a0,s7,-864
|
5463 |
|
|
10002c78: 05d1 addi a1,a1,20
|
5464 |
|
|
10002c7a: 867fe0ef jal ra,100014e0
|
5465 |
|
|
printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
|
5466 |
|
|
10002c7e: cc090513 addi a0,s2,-832
|
5467 |
|
|
10002c82: 85ffe0ef jal ra,100014e0
|
5468 |
|
|
printf ("Int_1_Loc: %d\n", Int_1_Loc);
|
5469 |
|
|
10002c86: f4442583 lw a1,-188(s0)
|
5470 |
|
|
10002c8a: 10005537 lui a0,0x10005
|
5471 |
|
|
10002c8e: d5050513 addi a0,a0,-688 # 10004d50
|
5472 |
|
|
10002c92: 84ffe0ef jal ra,100014e0
|
5473 |
|
|
printf (" should be: %d\n", 5);
|
5474 |
|
|
10002c96: 4595 li a1,5
|
5475 |
|
|
10002c98: ac8a0513 addi a0,s4,-1336
|
5476 |
|
|
10002c9c: 845fe0ef jal ra,100014e0
|
5477 |
|
|
Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
|
5478 |
|
|
10002ca0: f3843783 ld a5,-200(s0)
|
5479 |
|
|
10002ca4: 459d li a1,7
|
5480 |
|
|
printf ("Int_2_Loc: %d\n", Int_2_Loc);
|
5481 |
|
|
10002ca6: 10005537 lui a0,0x10005
|
5482 |
|
|
Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
|
5483 |
|
|
10002caa: 41678b3b subw s6,a5,s6
|
5484 |
|
|
10002cae: 02bb05bb mulw a1,s6,a1
|
5485 |
|
|
printf ("Int_2_Loc: %d\n", Int_2_Loc);
|
5486 |
|
|
10002cb2: d7050513 addi a0,a0,-656 # 10004d70
|
5487 |
|
|
10002cb6: 41a585bb subw a1,a1,s10
|
5488 |
|
|
10002cba: 827fe0ef jal ra,100014e0
|
5489 |
|
|
printf (" should be: %d\n", 13);
|
5490 |
|
|
10002cbe: 45b5 li a1,13
|
5491 |
|
|
10002cc0: ac8a0513 addi a0,s4,-1336
|
5492 |
|
|
10002cc4: 81dfe0ef jal ra,100014e0
|
5493 |
|
|
printf ("Int_3_Loc: %d\n", Int_3_Loc);
|
5494 |
|
|
10002cc8: f4842583 lw a1,-184(s0)
|
5495 |
|
|
10002ccc: 10005537 lui a0,0x10005
|
5496 |
|
|
10002cd0: d9050513 addi a0,a0,-624 # 10004d90
|
5497 |
|
|
10002cd4: 80dfe0ef jal ra,100014e0
|
5498 |
|
|
printf (" should be: %d\n", 7);
|
5499 |
|
|
10002cd8: 459d li a1,7
|
5500 |
|
|
10002cda: ac8a0513 addi a0,s4,-1336
|
5501 |
|
|
10002cde: 803fe0ef jal ra,100014e0
|
5502 |
|
|
printf ("Enum_Loc: %d\n", Enum_Loc);
|
5503 |
|
|
10002ce2: f4c42583 lw a1,-180(s0)
|
5504 |
|
|
10002ce6: 10005537 lui a0,0x10005
|
5505 |
|
|
10002cea: db050513 addi a0,a0,-592 # 10004db0
|
5506 |
|
|
10002cee: ff2fe0ef jal ra,100014e0
|
5507 |
|
|
printf (" should be: %d\n", 1);
|
5508 |
|
|
10002cf2: 4585 li a1,1
|
5509 |
|
|
10002cf4: ac8a0513 addi a0,s4,-1336
|
5510 |
|
|
10002cf8: fe8fe0ef jal ra,100014e0
|
5511 |
|
|
printf ("Str_1_Loc: %s\n", Str_1_Loc);
|
5512 |
|
|
10002cfc: 10005537 lui a0,0x10005
|
5513 |
|
|
10002d00: f5040593 addi a1,s0,-176
|
5514 |
|
|
10002d04: dd050513 addi a0,a0,-560 # 10004dd0
|
5515 |
|
|
10002d08: fd8fe0ef jal ra,100014e0
|
5516 |
|
|
printf (" should be: DHRYSTONE PROGRAM, 1'ST STRING\n");
|
5517 |
|
|
10002d0c: 10005537 lui a0,0x10005
|
5518 |
|
|
10002d10: df050513 addi a0,a0,-528 # 10004df0
|
5519 |
|
|
10002d14: fccfe0ef jal ra,100014e0
|
5520 |
|
|
printf ("Str_2_Loc: %s\n", Str_2_Loc);
|
5521 |
|
|
10002d18: 10005537 lui a0,0x10005
|
5522 |
|
|
10002d1c: f7040593 addi a1,s0,-144
|
5523 |
|
|
10002d20: e2850513 addi a0,a0,-472 # 10004e28
|
5524 |
|
|
10002d24: fbcfe0ef jal ra,100014e0
|
5525 |
|
|
printf (" should be: DHRYSTONE PROGRAM, 2'ND STRING\n");
|
5526 |
|
|
10002d28: 10005537 lui a0,0x10005
|
5527 |
|
|
10002d2c: e4850513 addi a0,a0,-440 # 10004e48
|
5528 |
|
|
10002d30: fb0fe0ef jal ra,100014e0
|
5529 |
|
|
printf ("\n");
|
5530 |
|
|
10002d34: bd048513 addi a0,s1,-1072
|
5531 |
|
|
10002d38: fa8fe0ef jal ra,100014e0
|
5532 |
|
|
User_Time = End_Time - Begin_Time;
|
5533 |
|
|
10002d3c: f3043703 ld a4,-208(s0)
|
5534 |
|
|
10002d40: 768ab783 ld a5,1896(s5)
|
5535 |
|
|
10002d44: 10006a37 lui s4,0x10006
|
5536 |
|
|
10002d48: 05073703 ld a4,80(a4)
|
5537 |
|
|
10002d4c: 8f99 sub a5,a5,a4
|
5538 |
|
|
10002d4e: 00fa3823 sd a5,16(s4) # 10006010
|
5539 |
|
|
if (User_Time < Too_Small_Time)
|
5540 |
|
|
10002d52: 4705 li a4,1
|
5541 |
|
|
10002d54: 0af74563 blt a4,a5,10002dfe
|
5542 |
|
|
printf ("Measured time too small to obtain meaningful results\n");
|
5543 |
|
|
10002d58: 10005537 lui a0,0x10005
|
5544 |
|
|
10002d5c: e8050513 addi a0,a0,-384 # 10004e80
|
5545 |
|
|
10002d60: f80fe0ef jal ra,100014e0
|
5546 |
|
|
printf ("Please increase number of runs\n");
|
5547 |
|
|
10002d64: 10005537 lui a0,0x10005
|
5548 |
|
|
10002d68: eb850513 addi a0,a0,-328 # 10004eb8
|
5549 |
|
|
10002d6c: f74fe0ef jal ra,100014e0
|
5550 |
|
|
printf ("\n");
|
5551 |
|
|
10002d70: bd048513 addi a0,s1,-1072
|
5552 |
|
|
10002d74: f6cfe0ef jal ra,100014e0
|
5553 |
|
|
}
|
5554 |
|
|
10002d78: 60ee ld ra,216(sp)
|
5555 |
|
|
10002d7a: 644e ld s0,208(sp)
|
5556 |
|
|
10002d7c: 64ae ld s1,200(sp)
|
5557 |
|
|
10002d7e: 690e ld s2,192(sp)
|
5558 |
|
|
10002d80: 79ea ld s3,184(sp)
|
5559 |
|
|
10002d82: 7a4a ld s4,176(sp)
|
5560 |
|
|
10002d84: 7aaa ld s5,168(sp)
|
5561 |
|
|
10002d86: 7b0a ld s6,160(sp)
|
5562 |
|
|
10002d88: 6bea ld s7,152(sp)
|
5563 |
|
|
10002d8a: 6c4a ld s8,144(sp)
|
5564 |
|
|
10002d8c: 6caa ld s9,136(sp)
|
5565 |
|
|
10002d8e: 6d0a ld s10,128(sp)
|
5566 |
|
|
10002d90: 7de6 ld s11,120(sp)
|
5567 |
|
|
10002d92: 4501 li a0,0
|
5568 |
|
|
10002d94: 612d addi sp,sp,224
|
5569 |
|
|
10002d96: 8082 ret
|
5570 |
|
|
printf ("Program compiled without 'register' attribute\n");
|
5571 |
|
|
10002d98: 10005537 lui a0,0x10005
|
5572 |
|
|
10002d9c: 9c050513 addi a0,a0,-1600 # 100049c0
|
5573 |
|
|
10002da0: bed5 j 10002994
|
5574 |
|
|
Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
|
5575 |
|
|
10002da2: 02ab87bb mulw a5,s7,a0
|
5576 |
|
|
Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
|
5577 |
|
|
10002da6: f4840613 addi a2,s0,-184
|
5578 |
|
|
10002daa: 458d li a1,3
|
5579 |
|
|
Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
|
5580 |
|
|
10002dac: 37f5 addiw a5,a5,-3
|
5581 |
|
|
10002dae: f4f42423 sw a5,-184(s0)
|
5582 |
|
|
Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
|
5583 |
|
|
10002db2: 100000ef jal ra,10002eb2
|
5584 |
|
|
Int_1_Loc += 1;
|
5585 |
|
|
10002db6: f4442783 lw a5,-188(s0)
|
5586 |
|
|
10002dba: 2785 addiw a5,a5,1
|
5587 |
|
|
10002dbc: f4f42223 sw a5,-188(s0)
|
5588 |
|
|
10002dc0: b1a1 j 10002a08
|
5589 |
|
|
if (Enum_Loc == Func_1 (Ch_Index, 'C'))
|
5590 |
|
|
10002dc2: 04300593 li a1,67
|
5591 |
|
|
10002dc6: 855a mv a0,s6
|
5592 |
|
|
10002dc8: 156000ef jal ra,10002f1e
|
5593 |
|
|
10002dcc: f4c42783 lw a5,-180(s0)
|
5594 |
|
|
10002dd0: 2501 sext.w a0,a0
|
5595 |
|
|
10002dd2: 02a79263 bne a5,a0,10002df6
|
5596 |
|
|
Proc_6 (Ident_1, &Enum_Loc);
|
5597 |
|
|
10002dd6: f4c40593 addi a1,s0,-180
|
5598 |
|
|
10002dda: 4501 li a0,0
|
5599 |
|
|
10002ddc: 096000ef jal ra,10002e72
|
5600 |
|
|
strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 3'RD STRING");
|
5601 |
|
|
10002de0: 100057b7 lui a5,0x10005
|
5602 |
|
|
10002de4: a4078593 addi a1,a5,-1472 # 10004a40
|
5603 |
|
|
10002de8: f7040513 addi a0,s0,-144
|
5604 |
|
|
10002dec: 97eff0ef jal ra,10001f6a
|
5605 |
|
|
Int_Glob = Run_Index;
|
5606 |
|
|
10002df0: 8d52 mv s10,s4
|
5607 |
|
|
10002df2: 7d4dac23 sw s4,2008(s11)
|
5608 |
|
|
for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
|
5609 |
|
|
10002df6: 2b05 addiw s6,s6,1
|
5610 |
|
|
10002df8: 0ffb7b13 andi s6,s6,255
|
5611 |
|
|
10002dfc: b925 j 10002a34
|
5612 |
|
|
printf ("Microseconds for one run through Dhrystone: ");
|
5613 |
|
|
10002dfe: 10005537 lui a0,0x10005
|
5614 |
|
|
10002e02: ed850513 addi a0,a0,-296 # 10004ed8
|
5615 |
|
|
10002e06: edafe0ef jal ra,100014e0
|
5616 |
|
|
Microseconds = 10ll * (int64_t)User_Time * Mic_secs_Per_Second;
|
5617 |
|
|
10002e0a: 010a3603 ld a2,16(s4)
|
5618 |
|
|
10002e0e: 009897b7 lui a5,0x989
|
5619 |
|
|
10002e12: 68078793 addi a5,a5,1664 # 989680 <__bss_num_words+0x9888e0>
|
5620 |
|
|
10002e16: 02f60633 mul a2,a2,a5
|
5621 |
|
|
printf ("%6d.%01d \n", (int)(Microseconds/(10*div1)), (int)(Microseconds%10));
|
5622 |
|
|
10002e1a: 0011e937 lui s2,0x11e
|
5623 |
|
|
10002e1e: 1a390913 addi s2,s2,419 # 11e1a3 <__bss_num_words+0x11d403>
|
5624 |
|
|
10002e22: 095e slli s2,s2,0x17
|
5625 |
|
|
Microseconds = 10ll * (int64_t)User_Time * Mic_secs_Per_Second;
|
5626 |
|
|
10002e24: 100067b7 lui a5,0x10006
|
5627 |
|
|
printf ("%6d.%01d \n", (int)(Microseconds/(10*div1)), (int)(Microseconds%10));
|
5628 |
|
|
10002e28: 49a9 li s3,10
|
5629 |
|
|
10002e2a: 10005ab7 lui s5,0x10005
|
5630 |
|
|
10002e2e: f08a8513 addi a0,s5,-248 # 10004f08
|
5631 |
|
|
10002e32: 032655b3 divu a1,a2,s2
|
5632 |
|
|
Microseconds = 10ll * (int64_t)User_Time * Mic_secs_Per_Second;
|
5633 |
|
|
10002e36: 00c7b023 sd a2,0(a5) # 10006000
|
5634 |
|
|
printf ("%6d.%01d \n", (int)(Microseconds/(10*div1)), (int)(Microseconds%10));
|
5635 |
|
|
10002e3a: 03367633 remu a2,a2,s3
|
5636 |
|
|
10002e3e: 2581 sext.w a1,a1
|
5637 |
|
|
10002e40: ea0fe0ef jal ra,100014e0
|
5638 |
|
|
printf ("Dhrystones per Second: ");
|
5639 |
|
|
10002e44: 10005537 lui a0,0x10005
|
5640 |
|
|
10002e48: f1850513 addi a0,a0,-232 # 10004f18
|
5641 |
|
|
10002e4c: e94fe0ef jal ra,100014e0
|
5642 |
|
|
printf ("%6d.%01d \n", (int)(Dhrystones_Per_Second/(10*div1)), (int)(Dhrystones_Per_Second%10));
|
5643 |
|
|
10002e50: 010a3583 ld a1,16(s4)
|
5644 |
|
|
Dhrystones_Per_Second = 10ll * ((int64_t)HZ * (int64_t) Number_Of_Runs);
|
5645 |
|
|
10002e54: 100067b7 lui a5,0x10006
|
5646 |
|
|
printf ("%6d.%01d \n", (int)(Dhrystones_Per_Second/(10*div1)), (int)(Dhrystones_Per_Second%10));
|
5647 |
|
|
10002e58: 4601 li a2,0
|
5648 |
|
|
10002e5a: 02b985b3 mul a1,s3,a1
|
5649 |
|
|
10002e5e: f08a8513 addi a0,s5,-248
|
5650 |
|
|
Dhrystones_Per_Second = 10ll * ((int64_t)HZ * (int64_t) Number_Of_Runs);
|
5651 |
|
|
10002e62: 0127b423 sd s2,8(a5) # 10006008
|
5652 |
|
|
printf ("%6d.%01d \n", (int)(Dhrystones_Per_Second/(10*div1)), (int)(Dhrystones_Per_Second%10));
|
5653 |
|
|
10002e66: 02b955b3 divu a1,s2,a1
|
5654 |
|
|
10002e6a: 2581 sext.w a1,a1
|
5655 |
|
|
10002e6c: e74fe0ef jal ra,100014e0
|
5656 |
|
|
10002e70: b701 j 10002d70
|
5657 |
|
|
|
5658 |
|
|
0000000010002e72 :
|
5659 |
|
|
/* executed once */
|
5660 |
|
|
/* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
|
5661 |
|
|
|
5662 |
|
|
Enumeration Enum_Val_Par;
|
5663 |
|
|
Enumeration *Enum_Ref_Par;
|
5664 |
|
|
{
|
5665 |
|
|
10002e72: 1141 addi sp,sp,-16
|
5666 |
|
|
10002e74: e422 sd s0,8(sp)
|
5667 |
|
|
10002e76: 0800 addi s0,sp,16
|
5668 |
|
|
Enumeration Enum_Par_Val;
|
5669 |
|
|
{
|
5670 |
|
|
Enumeration Enum_Loc;
|
5671 |
|
|
|
5672 |
|
|
Enum_Loc = Enum_Par_Val;
|
5673 |
|
|
if (Enum_Loc == Ident_3)
|
5674 |
|
|
10002e78: 4789 li a5,2
|
5675 |
|
|
10002e7a: 02f50963 beq a0,a5,10002eac
|
5676 |
|
|
*Enum_Ref_Par = Ident_4;
|
5677 |
|
|
10002e7e: 470d li a4,3
|
5678 |
|
|
10002e80: c198 sw a4,0(a1)
|
5679 |
|
|
switch (Enum_Val_Par)
|
5680 |
|
|
10002e82: 4705 li a4,1
|
5681 |
|
|
10002e84: 00e50963 beq a0,a4,10002e96
|
5682 |
|
|
10002e88: cd19 beqz a0,10002ea6
|
5683 |
|
|
10002e8a: 4711 li a4,4
|
5684 |
|
|
10002e8c: 02e50163 beq a0,a4,10002eae
|
5685 |
|
|
} /* Proc_6 */
|
5686 |
|
|
10002e90: 6422 ld s0,8(sp)
|
5687 |
|
|
10002e92: 0141 addi sp,sp,16
|
5688 |
|
|
10002e94: 8082 ret
|
5689 |
|
|
if (Int_Glob > 100)
|
5690 |
|
|
10002e96: 100087b7 lui a5,0x10008
|
5691 |
|
|
10002e9a: 7d87a703 lw a4,2008(a5) # 100087d8
|
5692 |
|
|
10002e9e: 06400793 li a5,100
|
5693 |
|
|
10002ea2: fee7d7e3 ble a4,a5,10002e90
|
5694 |
|
|
*Enum_Ref_Par = Ident_1;
|
5695 |
|
|
10002ea6: 0005a023 sw zero,0(a1)
|
5696 |
|
|
10002eaa: b7dd j 10002e90
|
5697 |
|
|
*Enum_Ref_Par = Ident_2;
|
5698 |
|
|
10002eac: 4785 li a5,1
|
5699 |
|
|
*Enum_Ref_Par = Ident_3;
|
5700 |
|
|
10002eae: c19c sw a5,0(a1)
|
5701 |
|
|
break;
|
5702 |
|
|
10002eb0: b7c5 j 10002e90
|
5703 |
|
|
|
5704 |
|
|
0000000010002eb2 :
|
5705 |
|
|
{
|
5706 |
|
|
10002eb2: 1141 addi sp,sp,-16
|
5707 |
|
|
10002eb4: e422 sd s0,8(sp)
|
5708 |
|
|
10002eb6: 0800 addi s0,sp,16
|
5709 |
|
|
Int_Loc = Int_1_Par_Val + 2;
|
5710 |
|
|
10002eb8: 2509 addiw a0,a0,2
|
5711 |
|
|
} /* Proc_7 */
|
5712 |
|
|
10002eba: 6422 ld s0,8(sp)
|
5713 |
|
|
*Int_Par_Ref = Int_2_Par_Val + Int_Loc;
|
5714 |
|
|
10002ebc: 9da9 addw a1,a1,a0
|
5715 |
|
|
10002ebe: c20c sw a1,0(a2)
|
5716 |
|
|
} /* Proc_7 */
|
5717 |
|
|
10002ec0: 0141 addi sp,sp,16
|
5718 |
|
|
10002ec2: 8082 ret
|
5719 |
|
|
|
5720 |
|
|
0000000010002ec4 :
|
5721 |
|
|
Int_Loc = Int_1_Par_Val + 5;
|
5722 |
|
|
10002ec4: 0056071b addiw a4,a2,5
|
5723 |
|
|
Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
|
5724 |
|
|
10002ec8: 00271793 slli a5,a4,0x2
|
5725 |
|
|
10002ecc: 953e add a0,a0,a5
|
5726 |
|
|
Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
|
5727 |
|
|
10002ece: 0c800793 li a5,200
|
5728 |
|
|
10002ed2: 02f707b3 mul a5,a4,a5
|
5729 |
|
|
{
|
5730 |
|
|
10002ed6: 1141 addi sp,sp,-16
|
5731 |
|
|
10002ed8: e422 sd s0,8(sp)
|
5732 |
|
|
10002eda: 0800 addi s0,sp,16
|
5733 |
|
|
Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
|
5734 |
|
|
10002edc: c114 sw a3,0(a0)
|
5735 |
|
|
Arr_1_Par_Ref [Int_Loc+1] = Arr_1_Par_Ref [Int_Loc];
|
5736 |
|
|
10002ede: c154 sw a3,4(a0)
|
5737 |
|
|
Arr_1_Par_Ref [Int_Loc+30] = Int_Loc;
|
5738 |
|
|
10002ee0: dd38 sw a4,120(a0)
|
5739 |
|
|
for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
|
5740 |
|
|
10002ee2: 0066081b addiw a6,a2,6
|
5741 |
|
|
Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
|
5742 |
|
|
10002ee6: 95be add a1,a1,a5
|
5743 |
|
|
for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
|
5744 |
|
|
10002ee8: 87ba mv a5,a4
|
5745 |
|
|
10002eea: 02f85463 ble a5,a6,10002f12
|
5746 |
|
|
10002eee: 060a slli a2,a2,0x2
|
5747 |
|
|
10002ef0: 95b2 add a1,a1,a2
|
5748 |
|
|
Arr_2_Par_Ref [Int_Loc] [Int_Loc-1] += 1;
|
5749 |
|
|
10002ef2: 499c lw a5,16(a1)
|
5750 |
|
|
Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
|
5751 |
|
|
10002ef4: 6605 lui a2,0x1
|
5752 |
|
|
} /* Proc_8 */
|
5753 |
|
|
10002ef6: 6422 ld s0,8(sp)
|
5754 |
|
|
Arr_2_Par_Ref [Int_Loc] [Int_Loc-1] += 1;
|
5755 |
|
|
10002ef8: 2785 addiw a5,a5,1
|
5756 |
|
|
10002efa: c99c sw a5,16(a1)
|
5757 |
|
|
Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
|
5758 |
|
|
10002efc: 411c lw a5,0(a0)
|
5759 |
|
|
10002efe: 95b2 add a1,a1,a2
|
5760 |
|
|
Int_Glob = 5;
|
5761 |
|
|
10002f00: 4715 li a4,5
|
5762 |
|
|
Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
|
5763 |
|
|
10002f02: faf5aa23 sw a5,-76(a1)
|
5764 |
|
|
Int_Glob = 5;
|
5765 |
|
|
10002f06: 100087b7 lui a5,0x10008
|
5766 |
|
|
10002f0a: 7ce7ac23 sw a4,2008(a5) # 100087d8
|
5767 |
|
|
} /* Proc_8 */
|
5768 |
|
|
10002f0e: 0141 addi sp,sp,16
|
5769 |
|
|
10002f10: 8082 ret
|
5770 |
|
|
Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
|
5771 |
|
|
10002f12: 00279693 slli a3,a5,0x2
|
5772 |
|
|
10002f16: 96ae add a3,a3,a1
|
5773 |
|
|
10002f18: c298 sw a4,0(a3)
|
5774 |
|
|
for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
|
5775 |
|
|
10002f1a: 2785 addiw a5,a5,1
|
5776 |
|
|
10002f1c: b7f9 j 10002eea
|
5777 |
|
|
|
5778 |
|
|
0000000010002f1e :
|
5779 |
|
|
{
|
5780 |
|
|
10002f1e: 1141 addi sp,sp,-16
|
5781 |
|
|
10002f20: e422 sd s0,8(sp)
|
5782 |
|
|
10002f22: 0800 addi s0,sp,16
|
5783 |
|
|
10002f24: 0ff57513 andi a0,a0,255
|
5784 |
|
|
10002f28: 0ff5f593 andi a1,a1,255
|
5785 |
|
|
if (Ch_2_Loc != Ch_2_Par_Val)
|
5786 |
|
|
10002f2c: 00b51a63 bne a0,a1,10002f40
|
5787 |
|
|
Ch_1_Glob = Ch_1_Loc;
|
5788 |
|
|
10002f30: 100087b7 lui a5,0x10008
|
5789 |
|
|
10002f34: 7ca78e23 sb a0,2012(a5) # 100087dc
|
5790 |
|
|
return (Ident_2);
|
5791 |
|
|
10002f38: 4505 li a0,1
|
5792 |
|
|
} /* Func_1 */
|
5793 |
|
|
10002f3a: 6422 ld s0,8(sp)
|
5794 |
|
|
10002f3c: 0141 addi sp,sp,16
|
5795 |
|
|
10002f3e: 8082 ret
|
5796 |
|
|
return (Ident_1);
|
5797 |
|
|
10002f40: 4501 li a0,0
|
5798 |
|
|
10002f42: bfe5 j 10002f3a
|
5799 |
|
|
|
5800 |
|
|
0000000010002f44 :
|
5801 |
|
|
{
|
5802 |
|
|
10002f44: 1141 addi sp,sp,-16
|
5803 |
|
|
10002f46: e022 sd s0,0(sp)
|
5804 |
|
|
10002f48: e406 sd ra,8(sp)
|
5805 |
|
|
10002f4a: 0800 addi s0,sp,16
|
5806 |
|
|
10002f4c: 100087b7 lui a5,0x10008
|
5807 |
|
|
if (Func_1 (Str_1_Par_Ref[Int_Loc],
|
5808 |
|
|
10002f50: 00254603 lbu a2,2(a0)
|
5809 |
|
|
Str_2_Par_Ref[Int_Loc+1]) == Ident_1)
|
5810 |
|
|
10002f54: 0035c803 lbu a6,3(a1)
|
5811 |
|
|
10002f58: 7dc7c703 lbu a4,2012(a5) # 100087dc
|
5812 |
|
|
10002f5c: 4681 li a3,0
|
5813 |
|
|
if (Ch_2_Loc != Ch_2_Par_Val)
|
5814 |
|
|
10002f5e: 03060563 beq a2,a6,10002f88
|
5815 |
|
|
10002f62: c299 beqz a3,10002f68
|
5816 |
|
|
10002f64: 7ce78e23 sb a4,2012(a5)
|
5817 |
|
|
if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
|
5818 |
|
|
10002f68: 89aff0ef jal ra,10002002
|
5819 |
|
|
return (false);
|
5820 |
|
|
10002f6c: 4781 li a5,0
|
5821 |
|
|
if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
|
5822 |
|
|
10002f6e: 00a05863 blez a0,10002f7e
|
5823 |
|
|
Int_Glob = Int_Loc;
|
5824 |
|
|
10002f72: 100087b7 lui a5,0x10008
|
5825 |
|
|
10002f76: 4729 li a4,10
|
5826 |
|
|
10002f78: 7ce7ac23 sw a4,2008(a5) # 100087d8
|
5827 |
|
|
return (true);
|
5828 |
|
|
10002f7c: 4785 li a5,1
|
5829 |
|
|
} /* Func_2 */
|
5830 |
|
|
10002f7e: 60a2 ld ra,8(sp)
|
5831 |
|
|
10002f80: 6402 ld s0,0(sp)
|
5832 |
|
|
10002f82: 853e mv a0,a5
|
5833 |
|
|
10002f84: 0141 addi sp,sp,16
|
5834 |
|
|
10002f86: 8082 ret
|
5835 |
|
|
if (Ch_2_Loc != Ch_2_Par_Val)
|
5836 |
|
|
10002f88: 4685 li a3,1
|
5837 |
|
|
10002f8a: 8732 mv a4,a2
|
5838 |
|
|
10002f8c: bfc9 j 10002f5e
|
5839 |
|
|
|
5840 |
|
|
0000000010002f8e :
|
5841 |
|
|
* This function always exits with interrupts unlocked.
|
5842 |
|
|
*
|
5843 |
|
|
* void nanCpuIdle(void)
|
5844 |
|
|
*/
|
5845 |
|
|
|
5846 |
|
|
void nano_cpu_idle(void) {
|
5847 |
|
|
10002f8e: 1141 addi sp,sp,-16
|
5848 |
|
|
10002f90: e422 sd s0,8(sp)
|
5849 |
|
|
10002f92: 0800 addi s0,sp,16
|
5850 |
|
|
_arch_irq_unlock(0);
|
5851 |
|
|
}
|
5852 |
|
|
10002f94: 6422 ld s0,8(sp)
|
5853 |
|
|
_arch_irq_unlock(0);
|
5854 |
|
|
10002f96: 4501 li a0,0
|
5855 |
|
|
}
|
5856 |
|
|
10002f98: 0141 addi sp,sp,16
|
5857 |
|
|
_arch_irq_unlock(0);
|
5858 |
|
|
10002f9a: 0940006f j 1000302e <_arch_irq_unlock>
|
5859 |
|
|
|
5860 |
|
|
0000000010002f9e <_NanoFatalErrorHandler>:
|
5861 |
|
|
*
|
5862 |
|
|
* @return This function does not return.
|
5863 |
|
|
*/
|
5864 |
|
|
FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int reason,
|
5865 |
|
|
const NANO_ESF *pEsf)
|
5866 |
|
|
{
|
5867 |
|
|
10002f9e: 1141 addi sp,sp,-16
|
5868 |
|
|
10002fa0: e022 sd s0,0(sp)
|
5869 |
|
|
10002fa2: e406 sd ra,8(sp)
|
5870 |
|
|
10002fa4: 0800 addi s0,sp,16
|
5871 |
|
|
|
5872 |
|
|
#ifdef CONFIG_PRINTK
|
5873 |
|
|
printk("***** Unhandled interrupt vector %d occurred! \n", -1);
|
5874 |
|
|
10002fa6: 10005537 lui a0,0x10005
|
5875 |
|
|
10002faa: 55fd li a1,-1
|
5876 |
|
|
10002fac: f4850513 addi a0,a0,-184 # 10004f48
|
5877 |
|
|
10002fb0: a86ff0ef jal ra,10002236
|
5878 |
|
|
10002fb4: a001 j 10002fb4 <_NanoFatalErrorHandler+0x16>
|
5879 |
|
|
|
5880 |
|
|
0000000010002fb6 :
|
5881 |
|
|
*/
|
5882 |
|
|
void _arch_irq_disable(unsigned int irq)
|
5883 |
|
|
{
|
5884 |
|
|
uint32_t bit = READ32(&__IRQCTRL->irq_mask);
|
5885 |
|
|
bit |= (1u << irq);
|
5886 |
|
|
WRITE32(&__IRQCTRL->irq_mask, bit);
|
5887 |
|
|
10002fb6: 100087b7 lui a5,0x10008
|
5888 |
|
|
10002fba: 0512 slli a0,a0,0x4
|
5889 |
|
|
10002fbc: 77878793 addi a5,a5,1912 # 10008778
|
5890 |
|
|
10002fc0: 953e add a0,a0,a5
|
5891 |
|
|
10002fc2: 6518 ld a4,8(a0)
|
5892 |
|
|
10002fc4: cb0d beqz a4,10002ff6
|
5893 |
|
|
10002fc6: 1101 addi sp,sp,-32
|
5894 |
|
|
10002fc8: e822 sd s0,16(sp)
|
5895 |
|
|
10002fca: e426 sd s1,8(sp)
|
5896 |
|
|
10002fcc: ec06 sd ra,24(sp)
|
5897 |
|
|
10002fce: 1000 addi s0,sp,32
|
5898 |
|
|
10002fd0: 100064b7 lui s1,0x10006
|
5899 |
|
|
10002fd4: dc04a783 lw a5,-576(s1) # 10005dc0 <_kernel>
|
5900 |
|
|
10002fd8: 6108 ld a0,0(a0)
|
5901 |
|
|
10002fda: 2785 addiw a5,a5,1
|
5902 |
|
|
10002fdc: dcf4a023 sw a5,-576(s1)
|
5903 |
|
|
10002fe0: 9702 jalr a4
|
5904 |
|
|
10002fe2: dc04a783 lw a5,-576(s1)
|
5905 |
|
|
10002fe6: 60e2 ld ra,24(sp)
|
5906 |
|
|
10002fe8: 6442 ld s0,16(sp)
|
5907 |
|
|
10002fea: 37fd addiw a5,a5,-1
|
5908 |
|
|
10002fec: dcf4a023 sw a5,-576(s1)
|
5909 |
|
|
10002ff0: 64a2 ld s1,8(sp)
|
5910 |
|
|
10002ff2: 6105 addi sp,sp,32
|
5911 |
|
|
10002ff4: 8082 ret
|
5912 |
|
|
10002ff6: 8082 ret
|
5913 |
|
|
|
5914 |
|
|
0000000010002ff8 <_arch_irq_lock>:
|
5915 |
|
|
10002ff8: 1101 addi sp,sp,-32
|
5916 |
|
|
10002ffa: e426 sd s1,8(sp)
|
5917 |
|
|
10002ffc: 400014b7 lui s1,0x40001
|
5918 |
|
|
10003000: ec06 sd ra,24(sp)
|
5919 |
|
|
10003002: e822 sd s0,16(sp)
|
5920 |
|
|
10003004: e04a sd s2,0(sp)
|
5921 |
|
|
10003006: 1000 addi s0,sp,32
|
5922 |
|
|
10003008: 0486 slli s1,s1,0x1
|
5923 |
|
|
1000300a: 02848513 addi a0,s1,40 # 40001028 <_time_slice_prio_ceiling+0x2fff72c4>
|
5924 |
|
|
1000300e: 196000ef jal ra,100031a4
|
5925 |
|
|
10003012: 0005091b sext.w s2,a0
|
5926 |
|
|
10003016: 4585 li a1,1
|
5927 |
|
|
10003018: 02848513 addi a0,s1,40
|
5928 |
|
|
1000301c: 1a4000ef jal ra,100031c0
|
5929 |
|
|
10003020: 60e2 ld ra,24(sp)
|
5930 |
|
|
10003022: 6442 ld s0,16(sp)
|
5931 |
|
|
10003024: 854a mv a0,s2
|
5932 |
|
|
10003026: 64a2 ld s1,8(sp)
|
5933 |
|
|
10003028: 6902 ld s2,0(sp)
|
5934 |
|
|
1000302a: 6105 addi sp,sp,32
|
5935 |
|
|
1000302c: 8082 ret
|
5936 |
|
|
|
5937 |
|
|
000000001000302e <_arch_irq_unlock>:
|
5938 |
|
|
1000302e: 1141 addi sp,sp,-16
|
5939 |
|
|
10003030: e422 sd s0,8(sp)
|
5940 |
|
|
10003032: 0800 addi s0,sp,16
|
5941 |
|
|
10003034: 6422 ld s0,8(sp)
|
5942 |
|
|
10003036: 85aa mv a1,a0
|
5943 |
|
|
10003038: 40001537 lui a0,0x40001
|
5944 |
|
|
1000303c: 0506 slli a0,a0,0x1
|
5945 |
|
|
1000303e: 02850513 addi a0,a0,40 # 40001028 <_time_slice_prio_ceiling+0x2fff72c4>
|
5946 |
|
|
10003042: 0141 addi sp,sp,16
|
5947 |
|
|
10003044: 17c0006f j 100031c0
|
5948 |
|
|
|
5949 |
|
|
0000000010003048 <_arch_irq_lock_state>:
|
5950 |
|
|
10003048: 1141 addi sp,sp,-16
|
5951 |
|
|
1000304a: e422 sd s0,8(sp)
|
5952 |
|
|
1000304c: 0800 addi s0,sp,16
|
5953 |
|
|
1000304e: 6422 ld s0,8(sp)
|
5954 |
|
|
10003050: 40001537 lui a0,0x40001
|
5955 |
|
|
10003054: 0506 slli a0,a0,0x1
|
5956 |
|
|
10003056: 02850513 addi a0,a0,40 # 40001028 <_time_slice_prio_ceiling+0x2fff72c4>
|
5957 |
|
|
1000305a: 0141 addi sp,sp,16
|
5958 |
|
|
1000305c: 1480006f j 100031a4
|
5959 |
|
|
|
5960 |
|
|
0000000010003060 <_arch_irq_enable>:
|
5961 |
|
|
10003060: 1101 addi sp,sp,-32
|
5962 |
|
|
10003062: ec06 sd ra,24(sp)
|
5963 |
|
|
10003064: e822 sd s0,16(sp)
|
5964 |
|
|
10003066: e426 sd s1,8(sp)
|
5965 |
|
|
10003068: e04a sd s2,0(sp)
|
5966 |
|
|
1000306a: 1000 addi s0,sp,32
|
5967 |
|
|
1000306c: 400014b7 lui s1,0x40001
|
5968 |
|
|
10003070: 892a mv s2,a0
|
5969 |
|
|
10003072: 00149513 slli a0,s1,0x1
|
5970 |
|
|
10003076: 12e000ef jal ra,100031a4
|
5971 |
|
|
1000307a: 4585 li a1,1
|
5972 |
|
|
1000307c: 012595bb sllw a1,a1,s2
|
5973 |
|
|
10003080: fff5c913 not s2,a1
|
5974 |
|
|
10003084: 0486 slli s1,s1,0x1
|
5975 |
|
|
10003086: 01257933 and s2,a0,s2
|
5976 |
|
|
1000308a: 00848513 addi a0,s1,8 # 40001008 <_time_slice_prio_ceiling+0x2fff72a4>
|
5977 |
|
|
1000308e: 132000ef jal ra,100031c0
|
5978 |
|
|
10003092: 2901 sext.w s2,s2
|
5979 |
|
|
10003094: 6442 ld s0,16(sp)
|
5980 |
|
|
10003096: 60e2 ld ra,24(sp)
|
5981 |
|
|
10003098: 85ca mv a1,s2
|
5982 |
|
|
1000309a: 8526 mv a0,s1
|
5983 |
|
|
1000309c: 6902 ld s2,0(sp)
|
5984 |
|
|
1000309e: 64a2 ld s1,8(sp)
|
5985 |
|
|
100030a0: 6105 addi sp,sp,32
|
5986 |
|
|
100030a2: 11e0006f j 100031c0
|
5987 |
|
|
|
5988 |
|
|
00000000100030a6 <_irq_handler_set>:
|
5989 |
|
|
void _irq_handler_set(
|
5990 |
|
|
unsigned int irq,
|
5991 |
|
|
void (*new)(void *arg),
|
5992 |
|
|
void *arg
|
5993 |
|
|
)
|
5994 |
|
|
{
|
5995 |
|
|
100030a6: 7179 addi sp,sp,-48
|
5996 |
|
|
100030a8: f022 sd s0,32(sp)
|
5997 |
|
|
100030aa: ec26 sd s1,24(sp)
|
5998 |
|
|
100030ac: 1800 addi s0,sp,48
|
5999 |
|
|
100030ae: f406 sd ra,40(sp)
|
6000 |
|
|
100030b0: 84aa mv s1,a0
|
6001 |
|
|
100030b2: fcb43823 sd a1,-48(s0)
|
6002 |
|
|
100030b6: fcc43c23 sd a2,-40(s0)
|
6003 |
|
|
int key = irq_lock();
|
6004 |
|
|
100030ba: f3fff0ef jal ra,10002ff8 <_arch_irq_lock>
|
6005 |
|
|
|
6006 |
|
|
__ASSERT(irq < CONFIG_NUM_IRQS, "IRQ number too high");
|
6007 |
|
|
isr_demux_table[irq].arg = arg;
|
6008 |
|
|
100030be: fd843603 ld a2,-40(s0)
|
6009 |
|
|
isr_demux_table[irq].isr = new;
|
6010 |
|
|
100030c2: fd043583 ld a1,-48(s0)
|
6011 |
|
|
isr_demux_table[irq].arg = arg;
|
6012 |
|
|
100030c6: 02049793 slli a5,s1,0x20
|
6013 |
|
|
100030ca: 10008737 lui a4,0x10008
|
6014 |
|
|
|
6015 |
|
|
irq_unlock(key);
|
6016 |
|
|
}
|
6017 |
|
|
100030ce: 7402 ld s0,32(sp)
|
6018 |
|
|
isr_demux_table[irq].arg = arg;
|
6019 |
|
|
100030d0: 83f1 srli a5,a5,0x1c
|
6020 |
|
|
100030d2: 77870713 addi a4,a4,1912 # 10008778
|
6021 |
|
|
100030d6: 97ba add a5,a5,a4
|
6022 |
|
|
}
|
6023 |
|
|
100030d8: 70a2 ld ra,40(sp)
|
6024 |
|
|
100030da: 64e2 ld s1,24(sp)
|
6025 |
|
|
isr_demux_table[irq].arg = arg;
|
6026 |
|
|
100030dc: e390 sd a2,0(a5)
|
6027 |
|
|
isr_demux_table[irq].isr = new;
|
6028 |
|
|
100030de: e78c sd a1,8(a5)
|
6029 |
|
|
irq_unlock(key);
|
6030 |
|
|
100030e0: 2501 sext.w a0,a0
|
6031 |
|
|
}
|
6032 |
|
|
100030e2: 6145 addi sp,sp,48
|
6033 |
|
|
irq_unlock(key);
|
6034 |
|
|
100030e4: f4bff06f j 1000302e <_arch_irq_unlock>
|
6035 |
|
|
|
6036 |
|
|
00000000100030e8 <_arch_irq_connect_dynamic>:
|
6037 |
|
|
* @return the interrupt line number
|
6038 |
|
|
*/
|
6039 |
|
|
int _arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
|
6040 |
|
|
void (*routine)(void *arg), void *parameter,
|
6041 |
|
|
uint32_t flags)
|
6042 |
|
|
{
|
6043 |
|
|
100030e8: 1101 addi sp,sp,-32
|
6044 |
|
|
100030ea: e822 sd s0,16(sp)
|
6045 |
|
|
100030ec: e426 sd s1,8(sp)
|
6046 |
|
|
100030ee: ec06 sd ra,24(sp)
|
6047 |
|
|
100030f0: 1000 addi s0,sp,32
|
6048 |
|
|
100030f2: 85b2 mv a1,a2
|
6049 |
|
|
ARG_UNUSED(flags);
|
6050 |
|
|
_irq_handler_set(irq, routine, parameter);
|
6051 |
|
|
100030f4: 8636 mv a2,a3
|
6052 |
|
|
{
|
6053 |
|
|
100030f6: 84aa mv s1,a0
|
6054 |
|
|
_irq_handler_set(irq, routine, parameter);
|
6055 |
|
|
100030f8: fafff0ef jal ra,100030a6 <_irq_handler_set>
|
6056 |
|
|
return irq;
|
6057 |
|
|
}
|
6058 |
|
|
100030fc: 60e2 ld ra,24(sp)
|
6059 |
|
|
100030fe: 6442 ld s0,16(sp)
|
6060 |
|
|
10003100: 8526 mv a0,s1
|
6061 |
|
|
10003102: 64a2 ld s1,8(sp)
|
6062 |
|
|
10003104: 6105 addi sp,sp,32
|
6063 |
|
|
10003106: 8082 ret
|
6064 |
|
|
|
6065 |
|
|
0000000010003108 <_new_thread>:
|
6066 |
|
|
*/
|
6067 |
|
|
extern void _new_thread(char *pStack, size_t stackSize,
|
6068 |
|
|
void (*pEntry)(void *, void *, void *),
|
6069 |
|
|
void *p1, void *p2, void *p3,
|
6070 |
|
|
int prio, unsigned options)
|
6071 |
|
|
{
|
6072 |
|
|
10003108: 715d addi sp,sp,-80
|
6073 |
|
|
1000310a: e486 sd ra,72(sp)
|
6074 |
|
|
1000310c: e0a2 sd s0,64(sp)
|
6075 |
|
|
1000310e: fc26 sd s1,56(sp)
|
6076 |
|
|
10003110: 0880 addi s0,sp,80
|
6077 |
|
|
10003112: f84a sd s2,48(sp)
|
6078 |
|
|
10003114: f44e sd s3,40(sp)
|
6079 |
|
|
10003116: f052 sd s4,32(sp)
|
6080 |
|
|
10003118: 8a32 mv s4,a2
|
6081 |
|
|
1000311a: 892e mv s2,a1
|
6082 |
|
|
|
6083 |
|
|
struct k_thread *thread;
|
6084 |
|
|
unsigned long *pInitialCtx;
|
6085 |
|
|
|
6086 |
|
|
#ifdef CONFIG_INIT_STACKS
|
6087 |
|
|
memset(pStack, 0xaa, stackSize);
|
6088 |
|
|
1000311c: 862e mv a2,a1
|
6089 |
|
|
1000311e: 0aa00593 li a1,170
|
6090 |
|
|
{
|
6091 |
|
|
10003122: 84aa mv s1,a0
|
6092 |
|
|
10003124: 89b6 mv s3,a3
|
6093 |
|
|
10003126: fae43823 sd a4,-80(s0)
|
6094 |
|
|
1000312a: faf43c23 sd a5,-72(s0)
|
6095 |
|
|
1000312e: fd043023 sd a6,-64(s0)
|
6096 |
|
|
10003132: fd143423 sd a7,-56(s0)
|
6097 |
|
|
memset(pStack, 0xaa, stackSize);
|
6098 |
|
|
10003136: 800ff0ef jal ra,10002136
|
6099 |
|
|
thread = (struct k_thread *)pStack;
|
6100 |
|
|
pInitialCtx =
|
6101 |
|
|
(unsigned long *)(pStack + stackSize);
|
6102 |
|
|
|
6103 |
|
|
|
6104 |
|
|
_init_thread_base(&thread->base, prio, K_PRESTART, options);
|
6105 |
|
|
1000313a: fc043803 ld a6,-64(s0)
|
6106 |
|
|
1000313e: fc843683 ld a3,-56(s0)
|
6107 |
|
|
10003142: 8526 mv a0,s1
|
6108 |
|
|
10003144: 6611 lui a2,0x4
|
6109 |
|
|
10003146: 85c2 mv a1,a6
|
6110 |
|
|
10003148: 62f000ef jal ra,10003f76 <_init_thread_base>
|
6111 |
|
|
//printk("\nInitial context SP = 0x%x\n", (unsigned long)pStack);
|
6112 |
|
|
thread->callee_saved.r[COOP_REG_RA/sizeof(uint64_t)] = (uint64_t)_thread_entry;
|
6113 |
|
|
thread->callee_saved.r[COOP_REG_MEPC/sizeof(uint64_t)] = (uint64_t)_thread_entry;
|
6114 |
|
|
thread->callee_saved.r[COOP_REG_A0/sizeof(uint64_t)] = (uint64_t)pEntry;
|
6115 |
|
|
thread->callee_saved.r[COOP_REG_A1/sizeof(uint64_t)] = (uint64_t)p1;
|
6116 |
|
|
thread->callee_saved.r[COOP_REG_A2/sizeof(uint64_t)] = (uint64_t)p2;
|
6117 |
|
|
1000314c: fb043703 ld a4,-80(s0)
|
6118 |
|
|
thread->callee_saved.r[COOP_REG_A3/sizeof(uint64_t)] = (uint64_t)p3;
|
6119 |
|
|
10003150: fb843783 ld a5,-72(s0)
|
6120 |
|
|
thread->callee_saved.r[COOP_REG_SP/sizeof(uint64_t)] =
|
6121 |
|
|
(uint64_t)(pStack + stackSize);
|
6122 |
|
|
#ifdef _WIN32
|
6123 |
|
|
LIBH_create_thread(pStack, (unsigned int)stackSize, prio, options);
|
6124 |
|
|
#endif
|
6125 |
|
|
}
|
6126 |
|
|
10003154: 60a6 ld ra,72(sp)
|
6127 |
|
|
10003156: 6406 ld s0,64(sp)
|
6128 |
|
|
thread->callee_saved.r[COOP_REG_RA/sizeof(uint64_t)] = (uint64_t)_thread_entry;
|
6129 |
|
|
10003158: 100046b7 lui a3,0x10004
|
6130 |
|
|
pInitialCtx =
|
6131 |
|
|
1000315c: 9926 add s2,s2,s1
|
6132 |
|
|
thread->callee_saved.r[COOP_REG_RA/sizeof(uint64_t)] = (uint64_t)_thread_entry;
|
6133 |
|
|
1000315e: d5468693 addi a3,a3,-684 # 10003d54 <_thread_entry>
|
6134 |
|
|
thread->callee_saved.r[COOP_REG_A0/sizeof(uint64_t)] = (uint64_t)pEntry;
|
6135 |
|
|
10003162: 0f44b423 sd s4,232(s1)
|
6136 |
|
|
thread->callee_saved.r[COOP_REG_A1/sizeof(uint64_t)] = (uint64_t)p1;
|
6137 |
|
|
10003166: 0f34b823 sd s3,240(s1)
|
6138 |
|
|
thread->callee_saved.r[COOP_REG_SP/sizeof(uint64_t)] =
|
6139 |
|
|
1000316a: 0d24b423 sd s2,200(s1)
|
6140 |
|
|
thread->init_data = NULL;
|
6141 |
|
|
1000316e: 1604bc23 sd zero,376(s1)
|
6142 |
|
|
thread->fn_abort = NULL;
|
6143 |
|
|
10003172: 1804b023 sd zero,384(s1)
|
6144 |
|
|
thread->callee_saved.key = 0;
|
6145 |
|
|
10003176: 1604b023 sd zero,352(s1)
|
6146 |
|
|
thread->callee_saved.preemptive = 0;
|
6147 |
|
|
1000317a: 1604b823 sd zero,368(s1)
|
6148 |
|
|
thread->callee_saved.r[COOP_REG_RA/sizeof(uint64_t)] = (uint64_t)_thread_entry;
|
6149 |
|
|
1000317e: f0b4 sd a3,96(s1)
|
6150 |
|
|
thread->callee_saved.r[COOP_REG_MEPC/sizeof(uint64_t)] = (uint64_t)_thread_entry;
|
6151 |
|
|
10003180: e8f4 sd a3,208(s1)
|
6152 |
|
|
thread->callee_saved.r[COOP_REG_A2/sizeof(uint64_t)] = (uint64_t)p2;
|
6153 |
|
|
10003182: fcf8 sd a4,248(s1)
|
6154 |
|
|
thread->callee_saved.r[COOP_REG_A3/sizeof(uint64_t)] = (uint64_t)p3;
|
6155 |
|
|
10003184: 10f4b023 sd a5,256(s1)
|
6156 |
|
|
}
|
6157 |
|
|
10003188: 7942 ld s2,48(sp)
|
6158 |
|
|
1000318a: 74e2 ld s1,56(sp)
|
6159 |
|
|
1000318c: 79a2 ld s3,40(sp)
|
6160 |
|
|
1000318e: 7a02 ld s4,32(sp)
|
6161 |
|
|
10003190: 6161 addi sp,sp,80
|
6162 |
|
|
10003192: 8082 ret
|
6163 |
|
|
|
6164 |
|
|
0000000010003194 :
|
6165 |
|
|
*/
|
6166 |
|
|
|
6167 |
|
|
#include
|
6168 |
|
|
|
6169 |
|
|
uint16_t READ16(volatile uint16_t *addr)
|
6170 |
|
|
{
|
6171 |
|
|
10003194: 1141 addi sp,sp,-16
|
6172 |
|
|
10003196: e422 sd s0,8(sp)
|
6173 |
|
|
10003198: 0800 addi s0,sp,16
|
6174 |
|
|
return *addr;
|
6175 |
|
|
}
|
6176 |
|
|
1000319a: 6422 ld s0,8(sp)
|
6177 |
|
|
return *addr;
|
6178 |
|
|
1000319c: 00055503 lhu a0,0(a0)
|
6179 |
|
|
}
|
6180 |
|
|
100031a0: 0141 addi sp,sp,16
|
6181 |
|
|
100031a2: 8082 ret
|
6182 |
|
|
|
6183 |
|
|
00000000100031a4 :
|
6184 |
|
|
|
6185 |
|
|
uint32_t READ32(volatile uint32_t *addr)
|
6186 |
|
|
{
|
6187 |
|
|
100031a4: 1141 addi sp,sp,-16
|
6188 |
|
|
100031a6: e422 sd s0,8(sp)
|
6189 |
|
|
100031a8: 0800 addi s0,sp,16
|
6190 |
|
|
return *addr;
|
6191 |
|
|
}
|
6192 |
|
|
100031aa: 6422 ld s0,8(sp)
|
6193 |
|
|
return *addr;
|
6194 |
|
|
100031ac: 4108 lw a0,0(a0)
|
6195 |
|
|
}
|
6196 |
|
|
100031ae: 0141 addi sp,sp,16
|
6197 |
|
|
100031b0: 8082 ret
|
6198 |
|
|
|
6199 |
|
|
00000000100031b2 :
|
6200 |
|
|
|
6201 |
|
|
uint64_t READ64(volatile uint64_t *addr)
|
6202 |
|
|
{
|
6203 |
|
|
100031b2: 1141 addi sp,sp,-16
|
6204 |
|
|
100031b4: e422 sd s0,8(sp)
|
6205 |
|
|
100031b6: 0800 addi s0,sp,16
|
6206 |
|
|
return *addr;
|
6207 |
|
|
}
|
6208 |
|
|
100031b8: 6422 ld s0,8(sp)
|
6209 |
|
|
return *addr;
|
6210 |
|
|
100031ba: 6108 ld a0,0(a0)
|
6211 |
|
|
}
|
6212 |
|
|
100031bc: 0141 addi sp,sp,16
|
6213 |
|
|
100031be: 8082 ret
|
6214 |
|
|
|
6215 |
|
|
00000000100031c0 :
|
6216 |
|
|
|
6217 |
|
|
void WRITE32(volatile uint32_t *addr, uint32_t val)
|
6218 |
|
|
{
|
6219 |
|
|
100031c0: 1141 addi sp,sp,-16
|
6220 |
|
|
100031c2: e422 sd s0,8(sp)
|
6221 |
|
|
100031c4: 0800 addi s0,sp,16
|
6222 |
|
|
*addr = val;
|
6223 |
|
|
}
|
6224 |
|
|
100031c6: 6422 ld s0,8(sp)
|
6225 |
|
|
*addr = val;
|
6226 |
|
|
100031c8: c10c sw a1,0(a0)
|
6227 |
|
|
}
|
6228 |
|
|
100031ca: 0141 addi sp,sp,16
|
6229 |
|
|
100031cc: 8082 ret
|
6230 |
|
|
|
6231 |
|
|
00000000100031ce :
|
6232 |
|
|
|
6233 |
|
|
void WRITE64(volatile uint64_t *addr, uint64_t val)
|
6234 |
|
|
{
|
6235 |
|
|
100031ce: 1141 addi sp,sp,-16
|
6236 |
|
|
100031d0: e422 sd s0,8(sp)
|
6237 |
|
|
100031d2: 0800 addi s0,sp,16
|
6238 |
|
|
*addr = val;
|
6239 |
|
|
}
|
6240 |
|
|
100031d4: 6422 ld s0,8(sp)
|
6241 |
|
|
*addr = val;
|
6242 |
|
|
100031d6: e10c sd a1,0(a0)
|
6243 |
|
|
}
|
6244 |
|
|
100031d8: 0141 addi sp,sp,16
|
6245 |
|
|
100031da: 8082 ret
|
6246 |
|
|
|
6247 |
|
|
00000000100031dc :
|
6248 |
|
|
*target ^= value;
|
6249 |
|
|
|
6250 |
|
|
irq_unlock(key);
|
6251 |
|
|
|
6252 |
|
|
return ret;
|
6253 |
|
|
}
|
6254 |
|
|
100031dc: 1101 addi sp,sp,-32
|
6255 |
|
|
100031de: ec06 sd ra,24(sp)
|
6256 |
|
|
100031e0: e822 sd s0,16(sp)
|
6257 |
|
|
100031e2: e426 sd s1,8(sp)
|
6258 |
|
|
100031e4: e04a sd s2,0(sp)
|
6259 |
|
|
100031e6: 1000 addi s0,sp,32
|
6260 |
|
|
100031e8: 892a mv s2,a0
|
6261 |
|
|
100031ea: e0fff0ef jal ra,10002ff8 <_arch_irq_lock>
|
6262 |
|
|
100031ee: 00092483 lw s1,0(s2)
|
6263 |
|
|
100031f2: 2501 sext.w a0,a0
|
6264 |
|
|
100031f4: 0014879b addiw a5,s1,1
|
6265 |
|
|
100031f8: 00f92023 sw a5,0(s2)
|
6266 |
|
|
100031fc: e33ff0ef jal ra,1000302e <_arch_irq_unlock>
|
6267 |
|
|
10003200: 60e2 ld ra,24(sp)
|
6268 |
|
|
10003202: 6442 ld s0,16(sp)
|
6269 |
|
|
10003204: 8526 mv a0,s1
|
6270 |
|
|
10003206: 6902 ld s2,0(sp)
|
6271 |
|
|
10003208: 64a2 ld s1,8(sp)
|
6272 |
|
|
1000320a: 6105 addi sp,sp,32
|
6273 |
|
|
1000320c: 8082 ret
|
6274 |
|
|
|
6275 |
|
|
000000001000320e :
|
6276 |
|
|
1000320e: 1101 addi sp,sp,-32
|
6277 |
|
|
10003210: ec06 sd ra,24(sp)
|
6278 |
|
|
10003212: e822 sd s0,16(sp)
|
6279 |
|
|
10003214: e426 sd s1,8(sp)
|
6280 |
|
|
10003216: e04a sd s2,0(sp)
|
6281 |
|
|
10003218: 1000 addi s0,sp,32
|
6282 |
|
|
1000321a: 892a mv s2,a0
|
6283 |
|
|
1000321c: dddff0ef jal ra,10002ff8 <_arch_irq_lock>
|
6284 |
|
|
10003220: 00092483 lw s1,0(s2)
|
6285 |
|
|
10003224: 2501 sext.w a0,a0
|
6286 |
|
|
10003226: fff4879b addiw a5,s1,-1
|
6287 |
|
|
1000322a: 00f92023 sw a5,0(s2)
|
6288 |
|
|
1000322e: e01ff0ef jal ra,1000302e <_arch_irq_unlock>
|
6289 |
|
|
10003232: 60e2 ld ra,24(sp)
|
6290 |
|
|
10003234: 6442 ld s0,16(sp)
|
6291 |
|
|
10003236: 8526 mv a0,s1
|
6292 |
|
|
10003238: 6902 ld s2,0(sp)
|
6293 |
|
|
1000323a: 64a2 ld s1,8(sp)
|
6294 |
|
|
1000323c: 6105 addi sp,sp,32
|
6295 |
|
|
1000323e: 8082 ret
|
6296 |
|
|
|
6297 |
|
|
0000000010003240 :
|
6298 |
|
|
10003240: 1141 addi sp,sp,-16
|
6299 |
|
|
10003242: e422 sd s0,8(sp)
|
6300 |
|
|
10003244: 0800 addi s0,sp,16
|
6301 |
|
|
10003246: 6422 ld s0,8(sp)
|
6302 |
|
|
10003248: 4108 lw a0,0(a0)
|
6303 |
|
|
1000324a: 0141 addi sp,sp,16
|
6304 |
|
|
1000324c: 8082 ret
|
6305 |
|
|
|
6306 |
|
|
000000001000324e :
|
6307 |
|
|
1000324e: 7179 addi sp,sp,-48
|
6308 |
|
|
10003250: f406 sd ra,40(sp)
|
6309 |
|
|
10003252: f022 sd s0,32(sp)
|
6310 |
|
|
10003254: ec26 sd s1,24(sp)
|
6311 |
|
|
10003256: 1800 addi s0,sp,48
|
6312 |
|
|
10003258: e84a sd s2,16(sp)
|
6313 |
|
|
1000325a: 892a mv s2,a0
|
6314 |
|
|
1000325c: fcb43c23 sd a1,-40(s0)
|
6315 |
|
|
10003260: d99ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
6316 |
|
|
10003264: fd843583 ld a1,-40(s0)
|
6317 |
|
|
10003268: 00092483 lw s1,0(s2)
|
6318 |
|
|
1000326c: 2501 sext.w a0,a0
|
6319 |
|
|
1000326e: 8dc5 or a1,a1,s1
|
6320 |
|
|
10003270: 00b92023 sw a1,0(s2)
|
6321 |
|
|
10003274: dbbff0ef jal ra,1000302e <_arch_irq_unlock>
|
6322 |
|
|
10003278: 70a2 ld ra,40(sp)
|
6323 |
|
|
1000327a: 7402 ld s0,32(sp)
|
6324 |
|
|
1000327c: 8526 mv a0,s1
|
6325 |
|
|
1000327e: 6942 ld s2,16(sp)
|
6326 |
|
|
10003280: 64e2 ld s1,24(sp)
|
6327 |
|
|
10003282: 6145 addi sp,sp,48
|
6328 |
|
|
10003284: 8082 ret
|
6329 |
|
|
|
6330 |
|
|
0000000010003286 :
|
6331 |
|
|
* @param value the value to AND
|
6332 |
|
|
*
|
6333 |
|
|
* @return The previous value from
|
6334 |
|
|
*/
|
6335 |
|
|
atomic_val_t atomic_and(atomic_t *target, atomic_val_t value)
|
6336 |
|
|
{
|
6337 |
|
|
10003286: 7179 addi sp,sp,-48
|
6338 |
|
|
10003288: f406 sd ra,40(sp)
|
6339 |
|
|
1000328a: f022 sd s0,32(sp)
|
6340 |
|
|
1000328c: ec26 sd s1,24(sp)
|
6341 |
|
|
1000328e: 1800 addi s0,sp,48
|
6342 |
|
|
10003290: e84a sd s2,16(sp)
|
6343 |
|
|
10003292: 892a mv s2,a0
|
6344 |
|
|
10003294: fcb43c23 sd a1,-40(s0)
|
6345 |
|
|
unsigned int key;
|
6346 |
|
|
atomic_val_t ret;
|
6347 |
|
|
|
6348 |
|
|
key = irq_lock();
|
6349 |
|
|
10003298: d61ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
6350 |
|
|
|
6351 |
|
|
ret = *target;
|
6352 |
|
|
*target &= value;
|
6353 |
|
|
1000329c: fd843583 ld a1,-40(s0)
|
6354 |
|
|
ret = *target;
|
6355 |
|
|
100032a0: 00092483 lw s1,0(s2)
|
6356 |
|
|
|
6357 |
|
|
irq_unlock(key);
|
6358 |
|
|
100032a4: 2501 sext.w a0,a0
|
6359 |
|
|
*target &= value;
|
6360 |
|
|
100032a6: 8de5 and a1,a1,s1
|
6361 |
|
|
100032a8: 00b92023 sw a1,0(s2)
|
6362 |
|
|
irq_unlock(key);
|
6363 |
|
|
100032ac: d83ff0ef jal ra,1000302e <_arch_irq_unlock>
|
6364 |
|
|
|
6365 |
|
|
return ret;
|
6366 |
|
|
}
|
6367 |
|
|
100032b0: 70a2 ld ra,40(sp)
|
6368 |
|
|
100032b2: 7402 ld s0,32(sp)
|
6369 |
|
|
100032b4: 8526 mv a0,s1
|
6370 |
|
|
100032b6: 6942 ld s2,16(sp)
|
6371 |
|
|
100032b8: 64e2 ld s1,24(sp)
|
6372 |
|
|
100032ba: 6145 addi sp,sp,48
|
6373 |
|
|
100032bc: 8082 ret
|
6374 |
|
|
|
6375 |
|
|
00000000100032be <_sys_device_do_config_level>:
|
6376 |
|
|
* off and the next one begins.
|
6377 |
|
|
*
|
6378 |
|
|
* @param level init level to run.
|
6379 |
|
|
*/
|
6380 |
|
|
void _sys_device_do_config_level(int level)
|
6381 |
|
|
{
|
6382 |
|
|
100032be: 1101 addi sp,sp,-32
|
6383 |
|
|
struct device *info;
|
6384 |
|
|
|
6385 |
|
|
for (info = config_levels[level]; info < config_levels[level+1]; info++) {
|
6386 |
|
|
100032c0: 00351713 slli a4,a0,0x3
|
6387 |
|
|
100032c4: 100057b7 lui a5,0x10005
|
6388 |
|
|
100032c8: 2505 addiw a0,a0,1
|
6389 |
|
|
{
|
6390 |
|
|
100032ca: e822 sd s0,16(sp)
|
6391 |
|
|
100032cc: e426 sd s1,8(sp)
|
6392 |
|
|
100032ce: e04a sd s2,0(sp)
|
6393 |
|
|
for (info = config_levels[level]; info < config_levels[level+1]; info++) {
|
6394 |
|
|
100032d0: fa878793 addi a5,a5,-88 # 10004fa8
|
6395 |
|
|
{
|
6396 |
|
|
100032d4: ec06 sd ra,24(sp)
|
6397 |
|
|
100032d6: 1000 addi s0,sp,32
|
6398 |
|
|
for (info = config_levels[level]; info < config_levels[level+1]; info++) {
|
6399 |
|
|
100032d8: 050e slli a0,a0,0x3
|
6400 |
|
|
100032da: 973e add a4,a4,a5
|
6401 |
|
|
100032dc: 97aa add a5,a5,a0
|
6402 |
|
|
100032de: 6304 ld s1,0(a4)
|
6403 |
|
|
100032e0: 0007b903 ld s2,0(a5)
|
6404 |
|
|
100032e4: 0124e863 bltu s1,s2,100032f4 <_sys_device_do_config_level+0x36>
|
6405 |
|
|
struct device_config *device = info->config;
|
6406 |
|
|
|
6407 |
|
|
device->init(info);
|
6408 |
|
|
}
|
6409 |
|
|
}
|
6410 |
|
|
100032e8: 60e2 ld ra,24(sp)
|
6411 |
|
|
100032ea: 6442 ld s0,16(sp)
|
6412 |
|
|
100032ec: 64a2 ld s1,8(sp)
|
6413 |
|
|
100032ee: 6902 ld s2,0(sp)
|
6414 |
|
|
100032f0: 6105 addi sp,sp,32
|
6415 |
|
|
100032f2: 8082 ret
|
6416 |
|
|
device->init(info);
|
6417 |
|
|
100032f4: 609c ld a5,0(s1)
|
6418 |
|
|
100032f6: 8526 mv a0,s1
|
6419 |
|
|
for (info = config_levels[level]; info < config_levels[level+1]; info++) {
|
6420 |
|
|
100032f8: 04e1 addi s1,s1,24
|
6421 |
|
|
device->init(info);
|
6422 |
|
|
100032fa: 679c ld a5,8(a5)
|
6423 |
|
|
100032fc: 9782 jalr a5
|
6424 |
|
|
100032fe: b7dd j 100032e4 <_sys_device_do_config_level+0x26>
|
6425 |
|
|
|
6426 |
|
|
0000000010003300 :
|
6427 |
|
|
|
6428 |
|
|
struct device *device_get_binding(const char *name)
|
6429 |
|
|
{
|
6430 |
|
|
10003300: 7179 addi sp,sp,-48
|
6431 |
|
|
10003302: f022 sd s0,32(sp)
|
6432 |
|
|
10003304: ec26 sd s1,24(sp)
|
6433 |
|
|
10003306: e84a sd s2,16(sp)
|
6434 |
|
|
10003308: e44e sd s3,8(sp)
|
6435 |
|
|
1000330a: f406 sd ra,40(sp)
|
6436 |
|
|
1000330c: 1800 addi s0,sp,48
|
6437 |
|
|
struct device *info;
|
6438 |
|
|
|
6439 |
|
|
for (info = __device_init_start; info != __device_init_end; info++) {
|
6440 |
|
|
1000330e: 100054b7 lui s1,0x10005
|
6441 |
|
|
10003312: 10005937 lui s2,0x10005
|
6442 |
|
|
{
|
6443 |
|
|
10003316: 89aa mv s3,a0
|
6444 |
|
|
for (info = __device_init_start; info != __device_init_end; info++) {
|
6445 |
|
|
10003318: 1b848493 addi s1,s1,440 # 100051b8 <__device_PRE_KERNEL_1_start>
|
6446 |
|
|
1000331c: 23090913 addi s2,s2,560 # 10005230 <__device_MICROKERNEL_start>
|
6447 |
|
|
10003320: 01249463 bne s1,s2,10003328
|
6448 |
|
|
if (info->driver_api && !strcmp(name, info->config->name)) {
|
6449 |
|
|
return info;
|
6450 |
|
|
}
|
6451 |
|
|
}
|
6452 |
|
|
|
6453 |
|
|
return NULL;
|
6454 |
|
|
10003324: 4481 li s1,0
|
6455 |
|
|
10003326: a819 j 1000333c
|
6456 |
|
|
if (info->driver_api && !strcmp(name, info->config->name)) {
|
6457 |
|
|
10003328: 649c ld a5,8(s1)
|
6458 |
|
|
1000332a: e399 bnez a5,10003330
|
6459 |
|
|
for (info = __device_init_start; info != __device_init_end; info++) {
|
6460 |
|
|
1000332c: 04e1 addi s1,s1,24
|
6461 |
|
|
1000332e: bfcd j 10003320
|
6462 |
|
|
if (info->driver_api && !strcmp(name, info->config->name)) {
|
6463 |
|
|
10003330: 609c ld a5,0(s1)
|
6464 |
|
|
10003332: 854e mv a0,s3
|
6465 |
|
|
10003334: 638c ld a1,0(a5)
|
6466 |
|
|
10003336: ccdfe0ef jal ra,10002002
|
6467 |
|
|
1000333a: f96d bnez a0,1000332c
|
6468 |
|
|
}
|
6469 |
|
|
1000333c: 70a2 ld ra,40(sp)
|
6470 |
|
|
1000333e: 7402 ld s0,32(sp)
|
6471 |
|
|
10003340: 8526 mv a0,s1
|
6472 |
|
|
10003342: 6942 ld s2,16(sp)
|
6473 |
|
|
10003344: 64e2 ld s1,24(sp)
|
6474 |
|
|
10003346: 69a2 ld s3,8(sp)
|
6475 |
|
|
10003348: 6145 addi sp,sp,48
|
6476 |
|
|
1000334a: 8082 ret
|
6477 |
|
|
|
6478 |
|
|
000000001000334c <_ready_thread>:
|
6479 |
|
|
* note: this works as long as:
|
6480 |
|
|
* - the slist implementation keeps the next pointer as the first
|
6481 |
|
|
* field of the node object type
|
6482 |
|
|
* - list->tail->next = NULL.
|
6483 |
|
|
*/
|
6484 |
|
|
return k_fifo_put_list(fifo, list->head, list->tail);
|
6485 |
|
|
1000334c: 1141 addi sp,sp,-16
|
6486 |
|
|
1000334e: e422 sd s0,8(sp)
|
6487 |
|
|
10003350: 0800 addi s0,sp,16
|
6488 |
|
|
10003352: 4918 lw a4,16(a0)
|
6489 |
|
|
10003354: 77f1 lui a5,0xffffc
|
6490 |
|
|
10003356: 17fd addi a5,a5,-1
|
6491 |
|
|
10003358: 8ff9 and a5,a5,a4
|
6492 |
|
|
1000335a: c91c sw a5,16(a0)
|
6493 |
|
|
1000335c: 0003a7b7 lui a5,0x3a
|
6494 |
|
|
10003360: 8f7d and a4,a4,a5
|
6495 |
|
|
10003362: eb09 bnez a4,10003374 <_ready_thread+0x28>
|
6496 |
|
|
10003364: 6538 ld a4,72(a0)
|
6497 |
|
|
10003366: 57fd li a5,-1
|
6498 |
|
|
10003368: 00f71663 bne a4,a5,10003374 <_ready_thread+0x28>
|
6499 |
|
|
1000336c: 6422 ld s0,8(sp)
|
6500 |
|
|
1000336e: 0141 addi sp,sp,16
|
6501 |
|
|
10003370: 3c00006f j 10003730 <_add_thread_to_ready_q>
|
6502 |
|
|
10003374: 6422 ld s0,8(sp)
|
6503 |
|
|
10003376: 0141 addi sp,sp,16
|
6504 |
|
|
10003378: 8082 ret
|
6505 |
|
|
|
6506 |
|
|
000000001000337a <_must_switch_threads>:
|
6507 |
|
|
1000337a: 100067b7 lui a5,0x10006
|
6508 |
|
|
1000337e: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
|
6509 |
|
|
10003382: 495c lw a5,20(a0)
|
6510 |
|
|
10003384: 0007d963 bgez a5,10003396 <_must_switch_threads+0x1c>
|
6511 |
|
|
10003388: 4501 li a0,0
|
6512 |
|
|
1000338a: 8082 ret
|
6513 |
|
|
1000338c: 4501 li a0,0
|
6514 |
|
|
1000338e: 60a2 ld ra,8(sp)
|
6515 |
|
|
10003390: 6402 ld s0,0(sp)
|
6516 |
|
|
10003392: 0141 addi sp,sp,16
|
6517 |
|
|
10003394: 8082 ret
|
6518 |
|
|
10003396: 1141 addi sp,sp,-16
|
6519 |
|
|
10003398: e022 sd s0,0(sp)
|
6520 |
|
|
1000339a: e406 sd ra,8(sp)
|
6521 |
|
|
1000339c: 0800 addi s0,sp,16
|
6522 |
|
|
1000339e: 0561 addi a0,a0,24
|
6523 |
|
|
100033a0: ea1ff0ef jal ra,10003240
|
6524 |
|
|
100033a4: f565 bnez a0,1000338c <_must_switch_threads+0x12>
|
6525 |
|
|
100033a6: 55c000ef jal ra,10003902 <__must_switch_threads>
|
6526 |
|
|
100033aa: 00a03533 snez a0,a0
|
6527 |
|
|
100033ae: b7c5 j 1000338e <_must_switch_threads+0x14>
|
6528 |
|
|
|
6529 |
|
|
00000000100033b0 <_abort_timeout>:
|
6530 |
|
|
100033b0: 1141 addi sp,sp,-16
|
6531 |
|
|
100033b2: e422 sd s0,8(sp)
|
6532 |
|
|
100033b4: 0800 addi s0,sp,16
|
6533 |
|
|
100033b6: 7114 ld a3,32(a0)
|
6534 |
|
|
100033b8: 57fd li a5,-1
|
6535 |
|
|
100033ba: 02f68663 beq a3,a5,100033e6 <_abort_timeout+0x36>
|
6536 |
|
|
100033be: 10006737 lui a4,0x10006
|
6537 |
|
|
100033c2: de073703 ld a4,-544(a4) # 10005de0 <_kernel+0x20>
|
6538 |
|
|
100033c6: 611c ld a5,0(a0)
|
6539 |
|
|
100033c8: 00e50563 beq a0,a4,100033d2 <_abort_timeout+0x22>
|
6540 |
|
|
100033cc: 7398 ld a4,32(a5)
|
6541 |
|
|
100033ce: 9736 add a4,a4,a3
|
6542 |
|
|
100033d0: f398 sd a4,32(a5)
|
6543 |
|
|
100033d2: 6518 ld a4,8(a0)
|
6544 |
|
|
100033d4: e31c sd a5,0(a4)
|
6545 |
|
|
100033d6: 611c ld a5,0(a0)
|
6546 |
|
|
100033d8: e798 sd a4,8(a5)
|
6547 |
|
|
100033da: 57fd li a5,-1
|
6548 |
|
|
100033dc: f11c sd a5,32(a0)
|
6549 |
|
|
100033de: 4501 li a0,0
|
6550 |
|
|
100033e0: 6422 ld s0,8(sp)
|
6551 |
|
|
100033e2: 0141 addi sp,sp,16
|
6552 |
|
|
100033e4: 8082 ret
|
6553 |
|
|
100033e6: 557d li a0,-1
|
6554 |
|
|
100033e8: bfe5 j 100033e0 <_abort_timeout+0x30>
|
6555 |
|
|
|
6556 |
|
|
00000000100033ea :
|
6557 |
|
|
100033ea: 1141 addi sp,sp,-16
|
6558 |
|
|
100033ec: e422 sd s0,8(sp)
|
6559 |
|
|
100033ee: 0800 addi s0,sp,16
|
6560 |
|
|
100033f0: 6422 ld s0,8(sp)
|
6561 |
|
|
100033f2: 00053823 sd zero,16(a0)
|
6562 |
|
|
100033f6: 00053c23 sd zero,24(a0)
|
6563 |
|
|
100033fa: e108 sd a0,0(a0)
|
6564 |
|
|
100033fc: e508 sd a0,8(a0)
|
6565 |
|
|
100033fe: 0141 addi sp,sp,16
|
6566 |
|
|
10003400: 8082 ret
|
6567 |
|
|
|
6568 |
|
|
0000000010003402 :
|
6569 |
|
|
10003402: 7179 addi sp,sp,-48
|
6570 |
|
|
10003404: f022 sd s0,32(sp)
|
6571 |
|
|
10003406: ec26 sd s1,24(sp)
|
6572 |
|
|
10003408: e84a sd s2,16(sp)
|
6573 |
|
|
1000340a: e44e sd s3,8(sp)
|
6574 |
|
|
1000340c: e052 sd s4,0(sp)
|
6575 |
|
|
1000340e: f406 sd ra,40(sp)
|
6576 |
|
|
10003410: 1800 addi s0,sp,48
|
6577 |
|
|
10003412: 892a mv s2,a0
|
6578 |
|
|
10003414: 89ae mv s3,a1
|
6579 |
|
|
10003416: be3ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
6580 |
|
|
1000341a: 00093483 ld s1,0(s2)
|
6581 |
|
|
1000341e: 00050a1b sext.w s4,a0
|
6582 |
|
|
10003422: 04990e63 beq s2,s1,1000347e
|
6583 |
|
|
10003426: 649c ld a5,8(s1)
|
6584 |
|
|
10003428: 6098 ld a4,0(s1)
|
6585 |
|
|
1000342a: 02848513 addi a0,s1,40
|
6586 |
|
|
1000342e: e398 sd a4,0(a5)
|
6587 |
|
|
10003430: 6098 ld a4,0(s1)
|
6588 |
|
|
10003432: e71c sd a5,8(a4)
|
6589 |
|
|
10003434: 489c lw a5,16(s1)
|
6590 |
|
|
10003436: 7779 lui a4,0xffffe
|
6591 |
|
|
10003438: 177d addi a4,a4,-1
|
6592 |
|
|
1000343a: 8ff9 and a5,a5,a4
|
6593 |
|
|
1000343c: c89c sw a5,16(s1)
|
6594 |
|
|
1000343e: f73ff0ef jal ra,100033b0 <_abort_timeout>
|
6595 |
|
|
10003442: 8526 mv a0,s1
|
6596 |
|
|
10003444: f09ff0ef jal ra,1000334c <_ready_thread>
|
6597 |
|
|
10003448: 100067b7 lui a5,0x10006
|
6598 |
|
|
1000344c: dc07a783 lw a5,-576(a5) # 10005dc0 <_kernel>
|
6599 |
|
|
10003450: 1604b423 sd zero,360(s1)
|
6600 |
|
|
10003454: 0334b023 sd s3,32(s1)
|
6601 |
|
|
10003458: ef85 bnez a5,10003490
|
6602 |
|
|
1000345a: f21ff0ef jal ra,1000337a <_must_switch_threads>
|
6603 |
|
|
1000345e: c90d beqz a0,10003490
|
6604 |
|
|
10003460: 7402 ld s0,32(sp)
|
6605 |
|
|
10003462: 70a2 ld ra,40(sp)
|
6606 |
|
|
10003464: 64e2 ld s1,24(sp)
|
6607 |
|
|
10003466: 6942 ld s2,16(sp)
|
6608 |
|
|
10003468: 69a2 ld s3,8(sp)
|
6609 |
|
|
1000346a: 8552 mv a0,s4
|
6610 |
|
|
1000346c: 6a02 ld s4,0(sp)
|
6611 |
|
|
1000346e: 6145 addi sp,sp,48
|
6612 |
|
|
10003470: b95fc06f j 10000004 <_Swap>
|
6613 |
|
|
10003474: 0137b023 sd s3,0(a5)
|
6614 |
|
|
10003478: 01393c23 sd s3,24(s2)
|
6615 |
|
|
1000347c: a811 j 10003490
|
6616 |
|
|
1000347e: 01893783 ld a5,24(s2)
|
6617 |
|
|
10003482: 0009b023 sd zero,0(s3)
|
6618 |
|
|
10003486: f7fd bnez a5,10003474
|
6619 |
|
|
10003488: 01393c23 sd s3,24(s2)
|
6620 |
|
|
1000348c: 01393823 sd s3,16(s2)
|
6621 |
|
|
10003490: 7402 ld s0,32(sp)
|
6622 |
|
|
10003492: 70a2 ld ra,40(sp)
|
6623 |
|
|
10003494: 64e2 ld s1,24(sp)
|
6624 |
|
|
10003496: 6942 ld s2,16(sp)
|
6625 |
|
|
10003498: 69a2 ld s3,8(sp)
|
6626 |
|
|
1000349a: 8552 mv a0,s4
|
6627 |
|
|
1000349c: 6a02 ld s4,0(sp)
|
6628 |
|
|
1000349e: 6145 addi sp,sp,48
|
6629 |
|
|
100034a0: b8fff06f j 1000302e <_arch_irq_unlock>
|
6630 |
|
|
|
6631 |
|
|
00000000100034a4 :
|
6632 |
|
|
}
|
6633 |
|
|
|
6634 |
|
|
void *k_fifo_get(struct k_fifo *fifo, int32_t timeout)
|
6635 |
|
|
{
|
6636 |
|
|
100034a4: 7139 addi sp,sp,-64
|
6637 |
|
|
100034a6: f822 sd s0,48(sp)
|
6638 |
|
|
100034a8: f426 sd s1,40(sp)
|
6639 |
|
|
100034aa: 0080 addi s0,sp,64
|
6640 |
|
|
100034ac: f04a sd s2,32(sp)
|
6641 |
|
|
100034ae: ec4e sd s3,24(sp)
|
6642 |
|
|
100034b0: fc06 sd ra,56(sp)
|
6643 |
|
|
100034b2: 892a mv s2,a0
|
6644 |
|
|
100034b4: fcb43423 sd a1,-56(s0)
|
6645 |
|
|
unsigned int key;
|
6646 |
|
|
void *data;
|
6647 |
|
|
|
6648 |
|
|
key = irq_lock();
|
6649 |
|
|
100034b8: b41ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
6650 |
|
|
100034bc: 01093483 ld s1,16(s2)
|
6651 |
|
|
100034c0: 0005099b sext.w s3,a0
|
6652 |
|
|
|
6653 |
|
|
if (likely(!sys_slist_is_empty(&fifo->data_q))) {
|
6654 |
|
|
100034c4: fc843583 ld a1,-56(s0)
|
6655 |
|
|
100034c8: c48d beqz s1,100034f2
|
6656 |
|
|
*/
|
6657 |
|
|
static inline sys_snode_t *sys_slist_get_not_empty(sys_slist_t *list)
|
6658 |
|
|
{
|
6659 |
|
|
sys_snode_t *node = list->head;
|
6660 |
|
|
|
6661 |
|
|
list->head = node->next;
|
6662 |
|
|
100034ca: 609c ld a5,0(s1)
|
6663 |
|
|
if (list->tail == node) {
|
6664 |
|
|
100034cc: 01893703 ld a4,24(s2)
|
6665 |
|
|
list->head = node->next;
|
6666 |
|
|
100034d0: 00f93823 sd a5,16(s2)
|
6667 |
|
|
if (list->tail == node) {
|
6668 |
|
|
100034d4: 00e49463 bne s1,a4,100034dc
|
6669 |
|
|
list->tail = list->head;
|
6670 |
|
|
100034d8: 00f93c23 sd a5,24(s2)
|
6671 |
|
|
irq_unlock(key);
|
6672 |
|
|
return data;
|
6673 |
|
|
}
|
6674 |
|
|
|
6675 |
|
|
if (timeout == K_NO_WAIT) {
|
6676 |
|
|
irq_unlock(key);
|
6677 |
|
|
100034dc: 854e mv a0,s3
|
6678 |
|
|
100034de: b51ff0ef jal ra,1000302e <_arch_irq_unlock>
|
6679 |
|
|
}
|
6680 |
|
|
|
6681 |
|
|
_pend_current_thread(&fifo->wait_q, timeout);
|
6682 |
|
|
|
6683 |
|
|
return _Swap(key) ? NULL : _current->base.swap_data;
|
6684 |
|
|
}
|
6685 |
|
|
100034e2: 70e2 ld ra,56(sp)
|
6686 |
|
|
100034e4: 7442 ld s0,48(sp)
|
6687 |
|
|
100034e6: 8526 mv a0,s1
|
6688 |
|
|
100034e8: 7902 ld s2,32(sp)
|
6689 |
|
|
100034ea: 74a2 ld s1,40(sp)
|
6690 |
|
|
100034ec: 69e2 ld s3,24(sp)
|
6691 |
|
|
100034ee: 6121 addi sp,sp,64
|
6692 |
|
|
100034f0: 8082 ret
|
6693 |
|
|
if (timeout == K_NO_WAIT) {
|
6694 |
|
|
100034f2: d5ed beqz a1,100034dc
|
6695 |
|
|
_pend_current_thread(&fifo->wait_q, timeout);
|
6696 |
|
|
100034f4: 854a mv a0,s2
|
6697 |
|
|
100034f6: 3a6000ef jal ra,1000389c <_pend_current_thread>
|
6698 |
|
|
return _Swap(key) ? NULL : _current->base.swap_data;
|
6699 |
|
|
100034fa: 854e mv a0,s3
|
6700 |
|
|
100034fc: b09fc0ef jal ra,10000004 <_Swap>
|
6701 |
|
|
10003500: 2501 sext.w a0,a0
|
6702 |
|
|
10003502: f165 bnez a0,100034e2
|
6703 |
|
|
10003504: 100067b7 lui a5,0x10006
|
6704 |
|
|
10003508: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
|
6705 |
|
|
1000350c: 7384 ld s1,32(a5)
|
6706 |
|
|
1000350e: bfd1 j 100034e2
|
6707 |
|
|
|
6708 |
|
|
0000000010003510 <_main>:
|
6709 |
|
|
* init functions, then invokes application's main() routine.
|
6710 |
|
|
*
|
6711 |
|
|
* @return N/A
|
6712 |
|
|
*/
|
6713 |
|
|
static void _main(void *unused1, void *unused2, void *unused3)
|
6714 |
|
|
{
|
6715 |
|
|
10003510: 1141 addi sp,sp,-16
|
6716 |
|
|
10003512: e406 sd ra,8(sp)
|
6717 |
|
|
10003514: e022 sd s0,0(sp)
|
6718 |
|
|
10003516: 0800 addi s0,sp,16
|
6719 |
|
|
ARG_UNUSED(unused1);
|
6720 |
|
|
ARG_UNUSED(unused2);
|
6721 |
|
|
ARG_UNUSED(unused3);
|
6722 |
|
|
|
6723 |
|
|
_sys_device_do_config_level(_SYS_INIT_LEVEL_POST_KERNEL);
|
6724 |
|
|
10003518: 4509 li a0,2
|
6725 |
|
|
1000351a: da5ff0ef jal ra,100032be <_sys_device_do_config_level>
|
6726 |
|
|
|
6727 |
|
|
/* These 3 are deprecated */
|
6728 |
|
|
_sys_device_do_config_level(_SYS_INIT_LEVEL_SECONDARY);
|
6729 |
|
|
1000351e: 4515 li a0,5
|
6730 |
|
|
10003520: d9fff0ef jal ra,100032be <_sys_device_do_config_level>
|
6731 |
|
|
_sys_device_do_config_level(_SYS_INIT_LEVEL_NANOKERNEL);
|
6732 |
|
|
10003524: 4519 li a0,6
|
6733 |
|
|
10003526: d99ff0ef jal ra,100032be <_sys_device_do_config_level>
|
6734 |
|
|
_sys_device_do_config_level(_SYS_INIT_LEVEL_MICROKERNEL);
|
6735 |
|
|
1000352a: 451d li a0,7
|
6736 |
|
|
1000352c: d93ff0ef jal ra,100032be <_sys_device_do_config_level>
|
6737 |
|
|
|
6738 |
|
|
/* Final init level before app starts */
|
6739 |
|
|
_sys_device_do_config_level(_SYS_INIT_LEVEL_APPLICATION);
|
6740 |
|
|
10003530: 450d li a0,3
|
6741 |
|
|
10003532: d8dff0ef jal ra,100032be <_sys_device_do_config_level>
|
6742 |
|
|
extern void __do_init_array_aux(void);
|
6743 |
|
|
__do_global_ctors_aux();
|
6744 |
|
|
__do_init_array_aux();
|
6745 |
|
|
#endif
|
6746 |
|
|
|
6747 |
|
|
_init_static_threads();
|
6748 |
|
|
10003536: 195000ef jal ra,10003eca <_init_static_threads>
|
6749 |
|
|
*/
|
6750 |
|
|
#if defined(MDEF_MAIN_THREAD_PRIORITY) && \
|
6751 |
|
|
(MDEF_MAIN_THREAD_PRIORITY != CONFIG_MAIN_THREAD_PRIORITY)
|
6752 |
|
|
k_thread_priority_set(_main_thread, MDEF_MAIN_THREAD_PRIORITY);
|
6753 |
|
|
#endif
|
6754 |
|
|
main();
|
6755 |
|
|
1000353a: cc5fc0ef jal ra,100001fe
|
6756 |
|
|
|
6757 |
|
|
/* Terminate thread normally since it has no more work to do */
|
6758 |
|
|
_main_thread->base.flags &= ~K_ESSENTIAL;
|
6759 |
|
|
1000353e: 100097b7 lui a5,0x10009
|
6760 |
|
|
10003542: 90878793 addi a5,a5,-1784 # 10008908 <_main_stack>
|
6761 |
|
|
10003546: 4b98 lw a4,16(a5)
|
6762 |
|
|
}
|
6763 |
|
|
10003548: 60a2 ld ra,8(sp)
|
6764 |
|
|
1000354a: 6402 ld s0,0(sp)
|
6765 |
|
|
_main_thread->base.flags &= ~K_ESSENTIAL;
|
6766 |
|
|
1000354c: dff77713 andi a4,a4,-513
|
6767 |
|
|
10003550: cb98 sw a4,16(a5)
|
6768 |
|
|
}
|
6769 |
|
|
10003552: 0141 addi sp,sp,16
|
6770 |
|
|
10003554: 8082 ret
|
6771 |
|
|
|
6772 |
|
|
0000000010003556 <_Cstart>:
|
6773 |
|
|
* cleared/zeroed.
|
6774 |
|
|
*
|
6775 |
|
|
* @return Does not return
|
6776 |
|
|
*/
|
6777 |
|
|
FUNC_NORETURN void _Cstart(void)
|
6778 |
|
|
{
|
6779 |
|
|
10003556: 7121 addi sp,sp,-448
|
6780 |
|
|
10003558: fb22 sd s0,432(sp)
|
6781 |
|
|
1000355a: f726 sd s1,424(sp)
|
6782 |
|
|
1000355c: 0380 addi s0,sp,448
|
6783 |
|
|
1000355e: ff06 sd ra,440(sp)
|
6784 |
|
|
10003560: f34a sd s2,416(sp)
|
6785 |
|
|
10003562: ef4e sd s3,408(sp)
|
6786 |
|
|
10003564: eb52 sd s4,400(sp)
|
6787 |
|
|
_current = dummy_thread;
|
6788 |
|
|
10003566: 100064b7 lui s1,0x10006
|
6789 |
|
|
1000356a: dc048713 addi a4,s1,-576 # 10005dc0 <_kernel>
|
6790 |
|
|
1000356e: e4040793 addi a5,s0,-448
|
6791 |
|
|
10003572: eb1c sd a5,16(a4)
|
6792 |
|
|
dummy_thread->base.flags = K_ESSENTIAL;
|
6793 |
|
|
10003574: 57fd li a5,-1
|
6794 |
|
|
10003576: 1792 slli a5,a5,0x24
|
6795 |
|
|
10003578: 20078793 addi a5,a5,512
|
6796 |
|
|
1000357c: e4f43823 sd a5,-432(s0)
|
6797 |
|
|
10003580: 100067b7 lui a5,0x10006
|
6798 |
|
|
10003584: df878793 addi a5,a5,-520 # 10005df8 <_kernel+0x38>
|
6799 |
|
|
10003588: 23870713 addi a4,a4,568 # ffffffffffffe238 <_time_slice_prio_ceiling+0xffffffffefff44d4>
|
6800 |
|
|
1000358c: dc048493 addi s1,s1,-576
|
6801 |
|
|
* @return N/A
|
6802 |
|
|
*/
|
6803 |
|
|
|
6804 |
|
|
static inline void sys_dlist_init(sys_dlist_t *list)
|
6805 |
|
|
{
|
6806 |
|
|
list->head = (sys_dnode_t *)list;
|
6807 |
|
|
10003590: e39c sd a5,0(a5)
|
6808 |
|
|
list->tail = (sys_dnode_t *)list;
|
6809 |
|
|
10003592: e79c sd a5,8(a5)
|
6810 |
|
|
10003594: 07c1 addi a5,a5,16
|
6811 |
|
|
for (int ii = 0; ii < K_NUM_PRIORITIES; ii++) {
|
6812 |
|
|
10003596: fee79de3 bne a5,a4,10003590 <_Cstart+0x3a>
|
6813 |
|
|
_new_thread(_main_stack, MAIN_STACK_SIZE,
|
6814 |
|
|
1000359a: 100099b7 lui s3,0x10009
|
6815 |
|
|
1000359e: 10003637 lui a2,0x10003
|
6816 |
|
|
100035a2: 6585 lui a1,0x1
|
6817 |
|
|
100035a4: 20000893 li a7,512
|
6818 |
|
|
100035a8: 4801 li a6,0
|
6819 |
|
|
100035aa: 4681 li a3,0
|
6820 |
|
|
100035ac: 51060613 addi a2,a2,1296 # 10003510 <_main>
|
6821 |
|
|
100035b0: 80058593 addi a1,a1,-2048 # 800 <__memory_pool_quad_block_size+0x7f0>
|
6822 |
|
|
100035b4: 90898513 addi a0,s3,-1784 # 10008908 <_main_stack>
|
6823 |
|
|
100035b8: 4781 li a5,0
|
6824 |
|
|
100035ba: 4701 li a4,0
|
6825 |
|
|
100035bc: b4dff0ef jal ra,10003108 <_new_thread>
|
6826 |
|
|
*
|
6827 |
|
|
* This routine must be called with interrupts locked.
|
6828 |
|
|
*/
|
6829 |
|
|
static inline void _mark_thread_as_started(struct k_thread *thread)
|
6830 |
|
|
{
|
6831 |
|
|
thread->base.flags &= ~K_PRESTART;
|
6832 |
|
|
100035c0: 90898713 addi a4,s3,-1784
|
6833 |
|
|
100035c4: 4b1c lw a5,16(a4)
|
6834 |
|
|
100035c6: 7971 lui s2,0xffffc
|
6835 |
|
|
100035c8: 197d addi s2,s2,-1
|
6836 |
|
|
100035ca: 0127f7b3 and a5,a5,s2
|
6837 |
|
|
100035ce: cb1c sw a5,16(a4)
|
6838 |
|
|
_add_thread_to_ready_q(_main_thread);
|
6839 |
|
|
100035d0: 90898513 addi a0,s3,-1784
|
6840 |
|
|
100035d4: 15c000ef jal ra,10003730 <_add_thread_to_ready_q>
|
6841 |
|
|
_new_thread(_idle_stack, IDLE_STACK_SIZE,
|
6842 |
|
|
100035d8: 100099b7 lui s3,0x10009
|
6843 |
|
|
100035dc: 10004637 lui a2,0x10004
|
6844 |
|
|
100035e0: 20000893 li a7,512
|
6845 |
|
|
100035e4: 483d li a6,15
|
6846 |
|
|
100035e6: 4701 li a4,0
|
6847 |
|
|
100035e8: 4681 li a3,0
|
6848 |
|
|
100035ea: fd860613 addi a2,a2,-40 # 10003fd8
|
6849 |
|
|
100035ee: 40000593 li a1,1024
|
6850 |
|
|
100035f2: 4781 li a5,0
|
6851 |
|
|
100035f4: 10898513 addi a0,s3,264 # 10009108 <_idle_stack>
|
6852 |
|
|
100035f8: b11ff0ef jal ra,10003108 <_new_thread>
|
6853 |
|
|
100035fc: 10898a13 addi s4,s3,264
|
6854 |
|
|
10003600: 010a2783 lw a5,16(s4)
|
6855 |
|
|
_add_thread_to_ready_q(_idle_thread);
|
6856 |
|
|
10003604: 10898513 addi a0,s3,264
|
6857 |
|
|
10003608: 0127f933 and s2,a5,s2
|
6858 |
|
|
1000360c: 012a2823 sw s2,16(s4)
|
6859 |
|
|
10003610: 120000ef jal ra,10003730 <_add_thread_to_ready_q>
|
6860 |
|
|
list->head = (sys_dnode_t *)list;
|
6861 |
|
|
10003614: 100067b7 lui a5,0x10006
|
6862 |
|
|
10003618: dd878793 addi a5,a5,-552 # 10005dd8 <_kernel+0x18>
|
6863 |
|
|
1000361c: ec9c sd a5,24(s1)
|
6864 |
|
|
list->tail = (sys_dnode_t *)list;
|
6865 |
|
|
1000361e: f09c sd a5,32(s1)
|
6866 |
|
|
|
6867 |
|
|
extern char _interrupt_stack[];
|
6868 |
|
|
|
6869 |
|
|
static ALWAYS_INLINE void nanoArchInit(void)
|
6870 |
|
|
{
|
6871 |
|
|
_kernel.irq_stack = _interrupt_stack + CONFIG_ISR_STACK_SIZE;
|
6872 |
|
|
10003620: 1000a7b7 lui a5,0x1000a
|
6873 |
|
|
10003624: d0878793 addi a5,a5,-760 # 10009d08 <_end>
|
6874 |
|
|
*/
|
6875 |
|
|
|
6876 |
|
|
prepare_multithreading(dummy_thread);
|
6877 |
|
|
|
6878 |
|
|
/* Deprecated */
|
6879 |
|
|
_sys_device_do_config_level(_SYS_INIT_LEVEL_PRIMARY);
|
6880 |
|
|
10003628: 4511 li a0,4
|
6881 |
|
|
1000362a: e49c sd a5,8(s1)
|
6882 |
|
|
1000362c: c93ff0ef jal ra,100032be <_sys_device_do_config_level>
|
6883 |
|
|
|
6884 |
|
|
/* perform basic hardware initialization */
|
6885 |
|
|
_sys_device_do_config_level(_SYS_INIT_LEVEL_PRE_KERNEL_1);
|
6886 |
|
|
10003630: 4501 li a0,0
|
6887 |
|
|
10003632: c8dff0ef jal ra,100032be <_sys_device_do_config_level>
|
6888 |
|
|
_sys_device_do_config_level(_SYS_INIT_LEVEL_PRE_KERNEL_2);
|
6889 |
|
|
10003636: 4505 li a0,1
|
6890 |
|
|
10003638: c87ff0ef jal ra,100032be <_sys_device_do_config_level>
|
6891 |
|
|
|
6892 |
|
|
STACK_CANARY_INIT();
|
6893 |
|
|
|
6894 |
|
|
/* display boot banner */
|
6895 |
|
|
|
6896 |
|
|
PRINT_BOOT_BANNER();
|
6897 |
|
|
1000363c: 10005537 lui a0,0x10005
|
6898 |
|
|
10003640: ff050513 addi a0,a0,-16 # 10004ff0
|
6899 |
|
|
10003644: bf3fe0ef jal ra,10002236
|
6900 |
|
|
_Swap(irq_lock());
|
6901 |
|
|
10003648: 9b1ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
6902 |
|
|
1000364c: 2501 sext.w a0,a0
|
6903 |
|
|
1000364e: 9b7fc0ef jal ra,10000004 <_Swap>
|
6904 |
|
|
|
6905 |
|
|
0000000010003652 <_get_highest_ready_prio>:
|
6906 |
|
|
if (_is_thread_ready(thread)) {
|
6907 |
|
|
_remove_thread_from_ready_q(thread);
|
6908 |
|
|
thread->base.prio = prio;
|
6909 |
|
|
_add_thread_to_ready_q(thread);
|
6910 |
|
|
} else {
|
6911 |
|
|
thread->base.prio = prio;
|
6912 |
|
|
10003652: 1141 addi sp,sp,-16
|
6913 |
|
|
10003654: e422 sd s0,8(sp)
|
6914 |
|
|
10003656: 0800 addi s0,sp,16
|
6915 |
|
|
10003658: 100067b7 lui a5,0x10006
|
6916 |
|
|
1000365c: df07a783 lw a5,-528(a5) # 10005df0 <_kernel+0x30>
|
6917 |
|
|
10003660: 4505 li a0,1
|
6918 |
|
|
10003662: e799 bnez a5,10003670 <_get_highest_ready_prio+0x1e>
|
6919 |
|
|
10003664: 4501 li a0,0
|
6920 |
|
|
10003666: a801 j 10003676 <_get_highest_ready_prio+0x24>
|
6921 |
|
|
10003668: 0017d79b srliw a5,a5,0x1
|
6922 |
|
|
1000366c: 2781 sext.w a5,a5
|
6923 |
|
|
1000366e: 2505 addiw a0,a0,1
|
6924 |
|
|
10003670: 0017f713 andi a4,a5,1
|
6925 |
|
|
10003674: db75 beqz a4,10003668 <_get_highest_ready_prio+0x16>
|
6926 |
|
|
10003676: 6422 ld s0,8(sp)
|
6927 |
|
|
10003678: 353d addiw a0,a0,-17
|
6928 |
|
|
1000367a: 0141 addi sp,sp,16
|
6929 |
|
|
1000367c: 8082 ret
|
6930 |
|
|
|
6931 |
|
|
000000001000367e <_is_timeout_insert_point>:
|
6932 |
|
|
1000367e: 1141 addi sp,sp,-16
|
6933 |
|
|
10003680: e422 sd s0,8(sp)
|
6934 |
|
|
10003682: 0800 addi s0,sp,16
|
6935 |
|
|
10003684: 4198 lw a4,0(a1)
|
6936 |
|
|
10003686: 711c ld a5,32(a0)
|
6937 |
|
|
10003688: 00e7d963 ble a4,a5,1000369a <_is_timeout_insert_point+0x1c>
|
6938 |
|
|
1000368c: 40f707bb subw a5,a4,a5
|
6939 |
|
|
10003690: c19c sw a5,0(a1)
|
6940 |
|
|
10003692: 4501 li a0,0
|
6941 |
|
|
10003694: 6422 ld s0,8(sp)
|
6942 |
|
|
10003696: 0141 addi sp,sp,16
|
6943 |
|
|
10003698: 8082 ret
|
6944 |
|
|
1000369a: 8f99 sub a5,a5,a4
|
6945 |
|
|
1000369c: f11c sd a5,32(a0)
|
6946 |
|
|
1000369e: 4505 li a0,1
|
6947 |
|
|
100036a0: bfd5 j 10003694 <_is_timeout_insert_point+0x16>
|
6948 |
|
|
|
6949 |
|
|
00000000100036a2 <_is_wait_q_insert_point>:
|
6950 |
|
|
100036a2: 1141 addi sp,sp,-16
|
6951 |
|
|
100036a4: e422 sd s0,8(sp)
|
6952 |
|
|
100036a6: 0800 addi s0,sp,16
|
6953 |
|
|
100036a8: 4948 lw a0,20(a0)
|
6954 |
|
|
100036aa: 6422 ld s0,8(sp)
|
6955 |
|
|
100036ac: 2581 sext.w a1,a1
|
6956 |
|
|
100036ae: 00a5a533 slt a0,a1,a0
|
6957 |
|
|
100036b2: 0141 addi sp,sp,16
|
6958 |
|
|
100036b4: 8082 ret
|
6959 |
|
|
|
6960 |
|
|
00000000100036b6 :
|
6961 |
|
|
100036b6: 7139 addi sp,sp,-64
|
6962 |
|
|
100036b8: f822 sd s0,48(sp)
|
6963 |
|
|
100036ba: f426 sd s1,40(sp)
|
6964 |
|
|
100036bc: f04a sd s2,32(sp)
|
6965 |
|
|
100036be: ec4e sd s3,24(sp)
|
6966 |
|
|
100036c0: fc06 sd ra,56(sp)
|
6967 |
|
|
100036c2: 0080 addi s0,sp,64
|
6968 |
|
|
100036c4: 00053983 ld s3,0(a0)
|
6969 |
|
|
100036c8: 892a mv s2,a0
|
6970 |
|
|
100036ca: 84ae mv s1,a1
|
6971 |
|
|
100036cc: 03351963 bne a0,s3,100036fe
|
6972 |
|
|
100036d0: 00893783 ld a5,8(s2) # ffffffffffffc008 <_time_slice_prio_ceiling+0xffffffffefff22a4>
|
6973 |
|
|
100036d4: 0124b023 sd s2,0(s1)
|
6974 |
|
|
100036d8: e49c sd a5,8(s1)
|
6975 |
|
|
100036da: 00893783 ld a5,8(s2)
|
6976 |
|
|
100036de: e384 sd s1,0(a5)
|
6977 |
|
|
100036e0: 00993423 sd s1,8(s2)
|
6978 |
|
|
100036e4: 70e2 ld ra,56(sp)
|
6979 |
|
|
100036e6: 7442 ld s0,48(sp)
|
6980 |
|
|
100036e8: 74a2 ld s1,40(sp)
|
6981 |
|
|
100036ea: 7902 ld s2,32(sp)
|
6982 |
|
|
100036ec: 69e2 ld s3,24(sp)
|
6983 |
|
|
100036ee: 6121 addi sp,sp,64
|
6984 |
|
|
100036f0: 8082 ret
|
6985 |
|
|
100036f2: 00893783 ld a5,8(s2)
|
6986 |
|
|
100036f6: fcf98de3 beq s3,a5,100036d0
|
6987 |
|
|
100036fa: 0009b983 ld s3,0(s3)
|
6988 |
|
|
100036fe: fc0989e3 beqz s3,100036d0
|
6989 |
|
|
10003702: 85b6 mv a1,a3
|
6990 |
|
|
10003704: 854e mv a0,s3
|
6991 |
|
|
10003706: fcd43023 sd a3,-64(s0)
|
6992 |
|
|
1000370a: fcc43423 sd a2,-56(s0)
|
6993 |
|
|
1000370e: 9602 jalr a2
|
6994 |
|
|
10003710: fc843603 ld a2,-56(s0)
|
6995 |
|
|
10003714: fc043683 ld a3,-64(s0)
|
6996 |
|
|
10003718: dd69 beqz a0,100036f2
|
6997 |
|
|
1000371a: 0089b783 ld a5,8(s3)
|
6998 |
|
|
1000371e: 0134b023 sd s3,0(s1)
|
6999 |
|
|
10003722: e49c sd a5,8(s1)
|
7000 |
|
|
10003724: 0089b783 ld a5,8(s3)
|
7001 |
|
|
10003728: e384 sd s1,0(a5)
|
7002 |
|
|
1000372a: 0099b423 sd s1,8(s3)
|
7003 |
|
|
1000372e: bf5d j 100036e4
|
7004 |
|
|
|
7005 |
|
|
0000000010003730 <_add_thread_to_ready_q>:
|
7006 |
|
|
10003730: 1141 addi sp,sp,-16
|
7007 |
|
|
10003732: e422 sd s0,8(sp)
|
7008 |
|
|
10003734: 0800 addi s0,sp,16
|
7009 |
|
|
10003736: 01452803 lw a6,20(a0)
|
7010 |
|
|
1000373a: 10006637 lui a2,0x10006
|
7011 |
|
|
1000373e: dc060593 addi a1,a2,-576 # 10005dc0 <_kernel>
|
7012 |
|
|
10003742: 0108079b addiw a5,a6,16
|
7013 |
|
|
10003746: 4057d71b sraiw a4,a5,0x5
|
7014 |
|
|
1000374a: 0721 addi a4,a4,8
|
7015 |
|
|
1000374c: 070a slli a4,a4,0x2
|
7016 |
|
|
1000374e: 972e add a4,a4,a1
|
7017 |
|
|
10003750: 01072883 lw a7,16(a4)
|
7018 |
|
|
10003754: 4685 li a3,1
|
7019 |
|
|
10003756: 00f696bb sllw a3,a3,a5
|
7020 |
|
|
1000375a: 078d addi a5,a5,3
|
7021 |
|
|
1000375c: 0792 slli a5,a5,0x4
|
7022 |
|
|
1000375e: 0116e6b3 or a3,a3,a7
|
7023 |
|
|
10003762: cb14 sw a3,16(a4)
|
7024 |
|
|
10003764: 00878713 addi a4,a5,8
|
7025 |
|
|
10003768: 972e add a4,a4,a1
|
7026 |
|
|
1000376a: 97ae add a5,a5,a1
|
7027 |
|
|
1000376c: e118 sd a4,0(a0)
|
7028 |
|
|
1000376e: 6b98 ld a4,16(a5)
|
7029 |
|
|
10003770: dc060613 addi a2,a2,-576
|
7030 |
|
|
10003774: e518 sd a4,8(a0)
|
7031 |
|
|
10003776: 6b98 ld a4,16(a5)
|
7032 |
|
|
10003778: e308 sd a0,0(a4)
|
7033 |
|
|
1000377a: eb88 sd a0,16(a5)
|
7034 |
|
|
1000377c: 759c ld a5,40(a1)
|
7035 |
|
|
1000377e: c789 beqz a5,10003788 <_add_thread_to_ready_q+0x58>
|
7036 |
|
|
10003780: 4bd8 lw a4,20(a5)
|
7037 |
|
|
10003782: 00e85363 ble a4,a6,10003788 <_add_thread_to_ready_q+0x58>
|
7038 |
|
|
10003786: 87aa mv a5,a0
|
7039 |
|
|
10003788: 6422 ld s0,8(sp)
|
7040 |
|
|
1000378a: f61c sd a5,40(a2)
|
7041 |
|
|
1000378c: 0141 addi sp,sp,16
|
7042 |
|
|
1000378e: 8082 ret
|
7043 |
|
|
|
7044 |
|
|
0000000010003790 <_remove_thread_from_ready_q>:
|
7045 |
|
|
10003790: 1141 addi sp,sp,-16
|
7046 |
|
|
10003792: e422 sd s0,8(sp)
|
7047 |
|
|
10003794: 0800 addi s0,sp,16
|
7048 |
|
|
10003796: 6518 ld a4,8(a0)
|
7049 |
|
|
10003798: 6114 ld a3,0(a0)
|
7050 |
|
|
1000379a: 495c lw a5,20(a0)
|
7051 |
|
|
1000379c: e314 sd a3,0(a4)
|
7052 |
|
|
1000379e: 6114 ld a3,0(a0)
|
7053 |
|
|
100037a0: 0107889b addiw a7,a5,16
|
7054 |
|
|
100037a4: 00388593 addi a1,a7,3
|
7055 |
|
|
100037a8: e698 sd a4,8(a3)
|
7056 |
|
|
100037aa: 0592 slli a1,a1,0x4
|
7057 |
|
|
100037ac: 100066b7 lui a3,0x10006
|
7058 |
|
|
100037b0: dc068613 addi a2,a3,-576 # 10005dc0 <_kernel>
|
7059 |
|
|
100037b4: 00858813 addi a6,a1,8
|
7060 |
|
|
100037b8: 9832 add a6,a6,a2
|
7061 |
|
|
100037ba: 962e add a2,a2,a1
|
7062 |
|
|
100037bc: 6618 ld a4,8(a2)
|
7063 |
|
|
100037be: dc068693 addi a3,a3,-576
|
7064 |
|
|
100037c2: 01071f63 bne a4,a6,100037e0 <_remove_thread_from_ready_q+0x50>
|
7065 |
|
|
100037c6: 4058d79b sraiw a5,a7,0x5
|
7066 |
|
|
100037ca: 07a1 addi a5,a5,8
|
7067 |
|
|
100037cc: 078a slli a5,a5,0x2
|
7068 |
|
|
100037ce: 97b6 add a5,a5,a3
|
7069 |
|
|
100037d0: 4b90 lw a2,16(a5)
|
7070 |
|
|
100037d2: 4705 li a4,1
|
7071 |
|
|
100037d4: 0117173b sllw a4,a4,a7
|
7072 |
|
|
100037d8: fff74713 not a4,a4
|
7073 |
|
|
100037dc: 8f71 and a4,a4,a2
|
7074 |
|
|
100037de: cb98 sw a4,16(a5)
|
7075 |
|
|
100037e0: 769c ld a5,40(a3)
|
7076 |
|
|
100037e2: 00a79363 bne a5,a0,100037e8 <_remove_thread_from_ready_q+0x58>
|
7077 |
|
|
100037e6: 4781 li a5,0
|
7078 |
|
|
100037e8: 6422 ld s0,8(sp)
|
7079 |
|
|
100037ea: f69c sd a5,40(a3)
|
7080 |
|
|
100037ec: 0141 addi sp,sp,16
|
7081 |
|
|
100037ee: 8082 ret
|
7082 |
|
|
|
7083 |
|
|
00000000100037f0 <_ms_to_ticks>:
|
7084 |
|
|
100037f0: 0c800793 li a5,200
|
7085 |
|
|
100037f4: 02f50533 mul a0,a0,a5
|
7086 |
|
|
100037f8: 3e800793 li a5,1000
|
7087 |
|
|
100037fc: 1141 addi sp,sp,-16
|
7088 |
|
|
100037fe: e422 sd s0,8(sp)
|
7089 |
|
|
10003800: 0800 addi s0,sp,16
|
7090 |
|
|
10003802: 6422 ld s0,8(sp)
|
7091 |
|
|
10003804: 3e750513 addi a0,a0,999
|
7092 |
|
|
10003808: 02f54533 div a0,a0,a5
|
7093 |
|
|
1000380c: 0141 addi sp,sp,16
|
7094 |
|
|
1000380e: 2501 sext.w a0,a0
|
7095 |
|
|
10003810: 8082 ret
|
7096 |
|
|
|
7097 |
|
|
0000000010003812 <_pend_thread>:
|
7098 |
|
|
10003812: 7179 addi sp,sp,-48
|
7099 |
|
|
10003814: f022 sd s0,32(sp)
|
7100 |
|
|
10003816: ec26 sd s1,24(sp)
|
7101 |
|
|
10003818: e84a sd s2,16(sp)
|
7102 |
|
|
1000381a: e44e sd s3,8(sp)
|
7103 |
|
|
1000381c: f406 sd ra,40(sp)
|
7104 |
|
|
1000381e: 1800 addi s0,sp,48
|
7105 |
|
|
10003820: 4954 lw a3,20(a0)
|
7106 |
|
|
10003822: 89ae mv s3,a1
|
7107 |
|
|
10003824: 8932 mv s2,a2
|
7108 |
|
|
10003826: 10003637 lui a2,0x10003
|
7109 |
|
|
1000382a: 84aa mv s1,a0
|
7110 |
|
|
1000382c: 85aa mv a1,a0
|
7111 |
|
|
1000382e: 6a260613 addi a2,a2,1698 # 100036a2 <_is_wait_q_insert_point>
|
7112 |
|
|
10003832: 854e mv a0,s3
|
7113 |
|
|
10003834: e83ff0ef jal ra,100036b6
|
7114 |
|
|
10003838: 489c lw a5,16(s1)
|
7115 |
|
|
1000383a: 6709 lui a4,0x2
|
7116 |
|
|
1000383c: 8fd9 or a5,a5,a4
|
7117 |
|
|
1000383e: c89c sw a5,16(s1)
|
7118 |
|
|
10003840: 57fd li a5,-1
|
7119 |
|
|
10003842: 04f90663 beq s2,a5,1000388e <_pend_thread+0x7c>
|
7120 |
|
|
10003846: 0c800793 li a5,200
|
7121 |
|
|
1000384a: 02f90933 mul s2,s2,a5
|
7122 |
|
|
1000384e: 3e800793 li a5,1000
|
7123 |
|
|
10003852: 7402 ld s0,32(sp)
|
7124 |
|
|
10003854: 0534b023 sd s3,64(s1)
|
7125 |
|
|
10003858: fc84 sd s1,56(s1)
|
7126 |
|
|
1000385a: 70a2 ld ra,40(sp)
|
7127 |
|
|
1000385c: 69a2 ld s3,8(sp)
|
7128 |
|
|
1000385e: 04848693 addi a3,s1,72
|
7129 |
|
|
10003862: 02848593 addi a1,s1,40
|
7130 |
|
|
10003866: 10003637 lui a2,0x10003
|
7131 |
|
|
1000386a: 3e790913 addi s2,s2,999
|
7132 |
|
|
1000386e: 02f94933 div s2,s2,a5
|
7133 |
|
|
10003872: 10006537 lui a0,0x10006
|
7134 |
|
|
10003876: 67e60613 addi a2,a2,1662 # 1000367e <_is_timeout_insert_point>
|
7135 |
|
|
1000387a: dd850513 addi a0,a0,-552 # 10005dd8 <_kernel+0x18>
|
7136 |
|
|
1000387e: 2905 addiw s2,s2,1
|
7137 |
|
|
10003880: 0524b423 sd s2,72(s1)
|
7138 |
|
|
10003884: 64e2 ld s1,24(sp)
|
7139 |
|
|
10003886: 6942 ld s2,16(sp)
|
7140 |
|
|
10003888: 6145 addi sp,sp,48
|
7141 |
|
|
1000388a: e2dff06f j 100036b6
|
7142 |
|
|
1000388e: 70a2 ld ra,40(sp)
|
7143 |
|
|
10003890: 7402 ld s0,32(sp)
|
7144 |
|
|
10003892: 64e2 ld s1,24(sp)
|
7145 |
|
|
10003894: 6942 ld s2,16(sp)
|
7146 |
|
|
10003896: 69a2 ld s3,8(sp)
|
7147 |
|
|
10003898: 6145 addi sp,sp,48
|
7148 |
|
|
1000389a: 8082 ret
|
7149 |
|
|
|
7150 |
|
|
000000001000389c <_pend_current_thread>:
|
7151 |
|
|
1000389c: 7179 addi sp,sp,-48
|
7152 |
|
|
1000389e: f022 sd s0,32(sp)
|
7153 |
|
|
100038a0: ec26 sd s1,24(sp)
|
7154 |
|
|
100038a2: 1800 addi s0,sp,48
|
7155 |
|
|
100038a4: e84a sd s2,16(sp)
|
7156 |
|
|
100038a6: f406 sd ra,40(sp)
|
7157 |
|
|
100038a8: 100064b7 lui s1,0x10006
|
7158 |
|
|
100038ac: dc048493 addi s1,s1,-576 # 10005dc0 <_kernel>
|
7159 |
|
|
100038b0: 892a mv s2,a0
|
7160 |
|
|
100038b2: 6888 ld a0,16(s1)
|
7161 |
|
|
100038b4: fcb43c23 sd a1,-40(s0)
|
7162 |
|
|
100038b8: ed9ff0ef jal ra,10003790 <_remove_thread_from_ready_q>
|
7163 |
|
|
100038bc: fd843603 ld a2,-40(s0)
|
7164 |
|
|
100038c0: 7402 ld s0,32(sp)
|
7165 |
|
|
100038c2: 6888 ld a0,16(s1)
|
7166 |
|
|
100038c4: 70a2 ld ra,40(sp)
|
7167 |
|
|
100038c6: 64e2 ld s1,24(sp)
|
7168 |
|
|
100038c8: 85ca mv a1,s2
|
7169 |
|
|
100038ca: 6942 ld s2,16(sp)
|
7170 |
|
|
100038cc: 6145 addi sp,sp,48
|
7171 |
|
|
100038ce: f45ff06f j 10003812 <_pend_thread>
|
7172 |
|
|
|
7173 |
|
|
00000000100038d2 <_get_next_ready_thread>:
|
7174 |
|
|
100038d2: 1101 addi sp,sp,-32
|
7175 |
|
|
100038d4: e822 sd s0,16(sp)
|
7176 |
|
|
100038d6: e426 sd s1,8(sp)
|
7177 |
|
|
100038d8: ec06 sd ra,24(sp)
|
7178 |
|
|
100038da: 1000 addi s0,sp,32
|
7179 |
|
|
100038dc: 100064b7 lui s1,0x10006
|
7180 |
|
|
100038e0: dc048493 addi s1,s1,-576 # 10005dc0 <_kernel>
|
7181 |
|
|
100038e4: 7488 ld a0,40(s1)
|
7182 |
|
|
100038e6: e909 bnez a0,100038f8 <_get_next_ready_thread+0x26>
|
7183 |
|
|
100038e8: d6bff0ef jal ra,10003652 <_get_highest_ready_prio>
|
7184 |
|
|
100038ec: 2541 addiw a0,a0,16
|
7185 |
|
|
100038ee: 050d addi a0,a0,3
|
7186 |
|
|
100038f0: 0512 slli a0,a0,0x4
|
7187 |
|
|
100038f2: 9526 add a0,a0,s1
|
7188 |
|
|
100038f4: 6508 ld a0,8(a0)
|
7189 |
|
|
100038f6: f488 sd a0,40(s1)
|
7190 |
|
|
100038f8: 60e2 ld ra,24(sp)
|
7191 |
|
|
100038fa: 6442 ld s0,16(sp)
|
7192 |
|
|
100038fc: 64a2 ld s1,8(sp)
|
7193 |
|
|
100038fe: 6105 addi sp,sp,32
|
7194 |
|
|
10003900: 8082 ret
|
7195 |
|
|
|
7196 |
|
|
0000000010003902 <__must_switch_threads>:
|
7197 |
|
|
10003902: 1141 addi sp,sp,-16
|
7198 |
|
|
10003904: e022 sd s0,0(sp)
|
7199 |
|
|
10003906: e406 sd ra,8(sp)
|
7200 |
|
|
10003908: 0800 addi s0,sp,16
|
7201 |
|
|
1000390a: d49ff0ef jal ra,10003652 <_get_highest_ready_prio>
|
7202 |
|
|
1000390e: 100067b7 lui a5,0x10006
|
7203 |
|
|
10003912: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
|
7204 |
|
|
10003916: 60a2 ld ra,8(sp)
|
7205 |
|
|
10003918: 6402 ld s0,0(sp)
|
7206 |
|
|
1000391a: 4bdc lw a5,20(a5)
|
7207 |
|
|
1000391c: 00f52533 slt a0,a0,a5
|
7208 |
|
|
10003920: 0141 addi sp,sp,16
|
7209 |
|
|
10003922: 8082 ret
|
7210 |
|
|
|
7211 |
|
|
0000000010003924 <_reschedule_threads>:
|
7212 |
|
|
10003924: 1101 addi sp,sp,-32
|
7213 |
|
|
10003926: e822 sd s0,16(sp)
|
7214 |
|
|
10003928: e426 sd s1,8(sp)
|
7215 |
|
|
1000392a: ec06 sd ra,24(sp)
|
7216 |
|
|
1000392c: 1000 addi s0,sp,32
|
7217 |
|
|
1000392e: 100067b7 lui a5,0x10006
|
7218 |
|
|
10003932: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
|
7219 |
|
|
10003936: 84aa mv s1,a0
|
7220 |
|
|
10003938: 4bd8 lw a4,20(a5)
|
7221 |
|
|
1000393a: 02074163 bltz a4,1000395c <_reschedule_threads+0x38>
|
7222 |
|
|
1000393e: 01878513 addi a0,a5,24
|
7223 |
|
|
10003942: 8ffff0ef jal ra,10003240
|
7224 |
|
|
10003946: e919 bnez a0,1000395c <_reschedule_threads+0x38>
|
7225 |
|
|
10003948: fbbff0ef jal ra,10003902 <__must_switch_threads>
|
7226 |
|
|
1000394c: c901 beqz a0,1000395c <_reschedule_threads+0x38>
|
7227 |
|
|
1000394e: 6442 ld s0,16(sp)
|
7228 |
|
|
10003950: 60e2 ld ra,24(sp)
|
7229 |
|
|
10003952: 8526 mv a0,s1
|
7230 |
|
|
10003954: 64a2 ld s1,8(sp)
|
7231 |
|
|
10003956: 6105 addi sp,sp,32
|
7232 |
|
|
10003958: eacfc06f j 10000004 <_Swap>
|
7233 |
|
|
1000395c: 6442 ld s0,16(sp)
|
7234 |
|
|
1000395e: 60e2 ld ra,24(sp)
|
7235 |
|
|
10003960: 8526 mv a0,s1
|
7236 |
|
|
10003962: 64a2 ld s1,8(sp)
|
7237 |
|
|
10003964: 6105 addi sp,sp,32
|
7238 |
|
|
10003966: ec8ff06f j 1000302e <_arch_irq_unlock>
|
7239 |
|
|
|
7240 |
|
|
000000001000396a :
|
7241 |
|
|
1000396a: 1101 addi sp,sp,-32
|
7242 |
|
|
1000396c: ec06 sd ra,24(sp)
|
7243 |
|
|
1000396e: e822 sd s0,16(sp)
|
7244 |
|
|
10003970: e426 sd s1,8(sp)
|
7245 |
|
|
10003972: 1000 addi s0,sp,32
|
7246 |
|
|
10003974: e84ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
7247 |
|
|
10003978: 100067b7 lui a5,0x10006
|
7248 |
|
|
1000397c: 0005049b sext.w s1,a0
|
7249 |
|
|
10003980: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
|
7250 |
|
|
10003984: 0561 addi a0,a0,24
|
7251 |
|
|
10003986: 889ff0ef jal ra,1000320e
|
7252 |
|
|
1000398a: 6442 ld s0,16(sp)
|
7253 |
|
|
1000398c: 60e2 ld ra,24(sp)
|
7254 |
|
|
1000398e: 8526 mv a0,s1
|
7255 |
|
|
10003990: 64a2 ld s1,8(sp)
|
7256 |
|
|
10003992: 6105 addi sp,sp,32
|
7257 |
|
|
10003994: f91ff06f j 10003924 <_reschedule_threads>
|
7258 |
|
|
|
7259 |
|
|
0000000010003998 <_is_next_thread_current>:
|
7260 |
|
|
10003998: 1141 addi sp,sp,-16
|
7261 |
|
|
1000399a: e022 sd s0,0(sp)
|
7262 |
|
|
1000399c: e406 sd ra,8(sp)
|
7263 |
|
|
1000399e: 0800 addi s0,sp,16
|
7264 |
|
|
100039a0: f33ff0ef jal ra,100038d2 <_get_next_ready_thread>
|
7265 |
|
|
100039a4: 100067b7 lui a5,0x10006
|
7266 |
|
|
100039a8: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
|
7267 |
|
|
100039ac: 60a2 ld ra,8(sp)
|
7268 |
|
|
100039ae: 6402 ld s0,0(sp)
|
7269 |
|
|
100039b0: 40a78533 sub a0,a5,a0
|
7270 |
|
|
100039b4: 00153513 seqz a0,a0
|
7271 |
|
|
100039b8: 0141 addi sp,sp,16
|
7272 |
|
|
100039ba: 8082 ret
|
7273 |
|
|
|
7274 |
|
|
00000000100039bc <_move_thread_to_end_of_prio_q>:
|
7275 |
|
|
* This function, along with _add_thread_to_ready_q() and
|
7276 |
|
|
* _remove_thread_from_ready_q(), are the _only_ places where a thread is
|
7277 |
|
|
* taken off or put on the ready queue.
|
7278 |
|
|
*/
|
7279 |
|
|
void _move_thread_to_end_of_prio_q(struct k_thread *thread)
|
7280 |
|
|
{
|
7281 |
|
|
100039bc: 1141 addi sp,sp,-16
|
7282 |
|
|
100039be: e422 sd s0,8(sp)
|
7283 |
|
|
100039c0: 0800 addi s0,sp,16
|
7284 |
|
|
return prio + CONFIG_NUM_COOP_PRIORITIES;
|
7285 |
|
|
100039c2: 495c lw a5,20(a0)
|
7286 |
|
|
int q_index = _get_ready_q_q_index(thread->base.prio);
|
7287 |
|
|
sys_dlist_t *q = &_ready_q.q[q_index];
|
7288 |
|
|
100039c4: 10006737 lui a4,0x10006
|
7289 |
|
|
100039c8: dc070693 addi a3,a4,-576 # 10005dc0 <_kernel>
|
7290 |
|
|
100039cc: 27c1 addiw a5,a5,16
|
7291 |
|
|
100039ce: 078d addi a5,a5,3
|
7292 |
|
|
100039d0: 0792 slli a5,a5,0x4
|
7293 |
|
|
100039d2: 00878613 addi a2,a5,8
|
7294 |
|
|
100039d6: 96b2 add a3,a3,a2
|
7295 |
|
|
|
7296 |
|
|
if (sys_dlist_is_tail(q, &thread->base.k_q_node)) {
|
7297 |
|
|
100039d8: 6690 ld a2,8(a3)
|
7298 |
|
|
100039da: 02c50563 beq a0,a2,10003a04 <_move_thread_to_end_of_prio_q+0x48>
|
7299 |
|
|
* @return N/A
|
7300 |
|
|
*/
|
7301 |
|
|
|
7302 |
|
|
static inline void sys_dlist_remove(sys_dnode_t *node)
|
7303 |
|
|
{
|
7304 |
|
|
node->prev->next = node->next;
|
7305 |
|
|
100039de: 610c ld a1,0(a0)
|
7306 |
|
|
100039e0: 6510 ld a2,8(a0)
|
7307 |
|
|
100039e2: dc070713 addi a4,a4,-576
|
7308 |
|
|
node->prev = list->tail;
|
7309 |
|
|
100039e6: 97ba add a5,a5,a4
|
7310 |
|
|
node->prev->next = node->next;
|
7311 |
|
|
100039e8: e20c sd a1,0(a2)
|
7312 |
|
|
node->next->prev = node->prev;
|
7313 |
|
|
100039ea: 610c ld a1,0(a0)
|
7314 |
|
|
100039ec: e590 sd a2,8(a1)
|
7315 |
|
|
node->next = list;
|
7316 |
|
|
100039ee: e114 sd a3,0(a0)
|
7317 |
|
|
node->prev = list->tail;
|
7318 |
|
|
100039f0: 6b94 ld a3,16(a5)
|
7319 |
|
|
100039f2: e514 sd a3,8(a0)
|
7320 |
|
|
list->tail->next = node;
|
7321 |
|
|
100039f4: 6b94 ld a3,16(a5)
|
7322 |
|
|
100039f6: e288 sd a0,0(a3)
|
7323 |
|
|
list->tail = node;
|
7324 |
|
|
100039f8: eb88 sd a0,16(a5)
|
7325 |
|
|
sys_dlist_remove(&thread->base.k_q_node);
|
7326 |
|
|
sys_dlist_append(q, &thread->base.k_q_node);
|
7327 |
|
|
|
7328 |
|
|
struct k_thread **cache = &_ready_q.cache;
|
7329 |
|
|
|
7330 |
|
|
*cache = *cache == thread ? NULL : *cache;
|
7331 |
|
|
100039fa: 771c ld a5,40(a4)
|
7332 |
|
|
100039fc: 00a79363 bne a5,a0,10003a02 <_move_thread_to_end_of_prio_q+0x46>
|
7333 |
|
|
10003a00: 4781 li a5,0
|
7334 |
|
|
10003a02: f71c sd a5,40(a4)
|
7335 |
|
|
}
|
7336 |
|
|
10003a04: 6422 ld s0,8(sp)
|
7337 |
|
|
10003a06: 0141 addi sp,sp,16
|
7338 |
|
|
10003a08: 8082 ret
|
7339 |
|
|
|
7340 |
|
|
0000000010003a0a :
|
7341 |
|
|
|
7342 |
|
|
void k_yield(void)
|
7343 |
|
|
{
|
7344 |
|
|
10003a0a: 1101 addi sp,sp,-32
|
7345 |
|
|
10003a0c: ec06 sd ra,24(sp)
|
7346 |
|
|
10003a0e: e822 sd s0,16(sp)
|
7347 |
|
|
10003a10: e426 sd s1,8(sp)
|
7348 |
|
|
10003a12: e04a sd s2,0(sp)
|
7349 |
|
|
10003a14: 1000 addi s0,sp,32
|
7350 |
|
|
__ASSERT(!_is_in_isr(), "");
|
7351 |
|
|
|
7352 |
|
|
int key = irq_lock();
|
7353 |
|
|
|
7354 |
|
|
_move_thread_to_end_of_prio_q(_current);
|
7355 |
|
|
10003a16: 100064b7 lui s1,0x10006
|
7356 |
|
|
int key = irq_lock();
|
7357 |
|
|
10003a1a: ddeff0ef jal ra,10002ff8 <_arch_irq_lock>
|
7358 |
|
|
_move_thread_to_end_of_prio_q(_current);
|
7359 |
|
|
10003a1e: dc048493 addi s1,s1,-576 # 10005dc0 <_kernel>
|
7360 |
|
|
int key = irq_lock();
|
7361 |
|
|
10003a22: 0005091b sext.w s2,a0
|
7362 |
|
|
_move_thread_to_end_of_prio_q(_current);
|
7363 |
|
|
10003a26: 6888 ld a0,16(s1)
|
7364 |
|
|
10003a28: f95ff0ef jal ra,100039bc <_move_thread_to_end_of_prio_q>
|
7365 |
|
|
|
7366 |
|
|
if (_current == _get_next_ready_thread()) {
|
7367 |
|
|
10003a2c: 6884 ld s1,16(s1)
|
7368 |
|
|
10003a2e: ea5ff0ef jal ra,100038d2 <_get_next_ready_thread>
|
7369 |
|
|
10003a32: 00a49a63 bne s1,a0,10003a46
|
7370 |
|
|
irq_unlock(key);
|
7371 |
|
|
} else {
|
7372 |
|
|
_Swap(key);
|
7373 |
|
|
}
|
7374 |
|
|
}
|
7375 |
|
|
10003a36: 6442 ld s0,16(sp)
|
7376 |
|
|
10003a38: 60e2 ld ra,24(sp)
|
7377 |
|
|
10003a3a: 64a2 ld s1,8(sp)
|
7378 |
|
|
irq_unlock(key);
|
7379 |
|
|
10003a3c: 854a mv a0,s2
|
7380 |
|
|
}
|
7381 |
|
|
10003a3e: 6902 ld s2,0(sp)
|
7382 |
|
|
10003a40: 6105 addi sp,sp,32
|
7383 |
|
|
irq_unlock(key);
|
7384 |
|
|
10003a42: decff06f j 1000302e <_arch_irq_unlock>
|
7385 |
|
|
}
|
7386 |
|
|
10003a46: 6442 ld s0,16(sp)
|
7387 |
|
|
10003a48: 60e2 ld ra,24(sp)
|
7388 |
|
|
10003a4a: 64a2 ld s1,8(sp)
|
7389 |
|
|
_Swap(key);
|
7390 |
|
|
10003a4c: 854a mv a0,s2
|
7391 |
|
|
}
|
7392 |
|
|
10003a4e: 6902 ld s2,0(sp)
|
7393 |
|
|
10003a50: 6105 addi sp,sp,32
|
7394 |
|
|
_Swap(key);
|
7395 |
|
|
10003a52: db2fc06f j 10000004 <_Swap>
|
7396 |
|
|
|
7397 |
|
|
0000000010003a56 :
|
7398 |
|
|
}
|
7399 |
|
|
|
7400 |
|
|
uint32_t k_uptime_delta_32(int64_t *reftime)
|
7401 |
|
|
{
|
7402 |
|
|
return (uint32_t)k_uptime_delta(reftime);
|
7403 |
|
|
}
|
7404 |
|
|
10003a56: 1141 addi sp,sp,-16
|
7405 |
|
|
10003a58: e422 sd s0,8(sp)
|
7406 |
|
|
10003a5a: 0800 addi s0,sp,16
|
7407 |
|
|
10003a5c: 100097b7 lui a5,0x10009
|
7408 |
|
|
10003a60: 8f87e503 lwu a0,-1800(a5) # 100088f8 <_sys_clock_tick_count>
|
7409 |
|
|
10003a64: 3e800793 li a5,1000
|
7410 |
|
|
10003a68: 6422 ld s0,8(sp)
|
7411 |
|
|
10003a6a: 02f50533 mul a0,a0,a5
|
7412 |
|
|
10003a6e: 0c800793 li a5,200
|
7413 |
|
|
10003a72: 0141 addi sp,sp,16
|
7414 |
|
|
10003a74: 02f55533 divu a0,a0,a5
|
7415 |
|
|
10003a78: 2501 sext.w a0,a0
|
7416 |
|
|
10003a7a: 8082 ret
|
7417 |
|
|
|
7418 |
|
|
0000000010003a7c <_nano_sys_clock_tick_announce>:
|
7419 |
|
|
* timers that have expired and wake up the fibers pending on them.
|
7420 |
|
|
*
|
7421 |
|
|
* @return N/A
|
7422 |
|
|
*/
|
7423 |
|
|
void _nano_sys_clock_tick_announce(int32_t ticks)
|
7424 |
|
|
{
|
7425 |
|
|
10003a7c: 715d addi sp,sp,-80
|
7426 |
|
|
10003a7e: e0a2 sd s0,64(sp)
|
7427 |
|
|
10003a80: fc26 sd s1,56(sp)
|
7428 |
|
|
10003a82: f84a sd s2,48(sp)
|
7429 |
|
|
10003a84: f44e sd s3,40(sp)
|
7430 |
|
|
10003a86: f052 sd s4,32(sp)
|
7431 |
|
|
10003a88: e486 sd ra,72(sp)
|
7432 |
|
|
10003a8a: ec56 sd s5,24(sp)
|
7433 |
|
|
10003a8c: e85a sd s6,16(sp)
|
7434 |
|
|
10003a8e: e45e sd s7,8(sp)
|
7435 |
|
|
10003a90: e062 sd s8,0(sp)
|
7436 |
|
|
10003a92: 0880 addi s0,sp,80
|
7437 |
|
|
10003a94: 84aa mv s1,a0
|
7438 |
|
|
unsigned int key;
|
7439 |
|
|
|
7440 |
|
|
K_DEBUG("ticks: %d\n", ticks);
|
7441 |
|
|
|
7442 |
|
|
key = irq_lock();
|
7443 |
|
|
10003a96: d62ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
7444 |
|
|
_sys_clock_tick_count += ticks;
|
7445 |
|
|
10003a9a: 10009737 lui a4,0x10009
|
7446 |
|
|
10003a9e: 8f873783 ld a5,-1800(a4) # 100088f8 <_sys_clock_tick_count>
|
7447 |
|
|
return list->head == list;
|
7448 |
|
|
10003aa2: 10006937 lui s2,0x10006
|
7449 |
|
|
10003aa6: 100069b7 lui s3,0x10006
|
7450 |
|
|
10003aaa: 97a6 add a5,a5,s1
|
7451 |
|
|
10003aac: 8ef73c23 sd a5,-1800(a4)
|
7452 |
|
|
10003ab0: dc090793 addi a5,s2,-576 # 10005dc0 <_kernel>
|
7453 |
|
|
10003ab4: 6f9c ld a5,24(a5)
|
7454 |
|
|
10003ab6: dd898993 addi s3,s3,-552 # 10005dd8 <_kernel+0x18>
|
7455 |
|
|
key = irq_lock();
|
7456 |
|
|
10003aba: 00050a1b sext.w s4,a0
|
7457 |
|
|
10003abe: dc090913 addi s2,s2,-576
|
7458 |
|
|
return sys_dlist_is_empty(list) ? NULL : list->head;
|
7459 |
|
|
10003ac2: 03379563 bne a5,s3,10003aec <_nano_sys_clock_tick_announce+0x70>
|
7460 |
|
|
if (_time_slice_duration == 0) {
|
7461 |
|
|
10003ac6: 1000a7b7 lui a5,0x1000a
|
7462 |
|
|
10003aca: d607a683 lw a3,-672(a5) # 10009d60 <_time_slice_duration>
|
7463 |
|
|
10003ace: eec9 bnez a3,10003b68 <_nano_sys_clock_tick_announce+0xec>
|
7464 |
|
|
handle_expired_timeouts(ticks);
|
7465 |
|
|
|
7466 |
|
|
handle_time_slicing(ticks);
|
7467 |
|
|
|
7468 |
|
|
irq_unlock(key);
|
7469 |
|
|
}
|
7470 |
|
|
10003ad0: 6406 ld s0,64(sp)
|
7471 |
|
|
10003ad2: 60a6 ld ra,72(sp)
|
7472 |
|
|
10003ad4: 74e2 ld s1,56(sp)
|
7473 |
|
|
10003ad6: 7942 ld s2,48(sp)
|
7474 |
|
|
10003ad8: 79a2 ld s3,40(sp)
|
7475 |
|
|
10003ada: 6ae2 ld s5,24(sp)
|
7476 |
|
|
10003adc: 6b42 ld s6,16(sp)
|
7477 |
|
|
10003ade: 6ba2 ld s7,8(sp)
|
7478 |
|
|
10003ae0: 6c02 ld s8,0(sp)
|
7479 |
|
|
irq_unlock(key);
|
7480 |
|
|
10003ae2: 8552 mv a0,s4
|
7481 |
|
|
}
|
7482 |
|
|
10003ae4: 7a02 ld s4,32(sp)
|
7483 |
|
|
10003ae6: 6161 addi sp,sp,80
|
7484 |
|
|
irq_unlock(key);
|
7485 |
|
|
10003ae8: d46ff06f j 1000302e <_arch_irq_unlock>
|
7486 |
|
|
if (head) {
|
7487 |
|
|
10003aec: dfe9 beqz a5,10003ac6 <_nano_sys_clock_tick_announce+0x4a>
|
7488 |
|
|
head->delta_ticks_from_prev -= ticks;
|
7489 |
|
|
10003aee: 7398 ld a4,32(a5)
|
7490 |
|
|
thread->base.flags &= ~K_PRESTART;
|
7491 |
|
|
10003af0: 7af1 lui s5,0xffffc
|
7492 |
|
|
thread->base.flags &= ~K_PENDING;
|
7493 |
|
|
10003af2: 7b79 lui s6,0xffffe
|
7494 |
|
|
10003af4: 8f05 sub a4,a4,s1
|
7495 |
|
|
10003af6: f398 sd a4,32(a5)
|
7496 |
|
|
sys_dlist_t *timeout_q)
|
7497 |
|
|
{
|
7498 |
|
|
struct _timeout *t = (void *)sys_dlist_get(timeout_q);
|
7499 |
|
|
struct k_thread *thread = t->thread;
|
7500 |
|
|
|
7501 |
|
|
t->delta_ticks_from_prev = -1;
|
7502 |
|
|
10003af8: 5bfd li s7,-1
|
7503 |
|
|
thread->base.flags &= ~K_PRESTART;
|
7504 |
|
|
10003afa: 1afd addi s5,s5,-1
|
7505 |
|
|
return thread->base.flags & (K_PENDING | K_PRESTART |
|
7506 |
|
|
10003afc: 0003ac37 lui s8,0x3a
|
7507 |
|
|
thread->base.flags &= ~K_PENDING;
|
7508 |
|
|
10003b00: 1b7d addi s6,s6,-1
|
7509 |
|
|
{
|
7510 |
|
|
sys_dlist_t *timeout_q = &_timeout_q;
|
7511 |
|
|
struct _timeout *next;
|
7512 |
|
|
|
7513 |
|
|
next = (struct _timeout *)sys_dlist_peek_head(timeout_q);
|
7514 |
|
|
while (next && next->delta_ticks_from_prev == 0) {
|
7515 |
|
|
10003b02: 739c ld a5,32(a5)
|
7516 |
|
|
10003b04: f3e9 bnez a5,10003ac6 <_nano_sys_clock_tick_announce+0x4a>
|
7517 |
|
|
return list->head == list;
|
7518 |
|
|
10003b06: 01893503 ld a0,24(s2)
|
7519 |
|
|
|
7520 |
|
|
static inline sys_dnode_t *sys_dlist_get(sys_dlist_t *list)
|
7521 |
|
|
{
|
7522 |
|
|
sys_dnode_t *node;
|
7523 |
|
|
|
7524 |
|
|
if (sys_dlist_is_empty(list)) {
|
7525 |
|
|
10003b0a: 0b350363 beq a0,s3,10003bb0 <_nano_sys_clock_tick_announce+0x134>
|
7526 |
|
|
node->prev->next = node->next;
|
7527 |
|
|
10003b0e: 651c ld a5,8(a0)
|
7528 |
|
|
10003b10: 6118 ld a4,0(a0)
|
7529 |
|
|
10003b12: e398 sd a4,0(a5)
|
7530 |
|
|
node->next->prev = node->prev;
|
7531 |
|
|
10003b14: 6118 ld a4,0(a0)
|
7532 |
|
|
10003b16: e71c sd a5,8(a4)
|
7533 |
|
|
struct k_thread *thread = t->thread;
|
7534 |
|
|
10003b18: 691c ld a5,16(a0)
|
7535 |
|
|
t->delta_ticks_from_prev = -1;
|
7536 |
|
|
10003b1a: 03753023 sd s7,32(a0)
|
7537 |
|
|
if (thread != NULL) {
|
7538 |
|
|
10003b1e: c3a9 beqz a5,10003b60 <_nano_sys_clock_tick_announce+0xe4>
|
7539 |
|
|
if (timeout_obj->wait_q) {
|
7540 |
|
|
10003b20: 6d18 ld a4,24(a0)
|
7541 |
|
|
10003b22: cf01 beqz a4,10003b3a <_nano_sys_clock_tick_announce+0xbe>
|
7542 |
|
|
node->prev->next = node->next;
|
7543 |
|
|
10003b24: 6390 ld a2,0(a5)
|
7544 |
|
|
10003b26: 6794 ld a3,8(a5)
|
7545 |
|
|
10003b28: 4b98 lw a4,16(a5)
|
7546 |
|
|
10003b2a: e290 sd a2,0(a3)
|
7547 |
|
|
node->next->prev = node->prev;
|
7548 |
|
|
10003b2c: 6390 ld a2,0(a5)
|
7549 |
|
|
10003b2e: 01677733 and a4,a4,s6
|
7550 |
|
|
10003b32: e614 sd a3,8(a2)
|
7551 |
|
|
10003b34: cb98 sw a4,16(a5)
|
7552 |
|
|
thread->base.timeout.wait_q = NULL;
|
7553 |
|
|
10003b36: 0407b023 sd zero,64(a5)
|
7554 |
|
|
thread->base.flags &= ~K_PRESTART;
|
7555 |
|
|
10003b3a: 4b98 lw a4,16(a5)
|
7556 |
|
|
10003b3c: 015776b3 and a3,a4,s5
|
7557 |
|
|
10003b40: cb94 sw a3,16(a5)
|
7558 |
|
|
return !(_is_thread_prevented_from_running(thread) ||
|
7559 |
|
|
10003b42: 01877733 and a4,a4,s8
|
7560 |
|
|
10003b46: e719 bnez a4,10003b54 <_nano_sys_clock_tick_announce+0xd8>
|
7561 |
|
|
10003b48: 67b8 ld a4,72(a5)
|
7562 |
|
|
10003b4a: 01771563 bne a4,s7,10003b54 <_nano_sys_clock_tick_announce+0xd8>
|
7563 |
|
|
_add_thread_to_ready_q(thread);
|
7564 |
|
|
10003b4e: 853e mv a0,a5
|
7565 |
|
|
10003b50: be1ff0ef jal ra,10003730 <_add_thread_to_ready_q>
|
7566 |
|
|
return list->head == list;
|
7567 |
|
|
10003b54: 01893783 ld a5,24(s2)
|
7568 |
|
|
return sys_dlist_is_empty(list) ? NULL : list->head;
|
7569 |
|
|
10003b58: f73787e3 beq a5,s3,10003ac6 <_nano_sys_clock_tick_announce+0x4a>
|
7570 |
|
|
while (next && next->delta_ticks_from_prev == 0) {
|
7571 |
|
|
10003b5c: f3dd bnez a5,10003b02 <_nano_sys_clock_tick_announce+0x86>
|
7572 |
|
|
10003b5e: b7a5 j 10003ac6 <_nano_sys_clock_tick_announce+0x4a>
|
7573 |
|
|
} else if (t->func) {
|
7574 |
|
|
10003b60: 751c ld a5,40(a0)
|
7575 |
|
|
10003b62: dbed beqz a5,10003b54 <_nano_sys_clock_tick_announce+0xd8>
|
7576 |
|
|
t->func(t);
|
7577 |
|
|
10003b64: 9782 jalr a5
|
7578 |
|
|
10003b66: b7fd j 10003b54 <_nano_sys_clock_tick_announce+0xd8>
|
7579 |
|
|
if (_is_prio_higher(_current->base.prio, _time_slice_prio_ceiling)) {
|
7580 |
|
|
10003b68: 01093503 ld a0,16(s2)
|
7581 |
|
|
10003b6c: 1000a7b7 lui a5,0x1000a
|
7582 |
|
|
10003b70: d647a783 lw a5,-668(a5) # 10009d64 <_time_slice_prio_ceiling>
|
7583 |
|
|
10003b74: 4958 lw a4,20(a0)
|
7584 |
|
|
10003b76: f4f74de3 blt a4,a5,10003ad0 <_nano_sys_clock_tick_announce+0x54>
|
7585 |
|
|
|
7586 |
|
|
#define kpriority_t uint32_t
|
7587 |
|
|
|
7588 |
|
|
static inline int32_t _ticks_to_ms(int32_t ticks)
|
7589 |
|
|
{
|
7590 |
|
|
return (ticks == TICKS_UNLIMITED) ? K_FOREVER : __ticks_to_ms(ticks);
|
7591 |
|
|
10003b7a: 57fd li a5,-1
|
7592 |
|
|
10003b7c: 00f48b63 beq s1,a5,10003b92 <_nano_sys_clock_tick_announce+0x116>
|
7593 |
|
|
return (MSEC_PER_SEC * (uint64_t)ticks) / sys_clock_ticks_per_sec;
|
7594 |
|
|
10003b80: 3e800793 li a5,1000
|
7595 |
|
|
10003b84: 02f484b3 mul s1,s1,a5
|
7596 |
|
|
10003b88: 0c800793 li a5,200
|
7597 |
|
|
10003b8c: 02f4d4b3 divu s1,s1,a5
|
7598 |
|
|
10003b90: 2481 sext.w s1,s1
|
7599 |
|
|
_time_slice_elapsed += _ticks_to_ms(ticks);
|
7600 |
|
|
10003b92: 10009737 lui a4,0x10009
|
7601 |
|
|
10003b96: 8f072783 lw a5,-1808(a4) # 100088f0 <_time_slice_elapsed>
|
7602 |
|
|
10003b9a: 9fa5 addw a5,a5,s1
|
7603 |
|
|
if (_time_slice_elapsed >= _time_slice_duration) {
|
7604 |
|
|
10003b9c: 00d7d563 ble a3,a5,10003ba6 <_nano_sys_clock_tick_announce+0x12a>
|
7605 |
|
|
_time_slice_elapsed += _ticks_to_ms(ticks);
|
7606 |
|
|
10003ba0: 8ef72823 sw a5,-1808(a4)
|
7607 |
|
|
10003ba4: b735 j 10003ad0 <_nano_sys_clock_tick_announce+0x54>
|
7608 |
|
|
_time_slice_elapsed = 0;
|
7609 |
|
|
10003ba6: 8e072823 sw zero,-1808(a4)
|
7610 |
|
|
_move_thread_to_end_of_prio_q(_current);
|
7611 |
|
|
10003baa: e13ff0ef jal ra,100039bc <_move_thread_to_end_of_prio_q>
|
7612 |
|
|
10003bae: b70d j 10003ad0 <_nano_sys_clock_tick_announce+0x54>
|
7613 |
|
|
struct k_thread *thread = t->thread;
|
7614 |
|
|
10003bb0: 01003783 ld a5,16(zero) # 10 <__memory_pool_quad_block_size>
|
7615 |
|
|
10003bb4: 9002 ebreak
|
7616 |
|
|
|
7617 |
|
|
0000000010003bb6 <_is_thread_ready>:
|
7618 |
|
|
{
|
7619 |
|
|
unsigned int key = irq_lock();
|
7620 |
|
|
|
7621 |
|
|
_k_thread_single_resume(thread);
|
7622 |
|
|
|
7623 |
|
|
_reschedule_threads(key);
|
7624 |
|
|
10003bb6: 1141 addi sp,sp,-16
|
7625 |
|
|
10003bb8: e422 sd s0,8(sp)
|
7626 |
|
|
10003bba: 0800 addi s0,sp,16
|
7627 |
|
|
10003bbc: 491c lw a5,16(a0)
|
7628 |
|
|
10003bbe: 0003e737 lui a4,0x3e
|
7629 |
|
|
10003bc2: 8ff9 and a5,a5,a4
|
7630 |
|
|
10003bc4: eb81 bnez a5,10003bd4 <_is_thread_ready+0x1e>
|
7631 |
|
|
10003bc6: 6528 ld a0,72(a0)
|
7632 |
|
|
10003bc8: 0505 addi a0,a0,1
|
7633 |
|
|
10003bca: 00153513 seqz a0,a0
|
7634 |
|
|
10003bce: 6422 ld s0,8(sp)
|
7635 |
|
|
10003bd0: 0141 addi sp,sp,16
|
7636 |
|
|
10003bd2: 8082 ret
|
7637 |
|
|
10003bd4: 4501 li a0,0
|
7638 |
|
|
10003bd6: bfe5 j 10003bce <_is_thread_ready+0x18>
|
7639 |
|
|
|
7640 |
|
|
0000000010003bd8 <_k_thread_single_start>:
|
7641 |
|
|
10003bd8: 1101 addi sp,sp,-32
|
7642 |
|
|
10003bda: e822 sd s0,16(sp)
|
7643 |
|
|
10003bdc: e426 sd s1,8(sp)
|
7644 |
|
|
10003bde: ec06 sd ra,24(sp)
|
7645 |
|
|
10003be0: 1000 addi s0,sp,32
|
7646 |
|
|
10003be2: 491c lw a5,16(a0)
|
7647 |
|
|
10003be4: 7771 lui a4,0xffffc
|
7648 |
|
|
10003be6: 177d addi a4,a4,-1
|
7649 |
|
|
10003be8: 8ff9 and a5,a5,a4
|
7650 |
|
|
10003bea: c91c sw a5,16(a0)
|
7651 |
|
|
10003bec: 84aa mv s1,a0
|
7652 |
|
|
10003bee: fc9ff0ef jal ra,10003bb6 <_is_thread_ready>
|
7653 |
|
|
10003bf2: c901 beqz a0,10003c02 <_k_thread_single_start+0x2a>
|
7654 |
|
|
10003bf4: 6442 ld s0,16(sp)
|
7655 |
|
|
10003bf6: 60e2 ld ra,24(sp)
|
7656 |
|
|
10003bf8: 8526 mv a0,s1
|
7657 |
|
|
10003bfa: 64a2 ld s1,8(sp)
|
7658 |
|
|
10003bfc: 6105 addi sp,sp,32
|
7659 |
|
|
10003bfe: b33ff06f j 10003730 <_add_thread_to_ready_q>
|
7660 |
|
|
10003c02: 60e2 ld ra,24(sp)
|
7661 |
|
|
10003c04: 6442 ld s0,16(sp)
|
7662 |
|
|
10003c06: 64a2 ld s1,8(sp)
|
7663 |
|
|
10003c08: 6105 addi sp,sp,32
|
7664 |
|
|
10003c0a: 8082 ret
|
7665 |
|
|
|
7666 |
|
|
0000000010003c0c :
|
7667 |
|
|
10003c0c: 1101 addi sp,sp,-32
|
7668 |
|
|
10003c0e: e822 sd s0,16(sp)
|
7669 |
|
|
10003c10: e426 sd s1,8(sp)
|
7670 |
|
|
10003c12: e04a sd s2,0(sp)
|
7671 |
|
|
10003c14: ec06 sd ra,24(sp)
|
7672 |
|
|
10003c16: 1000 addi s0,sp,32
|
7673 |
|
|
10003c18: 84aa mv s1,a0
|
7674 |
|
|
10003c1a: bdeff0ef jal ra,10002ff8 <_arch_irq_lock>
|
7675 |
|
|
10003c1e: 489c lw a5,16(s1)
|
7676 |
|
|
10003c20: 7771 lui a4,0xffffc
|
7677 |
|
|
10003c22: 177d addi a4,a4,-1
|
7678 |
|
|
10003c24: 8ff9 and a5,a5,a4
|
7679 |
|
|
10003c26: 0005091b sext.w s2,a0
|
7680 |
|
|
10003c2a: c89c sw a5,16(s1)
|
7681 |
|
|
10003c2c: 8526 mv a0,s1
|
7682 |
|
|
10003c2e: f89ff0ef jal ra,10003bb6 <_is_thread_ready>
|
7683 |
|
|
10003c32: c915 beqz a0,10003c66
|
7684 |
|
|
10003c34: 8526 mv a0,s1
|
7685 |
|
|
10003c36: afbff0ef jal ra,10003730 <_add_thread_to_ready_q>
|
7686 |
|
|
10003c3a: 100067b7 lui a5,0x10006
|
7687 |
|
|
10003c3e: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
|
7688 |
|
|
10003c42: 495c lw a5,20(a0)
|
7689 |
|
|
10003c44: 0207c163 bltz a5,10003c66
|
7690 |
|
|
10003c48: 0561 addi a0,a0,24
|
7691 |
|
|
10003c4a: df6ff0ef jal ra,10003240
|
7692 |
|
|
10003c4e: ed01 bnez a0,10003c66
|
7693 |
|
|
10003c50: cb3ff0ef jal ra,10003902 <__must_switch_threads>
|
7694 |
|
|
10003c54: c909 beqz a0,10003c66
|
7695 |
|
|
10003c56: 6442 ld s0,16(sp)
|
7696 |
|
|
10003c58: 60e2 ld ra,24(sp)
|
7697 |
|
|
10003c5a: 64a2 ld s1,8(sp)
|
7698 |
|
|
10003c5c: 854a mv a0,s2
|
7699 |
|
|
10003c5e: 6902 ld s2,0(sp)
|
7700 |
|
|
10003c60: 6105 addi sp,sp,32
|
7701 |
|
|
10003c62: ba2fc06f j 10000004 <_Swap>
|
7702 |
|
|
10003c66: 6442 ld s0,16(sp)
|
7703 |
|
|
10003c68: 60e2 ld ra,24(sp)
|
7704 |
|
|
10003c6a: 64a2 ld s1,8(sp)
|
7705 |
|
|
10003c6c: 854a mv a0,s2
|
7706 |
|
|
10003c6e: 6902 ld s2,0(sp)
|
7707 |
|
|
10003c70: 6105 addi sp,sp,32
|
7708 |
|
|
10003c72: bbcff06f j 1000302e <_arch_irq_unlock>
|
7709 |
|
|
|
7710 |
|
|
0000000010003c76 <_abort_timeout>:
|
7711 |
|
|
10003c76: 1141 addi sp,sp,-16
|
7712 |
|
|
10003c78: e422 sd s0,8(sp)
|
7713 |
|
|
10003c7a: 0800 addi s0,sp,16
|
7714 |
|
|
10003c7c: 7114 ld a3,32(a0)
|
7715 |
|
|
10003c7e: 57fd li a5,-1
|
7716 |
|
|
10003c80: 02f68663 beq a3,a5,10003cac <_abort_timeout+0x36>
|
7717 |
|
|
10003c84: 10006737 lui a4,0x10006
|
7718 |
|
|
10003c88: de073703 ld a4,-544(a4) # 10005de0 <_kernel+0x20>
|
7719 |
|
|
10003c8c: 611c ld a5,0(a0)
|
7720 |
|
|
10003c8e: 00e50563 beq a0,a4,10003c98 <_abort_timeout+0x22>
|
7721 |
|
|
10003c92: 7398 ld a4,32(a5)
|
7722 |
|
|
10003c94: 9736 add a4,a4,a3
|
7723 |
|
|
10003c96: f398 sd a4,32(a5)
|
7724 |
|
|
10003c98: 6518 ld a4,8(a0)
|
7725 |
|
|
10003c9a: e31c sd a5,0(a4)
|
7726 |
|
|
10003c9c: 611c ld a5,0(a0)
|
7727 |
|
|
10003c9e: e798 sd a4,8(a5)
|
7728 |
|
|
10003ca0: 57fd li a5,-1
|
7729 |
|
|
10003ca2: f11c sd a5,32(a0)
|
7730 |
|
|
10003ca4: 4501 li a0,0
|
7731 |
|
|
10003ca6: 6422 ld s0,8(sp)
|
7732 |
|
|
10003ca8: 0141 addi sp,sp,16
|
7733 |
|
|
10003caa: 8082 ret
|
7734 |
|
|
10003cac: 557d li a0,-1
|
7735 |
|
|
10003cae: bfe5 j 10003ca6 <_abort_timeout+0x30>
|
7736 |
|
|
|
7737 |
|
|
0000000010003cb0 :
|
7738 |
|
|
10003cb0: 1101 addi sp,sp,-32
|
7739 |
|
|
10003cb2: e822 sd s0,16(sp)
|
7740 |
|
|
10003cb4: e426 sd s1,8(sp)
|
7741 |
|
|
10003cb6: ec06 sd ra,24(sp)
|
7742 |
|
|
10003cb8: 1000 addi s0,sp,32
|
7743 |
|
|
10003cba: 84aa mv s1,a0
|
7744 |
|
|
10003cbc: 852e mv a0,a1
|
7745 |
|
|
10003cbe: b33ff0ef jal ra,100037f0 <_ms_to_ticks>
|
7746 |
|
|
10003cc2: 100066b7 lui a3,0x10006
|
7747 |
|
|
10003cc6: dc068613 addi a2,a3,-576 # 10005dc0 <_kernel>
|
7748 |
|
|
10003cca: 2505 addiw a0,a0,1
|
7749 |
|
|
10003ccc: 6e1c ld a5,24(a2)
|
7750 |
|
|
10003cce: e4a8 sd a0,72(s1)
|
7751 |
|
|
10003cd0: 10006537 lui a0,0x10006
|
7752 |
|
|
10003cd4: fc84 sd s1,56(s1)
|
7753 |
|
|
10003cd6: 0404b023 sd zero,64(s1)
|
7754 |
|
|
10003cda: dd850513 addi a0,a0,-552 # 10005dd8 <_kernel+0x18>
|
7755 |
|
|
10003cde: 02848713 addi a4,s1,40
|
7756 |
|
|
10003ce2: 02a78763 beq a5,a0,10003d10
|
7757 |
|
|
10003ce6: dc068693 addi a3,a3,-576
|
7758 |
|
|
10003cea: 0206b803 ld a6,32(a3)
|
7759 |
|
|
10003cee: cb91 beqz a5,10003d02
|
7760 |
|
|
10003cf0: 44ac lw a1,72(s1)
|
7761 |
|
|
10003cf2: 7390 ld a2,32(a5)
|
7762 |
|
|
10003cf4: 02b65a63 ble a1,a2,10003d28
|
7763 |
|
|
10003cf8: 40c5863b subw a2,a1,a2
|
7764 |
|
|
10003cfc: c4b0 sw a2,72(s1)
|
7765 |
|
|
10003cfe: 03079363 bne a5,a6,10003d24
|
7766 |
|
|
10003d02: f488 sd a0,40(s1)
|
7767 |
|
|
10003d04: 0304b823 sd a6,48(s1)
|
7768 |
|
|
10003d08: 00e83023 sd a4,0(a6)
|
7769 |
|
|
10003d0c: f298 sd a4,32(a3)
|
7770 |
|
|
10003d0e: a031 j 10003d1a
|
7771 |
|
|
10003d10: f49c sd a5,40(s1)
|
7772 |
|
|
10003d12: 721c ld a5,32(a2)
|
7773 |
|
|
10003d14: f89c sd a5,48(s1)
|
7774 |
|
|
10003d16: e398 sd a4,0(a5)
|
7775 |
|
|
10003d18: f218 sd a4,32(a2)
|
7776 |
|
|
10003d1a: 60e2 ld ra,24(sp)
|
7777 |
|
|
10003d1c: 6442 ld s0,16(sp)
|
7778 |
|
|
10003d1e: 64a2 ld s1,8(sp)
|
7779 |
|
|
10003d20: 6105 addi sp,sp,32
|
7780 |
|
|
10003d22: 8082 ret
|
7781 |
|
|
10003d24: 639c ld a5,0(a5)
|
7782 |
|
|
10003d26: b7e1 j 10003cee
|
7783 |
|
|
10003d28: 6794 ld a3,8(a5)
|
7784 |
|
|
10003d2a: 8e0d sub a2,a2,a1
|
7785 |
|
|
10003d2c: f390 sd a2,32(a5)
|
7786 |
|
|
10003d2e: f894 sd a3,48(s1)
|
7787 |
|
|
10003d30: 6794 ld a3,8(a5)
|
7788 |
|
|
10003d32: f49c sd a5,40(s1)
|
7789 |
|
|
10003d34: e298 sd a4,0(a3)
|
7790 |
|
|
10003d36: e798 sd a4,8(a5)
|
7791 |
|
|
10003d38: b7cd j 10003d1a
|
7792 |
|
|
|
7793 |
|
|
0000000010003d3a <_is_thread_essential>:
|
7794 |
|
|
10003d3a: 1141 addi sp,sp,-16
|
7795 |
|
|
10003d3c: e422 sd s0,8(sp)
|
7796 |
|
|
10003d3e: 0800 addi s0,sp,16
|
7797 |
|
|
10003d40: 100067b7 lui a5,0x10006
|
7798 |
|
|
10003d44: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
|
7799 |
|
|
10003d48: 6422 ld s0,8(sp)
|
7800 |
|
|
10003d4a: 4b88 lw a0,16(a5)
|
7801 |
|
|
10003d4c: 0141 addi sp,sp,16
|
7802 |
|
|
10003d4e: 20057513 andi a0,a0,512
|
7803 |
|
|
10003d52: 8082 ret
|
7804 |
|
|
|
7805 |
|
|
0000000010003d54 <_thread_entry>:
|
7806 |
|
|
10003d54: 1141 addi sp,sp,-16
|
7807 |
|
|
10003d56: e406 sd ra,8(sp)
|
7808 |
|
|
10003d58: e022 sd s0,0(sp)
|
7809 |
|
|
10003d5a: 0800 addi s0,sp,16
|
7810 |
|
|
10003d5c: 87aa mv a5,a0
|
7811 |
|
|
10003d5e: 852e mv a0,a1
|
7812 |
|
|
10003d60: 85b2 mv a1,a2
|
7813 |
|
|
10003d62: 8636 mv a2,a3
|
7814 |
|
|
10003d64: 9782 jalr a5
|
7815 |
|
|
10003d66: fd5ff0ef jal ra,10003d3a <_is_thread_essential>
|
7816 |
|
|
10003d6a: c901 beqz a0,10003d7a <_thread_entry+0x26>
|
7817 |
|
|
10003d6c: 100055b7 lui a1,0x10005
|
7818 |
|
|
10003d70: f7858593 addi a1,a1,-136 # 10004f78 <_default_esf>
|
7819 |
|
|
10003d74: 450d li a0,3
|
7820 |
|
|
10003d76: a28ff0ef jal ra,10002f9e <_NanoFatalErrorHandler>
|
7821 |
|
|
10003d7a: 100067b7 lui a5,0x10006
|
7822 |
|
|
10003d7e: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
|
7823 |
|
|
10003d82: 21a000ef jal ra,10003f9c
|
7824 |
|
|
|
7825 |
|
|
0000000010003d86 :
|
7826 |
|
|
10003d86: 1101 addi sp,sp,-32
|
7827 |
|
|
10003d88: e822 sd s0,16(sp)
|
7828 |
|
|
10003d8a: e426 sd s1,8(sp)
|
7829 |
|
|
10003d8c: e04a sd s2,0(sp)
|
7830 |
|
|
10003d8e: 1000 addi s0,sp,32
|
7831 |
|
|
10003d90: ec06 sd ra,24(sp)
|
7832 |
|
|
10003d92: 00042903 lw s2,0(s0)
|
7833 |
|
|
10003d96: 84aa mv s1,a0
|
7834 |
|
|
10003d98: b70ff0ef jal ra,10003108 <_new_thread>
|
7835 |
|
|
10003d9c: 00091c63 bnez s2,10003db4
|
7836 |
|
|
10003da0: 8526 mv a0,s1
|
7837 |
|
|
10003da2: e6bff0ef jal ra,10003c0c
|
7838 |
|
|
10003da6: 60e2 ld ra,24(sp)
|
7839 |
|
|
10003da8: 6442 ld s0,16(sp)
|
7840 |
|
|
10003daa: 8526 mv a0,s1
|
7841 |
|
|
10003dac: 6902 ld s2,0(sp)
|
7842 |
|
|
10003dae: 64a2 ld s1,8(sp)
|
7843 |
|
|
10003db0: 6105 addi sp,sp,32
|
7844 |
|
|
10003db2: 8082 ret
|
7845 |
|
|
10003db4: 85ca mv a1,s2
|
7846 |
|
|
10003db6: 8526 mv a0,s1
|
7847 |
|
|
10003db8: ef9ff0ef jal ra,10003cb0
|
7848 |
|
|
10003dbc: b7ed j 10003da6
|
7849 |
|
|
|
7850 |
|
|
0000000010003dbe <_k_thread_group_op>:
|
7851 |
|
|
10003dbe: 7139 addi sp,sp,-64
|
7852 |
|
|
10003dc0: f822 sd s0,48(sp)
|
7853 |
|
|
10003dc2: f426 sd s1,40(sp)
|
7854 |
|
|
10003dc4: f04a sd s2,32(sp)
|
7855 |
|
|
10003dc6: ec4e sd s3,24(sp)
|
7856 |
|
|
10003dc8: e852 sd s4,16(sp)
|
7857 |
|
|
10003dca: e456 sd s5,8(sp)
|
7858 |
|
|
10003dcc: fc06 sd ra,56(sp)
|
7859 |
|
|
10003dce: e05a sd s6,0(sp)
|
7860 |
|
|
10003dd0: 0080 addi s0,sp,64
|
7861 |
|
|
10003dd2: 10006937 lui s2,0x10006
|
7862 |
|
|
10003dd6: dc090793 addi a5,s2,-576 # 10005dc0 <_kernel>
|
7863 |
|
|
10003dda: 8a2a mv s4,a0
|
7864 |
|
|
10003ddc: 6b88 ld a0,16(a5)
|
7865 |
|
|
10003dde: 100054b7 lui s1,0x10005
|
7866 |
|
|
10003de2: 100059b7 lui s3,0x10005
|
7867 |
|
|
10003de6: 0561 addi a0,a0,24
|
7868 |
|
|
10003de8: 8aae mv s5,a1
|
7869 |
|
|
10003dea: 28048493 addi s1,s1,640 # 10005280 <__data_ram_end>
|
7870 |
|
|
10003dee: beeff0ef jal ra,100031dc
|
7871 |
|
|
10003df2: dc090913 addi s2,s2,-576
|
7872 |
|
|
10003df6: 28098993 addi s3,s3,640 # 10005280 <__data_ram_end>
|
7873 |
|
|
10003dfa: 0334e263 bltu s1,s3,10003e1e <_k_thread_group_op+0x60>
|
7874 |
|
|
10003dfe: 01093503 ld a0,16(s2)
|
7875 |
|
|
10003e02: db5ff0ef jal ra,10003bb6 <_is_thread_ready>
|
7876 |
|
|
10003e06: cd05 beqz a0,10003e3e <_k_thread_group_op+0x80>
|
7877 |
|
|
10003e08: 7442 ld s0,48(sp)
|
7878 |
|
|
10003e0a: 70e2 ld ra,56(sp)
|
7879 |
|
|
10003e0c: 74a2 ld s1,40(sp)
|
7880 |
|
|
10003e0e: 7902 ld s2,32(sp)
|
7881 |
|
|
10003e10: 69e2 ld s3,24(sp)
|
7882 |
|
|
10003e12: 6a42 ld s4,16(sp)
|
7883 |
|
|
10003e14: 6aa2 ld s5,8(sp)
|
7884 |
|
|
10003e16: 6b02 ld s6,0(sp)
|
7885 |
|
|
10003e18: 6121 addi sp,sp,64
|
7886 |
|
|
10003e1a: b51ff06f j 1000396a
|
7887 |
|
|
10003e1e: 44bc lw a5,72(s1)
|
7888 |
|
|
10003e20: 00fa77b3 and a5,s4,a5
|
7889 |
|
|
10003e24: cb91 beqz a5,10003e38 <_k_thread_group_op+0x7a>
|
7890 |
|
|
10003e26: 9d2ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
7891 |
|
|
10003e2a: 00050b1b sext.w s6,a0
|
7892 |
|
|
10003e2e: 6088 ld a0,0(s1)
|
7893 |
|
|
10003e30: 9a82 jalr s5
|
7894 |
|
|
10003e32: 855a mv a0,s6
|
7895 |
|
|
10003e34: 9faff0ef jal ra,1000302e <_arch_irq_unlock>
|
7896 |
|
|
10003e38: 05048493 addi s1,s1,80
|
7897 |
|
|
10003e3c: bf7d j 10003dfa <_k_thread_group_op+0x3c>
|
7898 |
|
|
10003e3e: 9baff0ef jal ra,10002ff8 <_arch_irq_lock>
|
7899 |
|
|
10003e42: 0005049b sext.w s1,a0
|
7900 |
|
|
10003e46: 01093503 ld a0,16(s2)
|
7901 |
|
|
10003e4a: 0561 addi a0,a0,24
|
7902 |
|
|
10003e4c: bc2ff0ef jal ra,1000320e
|
7903 |
|
|
10003e50: 7442 ld s0,48(sp)
|
7904 |
|
|
10003e52: 70e2 ld ra,56(sp)
|
7905 |
|
|
10003e54: 7902 ld s2,32(sp)
|
7906 |
|
|
10003e56: 69e2 ld s3,24(sp)
|
7907 |
|
|
10003e58: 6a42 ld s4,16(sp)
|
7908 |
|
|
10003e5a: 6aa2 ld s5,8(sp)
|
7909 |
|
|
10003e5c: 6b02 ld s6,0(sp)
|
7910 |
|
|
10003e5e: 8526 mv a0,s1
|
7911 |
|
|
10003e60: 74a2 ld s1,40(sp)
|
7912 |
|
|
10003e62: 6121 addi sp,sp,64
|
7913 |
|
|
10003e64: 9a0fc06f j 10000004 <_Swap>
|
7914 |
|
|
|
7915 |
|
|
0000000010003e68 <_k_thread_single_abort>:
|
7916 |
|
|
}
|
7917 |
|
|
|
7918 |
|
|
void _k_thread_single_abort(struct k_thread *thread)
|
7919 |
|
|
{
|
7920 |
|
|
10003e68: 1101 addi sp,sp,-32
|
7921 |
|
|
10003e6a: e822 sd s0,16(sp)
|
7922 |
|
|
10003e6c: e426 sd s1,8(sp)
|
7923 |
|
|
10003e6e: ec06 sd ra,24(sp)
|
7924 |
|
|
10003e70: 1000 addi s0,sp,32
|
7925 |
|
|
if (thread->fn_abort != NULL) {
|
7926 |
|
|
10003e72: 18053783 ld a5,384(a0)
|
7927 |
|
|
{
|
7928 |
|
|
10003e76: 84aa mv s1,a0
|
7929 |
|
|
if (thread->fn_abort != NULL) {
|
7930 |
|
|
10003e78: c391 beqz a5,10003e7c <_k_thread_single_abort+0x14>
|
7931 |
|
|
thread->fn_abort();
|
7932 |
|
|
10003e7a: 9782 jalr a5
|
7933 |
|
|
}
|
7934 |
|
|
|
7935 |
|
|
if (_is_thread_ready(thread)) {
|
7936 |
|
|
10003e7c: 8526 mv a0,s1
|
7937 |
|
|
10003e7e: d39ff0ef jal ra,10003bb6 <_is_thread_ready>
|
7938 |
|
|
10003e82: cd09 beqz a0,10003e9c <_k_thread_single_abort+0x34>
|
7939 |
|
|
_remove_thread_from_ready_q(thread);
|
7940 |
|
|
10003e84: 8526 mv a0,s1
|
7941 |
|
|
10003e86: 90bff0ef jal ra,10003790 <_remove_thread_from_ready_q>
|
7942 |
|
|
thread->base.flags |= K_DEAD;
|
7943 |
|
|
10003e8a: 489c lw a5,16(s1)
|
7944 |
|
|
if (_is_thread_timeout_active(thread)) {
|
7945 |
|
|
_abort_thread_timeout(thread);
|
7946 |
|
|
}
|
7947 |
|
|
}
|
7948 |
|
|
_mark_thread_as_dead(thread);
|
7949 |
|
|
}
|
7950 |
|
|
10003e8c: 60e2 ld ra,24(sp)
|
7951 |
|
|
10003e8e: 6442 ld s0,16(sp)
|
7952 |
|
|
10003e90: 6721 lui a4,0x8
|
7953 |
|
|
10003e92: 8fd9 or a5,a5,a4
|
7954 |
|
|
10003e94: c89c sw a5,16(s1)
|
7955 |
|
|
10003e96: 64a2 ld s1,8(sp)
|
7956 |
|
|
10003e98: 6105 addi sp,sp,32
|
7957 |
|
|
10003e9a: 8082 ret
|
7958 |
|
|
10003e9c: 489c lw a5,16(s1)
|
7959 |
|
|
if (_is_thread_pending(thread)) {
|
7960 |
|
|
10003e9e: 03279713 slli a4,a5,0x32
|
7961 |
|
|
10003ea2: 00075b63 bgez a4,10003eb8 <_k_thread_single_abort+0x50>
|
7962 |
|
|
node->prev->next = node->next;
|
7963 |
|
|
10003ea6: 6498 ld a4,8(s1)
|
7964 |
|
|
10003ea8: 6094 ld a3,0(s1)
|
7965 |
|
|
10003eaa: e314 sd a3,0(a4)
|
7966 |
|
|
node->next->prev = node->prev;
|
7967 |
|
|
10003eac: 6094 ld a3,0(s1)
|
7968 |
|
|
10003eae: e698 sd a4,8(a3)
|
7969 |
|
|
thread->base.flags &= ~K_PENDING;
|
7970 |
|
|
10003eb0: 7779 lui a4,0xffffe
|
7971 |
|
|
10003eb2: 177d addi a4,a4,-1
|
7972 |
|
|
10003eb4: 8ff9 and a5,a5,a4
|
7973 |
|
|
10003eb6: c89c sw a5,16(s1)
|
7974 |
|
|
if (_is_thread_timeout_active(thread)) {
|
7975 |
|
|
10003eb8: 64b8 ld a4,72(s1)
|
7976 |
|
|
10003eba: 57fd li a5,-1
|
7977 |
|
|
10003ebc: fcf707e3 beq a4,a5,10003e8a <_k_thread_single_abort+0x22>
|
7978 |
|
|
return 0;
|
7979 |
|
|
}
|
7980 |
|
|
|
7981 |
|
|
static inline int _abort_thread_timeout(struct k_thread *thread)
|
7982 |
|
|
{
|
7983 |
|
|
return _abort_timeout(&thread->base.timeout);
|
7984 |
|
|
10003ec0: 02848513 addi a0,s1,40
|
7985 |
|
|
10003ec4: db3ff0ef jal ra,10003c76 <_abort_timeout>
|
7986 |
|
|
10003ec8: b7c9 j 10003e8a <_k_thread_single_abort+0x22>
|
7987 |
|
|
|
7988 |
|
|
0000000010003eca <_init_static_threads>:
|
7989 |
|
|
|
7990 |
|
|
void _init_static_threads(void)
|
7991 |
|
|
{
|
7992 |
|
|
10003eca: 7179 addi sp,sp,-48
|
7993 |
|
|
10003ecc: f022 sd s0,32(sp)
|
7994 |
|
|
10003ece: ec26 sd s1,24(sp)
|
7995 |
|
|
10003ed0: e84a sd s2,16(sp)
|
7996 |
|
|
10003ed2: e44e sd s3,8(sp)
|
7997 |
|
|
unsigned int key;
|
7998 |
|
|
|
7999 |
|
|
_FOREACH_STATIC_THREAD(thread_data) {
|
8000 |
|
|
10003ed4: 100057b7 lui a5,0x10005
|
8001 |
|
|
{
|
8002 |
|
|
10003ed8: f406 sd ra,40(sp)
|
8003 |
|
|
10003eda: e052 sd s4,0(sp)
|
8004 |
|
|
10003edc: 1800 addi s0,sp,48
|
8005 |
|
|
_FOREACH_STATIC_THREAD(thread_data) {
|
8006 |
|
|
10003ede: 100059b7 lui s3,0x10005
|
8007 |
|
|
10003ee2: 28078493 addi s1,a5,640 # 10005280 <__data_ram_end>
|
8008 |
|
|
10003ee6: 28078913 addi s2,a5,640
|
8009 |
|
|
10003eea: 28098993 addi s3,s3,640 # 10005280 <__data_ram_end>
|
8010 |
|
|
10003eee: 0534e463 bltu s1,s3,10003f36 <_init_static_threads+0x6c>
|
8011 |
|
|
atomic_inc(&_current->base.sched_locked);
|
8012 |
|
|
10003ef2: 100067b7 lui a5,0x10006
|
8013 |
|
|
10003ef6: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
|
8014 |
|
|
*
|
8015 |
|
|
* Note that static threads defined using the legacy API have a
|
8016 |
|
|
* delay of K_FOREVER.
|
8017 |
|
|
*/
|
8018 |
|
|
key = irq_lock();
|
8019 |
|
|
_FOREACH_STATIC_THREAD(thread_data) {
|
8020 |
|
|
10003efa: 84ca mv s1,s2
|
8021 |
|
|
if (thread_data->init_delay != K_FOREVER) {
|
8022 |
|
|
10003efc: 597d li s2,-1
|
8023 |
|
|
10003efe: 0561 addi a0,a0,24
|
8024 |
|
|
10003f00: adcff0ef jal ra,100031dc
|
8025 |
|
|
_k_thread_group_op(K_TASK_GROUP_EXE, _k_thread_single_start);
|
8026 |
|
|
10003f04: 100045b7 lui a1,0x10004
|
8027 |
|
|
10003f08: bd858593 addi a1,a1,-1064 # 10003bd8 <_k_thread_single_start>
|
8028 |
|
|
10003f0c: 4505 li a0,1
|
8029 |
|
|
10003f0e: eb1ff0ef jal ra,10003dbe <_k_thread_group_op>
|
8030 |
|
|
key = irq_lock();
|
8031 |
|
|
10003f12: 8e6ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
8032 |
|
|
10003f16: 00050a1b sext.w s4,a0
|
8033 |
|
|
_FOREACH_STATIC_THREAD(thread_data) {
|
8034 |
|
|
10003f1a: 0534e163 bltu s1,s3,10003f5c <_init_static_threads+0x92>
|
8035 |
|
|
schedule_new_thread(thread_data->thread,
|
8036 |
|
|
thread_data->init_delay);
|
8037 |
|
|
}
|
8038 |
|
|
}
|
8039 |
|
|
irq_unlock(key);
|
8040 |
|
|
10003f1e: 8552 mv a0,s4
|
8041 |
|
|
10003f20: 90eff0ef jal ra,1000302e <_arch_irq_unlock>
|
8042 |
|
|
k_sched_unlock();
|
8043 |
|
|
}
|
8044 |
|
|
10003f24: 7402 ld s0,32(sp)
|
8045 |
|
|
10003f26: 70a2 ld ra,40(sp)
|
8046 |
|
|
10003f28: 64e2 ld s1,24(sp)
|
8047 |
|
|
10003f2a: 6942 ld s2,16(sp)
|
8048 |
|
|
10003f2c: 69a2 ld s3,8(sp)
|
8049 |
|
|
10003f2e: 6a02 ld s4,0(sp)
|
8050 |
|
|
10003f30: 6145 addi sp,sp,48
|
8051 |
|
|
k_sched_unlock();
|
8052 |
|
|
10003f32: a39ff06f j 1000396a
|
8053 |
|
|
_new_thread(
|
8054 |
|
|
10003f36: 749c ld a5,40(s1)
|
8055 |
|
|
10003f38: 0344a883 lw a7,52(s1)
|
8056 |
|
|
10003f3c: 0304a803 lw a6,48(s1)
|
8057 |
|
|
10003f40: 7098 ld a4,32(s1)
|
8058 |
|
|
10003f42: 6c94 ld a3,24(s1)
|
8059 |
|
|
10003f44: 6890 ld a2,16(s1)
|
8060 |
|
|
10003f46: 0084e583 lwu a1,8(s1)
|
8061 |
|
|
10003f4a: 6088 ld a0,0(s1)
|
8062 |
|
|
10003f4c: 9bcff0ef jal ra,10003108 <_new_thread>
|
8063 |
|
|
thread_data->thread->init_data = thread_data;
|
8064 |
|
|
10003f50: 609c ld a5,0(s1)
|
8065 |
|
|
10003f52: 1697bc23 sd s1,376(a5)
|
8066 |
|
|
_FOREACH_STATIC_THREAD(thread_data) {
|
8067 |
|
|
10003f56: 05048493 addi s1,s1,80
|
8068 |
|
|
10003f5a: bf51 j 10003eee <_init_static_threads+0x24>
|
8069 |
|
|
if (thread_data->init_delay != K_FOREVER) {
|
8070 |
|
|
10003f5c: 5c8c lw a1,56(s1)
|
8071 |
|
|
10003f5e: 01258663 beq a1,s2,10003f6a <_init_static_threads+0xa0>
|
8072 |
|
|
schedule_new_thread(thread_data->thread,
|
8073 |
|
|
10003f62: 6088 ld a0,0(s1)
|
8074 |
|
|
if (delay == 0) {
|
8075 |
|
|
10003f64: e591 bnez a1,10003f70 <_init_static_threads+0xa6>
|
8076 |
|
|
start_thread(thread);
|
8077 |
|
|
10003f66: ca7ff0ef jal ra,10003c0c
|
8078 |
|
|
_FOREACH_STATIC_THREAD(thread_data) {
|
8079 |
|
|
10003f6a: 05048493 addi s1,s1,80
|
8080 |
|
|
10003f6e: b775 j 10003f1a <_init_static_threads+0x50>
|
8081 |
|
|
10003f70: d41ff0ef jal ra,10003cb0
|
8082 |
|
|
10003f74: bfdd j 10003f6a <_init_static_threads+0xa0>
|
8083 |
|
|
|
8084 |
|
|
0000000010003f76 <_init_thread_base>:
|
8085 |
|
|
|
8086 |
|
|
void _init_thread_base(struct _thread_base *thread_base, int priority,
|
8087 |
|
|
uint32_t initial_state, unsigned int options)
|
8088 |
|
|
{
|
8089 |
|
|
10003f76: 1141 addi sp,sp,-16
|
8090 |
|
|
10003f78: e422 sd s0,8(sp)
|
8091 |
|
|
10003f7a: 0800 addi s0,sp,16
|
8092 |
|
|
thread_base->sched_locked = 0;
|
8093 |
|
|
|
8094 |
|
|
/* swap_data does not need to be initialized */
|
8095 |
|
|
|
8096 |
|
|
_init_thread_timeout(thread_base);
|
8097 |
|
|
}
|
8098 |
|
|
10003f7c: 6422 ld s0,8(sp)
|
8099 |
|
|
thread_base->flags = options | initial_state;
|
8100 |
|
|
10003f7e: 8ed1 or a3,a3,a2
|
8101 |
|
|
t->delta_ticks_from_prev = -1;
|
8102 |
|
|
10003f80: 57fd li a5,-1
|
8103 |
|
|
10003f82: c914 sw a3,16(a0)
|
8104 |
|
|
thread_base->prio = priority;
|
8105 |
|
|
10003f84: c94c sw a1,20(a0)
|
8106 |
|
|
thread_base->sched_locked = 0;
|
8107 |
|
|
10003f86: 00052c23 sw zero,24(a0)
|
8108 |
|
|
10003f8a: e53c sd a5,72(a0)
|
8109 |
|
|
t->wait_q = NULL;
|
8110 |
|
|
10003f8c: 04053023 sd zero,64(a0)
|
8111 |
|
|
t->thread = NULL;
|
8112 |
|
|
10003f90: 02053c23 sd zero,56(a0)
|
8113 |
|
|
t->func = func;
|
8114 |
|
|
10003f94: 04053823 sd zero,80(a0)
|
8115 |
|
|
}
|
8116 |
|
|
10003f98: 0141 addi sp,sp,16
|
8117 |
|
|
10003f9a: 8082 ret
|
8118 |
|
|
|
8119 |
|
|
0000000010003f9c :
|
8120 |
|
|
|
8121 |
|
|
extern void _k_thread_single_abort(struct k_thread *thread);
|
8122 |
|
|
|
8123 |
|
|
#if !defined(CONFIG_ARCH_HAS_NANO_FIBER_ABORT)
|
8124 |
|
|
void k_thread_abort(k_tid_t thread)
|
8125 |
|
|
{
|
8126 |
|
|
10003f9c: 1101 addi sp,sp,-32
|
8127 |
|
|
10003f9e: ec06 sd ra,24(sp)
|
8128 |
|
|
10003fa0: e822 sd s0,16(sp)
|
8129 |
|
|
10003fa2: e426 sd s1,8(sp)
|
8130 |
|
|
10003fa4: e04a sd s2,0(sp)
|
8131 |
|
|
10003fa6: 1000 addi s0,sp,32
|
8132 |
|
|
10003fa8: 892a mv s2,a0
|
8133 |
|
|
unsigned int key;
|
8134 |
|
|
|
8135 |
|
|
key = irq_lock();
|
8136 |
|
|
10003faa: 84eff0ef jal ra,10002ff8 <_arch_irq_lock>
|
8137 |
|
|
10003fae: 0005049b sext.w s1,a0
|
8138 |
|
|
|
8139 |
|
|
_k_thread_single_abort(thread);
|
8140 |
|
|
10003fb2: 854a mv a0,s2
|
8141 |
|
|
10003fb4: eb5ff0ef jal ra,10003e68 <_k_thread_single_abort>
|
8142 |
|
|
_thread_monitor_exit(thread);
|
8143 |
|
|
|
8144 |
|
|
if (_current == thread) {
|
8145 |
|
|
10003fb8: 100067b7 lui a5,0x10006
|
8146 |
|
|
10003fbc: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
|
8147 |
|
|
_Swap(key);
|
8148 |
|
|
10003fc0: 8526 mv a0,s1
|
8149 |
|
|
if (_current == thread) {
|
8150 |
|
|
10003fc2: 01279463 bne a5,s2,10003fca
|
8151 |
|
|
_Swap(key);
|
8152 |
|
|
10003fc6: 83efc0ef jal ra,10000004 <_Swap>
|
8153 |
|
|
CODE_UNREACHABLE;
|
8154 |
|
|
}
|
8155 |
|
|
|
8156 |
|
|
/* The abort handler might have altered the ready queue. */
|
8157 |
|
|
_reschedule_threads(key);
|
8158 |
|
|
}
|
8159 |
|
|
10003fca: 6442 ld s0,16(sp)
|
8160 |
|
|
10003fcc: 60e2 ld ra,24(sp)
|
8161 |
|
|
10003fce: 64a2 ld s1,8(sp)
|
8162 |
|
|
10003fd0: 6902 ld s2,0(sp)
|
8163 |
|
|
10003fd2: 6105 addi sp,sp,32
|
8164 |
|
|
_reschedule_threads(key);
|
8165 |
|
|
10003fd4: 951ff06f j 10003924 <_reschedule_threads>
|
8166 |
|
|
|
8167 |
|
|
0000000010003fd8 :
|
8168 |
|
|
#else
|
8169 |
|
|
#define IDLE_YIELD_IF_COOP() do { } while ((0))
|
8170 |
|
|
#endif
|
8171 |
|
|
|
8172 |
|
|
void idle(void *unused1, void *unused2, void *unused3)
|
8173 |
|
|
{
|
8174 |
|
|
10003fd8: 1141 addi sp,sp,-16
|
8175 |
|
|
10003fda: e022 sd s0,0(sp)
|
8176 |
|
|
10003fdc: e406 sd ra,8(sp)
|
8177 |
|
|
10003fde: 0800 addi s0,sp,16
|
8178 |
|
|
|
8179 |
|
|
__idle_tsc = _tsc_read();
|
8180 |
|
|
#endif
|
8181 |
|
|
|
8182 |
|
|
for (;;) {
|
8183 |
|
|
(void)irq_lock();
|
8184 |
|
|
10003fe0: 818ff0ef jal ra,10002ff8 <_arch_irq_lock>
|
8185 |
|
|
nano_cpu_idle();
|
8186 |
|
|
10003fe4: fabfe0ef jal ra,10002f8e
|
8187 |
|
|
_sys_power_save_idle(_get_next_timeout_expiry());
|
8188 |
|
|
|
8189 |
|
|
#ifdef CONFIG_RISCV64
|
8190 |
|
|
// I didn't understood where preemptive switch must occurs
|
8191 |
|
|
k_yield();
|
8192 |
|
|
10003fe8: a23ff0ef jal ra,10003a0a
|
8193 |
|
|
10003fec: bfd5 j 10003fe0
|