10b57cec5SDimitry Andric //===-- X86InstPrinterCommon.cpp - X86 assembly instruction printing ------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file includes code common for rendering MCInst instances as AT&T-style 100b57cec5SDimitry Andric // and Intel-style assembly. 110b57cec5SDimitry Andric // 120b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTPRINTERCOMMON_H 150b57cec5SDimitry Andric #define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTPRINTERCOMMON_H 160b57cec5SDimitry Andric 170b57cec5SDimitry Andric #include "llvm/MC/MCInstPrinter.h" 180b57cec5SDimitry Andric 190b57cec5SDimitry Andric namespace llvm { 200b57cec5SDimitry Andric 210b57cec5SDimitry Andric class X86InstPrinterCommon : public MCInstPrinter { 220b57cec5SDimitry Andric public: 230b57cec5SDimitry Andric using MCInstPrinter::MCInstPrinter; 240b57cec5SDimitry Andric 250b57cec5SDimitry Andric virtual void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) = 0; 260b57cec5SDimitry Andric void printCondCode(const MCInst *MI, unsigned Op, raw_ostream &OS); 27*0fca6ea1SDimitry Andric void printCondFlags(const MCInst *MI, unsigned Op, raw_ostream &OS); 280b57cec5SDimitry Andric void printSSEAVXCC(const MCInst *MI, unsigned Op, raw_ostream &OS); 290b57cec5SDimitry Andric void printVPCOMMnemonic(const MCInst *MI, raw_ostream &OS); 300b57cec5SDimitry Andric void printVPCMPMnemonic(const MCInst *MI, raw_ostream &OS); 310b57cec5SDimitry Andric void printCMPMnemonic(const MCInst *MI, bool IsVCmp, raw_ostream &OS); 320b57cec5SDimitry Andric void printRoundingControl(const MCInst *MI, unsigned Op, raw_ostream &O); 335ffd83dbSDimitry Andric void printPCRelImm(const MCInst *MI, uint64_t Address, unsigned OpNo, 345ffd83dbSDimitry Andric raw_ostream &O); 355ffd83dbSDimitry Andric 360b57cec5SDimitry Andric protected: 3781ad6265SDimitry Andric void printInstFlags(const MCInst *MI, raw_ostream &O, 3881ad6265SDimitry Andric const MCSubtargetInfo &STI); 390b57cec5SDimitry Andric void printOptionalSegReg(const MCInst *MI, unsigned OpNo, raw_ostream &O); 400b57cec5SDimitry Andric void printVKPair(const MCInst *MI, unsigned OpNo, raw_ostream &OS); 410b57cec5SDimitry Andric }; 420b57cec5SDimitry Andric 430b57cec5SDimitry Andric } // end namespace llvm 440b57cec5SDimitry Andric 4504eeddc0SDimitry Andric #endif // LLVM_LIB_TARGET_X86_MCTARGETDESC_X86INSTPRINTERCOMMON_H 46