Commit | Line | Data |
---|---|---|
5e1f6430 HPN |
1 | # mach: crisv0 crisv3 crisv8 crisv10 crisv32 |
2 | # output: 3\n3\nffffff03\nffff0003\nff00\n0\n10000\n10000\n0\nffffff00\n0\n781343c9\n781344c9\n78124cc9\n78134cc9\nc450\n7ffff8ce\n | |
3 | ||
4 | .include "testutils.inc" | |
5 | .data | |
6 | x: | |
7 | .byte 0xff | |
8 | .word 0xffff | |
9 | .word 0xff | |
10 | .word 0xffff | |
11 | .byte 0x89 | |
12 | .word 0xf789 | |
13 | .word 0x8002 | |
14 | .word 0x764 | |
15 | ||
16 | start | |
17 | moveq 2,r3 | |
18 | move.d x,r5 | |
19 | subs.b [r5+],r3 | |
20 | test_cc 0 0 0 1 | |
21 | dumpr3 ; 3 | |
22 | ||
23 | moveq 2,r3 | |
24 | subs.w [r5+],r3 | |
25 | test_cc 0 0 0 1 | |
26 | dumpr3 ; 3 | |
27 | ||
28 | moveq 2,r3 | |
29 | subq 3,r5 | |
30 | subu.b [r5+],r3 | |
31 | test_cc 1 0 0 1 | |
32 | dumpr3 ; ffffff03 | |
33 | ||
34 | moveq 2,r3 | |
35 | subu.w [r5+],r3 | |
36 | test_cc 1 0 0 1 | |
37 | subq 3,r5 | |
38 | dumpr3 ; ffff0003 | |
39 | ||
40 | move.d 0xffff,r3 | |
41 | subu.b [r5],r3 | |
42 | test_cc 0 0 0 0 | |
43 | dumpr3 ; ff00 | |
44 | ||
45 | move.d 0xffff,r3 | |
46 | subu.w [r5],r3 | |
47 | test_cc 0 1 0 0 | |
48 | dumpr3 ; 0 | |
49 | ||
50 | move.d 0xffff,r3 | |
51 | subs.b [r5],r3 | |
52 | test_cc 0 0 0 1 | |
53 | dumpr3 ; 10000 | |
54 | ||
55 | move.d 0xffff,r3 | |
56 | subs.w [r5],r3 | |
57 | test_cc 0 0 0 1 | |
58 | dumpr3 ; 10000 | |
59 | ||
60 | moveq -1,r3 | |
61 | subs.b [r5],r3 | |
62 | test_cc 0 1 0 0 | |
63 | addq 3,r5 | |
64 | dumpr3 ; 0 | |
65 | ||
66 | moveq -1,r3 | |
67 | subs.w [r5+],r3 | |
68 | test_cc 1 0 0 0 | |
69 | dumpr3 ; ffffff00 | |
70 | ||
71 | moveq -1,r3 | |
72 | subs.w [r5+],r3 | |
73 | test_cc 0 1 0 0 | |
74 | dumpr3 ; 0 | |
75 | ||
76 | move.d 0x78134452,r3 | |
77 | subu.b [r5],r3 | |
78 | test_cc 0 0 0 0 | |
79 | dumpr3 ; 781343c9 | |
80 | ||
81 | move.d 0x78134452,r3 | |
82 | subs.b [r5+],r3 | |
83 | test_cc 0 0 0 1 | |
84 | dumpr3 ; 781344c9 | |
85 | ||
86 | move.d 0x78134452,r3 | |
87 | subu.w [r5],r3 | |
88 | test_cc 0 0 0 0 | |
89 | dumpr3 ; 78124cc9 | |
90 | ||
91 | move.d 0x78134452,r3 | |
92 | subs.w [r5+],r3 | |
93 | test_cc 0 0 0 1 | |
94 | dumpr3 ; 78134cc9 | |
95 | ||
96 | move.d 0x4452,r3 | |
97 | subs.w [r5+],r3 | |
98 | test_cc 0 0 0 1 | |
99 | dumpr3 ; c450 | |
100 | ||
101 | move.d 0x80000032,r3 | |
102 | subu.w [r5+],r3 | |
103 | test_cc 0 0 1 0 | |
104 | dumpr3 ; 7ffff8ce | |
105 | ||
106 | quit |