summaryrefslogtreecommitdiff
path: root/test/data/parse
diff options
context:
space:
mode:
Diffstat (limited to 'test/data/parse')
-rwxr-xr-xtest/data/parse/makeopv.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/data/parse/makeopv.pl b/test/data/parse/makeopv.pl
new file mode 100755
index 0000000..8961d48
--- /dev/null
+++ b/test/data/parse/makeopv.pl
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+die "Usage: makeopv.pl <opcode> <flags> <value>\n" if (@ARGV != 3);
+
+my ($opcode, $flags, $value) = @ARGV;
+
+printf("0x%.8x\n", hex($opcode) | hex($flags) << 10 | hex($value) << 18);
+