Skip to content

cc0ffee/ML2RISCV-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML to RISC-V Compiler

ML (and C) to RISC-V Compiler written in Ocaml, using LLVM as the IR.
This was a project for Compiler Construction course.

Building from Source

  1. Clone the repository:
git clone https://github.com/cc0ffee/ML2RISCV-compiler.git
cd ML2RISCV-compiler
  1. Run make:
make all

NOTE: You might need to run eval $(opam env) once you install dependencies

Usage

Compilation

To compile an ML or C source file:

./main [ml-or-c-filepath]

Testing

Within the repository includes two folders c-tests and ml-tests to be used as example compilations. Use Venus Simulator or a local environment to run the RISC-V output. The result will be recorded in the a0 register.

About

ML (and C) to RISC-V Compiler written in Ocaml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages