filename | test/sh4/and.s |
changeset | 231:a9e61a96a885 |
prev | 226:0eeeb25447d3 |
author | Nathan Keynes <nkeynes@lxdream.org> |
date | Sun Sep 25 20:36:34 2011 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Fix various CDI variations that weren't being parsed properly |
view | annotate | diff | log | raw |
1 .section .text
2 .include "sh4/inc.s"
3 !
4 ! Test AND Rm,Rn operation
5 !
6 .global _test_and
7 _test_and:
8 start_test
9 mov.l r11, @-r15
10 mov.l test_and_data_k, r11
12 test_and_loop:
13 mov.l test_and_data_end_k, r4
14 cmp/eq r11, r4
15 bt test_and_end
16 add #1, r12
18 clc
19 mov.l @r11+, r0
20 mov.l @r11+, r1
21 and r0, r1
22 stc sr, r4
23 mov.l @r11+, r2
24 mov.l @r11+, r3
25 cmp/eq r1, r2
26 bt test_and_b
27 fail test_and_str_k
28 bra test_and_loop
29 nop
30 test_and_b:
31 ldc r4, sr
32 xor r0, r0
33 add #1, r0
34 and r0, r4
35 cmp/eq r3, r4
36 bt test_and_loop
37 fail test_and_str_k
38 bra test_and_loop
39 nop
41 test_and_end:
42 mov.l @r15+, r11
43 end_test test_and_str_k
45 .align 4
46 test_and_data_k:
47 .long test_and_data
48 test_and_data:
49 test_and_data_1:
50 .long 0xFFFFFFFF
51 .long 0x00000000
52 .long 0x00000000
53 .long 0x00000000
55 .long 0x55555555
56 .long 0xAAAAAAAA
57 .long 0x00000000
58 .long 0x00000000
60 .long 0xFFFFFFFF
61 .long 0xA5A5A5A5
62 .long 0xA5A5A5A5
63 .long 0x00000000
65 .long 0xFFFFFFFF
66 .long 0xFFFFFFFF
67 .long 0xFFFFFFFF
68 .long 0x00000000
70 .long 0x12345678
71 .long 0x98765432
72 .long 0x10345430
73 .long 0x00000000
75 .long 0x00FFFFFF
76 .long 0x98765432
77 .long 0x00765432
78 .long 0x00000000
80 test_and_data_end:
81 .align 4
82 test_and_data_end_k:
83 .long test_and_data_end
84 test_and_str_k:
85 .long test_and_str
86 test_and_str:
87 .string "AND"
.