[PATCH] D108602: [RISCV] Initial support .insn directive for the assembler.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 23 18:00:23 PDT 2021
craig.topper created this revision.
craig.topper added reviewers: jrtc27, asb, luismarques, kito-cheng, HsiangKai, khchen, arcbbb, evandro.
Herald added subscribers: StephenFan, vkmr, frasercrmck, 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.
craig.topper requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.
This allows for a custom encoding to be emitted. It can also be
used with inline assembly to allow the custom instruction to be
register allocated like other instructions.
I initially started from SystemZ's implementation, but some of
the formats allow operands to be specified in multiple ways so I
had to add support for matching different operand class lists for
the same format. That implementation is a simplified version of
what is emitted by tablegen for regular instructions.
I've left out the compressed formats. And I haven't supported the
named opcodes like LUI or OP_IMM_32. Those can be added in future
patches.
Documentation can be found here https://sourceware.org/binutils/docs-2.34/as/RISC_002dV_002dFormats.html
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108602
Files:
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
llvm/lib/Target/RISCV/RISCVInstrFormats.td
llvm/lib/Target/RISCV/RISCVInstrInfo.td
llvm/lib/Target/RISCV/RISCVRegisterInfo.td
llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
llvm/test/MC/RISCV/insn-invalid.s
llvm/test/MC/RISCV/insn.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108602.368248.patch
Type: text/x-patch
Size: 24361 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210824/c8603707/attachment.bin>
More information about the llvm-commits
mailing list