Code Monkey home page Code Monkey logo

x86testdata's Introduction

x86TestData

Test data for x86 instructions

What is this?

This is a collection of x86 instructions executed with specific inputs to capture the outputs serialized as json. All of the test data was generated on the "Intel(R) Core(TM) i7-8700K" CPU.

How is this useful?

If you are by any chance writing an x86 Emulator this can be useful to check if your emulation is correct.

Format

 {
  "data": "0400",
  "inputs": {
   "rax": "7FFFFFFFFFFFFFFF",
   "rip": "E607C9EFF77F0000"
  },
  "instr": "add al, 0x00",
  "outputs": {
   "rax": "7FFFFFFFFFFFFFFF",
   "rip": "FC07C9EFF77F0000"
  }
 },
  • data Bytes of the encoded instruction used to execute.
  • inputs Hex encoded data from the context used to execute the instruction.
  • instr Readable form of the executed instruction.
  • outputs Hex encoded data from the context after executing the instruction.

Gotchas

Registers always have the full size regardless of the operand size, so even if the instruction is sub ax, 1 you should set the full contents of rax, this also ensures no bits are accidentally missed. When registers like (E/R)IP/(E/R)SP are in the outputs it will always have it in the inputs aswell. To simplify testing you can use this to measure the distance of the values for when you can not emulate at the specific memory address, so instead of comparing the concrete value you should compare the distance from input to output. When flags are in the inputs or outputs this refers to CPU EFlags or RFlags

NOTE

This is not the complete instruction set and it may lack a few specific flags/inputs. The tool used to generate this data is trying to exhaust all possible combinations but sometimes breaks out because the search space is getting too big.

Thanks

Special thanks to AsmJIT and Zydis for their awesome projects that also made this possible.

x86testdata's People

Contributors

notpidgey avatar zehmatt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.