[PATCH] D125204: [RISCV] Use RISCVISAInfo to parse arch string from ELF build attribute.

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 8 21:23:25 PDT 2022


kito-cheng created this revision.
Herald added subscribers: sunshaoce, VincentWu, luke957, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, rupprecht, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson, emaste.
Herald added a reviewer: jhenderson.
Herald added a reviewer: MaskRay.
Herald added a project: All.
kito-cheng requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, StephenFan.
Herald added a project: LLVM.

ELFObjectFileBase::getRISCVFeatures using a handmade simple parser
to parse arch attribute, and that have long time no update, I think the
reasonble way to fix is using RISCVISAInfo, so that we can keep maintain
a unify infrastructure.

And there is an extra requirement for ELFObjectFileBase::getRISCVFeatures,
that might got unrecognized extensions, for example, the object is
compiled by GNU toolchain, and that might contain extensions which is
not supported yet by LLVM.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125204

Files:
  llvm/include/llvm/Support/RISCVISAInfo.h
  llvm/lib/Object/ELFObjectFile.cpp
  llvm/lib/Support/RISCVISAInfo.cpp
  llvm/test/tools/llvm-objdump/ELF/RISCV/unknown-arch-attr.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125204.427976.patch
Type: text/x-patch
Size: 8191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220509/a1814520/attachment.bin>


More information about the llvm-commits mailing list