aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/div64.h
blob: dd49f64a3b8af6ef5cc93014e6832a2547713458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef __X86_DIV64
#define __X86_DIV64

#include <xen/types.h>

#define do_div(n,base) ({                       \
    uint32_t __base = (base);                   \
    uint32_t __rem;                             \
    __rem = ((uint64_t)(n)) % __base;           \
    (n) = ((uint64_t)(n)) / __base;             \
    __rem;                                      \
})

#endif