diff options
Diffstat (limited to 'inlineasm.h')
-rw-r--r-- | inlineasm.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/inlineasm.h b/inlineasm.h index fc048ca..218c532 100644 --- a/inlineasm.h +++ b/inlineasm.h @@ -38,14 +38,17 @@ static uint64_t rdtsc() static uint64_t memmeasure(char* memory, uint64_t offset) { asm( + + // here be magic dragons and memory access (read segfaults) ahead + // TODO: evaluate if more cmp types (like w and l) do make sense + "cmpb $0x23, (%%rbx) ;" + + // get starting time "rdtsc ;" "shl $32, %%rdx ;" "add %%rax, %%rdx ;" "mov %%rdx, %%rdi ;" - // here be magic dragons and memory access (read segfaults) ahead - // TODO: evaluate if more cmp types (like w and l) do make sense - "cmpb $0x23, (%%rbx) ;" "cmpb $0x42, (%%rbx,%%rcx) ;" "rdtsc ;" |