[PATCH] D97982: [MC] Introduce NeverAlign fragment type
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 23:48:33 PDT 2021
Amir marked an inline comment as done.
Amir added inline comments.
================
Comment at: llvm/lib/MC/MCAssembler.cpp:354-355
+ size_t NextFragSize = 0;
+ if (const auto *NextFrag = dyn_cast<MCRelaxableFragment>(NF)) {
+ NextFragSize = NextFrag->getContents().size();
+ } else if (const auto *NextFrag = dyn_cast<MCDataFragment>(NF)) {
----------------
skan wrote:
> You can add test case like
> ```
> .L0:
> .nops 57
> int3
> .avoid_end_align 64
> cmpl $(.L1-.L0), %eax
> je .L0
> .nops 65
> .L1:
> ```
> to check the situation where the fragment after NeverAlign is a RelaxableFragment.
Thank you!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97982/new/
https://reviews.llvm.org/D97982
More information about the llvm-commits
mailing list