aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-05-12 11:35:34 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-05-27 09:57:30 -0500
commitde628893f63ebf8cfa7b480028ab1d7d0a01ab06 (patch)
tree2d65c1ca292010ddfe97f3632bc08b17572cbb61 /ChangeLog
parent5f7b8f457f5ec9c93664e3e78efe8c2585efc34b (diff)
downloadglibc-de628893f63ebf8cfa7b480028ab1d7d0a01ab06.tar
glibc-de628893f63ebf8cfa7b480028ab1d7d0a01ab06.tar.gz
glibc-de628893f63ebf8cfa7b480028ab1d7d0a01ab06.tar.bz2
glibc-de628893f63ebf8cfa7b480028ab1d7d0a01ab06.zip
Refactor type specific macros using regexes
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 && //' \ -e 's/ifdef TEST_LDOUBLE/if MANT_DIG >= 64/' \ -e 's/defined TEST_LDOUBLE/MANT_DIG >= 64/' \ -e '/nexttoward_test_data\[\]/,/ };/!s/LDBL_(MIN_EXP|MAX_EXP|MANT_DIG)/\1/g' \ libm-test.inc With a little extra manual cleanup to simplify the following case: #if MANT_DIG >= 64 # if MANT_DIG >= 64 ... # endif ... Note, TEST_LDOUBLE checks are replaced by MANT_DIG >= 64 excepting where another property of the type is being tested. And, the final regex is intended to avoid replacing LDBL_ macro usage within the nexttoward tests which explicitly take argument 2 as long double.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog12
1 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d6d9527edc..85a73f592b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,18 @@
2016-05-27 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
* math/libm-test.inc:
+ (TEST_FLOAT): Change usage to TEST_COND_binary32.
+ (TEST_DOUBLE): Change usage to TEST_COND_binary64.
+ (TEST_LDOUBLE): Update usage to evaluate as true if
+ the guarded tests match the property being tested.
+ (LDBL_MAX_EXP): Change to MAX_EXP.
+ (LDBL_MIN_EXP): Change to MIN_EXP.
+ (LDBL_MANT_DIG): Change to MANT_DIG, except for
+ nexttoward tests.
+
+2016-05-27 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
+
+ * math/libm-test.inc:
(TYPE_DECIMAL_DIG): Redefine using type supplied PREFIX macro.
(TYPE_MIN): Likewise.
(TYPE_TRUE_MIN): Likewise.