I'm trying to use rdtsc function but i've got weird numbers. I'm trying to call this function from C code and pass the tick back to function. Can you tell me if im doing it right or not ?
Asm code:
.text
.globl czas
.type czas, @function
czas:
pushq %rbp
movq %rsp, %rbp
xor %rax,%rax;
cpuid
rdtsc
popq %rbp
ret
C code:
unsigned long long Czas;
Czas=czas();