GCC Code Coverage Report


Directory: ./
File: src/phoenix_hardware_rdtsc.cpp
Date: 2025-08-06 14:32:39
Exec Total Coverage
Lines: 3 3 100.0%
Functions: 1 1 100.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_hardware_rdtsc.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_hardware_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 7964 extern long unsigned int phoenix_hardware_rdtsc(void) {
24 long unsigned int a, d;
25 7964 __asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
26 7970 return (d<<32) | a;
27 }
28 #endif
29
30
31
32