[all-commits] [llvm/llvm-project] 79d84a: MipsMCExpr: remove unneeded folding and fix a cras...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Mar 15 14:31:33 PDT 2025


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

  Changed paths:
    M llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp
    M llvm/test/MC/Mips/hilo-addressing.s

  Log Message:
  -----------
  MipsMCExpr: remove unneeded folding and fix a crash for %hi(und-$L3)

After folding the inner expression, we might get something like
%hi(0x30124), MipsAsmBackend::applyFixup will apply the relocation
operator, so we don't need to duplicate code in MipsMCExpr
(introduced by https://reviews.llvm.org/D19716).

While we don't know the encoding at parse time (see hilo-addressing.s),
it is not an issue.

This change also removes an inappropriate use of `Fixup`
(introduced in 2014 by 752b91bd821ad8a23e004b6cd631ae4f6984ae8b ; which
will go away with my next change).

In addition, fix a crash by porting the fix from RISCV.
```
lui $4, %hi(und-$L3)
```



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