Module Name: src
Committed By: chs
Date: Mon Feb 27 06:55:26 UTC 2017
Modified Files:
src/lib/libc/arch/mips/gen: fpsetmask.c fpsetround.c fpsetsticky.c
Log Message:
fix asm operands: "ctc1" uses the register as an input, not an output.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/mips/gen/fpsetmask.c \
src/lib/libc/arch/mips/gen/fpsetsticky.c
cvs rdiff -u -r1.7 -r1.8 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/fpsetmask.c
diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.9 src/lib/libc/arch/mips/gen/fpsetmask.c:1.10
--- src/lib/libc/arch/mips/gen/fpsetmask.c:1.9 Wed Sep 17 11:02:55 2014
+++ src/lib/libc/arch/mips/gen/fpsetmask.c Mon Feb 27 06:55:26 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: fpsetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */
+/* $NetBSD: fpsetmask.c,v 1.10 2017/02/27 06:55:26 chs 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.9 2014/09/17 11:02:55 joerg Exp $");
+__RCSID("$NetBSD: fpsetmask.c,v 1.10 2017/02/27 06:55:26 chs Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -29,7 +29,7 @@ fpsetmask(fp_except mask)
new = old & ~(0x1f << 7);
new |= ((mask & 0x1f) << 7);
- __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=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.9 src/lib/libc/arch/mips/gen/fpsetsticky.c:1.10
--- src/lib/libc/arch/mips/gen/fpsetsticky.c:1.9 Wed Sep 17 11:02:55 2014
+++ src/lib/libc/arch/mips/gen/fpsetsticky.c Mon Feb 27 06:55:26 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: fpsetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */
+/* $NetBSD: fpsetsticky.c,v 1.10 2017/02/27 06:55:26 chs 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.9 2014/09/17 11:02:55 joerg Exp $");
+__RCSID("$NetBSD: fpsetsticky.c,v 1.10 2017/02/27 06:55:26 chs Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -29,7 +29,7 @@ fpsetsticky(fp_except sticky)
new = old & ~(0x1f << 2);
new |= (sticky & 0x1f) << 2;
- __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=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/fpsetround.c
diff -u src/lib/libc/arch/mips/gen/fpsetround.c:1.7 src/lib/libc/arch/mips/gen/fpsetround.c:1.8
--- src/lib/libc/arch/mips/gen/fpsetround.c:1.7 Wed Sep 17 11:02:55 2014
+++ src/lib/libc/arch/mips/gen/fpsetround.c Mon Feb 27 06:55:26 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: fpsetround.c,v 1.7 2014/09/17 11:02:55 joerg Exp $ */
+/* $NetBSD: fpsetround.c,v 1.8 2017/02/27 06:55:26 chs 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.7 2014/09/17 11:02:55 joerg Exp $");
+__RCSID("$NetBSD: fpsetround.c,v 1.8 2017/02/27 06:55:26 chs Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -29,7 +29,7 @@ fpsetround(fp_rnd rnd_dir)
new = old & ~0x03;
new |= rnd_dir & 0x03;
- __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new));
+ __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : : "r" (new));
return old & 0x03;
}