import less(1)
[unleashed/tickless.git] / usr / src / common / util / i386 / muldiv.h
blobfdb7dc03a603efd4781e3f772637097a5b3bbcdc
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
24 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 #ifndef _MULDIV_H
29 #define _MULDIV_H
31 #pragma ident "%Z%%M% %I% %E% SMI"
34 * Helper routines for Sun and GCC compilers in 32-bit mode,
35 * doing 64-bit math. These routines should not be called directly;
36 * they are called by code generated by the compiler. Their declarations
37 * are here for kmdb's hdr2map and map2linktest mechanisms.
40 #if !defined(__amd64)
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
46 extern int64_t __mul64(int64_t a, int64_t b);
48 extern uint64_t __udiv64(uint64_t x, uint64_t y);
49 extern uint64_t __urem64(uint64_t x, uint64_t y);
50 extern int64_t __div64(int64_t x, int64_t y);
51 extern int64_t __rem64(int64_t x, int64_t y);
53 extern uint64_t __udivdi3(uint64_t a, uint64_t b);
54 extern uint64_t __umoddi3(uint64_t a, uint64_t b);
55 extern int64_t __divdi3(int64_t a, int64_t b);
56 extern int64_t __moddi3(int64_t a, int64_t b);
58 extern uint64_t __udivrem64(uint64_t x, uint64_t y);
59 extern int64_t __divrem64(int64_t x, int64_t y);
61 #ifdef __cplusplus
63 #endif
65 #endif /* !defined(amd64) */
67 #endif /* _MULDIV_H */