tinyriscv/tests/example/simple/simple.dump

230 lines
8.2 KiB
Plaintext

simple: file format elf32-littleriscv
Disassembly of section .init:
00000000 <_start>:
0: 10001197 auipc gp,0x10001
4: 80018193 addi gp,gp,-2048 # 10000800 <__global_pointer$>
8: 10002117 auipc sp,0x10002
c: ff810113 addi sp,sp,-8 # 10002000 <_sp>
10: 00000d13 li s10,0
14: 00000d93 li s11,0
18: 2a000513 li a0,672
1c: 10000597 auipc a1,0x10000
20: fe458593 addi a1,a1,-28 # 10000000 <_data>
24: 80818613 addi a2,gp,-2040 # 10000008 <__bss_start>
28: 00c5fc63 bgeu a1,a2,40 <_start+0x40>
2c: 00052283 lw t0,0(a0)
30: 0055a023 sw t0,0(a1)
34: 00450513 addi a0,a0,4
38: 00458593 addi a1,a1,4
3c: fec5e8e3 bltu a1,a2,2c <_start+0x2c>
40: 80818513 addi a0,gp,-2040 # 10000008 <__bss_start>
44: 80818593 addi a1,gp,-2040 # 10000008 <__bss_start>
48: 00b57863 bgeu a0,a1,58 <_start+0x58>
4c: 00052023 sw zero,0(a0)
50: 00450513 addi a0,a0,4
54: feb56ce3 bltu a0,a1,4c <_start+0x4c>
58: 220000ef jal ra,278 <_init>
5c: 10c000ef jal ra,168 <main>
60: 00100d13 li s10,1
00000064 <loop>:
64: 0000006f j 64 <loop>
Disassembly of section .text:
00000068 <trap_entry>:
68: f8010113 addi sp,sp,-128
6c: 00112223 sw ra,4(sp)
70: 00212423 sw sp,8(sp)
74: 00312623 sw gp,12(sp)
78: 00412823 sw tp,16(sp)
7c: 00512a23 sw t0,20(sp)
80: 00612c23 sw t1,24(sp)
84: 00712e23 sw t2,28(sp)
88: 02812023 sw s0,32(sp)
8c: 02912223 sw s1,36(sp)
90: 02a12423 sw a0,40(sp)
94: 02b12623 sw a1,44(sp)
98: 02c12823 sw a2,48(sp)
9c: 02d12a23 sw a3,52(sp)
a0: 02e12c23 sw a4,56(sp)
a4: 02f12e23 sw a5,60(sp)
a8: 05012023 sw a6,64(sp)
ac: 05112223 sw a7,68(sp)
b0: 05212423 sw s2,72(sp)
b4: 05312623 sw s3,76(sp)
b8: 05412823 sw s4,80(sp)
bc: 05512a23 sw s5,84(sp)
c0: 05612c23 sw s6,88(sp)
c4: 05712e23 sw s7,92(sp)
c8: 07812023 sw s8,96(sp)
cc: 07912223 sw s9,100(sp)
d0: 07c12823 sw t3,112(sp)
d4: 07d12a23 sw t4,116(sp)
d8: 07e12c23 sw t5,120(sp)
dc: 07f12e23 sw t6,124(sp)
e0: 34202573 csrr a0,mcause
e4: 164000ef jal ra,248 <trap_handler>
e8: 00412083 lw ra,4(sp)
ec: 00812103 lw sp,8(sp)
f0: 00c12183 lw gp,12(sp)
f4: 01012203 lw tp,16(sp)
f8: 01412283 lw t0,20(sp)
fc: 01812303 lw t1,24(sp)
100: 01c12383 lw t2,28(sp)
104: 02012403 lw s0,32(sp)
108: 02412483 lw s1,36(sp)
10c: 02812503 lw a0,40(sp)
110: 02c12583 lw a1,44(sp)
114: 03012603 lw a2,48(sp)
118: 03412683 lw a3,52(sp)
11c: 03812703 lw a4,56(sp)
120: 03c12783 lw a5,60(sp)
124: 04012803 lw a6,64(sp)
128: 04412883 lw a7,68(sp)
12c: 04812903 lw s2,72(sp)
130: 04c12983 lw s3,76(sp)
134: 05012a03 lw s4,80(sp)
138: 05412a83 lw s5,84(sp)
13c: 05812b03 lw s6,88(sp)
140: 05c12b83 lw s7,92(sp)
144: 06012c03 lw s8,96(sp)
148: 06412c83 lw s9,100(sp)
14c: 07012e03 lw t3,112(sp)
150: 07412e83 lw t4,116(sp)
154: 07812f03 lw t5,120(sp)
158: 07c12f83 lw t6,124(sp)
15c: 08010113 addi sp,sp,128
160: 30200073 mret
164: 0000006f j 164 <trap_entry+0xfc>
00000168 <main>:
168: fe010113 addi sp,sp,-32
16c: 00812e23 sw s0,28(sp)
170: 02010413 addi s0,sp,32
174: 10000797 auipc a5,0x10000
178: e8c78793 addi a5,a5,-372 # 10000000 <_data>
17c: 00600713 li a4,6
180: 00e7a023 sw a4,0(a5)
184: fe042423 sw zero,-24(s0)
188: fe042623 sw zero,-20(s0)
18c: 0200006f j 1ac <main+0x44>
190: fe842703 lw a4,-24(s0)
194: fec42783 lw a5,-20(s0)
198: 00f707b3 add a5,a4,a5
19c: fef42423 sw a5,-24(s0)
1a0: fec42783 lw a5,-20(s0)
1a4: 00178793 addi a5,a5,1
1a8: fef42623 sw a5,-20(s0)
1ac: fec42703 lw a4,-20(s0)
1b0: 06400793 li a5,100
1b4: fce7dee3 bge a5,a4,190 <main+0x28>
1b8: fe042623 sw zero,-20(s0)
1bc: 0200006f j 1dc <main+0x74>
1c0: fe842703 lw a4,-24(s0)
1c4: fec42783 lw a5,-20(s0)
1c8: 40f707b3 sub a5,a4,a5
1cc: fef42423 sw a5,-24(s0)
1d0: fec42783 lw a5,-20(s0)
1d4: 00178793 addi a5,a5,1
1d8: fef42623 sw a5,-20(s0)
1dc: fec42703 lw a4,-20(s0)
1e0: 03200793 li a5,50
1e4: fce7dee3 bge a5,a4,1c0 <main+0x58>
1e8: 10000797 auipc a5,0x10000
1ec: e1878793 addi a5,a5,-488 # 10000000 <_data>
1f0: 0007a783 lw a5,0(a5)
1f4: fe842703 lw a4,-24(s0)
1f8: 02f707b3 mul a5,a4,a5
1fc: fef42423 sw a5,-24(s0)
200: 10000797 auipc a5,0x10000
204: e0478793 addi a5,a5,-508 # 10000004 <div>
208: 0007a783 lw a5,0(a5)
20c: fe842703 lw a4,-24(s0)
210: 02f747b3 div a5,a4,a5
214: fef42423 sw a5,-24(s0)
218: fe842703 lw a4,-24(s0)
21c: 000027b7 lui a5,0x2
220: d7e78793 addi a5,a5,-642 # 1d7e <__stack_size+0x157e>
224: 00f71663 bne a4,a5,230 <main+0xc8>
228: 00100d93 li s11,1
22c: 0080006f j 234 <main+0xcc>
230: 00000d93 li s11,0
234: 00000793 li a5,0
238: 00078513 mv a0,a5
23c: 01c12403 lw s0,28(sp)
240: 02010113 addi sp,sp,32
244: 00008067 ret
00000248 <trap_handler>:
248: fe010113 addi sp,sp,-32
24c: 00112e23 sw ra,28(sp)
250: 00812c23 sw s0,24(sp)
254: 02010413 addi s0,sp,32
258: fea42623 sw a0,-20(s0)
25c: 00000097 auipc ra,0x0
260: 000000e7 jalr zero # 0 <_start>
264: 00000013 nop
268: 01c12083 lw ra,28(sp)
26c: 01812403 lw s0,24(sp)
270: 02010113 addi sp,sp,32
274: 00008067 ret
00000278 <_init>:
278: ff010113 addi sp,sp,-16
27c: 00812623 sw s0,12(sp)
280: 01010413 addi s0,sp,16
284: 00000797 auipc a5,0x0
288: de478793 addi a5,a5,-540 # 68 <trap_entry>
28c: 30579073 csrw mtvec,a5
290: 00000013 nop
294: 00c12403 lw s0,12(sp)
298: 01010113 addi sp,sp,16
29c: 00008067 ret
Disassembly of section .data:
10000000 <mul>:
10000000: 00000003 lb zero,0(zero) # 0 <_start>
10000004 <div>:
10000004: 00000003 lb zero,0(zero) # 0 <_start>
Disassembly of section .stack:
10001800 <_sp-0x800>:
...
Disassembly of section .comment:
00000000 <.comment>:
0: 3a434347 fmsub.d ft6,ft6,ft4,ft7,rmm
4: 2820 fld fs0,80(s0)
6: 20554e47 fmsub.s ft8,fa0,ft5,ft4,rmm
a: 434d li t1,19
c: 2055 jal b0 <trap_entry+0x48>
e: 6345 lui t1,0x11
10: 696c flw fa1,84(a0)
12: 7370 flw fa2,100(a4)
14: 2065 jal bc <trap_entry+0x54>
16: 4952 lw s2,20(sp)
18: 562d4353 0x562d4353
1c: 4520 lw s0,72(a0)
1e: 626d lui tp,0x1b
20: 6465 lui s0,0x19
22: 6564 flw fs1,76(a0)
24: 2064 fld fs1,192(s0)
26: 2c434347 0x2c434347
2a: 3620 fld fs0,104(a2)
2c: 2d34 fld fa3,88(a0)
2e: 6962 flw fs2,24(sp)
30: 2974 fld fa3,208(a0)
32: 3820 fld fs0,112(s0)
34: 322e fld ft4,232(sp)
36: 302e fld ft0,232(sp)
...