filename | test/sh4/inc.s |
changeset | 233:f8333b94f503 |
prev | 231:a9e61a96a885 |
next | 357:3592a10b3242 |
author | nkeynes |
date | Sat Jan 06 04:08:11 2007 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Add test for NTSC timing, retrace/scanline events |
file | annotate | diff | log | raw |
1.1 --- a/test/sh4/inc.s Tue Sep 26 11:05:38 2006 +00001.2 +++ b/test/sh4/inc.s Sat Jan 06 04:08:11 2007 +00001.3 @@ -140,6 +140,25 @@1.4 addc r0, r01.5 .endm1.7 +! Switch to user-mode1.8 +.macro usermode1.9 + stc sr, r01.10 + mov #64, r11.11 + mov #24, r21.12 + shld r2, r11.13 + not r1, r11.14 + and r0, r11.15 + ldc r1, sr1.16 +.endm1.17 +1.18 +! Switch to system-mode1.19 +! NB: implemented as a trap to the interrupt handler, as obviously1.20 +! we can't just update SR...1.21 +.macro systemmode1.22 + trapa #421.23 + nop1.24 +.endm1.25 +1.26 .macro clearbl1.27 LOCAL L11.28 LOCAL L2
.