An Application Binary Interface (ABI) specifies the data model, stack layout and calling conventions between binary program modules. Thus, the ABI ensures correct execution of programs consisting of components from different sources, thereby allowing the use of libraries. In the validation process of a compiler, it is therefore relevant to check whether programs conform to this ABI.
For this purpose, we provide the ABI Tester, which is included in the SuperTest Compiler Test Suite. The ABI Tester generates pairs of source files, which are carefully constructed and self-testing. Of such a pair of files, one file contains a function that checks if the values of the parameters are the expected generated values, and the other file contains a call to this function with parameters set to the generated values and checking return values. This way, the ABI Tester can be used to verify calling conventions within the compiler, between different versions of the compiler or even between completely different compilers.
The ABI Tester is highly configurable in e.g. the number of tests to generate, in the used data types or in the usage of variable length argument lists (varargs). Hence, the ABI Tester can be configured to exactly meet the properties of the tested compiler(s).