X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=opcode.pl;h=43d98ae8af50b88832c18866e5c54e4a7515ec32;hb=23f3aea032e3289acf8e6a178372c27e8e03f4a0;hp=fc661caaf4c05e1e1c4b305e3c03c5503d2d697c;hpb=16fe6d5906f6eff9da00cb861a7054a440d1f6eb;p=p5sagit%2Fp5-mst-13.2.git diff --git a/opcode.pl b/opcode.pl index fc661ca..43d98ae 100755 --- a/opcode.pl +++ b/opcode.pl @@ -193,6 +193,9 @@ END '}', 13, # loopexop ); +my %OP_IS_SOCKET; +my %OP_IS_FILETEST; + for (@ops) { $argsum = 0; $flags = $flags{$_}; @@ -210,7 +213,12 @@ for (@ops) { $argsum |= $opclass{$1} << 9; $mul = 0x2000; # 2 ^ OASHIFT for $arg (split(' ',$args{$_})) { + if ($arg =~ /^F/) { + $OP_IS_SOCKET{$_} = 1 if $arg =~ s/s//; + $OP_IS_FILETEST{$_} = 1 if $arg =~ s/-//; + } $argnum = ($arg =~ s/\?//) ? 8 : 0; + die "op = $_, arg = $arg\n" unless length($arg) == 1; $argnum += $argnum{$arg}; warn "# Conflicting bit 32 for '$_'.\n" if $argnum & 8 and $mul == 0x10000000; @@ -228,6 +236,20 @@ print <