[all-commits] [llvm/llvm-project] 2aaba4: [PowerPC] Allow absolute expressions in relocations

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Tue Feb 22 07:53:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2aaba44b5c2265f90ac9f0ae188417ef79201c82
      https://github.com/llvm/llvm-project/commit/2aaba44b5c2265f90ac9f0ae188417ef79201c82
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2022-02-22 (Tue, 22 Feb 2022)

  Changed paths:
    M llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp
    M llvm/lib/Target/PowerPC/PPCInstrInfo.td
    A llvm/test/MC/PowerPC/ppc64-abs-reloc.s

  Log Message:
  -----------
  [PowerPC] Allow absolute expressions in relocations

The Linux kernel build uses absolute expressions suffixed with @lo/@ha
relocations. This currently doesn't work for DS/DQ form instructions and
there is no reason for it not to. It also works with GAS.
This patch allows this as long as the value is a multiple of 4/16
for DS/DQ form.

Differential revision: https://reviews.llvm.org/D115419




More information about the All-commits mailing list