[RISCV] Support .option push and .option pop
authorAlex Bradbury <asb@lowrisc.org>
Wed, 28 Nov 2018 16:39:14 +0000 (16:39 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Wed, 28 Nov 2018 16:39:14 +0000 (16:39 +0000)
commit893e5bc77484e93d7219eb5aef3534cbe6a14bb5
treef03fee86fe12d19d6e87f481c6fe03842585d687
parent8d63aed45941eb40ee30cf80584d6fd024d56b53
[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
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h
llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
llvm/test/MC/RISCV/option-invalid.s
llvm/test/MC/RISCV/option-pushpop.s [new file with mode: 0644]