riscv32-unknown-elf-ld timer.o -o main -T link.ld
riscv32-unknown-elf-objdump -Mnumeric -D --visualize-jump -w -l main

main:     file format elf32-littleriscv


Disassembly of section .text:

80000000 <_start>:
_start():
80000000:	000070b3          	and	x1,x0,x0
80000004:	00007133          	and	x2,x0,x0
80000008:	000071b3          	and	x3,x0,x0
8000000c:	00007233          	and	x4,x0,x0
80000010:	000072b3          	and	x5,x0,x0
80000014:	00007333          	and	x6,x0,x0
80000018:	000073b3          	and	x7,x0,x0
8000001c:	00007433          	and	x8,x0,x0
80000020:	000074b3          	and	x9,x0,x0
80000024:	00007533          	and	x10,x0,x0
80000028:	000075b3          	and	x11,x0,x0
8000002c:	00007633          	and	x12,x0,x0
80000030:	000076b3          	and	x13,x0,x0
80000034:	00007733          	and	x14,x0,x0
80000038:	000077b3          	and	x15,x0,x0
8000003c:	00007833          	and	x16,x0,x0
80000040:	000078b3          	and	x17,x0,x0
80000044:	00007933          	and	x18,x0,x0
80000048:	000079b3          	and	x19,x0,x0
8000004c:	00007a33          	and	x20,x0,x0
80000050:	00007ab3          	and	x21,x0,x0
80000054:	00007b33          	and	x22,x0,x0
80000058:	00007bb3          	and	x23,x0,x0
8000005c:	00007c33          	and	x24,x0,x0
80000060:	00007cb3          	and	x25,x0,x0
80000064:	00007d33          	and	x26,x0,x0
80000068:	00007db3          	and	x27,x0,x0
8000006c:	00007e33          	and	x28,x0,x0
80000070:	00007eb3          	and	x29,x0,x0
80000074:	00007f33          	and	x30,x0,x0
80000078:	00007fb3          	and	x31,x0,x0
8000007c:	00000913          	li	x18,0
80000080:	00300493          	li	x9,3
80000084:	00000513          	li	x10,0
80000088:	00000593          	li	x11,0
8000008c:	00001117          	auipc	x2,0x1
80000090:	93810113          	addi	x2,x2,-1736 # 800009c4 <stack_end>
80000094:	00000297          	auipc	x5,0x0
80000098:	06c28293          	addi	x5,x5,108 # 80000100 <level_0_interrupt_handler>
8000009c:	30529073          	csrw	mtvec,x5
800000a0:	fff00293          	li	x5,-1
800000a4:	00000593          	li	x11,0
800000a8:	0f000513          	li	x10,240
800000ac:	02004337          	lui	x6,0x2004
800000b0:	00532023          	sw	x5,0(x6) # 2004000 <CLIC_MTIMECMP_LO>
800000b4:	00532223          	sw	x5,4(x6)
800000b8:	00a32023          	sw	x10,0(x6)
800000bc:	00b32223          	sw	x11,4(x6)
800000c0:	08000313          	li	x6,128
800000c4:	30431073          	csrw	mie,x6
800000c8:	00800313          	li	x6,8
800000cc:	30031073          	csrw	mstatus,x6
800000d0:	00a00513          	li	x10,10
800000d4:	810002b7          	lui	x5,0x81000
800000d8:	00a2a023          	sw	x10,0(x5) # 81000000 <UART_RX_DATA_ADDR+0xfefffff8>

800000dc <loop>:
loop():
800000dc:	/-> 0124c463          	blt	x9,x18,800000e4 <exit_loop>
800000e0:	\-- ffdff06f          	j	800000dc <loop>

800000e4 <exit_loop>:
exit_loop():
800000e4:	30001073          	csrw	mstatus,x0
800000e8:	30401073          	csrw	mie,x0
800000ec:	05d00893          	li	x17,93
800000f0:	00000513          	li	x10,0
800000f4:	020102b7          	lui	x5,0x2010
800000f8:	0112a023          	sw	x17,0(x5) # 2010000 <SYSCALL_ADDR>

800000fc <end>:
end():
800000fc:	/-- 0000006f          	j	800000fc <end>

80000100 <level_0_interrupt_handler>:
level_0_interrupt_handler():
80000100:	f8010113          	addi	x2,x2,-128
80000104:	00112023          	sw	x1,0(x2)
80000108:	00412623          	sw	x4,12(x2)
8000010c:	00512823          	sw	x5,16(x2)
80000110:	00612a23          	sw	x6,20(x2)
80000114:	00712c23          	sw	x7,24(x2)
80000118:	02a12223          	sw	x10,36(x2)
8000011c:	02b12423          	sw	x11,40(x2)
80000120:	02c12623          	sw	x12,44(x2)
80000124:	02d12823          	sw	x13,48(x2)
80000128:	02e12a23          	sw	x14,52(x2)
8000012c:	02f12c23          	sw	x15,56(x2)
80000130:	03012e23          	sw	x16,60(x2)
80000134:	05112023          	sw	x17,64(x2)
80000138:	07c12623          	sw	x28,108(x2)
8000013c:	07d12823          	sw	x29,112(x2)
80000140:	07e12a23          	sw	x30,116(x2)
80000144:	07f12c23          	sw	x31,120(x2)
80000148:	0200c337          	lui	x6,0x200c
8000014c:	ff830313          	addi	x6,x6,-8 # 200bff8 <CLIC_MTIME_LO>
80000150:	fff00293          	li	x5,-1
80000154:	00032503          	lw	x10,0(x6)
80000158:	00432583          	lw	x11,4(x6)
8000015c:	0c850513          	addi	x10,x10,200
80000160:	00190913          	addi	x18,x18,1
80000164:	02004337          	lui	x6,0x2004
80000168:	00532023          	sw	x5,0(x6) # 2004000 <CLIC_MTIMECMP_LO>
8000016c:	00532223          	sw	x5,4(x6)
80000170:	00a32023          	sw	x10,0(x6)
80000174:	00b32223          	sw	x11,4(x6)
80000178:	00012083          	lw	x1,0(x2)
8000017c:	00c12203          	lw	x4,12(x2)
80000180:	01012283          	lw	x5,16(x2)
80000184:	01412303          	lw	x6,20(x2)
80000188:	01812383          	lw	x7,24(x2)
8000018c:	02412503          	lw	x10,36(x2)
80000190:	02812583          	lw	x11,40(x2)
80000194:	02c12603          	lw	x12,44(x2)
80000198:	03012683          	lw	x13,48(x2)
8000019c:	03412703          	lw	x14,52(x2)
800001a0:	03812783          	lw	x15,56(x2)
800001a4:	03c12803          	lw	x16,60(x2)
800001a8:	04012883          	lw	x17,64(x2)
800001ac:	06c12e03          	lw	x28,108(x2)
800001b0:	07012e83          	lw	x29,112(x2)
800001b4:	07412f03          	lw	x30,116(x2)
800001b8:	07812f83          	lw	x31,120(x2)
800001bc:	08010113          	addi	x2,x2,128
800001c0:	30200073          	mret

800001c4 <stack_begin>:
	...

Disassembly of section .riscv.attributes:

00000000 <.riscv.attributes>:
   0:	1941                	addi	x18,x18,-16
   2:	0000                	unimp
   4:	7200                	flw	f8,32(x12)
   6:	7369                	lui	x6,0xffffa
   8:	01007663          	bgeu	x0,x16,14 <REGBYTES+0x10>
   c:	0000000f          	fence	unknown,unknown
  10:	7205                	lui	x4,0xfffe1
  12:	3376                	fld	f6,376(x2)
  14:	6932                	flw	f18,12(x2)
  16:	7032                	flw	f0,44(x2)
  18:	0030                	addi	x12,x2,8
