int _slang_execute (const slang_assembly_file *file)\r
{\r
slang_machine mach;\r
-FILE *f;\r
+ FILE *f;\r
\r
mach.ip = 0;\r
mach.sp = SLANG_MACHINE_STACK_SIZE;\r
static_assert(sizeof (GLuint) == 4);\r
static_assert(sizeof (GLuint *) == 4);\r
\r
-dump (file);\r
+ dump (file);\r
\r
-f = fopen ("~mesa-slang-assembly-execution.txt", "w");\r
+ f = fopen ("~mesa-slang-assembly-execution.txt", "w");\r
\r
while (!mach.exit)\r
{\r
slang_assembly *a = file->code + mach.ip;\r
-if (f != NULL)\r
-{\r
-unsigned int i;\r
-dump_instruction (f, a, mach.ip);\r
-fprintf (f, "\t\tsp=%u bp=%u\n", mach.sp, mach.bp);\r
-for (i = mach.sp; i < SLANG_MACHINE_STACK_SIZE; i++)\r
-fprintf (f, "\t%.5u\t%6f\t%u\n", i, mach.stack._float[i], mach.stack._addr[i]);\r
-fflush (f);\r
-}\r
+ if (f != NULL)\r
+ {\r
+ unsigned int i;\r
+ dump_instruction (f, a, mach.ip);\r
+ fprintf (f, "\t\tsp=%u bp=%u\n", mach.sp, mach.bp);\r
+ for (i = mach.sp; i < SLANG_MACHINE_STACK_SIZE; i++)\r
+ fprintf (f, "\t%.5u\t%6f\t%u\n", i, mach.stack._float[i], mach.stack._addr[i]);\r
+ fflush (f);\r
+ }\r
mach.ip++;\r
\r
switch (a->type)\r
}\r
}\r
\r
-if (f != NULL)\r
-fclose (f);\r
+ if (f != NULL)\r
+ fclose (f);\r
\r
return 0;\r
}\r