summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-19 19:46:13 +0000
committerChris Lattner <sabre@nondot.org>2010-01-19 19:46:13 +0000
commitc35681b2986163ce5a4d8952c9efb6a2a24e8da5 (patch)
treecb1cc294d092a9743f759fb02fd6b9b56a3cc73b /llvm/lib/CodeGen
parentbf43525a2933c3ddb60f00a89e22c52c06bc77d6 (diff)
downloadbcm5719-llvm-c35681b2986163ce5a4d8952c9efb6a2a24e8da5.tar.gz
bcm5719-llvm-c35681b2986163ce5a4d8952c9efb6a2a24e8da5.zip
Generalize mcasmstreamer data emission APIs to take an address space
identifier. There is no way to work around it. llvm-svn: 93896
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 54a93095ed2..03672411f4e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -436,7 +436,7 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) {
// Emit inter-object padding for alignment.
unsigned AlignMask = CPE.getAlignment() - 1;
unsigned NewOffset = (Offset + AlignMask) & ~AlignMask;
- OutStreamer.EmitFill(NewOffset - Offset);
+ OutStreamer.EmitFill(NewOffset - Offset, 0/*fillval*/, 0/*addrspace*/);
const Type *Ty = CPE.getType();
Offset = NewOffset + TM.getTargetData()->getTypeAllocSize(Ty);
@@ -913,18 +913,6 @@ void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV,
OutStreamer.EmitValueToAlignment(1 << NumBits, FillValue, 1, 0);
}
-/// EmitZeros - Emit a block of zeros.
-///
-void AsmPrinter::EmitZeros(uint64_t NumZeros, unsigned AddrSpace) const {
- if (NumZeros == 0) return;
- if (MAI->getZeroDirective() || AddrSpace == 0) {
- OutStreamer.EmitFill(NumZeros);
- } else {
- for (; NumZeros; --NumZeros)
- O << MAI->getData8bitsDirective(AddrSpace) << "0\n";
- }
-}
-
// Print out the specified constant, without a storage class. Only the
// constants valid in constant expressions can occur here.
void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
@@ -1070,6 +1058,12 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
}
}
+/// EmitZeros - Emit a block of zeros.
+///
+void AsmPrinter::EmitZeros(uint64_t NumZeros, unsigned AddrSpace) const {
+ OutStreamer.EmitFill(NumZeros, 0, AddrSpace);
+}
+
/// printAsCString - Print the specified array as a C compatible string, only if
/// the predicate isString is true.
///
OpenPOWER on IntegriCloud