[all-commits] [llvm/llvm-project] ff2b34: [SystemZ] Improve handling of huge PC relative im...

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Mon Nov 4 01:37:17 PST 2019


  Branch: refs/heads/PCRel
  Home:   https://github.com/llvm/llvm-project
  Commit: ff2b3401984b36f94a817995b0ee665c13d97264
      https://github.com/llvm/llvm-project/commit/ff2b3401984b36f94a817995b0ee665c13d97264
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2019-11-04 (Mon, 04 Nov 2019)

  Changed paths:
    M llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    A llvm/test/CodeGen/SystemZ/la-05.ll
    M llvm/test/MC/SystemZ/insn-bad.s

  Log Message:
  -----------
  [SystemZ]  Improve handling of huge PC relative immediate offsets.

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 a >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.

Review: Ulrich Weigand
https://reviews.llvm.org/D69749




More information about the All-commits mailing list