1 //=- WebAssemblyInstPrinter.cpp - WebAssembly assembly instruction printing -=// 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 /// \file 11 /// \brief Print MCInst instructions to wasm format. 12 /// 13 //===----------------------------------------------------------------------===// 14 15 #include "InstPrinter/WebAssemblyInstPrinter.h" 16 #include "WebAssembly.h" 17 #include "llvm/MC/MCExpr.h" 18 #include "llvm/MC/MCInst.h" 19 #include "llvm/MC/MCInstrInfo.h" 20 #include "llvm/MC/MCSubtargetInfo.h" 21 #include "llvm/MC/MCSymbol.h" 22 #include "llvm/Support/ErrorHandling.h" 23 #include "llvm/Support/FormattedStream.h" 24 #include <cctype> 25 using namespace llvm; 26 27 #define DEBUG_TYPE "asm-printer" 28 29 WebAssemblyInstPrinter::WebAssemblyInstPrinter(const MCAsmInfo &MAI, 30 const MCInstrInfo &MII, 31 const MCRegisterInfo &MRI) 32 : MCInstPrinter(MAI, MII, MRI) {} 33 34 void WebAssemblyInstPrinter::printRegName(raw_ostream &OS, 35 unsigned RegNo) const { 36 llvm_unreachable("TODO: implement printRegName"); 37 } 38 39 void WebAssemblyInstPrinter::printInst(const MCInst *MI, raw_ostream &OS, 40 StringRef Annot, 41 const MCSubtargetInfo &STI) { 42 llvm_unreachable("TODO: implement printInst"); 43 } 44