[RISCV] Support '.option arch' directive
authorluxufan <luxufan@iscas.ac.cn>
Fri, 26 May 2023 03:48:28 +0000 (11:48 +0800)
committerluxufan <luxufan@iscas.ac.cn>
Fri, 26 May 2023 10:39:41 +0000 (18:39 +0800)
commit9e8ed3403c191ab9c4903e8eeb8f732ff8a43cb4
tree564550f9b1e4b6afcce4847c56d029bd2c66a6b2
parentf97ea77506aaee42af856bfde4d4fb3cc4311c12
[RISCV] Support '.option arch' directive

The proposal of '.option arch' directive is https://github.com/riscv-non-isa/riscv-asm-manual/pull/67

Note: For '.option arch, +/-' directive, version number is not yet supported.

Reviewed By: luismarques, craig.topper

Differential Revision: https://reviews.llvm.org/D123515
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
llvm/test/CodeGen/RISCV/inline-option-directive.ll [new file with mode: 0644]
llvm/test/MC/RISCV/eflags-option-directive.s [new file with mode: 0644]
llvm/test/MC/RISCV/option-arch.s [new file with mode: 0644]
llvm/test/MC/RISCV/option-invalid.s