Design

From Libcpu

Jump to: navigation, search

libcpu is a CPU-only emulator, it is meant to emulate many different architectures, and many different specific CPU types of these architectures, both for user and system emulation.

libcpu is very configurable at runtime, you can specify what exact CPU type you want and what accuracy is needed.

libcpu does not care about the computer you are trying to emulate. Its design is similar to the one of AMD-V and Intel VT-x: You give it a state and a program counter, and it will run the code, and trap whenever it encounters something it cannot handle - these could be syscalls, library calls, trap instructions, privileged instructions and so on.

The system has several frontends, which are all compiled in. At runtime, the client specifies the CPU type, the feature set, the accuracy and the optimizations to be made.

The front-ends are supposed to be LLVM-agnostic and are supposed to share the maximum amount of code with all other front-ends.

Personal tools