[PATCH] D74974: [XCOFF][AIX] Fix incorrect alignment for function descriptor csect
Jason Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 10:21:28 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbee70bfff0f4: [XCOFF][AIX] Fix incorrect alignment for function descriptor csect (authored by jasonliu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74974/new/
https://reviews.llvm.org/D74974
Files:
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll
llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll
Index: llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll
+++ llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll
@@ -318,7 +318,7 @@
; SYM-NEXT: SectionLen: 12
; SYM-NEXT: ParameterHashIndex: 0x0
; SYM-NEXT: TypeChkSectNum: 0x0
-; SYM-NEXT: SymbolAlignmentLog2: 0
+; SYM-NEXT: SymbolAlignmentLog2: 2
; SYM-NEXT: SymbolType: XTY_SD (0x1)
; SYM-NEXT: StorageMappingClass: XMC_DS (0xA)
; SYM-NEXT: StabInfoIndex: 0x0
Index: llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll
+++ llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll
@@ -63,7 +63,7 @@
; CHECK-NEXT: SectionLen: 12
; CHECK-NEXT: ParameterHashIndex: 0x0
; CHECK-NEXT: TypeChkSectNum: 0x0
-; CHECK-NEXT: SymbolAlignmentLog2: 0
+; CHECK-NEXT: SymbolAlignmentLog2: 2
; CHECK-NEXT: SymbolType: XTY_SD (0x1)
; CHECK-NEXT: StorageMappingClass: XMC_DS (0xA)
; CHECK-NEXT: StabInfoIndex: 0x0
Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -1547,9 +1547,10 @@
void PPCAIXAsmPrinter::SetupMachineFunction(MachineFunction &MF) {
// Get the function descriptor symbol.
CurrentFnDescSym = getSymbol(&MF.getFunction());
- // Set the containing csect.
+ // Set the alignment and the containing csect.
MCSectionXCOFF *FnDescSec = cast<MCSectionXCOFF>(
getObjFileLowering().getSectionForFunctionDescriptor(CurrentFnDescSym));
+ FnDescSec->setAlignment(Align(Subtarget->isPPC64() ? 8 : 4));
cast<MCSymbolXCOFF>(CurrentFnDescSym)->setContainingCsect(FnDescSec);
return AsmPrinter::SetupMachineFunction(MF);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74974.246249.patch
Type: text/x-patch
Size: 1960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200224/c147d135/attachment.bin>
More information about the llvm-commits
mailing list