mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
21 lines
391 B
ArmAsm
21 lines
391 B
ArmAsm
/* https://cirosantilli.com/linux-kernel-module-cheat#x86-rdtscp-instruction */
|
|
|
|
#include <lkmc.h>
|
|
|
|
LKMC_PROLOGUE
|
|
rdtscp
|
|
mov %edx, %edi
|
|
shl $32, %rdi
|
|
add %rax, %rdi
|
|
mov %ecx, %r12d
|
|
|
|
/* Print RDTSC. */
|
|
call lkmc_print_hex_64
|
|
call lkmc_print_newline
|
|
|
|
/* Print PID. */
|
|
mov %r12d, %edi
|
|
call lkmc_print_hex_32
|
|
call lkmc_print_newline
|
|
LKMC_EPILOGUE
|