* How can I define parts of the ABI that cover calling conventions?
You should write some parts of codegen, which will translate specific
CC'ed code to the target assembler. In general, you have to write 2
1. Lowering of formal arguments (when function call is performed,
function should "see" supplied arguments with specific CC)
2. Lowering of call itself.
Look into lib/Target/X86/X86ISelLowering.cpp for examples of code (C,
fast, fastcall, stdcall calling conventions are included).
into the created binary. And I'd like to try, to let the thing to
create CLI binaries
I agree with Reid, what CBackend should be used as an example. CLI has
many simular parts with LLVM IR. AFAIK, the following things should be
1. Emulation of shufflevector, vsetint, vsetfp, vselect, select, setcc,
phi LLVM instructions in CIL
2. Emulation of LLVM intrinsics.
Other things can be translated to CIL without problems, I hope.