diff options
author | Alex Bradbury <asb@lowrisc.org> | 2018-11-28 16:39:14 +0000 |
---|---|---|
committer | Alex Bradbury <asb@lowrisc.org> | 2018-11-28 16:39:14 +0000 |
commit | 893e5bc77484e93d7219eb5aef3534cbe6a14bb5 (patch) | |
tree | f03fee86fe12d19d6e87f481c6fe03842585d687 /llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp | |
parent | 8d63aed45941eb40ee30cf80584d6fd024d56b53 (diff) | |
download | bcm5719-llvm-893e5bc77484e93d7219eb5aef3534cbe6a14bb5.tar.gz bcm5719-llvm-893e5bc77484e93d7219eb5aef3534cbe6a14bb5.zip |
[RISCV] Support .option push and .option pop
This adds support in the RISCVAsmParser the storing of Subtarget feature bits to a stack so that they can be pushed/popped to enable/disable multiple features at once.
Differential Revision: https://reviews.llvm.org/D46424
Patch by Lewis Revill.
llvm-svn: 347774
Diffstat (limited to 'llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp')
-rw-r--r-- | llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp index 33c59f839ef..8d5ef3dbd17 100644 --- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp +++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp @@ -23,6 +23,14 @@ RISCVTargetAsmStreamer::RISCVTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS) : RISCVTargetStreamer(S), OS(OS) {} +void RISCVTargetAsmStreamer::emitDirectiveOptionPush() { + OS << "\t.option\tpush\n"; +} + +void RISCVTargetAsmStreamer::emitDirectiveOptionPop() { + OS << "\t.option\tpop\n"; +} + void RISCVTargetAsmStreamer::emitDirectiveOptionRVC() { OS << "\t.option\trvc\n"; } |