I want to make Z80 codegen backend to the LLVM. CLang+LLVM looks perfect, while quick playing around. Some questions available:
- Does LLVM support to generate “mixed” code ? For example: in microcontrollers world the subroutine call with const arguments may be decorated like this:
; ordinary code continues here
subroutine pop return address from the stack, read arguments, do some work, and returns via jump to addess after readed arguments. This is much more faster than pushing arguments to the stack/
- Does LLVM support to generate self-modifying code ? For example: save register value direct to the opcode. Because constant loading faster than indirect addressing. Example:
ld (hl_restore+1), hl
; some code modifying hl
ld hl, 0 ; load stored value as constant
- There are possible to commit new backend in the main LLVM repository ?
Thank in advance, Dmitry.