Re: Implementation of VIS C API
Magnus Lindholm <[email protected]> Mon, 10 Nov 2025 14:08:20 +0100
| Newsgroups | gmane.os.netbsd.ports.sparc64 |
|---|---|
| Message-ID | <CA+=Fv5Qr1b5Y==8ObttE4cypWB4Uj5uORJSU6pcNmcJEN8niww@mail.gmail.com> |
Hi, very interesting work, thanks for sharing! I've messed around with VIS as well as DEC/Alphas equivalent (but limited) instruction sets. I've recently posted some examples on github, it builds on Linux with GCC and at least as far as I remember, also on Solaris. I haven't tested it on NetBSD though. A simple Software renderer for "old-school" 3D-polygon shader and texture-mapping. It uses VIS extension to do real-time phong/environment lighting etc. https://github.com/linmag7/shader3d Regards Magnus Lindholm On Mon, Nov 10, 2025 at 1:12=E2=80=AFPM nia <[email protected]> wrote: > > Hi, recently got interested in SIMD instructions on sparc64. > > While GCC provides some builtins, they're both incomplete and > incompatible with the C API described in "VIS Instruction > Set User's Manual", published by Sun in 2001. > > These builtins are also unavailable in Clang, so writing my > own implementation (compatible with Sun's) seemed like the best > path forward. It is compatible with all (known) UltraSparc > processors - I don't know any that don't implement VIS, although > they theoretically might exist, NetBSD doesn't support them. > > Since I'm a beginner to SIMD programming, the test suite > I wrote as a learning exercise mostly covers basic packed > arithmetic. > > The complete patch is attached.