News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

convert rdpru do cycle count

Started by v0xX, February 23, 2024, 04:52:52 AM

Previous topic - Next topic

v0xX

i want convert rdpru on amd platform do cycle count like rdtsc  we do like this

.CODE
GetRdpruCycle PROC
lfence
mov rcx, 0E8h ; load aperf into rdpru for cycle count
db 0Fh, 01h, 0F9h
lfence
shl rdx, 32
or rax, rdx
ret
GetRdpruCycle ENDP
END

jj2007

Come on, don't be lazy: tell us in detail what you want, and what is your problem. I refuse to invest time on such a cryptic-minimalistic request for help.