Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.h
Line
Count
Source
1
//=- X86ATTInstPrinter.h - Convert X86 MCInst to assembly syntax --*- C++ -*-=//
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 class prints an X86 MCInst to AT&T style .s file syntax.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86ATTINSTPRINTER_H
14
#define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86ATTINSTPRINTER_H
15
16
#include "X86InstPrinterCommon.h"
17
18
namespace llvm {
19
20
class X86ATTInstPrinter final : public X86InstPrinterCommon {
21
public:
22
  X86ATTInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
23
                    const MCRegisterInfo &MRI)
24
9.42k
      : X86InstPrinterCommon(MAI, MII, MRI), HasCustomInstComment(false) {}
25
26
  void printRegName(raw_ostream &OS, unsigned RegNo) const override;
27
  void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot,
28
                 const MCSubtargetInfo &STI) override;
29
  bool printVecCompareInstr(const MCInst *MI, raw_ostream &OS);
30
31
  // Autogenerated by tblgen, returns true if we successfully printed an
32
  // alias.
33
  bool printAliasInstr(const MCInst *MI, raw_ostream &OS);
34
  void printCustomAliasOperand(const MCInst *MI, unsigned OpIdx,
35
                               unsigned PrintMethodIdx, raw_ostream &O);
36
37
  // Autogenerated by tblgen.
38
  void printInstruction(const MCInst *MI, raw_ostream &OS);
39
  static const char *getRegisterName(unsigned RegNo);
40
41
  void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &OS) override;
42
  void printMemReference(const MCInst *MI, unsigned Op, raw_ostream &OS);
43
  void printMemOffset(const MCInst *MI, unsigned OpNo, raw_ostream &OS);
44
  void printSrcIdx(const MCInst *MI, unsigned Op, raw_ostream &O);
45
  void printDstIdx(const MCInst *MI, unsigned Op, raw_ostream &O);
46
  void printU8Imm(const MCInst *MI, unsigned Op, raw_ostream &OS);
47
  void printSTiRegOperand(const MCInst *MI, unsigned OpNo, raw_ostream &OS);
48
49
19.8k
  void printanymem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
50
19.8k
    printMemReference(MI, OpNo, O);
51
19.8k
  }
52
612
  void printopaquemem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
53
612
    printMemReference(MI, OpNo, O);
54
612
  }
55
56
24.6k
  void printbytemem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
57
24.6k
    printMemReference(MI, OpNo, O);
58
24.6k
  }
59
18.2k
  void printwordmem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
60
18.2k
    printMemReference(MI, OpNo, O);
61
18.2k
  }
62
87.8k
  void printdwordmem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
63
87.8k
    printMemReference(MI, OpNo, O);
64
87.8k
  }
65
70.3k
  void printqwordmem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
66
70.3k
    printMemReference(MI, OpNo, O);
67
70.3k
  }
68
68.8k
  void printxmmwordmem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
69
68.8k
    printMemReference(MI, OpNo, O);
70
68.8k
  }
71
25.2k
  void printymmwordmem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
72
25.2k
    printMemReference(MI, OpNo, O);
73
25.2k
  }
74
16.1k
  void printzmmwordmem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
75
16.1k
    printMemReference(MI, OpNo, O);
76
16.1k
  }
77
1.01k
  void printtbytemem(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
78
1.01k
    printMemReference(MI, OpNo, O);
79
1.01k
  }
80
81
234
  void printSrcIdx8(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
82
234
    printSrcIdx(MI, OpNo, O);
83
234
  }
84
193
  void printSrcIdx16(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
85
193
    printSrcIdx(MI, OpNo, O);
86
193
  }
87
215
  void printSrcIdx32(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
88
215
    printSrcIdx(MI, OpNo, O);
89
215
  }
90
96
  void printSrcIdx64(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
91
96
    printSrcIdx(MI, OpNo, O);
92
96
  }
93
264
  void printDstIdx8(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
94
264
    printDstIdx(MI, OpNo, O);
95
264
  }
96
241
  void printDstIdx16(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
97
241
    printDstIdx(MI, OpNo, O);
98
241
  }
99
242
  void printDstIdx32(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
100
242
    printDstIdx(MI, OpNo, O);
101
242
  }
102
127
  void printDstIdx64(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
103
127
    printDstIdx(MI, OpNo, O);
104
127
  }
105
57
  void printMemOffs8(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
106
57
    printMemOffset(MI, OpNo, O);
107
57
  }
108
41
  void printMemOffs16(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
109
41
    printMemOffset(MI, OpNo, O);
110
41
  }
111
948
  void printMemOffs32(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
112
948
    printMemOffset(MI, OpNo, O);
113
948
  }
114
10
  void printMemOffs64(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
115
10
    printMemOffset(MI, OpNo, O);
116
10
  }
117
118
private:
119
  bool HasCustomInstComment;
120
};
121
122
} // end namespace llvm
123
124
#endif // LLVM_LIB_TARGET_X86_MCTARGETDESC_X86ATTINSTPRINTER_H