Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
muldi3.c File Reference
#include <linux/module.h>
#include "libgcc.h"

Go to the source code of this file.

Macros

#define DWtype   long long
 
#define UWtype   unsigned long
 
#define UHWtype   unsigned short
 
#define W_TYPE_SIZE   32
 
#define __ll_B   ((UWtype) 1 << (W_TYPE_SIZE / 2))
 
#define __ll_lowpart(t)   ((UWtype) (t) & (__ll_B - 1))
 
#define __ll_highpart(t)   ((UWtype) (t) >> (W_TYPE_SIZE / 2))
 
#define umul_ppmm(w1, w0, u, v)
 
#define __umulsidi3(u, v)
 

Functions

DWtype __muldi3 (DWtype u, DWtype v)
 
 EXPORT_SYMBOL (__muldi3)
 

Macro Definition Documentation

#define __ll_B   ((UWtype) 1 << (W_TYPE_SIZE / 2))

Definition at line 11 of file muldi3.c.

#define __ll_highpart (   t)    ((UWtype) (t) >> (W_TYPE_SIZE / 2))

Definition at line 13 of file muldi3.c.

#define __ll_lowpart (   t)    ((UWtype) (t) & (__ll_B - 1))

Definition at line 12 of file muldi3.c.

#define __umulsidi3 (   u,
  v 
)
Value:
({ \
DWunion __w; \
umul_ppmm(__w.s.high, __w.s.low, u, v); \
__w.ll; \
})

Definition at line 43 of file muldi3.c.

#define DWtype   long long

Definition at line 5 of file muldi3.c.

#define UHWtype   unsigned short

Definition at line 7 of file muldi3.c.

#define umul_ppmm (   w1,
  w0,
  u,
  v 
)
Value:
do { \
UWtype __x0, __x1, __x2, __x3; \
UHWtype __ul, __vl, __uh, __vh; \
\
__ul = __ll_lowpart(u); \
__uh = __ll_highpart(u); \
__vl = __ll_lowpart(v); \
__vh = __ll_highpart(v); \
\
__x0 = (UWtype) __ul * __vl; \
__x1 = (UWtype) __ul * __vh; \
__x2 = (UWtype) __uh * __vl; \
__x3 = (UWtype) __uh * __vh; \
\
__x1 += __ll_highpart(__x0); /* this can't give carry */\
__x1 += __x2; /* but this indeed can */ \
if (__x1 < __x2) /* did we get it? */ \
__x3 += __ll_B; /* yes, add it in the proper pos */ \
\
(w1) = __x3 + __ll_highpart(__x1); \
(w0) = __ll_lowpart(__x1) * __ll_B + __ll_lowpart(__x0);\
} while (0)

Definition at line 17 of file muldi3.c.

#define UWtype   unsigned long

Definition at line 6 of file muldi3.c.

#define W_TYPE_SIZE   32

Definition at line 9 of file muldi3.c.

Function Documentation

DWtype __muldi3 ( DWtype  u,
DWtype  v 
)

Definition at line 50 of file muldi3.c.

EXPORT_SYMBOL ( __muldi3  )