projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #5714 from alexischr/update_bockbuild
[mono.git]
/
mono
/
mini
/
genmdesc.pl
diff --git
a/mono/mini/genmdesc.pl
b/mono/mini/genmdesc.pl
old mode 100644
(file)
new mode 100755
(executable)
index
8c13a61
..
ae49ecb
--- a/
mono/mini/genmdesc.pl
+++ b/
mono/mini/genmdesc.pl
@@
-20,7
+20,7
@@
sub INST_MAX () {return 6;}
# this must include all the #defines used in mini-ops.h
my @defines = qw (__i386__ __x86_64__ __ppc__ __powerpc__ __ppc64__ __arm__
# this must include all the #defines used in mini-ops.h
my @defines = qw (__i386__ __x86_64__ __ppc__ __powerpc__ __ppc64__ __arm__
- __sparc__ sparc __s390__ s390 __
ia64__ __alpha__ __mips
__);
+ __sparc__ sparc __s390__ s390 __
alpha__ __mips__ __aarch64__ __wasm
__);
my %table =();
my %template_table =();
my @opcodes = ();
my %table =();
my %template_table =();
my @opcodes = ();
@@
-85,7
+85,12
@@
sub load_opcodes
if ($arch =~ "__arm__") {
$arch_define = "TARGET_ARM";
}
if ($arch =~ "__arm__") {
$arch_define = "TARGET_ARM";
}
-
+ if ($arch =~ "__aarch64__") {
+ $arch_define = "TARGET_ARM64";
+ }
+ if ($arch =~ "__wasm__") {
+ $arch_define = "TARGET_WASM";
+ }
parse_file ($arch_define, "$srcdir/mini-ops.h");
return;
$cpp .= " -D$arch_define $srcdir/mini-ops.h|";
parse_file ($arch_define, "$srcdir/mini-ops.h");
return;
$cpp .= " -D$arch_define $srcdir/mini-ops.h|";
@@
-175,6
+180,9
@@
sub build_spec {
if (defined $vals [$i]) {
if ($i == INST_LEN) {
$n = $vals [$i];
if (defined $vals [$i]) {
if ($i == INST_LEN) {
$n = $vals [$i];
+ if ($n =~ /[^0-9]/) {
+ die "Invalid instruction length $n\n";
+ }
if ((defined $vals [INST_NACL]) and $nacl == 1){
$n = $vals [INST_NACL];
}
if ((defined $vals [INST_NACL]) and $nacl == 1){
$n = $vals [INST_NACL];
}
@@
-197,11
+205,11
@@
sub build_table {
my ($fname, $name) = @_;
my $i;
my $idx;
my ($fname, $name) = @_;
my $i;
my $idx;
- my $idx_array = "const guint16 ${name}_idx [] = {\n";
+ my $idx_array = "const guint16
mono_
${name}_idx [] = {\n";
open (OUT, ">$fname") || die "Cannot open file $fname: $!";
print OUT "/* File automatically generated by genmdesc, don't change */\n\n";
open (OUT, ">$fname") || die "Cannot open file $fname: $!";
print OUT "/* File automatically generated by genmdesc, don't change */\n\n";
- print OUT "const char $name [] = {\n";
+ print OUT "const char
mono_
$name [] = {\n";
print OUT "\t\"" . ("\\x0" x INST_MAX) . "\"\t/* null entry */\n";
$idx = 1;
print OUT "\t\"" . ("\\x0" x INST_MAX) . "\"\t/* null entry */\n";
$idx = 1;