From ac834e7a5f1d49617d8a9ef33b78f7dd4f666da7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 5 Mar 2010 18:55:36 +0000 Subject: [PATCH] fix bss section printing for cell, patch by Kalle Raiskila! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97814 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CellSPU/SPUMCAsmInfo.cpp | 3 +++ test/CodeGen/CellSPU/bss.ll | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 test/CodeGen/CellSPU/bss.ll diff --git a/lib/Target/CellSPU/SPUMCAsmInfo.cpp b/lib/Target/CellSPU/SPUMCAsmInfo.cpp index 5ef3c6b24de..3e17a51b505 100644 --- a/lib/Target/CellSPU/SPUMCAsmInfo.cpp +++ b/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/test/CodeGen/CellSPU/bss.ll b/test/CodeGen/CellSPU/bss.ll new file mode 100644 index 00000000000..05a0f500393 --- /dev/null +++ b/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 + -- 2.34.1