| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

# pfmlib_comp_i386.h

Go to the documentation of this file.

    00001 /*
    00002  * I386 P6/Pentium M compiler specific macros
    00003  *
    00004  * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
    00005  * Contributed by Stephane Eranian <eranian@hpl.hp.com>
    00006  *
    00007  * Permission is hereby granted, free of charge, to any person obtaining a copy
    00008  * of this software and associated documentation files (the "Software"), to deal
    00009  * in the Software without restriction, including without limitation the rights
    00010  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
    00011  * of the Software, and to permit persons to whom the Software is furnished to do so,
    00012  * subject to the following conditions:
    00013  *
    00014  * The above copyright notice and this permission notice shall be included in all
    00015  * copies or substantial portions of the Software.
    00016  *
    00017  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
    00018  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
    00019  * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    00020  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
    00021  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
    00022  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    00023  */
    00024 #ifndef __PFMLIB_COMP_I386_P6_H__
    00025 #define __PFMLIB_COMP_I386_P6_H__
    00026
    00027 #ifndef __PFMLIB_COMP_H__
    00028 #error "you should never include this file directly, use pfmlib_comp.h"
    00029 #endif
    00030
    00031 #ifndef __i386__
    00032 #error "you should not be including this file"
    00033 #endif
    00034
    00035 #ifdef __cplusplus
    00036 extern "C" {
    00037 #endif
    00038
    00039 static inline unsigned long
    00040 pfmlib_popcnt(unsigned long v)
    00041 {
    00042         unsigned long sum = 0;
    00043
    00044         for(; v ; v >>=1) {
    00045                 if (v & 0x1) sum++;
    00046         }
    00047         return sum;
    00048 }
    00049
    00050 #ifdef __cplusplus /* extern C */
    00051 }
    00052 #endif
    00053
    00054 #endif /* __PFMLIB_COMP_IA64_H__ */

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines