Vm bitops fixes (#10520)
This commit is contained in:
parent
bcb5995ddf
commit
824f39b32e
5 changed files with 47 additions and 62 deletions
|
|
@ -1264,6 +1264,11 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
|||
of opcNarrowU:
|
||||
decodeB(rkInt)
|
||||
regs[ra].intVal = regs[ra].intVal and ((1'i64 shl rb)-1)
|
||||
of opcSignExtend:
|
||||
# like opcNarrowS, but no out of range possible
|
||||
decodeB(rkInt)
|
||||
let imm = 64 - rb
|
||||
regs[ra].intVal = ashr(regs[ra].intVal shl imm, imm)
|
||||
of opcIsNil:
|
||||
decodeB(rkInt)
|
||||
let node = regs[rb].node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue