Add more delegation tests

Reduce dcache test duration
This commit is contained in:
Charles Papon 2019-04-05 22:56:12 +02:00
parent acaa931e11
commit ddf0f06834
6 changed files with 217 additions and 146 deletions

View file

@ -32,9 +32,9 @@ Disassembly of section .crt_section:
80000048: 0000a023 sw zero,0(ra) # f5670000 <pass+0x7566ff3c>
8000004c: 00012203 lw tp,0(sp)
80000050: 06429463 bne t0,tp,800000b8 <fail>
80000054: fff30313 addi t1,t1,-1
80000058: 00408093 addi ra,ra,4
8000005c: 00410113 addi sp,sp,4
80000054: ffc30313 addi t1,t1,-4
80000058: 01008093 addi ra,ra,16
8000005c: 01010113 addi sp,sp,16
80000060: 0000500f 0x500f
80000064: fc0316e3 bnez t1,80000030 <test2_repeat>
@ -56,9 +56,9 @@ Disassembly of section .crt_section:
80000098: 0000500f 0x500f
8000009c: 00012203 lw tp,0(sp)
800000a0: 00429c63 bne t0,tp,800000b8 <fail>
800000a4: fff30313 addi t1,t1,-1
800000a8: 00408093 addi ra,ra,4
800000ac: 00410113 addi sp,sp,4
800000a4: ffc30313 addi t1,t1,-4
800000a8: 01008093 addi ra,ra,16
800000ac: 01010113 addi sp,sp,16
800000b0: fc0314e3 bnez t1,80000078 <test3_repeat>
800000b4: 0100006f j 800000c4 <pass>

View file

@ -4,12 +4,12 @@
:10002000130E2000B70067F537F10F90130300405F
:100030009301100093022000B3036300B3817100A9
:10004000B38272002320310023A0000003220100AC
:10005000639442061303F3FF9380400013014100B1
:10005000639442061303C3FF93800001130101015F
:100060000F500000E31603FC130E3000B70067F5D5
:1000700037F10F90130300409301200093023000EA
:10008000B3036300B3817100B382720003220100E5
:100090002320310023A000000F50000003220100A4
:1000A000639C42001303F3FF93804000130141005F
:1000A000639C42001303C3FF93800001130101010D
:1000B000E31403FC6F000001370110F0130141F25B
:1000C0002320C101370110F0130101F223200100A8
:1000D00013000000130000001300000013000000D4

View file

@ -27,9 +27,9 @@ test2_repeat:
sw x0, 0(x1)
lw x4, 0(x2)
bne x5,x4, fail
addi x6, x6, -1
addi x1, x1, 4
addi x2, x2, 4
addi x6, x6, -4
addi x1, x1, 16
addi x2, x2, 16
.word 0x000500F // dcache flush
bnez x6, test2_repeat
@ -50,9 +50,9 @@ test3_repeat:
.word 0x000500F // dcache flush
lw x4, 0(x2)
bne x5,x4, fail
addi x6, x6, -1
addi x1, x1, 4
addi x2, x2, 4
addi x6, x6, -4
addi x1, x1, 16
addi x2, x2, 16
bnez x6, test3_repeat

View file

@ -7,14 +7,14 @@ Disassembly of section .crt_section:
80000000 <_start>:
80000000: 00100e93 li t4,1
80000004: 00000097 auipc ra,0x0
80000008: 68408093 addi ra,ra,1668 # 80000688 <mtrap>
80000008: 6fc08093 addi ra,ra,1788 # 80000700 <mtrap>
8000000c: 30509073 csrw mtvec,ra
80000010: 00000097 auipc ra,0x0
80000014: 6b008093 addi ra,ra,1712 # 800006c0 <strap>
80000014: 72808093 addi ra,ra,1832 # 80000738 <strap>
80000018: 10509073 csrw stvec,ra
8000001c: f00110b7 lui ra,0xf0011
80000020: 00000113 li sp,0
80000024: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010940>
80000024: 0020a023 sw sp,0(ra) # f0011000 <strap+0x700108c8>
80000028 <test1>:
80000028: 00100e13 li t3,1
@ -33,18 +33,18 @@ Disassembly of section .crt_section:
80000054: 01408093 addi ra,ra,20 # 80000064 <test2+0x2c>
80000058: 34109073 csrw mepc,ra
8000005c: 30200073 mret
80000060: 6100006f j 80000670 <fail>
80000060: 6880006f j 800006e8 <fail>
80000064: 00000f17 auipc t5,0x0
80000068: 024f0f13 addi t5,t5,36 # 80000088 <test4>
8000006c: 00000073 ecall
80000070: 6000006f j 80000670 <fail>
80000070: 6780006f j 800006e8 <fail>
80000074 <test3>:
80000074: 00300e13 li t3,3
80000078: 00000f17 auipc t5,0x0
8000007c: 010f0f13 addi t5,t5,16 # 80000088 <test4>
80000080: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff>
80000084: 5ec0006f j 80000670 <fail>
80000084: 6640006f j 800006e8 <fail>
80000088 <test4>:
80000088: 00400e13 li t3,4
@ -58,11 +58,11 @@ Disassembly of section .crt_section:
800000a8: 01408093 addi ra,ra,20 # 800000b8 <test4+0x30>
800000ac: 34109073 csrw mepc,ra
800000b0: 30200073 mret
800000b4: 5bc0006f j 80000670 <fail>
800000b4: 6340006f j 800006e8 <fail>
800000b8: 00000f17 auipc t5,0x0
800000bc: 010f0f13 addi t5,t5,16 # 800000c8 <test5>
800000c0: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff>
800000c4: 5ac0006f j 80000670 <fail>
800000c4: 6240006f j 800006e8 <fail>
800000c8 <test5>:
800000c8: 00500e13 li t3,5
@ -75,11 +75,11 @@ Disassembly of section .crt_section:
800000e4: 01408093 addi ra,ra,20 # 800000f4 <test5+0x2c>
800000e8: 34109073 csrw mepc,ra
800000ec: 30200073 mret
800000f0: 5800006f j 80000670 <fail>
800000f0: 5f80006f j 800006e8 <fail>
800000f4: 00000f17 auipc t5,0x0
800000f8: 010f0f13 addi t5,t5,16 # 80000104 <test6>
800000fc: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff>
80000100: 5700006f j 80000670 <fail>
80000100: 5e80006f j 800006e8 <fail>
80000104 <test6>:
80000104: 00600e13 li t3,6
@ -91,7 +91,7 @@ Disassembly of section .crt_section:
80000114: 00000f17 auipc t5,0x0
80000118: 010f0f13 addi t5,t5,16 # 80000124 <test8>
8000011c: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff>
80000120: 5500006f j 80000670 <fail>
80000120: 5c80006f j 800006e8 <fail>
80000124 <test8>:
80000124: 00800e13 li t3,8
@ -107,9 +107,9 @@ Disassembly of section .crt_section:
8000014c: 01408093 addi ra,ra,20 # 8000015c <test8+0x38>
80000150: 34109073 csrw mepc,ra
80000154: 30200073 mret
80000158: 5180006f j 80000670 <fail>
80000158: 5900006f j 800006e8 <fail>
8000015c: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff>
80000160: 5100006f j 80000670 <fail>
80000160: 5880006f j 800006e8 <fail>
80000164 <test9>:
80000164: 00900e13 li t3,9
@ -124,9 +124,9 @@ Disassembly of section .crt_section:
80000188: 01408093 addi ra,ra,20 # 80000198 <test9+0x34>
8000018c: 34109073 csrw mepc,ra
80000190: 30200073 mret
80000194: 4dc0006f j 80000670 <fail>
80000194: 5540006f j 800006e8 <fail>
80000198: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff>
8000019c: 4d40006f j 80000670 <fail>
8000019c: 54c0006f j 800006e8 <fail>
800001a0 <test10>:
800001a0: 00a00e13 li t3,10
@ -134,7 +134,7 @@ Disassembly of section .crt_section:
800001a8: 03cf0f13 addi t5,t5,60 # 800001e0 <test11>
800001ac: f00110b7 lui ra,0xf0011
800001b0: 00000113 li sp,0
800001b4: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010940>
800001b4: 0020a023 sw sp,0(ra) # f0011000 <strap+0x700108c8>
800001b8: 00800093 li ra,8
800001bc: 30009073 csrw mstatus,ra
800001c0: 000010b7 lui ra,0x1
@ -142,9 +142,9 @@ Disassembly of section .crt_section:
800001c8: 30409073 csrw mie,ra
800001cc: f00110b7 lui ra,0xf0011
800001d0: 00100113 li sp,1
800001d4: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010940>
800001d4: 0020a023 sw sp,0(ra) # f0011000 <strap+0x700108c8>
800001d8: 10500073 wfi
800001dc: 4940006f j 80000670 <fail>
800001dc: 50c0006f j 800006e8 <fail>
800001e0 <test11>:
800001e0: 00b00e13 li t3,11
@ -152,7 +152,7 @@ Disassembly of section .crt_section:
800001e8: 068f0f13 addi t5,t5,104 # 8000024c <test12>
800001ec: f00110b7 lui ra,0xf0011
800001f0: 00000113 li sp,0
800001f4: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010940>
800001f4: 0020a023 sw sp,0(ra) # f0011000 <strap+0x700108c8>
800001f8: 00800093 li ra,8
800001fc: 30009073 csrw mstatus,ra
80000200: 000010b7 lui ra,0x1
@ -168,12 +168,12 @@ Disassembly of section .crt_section:
80000228: 01408093 addi ra,ra,20 # 80000238 <test11+0x58>
8000022c: 34109073 csrw mepc,ra
80000230: 30200073 mret
80000234: 43c0006f j 80000670 <fail>
80000234: 4b40006f j 800006e8 <fail>
80000238: f00110b7 lui ra,0xf0011
8000023c: 00100113 li sp,1
80000240: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010940>
80000240: 0020a023 sw sp,0(ra) # f0011000 <strap+0x700108c8>
80000244: 10500073 wfi
80000248: 4280006f j 80000670 <fail>
80000248: 4a00006f j 800006e8 <fail>
8000024c <test12>:
8000024c: 00c00e13 li t3,12
@ -181,7 +181,7 @@ Disassembly of section .crt_section:
80000254: 064f0f13 addi t5,t5,100 # 800002b4 <test14>
80000258: f00110b7 lui ra,0xf0011
8000025c: 00000113 li sp,0
80000260: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010940>
80000260: 0020a023 sw sp,0(ra) # f0011000 <strap+0x700108c8>
80000264: 00800093 li ra,8
80000268: 30009073 csrw mstatus,ra
8000026c: 000010b7 lui ra,0x1
@ -196,12 +196,12 @@ Disassembly of section .crt_section:
80000290: 01408093 addi ra,ra,20 # 800002a0 <test12+0x54>
80000294: 34109073 csrw mepc,ra
80000298: 30200073 mret
8000029c: 3d40006f j 80000670 <fail>
8000029c: 44c0006f j 800006e8 <fail>
800002a0: f00110b7 lui ra,0xf0011
800002a4: 00100113 li sp,1
800002a8: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010940>
800002a8: 0020a023 sw sp,0(ra) # f0011000 <strap+0x700108c8>
800002ac: 10500073 wfi
800002b0: 3c00006f j 80000670 <fail>
800002b0: 4380006f j 800006e8 <fail>
800002b4 <test14>:
800002b4: 00200093 li ra,2
@ -211,7 +211,7 @@ Disassembly of section .crt_section:
800002c4: 040f0f13 addi t5,t5,64 # 80000300 <test15>
800002c8: f00120b7 lui ra,0xf0012
800002cc: 00000113 li sp,0
800002d0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
800002d0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
800002d4: 00200093 li ra,2
800002d8: 30009073 csrw mstatus,ra
800002dc: 20000093 li ra,512
@ -219,7 +219,7 @@ Disassembly of section .crt_section:
800002e4: 00000e93 li t4,0
800002e8: f00120b7 lui ra,0xf0012
800002ec: 00100113 li sp,1
800002f0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
800002f0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
800002f4: 06400093 li ra,100
800002f8: fff08093 addi ra,ra,-1
800002fc: fe104ee3 bgtz ra,800002f8 <test14+0x44>
@ -230,7 +230,7 @@ Disassembly of section .crt_section:
80000308: 068f0f13 addi t5,t5,104 # 8000036c <test16>
8000030c: f00120b7 lui ra,0xf0012
80000310: 00000113 li sp,0
80000314: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
80000314: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000318: 00200093 li ra,2
8000031c: 30009073 csrw mstatus,ra
80000320: 20000093 li ra,512
@ -245,13 +245,13 @@ Disassembly of section .crt_section:
80000344: 01408093 addi ra,ra,20 # 80000354 <test15+0x54>
80000348: 34109073 csrw mepc,ra
8000034c: 30200073 mret
80000350: 3200006f j 80000670 <fail>
80000350: 3980006f j 800006e8 <fail>
80000354: 00100e93 li t4,1
80000358: f00120b7 lui ra,0xf0012
8000035c: 00100113 li sp,1
80000360: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
80000360: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000364: 10500073 wfi
80000368: 3080006f j 80000670 <fail>
80000368: 3800006f j 800006e8 <fail>
8000036c <test16>:
8000036c: 01000e13 li t3,16
@ -259,7 +259,7 @@ Disassembly of section .crt_section:
80000374: 060f0f13 addi t5,t5,96 # 800003d0 <test17>
80000378: f00120b7 lui ra,0xf0012
8000037c: 00000113 li sp,0
80000380: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
80000380: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000384: 00200093 li ra,2
80000388: 30009073 csrw mstatus,ra
8000038c: 20000093 li ra,512
@ -273,12 +273,12 @@ Disassembly of section .crt_section:
800003ac: 01408093 addi ra,ra,20 # 800003bc <test16+0x50>
800003b0: 34109073 csrw mepc,ra
800003b4: 30200073 mret
800003b8: 2b80006f j 80000670 <fail>
800003b8: 3300006f j 800006e8 <fail>
800003bc: f00120b7 lui ra,0xf0012
800003c0: 00100113 li sp,1
800003c4: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
800003c4: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
800003c8: 10500073 wfi
800003cc: 2a40006f j 80000670 <fail>
800003cc: 31c0006f j 800006e8 <fail>
800003d0 <test17>:
800003d0: 01100e13 li t3,17
@ -288,7 +288,7 @@ Disassembly of section .crt_section:
800003e0: 040f0f13 addi t5,t5,64 # 8000041c <test18>
800003e4: f00120b7 lui ra,0xf0012
800003e8: 00000113 li sp,0
800003ec: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
800003ec: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
800003f0: 00200093 li ra,2
800003f4: 30009073 csrw mstatus,ra
800003f8: 20000093 li ra,512
@ -296,7 +296,7 @@ Disassembly of section .crt_section:
80000400: 00000e93 li t4,0
80000404: f00120b7 lui ra,0xf0012
80000408: 00100113 li sp,1
8000040c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
8000040c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000410: 06400093 li ra,100
80000414: fff08093 addi ra,ra,-1
80000418: fe104ee3 bgtz ra,80000414 <test17+0x44>
@ -307,7 +307,7 @@ Disassembly of section .crt_section:
80000424: 068f0f13 addi t5,t5,104 # 80000488 <test19>
80000428: f00120b7 lui ra,0xf0012
8000042c: 00000113 li sp,0
80000430: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
80000430: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000434: 00200093 li ra,2
80000438: 30009073 csrw mstatus,ra
8000043c: 20000093 li ra,512
@ -322,13 +322,13 @@ Disassembly of section .crt_section:
80000460: 01408093 addi ra,ra,20 # 80000470 <test18+0x54>
80000464: 34109073 csrw mepc,ra
80000468: 30200073 mret
8000046c: 2040006f j 80000670 <fail>
8000046c: 27c0006f j 800006e8 <fail>
80000470: 00100e93 li t4,1
80000474: f00120b7 lui ra,0xf0012
80000478: 00100113 li sp,1
8000047c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
8000047c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000480: 10500073 wfi
80000484: 1ec0006f j 80000670 <fail>
80000484: 2640006f j 800006e8 <fail>
80000488 <test19>:
80000488: 01300e13 li t3,19
@ -336,7 +336,7 @@ Disassembly of section .crt_section:
80000490: 060f0f13 addi t5,t5,96 # 800004ec <test20>
80000494: f00120b7 lui ra,0xf0012
80000498: 00000113 li sp,0
8000049c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
8000049c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
800004a0: 00200093 li ra,2
800004a4: 30009073 csrw mstatus,ra
800004a8: 20000093 li ra,512
@ -350,17 +350,17 @@ Disassembly of section .crt_section:
800004c8: 01408093 addi ra,ra,20 # 800004d8 <test19+0x50>
800004cc: 34109073 csrw mepc,ra
800004d0: 30200073 mret
800004d4: 19c0006f j 80000670 <fail>
800004d4: 2140006f j 800006e8 <fail>
800004d8: f00120b7 lui ra,0xf0012
800004dc: 00100113 li sp,1
800004e0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
800004e0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
800004e4: 10500073 wfi
800004e8: 1880006f j 80000670 <fail>
800004e8: 2000006f j 800006e8 <fail>
800004ec <test20>:
800004ec: f00120b7 lui ra,0xf0012
800004f0: 00000113 li sp,0
800004f4: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
800004f4: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
800004f8: 01400e13 li t3,20
800004fc: 00000f17 auipc t5,0x0
80000500: 030f0f13 addi t5,t5,48 # 8000052c <test21>
@ -395,12 +395,12 @@ Disassembly of section .crt_section:
8000056c: 01408093 addi ra,ra,20 # 8000057c <test21+0x50>
80000570: 34109073 csrw mepc,ra
80000574: 30200073 mret
80000578: 0f80006f j 80000670 <fail>
80000578: 1700006f j 800006e8 <fail>
8000057c: 00100e93 li t4,1
80000580: 20000093 li ra,512
80000584: 1440a073 csrs sip,ra
80000588: 10500073 wfi
8000058c: 0e40006f j 80000670 <fail>
8000058c: 15c0006f j 800006e8 <fail>
80000590 <test22>:
80000590: 01600e13 li t3,22
@ -423,81 +423,119 @@ Disassembly of section .crt_section:
800005d4: 01408093 addi ra,ra,20 # 800005e4 <test22+0x54>
800005d8: 34109073 csrw mepc,ra
800005dc: 30200073 mret
800005e0: 0900006f j 80000670 <fail>
800005e0: 1080006f j 800006e8 <fail>
800005e4: 10500073 wfi
800005e8: 0880006f j 80000670 <fail>
800005e8: 1000006f j 800006e8 <fail>
800005ec <test23>:
800005ec: 01700e13 li t3,23
800005f0: 00000e93 li t4,0
800005f4: f00120b7 lui ra,0xf0012
800005f8: 00000113 li sp,0
800005fc: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
800005fc: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000600: 20000093 li ra,512
80000604: 1440b073 csrc sip,ra
80000608: 344021f3 csrr gp,mip
8000060c: f00120b7 lui ra,0xf0012
80000610: 00100113 li sp,1
80000614: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
80000614: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000618: 20000093 li ra,512
8000061c: 1440b073 csrc sip,ra
80000620: 344021f3 csrr gp,mip
80000624: f00120b7 lui ra,0xf0012
80000628: 00000113 li sp,0
8000062c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
8000062c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000630: 20000093 li ra,512
80000634: 1440b073 csrc sip,ra
80000638: 344021f3 csrr gp,mip
8000063c: f00120b7 lui ra,0xf0012
80000640: 00000113 li sp,0
80000644: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
80000644: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000648: 20000093 li ra,512
8000064c: 1440a073 csrs sip,ra
80000650: 344021f3 csrr gp,mip
80000654: f00120b7 lui ra,0xf0012
80000658: 00100113 li sp,1
8000065c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011940>
8000065c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000660: 20000093 li ra,512
80000664: 1440a073 csrs sip,ra
80000668: 344021f3 csrr gp,mip
8000066c: 0100006f j 8000067c <pass>
8000066c: f00120b7 lui ra,0xf0012
80000670: 00000113 li sp,0
80000674: 0020a023 sw sp,0(ra) # f0012000 <strap+0x700118c8>
80000670 <fail>:
80000670: f0100137 lui sp,0xf0100
80000674: f2410113 addi sp,sp,-220 # f00fff24 <strap+0x700ff864>
80000678: 01c12023 sw t3,0(sp)
8000067c <pass>:
8000067c: f0100137 lui sp,0xf0100
80000680: f2010113 addi sp,sp,-224 # f00fff20 <strap+0x700ff860>
80000684: 00012023 sw zero,0(sp)
80000688 <mtrap>:
80000688: fe0e84e3 beqz t4,80000670 <fail>
8000068c: 342020f3 csrr ra,mcause
80000690: 341020f3 csrr ra,mepc
80000694: 300020f3 csrr ra,mstatus
80000698: 343020f3 csrr ra,mbadaddr
8000069c: 08000093 li ra,128
800006a0: 3000b073 csrc mstatus,ra
800006a4: 00200093 li ra,2
800006a8: fc1e8ae3 beq t4,ra,8000067c <pass>
800006ac: 000020b7 lui ra,0x2
800006b0: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800>
800006b4: 3000a073 csrs mstatus,ra
800006b8: 341f1073 csrw mepc,t5
80000678 <test24>:
80000678: 01800e13 li t3,24
8000067c: 00200093 li ra,2
80000680: 3040a073 csrs mie,ra
80000684: 3440a073 csrs mip,ra
80000688: 3000a073 csrs mstatus,ra
8000068c: 00100e93 li t4,1
80000690: 00000f17 auipc t5,0x0
80000694: 03cf0f13 addi t5,t5,60 # 800006cc <test25>
80000698: 000020b7 lui ra,0x2
8000069c: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800>
800006a0: 00001137 lui sp,0x1
800006a4: 80010113 addi sp,sp,-2048 # 800 <_start-0x7ffff800>
800006a8: 3000b073 csrc mstatus,ra
800006ac: 30012073 csrs mstatus,sp
800006b0: 00000097 auipc ra,0x0
800006b4: 01408093 addi ra,ra,20 # 800006c4 <test24_s>
800006b8: 34109073 csrw mepc,ra
800006bc: 30200073 mret
800006c0: 0280006f j 800006e8 <fail>
800006c0 <strap>:
800006c0: fa0e88e3 beqz t4,80000670 <fail>
800006c4: 142020f3 csrr ra,scause
800006c8: 141020f3 csrr ra,sepc
800006cc: 100020f3 csrr ra,sstatus
800006d0: 143020f3 csrr ra,sbadaddr
800006d4: 00000073 ecall
800006d8: 00000013 nop
800006dc: 00000013 nop
800006e0: 00000013 nop
800006e4: 00000013 nop
800006e8: 00000013 nop
800006ec: 00000013 nop
800006c4 <test24_s>:
800006c4: 10500073 wfi
800006c8: 0200006f j 800006e8 <fail>
800006cc <test25>:
800006cc: 01900e13 li t3,25
800006d0: 00000f17 auipc t5,0x0
800006d4: 014f0f13 addi t5,t5,20 # 800006e4 <test26>
800006d8: 30046073 csrsi mstatus,8
800006dc: 10500073 wfi
800006e0: 0080006f j 800006e8 <fail>
800006e4 <test26>:
800006e4: 0100006f j 800006f4 <pass>
800006e8 <fail>:
800006e8: f0100137 lui sp,0xf0100
800006ec: f2410113 addi sp,sp,-220 # f00fff24 <strap+0x700ff7ec>
800006f0: 01c12023 sw t3,0(sp)
800006f4 <pass>:
800006f4: f0100137 lui sp,0xf0100
800006f8: f2010113 addi sp,sp,-224 # f00fff20 <strap+0x700ff7e8>
800006fc: 00012023 sw zero,0(sp)
80000700 <mtrap>:
80000700: fe0e84e3 beqz t4,800006e8 <fail>
80000704: 342020f3 csrr ra,mcause
80000708: 341020f3 csrr ra,mepc
8000070c: 300020f3 csrr ra,mstatus
80000710: 343020f3 csrr ra,mtval
80000714: 08000093 li ra,128
80000718: 3000b073 csrc mstatus,ra
8000071c: 00200093 li ra,2
80000720: fc1e8ae3 beq t4,ra,800006f4 <pass>
80000724: 000020b7 lui ra,0x2
80000728: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800>
8000072c: 3000a073 csrs mstatus,ra
80000730: 341f1073 csrw mepc,t5
80000734: 30200073 mret
80000738 <strap>:
80000738: fa0e88e3 beqz t4,800006e8 <fail>
8000073c: 142020f3 csrr ra,scause
80000740: 141020f3 csrr ra,sepc
80000744: 100020f3 csrr ra,sstatus
80000748: 143020f3 csrr ra,stval
8000074c: 00000073 ecall
80000750: 00000013 nop
80000754: 00000013 nop
80000758: 00000013 nop
8000075c: 00000013 nop
80000760: 00000013 nop
80000764: 00000013 nop

View file

@ -1,48 +1,48 @@
:0200000480007A
:10000000930E10009700000093804068739050306A
:10001000970000009380006B73905010B71001F0B0
:10000000930E1000970000009380C06F73905030E3
:10001000970000009380807273905010B71001F029
:100020001301000023A02000130E1000170F000082
:10003000130FCF0073000000130E2000B720000044
:10004000938000801301000073B0003073200130F2
:1000500097000000938040017390103473002030AB
:100060006F000061170F0000130F4F0273000000B4
:100070006F000060130E3000170F0000130F0F0108
:10008000832010006F00C05E130E4000B7200000F8
:100060006F008068170F0000130F4F02730000002D
:100070006F008067130E3000170F0000130F0F0181
:10008000832010006F004066130E4000B720000070
:1000900093800080371100001301018073B000309D
:1000A000732001309700000093804001739010345A
:1000B000730020306F00C05B170F0000130F0F019B
:1000C000832010006F00C05A130E5000B7200000AC
:1000B000730020306F004063170F0000130F0F0113
:1000C000832010006F004062130E5000B720000024
:1000D000938000801301000073B000307320013062
:1000E000970000009380400173901034730020301B
:1000F0006F000058170F0000130F0F01832010002E
:100100006F000057130E60009300000173902030C1
:1000F0006F00805F170F0000130F0F0183201000A7
:100100006F00805E130E600093000001739020303A
:10011000130E7000170F0000130F0F018320100043
:100120006F000055130E8000170F0000130FCF0350
:100120006F00805C130E8000170F0000130FCF03C9
:10013000B720000093800080371100001301018078
:1001400073B00030732001309700000093804001AD
:1001500073901034730020306F00805183201000A2
:100160006F000051130E9000170F0000130F8F0344
:1001500073901034730020306F000059832010001A
:100160006F008058130E9000170F0000130F8F03BD
:10017000B7200000938000801301000073B00030AE
:100180007320013097000000938040017390103479
:10019000730020306F00C04D832010006F00404D71
:10019000730020306F004055832010006F00C05462
:1001A000130EA000170F0000130FCF03B71001F0BC
:1001B0001301000023A02000930080007390003002
:1001C000B71000009380008073904030B71001F0AA
:1001D0001301100023A02000730050106F0040494D
:1001D0001301100023A02000730050106F00C050C6
:1001E000130EB000170F0000130F8F06B71001F0A9
:1001F0001301000023A020009300800073900030C2
:10020000B71000009380008073904030B72000004A
:1002100093800080371100001301018073B000301B
:1002200073200130970000009380400173901034D8
:10023000730020306F00C043B71001F013011000AD
:1002400023A02000730050106F008042130EC000E6
:10023000730020306F00404BB71001F01301100025
:1002400023A02000730050106F00004A130EC0005E
:10025000170F0000130F4F06B71001F01301000035
:1002600023A020009300800073900030B71000009E
:100270009380008073904030B7200000938000800E
:100280001301000073B000307320013097000000AC
:100290009380400173901034730020306F00403D14
:100290009380400173901034730020306F00C0448D
:1002A000B71001F01301100023A0200073005010BC
:1002B0006F00003C9300200073900010130EE000CC
:1002B0006F0080439300200073900010130EE00045
:1002C000170F0000130F0F04B72001F013010000F7
:1002D00023A02000930020007390003093000020A2
:1002E00073904030930E0000B72001F0130110000E
@ -52,14 +52,14 @@
:100320009300002073904030B7200000938000803D
:10033000371100001301018073B0003073200130C9
:1003400097000000938040017390103473002030B8
:100350006F000032930E1000B72001F0130110005F
:1003600023A02000730050106F008030130E000196
:100350006F008039930E1000B72001F013011000D8
:1003600023A02000730050106F000038130E00010E
:10037000170F0000130F0F06B72001F01301000044
:1003800023A02000930020007390003093000020F1
:1003900073904030B720000093800080130100006C
:1003A00073B000307320013097000000938040014B
:1003B00073901034730020306F00802BB72001F051
:1003C0001301100023A02000730050106F00402A7A
:1003B00073901034730020306F000033B72001F0C9
:1003C0001301100023A02000730050106F00C031F3
:1003D000130E10019300002073903030170F0000AF
:1003E000130F0F04B72001F01301000023A0200019
:1003F00093002000739000309300002073904030F1
@ -69,15 +69,15 @@
:1004300023A0200093002000739000309300002040
:1004400073904030B7200000938000803711000087
:100450001301018073B00030732001309700000059
:100460009380400173901034730020306F0040205F
:100460009380400173901034730020306F00C027D8
:10047000930E1000B72001F01301100023A02000FC
:10048000730050106F00C01E130E3001170F0000D4
:10048000730050106F004026130E3001170F00004C
:10049000130F0F06B72001F01301000023A0200066
:1004A0009300200073900030930000207390403040
:1004B000B7200000938000801301000073B000306B
:1004C0007320013097000000938040017390103436
:1004D000730020306F00C019B72001F01301100025
:1004E00023A02000730050106F008018B72001F087
:1004D000730020306F004021B72001F0130110009D
:1004E00023A02000730050106F000020B72001F0FF
:1004F0001301000023A02000130E4001170F00007D
:10050000130F0F039300200073900030930000201E
:1005100073904030930E00009300002073A04014AD
@ -86,14 +86,14 @@
:10054000930020007390003093000020739040309F
:10055000B720000093800080371100001301018054
:1005600073B0003073200130970000009380400189
:1005700073901034730020306F00800F930E1000C2
:100580009300002073A04014730050106F00400EC1
:1005700073901034730020306F000017930E10003A
:100580009300002073A04014730050106F00C0153A
:10059000130E6001170F0000130F8F05930000204A
:1005A00073B040149300200073900030930000203B
:1005B000739040309300002073A04014B7200000D7
:1005C000938000801301000073B00030732001306D
:1005D0009700000093804001739010347300203026
:1005E0006F000009730050106F008008130E700137
:1005E0006F008010730050106F000010130E700128
:1005F000930E0000B72001F01301000023A020009B
:100600009300002073B04014F3214034B72001F070
:100610001301100023A020009300002073B04014A9
@ -101,14 +101,22 @@
:100630009300002073B04014F3214034B72001F040
:100640001301000023A020009300002073A0401499
:10065000F3214034B72001F01301100023A0200043
:100660009300002073A04014F32140346F00000178
:10067000370110F0130141F22320C101370110F0BE
:10068000130101F223200100E3840EFEF320203445
:10069000F3201034F3200030F320303493000008AE
:1006A00073B0003093002000E38A1EFCB7200000E6
:1006B0009380008073A0003073101F3473002030CB
:1006C000E3880EFAF3202014F3201014F320001016
:1006D000F32030147300000013000000130000002A
:1006E00013000000130000001300000013000000BE
:100660009300002073A04014F3214034B72001F020
:100670001301000023A02000130E8001930020002E
:1006800073A0403073A0403473A00030930E10006C
:10069000170F0000130FCF03B720000093800080D6
:1006A000371100001301018073B000307320013056
:1006B0009700000093804001739010347300203045
:1006C0006F008002730050106F000002130E900143
:1006D000170F0000130F4F017360043073005010A8
:1006E0006F0080006F000001370110F0130141F22C
:1006F0002320C101370110F0130101F22320010072
:10070000E3840EFEF3202034F3201034F320003075
:10071000F32030349300000873B0003093002000C1
:10072000E38A1EFCB72000009380008073A0003095
:1007300073101F3473002030E3880EFAF320201466
:10074000F3201014F3200010F32030147300000085
:10075000130000001300000013000000130000004D
:0807600013000000130000006B
:040000058000000077
:00000001FF

View file

@ -310,7 +310,32 @@ test23: //Test software and hardware setting inettrupt
csrs sip, x1
csrr x3, mip
externalInterruptS(0)
test24: //test supervisor software interrupt
li TEST_ID, 24
li x1, 2
csrs mie, x1
csrs mip, x1
csrs mstatus, x1
li TRAP_OK, 1
la TRAP_RET, test25
setPriv(1)
test24_s:
wfi
j fail
test25: //test undelegated supervisor interrupt in machine mode (continue test24)
li TEST_ID, 25
la TRAP_RET, test26
csrsi mstatus, 1 << 3 //mie
wfi
j fail
test26:
j pass