Giter Site home page Giter Site logo

ria-jit / ria-jit Goto Github PK

View Code? Open in Web Editor NEW
51.0 5.0 7.0 79.77 MB

Lightweight and performant dynamic binary translation for RISC–V code on x86–64

License: GNU General Public License v3.0

CMake 0.91% C 12.59% Starlark 0.46% Shell 0.75% C++ 68.79% Python 10.15% Objective-C 6.23% Assembly 0.11%
risc-v dbt binary-translation dynamic-binary-translation x86-64 x86 emulation qemu rv64

ria-jit's Introduction

Dynamic Binary Translation (RISC-V -> x86) 🛠

Make RISC-V code executable on the x86-64 ISA by means of dynamic binary translation.

pipeline status

Paper

You can find the source code of the paper under documentation. It is also published at researchgate.net.

Building the translator

After checking out the git repository (and running git submodule update --init to fetch the dependencies), the translator can be built via

  1. sudo apt-get -y install gcc g++ cmake make autoconf meson (required dependencies)
  2. mkdir build && cd build && cmake .. && make

We can execute binaries compiled via the RISC-V toolchain gcc and the options -static -march=rv64imafd -mabi=lp64d.

Usage

Usage: ./translator [translator option(s)] -f <filename> [guest options]

Options:
	-v, --version
		Show translator version.
	-f, --file <executable>
		Specify executable. All options after the file path are passed to the guest.
	-a, --analyze-all
	--analyze-mnem, --analyze-reg, --analyze-pattern
		Analyze the binary. Does not execute the guest program.
		Inspects passed program binary and shows the selected statistics.
	-b, --benchmark
		Benchmark execution. Times the execution of the program,
		excluding mapping the binary into memory.
	-p, --profile
		Profile register usage. Display dynamic register usage statistics.
	--perf
		Log the generated blocks to /tmp/perf-<pid>.map for externally profiling
		the execution in perf.
	-s, --fail-silently
		Fail silently for some error conditions.
		Allows continued execution, but the client program may enter undefined states.
	-h, --help
		Show this help.

Logging:
	--log=category,[...]
		Enable logging for certain categories. See --log=help for more info.
	-g	Display general verbose info (--log=general,strace)
	-i	Display parsed RISC-V input assembly (--log=asm_in)
	-o	Display translated output x86 assembly (--log=asm_out,verbose_disasm)
	-r	Dump registers on basic block boundaries (--log=reg)
	-c	Display cache info (--log=cache)

Optimization:
	--optimize=category,[...]
		Disable certain optimization categories. See --optimize=help for more info.
	-d	Enable Single stepping mode.
		Each instruction will be its own block. (--optimize=singlestep)
	-m	Disable all translation optimization features. (--optimize=none)

Run tests

./test

Authors

👤 Noah Dormann, Simon Kammermeier, Johannes Pfannschmidt, Florian Schmidt

Supervisor

👤 Alexis Engelke

ria-jit's People

Contributors

flodt avatar johaza avatar ndormann avatar simon04090 avatar weicheng14159 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ria-jit's Issues

RISC-V compliance test

Hi,

I am curious whether this DBT is capable passing riscv-compliance test in this repo or whether you are interested in implementing this feature in the near future ?

BTW your work is amazing, implementing a DBT that out performs qemu is exceptional. Thanks you all for making it open source.

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.