This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 6/8] Refactor CHOOSE() macro usage in libm-tests.inc
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 18 May 2016 21:33:58 +0000
- Subject: Re: [PATCH 6/8] Refactor CHOOSE() macro usage in libm-tests.inc
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1463599718 dot git dot murphyp at linux dot vnet dot ibm dot com> <9383b14c28e4a914d0710d642eaf47c5f4d687cd dot 1463599718 dot git dot murphyp at linux dot vnet dot ibm dot com>
Suppose we know the constant / function suffixes, and the prefix such as
LDBL for macros. What do we then need CHOOSE for?
The answer seems to be:
* Generating textual names used for ulps in print_function_ulps,
print_complex_function_ulps.
* Generating ULPs entries output by gen-libm-test.pl in libm-test-ulps.h.
The former is eliminated by your patch 1. As for the latter, how about
making the ulps arrays generated by libm-test-ulps.h contain the type
names explicitly, rather than containing calls to CHOOSE (and adjust the
binary search to match both a function name and a type name)? That way,
you can completely eliminate the CHOOSE macro, which seems the better
approach.
--
Joseph S. Myers
joseph@codesourcery.com