PAPI
7.1.0.0
Loading...
Searching...
No Matches
pfmlib_priv_ia64.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2003-2006 Hewlett-Packard Development Company, L.P.
3
* Contributed by Stephane Eranian <eranian@hpl.hp.com>
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a copy
6
* of this software and associated documentation files (the "Software"), to deal
7
* in the Software without restriction, including without limitation the rights
8
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
* of the Software, and to permit persons to whom the Software is furnished to do so,
10
* subject to the following conditions:
11
*
12
* The above copyright notice and this permission notice shall be included in all
13
* copies or substantial portions of the Software.
14
*
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
17
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
19
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
*
22
* This file is part of libpfm, a performance monitoring support library for
23
* applications on Linux/ia64.
24
*/
25
#ifndef __PFMLIB_PRIV_IA64_H__
26
#define __PFMLIB_PRIV_IA64_H__
27
28
typedef
struct
{
29
unsigned
long
db_mask
:56;
30
unsigned
long
db_plm
:4;
31
unsigned
long
db_ig
:2;
32
unsigned
long
db_w
:1;
33
unsigned
long
db_rx
:1;
34
}
br_mask_reg_t
;
35
36
typedef
union
{
37
unsigned
long
val
;
38
br_mask_reg_t
db
;
39
}
dbreg_t
;
40
41
static
inline
int
42
pfm_ia64_get_cpu_family
(
void
)
43
{
44
return
(
int
)((ia64_get_cpuid(3) >> 24) & 0xff);
45
}
46
47
static
inline
int
48
pfm_ia64_get_cpu_model
(
void
)
49
{
50
return
(
int
)((ia64_get_cpuid(3) >> 16) & 0xff);
51
}
52
53
/*
54
* find last bit set
55
*/
56
static
inline
int
57
pfm_ia64_fls
(
unsigned
long
x
)
58
{
59
double
d =
x
;
60
long
exp;
61
62
exp = ia64_getf(d);
63
return
exp - 0xffff;
64
65
}
66
#endif
/* __PFMLIB_PRIV_IA64_H__ */
pfm_ia64_fls
static int pfm_ia64_fls(unsigned long x)
Definition:
pfmlib_priv_ia64.h:57
pfm_ia64_get_cpu_model
static int pfm_ia64_get_cpu_model(void)
Definition:
pfmlib_priv_ia64.h:48
pfm_ia64_get_cpu_family
static int pfm_ia64_get_cpu_family(void)
Definition:
pfmlib_priv_ia64.h:42
br_mask_reg_t
Definition:
pfmlib_priv_ia64.h:28
br_mask_reg_t::db_mask
unsigned long db_mask
Definition:
pfmlib_priv_ia64.h:29
br_mask_reg_t::db_rx
unsigned long db_rx
Definition:
pfmlib_priv_ia64.h:33
br_mask_reg_t::db_ig
unsigned long db_ig
Definition:
pfmlib_priv_ia64.h:31
br_mask_reg_t::db_plm
unsigned long db_plm
Definition:
pfmlib_priv_ia64.h:30
br_mask_reg_t::db_w
unsigned long db_w
Definition:
pfmlib_priv_ia64.h:32
x
volatile double x
Definition:
timing_kernels.c:12
dbreg_t
Definition:
pfmlib_priv_ia64.h:36
dbreg_t::val
unsigned long val
Definition:
pfmlib_priv_ia64.h:37
dbreg_t::db
br_mask_reg_t db
Definition:
pfmlib_priv_ia64.h:38
src
libperfnec
lib
pfmlib_priv_ia64.h
Generated on Wed Dec 20 2023 18:12:52 for PAPI by
1.9.6