[PATCH] D93377: [Clang] Add __ibm128 type to represent ppc_fp128
Qiu Chaofan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 27 02:01:48 PDT 2021
qiucf added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:5159
BT->getKind() == BuiltinType::LongDouble ||
+ BT->getKind() == BuiltinType::Ibm128 ||
(getContext().getTargetInfo().hasFloat128Type() &&
----------------
rjmccall wrote:
> qiucf wrote:
> > rjmccall wrote:
> > > I hesitate to ask this, but does `__ibm128` form homogeneous aggregates with `double`s?
> > > Homogeneous floating-point aggregates can have up to four IBM EXTENDED PRECISION members, four IEEE BINARY 128 QUADRUPLE PRECISION members, four _Decimal128 members, or eight members of other floating-point types. (Unions are treated as their largest member. For homogeneous unions, different union alternatives may have different sizes, provided that all union members are homogeneous with respect to each other.) They are passed in floating-point registers if parameters of that type would be passed in floating-point registers. They are passed in vector registers if parameters of that type would be passed in vector registers. They are passed as if each member was specified as a separate parameter.
> >
> > Yes.
> No, I mean, would an `__ibm128` in a struct with a pair of `double`s be treated as if it were 4 `double`s, or is it considered non-homogeneous the same way that a struct with e.g. 4 `float`s and 2 `double`s would be non-homogeneous?
Ah, I think not. `__ibm128` (PowerPC `long double` also produces `ppc_fp128`) is distinct type in determining homogeneous aggregates.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93377/new/
https://reviews.llvm.org/D93377
More information about the cfe-commits
mailing list