Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/m68k/fpe u_int -> uint32_t
details: https://anonhg.NetBSD.org/src/rev/0186d3bdcd46
branches: trunk
changeset: 785712:0186d3bdcd46
user: isaki <isaki%NetBSD.org@localhost>
date: Tue Mar 26 11:30:20 2013 +0000
description:
u_int -> uint32_t
diffstat:
sys/arch/m68k/fpe/fpu_add.c | 6 +++---
sys/arch/m68k/fpe/fpu_arith.h | 10 +++++-----
sys/arch/m68k/fpe/fpu_div.c | 8 ++++----
sys/arch/m68k/fpe/fpu_emulate.c | 16 ++++++++--------
sys/arch/m68k/fpe/fpu_emulate.h | 24 ++++++++++++------------
sys/arch/m68k/fpe/fpu_explode.c | 30 +++++++++++++++---------------
sys/arch/m68k/fpe/fpu_fmovecr.c | 8 ++++----
sys/arch/m68k/fpe/fpu_fscale.c | 12 ++++++------
sys/arch/m68k/fpe/fpu_fstore.c | 8 ++++----
sys/arch/m68k/fpe/fpu_implode.c | 38 +++++++++++++++++++-------------------
sys/arch/m68k/fpe/fpu_log.c | 37 +++++++++++++++++++------------------
sys/arch/m68k/fpe/fpu_mul.c | 6 +++---
sys/arch/m68k/fpe/fpu_rem.c | 6 +++---
sys/arch/m68k/fpe/fpu_sqrt.c | 12 ++++++------
sys/arch/m68k/fpe/fpu_subr.c | 8 ++++----
sys/arch/m68k/fpe/fpu_trig.c | 8 ++++----
16 files changed, 119 insertions(+), 118 deletions(-)
diffs (truncated from 800 to 300 lines):
diff -r 21c81d98d965 -r 0186d3bdcd46 sys/arch/m68k/fpe/fpu_add.c
--- a/sys/arch/m68k/fpe/fpu_add.c Tue Mar 26 10:57:13 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_add.c Tue Mar 26 11:30:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_add.c,v 1.8 2013/03/19 09:17:17 isaki Exp $ */
+/* $NetBSD: fpu_add.c,v 1.9 2013/03/26 11:30:20 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_add.c,v 1.8 2013/03/19 09:17:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_add.c,v 1.9 2013/03/26 11:30:20 isaki Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -61,7 +61,7 @@
fpu_add(struct fpemu *fe)
{
struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2, *r;
- u_int r0, r1, r2;
+ uint32_t r0, r1, r2;
int rd;
/*
diff -r 21c81d98d965 -r 0186d3bdcd46 sys/arch/m68k/fpe/fpu_arith.h
--- a/sys/arch/m68k/fpe/fpu_arith.h Tue Mar 26 10:57:13 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_arith.h Tue Mar 26 11:30:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_arith.h,v 1.6 2013/03/19 09:17:17 isaki Exp $ */
+/* $NetBSD: fpu_arith.h,v 1.7 2013/03/26 11:30:20 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -80,13 +80,13 @@
#define FPU_ADDS(r, x, y) \
{ \
fpu_tmp = (quad_t)(x) + (quad_t)(y); \
- (r) = (u_int)fpu_tmp; \
+ (r) = (uint32_t)fpu_tmp; \
fpu_carry = ((fpu_tmp & 0xffffffff00000000LL) != 0); \
}
#define FPU_ADDCS(r, x, y) \
{ \
fpu_tmp = (quad_t)(x) + (quad_t)(y) + (!!fpu_carry); \
- (r) = (u_int)fpu_tmp; \
+ (r) = (uint32_t)fpu_tmp; \
fpu_carry = ((fpu_tmp & 0xffffffff00000000LL) != 0); \
}
#define FPU_SUBC(r, x, y) \
@@ -94,13 +94,13 @@
#define FPU_SUBS(r, x, y) \
{ \
fpu_tmp = (quad_t)(x) - (quad_t)(y); \
- (r) = (u_int)fpu_tmp; \
+ (r) = (uint32_t)fpu_tmp; \
fpu_carry = ((fpu_tmp & 0xffffffff00000000LL) != 0); \
}
#define FPU_SUBCS(r, x, y) \
{ \
fpu_tmp = (quad_t)(x) - (quad_t)(y) - (!!fpu_carry); \
- (r) = (u_int)fpu_tmp; \
+ (r) = (uint32_t)fpu_tmp; \
fpu_carry = ((fpu_tmp & 0xffffffff00000000LL) != 0); \
}
diff -r 21c81d98d965 -r 0186d3bdcd46 sys/arch/m68k/fpe/fpu_div.c
--- a/sys/arch/m68k/fpe/fpu_div.c Tue Mar 26 10:57:13 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_div.c Tue Mar 26 11:30:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_div.c,v 1.7 2013/03/19 09:17:17 isaki Exp $ */
+/* $NetBSD: fpu_div.c,v 1.8 2013/03/26 11:30:20 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_div.c,v 1.7 2013/03/19 09:17:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_div.c,v 1.8 2013/03/26 11:30:20 isaki Exp $");
#include <sys/types.h>
@@ -153,8 +153,8 @@
fpu_div(struct fpemu *fe)
{
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;
+ uint32_t q, bit;
+ uint32_t r0, r1, r2, d0, d1, d2, y0, y1, y2;
FPU_DECL_CARRY
fe->fe_fpsr &= ~FPSR_EXCP; /* clear all exceptions */
diff -r 21c81d98d965 -r 0186d3bdcd46 sys/arch/m68k/fpe/fpu_emulate.c
--- a/sys/arch/m68k/fpe/fpu_emulate.c Tue Mar 26 10:57:13 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_emulate.c Tue Mar 26 11:30:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_emulate.c,v 1.36 2011/10/15 15:14:29 tsutsui Exp $ */
+/* $NetBSD: fpu_emulate.c,v 1.37 2013/03/26 11:30:20 isaki Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_emulate.c,v 1.36 2011/10/15 15:14:29 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_emulate.c,v 1.37 2013/03/26 11:30:20 isaki Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -245,8 +245,8 @@
int
fpu_upd_excp(struct fpemu *fe)
{
- u_int fpsr;
- u_int fpcr;
+ uint32_t fpsr;
+ uint32_t fpcr;
fpsr = fe->fe_fpsr;
fpcr = fe->fe_fpcr;
@@ -276,10 +276,10 @@
}
/* update fpsr according to fp (= result of an fp op) */
-u_int
+uint32_t
fpu_upd_fpsr(struct fpemu *fe, struct fpn *fp)
{
- u_int fpsr;
+ uint32_t fpsr;
DPRINTF(("%s: previous fpsr=%08x\n", __func__, fe->fe_fpsr));
/* clear all condition code */
@@ -556,12 +556,12 @@
fpu_emul_arith(struct fpemu *fe, struct instruction *insn)
{
struct frame *frame = fe->fe_frame;
- u_int *fpregs = &(fe->fe_fpframe->fpf_regs[0]);
+ uint32_t *fpregs = &(fe->fe_fpframe->fpf_regs[0]);
struct fpn *res;
int word1, sig = 0;
int regnum, format;
int discard_result = 0;
- u_int buf[3];
+ uint32_t buf[3];
#ifdef DEBUG_FPE
int flags;
char regname;
diff -r 21c81d98d965 -r 0186d3bdcd46 sys/arch/m68k/fpe/fpu_emulate.h
--- a/sys/arch/m68k/fpe/fpu_emulate.h Tue Mar 26 10:57:13 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_emulate.h Tue Mar 26 11:30:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_emulate.h,v 1.21 2013/03/19 09:28:39 isaki Exp $ */
+/* $NetBSD: fpu_emulate.h,v 1.22 2013/03/26 11:30:20 isaki Exp $ */
/*
* Copyright (c) 1995 Gordon Ross
@@ -81,7 +81,7 @@
int fp_sign; /* 0 => positive, 1 => negative */
int fp_exp; /* exponent (unbiased) */
int fp_sticky; /* nonzero bits lost at right end */
- u_int fp_mant[3]; /* 83-bit mantissa */
+ uint32_t fp_mant[3]; /* 83-bit mantissa */
};
#define FP_NMANT 83 /* total bits in mantissa (incl g,r) */
@@ -132,7 +132,7 @@
* then op1 is the one we want; otherwise op2 is the one we want.
*/
#define ORDER(x, y) { \
- if ((u_int)(x)->fp_class > (u_int)(y)->fp_class) \
+ if ((uint32_t)(x)->fp_class > (uint32_t)(y)->fp_class) \
SWAP(x, y); \
}
#define SWAP(x, y) { \
@@ -146,8 +146,8 @@
struct fpemu {
struct frame *fe_frame; /* integer regs, etc */
struct fpframe *fe_fpframe; /* FP registers, etc */
- u_int fe_fpsr; /* fpsr copy (modified during op) */
- u_int fe_fpcr; /* fpcr copy */
+ uint32_t fe_fpsr; /* fpsr copy (modified during op) */
+ uint32_t fe_fpcr; /* fpcr copy */
struct fpn fe_f1; /* operand 1 */
struct fpn fe_f2; /* operand 2, if required */
struct fpn fe_f3; /* available storage for result */
@@ -188,8 +188,8 @@
#define ea_fea ea_ext[0] /* MC68LC040 only: frame EA */
struct instruction {
- u_int is_pc; /* insn's address */
- u_int is_nextpc; /* next PC */
+ uint32_t is_pc; /* insn's address */
+ uint32_t is_nextpc; /* next PC */
int is_advance; /* length of instruction */
int is_datasize; /* size of memory operand */
int is_opcode; /* opcode word */
@@ -227,8 +227,8 @@
int fpu_round(struct fpemu *, struct fpn *);
/* type conversion */
-void fpu_explode(struct fpemu *, struct fpn *, int t, const u_int *);
-void fpu_implode(struct fpemu *, struct fpn *, int t, u_int *);
+void fpu_explode(struct fpemu *, struct fpn *, int t, const uint32_t *);
+void fpu_implode(struct fpemu *, struct fpn *, int t, uint32_t *);
/*
* non-static emulation functions
@@ -246,16 +246,16 @@
int fpu_emulate(struct frame *, struct fpframe *, ksiginfo_t *);
struct fpn *fpu_cmp(struct fpemu *);
-struct fpn *fpu_sincos_taylor(struct fpemu *, struct fpn *, u_int, int);
+struct fpn *fpu_sincos_taylor(struct fpemu *, struct fpn *, uint32_t, int);
/*
* "helper" functions
*/
/* return values from constant rom */
-struct fpn *fpu_const(struct fpn *, u_int);
+struct fpn *fpu_const(struct fpn *, uint32_t);
/* update exceptions and FPSR */
int fpu_upd_excp(struct fpemu *);
-u_int fpu_upd_fpsr(struct fpemu *, struct fpn *);
+uint32_t fpu_upd_fpsr(struct fpemu *, struct fpn *);
/* address mode decoder, and load/store */
int fpu_decode_ea(struct frame *, struct instruction *,
diff -r 21c81d98d965 -r 0186d3bdcd46 sys/arch/m68k/fpe/fpu_explode.c
--- a/sys/arch/m68k/fpe/fpu_explode.c Tue Mar 26 10:57:13 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_explode.c Tue Mar 26 11:30:20 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_explode.c,v 1.13 2013/03/19 09:28:39 isaki Exp $ */
+/* $NetBSD: fpu_explode.c,v 1.14 2013/03/26 11:30:20 isaki Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_explode.c,v 1.13 2013/03/19 09:28:39 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_explode.c,v 1.14 2013/03/26 11:30:20 isaki Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -59,10 +59,10 @@
/* Conversion to internal format -- note asymmetry. */
-static int fpu_itof(struct fpn *fp, u_int i);
-static int fpu_stof(struct fpn *fp, u_int i);
-static int fpu_dtof(struct fpn *fp, u_int i, u_int j);
-static int fpu_xtof(struct fpn *fp, u_int i, u_int j, u_int k);
+static int fpu_itof(struct fpn *fp, uint32_t i);
+static int fpu_stof(struct fpn *fp, uint32_t i);
+static int fpu_dtof(struct fpn *fp, uint32_t i, uint32_t j);
+static int fpu_xtof(struct fpn *fp, uint32_t i, uint32_t j, uint32_t k);
/*
* N.B.: in all of the following, we assume the FP format is
@@ -87,7 +87,7 @@
* int -> fpn.
*/
static int
-fpu_itof(struct fpn *fp, u_int i)
+fpu_itof(struct fpn *fp, uint32_t i)
{
if (i == 0)
@@ -143,10 +143,10 @@
* format: i.e., needs at most fp_mant[0] and fp_mant[1].
*/
static int
-fpu_stof(struct fpn *fp, u_int i)
+fpu_stof(struct fpn *fp, uint32_t i)
{
int exp;
- u_int frac, f0, f1;
+ uint32_t frac, f0, f1;
#define SNG_SHIFT (SNG_FRACBITS - FP_LG)
exp = (i >> (32 - 1 - SNG_EXPBITS)) & mask(SNG_EXPBITS);
@@ -161,10 +161,10 @@
* We assume this uses at most (96-FP_LG) bits.
*/
static int
-fpu_dtof(struct fpn *fp, u_int i, u_int j)
+fpu_dtof(struct fpn *fp, uint32_t i, uint32_t j)
{
int exp;
- u_int frac, f0, f1, f2;
+ uint32_t frac, f0, f1, f2;
#define DBL_SHIFT (DBL_FRACBITS - 32 - FP_LG)
Home |
Main Index |
Thread Index |
Old Index