mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Add coverage of FIOM in different privelege modes
This commit is contained in:
parent
12b2baff82
commit
82d9467eea
@ -37,4 +37,31 @@ main:
|
||||
csrrw t1, menvcfg, t0
|
||||
csrrw t2, senvcfg, t0
|
||||
|
||||
# testing FIOM with different privelege modes
|
||||
# setting environment config (to both 1 and 0) in each privelege mode
|
||||
csrsi menvcfg, 1
|
||||
li a0, 1
|
||||
ecall # enter supervisor mode
|
||||
|
||||
li a0, 0
|
||||
ecall # enter user mode
|
||||
|
||||
li a0, 1
|
||||
ecall # enter supervisor mode
|
||||
|
||||
csrsi senvcfg, 1
|
||||
li a0, 0
|
||||
ecall # enter user mode
|
||||
|
||||
li a0, 3
|
||||
ecall # enter machine mode
|
||||
csrci menvcfg, 1
|
||||
|
||||
li a0, 1
|
||||
ecall # enter supervisor mode
|
||||
|
||||
li a0, 0
|
||||
ecall # enter user mode
|
||||
|
||||
|
||||
j done
|
||||
|
Loading…
Reference in New Issue
Block a user