All Projects → vshymanskyy → interp

vshymanskyy / interp

Licence: MIT License
Interpreter experiment. Testing dispatch methods: Switching, Direct/Indirect Threaded Code, Tail-Calls and Inlining

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to interp

Rcore
Rust version of THU uCore OS. Linux compatible.
Stars: ✭ 2,175 (+6696.88%)
Mutual labels:  mips, x86-64, riscv, aarch64
Cemu
Cheap EMUlator: lightweight multi-architecture assembly playground
Stars: ✭ 666 (+1981.25%)
Mutual labels:  arm, mips, x86-64, aarch64
novusk
A kernel written in Rust
Stars: ✭ 61 (+90.63%)
Mutual labels:  x86-64, riscv, aarch64, xtensa
Unicorn
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, X86)
Stars: ✭ 4,934 (+15318.75%)
Mutual labels:  arm, mips, x86-64, riscv
Tengine
Tengine is a lite, high performance, modular inference engine for embedded device
Stars: ✭ 4,012 (+12437.5%)
Mutual labels:  arm, mips, x86-64, riscv
Capstone
Capstone disassembly/disassembler framework: Core (Arm, Arm64, BPF, EVM, M68K, M680X, MOS65xx, Mips, PPC, RISCV, Sparc, SystemZ, TMS320C64x, Web Assembly, X86, X86_64, XCore) + bindings.
Stars: ✭ 5,374 (+16693.75%)
Mutual labels:  arm, mips, x86-64, riscv
rosetta-at-home
Fold for Covid - Help fight the COVID-19 pandemic with your old laptop, Raspberry Pi, or other spare computer
Stars: ✭ 78 (+143.75%)
Mutual labels:  arm, x86-64, aarch64
Redasm
The OpenSource Disassembler
Stars: ✭ 1,042 (+3156.25%)
Mutual labels:  arm, mips, esp32
Docker Homebridge
Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
Stars: ✭ 1,847 (+5671.88%)
Mutual labels:  arm, x86-64, aarch64
Mandibule
linux elf injector for x86 x86_64 arm arm64
Stars: ✭ 171 (+434.38%)
Mutual labels:  arm, x86-64, aarch64
Cross
“Zero setup” cross compilation and “cross testing” of Rust crates
Stars: ✭ 2,461 (+7590.63%)
Mutual labels:  arm, mips, aarch64
Openwrt Node Packages
OpenWrt Project Node.js packages. v10.x LTS and v12.x LTS and v14.x LTS
Stars: ✭ 176 (+450%)
Mutual labels:  arm, mips, aarch64
Reko
Reko is a binary decompiler.
Stars: ✭ 942 (+2843.75%)
Mutual labels:  arm, x86-64, aarch64
Keypatch
Multi-architecture assembler for IDA Pro. Powered by Keystone Engine.
Stars: ✭ 939 (+2834.38%)
Mutual labels:  arm, mips, x86-64
Keystone
Keystone assembler framework: Core (Arm, Arm64, Hexagon, Mips, PowerPC, Sparc, SystemZ & X86) + bindings
Stars: ✭ 1,654 (+5068.75%)
Mutual labels:  arm, mips, x86-64
Arm now
arm_now is a qemu powered tool that allows instant setup of virtual machines on arm cpu, mips, powerpc, nios2, x86 and more, for reverse, exploit, fuzzing and programming purpose.
Stars: ✭ 719 (+2146.88%)
Mutual labels:  arm, mips, x86-64
Platformio Core
PlatformIO is a professional collaborative platform for embedded development 👽 A place where Developers and Teams have true Freedom! No more vendor lock-in!
Stars: ✭ 5,539 (+17209.38%)
Mutual labels:  esp8266, arm, esp32
Tagha
Minimal, low-level, fast, and self-contained register-based bytecode virtual machine/runtime environment.
Stars: ✭ 101 (+215.63%)
Mutual labels:  vm, interpreter, x86-64
uvmm
Virtual machine monitor for L4Re
Stars: ✭ 22 (-31.25%)
Mutual labels:  arm, mips, x86-64
Rop Tool
A tool to help you write binary exploits
Stars: ✭ 590 (+1743.75%)
Mutual labels:  arm, mips, x86-64

interp

Testing interpreter dispatch methods: Switching, Direct Threaded Code, Indirect Threaded Code, Tail-Calls and machine code Inlining.

Supports x86, x86-64, arm, aarch64, mips, mipsel, rv32, rv64, xtensa architectures.

Building on Linux

clang main.c -I./src -Os -fPIC -o interp
# Or use GCC:
#gcc main.c -I./src -Os -fPIC -o interp

./interp
Generating Code @ 0x7f9b51765000
Code: 166 bytes
Stack: 00000000 00000000 00000000

Building for ESP8266/ESP32/ARM devices

Use PlatformIO to build and upload, i.e.:

pio run -e ESP32 -t upload && pio device monitor
# Supported envs: ESP32, ESP8266, TinyBLE, BLENano2, SipeedMAIX

Example VM code

// === Count down from 1000 to 0
PUSH(1000);     // Push 1000 to VM stack
LABEL(loop);    // Store current code position to label "loop"               <┐
    DEC();      // Decrement stack top                                        │
    JNZ(loop);  // Check stack top. If it's non-zero, jump to "loop" label    ┘
HALT();         // Halt machine

Emulating with QEMU

sudo apt install qemu-user-static

# ARM
sudo apt install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
arm-linux-gnueabihf-gcc -static main.c -I./src -Os -fPIC -o interp-arm
qemu-arm-static ./interp-arm

# AARCH64
sudo apt install gcc-aarch64-linux-gnu libc6-dev-arm64-cross
aarch64-linux-gnu-gcc -static main.c -I./src -Os -fPIC -o interp-aarch64
qemu-aarch64-static ./interp-aarch64

# MIPS(EL)
sudo apt-get install gcc-mipsel-linux-gnu libc6-dev-mipsel-cross
mipsel-linux-gnu-gcc -static main.c -I./src -Os -fPIC -o interp-mipsel
qemu-mipsel-static ./interp-mipsel

# MIPS
sudo apt-get install gcc-mips-linux-gnu libc6-dev-mips-cross
mips-linux-gnu-gcc -static main.c -I./src -Os -fPIC -o interp-mips
qemu-mips-static ./interp-mips

# RV64
sudo apt install gcc-riscv64-linux-gnu libc6-dev-riscv64-cross
riscv64-linux-gnu-gcc -static main.c -I./src -Os -fPIC -o interp-rv64
qemu-riscv64-static ./interp-rv64
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].