ref: d128c76aca17cf3b340c48175d8cdfaaeff40657
dir: /spirvd.c/
#include <u.h>
#include <libc.h>
#include "vm.h"
int debug = 0;
int disassemble = 1;
u32int magic = 0x07230203;
u32int testprog[2048];
void
main(int argc, char **argv)
{
int r = 0;
ARGBEGIN{
case 'd':
debug++;
break;
}ARGEND;
if (argc) {
r = open(argv[0], OREAD);
}
read(r, testprog, 2048);
if (*testprog != magic) {
fprint(2, "bad magic! got: %x\n", *testprog);
return;
}
vmrun(testprog+1);
}