99 {
100
102
103#if defined(__i386__) || (defined __x86_64__)
106
107 long long count,high=0,low=0,
total=0,average=0;
108 double error;
109
111 printf("\nTesting a fldcw loop of 900,000 instructions (%d times):\n",
113 }
114
118 }
119
123 }
124
126
129
131
133
135 test_fail( __FILE__, __LINE__,
"Code unimplemented", 1 );
136 }
137
139 test_fail( __FILE__, __LINE__,
"Unexpected error on read", 1 );
140 }
141
145 }
146
148
150
151 if ((error > 1.0) || (error<-1.0)) {
152
154 printf("On Pentium 4 machines, the fldcw instruction counts as 2.\n");
155 printf("This will lead to an overcount of 22%%\n");
156 }
157 test_fail( __FILE__, __LINE__,
"Error too high", 1 );
158 }
159#endif
160}
add PAPI preset or native hardware event by name to an EventSet
Create a new empty PAPI EventSet.
Reset the hardware event counts in an event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
double display_error(long long average, long long high, long long low, long long expected, int quiet)
int instructions_fldcw(void)
#define CODE_UNIMPLEMENTED