Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LLVM backend for stack based machine

Tags:

llvm

backend

Does anyone know any example of an open source LLVM backend for a stack based machine? I need this for education purposes.

like image 998
Dmytro Avatar asked Jun 01 '11 15:06

Dmytro


1 Answers

The JVM is a stack-based virtual machine. VMKit was an open-source project of LLVM which implemented a JVM with a LLVM backend. The idea of VMKit was to create a toolkit for building virtual machines (or managed runtime environments) such as JVM, CLI/CLR, R's runtime etc. To find out more, see Nicolas Geoffray's PhD thesis. While the project is retired, the source code is still available.

Also, Microsoft have released llilc which is a LLVM JIT compiler for IL/MSIL/CIL (which could be argued is a stack machine). The JIT code can be found here.

like image 147
Steven Shaw Avatar answered Sep 16 '22 18:09

Steven Shaw