llvm.org GIT mirror llvm / 5caac9d
[X86] Fix some Include What You Use warnings; other minor fixes (NFC). This is preparation to reduce MCExpr.h dependencies.(vlsj-clangbuild)[622] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294246 91177308-0d34-0410-b5e6-96231b3b80d8 Eugene Zelenko 3 years ago
5 changed file(s) with 39 addition(s) and 21 deletion(s). Raw diff Collapse all Expand all
None //===-- X86Operand.h - Parsed X86 machine instruction --------------------===//
0 //===- X86Operand.h - Parsed X86 machine instruction ------------*- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
1010 #define LLVM_LIB_TARGET_X86_ASMPARSER_X86OPERAND_H
1111
1212 #include "X86AsmParserCommon.h"
13 #include "llvm/ADT/STLExtras.h"
14 #include "llvm/ADT/StringRef.h"
1315 #include "llvm/MC/MCExpr.h"
1416 #include "llvm/MC/MCInst.h"
1517 #include "llvm/MC/MCRegisterInfo.h"
1618 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
17 #include "llvm/ADT/STLExtras.h"
18 #include "MCTargetDesc/X86MCTargetDesc.h"
19 #include "llvm/Support/Casting.h"
20 #include "llvm/Support/ErrorHandling.h"
21 #include "llvm/Support/SMLoc.h"
22 #include
23 #include
1924
2025 namespace llvm {
2126
7378
7479 /// getStartLoc - Get the location of the first token of this operand.
7580 SMLoc getStartLoc() const override { return StartLoc; }
81
7682 /// getEndLoc - Get the location of the last token of this operand.
7783 SMLoc getEndLoc() const override { return EndLoc; }
84
7885 /// getLocRange - Get the range between the first and last token of this
7986 /// operand.
8087 SMRange getLocRange() const { return SMRange(StartLoc, EndLoc); }
88
8189 /// getOffsetOfLoc - Get the location of the offset operator.
8290 SMLoc getOffsetOfLoc() const override { return OffsetOfLoc; }
8391
421429 RegNo = getGR32FromGR64(RegNo);
422430 Inst.addOperand(MCOperand::createReg(RegNo));
423431 }
432
424433 void addAVX512RCOperands(MCInst &Inst, unsigned N) const {
425434 assert(N == 1 && "Invalid number of operands!");
426435 addExpr(Inst, getImm());
427436 }
437
428438 void addImmOperands(MCInst &Inst, unsigned N) const {
429439 assert(N == 1 && "Invalid number of operands!");
430440 addExpr(Inst, getImm());
453463 Inst.addOperand(MCOperand::createReg(getMemBaseReg()));
454464 Inst.addOperand(MCOperand::createReg(getMemSegReg()));
455465 }
466
456467 void addDstIdxOperands(MCInst &Inst, unsigned N) const {
457468 assert((N == 1) && "Invalid number of operands!");
458469 Inst.addOperand(MCOperand::createReg(getMemBaseReg()));
543554 }
544555 };
545556
546 } // End of namespace llvm
547
548 #endif
557 } // end namespace llvm
558
559 #endif // LLVM_LIB_TARGET_X86_ASMPARSER_X86OPERAND_H
1111 //
1212 //===----------------------------------------------------------------------===//
1313
14 #include "MCTargetDesc/X86BaseInfo.h"
1415 #include "X86ATTInstPrinter.h"
15 #include "MCTargetDesc/X86BaseInfo.h"
16 #include "MCTargetDesc/X86MCTargetDesc.h"
1716 #include "X86InstComments.h"
18 #include "llvm/MC/MCAsmInfo.h"
1917 #include "llvm/MC/MCExpr.h"
2018 #include "llvm/MC/MCInst.h"
19 #include "llvm/MC/MCInstrDesc.h"
2120 #include "llvm/MC/MCInstrInfo.h"
22 #include "llvm/MC/MCRegisterInfo.h"
2321 #include "llvm/MC/MCSubtargetInfo.h"
22 #include "llvm/Support/Casting.h"
2423 #include "llvm/Support/ErrorHandling.h"
2524 #include "llvm/Support/Format.h"
26 #include "llvm/Support/FormattedStream.h"
25 #include "llvm/Support/raw_ostream.h"
26 #include
27 #include
28 #include
29
2730 using namespace llvm;
2831
2932 #define DEBUG_TYPE "asm-printer"
145148 case 3: O << "{rz-sae}"; break;
146149 }
147150 }
151
148152 /// printPCRelImm - This is used to print an immediate value that ends up
149153 /// being encoded as a pc-relative value (e.g. for jumps and calls). These
150154 /// print slightly differently than normal immediates. For example, a $ is not
None //==- X86ATTInstPrinter.h - Convert X86 MCInst to assembly syntax -*- C++ -*-=//
0 //=- X86ATTInstPrinter.h - Convert X86 MCInst to assembly syntax --*- C++ -*-=//
11 //
22 // The LLVM Compiler Infrastructure
33 //
136136 private:
137137 bool HasCustomInstComment;
138138 };
139 }
140139
141 #endif
140 } // end namespace llvm
141
142 #endif // LLVM_LIB_TARGET_X86_INSTPRINTER_X86ATTINSTPRINTER_H
1111 //
1212 //===----------------------------------------------------------------------===//
1313
14 #include "MCTargetDesc/X86BaseInfo.h"
15 #include "X86InstComments.h"
1416 #include "X86IntelInstPrinter.h"
15 #include "MCTargetDesc/X86BaseInfo.h"
16 #include "MCTargetDesc/X86MCTargetDesc.h"
17 #include "X86InstComments.h"
1817 #include "llvm/MC/MCExpr.h"
1918 #include "llvm/MC/MCInst.h"
19 #include "llvm/MC/MCInstrDesc.h"
2020 #include "llvm/MC/MCInstrInfo.h"
21 #include "llvm/Support/Casting.h"
2122 #include "llvm/Support/ErrorHandling.h"
22 #include "llvm/Support/FormattedStream.h"
23 #include ctype>
23 #include assert>
24 #include
25
2426 using namespace llvm;
2527
2628 #define DEBUG_TYPE "asm-printer"
156156 }
157157 };
158158
159 }
159 } // end namespace llvm
160160
161 #endif
161 #endif // LLVM_LIB_TARGET_X86_INSTPRINTER_X86INTELINSTPRINTER_H