OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-ia64/] [div64.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _ASM_IA64_DIV64_H
2
#define _ASM_IA64_DIV64_H
3
 
4
/*
5
 * Copyright (C) 1999 Hewlett-Packard Co
6
 * Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
7
 *
8
 * vsprintf uses this to divide a 64-bit integer N by a small integer BASE.
9
 * This is incredibly hard on IA-64...
10
 */
11
 
12
#define do_div(n,base)                                          \
13
({                                                              \
14
        int _res;                                               \
15
        _res = ((unsigned long) (n)) % (unsigned) (base);       \
16
        (n) = ((unsigned long) (n)) / (unsigned) (base);        \
17
        _res;                                                   \
18
})
19
 
20
#endif /* _ASM_IA64_DIV64_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.