From e7f4b72d3b036249b6c99b64957bb6d826c78b94 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Fri, 31 Mar 2006 04:23:37 +0000 Subject: Be kind to lint, and specify the correct width on these constants. --- lib/libc/arch/powerpc/gen/fpsetmask.c | 4 ++-- lib/libc/arch/powerpc/gen/fpsetround.c | 4 ++-- lib/libc/arch/powerpc/gen/fpsetsticky.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/arch/powerpc/gen/fpsetmask.c b/lib/libc/arch/powerpc/gen/fpsetmask.c index 76329b1da31..6bcf62202c1 100644 --- a/lib/libc/arch/powerpc/gen/fpsetmask.c +++ b/lib/libc/arch/powerpc/gen/fpsetmask.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpsetmask.c,v 1.1 1999/07/23 03:16:27 rahnds Exp $ */ +/* $OpenBSD: fpsetmask.c,v 1.2 2006/03/31 04:23:36 drahn Exp $ */ /* $NetBSD: fpsetmask.c,v 1.1 1999/07/07 01:55:08 danw Exp $ */ /* @@ -49,7 +49,7 @@ fpsetmask(mask) __asm__ __volatile("mffs %0" : "=f"(fpscr)); old = (fpscr >> 3) & 0x1f; - fpscr = (fpscr & 0xffffff07) | (mask << 3); + fpscr = (fpscr & 0xffffff07ULL) | (mask << 3); __asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr)); return (old); } diff --git a/lib/libc/arch/powerpc/gen/fpsetround.c b/lib/libc/arch/powerpc/gen/fpsetround.c index b75688a15d3..42f8c1667d1 100644 --- a/lib/libc/arch/powerpc/gen/fpsetround.c +++ b/lib/libc/arch/powerpc/gen/fpsetround.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpsetround.c,v 1.1 1999/07/23 03:16:27 rahnds Exp $ */ +/* $OpenBSD: fpsetround.c,v 1.2 2006/03/31 04:23:36 drahn Exp $ */ /* $NetBSD: fpsetround.c,v 1.1 1999/07/07 01:55:08 danw Exp $ */ /* @@ -49,7 +49,7 @@ fpsetround(rnd_dir) __asm__ __volatile("mffs %0" : "=f"(fpscr)); old = fpscr & 0x3; - fpscr = (fpscr & 0xfffffffc) | rnd_dir; + fpscr = (fpscr & 0xfffffffcULL) | rnd_dir; __asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr)); return (old); } diff --git a/lib/libc/arch/powerpc/gen/fpsetsticky.c b/lib/libc/arch/powerpc/gen/fpsetsticky.c index 54b5530fcae..f1f1d2e3bd0 100644 --- a/lib/libc/arch/powerpc/gen/fpsetsticky.c +++ b/lib/libc/arch/powerpc/gen/fpsetsticky.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpsetsticky.c,v 1.1 1999/07/23 03:16:27 rahnds Exp $ */ +/* $OpenBSD: fpsetsticky.c,v 1.2 2006/03/31 04:23:36 drahn Exp $ */ /* $NetBSD: fpsetsticky.c,v 1.1 1999/07/07 01:55:08 danw Exp $ */ /* @@ -49,7 +49,7 @@ fpsetsticky(mask) __asm__ __volatile("mffs %0" : "=f"(fpscr)); old = (fpscr >> 25) & 0x1f; - fpscr = (fpscr & 0xc1ffffff) | (mask << 25); + fpscr = (fpscr & 0xc1ffffffULL) | (mask << 25); __asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr)); return (old); } -- cgit v1.2.3