LEGACY DOCS · 12.2Stable is 13.2. This page stays because it still owns historical or unchanged contracts.CURRENT 13.2 →
RELEASE LINE13.2 HISTORICAL13.1 PREDECESSOR13.0 PREVIOUS12.4 NATIVE MIRARCHIVE

LEGACY DOCS · 12.2

PAGE ROLE · NORMATIVE CONTRACT

DBYTE64 ABI

RAW SOURCE · DBYTE64_ABI.md
SHA-256 · 558f180c02dade0178cb1630ad454c6d88ec897d8a607f3948489cc5689e7e31

EXACT SOURCE NOTE: this package source retains (v12.2 draft) in the title while its Status: line declares the document a normative v12.2.0 release contract. The raw file is preserved byte-for-byte.

DBYTE64 ABI (v12.2 draft)§

Status: normative release contract for v12.2.0.

DBYTE64 scalar argument slots are RAX, RDX, RCX, R8, R9, and R10. Hidden arguments are ordered closure environment, aggregate-result pointer, then source parameters. Aggregate values are caller-created aligned stack copies and do not consume scalar slots. Overflow scalar arguments occupy eight-byte stack slots in right-to-left order.

The caller aligns RSP to 16 bytes immediately before call; DBYTE64 has no red zone. RBX, RBP, and R12 through R15 are callee-saved. Scalar, pointer, i64, and u64 results use RAX. Aggregate results use caller-owned storage passed as the hidden sret argument, and the callee returns that pointer in RAX.

A closure value is {code, environment}. Captures occupy the generated environment in source order; a capturing indirect call supplies the hidden environment slot. A noncapturing function value is a checked code address.

CallConvention::C remains target-neutral in HIR. Linux maps it to SysV AMD64; Windows maps it to Win64. C aggregate interoperability remains pointer-only through compatible @repr(C) structures. Varargs, aggregate-by-value C calls, float/SIMD classes, and unsupported large returns are rejected.

I686 i64/u64 layout is eight bytes with four-byte alignment. Values are a little-endian low/high pair, return in EDX:EAX, and use deterministic compiler-owned helpers where a single i686 instruction cannot express the operation. No compiler-rt or host runtime is linked.

NEXT ELF64 and Multiboot2 contract