filename | test/sh4/rot.s |
changeset | 396:0738dbc01d95 |
author | nkeynes |
date | Sun Mar 02 11:38:08 2008 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Bug #59: Add provisional support for all CD read modes (not validated) |
view | annotate | diff | log | raw |
1 .section .text
2 .include "sh4/inc.s"
4 .global _test_rot
5 _test_rot:
6 start_test
8 test_rotl_1:
9 add #1, r12
11 mov.l test_rotl_1_input, r3
12 mov.l test_rotl_1_result, r4
13 clrt
14 rotl r3
15 bf test_rotl_1_fail
16 cmp/eq r3, r4
17 bt test_rotl_2
18 test_rotl_1_fail:
19 fail test_rot_str_k
20 bra test_rotl_2
21 nop
22 test_rotl_1_input:
23 .long 0x94E12323
24 test_rotl_1_result:
25 .long 0x29C24647
27 test_rotl_2:
28 add #1, r12
29 mov.l test_rotl_2_input, r3
30 mov.l test_rotl_2_result, r4
31 sett
32 rotl r3
33 bt test_rotl_2_fail
34 cmp/eq r3, r4
35 bt test_rotcl_1
36 test_rotl_2_fail:
37 fail test_rot_str_k
38 bra test_rotcl_1
39 nop
40 test_rotl_2_input:
41 .long 0x29C24646
42 test_rotl_2_result:
43 .long 0x53848C8C
46 test_rotcl_1:
47 add #1, r12
49 mov.l test_rotcl_1_input, r3
50 mov.l test_rotcl_1_result, r4
51 clrt
52 rotcl r3
53 bf test_rotcl_1_fail
54 cmp/eq r3, r4
55 bt test_rotcl_2
56 test_rotcl_1_fail:
57 fail test_rot_str_k
58 bra test_rotcl_2
59 nop
60 test_rotcl_1_input:
61 .long 0x94E12323
62 test_rotcl_1_result:
63 .long 0x29C24646
65 test_rotcl_2:
66 add #1, r12
67 mov.l test_rotcl_2_input, r3
68 mov.l test_rotcl_2_result, r4
69 sett
70 rotcl r3
71 bt test_rotcl_2_fail
72 cmp/eq r3, r4
73 bt test_rotr_1
74 test_rotcl_2_fail:
75 fail test_rot_str_k
76 bra test_rotr_1
77 nop
78 test_rotcl_2_input:
79 .long 0x29C24646
80 test_rotcl_2_result:
81 .long 0x53848C8D
83 test_rotr_1:
84 add #1, r12
86 mov.l test_rotr_1_input, r3
87 mov.l test_rotr_1_result, r4
88 clrt
89 rotr r3
90 bf test_rotr_1_fail
91 cmp/eq r3, r4
92 bt test_rotr_2
93 test_rotr_1_fail:
94 fail test_rot_str_k
95 bra test_rotr_2
96 nop
97 test_rotr_1_input:
98 .long 0x94E12323
99 test_rotr_1_result:
100 .long 0xCA709191
102 test_rotr_2:
103 add #1, r12
104 mov.l test_rotr_2_input, r3
105 mov.l test_rotr_2_result, r4
106 sett
107 rotr r3
108 bt test_rotr_2_fail
109 cmp/eq r3, r4
110 bt test_rotcr_1
111 test_rotr_2_fail:
112 fail test_rot_str_k
113 bra test_rotcr_1
114 nop
115 test_rotr_2_input:
116 .long 0xC2709192
117 test_rotr_2_result:
118 .long 0x613848C9
121 test_rotcr_1:
122 add #1, r12
124 mov.l test_rotcr_1_input, r3
125 mov.l test_rotcr_1_result, r4
126 clrt
127 rotcr r3
128 bf test_rotcr_1_fail
129 cmp/eq r3, r4
130 bt test_rotcr_2
131 test_rotcr_1_fail:
132 fail test_rot_str_k
133 bra test_rotcr_2
134 nop
135 test_rotcr_1_input:
136 .long 0x94E12323
137 test_rotcr_1_result:
138 .long 0x4A709191
140 test_rotcr_2:
141 add #1, r12
142 mov.l test_rotcr_2_input, r3
143 mov.l test_rotcr_2_result, r4
144 sett
145 rotcr r3
146 bt test_rotcr_2_fail
147 cmp/eq r3, r4
148 bt test_rot_end
149 test_rotcr_2_fail:
150 fail test_rot_str_k
151 bra test_rot_end
152 nop
153 test_rotcr_2_input:
154 .long 0xC2709192
155 test_rotcr_2_result:
156 .long 0xE13848C9
162 test_rot_end:
163 end_test test_rot_str_k
165 test_rot_str:
166 .string "ROT"
168 .align 4
169 test_rot_str_k:
170 .long test_rot_str
.