Search
lxdream.org :: lxdream/test/sh4/shl.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/shl.s
changeset 396:0738dbc01d95
author nkeynes
date Fri Dec 02 18:18:04 2011 +1000 (12 years ago)
permissions -rw-r--r--
last change SH4 shadow-mode tweaks
- Fix exceptions generated by the translator to account for the excepting
instruction(s) in the cycle counts.
- Compare floating point regs bitwise rather than with FP comparisons
(otherwise can fail due to nan != nan)
- Dump the translated block when we abort with an inconsistency
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/sh4/shl.s Fri Dec 02 18:18:04 2011 +1000
1.3 @@ -0,0 +1,168 @@
1.4 +.section .text
1.5 +.include "sh4/inc.s"
1.6 +
1.7 +.global _test_shl
1.8 +_test_shl:
1.9 + start_test
1.10 +
1.11 +test_shll_1:
1.12 + add #1, r12
1.13 +
1.14 + mov.l test_shll_1_input, r3
1.15 + mov.l test_shll_1_result, r4
1.16 + clrt
1.17 + shll r3
1.18 + bf test_shll_1_fail
1.19 + cmp/eq r3, r4
1.20 + bt test_shll_2
1.21 +test_shll_1_fail:
1.22 + fail test_shl_str_k
1.23 + bra test_shll_2
1.24 + nop
1.25 +test_shll_1_input:
1.26 + .long 0x94E12323
1.27 +test_shll_1_result:
1.28 + .long 0x29C24646
1.29 +
1.30 +test_shll_2:
1.31 + add #1, r12
1.32 + mov.l test_shll_2_input, r3
1.33 + mov.l test_shll_2_result, r4
1.34 + sett
1.35 + shll r3
1.36 + bt test_shll_2_fail
1.37 + cmp/eq r3, r4
1.38 + bt test_shal_1
1.39 +test_shll_2_fail:
1.40 + fail test_shl_str_k
1.41 + bra test_shal_1
1.42 + nop
1.43 +test_shll_2_input:
1.44 + .long 0x29C24646
1.45 +test_shll_2_result:
1.46 + .long 0x53848C8C
1.47 +
1.48 +test_shal_1:
1.49 + add #1, r12
1.50 +
1.51 + mov.l test_shal_1_input, r3
1.52 + mov.l test_shal_1_result, r4
1.53 + clrt
1.54 + shal r3
1.55 + bf test_shal_1_fail
1.56 + cmp/eq r3, r4
1.57 + bt test_shal_2
1.58 +test_shal_1_fail:
1.59 + fail test_shl_str_k
1.60 + bra test_shal_2
1.61 + nop
1.62 +test_shal_1_input:
1.63 + .long 0x94E12323
1.64 +test_shal_1_result:
1.65 + .long 0x29C24646
1.66 +
1.67 +test_shal_2:
1.68 + add #1, r12
1.69 + mov.l test_shal_2_input, r3
1.70 + mov.l test_shal_2_result, r4
1.71 + sett
1.72 + shal r3
1.73 + bt test_shal_2_fail
1.74 + cmp/eq r3, r4
1.75 + bt test_shlr_1
1.76 +test_shal_2_fail:
1.77 + fail test_shl_str_k
1.78 + bra test_shlr_1
1.79 + nop
1.80 +test_shal_2_input:
1.81 + .long 0x29C24646
1.82 +test_shal_2_result:
1.83 + .long 0x53848C8C
1.84 +
1.85 +test_shlr_1:
1.86 + add #1, r12
1.87 +
1.88 + mov.l test_shlr_1_input, r3
1.89 + mov.l test_shlr_1_result, r4
1.90 + clrt
1.91 + shlr r3
1.92 + bf test_shlr_1_fail
1.93 + cmp/eq r3, r4
1.94 + bt test_shlr_2
1.95 +test_shlr_1_fail:
1.96 + fail test_shl_str_k
1.97 + bra test_shlr_2
1.98 + nop
1.99 +test_shlr_1_input:
1.100 + .long 0x94E12323
1.101 +test_shlr_1_result:
1.102 + .long 0x4A709191
1.103 +
1.104 +test_shlr_2:
1.105 + add #1, r12
1.106 + mov.l test_shlr_2_input, r3
1.107 + mov.l test_shlr_2_result, r4
1.108 + sett
1.109 + shlr r3
1.110 + bt test_shlr_2_fail
1.111 + cmp/eq r3, r4
1.112 + bt test_shar_1
1.113 +test_shlr_2_fail:
1.114 + fail test_shl_str_k
1.115 + bra test_shar_1
1.116 + nop
1.117 +test_shlr_2_input:
1.118 + .long 0x42709192
1.119 +test_shlr_2_result:
1.120 + .long 0x213848C9
1.121 +
1.122 +
1.123 +test_shar_1:
1.124 + add #1, r12
1.125 +
1.126 + mov.l test_shar_1_input, r3
1.127 + mov.l test_shar_1_result, r4
1.128 + clrt
1.129 + shar r3
1.130 + bf test_shar_1_fail
1.131 + cmp/eq r3, r4
1.132 + bt test_shar_2
1.133 +test_shar_1_fail:
1.134 + fail test_shl_str_k
1.135 + bra test_shar_2
1.136 + nop
1.137 +test_shar_1_input:
1.138 + .long 0x94E12323
1.139 +test_shar_1_result:
1.140 + .long 0xCA709191
1.141 +
1.142 +test_shar_2:
1.143 + add #1, r12
1.144 + mov.l test_shar_2_input, r3
1.145 + mov.l test_shar_2_result, r4
1.146 + sett
1.147 + shar r3
1.148 + bt test_shar_2_fail
1.149 + cmp/eq r3, r4
1.150 + bt test_shl_end
1.151 +test_shar_2_fail:
1.152 + fail test_shl_str_k
1.153 + bra test_shl_end
1.154 + nop
1.155 +test_shar_2_input:
1.156 + .long 0x42709192
1.157 +test_shar_2_result:
1.158 + .long 0x213848C9
1.159 +
1.160 +
1.161 +
1.162 +test_shl_end:
1.163 + end_test test_shl_str_k
1.164 +
1.165 +test_shl_str:
1.166 + .string "SHL"
1.167 +
1.168 +.align 4
1.169 +test_shl_str_k:
1.170 + .long test_shl_str
1.171 +
1.172 \ No newline at end of file
.