Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

microblaze: lib: Remove helper macros

Remove these gcc types and use standard types.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

+12 -16
+12 -16
arch/microblaze/lib/muldi3.c
··· 2 2 3 3 #include "libgcc.h" 4 4 5 - #define DWtype long long 6 - #define UWtype unsigned long 7 - #define UHWtype unsigned short 8 - 9 5 #define W_TYPE_SIZE 32 10 6 11 - #define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2)) 12 - #define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1)) 13 - #define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2)) 7 + #define __ll_B ((unsigned long) 1 << (W_TYPE_SIZE / 2)) 8 + #define __ll_lowpart(t) ((unsigned long) (t) & (__ll_B - 1)) 9 + #define __ll_highpart(t) ((unsigned long) (t) >> (W_TYPE_SIZE / 2)) 14 10 15 11 /* If we still don't have umul_ppmm, define it using plain C. */ 16 12 #if !defined(umul_ppmm) 17 13 #define umul_ppmm(w1, w0, u, v) \ 18 14 do { \ 19 - UWtype __x0, __x1, __x2, __x3; \ 20 - UHWtype __ul, __vl, __uh, __vh; \ 15 + unsigned long __x0, __x1, __x2, __x3; \ 16 + unsigned short __ul, __vl, __uh, __vh; \ 21 17 \ 22 18 __ul = __ll_lowpart(u); \ 23 19 __uh = __ll_highpart(u); \ 24 20 __vl = __ll_lowpart(v); \ 25 21 __vh = __ll_highpart(v); \ 26 22 \ 27 - __x0 = (UWtype) __ul * __vl; \ 28 - __x1 = (UWtype) __ul * __vh; \ 29 - __x2 = (UWtype) __uh * __vl; \ 30 - __x3 = (UWtype) __uh * __vh; \ 23 + __x0 = (unsigned long) __ul * __vl; \ 24 + __x1 = (unsigned long) __ul * __vh; \ 25 + __x2 = (unsigned long) __uh * __vl; \ 26 + __x3 = (unsigned long) __uh * __vh; \ 31 27 \ 32 28 __x1 += __ll_highpart(__x0); /* this can't give carry */\ 33 29 __x1 += __x2; /* but this indeed can */ \ ··· 43 47 }) 44 48 #endif 45 49 46 - DWtype __muldi3(DWtype u, DWtype v) 50 + long long __muldi3(long long u, long long v) 47 51 { 48 52 const DWunion uu = {.ll = u}; 49 53 const DWunion vv = {.ll = v}; 50 54 DWunion w = {.ll = __umulsidi3(uu.s.low, vv.s.low)}; 51 55 52 - w.s.high += ((UWtype) uu.s.low * (UWtype) vv.s.high 53 - + (UWtype) uu.s.high * (UWtype) vv.s.low); 56 + w.s.high += ((unsigned long) uu.s.low * (unsigned long) vv.s.high 57 + + (unsigned long) uu.s.high * (unsigned long) vv.s.low); 54 58 55 59 return w.ll; 56 60 }