Search
lxdream.org :: lxdream/test/sh4/and.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/and.s
changeset 226:0eeeb25447d3
next231:a9e61a96a885
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 +0000
1.2 +++ b/test/sh4/and.s Sat Sep 23 10:35:29 2006 +0000
1.3 @@ -0,0 +1,87 @@
1.4 +.section .text
1.5 +.include "sh4/inc.s"
1.6 +!
1.7 +! Test AND Rm,Rn operation
1.8 +!
1.9 +.global _test_and
1.10 +_test_and:
1.11 + start_test
1.12 + mov.l r11, @-r15
1.13 + mov.l test_and_data_k, r11
1.14 +
1.15 +test_and_loop:
1.16 + mov.l test_and_data_end_k, r4
1.17 + cmp/eq r11, r4
1.18 + bt test_and_end
1.19 + add #1, r12
1.20 +
1.21 + clc
1.22 + mov.l @r11+, r0
1.23 + mov.l @r11+, r1
1.24 + and r0, r1
1.25 + stc sr, r4
1.26 + mov.l @r11+, r2
1.27 + mov.l @r11+, r3
1.28 + cmp/eq r1, r2
1.29 + bt test_and_b
1.30 + fail test_and_str_k
1.31 + bra test_and_loop
1.32 + nop
1.33 +test_and_b:
1.34 + ldc r4, sr
1.35 + xor r0, r0
1.36 + add #1, r0
1.37 + and r0, r4
1.38 + cmp/eq r3, r4
1.39 + bt test_and_loop
1.40 + fail test_and_str_k
1.41 + bra test_and_loop
1.42 + nop
1.43 +
1.44 +test_and_end:
1.45 + end_test test_and_str_k
1.46 +
1.47 + .align 4
1.48 +test_and_data_k:
1.49 + .long test_and_data
1.50 +test_and_data:
1.51 +test_and_data_1:
1.52 + .long 0xFFFFFFFF
1.53 + .long 0x00000000
1.54 + .long 0x00000000
1.55 + .long 0x00000000
1.56 +
1.57 + .long 0x55555555
1.58 + .long 0xAAAAAAAA
1.59 + .long 0x00000000
1.60 + .long 0x00000000
1.61 +
1.62 + .long 0xFFFFFFFF
1.63 + .long 0xA5A5A5A5
1.64 + .long 0xA5A5A5A5
1.65 + .long 0x00000000
1.66 +
1.67 + .long 0xFFFFFFFF
1.68 + .long 0xFFFFFFFF
1.69 + .long 0xFFFFFFFF
1.70 + .long 0x00000000
1.71 +
1.72 + .long 0x12345678
1.73 + .long 0x98765432
1.74 + .long 0x10345430
1.75 + .long 0x00000000
1.76 +
1.77 + .long 0x00FFFFFF
1.78 + .long 0x98765432
1.79 + .long 0x00765432
1.80 + .long 0x00000000
1.81 +
1.82 +test_and_data_end:
1.83 + .align 4
1.84 +test_and_data_end_k:
1.85 + .long test_and_data_end
1.86 +test_and_str_k:
1.87 + .long test_and_str
1.88 +test_and_str:
1.89 + .string "AND"
1.90 +
1.91 \ No newline at end of file
.