Git Product home page Git Product logo

x64emu's Introduction

X64EMU LIBRARY

The x64emu is a light-weight and stripped-down IA-32e software emulator, built 
as a static library. The emulator was developed as part of a bigger project
called SuperCell (distributed hypervisor, which unfortunately did not come to
fruition) and the x64emu main design goals were:
    - Small footprint
    - Ability to execute in user/kernel/vmx root modes
    - Implement full-blown decode logic for both 32 and 64 bit modes of 
      operation.
    - Being able to determine if an instruction writes to memory.
    - Implement emulation logic for instructions that write to memory.

The project produces only x64 binaries. In order to build on Windows:
    - install WDK 7600 or later
    - set env variable MSWDK to point to the WDK install path, in my case: 
      MSWDK=C:\WinDDK\7600.16385.1
    - open cmd.exe
    - execute: "make.bat amd64dbg" or "make.bat amd64rel"
    - the built library and unit-test binaries will be placed in .\amd64dbg 
      or .\amd64rel
A VS2012 solution and projects are available, which essentially use the WDK
build system.

Three unit tests were developed:
    - testemudecode32 - tests the decode logic of the emulator against a limited
      subset of instructions
    - testemudecode64 - tests the decode logic of the emulator against one 
      million+ pseudo-randomly generated instruction streams and compares the 
      results with the output from the windbg debug engine. testemudecode64
      can also decode instruction stream provided as command line argument.
    - testemuexec - tests the instruction emulation logic by comparing the 
      state of the emulator after instruction execution against the state of 
      the actual CPU after executing the same instruction. An attempt was made
      to cover all the possible operands for the supported instructions - total
      of 42 million instruction variants are covered.
      
So why would one want to use x64emu? As stated in the design goals above, the 
main advantage of x64emu is that it has minimal footprint, does not depend on 
any 3rd party libraries and/or header files, and can execute in user, kernel 
or vmx root modes; furthermore the code can be fairly easily made platform 
independent. The main disadvantage of course is that it is not a full-blown 
emulator as the likes of qemu.

x64emu's People

Contributors

sdvassilev avatar voyvoda avatar

Watchers

 avatar  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.