Source/Packages

Runtime.NativePhysicalNative

packages/execution/src/Runtime/NativePhysicalNative.alpha

3,650 lines210 declarations198.6 KiBSHA-256 028b70105699

def · lines 3463–3479

npUnpackLength

Full file
A length continued in bytes of 255 and a final remainder, added to RDX. `next` is this loop's label, `done` where it continues; RAX is scratch.
3463def npUnpackLength =
3464  (lambda unrestricted next : Bytes .
3465    (lambda unrestricted byteLabel : Bytes .
3466      (lambda unrestricted tail : (family X86NativeAssembly) .
3467        (nativePhysicalNativeLabel
3468          next
3469          (npCompare npRBX npR8
3470            (npJumpIf npBelow byteLabel
3471              (nativePhysicalNativeJump
3472                nativePhysicalNativeLabelFatalUnpack
3473                (nativePhysicalNativeLabel
3474                  byteLabel
3475                  (npLoad8 npR11 npRBX (byte 0)
3476                    (npStep npRBX 1
3477                      (npAdd npRDX npR11
3478                        (npCompareImmediate npR11 (nativePhysicalNativeI32Byte (byte 255))
3479                          (npJumpIf npZero next tail)))))))))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.