[PATCH] D68875: Check for branch range overflows.

Brian Cain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 10:05:42 PDT 2019


bcain accepted this revision.
bcain added a comment.
This revision is now accepted and ready to land.

LGTM, but suggestions for stricter test case.



================
Comment at: lld/test/ELF/hexagon-verify.s:5-9
+#CHECK: relocation R_HEX_B9_PCREL out of range: 1028 is not in [-1024, 1023]
+#CHECK: relocation R_HEX_B13_PCREL out of range: 16388 is not in [-16384, 16383]
+#CHECK: relocation R_HEX_B15_PCREL out of range: 65540 is not in [-65536, 65535]
+#CHECK: relocation R_HEX_B22_PCREL out of range: 8388612 is not in [-2097152, 2097151]
+
----------------
I'd make the subsequent ones CHECK-NEXT.

Also may make sense to constrain the FileCheck with implicit-check-not='out of range' to make sure no range errors are emitted that aren't checked for.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D68875





More information about the llvm-commits mailing list