| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pfmlib_comp_i386.h
Go to the documentation of this file.
1 /*
2 * I386 P6/Pentium M compiler specific macros
3 *
4 * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
5 * Contributed by Stephane Eranian <eranian@hpl.hp.com>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
11 * of the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
19 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
21 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
22 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24 #ifndef __PFMLIB_COMP_I386_P6_H__
25 #define __PFMLIB_COMP_I386_P6_H__
26
27 #ifndef __PFMLIB_COMP_H__
28 #error "you should never include this file directly, use pfmlib_comp.h"
29 #endif
30
31 #ifndef __i386__
32 #error "you should not be including this file"
33 #endif
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 static inline unsigned long
40 pfmlib_popcnt(unsigned long v)
41 {
42 unsigned long sum = 0;
43
44 for(; v ; v >>=1) {
45 if (v & 0x1) sum++;
46 }
47 return sum;
48 }
49
50 #ifdef __cplusplus /* extern C */
51 }
52 #endif
53
54 #endif /* __PFMLIB_COMP_IA64_H__ */