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