From a2fbae600247ebe0bcca20908e3266d1884f5377 Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Mon, 27 Apr 2020 13:14:19 -0500 Subject: [PATCH] Add named constants to vec_test_data_class for #27. Signed-off-by: Bill Schmidt --- Intrinsics_Reference/ch_vec_reference.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Intrinsics_Reference/ch_vec_reference.xml b/Intrinsics_Reference/ch_vec_reference.xml index 77ab0f3..4db517b 100644 --- a/Intrinsics_Reference/ch_vec_reference.xml +++ b/Intrinsics_Reference/ch_vec_reference.xml @@ -34472,6 +34472,28 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.vec-ref"> Negative subnormal 1 + + For clarity of code, the following named constants are suggested. + Preferably, compilers will provide these constants in a header + file, but this is not required for compliance. + + #define __VEC_CLASS_FP_NAN (1<<6) + #define __VEC_CLASS_FP_INFINITY_P (1<<5) + #define __VEC_CLASS_FP_INFINITY_N (1<<4) + #define __VEC_CLASS_FP_ZERO_P (1<<3) + #define __VEC_CLASS_FP_ZERO_N (1<<2) + #define __VEC_CLASS_FP_SUBNORMAL_P (1<<1) + #define __VEC_CLASS_FP_SUBNORMAL_N (1<<0) + + #define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P + | __VEC_CLASS_FP_INFINITY_N) + #define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | __VEC_CLASS_FP_ZERO_N) + #define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P + | __VEC_CLASS_FP_SUBNORMAL_N) + #define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | __VEC_CLASS_FP_SUBNORMAL + | __VEC_CLASS_FP_ZERO | __VEC_CLASS_FP_INFINITY) + + Endian considerations: None.