On Windows, this relocation can only encode a 21-bit offset. Make sure we emit an error, instead of silently truncating the offset.
Found investigating https://bugs.llvm.org/show_bug.cgi?id=52378
Paths
| Differential D113051
[AArch64] Diagnose large adrp offset on Windows. ClosedPublic Authored by efriedma on Nov 2 2021, 1:59 PM.
Details
Summary On Windows, this relocation can only encode a 21-bit offset. Make sure we emit an error, instead of silently truncating the offset. Found investigating https://bugs.llvm.org/show_bug.cgi?id=52378
Diff Detail
Event TimelineComment Actions LGTM
This revision is now accepted and ready to land.Nov 2 2021, 2:07 PM Closed by commit rGc964afb2c8b5: [AArch64] Diagnose large adrp offset on Windows. (authored by efriedma). · Explain WhyNov 2 2021, 3:11 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 384254 llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
llvm/test/MC/AArch64/fixup-out-of-range.s
|
Nit: It's not entirely obvious to the reader that these decimal numbers map to the limits of a signed 21 bit number corresponding to the mask below (although that's the main thing one would guess that they mean).