Split files
This commit is contained in:
51
opcode.go
Normal file
51
opcode.go
Normal file
@@ -0,0 +1,51 @@
|
||||
package vm
|
||||
|
||||
type OpCodeType uint32
|
||||
|
||||
const (
|
||||
OpNoOp OpCodeType = 0x00000000
|
||||
OpNop = OpNoOp
|
||||
OpCall = 0x00000001
|
||||
OpCal = OpCall
|
||||
OpReturn = 0x00000002
|
||||
OpRet = OpReturn
|
||||
|
||||
OpMove = 0x00000100
|
||||
OpMov = OpMove
|
||||
|
||||
OpAdd = 0x00000200
|
||||
OpSubtract = 0x00000201
|
||||
OpSub = OpSubtract
|
||||
OpMultiply = 0x00000202
|
||||
OpMul = OpMultiply
|
||||
OpDivideUnsigned = 0x00000203
|
||||
OpDivU = OpDivideUnsigned
|
||||
OpDivideSigned = 0x00000204
|
||||
OpDivS = OpDivideSigned
|
||||
|
||||
OpIsEqual = 0x00000300
|
||||
OpEq = OpIsEqual
|
||||
OpIsLessThanUnsigned = 0x00000301
|
||||
OpLTU = OpIsLessThanUnsigned
|
||||
OpIsLessThanSigned = 0x00000302
|
||||
OpLTS = OpIsLessThanSigned
|
||||
OpIsGreaterThanUnsigned = 0x00000303
|
||||
OpGTU = OpIsGreaterThanUnsigned
|
||||
OpIsGreaterThanSigned = 0x00000304
|
||||
OpGTS = OpIsGreaterThanSigned
|
||||
OpIsLessThanOrEqualUnsigned = 0x00000305
|
||||
OpLTEU = OpIsLessThanOrEqualUnsigned
|
||||
OpIsLessThanOrEqualSigned = 0x00000306
|
||||
OpLTES = OpIsLessThanOrEqualSigned
|
||||
OpIsGreaterThanOrEqualUnsigned = 0x00000307
|
||||
OpGTEU = OpIsGreaterThanOrEqualUnsigned
|
||||
OpIsGreaterThanOrEqualSigned = 0x00000308
|
||||
OpGTES = OpIsGreaterThanOrEqualSigned
|
||||
|
||||
OpJump = 0x00000400
|
||||
OpJmp = OpJump
|
||||
OpJumpIfTrue = 0x00000401
|
||||
OpJmpT = OpJumpIfTrue
|
||||
OpJumpIfFalse = 0x00000402
|
||||
OpJmpF = OpJumpIfFalse
|
||||
)
|
||||
Reference in New Issue
Block a user