This is the mail archive of the libc-alpha@sourceware.org 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]

Re: [PATCH x86_64][BZ #20033] Use calls to finite scalar versions in vector log, pow, exp.


2016-07-25 23:19 GMT+03:00 Joseph Myers <joseph@codesourcery.com>:
> On Mon, 25 Jul 2016, Andrew Senkevich wrote:
>
>> > No, such architecture conditionals on individual tests are not
>> > appropriate.  Maybe you need a NO_TEST_VECTOR handled like NO_TEST_INLINE
>> > in enable_test.
>>
>> Is patch below Ok for trunk?
>
> No, I said handled like NO_TEST_INLINE.  Exactly like NO_TEST_INLINE.  No
> architecture conditionals, no #if, just an "if" conditional exactly
> corresponding to how NO_TEST_INLINE and NON_FINITE are handled (the
> NON_FINITE if is actually better to follow since it follows the glibc
> convention of avoiding implicit boolean conversion).

Do you mean the following change for math/libm-test.inc?

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 4ac7a0c..117057c 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -179,6 +179,7 @@
 #define IGNORE_RESULT                  0x20000
 #define NON_FINITE                     0x40000
 #define TEST_SNAN                      0x80000
+#define NO_TEST_MATHVEC                        0x100000

 #define __CONCATX(a,b) __CONCAT(a,b)

@@ -1056,6 +1057,9 @@ enable_test (int exceptions)
     return 0;
   if (!SNAN_TESTS (FLOAT) && (exceptions & TEST_SNAN) != 0)
     return 0;
+  if (TEST_MATHVEC && (exceptions & NO_TEST_MATHVEC) != 0)
+    return 0;
+
   return 1;
 }

@@ -10631,10 +10635,10 @@ nexttoward_test (void)

 static const struct test_ff_f_data pow_test_data[] =
   {
-    TEST_ff_f (pow, qnan_value, 0, 1, ERRNO_UNCHANGED),
-    TEST_ff_f (pow, -qnan_value, 0, 1, ERRNO_UNCHANGED),
-    TEST_ff_f (pow, qnan_value, minus_zero, 1, ERRNO_UNCHANGED),
-    TEST_ff_f (pow, -qnan_value, minus_zero, 1, ERRNO_UNCHANGED),
+    TEST_ff_f (pow, qnan_value, 0, 1, ERRNO_UNCHANGED|NO_TEST_MATHVEC),
+    TEST_ff_f (pow, -qnan_value, 0, 1, ERRNO_UNCHANGED|NO_TEST_MATHVEC),
+    TEST_ff_f (pow, qnan_value, minus_zero, 1,
ERRNO_UNCHANGED|NO_TEST_MATHVEC),
+    TEST_ff_f (pow, -qnan_value, minus_zero, 1,
ERRNO_UNCHANGED|NO_TEST_MATHVEC),

     TEST_ff_f (pow, 1.1L, plus_infty, plus_infty,
ERRNO_UNCHANGED|NO_TEST_INLINE),
     TEST_ff_f (pow, plus_infty, plus_infty, plus_infty,
ERRNO_UNCHANGED|NO_TEST_INLINE),


--
WBR,
Andrew


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