parent
14960fa754
commit
004fc23a3f
2 changed files with 2 additions and 10 deletions
|
|
@ -1185,14 +1185,6 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
||||||
of opcContainsSet:
|
of opcContainsSet:
|
||||||
decodeBC(rkInt)
|
decodeBC(rkInt)
|
||||||
regs[ra].intVal = ord(inSet(regs[rb].node, regs[rc].regToNode))
|
regs[ra].intVal = ord(inSet(regs[rb].node, regs[rc].regToNode))
|
||||||
of opcSubStr:
|
|
||||||
decodeBC(rkNode)
|
|
||||||
inc pc
|
|
||||||
assert c.code[pc].opcode == opcSubStr
|
|
||||||
let rd = c.code[pc].regA
|
|
||||||
createStr regs[ra]
|
|
||||||
regs[ra].node.strVal = substr(regs[rb].node.strVal,
|
|
||||||
regs[rc].intVal.int, regs[rd].intVal.int)
|
|
||||||
of opcParseFloat:
|
of opcParseFloat:
|
||||||
decodeBC(rkInt)
|
decodeBC(rkInt)
|
||||||
inc pc
|
inc pc
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ type
|
||||||
opcMulSet, opcPlusSet, opcMinusSet, opcConcatStr,
|
opcMulSet, opcPlusSet, opcMinusSet, opcConcatStr,
|
||||||
opcContainsSet, opcRepr, opcSetLenStr, opcSetLenSeq,
|
opcContainsSet, opcRepr, opcSetLenStr, opcSetLenSeq,
|
||||||
opcIsNil, opcOf, opcIs,
|
opcIsNil, opcOf, opcIs,
|
||||||
opcSubStr, opcParseFloat, opcConv, opcCast,
|
opcParseFloat, opcConv, opcCast,
|
||||||
opcQuit, opcInvalidField,
|
opcQuit, opcInvalidField,
|
||||||
opcNarrowS, opcNarrowU,
|
opcNarrowS, opcNarrowU,
|
||||||
opcSignExtend,
|
opcSignExtend,
|
||||||
|
|
@ -306,7 +306,7 @@ proc registerCallback*(c: PCtx; name: string; callback: VmCallback): int {.disca
|
||||||
const
|
const
|
||||||
firstABxInstr* = opcTJmp
|
firstABxInstr* = opcTJmp
|
||||||
largeInstrs* = { # instructions which use 2 int32s instead of 1:
|
largeInstrs* = { # instructions which use 2 int32s instead of 1:
|
||||||
opcSubStr, opcConv, opcCast, opcNewSeq, opcOf
|
opcConv, opcCast, opcNewSeq, opcOf
|
||||||
}
|
}
|
||||||
slotSomeTemp* = slotTempUnknown
|
slotSomeTemp* = slotTempUnknown
|
||||||
relativeJumps* = {opcTJmp, opcFJmp, opcJmp, opcJmpBack}
|
relativeJumps* = {opcTJmp, opcFJmp, opcJmp, opcJmpBack}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue