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

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 10:17:27 PDT 2019


sfertile added inline comments.


================
Comment at: llvm/include/llvm/MC/MCExpr.h:238
     VK_PPC_TOC_HA,         // symbol at toc@ha
+    VK_PPC_TOC_TC0,        // symbol at tc0
     VK_PPC_DTPMOD,         // symbol at dtpmod
----------------
hubert.reinterpretcast wrote:
> Xiangling_L wrote:
> > hubert.reinterpretcast wrote:
> > > The comment is meant to express what the variant looks like when printed (thus, `@` does not match). In any case, I have doubts that this is the correct way to represent `[TC0]`. We can look at `TOC[TC0]` as referring less to the symbol, but more referring to the csect. In any case, the `TC0` is the storage mapping class, which we have been using uppercase for.
> > Thanks, I will update the comment. But I verified on AIX with Clangtana and GCC, it's TOC[tc0] as TOC base address in function descriptor.
> XL generates `TOC{TC0}`, not `TOC[tc0]`.
According to the assembly language ref:
```
A qualname operand takes the form of:
symbol[XX]
OR
symbol{XX}
```
So both bracketing formats are acceptable, I believe we have been using '[XX]' so far in llvm.

The assembly language ref also uses both uppercase and lowercase spellings for the storage mapping class, but I believe we have used uppercase exclusively so far in llvm.


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