Source/Packages

Runtime.NativePhysicalNative

packages/execution/src/Runtime/NativePhysicalNative.alpha

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

def · lines 506–521

nativePhysicalNativePayloadBase

Full file
Record layout (Runtime.NativePhysicalImagePlan, V4): a record stores its operand slots up to the last one that is not the zero immediate; header word 7 ([record+56]) holds the operand bytes it omits (at most 168), and its payload begins at 232 minus that. These helpers keep the record pointer in R14 and use one scratch register that is dead at the call site. destination := destination + 232 - [r14+56]
506def nativePhysicalNativePayloadBase =
507  (lambda unrestricted destination : (family X86NativeRegister64) .
508    (lambda unrestricted scratch : (family X86NativeRegister64) .
509      (lambda unrestricted tail : (family X86NativeAssembly) .
510        (nativePhysicalNativeEmit
511          (nativePhysicalNativeAddImmediate
512            destination
513            (nativePhysicalNativeI32Byte (nat-to-byte nativePhysicalImageCommandFixedBytes)))
514          (nativePhysicalNativeEmit
515            (nativePhysicalNativeLoad64
516              scratch
517              (constructor X86NativeRegister64 X86NativeR14)
518              (nativePhysicalNativeDisplacementByte (byte 56)))
519            (nativePhysicalNativeEmit
520              (nativePhysicalNativeSubtract scratch destination)
521              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.