AMaCC = Another Mini ARM C Compiler
AMaCC is built from scratch, supporting ARM architecture. There are 3 execution modes AMaCC implements:
- Just-in-Time compiler (JITC) for ARM backend
- Generate valid Executable and Linkable Format (ELF) executables
- Interpreter-only execution
AMaCC is capable of compiling C source files written in the following syntax:
- data types: char, int, struct, and pointer
- condition statements: if, while, for, switch, return, and expression
-
Code generator in AMaCC relies on several GNU/Linux behaviors, and it is necessary to have ARM/Linux installed in your build environment.
-
Install Linaro ARM Toolchain
- Check "Latest Linux Targeted Binary Toolchain Releases"
- Select
arm-linux-gnueabihf
(32-bit Armv7-a, hard-float, little-endian)
-
Install QEMU for ARM user emulation
sudo apt-get install qemu-user
Run make check
and you should see this:
[ C to IR translation ] Passed
[ JIT compilation + execution ] Passed
[ ELF generation ] Passed
[ nested/self compilation ] Passed
AMaCC is based on the infrastructure of c4.