[PATCH] D115419: [PowerPC] Allow absolute expressions in relocations

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 19:59:18 PST 2021


nemanjai created this revision.
nemanjai added a reviewer: PowerPC.
Herald added subscribers: shchenz, kbarton, hiraditya.
nemanjai requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115419

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115419.393013.patch
Type: text/x-patch
Size: 7045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211209/01ae1bc0/attachment.bin>


More information about the llvm-commits mailing list