llvm.org GIT mirror llvm / a01098c
Remove some unused code in the X86AsmPrinter. Add LLVM_OVERRIDE and virtual keywords to the remaining interface methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165478 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 8 years ago
2 changed file(s) with 14 addition(s) and 63 deletion(s). Raw diff Collapse all Expand all
266266 }
267267 }
268268
269 void X86AsmPrinter::printSSECC(const MachineInstr *MI, unsigned Op,
270 raw_ostream &O) {
271 unsigned char value = MI->getOperand(Op).getImm();
272 switch (value) {
273 default: llvm_unreachable("Invalid ssecc argument!");
274 case 0: O << "eq"; break;
275 case 1: O << "lt"; break;
276 case 2: O << "le"; break;
277 case 3: O << "unord"; break;
278 case 4: O << "neq"; break;
279 case 5: O << "nlt"; break;
280 case 6: O << "nle"; break;
281 case 7: O << "ord"; break;
282 case 8: O << "eq_uq"; break;
283 case 9: O << "nge"; break;
284 case 0xa: O << "ngt"; break;
285 case 0xb: O << "false"; break;
286 case 0xc: O << "neq_oq"; break;
287 case 0xd: O << "ge"; break;
288 case 0xe: O << "gt"; break;
289 case 0xf: O << "true"; break;
290 case 0x10: O << "eq_os"; break;
291 case 0x11: O << "lt_oq"; break;
292 case 0x12: O << "le_oq"; break;
293 case 0x13: O << "unord_s"; break;
294 case 0x14: O << "neq_us"; break;
295 case 0x15: O << "nlt_uq"; break;
296 case 0x16: O << "nle_uq"; break;
297 case 0x17: O << "ord_s"; break;
298 case 0x18: O << "eq_us"; break;
299 case 0x19: O << "nge_uq"; break;
300 case 0x1a: O << "ngt_uq"; break;
301 case 0x1b: O << "false_os"; break;
302 case 0x1c: O << "neq_os"; break;
303 case 0x1d: O << "ge_oq"; break;
304 case 0x1e: O << "gt_oq"; break;
305 case 0x1f: O << "true_us"; break;
306 }
307 }
308
309269 void X86AsmPrinter::printLeaMemReference(const MachineInstr *MI, unsigned Op,
310270 raw_ostream &O, const char *Modifier) {
311271 const MachineOperand &BaseReg = MI->getOperand(Op);
409369 O << DispVal;
410370 }
411371 O << ']';
412 }
413
414 void X86AsmPrinter::printPICLabel(const MachineInstr *MI, unsigned Op,
415 raw_ostream &O) {
416 O << *MF->getPICBaseSymbol() << '\n';
417 O << *MF->getPICBaseSymbol() << ':';
418372 }
419373
420374 bool X86AsmPrinter::printAsmMRegister(const MachineOperand &MO, char Mode,
3333 Subtarget = &TM.getSubtarget();
3434 }
3535
36 virtual const char *getPassName() const {
36 virtual const char *getPassName() const LLVM_OVERRIDE {
3737 return "X86 AT&T-Style Assembly Printer";
3838 }
3939
4040 const X86Subtarget &getSubtarget() const { return *Subtarget; }
4141
42 virtual void EmitStartOfAsmFile(Module &M);
42 virtual void EmitStartOfAsmFile(Module &M) LLVM_OVERRIDE;
4343
44 virtual void EmitEndOfAsmFile(Module &M);
44 virtual void EmitEndOfAsmFile(Module &M) LLVM_OVERRIDE;
4545
46 virtual void EmitInstruction(const MachineInstr *MI);
46 virtual void EmitInstruction(const MachineInstr *MI) LLVM_OVERRIDE;
4747
4848 void printSymbolOperand(const MachineOperand &MO, raw_ostream &O);
4949
5353 void printPCRelImm(const MachineInstr *MI, unsigned OpNo, raw_ostream &O);
5454
5555 bool printAsmMRegister(const MachineOperand &MO, char Mode, raw_ostream &O);
56 bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
57 unsigned AsmVariant, const char *ExtraCode,
58 raw_ostream &OS);
59 bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
60 unsigned AsmVariant, const char *ExtraCode,
61 raw_ostream &OS);
56 virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
57 unsigned AsmVariant, const char *ExtraCode,
58 raw_ostream &OS) LLVM_OVERRIDE;
59 virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
60 unsigned AsmVariant, const char *ExtraCode,
61 raw_ostream &OS) LLVM_OVERRIDE;
6262
63 void printMachineInstruction(const MachineInstr *MI);
64 void printSSECC(const MachineInstr *MI, unsigned Op, raw_ostream &O);
6563 void printMemReference(const MachineInstr *MI, unsigned Op, raw_ostream &O,
6664 const char *Modifier=NULL);
6765 void printLeaMemReference(const MachineInstr *MI, unsigned Op, raw_ostream &O,
6866 const char *Modifier=NULL);
6967
70 void printPICLabel(const MachineInstr *MI, unsigned Op, raw_ostream &O);
71
7268 void printIntelMemReference(const MachineInstr *MI, unsigned Op,
7369 raw_ostream &O, const char *Modifier=NULL,
74 unsigned AsmVariant = 1);
70 unsigned AsmVariant = 1);
7571
76 bool runOnMachineFunction(MachineFunction &F);
72 virtual bool runOnMachineFunction(MachineFunction &F) LLVM_OVERRIDE;
7773
7874 void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS);
7975
80 MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
76 virtual MachineLocation
77 getDebugValueLocation(const MachineInstr *MI) const LLVM_OVERRIDE;
8178 };
8279
8380 } // end namespace llvm