revision 396:0738dbc01d95
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 396:0738dbc01d95 |
parent | 395:c473acbde186 |
child | 397:640324505325 |
author | nkeynes |
date | Wed Sep 19 11:22:43 2007 +0000 (16 years ago) |
Add tests for SHLL, SHLR, SHAL, SHAR, ROTL, ROTR, ROTCL and ROTCR
test/Makefile | view | annotate | diff | log | ||
test/sh4/rot.s | view | annotate | diff | log | ||
test/sh4/shl.s | view | annotate | diff | log | ||
test/sh4/testsh4.c | view | annotate | diff | log |
1.1 --- a/test/Makefile Wed Sep 19 10:04:16 2007 +00001.2 +++ b/test/Makefile Wed Sep 19 11:22:43 2007 +00001.3 @@ -75,7 +75,8 @@1.4 sh4/add.so sh4/addc.so sh4/addv.so sh4/and.so sh4/andi.so \1.5 sh4/bf.so sh4/bt.so sh4/cmp.so sh4/cmpstr.so sh4/div0.so \1.6 sh4/div1.so sh4/float.so sh4/fmov.so sh4/ftrc.so sh4/mac.s \1.7 - sh4/shld.so sh4/sub.so sh4/subc.so sh4/xtrct.so \1.8 + sh4/rot.so sh4/shl.so sh4/shld.so sh4/sub.so sh4/subc.so \1.9 + sh4/xtrct.so \1.10 sh4/excslot.so sh4/undef.so1.11 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)1.12 $(SH4OBJCOPY) testsh4 testsh4.bin
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00002.2 +++ b/test/sh4/rot.s Wed Sep 19 11:22:43 2007 +00002.3 @@ -0,0 +1,171 @@2.4 +.section .text2.5 +.include "sh4/inc.s"2.6 +2.7 +.global _test_rot2.8 +_test_rot:2.9 + start_test2.10 +2.11 +test_rotl_1:2.12 + add #1, r122.13 +2.14 + mov.l test_rotl_1_input, r32.15 + mov.l test_rotl_1_result, r42.16 + clrt2.17 + rotl r32.18 + bf test_rotl_1_fail2.19 + cmp/eq r3, r42.20 + bt test_rotl_22.21 +test_rotl_1_fail:2.22 + fail test_rot_str_k2.23 + bra test_rotl_22.24 + nop2.25 +test_rotl_1_input:2.26 + .long 0x94E123232.27 +test_rotl_1_result:2.28 + .long 0x29C246472.29 +2.30 +test_rotl_2:2.31 + add #1, r122.32 + mov.l test_rotl_2_input, r32.33 + mov.l test_rotl_2_result, r42.34 + sett2.35 + rotl r32.36 + bt test_rotl_2_fail2.37 + cmp/eq r3, r42.38 + bt test_rotcl_12.39 +test_rotl_2_fail:2.40 + fail test_rot_str_k2.41 + bra test_rotcl_12.42 + nop2.43 +test_rotl_2_input:2.44 + .long 0x29C246462.45 +test_rotl_2_result:2.46 + .long 0x53848C8C2.47 +2.48 +2.49 +test_rotcl_1:2.50 + add #1, r122.51 +2.52 + mov.l test_rotcl_1_input, r32.53 + mov.l test_rotcl_1_result, r42.54 + clrt2.55 + rotcl r32.56 + bf test_rotcl_1_fail2.57 + cmp/eq r3, r42.58 + bt test_rotcl_22.59 +test_rotcl_1_fail:2.60 + fail test_rot_str_k2.61 + bra test_rotcl_22.62 + nop2.63 +test_rotcl_1_input:2.64 + .long 0x94E123232.65 +test_rotcl_1_result:2.66 + .long 0x29C246462.67 +2.68 +test_rotcl_2:2.69 + add #1, r122.70 + mov.l test_rotcl_2_input, r32.71 + mov.l test_rotcl_2_result, r42.72 + sett2.73 + rotcl r32.74 + bt test_rotcl_2_fail2.75 + cmp/eq r3, r42.76 + bt test_rotr_12.77 +test_rotcl_2_fail:2.78 + fail test_rot_str_k2.79 + bra test_rotr_12.80 + nop2.81 +test_rotcl_2_input:2.82 + .long 0x29C246462.83 +test_rotcl_2_result:2.84 + .long 0x53848C8D2.85 +2.86 +test_rotr_1:2.87 + add #1, r122.88 +2.89 + mov.l test_rotr_1_input, r32.90 + mov.l test_rotr_1_result, r42.91 + clrt2.92 + rotr r32.93 + bf test_rotr_1_fail2.94 + cmp/eq r3, r42.95 + bt test_rotr_22.96 +test_rotr_1_fail:2.97 + fail test_rot_str_k2.98 + bra test_rotr_22.99 + nop2.100 +test_rotr_1_input:2.101 + .long 0x94E123232.102 +test_rotr_1_result:2.103 + .long 0xCA7091912.104 +2.105 +test_rotr_2:2.106 + add #1, r122.107 + mov.l test_rotr_2_input, r32.108 + mov.l test_rotr_2_result, r42.109 + sett2.110 + rotr r32.111 + bt test_rotr_2_fail2.112 + cmp/eq r3, r42.113 + bt test_rotcr_12.114 +test_rotr_2_fail:2.115 + fail test_rot_str_k2.116 + bra test_rotcr_12.117 + nop2.118 +test_rotr_2_input:2.119 + .long 0xC27091922.120 +test_rotr_2_result:2.121 + .long 0x613848C92.122 +2.123 +2.124 +test_rotcr_1:2.125 + add #1, r122.126 +2.127 + mov.l test_rotcr_1_input, r32.128 + mov.l test_rotcr_1_result, r42.129 + clrt2.130 + rotcr r32.131 + bf test_rotcr_1_fail2.132 + cmp/eq r3, r42.133 + bt test_rotcr_22.134 +test_rotcr_1_fail:2.135 + fail test_rot_str_k2.136 + bra test_rotcr_22.137 + nop2.138 +test_rotcr_1_input:2.139 + .long 0x94E123232.140 +test_rotcr_1_result:2.141 + .long 0x4A7091912.142 +2.143 +test_rotcr_2:2.144 + add #1, r122.145 + mov.l test_rotcr_2_input, r32.146 + mov.l test_rotcr_2_result, r42.147 + sett2.148 + rotcr r32.149 + bt test_rotcr_2_fail2.150 + cmp/eq r3, r42.151 + bt test_rot_end2.152 +test_rotcr_2_fail:2.153 + fail test_rot_str_k2.154 + bra test_rot_end2.155 + nop2.156 +test_rotcr_2_input:2.157 + .long 0xC27091922.158 +test_rotcr_2_result:2.159 + .long 0xE13848C92.160 +2.161 +2.162 +2.163 +2.164 +2.165 +test_rot_end:2.166 + end_test test_rot_str_k2.167 +2.168 +test_rot_str:2.169 + .string "ROT"2.170 +2.171 +.align 42.172 +test_rot_str_k:2.173 + .long test_rot_str2.174 +2.175 \ No newline at end of file
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00003.2 +++ b/test/sh4/shl.s Wed Sep 19 11:22:43 2007 +00003.3 @@ -0,0 +1,168 @@3.4 +.section .text3.5 +.include "sh4/inc.s"3.6 +3.7 +.global _test_shl3.8 +_test_shl:3.9 + start_test3.10 +3.11 +test_shll_1:3.12 + add #1, r123.13 +3.14 + mov.l test_shll_1_input, r33.15 + mov.l test_shll_1_result, r43.16 + clrt3.17 + shll r33.18 + bf test_shll_1_fail3.19 + cmp/eq r3, r43.20 + bt test_shll_23.21 +test_shll_1_fail:3.22 + fail test_shl_str_k3.23 + bra test_shll_23.24 + nop3.25 +test_shll_1_input:3.26 + .long 0x94E123233.27 +test_shll_1_result:3.28 + .long 0x29C246463.29 +3.30 +test_shll_2:3.31 + add #1, r123.32 + mov.l test_shll_2_input, r33.33 + mov.l test_shll_2_result, r43.34 + sett3.35 + shll r33.36 + bt test_shll_2_fail3.37 + cmp/eq r3, r43.38 + bt test_shal_13.39 +test_shll_2_fail:3.40 + fail test_shl_str_k3.41 + bra test_shal_13.42 + nop3.43 +test_shll_2_input:3.44 + .long 0x29C246463.45 +test_shll_2_result:3.46 + .long 0x53848C8C3.47 +3.48 +test_shal_1:3.49 + add #1, r123.50 +3.51 + mov.l test_shal_1_input, r33.52 + mov.l test_shal_1_result, r43.53 + clrt3.54 + shal r33.55 + bf test_shal_1_fail3.56 + cmp/eq r3, r43.57 + bt test_shal_23.58 +test_shal_1_fail:3.59 + fail test_shl_str_k3.60 + bra test_shal_23.61 + nop3.62 +test_shal_1_input:3.63 + .long 0x94E123233.64 +test_shal_1_result:3.65 + .long 0x29C246463.66 +3.67 +test_shal_2:3.68 + add #1, r123.69 + mov.l test_shal_2_input, r33.70 + mov.l test_shal_2_result, r43.71 + sett3.72 + shal r33.73 + bt test_shal_2_fail3.74 + cmp/eq r3, r43.75 + bt test_shlr_13.76 +test_shal_2_fail:3.77 + fail test_shl_str_k3.78 + bra test_shlr_13.79 + nop3.80 +test_shal_2_input:3.81 + .long 0x29C246463.82 +test_shal_2_result:3.83 + .long 0x53848C8C3.84 +3.85 +test_shlr_1:3.86 + add #1, r123.87 +3.88 + mov.l test_shlr_1_input, r33.89 + mov.l test_shlr_1_result, r43.90 + clrt3.91 + shlr r33.92 + bf test_shlr_1_fail3.93 + cmp/eq r3, r43.94 + bt test_shlr_23.95 +test_shlr_1_fail:3.96 + fail test_shl_str_k3.97 + bra test_shlr_23.98 + nop3.99 +test_shlr_1_input:3.100 + .long 0x94E123233.101 +test_shlr_1_result:3.102 + .long 0x4A7091913.103 +3.104 +test_shlr_2:3.105 + add #1, r123.106 + mov.l test_shlr_2_input, r33.107 + mov.l test_shlr_2_result, r43.108 + sett3.109 + shlr r33.110 + bt test_shlr_2_fail3.111 + cmp/eq r3, r43.112 + bt test_shar_13.113 +test_shlr_2_fail:3.114 + fail test_shl_str_k3.115 + bra test_shar_13.116 + nop3.117 +test_shlr_2_input:3.118 + .long 0x427091923.119 +test_shlr_2_result:3.120 + .long 0x213848C93.121 +3.122 +3.123 +test_shar_1:3.124 + add #1, r123.125 +3.126 + mov.l test_shar_1_input, r33.127 + mov.l test_shar_1_result, r43.128 + clrt3.129 + shar r33.130 + bf test_shar_1_fail3.131 + cmp/eq r3, r43.132 + bt test_shar_23.133 +test_shar_1_fail:3.134 + fail test_shl_str_k3.135 + bra test_shar_23.136 + nop3.137 +test_shar_1_input:3.138 + .long 0x94E123233.139 +test_shar_1_result:3.140 + .long 0xCA7091913.141 +3.142 +test_shar_2:3.143 + add #1, r123.144 + mov.l test_shar_2_input, r33.145 + mov.l test_shar_2_result, r43.146 + sett3.147 + shar r33.148 + bt test_shar_2_fail3.149 + cmp/eq r3, r43.150 + bt test_shl_end3.151 +test_shar_2_fail:3.152 + fail test_shl_str_k3.153 + bra test_shl_end3.154 + nop3.155 +test_shar_2_input:3.156 + .long 0x427091923.157 +test_shar_2_result:3.158 + .long 0x213848C93.159 +3.160 +3.161 +3.162 +test_shl_end:3.163 + end_test test_shl_str_k3.164 +3.165 +test_shl_str:3.166 + .string "SHL"3.167 +3.168 +.align 43.169 +test_shl_str_k:3.170 + .long test_shl_str3.171 +3.172 \ No newline at end of file
.