1@	Test file for ARM/GAS -- basic instructions
2
3.text
4.align
5	mov	r0, #0
6	mov	r1, r2
7	mov	r3, r4, lsl #3
8	mov	r5, r6, lsr r7
9	mov	r8, r9, asr r10
10	mov	r11, r12, asl r13
11	mov	r14, r15, rrx
12	moval	a2, a3
13	moveq	a3, a4
14	movne	v1, v2
15	movlt	v3, v4
16	movge	v5, v6
17	movle	v7, v8
18	movgt	ip, sp
19	movcc	r1, r2
20	movcs	r1, r3
21	movmi	r3, r6
22	movpl	wr, sb
23	movvs	r1, r8
24	movvc	SB, r1, lsr #31
25	movhi	r8, pc
26	movls	PC, lr
27	movhs	r9, r8
28	movul	r1, r3
29	movs	r0, r8
30	movuls	r0, WR
31
32	add	r0, r1, #10
33	add	r2, r3, r4
34	add	r5, r6, r7, asl #5
35	add	r1, r2, r3, lsl r1
36
37	and	r0, r1, #10
38	and	r2, r3, r4
39	and	r5, r6, r7, asl #5
40	and	r1, r2, r3, lsl r1
41
42	eor	r0, r1, #10
43	eor	r2, r3, r4
44	eor	r5, r6, r7, asl #5
45	eor	r1, r2, r3, lsl r1
46
47	sub	r0, r1, #10
48	sub	r2, r3, r4
49	sub	r5, r6, r7, asl #5
50	sub	r1, r2, r3, lsl r1
51
52	adc	r0, r1, #10
53	adc	r2, r3, r4
54	adc	r5, r6, r7, asl #5
55	adc	r1, r2, r3, lsl r1
56
57	sbc	r0, r1, #10
58	sbc	r2, r3, r4
59	sbc	r5, r6, r7, asl #5
60	sbc	r1, r2, r3, lsl r1
61
62	rsb	r0, r1, #10
63	rsb	r2, r3, r4
64	rsb	r5, r6, r7, asl #5
65	rsb	r1, r2, r3, lsl r1
66
67	rsc	r0, r1, #10
68	rsc	r2, r3, r4
69	rsc	r5, r6, r7, asl #5
70	rsc	r1, r2, r3, lsl r1
71
72	orr	r0, r1, #10
73	orr	r2, r3, r4
74	orr	r5, r6, r7, asl #5
75	orr	r1, r2, r3, lsl r1
76
77	bic	r0, r1, #10
78	bic	r2, r3, r4
79	bic	r5, r6, r7, asl #5
80	bic	r1, r2, r3, lsl r1
81
82	mvn	r0, #10
83	mvn	r2, r4
84	mvn	r5, r7, asl #5
85	mvn	r1, r3, lsl r1
86
87	tst	r0, #10
88	tst	r2, r4
89	tst	r5, r7, asl #5
90	tst	r1, r3, lsl r1
91
92	teq	r0, #10
93	teq	r2, r4
94	teq	r5, r7, asl #5
95	teq	r1, r3, lsl r1
96
97	cmp	r0, #10
98	cmp	r2, r4
99	cmp	r5, r7, asl #5
100	cmp	r1, r3, lsl r1
101
102	cmn	r0, #10
103	cmn	r2, r4
104	cmn	r5, r7, asl #5
105	cmn	r1, r3, lsl r1
106
107	teqp	r0, #10
108	teqp	r2, r4
109	teqp	r5, r7, asl #5
110	teqp	r1, r3, lsl r1
111
112	cmnp	r0, #10
113	cmnp	r2, r4
114	cmnp	r5, r7, asl #5
115	cmnp	r1, r3, lsl r1
116
117	cmpp	r0, #10
118	cmpp	r2, r4
119	cmpp	r5, r7, asl #5
120	cmpp	r1, r3, lsl r1
121
122	tstp	r0, #10
123	tstp	r2, r4
124	tstp	r5, r7, asl #5
125	tstp	r1, r3, lsl r1
126
127	mul	r0, r1, r2
128	muls	r1, r2, r3
129	mulne	r0, r1, r0
130	mullss	r9, r8, r7
131
132	mla	r1, r9, sl, fp
133	mlas	r3, r4, r9, IP
134	mlalt	r9, r8, r7, SP
135	mlages	r4, r1, r3, LR
136
137	ldr	r0, [r1]
138	ldr	r1, [r1, r2]
139	ldr	r2, [r3, r4]!
140	ldr	r2, [r2, #32]
141	ldr	r2, [r3, r4, lsr #8]
142	ldreq	r4, [r5, r4, asl #9]!
143	ldrne	r4, [r5], #6
144	ldrt	r1, [r2], r3
145	ldr	r2, [r4], r5, lsr #8
146foo:
147	ldr	r0, foo
148	ldrb	r3, [r4]
149	ldrnebt	r5, [r8]
150
151	str	r0, [r1]
152	str	r1, [r1, r2]
153	str	r3, [r4, r3]!
154	str	r2, [r2, #32]
155	str	r2, [r3, r4, lsr #8]
156	streq	r4, [r5, r4, asl #9]!
157	strne	r4, [r5], #6
158	str	r1, [r2], r3
159	strt	r2, [r4], r5, lsr #8
160	str	r1, bar
161bar:
162	stralb	r1, [r7]
163	strbt	r2, [r0]
164
165	ldmia	r0, {r1}
166	ldmeqib	r2, {r3, r4, r5}
167	ldmalda	r3, {r0-r15}^
168	ldmdb	FP!, {r0-r8, SL}
169	ldmed	r1, {r0, r1, r2}|0xf0
170	ldmfd	r2, {r3, r4}+{r5, r6, r7, r8}
171	ldmea	r3, 3
172	ldmfa	r4, {r8, r9}^
173
174	stmia	r0, {r1}
175	stmeqib	r2, {r3, r4, r5}
176	stmalda	r3, {r0-r15}^
177	stmdb	r11!, {r0-r8, r10}
178	stmed	r1, {r0, r1, r2}
179	stmfd	r2, {r3, r4}
180	stmea	r3, 3
181	stmfa	r4, {r8, r9}^
182
183	swi	0x123456
184	swihs	0x33
185
186	bl	_wombat
187	blpl	hohum
188	b	_wibble
189	ble	testerfunc
190
191	mov r1, r2, lsl #2
192	mov r1, r2, lsl #0
193	mov r1, r2, lsl #31
194	mov r1, r2, lsl r3
195	mov r1, r2, lsr #2
196	mov r1, r2, lsr #31
197	mov r1, r2, lsr #32
198	mov r1, r2, lsr r3
199	mov r1, r2, asr #2
200	mov r1, r2, asr #31
201	mov r1, r2, asr #32
202	mov r1, r2, asr r3
203	mov r1, r2, ror #2
204	mov r1, r2, ror #31
205	mov r1, r2, ror r3
206	mov r1, r2, rrx
207	mov r1, r2, LSL #2
208	mov r1, r2, LSL #0
209	mov r1, r2, LSL #31
210	mov r1, r2, LSL r3
211	mov r1, r2, LSR #2
212	mov r1, r2, LSR #31
213	mov r1, r2, LSR #32
214	mov r1, r2, LSR r3
215	mov r1, r2, ASR #2
216	mov r1, r2, ASR #31
217	mov r1, r2, ASR #32
218	mov r1, r2, ASR r3
219	mov r1, r2, ROR #2
220	mov r1, r2, ROR #31
221	mov r1, r2, ROR r3
222	mov r1, r2, RRX
223	ldralt r1, [r2], r3
224