On 10/18/2016 11:06 PM, Nikunj A Dadhania wrote:
+#define VNEG(name, element)                                         \
+void helper_##name(ppc_avr_t *r, ppc_avr_t *b)                      \
+{                                                                   \
+    int i;                                                          \
+    VECTOR_FOR_INORDER_I(i, element) {                              \
+        r->element[i] = -b->element[i];                             \
+    }                                                               \
+}
+VNEG(vnegw, s32)
+VNEG(vnegd, s64)
+#undef VNEG
+

I will note that vnegd could be implemented in two insns. But for simplicity I'm ok with this.

Reviewed-by: Richard Henderson <r...@twiddle.net>


r~

Reply via email to