Add support for 64-bit ARM architecture: AArch64
[deliverable/binutils-gdb.git] / gas / testsuite / gas / aarch64 / int-insns.s
1 // Test file for AArch64 GAS -- basic integer instructions
2
3 func:
4 lsl x1, x2, x3
5 lsl x1, x2, #0
6 lsl x1, x2, #1
7
8 extr x1, x2, x3, #1
9 extr x1, x2, x3, #63
10
11 extr x1, x2, x3, #0
12 extr w1, w2, w3, #31
13
14 CSET x1, eq
15 CSETM x1, eq
16
17 subs w1,w1,#0
18 cmp w1,#0
19
20 neg w1,w2
21 sub w1,w2,#0
22
23 cmp x1,#0
24 subs x1,x1,#0
25
26 orr w1,wzr,#15
27 mov x1,x2
28
29 ldr w1, sp
30 ldr w1, =sp
31 ldr x1, =sp
32 sp: .word 0x12345678
33
34 ret x30
35 ret
36 ret x2
37
38 add sp,x1,x2
39
40 add x5,x5,#0x7, lsl #12
41
42 add x1,x2,x3, lsr #1
43 add x5,x5,#0x7
44
45 subs w1,w1,#1
46
47 movz x2,#0x64
48 movz x2,#0x64, lsl #0
49 movz x2,#:abs_g0:0x64
50 movz x2,#0x64, lsl #16
51 movz x2,#:abs_g1:(0x64 << 16)
52 movz x2,#0x64, lsl #32
53 movz x2,#:abs_g2:(0x64 << 32)
54 movz x2,#0x64, lsl #48
55 movz x2,#:abs_g3:(0x64 << 48)
56 movz w1,#0x64
57 movz w1,#0x64, lsl #0
58 movz w1,#0x64, lsl #16
59
60 and x1,x2,x3
61 and w30,w10,w15
62 and w1,w2,#1
63
64 and x1,x2,x3, lsr #1
65
66 orr w1,w1,#1
67 orr w1,w1,#1
68 orr x1,x1,#1
69 and x1,x2,#0xf
70 and w1,w2,#0xf
71 and x1,x2,#0x80000000
72 and w1,w2,#0x80000000
73 and x1,x2,#0x800000000
74
75 // 00010010000101000000010100000011
76 // 1 2 1 4 0 5 0 3
77 and x5,x4,#0xf
78
79 bic w1,w2,w3
80 bic x1,x2,x3
81
82 1: b.ne 1b
83 b 1b
84 b 2f
85 2: b.eq 1b
86
87
88 3: bne 3b
89 b 3b
90 b 4f
91 4: beq 3b
92
93 br x2
94
95 bcs 4b
96 bcc 4b
97
98 .if 0
99
100 lsl x1, #0, #1
101
102 ext x1, x2, x3, #64
103 ext w1, w2, w3, #63
104 ext w1, w2, w3, #32
105
106 mov w1,#10
107 neg w1,#1
108
109 ldm {x1},[sp]
110 ldm {x1-x2},[sp]
111 ldm {x1,x2,x3,x4},sp
112 ldm {x1-x3},[x1,w2]
113
114 subs #0,#1
115
116 add x5,x5,#0x7, lsl #1
117 add x5,x5,#0x7, lsr #1
118
119 movz x0,#0x64, lsl #1
120 movz x0,#0x64, lsl #2
121 movz x0,#0x64, lsl #3
122 movz x0,#0x64, lsl #4
123 movz x0,#0x64, lsl #64
124 movz w1,#0x64, lsl #32
125 movz w1,#0x64, lsl #48
126
127 orr #0,w1
128 and sp,x1,x2
129 and x1,sp,x2
130 and x1,x2,sp
131
132 and w1,#0,x2
133 and x1,#0,w2
134
135 and x1,x2,w3
136 and x1,w2,x3
137 and x1,w2,w3
138 and w1,x2,x3
139 and w1,x2,w3
140 and w1,w2,x3
141 and w1,w2,w3
142
143 and x1,x2,#0
144 and w1,w2,#0x800000000
145 bic x1,x2,#1
146
147 br w2
148 br sp
149 .endif
150
151 .equ sh,2
This page took 0.035254 seconds and 4 git commands to generate.