Tagha icon indicating copy to clipboard operation
Tagha copied to clipboard

Implement compiler backend (Clang/LLVM)

Open assyrianic opened this issue 7 years ago • 3 comments

implement a compiler or compiler backend that generates bytecode for this VM. Possibility: Make GCC output Tagha bytecode using a custom GCC Backend but will take alot of effort. Maybe use Clang/LLVM backend to output Tagha bytecode?

assyrianic avatar Aug 28 '17 06:08 assyrianic

alternative, quick build a compiler via flex + bison?

assyrianic avatar Sep 03 '17 22:09 assyrianic

writing down some advice someone gave me considering this.

"You don't embed clang though. You build a backend so you can write binaries for tagha in any llvm language. You write an os kernel for tagha, allowing the compiler to be run in the machine.

A kernel is a program written for the machine that manages the filesystem, peripherals, and programs running on the machine. With a kernel, you can run compiling systems that are entirely contained in the machine. Otherwise, you use an external machine to compile the binary, then move the binary into the machine to be run as its program."

assyrianic avatar Dec 21 '17 23:12 assyrianic

saving this for later -> https://github.com/lowRISC/riscv-llvm/tree/master/docs

assyrianic avatar Jul 02 '20 14:07 assyrianic