[PATCH] D66724: [AIX]Emit function descriptor csect in assembly

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 17:21:16 PDT 2019


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1739
+  OutStreamer->EmitLabel(CurrentFnDescSym);
+  // Emit TOC base address.
+  OutStreamer->EmitValue(MCSymbolRefExpr::create(CurrentFnSym, OutContext),
----------------
This comment is in the wrong place. The comment for this line should be "[e]mit entry point address".


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1742
+                         PointerSize);
+  MCSymbol *TOCBaseSym = OutContext.getOrCreateSymbol(StringRef("TOC"));
+  OutStreamer->EmitValue(
----------------
I do not believe that the TOC base is a variant of unrelated symbols coincidentally named "TOC".


================
Comment at: llvm/test/CodeGen/PowerPC/test_func_desc.ll:2
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | \
+; RUN: FileCheck --check-prefix=32BIT %s
+
----------------
`--check-prefixes=CHECK,32BIT`


================
Comment at: llvm/test/CodeGen/PowerPC/test_func_desc.ll:5
+; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | \
+; RUN: FileCheck --check-prefix=64BIT %s
+
----------------
Ditto.


================
Comment at: llvm/test/CodeGen/PowerPC/test_func_desc.ll:60
+; CHECK: .lglobl .static_foo
+; CHECK: .csect static_foo[DS]
+; CHECK-NEXT: static_foo:
----------------
This is technically not needed for this case, and XL does not generate this unnecessary function descriptor.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66724/new/

https://reviews.llvm.org/D66724





More information about the llvm-commits mailing list