filename | test/sh4/div1.s |
changeset | 384:c9d5c194984b |
author | nkeynes |
date | Tue Nov 20 08:31:34 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Fix TRAPA (translator) and add test case |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/test/sh4/div1.s Tue Nov 20 08:31:34 2007 +00001.3 @@ -0,0 +1,137 @@1.4 +.section .text1.5 +.include "sh4/inc.s"1.6 +!1.7 +! Test DIV1 operation1.8 +!1.9 +.global _test_div11.10 +_test_div1:1.11 + start_test1.12 + mov.l r11, @-r151.13 + mov.l r10, @-r151.14 +1.15 + mova test_div1_data, r01.16 + mov r0, r111.17 + mov #12, r101.18 +test_div1_loop:1.19 + add #1, r121.20 +1.21 + mov.l @r11+, r41.22 + mov.l @r11+, r51.23 + mov.l @r11+, r61.24 +1.25 + stc sr, r21.26 + mov.l test_div1_sr_mask, r01.27 + not r0, r11.28 + and r1, r21.29 + or r6, r21.30 + ldc r2, sr1.31 + mov r4, r31.32 +1.33 + div1 r4, r51.34 +1.35 + stc sr, r21.36 + and r0, r21.37 + cmp/eq r3, r41.38 + bf test_div1_fail1.39 + mov.l @r11+, r31.40 + cmp/eq r3, r51.41 + bf test_div1_fail1.42 + mov.l @r11+, r31.43 + cmp/eq r3, r21.44 + bt test_div1_next1.45 +test_div1_fail:1.46 + fail test_div1_str_k1.47 +1.48 +test_div1_next:1.49 + dt r101.50 + bf test_div1_loop1.51 +1.52 +test_div1_end:1.53 + mov.l @r15+, r101.54 + mov.l @r15+, r111.55 + end_test test_div1_str_k1.56 +1.57 +test_div1_data:1.58 + .long 0x123456781.59 + .long 0x012341231.60 + .long 0x000000011.61 + .long 0xF0122BCF1.62 + .long 0x000001001.63 +1.64 + .long 0x112233441.65 + .long 0xF0122BCF1.66 + .long 0x000001001.67 + .long 0xF1468AE21.68 + .long 0x000001001.69 +1.70 + .long 0x201030401.71 + .long 0xF1468AE21.72 + .long 0x000001011.73 + .long 0x029D46051.74 + .long 0x000000011.75 +1.76 + .long 0x012312311.77 + .long 0x029D46051.78 + .long 0x000000001.79 + .long 0x041779D91.80 + .long 0x000000011.81 +1.82 + .long 0xF12341231.83 + .long 0x134344541.84 + .long 0x000001001.85 + .long 0x17A9C9CB1.86 + .long 0x000001001.87 +1.88 + .long 0x654321231.89 + .long 0x123123121.90 + .long 0x000001011.91 + .long 0x89A567481.92 + .long 0x000000011.93 +1.94 +! and now the m=1 cases1.95 + .long 0x123456781.96 + .long 0x012341231.97 + .long 0x000003011.98 + .long 0xF0122BCF1.99 + .long 0x000002001.100 +1.101 + .long 0x112233441.102 + .long 0xF0122BCF1.103 + .long 0x000002001.104 + .long 0xF1468AE21.105 + .long 0x000002001.106 +1.107 + .long 0x201030401.108 + .long 0xF1468AE21.109 + .long 0x000002011.110 + .long 0x029D46051.111 + .long 0x000003011.112 +1.113 + .long 0x012312311.114 + .long 0x029D46051.115 + .long 0x000003001.116 + .long 0x041779D91.117 + .long 0x000003011.118 +1.119 + .long 0xF12341231.120 + .long 0x134344541.121 + .long 0x000002001.122 + .long 0x17A9C9CB1.123 + .long 0x000002001.124 +1.125 + .long 0x654321231.126 + .long 0x123123121.127 + .long 0x000002011.128 + .long 0x89A567481.129 + .long 0x000003011.130 +1.131 +test_div1_data_end:1.132 +1.133 +test_div1_sr_mask:1.134 + .long 0x000003011.135 +1.136 +test_div1_str_k:1.137 + .long test_div1_str1.138 +test_div1_str:1.139 + .string "DIV1"1.140 +1.141 \ No newline at end of file
.