Module Name: src
Committed By: isaki
Date: Tue Mar 19 09:17:17 UTC 2013
Modified Files:
src/sys/arch/m68k/fpe: fpu_add.c fpu_arith.h fpu_div.c fpu_emulate.h
fpu_explode.c fpu_implode.c fpu_int.c fpu_mul.c fpu_sqrt.c
fpu_subr.c
Log Message:
Remove 'register'.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/fpe/fpu_add.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/m68k/fpe/fpu_arith.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/fpe/fpu_div.c \
src/sys/arch/m68k/fpe/fpu_mul.c src/sys/arch/m68k/fpe/fpu_sqrt.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/m68k/fpe/fpu_emulate.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/m68k/fpe/fpu_explode.c \
src/sys/arch/m68k/fpe/fpu_int.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/m68k/fpe/fpu_implode.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/fpe/fpu_subr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/m68k/fpe/fpu_add.c
diff -u src/sys/arch/m68k/fpe/fpu_add.c:1.7 src/sys/arch/m68k/fpe/fpu_add.c:1.8
--- src/sys/arch/m68k/fpe/fpu_add.c:1.7 Sat Mar 14 15:36:09 2009
+++ src/sys/arch/m68k/fpe/fpu_add.c Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_add.c,v 1.7 2009/03/14 15:36:09 dsl Exp $ */
+/* $NetBSD: fpu_add.c,v 1.8 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_add.c,v 1.7 2009/03/14 15:36:09 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_add.c,v 1.8 2013/03/19 09:17:17 isaki Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -58,11 +58,11 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_add.c,v
#include "fpu_emulate.h"
struct fpn *
-fpu_add(register struct fpemu *fe)
+fpu_add(struct fpemu *fe)
{
- register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2, *r;
- register u_int r0, r1, r2;
- register int rd;
+ struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2, *r;
+ u_int r0, r1, r2;
+ int rd;
/*
* Put the `heavier' operand on the right (see fpu_emu.h).
Index: src/sys/arch/m68k/fpe/fpu_arith.h
diff -u src/sys/arch/m68k/fpe/fpu_arith.h:1.5 src/sys/arch/m68k/fpe/fpu_arith.h:1.6
--- src/sys/arch/m68k/fpe/fpu_arith.h:1.5 Sat Dec 24 22:45:35 2005
+++ src/sys/arch/m68k/fpe/fpu_arith.h Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_arith.h,v 1.5 2005/12/24 22:45:35 perry Exp $ */
+/* $NetBSD: fpu_arith.h,v 1.6 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -110,7 +110,7 @@
#else
/* set up for extended-precision arithemtic */
-#define FPU_DECL_CARRY register int fpu_tmp;
+#define FPU_DECL_CARRY int fpu_tmp;
/*
* We have three kinds of add:
Index: src/sys/arch/m68k/fpe/fpu_div.c
diff -u src/sys/arch/m68k/fpe/fpu_div.c:1.6 src/sys/arch/m68k/fpe/fpu_div.c:1.7
--- src/sys/arch/m68k/fpe/fpu_div.c:1.6 Sat Mar 14 15:36:09 2009
+++ src/sys/arch/m68k/fpe/fpu_div.c Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_div.c,v 1.6 2009/03/14 15:36:09 dsl Exp $ */
+/* $NetBSD: fpu_div.c,v 1.7 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_div.c,v 1.6 2009/03/14 15:36:09 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_div.c,v 1.7 2013/03/19 09:17:17 isaki Exp $");
#include <sys/types.h>
@@ -150,11 +150,11 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_div.c,v
*/
struct fpn *
-fpu_div(register struct fpemu *fe)
+fpu_div(struct fpemu *fe)
{
- register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
- register u_int q, bit;
- register u_int r0, r1, r2, d0, d1, d2, y0, y1, y2;
+ struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
+ u_int q, bit;
+ u_int r0, r1, r2, d0, d1, d2, y0, y1, y2;
FPU_DECL_CARRY
fe->fe_fpsr &= ~FPSR_EXCP; /* clear all exceptions */
Index: src/sys/arch/m68k/fpe/fpu_mul.c
diff -u src/sys/arch/m68k/fpe/fpu_mul.c:1.6 src/sys/arch/m68k/fpe/fpu_mul.c:1.7
--- src/sys/arch/m68k/fpe/fpu_mul.c:1.6 Sat Mar 14 15:36:09 2009
+++ src/sys/arch/m68k/fpe/fpu_mul.c Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_mul.c,v 1.6 2009/03/14 15:36:09 dsl Exp $ */
+/* $NetBSD: fpu_mul.c,v 1.7 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_mul.c,v 1.6 2009/03/14 15:36:09 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_mul.c,v 1.7 2013/03/19 09:17:17 isaki Exp $");
#include <sys/types.h>
@@ -77,8 +77,6 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_mul.c,v
*
* Since we do not have efficient multiword arithmetic, we code the
* accumulator as four separate words, just like any other mantissa.
- * We use local `register' variables in the hope that this is faster
- * than memory. We keep x->fp_mant in locals for the same reason.
*
* In the algorithm above, the bits in y are inspected one at a time.
* We will pick them up 32 at a time and then deal with those 32, one
@@ -99,11 +97,11 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_mul.c,v
* until we reach a nonzero word.
*/
struct fpn *
-fpu_mul(register struct fpemu *fe)
+fpu_mul(struct fpemu *fe)
{
- register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
- register u_int a2, a1, a0, x2, x1, x0, bit, m;
- register int sticky;
+ struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
+ u_int a2, a1, a0, x2, x1, x0, bit, m;
+ int sticky;
FPU_DECL_CARRY
/*
Index: src/sys/arch/m68k/fpe/fpu_sqrt.c
diff -u src/sys/arch/m68k/fpe/fpu_sqrt.c:1.6 src/sys/arch/m68k/fpe/fpu_sqrt.c:1.7
--- src/sys/arch/m68k/fpe/fpu_sqrt.c:1.6 Sat Mar 14 15:36:09 2009
+++ src/sys/arch/m68k/fpe/fpu_sqrt.c Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_sqrt.c,v 1.6 2009/03/14 15:36:09 dsl Exp $ */
+/* $NetBSD: fpu_sqrt.c,v 1.7 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_sqrt.c,v 1.6 2009/03/14 15:36:09 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_sqrt.c,v 1.7 2013/03/19 09:17:17 isaki Exp $");
#include <sys/types.h>
@@ -188,12 +188,12 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_sqrt.c,v
struct fpn *
fpu_sqrt(struct fpemu *fe)
{
- register struct fpn *x = &fe->fe_f2;
- register u_int bit, q, tt;
- register u_int x0, x1, x2;
- register u_int y0, y1, y2;
- register u_int d0, d1, d2;
- register int e;
+ struct fpn *x = &fe->fe_f2;
+ u_int bit, q, tt;
+ u_int x0, x1, x2;
+ u_int y0, y1, y2;
+ u_int d0, d1, d2;
+ int e;
FPU_DECL_CARRY
/*
Index: src/sys/arch/m68k/fpe/fpu_emulate.h
diff -u src/sys/arch/m68k/fpe/fpu_emulate.h:1.19 src/sys/arch/m68k/fpe/fpu_emulate.h:1.20
--- src/sys/arch/m68k/fpe/fpu_emulate.h:1.19 Sat Oct 15 15:34:06 2011
+++ src/sys/arch/m68k/fpe/fpu_emulate.h Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_emulate.h,v 1.19 2011/10/15 15:34:06 tsutsui Exp $ */
+/* $NetBSD: fpu_emulate.h,v 1.20 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1995 Gordon Ross
@@ -136,7 +136,7 @@ CPYFPN(struct fpn *dst, const struct fpn
SWAP(x, y); \
}
#define SWAP(x, y) { \
- register struct fpn *swap; \
+ struct fpn *swap; \
swap = (x), (x) = (y), (y) = swap; \
}
@@ -224,7 +224,7 @@ int fpu_shr(struct fpn *, int);
/*
* Round a number according to the round mode in FPCR
*/
-int fpu_round(register struct fpemu *, register struct fpn *);
+int fpu_round(struct fpemu *, struct fpn *);
/* type conversion */
void fpu_explode(struct fpemu *, struct fpn *, int t, u_int *);
@@ -266,7 +266,7 @@ int fpu_store_ea(struct frame *, struct
struct insn_ea *, char *);
/* fpu_subr.c */
-void fpu_norm(register struct fpn *);
+void fpu_norm(struct fpn *);
#if !defined(FPE_DEBUG)
# define FPE_DEBUG 0
Index: src/sys/arch/m68k/fpe/fpu_explode.c
diff -u src/sys/arch/m68k/fpe/fpu_explode.c:1.11 src/sys/arch/m68k/fpe/fpu_explode.c:1.12
--- src/sys/arch/m68k/fpe/fpu_explode.c:1.11 Mon Jul 18 07:44:30 2011
+++ src/sys/arch/m68k/fpe/fpu_explode.c Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_explode.c,v 1.11 2011/07/18 07:44:30 isaki Exp $ */
+/* $NetBSD: fpu_explode.c,v 1.12 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_explode.c,v 1.11 2011/07/18 07:44:30 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_explode.c,v 1.12 2013/03/19 09:17:17 isaki Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -87,7 +87,7 @@ static int fpu_xtof(struct fpn *fp, u_in
* int -> fpn.
*/
static int
-fpu_itof(register struct fpn *fp, register u_int i)
+fpu_itof(struct fpn *fp, u_int i)
{
if (i == 0)
@@ -143,10 +143,10 @@ fpu_itof(register struct fpn *fp, regist
* format: i.e., needs at most fp_mant[0] and fp_mant[1].
*/
static int
-fpu_stof(register struct fpn *fp, register u_int i)
+fpu_stof(struct fpn *fp, u_int i)
{
- register int exp;
- register u_int frac, f0, f1;
+ int exp;
+ u_int frac, f0, f1;
#define SNG_SHIFT (SNG_FRACBITS - FP_LG)
exp = (i >> (32 - 1 - SNG_EXPBITS)) & mask(SNG_EXPBITS);
@@ -161,10 +161,10 @@ fpu_stof(register struct fpn *fp, regist
* We assume this uses at most (96-FP_LG) bits.
*/
static int
-fpu_dtof(register struct fpn *fp, register u_int i, register u_int j)
+fpu_dtof(struct fpn *fp, u_int i, u_int j)
{
- register int exp;
- register u_int frac, f0, f1, f2;
+ int exp;
+ u_int frac, f0, f1, f2;
#define DBL_SHIFT (DBL_FRACBITS - 32 - FP_LG)
exp = (i >> (32 - 1 - DBL_EXPBITS)) & mask(DBL_EXPBITS);
@@ -180,11 +180,10 @@ fpu_dtof(register struct fpn *fp, regist
* 96-bit extended -> fpn.
*/
static int
-fpu_xtof(register struct fpn *fp, register u_int i, register u_int j,
- register u_int k)
+fpu_xtof(struct fpn *fp, u_int i, u_int j, u_int k)
{
- register int exp;
- register u_int frac, f0, f1, f2;
+ int exp;
+ u_int frac, f0, f1, f2;
#define EXT_SHIFT (EXT_FRACBITS - 1 - 32 - FP_LG)
exp = (i >> (32 - 1 - EXT_EXPBITS)) & mask(EXT_EXPBITS);
@@ -223,10 +222,9 @@ fpu_xtof(register struct fpn *fp, regist
* Explode the contents of a memory operand.
*/
void
-fpu_explode(register struct fpemu *fe, register struct fpn *fp, int type,
- register u_int *space)
+fpu_explode(struct fpemu *fe, struct fpn *fp, int type, u_int *space)
{
- register u_int s;
+ u_int s;
s = space[0];
fp->fp_sign = s >> 31;
Index: src/sys/arch/m68k/fpe/fpu_int.c
diff -u src/sys/arch/m68k/fpe/fpu_int.c:1.11 src/sys/arch/m68k/fpe/fpu_int.c:1.12
--- src/sys/arch/m68k/fpe/fpu_int.c:1.11 Mon Jun 25 04:52:23 2012
+++ src/sys/arch/m68k/fpe/fpu_int.c Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_int.c,v 1.11 2012/06/25 04:52:23 isaki Exp $ */
+/* $NetBSD: fpu_int.c,v 1.12 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_int.c,v 1.11 2012/06/25 04:52:23 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_int.c,v 1.12 2013/03/19 09:17:17 isaki Exp $");
#include <sys/types.h>
@@ -42,8 +42,8 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_int.c,v
struct fpn *
fpu_intrz(struct fpemu *fe)
{
- register struct fpn *x = &fe->fe_f2;
- register int sh, clr, mask, i;
+ struct fpn *x = &fe->fe_f2;
+ int sh, clr, mask, i;
/* special cases first */
if (x->fp_class != FPC_NUM) {
@@ -77,8 +77,8 @@ fpu_intrz(struct fpemu *fe)
struct fpn *
fpu_int(struct fpemu *fe)
{
- register struct fpn *x = &fe->fe_f2;
- register int rsh;
+ struct fpn *x = &fe->fe_f2;
+ int rsh;
/* special cases first */
if (x->fp_class != FPC_NUM) {
Index: src/sys/arch/m68k/fpe/fpu_implode.c
diff -u src/sys/arch/m68k/fpe/fpu_implode.c:1.12 src/sys/arch/m68k/fpe/fpu_implode.c:1.13
--- src/sys/arch/m68k/fpe/fpu_implode.c:1.12 Mon Jul 18 07:44:30 2011
+++ src/sys/arch/m68k/fpe/fpu_implode.c Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_implode.c,v 1.12 2011/07/18 07:44:30 isaki Exp $ */
+/* $NetBSD: fpu_implode.c,v 1.13 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_implode.c,v 1.12 2011/07/18 07:44:30 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_implode.c,v 1.13 2013/03/19 09:17:17 isaki Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -76,10 +76,10 @@ static u_int fpu_ftox(struct fpemu *fe,
* responsibility to fix this if necessary.
*/
int
-fpu_round(register struct fpemu *fe, register struct fpn *fp)
+fpu_round(struct fpemu *fe, struct fpn *fp)
{
- register u_int m0, m1, m2;
- register int gr, s;
+ u_int m0, m1, m2;
+ int gr, s;
m0 = fp->fp_mant[0];
m1 = fp->fp_mant[1];
@@ -187,10 +187,10 @@ toinf(struct fpemu *fe, int sign)
* of the SPARC instruction set).
*/
static u_int
-fpu_ftoi(struct fpemu *fe, register struct fpn *fp)
+fpu_ftoi(struct fpemu *fe, struct fpn *fp)
{
- register u_int i;
- register int sign, exp;
+ u_int i;
+ int sign, exp;
sign = fp->fp_sign;
switch (fp->fp_class) {
@@ -237,10 +237,10 @@ fpu_ftoi(struct fpemu *fe, register stru
* We assume <= 29 bits in a single-precision fraction (1.f part).
*/
static u_int
-fpu_ftos(struct fpemu *fe, register struct fpn *fp)
+fpu_ftos(struct fpemu *fe, struct fpn *fp)
{
- register u_int sign = fp->fp_sign << 31;
- register int exp;
+ u_int sign = fp->fp_sign << 31;
+ int exp;
#define SNG_EXP(e) ((e) << SNG_FRACBITS) /* makes e an exponent */
#define SNG_MASK (SNG_EXP(1) - 1) /* mask for fraction */
@@ -321,10 +321,10 @@ done:
* This code mimics fpu_ftos; see it for comments.
*/
static u_int
-fpu_ftod(struct fpemu *fe, register struct fpn *fp, u_int *res)
+fpu_ftod(struct fpemu *fe, struct fpn *fp, u_int *res)
{
- register u_int sign = fp->fp_sign << 31;
- register int exp;
+ u_int sign = fp->fp_sign << 31;
+ int exp;
#define DBL_EXP(e) ((e) << (DBL_FRACBITS & 31))
#define DBL_MASK (DBL_EXP(1) - 1)
@@ -383,10 +383,10 @@ done:
* This code mimics fpu_ftos; see it for comments.
*/
static u_int
-fpu_ftox(struct fpemu *fe, register struct fpn *fp, u_int *res)
+fpu_ftox(struct fpemu *fe, struct fpn *fp, u_int *res)
{
- register u_int sign = fp->fp_sign << 31;
- register int exp;
+ u_int sign = fp->fp_sign << 31;
+ int exp;
#define EXT_EXP(e) ((e) << 16)
/*
@@ -454,8 +454,7 @@ done:
* Implode an fpn, writing the result into the given space.
*/
void
-fpu_implode(struct fpemu *fe, register struct fpn *fp, int type,
- register u_int *space)
+fpu_implode(struct fpemu *fe, struct fpn *fp, int type, u_int *space)
{
/* XXX Dont delete exceptions set here: fe->fe_fpsr &= ~FPSR_EXCP; */
Index: src/sys/arch/m68k/fpe/fpu_subr.c
diff -u src/sys/arch/m68k/fpe/fpu_subr.c:1.8 src/sys/arch/m68k/fpe/fpu_subr.c:1.9
--- src/sys/arch/m68k/fpe/fpu_subr.c:1.8 Sat Dec 24 20:07:15 2005
+++ src/sys/arch/m68k/fpe/fpu_subr.c Tue Mar 19 09:17:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_subr.c,v 1.8 2005/12/24 20:07:15 perry Exp $ */
+/* $NetBSD: fpu_subr.c,v 1.9 2013/03/19 09:17:17 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v 1.8 2005/12/24 20:07:15 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v 1.9 2013/03/19 09:17:17 isaki Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -62,10 +62,10 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v
* sticky field is ignored anyway.
*/
int
-fpu_shr(register struct fpn *fp, register int rsh)
+fpu_shr(struct fpn *fp, int rsh)
{
- register u_int m0, m1, m2, s;
- register int lsh;
+ u_int m0, m1, m2, s;
+ int lsh;
#ifdef DIAGNOSTIC
if (rsh < 0 || (fp->fp_class != FPC_NUM && !ISNAN(fp)))
@@ -129,10 +129,10 @@ fpu_shr(register struct fpn *fp, registe
* a supernormal and it will fix it (provided fp->fp_mant[2] == 0).
*/
void
-fpu_norm(register struct fpn *fp)
+fpu_norm(struct fpn *fp)
{
- register u_int m0, m1, m2, sup, nrm;
- register int lsh, rsh, exp;
+ u_int m0, m1, m2, sup, nrm;
+ int lsh, rsh, exp;
exp = fp->fp_exp;
m0 = fp->fp_mant[0];
@@ -197,9 +197,9 @@ fpu_norm(register struct fpn *fp)
* As a side effect, we set OPERR for the current exceptions.
*/
struct fpn *
-fpu_newnan(register struct fpemu *fe)
+fpu_newnan(struct fpemu *fe)
{
- register struct fpn *fp;
+ struct fpn *fp;
fe->fe_fpsr |= FPSR_OPERR;
fp = &fe->fe_f3;