Skip to content

Commit e9ea4b3

Browse files
committed
Merge branch 'master' of https://github.com/milkymist/lm32
2 parents a975039 + 27615ae commit e9ea4b3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/unittests/test_mmu.S

+18
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,24 @@ test_name MMU_USER_MODE_5
299299
calli disable_user_mode
300300
check_r3 0xa00
301301

302+
# writing IE should set PSW bits, too
303+
test_name PSW_IE_1
304+
mvi r1, 0x70
305+
wcsr PSW, r1
306+
mvi r1, 7
307+
wcsr IE, r1
308+
rcsr r3, PSW
309+
wcsr PSW, r0
310+
check_r3 0x77
311+
312+
# writing PSW should set IE bits
313+
test_name PSW_IE_2
314+
mvi r1, 0x27
315+
wcsr PSW, r1
316+
rcsr r3, IE
317+
wcsr PSW, r0
318+
check_r3 7
319+
302320
end
303321

304322
enable_itlb:

0 commit comments

Comments
 (0)