[PATCH] D69749: [SystemZ] Improve handling of huge PC relative immediate offsets.
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 2 01:58:38 PDT 2019
jonpa created this revision.
jonpa added a reviewer: uweigand.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Demand that an immediate offset to a PC relative address fits in 32 bits, or else load it into a register and perform a separate add.
Verify in the assembler that such immediate offsets fit the bitwidth.
Even though the final address of a Load Address Relative Long may fit in 32 bits even with >32 bit offset (depending on where the symbol lives relative to PC), the GNU toolchain demands the offset by itself to be in range. This patch adapts the same behavior for llvm.
https://reviews.llvm.org/D69749
Files:
llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/test/CodeGen/SystemZ/la-05.ll
llvm/test/MC/SystemZ/insn-bad.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69749.227573.patch
Type: text/x-patch
Size: 5658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191102/ea8a905b/attachment.bin>
More information about the llvm-commits
mailing list