aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-19 23:59:57 +0000
committerChris Lattner <sabre@nondot.org>2009-06-19 23:59:57 +0000
commite67184ec4dc0da60159f2a02481ec41d567ca79f (patch)
tree4c9421c0a78c150d4979e818abeb395e78b2e5d5 /lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
parentbfc9b7e0f7eb5d3bc3b9f069270b23750452ad37 (diff)
downloadexternal_llvm-e67184ec4dc0da60159f2a02481ec41d567ca79f.zip
external_llvm-e67184ec4dc0da60159f2a02481ec41d567ca79f.tar.gz
external_llvm-e67184ec4dc0da60159f2a02481ec41d567ca79f.tar.bz2
stub out some hacky code for wiring up the new asmprinter interfaces
on X86. Not useful yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp')
-rw-r--r--lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp44
1 files changed, 41 insertions, 3 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
index 3b78d7d..934e45a 100644
--- a/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
@@ -15,8 +15,46 @@
#define DEBUG_TYPE "asm-printer"
#include "llvm/MC/MCInst.h"
#include "X86ATTAsmPrinter.h"
+#include "llvm/Support/raw_ostream.h"
using namespace llvm;
-bool X86ATTAsmPrinter::printInstruction(const MCInst &TmpInst) {
- return true;
-} \ No newline at end of file
+// Include the auto-generated portion of the assembly writer.
+#define MachineInstr MCInst
+#define NO_ASM_WRITER_BOILERPLATE
+#include "X86GenAsmWriter.inc"
+#undef MachineInstr
+
+void X86ATTAsmPrinter::printSSECC(const MCInst *MI, unsigned Op) {
+ unsigned char value = MI->getOperand(Op).getImm();
+ assert(value <= 7 && "Invalid ssecc argument!");
+ switch (value) {
+ case 0: O << "eq"; break;
+ case 1: O << "lt"; break;
+ case 2: O << "le"; break;
+ case 3: O << "unord"; break;
+ case 4: O << "neq"; break;
+ case 5: O << "nlt"; break;
+ case 6: O << "nle"; break;
+ case 7: O << "ord"; break;
+ }
+}
+
+
+void X86ATTAsmPrinter::printPICLabel(const MCInst *MI, unsigned Op) {
+ assert(0 &&
+ "This is only used for MOVPC32r, should lower before asm printing!");
+}
+
+
+void X86ATTAsmPrinter::printOperand(const MCInst *MI, unsigned OpNo,
+ const char *Modifier, bool NotRIPRel) {
+}
+
+void X86ATTAsmPrinter::printLeaMemReference(const MCInst *MI, unsigned Op,
+ const char *Modifier,
+ bool NotRIPRel) {
+}
+
+void X86ATTAsmPrinter::printMemReference(const MCInst *MI, unsigned Op,
+ const char *Modifier, bool NotRIPRel){
+}