Module Name: src Committed By: kre Date: Mon Jan 22 14:26:18 UTC 2024
Modified Files: src/lib/libm/src: math_private.h Log Message: Simply an overly complex way of saying "0 or 1" into a cleaner version. While here add a commment about how the __i386__ magic LD80C macro might no longer work on all other arch's as well (if someone can verify that it still does, or can fix it so that it still works on i386, but also works everywhere else, then please remove that XXX comment. The issue I am (perhaps imagining) is the (uint32_t) cast. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/lib/libm/src/math_private.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libm/src/math_private.h diff -u src/lib/libm/src/math_private.h:1.29 src/lib/libm/src/math_private.h:1.30 --- src/lib/libm/src/math_private.h:1.29 Mon Jan 22 12:15:19 2024 +++ src/lib/libm/src/math_private.h Mon Jan 22 14:26:18 2024 @@ -11,7 +11,7 @@ /* * from: @(#)fdlibm.h 5.1 93/09/24 - * $NetBSD: math_private.h,v 1.29 2024/01/22 12:15:19 kre Exp $ + * $NetBSD: math_private.h,v 1.30 2024/01/22 14:26:18 kre Exp $ */ #ifndef _MATH_PRIVATE_H_ @@ -321,9 +321,10 @@ do { \ .extu_fracl = (uint32_t)(__CONCAT(m, ULL)), \ .extu_frach = __CONCAT(m, ULL) >> EXT_FRACLBITS, \ .extu_exp = (0x3fff + (ex)), \ - .extu_sign = ((v) < 0 ? 0x8000 : 0) >> EXT_EXPBITS, \ + .extu_sign = ((v) < 0), \ } #else +/**XXX: the following comment may no longer be true: kre 20240122 **/ /* The above works on non-i386 too, but we use this to check v. */ #define LD80C(m, ex, v) { .extu_ld = (v), } #endif