[PATCH] D93377: [Clang] Add __ibm128 type to represent ppc_fp128
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 26 19:24:14 PDT 2021
rjmccall added inline comments.
================
Comment at: clang/include/clang/Basic/TargetInfo.h:131
+ Float128,
+ Ibm128
};
----------------
qiucf wrote:
> rjmccall wrote:
> > This is necessary because it's possible to derive this type from a mode attribute?
> Yes, `__attribute__((mode(IF)))`
Okay. I guess I agree that it makes sense to do that in a follow-up patch since it requires threading some extra state around.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:5159
BT->getKind() == BuiltinType::LongDouble ||
+ BT->getKind() == BuiltinType::Ibm128 ||
(getContext().getTargetInfo().hasFloat128Type() &&
----------------
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?
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