[PATCH] D11437: Correct x86_64 fp128 calling convention
Reid Kleckner
rnk at google.com
Thu Jul 23 13:56:39 PDT 2015
rnk added inline comments.
================
Comment at: lib/CodeGen/TargetInfo.cpp:1861-1866
@@ -1860,8 +1860,8 @@
Current = Integer;
} else if ((k == BuiltinType::Float || k == BuiltinType::Double) ||
(k == BuiltinType::LongDouble &&
getTarget().getTriple().isOSNaCl())) {
Current = SSE;
} else if (k == BuiltinType::LongDouble) {
Lo = X87;
Hi = X87Up;
----------------
Any reason we can't do the same fp classification here like we do below for complex types?
================
Comment at: lib/CodeGen/TargetInfo.cpp:1975-1976
@@ -1974,4 +1975,1 @@
- else if (ET == getContext().DoubleTy ||
- (ET == getContext().LongDoubleTy &&
- getTarget().getTriple().isOSNaCl()))
Lo = Hi = SSE;
----------------
Nice, I like this simplification.
================
Comment at: lib/CodeGen/TargetInfo.cpp:2528
@@ -2520,1 +2527,3 @@
classifyReturnType(QualType RetTy) const {
+ // TODO: Simplify classify to handle f128 according to AMD64 ABI.
+ if (const BuiltinType *BT = RetTy->getAs<BuiltinType>()) {
----------------
Why can't we classify IEEEQuad long doubles as SSE in the usual `classify()` implementation?
================
Comment at: lib/CodeGen/TargetInfo.cpp:2667
@@ -2652,1 +2666,3 @@
{
+ // TODO: Simplify classifyArgumentType to handle f128 according to AMD64 ABI.
+ if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) {
----------------
ditto
http://reviews.llvm.org/D11437
More information about the cfe-commits
mailing list