[PATCH] D118450: [RuntimeDyld] Handle SPARC

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 04:12:56 PST 2022


ro created this revision.
ro added a reviewer: lhames.
Herald added subscribers: jrtc27, fedor.sergeev, hiraditya, jyknight.
ro requested review of this revision.
Herald added a project: LLVM.

A couple of tests `FAIL` on Solaris/sparcv9 with

  Unsupported CPU type!
  UNREACHABLE executed at /vol/llvm/src/llvm-project/dist/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1067!

Fixed by adding SPARC support to `RuntimeDyld`.

Tested on `sparcv9-sun-solaris2.11`.

Authored-By: Stefan Teleman <stefan.teleman at oracle.com>

The patch has been available from 033-solaris-LLVM-JIT.patch <https://github.com/oracle/solaris-userland/blob/master/components/llvm/patches/033-solaris-LLVM-JIT.patch> for quite a while.  I've learned from my contacts in Oracle Solaris Engineering that it had originally been developed for LLVM 3.8.1 by Stefan Teleman while working at Oracle.  They are fine with me submitting it upstream.

I had to make a few changes to that patch:

- Formatting fixes
- Remove unused variables
- Undo the `getFileFormatName` changes in `ELFObjectFile.h` which broke `ELFObjectFileTest.MachineTestForSPARC*`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118450

Files:
  llvm/include/llvm/BinaryFormat/ELFRelocs/Sparc.def
  llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
  llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
  llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118450.403627.patch
Type: text/x-patch
Size: 22857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220128/2ba69235/attachment.bin>


More information about the llvm-commits mailing list