summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-09-10 02:52:47 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-09-10 02:52:47 (GMT)
commitad8c586c59994ff2ceafeaaec48f7a7f094e6b6f (patch)
tree6b3aea8d327a529d5377d5a9215188f6aac66266
parent67bc86740e4c4da6a5e8af642e867af448d9c2da (diff)
downloadhdf5-ad8c586c59994ff2ceafeaaec48f7a7f094e6b6f.zip
hdf5-ad8c586c59994ff2ceafeaaec48f7a7f094e6b6f.tar.gz
hdf5-ad8c586c59994ff2ceafeaaec48f7a7f094e6b6f.tar.bz2
[svn-r27733] Merge of r26602 from trunk
Remove the H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS and H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS macros/defines, as they are no longer used by supported platforms. Tested on: jam (has baked in the trunk for over 6 months)
-rw-r--r--release_docs/RELEASE.txt15
-rw-r--r--test/dt_arith.c43
2 files changed, 15 insertions, 43 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index d8b8eed..076daf1 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -103,6 +103,7 @@ New Features
nec-superux14.1
sv1-cray
x86_64-redstorm-linux-gnu
+ powerpc-ibm-aix5.x
As a part of this work, a few lines that deal with locating the
sys/fpu.h header on SGI machines and some OSF/1 configure lines
@@ -119,6 +120,20 @@ New Features
(DER - 2015/09/09 HDFFV-9191)
+ - Removed the H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS and
+ H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS symbols and associated code.
+
+ H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS was a work-around on old 64-bit
+ SGI and Solaris systems.
+
+ H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS was a work-around for old PGI
+ compilers on Linux.
+
+ Neither of these were used in any current library code and only appeared
+ in the dt_arith test.
+
+ (DER - 2015/09/09 HDFFV-9187)
+
Library
-------
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 4e87192..0844847 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -4343,49 +4343,6 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
}
}
}
-/* On some machines (notably the SGI and Solaris 64-bit machines) unsigned long
-* values are not converted to float or double values correctly, they are
-* consistently off by the lowest bit being rounded oppositely to our
-* software conversion routines output. So, on those machines, we allow
-* the converted value to be +/- 1 from the machine's value. -QAK
-*/
-#ifndef H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS
- if(dst_size==sizeof(unsigned)) {
- unsigned tmp_s, tmp_h;
- HDmemcpy(&tmp_s,&buf[j*dst_size],sizeof(unsigned));
- HDmemcpy(&tmp_h,&hw[0],sizeof(unsigned));
- if((tmp_s+1)==tmp_h || (tmp_s-1)==tmp_h)
- continue; /*no error*/
- } /* end if */
- else if (dst_size==sizeof(unsigned long)) {
- unsigned long tmp_s, tmp_h;
- HDmemcpy(&tmp_s,&buf[j*dst_size],sizeof(unsigned long));
- HDmemcpy(&tmp_h,&hw[0],sizeof(unsigned long));
- if((tmp_s+1)==tmp_h || (tmp_s-1)==tmp_h)
- continue; /*no error*/
- } /* end if */
- else if (dst_size==sizeof(unsigned long long)) {
- unsigned long long tmp_s, tmp_h;
- HDmemcpy(&tmp_s,&buf[j*dst_size],sizeof(unsigned long long));
- HDmemcpy(&tmp_h,&hw[0],sizeof(unsigned long long));
- if((tmp_s+1)==tmp_h || (tmp_s-1)==tmp_h)
- continue; /*no error*/
- } /* end if */
-#endif /* end H5_ULONG_FP_BOTTOM_BIT_WORKS */
-
-/* For PGI compiler on Linux, during conversion from 'float' or 'double' to
-* 'unsigned long long', round-up happens when the fraction of float-point
-* value is greater than 0.5. So we allow the converted value to be off by 1.
-*/
-#ifndef H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS
- if((src_type==FLT_FLOAT || src_type==FLT_DOUBLE) && dst_type==INT_ULLONG) {
- unsigned long long tmp_s, tmp_h;
- HDmemcpy(&tmp_s,&buf[j*dst_size],sizeof(unsigned long long));
- HDmemcpy(&tmp_h,&hw[0],sizeof(unsigned long long));
- if((tmp_s+1)==tmp_h)
- continue; /*no error*/
- }
-#endif /*end H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS*/
/* Print errors */
if (0==fails_this_test++) {