An Altruistic Processor (AAP) is an open hardware 16-bit architecture for deeply embedded applications running on small FPGA devices. It is somewhat configurable, with a minimum of 4 16-bit general registers, at least one word-addressed code space of up to 16Mword and at least one byte addressed data space of up to 64kbyte.
The primary role of AAP is as a test bench for compiler backends. It encapsulates features found in a wide range of popular embedded processors which traditionally cause difficulties for compiler writers. By contributing it to the official LLVM distribution we hope to provide a solution to these problems for many such compilers..
A Clang/LLVM implementation for AAP has been submitted as a patch to the mainline development (patches D12191 and D12192). In this talk we will discuss our experience implementing and testing LLVM for this architecture, the architectural features unique to our processor and how these interact with LLVM. In AAP integers are less than 32-bits, pointers may be word addressed, not unique, and too large to fit in a registers (of which there may be very few).