[Git][NTPsec/ntpsec][master] GCC 3.3.5 is long obsolete, remove a workaround...
Eric S. Raymond
gitlab at mg.gitlab.com
Thu Jan 5 05:30:28 UTC 2017
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
50a50109 by Eric S. Raymond at 2017-01-05T00:30:09-05:00
GCC 3.3.5 is long obsolete, remove a workaround...
...because if the problem exists in more recent versions
the regression tests will reveal it and the code can be re-patched.
- - - - -
1 changed file:
- include/ntp_fp.h
Changes:
=====================================
include/ntp_fp.h
=====================================
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -163,12 +163,6 @@ static inline l_fp ntohl_fp(l_fp_w lfpw) {
*/
#define FRAC 4294967296.0 /* 2^32 as a double */
-/*
- * Use 64 bit integers if available.
- * XSCALE generates bad code for these, at least with GCC 3.3.5.
- */
-#if !(defined(__arm__) && defined(__XSCALE__) && defined(__GNUC__))
-
#include <math.h> /* ldexp() */
static inline l_fp dtolfp(double d)
@@ -209,39 +203,6 @@ static inline double lfptod(l_fp r)
return d;
}
-#else /* use only 32 bit unsigned values */
-
-static inline l_fp dtolfp(double d)
-/* double to l_fp */
-{
- double d_tmp;
- l_fp r;
- if ((d_tmp = (d)) < 0) {
- setlfpuint(r, (uint32_t)(-d_tmp));
- setlfpfrac(r, (uint32_t)(-(d_tmp + (double)lfpuint(r)) * FRAC));
- M_NEG((r_ui), (r_uf));
- } else { \
- setlfpuint(r, (uint32_t)d_tmp);
- setlfpfrac(r, (uint32_t)((d_tmp - (double)lfpuint(r)) * FRAC));
- }
- return r;
-}
-
-static inline double lfptod(l_fp r)
-/* l_fp to double */
-{
- uint32_t l_thi, l_tlo;
- l_thi = lfpuint(r); l_tlo = lfpfrac(r);
- if (M_ISNEG(l_thi)) {
- M_NEG(l_thi, l_tlo);
- (d) = -((double)l_thi + (double)l_tlo / FRAC);
- } else {
- (d) = (double)l_thi + (double)l_tlo / FRAC;
- }
- return d;
-}
-#endif
-
/*
* Prototypes
*/
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/50a501097417e50722aeb79fa9b89994fdbd5d40
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170105/847f3e04/attachment.html>
More information about the vc
mailing list