[llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h

Chris Lattner sabre at nondot.org
Fri Oct 13 10:50:23 PDT 2006



Changes in directory llvm/include/llvm/Target:

TargetAsmInfo.h updated: 1.8 -> 1.9
---
Log message:

Expose method and ivars for measuring inline asm length properly.


---
Diffs of the changes:  (+13 -2)

 TargetAsmInfo.h |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Target/TargetAsmInfo.h
diff -u llvm/include/llvm/Target/TargetAsmInfo.h:1.8 llvm/include/llvm/Target/TargetAsmInfo.h:1.9
--- llvm/include/llvm/Target/TargetAsmInfo.h:1.8	Wed Oct  4 22:14:23 2006
+++ llvm/include/llvm/Target/TargetAsmInfo.h	Fri Oct 13 12:50:07 2006
@@ -27,7 +27,6 @@
   /// TargetAsmInfo - This class is intended to be used as a base class for asm
   /// properties and features specific to the target.
   class TargetAsmInfo {
-  
   protected:
     //===------------------------------------------------------------------===//
     // Properties to be set by the target writer, used to configure asm printer.
@@ -48,6 +47,15 @@
     /// NeedsSet - True if target asm can't compute addresses on data
     /// directives.
     bool NeedsSet;                        // Defaults to false.
+    
+    /// MaxInstLength - This is the maximum possible length of an instruction,
+    /// which is needed to compute the size of an inline asm.
+    unsigned MaxInstLength;               // Defaults to 4.
+    
+    /// SeparatorChar - This character, if specified, is used to separate
+    /// instructions from each other when on the same line.  This is used to
+    /// measure inline asm instructions.
+    char SeparatorChar;                   // Defaults to ';'
 
     /// CommentString - This indicates the comment character used by the
     /// assembler.
@@ -261,6 +269,10 @@
     TargetAsmInfo();
     virtual ~TargetAsmInfo();
 
+    /// Measure the specified inline asm to determine an approximation of its
+    /// length.
+    unsigned getInlineAsmLength(const char *Str) const;
+    
     //
     // Accessors.
     //
@@ -430,7 +442,6 @@
       return DwarfMacInfoSection;
     }
   };
-  
 }
 
 #endif






More information about the llvm-commits mailing list