[PATCH] D23157: [COFF][ARM] Error out if 24 bit thumb branches are out of range

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 22:58:15 PDT 2016


mstorsjo added inline comments.

================
Comment at: COFF/Chunks.cpp:117-118
@@ -116,2 +116,4 @@
   uint32_t J2 = ((~V >> 22) & 1) ^ S;
+  if (!isInt<25>(V))
+    fatal("relocation out of range");
   or16(Off, (S << 10) | ((V >> 12) & 0x3ff));
----------------
ruiu wrote:
> This does not depend on none of S, J1 nor J2, so please move this to the beginning of this function.
Ok, moving it up


https://reviews.llvm.org/D23157





More information about the llvm-commits mailing list