Commit | Line | Data |
---|---|---|
a471a06b HPN |
1 | ; @OC@ test |
2 | ; Template for generic "quick" operand checking. | |
3 | ||
4 | ; To see that expressions with symbols are evaluated correctly. | |
5 | .set twenty2, 22 | |
6 | .set mtwenty2, -22 | |
7 | ||
8 | .text | |
0465aa2f | 9 | .syntax no_register_prefix |
a471a06b HPN |
10 | start: |
11 | ||
12 | ;;;;;;;;;;;;;;;;; | |
13 | ; | |
14 | ; Unsigned 5 bits. | |
15 | ||
16 | @OC@ twenty2,r3 | |
17 | @OC@ -twenty2+33,r5 | |
18 | @OC@ twenty2-22,r10 | |
19 | @OC@ 31,r5 | |
20 | @OC@ 1,r4 | |
21 | @OC@ 0,r11 | |
22 | @OC@ 32-twenty2,r11 | |
23 | @OC@ -0,r12 | |
24 | ||
25 | unsigned6: ; u6 | |
26 | ;;;;;;;;;;;;;;;;; | |
27 | ; | |
28 | ; Unsigned 6 bits | |
29 | ||
30 | @OC@ twenty2*2,r3 ; u6 | |
31 | @OC@ -twenty2+33*2+13,r5 ; u6 | |
32 | @OC@ twenty2-22,r10 ; u6 | |
33 | @OC@ 31*2,r5 ; u6 | |
34 | @OC@ twenty2*3-3,r4 ; u6 | |
35 | @OC@ twenty2*3-4,r5 ; u6 | |
36 | @OC@ 63,r11 ; u6 | |
37 | @OC@ 32,r11 ; u6 | |
38 | ||
39 | signed6: ; s6 | |
40 | ;;;;;;;;;;;;;;;;; | |
41 | ; | |
42 | ; Signed 6 bits. | |
43 | ; Only need to check negative operands here; the unsigned 5 | |
44 | ; bits cases above covers positive numbers. | |
45 | @OC@ -31,r3 ; s6 | |
46 | @OC@ mtwenty2,r3 ; s6 | |
47 | @OC@ mtwenty2*2+14,r3 ; s6 | |
48 | @OC@ -64+35,r7 ; s6 | |
49 | @OC@ -1,r13 ; s6 | |
50 | @OC@ -twenty2+21,r12 ; s6 | |
51 | end: |