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 | 1ef9826ff82ada414ddf869f4d93d6bd708f216a (patch) | |
| tree | 45a4992c840b32e90fbd7ba5704a0c1aa0b7c762 | |
| parent | 394b624215ae3f4841209b27df149023d81df618 (diff) | |
| download | bcm5719-llvm-1ef9826ff82ada414ddf869f4d93d6bd708f216a.tar.gz bcm5719-llvm-1ef9826ff82ada414ddf869f4d93d6bd708f216a.zip | |
"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!
llvm-svn: 100875
| -rw-r--r-- | llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp | 1 | ||||
| -rw-r--r-- | llvm/test/CodeGen/CellSPU/bss.ll | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp b/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp index 3e17a51b505..68445cf6bf9 100644 --- a/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp +++ b/llvm/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/llvm/test/CodeGen/CellSPU/bss.ll b/llvm/test/CodeGen/CellSPU/bss.ll index 05a0f500393..2a5f786baea 100644 --- a/llvm/test/CodeGen/CellSPU/bss.ll +++ b/llvm/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 |

