aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/math-emu/cp1emu.c18
-rw-r--r--arch/mips/math-emu/dp_maddf.c8
-rw-r--r--arch/mips/math-emu/dp_mul.c8
-rw-r--r--arch/mips/math-emu/dp_sqrt.c4
-rw-r--r--arch/mips/math-emu/ieee754.h15
-rw-r--r--arch/mips/math-emu/ieee754int.h6
-rw-r--r--arch/mips/math-emu/ieee754sp.c4
-rw-r--r--arch/mips/math-emu/ieee754sp.h2
-rw-r--r--arch/mips/math-emu/sp_div.c4
-rw-r--r--arch/mips/math-emu/sp_fint.c2
-rw-r--r--arch/mips/math-emu/sp_maddf.c6
-rw-r--r--arch/mips/math-emu/sp_mul.c10
12 files changed, 45 insertions, 42 deletions
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index d2fcb3084279..9f145e1a793a 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -810,7 +810,7 @@ do { \
810#define SITOREG(si, x) \ 810#define SITOREG(si, x) \
811do { \ 811do { \
812 if (cop1_64bit(xcp) && !hybrid_fprs()) { \ 812 if (cop1_64bit(xcp) && !hybrid_fprs()) { \
813 unsigned i; \ 813 unsigned int i; \
814 set_fpr32(&ctx->fpr[x], 0, si); \ 814 set_fpr32(&ctx->fpr[x], 0, si); \
815 for (i = 1; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \ 815 for (i = 1; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \
816 set_fpr32(&ctx->fpr[x], i, 0); \ 816 set_fpr32(&ctx->fpr[x], i, 0); \
@@ -823,7 +823,7 @@ do { \
823 823
824#define SITOHREG(si, x) \ 824#define SITOHREG(si, x) \
825do { \ 825do { \
826 unsigned i; \ 826 unsigned int i; \
827 set_fpr32(&ctx->fpr[x], 1, si); \ 827 set_fpr32(&ctx->fpr[x], 1, si); \
828 for (i = 2; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \ 828 for (i = 2; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \
829 set_fpr32(&ctx->fpr[x], i, 0); \ 829 set_fpr32(&ctx->fpr[x], i, 0); \
@@ -834,7 +834,7 @@ do { \
834 834
835#define DITOREG(di, x) \ 835#define DITOREG(di, x) \
836do { \ 836do { \
837 unsigned fpr, i; \ 837 unsigned int fpr, i; \
838 fpr = (x) & ~(cop1_64bit(xcp) ^ 1); \ 838 fpr = (x) & ~(cop1_64bit(xcp) ^ 1); \
839 set_fpr64(&ctx->fpr[fpr], 0, di); \ 839 set_fpr64(&ctx->fpr[fpr], 0, di); \
840 for (i = 1; i < ARRAY_SIZE(ctx->fpr[x].val64); i++) \ 840 for (i = 1; i < ARRAY_SIZE(ctx->fpr[x].val64); i++) \
@@ -1465,7 +1465,7 @@ DEF3OP(nmsub, dp, ieee754dp_mul, ieee754dp_sub, ieee754dp_neg);
1465static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, 1465static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
1466 mips_instruction ir, void __user **fault_addr) 1466 mips_instruction ir, void __user **fault_addr)
1467{ 1467{
1468 unsigned rcsr = 0; /* resulting csr */ 1468 unsigned int rcsr = 0; /* resulting csr */
1469 1469
1470 MIPS_FPU_EMU_INC_STATS(cp1xops); 1470 MIPS_FPU_EMU_INC_STATS(cp1xops);
1471 1471
@@ -1661,10 +1661,10 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
1661 mips_instruction ir) 1661 mips_instruction ir)
1662{ 1662{
1663 int rfmt; /* resulting format */ 1663 int rfmt; /* resulting format */
1664 unsigned rcsr = 0; /* resulting csr */ 1664 unsigned int rcsr = 0; /* resulting csr */
1665 unsigned int oldrm; 1665 unsigned int oldrm;
1666 unsigned int cbit; 1666 unsigned int cbit;
1667 unsigned cond; 1667 unsigned int cond;
1668 union { 1668 union {
1669 union ieee754dp d; 1669 union ieee754dp d;
1670 union ieee754sp s; 1670 union ieee754sp s;
@@ -2029,9 +2029,10 @@ copcsr:
2029 2029
2030 default: 2030 default:
2031 if (!NO_R6EMU && MIPSInst_FUNC(ir) >= fcmp_op) { 2031 if (!NO_R6EMU && MIPSInst_FUNC(ir) >= fcmp_op) {
2032 unsigned cmpop = MIPSInst_FUNC(ir) - fcmp_op; 2032 unsigned int cmpop;
2033 union ieee754sp fs, ft; 2033 union ieee754sp fs, ft;
2034 2034
2035 cmpop = MIPSInst_FUNC(ir) - fcmp_op;
2035 SPFROMREG(fs, MIPSInst_FS(ir)); 2036 SPFROMREG(fs, MIPSInst_FS(ir));
2036 SPFROMREG(ft, MIPSInst_FT(ir)); 2037 SPFROMREG(ft, MIPSInst_FT(ir));
2037 rv.w = ieee754sp_cmp(fs, ft, 2038 rv.w = ieee754sp_cmp(fs, ft,
@@ -2379,9 +2380,10 @@ dcopuop:
2379 2380
2380 default: 2381 default:
2381 if (!NO_R6EMU && MIPSInst_FUNC(ir) >= fcmp_op) { 2382 if (!NO_R6EMU && MIPSInst_FUNC(ir) >= fcmp_op) {
2382 unsigned cmpop = MIPSInst_FUNC(ir) - fcmp_op; 2383 unsigned int cmpop;
2383 union ieee754dp fs, ft; 2384 union ieee754dp fs, ft;
2384 2385
2386 cmpop = MIPSInst_FUNC(ir) - fcmp_op;
2385 DPFROMREG(fs, MIPSInst_FS(ir)); 2387 DPFROMREG(fs, MIPSInst_FS(ir));
2386 DPFROMREG(ft, MIPSInst_FT(ir)); 2388 DPFROMREG(ft, MIPSInst_FT(ir));
2387 rv.w = ieee754dp_cmp(fs, ft, 2389 rv.w = ieee754dp_cmp(fs, ft,
diff --git a/arch/mips/math-emu/dp_maddf.c b/arch/mips/math-emu/dp_maddf.c
index e0d9be5fbf4c..7ad79ed411f5 100644
--- a/arch/mips/math-emu/dp_maddf.c
+++ b/arch/mips/math-emu/dp_maddf.c
@@ -45,10 +45,10 @@ static union ieee754dp _dp_maddf(union ieee754dp z, union ieee754dp x,
45{ 45{
46 int re; 46 int re;
47 int rs; 47 int rs;
48 unsigned lxm; 48 unsigned int lxm;
49 unsigned hxm; 49 unsigned int hxm;
50 unsigned lym; 50 unsigned int lym;
51 unsigned hym; 51 unsigned int hym;
52 u64 lrm; 52 u64 lrm;
53 u64 hrm; 53 u64 hrm;
54 u64 lzm; 54 u64 lzm;
diff --git a/arch/mips/math-emu/dp_mul.c b/arch/mips/math-emu/dp_mul.c
index 87d0b44b0614..60c8bfe40947 100644
--- a/arch/mips/math-emu/dp_mul.c
+++ b/arch/mips/math-emu/dp_mul.c
@@ -26,10 +26,10 @@ union ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y)
26 int re; 26 int re;
27 int rs; 27 int rs;
28 u64 rm; 28 u64 rm;
29 unsigned lxm; 29 unsigned int lxm;
30 unsigned hxm; 30 unsigned int hxm;
31 unsigned lym; 31 unsigned int lym;
32 unsigned hym; 32 unsigned int hym;
33 u64 lrm; 33 u64 lrm;
34 u64 hrm; 34 u64 hrm;
35 u64 t; 35 u64 t;
diff --git a/arch/mips/math-emu/dp_sqrt.c b/arch/mips/math-emu/dp_sqrt.c
index cd5bc083001e..cea907b83146 100644
--- a/arch/mips/math-emu/dp_sqrt.c
+++ b/arch/mips/math-emu/dp_sqrt.c
@@ -21,7 +21,7 @@
21 21
22#include "ieee754dp.h" 22#include "ieee754dp.h"
23 23
24static const unsigned table[] = { 24static const unsigned int table[] = {
25 0, 1204, 3062, 5746, 9193, 13348, 18162, 23592, 25 0, 1204, 3062, 5746, 9193, 13348, 18162, 23592,
26 29598, 36145, 43202, 50740, 58733, 67158, 75992, 26 29598, 36145, 43202, 50740, 58733, 67158, 75992,
27 85215, 83599, 71378, 60428, 50647, 41945, 34246, 27 85215, 83599, 71378, 60428, 50647, 41945, 34246,
@@ -33,7 +33,7 @@ union ieee754dp ieee754dp_sqrt(union ieee754dp x)
33{ 33{
34 struct _ieee754_csr oldcsr; 34 struct _ieee754_csr oldcsr;
35 union ieee754dp y, z, t; 35 union ieee754dp y, z, t;
36 unsigned scalx, yh; 36 unsigned int scalx, yh;
37 COMPXDP; 37 COMPXDP;
38 38
39 EXPLODEXDP; 39 EXPLODEXDP;
diff --git a/arch/mips/math-emu/ieee754.h b/arch/mips/math-emu/ieee754.h
index 92dc8fa565cb..e0eb7a965fdf 100644
--- a/arch/mips/math-emu/ieee754.h
+++ b/arch/mips/math-emu/ieee754.h
@@ -165,11 +165,12 @@ struct _ieee754_csr {
165}; 165};
166#define ieee754_csr (*(struct _ieee754_csr *)(&current->thread.fpu.fcr31)) 166#define ieee754_csr (*(struct _ieee754_csr *)(&current->thread.fpu.fcr31))
167 167
168static inline unsigned ieee754_getrm(void) 168static inline unsigned int ieee754_getrm(void)
169{ 169{
170 return (ieee754_csr.rm); 170 return (ieee754_csr.rm);
171} 171}
172static inline unsigned ieee754_setrm(unsigned rm) 172
173static inline unsigned int ieee754_setrm(unsigned int rm)
173{ 174{
174 return (ieee754_csr.rm = rm); 175 return (ieee754_csr.rm = rm);
175} 176}
@@ -177,14 +178,14 @@ static inline unsigned ieee754_setrm(unsigned rm)
177/* 178/*
178 * get current exceptions 179 * get current exceptions
179 */ 180 */
180static inline unsigned ieee754_getcx(void) 181static inline unsigned int ieee754_getcx(void)
181{ 182{
182 return (ieee754_csr.cx); 183 return (ieee754_csr.cx);
183} 184}
184 185
185/* test for current exception condition 186/* test for current exception condition
186 */ 187 */
187static inline int ieee754_cxtest(unsigned n) 188static inline int ieee754_cxtest(unsigned int n)
188{ 189{
189 return (ieee754_csr.cx & n); 190 return (ieee754_csr.cx & n);
190} 191}
@@ -192,21 +193,21 @@ static inline int ieee754_cxtest(unsigned n)
192/* 193/*
193 * get sticky exceptions 194 * get sticky exceptions
194 */ 195 */
195static inline unsigned ieee754_getsx(void) 196static inline unsigned int ieee754_getsx(void)
196{ 197{
197 return (ieee754_csr.sx); 198 return (ieee754_csr.sx);
198} 199}
199 200
200/* clear sticky conditions 201/* clear sticky conditions
201*/ 202*/
202static inline unsigned ieee754_clrsx(void) 203static inline unsigned int ieee754_clrsx(void)
203{ 204{
204 return (ieee754_csr.sx = 0); 205 return (ieee754_csr.sx = 0);
205} 206}
206 207
207/* test for sticky exception condition 208/* test for sticky exception condition
208 */ 209 */
209static inline int ieee754_sxtest(unsigned n) 210static inline int ieee754_sxtest(unsigned int n)
210{ 211{
211 return (ieee754_csr.sx & n); 212 return (ieee754_csr.sx & n);
212} 213}
diff --git a/arch/mips/math-emu/ieee754int.h b/arch/mips/math-emu/ieee754int.h
index dd2071f430e0..06ac0e2ac7ac 100644
--- a/arch/mips/math-emu/ieee754int.h
+++ b/arch/mips/math-emu/ieee754int.h
@@ -54,13 +54,13 @@ static inline int ieee754_class_nan(int xc)
54} 54}
55 55
56#define COMPXSP \ 56#define COMPXSP \
57 unsigned xm; int xe; int xs __maybe_unused; int xc 57 unsigned int xm; int xe; int xs __maybe_unused; int xc
58 58
59#define COMPYSP \ 59#define COMPYSP \
60 unsigned ym; int ye; int ys; int yc 60 unsigned int ym; int ye; int ys; int yc
61 61
62#define COMPZSP \ 62#define COMPZSP \
63 unsigned zm; int ze; int zs; int zc 63 unsigned int zm; int ze; int zs; int zc
64 64
65#define EXPLODESP(v, vc, vs, ve, vm) \ 65#define EXPLODESP(v, vc, vs, ve, vm) \
66{ \ 66{ \
diff --git a/arch/mips/math-emu/ieee754sp.c b/arch/mips/math-emu/ieee754sp.c
index 260e68965907..8423e4c5e415 100644
--- a/arch/mips/math-emu/ieee754sp.c
+++ b/arch/mips/math-emu/ieee754sp.c
@@ -65,7 +65,7 @@ union ieee754sp __cold ieee754sp_nanxcpt(union ieee754sp r)
65 return r; 65 return r;
66} 66}
67 67
68static unsigned ieee754sp_get_rounding(int sn, unsigned xm) 68static unsigned int ieee754sp_get_rounding(int sn, unsigned int xm)
69{ 69{
70 /* inexact must round of 3 bits 70 /* inexact must round of 3 bits
71 */ 71 */
@@ -96,7 +96,7 @@ static unsigned ieee754sp_get_rounding(int sn, unsigned xm)
96 * xe is an unbiased exponent 96 * xe is an unbiased exponent
97 * xm is 3bit extended precision value. 97 * xm is 3bit extended precision value.
98 */ 98 */
99union ieee754sp ieee754sp_format(int sn, int xe, unsigned xm) 99union ieee754sp ieee754sp_format(int sn, int xe, unsigned int xm)
100{ 100{
101 assert(xm); /* we don't gen exact zeros (probably should) */ 101 assert(xm); /* we don't gen exact zeros (probably should) */
102 102
diff --git a/arch/mips/math-emu/ieee754sp.h b/arch/mips/math-emu/ieee754sp.h
index 0f63e4202cff..8c5a63804873 100644
--- a/arch/mips/math-emu/ieee754sp.h
+++ b/arch/mips/math-emu/ieee754sp.h
@@ -69,7 +69,7 @@ static inline int ieee754sp_finite(union ieee754sp x)
69#define SPDNORMY SPDNORMx(ym, ye) 69#define SPDNORMY SPDNORMx(ym, ye)
70#define SPDNORMZ SPDNORMx(zm, ze) 70#define SPDNORMZ SPDNORMx(zm, ze)
71 71
72static inline union ieee754sp buildsp(int s, int bx, unsigned m) 72static inline union ieee754sp buildsp(int s, int bx, unsigned int m)
73{ 73{
74 union ieee754sp r; 74 union ieee754sp r;
75 75
diff --git a/arch/mips/math-emu/sp_div.c b/arch/mips/math-emu/sp_div.c
index 27f6db3a0a4c..23587b31ca87 100644
--- a/arch/mips/math-emu/sp_div.c
+++ b/arch/mips/math-emu/sp_div.c
@@ -23,9 +23,9 @@
23 23
24union ieee754sp ieee754sp_div(union ieee754sp x, union ieee754sp y) 24union ieee754sp ieee754sp_div(union ieee754sp x, union ieee754sp y)
25{ 25{
26 unsigned rm; 26 unsigned int rm;
27 int re; 27 int re;
28 unsigned bm; 28 unsigned int bm;
29 29
30 COMPXSP; 30 COMPXSP;
31 COMPYSP; 31 COMPYSP;
diff --git a/arch/mips/math-emu/sp_fint.c b/arch/mips/math-emu/sp_fint.c
index d5d8495b2cc4..1a35d12b6fc8 100644
--- a/arch/mips/math-emu/sp_fint.c
+++ b/arch/mips/math-emu/sp_fint.c
@@ -23,7 +23,7 @@
23 23
24union ieee754sp ieee754sp_fint(int x) 24union ieee754sp ieee754sp_fint(int x)
25{ 25{
26 unsigned xm; 26 unsigned int xm;
27 int xe; 27 int xe;
28 int xs; 28 int xs;
29 29
diff --git a/arch/mips/math-emu/sp_maddf.c b/arch/mips/math-emu/sp_maddf.c
index 7195fe785d81..f823338dbb65 100644
--- a/arch/mips/math-emu/sp_maddf.c
+++ b/arch/mips/math-emu/sp_maddf.c
@@ -20,9 +20,9 @@ static union ieee754sp _sp_maddf(union ieee754sp z, union ieee754sp x,
20{ 20{
21 int re; 21 int re;
22 int rs; 22 int rs;
23 unsigned rm; 23 unsigned int rm;
24 uint64_t rm64; 24 u64 rm64;
25 uint64_t zm64; 25 u64 zm64;
26 int s; 26 int s;
27 27
28 COMPXSP; 28 COMPXSP;
diff --git a/arch/mips/math-emu/sp_mul.c b/arch/mips/math-emu/sp_mul.c
index d910c43a6f30..4015101fbc37 100644
--- a/arch/mips/math-emu/sp_mul.c
+++ b/arch/mips/math-emu/sp_mul.c
@@ -25,15 +25,15 @@ union ieee754sp ieee754sp_mul(union ieee754sp x, union ieee754sp y)
25{ 25{
26 int re; 26 int re;
27 int rs; 27 int rs;
28 unsigned rm; 28 unsigned int rm;
29 unsigned short lxm; 29 unsigned short lxm;
30 unsigned short hxm; 30 unsigned short hxm;
31 unsigned short lym; 31 unsigned short lym;
32 unsigned short hym; 32 unsigned short hym;
33 unsigned lrm; 33 unsigned int lrm;
34 unsigned hrm; 34 unsigned int hrm;
35 unsigned t; 35 unsigned int t;
36 unsigned at; 36 unsigned int at;
37 37
38 COMPXSP; 38 COMPXSP;
39 COMPYSP; 39 COMPYSP;