filename | test/sh4/cmpstr.s |
changeset | 364:d738f6883d4a |
author | nkeynes |
date | Wed Sep 12 11:41:43 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Fix default block return value |
view | annotate | diff | log | raw |
1 .section .text
2 .include "sh4/inc.s"
3 !
4 ! Test cmp/xx
6 .global _test_cmpstr
7 _test_cmpstr:
8 start_test
9 mov.l r11, @-r15
10 mov.l r10, @-r15
12 test_cmpstr_1: ! CMP/STR r2,r2
13 add #1, r12
14 mova test_cmpstr_str, r0
15 cmp/str r0, r0
16 bt test_cmpstr_2
17 fail test_cmpstr_str_k
19 test_cmpstr_2:
20 mova test_cmpstr_data, r0
21 mov r0, r11
22 mov #6, r10
24 test_cmpstr_2_loop:
25 add #1, r12
26 mov.l @r11+, r2
27 mov.l @r11+, r3
28 mov.l @r11+, r4
29 cmp/str r2, r3
30 movt r0
31 cmp/eq r0, r4
32 bt test_cmpstr_2_ok
33 fail test_cmpstr_str_k
34 test_cmpstr_2_ok:
35 dt r10
36 bf test_cmpstr_2_loop
38 test_cmpstr_end:
39 mov.l @r15+, r10
40 mov.l @r15+, r11
41 end_test test_cmpstr_str_k
43 test_cmpstr_data:
44 .long 0x81828384
45 .long 0x82838485
46 .long 0x00000000
48 .long 0x01040302
49 .long 0x02010304
50 .long 0x00000001
52 .long 0xAA55AA55
53 .long 0x55AA55AA
54 .long 0x00000000
56 .long 0x12345678
57 .long 0x12345678
58 .long 0x00000001
60 .long 0xABCD01DC
61 .long 0xABCD01DD
62 .long 0x00000001
64 .long 0x12003423
65 .long 0x12342300
66 .long 0x00000001
68 test_cmpstr_str_k:
69 .long test_cmpstr_str
70 test_cmpstr_str:
71 .string "CMP/STR"
.