1# Freescale PowerPC VLE instruction tests
2#as: -mvle
3	.text
4	.extern extern_subr
5	.equ	UI8,0x37
6	.equ	SCI0,UI8<<0
7	.equ	SCI1,UI8<<8
8	.equ	SCI2,UI8<<16
9	.equ	SCI3,UI8<<24
10	.equ	r0,0
11	.equ	r1,1
12	.equ	r2,2
13	.equ	r3,3
14	.equ	r4,4
15	.equ	r5,5
16	.equ	r6,6
17	.equ	r7,7
18	.equ	r8,8
19	.equ	r9,9
20	.equ	r10,10
21	.equ	r11,11
22	.equ	r12,12
23	.equ	r13,13
24	.equ	r14,14
25	.equ	r15,15
26	.equ	r16,16
27	.equ	r17,17
28	.equ	r18,18
29	.equ	r19,19
30	.equ	r20,20
31	.equ	r21,21
32	.equ	r22,22
33	.equ	r23,23
34	.equ	r24,24
35	.equ	r25,25
36	.equ	r26,26
37	.equ	r27,27
38	.equ	r28,28
39	.equ	r29,29
40	.equ	r30,30
41	.equ	r31,31
42	.equ	r32,32
43	.equ	rsp,r1
44
45
46start_label:
47	e_add16i	r4,r3,27
48	e_add2i. 	r0,0x3456
49	e_add2is 	r1,0x4321
50	e_addi. 	r2,r6,SCI0
51	e_addi 		r3,r5,SCI1
52	e_addic. 	r4,r4,SCI2
53	e_addic 	r7,r8,SCI3
54	e_and2i. 	r9,0xfeed
55	e_and2is. 	r10,5
56	e_andi. 	r11,r13,0x39
57	e_andi 		r12,r15,SCI2
58	e_b 		middle_label
59	e_bl 		extern_subr
60	e_bc 		0,3,start_label
61	e_bcl 		1,15,extern_subr
62	e_cmp16i	r2,0x3333
63	e_cmpi		2,r6,SCI1
64	e_cmph		1,r7,r11
65	e_cmph16i	r12,0xfdef
66	e_cmphl		0,r6,r8
67	e_cmphl16i	r13,0x1234
68	e_cmpl16i 	r1, 0xfee0
69	e_cmpli 	1,r3,SCI3
70	e_crand 	0x1d,3,0
71	e_crandc 	0,2,0x1d
72	e_creqv 	15,16,17
73	e_crnand 	0xf,0,3
74	e_crnor 	0xf,0,3
75	e_cror 		12,13,14
76	e_crorc 	19,18,17
77	e_crxor 	0,0,0
78	e_lbz 		r7,0xffffcc0d(r3)
79	e_lbzu 		r7,-52(r5)
80	e_lha 		r8,0x1ff(r10)
81	e_lhau 		r8,-1(r1)
82	e_lhz		r7,6200(r0)
83	e_lhzu		r7,62(r0)
84	e_li 		r0,0x33333
85	e_lis 		r1,0x3333
86	e_lmw 		r5,24(r3)
87	e_lwz 		r5,10024(r3)
88	e_lwzu 		r6,0x72(r2)
89	e_mcrf 		1,6
90	e_mulli 	r9,r10,SCI0
91	e_mull2i 	r1,0x668
92	e_or2i 		r5,0x2345
93	e_or2is 	r5,0xa345
94	e_ori. 		r7,r9,SCI0
95	e_ori 		r7,r8,SCI1
96	e_rlw 		r18, r22,r0
97	e_rlw. 		r8, r2,r0
98	e_rlwi 		r20,r3,21
99	e_rlwi. 	r2,r3,21
100	e_rlwimi 	r4,r19,13,8,15
101	e_rlwinm 	r4,r1,13,1,17
102	e_slwi 		r12,r19,6
103	e_slwi. 	r12,r10,20
104	e_srwi 		r0,r1,16
105	e_srwi. 	r0,r1,11
106	e_stb 		r3,22000(r1)
107	e_stbu 		r19,-4(r22)
108	e_sth 		r0,666(r21)
109	e_sthu 		r1,-1(r23)
110	e_stmw 		r0,4(r3)
111	e_stw 		r3,16161(r0)
112	e_stwu 		r22,0xffffffee(r4)
113	e_subfic 	r0,r21,SCI2
114	e_subfic. 	r22,r0,SCI3
115	e_xori 		r21,r3,SCI1
116	e_xori. 	r0,r20,SCI0
117middle_label:
118	se_add 		r31,r7
119	se_addi 	r28,0x1f
120	se_and 		r0,r1
121	se_and. 	r1,r0
122	se_andc 	r2, r3
123	se_andi 	r4,0x11
124	se_b 		middle_label
125	se_bl 		extern_subr
126	se_bc 		1,3,not_end_label
127	se_bclri 	r27,0x12
128	se_bctr
129	se_bctrl
130	se_bgeni 	r7,17
131	se_blr
132	se_blrl
133	se_bmaski 	r6,0
134	se_bseti 	r0,1
135	se_btsti 	r4,7
136	se_cmp 		r0,r1
137	se_cmph 	r31,r28
138	se_cmphl 	r1,r25
139	se_cmpi 	r3,22
140	se_cmpl 	r6,r7
141	se_cmpli 	r28,0xc
142	se_extsb 	r1
143	se_extsh 	r2
144	se_extzb 	r30
145	se_extzh 	r24
146not_end_label:
147	se_illegal
148	se_isync
149	se_lbz 		r1,8(r24)
150	se_lhz 		r24,18(r4)
151	se_li		r4,0x4f
152	se_lwz 		r6,60(r0)
153	se_mfar 	r7,r8
154	se_mfctr 	r3
155	se_mflr 	r4
156	se_mr 		r31,r0
157	se_mtar 	r23,r2
158	se_mtctr 	r6
159	se_mtlr 	r31
160	se_mullw	r3,r4
161	se_neg 		r24
162	se_not 		r25
163	se_or		r0,r1
164	se_rfci
165	se_rfdi
166	se_rfi
167	se_sc
168	se_slw 		r5,r6
169	se_slwi 	r7,7
170	se_sraw 	r6,r30
171	se_srawi 	r25,8
172	se_srw 		r30,r0
173	se_srwi 	r29,25
174	se_stb 		r0,10(r2)
175	se_sth 		r1,12(r30)
176	se_stw 		r7,0(r29)
177	se_sub 		r1,r2
178	se_subf 	r29,r26
179	se_subi 	r7,24
180end_label:
181	se_subi. 	r25,19
182	se_bl 		middle_label
183	e_b 		middle_label
184	e_bl 		start_label
185