summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cmake/ConfigureChecks.cmake10
-rw-r--r--config/cmake/H5pubconf.h.in3
-rwxr-xr-xconfigure28
-rw-r--r--configure.ac17
-rw-r--r--release_docs/RELEASE.txt7
-rw-r--r--src/H5VMprivate.h29
-rw-r--r--src/H5config.h.in3
7 files changed, 18 insertions, 79 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 2f3d4d4..e223553 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -220,16 +220,6 @@ H5ConversionTests (H5_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts
#
H5ConversionTests (H5_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm")
# ----------------------------------------------------------------------
-# Set the flag to indicate that the machine generates bad code
-# for the H5VM_log2_gen() routine in src/H5VMprivate.h
-# (This flag should be set to no for all machines, except for SGI IRIX64,
-# where the cache value is set to yes in it's config file)
-#
-if (H5_BAD_LOG2_CODE_GENERATED MATCHES ^H5_BAD_LOG2_CODE_GENERATED$)
- set (H5_BAD_LOG2_CODE_GENERATED 0 CACHE INTERNAL "Define if your system generates wrong code for log2 routine")
- message (STATUS "Checking IF your system generates wrong code for log2 routine... no")
-endif (H5_BAD_LOG2_CODE_GENERATED MATCHES ^H5_BAD_LOG2_CODE_GENERATED$)
-# ----------------------------------------------------------------------
# Check if pointer alignments are enforced
#
H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 4084adf..10cf1bc 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -18,9 +18,6 @@
/* Define if building universal (internal helper macro) */
#cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@
-/* Define if your system generates wrong code for log2 routine. */
-#cmakedefine H5_BAD_LOG2_CODE_GENERATED @H5_BAD_LOG2_CODE_GENERATED@
-
/* Define if the memory buffers being written to disk should be cleared before
writing. */
#cmakedefine H5_CLEAR_MEMORY @H5_CLEAR_MEMORY@
diff --git a/configure b/configure
index 5d0f1d8..a9a5994 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Id: configure.ac 27756 2015-09-11 03:38:22Z derobins .
+# From configure.ac Id: configure.ac 27757 2015-09-11 04:35:01Z derobins .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for HDF5 1.8.16-snap16.
#
@@ -27510,32 +27510,6 @@ $as_echo "no" >&6; }
fi
## ----------------------------------------------------------------------
-## Set the flag to indicate that the machine generates bad code
-## for the H5VM_log2_gen() routine in src/H5VMprivate.h
-## (This flag should be set to no for all machines, except for SGI IRIX64,
-## where the cache value is set to yes in it's config file)
-##
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if bad code for log2 routine is generated" >&5
-$as_echo_n "checking if bad code for log2 routine is generated... " >&6; }
-if ${hdf5_cv_bad_log2_code_generated+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- hdf5_cv_bad_log2_code_generated=no
-fi
-
-
-if test ${hdf5_cv_bad_log2_code_generated} = "yes"; then
-
-$as_echo "#define BAD_LOG2_CODE_GENERATED 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-## ----------------------------------------------------------------------
## Set some variables for general configuration information to be saved
## and installed with the libraries (used to generate libhdf5.settings).
##
diff --git a/configure.ac b/configure.ac
index f4117fd..26f3d88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2392,23 +2392,6 @@ else
fi
## ----------------------------------------------------------------------
-## Set the flag to indicate that the machine generates bad code
-## for the H5VM_log2_gen() routine in src/H5VMprivate.h
-## (This flag should be set to no for all machines, except for SGI IRIX64,
-## where the cache value is set to yes in it's config file)
-##
-AC_MSG_CHECKING([if bad code for log2 routine is generated])
-AC_CACHE_VAL([hdf5_cv_bad_log2_code_generated], [hdf5_cv_bad_log2_code_generated=no])
-
-if test ${hdf5_cv_bad_log2_code_generated} = "yes"; then
- AC_DEFINE([BAD_LOG2_CODE_GENERATED], [1],
- [Define if your system generates wrong code for log2 routine.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-## ----------------------------------------------------------------------
## Set some variables for general configuration information to be saved
## and installed with the libraries (used to generate libhdf5.settings).
##
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index c511128..7ddbd05 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -210,6 +210,13 @@ New Features
(DER - 2015/09/10 HDFFV-9193)
+ - Removed the BAD_LOG2_CODE_GENERATED symbol and associated code from the
+ library.
+
+ This was an IRIX work-around.
+
+ (DER - 2015/09/11 HDFFV-9195)
+
Library
-------
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index 372a8aa..78799d8 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -357,26 +357,17 @@ H5VM_log2_gen(uint64_t n)
unsigned r; /* r will be log2(n) */
register unsigned int t, tt, ttt; /* temporaries */
-#ifdef H5_BAD_LOG2_CODE_GENERATED
- if(n > (uint64_t)0x7fffffffffffffff)
- r = 63;
- else {
- n &= (uint64_t)0x7fffffffffffffff;
-#endif /* H5_BAD_LOG2_CODE_GENERATED */
- if((ttt = (unsigned)(n >> 32)))
- if((tt = (unsigned)(n >> 48)))
- r = (t = (unsigned)(n >> 56)) ? 56 + (unsigned)LogTable256[t] : 48 + (unsigned)LogTable256[tt & 0xFF];
- else
- r = (t = (unsigned)(n >> 40)) ? 40 + (unsigned)LogTable256[t] : 32 + (unsigned)LogTable256[ttt & 0xFF];
+ if((ttt = (unsigned)(n >> 32)))
+ if((tt = (unsigned)(n >> 48)))
+ r = (t = (unsigned)(n >> 56)) ? 56 + (unsigned)LogTable256[t] : 48 + (unsigned)LogTable256[tt & 0xFF];
else
- if((tt = (unsigned)(n >> 16)))
- r = (t = (unsigned)(n >> 24)) ? 24 + (unsigned)LogTable256[t] : 16 + (unsigned)LogTable256[tt & 0xFF];
- else
- /* Added 'uint8_t' cast to pacify PGCC compiler */
- r = (t = (unsigned)(n >> 8)) ? 8 + (unsigned)LogTable256[t] : (unsigned)LogTable256[(uint8_t)n];
-#ifdef H5_BAD_LOG2_CODE_GENERATED
- } /* end else */
-#endif /* H5_BAD_LOG2_CODE_GENERATED */
+ r = (t = (unsigned)(n >> 40)) ? 40 + (unsigned)LogTable256[t] : 32 + (unsigned)LogTable256[ttt & 0xFF];
+ else
+ if((tt = (unsigned)(n >> 16)))
+ r = (t = (unsigned)(n >> 24)) ? 24 + (unsigned)LogTable256[t] : 16 + (unsigned)LogTable256[tt & 0xFF];
+ else
+ /* Added 'uint8_t' cast to pacify PGCC compiler */
+ r = (t = (unsigned)(n >> 8)) ? 8 + (unsigned)LogTable256[t] : (unsigned)LogTable256[(uint8_t)n];
return(r);
} /* H5VM_log2_gen() */
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 1de88d8..60c2121 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -3,9 +3,6 @@
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
-/* Define if your system generates wrong code for log2 routine. */
-#undef BAD_LOG2_CODE_GENERATED
-
/* Define if the memory buffers being written to disk should be cleared before
writing. */
#undef CLEAR_MEMORY