Explicitly set noat around instructions using $at.

This commit is contained in:
joerg 2014-09-17 11:02:55 +00:00
parent aca672a912
commit d131912831
7 changed files with 24 additions and 24 deletions

View File

@ -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
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}