Search
lxdream.org :: lxdream/test/sh4/cmp.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/cmp.s
changeset 231:a9e61a96a885
author nkeynes
date Tue Sep 26 11:05:38 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Add BT, BT/S, CMP/EQ, CMP/GE, CMP/GT, CMP/HI, CMP/HS tests
Add general slot-illegal exception test
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/sh4/cmp.s Tue Sep 26 11:05:38 2006 +0000
1.3 @@ -0,0 +1,198 @@
1.4 +.section .text
1.5 +.include "sh4/inc.s"
1.6 +!
1.7 +! Test cmp/xx
1.8 +
1.9 +.global _test_cmp
1.10 +_test_cmp:
1.11 + start_test
1.12 +
1.13 +test_cmpeq_1: ! CMP/EQ 0, 0
1.14 + add #1, r12
1.15 + xor r0, r0
1.16 + xor r1, r1
1.17 + cmp/eq r0, r1
1.18 + bt test_cmpeq_2
1.19 + fail test_cmpeq_str_k
1.20 +
1.21 +test_cmpeq_2: ! CMP/EQ !0, 0
1.22 + add #1, r12
1.23 + mov #50, r2
1.24 + cmp/eq r1, r2
1.25 + bf test_cmpeq_3
1.26 + fail test_cmpeq_str_k
1.27 +
1.28 +test_cmpeq_3: ! CMP/EQ -50, 50
1.29 + add #1, r12
1.30 + mov #-50, r3
1.31 + cmp/eq r3, r2
1.32 + bf test_cmpeq_4
1.33 + fail test_cmpeq_str_k
1.34 +
1.35 +test_cmpeq_4: ! CMP/EQ 50, 50
1.36 + add #1, r12
1.37 + mov #50, r6
1.38 + cmp/eq r6, r2
1.39 + bt test_cmpeq_5
1.40 + fail test_cmpeq_str_k
1.41 +
1.42 +test_cmpeq_5:
1.43 +
1.44 +test_cmpeq_6:
1.45 +
1.46 +test_cmpge_1:
1.47 + add #1, r12
1.48 + cmp/ge r2, r6
1.49 + bt test_cmpge_2
1.50 + fail test_cmpge_str_k
1.51 +
1.52 +test_cmpge_2:
1.53 + add #1, r12
1.54 + cmp/ge r3, r2
1.55 + bt test_cmpge_3
1.56 + fail test_cmpge_str_k
1.57 +
1.58 +test_cmpge_3:
1.59 + add #1, r12
1.60 + cmp/ge r2, r3
1.61 + bf test_cmpge_4
1.62 + fail test_cmpge_str_k
1.63 +
1.64 +test_cmpge_4:
1.65 + add #1, r12
1.66 + mov #75, r5
1.67 + cmp/ge r2, r5
1.68 + bt test_cmpge_5
1.69 + fail test_cmpge_str_k
1.70 +
1.71 +test_cmpge_5:
1.72 + add #1, r12
1.73 + cmp/ge r5, r2
1.74 + bf test_cmpgt_1
1.75 + fail test_cmpge_str_k
1.76 +
1.77 +test_cmpgt_1:
1.78 + add #1, r12
1.79 + cmp/gt r2, r6
1.80 + bf test_cmpgt_2
1.81 + fail test_cmpgt_str_k
1.82 +
1.83 +test_cmpgt_2:
1.84 + add #1, r12
1.85 + cmp/gt r3, r2
1.86 + bt test_cmpgt_3
1.87 + fail test_cmpgt_str_k
1.88 +
1.89 +test_cmpgt_3:
1.90 + add #1, r12
1.91 + cmp/gt r2, r3
1.92 + bf test_cmpgt_4
1.93 + fail test_cmpgt_str_k
1.94 +
1.95 +test_cmpgt_4:
1.96 + add #1, r12
1.97 + mov #75, r5
1.98 + cmp/gt r2, r5
1.99 + bt test_cmpgt_5
1.100 + fail test_cmpgt_str_k
1.101 +
1.102 +test_cmpgt_5:
1.103 + add #1, r12
1.104 + cmp/gt r5, r2
1.105 + bf test_cmphi_1
1.106 + fail test_cmpgt_str_k
1.107 +
1.108 +
1.109 +test_cmphi_1:
1.110 + add #1, r12
1.111 + cmp/hi r2, r6
1.112 + bf test_cmphi_2
1.113 + fail test_cmphi_str_k
1.114 +
1.115 +test_cmphi_2:
1.116 + add #1, r12
1.117 + cmp/hi r3, r2
1.118 + bf test_cmphi_3
1.119 + fail test_cmphi_str_k
1.120 +
1.121 +test_cmphi_3:
1.122 + add #1, r12
1.123 + cmp/hi r2, r3
1.124 + bt test_cmphi_4
1.125 + fail test_cmphi_str_k
1.126 +
1.127 +test_cmphi_4:
1.128 + add #1, r12
1.129 + mov #75, r5
1.130 + cmp/hi r2, r5
1.131 + bt test_cmphi_5
1.132 + fail test_cmphi_str_k
1.133 +
1.134 +test_cmphi_5:
1.135 + add #1, r12
1.136 + cmp/hi r5, r2
1.137 + bf test_cmphs_1
1.138 + fail test_cmphi_str_k
1.139 +
1.140 +test_cmphs_1:
1.141 + add #1, r12
1.142 + cmp/hs r2, r6
1.143 + bt test_cmphs_2
1.144 + fail test_cmphs_str_k
1.145 +
1.146 +test_cmphs_2:
1.147 + add #1, r12
1.148 + cmp/hs r3, r2
1.149 + bf test_cmphs_3
1.150 + fail test_cmphs_str_k
1.151 +
1.152 +test_cmphs_3:
1.153 + add #1, r12
1.154 + cmp/hs r2, r3
1.155 + bt test_cmphs_4
1.156 + fail test_cmphs_str_k
1.157 +
1.158 +test_cmphs_4:
1.159 + add #1, r12
1.160 + mov #75, r5
1.161 + cmp/hs r2, r5
1.162 + bt test_cmphs_5
1.163 + fail test_cmphs_str_k
1.164 +
1.165 +test_cmphs_5:
1.166 + add #1, r12
1.167 + cmp/hs r5, r2
1.168 + bf test_cmppl_1
1.169 + fail test_cmphs_str_k
1.170 +
1.171 +test_cmppl_1:
1.172 +
1.173 +test_cmp_end:
1.174 + end_test test_cmp_str_k
1.175 +test_cmpeq_str:
1.176 + .string "CMP/EQ"
1.177 +test_cmpge_str:
1.178 + .string "CMP/GE"
1.179 +test_cmpgt_str:
1.180 + .string "CMP/GT"
1.181 +test_cmphi_str:
1.182 + .string "CMP/HI"
1.183 +test_cmphs_str:
1.184 + .string "CMP/HS"
1.185 +test_cmp_str:
1.186 + .string "CMP"
1.187 +
1.188 +.align 4
1.189 +test_cmp_str_k:
1.190 + .long test_cmp_str
1.191 +test_cmpeq_str_k:
1.192 + .long test_cmpeq_str
1.193 +test_cmpge_str_k:
1.194 + .long test_cmpge_str
1.195 +test_cmpgt_str_k:
1.196 + .long test_cmpgt_str
1.197 +test_cmphi_str_k:
1.198 + .long test_cmphi_str
1.199 +test_cmphs_str_k:
1.200 + .long test_cmphs_str
1.201 +
1.202 \ No newline at end of file
.