[PATCH] D95966: [AIX][support] Implement getHostCPUName

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 08:53:55 PST 2021


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/Support/Host.cpp:1227-1232
+  case POWER_4:
+    return "pwr4";
+  case POWER_5:
+    return "pwr5";
+  case POWER_6:
+    return "pwr6";
----------------
daltenty wrote:
> daltenty wrote:
> > hubert.reinterpretcast wrote:
> > > I'm not entirely sure that "something is better than nothing" is necessarily true here for these. All three have variant implementations/modes (e.g., ppc970, pwr5x, pwr6e) that we aren't handling here.
> > For pwr5x and pwr6e (IIUC don't think we can actually encounter ppc970), looking at the interfaces it seems that AIX won't distinguish the implementation mode, so I'm not sure if we can easily refine this in those case. Presumably this will still be better than returning 'generic' in those cases though though.
> (Or rather ppc970 would presumable appear as POWER 4)
What I was able to find internally seems to be that the `_system_configuration.version` field is `PV_4_3` for ppc970, `PV_5` exactly for pwr5 (and otherwise indicates pwr5x), and `PV_6_Compat` exactly for pwr6 (i.e., architected mode; and, if not exactly that value, indicates pwr6e).

Note that this does make sense with the historical background that POWER 6 went out with new instructions that were not going to be enshrined into the ISA going forward.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95966



More information about the llvm-commits mailing list