Source/Packages

Runtime.NativePhysicalNative

packages/execution/src/Runtime/NativePhysicalNative.alpha

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

def · lines 3508–3612

nativePhysicalNativeUnpackBlock

Full file
3508def nativePhysicalNativeUnpackBlock =
3509  (lambda unrestricted tail : (family X86NativeAssembly) .
3510    (nativePhysicalNativeLabel
3511      nativePhysicalNativeLabelUnpack
3512      (npLoad64 npRAX npR15 nativePhysicalNativeD8
3513        (npCompareImmediate npRAX (nativePhysicalNativeI32Byte (byte 1))
3514          (npJumpIf npNotZero nativePhysicalNativeLabelFatalUnpack
3515            (npLoad64 npR13 npR15 (npD (byte 16))
3516              (npLoad64 npR12 npR15 (npD (byte 24))
3517                (npTest npR13
3518                  (npJumpIf npZero nativePhysicalNativeLabelFatalUnpack
3519                    -- source and its end; a packed length that wraps refuses
3520                    (npMove npRBX npR15
3521                      (npStep npRBX 32
3522                        (npMove npR8 npRBX
3523                          (npAdd npR8 npR12
3524                            (npCompare npR8 npRBX
3525                              (npJumpIf npBelow nativePhysicalNativeLabelFatalUnpack
3526                                -- output: the page after the file's last page, U page-rounded
3527                                (npMove npR14 npR8
3528                                  (npPageRound npR14
3529                                    (npMove npR10 npR13
3530                                      (npPageRound npR10
3531                                        (npCompare npR10 npR13
3532                                          (npJumpIf npBelow nativePhysicalNativeLabelFatalUnpack
3533                                            (npProtectUnpacked 3
3534                                              (npMove npRDI npR14
3535                                                (npMove npR9 npR14
3536                                                  (npAdd npR9 npR13
3537                                                    (nativePhysicalNativeLabel
3538                                                      nativePhysicalNativeLabelUnpackSequence
3539                                                      (npCompare npRBX npR8
3540                                                        (npJumpIf npBelow nativePhysicalNativeLabelUnpackToken
3541                                                          (nativePhysicalNativeJump
3542                                                            nativePhysicalNativeLabelUnpackEnd
3543                                                            (nativePhysicalNativeLabel
3544                                                              nativePhysicalNativeLabelUnpackToken
3545                                                              (npLoad8 npRCX npRBX (byte 0)
3546                                                                (npStep npRBX 1
3547                                                                  -- literals: the token's high nibble, continued at 15
3548                                                                  (npMove npRDX npRCX
3549                                                                    (nativePhysicalNativeEmit
3550                                                                      (constructor X86NativeInstruction X86NativeShiftRightImmediate64 npRDX (nativePhysicalNativeImmediate8 (byte 4)))
3551                                                                      (npCompareImmediate npRDX (nativePhysicalNativeI32Byte (byte 15))
3552                                                                        (npJumpIf npNotZero nativePhysicalNativeLabelUnpackLiterals
3553                                                                          (npUnpackLength
3554                                                                            nativePhysicalNativeLabelUnpackLiteralLength
3555                                                                            nativePhysicalNativeLabelUnpackLiteralByte
3556                                                                            (nativePhysicalNativeLabel
3557                                                                              nativePhysicalNativeLabelUnpackLiterals
3558                                                                              (npUnpackRoom npR8 npRBX
3559                                                                                (npUnpackRoom npR9 npRDI
3560                                                                                  (npUnpackCopy
3561                                                                                    npRBX
3562                                                                                    nativePhysicalNativeLabelUnpackLiteralCopy
3563                                                                                    nativePhysicalNativeLabelUnpackLiteralsDone
3564                                                                                    (nativePhysicalNativeLabel
3565                                                                                      nativePhysicalNativeLabelUnpackLiteralsDone
3566                                                                                      -- the last sequence ends with its literals
3567                                                                                      (npCompare npRBX npR8
3568                                                                                        (npJumpIf npZero nativePhysicalNativeLabelUnpackEnd
3569                                                                                          -- distance: two bytes, little-endian, 1 .. produced
3570                                                                                          (npImmediate npRDX 2
3571                                                                                            (npUnpackRoom npR8 npRBX
3572                                                                                              (npLoad8 npRAX npRBX (byte 0)
3573                                                                                                (npLoad8 npRSI npRBX (byte 1)
3574                                                                                                  (nativePhysicalNativeEmit
3575                                                                                                    (nativePhysicalNativeShiftLeft npRSI (nativePhysicalNativeImmediate8 (byte 8)))
3576                                                                                                    (nativePhysicalNativeEmit
3577                                                                                                      (constructor X86NativeInstruction X86NativeOrRegister64 npRSI npRAX)
3578                                                                                                      (npStep npRBX 2
3579                                                                                                        (npTest npRAX
3580                                                                                                          (npJumpIf npZero nativePhysicalNativeLabelFatalUnpack
3581                                                                                                            (npMove npRSI npRDI
3582                                                                                                              (npSubtract npRSI npR14
3583                                                                                                                (npCompare npRSI npRAX
3584                                                                                                                  (npJumpIf npBelow nativePhysicalNativeLabelFatalUnpack
3585                                                                                                                    -- match length: the low nibble plus 4, continued at 15
3586                                                                                                                    (npMove npRDX npRCX
3587                                                                                                                      (nativePhysicalNativeEmit
3588                                                                                                                        (constructor X86NativeInstruction X86NativeAndImmediate64 npRDX (x86NativeImmediate32FromNatural 15))
3589                                                                                                                        (npCompareImmediate npRDX (nativePhysicalNativeI32Byte (byte 15))
3590                                                                                                                          (npJumpIf npNotZero nativePhysicalNativeLabelUnpackMatch
3591                                                                                                                            (npUnpackLength
3592                                                                                                                              nativePhysicalNativeLabelUnpackMatchLength
3593                                                                                                                              nativePhysicalNativeLabelUnpackMatchByte
3594                                                                                                                              (nativePhysicalNativeLabel
3595                                                                                                                                nativePhysicalNativeLabelUnpackMatch
3596                                                                                                                                (npStep npRDX 4
3597                                                                                                                                  (npUnpackRoom npR9 npRDI
3598                                                                                                                                    (npMove npRSI npRDI
3599                                                                                                                                      (npSubtract npRSI npRAX
3600                                                                                                                                        (npUnpackCopy
3601                                                                                                                                          npRSI
3602                                                                                                                                          nativePhysicalNativeLabelUnpackMatchCopy
3603                                                                                                                                          nativePhysicalNativeLabelUnpackSequence
3604                                                                                                                                          (nativePhysicalNativeLabel
3605                                                                                                                                            nativePhysicalNativeLabelUnpackEnd
3606                                                                                                                                            (npCompare npRDI npR9
3607                                                                                                                                              (npJumpIf npNotZero nativePhysicalNativeLabelFatalUnpack
3608                                                                                                                                                (npProtectUnpacked 5
3609                                                                                                                                                  (npMove npR15 npR14
3610                                                                                                                                                    (nativePhysicalNativeJump
3611                                                                                                                                                      nativePhysicalNativeLabelImageReady
3612                                                                                                                                                      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.