fix(aarch64): fix vulcan-target on aarch64 darwin #4

Merged
theoparis merged 3 commits from theoparis/fix-aarch64-widen-non-leaf-fpr-owsrqzxsrztm into master 2026-08-24 03:58:38 +00:00
theoparis commented 2026-08-24 01:47:18 +00:00 (Migrated from github.com)

Non-leaf functions only got 8 allocatable FPR registers (v8..v15), while non-leaf GPR functions got 14 (x19..x28 + x9..x12). Every aarch64 FP/vector operand is must_have_register (no spill-slot folding), so a non-leaf shader with several simultaneously live float/vector temporaries at one program point (loop header/merge point) could exceed the pool and hit spillCurrent's 'too many live params' bail-out (error.Unsupported), even on ordinary code such as vkcube's fragment shader on darwin/aarch64.

Mirror the existing GPR non-leaf widening by also offering the caller-saved v16..v23, which are already call-clobbered per the per-call clobber list.

Assisted-By: Claude Opus 4.8

Non-leaf functions only got 8 allocatable FPR registers (v8..v15), while non-leaf GPR functions got 14 (x19..x28 + x9..x12). Every aarch64 FP/vector operand is must_have_register (no spill-slot folding), so a non-leaf shader with several simultaneously live float/vector temporaries at one program point (loop header/merge point) could exceed the pool and hit spillCurrent's 'too many live params' bail-out (error.Unsupported), even on ordinary code such as vkcube's fragment shader on darwin/aarch64. Mirror the existing GPR non-leaf widening by also offering the caller-saved v16..v23, which are already call-clobbered per the per-call clobber list. Assisted-By: Claude Opus 4.8
RossComputerGuy (Migrated from github.com) approved these changes 2026-08-24 03:58:32 +00:00
Sign in to join this conversation.
No description provided.