Search
lxdream.org :: lxdream/test/sh4/xtrct.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/xtrct.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/xtrct.s Wed Sep 19 09:13:08 2007 +0000
1.3 @@ -0,0 +1,60 @@
1.4 +.section .text
1.5 +.include "sh4/inc.s"
1.6 +
1.7 +.global _test_xtrct
1.8 +_test_xtrct:
1.9 + start_test
1.10 +
1.11 +test_xtrct_1:
1.12 + add #1, r12
1.13 +
1.14 + mov.l test_xtrct_1_input_1, r3
1.15 + mov.l test_xtrct_1_input_2, r4
1.16 + mov r4, r5
1.17 + xtrct r3, r4
1.18 + xtrct r5, r3
1.19 + mov.l test_xtrct_1_result_1, r0
1.20 + mov.l test_xtrct_1_result_2, r1
1.21 + cmp/eq r0, r4
1.22 + bf test_xtrct_1_fail
1.23 + cmp/eq r1, r3
1.24 + bt test_xtrct_2
1.25 +test_xtrct_1_fail:
1.26 + fail test_xtrct_str_k
1.27 + bra test_xtrct_2
1.28 + nop
1.29 +test_xtrct_1_input_1:
1.30 + .long 0x12345678
1.31 +test_xtrct_1_input_2:
1.32 + .long 0x9ABCDEF0
1.33 +test_xtrct_1_result_1:
1.34 + .long 0x56789ABC
1.35 +test_xtrct_1_result_2:
1.36 + .long 0xDEF01234
1.37 +
1.38 +test_xtrct_2:
1.39 + add #1, r12
1.40 +
1.41 + mov.l test_xtrct_2_input, r3
1.42 + xtrct r3, r3
1.43 + mov.l test_xtrct_2_result, r4
1.44 + cmp/eq r3, r3
1.45 + bt test_xtrct_end
1.46 + fail test_xtrct_str_k
1.47 + bra test_xtrct_end
1.48 + nop
1.49 +test_xtrct_2_input:
1.50 + .long 0x2143546A
1.51 +test_xtrct_2_result:
1.52 + .long 0x546A2143
1.53 +
1.54 +test_xtrct_end:
1.55 + end_test test_xtrct_str_k
1.56 +
1.57 +test_xtrct_str:
1.58 + .string "XTRCT"
1.59 +
1.60 +.align 4
1.61 +test_xtrct_str_k:
1.62 + .long test_xtrct_str
1.63 +
1.64 \ No newline at end of file
.