[PATCH] D82826: [X86] support .nops directive
Jian Cai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 17:18:27 PDT 2020
jcai19 updated this revision to Diff 274963.
jcai19 added a comment.
(1) This is a temporary implementation as it breaks the following tests:
LLVM :: MC/COFF/align-nops.s
LLVM :: MC/MachO/x86_32-optimal_nop.s
LLVM :: MC/X86/AlignedBundling/misaligned-bundle-group.s
LLVM :: MC/X86/AlignedBundling/misaligned-bundle.s
LLVM :: MC/X86/align-branch-bundle.s
LLVM :: MC/X86/align-branch-pad-max-prefix.s
LLVM :: MC/X86/x86_long_nop.s
LLVM :: MC/X86/x86_nop.s
The breakage was caused by checking X86::Mode32Bit and X86::Mode64Bit in the newly introduced X86AsmBackend::getMaximumNopSize() function. All the above tests would pass if I removed the two checks, but .nops calls would then emit byte-long nop instructions regardless of its second argument.
(2) Will address error messages in the next iteration.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82826/new/
https://reviews.llvm.org/D82826
Files:
llvm/include/llvm/MC/MCAsmBackend.h
llvm/include/llvm/MC/MCFragment.h
llvm/include/llvm/MC/MCObjectStreamer.h
llvm/include/llvm/MC/MCStreamer.h
llvm/lib/MC/MCAssembler.cpp
llvm/lib/MC/MCFragment.cpp
llvm/lib/MC/MCObjectStreamer.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
llvm/test/MC/X86/x86-directive-nops-errors.s
llvm/test/MC/X86/x86-directive-nops.s
llvm/test/MC/X86/x86_64-directive-nops.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82826.274963.patch
Type: text/x-patch
Size: 13730 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/82f2c201/attachment.bin>
More information about the llvm-commits
mailing list