[all-commits] [llvm/llvm-project] 7070c6: [SystemZ] Accept (. - 0x100000000) PCRel32 constants

Ilya Leoshkevich via All-commits all-commits at lists.llvm.org
Mon May 2 11:58:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7070c6a96b418874ac201c6e0ff2070c5c9669d3
      https://github.com/llvm/llvm-project/commit/7070c6a96b418874ac201c6e0ff2070c5c9669d3
  Author: Ilya Leoshkevich <iii at linux.ibm.com>
  Date:   2022-05-02 (Mon, 02 May 2022)

  Changed paths:
    M llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
    M llvm/test/MC/SystemZ/insn-bad.s
    M llvm/test/MC/SystemZ/insn-good.s

  Log Message:
  -----------
  [SystemZ] Accept (. - 0x100000000) PCRel32 constants

Clang does not accept instructions like brasl %r0,.-0x100000000,
because the second operand's right-hand-side (0x100000000) barely
misses the acceptable range. However, since it's being subtracted, it
makes sense to perform the range check on the negated value.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D124780




More information about the All-commits mailing list