History log of /src/tests/lib/libc/misc/t_vis.c
Revision Date Author Comments
# 1.2 16-Nov-2025 nia

license boilerplate


# 1.1 13-Nov-2025 nia

Add an implementation of the VIS C API for sparc64.

VIS is an extension of the SPARCv9 instruction set that adds packed
integer vector instructions that operate on 64-bit floating point
registers. It is primarily intended for accelerating common 2D
graphics and multimedia operations.

While GCC includes limited support for VIS via builtins, the builtins
are incomplete and incompatible with the C API described in
"VIS(tm) Instruction Set User's Manual" published by Sun Microsystems
in May 2001. This implementation intends to be 100% compatible with
the one described in the manual.

All sparc64 processors except the HAL SPARC64 (apparently not supported
by NetBSD) support the VIS instruction set. The paper documents
functions up to VIS 2. Post-Oracle CPUs support VIS 3 and VIS 4, but
I don't have access to C API documentation for those (presumably
the code is proprietary to SunPro on Solaris 11), and we can worry
about that when sun4v support is more mature.

The implementation includes some basic tests for packed arithmetic.