Multi-architecture binaries

Jascha Wetzel "[firstname]" at
Tue May 1 08:48:29 PDT 2007

A thought that came up in the VM discussion...

Suppose someday we have language support for vector operations. We want
to ship binaries that support but do not require extensions like SSE. We
do not want to ship multiple binaries and wrappers that switch between
them or installers that decide which one to use, because it's more work
and we'd be shipping a lot of redundant code.

Ideally we wouldn't have to write additional code either. The compiler
could emit code for multiple targets on a per-function basis (e.g. with
the target architecure mangled into the function name). The runtime
would check at startup, which version will be used and "link" the
appropriate function.
Here is a small proof-of-concept implementation of this detection and
linking mechanism.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: multi_target.d
URL: <>

More information about the Digitalmars-d mailing list