c64scene-ar / llvm-6502

LLVM backend for 6502

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LLVM with 6502 backend

This is an LLVM fork that tries to implements an MOS 6502 backend.

Build

Refer to the Getting Started guide from LLVM.

A quick way to start (on Linux):

  • Clone this repository
  • Run inside directory:
mkdir build
cd build
cmake .. -DLLVM_TARGETS_TO_BUILD:STRING="X86;Mos6502"
make -j4

If you want to build more targets, append them to the LLVM_TARGETS_TO_BUILD variable. Adjust -j option of make in case you have more processor cores.

Install

Run make install as usual.

Usage

TODO: Write how to convert from C/C++ with Clang to IR and 6502 assembly code.

Tests

To run regression tests for the MOS 6502 target, run from build/

make check-llvm-codegen-mos6502

For more information on the LLVM test suite, refer to the Testing Guide.

About

LLVM backend for 6502

License:Other


Languages

Language:C++ 48.2%Language:LLVM 38.9%Language:Assembly 10.3%Language:Python 0.5%Language:OCaml 0.4%Language:Objective-C 0.4%Language:C 0.3%Language:Makefile 0.3%Language:CMake 0.3%Language:Go 0.1%Language:Mirah 0.1%Language:Shell 0.1%Language:Perl 0.0%Language:Vim Script 0.0%Language:Emacs Lisp 0.0%Language:Standard ML 0.0%Language:SourcePawn 0.0%Language:Groff 0.0%