[PATCH 2/8] Refactor type specific macros using regexes
Paul E. Murphy
murphyp@linux.vnet.ibm.com
Wed May 18 20:56:00 GMT 2016
NOTE: Reviewers, I've redacted the contents of the patch as it
is quite verbose. Run the mentioned command to recreate the
contents of the patch.
Replace most of the type specific macros with the equivalent
type-generic macro using the following sed replacement command below:
sed -ri -e 's/defined TEST_FLOAT/TEST_COND_binary32/' \
-e 's/ndef TEST_FLOAT/ !TEST_COND_binary32/' \
-e 's/def TEST_FLOAT/ TEST_COND_binary32/' \
-e 's/defined TEST_DOUBLE/TEST_COND_binary64/' \
-e 's/ndef TEST_DOUBLE/ !TEST_COND_binary64/' \
-e 's/def TEST_DOUBLE/ TEST_COND_binary64/' \
-e 's/defined TEST_LDOUBLE/TEST_COND_gt_binary64/' \
-e 's/ifdef TEST_LDOUBLE/if TEST_COND_gt_binary64/' \
-e 's/LDBL_(MIN_EXP|MAX_EXP|MANT_DIG)/TYPE_\1/g' \
libm-test.inc
* math/libm-test.inc:
[TEST_FLOAT]: Change usage to TEST_COND_binary32.
[TEST_DOUBLE]: Change usage to TEST_COND_binary64.
[TEST_LDOUBLE]: Change usage to TEST_COND_gt_binary64.
[LDBL_MAX_EXP]: Change to TYPE_MAX_EXP.
[LDBL_MIN_EXP]: Change to TYPE_MIN_EXP.
[LDBL_MANT_DIG]: Change to TYPE_MANT_DIG.
---
math/libm-test.inc | 686 ++++++++++++++++++++++++++---------------------------
1 file changed, 343 insertions(+), 343 deletions(-)
--
2.4.11
More information about the Libc-alpha
mailing list