https://bugs.kde.org/show_bug.cgi?id=385411
--- Comment #8 from Andreas Arnez <ar...@linux.ibm.com> --- (In reply to Vadim Barkov from comment #2) > Created attachment 115426 [details] > z13 vector floating point support (tests) Here are some more comments about the test cases: > [...] > --- a/none/tests/s390x/vector.h > +++ b/none/tests/s390x/vector.h > [...] > @@ -38,22 +42,57 @@ typedef union { > [...] > +void print_f32(const V128 value) { > + printf("%.5e | %.5e | %.5e | %.5e\n", value.f32[0], value.f32[1], valu… Why don't we show all significant digits? This may be relevant when checking the effect of the various rounding modes. Thus I'd prefer to use the "%a" format here instead of "%.5e". Also note that this function is currently unused; is this intentional? > [...] > +void print_f64(const V128 value) { > + printf("%.9e | %.9e\n", value.f64[0], value.f64[1]); Same here, better use "%a" instead of "%.9e". > [...] > --- /dev/null > +++ b/none/tests/s390x/vector_float.c > @@ -0,0 +1,174 @@ > [...] > +int main() { > [...] > + s390_call_float_test(cdlgb, (V128_V_RES_AS_FLOAT64 | V128_V_ARG1_AS_IN… > + s390_call_float_test(cgdb, (V128_V_RES_AS_INT | V128_V_ARG1_AS_FLOAT64… > + s390_call_float_test(clgdb, V128_V_RES_AS_INT | V128_V_ARG1_AS_FLOAT64… > + s390_call_float_test(fidb, V128_V_RES_AS_FLOAT64 | V128_V_ARG1_AS_FLOA… > + s390_call_float_test(ledb, V128_V_RES_AS_FLOAT64 | V128_V_ARG1_AS_FLOA… For vledb, the result is in fact a pair of FLOAT32 values. But switching to V128_V_RES_AS_FLOAT32 is not quite right either, because the odd elements in the result are "unpredictable". Your implementation of VFLR fills the odd elements with 0xff, whereas the hardware typically fills them with zeroes. Thus the test fails with a diff in stdout when displaying floating-point values with "%a" as suggested above. To fix this, the test should probably just skip printing the odd elements. Maybe add another flag to indicate this, something like V128_V_RES_EVEN_ONLY. > [...] > + > + test_with_selective_printing(vfmadb, (V128_V_RES_AS_FLOAT64 | V128_V_A… > + test_with_selective_printing(wfmadb, (V128_V_RES_AS_FLOAT64 | V128_V_A… > + test_with_selective_printing(vfmsdb, (V128_V_RES_AS_FLOAT64 | V128_V_A… > + test_with_selective_printing(wfmsdb, (V128_V_RES_AS_FLOAT64 | V128_V_A… Very long lines (140 chars); please split. Or maybe you can pass the flags in a variable. It may also help to shorten the flags' names to something like "V_ARG1_F64x2" etc. -- You are receiving this mail because: You are watching all bug changes.