[all-commits] [llvm/llvm-project] 0287ef: [mips] Do not emit R_MIPS_JALR for sym+offset in c...

Simon Atanasyan via All-commits all-commits at lists.llvm.org
Fri Nov 15 12:38:40 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0287efb891c1da33d8eb01889f18ef71cd689ebc
      https://github.com/llvm/llvm-project/commit/0287efb891c1da33d8eb01889f18ef71cd689ebc
  Author: Simon Atanasyan <simon at atanasyan.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
    M llvm/test/MC/Mips/expansion-jal-sym-pic.s

  Log Message:
  -----------
  [mips] Do not emit R_MIPS_JALR for sym+offset in case of O32 ABI

O32 ABI uses relocations in REL format. Relocation's addend is written
in place. R_MIPS_JALR relocation points to the `jalr` instruction which
does not have a place to store the relocation addend. So it's impossible
to save non-zero "offset". This patch blocks emission of `R_MIPS_JALR`
relocations in such cases.

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


  Commit: 6108eb4e5c9fa4b1334048659810ae2fd1c92963
      https://github.com/llvm/llvm-project/commit/6108eb4e5c9fa4b1334048659810ae2fd1c92963
  Author: Simon Atanasyan <simon at atanasyan.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
    A llvm/test/MC/Mips/macro-la-64bit.s
    M llvm/test/MC/Mips/macro-la-bad.s

  Log Message:
  -----------
  [mips] Enable `la` pseudo instruction on 64-bit arch.

This patch makes LLVM compatible with GAS. It accepts `la` pseudo
instruction on arch with 64-bit pointers and just shows a warning.

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


Compare: https://github.com/llvm/llvm-project/compare/09c7e51283da...6108eb4e5c9f


More information about the All-commits mailing list