1 // RUN: %clang -target mipsel-unknown-linux -S -o - -emit-llvm %s
2 
3 /*
4     This checks that the frontend will accept both
5     enumerated and symbolic Mips register names.
6 
7     Includes:
8     - GPR
9     - FPU
10     - MSA
11 
12     Any bad names will make the frontend choke.
13  */
14 
main()15 main()
16 {
17 
18     __asm__ __volatile__ (".set noat \n\t addi $7,$at,77":::"at");
19     __asm__ __volatile__ ("addi $7,$v0,77":::"v0");
20     __asm__ __volatile__ ("addi $7,$v1,77":::"v1");
21     __asm__ __volatile__ ("addi $7,$a0,77":::"a0");
22     __asm__ __volatile__ ("addi $7,$a1,77":::"a1");
23     __asm__ __volatile__ ("addi $7,$a2,77":::"a2");
24     __asm__ __volatile__ ("addi $7,$a3,77":::"a3");
25     __asm__ __volatile__ ("addi $7,$t0,77":::"t0");
26     __asm__ __volatile__ ("addi $7,$t1,77":::"t1");
27     __asm__ __volatile__ ("addi $7,$t2,77":::"t2");
28     __asm__ __volatile__ ("addi $7,$t3,77":::"t3");
29     __asm__ __volatile__ ("addi $7,$t4,77":::"t4");
30     __asm__ __volatile__ ("addi $7,$t5,77":::"t5");
31     __asm__ __volatile__ ("addi $7,$t6,77":::"t6");
32     __asm__ __volatile__ ("addi $7,$t7,77":::"t7");
33     __asm__ __volatile__ ("addi $7,$s0,77":::"s0");
34     __asm__ __volatile__ ("addi $7,$s1,77":::"s1");
35     __asm__ __volatile__ ("addi $7,$s2,77":::"s2");
36     __asm__ __volatile__ ("addi $7,$s3,77":::"s3");
37     __asm__ __volatile__ ("addi $7,$s4,77":::"s4");
38     __asm__ __volatile__ ("addi $7,$s5,77":::"s5");
39     __asm__ __volatile__ ("addi $7,$s6,77":::"s6");
40     __asm__ __volatile__ ("addi $7,$s7,77":::"s7");
41     __asm__ __volatile__ ("addi $7,$t8,77":::"t8");
42     __asm__ __volatile__ ("addi $7,$t9,77":::"t9");
43     __asm__ __volatile__ ("addi $7,$k0,77":::"k0");
44     __asm__ __volatile__ ("addi $7,$k1,77":::"k1");
45     __asm__ __volatile__ ("addi $7,$gp,77":::"gp");
46     __asm__ __volatile__ ("addi $7,$sp,77":::"sp");
47     __asm__ __volatile__ ("addi $7,$fp,77":::"fp");
48     __asm__ __volatile__ ("addi $7,$sp,77":::"$sp");
49     __asm__ __volatile__ ("addi $7,$fp,77":::"$fp");
50     __asm__ __volatile__ ("addi $7,$ra,77":::"ra");
51 
52     __asm__ __volatile__ ("addi $7,$0,77":::"$0");
53     __asm__ __volatile__ (".set noat \n\t addi $7,$1,77":::"$1");
54     __asm__ __volatile__ ("addi $7,$2,77":::"$2");
55     __asm__ __volatile__ ("addi $7,$3,77":::"$3");
56     __asm__ __volatile__ ("addi $7,$4,77":::"$4");
57     __asm__ __volatile__ ("addi $7,$5,77":::"$5");
58     __asm__ __volatile__ ("addi $7,$6,77":::"$6");
59     __asm__ __volatile__ ("addi $7,$7,77":::"$7");
60     __asm__ __volatile__ ("addi $7,$8,77":::"$8");
61     __asm__ __volatile__ ("addi $7,$9,77":::"$9");
62     __asm__ __volatile__ ("addi $7,$10,77":::"$10");
63     __asm__ __volatile__ ("addi $7,$11,77":::"$11");
64     __asm__ __volatile__ ("addi $7,$12,77":::"$12");
65     __asm__ __volatile__ ("addi $7,$13,77":::"$13");
66     __asm__ __volatile__ ("addi $7,$14,77":::"$14");
67     __asm__ __volatile__ ("addi $7,$15,77":::"$15");
68     __asm__ __volatile__ ("addi $7,$16,77":::"$16");
69     __asm__ __volatile__ ("addi $7,$17,77":::"$17");
70     __asm__ __volatile__ ("addi $7,$18,77":::"$18");
71     __asm__ __volatile__ ("addi $7,$19,77":::"$19");
72     __asm__ __volatile__ ("addi $7,$20,77":::"$20");
73     __asm__ __volatile__ ("addi $7,$21,77":::"$21");
74     __asm__ __volatile__ ("addi $7,$22,77":::"$22");
75     __asm__ __volatile__ ("addi $7,$23,77":::"$23");
76     __asm__ __volatile__ ("addi $7,$24,77":::"$24");
77     __asm__ __volatile__ ("addi $7,$25,77":::"$25");
78     __asm__ __volatile__ ("addi $7,$26,77":::"$26");
79     __asm__ __volatile__ ("addi $7,$27,77":::"$27");
80     __asm__ __volatile__ ("addi $7,$28,77":::"$28");
81     __asm__ __volatile__ ("addi $7,$29,77":::"$29");
82     __asm__ __volatile__ ("addi $7,$30,77":::"$30");
83     __asm__ __volatile__ ("addi $7,$31,77":::"$31");
84 
85     __asm__ __volatile__ ("fadd.s $f0,77":::"$f0");
86     __asm__ __volatile__ ("fadd.s $f1,77":::"$f1");
87     __asm__ __volatile__ ("fadd.s $f2,77":::"$f2");
88     __asm__ __volatile__ ("fadd.s $f3,77":::"$f3");
89     __asm__ __volatile__ ("fadd.s $f4,77":::"$f4");
90     __asm__ __volatile__ ("fadd.s $f5,77":::"$f5");
91     __asm__ __volatile__ ("fadd.s $f6,77":::"$f6");
92     __asm__ __volatile__ ("fadd.s $f7,77":::"$f7");
93     __asm__ __volatile__ ("fadd.s $f8,77":::"$f8");
94     __asm__ __volatile__ ("fadd.s $f9,77":::"$f9");
95     __asm__ __volatile__ ("fadd.s $f10,77":::"$f10");
96     __asm__ __volatile__ ("fadd.s $f11,77":::"$f11");
97     __asm__ __volatile__ ("fadd.s $f12,77":::"$f12");
98     __asm__ __volatile__ ("fadd.s $f13,77":::"$f13");
99     __asm__ __volatile__ ("fadd.s $f14,77":::"$f14");
100     __asm__ __volatile__ ("fadd.s $f15,77":::"$f15");
101     __asm__ __volatile__ ("fadd.s $f16,77":::"$f16");
102     __asm__ __volatile__ ("fadd.s $f17,77":::"$f17");
103     __asm__ __volatile__ ("fadd.s $f18,77":::"$f18");
104     __asm__ __volatile__ ("fadd.s $f19,77":::"$f19");
105     __asm__ __volatile__ ("fadd.s $f20,77":::"$f20");
106     __asm__ __volatile__ ("fadd.s $f21,77":::"$f21");
107     __asm__ __volatile__ ("fadd.s $f22,77":::"$f22");
108     __asm__ __volatile__ ("fadd.s $f23,77":::"$f23");
109     __asm__ __volatile__ ("fadd.s $f24,77":::"$f24");
110     __asm__ __volatile__ ("fadd.s $f25,77":::"$f25");
111     __asm__ __volatile__ ("fadd.s $f26,77":::"$f26");
112     __asm__ __volatile__ ("fadd.s $f27,77":::"$f27");
113     __asm__ __volatile__ ("fadd.s $f28,77":::"$f28");
114     __asm__ __volatile__ ("fadd.s $f29,77":::"$f29");
115     __asm__ __volatile__ ("fadd.s $f30,77":::"$f30");
116     __asm__ __volatile__ ("fadd.s $f31,77":::"$f31");
117 
118     __asm__ __volatile__ ("ldi.w $w0,77":::"$w0");
119     __asm__ __volatile__ ("ldi.w $w1,77":::"$w1");
120     __asm__ __volatile__ ("ldi.w $w2,77":::"$w2");
121     __asm__ __volatile__ ("ldi.w $w3,77":::"$w3");
122     __asm__ __volatile__ ("ldi.w $w4,77":::"$w4");
123     __asm__ __volatile__ ("ldi.w $w5,77":::"$w5");
124     __asm__ __volatile__ ("ldi.w $w6,77":::"$w6");
125     __asm__ __volatile__ ("ldi.w $w7,77":::"$w7");
126     __asm__ __volatile__ ("ldi.w $w8,77":::"$w8");
127     __asm__ __volatile__ ("ldi.w $w9,77":::"$w9");
128     __asm__ __volatile__ ("ldi.w $w10,77":::"$w10");
129     __asm__ __volatile__ ("ldi.w $w11,77":::"$w10");
130     __asm__ __volatile__ ("ldi.w $w12,77":::"$w12");
131     __asm__ __volatile__ ("ldi.w $w13,77":::"$w13");
132     __asm__ __volatile__ ("ldi.w $w14,77":::"$w14");
133     __asm__ __volatile__ ("ldi.w $w15,77":::"$w15");
134     __asm__ __volatile__ ("ldi.w $w16,77":::"$w16");
135     __asm__ __volatile__ ("ldi.w $w17,77":::"$w17");
136     __asm__ __volatile__ ("ldi.w $w18,77":::"$w18");
137     __asm__ __volatile__ ("ldi.w $w19,77":::"$w19");
138     __asm__ __volatile__ ("ldi.w $w20,77":::"$w20");
139     __asm__ __volatile__ ("ldi.w $w21,77":::"$w21");
140     __asm__ __volatile__ ("ldi.w $w22,77":::"$w22");
141     __asm__ __volatile__ ("ldi.w $w23,77":::"$w23");
142     __asm__ __volatile__ ("ldi.w $w24,77":::"$w24");
143     __asm__ __volatile__ ("ldi.w $w25,77":::"$w25");
144     __asm__ __volatile__ ("ldi.w $w26,77":::"$w26");
145     __asm__ __volatile__ ("ldi.w $w27,77":::"$w27");
146     __asm__ __volatile__ ("ldi.w $w28,77":::"$w28");
147     __asm__ __volatile__ ("ldi.w $w29,77":::"$w29");
148     __asm__ __volatile__ ("ldi.w $w30,77":::"$w30");
149     __asm__ __volatile__ ("ldi.w $w31,77":::"$w31");
150 }
151