[AArch64] Diagnose large adrp offset on Windows.
authorEli Friedman <efriedma@quicinc.com>
Tue, 2 Nov 2021 20:32:31 +0000 (13:32 -0700)
committerEli Friedman <efriedma@quicinc.com>
Tue, 2 Nov 2021 22:11:22 +0000 (15:11 -0700)
commitc964afb2c8b540a8579c18d3a05379ceee704844
treeb928050f0956cccb818d7b5ca78ffa4ca257cb54
parentbab3f32d6b668600c9f0677f93be7df602d57cc1
[AArch64] Diagnose large adrp offset on Windows.

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

Differential Revision: https://reviews.llvm.org/D113051
llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
llvm/test/MC/AArch64/fixup-out-of-range.s