Add sqrt instruction

This commit is contained in:
Ian Gulliver
2021-11-21 17:04:58 -08:00
parent 05c62a92e1
commit 5ae34243b4
6 changed files with 61 additions and 0 deletions

View File

@@ -68,6 +68,9 @@ var opCodeByName = map[string]vm.OpCodeType{
"rett": vm.OpRetT,
"returniffalse": vm.OpReturnIfFalse,
"retf": vm.OpRetF,
"squareroot": vm.OpSquareRoot,
"sqrt": vm.OpSqrt,
}
var nameByOpCode = map[vm.OpCodeType]string{
@@ -110,4 +113,6 @@ var nameByOpCode = map[vm.OpCodeType]string{
vm.OpRet: "ret",
vm.OpRetT: "rett",
vm.OpRetF: "retf",
vm.OpSqrt: "sqrt",
}