mirror of
https://github.com/SpinalHDL/VexRiscv.git
synced 2025-01-03 03:43:39 -05:00
#60 Fix machine mode emulator atomic emulation. Do not write regfile if the page was set as read only.
This commit is contained in:
parent
c2595273ec
commit
fd15a938c5
4 changed files with 250 additions and 234 deletions
|
@ -6,13 +6,13 @@ Disassembly of section .init:
|
|||
|
||||
80000000 <_start>:
|
||||
80000000: 00001117 auipc sp,0x1
|
||||
80000004: 11010113 addi sp,sp,272 # 80001110 <_sp>
|
||||
80000004: 11810113 addi sp,sp,280 # 80001118 <_sp>
|
||||
80000008: 00001517 auipc a0,0x1
|
||||
8000000c: 86850513 addi a0,a0,-1944 # 80000870 <__init_array_end>
|
||||
8000000c: 87050513 addi a0,a0,-1936 # 80000878 <__init_array_end>
|
||||
80000010: 00001597 auipc a1,0x1
|
||||
80000014: 86058593 addi a1,a1,-1952 # 80000870 <__init_array_end>
|
||||
80000014: 86858593 addi a1,a1,-1944 # 80000878 <__init_array_end>
|
||||
80000018: 00001617 auipc a2,0x1
|
||||
8000001c: 8f860613 addi a2,a2,-1800 # 80000910 <__bss_start>
|
||||
8000001c: 90060613 addi a2,a2,-1792 # 80000918 <__bss_start>
|
||||
80000020: 00c5fc63 bgeu a1,a2,80000038 <_start+0x38>
|
||||
80000024: 00052283 lw t0,0(a0)
|
||||
80000028: 0055a023 sw t0,0(a1)
|
||||
|
@ -20,14 +20,14 @@ Disassembly of section .init:
|
|||
80000030: 00458593 addi a1,a1,4
|
||||
80000034: fec5e8e3 bltu a1,a2,80000024 <_start+0x24>
|
||||
80000038: 00001517 auipc a0,0x1
|
||||
8000003c: 8d850513 addi a0,a0,-1832 # 80000910 <__bss_start>
|
||||
8000003c: 8e050513 addi a0,a0,-1824 # 80000918 <__bss_start>
|
||||
80000040: 00001597 auipc a1,0x1
|
||||
80000044: 8d058593 addi a1,a1,-1840 # 80000910 <__bss_start>
|
||||
80000044: 8d858593 addi a1,a1,-1832 # 80000918 <__bss_start>
|
||||
80000048: 00b57863 bgeu a0,a1,80000058 <_start+0x58>
|
||||
8000004c: 00052023 sw zero,0(a0)
|
||||
80000050: 00450513 addi a0,a0,4
|
||||
80000054: feb56ce3 bltu a0,a1,8000004c <_start+0x4c>
|
||||
80000058: 770000ef jal ra,800007c8 <__libc_init_array>
|
||||
80000058: 778000ef jal ra,800007d0 <__libc_init_array>
|
||||
8000005c: 17c000ef jal ra,800001d8 <init>
|
||||
80000060: 00000097 auipc ra,0x0
|
||||
80000064: 01408093 addi ra,ra,20 # 80000074 <done>
|
||||
|
@ -117,7 +117,7 @@ Disassembly of section .text:
|
|||
8000018c: 00054503 lbu a0,0(a0)
|
||||
80000190: 00050a63 beqz a0,800001a4 <putString+0x28>
|
||||
80000194: 00140413 addi s0,s0,1
|
||||
80000198: 5f4000ef jal ra,8000078c <putC>
|
||||
80000198: 5fc000ef jal ra,80000794 <putC>
|
||||
8000019c: 00044503 lbu a0,0(s0)
|
||||
800001a0: fe051ae3 bnez a0,80000194 <putString+0x18>
|
||||
800001a4: 00c12083 lw ra,12(sp)
|
||||
|
@ -149,18 +149,18 @@ Disassembly of section .text:
|
|||
800001fc: 3a079073 csrw pmpcfg0,a5
|
||||
80000200: 30529073 csrw mtvec,t0
|
||||
80000204: 80001437 lui s0,0x80001
|
||||
80000208: 5bc000ef jal ra,800007c4 <halInit>
|
||||
8000020c: 8e440413 addi s0,s0,-1820 # 800008e4 <_sp+0xfffff7d4>
|
||||
80000208: 5c4000ef jal ra,800007cc <halInit>
|
||||
8000020c: 8ec40413 addi s0,s0,-1812 # 800008ec <_sp+0xfffff7d4>
|
||||
80000210: 02a00513 li a0,42
|
||||
80000214: 00140413 addi s0,s0,1
|
||||
80000218: 574000ef jal ra,8000078c <putC>
|
||||
80000218: 57c000ef jal ra,80000794 <putC>
|
||||
8000021c: 00044503 lbu a0,0(s0)
|
||||
80000220: fe051ae3 bnez a0,80000214 <init+0x3c>
|
||||
80000224: 800007b7 lui a5,0x80000
|
||||
80000228: 07c78793 addi a5,a5,124 # 8000007c <_sp+0xffffef6c>
|
||||
80000228: 07c78793 addi a5,a5,124 # 8000007c <_sp+0xffffef64>
|
||||
8000022c: 30579073 csrw mtvec,a5
|
||||
80000230: 800017b7 lui a5,0x80001
|
||||
80000234: 09078793 addi a5,a5,144 # 80001090 <_sp+0xffffff80>
|
||||
80000234: 09878793 addi a5,a5,152 # 80001098 <_sp+0xffffff80>
|
||||
80000238: 34079073 csrw mscratch,a5
|
||||
8000023c: 000017b7 lui a5,0x1
|
||||
80000240: 88078793 addi a5,a5,-1920 # 880 <__stack_size+0x80>
|
||||
|
@ -175,10 +175,10 @@ Disassembly of section .text:
|
|||
80000264: 30379073 csrw mideleg,a5
|
||||
80000268: 14305073 csrwi stval,0
|
||||
8000026c: 80001437 lui s0,0x80001
|
||||
80000270: 8fc40413 addi s0,s0,-1796 # 800008fc <_sp+0xfffff7ec>
|
||||
80000270: 90440413 addi s0,s0,-1788 # 80000904 <_sp+0xfffff7ec>
|
||||
80000274: 02a00513 li a0,42
|
||||
80000278: 00140413 addi s0,s0,1
|
||||
8000027c: 510000ef jal ra,8000078c <putC>
|
||||
8000027c: 518000ef jal ra,80000794 <putC>
|
||||
80000280: 00044503 lbu a0,0(s0)
|
||||
80000284: fe051ae3 bnez a0,80000278 <init+0xa0>
|
||||
80000288: 00c12083 lw ra,12(sp)
|
||||
|
@ -188,7 +188,7 @@ Disassembly of section .text:
|
|||
|
||||
80000298 <readRegister>:
|
||||
80000298: 800017b7 lui a5,0x80001
|
||||
8000029c: 09078793 addi a5,a5,144 # 80001090 <_sp+0xffffff80>
|
||||
8000029c: 09878793 addi a5,a5,152 # 80001098 <_sp+0xffffff80>
|
||||
800002a0: 00251513 slli a0,a0,0x2
|
||||
800002a4: 00f50533 add a0,a0,a5
|
||||
800002a8: 00052503 lw a0,0(a0)
|
||||
|
@ -197,7 +197,7 @@ Disassembly of section .text:
|
|||
800002b0 <writeRegister>:
|
||||
800002b0: 800017b7 lui a5,0x80001
|
||||
800002b4: 00251513 slli a0,a0,0x2
|
||||
800002b8: 09078793 addi a5,a5,144 # 80001090 <_sp+0xffffff80>
|
||||
800002b8: 09878793 addi a5,a5,152 # 80001098 <_sp+0xffffff80>
|
||||
800002bc: 00f50533 add a0,a0,a5
|
||||
800002c0: 00b52023 sw a1,0(a0)
|
||||
800002c4: 00008067 ret
|
||||
|
@ -205,7 +205,7 @@ Disassembly of section .text:
|
|||
800002c8 <redirectTrap>:
|
||||
800002c8: ff010113 addi sp,sp,-16
|
||||
800002cc: 00112623 sw ra,12(sp)
|
||||
800002d0: 4b4000ef jal ra,80000784 <stopSim>
|
||||
800002d0: 4bc000ef jal ra,8000078c <stopSim>
|
||||
800002d4: 343027f3 csrr a5,mtval
|
||||
800002d8: 14379073 csrw stval,a5
|
||||
800002dc: 341027f3 csrr a5,mepc
|
||||
|
@ -220,7 +220,7 @@ Disassembly of section .text:
|
|||
|
||||
80000300 <emulationTrapToSupervisorTrap>:
|
||||
80000300: 800007b7 lui a5,0x80000
|
||||
80000304: 07c78793 addi a5,a5,124 # 8000007c <_sp+0xffffef6c>
|
||||
80000304: 07c78793 addi a5,a5,124 # 8000007c <_sp+0xffffef64>
|
||||
80000308: 30579073 csrw mtvec,a5
|
||||
8000030c: 343027f3 csrr a5,mtval
|
||||
80000310: 14379073 csrw stval,a5
|
||||
|
@ -254,7 +254,7 @@ Disassembly of section .text:
|
|||
80000378: 00020737 lui a4,0x20
|
||||
8000037c: 30073073 csrc mstatus,a4
|
||||
80000380: 00068513 mv a0,a3
|
||||
80000384: 00f5a023 sw a5,0(a1) # c3000000 <_sp+0x42ffeef0>
|
||||
80000384: 00f5a023 sw a5,0(a1) # c3000000 <_sp+0x42ffeee8>
|
||||
80000388: 00008067 ret
|
||||
|
||||
8000038c <writeWord>:
|
||||
|
@ -285,7 +285,7 @@ Disassembly of section .text:
|
|||
800003e4: 00900693 li a3,9
|
||||
800003e8: 04d79463 bne a5,a3,80000430 <trap+0x74>
|
||||
800003ec: 80001437 lui s0,0x80001
|
||||
800003f0: 11040413 addi s0,s0,272 # 80001110 <_sp+0x0>
|
||||
800003f0: 11840413 addi s0,s0,280 # 80001118 <_sp+0x0>
|
||||
800003f4: fc442783 lw a5,-60(s0)
|
||||
800003f8: 00100693 li a3,1
|
||||
800003fc: fa842503 lw a0,-88(s0)
|
||||
|
@ -298,10 +298,10 @@ Disassembly of section .text:
|
|||
80000418: 01012903 lw s2,16(sp)
|
||||
8000041c: 00c12983 lw s3,12(sp)
|
||||
80000420: 02010113 addi sp,sp,32
|
||||
80000424: 3600006f j 80000784 <stopSim>
|
||||
80000424: 3680006f j 8000078c <stopSim>
|
||||
80000428: 00777713 andi a4,a4,7
|
||||
8000042c: 14f70063 beq a4,a5,8000056c <trap+0x1b0>
|
||||
80000430: 354000ef jal ra,80000784 <stopSim>
|
||||
80000430: 35c000ef jal ra,8000078c <stopSim>
|
||||
80000434: 343027f3 csrr a5,mtval
|
||||
80000438: 14379073 csrw stval,a5
|
||||
8000043c: 341027f3 csrr a5,mepc
|
||||
|
@ -346,7 +346,7 @@ Disassembly of section .text:
|
|||
800004d8: 10f70c63 beq a4,a5,800005f0 <trap+0x234>
|
||||
800004dc: 00100993 li s3,1
|
||||
800004e0: 03370463 beq a4,s3,80000508 <trap+0x14c>
|
||||
800004e4: 2a0000ef jal ra,80000784 <stopSim>
|
||||
800004e4: 2a8000ef jal ra,8000078c <stopSim>
|
||||
800004e8: 343027f3 csrr a5,mtval
|
||||
800004ec: 14379073 csrw stval,a5
|
||||
800004f0: 341027f3 csrr a5,mepc
|
||||
|
@ -361,7 +361,7 @@ Disassembly of section .text:
|
|||
80000514: 0ed70663 beq a4,a3,80000600 <trap+0x244>
|
||||
80000518: c8178793 addi a5,a5,-895
|
||||
8000051c: 0cf70463 beq a4,a5,800005e4 <trap+0x228>
|
||||
80000520: 264000ef jal ra,80000784 <stopSim>
|
||||
80000520: 26c000ef jal ra,8000078c <stopSim>
|
||||
80000524: 343027f3 csrr a5,mtval
|
||||
80000528: 14379073 csrw stval,a5
|
||||
8000052c: 341027f3 csrr a5,mepc
|
||||
|
@ -373,7 +373,7 @@ Disassembly of section .text:
|
|||
80000544: 1c099063 bnez s3,80000704 <trap+0x348>
|
||||
80000548: 00545413 srli s0,s0,0x5
|
||||
8000054c: 800017b7 lui a5,0x80001
|
||||
80000550: 09078793 addi a5,a5,144 # 80001090 <_sp+0xffffff80>
|
||||
80000550: 09878793 addi a5,a5,152 # 80001098 <_sp+0xffffff80>
|
||||
80000554: 07c47413 andi s0,s0,124
|
||||
80000558: 00f40433 add s0,s0,a5
|
||||
8000055c: 01242023 sw s2,0(s0)
|
||||
|
@ -383,7 +383,7 @@ Disassembly of section .text:
|
|||
8000056c: 00d45713 srli a4,s0,0xd
|
||||
80000570: 01245793 srli a5,s0,0x12
|
||||
80000574: 800016b7 lui a3,0x80001
|
||||
80000578: 09068693 addi a3,a3,144 # 80001090 <_sp+0xffffff80>
|
||||
80000578: 09868693 addi a3,a3,152 # 80001098 <_sp+0xffffff80>
|
||||
8000057c: 07c77713 andi a4,a4,124
|
||||
80000580: 07c7f793 andi a5,a5,124
|
||||
80000584: 00d70733 add a4,a4,a3
|
||||
|
@ -406,42 +406,42 @@ Disassembly of section .text:
|
|||
800005c8: e6f564e3 bltu a0,a5,80000430 <trap+0x74>
|
||||
800005cc: 80001537 lui a0,0x80001
|
||||
800005d0: 00279793 slli a5,a5,0x2
|
||||
800005d4: 87050513 addi a0,a0,-1936 # 80000870 <_sp+0xfffff760>
|
||||
800005d4: 87850513 addi a0,a0,-1928 # 80000878 <_sp+0xfffff760>
|
||||
800005d8: 00a787b3 add a5,a5,a0
|
||||
800005dc: 0007a783 lw a5,0(a5)
|
||||
800005e0: 00078067 jr a5
|
||||
800005e4: 1c0000ef jal ra,800007a4 <rdtimeh>
|
||||
800005e4: 1c8000ef jal ra,800007ac <rdtimeh>
|
||||
800005e8: 00050913 mv s2,a0
|
||||
800005ec: f59ff06f j 80000544 <trap+0x188>
|
||||
800005f0: 00f45993 srli s3,s0,0xf
|
||||
800005f4: 01f9f993 andi s3,s3,31
|
||||
800005f8: 013039b3 snez s3,s3
|
||||
800005fc: f0dff06f j 80000508 <trap+0x14c>
|
||||
80000600: 19c000ef jal ra,8000079c <rdtime>
|
||||
80000600: 1a4000ef jal ra,800007a4 <rdtime>
|
||||
80000604: 00050913 mv s2,a0
|
||||
80000608: f3dff06f j 80000544 <trap+0x188>
|
||||
8000060c: 01067463 bgeu a2,a6,80000614 <trap+0x258>
|
||||
80000610: 00080613 mv a2,a6
|
||||
80000614: 00545413 srli s0,s0,0x5
|
||||
80000618: 07c47413 andi s0,s0,124
|
||||
8000061c: 00d406b3 add a3,s0,a3
|
||||
80000620: 0106a023 sw a6,0(a3)
|
||||
80000624: 000207b7 lui a5,0x20
|
||||
80000628: 3007a073 csrs mstatus,a5
|
||||
8000062c: 00000797 auipc a5,0x0
|
||||
80000630: 01878793 addi a5,a5,24 # 80000644 <trap+0x288>
|
||||
80000634: 30579073 csrw mtvec,a5
|
||||
80000638: 00100693 li a3,1
|
||||
8000063c: 00c72023 sw a2,0(a4)
|
||||
80000640: 00000693 li a3,0
|
||||
80000644: 000207b7 lui a5,0x20
|
||||
80000648: 3007b073 csrc mstatus,a5
|
||||
8000064c: 800007b7 lui a5,0x80000
|
||||
80000650: 07c78793 addi a5,a5,124 # 8000007c <_sp+0xffffef6c>
|
||||
80000654: 0e069063 bnez a3,80000734 <trap+0x378>
|
||||
80000614: 00020537 lui a0,0x20
|
||||
80000618: 30052073 csrs mstatus,a0
|
||||
8000061c: 00000517 auipc a0,0x0
|
||||
80000620: 01850513 addi a0,a0,24 # 80000634 <trap+0x278>
|
||||
80000624: 30551073 csrw mtvec,a0
|
||||
80000628: 00100793 li a5,1
|
||||
8000062c: 00c72023 sw a2,0(a4)
|
||||
80000630: 00000793 li a5,0
|
||||
80000634: 00020537 lui a0,0x20
|
||||
80000638: 30053073 csrc mstatus,a0
|
||||
8000063c: 80000737 lui a4,0x80000
|
||||
80000640: 07c70713 addi a4,a4,124 # 8000007c <_sp+0xffffef64>
|
||||
80000644: 14079063 bnez a5,80000784 <trap+0x3c8>
|
||||
80000648: 00545793 srli a5,s0,0x5
|
||||
8000064c: 07c7f793 andi a5,a5,124
|
||||
80000650: 00d786b3 add a3,a5,a3
|
||||
80000654: 0106a023 sw a6,0(a3)
|
||||
80000658: 00448493 addi s1,s1,4
|
||||
8000065c: 34149073 csrw mepc,s1
|
||||
80000660: 30579073 csrw mtvec,a5
|
||||
80000660: 30571073 csrw mtvec,a4
|
||||
80000664: df1ff06f j 80000454 <trap+0x98>
|
||||
80000668: 01064633 xor a2,a2,a6
|
||||
8000066c: fa9ff06f j 80000614 <trap+0x258>
|
||||
|
@ -460,14 +460,14 @@ Disassembly of section .text:
|
|||
800006a0: f6c85ae3 bge a6,a2,80000614 <trap+0x258>
|
||||
800006a4: 00080613 mv a2,a6
|
||||
800006a8: f6dff06f j 80000614 <trap+0x258>
|
||||
800006ac: 0e8000ef jal ra,80000794 <getC>
|
||||
800006ac: 0f0000ef jal ra,8000079c <getC>
|
||||
800006b0: faa42423 sw a0,-88(s0)
|
||||
800006b4: 341027f3 csrr a5,mepc
|
||||
800006b8: 00478793 addi a5,a5,4
|
||||
800006bc: 34179073 csrw mepc,a5
|
||||
800006c0: d95ff06f j 80000454 <trap+0x98>
|
||||
800006c4: fac42583 lw a1,-84(s0)
|
||||
800006c8: 0e4000ef jal ra,800007ac <setMachineTimerCmp>
|
||||
800006c8: 0ec000ef jal ra,800007b4 <setMachineTimerCmp>
|
||||
800006cc: 08000793 li a5,128
|
||||
800006d0: 3047a073 csrs mie,a5
|
||||
800006d4: 02000793 li a5,32
|
||||
|
@ -477,12 +477,12 @@ Disassembly of section .text:
|
|||
800006e4: 34179073 csrw mepc,a5
|
||||
800006e8: d6dff06f j 80000454 <trap+0x98>
|
||||
800006ec: 0ff57513 andi a0,a0,255
|
||||
800006f0: 09c000ef jal ra,8000078c <putC>
|
||||
800006f0: 0a4000ef jal ra,80000794 <putC>
|
||||
800006f4: 341027f3 csrr a5,mepc
|
||||
800006f8: 00478793 addi a5,a5,4
|
||||
800006fc: 34179073 csrw mepc,a5
|
||||
80000700: d55ff06f j 80000454 <trap+0x98>
|
||||
80000704: 080000ef jal ra,80000784 <stopSim>
|
||||
80000704: 088000ef jal ra,8000078c <stopSim>
|
||||
80000708: 343027f3 csrr a5,mtval
|
||||
8000070c: 14379073 csrw stval,a5
|
||||
80000710: 341027f3 csrr a5,mepc
|
||||
|
@ -493,7 +493,7 @@ Disassembly of section .text:
|
|||
80000724: 34179073 csrw mepc,a5
|
||||
80000728: e21ff06f j 80000548 <trap+0x18c>
|
||||
8000072c: 800007b7 lui a5,0x80000
|
||||
80000730: 07c78793 addi a5,a5,124 # 8000007c <_sp+0xffffef6c>
|
||||
80000730: 07c78793 addi a5,a5,124 # 8000007c <_sp+0xffffef64>
|
||||
80000734: 30579073 csrw mtvec,a5
|
||||
80000738: 343027f3 csrr a5,mtval
|
||||
8000073c: 14379073 csrw stval,a5
|
||||
|
@ -514,78 +514,80 @@ Disassembly of section .text:
|
|||
80000778: 88078793 addi a5,a5,-1920 # 880 <__stack_size+0x80>
|
||||
8000077c: 3007a073 csrs mstatus,a5
|
||||
80000780: cd5ff06f j 80000454 <trap+0x98>
|
||||
80000784: 30571073 csrw mtvec,a4
|
||||
80000788: fb1ff06f j 80000738 <trap+0x37c>
|
||||
|
||||
80000784 <stopSim>:
|
||||
80000784: fe002e23 sw zero,-4(zero) # fffffffc <_sp+0x7fffeeec>
|
||||
80000788: 0000006f j 80000788 <stopSim+0x4>
|
||||
8000078c <stopSim>:
|
||||
8000078c: fe002e23 sw zero,-4(zero) # fffffffc <_sp+0x7fffeee4>
|
||||
80000790: 0000006f j 80000790 <stopSim+0x4>
|
||||
|
||||
8000078c <putC>:
|
||||
8000078c: fea02c23 sw a0,-8(zero) # fffffff8 <_sp+0x7fffeee8>
|
||||
80000790: 00008067 ret
|
||||
|
||||
80000794 <getC>:
|
||||
80000794: ff802503 lw a0,-8(zero) # fffffff8 <_sp+0x7fffeee8>
|
||||
80000794 <putC>:
|
||||
80000794: fea02c23 sw a0,-8(zero) # fffffff8 <_sp+0x7fffeee0>
|
||||
80000798: 00008067 ret
|
||||
|
||||
8000079c <rdtime>:
|
||||
8000079c: fe002503 lw a0,-32(zero) # ffffffe0 <_sp+0x7fffeed0>
|
||||
8000079c <getC>:
|
||||
8000079c: ff802503 lw a0,-8(zero) # fffffff8 <_sp+0x7fffeee0>
|
||||
800007a0: 00008067 ret
|
||||
|
||||
800007a4 <rdtimeh>:
|
||||
800007a4: fe402503 lw a0,-28(zero) # ffffffe4 <_sp+0x7fffeed4>
|
||||
800007a4 <rdtime>:
|
||||
800007a4: fe002503 lw a0,-32(zero) # ffffffe0 <_sp+0x7fffeec8>
|
||||
800007a8: 00008067 ret
|
||||
|
||||
800007ac <setMachineTimerCmp>:
|
||||
800007ac: fec00793 li a5,-20
|
||||
800007b0: fff00713 li a4,-1
|
||||
800007b4: 00e7a023 sw a4,0(a5)
|
||||
800007b8: fea02423 sw a0,-24(zero) # ffffffe8 <_sp+0x7fffeed8>
|
||||
800007bc: 00b7a023 sw a1,0(a5)
|
||||
800007c0: 00008067 ret
|
||||
800007ac <rdtimeh>:
|
||||
800007ac: fe402503 lw a0,-28(zero) # ffffffe4 <_sp+0x7fffeecc>
|
||||
800007b0: 00008067 ret
|
||||
|
||||
800007c4 <halInit>:
|
||||
800007c4: 00008067 ret
|
||||
800007b4 <setMachineTimerCmp>:
|
||||
800007b4: fec00793 li a5,-20
|
||||
800007b8: fff00713 li a4,-1
|
||||
800007bc: 00e7a023 sw a4,0(a5)
|
||||
800007c0: fea02423 sw a0,-24(zero) # ffffffe8 <_sp+0x7fffeed0>
|
||||
800007c4: 00b7a023 sw a1,0(a5)
|
||||
800007c8: 00008067 ret
|
||||
|
||||
800007c8 <__libc_init_array>:
|
||||
800007c8: ff010113 addi sp,sp,-16
|
||||
800007cc: 00000797 auipc a5,0x0
|
||||
800007d0: 0a478793 addi a5,a5,164 # 80000870 <__init_array_end>
|
||||
800007d4: 00812423 sw s0,8(sp)
|
||||
800007d8: 00000417 auipc s0,0x0
|
||||
800007dc: 09840413 addi s0,s0,152 # 80000870 <__init_array_end>
|
||||
800007e0: 40f40433 sub s0,s0,a5
|
||||
800007e4: 00912223 sw s1,4(sp)
|
||||
800007e8: 01212023 sw s2,0(sp)
|
||||
800007ec: 00112623 sw ra,12(sp)
|
||||
800007f0: 40245413 srai s0,s0,0x2
|
||||
800007f4: 00000493 li s1,0
|
||||
800007f8: 00078913 mv s2,a5
|
||||
800007fc: 04849263 bne s1,s0,80000840 <__libc_init_array+0x78>
|
||||
80000800: 879ff0ef jal ra,80000078 <_init>
|
||||
80000804: 00000797 auipc a5,0x0
|
||||
80000808: 06c78793 addi a5,a5,108 # 80000870 <__init_array_end>
|
||||
8000080c: 00000417 auipc s0,0x0
|
||||
80000810: 06440413 addi s0,s0,100 # 80000870 <__init_array_end>
|
||||
80000814: 40f40433 sub s0,s0,a5
|
||||
80000818: 40245413 srai s0,s0,0x2
|
||||
8000081c: 00000493 li s1,0
|
||||
80000820: 00078913 mv s2,a5
|
||||
80000824: 02849a63 bne s1,s0,80000858 <__libc_init_array+0x90>
|
||||
80000828: 00c12083 lw ra,12(sp)
|
||||
8000082c: 00812403 lw s0,8(sp)
|
||||
80000830: 00412483 lw s1,4(sp)
|
||||
80000834: 00012903 lw s2,0(sp)
|
||||
80000838: 01010113 addi sp,sp,16
|
||||
8000083c: 00008067 ret
|
||||
80000840: 00249793 slli a5,s1,0x2
|
||||
80000844: 00f907b3 add a5,s2,a5
|
||||
80000848: 0007a783 lw a5,0(a5)
|
||||
8000084c: 00148493 addi s1,s1,1
|
||||
80000850: 000780e7 jalr a5
|
||||
80000854: fa9ff06f j 800007fc <__libc_init_array+0x34>
|
||||
80000858: 00249793 slli a5,s1,0x2
|
||||
8000085c: 00f907b3 add a5,s2,a5
|
||||
80000860: 0007a783 lw a5,0(a5)
|
||||
80000864: 00148493 addi s1,s1,1
|
||||
80000868: 000780e7 jalr a5
|
||||
8000086c: fb9ff06f j 80000824 <__libc_init_array+0x5c>
|
||||
800007cc <halInit>:
|
||||
800007cc: 00008067 ret
|
||||
|
||||
800007d0 <__libc_init_array>:
|
||||
800007d0: ff010113 addi sp,sp,-16
|
||||
800007d4: 00000797 auipc a5,0x0
|
||||
800007d8: 0a478793 addi a5,a5,164 # 80000878 <__init_array_end>
|
||||
800007dc: 00812423 sw s0,8(sp)
|
||||
800007e0: 00000417 auipc s0,0x0
|
||||
800007e4: 09840413 addi s0,s0,152 # 80000878 <__init_array_end>
|
||||
800007e8: 40f40433 sub s0,s0,a5
|
||||
800007ec: 00912223 sw s1,4(sp)
|
||||
800007f0: 01212023 sw s2,0(sp)
|
||||
800007f4: 00112623 sw ra,12(sp)
|
||||
800007f8: 40245413 srai s0,s0,0x2
|
||||
800007fc: 00000493 li s1,0
|
||||
80000800: 00078913 mv s2,a5
|
||||
80000804: 04849263 bne s1,s0,80000848 <__libc_init_array+0x78>
|
||||
80000808: 871ff0ef jal ra,80000078 <_init>
|
||||
8000080c: 00000797 auipc a5,0x0
|
||||
80000810: 06c78793 addi a5,a5,108 # 80000878 <__init_array_end>
|
||||
80000814: 00000417 auipc s0,0x0
|
||||
80000818: 06440413 addi s0,s0,100 # 80000878 <__init_array_end>
|
||||
8000081c: 40f40433 sub s0,s0,a5
|
||||
80000820: 40245413 srai s0,s0,0x2
|
||||
80000824: 00000493 li s1,0
|
||||
80000828: 00078913 mv s2,a5
|
||||
8000082c: 02849a63 bne s1,s0,80000860 <__libc_init_array+0x90>
|
||||
80000830: 00c12083 lw ra,12(sp)
|
||||
80000834: 00812403 lw s0,8(sp)
|
||||
80000838: 00412483 lw s1,4(sp)
|
||||
8000083c: 00012903 lw s2,0(sp)
|
||||
80000840: 01010113 addi sp,sp,16
|
||||
80000844: 00008067 ret
|
||||
80000848: 00249793 slli a5,s1,0x2
|
||||
8000084c: 00f907b3 add a5,s2,a5
|
||||
80000850: 0007a783 lw a5,0(a5)
|
||||
80000854: 00148493 addi s1,s1,1
|
||||
80000858: 000780e7 jalr a5
|
||||
8000085c: fa9ff06f j 80000804 <__libc_init_array+0x34>
|
||||
80000860: 00249793 slli a5,s1,0x2
|
||||
80000864: 00f907b3 add a5,s2,a5
|
||||
80000868: 0007a783 lw a5,0(a5)
|
||||
8000086c: 00148493 addi s1,s1,1
|
||||
80000870: 000780e7 jalr a5
|
||||
80000874: fb9ff06f j 8000082c <__libc_init_array+0x5c>
|
||||
|
|
Binary file not shown.
|
@ -1,11 +1,11 @@
|
|||
:0200000480007A
|
||||
:100000001711000013010103170500001305057BFC
|
||||
:10001000970500009385857A1716000013068681E0
|
||||
:100000001711000013018111171500001305058752
|
||||
:100010009715000093858586171600001306069035
|
||||
:1000200063FCC5008322050023A05500130545008D
|
||||
:1000300093854500E3E8C5FE170500001305857F9D
|
||||
:10004000970500009385057F6378B50023200500A0
|
||||
:1000500013054500E36CB5FEEF00806CEF00001265
|
||||
:10006000970000009380400113050000B705008150
|
||||
:1000300093854500E3E8C5FE171500001305058EFE
|
||||
:10004000971500009385858D6378B5002320050002
|
||||
:1000500013054500E36CB5FEEF008077EF00C01795
|
||||
:10006000970000009380400113050000B70500C30E
|
||||
:10007000730020306F0000006780000073110134AE
|
||||
:10008000232211002326310023284100232A510076
|
||||
:10009000232C6100232E7100232081022322910250
|
||||
|
@ -14,7 +14,7 @@
|
|||
:1000C000232421052326310523284105232A510510
|
||||
:1000D000232C6105232E71052320810723229107FC
|
||||
:1000E0002324A1072326B1072328C107232AD107E8
|
||||
:1000F000232CE107232EF107EF00401F832041004E
|
||||
:1000F000232CE107232EF107EF00402C8320410041
|
||||
:100100008321C100032201018322410103238101D4
|
||||
:100110008323C101032401028324410203258102B8
|
||||
:100120008325C1020326010383264103032781039C
|
||||
|
@ -23,113 +23,127 @@
|
|||
:10015000832BC105032C0106832C4106032D810648
|
||||
:10016000832DC106032E0107832E4107032F81072C
|
||||
:0C017000832FC10773110134730020308D
|
||||
:10017C00B70700809387C70773905730B717008075
|
||||
:10018C00938707FB73900734B71700009387078892
|
||||
:10019C007390073073504030B70700C0739017341A
|
||||
:1001AC00B7B700009387071073902730930720226E
|
||||
:1001BC00739037307350301467800000B71700808D
|
||||
:1001CC00938707FB131525003305F5000325050060
|
||||
:1001DC0067800000B717008013152500938707FB75
|
||||
:1001EC003305F5002320B50067800000130101FFE3
|
||||
:1001FC0023261100EF00804EF32730347390371410
|
||||
:10020C00F327103473901714F327203473902714AA
|
||||
:10021C00F3275010739017348320C1001301010190
|
||||
:10022C0067800000B70700809387C707739057302B
|
||||
:10023C00F327303473903714F3272034739027143A
|
||||
:10024C0073101514F3275010739017349307001084
|
||||
:10025C0073B0071093D5350093F5051073A00510F6
|
||||
:10026C00B72700009387078073B00730B7170000DB
|
||||
:10027C009387078873A00730678000003707020058
|
||||
:10028C0073200730170700001307870173105730CE
|
||||
:10029C009306100083270500930600003707020021
|
||||
:1002AC00733007301385060023A0F500678000002B
|
||||
:1002BC003707020073200730170700001307870168
|
||||
:1002CC0073105730930710002320B50093070000DC
|
||||
:1002DC003707020073300730138507006780000072
|
||||
:1002EC00130101FE232E1100232C8100232A9100DF
|
||||
:1002FC002328210123263101F327203463CE071450
|
||||
:10030C00130720006384E704930690006396D710CC
|
||||
:10031C00B71700809387070383A647FC13061000CA
|
||||
:10032C0003A587FA6386C61E6384E622638E061EC7
|
||||
:10033C00032481018320C10183244101032901018C
|
||||
:10034C008329C100130101026F004039F3241034DA
|
||||
:10035C00F3250030732430341306F0029376F4073F
|
||||
:10036C001357C4006386C612130630076396C60A79
|
||||
:10037C00137737006306F724930730006302F724E2
|
||||
:10038C009309100063043703EF004035F327303432
|
||||
:10039C0073903714F327103473901714F327203409
|
||||
:1003AC0073902714F327501073901734B71700006D
|
||||
:1003BC0013574401938617C06304D730938717C82B
|
||||
:1003CC00631CF72CEF00003313090500638409024A
|
||||
:1003DC00EF00C030F327303473903714F327103408
|
||||
:1003EC0073901714F327203473902714F3275010AD
|
||||
:1003FC007390173413545400B7170080938707FB7E
|
||||
:10040C001374C4073304F4002320240193844400A0
|
||||
:10041C00739014346F008002EF00402CF3273034BB
|
||||
:10042C0073903714F327103473901714F327203478
|
||||
:10043C0073902714F3275010739017348320C10145
|
||||
:10044C000324810183244101032901018329C10073
|
||||
:10045C00130101026780000093F7F70F1307700078
|
||||
:10046C00E39CE7FA9307000273A047149307000874
|
||||
:10047C0073B047308320C1010324810183244101DF
|
||||
:10048C00032901018329C1001301010267800000C7
|
||||
:10049C0013777700E312F7F81357D400935724011E
|
||||
:1004AC00B7160080938606FB1377C70793F7C70729
|
||||
:1004BC003307D700B387D7000327070003A607002D
|
||||
:1004CC003705020073200530170500001305850160
|
||||
:1004DC007310553093071000032807009307000092
|
||||
:1004EC003705020073300530639007089357B40149
|
||||
:1004FC001305C001E362F5F23705008093972700DE
|
||||
:10050C001305857BB387A70083A7070067800700C7
|
||||
:10051C001375F50FEF00001DF32710349387470078
|
||||
:10052C00739017346FF09FF183A5C7FAEF00001D8D
|
||||
:10053C009307000873A047309307000273B0471469
|
||||
:10054C00F327103493874700739017346FF01FEF25
|
||||
:10055C001307F0FF23A4E7FAF3271034938747001F
|
||||
:10056C00739017346FF09FEDB70700809387C70720
|
||||
:10057C0073905730F327303473903714F3272034AB
|
||||
:10058C007390271473901414F3275010739017342E
|
||||
:10059C009307001073B0071093D5350093F5051031
|
||||
:1005AC0073A00510B72700009387078073B007303E
|
||||
:1005BC00B71700009387078873A007306FF01FE808
|
||||
:1005CC009359F40093F9F901B33930016FF01FDE40
|
||||
:1005DC0033060601135454001374C407B306D40035
|
||||
:1005EC0023A00601B707020073A00730970700008D
|
||||
:1005FC009387870173905730930610002320C70010
|
||||
:10060C0093060000B707020073B00730B7070080ED
|
||||
:10061C009387C707638C060A73905730F3273034DF
|
||||
:10062C0073903714F3272034739027147390141499
|
||||
:10063C00F3275010739017349307001073B0071002
|
||||
:10064C0093D7350093F7071073A007106FF09FF541
|
||||
:10065C00E37206F9130608006FF0DFF7E37CC8F6C7
|
||||
:10066C00130608006FF01FF7336606016FF09FF654
|
||||
:10067C00334606016FF01FF6E35EC8F4130608005C
|
||||
:10068C006FF05FF5337606016FF0DFF4E35406F597
|
||||
:10069C00130608006FF01FF4EF004004F32730340A
|
||||
:1006AC0073903714F327103473901714F3272034F6
|
||||
:1006BC0073902714F3275010739017346FF01FD1D9
|
||||
:1006CC00EF00C002130905006FF05FD09384440063
|
||||
:1006DC0073901434739057306FF05FD6232E00FE56
|
||||
:1006EC0067800000232CA0FE67800000032500FE1D
|
||||
:1006FC0067800000032540FE678000009307C0FE62
|
||||
:10070C001307F0FF23A0E7002324A0FE23A0B700CB
|
||||
:10071C0067800000130101FF232481002322910034
|
||||
:10072C00170400001304C4089704000093844408C1
|
||||
:10073C00B3848440232021012326110093D4244028
|
||||
:10074C0013090000631099041704000013044406F5
|
||||
:10075C00970400009384C405B3848440EFF01F9188
|
||||
:10076C0093D4244013090000631899028320C1001C
|
||||
:10077C00032481008324410003290100130101019A
|
||||
:10078C006780000083270400130919001304440038
|
||||
:10079C00E78007006FF01FFB832704001309190083
|
||||
:0C07AC0013044400E78007006FF01FFCFE
|
||||
:1007B800DC050080E005008024040080240400801B
|
||||
:1007C8007C06008024040080240400802404008027
|
||||
:1007D800740600802404008024040080240400801F
|
||||
:1007E80090060080240400802404008024040080F3
|
||||
:1007F80084060080240400802404008024040080EF
|
||||
:1008080098060080240400802404008024040080CA
|
||||
:1008180068060080240400802404008024040080EA
|
||||
:080828005C06008000000000E6
|
||||
:10017C00130101FF23248100232611001304050021
|
||||
:10018C0003450500630A050013041400EF00C05F6B
|
||||
:10019C0003450400E31A05FE8320C10003248100FB
|
||||
:1001AC0013010101678000009307F0011307F0FFB2
|
||||
:1001BC009702000093824201F39252307310073B76
|
||||
:1001CC007390073A7390523067800000130101FF5F
|
||||
:1001DC0023261100232481009307F0011307F0FF5D
|
||||
:1001EC009702000093824201F39252307310073B46
|
||||
:1001FC007390073A7390523037140080EF00405CD4
|
||||
:10020C001304C48E1305A00213041400EF00C0578E
|
||||
:10021C0003450400E31A05FEB70700809387C70760
|
||||
:10022C0073905730B7170080938787097390073402
|
||||
:10023C00B7170000938707887390073073504030CE
|
||||
:10024C00B70700C073901734B7B700009387071037
|
||||
:10025C0073902730930720227390373073503014EB
|
||||
:10026C0037140080130444901305A00213041400E7
|
||||
:10027C00EF00805103450400E31A05FE8320C10002
|
||||
:10028C00032481001301010167800000B71700806F
|
||||
:10029C0093878709131525003305F5000325050001
|
||||
:1002AC0067800000B7170080131525009387870916
|
||||
:1002BC003305F5002320B50067800000130101FF12
|
||||
:1002CC0023261100EF00C04BF32730347390371402
|
||||
:1002DC00F327103473901714F327203473902714DA
|
||||
:1002EC00F3275010739017348320C10013010101C0
|
||||
:1002FC0067800000B70700809387C707739057305B
|
||||
:10030C00F327303473903714F32720347390271469
|
||||
:10031C0073101514F32750107390173493070010B3
|
||||
:10032C0073B0071093D5350093F5051073A0051025
|
||||
:10033C00B72700009387078073B00730B71700000A
|
||||
:10034C009387078873A00730678000003707020087
|
||||
:10035C0073200730170700001307870173105730FD
|
||||
:10036C009306100083270500930600003707020050
|
||||
:10037C00733007301385060023A0F500678000005A
|
||||
:10038C003707020073200730170700001307870197
|
||||
:10039C0073105730930710002320B500930700000B
|
||||
:1003AC0037070200733007301385070067800000A1
|
||||
:1003BC00130101FE232E1100232C8100232A91000E
|
||||
:1003CC002328210123263101F327203463CC07088D
|
||||
:1003DC00130720006384E70C930690006394D70402
|
||||
:1003EC003714008013048411832744FC93061000F7
|
||||
:1003FC00032584FA6386D72E6384E72A638E072A43
|
||||
:10040C00032481018320C1018324410103290101BB
|
||||
:10041C008329C100130101026F0080361377770026
|
||||
:10042C006300F714EF00C035F327303473903714A2
|
||||
:10043C00F327103473901714F32720347390271478
|
||||
:10044C00F3275010739017348320C10103248101CA
|
||||
:10045C0083244101032901018329C10013010102F5
|
||||
:10046C006780000093F7F70F13077000E39CE7FA1F
|
||||
:10047C009307000273A047149307000873B047302A
|
||||
:10048C008320C1010324810183244101032901013B
|
||||
:10049C008329C1001301010267800000F32410348A
|
||||
:1004AC00F3250030732430341306F0029376F407EE
|
||||
:1004BC001357C400E384C6F613063007E394C6F65C
|
||||
:1004CC00137737006300F71293073000630CF710B3
|
||||
:1004DC009309100063043703EF00802AF3273034AC
|
||||
:1004EC0073903714F327103473901714F3272034B8
|
||||
:1004FC0073902714F327501073901734B71700001C
|
||||
:10050C0013574401938617C06306D70E938717C8F9
|
||||
:10051C006304F70CEF00C026F327303473903714C4
|
||||
:10052C00F327103473901714F32720347390271487
|
||||
:10053C00F3275010739017346390091C1354540014
|
||||
:10054C00B7170080938787091374C4073304F4002A
|
||||
:10055C002320240193844400739014346FF0DFEE55
|
||||
:10056C001357D40093572401B7160080938686093D
|
||||
:10057C001377C70793F7C7073307D700B387D7009D
|
||||
:10058C000327070003A60700370502007320053078
|
||||
:10059C0017050000130585017310553093071000E3
|
||||
:1005AC00032807009307000037050200733005305D
|
||||
:1005BC00639807169357B4011305C001E364F5E67D
|
||||
:1005CC00371500809397270013058587B387A700FD
|
||||
:1005DC0083A7070067800700EF00801C1309050044
|
||||
:1005EC006FF09FF59359F40093F9F901B339300189
|
||||
:1005FC006FF0DFF0EF00401A130905006FF0DFF326
|
||||
:10060C0063740601130608003705020073200530D9
|
||||
:10061C001705000013058501731055309307100062
|
||||
:10062C002320C70093070000370502007330053004
|
||||
:10063C00370700801307C7076390071493575400BC
|
||||
:10064C0093F7C707B386D70023A006019384440011
|
||||
:10065C0073901434731057306FF01FDF334606015C
|
||||
:10066C006FF09FFA330606016FF01FFA337606011E
|
||||
:10067C006FF09FF9336606016FF01FF9E376C8F847
|
||||
:10068C00130608006FF05FF8E35006F91306080034
|
||||
:10069C006FF09FF7E35AC8F6130608006FF0DFF609
|
||||
:1006AC00EF00000F2324A4FAF3271034938747009C
|
||||
:1006BC00739017346FF05FD98325C4FAEF00C00E26
|
||||
:1006CC009307000873A047309307000273B04714D8
|
||||
:1006DC00F327103493874700739017346FF0DFD6ED
|
||||
:1006EC001375F50FEF00400AF3271034938747007A
|
||||
:1006FC00739017346FF05FD5EF008008F327303418
|
||||
:10070C0073903714F327103473901714F327203495
|
||||
:10071C0073902714F3275010739017346FF01FE267
|
||||
:10072C00B70700809387C70773905730F32730348F
|
||||
:10073C0073903714F3272034739027147390141488
|
||||
:10074C00F3275010739017349307001073B00710F1
|
||||
:10075C0093D7350093F7071073A00710B727000045
|
||||
:10076C009387078073B00730B7170000938707880B
|
||||
:10077C0073A007306FF05FCD731057306FF01FFB15
|
||||
:10078C00232E00FE6F000000232CA0FE67800000CB
|
||||
:10079C00032580FF67800000032500FE67800000B2
|
||||
:1007AC00032540FE678000009307C0FE1307F0FF8F
|
||||
:1007BC0023A0E7002324A0FE23A0B700678000003D
|
||||
:1007CC0067800000130101FF970700009387470A19
|
||||
:1007DC002324810017040000130484093304F4401B
|
||||
:1007EC00232291002320210123261100135424409D
|
||||
:1007FC00930400001389070063928404EFF01F87B1
|
||||
:10080C00970700009387C7061704000013044406DB
|
||||
:10081C003304F4401354244093040000138907005C
|
||||
:10082C00639A84028320C100032481008324410045
|
||||
:10083C000329010013010101678000009397240034
|
||||
:10084C00B307F90083A7070093841400E78007001F
|
||||
:10085C006FF09FFA93972400B307F90083A7070062
|
||||
:0C086C0093841400E78007006FF09FFBEE
|
||||
:100878007006008014060080300400803004008078
|
||||
:100888006806008030040080300400803004008056
|
||||
:10089800800600803004008030040080300400802E
|
||||
:1008A8007806008030040080300400803004008026
|
||||
:1008B800A0060080300400803004008030040080EE
|
||||
:1008C80094060080300400803004008030040080EA
|
||||
:1008D80088060080300400803004008030040080E6
|
||||
:1008E8000C0600802A2A2A20566578526973637696
|
||||
:1008F8002042494F53202A2A2A0A00002A2A2A205D
|
||||
:1009080053757065727669736F72202A2A2A0A00F5
|
||||
:040000058000000077
|
||||
:00000001FF
|
||||
|
|
|
@ -209,11 +209,11 @@ void trap(){
|
|||
case 0x1C: writeValue = max((unsigned int)src, (unsigned int)readValue); break;
|
||||
default: redirectTrap(); return; break;
|
||||
}
|
||||
writeRegister(rd, readValue);
|
||||
if(writeWord(addr, writeValue)){
|
||||
emulationTrapToSupervisorTrap(mepc, mstatus);
|
||||
return;
|
||||
}
|
||||
writeRegister(rd, readValue);
|
||||
csr_write(mepc, mepc + 4);
|
||||
csr_write(mtvec, trapEntry); //Restore mtvec
|
||||
}break;
|
||||
|
|
Loading…
Reference in a new issue