+
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -mno-vsx -mno-power8-vector -O0" } */
*vssr++ = vec_madd (vssa, vusb, vusc);
*vssr++ = vec_madd (vusa, vssb, vssc);
*vusr++ = vec_madd (vusa, vusb, vusc);
+
+ *vssr++ = vec_madds (vssa, vssb, vssc);
}
/* { dg-final { scan-assembler-times "vaddcuw" 1 } } */
/* { dg-final { scan-assembler-times "vmladduhm" 4 } } */
+/* { dg-final { scan-assembler-times "vmhaddshs" 1 } } */
{
int i;
- printf("expected signed char data\n");
+ printf("expected unsigned char data\n");
for (i = 0; i < 16; i++)
printf(" %d,", vec_expected[i]);
- printf("\nactual signed char data\n");
+ printf("\nactual unsigned char data\n");
for (i = 0; i < 16; i++)
printf(" %d,", vec_actual[i]);
printf("\n");
printf("expected unsigned long long data\n");
for (i = 0; i < 2; i++)
- // printf(" %llu,", vec_expected[i]);
- printf(" 0x%llx,", vec_expected[i]);
+ printf(" %llu,", vec_expected[i]);
printf("\nactual unsigned long long data\n");
for (i = 0; i < 2; i++)
- // printf(" %llu,", vec_actual[i]);
- printf("0x %llx,", vec_actual[i]);
+ printf(" %llu,", vec_actual[i]);
printf("\n");
}
#endif
}
+ disp = 8;
+#ifdef __BIG_ENDIAN__
+ vec_si_expected1 = (vector signed int){ 0, 0, -8, -7 };
+#else
+ vec_si_expected1 = (vector signed int){ 0, 0, -5, -6 };
+#endif
+ store_data_si = (vector signed int){ -8, -7, -6, -5 };
+
+ for (i=0; i<4; i++)
+ vec_si_result1[i] = 0;
+
+ address_si = &vec_si_result1[0];
+
+ vec_xst_be (store_data_si, disp, address_si);
+
+ if (result_wrong_si (vec_si_expected1, vec_si_result1))
+ {
+#ifdef DEBUG
+ printf("Error: vec_xst_be, si disp = %d, result does not match expected result\n", disp);
+ print_si (vec_si_expected1, vec_si_result1);
+#else
+ abort();
+#endif
+ }
+
+ disp = 0;
+#ifdef __BIG_ENDIAN__
+ vec_ui_expected1 = (vector unsigned int){ 0, 1, 2, 3 };
+#else
+ vec_ui_expected1 = (vector unsigned int){ 3, 2, 1, 0 };
+#endif
+ store_data_ui = (vector unsigned int){ 0, 1, 2, 3 };
+
+ for (i=0; i<4; i++)
+ vec_ui_result1[i] = 0;
+
+ address_ui = &vec_ui_result1[0];
+
+ vec_xst_be (store_data_ui, disp, address_ui);
+
+ if (result_wrong_ui (vec_ui_expected1, vec_ui_result1))
+ {
+#ifdef DEBUG
+ printf("Error: vec_xst_be, ui disp = 0, result does not match expected result\n");
+ print_ui (vec_ui_expected1, vec_ui_result1);
+#else
+ abort();
+#endif
+ }
+
disp = 0;
#ifdef __BIG_ENDIAN__
vec_ss_expected1 = (vector signed short int){ -4, -3, -2, -1, 0, 1, 2, 3 };
#endif
}
-#if 0
disp = 0;
#ifdef __BIG_ENDIAN__
vec_f_expected1 = (vector float){ 0.0, 1.2, 2.3, 3.4 };
abort();
#endif
}
-#endif
}