[PATCH] D21374: [RFC] Generate long nop instructions depending on function-specific subtarget info
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 4 17:33:18 PDT 2016
jyknight added a comment.
In http://reviews.llvm.org/D21374#469554, @rafael wrote:
> How is this represented is the assembly file?
> We should not create another case where we cannot go from .ll to .s to .o.
I'd have expected that indicating which instructions are used ought to be done via emitting an ".arch" directive when the desired architecture changes in the emitter, and then using that data in the assembler. Unfortunately, LLVM's assembler doesn't support ".arch" on x86 at the moment, so that's a bit of a shame.
See the testcase in gas, "gas/testsuite/gas/i386/nops-5.s" (nops-5.d output) for an example of using .arch to influence the output of .p2align.
For some reason, though, it looks like GCC doesn't emit the .arch directive, even when doing e.g. #pragma GCC target ("arch=i386"). So I dunno. *shrug*.
More information about the llvm-commits