X86 asm -> gcc asm translation table (incomplete)
authorAndrew Lenharth <andrewl@lenharth.org>
Tue, 28 Nov 2006 19:52:49 +0000 (19:52 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Tue, 28 Nov 2006 19:52:49 +0000 (19:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31973 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86TargetAsmInfo.cpp

index 229473c89c1c961e85bf1cf6b87a7d39993fcb34..ed813db24547b93d467733229083e4766726f932 100644 (file)
 #include "X86TargetAsmInfo.h"
 #include "X86TargetMachine.h"
 #include "X86Subtarget.h"
+#include <iostream>
 
 using namespace llvm;
 
+static const char* x86_asm_table[] = {"{si}", "S",
+                                      "{di}", "D",
+                                      "{ax}", "a",
+                                      "{cx}", "c",
+                                      "q",    "q",
+                                      "r",    "r",
+                                      "m",    "m",
+                                      "{memory}", "memory",
+                                      "{flags}", "",
+                                      "{dirflag}", "",
+                                      "{fpsr}", "",
+                                      "{cc}", "cc",
+                                      0,0};
+
 X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
   const X86Subtarget *Subtarget = &TM.getSubtarget<X86Subtarget>();
   
   // FIXME - Should be simplified.
-   
+
+  AsmTransCBE = x86_asm_table;
+  
   switch (Subtarget->TargetType) {
   case X86Subtarget::isDarwin:
     AlignmentIsInBytes = false;