Skip to content

Commit

Permalink
add two more MMU test cases
Browse files Browse the repository at this point in the history
Make sure the three lowest bits in IE are shadowed to the PSW register.

Signed-off-by: Michael Walle <michael@walle.cc>
mwalle committed Feb 24, 2014
1 parent dfd6ca7 commit 27615ae
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/unittests/test_mmu.S
Original file line number Diff line number Diff line change
@@ -299,6 +299,24 @@ test_name MMU_USER_MODE_5
calli disable_user_mode
check_r3 0xa00

# writing IE should set PSW bits, too
test_name PSW_IE_1
mvi r1, 0x70
wcsr PSW, r1
mvi r1, 7
wcsr IE, r1
rcsr r3, PSW
wcsr PSW, r0
check_r3 0x77

# writing PSW should set IE bits
test_name PSW_IE_2
mvi r1, 0x27
wcsr PSW, r1
rcsr r3, IE
wcsr PSW, r0
check_r3 7

end

enable_itlb:

0 comments on commit 27615ae

Please sign in to comment.