[PATCH] D84765: [AIX][XCOFF] change oprand of branch instruction from symbol name to qualify symbol name.

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 11:02:35 PDT 2020


jasonliu added inline comments.


================
Comment at: llvm/include/llvm/MC/MCSectionXCOFF.h:50
     QualName->setRepresentedCsect(this);
+    QualName->setStorageClass(XCOFF::C_HIDEXT);
     // A csect is 4 byte aligned by default, except for undefined symbol csects.
----------------
Xiangling_L wrote:
> jasonliu wrote:
> > Xiangling_L wrote:
> > > I am wondering why do we want to set a default SC here? It seems redundant.
> > We transfer SC property from MCSectionXCOFF to MCSymbolXCOFF. MCSectionXCOFF represents a csect. A csect by default have XCOFF::C_HIDEXT Storage class. Without this, we would not be able to get storage class from a MCSectionXCOFF when that csect do not need to `emitLinkage`.
> Did you mean `emitSymbolAttribute`? I guess this matters more on object file generation path? Since on assembly path, `The .lglobl pseudo-op does not have to apply to any csect name. The assembler automatically generates the symbol table entry for any csect name with a class of C_HIDEXT unless there is an
> explicit .globl pseudo-op applied to the csect name.`
`emitLinkage` would call `emitSymbolAttribute` on the object generation path. And yes, this matters more on object generation path. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84765



More information about the llvm-commits mailing list