My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sw_div.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 #ifndef __SW_DIV_H_
24 #define __SW_DIV_H_
25 
26 #include <sw_types.h>
27 
28 
35 typedef struct
36 {
37  u64 quot;
38  u64 rem;
39 } ulldiv_t;
40 
51 u32 __aeabi_uidiv(u32 dividend, u32 divisor);
52 
63 ulldiv_t __aeabi_uldivmod(u64 dividend, u64 divisor);
64 
73 u32 __aeabi_idivmod(u32 dividend, u32 divisor);
74 
75 #endif
ulldiv_t __aeabi_uldivmod(u64 dividend, u64 divisor)
Does 64 bit unsigned int division, returning a struct containing the quotient and remainder...
Definition: sw_div.c:195
u32 __aeabi_uidiv(u32 dividend, u32 divisor)
Simple unsigned int division with minimal optimizations. For best results, use a tail-call optimizing...
Definition: sw_div.c:126
u64 rem
Definition: sw_div.h:38
u64 quot
Definition: sw_div.h:37
u32 __aeabi_idivmod(u32 dividend, u32 divisor)
Definition: sw_div.c:305
The layout of this structure must not be altered. The return type and member order is defined by the ...
Definition: sw_div.h:35