summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alpha_mmintrin.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/alpha_mmintrin.h b/alpha_mmintrin.h
index 34a2b63..525f04d 100644
--- a/alpha_mmintrin.h
+++ b/alpha_mmintrin.h
@@ -70,6 +70,20 @@ __addusw4(uint64_t m1, uint64_t m2) {
return m1 + __minuw4(m2, ~m1);
}
+/* Subtract the 8-bit values in M1 to the 8-bit values in M2 using unsigned
+ * saturated arithmetic (psubusb) */
+static __inline uint64_t
+__subusb8(uint64_t m1, uint64_t m2) {
+ return m1 - __minub8(m2, m1);
+}
+
+/* Subtract the 16-bit values in M1 to the 16-bit values in M2 using unsigned
+ * saturating arithmetic (psubusw) */
+static __inline uint64_t
+__subusw4(uint64_t m1, uint64_t m2) {
+ return m1 - __minuw4(m2, m1);
+}
+
/* Multiply four 16-bit values in M1 by four 16-bit values in M2 and produce
the low 16 bits of the results (pmullw). */
static __inline uint64_t