diff options
author | Liu Yu <yu.liu@freescale.com> | 2008-10-27 23:50:20 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-12-03 09:19:15 -0500 |
commit | 033b8a333c66e0a7dc63132c1bd65175dc98bc25 (patch) | |
tree | 65d743e530ddbca545e8c34f709690c253ebc258 /arch/powerpc/math-emu | |
parent | 463a8c01e153c06480b862d83d6a71bf5666a577 (diff) |
powerpc/math-emu: Remove redundant 'ret'
FP_DECL_EX is already used, so ret is redundant.
And FP_SET_EXCEPTION will add status into return value.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/math-emu')
-rw-r--r-- | arch/powerpc/math-emu/fadd.c | 1 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fcmpo.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fdiv.c | 9 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fdivs.c | 9 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fmadd.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fmadds.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fmsub.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fmsubs.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fmul.c | 3 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fmuls.c | 3 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fnmadd.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fnmadds.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fnmsub.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fnmsubs.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fsqrt.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fsqrts.c | 5 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fsub.c | 3 | ||||
-rw-r--r-- | arch/powerpc/math-emu/fsubs.c | 3 |
18 files changed, 34 insertions, 52 deletions
diff --git a/arch/powerpc/math-emu/fadd.c b/arch/powerpc/math-emu/fadd.c index 04d3b4aa32ce..0158a16e2b82 100644 --- a/arch/powerpc/math-emu/fadd.c +++ b/arch/powerpc/math-emu/fadd.c | |||
@@ -13,7 +13,6 @@ fadd(void *frD, void *frA, void *frB) | |||
13 | FP_DECL_D(B); | 13 | FP_DECL_D(B); |
14 | FP_DECL_D(R); | 14 | FP_DECL_D(R); |
15 | FP_DECL_EX; | 15 | FP_DECL_EX; |
16 | int ret = 0; | ||
17 | 16 | ||
18 | #ifdef DEBUG | 17 | #ifdef DEBUG |
19 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); | 18 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
diff --git a/arch/powerpc/math-emu/fcmpo.c b/arch/powerpc/math-emu/fcmpo.c index b5dc4498cd71..5bce011c2aec 100644 --- a/arch/powerpc/math-emu/fcmpo.c +++ b/arch/powerpc/math-emu/fcmpo.c | |||
@@ -14,7 +14,6 @@ fcmpo(u32 *ccr, int crfD, void *frA, void *frB) | |||
14 | FP_DECL_EX; | 14 | FP_DECL_EX; |
15 | int code[4] = { (1 << 3), (1 << 1), (1 << 2), (1 << 0) }; | 15 | int code[4] = { (1 << 3), (1 << 1), (1 << 2), (1 << 0) }; |
16 | long cmp; | 16 | long cmp; |
17 | int ret = 0; | ||
18 | 17 | ||
19 | #ifdef DEBUG | 18 | #ifdef DEBUG |
20 | printk("%s: %p (%08x) %d %p %p\n", __func__, ccr, *ccr, crfD, frA, frB); | 19 | printk("%s: %p (%08x) %d %p %p\n", __func__, ccr, *ccr, crfD, frA, frB); |
@@ -29,7 +28,7 @@ fcmpo(u32 *ccr, int crfD, void *frA, void *frB) | |||
29 | #endif | 28 | #endif |
30 | 29 | ||
31 | if (A_c == FP_CLS_NAN || B_c == FP_CLS_NAN) | 30 | if (A_c == FP_CLS_NAN || B_c == FP_CLS_NAN) |
32 | ret |= EFLAG_VXVC; | 31 | FP_SET_EXCEPTION(EFLAG_VXVC); |
33 | 32 | ||
34 | FP_CMP_D(cmp, A, B, 2); | 33 | FP_CMP_D(cmp, A, B, 2); |
35 | cmp = code[(cmp + 1) & 3]; | 34 | cmp = code[(cmp + 1) & 3]; |
@@ -44,5 +43,5 @@ fcmpo(u32 *ccr, int crfD, void *frA, void *frB) | |||
44 | printk("CR: %08x\n", *ccr); | 43 | printk("CR: %08x\n", *ccr); |
45 | #endif | 44 | #endif |
46 | 45 | ||
47 | return ret; | 46 | return FP_CUR_EXCEPTIONS; |
48 | } | 47 | } |
diff --git a/arch/powerpc/math-emu/fdiv.c b/arch/powerpc/math-emu/fdiv.c index 2db15097d98e..a29239c05e3e 100644 --- a/arch/powerpc/math-emu/fdiv.c +++ b/arch/powerpc/math-emu/fdiv.c | |||
@@ -13,7 +13,6 @@ fdiv(void *frD, void *frA, void *frB) | |||
13 | FP_DECL_D(B); | 13 | FP_DECL_D(B); |
14 | FP_DECL_D(R); | 14 | FP_DECL_D(R); |
15 | FP_DECL_EX; | 15 | FP_DECL_EX; |
16 | int ret = 0; | ||
17 | 16 | ||
18 | #ifdef DEBUG | 17 | #ifdef DEBUG |
19 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); | 18 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
@@ -28,22 +27,22 @@ fdiv(void *frD, void *frA, void *frB) | |||
28 | #endif | 27 | #endif |
29 | 28 | ||
30 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { | 29 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { |
31 | ret |= EFLAG_VXZDZ; | 30 | FP_SET_EXCEPTION(EFLAG_VXZDZ); |
32 | #ifdef DEBUG | 31 | #ifdef DEBUG |
33 | printk("%s: FPSCR_VXZDZ raised\n", __func__); | 32 | printk("%s: FPSCR_VXZDZ raised\n", __func__); |
34 | #endif | 33 | #endif |
35 | } | 34 | } |
36 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { | 35 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { |
37 | ret |= EFLAG_VXIDI; | 36 | FP_SET_EXCEPTION(EFLAG_VXIDI); |
38 | #ifdef DEBUG | 37 | #ifdef DEBUG |
39 | printk("%s: FPSCR_VXIDI raised\n", __func__); | 38 | printk("%s: FPSCR_VXIDI raised\n", __func__); |
40 | #endif | 39 | #endif |
41 | } | 40 | } |
42 | 41 | ||
43 | if (B_c == FP_CLS_ZERO && A_c != FP_CLS_ZERO) { | 42 | if (B_c == FP_CLS_ZERO && A_c != FP_CLS_ZERO) { |
44 | ret |= EFLAG_DIVZERO; | 43 | FP_SET_EXCEPTION(EFLAG_DIVZERO); |
45 | if (__FPU_TRAP_P(EFLAG_DIVZERO)) | 44 | if (__FPU_TRAP_P(EFLAG_DIVZERO)) |
46 | return ret; | 45 | return FP_CUR_EXCEPTIONS; |
47 | } | 46 | } |
48 | FP_DIV_D(R, A, B); | 47 | FP_DIV_D(R, A, B); |
49 | 48 | ||
diff --git a/arch/powerpc/math-emu/fdivs.c b/arch/powerpc/math-emu/fdivs.c index 797f6a9a20b5..526bc261275f 100644 --- a/arch/powerpc/math-emu/fdivs.c +++ b/arch/powerpc/math-emu/fdivs.c | |||
@@ -14,7 +14,6 @@ fdivs(void *frD, void *frA, void *frB) | |||
14 | FP_DECL_D(B); | 14 | FP_DECL_D(B); |
15 | FP_DECL_D(R); | 15 | FP_DECL_D(R); |
16 | FP_DECL_EX; | 16 | FP_DECL_EX; |
17 | int ret = 0; | ||
18 | 17 | ||
19 | #ifdef DEBUG | 18 | #ifdef DEBUG |
20 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); | 19 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
@@ -29,22 +28,22 @@ fdivs(void *frD, void *frA, void *frB) | |||
29 | #endif | 28 | #endif |
30 | 29 | ||
31 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { | 30 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { |
32 | ret |= EFLAG_VXZDZ; | 31 | FP_SET_EXCEPTION(EFLAG_VXZDZ); |
33 | #ifdef DEBUG | 32 | #ifdef DEBUG |
34 | printk("%s: FPSCR_VXZDZ raised\n", __func__); | 33 | printk("%s: FPSCR_VXZDZ raised\n", __func__); |
35 | #endif | 34 | #endif |
36 | } | 35 | } |
37 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { | 36 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { |
38 | ret |= EFLAG_VXIDI; | 37 | FP_SET_EXCEPTION(EFLAG_VXIDI); |
39 | #ifdef DEBUG | 38 | #ifdef DEBUG |
40 | printk("%s: FPSCR_VXIDI raised\n", __func__); | 39 | printk("%s: FPSCR_VXIDI raised\n", __func__); |
41 | #endif | 40 | #endif |
42 | } | 41 | } |
43 | 42 | ||
44 | if (B_c == FP_CLS_ZERO && A_c != FP_CLS_ZERO) { | 43 | if (B_c == FP_CLS_ZERO && A_c != FP_CLS_ZERO) { |
45 | ret |= EFLAG_DIVZERO; | 44 | FP_SET_EXCEPTION(EFLAG_DIVZERO); |
46 | if (__FPU_TRAP_P(EFLAG_DIVZERO)) | 45 | if (__FPU_TRAP_P(EFLAG_DIVZERO)) |
47 | return ret; | 46 | return FP_CUR_EXCEPTIONS; |
48 | } | 47 | } |
49 | 48 | ||
50 | FP_DIV_D(R, A, B); | 49 | FP_DIV_D(R, A, B); |
diff --git a/arch/powerpc/math-emu/fmadd.c b/arch/powerpc/math-emu/fmadd.c index 925313aa6f82..8c3f20aa5a95 100644 --- a/arch/powerpc/math-emu/fmadd.c +++ b/arch/powerpc/math-emu/fmadd.c | |||
@@ -15,7 +15,6 @@ fmadd(void *frD, void *frA, void *frB, void *frC) | |||
15 | FP_DECL_D(C); | 15 | FP_DECL_D(C); |
16 | FP_DECL_D(T); | 16 | FP_DECL_D(T); |
17 | FP_DECL_EX; | 17 | FP_DECL_EX; |
18 | int ret = 0; | ||
19 | 18 | ||
20 | #ifdef DEBUG | 19 | #ifdef DEBUG |
21 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); | 20 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
@@ -33,12 +32,12 @@ fmadd(void *frD, void *frA, void *frB, void *frC) | |||
33 | 32 | ||
34 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || | 33 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || |
35 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) | 34 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) |
36 | ret |= EFLAG_VXIMZ; | 35 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
37 | 36 | ||
38 | FP_MUL_D(T, A, C); | 37 | FP_MUL_D(T, A, C); |
39 | 38 | ||
40 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) | 39 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) |
41 | ret |= EFLAG_VXISI; | 40 | FP_SET_EXCEPTION(EFLAG_VXISI); |
42 | 41 | ||
43 | FP_ADD_D(R, T, B); | 42 | FP_ADD_D(R, T, B); |
44 | 43 | ||
diff --git a/arch/powerpc/math-emu/fmadds.c b/arch/powerpc/math-emu/fmadds.c index aea80ef79399..794fb31e59d1 100644 --- a/arch/powerpc/math-emu/fmadds.c +++ b/arch/powerpc/math-emu/fmadds.c | |||
@@ -16,7 +16,6 @@ fmadds(void *frD, void *frA, void *frB, void *frC) | |||
16 | FP_DECL_D(C); | 16 | FP_DECL_D(C); |
17 | FP_DECL_D(T); | 17 | FP_DECL_D(T); |
18 | FP_DECL_EX; | 18 | FP_DECL_EX; |
19 | int ret = 0; | ||
20 | 19 | ||
21 | #ifdef DEBUG | 20 | #ifdef DEBUG |
22 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); | 21 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
@@ -34,12 +33,12 @@ fmadds(void *frD, void *frA, void *frB, void *frC) | |||
34 | 33 | ||
35 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || | 34 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || |
36 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) | 35 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) |
37 | ret |= EFLAG_VXIMZ; | 36 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
38 | 37 | ||
39 | FP_MUL_D(T, A, C); | 38 | FP_MUL_D(T, A, C); |
40 | 39 | ||
41 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) | 40 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) |
42 | ret |= EFLAG_VXISI; | 41 | FP_SET_EXCEPTION(EFLAG_VXISI); |
43 | 42 | ||
44 | FP_ADD_D(R, T, B); | 43 | FP_ADD_D(R, T, B); |
45 | 44 | ||
diff --git a/arch/powerpc/math-emu/fmsub.c b/arch/powerpc/math-emu/fmsub.c index a644d525fca6..626f6fed84ac 100644 --- a/arch/powerpc/math-emu/fmsub.c +++ b/arch/powerpc/math-emu/fmsub.c | |||
@@ -15,7 +15,6 @@ fmsub(void *frD, void *frA, void *frB, void *frC) | |||
15 | FP_DECL_D(C); | 15 | FP_DECL_D(C); |
16 | FP_DECL_D(T); | 16 | FP_DECL_D(T); |
17 | FP_DECL_EX; | 17 | FP_DECL_EX; |
18 | int ret = 0; | ||
19 | 18 | ||
20 | #ifdef DEBUG | 19 | #ifdef DEBUG |
21 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); | 20 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
@@ -33,7 +32,7 @@ fmsub(void *frD, void *frA, void *frB, void *frC) | |||
33 | 32 | ||
34 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || | 33 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || |
35 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) | 34 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) |
36 | ret |= EFLAG_VXIMZ; | 35 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
37 | 36 | ||
38 | FP_MUL_D(T, A, C); | 37 | FP_MUL_D(T, A, C); |
39 | 38 | ||
@@ -41,7 +40,7 @@ fmsub(void *frD, void *frA, void *frB, void *frC) | |||
41 | B_s ^= 1; | 40 | B_s ^= 1; |
42 | 41 | ||
43 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) | 42 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) |
44 | ret |= EFLAG_VXISI; | 43 | FP_SET_EXCEPTION(EFLAG_VXISI); |
45 | 44 | ||
46 | FP_ADD_D(R, T, B); | 45 | FP_ADD_D(R, T, B); |
47 | 46 | ||
diff --git a/arch/powerpc/math-emu/fmsubs.c b/arch/powerpc/math-emu/fmsubs.c index 2fdeeb9bb569..3425bc899760 100644 --- a/arch/powerpc/math-emu/fmsubs.c +++ b/arch/powerpc/math-emu/fmsubs.c | |||
@@ -16,7 +16,6 @@ fmsubs(void *frD, void *frA, void *frB, void *frC) | |||
16 | FP_DECL_D(C); | 16 | FP_DECL_D(C); |
17 | FP_DECL_D(T); | 17 | FP_DECL_D(T); |
18 | FP_DECL_EX; | 18 | FP_DECL_EX; |
19 | int ret = 0; | ||
20 | 19 | ||
21 | #ifdef DEBUG | 20 | #ifdef DEBUG |
22 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); | 21 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
@@ -34,7 +33,7 @@ fmsubs(void *frD, void *frA, void *frB, void *frC) | |||
34 | 33 | ||
35 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || | 34 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || |
36 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) | 35 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) |
37 | ret |= EFLAG_VXIMZ; | 36 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
38 | 37 | ||
39 | FP_MUL_D(T, A, C); | 38 | FP_MUL_D(T, A, C); |
40 | 39 | ||
@@ -42,7 +41,7 @@ fmsubs(void *frD, void *frA, void *frB, void *frC) | |||
42 | B_s ^= 1; | 41 | B_s ^= 1; |
43 | 42 | ||
44 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) | 43 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) |
45 | ret |= EFLAG_VXISI; | 44 | FP_SET_EXCEPTION(EFLAG_VXISI); |
46 | 45 | ||
47 | FP_ADD_D(R, T, B); | 46 | FP_ADD_D(R, T, B); |
48 | 47 | ||
diff --git a/arch/powerpc/math-emu/fmul.c b/arch/powerpc/math-emu/fmul.c index 391fd17d3440..2c1929779892 100644 --- a/arch/powerpc/math-emu/fmul.c +++ b/arch/powerpc/math-emu/fmul.c | |||
@@ -13,7 +13,6 @@ fmul(void *frD, void *frA, void *frB) | |||
13 | FP_DECL_D(B); | 13 | FP_DECL_D(B); |
14 | FP_DECL_D(R); | 14 | FP_DECL_D(R); |
15 | FP_DECL_EX; | 15 | FP_DECL_EX; |
16 | int ret = 0; | ||
17 | 16 | ||
18 | #ifdef DEBUG | 17 | #ifdef DEBUG |
19 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); | 18 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
@@ -31,7 +30,7 @@ fmul(void *frD, void *frA, void *frB) | |||
31 | 30 | ||
32 | if ((A_c == FP_CLS_INF && B_c == FP_CLS_ZERO) || | 31 | if ((A_c == FP_CLS_INF && B_c == FP_CLS_ZERO) || |
33 | (A_c == FP_CLS_ZERO && B_c == FP_CLS_INF)) | 32 | (A_c == FP_CLS_ZERO && B_c == FP_CLS_INF)) |
34 | ret |= EFLAG_VXIMZ; | 33 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
35 | 34 | ||
36 | FP_MUL_D(R, A, B); | 35 | FP_MUL_D(R, A, B); |
37 | 36 | ||
diff --git a/arch/powerpc/math-emu/fmuls.c b/arch/powerpc/math-emu/fmuls.c index 2d3ec5f7da20..f5ad5c9c77d0 100644 --- a/arch/powerpc/math-emu/fmuls.c +++ b/arch/powerpc/math-emu/fmuls.c | |||
@@ -14,7 +14,6 @@ fmuls(void *frD, void *frA, void *frB) | |||
14 | FP_DECL_D(B); | 14 | FP_DECL_D(B); |
15 | FP_DECL_D(R); | 15 | FP_DECL_D(R); |
16 | FP_DECL_EX; | 16 | FP_DECL_EX; |
17 | int ret = 0; | ||
18 | 17 | ||
19 | #ifdef DEBUG | 18 | #ifdef DEBUG |
20 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); | 19 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
@@ -32,7 +31,7 @@ fmuls(void *frD, void *frA, void *frB) | |||
32 | 31 | ||
33 | if ((A_c == FP_CLS_INF && B_c == FP_CLS_ZERO) || | 32 | if ((A_c == FP_CLS_INF && B_c == FP_CLS_ZERO) || |
34 | (A_c == FP_CLS_ZERO && B_c == FP_CLS_INF)) | 33 | (A_c == FP_CLS_ZERO && B_c == FP_CLS_INF)) |
35 | ret |= EFLAG_VXIMZ; | 34 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
36 | 35 | ||
37 | FP_MUL_D(R, A, B); | 36 | FP_MUL_D(R, A, B); |
38 | 37 | ||
diff --git a/arch/powerpc/math-emu/fnmadd.c b/arch/powerpc/math-emu/fnmadd.c index 2497b86494e5..e817bc5453ef 100644 --- a/arch/powerpc/math-emu/fnmadd.c +++ b/arch/powerpc/math-emu/fnmadd.c | |||
@@ -15,7 +15,6 @@ fnmadd(void *frD, void *frA, void *frB, void *frC) | |||
15 | FP_DECL_D(C); | 15 | FP_DECL_D(C); |
16 | FP_DECL_D(T); | 16 | FP_DECL_D(T); |
17 | FP_DECL_EX; | 17 | FP_DECL_EX; |
18 | int ret = 0; | ||
19 | 18 | ||
20 | #ifdef DEBUG | 19 | #ifdef DEBUG |
21 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); | 20 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
@@ -33,12 +32,12 @@ fnmadd(void *frD, void *frA, void *frB, void *frC) | |||
33 | 32 | ||
34 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || | 33 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || |
35 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) | 34 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) |
36 | ret |= EFLAG_VXIMZ; | 35 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
37 | 36 | ||
38 | FP_MUL_D(T, A, C); | 37 | FP_MUL_D(T, A, C); |
39 | 38 | ||
40 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) | 39 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) |
41 | ret |= EFLAG_VXISI; | 40 | FP_SET_EXCEPTION(EFLAG_VXISI); |
42 | 41 | ||
43 | FP_ADD_D(R, T, B); | 42 | FP_ADD_D(R, T, B); |
44 | 43 | ||
diff --git a/arch/powerpc/math-emu/fnmadds.c b/arch/powerpc/math-emu/fnmadds.c index ee9d71e0b376..4db4b7d9ba8d 100644 --- a/arch/powerpc/math-emu/fnmadds.c +++ b/arch/powerpc/math-emu/fnmadds.c | |||
@@ -16,7 +16,6 @@ fnmadds(void *frD, void *frA, void *frB, void *frC) | |||
16 | FP_DECL_D(C); | 16 | FP_DECL_D(C); |
17 | FP_DECL_D(T); | 17 | FP_DECL_D(T); |
18 | FP_DECL_EX; | 18 | FP_DECL_EX; |
19 | int ret = 0; | ||
20 | 19 | ||
21 | #ifdef DEBUG | 20 | #ifdef DEBUG |
22 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); | 21 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
@@ -34,12 +33,12 @@ fnmadds(void *frD, void *frA, void *frB, void *frC) | |||
34 | 33 | ||
35 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || | 34 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || |
36 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) | 35 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) |
37 | ret |= EFLAG_VXIMZ; | 36 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
38 | 37 | ||
39 | FP_MUL_D(T, A, C); | 38 | FP_MUL_D(T, A, C); |
40 | 39 | ||
41 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) | 40 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) |
42 | ret |= EFLAG_VXISI; | 41 | FP_SET_EXCEPTION(EFLAG_VXISI); |
43 | 42 | ||
44 | FP_ADD_D(R, T, B); | 43 | FP_ADD_D(R, T, B); |
45 | 44 | ||
diff --git a/arch/powerpc/math-emu/fnmsub.c b/arch/powerpc/math-emu/fnmsub.c index 3885a77acc93..f65979fa770e 100644 --- a/arch/powerpc/math-emu/fnmsub.c +++ b/arch/powerpc/math-emu/fnmsub.c | |||
@@ -15,7 +15,6 @@ fnmsub(void *frD, void *frA, void *frB, void *frC) | |||
15 | FP_DECL_D(C); | 15 | FP_DECL_D(C); |
16 | FP_DECL_D(T); | 16 | FP_DECL_D(T); |
17 | FP_DECL_EX; | 17 | FP_DECL_EX; |
18 | int ret = 0; | ||
19 | 18 | ||
20 | #ifdef DEBUG | 19 | #ifdef DEBUG |
21 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); | 20 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
@@ -33,7 +32,7 @@ fnmsub(void *frD, void *frA, void *frB, void *frC) | |||
33 | 32 | ||
34 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || | 33 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || |
35 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) | 34 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) |
36 | ret |= EFLAG_VXIMZ; | 35 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
37 | 36 | ||
38 | FP_MUL_D(T, A, C); | 37 | FP_MUL_D(T, A, C); |
39 | 38 | ||
@@ -41,7 +40,7 @@ fnmsub(void *frD, void *frA, void *frB, void *frC) | |||
41 | B_s ^= 1; | 40 | B_s ^= 1; |
42 | 41 | ||
43 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) | 42 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) |
44 | ret |= EFLAG_VXISI; | 43 | FP_SET_EXCEPTION(EFLAG_VXISI); |
45 | 44 | ||
46 | FP_ADD_D(R, T, B); | 45 | FP_ADD_D(R, T, B); |
47 | 46 | ||
diff --git a/arch/powerpc/math-emu/fnmsubs.c b/arch/powerpc/math-emu/fnmsubs.c index f835dfeb0fd1..9021dacc03b8 100644 --- a/arch/powerpc/math-emu/fnmsubs.c +++ b/arch/powerpc/math-emu/fnmsubs.c | |||
@@ -16,7 +16,6 @@ fnmsubs(void *frD, void *frA, void *frB, void *frC) | |||
16 | FP_DECL_D(C); | 16 | FP_DECL_D(C); |
17 | FP_DECL_D(T); | 17 | FP_DECL_D(T); |
18 | FP_DECL_EX; | 18 | FP_DECL_EX; |
19 | int ret = 0; | ||
20 | 19 | ||
21 | #ifdef DEBUG | 20 | #ifdef DEBUG |
22 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); | 21 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
@@ -34,7 +33,7 @@ fnmsubs(void *frD, void *frA, void *frB, void *frC) | |||
34 | 33 | ||
35 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || | 34 | if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) || |
36 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) | 35 | (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF)) |
37 | ret |= EFLAG_VXIMZ; | 36 | FP_SET_EXCEPTION(EFLAG_VXIMZ); |
38 | 37 | ||
39 | FP_MUL_D(T, A, C); | 38 | FP_MUL_D(T, A, C); |
40 | 39 | ||
@@ -42,7 +41,7 @@ fnmsubs(void *frD, void *frA, void *frB, void *frC) | |||
42 | B_s ^= 1; | 41 | B_s ^= 1; |
43 | 42 | ||
44 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) | 43 | if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF) |
45 | ret |= EFLAG_VXISI; | 44 | FP_SET_EXCEPTION(EFLAG_VXISI); |
46 | 45 | ||
47 | FP_ADD_D(R, T, B); | 46 | FP_ADD_D(R, T, B); |
48 | 47 | ||
diff --git a/arch/powerpc/math-emu/fsqrt.c b/arch/powerpc/math-emu/fsqrt.c index 3e90072693a0..a55fc7d49983 100644 --- a/arch/powerpc/math-emu/fsqrt.c +++ b/arch/powerpc/math-emu/fsqrt.c | |||
@@ -12,7 +12,6 @@ fsqrt(void *frD, void *frB) | |||
12 | FP_DECL_D(B); | 12 | FP_DECL_D(B); |
13 | FP_DECL_D(R); | 13 | FP_DECL_D(R); |
14 | FP_DECL_EX; | 14 | FP_DECL_EX; |
15 | int ret = 0; | ||
16 | 15 | ||
17 | #ifdef DEBUG | 16 | #ifdef DEBUG |
18 | printk("%s: %p %p %p %p\n", __func__, frD, frB); | 17 | printk("%s: %p %p %p %p\n", __func__, frD, frB); |
@@ -25,9 +24,9 @@ fsqrt(void *frD, void *frB) | |||
25 | #endif | 24 | #endif |
26 | 25 | ||
27 | if (B_s && B_c != FP_CLS_ZERO) | 26 | if (B_s && B_c != FP_CLS_ZERO) |
28 | ret |= EFLAG_VXSQRT; | 27 | FP_SET_EXCEPTION(EFLAG_VXSQRT); |
29 | if (B_c == FP_CLS_NAN) | 28 | if (B_c == FP_CLS_NAN) |
30 | ret |= EFLAG_VXSNAN; | 29 | FP_SET_EXCEPTION(EFLAG_VXSNAN); |
31 | 30 | ||
32 | FP_SQRT_D(R, B); | 31 | FP_SQRT_D(R, B); |
33 | 32 | ||
diff --git a/arch/powerpc/math-emu/fsqrts.c b/arch/powerpc/math-emu/fsqrts.c index 2843be986e2e..31dccbfc39ff 100644 --- a/arch/powerpc/math-emu/fsqrts.c +++ b/arch/powerpc/math-emu/fsqrts.c | |||
@@ -13,7 +13,6 @@ fsqrts(void *frD, void *frB) | |||
13 | FP_DECL_D(B); | 13 | FP_DECL_D(B); |
14 | FP_DECL_D(R); | 14 | FP_DECL_D(R); |
15 | FP_DECL_EX; | 15 | FP_DECL_EX; |
16 | int ret = 0; | ||
17 | 16 | ||
18 | #ifdef DEBUG | 17 | #ifdef DEBUG |
19 | printk("%s: %p %p %p %p\n", __func__, frD, frB); | 18 | printk("%s: %p %p %p %p\n", __func__, frD, frB); |
@@ -26,9 +25,9 @@ fsqrts(void *frD, void *frB) | |||
26 | #endif | 25 | #endif |
27 | 26 | ||
28 | if (B_s && B_c != FP_CLS_ZERO) | 27 | if (B_s && B_c != FP_CLS_ZERO) |
29 | ret |= EFLAG_VXSQRT; | 28 | FP_SET_EXCEPTION(EFLAG_VXSQRT); |
30 | if (B_c == FP_CLS_NAN) | 29 | if (B_c == FP_CLS_NAN) |
31 | ret |= EFLAG_VXSNAN; | 30 | FP_SET_EXCEPTION(EFLAG_VXSNAN); |
32 | 31 | ||
33 | FP_SQRT_D(R, B); | 32 | FP_SQRT_D(R, B); |
34 | 33 | ||
diff --git a/arch/powerpc/math-emu/fsub.c b/arch/powerpc/math-emu/fsub.c index 78b09446a0e1..02c5dff458ba 100644 --- a/arch/powerpc/math-emu/fsub.c +++ b/arch/powerpc/math-emu/fsub.c | |||
@@ -13,7 +13,6 @@ fsub(void *frD, void *frA, void *frB) | |||
13 | FP_DECL_D(B); | 13 | FP_DECL_D(B); |
14 | FP_DECL_D(R); | 14 | FP_DECL_D(R); |
15 | FP_DECL_EX; | 15 | FP_DECL_EX; |
16 | int ret = 0; | ||
17 | 16 | ||
18 | #ifdef DEBUG | 17 | #ifdef DEBUG |
19 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); | 18 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
@@ -31,7 +30,7 @@ fsub(void *frD, void *frA, void *frB) | |||
31 | B_s ^= 1; | 30 | B_s ^= 1; |
32 | 31 | ||
33 | if (A_s != B_s && A_c == FP_CLS_INF && B_c == FP_CLS_INF) | 32 | if (A_s != B_s && A_c == FP_CLS_INF && B_c == FP_CLS_INF) |
34 | ret |= EFLAG_VXISI; | 33 | FP_SET_EXCEPTION(EFLAG_VXISI); |
35 | 34 | ||
36 | FP_ADD_D(R, A, B); | 35 | FP_ADD_D(R, A, B); |
37 | 36 | ||
diff --git a/arch/powerpc/math-emu/fsubs.c b/arch/powerpc/math-emu/fsubs.c index d3bf90863cf2..5d9b18c35e07 100644 --- a/arch/powerpc/math-emu/fsubs.c +++ b/arch/powerpc/math-emu/fsubs.c | |||
@@ -14,7 +14,6 @@ fsubs(void *frD, void *frA, void *frB) | |||
14 | FP_DECL_D(B); | 14 | FP_DECL_D(B); |
15 | FP_DECL_D(R); | 15 | FP_DECL_D(R); |
16 | FP_DECL_EX; | 16 | FP_DECL_EX; |
17 | int ret = 0; | ||
18 | 17 | ||
19 | #ifdef DEBUG | 18 | #ifdef DEBUG |
20 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); | 19 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
@@ -32,7 +31,7 @@ fsubs(void *frD, void *frA, void *frB) | |||
32 | B_s ^= 1; | 31 | B_s ^= 1; |
33 | 32 | ||
34 | if (A_s != B_s && A_c == FP_CLS_INF && B_c == FP_CLS_INF) | 33 | if (A_s != B_s && A_c == FP_CLS_INF && B_c == FP_CLS_INF) |
35 | ret |= EFLAG_VXISI; | 34 | FP_SET_EXCEPTION(EFLAG_VXISI); |
36 | 35 | ||
37 | FP_ADD_D(R, A, B); | 36 | FP_ADD_D(R, A, B); |
38 | 37 | ||