aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/math-emu/cnv_float.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/math-emu/cnv_float.h')
-rw-r--r--arch/parisc/math-emu/cnv_float.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/parisc/math-emu/cnv_float.h b/arch/parisc/math-emu/cnv_float.h
index 9071e093164a..933423fa5144 100644
--- a/arch/parisc/math-emu/cnv_float.h
+++ b/arch/parisc/math-emu/cnv_float.h
@@ -347,16 +347,15 @@
347 Sgl_isinexact_to_fix(sgl_value,exponent) 347 Sgl_isinexact_to_fix(sgl_value,exponent)
348 348
349#define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \ 349#define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \
350 {Sall(sgl_value) <<= SGL_EXP_LENGTH; /* left-justify */ \ 350 {unsigned int val = Sall(sgl_value) << SGL_EXP_LENGTH; \
351 if (exponent <= 31) { \ 351 if (exponent <= 31) { \
352 Dintp1(dresultA) = 0; \ 352 Dintp1(dresultA) = 0; \
353 Dintp2(dresultB) = (unsigned)Sall(sgl_value) >> (31 - exponent); \ 353 Dintp2(dresultB) = val >> (31 - exponent); \
354 } \ 354 } \
355 else { \ 355 else { \
356 Dintp1(dresultA) = Sall(sgl_value) >> (63 - exponent); \ 356 Dintp1(dresultA) = val >> (63 - exponent); \
357 Dintp2(dresultB) = Sall(sgl_value) << (exponent - 31); \ 357 Dintp2(dresultB) = exponent <= 62 ? val << (exponent - 31) : 0; \
358 } \ 358 } \
359 Sall(sgl_value) >>= SGL_EXP_LENGTH; /* return to original */ \
360 } 359 }
361 360
362#define Duint_setzero(dresultA,dresultB) \ 361#define Duint_setzero(dresultA,dresultB) \