[LLVMdev] Question about machine-specific assembler in LLVM

Евгений Гришуль eugeny.grishul at gmail.com
Tue Mar 9 13:58:10 PST 2010


Hi LLVM dev team!

Currently I'm writing high-level compiler
<http://code.google.com/p/bamelg/>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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100310/b1d75ae1/attachment.html>


More information about the llvm-dev mailing list