Try to generate assembly code with my custom backend

Hi everyone ,

I write this topic because I have wrote a backend for fun and I have issue on it.

I have implemented the AsmPrinter and the AsmInfo class in my backend .

I have follow this tutorial : Writing an LLVM Backend — LLVM 15.0.0git documentation.

But when I try to run llc , llc returns llc: error: target does not support generation of this file.
I have run with the --filetype=asm and --triple chiara64 (chiara64 is the name of my architecture)
I think a declaration is missing.

What do you think ?

thanks you in advance for your help !
Gaspard C

I believe you also have to have implemented addISelPasses at minimum to run through codegen and emit something. Just the AsmPrinter isn’t enough for llc to produce anything

Hi @arsenm ,

Yes you are right , I don’t write the implementation of addISelPasses . I will write it and I will test!

Thanks for your help.

Gaspard C