<opcode name="mono_tls" input="Pop0" output="PushI" args="InlineI" o1="0xF0" o2="0x0D" flow="next" />
<opcode name="mono_icall_addr" input="Pop0" output="PushI" args="InlineI" o1="0xF0" o2="0x0E" flow="next" />
<opcode name="mono_dyn_call" input="Pop0" output="PushI" args="InlineI" o1="0xF0" o2="0x0F" flow="next" />
+<opcode name="mono_memory_barrier" input="Pop0" output="Push0" args="InlineI" o1="0xF0" o2="0x10" flow="next" />
</opdesc>
open OUTPUT, ">$ARGV[1]" || die "Can not create $ARGV[1] file: $!";
my $parser = new XML::Parser (Handlers => {Start => \&handle_opcode});
+print_header();
$parser->parsefile($ARGV[0]);
print_trailer();
close(OUTPUT) || die "Can not close file: $!";
}
+sub print_header {
+print OUTPUT<<EOF;
+/* GENERATED FILE, DO NOT EDIT */
+EOF
+}
+
sub print_trailer {
print OUTPUT<<EOF;
#ifndef OPALIAS
+/* GENERATED FILE, DO NOT EDIT */
OPDEF(CEE_NOP, "nop", Pop0, Push0, InlineNone, X, 1, 0xFF, 0x00, NEXT)
OPDEF(CEE_BREAK, "break", Pop0, Push0, InlineNone, X, 1, 0xFF, 0x01, ERROR)
OPDEF(CEE_LDARG_0, "ldarg.0", Pop0, Push1, InlineNone, X, 1, 0xFF, 0x02, NEXT)