[PATCH] D46630: [RISCV] Insert NOPs and R_RISCV_ALIGN relocation type for .align directive when linker relaxation enabled
Shiva Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 24 00:00:28 PDT 2018
shiva0217 added a comment.
In https://reviews.llvm.org/D46630#1109492, @asb wrote:
> Hi Shiva. As far as testing goes, I think we really need to see testing of corner cases around enabling/disabling rvc support in the same file.
>
> Could you comment about the decision to introduce the PseudoNOP instruction? The obvious alternative approach would be to try to customise the code that handles MCAlignFragments, adding new hooks if necessary. Have you looked in any detail at doing it that way?
Hi Alex. My first thought is to implement by MCAlignFragment, too. But R_RISCV_ALIGN has to insert to the first NOP. So that linker could know where are the Nop sequences start.
I can't find a way to insert R_RISCV_ALIGN by MCAlignFragment infrastructure. So I insert PseudoNOP which could indicate the first NOP position. Not sure it's the best way to do so.
Repository:
rL LLVM
https://reviews.llvm.org/D46630
More information about the llvm-commits
mailing list