Search
lxdream.org :: lxdream/test/sh4/inc.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/inc.s
changeset 228:70adc8ffa8d1
prev226:0eeeb25447d3
next231: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 +0000
1.2 +++ b/test/sh4/inc.s Mon Sep 25 11:13:56 2006 +0000
1.3 @@ -140,6 +140,67 @@
1.4 addc r0, r0
1.5 .endm
1.6
1.7 +.macro clearbl
1.8 +LOCAL L1
1.9 +LOCAL L2
1.10 + mov.l L1, r0
1.11 + stc sr, r1
1.12 + and r0, r1
1.13 + ldc r1, sr
1.14 + bra L2
1.15 + nop
1.16 +.align 4
1.17 +L1: .long 0xEFFFFFFF
1.18 +L2:
1.19 +.endm
1.20 +
1.21 +.macro setbl
1.22 +LOCAL L1
1.23 +LOCAL L2
1.24 + xor r0, r0
1.25 + add #1, r0
1.26 + shll r0, 28
1.27 + stc sr, r1
1.28 + or r0, r1
1.29 + ldc r1, sr
1.30 + bra L2
1.31 + nop
1.32 +.align 4
1.33 +L1: .long 0x10000000
1.34 +L2:
1.35 +.endm
1.36 +
1.37 +.macro expect_exc code
1.38 +LOCAL L1, L2, L3
1.39 + mov.l L1, r3
1.40 + mov.l L2, r4
1.41 + jsr @r3
1.42 + nop
1.43 + bra L3
1.44 + nop
1.45 +.align 4
1.46 +L1: .long _expect_exception
1.47 +L2: .long \code
1.48 +L3:
1.49 +
1.50 +.endm
1.51 +
1.52 +.macro assert_exc_caught testname, expectpc
1.53 +LOCAL L1, L2
1.54 + mov.l L1, r3
1.55 + mov.l \testname, r4
1.56 + mov r12, r5
1.57 + mov.l L2, r6
1.58 + jsr @r3
1.59 + nop
1.60 + add r0, r13
1.61 + bra L3
1.62 + nop
1.63 +.align 4
1.64 +L1: .long _assert_exception_caught
1.65 +L2: .long \expectpc
1.66 +L3:
1.67 +.endm
1.68
1.69 .align 2
1.70 assert_t_set_message:
.