Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163588547
D21442.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D21442.id.diff
View Options
Index: head/sys/sys/qmath.h
===================================================================
--- head/sys/sys/qmath.h
+++ head/sys/sys/qmath.h
@@ -267,7 +267,7 @@
/* Left shift an integral value to align with the int bits of 'q'. */
#define Q_SHL(q, iv) \
- (Q_LTZ(iv) ? -(Q_ABS(iv) << Q_NFBITS(q)) : \
+ (Q_LTZ(iv) ? -(int64_t)(Q_ABS(iv) << Q_NFBITS(q)) : \
Q_TC(q, iv) << Q_NFBITS(q))
/* Calculate the relative fractional precision between 'a' and 'b' in bits. */
Index: head/tests/sys/sys/qmath_test.c
===================================================================
--- head/tests/sys/sys/qmath_test.c
+++ head/tests/sys/sys/qmath_test.c
@@ -208,7 +208,9 @@
{
s64q_t a_s64q, b_s64q, r_s64q;
double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl;
+#ifdef notyet
int64_t a_int, b_int;
+#endif
int error;
srandomdev();
@@ -231,8 +233,6 @@
* test with equal precision.
*/
Q_SCVAL(b_s64q, Q_GCVAL(a_s64q));
- a_int = Q_GIVAL(a_s64q);
- b_int = Q_GIVAL(b_s64q);
/* Q<op>Q testing. */
a_dbl = Q_Q2D(a_s64q);
@@ -247,6 +247,9 @@
r_dbl = a_dbl * b_dbl;
#ifdef notyet
+ a_int = Q_GIVAL(a_s64q);
+ b_int = Q_GIVAL(b_s64q);
+
maxe_dbl = fabs(((1.0 / Q_NFBITS(a_s64q)) * (double)b_int) +
((1.0 / Q_NFBITS(b_s64q)) * (double)a_int));
#else
@@ -270,7 +273,6 @@
{
s64q_t a_s64q, b_s64q, r_s64q;
double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl;
- int64_t a_int, b_int;
int error;
srandomdev();
@@ -283,8 +285,6 @@
* test with equal precision.
*/
Q_SCVAL(b_s64q, Q_GCVAL(a_s64q));
- a_int = Q_GIVAL(a_s64q);
- b_int = Q_GIVAL(b_s64q);
/* Q<op>Q testing. */
a_dbl = Q_Q2D(a_s64q);
@@ -318,7 +318,6 @@
{
s64q_t a_s64q, b_s64q, r_s64q;
double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl;
- int64_t a_int, b_int;
int error;
srandomdev();
@@ -331,8 +330,6 @@
* test with equal precision.
*/
Q_SCVAL(b_s64q, Q_GCVAL(a_s64q));
- a_int = Q_GIVAL(a_s64q);
- b_int = Q_GIVAL(b_s64q);
/* Q<op>Q testing. */
a_dbl = Q_Q2D(a_s64q);
@@ -369,7 +366,6 @@
{
s64q_t a_s64q, b_s64q, r_s64q;
double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl;
- int64_t a_int, b_int;
int error;
srandomdev();
@@ -382,8 +378,6 @@
* test with equal precision.
*/
Q_SCVAL(b_s64q, Q_GCVAL(a_s64q));
- a_int = Q_GIVAL(a_s64q);
- b_int = Q_GIVAL(b_s64q);
/* Q<op>Q testing. */
a_dbl = Q_Q2D(a_s64q);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 25, 6:23 PM (40 m, 48 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35483576
Default Alt Text
D21442.id.diff (2 KB)
Attached To
Mode
D21442: Fix qmath(3) with new GCC
Attached
Detach File
Event Timeline
Log In to Comment