[PATCH] D148782: [RISCV] Add an option to emit the Tag_RISCV_arch attribute based on the assembler's subtarget
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 19 22:12:54 PDT 2023
craig.topper created this revision.
craig.topper added reviewers: asb, jrtc27, kito-cheng.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, jdoerfert, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, kristof.beyls, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
This adds an option to emit the command line -mattr/-march into the
attributes of an object file. This can useful to get objdump to
disassemble instructions that aren't in the base without forcing
users to add a .attribute to the assembly file.
The binutils assembler does this by default.
Similar option exists for ARM. I will wire it to a clang option in
another patch. Similar to https://reviews.llvm.org/D31813
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148782
Files:
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
llvm/test/MC/RISCV/attribute.s
llvm/test/MC/RISCV/default-build-attributes.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148782.515219.patch
Type: text/x-patch
Size: 5245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230420/05ad9340/attachment.bin>
More information about the llvm-commits
mailing list