[LLVMdev] modifying llc asm output

Bill Wendling isanbard at gmail.com
Tue Jun 30 12:54:24 PDT 2009


On Tue, Jun 30, 2009 at 11:16 AM, Michael
Graumann<MichaelGraumann at gmx.net> wrote:
> Ok :-) und how can I add inlined assembly to the output?
>
If you're compiling this from C source code, use the "__asm__
__volatile__ ("isync");" syntax. If you're generating straight LLVM
IR, then I'm not entirely sure. You'll have to create some type of
CallInst instruction. See TreeToLLVM::EmitASM_EXPR() in the LLVM-GCC
gcc/llvm-convert.cpp file for an example of how it generates one of
these.

-bw



More information about the llvm-dev mailing list