1 Commits
Author SHA1 Message Date
LibretroAdmin 7e5e6c7b9c GS: add gs_vector, the 128-bit integer vector as C89
gs_vec4i is the machine vector itself rather than a class holding one, so
an operation is its intrinsic: operators become named functions, and the
template parameters carrying an immediate become macros, which the
instructions require since pslld and pshufd take a literal.

Carries a tier GSVector4i cannot express. The class reaches for pminsd,
pmaxsd, pminud, pmaxud, pblendvb, pblendw, packusdw, ptest, pmovzx and the
pinsr/pextr family with no fallback, which is what makes SSE4.1 a hard
floor for the whole GS; the SSE2 forms are here, alongside SSE4.1, AVX and
NEON.

tests/gsvec checks every entry point against a written-out scalar model of
what the operation means -- the only reference available on SSE2, where
the class will not build -- and against the class itself from SSE4.1 up,
at both compilers and every tier. A third lane counts instructions per
operation: the two are identical everywhere, values in and value out, so
nothing is paid for the shape.
2026-09-21 16:55:15 +02:00