diff name2opcode.pl @ 13:5bf045527a94

update opcode2function.pl
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 27 Nov 2018 13:05:20 +0900
parents
children 8192d3609350
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/name2opcode.pl	Tue Nov 27 13:05:20 2018 +0900
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+use OPCODE2Function;
+
+my $input =  shift or die 'use input cur_op';
+chomp $input;
+
+my $ref = OPCODE2Function->name2bitecode($input);
+
+if (ref($ref ) eq "ARRAY"){
+    map { print "$_\n";} @$ref;
+} else {
+    print "$_\n";
+}