Model-Based Function Call Code Generation and Stack Management in Retargetable Compilers: Application Binary Interface Modeling of Stack Layout and Function Call Sequence
Bogdan Ditu · 2015
This paper presents a way of modeling the application binary interface aspects related to stack layout and function call sequence in the context of code generation and stack management for retargetable compilers (implementation and targeting for new architectures). This paper tries to present a model of stack layout and function call sequences as solution for the problem of efficient code generation related to function calls and stack management without compiler redesign in the context of efficient, architecture specific, non-standardized application binary interfaces. The proposed solution is centered toward the application binary interface model with four components (for description of stack layout, function call scenario, save / restore information around function calls, parameter passing convention) and three methods using this ABI model that are integrated in the retargetable compiler flow (the code generation for prologue / epilogue sequences, the code generation for function calls and parameter passing and the stack management).