[llvm] r374564 - [AIX] Use .space instead of .zero in assembly
David Tenty via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 08:07:28 PDT 2019
Author: daltenty
Date: Fri Oct 11 08:07:28 2019
New Revision: 374564
URL: http://llvm.org/viewvc/llvm-project?rev=374564&view=rev
Log:
[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
Added:
llvm/trunk/test/CodeGen/PowerPC/aix-space.ll
Modified:
llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp?rev=374564&r1=374563&r2=374564&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp Fri Oct 11 08:07:28 2019
@@ -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";
}
Added: llvm/trunk/test/CodeGen/PowerPC/aix-space.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/aix-space.ll?rev=374564&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/aix-space.ll (added)
+++ llvm/trunk/test/CodeGen/PowerPC/aix-space.ll Fri Oct 11 08:07:28 2019
@@ -0,0 +1,17 @@
+; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s
+
+ at 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
More information about the llvm-commits
mailing list