1*fa7ce0b0SPaolo Bonzini #include <stdio.h>
2*fa7ce0b0SPaolo Bonzini #include <stdint.h>
3*fa7ce0b0SPaolo Bonzini #include <stdlib.h>
4*fa7ce0b0SPaolo Bonzini #include <string.h>
5*fa7ce0b0SPaolo Bonzini
6*fa7ce0b0SPaolo Bonzini #ifndef TEST_FILE
7*fa7ce0b0SPaolo Bonzini #define TEST_FILE "test-mmx.h"
8*fa7ce0b0SPaolo Bonzini #endif
9*fa7ce0b0SPaolo Bonzini #ifndef EMMS
10*fa7ce0b0SPaolo Bonzini #define EMMS "emms"
11*fa7ce0b0SPaolo Bonzini #endif
12*fa7ce0b0SPaolo Bonzini
13*fa7ce0b0SPaolo Bonzini typedef void (*testfn)(void);
14*fa7ce0b0SPaolo Bonzini
15*fa7ce0b0SPaolo Bonzini typedef struct {
16*fa7ce0b0SPaolo Bonzini uint64_t q0, q1;
17*fa7ce0b0SPaolo Bonzini } __attribute__((aligned(16))) v2di;
18*fa7ce0b0SPaolo Bonzini
19*fa7ce0b0SPaolo Bonzini typedef struct {
20*fa7ce0b0SPaolo Bonzini uint64_t mm[8];
21*fa7ce0b0SPaolo Bonzini v2di xmm[8];
22*fa7ce0b0SPaolo Bonzini uint64_t r[16];
23*fa7ce0b0SPaolo Bonzini uint64_t flags;
24*fa7ce0b0SPaolo Bonzini uint32_t ff;
25*fa7ce0b0SPaolo Bonzini uint64_t pad;
26*fa7ce0b0SPaolo Bonzini v2di mem[4];
27*fa7ce0b0SPaolo Bonzini v2di mem0[4];
28*fa7ce0b0SPaolo Bonzini } reg_state;
29*fa7ce0b0SPaolo Bonzini
30*fa7ce0b0SPaolo Bonzini typedef struct {
31*fa7ce0b0SPaolo Bonzini int n;
32*fa7ce0b0SPaolo Bonzini testfn fn;
33*fa7ce0b0SPaolo Bonzini const char *s;
34*fa7ce0b0SPaolo Bonzini reg_state *init;
35*fa7ce0b0SPaolo Bonzini } TestDef;
36*fa7ce0b0SPaolo Bonzini
37*fa7ce0b0SPaolo Bonzini reg_state initI;
38*fa7ce0b0SPaolo Bonzini reg_state initF32;
39*fa7ce0b0SPaolo Bonzini reg_state initF64;
40*fa7ce0b0SPaolo Bonzini
dump_mmx(int n,const uint64_t * r,int ff)41*fa7ce0b0SPaolo Bonzini static void dump_mmx(int n, const uint64_t *r, int ff)
42*fa7ce0b0SPaolo Bonzini {
43*fa7ce0b0SPaolo Bonzini if (ff == 32) {
44*fa7ce0b0SPaolo Bonzini float v[2];
45*fa7ce0b0SPaolo Bonzini memcpy(v, r, sizeof(v));
46*fa7ce0b0SPaolo Bonzini printf("MM%d = %016lx %8g %8g\n", n, *r, v[1], v[0]);
47*fa7ce0b0SPaolo Bonzini } else {
48*fa7ce0b0SPaolo Bonzini printf("MM%d = %016lx\n", n, *r);
49*fa7ce0b0SPaolo Bonzini }
50*fa7ce0b0SPaolo Bonzini }
51*fa7ce0b0SPaolo Bonzini
dump_xmm(const char * name,int n,const v2di * r,int ff)52*fa7ce0b0SPaolo Bonzini static void dump_xmm(const char *name, int n, const v2di *r, int ff)
53*fa7ce0b0SPaolo Bonzini {
54*fa7ce0b0SPaolo Bonzini printf("%s%d = %016lx %016lx\n",
55*fa7ce0b0SPaolo Bonzini name, n, r->q1, r->q0);
56*fa7ce0b0SPaolo Bonzini if (ff == 32) {
57*fa7ce0b0SPaolo Bonzini float v[4];
58*fa7ce0b0SPaolo Bonzini memcpy(v, r, sizeof(v));
59*fa7ce0b0SPaolo Bonzini printf(" %8g %8g %8g %8g\n",
60*fa7ce0b0SPaolo Bonzini v[3], v[2], v[1], v[0]);
61*fa7ce0b0SPaolo Bonzini }
62*fa7ce0b0SPaolo Bonzini }
63*fa7ce0b0SPaolo Bonzini
dump_regs(reg_state * s,int ff)64*fa7ce0b0SPaolo Bonzini static void dump_regs(reg_state *s, int ff)
65*fa7ce0b0SPaolo Bonzini {
66*fa7ce0b0SPaolo Bonzini int i;
67*fa7ce0b0SPaolo Bonzini
68*fa7ce0b0SPaolo Bonzini for (i = 0; i < 8; i++) {
69*fa7ce0b0SPaolo Bonzini dump_mmx(i, &s->mm[i], ff);
70*fa7ce0b0SPaolo Bonzini }
71*fa7ce0b0SPaolo Bonzini for (i = 0; i < 4; i++) {
72*fa7ce0b0SPaolo Bonzini dump_xmm("mem", i, &s->mem0[i], 0);
73*fa7ce0b0SPaolo Bonzini }
74*fa7ce0b0SPaolo Bonzini }
75*fa7ce0b0SPaolo Bonzini
compare_state(const reg_state * a,const reg_state * b)76*fa7ce0b0SPaolo Bonzini static void compare_state(const reg_state *a, const reg_state *b)
77*fa7ce0b0SPaolo Bonzini {
78*fa7ce0b0SPaolo Bonzini int i;
79*fa7ce0b0SPaolo Bonzini for (i = 0; i < 8; i++) {
80*fa7ce0b0SPaolo Bonzini if (a->mm[i] != b->mm[i]) {
81*fa7ce0b0SPaolo Bonzini printf("MM%d = %016lx\n", i, b->mm[i]);
82*fa7ce0b0SPaolo Bonzini }
83*fa7ce0b0SPaolo Bonzini }
84*fa7ce0b0SPaolo Bonzini for (i = 0; i < 16; i++) {
85*fa7ce0b0SPaolo Bonzini if (a->r[i] != b->r[i]) {
86*fa7ce0b0SPaolo Bonzini printf("r%d = %016lx\n", i, b->r[i]);
87*fa7ce0b0SPaolo Bonzini }
88*fa7ce0b0SPaolo Bonzini }
89*fa7ce0b0SPaolo Bonzini for (i = 0; i < 8; i++) {
90*fa7ce0b0SPaolo Bonzini if (memcmp(&a->xmm[i], &b->xmm[i], 8)) {
91*fa7ce0b0SPaolo Bonzini dump_xmm("xmm", i, &b->xmm[i], a->ff);
92*fa7ce0b0SPaolo Bonzini }
93*fa7ce0b0SPaolo Bonzini }
94*fa7ce0b0SPaolo Bonzini for (i = 0; i < 4; i++) {
95*fa7ce0b0SPaolo Bonzini if (memcmp(&a->mem0[i], &a->mem[i], 16)) {
96*fa7ce0b0SPaolo Bonzini dump_xmm("mem", i, &a->mem[i], a->ff);
97*fa7ce0b0SPaolo Bonzini }
98*fa7ce0b0SPaolo Bonzini }
99*fa7ce0b0SPaolo Bonzini if (a->flags != b->flags) {
100*fa7ce0b0SPaolo Bonzini printf("FLAGS = %016lx\n", b->flags);
101*fa7ce0b0SPaolo Bonzini }
102*fa7ce0b0SPaolo Bonzini }
103*fa7ce0b0SPaolo Bonzini
104*fa7ce0b0SPaolo Bonzini #define LOADMM(r, o) "movq " #r ", " #o "[%0]\n\t"
105*fa7ce0b0SPaolo Bonzini #define LOADXMM(r, o) "movdqa " #r ", " #o "[%0]\n\t"
106*fa7ce0b0SPaolo Bonzini #define STOREMM(r, o) "movq " #o "[%1], " #r "\n\t"
107*fa7ce0b0SPaolo Bonzini #define STOREXMM(r, o) "movdqa " #o "[%1], " #r "\n\t"
108*fa7ce0b0SPaolo Bonzini #define MMREG(F) \
109*fa7ce0b0SPaolo Bonzini F(mm0, 0x00) \
110*fa7ce0b0SPaolo Bonzini F(mm1, 0x08) \
111*fa7ce0b0SPaolo Bonzini F(mm2, 0x10) \
112*fa7ce0b0SPaolo Bonzini F(mm3, 0x18) \
113*fa7ce0b0SPaolo Bonzini F(mm4, 0x20) \
114*fa7ce0b0SPaolo Bonzini F(mm5, 0x28) \
115*fa7ce0b0SPaolo Bonzini F(mm6, 0x30) \
116*fa7ce0b0SPaolo Bonzini F(mm7, 0x38)
117*fa7ce0b0SPaolo Bonzini #define XMMREG(F) \
118*fa7ce0b0SPaolo Bonzini F(xmm0, 0x040) \
119*fa7ce0b0SPaolo Bonzini F(xmm1, 0x050) \
120*fa7ce0b0SPaolo Bonzini F(xmm2, 0x060) \
121*fa7ce0b0SPaolo Bonzini F(xmm3, 0x070) \
122*fa7ce0b0SPaolo Bonzini F(xmm4, 0x080) \
123*fa7ce0b0SPaolo Bonzini F(xmm5, 0x090) \
124*fa7ce0b0SPaolo Bonzini F(xmm6, 0x0a0) \
125*fa7ce0b0SPaolo Bonzini F(xmm7, 0x0b0)
126*fa7ce0b0SPaolo Bonzini #define LOADREG(r, o) "mov " #r ", " #o "[rax]\n\t"
127*fa7ce0b0SPaolo Bonzini #define STOREREG(r, o) "mov " #o "[rax], " #r "\n\t"
128*fa7ce0b0SPaolo Bonzini #define REG(F) \
129*fa7ce0b0SPaolo Bonzini F(rbx, 0xc8) \
130*fa7ce0b0SPaolo Bonzini F(rcx, 0xd0) \
131*fa7ce0b0SPaolo Bonzini F(rdx, 0xd8) \
132*fa7ce0b0SPaolo Bonzini F(rsi, 0xe0) \
133*fa7ce0b0SPaolo Bonzini F(rdi, 0xe8) \
134*fa7ce0b0SPaolo Bonzini F(r8, 0x100) \
135*fa7ce0b0SPaolo Bonzini F(r9, 0x108) \
136*fa7ce0b0SPaolo Bonzini F(r10, 0x110) \
137*fa7ce0b0SPaolo Bonzini F(r11, 0x118) \
138*fa7ce0b0SPaolo Bonzini F(r12, 0x120) \
139*fa7ce0b0SPaolo Bonzini F(r13, 0x128) \
140*fa7ce0b0SPaolo Bonzini F(r14, 0x130) \
141*fa7ce0b0SPaolo Bonzini F(r15, 0x138) \
142*fa7ce0b0SPaolo Bonzini
run_test(const TestDef * t)143*fa7ce0b0SPaolo Bonzini static void run_test(const TestDef *t)
144*fa7ce0b0SPaolo Bonzini {
145*fa7ce0b0SPaolo Bonzini reg_state result;
146*fa7ce0b0SPaolo Bonzini reg_state *init = t->init;
147*fa7ce0b0SPaolo Bonzini memcpy(init->mem, init->mem0, sizeof(init->mem));
148*fa7ce0b0SPaolo Bonzini printf("%5d %s\n", t->n, t->s);
149*fa7ce0b0SPaolo Bonzini asm volatile(
150*fa7ce0b0SPaolo Bonzini MMREG(LOADMM)
151*fa7ce0b0SPaolo Bonzini XMMREG(LOADXMM)
152*fa7ce0b0SPaolo Bonzini "sub rsp, 128\n\t"
153*fa7ce0b0SPaolo Bonzini "push rax\n\t"
154*fa7ce0b0SPaolo Bonzini "push rbx\n\t"
155*fa7ce0b0SPaolo Bonzini "push rcx\n\t"
156*fa7ce0b0SPaolo Bonzini "push rdx\n\t"
157*fa7ce0b0SPaolo Bonzini "push %1\n\t"
158*fa7ce0b0SPaolo Bonzini "push %2\n\t"
159*fa7ce0b0SPaolo Bonzini "mov rax, %0\n\t"
160*fa7ce0b0SPaolo Bonzini "pushf\n\t"
161*fa7ce0b0SPaolo Bonzini "pop rbx\n\t"
162*fa7ce0b0SPaolo Bonzini "shr rbx, 8\n\t"
163*fa7ce0b0SPaolo Bonzini "shl rbx, 8\n\t"
164*fa7ce0b0SPaolo Bonzini "mov rcx, 0x140[rax]\n\t"
165*fa7ce0b0SPaolo Bonzini "and rcx, 0xff\n\t"
166*fa7ce0b0SPaolo Bonzini "or rbx, rcx\n\t"
167*fa7ce0b0SPaolo Bonzini "push rbx\n\t"
168*fa7ce0b0SPaolo Bonzini "popf\n\t"
169*fa7ce0b0SPaolo Bonzini REG(LOADREG)
170*fa7ce0b0SPaolo Bonzini "mov rax, 0xc0[rax]\n\t"
171*fa7ce0b0SPaolo Bonzini "call [rsp]\n\t"
172*fa7ce0b0SPaolo Bonzini "mov [rsp], rax\n\t"
173*fa7ce0b0SPaolo Bonzini "mov rax, 8[rsp]\n\t"
174*fa7ce0b0SPaolo Bonzini REG(STOREREG)
175*fa7ce0b0SPaolo Bonzini "mov rbx, [rsp]\n\t"
176*fa7ce0b0SPaolo Bonzini "mov 0xc0[rax], rbx\n\t"
177*fa7ce0b0SPaolo Bonzini "mov rbx, 0\n\t"
178*fa7ce0b0SPaolo Bonzini "mov 0xf0[rax], rbx\n\t"
179*fa7ce0b0SPaolo Bonzini "mov 0xf8[rax], rbx\n\t"
180*fa7ce0b0SPaolo Bonzini "pushf\n\t"
181*fa7ce0b0SPaolo Bonzini "pop rbx\n\t"
182*fa7ce0b0SPaolo Bonzini "and rbx, 0xff\n\t"
183*fa7ce0b0SPaolo Bonzini "mov 0x140[rax], rbx\n\t"
184*fa7ce0b0SPaolo Bonzini "add rsp, 16\n\t"
185*fa7ce0b0SPaolo Bonzini "pop rdx\n\t"
186*fa7ce0b0SPaolo Bonzini "pop rcx\n\t"
187*fa7ce0b0SPaolo Bonzini "pop rbx\n\t"
188*fa7ce0b0SPaolo Bonzini "pop rax\n\t"
189*fa7ce0b0SPaolo Bonzini "add rsp, 128\n\t"
190*fa7ce0b0SPaolo Bonzini MMREG(STOREMM)
191*fa7ce0b0SPaolo Bonzini EMMS "\n\t"
192*fa7ce0b0SPaolo Bonzini XMMREG(STOREXMM)
193*fa7ce0b0SPaolo Bonzini : : "r"(init), "r"(&result), "r"(t->fn)
194*fa7ce0b0SPaolo Bonzini : "memory", "cc",
195*fa7ce0b0SPaolo Bonzini "rsi", "rdi",
196*fa7ce0b0SPaolo Bonzini "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
197*fa7ce0b0SPaolo Bonzini "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7",
198*fa7ce0b0SPaolo Bonzini "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5",
199*fa7ce0b0SPaolo Bonzini "xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11",
200*fa7ce0b0SPaolo Bonzini "xmm12", "xmm13", "xmm14", "xmm15"
201*fa7ce0b0SPaolo Bonzini );
202*fa7ce0b0SPaolo Bonzini compare_state(init, &result);
203*fa7ce0b0SPaolo Bonzini }
204*fa7ce0b0SPaolo Bonzini
205*fa7ce0b0SPaolo Bonzini #define TEST(n, cmd, type) \
206*fa7ce0b0SPaolo Bonzini static void __attribute__((naked)) test_##n(void) \
207*fa7ce0b0SPaolo Bonzini { \
208*fa7ce0b0SPaolo Bonzini asm volatile(cmd); \
209*fa7ce0b0SPaolo Bonzini asm volatile("ret"); \
210*fa7ce0b0SPaolo Bonzini }
211*fa7ce0b0SPaolo Bonzini #include TEST_FILE
212*fa7ce0b0SPaolo Bonzini
213*fa7ce0b0SPaolo Bonzini
214*fa7ce0b0SPaolo Bonzini static const TestDef test_table[] = {
215*fa7ce0b0SPaolo Bonzini #define TEST(n, cmd, type) {n, test_##n, cmd, &init##type},
216*fa7ce0b0SPaolo Bonzini #include TEST_FILE
217*fa7ce0b0SPaolo Bonzini {-1, NULL, "", NULL}
218*fa7ce0b0SPaolo Bonzini };
219*fa7ce0b0SPaolo Bonzini
run_all(void)220*fa7ce0b0SPaolo Bonzini static void run_all(void)
221*fa7ce0b0SPaolo Bonzini {
222*fa7ce0b0SPaolo Bonzini const TestDef *t;
223*fa7ce0b0SPaolo Bonzini for (t = test_table; t->fn; t++) {
224*fa7ce0b0SPaolo Bonzini run_test(t);
225*fa7ce0b0SPaolo Bonzini }
226*fa7ce0b0SPaolo Bonzini }
227*fa7ce0b0SPaolo Bonzini
228*fa7ce0b0SPaolo Bonzini #define ARRAY_LEN(x) (sizeof(x) / sizeof(x[0]))
229*fa7ce0b0SPaolo Bonzini
230*fa7ce0b0SPaolo Bonzini float val_f32[] = {2.0, -1.0, 4.8, 0.8, 3, -42.0, 5e6, 7.5, 8.3};
231*fa7ce0b0SPaolo Bonzini uint64_t val_i64[] = {
232*fa7ce0b0SPaolo Bonzini 0x3d6b3b6a9e4118f2lu, 0x355ae76d2774d78clu,
233*fa7ce0b0SPaolo Bonzini 0xd851c54a56bf1f29lu, 0x4a84d1d50bf4c4fflu,
234*fa7ce0b0SPaolo Bonzini 0x5826475e2c5fd799lu, 0xfd32edc01243f5e9lu,
235*fa7ce0b0SPaolo Bonzini };
236*fa7ce0b0SPaolo Bonzini
237*fa7ce0b0SPaolo Bonzini v2di deadbeef = {0xa5a5a5a5deadbeefull, 0xa5a5a5a5deadbeefull};
238*fa7ce0b0SPaolo Bonzini
init_f32reg(uint64_t * r)239*fa7ce0b0SPaolo Bonzini void init_f32reg(uint64_t *r)
240*fa7ce0b0SPaolo Bonzini {
241*fa7ce0b0SPaolo Bonzini static int n;
242*fa7ce0b0SPaolo Bonzini float v[2];
243*fa7ce0b0SPaolo Bonzini int i;
244*fa7ce0b0SPaolo Bonzini for (i = 0; i < 2; i++) {
245*fa7ce0b0SPaolo Bonzini v[i] = val_f32[n++];
246*fa7ce0b0SPaolo Bonzini if (n == ARRAY_LEN(val_f32)) {
247*fa7ce0b0SPaolo Bonzini n = 0;
248*fa7ce0b0SPaolo Bonzini }
249*fa7ce0b0SPaolo Bonzini }
250*fa7ce0b0SPaolo Bonzini memcpy(r, v, sizeof(*r));
251*fa7ce0b0SPaolo Bonzini }
252*fa7ce0b0SPaolo Bonzini
init_intreg(uint64_t * r)253*fa7ce0b0SPaolo Bonzini void init_intreg(uint64_t *r)
254*fa7ce0b0SPaolo Bonzini {
255*fa7ce0b0SPaolo Bonzini static uint64_t mask;
256*fa7ce0b0SPaolo Bonzini static int n;
257*fa7ce0b0SPaolo Bonzini
258*fa7ce0b0SPaolo Bonzini *r = val_i64[n] ^ mask;
259*fa7ce0b0SPaolo Bonzini n++;
260*fa7ce0b0SPaolo Bonzini if (n == ARRAY_LEN(val_i64)) {
261*fa7ce0b0SPaolo Bonzini n = 0;
262*fa7ce0b0SPaolo Bonzini mask *= 0x104C11DB7;
263*fa7ce0b0SPaolo Bonzini }
264*fa7ce0b0SPaolo Bonzini }
265*fa7ce0b0SPaolo Bonzini
init_all(reg_state * s)266*fa7ce0b0SPaolo Bonzini static void init_all(reg_state *s)
267*fa7ce0b0SPaolo Bonzini {
268*fa7ce0b0SPaolo Bonzini int i;
269*fa7ce0b0SPaolo Bonzini
270*fa7ce0b0SPaolo Bonzini for (i = 0; i < 16; i++) {
271*fa7ce0b0SPaolo Bonzini init_intreg(&s->r[i]);
272*fa7ce0b0SPaolo Bonzini }
273*fa7ce0b0SPaolo Bonzini s->r[3] = (uint64_t)&s->mem[0]; /* rdx */
274*fa7ce0b0SPaolo Bonzini s->r[5] = (uint64_t)&s->mem[2]; /* rdi */
275*fa7ce0b0SPaolo Bonzini s->r[6] = 0;
276*fa7ce0b0SPaolo Bonzini s->r[7] = 0;
277*fa7ce0b0SPaolo Bonzini s->flags = 2;
278*fa7ce0b0SPaolo Bonzini for (i = 0; i < 8; i++) {
279*fa7ce0b0SPaolo Bonzini s->xmm[i] = deadbeef;
280*fa7ce0b0SPaolo Bonzini memcpy(&s->mm[i], &s->xmm[i], sizeof(s->mm[i]));
281*fa7ce0b0SPaolo Bonzini }
282*fa7ce0b0SPaolo Bonzini for (i = 0; i < 2; i++) {
283*fa7ce0b0SPaolo Bonzini s->mem0[i] = deadbeef;
284*fa7ce0b0SPaolo Bonzini }
285*fa7ce0b0SPaolo Bonzini }
286*fa7ce0b0SPaolo Bonzini
main(int argc,char * argv[])287*fa7ce0b0SPaolo Bonzini int main(int argc, char *argv[])
288*fa7ce0b0SPaolo Bonzini {
289*fa7ce0b0SPaolo Bonzini init_all(&initI);
290*fa7ce0b0SPaolo Bonzini init_intreg(&initI.mm[5]);
291*fa7ce0b0SPaolo Bonzini init_intreg(&initI.mm[6]);
292*fa7ce0b0SPaolo Bonzini init_intreg(&initI.mm[7]);
293*fa7ce0b0SPaolo Bonzini init_intreg(&initI.mem0[1].q0);
294*fa7ce0b0SPaolo Bonzini init_intreg(&initI.mem0[1].q1);
295*fa7ce0b0SPaolo Bonzini printf("Int:\n");
296*fa7ce0b0SPaolo Bonzini dump_regs(&initI, 0);
297*fa7ce0b0SPaolo Bonzini
298*fa7ce0b0SPaolo Bonzini init_all(&initF32);
299*fa7ce0b0SPaolo Bonzini init_f32reg(&initF32.mm[5]);
300*fa7ce0b0SPaolo Bonzini init_f32reg(&initF32.mm[6]);
301*fa7ce0b0SPaolo Bonzini init_f32reg(&initF32.mm[7]);
302*fa7ce0b0SPaolo Bonzini init_f32reg(&initF32.mem0[1].q0);
303*fa7ce0b0SPaolo Bonzini init_f32reg(&initF32.mem0[1].q1);
304*fa7ce0b0SPaolo Bonzini initF32.ff = 32;
305*fa7ce0b0SPaolo Bonzini printf("F32:\n");
306*fa7ce0b0SPaolo Bonzini dump_regs(&initF32, 32);
307*fa7ce0b0SPaolo Bonzini
308*fa7ce0b0SPaolo Bonzini if (argc > 1) {
309*fa7ce0b0SPaolo Bonzini int n = atoi(argv[1]);
310*fa7ce0b0SPaolo Bonzini run_test(&test_table[n]);
311*fa7ce0b0SPaolo Bonzini } else {
312*fa7ce0b0SPaolo Bonzini run_all();
313*fa7ce0b0SPaolo Bonzini }
314*fa7ce0b0SPaolo Bonzini return 0;
315*fa7ce0b0SPaolo Bonzini }
316