filename | test/sh4/inc.s |
changeset | 228:70adc8ffa8d1 |
prev | 226:0eeeb25447d3 |
next | 231:a9e61a96a885 |
author | nkeynes |
date | Mon Sep 25 11:13:56 2006 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Commit BF tests and initial exception handler |
file | annotate | diff | log | raw |
1.1 --- a/test/sh4/inc.s Sat Sep 23 10:35:29 2006 +00001.2 +++ b/test/sh4/inc.s Mon Sep 25 11:13:56 2006 +00001.3 @@ -140,6 +140,67 @@1.4 addc r0, r01.5 .endm1.7 +.macro clearbl1.8 +LOCAL L11.9 +LOCAL L21.10 + mov.l L1, r01.11 + stc sr, r11.12 + and r0, r11.13 + ldc r1, sr1.14 + bra L21.15 + nop1.16 +.align 41.17 +L1: .long 0xEFFFFFFF1.18 +L2:1.19 +.endm1.20 +1.21 +.macro setbl1.22 +LOCAL L11.23 +LOCAL L21.24 + xor r0, r01.25 + add #1, r01.26 + shll r0, 281.27 + stc sr, r11.28 + or r0, r11.29 + ldc r1, sr1.30 + bra L21.31 + nop1.32 +.align 41.33 +L1: .long 0x100000001.34 +L2:1.35 +.endm1.36 +1.37 +.macro expect_exc code1.38 +LOCAL L1, L2, L31.39 + mov.l L1, r31.40 + mov.l L2, r41.41 + jsr @r31.42 + nop1.43 + bra L31.44 + nop1.45 +.align 41.46 +L1: .long _expect_exception1.47 +L2: .long \code1.48 +L3:1.49 +1.50 +.endm1.51 +1.52 +.macro assert_exc_caught testname, expectpc1.53 +LOCAL L1, L21.54 + mov.l L1, r31.55 + mov.l \testname, r41.56 + mov r12, r51.57 + mov.l L2, r61.58 + jsr @r31.59 + nop1.60 + add r0, r131.61 + bra L31.62 + nop1.63 +.align 41.64 +L1: .long _assert_exception_caught1.65 +L2: .long \expectpc1.66 +L3:1.67 +.endm1.69 .align 21.70 assert_t_set_message:
.