summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDavid Tenty <daltenty@ibm.com>2019-10-11 15:07:28 +0000
committerDavid Tenty <daltenty@ibm.com>2019-10-11 15:07:28 +0000
commit033d16cedc08163d9ab3dcb15b30b9642e6b5282 (patch)
tree60a93a00e48d59b6063ca0d2a16484e36d87f00d /llvm
parentf759395994212fbefbd540cd4565c6b4fa304ecd (diff)
downloadbcm5719-llvm-033d16cedc08163d9ab3dcb15b30b9642e6b5282.tar.gz
bcm5719-llvm-033d16cedc08163d9ab3dcb15b30b9642e6b5282.zip
[AIX] Use .space instead of .zero in assembly
Summary: The AIX system assembler does not understand .zero, so we should prefer emitting .space. Subscribers: nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68815 llvm-svn: 374564
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp1
-rw-r--r--llvm/test/CodeGen/PowerPC/aix-space.ll17
2 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
index 5f0005ea1d7..1216cd72728 100644
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
@@ -86,4 +86,5 @@ void PPCXCOFFMCAsmInfo::anchor() {}
PPCXCOFFMCAsmInfo::PPCXCOFFMCAsmInfo(bool Is64Bit, const Triple &T) {
assert(!IsLittleEndian && "Little-endian XCOFF not supported.");
CodePointerSize = CalleeSaveStackSlotSize = Is64Bit ? 8 : 4;
+ ZeroDirective = "\t.space\t";
}
diff --git a/llvm/test/CodeGen/PowerPC/aix-space.ll b/llvm/test/CodeGen/PowerPC/aix-space.ll
new file mode 100644
index 00000000000..d681d636e66
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/aix-space.ll
@@ -0,0 +1,17 @@
+; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s
+
+@a = common global double 0.000000e+00, align 8
+
+; Get some constants into the constant pool that need spacing for alignment
+define void @e() {
+entry:
+ %0 = load double, double* @a, align 8
+ %mul = fmul double 1.500000e+00, %0
+ store double %mul, double* @a, align 8
+ %mul1 = fmul double 0x3F9C71C71C71C71C, %0
+ store double %mul1, double* @a, align 8
+ ret void
+}
+
+; CHECK: .space 4
+; CHECK-NOT: .zero
OpenPOWER on IntegriCloud