Search
lxdream.org :: lxdream/test/sh4/cmpstr.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/cmpstr.s
changeset 364:d738f6883d4a
author nkeynes
date Tue Sep 04 08:30:22 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Add tests for CMPSTR, DIV0U, DIV0S, SHLD, and SHAD
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/sh4/cmpstr.s Tue Sep 04 08:30:22 2007 +0000
1.3 @@ -0,0 +1,72 @@
1.4 +.section .text
1.5 +.include "sh4/inc.s"
1.6 +!
1.7 +! Test cmp/xx
1.8 +
1.9 +.global _test_cmpstr
1.10 +_test_cmpstr:
1.11 + start_test
1.12 + mov.l r11, @-r15
1.13 + mov.l r10, @-r15
1.14 +
1.15 +test_cmpstr_1: ! CMP/STR r2,r2
1.16 + add #1, r12
1.17 + mova test_cmpstr_str, r0
1.18 + cmp/str r0, r0
1.19 + bt test_cmpstr_2
1.20 + fail test_cmpstr_str_k
1.21 +
1.22 +test_cmpstr_2:
1.23 + mova test_cmpstr_data, r0
1.24 + mov r0, r11
1.25 + mov #6, r10
1.26 +
1.27 +test_cmpstr_2_loop:
1.28 + add #1, r12
1.29 + mov.l @r11+, r2
1.30 + mov.l @r11+, r3
1.31 + mov.l @r11+, r4
1.32 + cmp/str r2, r3
1.33 + movt r0
1.34 + cmp/eq r0, r4
1.35 + bt test_cmpstr_2_ok
1.36 + fail test_cmpstr_str_k
1.37 +test_cmpstr_2_ok:
1.38 + dt r10
1.39 + bf test_cmpstr_2_loop
1.40 +
1.41 +test_cmpstr_end:
1.42 + mov.l @r15+, r10
1.43 + mov.l @r15+, r11
1.44 + end_test test_cmpstr_str_k
1.45 +
1.46 +test_cmpstr_data:
1.47 + .long 0x81828384
1.48 + .long 0x82838485
1.49 + .long 0x00000000
1.50 +
1.51 + .long 0x01040302
1.52 + .long 0x02010304
1.53 + .long 0x00000001
1.54 +
1.55 + .long 0xAA55AA55
1.56 + .long 0x55AA55AA
1.57 + .long 0x00000000
1.58 +
1.59 + .long 0x12345678
1.60 + .long 0x12345678
1.61 + .long 0x00000001
1.62 +
1.63 + .long 0xABCD01DC
1.64 + .long 0xABCD01DD
1.65 + .long 0x00000001
1.66 +
1.67 + .long 0x12003423
1.68 + .long 0x12342300
1.69 + .long 0x00000001
1.70 +
1.71 +test_cmpstr_str_k:
1.72 + .long test_cmpstr_str
1.73 +test_cmpstr_str:
1.74 + .string "CMP/STR"
1.75 +
1.76 \ No newline at end of file
.