summaryrefslogtreecommitdiff
path: root/test/data/parse/makeopv.pl
blob: 8961d48efde2eacc6236fb99c3922c8f072d7edb (plain)
1
2
3
4
5
6
7
8
9
10
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);