[all-commits] [llvm/llvm-project] 8560da: [PowerPC] Simplify PPCMCExpr::evaluateAsRelocatabl...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Mar 15 12:45:42 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8560da28c69de481f3ad147722577e87b902facb
      https://github.com/llvm/llvm-project/commit/8560da28c69de481f3ad147722577e87b902facb
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-03-15 (Sat, 15 Mar 2025)

  Changed paths:
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp

  Log Message:
  -----------
  [PowerPC] Simplify PPCMCExpr::evaluateAsRelocatableImpl

The signedness of the @l result is dependent on the instruction operand
(gas behavior).
E.g. in `addis 3,3,65535 at l`, 65535 at l is signed. Unfortunately
we don't have the information.

bfef1dd694d4c646f79521fa3258bbb2398a990c (2014) checked `Fixup`,
which was unnecessary and mislead https://reviews.llvm.org/D115419
to make the code more complex.

In PPCMCExpr::evaluateAsRelocatableImpl we don't need to validate the
result. Just continue and rely on the validation in ELFObjectWriter.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list