filename | test/sh4/andi.s |
changeset | 226:0eeeb25447d3 |
next | 228:70adc8ffa8d1 |
author | nkeynes |
date | Sat Sep 23 10:35:29 2006 +0000 (14 years ago) |
permissions | -rw-r--r-- |
last change | SH4 tests: Add tests for addc, addv, and |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/test/sh4/andi.s Sat Sep 23 10:35:29 2006 +00001.3 @@ -0,0 +1,85 @@1.4 +.section .text1.5 +.include "sh4/inc.s"1.6 +!1.7 +! Test AND #imm, R0 operation1.8 +! Test AND #imm, @(r0,GBR)1.9 +1.10 +.global _test_andi1.11 +_test_andi:1.12 + start_test1.13 +1.14 +test_andi_1: ! test and ff, 01.15 + add #1, r121.16 + xor r0, r01.17 + xor r1, r11.18 + and #255, r01.19 + cmp/eq r0, r11.20 + bt test_andi_21.21 + fail test_andi_str_k1.22 +1.23 +test_andi_2: ! test 0-extend1.24 + add #1, r121.25 + mov.l test_andi_2_op1, r01.26 + and #255, r01.27 + mov.l test_andi_2_result, r41.28 + cmp/eq r0, r41.29 + bt test_andi_31.30 + fail test_andi_str_k1.31 + bra test_andi_31.32 + nop1.33 +1.34 +test_andi_2_op1:1.35 + .long 0x987654321.36 +test_andi_2_result:1.37 + .long 0x000000321.38 +1.39 +test_andi_3: ! Test single-bit AND1.40 + add #1, r121.41 + mov.l test_andi_3_op1, r01.42 + and #128, r01.43 + mov.l test_andi_3_result, r31.44 + cmp/eq r0, r31.45 + bt test_andi_41.46 + fail test_andi_str_k1.47 + bra test_andi_41.48 + nop1.49 +test_andi_3_op1:1.50 + .long 0x123456AB1.51 +test_andi_3_result:1.52 + .long 0x000000801.53 +1.54 +test_andi_4: ! Test GBR version1.55 + add #1, r121.56 + stc gbr, r41.57 + mov.l test_andi_4_gbr, r01.58 + ldc r0, gbr1.59 + mov.l test_andi_4_op1, r01.60 + and.b #254, @(r0,gbr)1.61 + ldc r4, gbr1.62 + mov.l test_andi_4_output, r11.63 + mov.l test_andi_4_result, r21.64 + cmp/eq r1, r21.65 + bt test_andi_51.66 + fail test_andi_str_k1.67 + bra test_andi_51.68 + nop1.69 +test_andi_4_gbr:1.70 + .long test_andi_4_gbr1.71 +test_andi_4_op1:1.72 + .long 0x000000081.73 +test_andi_4_output:1.74 + .long 0x123456AB1.75 +test_andi_4_result:1.76 + .long 0x123456AA1.77 +1.78 +test_andi_5:1.79 +test_andi_end:1.80 + end_test test_andi_str_k1.81 +1.82 +test_andi_str:1.83 + .string "ANDi"1.84 +1.85 +.align 41.86 +test_andi_str_k:1.87 + .long test_andi_str1.88 +1.89 \ No newline at end of file
.