From cb64d1c169e0f2e8e20233ab4bdf56237320b43f Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Wed, 4 Nov 2026 15:10:36 -0600 Subject: [PATCH 1/2] omc: x86 calls save and restore only the live slots (port of #983 375d811f2 onto main d3d1b1bc; source only, reseed via the seed batch) --- seed/omc/omc.om | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/seed/omc/omc.om b/seed/omc/omc.om index 8d299a3a5..31682aca9 100644 --- a/seed/omc/omc.om +++ b/seed/omc/omc.om @@ -16043,14 +16043,19 @@ j = add j 1 end end +note Only the pool slots in use are saved (slot s at [RSP + 8 s], as the arguments read them) and, +note after the call, restored: the same live set as the AArch64 save/restore. Slots past the pool +note count are dead at a call: a later allocation writes before it reads. fn xsave to void -put svn 0 add get npar 0 get nslot 0 +n = add get npar 0 get nslot 0 +put svn 0 n put sva 0 256 xsp 1 256 j = ulong 0 -while lt j 18 -xload 0 j -xmem 137 0 4 mul j 8 +while lt j n +s = poolc j +xload 0 s +xmem 137 0 4 mul s 8 j = add j 1 end note Reserve the callee's return address, frame pointer and slot area before CALL. @@ -16077,11 +16082,13 @@ if ne res 0 rd = destreg d xstore 0 rd end +m = add get npar 0 slot j = ulong 0 -while lt j 18 -if ne j rd -xmem 139 0 4 mul j 8 -xstore 0 j +while lt j m +s = poolc j +if ne s rd +xmem 139 0 4 mul s 8 +xstore 0 s end j = add j 1 end From 3fb404848a11ceaa3a70ace968b20cb1b077983a Mon Sep 17 00:00:00 2001 From: aien-spark Date: Wed, 4 Nov 2026 21:39:08 -0600 Subject: [PATCH 2/2] crumb: recompile the root crumb for the x86 live-slot change Signed-off-by: aien-spark --- .crumb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.crumb b/.crumb index f4b156b78..831ceaf12 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:1d48c632f299857289d333d13ffe57e4120f1806830e6b078fbbdef86b991316", - "compiled_at": "2026-11-04T13:14:48Z", + "compiled_at": "2026-11-05T03:39:02Z", "compiler": "crumb-compile/1", - "digest": "sha256:03322c058e6daf67dc09c504b09d6743f56715a8acd02d200dc175ac9b1bcaf2", + "digest": "sha256:d09c5acf4fcb43400cd40aa480000de67709d1cc980a25b37e0df164fd2a51ef", "evidence_files": 15321, "evidence_root": "sha256:e4e83d089b086dd1dcab0cfd4babe338eab359310746dbddc14edd655012c33f", "files": 23689, - "generated_at_commit": "e6d145055d63409dcc74fe3fcd8acb2b9307aa06", - "source_tree": "sha256:08f843c50dcf726e48c812d2fb6b39a06bd61c4fdbed3381427c056a6a319d1d" + "generated_at_commit": "cb64d1c169e0f2e8e20233ab4bdf56237320b43f", + "source_tree": "sha256:c4451c1147d220464c8d7fa2da3d3107c73cb480c053a0850ea48e36ff9be2a3" }, "owner_lane": "", "provenance": {