blob: 8d5ef3dbd17f99e502b07ef2e8324495136faaf1 [file] [log] [blame]
Shiva Chen056d8352018-01-26 07:53:07 +00001//===-- RISCVTargetStreamer.cpp - RISCV Target Streamer Methods -----------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file provides RISCV specific target streamer methods.
11//
12//===----------------------------------------------------------------------===//
13
14#include "RISCVTargetStreamer.h"
Alex Bradburybca0c3c2018-05-11 17:30:28 +000015#include "llvm/Support/FormattedStream.h"
Shiva Chen056d8352018-01-26 07:53:07 +000016
17using namespace llvm;
18
19RISCVTargetStreamer::RISCVTargetStreamer(MCStreamer &S) : MCTargetStreamer(S) {}
Alex Bradburybca0c3c2018-05-11 17:30:28 +000020
21// This part is for ascii assembly output
22RISCVTargetAsmStreamer::RISCVTargetAsmStreamer(MCStreamer &S,
23 formatted_raw_ostream &OS)
24 : RISCVTargetStreamer(S), OS(OS) {}
25
Alex Bradbury893e5bc2018-11-28 16:39:14 +000026void RISCVTargetAsmStreamer::emitDirectiveOptionPush() {
27 OS << "\t.option\tpush\n";
28}
29
30void RISCVTargetAsmStreamer::emitDirectiveOptionPop() {
31 OS << "\t.option\tpop\n";
32}
33
Alex Bradburybca0c3c2018-05-11 17:30:28 +000034void RISCVTargetAsmStreamer::emitDirectiveOptionRVC() {
35 OS << "\t.option\trvc\n";
36}
37
38void RISCVTargetAsmStreamer::emitDirectiveOptionNoRVC() {
39 OS << "\t.option\tnorvc\n";
40}
Alex Bradbury9c03e4c2018-11-12 14:25:07 +000041
42void RISCVTargetAsmStreamer::emitDirectiveOptionRelax() {
43 OS << "\t.option\trelax\n";
44}
45
46void RISCVTargetAsmStreamer::emitDirectiveOptionNoRelax() {
47 OS << "\t.option\tnorelax\n";
48}