[llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Nov 21 00:24:22 PST 2005
Changes in directory llvm/include/llvm/CodeGen:
AsmPrinter.h updated: 1.19 -> 1.20
---
Log message:
add two more config directives, add method for printing constant pool
---
Diffs of the changes: (+20 -1)
AsmPrinter.h | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.19 llvm/include/llvm/CodeGen/AsmPrinter.h:1.20
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.19 Mon Nov 21 02:12:47 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h Mon Nov 21 02:24:11 2005
@@ -85,6 +85,8 @@
const char *FunctionAddrPrefix; // Defaults to ""
const char *FunctionAddrSuffix; // Defaults to ""
+ //===--- Data Emission Directives -------------------------------------===//
+
/// ZeroDirective - this should be set to the directive used to get some
/// number of zero bytes emitted to the current section. Common cases are
/// "\t.zero\t" and "\t.space\t". If this is set to null, the
@@ -108,6 +110,8 @@
const char *Data32bitsDirective; // Defaults to "\t.long\t"
const char *Data64bitsDirective; // Defaults to "\t.quad\t"
+ //===--- Alignment Information ----------------------------------------===//
+
/// AlignDirective - The directive used to emit round up to an alignment
/// boundary.
///
@@ -118,6 +122,17 @@
/// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
/// boundary.
bool AlignmentIsInBytes; // Defaults to true
+
+ //===--- Section Switching Directives ---------------------------------===//
+
+ /// SwitchToSectionDirective - This is the directive used when we want to
+ /// emit a global to an arbitrary section. The section name is emited after
+ /// this.
+ const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
+
+ /// ConstantPoolSection - This is the section that we SwitchToSection right
+ /// before emitting the constant pool for a function.
+ const char *ConstantPoolSection; // Defaults to "\t.section .rodata\n"
AsmPrinter(std::ostream &o, TargetMachine &tm)
: FunctionNumber(0), O(o), TM(tm),
@@ -136,7 +151,9 @@
Data32bitsDirective("\t.long\t"),
Data64bitsDirective("\t.quad\t"),
AlignDirective("\t.align\t"),
- AlignmentIsInBytes(true) {
+ AlignmentIsInBytes(true),
+ SwitchToSectionDirective("\t.section\t"),
+ ConstantPoolSection("\t.section .rodata\n") {
}
/// SwitchSection - Switch to the specified section of the executable if we
@@ -170,6 +187,8 @@
/// SetupMachineFunction - This should be called when a new MachineFunction
/// is being processed from runOnMachineFunction.
void SetupMachineFunction(MachineFunction &MF);
+
+ void EmitConstantPool(MachineConstantPool *MCP);
/// EmitAlignment - Emit an alignment directive to the specified power of
/// two boundary. For example, if you pass in 3 here, you will get an 8
More information about the llvm-commits
mailing list