Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/quad The last commit changed the behavious wrt sign...



details:   https://anonhg.NetBSD.org/src/rev/812455b89ea0
branches:  trunk
changeset: 476244:812455b89ea0
user:      drochner <drochner%NetBSD.org@localhost>
date:      Fri Sep 10 12:53:10 1999 +0000

description:
The last commit changed the behavious wrt sign extension.
Back it out and replace with LINTED comments.

diffstat:

 lib/libc/quad/ashrdi3.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 3a218260bae5 -r 812455b89ea0 lib/libc/quad/ashrdi3.c
--- a/lib/libc/quad/ashrdi3.c   Fri Sep 10 12:52:56 1999 +0000
+++ b/lib/libc/quad/ashrdi3.c   Fri Sep 10 12:53:10 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ashrdi3.c,v 1.6 1999/05/03 15:37:48 christos Exp $     */
+/*     $NetBSD: ashrdi3.c,v 1.7 1999/09/10 12:53:10 drochner Exp $     */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)ashrdi3.c  8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: ashrdi3.c,v 1.6 1999/05/03 15:37:48 christos Exp $");
+__RCSID("$NetBSD: ashrdi3.c,v 1.7 1999/09/10 12:53:10 drochner Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -71,13 +71,16 @@
                 * LONG_BITS is undefined, so we shift (LONG_BITS-1),
                 * then 1 more, to get our answer.
                 */
-               s = ((u_long)aa.sl[H] >> (LONG_BITS - 1)) >> 1;
-               aa.ul[L] = (u_long)aa.sl[H] >> (shift - LONG_BITS);
+               /* LINTED inherits machine dependency */
+               s = (aa.sl[H] >> (LONG_BITS - 1)) >> 1;
+               /* LINTED inherits machine dependency*/
+               aa.ul[L] = aa.sl[H] >> (shift - LONG_BITS);
                aa.ul[H] = s;
        } else {
                aa.ul[L] = (aa.ul[L] >> shift) |
                    (aa.ul[H] << (LONG_BITS - shift));
-               aa.sl[H] = (u_long)aa.sl[H] >> shift;
+               /* LINTED inherits machine dependency */
+               aa.sl[H] >>= shift;
        }
        return (aa.q);
 }



Home | Main Index | Thread Index | Old Index