Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef pf_cg_INCLUDED
00037 #define pf_cg_INCLUDED
00038
00039 #include "wn.h"
00040
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
00044
00045 typedef struct pf_pointer {
00046 WN* wn_pref_1L;
00047 WN* wn_pref_2L;
00048 WN_OFFSET distance_1L;
00049 WN_OFFSET distance_2L;
00050 mINT16 lrnum_1L;
00051 mINT16 lrnum_2L;
00052 mUINT32 flag;
00053 } PF_POINTER;
00054
00055
00056
00057
00058
00059 #define GET_CONF_1L(flag) (((flag) >> 8) & 0xf)
00060 #define SET_CONF_1L(flag,x) flag=(((flag) & 0xfffff0ff) | (((x) & 0xf) << 8))
00061
00062 #define GET_CONF_2L(flag) (((flag) >> 12) & 0xf)
00063 #define SET_CONF_2L(flag,x) flag=(((flag) & 0xffff0fff) | (((x) & 0xf) << 12))
00064
00065 #define PF_PTR_wn_pref_1L(pp) ((pp)->wn_pref_1L)
00066 #define PF_PTR_wn_pref_2L(pp) ((pp)->wn_pref_2L)
00067 #define PF_PTR_distance_1L(pp) ((pp)->distance_1L)
00068 #define PF_PTR_distance_2L(pp) ((pp)->distance_2L)
00069 #define PF_PTR_lrnum_1L(pp) ((pp)->lrnum_1L)
00070 #define PF_PTR_lrnum_2L(pp) ((pp)->lrnum_2L)
00071 #define PF_PTR_flag(pp) ((pp)->flag)
00072
00073 #define PF_PTR_conf_1L(pp) (GET_CONF_1L(PF_PTR_flag(pp)))
00074 #define PF_PTR_set_conf_1L(pp,x) (SET_CONF_1L(PF_PTR_flag(pp),x))
00075
00076 #define PF_PTR_conf_2L(pp) (GET_CONF_2L(PF_PTR_flag(pp)))
00077 #define PF_PTR_set_conf_2L(pp,x) (SET_CONF_2L(PF_PTR_flag(pp),x))
00078
00079
00080 #define VISITED_BIT 0x1
00081 #define VISIT_CM_BIT 0x2
00082 #define VISIT_EM_BIT 0x4
00083 #define AUTO_BIT 0x8
00084 #define PF_PRUNED_BIT 0x10 // the prefetch is pruned by CG
00085
00086 #define VISITED(pp) (((pp)->flag) & VISITED_BIT)
00087 #define SET_VISITED(pp) ((pp)->flag |= VISITED_BIT)
00088 #define RESET_VISITED(pp) ((pp)->flag &= ~VISITED_BIT)
00089
00090 #define VISITED_CM(pp) (((pp)->flag) & VISIT_CM_BIT)
00091 #define SET_VISITED_CM(pp) ((pp)->flag |= VISIT_CM_BIT)
00092 #define RESET_VISITED_CM(pp) ((pp)->flag &= ~VISIT_CM_BIT)
00093
00094 #define VISITED_EM(pp) (((pp)->flag) & VISIT_EM_BIT)
00095 #define SET_VISITED_EM(pp) ((pp)->flag |= VISIT_EM_BIT)
00096 #define RESET_VISITED_EM(pp) ((pp)->flag &= ~VISIT_EM_BIT)
00097
00098 #define AUTO(pp) (((pp)->flag) & AUTO_BIT)
00099 #define SET_AUTO(pp) ((pp)->flag |= AUTO_BIT)
00100 #define RESET_AUTO(pp) ((pp)->flag &= ~AUTO_BIT)
00101
00102 #define PF_PRUNED(pp) (((pp)->flag) & PF_PRUNED_BIT)
00103 #define SET_PF_PRUNED(pp) ((pp)->flag |= PF_PRUNED_BIT)
00104 #define RESET_PF_PRUNED(pp) ((pp)->flag &= ~PF_PRUNED_BIT)
00105
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109
00110 #endif