GCC Code Coverage Report


Directory: ./
File: tmp_project/PhoenixMicroBenchmark/src/phoenix_timer.cpp
Date: 2025-03-14 12:14:21
Exec Total Coverage
Lines: 0 3 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7
8 #include "phoenix_timer.h"
9
10 #ifdef __i386
11 ///Get the number of cycles since the begining of the program
12 /** @return number of cycles since the begining of the program
13 */
14 extern long unsigned int phoenix_rdtsc(void) {
15 long unsigned int x;
16 __asm__ volatile ("rdtsc" : "=A" (x));
17 return x;
18 }
19 #elif defined __amd64
20 ///Get the number of cycles since the begining of the program
21 /** @return number of cycles since the begining of the program
22 */
23 extern long unsigned int phoenix_rdtsc(void) {
24 long unsigned int a, d;
25 __asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
26 return (d<<32) | a;
27 }
28 #endif
29
30
31
32