mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-23 05:17:20 -04:00
Improved testing of pmd in priv.
This commit is contained in:
parent
46b83ad6a4
commit
f9d3944cc5
1 changed files with 12 additions and 0 deletions
|
@ -27,6 +27,18 @@
|
|||
#include "WALLY-init-lib.h"
|
||||
|
||||
main:
|
||||
# Tests sret in machine mode
|
||||
la t1, sretdone
|
||||
csrw sepc, t1
|
||||
sret
|
||||
sretdone:
|
||||
addi t2, x0, 42
|
||||
|
||||
# switch to user mode
|
||||
li a0, 0
|
||||
ecall
|
||||
sret #should be treated as illegal instruction
|
||||
mret #mret in user mode and should be illegal
|
||||
|
||||
# switch to supervisor mode
|
||||
li a0, 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue