mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-23 21:14:37 +00:00
Improved testing of pmd in priv.
This commit is contained in:
parent
46b83ad6a4
commit
f9d3944cc5
@ -27,6 +27,18 @@
|
|||||||
#include "WALLY-init-lib.h"
|
#include "WALLY-init-lib.h"
|
||||||
|
|
||||||
main:
|
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
|
# switch to supervisor mode
|
||||||
li a0, 1
|
li a0, 1
|
||||||
|
Loading…
Reference in New Issue
Block a user