diff --git a/lib/libc/arch/mips/gen/flt_rounds.c b/lib/libc/arch/mips/gen/flt_rounds.c index 0f5ac1465daf..561794c04e42 100644 --- a/lib/libc/arch/mips/gen/flt_rounds.c +++ b/lib/libc/arch/mips/gen/flt_rounds.c @@ -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 #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 @@ -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 } diff --git a/lib/libc/arch/mips/gen/fpgetmask.c b/lib/libc/arch/mips/gen/fpgetmask.c index 4e950a740bcb..9d640bfb75e7 100644 --- a/lib/libc/arch/mips/gen/fpgetmask.c +++ b/lib/libc/arch/mips/gen/fpgetmask.c @@ -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 #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; } diff --git a/lib/libc/arch/mips/gen/fpgetround.c b/lib/libc/arch/mips/gen/fpgetround.c index c29e0627002c..21775ce88916 100644 --- a/lib/libc/arch/mips/gen/fpgetround.c +++ b/lib/libc/arch/mips/gen/fpgetround.c @@ -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 #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; } diff --git a/lib/libc/arch/mips/gen/fpgetsticky.c b/lib/libc/arch/mips/gen/fpgetsticky.c index 408ea88e79ab..2c04eab25ffc 100644 --- a/lib/libc/arch/mips/gen/fpgetsticky.c +++ b/lib/libc/arch/mips/gen/fpgetsticky.c @@ -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 #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; } diff --git a/lib/libc/arch/mips/gen/fpsetmask.c b/lib/libc/arch/mips/gen/fpsetmask.c index e1083de15ee0..3a9f90bd9492 100644 --- a/lib/libc/arch/mips/gen/fpsetmask.c +++ b/lib/libc/arch/mips/gen/fpsetmask.c @@ -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 #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; } diff --git a/lib/libc/arch/mips/gen/fpsetround.c b/lib/libc/arch/mips/gen/fpsetround.c index 43c5dd013f53..34770c33b303 100644 --- a/lib/libc/arch/mips/gen/fpsetround.c +++ b/lib/libc/arch/mips/gen/fpsetround.c @@ -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 #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; } diff --git a/lib/libc/arch/mips/gen/fpsetsticky.c b/lib/libc/arch/mips/gen/fpsetsticky.c index 823e4880bca4..ade9ed23c506 100644 --- a/lib/libc/arch/mips/gen/fpsetsticky.c +++ b/lib/libc/arch/mips/gen/fpsetsticky.c @@ -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 #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; }