1 //===-- VETargetStreamer.cpp - VE Target Streamer Methods -----------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // This file provides VE specific target streamer methods. 10 // 11 //===----------------------------------------------------------------------===// 12 13 #include "VETargetStreamer.h" 14 #include "VEInstPrinter.h" 15 16 using namespace llvm; 17 18 // pin vtable to this file 19 VETargetStreamer::VETargetStreamer(MCStreamer &S) : MCTargetStreamer(S) {} 20 21 void VETargetStreamer::anchor() {} 22 23 VETargetAsmStreamer::VETargetAsmStreamer(MCStreamer &S, 24 formatted_raw_ostream &OS) 25 : VETargetStreamer(S), OS(OS) {} 26 27 void VETargetAsmStreamer::emitVERegisterIgnore(unsigned reg) { 28 OS << "\t.register " 29 << "%" << StringRef(VEInstPrinter::getRegisterName(reg)).lower() 30 << ", #ignore\n"; 31 } 32 33 void VETargetAsmStreamer::emitVERegisterScratch(unsigned reg) { 34 OS << "\t.register " 35 << "%" << StringRef(VEInstPrinter::getRegisterName(reg)).lower() 36 << ", #scratch\n"; 37 } 38 39 VETargetELFStreamer::VETargetELFStreamer(MCStreamer &S) : VETargetStreamer(S) {} 40 41 MCELFStreamer &VETargetELFStreamer::getStreamer() { 42 return static_cast<MCELFStreamer &>(Streamer); 43 } 44