diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-09 18:27:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-09 18:27:03 +0000 |
commit | dc8446330f54aefff0f35784cd3346ec78d7d335 (patch) | |
tree | b7affd025d5f2cbb214747d83b4070acd3832c34 | |
parent | 53b73a283e0a0339f7a273775ee21ebcc220b089 (diff) | |
download | external_llvm-dc8446330f54aefff0f35784cd3346ec78d7d335.zip external_llvm-dc8446330f54aefff0f35784cd3346ec78d7d335.tar.gz external_llvm-dc8446330f54aefff0f35784cd3346ec78d7d335.tar.bz2 |
"On SPU, variables in the .bss section that are allocated with the .lcomm directive are not aligned on 16 byte boundaries. This causes misaligned loads, as the generated assembly assumes this "default" alignment.
this patch disables .lcomm in favour of '.local .comm'
Patch by Kalle Raisklia!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100875 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/CellSPU/SPUMCAsmInfo.cpp | 1 | ||||
-rw-r--r-- | test/CodeGen/CellSPU/bss.ll | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/CellSPU/SPUMCAsmInfo.cpp b/lib/Target/CellSPU/SPUMCAsmInfo.cpp index 3e17a51..68445cf 100644 --- a/lib/Target/CellSPU/SPUMCAsmInfo.cpp +++ b/lib/Target/CellSPU/SPUMCAsmInfo.cpp @@ -18,7 +18,6 @@ SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, const StringRef &TT) { ZeroDirective = "\t.space\t"; Data64bitsDirective = "\t.quad\t"; AlignmentIsInBytes = false; - HasLCOMMDirective = true; PCSymbol = "."; CommentString = "#"; diff --git a/test/CodeGen/CellSPU/bss.ll b/test/CodeGen/CellSPU/bss.ll index 05a0f50..2a5f786 100644 --- a/test/CodeGen/CellSPU/bss.ll +++ b/test/CodeGen/CellSPU/bss.ll @@ -1,5 +1,7 @@ ; RUN: llc < %s -march=cellspu > %t1.s ; RUN: grep "\.section" %t1.s | grep "\.bss" | count 1 +; CHECK-NOT: .lcomm @bssVar = global i32 zeroinitializer +@localVar= internal global i32 zeroinitializer |