3 $#ARGV==0 or die "gimme a filename\n";
9 open(HEADER,">$file.h");
10 open(SOURCE,">$file.c");
12 print HEADER "#ifndef $file\n";
13 print HEADER "#define $file\n";
14 print HEADER "#include <geekos/vmcs.h>\n";
16 print SOURCE "#include <geekos/$file.h>\n";
19 if (/\#define\s+(\S+)\s+/) {
25 GenPrintAllCode(@list);
27 print HEADER "#endif\n";
34 void Set_$name(uint_t val) { VMCS_WRITE($name,val); }
35 uint_t Get_$name() { uint_t rc; VMCS_READ($name,&rc); return rc; }
37 void Print_$name() { PrintTrace("$name = %x\\n", Get_$name()); }
44 void Set_$name(uint_t val);
57 print SOURCE "void PrintTrace_VMCS_ALL() {\n";
58 while (my $name=shift) {
59 print SOURCE " PrintTrace_$name();\n";
62 print HEADER "void PrintTrace_VMCS_ALL();\n";