[RISCV] Add CodeGen support and MC testcase of RISCV Zca Extension
authorWuXinlong <821408745@qq.com>
Mon, 21 Nov 2022 03:20:41 +0000 (11:20 +0800)
committerWuXinlong <821408745@qq.com>
Tue, 22 Nov 2022 09:22:26 +0000 (17:22 +0800)
commit219417b2c638e22e3baaad53680a811cc9db4dff
tree419598c8b282b48f56e893b77154ee1241bf4041
parent220147d536f35d06c7037185d976ecae9df8f32c
[RISCV] Add CodeGen support and MC testcase of RISCV Zca Extension

This patch add the support of RISCV Zca ext

`Zca` is a subset of C extension instructions that are compatible with the Zc extension.

So this patch implements Zca code generation with reference to the C extension and sets the 2-byte alignment for the Zca extension, just like C extension does.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D130483
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCObjectFileInfo.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoC.td
llvm/lib/Target/RISCV/RISCVSubtarget.h
llvm/test/CodeGen/RISCV/attributes.ll
llvm/test/MC/RISCV/align.s
llvm/test/MC/RISCV/rv32c-aliases-valid.s
llvm/test/MC/RISCV/rv64c-aliases-valid.s