[PATCH] D64825: Enable assembly output of local commons for AIX

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 12:09:04 PDT 2019


sfertile added inline comments.
Herald added a subscriber: wuzish.


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1829
   // into the .bss section.
-  if (Kind.isCommon()) {
+  if (Kind.isBSS() || Kind.isCommon()) {
+
----------------
Knowing how the AIX linker treats csects with symbol type `XTY_CM`, should this be limited to `Kind.isLocalBSS() || Kind.isCommon()`?


================
Comment at: llvm/lib/MC/MCSectionXCOFF.cpp:31
 
-  if (getKind().isCommon()) {
-    if (getMappingClass() != XCOFF::XMC_RW)
-      llvm_unreachable("Unsupported storage-mapping class for common csect");
+  if (getKind().isBSS() || getKind().isCommon()) {
+    if (getMappingClass() != XCOFF::XMC_RW &&
----------------
ditto.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1662
   SectionKind GVKind = getObjFileLowering().getKindForGlobal(GV, TM);
-  if (!GVKind.isCommon())
+  if (!GVKind.isCommon() && !GVKind.isBSS())
     report_fatal_error("Only common variables are supported on AIX.");
----------------
I think this also should be limited to `isLocalBSS()`, we can relax to allowing all BSS in a follow on patch that adds appropriate testing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64825





More information about the llvm-commits mailing list