test for stdlib opcodes

This commit is contained in:
Michael McLoughlin
2018-11-24 14:55:51 -08:00
parent 898d66c585
commit a70227cbe3
4 changed files with 262 additions and 0 deletions

12
internal/inst/table.go Normal file
View File

@@ -0,0 +1,12 @@
package inst
//go:generate avogen -data ../data -output ztable.go godata
func Lookup(opcode string) (Instruction, bool) {
for _, i := range Instructions {
if i.Opcode == opcode {
return i, true
}
}
return Instruction{}, false
}