aboutsummaryrefslogtreecommitdiffstats
path: root/source/base/base_profile_x64.h
blob: ceaefa8c2fa042613789fe655e15d4299db6a466 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef BASE_PROFILE_X64_H
#define BASE_PROFILE_X64_H

#define StartProfile(arena, callback) internal Profile *x86_start_profile(Arena *arena, void *callback);
#define EndProfile(profile, scratch)  internal void x86_end_profile(Profile *profile, ScratchArena *scratch);


/* #define GetCycles(high, low) do \ { \
 asm volatile ("RDTSC\n\t" \
 "mov %%edx, %0\n\t" \
 "mov %%eax, %1\n\t": "=r" (cycles_high), "=r" (cycles_low):: “%eax”, “%edx”); \
 while(0); */

#endif