sbcl.sbcl/src
Douglas Katzman 4abf6ef5f7 x86-64: Implement "possible win" cited in calling-convention.texinfo
Create a dedicated area of 'struct thread' to return multiple-values in excess
of the arg-passing registers. Gating feature is :TLS-BASED-MV-RETURN and not
enabled by default. The limit of 64 (inclusive) values is the minimum to get
most existing tests to pass unchanged.  After the optimizations outlined below
are done, the feature will be more compelling, and we can see about making it
opt-out rather than opt-in, or making MULTIPLE-VALUES-LIMIT configurable.
(I'm sure that some user will claim to need 1000 values.)

The benefit will be fully realized in some subsequent changes, namely:
freeing a DX alloc, unbinding a special var, and breaking up a catch block
will all return from their frame without invoking RETURN-MULTIPLE. Similarly,
some "simple" unwind-protect forms such as release-mutex could too- anything
that does not clobber the thread-local area during a cleanup.
Also this alleviates a big impediment to creating an LLVM-based backend
which could explore performance differences among the call conventions
offered, since micro-management of the stack becomes less critical.

Co-authored with Antigravity
2026-08-30 15:51:25 -04:00
..
assembly x86-64: Implement "possible win" cited in calling-convention.texinfo 2026-08-30 15:51:25 -04:00
code x86-64: Implement "possible win" cited in calling-convention.texinfo 2026-08-30 15:51:25 -04:00
cold x86-64: Implement "possible win" cited in calling-convention.texinfo 2026-08-30 15:51:25 -04:00
compiler x86-64: Implement "possible win" cited in calling-convention.texinfo 2026-08-30 15:51:25 -04:00
interpreter Heed the optional+key style warning 2026-07-17 20:58:00 +00:00
pcl Allow (setf (slot-value x 'read-only-struct-slot)) at compile-time 2026-08-28 22:38:50 +03:00
runtime x86-64: Implement "possible win" cited in calling-convention.texinfo 2026-08-30 15:51:25 -04:00