summaryrefslogtreecommitdiff
path: root/alpha_mmintrin.h
diff options
context:
space:
mode:
Diffstat (limited to 'alpha_mmintrin.h')
-rw-r--r--alpha_mmintrin.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/alpha_mmintrin.h b/alpha_mmintrin.h
index 525f04d..d741005 100644
--- a/alpha_mmintrin.h
+++ b/alpha_mmintrin.h
@@ -45,7 +45,18 @@ __ctlz(uint64_t val) {
return ret;
}
-/* Add the 16-bit values in M1 to the 16-bit values in M2 (paddw). */
+/* Add the 8-bit values in M! to the 8-bit values in M2 (paddb). */
+static __inline uint64_t
+__addub8(uint64_t m1, uint64_t m2) {
+ uint64_t signs = (m1 ^ m2) & 0x8080808080808080;
+ m1 &= ~signs;
+ m2 &= ~signs;
+ m1 += m2;
+ m1 ^= signs;
+ return m1;
+}
+
+/* Add the 16-bit values in M1 to the 16-bit values in M2 (paddw). */
static __inline uint64_t
__adduw4(uint64_t m1, uint64_t m2) {
uint64_t signs = (m1 ^ m2) & 0x8000800080008000;