filename | test/sh4/div0.s |
changeset | 364:d738f6883d4a |
author | nkeynes |
date | Sat Oct 27 05:48:22 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Bump the save state version number (incompatible changes) |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/test/sh4/div0.s Sat Oct 27 05:48:22 2007 +00001.3 @@ -0,0 +1,80 @@1.4 +.section .text1.5 +.include "sh4/inc.s"1.6 +!1.7 +! Test DIV0 operation1.8 +!1.9 +.global _test_div01.10 +_test_div0:1.11 + start_test1.12 + mov.l r11, @-r151.13 + mov.l r10, @-r151.14 +1.15 +test_div0u:1.16 + add #1, r121.17 + stc sr, r21.18 + mov.l test_div0_sr_mask, r01.19 + or r0, r21.20 + ldc r2, sr1.21 +1.22 + div0u1.23 + stc sr, r31.24 + mov r3, r41.25 + and r0, r41.26 + tst r4, r41.27 + bf test_div0u_fail1.28 + not r0, r01.29 + and r0, r31.30 + and r0, r21.31 + cmp/eq r2, r31.32 + bt test_div0s1.33 +test_div0u_fail:1.34 + fail test_div0_str_k1.35 +1.36 +test_div0s:1.37 + mova test_div0s_data, r01.38 + mov r0, r111.39 + mov #4, r101.40 +1.41 +test_div0s_loop:1.42 + add #1, r121.43 + mov.l @r11+, r11.44 + mov.l @r11+, r21.45 + mov.l @r11+, r31.46 + div0s r1,r21.47 + stc sr, r41.48 + mov.l test_div0_sr_mask, r01.49 + and r0,r41.50 + cmp/eq r3,r41.51 + bt test_div0s_ok1.52 + fail test_div0_str_k1.53 +test_div0s_ok:1.54 + dt r101.55 + bf test_div0s_loop1.56 +1.57 +test_div0_end:1.58 + mov.l @r15+, r101.59 + mov.l @r15+, r111.60 + end_test test_div0_str_k1.61 +1.62 +test_div0s_data:1.63 + .long 0x012345671.64 + .long 0x123456781.65 + .long 0x000000001.66 + .long 0xFFFF89121.67 + .long 0x7ABC15261.68 + .long 0x000002011.69 + .long 0x554433221.70 + .long 0x800002341.71 + .long 0x000001011.72 + .long 0xFFFFFFFF1.73 + .long 0x9CD394951.74 + .long 0x000003001.75 +1.76 +test_div0_sr_mask:1.77 + .long 0x000003011.78 +1.79 +test_div0_str_k:1.80 + .long test_div0_str1.81 +test_div0_str:1.82 + .string "DIV0"1.83 +1.84 \ No newline at end of file
.