[Git][NTPsec/ntpsec][master] 2 commits: Remove unused macros.

Eric S. Raymond gitlab at mg.gitlab.com
Mon Dec 26 10:38:35 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
87ed4ddf by Eric S. Raymond at 2016-12-26T05:31:08-05:00
Remove unused macros.

- - - - -
09a1146e by Eric S. Raymond at 2016-12-26T05:38:24-05:00
More excision of unused macros.

- - - - -


1 changed file:

- include/ntp_fp.h


Changes:

=====================================
include/ntp_fp.h
=====================================
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -157,20 +157,6 @@ typedef uint32_t u_fp;
 		(r_i) += (a_i) + ((uint32_t)(r_f) < add_t); \
 	} while (false)
 
-#define M_ADD3(r_o, r_i, r_f, a_o, a_i, a_f) /* r += a, three word */ \
-	do { \
-		uint32_t add_t, add_c; \
-		add_t  = (r_f); \
-		(r_f) += (a_f); \
-		add_c  = ((uint32_t)(r_f) < add_t); \
-		(r_i) += add_c; \
-		add_c  = ((uint32_t)(r_i) < add_c); \
-		add_t  = (r_i); \
-		(r_i) += (a_i); \
-		add_c |= ((uint32_t)(r_i) < add_t); \
-		(r_o) += (a_o) + add_c; \
-	} while (false)
-
 #define M_SUB(r_i, r_f, a_i, a_f)	/* r -= a */ \
 	do { \
 		uint32_t sub_t = (r_f); \
@@ -178,31 +164,12 @@ typedef uint32_t u_fp;
 		(r_i) -= (a_i) + ((uint32_t)(r_f) > sub_t); \
 	} while (false)
 
-#define	M_RSHIFTU(v_i, v_f)		/* v >>= 1, v is unsigned */ \
-	do { \
-		(v_f) = ((uint32_t)(v_f) >> 1) | ((uint32_t)(v_i) << 31);	\
-		(v_i) = ((uint32_t)(v_i) >> 1); \
-	} while (false)
-
-#define	M_RSHIFT(v_i, v_f)		/* v >>= 1, v is signed */ \
-	do { \
-		(v_f) = ((uint32_t)(v_f) >> 1) | ((uint32_t)(v_i) << 31);	\
-		(v_i) = ((uint32_t)(v_i) >> 1) | ((uint32_t)(v_i) & 0x80000000);	\
-	} while (false)
-
 #define	M_LSHIFT(v_i, v_f)		/* v <<= 1 */ \
 	do { \
 		(v_i) = ((uint32_t)(v_i) << 1) | ((uint32_t)(v_f) >> 31);	\
 		(v_f) = ((uint32_t)(v_f) << 1); \
 	} while (false)
 
-#define	M_LSHIFT3(v_o, v_i, v_f)	/* v <<= 1, with overflow */ \
-	do { \
-		(v_o) = ((uint32_t)(v_o) << 1) | ((uint32_t)(v_i) >> 31);	\
-		(v_i) = ((uint32_t)(v_i) << 1) | ((uint32_t)(v_f) >> 31);	\
-		(v_f) = ((uint32_t)(v_f) << 1); \
-	} while (false)
-
 #define	M_ADDUF(r_i, r_f, uf)		/* r += uf, uf is uint32_t fraction */ \
 	M_ADD((r_i), (r_f), 0, (uf))	/* let optimizer worry about it */
 
@@ -250,10 +217,6 @@ typedef uint32_t u_fp;
 #define L_ADDUF(r, uf)	M_ADDUF(lfpuint(*r), lfpfrac(*r), (uf))
 #define L_SUBUF(r, uf)	M_SUBUF(lfpuint(*r), lfpfrac(*r), (uf))
 #define	L_ADDF(r, f)	M_ADDF(lfpuint(*r), lfpfrac(*r), (f))
-#define	L_RSHIFT(v)	M_RSHIFT(lfpsint(*v), lfpfrac(*v))
-#define	L_RSHIFTU(v)	M_RSHIFTU(lfpuint(*v), lfpfrac(*v))
-#define	L_LSHIFT(v)	M_LSHIFT(lfpuint(*v), lfpfrac(*v))
-
 #define	L_CLR(v)	(setlfpuint(*v, 0), setlfpfrac(*v, 0))
 #define	L_ISNEG(v)	M_ISNEG(lfpuint(*v))
 #define L_ISZERO(v)	((lfpuint(*v) | lfpfrac(*v)) == 0)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/ed5d971e68e12077dc9fe8d7e668413463d25be0...09a1146e09f0bca1c7099c5b5d537ffa33f51977
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161226/05ba6430/attachment.html>


More information about the vc mailing list