open-power-sdk / pveclib

Power Vector Library
Apache License 2.0
29 stars 8 forks source link

Factor arith128_test_f128.c for being too large. Closes #177. #179

Closed munroesj52 closed 1 year ago

munroesj52 commented 1 year ago

At over 31k+ lines arith128_test_f128.c is unwieldy to edit and slow to compile. This is mostly due the Quad-Precision round-to-add tests. Especially for all the combinations associated with the non-finite operands as specified in the PowerISA "Actions for ..." tables. This change factors the large qpo unit-tests into separate arith128_test_qpo.c file.

* Makefile.am [@INC_AMINCLUDE@] Corrected spelling in comment.
* Makefile.in: automake.
* aclocal.m4: automake.
* configure: autoremake.
* doc/pveclib-doxygen-pveclib.doxy [TCL_SUBST, COLS_IN_ALPHA_INDEX]: Removed,
* src/Makefile.am [pveclib_test_SOURCES]: Add testsuite/arith128_test_qpo.c and testsuite/arith128_test_qpo.h.
* Makefile.in: automake.

* src/testsuite/arith128_test_f128.c (db_vec_xsmulqpo, db_vec_xsaddqpo, db_vec_xssubqpo, db_vec_xsmaddqpo): Move unit-tests to arith128_test_qpo.c. (test_add_qpo, test_add_qpo_xtra, test_mul_qpo, test_mul_qpo_xtra, test_sub_qpo, test_sub_qpo_xtra): Move unit-tests to arith128_test_qpo.c. (test_madd_qpo_xtra_c1, test_madd_qpo_xtra_c2, test_madd_qpo_xtra_c3, test_madd_qpo_xtra_c4, test_madd_qpo_xtra_c5, test_madd_qpo_xtra_c5, test_madd_qpo_xtra_c7, test_madd_qpo_xtra_c8, test_madd_qpo_zero_c, test_madd_qpo): Move unit-tests to arith128_test_qpo.c. (test_msub_qpo_xtra_c1, test_msub_qpo_xtra_c2, test_msub_qpo_xtra_c3, test_msub_qpo_xtra_c4, test_msub_qpo_xtra_c5, test_msub_qpo_xtra_c5, test_msub_qpo_xtra_c7, test_msub_qpo_xtra_c8, test_msub_qpo_zero_c, test_madd_qpo): Move unit-tests to arith128_test_qpo.c. (testsuite/arith128_test_qpo.h): Include header.

* src/testsuite/arith128_test_f128.h (vf128_zero, vf128_nzero, vf128_one, vf128_none, vf128_two, vf128_ntwo, vf128_max, vf128_nmax, vf128_sub, vf128_nsub, vf128_inf, vf128_ninf, vf128_nan, vf128_snan): Add extern.

* src/testsuite/arith128_test_qpo.c: New file.
* src/testsuite/arith128_test_qpo.h: New file.

* src/pveclib/vec_f128_ppc.h (vec_xsmaddqpo): Mall cleanup.
* src/testsuite/vec_pwr10_dummy.c (__test_splatisd_12_PWR10 [_ARCH_PWR10]): Quard use of P10 only code in case configure overrides -mcpu.
munroesj52 commented 1 year ago

Included Tulio because he had commented on @INC_AMINCLUDE@ before. Assume for now Tulio is busy, so will merge as is.