aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/sfp-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-s390/sfp-util.h')
-rw-r--r--include/asm-s390/sfp-util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-s390/sfp-util.h b/include/asm-s390/sfp-util.h
index 8cabcd23d976..0addc6466d95 100644
--- a/include/asm-s390/sfp-util.h
+++ b/include/asm-s390/sfp-util.h
@@ -51,6 +51,16 @@
51 wl = __wl; \ 51 wl = __wl; \
52}) 52})
53 53
54#ifdef __s390x__
55#define udiv_qrnnd(q, r, n1, n0, d) \
56 do { unsigned long __n; \
57 unsigned int __r, __d; \
58 __n = ((unsigned long)(n1) << 32) + n0; \
59 __d = (d); \
60 (q) = __n / __d; \
61 (r) = __n % __d; \
62 } while (0)
63#else
54#define udiv_qrnnd(q, r, n1, n0, d) \ 64#define udiv_qrnnd(q, r, n1, n0, d) \
55 do { unsigned int __r; \ 65 do { unsigned int __r; \
56 (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \ 66 (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \
@@ -58,6 +68,7 @@
58 } while (0) 68 } while (0)
59extern unsigned long __udiv_qrnnd (unsigned int *, unsigned int, 69extern unsigned long __udiv_qrnnd (unsigned int *, unsigned int,
60 unsigned int , unsigned int); 70 unsigned int , unsigned int);
71#endif
61 72
62#define UDIV_NEEDS_NORMALIZATION 0 73#define UDIV_NEEDS_NORMALIZATION 0
63 74