Source/Packages

Runtime.NativePhysicalNative

packages/execution/src/Runtime/NativePhysicalNative.alpha

3,420 lines207 declarations187.4 KiBSHA-256 9c16b0741974

def · lines 3238–3254

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.
3238def npUnpackLength =
3239  (lambda unrestricted next : Bytes .
3240    (lambda unrestricted byteLabel : Bytes .
3241      (lambda unrestricted tail : (family X86NativeAssembly) .
3242        (nativePhysicalNativeLabel
3243          next
3244          (npCompare npRBX npR8
3245            (npJumpIf npBelow byteLabel
3246              (nativePhysicalNativeJump
3247                nativePhysicalNativeLabelFatalUnpack
3248                (nativePhysicalNativeLabel
3249                  byteLabel
3250                  (npLoad8 npR11 npRBX (byte 0)
3251                    (npStep npRBX 1
3252                      (npAdd npRDX npR11
3253                        (npCompareImmediate npR11 (nativePhysicalNativeI32Byte (byte 255))
3254                          (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.