Search
lxdream.org :: lxdream/test/sh4/shld.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/shld.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/shld.s Tue Sep 04 08:30:22 2007 +0000
1.3 @@ -0,0 +1,127 @@
1.4 +.section .text
1.5 +.include "sh4/inc.s"
1.6 +!
1.7 +! Test SHAD/SHLD operation
1.8 +!
1.9 +.global _test_shld
1.10 +_test_shld:
1.11 + start_test
1.12 + mov.l r11, @-r15
1.13 + mov.l r10, @-r15
1.14 +
1.15 +test_shld_1:
1.16 + mov #8, r11
1.17 + mova test_shld_data, r0
1.18 + mov r0, r10
1.19 +
1.20 +test_shld_1_loop1:
1.21 + add #1, r12
1.22 + mov.l @r10+, r2
1.23 + mov.l @r10+, r3
1.24 + mov.l @r10+, r4
1.25 + shld r3, r2
1.26 + cmp/eq r2, r4
1.27 + bt test_shld_1_ok
1.28 + fail test_shld_str_k
1.29 +test_shld_1_ok:
1.30 + dt r11
1.31 + bf test_shld_1_loop1
1.32 +
1.33 +test_shad_1: ! Same again, but using shad
1.34 + mov #8, r11
1.35 + mova test_shad_data, r0
1.36 + mov r0, r10
1.37 +
1.38 +test_shad_1_loop1:
1.39 + add #1, r12
1.40 + mov.l @r10+, r2
1.41 + mov.l @r10+, r3
1.42 + mov.l @r10+, r4
1.43 + shad r3, r2
1.44 + cmp/eq r2, r4
1.45 + bt test_shad_1_ok
1.46 + fail test_shld_str_k
1.47 +test_shad_1_ok:
1.48 + dt r11
1.49 + bf test_shad_1_loop1
1.50 +
1.51 +test_shld_end:
1.52 + mov.l @r15+, r10
1.53 + mov.l @r15+, r11
1.54 + end_test test_shld_str_k
1.55 +
1.56 +test_shld_data:
1.57 + .long 0x12345678
1.58 + .long 0
1.59 + .long 0x12345678
1.60 +
1.61 + .long 0xA8B9CADB
1.62 + .long 0x00000010
1.63 + .long 0xCADB0000
1.64 +
1.65 + .long 0x8A9BACBD
1.66 + .long 0xFFFFFFF0
1.67 + .long 0x00008A9B
1.68 +
1.69 + .long 0x7A9BACBD
1.70 + .long 0xFFFFFFF0
1.71 + .long 0x00007A9B
1.72 +
1.73 + .long 0x7891ACDC
1.74 + .long 0x80000000
1.75 + .long 0x00000000
1.76 +
1.77 + .long 0x8719C010
1.78 + .long 0x80000000
1.79 + .long 0x00000000
1.80 +
1.81 + .long 0x7891ACDF
1.82 + .long 0x7FFFFFFF
1.83 + .long 0x80000000
1.84 +
1.85 + .long 0x8719C01E
1.86 + .long 0x000000FF
1.87 + .long 0x00000000
1.88 +
1.89 +test_shad_data:
1.90 + .long 0x12345678
1.91 + .long 0
1.92 + .long 0x12345678
1.93 +
1.94 + .long 0xA8B9CADB
1.95 + .long 0x00000010
1.96 + .long 0xCADB0000
1.97 +
1.98 + .long 0x8A9BACBD
1.99 + .long 0xFFFFFFF0
1.100 + .long 0xFFFF8A9B
1.101 +
1.102 + .long 0x7A9BACBD
1.103 + .long 0xFFFFFFF0
1.104 + .long 0x00007A9B
1.105 +
1.106 + .long 0x7891ACDC
1.107 + .long 0x80000000
1.108 + .long 0x00000000
1.109 +
1.110 + .long 0x8719C010
1.111 + .long 0x80000000
1.112 + .long 0xFFFFFFFF
1.113 +
1.114 + .long 0x7891ACDF
1.115 + .long 0x7FFFFFFF
1.116 + .long 0x80000000
1.117 +
1.118 + .long 0x8719C01E
1.119 + .long 0x000000FF
1.120 + .long 0x00000000
1.121 +
1.122 +test_shld_data_end:
1.123 + .align 4
1.124 +test_shld_data_end_k:
1.125 + .long test_shld_data_end
1.126 +test_shld_str_k:
1.127 + .long test_shld_str
1.128 +test_shld_str:
1.129 + .string "SHLD"
1.130 +
1.131 \ No newline at end of file
.