[PATCH] D132633: [LoongArch] Add more fixups and relocations

Ray Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 01:11:42 PDT 2022


wangleiat added a comment.

In D132633#3748207 <https://reviews.llvm.org/D132633#3748207>, @xen0n wrote:

> So it seems we're restricting the applicable instructions for each fixup kind, for example even if both `lu12i.w` and `lu32i.d` take a 20-bit signed immediate, the `xxx64_LO20` fixups still cannot be used with `lu12i.w` and the `xxx_HI20` ones cannot be used with `lu32i.d`.
>
> Is this the same behavior as in binutils? I don't know if this is an artificial limitation to assembly expressiveness, but since I know the reloc types are deliberately designed with effectively only the linker implementation in mind, this might as well just be expected. I didn't find any other major problem though...

(test results)
The behavior is different with binutils. Probably the current implementation of binutils doesn't care if the relocation conforms to the instruction.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132633/new/

https://reviews.llvm.org/D132633



More information about the llvm-commits mailing list