Question about machine-specific assembler in LLVM

Hi LLVM dev team!

Currently I’m writing high-level compiler for low-level purpose and have a question about machine-code support in LLVM.

Using Phoenix SDK I’m able to create “DataInstruction” which is blob of binary data and emit it with other instructions into basic block. Also I can specify register kill set for such instructions. Also such instructions have fixup points for functions/statics etc.

But in LLVM I can’t found something similar like this. There is only support for GCC-like asm statements in form of std::string. Is support for something similar to DataInstruction planned? I have own parser and codegen for X86 asm with error recovery etc. but I can’t easily integrate it with LLVM.

I suggest to think about following features:

  • add something similar to Phoenix’s DataInstruction and move asm parsing logic to clang
  • eliminate std::string representation of asm statements from module-level assembly and replace it with binary blob + relocation points.

WBR,

Eugeny Grishul