Faculty
Students
GCC is an open-source compiler that is used by many researchers as the platform for implementing application-specifc compilers. The applications of custom compilers include systems security, dependability, and others. Ususally, a new compiler extension is implemented by modifying the source code of the compiler directly. This, however, complicates the distribution of the compiler extension because the end users have to download the new version of the compiler to enjoy the benefits of the specialized compiler.
The goal of this project is to create a framework for writing compiler extensions as dynamically loaded modules. The idea of this project is similar to that of the the Linux Security Modules project whose goal is to facilitate the development of security modules for the Linux kernel. With GEM the developers need to distribute the source code of the compiler extension only. The GEM-patched compiler loads at run time a GEM module specified as the arguments of its -fextension-module option.
The current version of GEM defines a set of hooks in the preprocessor, the AST, and the assembly code generation components of GCC.