summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-05 18:55:36 +0000
committerChris Lattner <sabre@nondot.org>2010-03-05 18:55:36 +0000
commitf0692603d58ec500cea1d80ef37e29898ebe18c4 (patch)
tree3bf46da8c58ae51e513a4e5be32f439e255fc8e6
parentf6befffbb26fe789173cf4b981498a63be65d8d9 (diff)
downloadbcm5719-llvm-f0692603d58ec500cea1d80ef37e29898ebe18c4.tar.gz
bcm5719-llvm-f0692603d58ec500cea1d80ef37e29898ebe18c4.zip
fix bss section printing for cell, patch by Kalle Raiskila!
llvm-svn: 97814
-rw-r--r--llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp3
-rw-r--r--llvm/test/CodeGen/CellSPU/bss.ll5
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp b/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp
index 5ef3c6b24de..3e17a51b505 100644
--- a/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp
+++ b/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp
@@ -34,5 +34,8 @@ SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, const StringRef &TT) {
// Exception handling is not supported on CellSPU (think about it: you only
// have 256K for code+data. Would you support exception handling?)
ExceptionsType = ExceptionHandling::None;
+
+ // SPU assembly requires ".section" before ".bss"
+ UsesELFSectionDirectiveForBSS = true;
}
diff --git a/llvm/test/CodeGen/CellSPU/bss.ll b/llvm/test/CodeGen/CellSPU/bss.ll
new file mode 100644
index 00000000000..05a0f500393
--- /dev/null
+++ b/llvm/test/CodeGen/CellSPU/bss.ll
@@ -0,0 +1,5 @@
+; RUN: llc < %s -march=cellspu > %t1.s
+; RUN: grep "\.section" %t1.s | grep "\.bss" | count 1
+
+@bssVar = global i32 zeroinitializer
+
OpenPOWER on IntegriCloud