Skip to content

Commit

Permalink
dasm_x86.lua: Add support for RDTSCP instruction
Browse files Browse the repository at this point in the history
This is a very useful instruction for self-benchmarking programs that
want to read the CPU timestamp counter efficiently.

See Intel whitepaper for details:
http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/ia-32-ia-64-benchmark-code-execution-paper.pdf
  • Loading branch information
lukego committed Feb 8, 2017
1 parent bd4ec1c commit 3e4c447
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dasm_x86.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,7 @@ local map_op = {
shrd_3 = "mriqdw:0FACRmU|mrC/qq:0FADRm|mrC/dd:|mrC/ww:",

rdtsc_0 = "0F31", -- P1+
rdtscp_0 = "0F01F9",-- P6+
rdpmc_0 = "0F33", -- P6+
cpuid_0 = "0FA2", -- P1+

Expand Down

0 comments on commit 3e4c447

Please sign in to comment.