Coder Social home page Coder Social logo

risc26z / decgen Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 59 KB

Decgen is a binary instruction decoder generator, written in C#, but capable of generating source code for any of the C-like languages (C, C++, C#, Java).

License: GNU Lesser General Public License v2.1

C# 100.00%

decgen's Introduction

decgen

Decgen is a binary instruction decoder generator. When given an instruction set specification containing pattern-matching rules, it generates code compatible with the C family of languages (C, C++, C#, and so on).

Instruction decoders are found in virtual machines, simulators, emulators, disassemblers, and similar programs. They are often large and complex, error-prone, and are typically performance hotspots.

Decgen writes them automatically. It can perform a number of optimisations, many of which can be tuned through configuration settings.

Status

This is an early version, and bugs should be expected. Decgen has not been thoroughly tested, but it appears to create correct and efficient decoders.

Although the code is reasonably well commented, little documentation exists.

An example specification is included in the decgen/Test directory.

Example usage

decgen --help

(Prints command line help.)

decgen -s config.json

(Save configuration settings. The settings can now be edited to fit your preferences.)

decgen -l config.json specification.txt decoder.cs

(Load configuration settings, then generate decoder.cs from specification.txt.)

decgen's People

Contributors

risc26z avatar

Stargazers

Chris avatar

Watchers

 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.