fix bss section printing for cell, patch by Kalle Raiskila!
authorChris Lattner <sabre@nondot.org>
Fri, 5 Mar 2010 18:55:36 +0000 (18:55 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 5 Mar 2010 18:55:36 +0000 (18:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97814 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CellSPU/SPUMCAsmInfo.cpp
test/CodeGen/CellSPU/bss.ll [new file with mode: 0644]

index 5ef3c6b24de746d0edf97c6b27364f0de902dc8e..3e17a51b505f5781209404c2c364bc1abf8f65ac 100644 (file)
@@ -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/test/CodeGen/CellSPU/bss.ll b/test/CodeGen/CellSPU/bss.ll
new file mode 100644 (file)
index 0000000..05a0f50
--- /dev/null
@@ -0,0 +1,5 @@
+; RUN: llc < %s -march=cellspu > %t1.s
+; RUN: grep "\.section" %t1.s | grep "\.bss" | count 1
+
+@bssVar = global i32 zeroinitializer
+