diff options
Diffstat (limited to 'src/devices/cpu/rsp/vmrg.h')
-rw-r--r-- | src/devices/cpu/rsp/vmrg.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/devices/cpu/rsp/vmrg.h b/src/devices/cpu/rsp/vmrg.h new file mode 100644 index 00000000000..ab9be63ef16 --- /dev/null +++ b/src/devices/cpu/rsp/vmrg.h @@ -0,0 +1,13 @@ +// license:BSD-3-Clause +// copyright-holders:Tyler J. Stachecki,Ryan Holtz + +inline rsp_vec_t vec_vmrg(rsp_vec_t vs, rsp_vec_t vt, rsp_vec_t le) +{ +#if (defined(__SSE4_1__) || defined(_MSC_VER)) + return _mm_blendv_epi8(vt, vs, le); +#else + vs = _mm_and_si128(le, vs); + vt = _mm_andnot_si128(le, vt); + return _mm_or_si128(vs, vt); +#endif +} |