-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJN7RQLAAoJEGQmXQvMOEBcUiQH/iMRX3LDV46mV06L6tEzsRty BoVqH7bF5cD0z31OSI4yfVYHX4VNrz67LzbrTLf2G2pRRXWsys9oveCBgCJ8W9rL MnInR10Tn+DDCHGeXZ8dHB/B7SWMuNDJ8TrNE0kXucs9/86TTRNifVD7klbiwAum zQSmALgvFogg6Be4oqg7IBL117MINlN81PvPmvUuYteruPFFrdGeWBNvxucXeQ30 aeaBslYTWTqPQ+ti6SnzyN//MXl+vs8/M1SZR8SgzJ50AQHKSEfGgXc3ZAA6nVDr LHjs6wnUVdoTgrGb/poTAw85iY+sCkOxxb6cPGIdan9GzKHA8dpbthJePj9i/U0=amB/ -----END PGP SIGNATURE-----
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.