diff options
Diffstat (limited to 'arch/powerpc/math-emu/fdiv.c')
-rw-r--r-- | arch/powerpc/math-emu/fdiv.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 | ||