Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Implementation of VIS C API



On Mon, Nov 10, 2025 at 02:44:42PM +0000, Sad Clouds wrote:
> On Mon, 10 Nov 2025 12:10:50 +0000
> nia <nia%NetBSD.org@localhost> 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.
> 
> I think GCC has various -mvis* options, but it's a bit of a mystery
> what code it auto-generates with those and under what conditions.
> 
> It's a different use case compared to directly calling builtin
> functions, but it all depends on how smart GCC can be when it comes to
> translating C statements into SIMD assembly.

These options actually define __VIS__ and enable the use of
the compiler builtins.

Clang has the same option, but it works differently, since clang
has no such builtins and never defines __VIS__. Without the option,
clang will error if vis instructions are used in inline assembler.


Home | Main Index | Thread Index | Old Index