52 lines
1.6 KiB
Go
52 lines
1.6 KiB
Go
|
|
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
|
||
|
|
)
|