[all-commits] [llvm/llvm-project] 210cc0: [mac/lld] Fix scale computation for vector ops in ...

Nico Weber via All-commits all-commits at lists.llvm.org
Fri Mar 5 09:25:04 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 210cc0738bbeecf97c9698e2bbe54bbb7d520387
      https://github.com/llvm/llvm-project/commit/210cc0738bbeecf97c9698e2bbe54bbb7d520387
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-03-05 (Fri, 05 Mar 2021)

  Changed paths:
    M lld/MachO/Arch/ARM64.cpp
    M lld/test/MachO/arm64-relocs.s

  Log Message:
  -----------
  [mac/lld] Fix scale computation for vector ops in PAGEOFF12 relocations

With this, llvm-tblgen no longer tries and fails to allocate 7953 petabyte
when it runs during the build. Instead, `check-llvm` with lld/mac as host
linker now completes without any failures on an m1 mac.

This vector op handling code matches what happens in:
- ld64's OutputFile::applyFixUps() in OutputFile.cpp for kindStoreARM64PageOff12
- lld.ld64.darwinold's offset12KindFromInstruction() in
  lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp for offset12scale16
- RuntimeDyld's decodeAddend() in
  llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h for
  ARM64_RELOC_PAGEOFF12

Fixes PR49444.

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




More information about the All-commits mailing list