Hi!
I am working on an LLVM backend for a language that has a runtime system
and the Application Binary Interface (ABI) defines that the formal
parameters should be pushed to stack in *left-to-right* order (in
contrast to common C calling convention). What is the "llvm-way" to
define that in my custom Calling Convention?
- --
Y.
- ----------------------------
"I am impatient with stupidity but not with those who are proud of it."
- - Edith Sitwell
Hi Yiannis,
I am working on an LLVM backend for a language that has a runtime system
and the Application Binary Interface (ABI) defines that the formal
parameters should be pushed to stack in *left-to-right* order (in
contrast to common C calling convention). What is the "llvm-way" to
define that in my custom Calling Convention?
I don't know the answer to your question, but you can always cheat and have
your front-end produce LLVM IR with parameters in reverse order. For example,
if you have f(int x, double y) in the original language, generate the IR
@f(double %y, i32 %x).
Ciao, Duncan.