Search
lxdream.org :: lxdream/test/sh4/subc.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/subc.s
changeset 393:5e5335b61373
author nkeynes
date Wed Sep 19 09:13:08 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Add tests for SUB, SUBC and XTRCT
Add rounding tests for FTRC
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/sh4/subc.s Wed Sep 19 09:13:08 2007 +0000
1.3 @@ -0,0 +1,83 @@
1.4 +.section .text
1.5 +.include "sh4/inc.s"
1.6 +
1.7 +.global _test_subc
1.8 +_test_subc:
1.9 + start_test
1.10 +
1.11 +test_subc_1: ! test subing 0+0 = 0
1.12 + add #1, r12
1.13 +
1.14 + xor r3, r3
1.15 + clrt
1.16 + subc r3, r3
1.17 + bt test_subc_1_fail
1.18 + tst r3, r3
1.19 + bt test_subc_2
1.20 +test_subc_1_fail:
1.21 + fail test_subc_str_k
1.22 +
1.23 +test_subc_2: ! test subing 0+0+T = -1
1.24 + add #1, r12
1.25 +
1.26 + xor r3, r3
1.27 + sett
1.28 + subc r3, r3
1.29 + bf test_subc_2_fail
1.30 + mov.l test_subc_2_result, r2
1.31 + cmp/eq r2, r3
1.32 + bt test_subc_3
1.33 +test_subc_2_fail:
1.34 + fail test_subc_str_k
1.35 + bra test_subc_3
1.36 + nop
1.37 +test_subc_2_result:
1.38 + .long 0xFFFFFFFF
1.39 +test_subc_3:
1.40 + add #1, r12
1.41 +
1.42 + xor r3, r3
1.43 + mov.l test_subc_3_input, r2
1.44 + clrt
1.45 + subc r2, r3
1.46 + bf test_subc_3_fail
1.47 + mov.l test_subc_3_result, r1
1.48 + cmp/eq r1, r3
1.49 + bt test_subc_4
1.50 +test_subc_3_fail:
1.51 + fail test_subc_str_k
1.52 + bra test_subc_4
1.53 + nop
1.54 +test_subc_3_input:
1.55 + .long 0x00000001
1.56 +test_subc_3_result:
1.57 + .long 0xFFFFFFFF
1.58 +
1.59 +test_subc_4:
1.60 + add #1, r12
1.61 +
1.62 + xor r3, r3
1.63 + mov.l test_subc_4_input, r2
1.64 + sett
1.65 + subc r3, r2
1.66 + bt test_subc_4_fail
1.67 + tst r2, r2
1.68 + bt test_subc_5
1.69 +test_subc_4_fail:
1.70 + fail test_subc_str_k
1.71 + bra test_subc_5
1.72 + nop
1.73 +test_subc_4_input:
1.74 + .long 0x00000001
1.75 +
1.76 +test_subc_5:
1.77 +test_subc_end:
1.78 + end_test test_subc_str_k
1.79 +
1.80 +test_subc_str:
1.81 + .string "SUBC"
1.82 +
1.83 +.align 4
1.84 +test_subc_str_k:
1.85 + .long test_subc_str
1.86 +
1.87 \ No newline at end of file
.