Module Name: src Committed By: joerg Date: Wed Sep 17 11:02:55 UTC 2014
Modified Files: src/lib/libc/arch/mips/gen: flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c fpsetsticky.c Log Message: Explicitly set noat around instructions using $at. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/mips/gen/flt_rounds.c cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/mips/gen/fpgetmask.c \ src/lib/libc/arch/mips/gen/fpgetsticky.c \ src/lib/libc/arch/mips/gen/fpsetmask.c \ src/lib/libc/arch/mips/gen/fpsetsticky.c cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/mips/gen/fpgetround.c \ src/lib/libc/arch/mips/gen/fpsetround.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/arch/mips/gen/flt_rounds.c diff -u src/lib/libc/arch/mips/gen/flt_rounds.c:1.7 src/lib/libc/arch/mips/gen/flt_rounds.c:1.8 --- src/lib/libc/arch/mips/gen/flt_rounds.c:1.7 Sun Jun 24 15:26:02 2012 +++ src/lib/libc/arch/mips/gen/flt_rounds.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: flt_rounds.c,v 1.7 2012/06/24 15:26:02 christos Exp $ */ +/* $NetBSD: flt_rounds.c,v 1.8 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: flt_rounds.c,v 1.7 2012/06/24 15:26:02 christos Exp $"); +__RCSID("$NetBSD: flt_rounds.c,v 1.8 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include <machine/float.h> @@ -28,7 +28,7 @@ __flt_rounds(void) #else int x; - __asm("cfc1\t%0,$31" : "=r" (x)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (x)); return map[x & 0x03]; #endif } Index: src/lib/libc/arch/mips/gen/fpgetmask.c diff -u src/lib/libc/arch/mips/gen/fpgetmask.c:1.8 src/lib/libc/arch/mips/gen/fpgetmask.c:1.9 --- src/lib/libc/arch/mips/gen/fpgetmask.c:1.8 Tue Mar 20 16:19:56 2012 +++ src/lib/libc/arch/mips/gen/fpgetmask.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ +/* $NetBSD: fpgetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); +__RCSID("$NetBSD: fpgetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -23,6 +23,6 @@ fpgetmask(void) { fp_except x; - __asm("cfc1 %0,$31" : "=r" (x)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (x)); return (x >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpgetsticky.c diff -u src/lib/libc/arch/mips/gen/fpgetsticky.c:1.8 src/lib/libc/arch/mips/gen/fpgetsticky.c:1.9 --- src/lib/libc/arch/mips/gen/fpgetsticky.c:1.8 Tue Mar 20 16:19:56 2012 +++ src/lib/libc/arch/mips/gen/fpgetsticky.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ +/* $NetBSD: fpgetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); +__RCSID("$NetBSD: fpgetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -23,6 +23,6 @@ fpgetsticky(void) { fp_except x; - __asm("cfc1 %0,$31" : "=r" (x)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (x)); return (x >> 2) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetmask.c diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.8 src/lib/libc/arch/mips/gen/fpsetmask.c:1.9 --- src/lib/libc/arch/mips/gen/fpsetmask.c:1.8 Tue Mar 20 16:19:56 2012 +++ src/lib/libc/arch/mips/gen/fpsetmask.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); +__RCSID("$NetBSD: fpsetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -24,12 +24,12 @@ fpsetmask(fp_except mask) fp_except old; fp_except new; - __asm("cfc1 %0,$31" : "=r" (old)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (old)); new = old & ~(0x1f << 7); new |= ((mask & 0x1f) << 7); - __asm("ctc1 %0,$31" : : "r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); return (old >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetsticky.c diff -u src/lib/libc/arch/mips/gen/fpsetsticky.c:1.8 src/lib/libc/arch/mips/gen/fpsetsticky.c:1.9 --- src/lib/libc/arch/mips/gen/fpsetsticky.c:1.8 Tue Mar 20 16:19:56 2012 +++ src/lib/libc/arch/mips/gen/fpsetsticky.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ +/* $NetBSD: fpsetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); +__RCSID("$NetBSD: fpsetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -24,12 +24,12 @@ fpsetsticky(fp_except sticky) fp_except old; fp_except new; - __asm("cfc1 %0,$31" : "=r" (old)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (old)); new = old & ~(0x1f << 2); new |= (sticky & 0x1f) << 2; - __asm("ctc1 %0,$31" : : "r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); return (old >> 2) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpgetround.c diff -u src/lib/libc/arch/mips/gen/fpgetround.c:1.6 src/lib/libc/arch/mips/gen/fpgetround.c:1.7 --- src/lib/libc/arch/mips/gen/fpgetround.c:1.6 Mon Mar 19 22:23:10 2012 +++ src/lib/libc/arch/mips/gen/fpgetround.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ +/* $NetBSD: fpgetround.c,v 1.7 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); +__RCSID("$NetBSD: fpgetround.c,v 1.7 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -23,6 +23,6 @@ fpgetround(void) { fp_rnd x; - __asm("cfc1 %0,$31" : "=r" (x)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (x)); return x & 0x03; } Index: src/lib/libc/arch/mips/gen/fpsetround.c diff -u src/lib/libc/arch/mips/gen/fpsetround.c:1.6 src/lib/libc/arch/mips/gen/fpsetround.c:1.7 --- src/lib/libc/arch/mips/gen/fpsetround.c:1.6 Mon Mar 19 22:23:10 2012 +++ src/lib/libc/arch/mips/gen/fpsetround.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ +/* $NetBSD: fpsetround.c,v 1.7 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); +__RCSID("$NetBSD: fpsetround.c,v 1.7 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -24,12 +24,12 @@ fpsetround(fp_rnd rnd_dir) fp_rnd old; fp_rnd new; - __asm("cfc1 %0,$31" : "=r" (old)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (old)); new = old & ~0x03; new |= rnd_dir & 0x03; - __asm("ctc1 %0,$31" : : "r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); return old & 0x03; }