[RISCV] Add MC support of RISCV Zca Extension
authorWuXinlong <821408745@qq.com>
Tue, 16 Aug 2022 01:23:02 +0000 (09:23 +0800)
committerWuXinlong <821408745@qq.com>
Thu, 18 Aug 2022 04:13:35 +0000 (12:13 +0800)
commit515ece1a9005b29747e5e19bccb17f2ae3d78fb9
treebbd9b7c03586ccbbcb7ca9e797a43763cb81138e
parenta4230319f7af786f4d947f39a870f339b32a6fe7
[RISCV] Add MC support of RISCV Zca Extension

This patch adds support for part of Zc extension which will be frozen soon.

This extension is designed to continue reducing the binary size of RISC-V programs.
In this patch:
`Zca` is a subset of C extension instructions that are compatible with the Zc extension.

The spec of Zc ext is [[ https://github.com/riscv/riscv-code-size-reduction/releases | Here ]]

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D130141
llvm/lib/Support/RISCVISAInfo.cpp
llvm/lib/Target/RISCV/RISCV.td
llvm/lib/Target/RISCV/RISCVInstrInfoC.td
llvm/lib/Target/RISCV/RISCVSubtarget.h
llvm/test/MC/RISCV/attribute-arch.s
llvm/test/MC/RISCV/rv32c-invalid.s
llvm/test/MC/RISCV/rv32c-only-valid.s
llvm/test/MC/RISCV/rv32c-valid.s
llvm/test/MC/RISCV/rv64c-hints-valid.s
llvm/test/MC/RISCV/rv64c-invalid.s
llvm/test/MC/RISCV/rv64c-valid.s