[llvm-dev] Clean way to align an instruction?

Jon Chesterfield via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 25 07:44:40 PDT 2018


Hi,

I'm targeting an instruction that has an alignment constraint. Not on data,
on the instruction itself. This is easily used from asm by a .align
directive before the instruction, but I can't find an api to emit one.
Using the integrated assembler.

My workaround is to align the function, count instructions from the start,
multiplying by the size of each instruction, then emitting nops as
necessary. Most instructions are fixed size, thankfully.

This is horrible though. Is there a better way?

Thanks!

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181025/493f58ce/attachment.html>


More information about the llvm-dev mailing list