This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCHv2 00/14] Refactor and friends

On this second spin, I now fixup the awkward MIN_EXP and MANT_DIG macros
to be more sensible.

Patch 3 starts the true refactoring by defining a set of format specific
macros and updates some of the logic controlling the macros to use them.

Patch 4 replaces the bulk of the TEST_<TYPE> macros with the new format
specific macros via a series of sed commands.

Patch 5 through 10 update various glibc specific constants to be more
readable, less type specific, and more consistent with the other macros
used throughout test cases.

Patch 11 modifies the to strip suffixes for FP values
and wrap them with LIT()

Patch 12 removes the CHOOSE macro and remaining usage of TEST_<TYPE>
macros in favor of a fully generated file.

Patch 13 and 14 refactor the auto generated test inputs to replace type
specific conditions with format specific ones.

NOTE: patches 4, 13, and 14 require some extra steps after applying.
This keeps the patch size down.  After building the sources, I ran
the following for PPC64le and x86_64:

'BUILD_DIR=/path/to/build git rebase -i --exec ./path/to/ HEAD~15'

then from BUILD_DIR:

for j in "" "ulps."; do echo "checking test.${j}\$i.txt"; \
  for i in `seq 2 14`; do \
    diff -u test.${j}$((i-1)).txt test.${j}${i}.txt; done; done;

To verify nothing changed during or after these commits.

Contents of

while [ -e test.$i.txt ]; do let i+=1; done;


echo "Removing stale test output."
rm -f $tests

echo "Testing commit $i"

make subdirs=math -j8 check &> /dev/null

echo "Collating results of commit $i"
# Use this as heuristic to verify check
# didn't crash and burn.
for test in ${tests}; do
  if [ ! -f $test ]; then
    echo "ERROR: $test missing";
    exit 1;

for test in ${tests}; do cat $test; done > test.$i.txt

echo "Regenerating ULPS for commit $i"
make regen-ulps > test.ulps.$i.txt
# end of

Paul E. Murphy (14):
  Fixup usage of MANT_DIG in
  Fixup usage of MIN_EXP in
  Begin refactor of
  Refactor type specific macros using regexes
  Refactor M_ macros defined in
  Replace M_PI2l with pi_2_d in
  Replace M_PIl with pi in
  Replace M_PI_4l with pi_4_d in
  Replace M_El with exp1 in
  Add note about nexttoward test cases in
  Apply LIT(x) to floating point literals in libm-test.c
  Remove CHOOSE() macro from
  Remove type specific information from auto-libm-test-in
  Generate new format names in auto-libm-test-out

 math/auto-libm-test-in     |  115 ++--
 math/gen-auto-libm-tests.c |   24 +-
 math/      |   90 ++-
 math/         | 1536 ++++++++++++++++++++++----------------------
 math/test-double-finite.c  |    1 -
 math/test-double-vlen2.h   |    1 -
 math/test-double-vlen4.h   |    1 -
 math/test-double-vlen8.h   |    1 -
 math/test-double.c         |    1 -
 math/test-double.h         |    6 +-
 math/test-float-finite.c   |    1 -
 math/test-float-vlen16.h   |    1 -
 math/test-float-vlen4.h    |    1 -
 math/test-float-vlen8.h    |    1 -
 math/test-float.c          |    1 -
 math/test-float.h          |    6 +-
 math/test-idouble.c        |    1 -
 math/test-ifloat.c         |    1 -
 math/test-ildoubl.c        |    1 -
 math/test-ldouble-finite.c |    1 -
 math/test-ldouble.c        |    1 -
 math/test-ldouble.h        |    6 +-
 22 files changed, 943 insertions(+), 855 deletions(-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]