[PATCH] D60702: [ARM] Add fixup types for BF and LOL.

Oliver Stannard (Linaro) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 03:32:59 PDT 2019


ostannard added inline comments.


================
Comment at: llvm/include/llvm/BinaryFormat/ELFRelocs/ARM.def:139
+ELF_RELOC(R_ARM_THM_BF16,               0x88)
+ELF_RELOC(R_ARM_THM_BF13,               0x89)
+ELF_RELOC(R_ARM_THM_BF18,               0x8a)
----------------
This is listed in the ABI (https://developer.arm.com/docs/ihi0044/latest/elf-for-the-arm-architecture-abi-2019q1-documentation) as R_ARM_THM_BF12.


================
Comment at: llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp:269
+    int64_t Offset = int64_t(Value) - 4;
+    if (Offset > 30)
+      return "out of range pc-relative fixup value";
----------------
This should also check for negative offsets.


================
Comment at: llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp:304
+    uint64_t Offset = -Value + 4;
+    if (int64_t(Value) > 0 || Offset > 4094)
+      return "out of range pc-relative fixup value";
----------------
Should this be "< 0"?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60702





More information about the llvm-commits mailing list