[cfe-commits] r63438 - /cfe/trunk/lib/CodeGen/CGCall.cpp
Daniel Dunbar
daniel at zuster.org
Fri Jan 30 14:40:15 PST 2009
Author: ddunbar
Date: Fri Jan 30 16:40:15 2009
New Revision: 63438
URL: http://llvm.org/viewvc/llvm-project?rev=63438&view=rev
Log:
x86_64 ABI: Fix more thinkos, straddling computation for complex was
computing in bytes not bits. We are now down to 22/1000 failures on
the return types tests, and 18 of those are gcc bugs I believe.
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=63438&r1=63437&r2=63438&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Fri Jan 30 16:40:15 2009
@@ -416,9 +416,9 @@
///
/// \param Lo - The classification for the low word of the type.
/// \param Hi - The classification for the high word of the type.
- /// \param OffsetBase - The byte position of the type in the root
- /// structure. Some parameters are classified different depending on
- /// whether they straddle an eightbyte boundary.
+ /// \param OffsetBase - The bit offset of the field in the
+ /// containing object. Some parameters are classified different
+ /// depending on whether they straddle an eightbyte boundary.
///
/// If a word is unused its result will be NoClass; if a type should
/// be passed in Memory then at least the classification of \arg Lo
@@ -531,7 +531,7 @@
// If this type crosses an eightbyte boundary, it should be
// split.
- if (OffsetBase && OffsetBase != 8)
+ if (OffsetBase && OffsetBase != 64)
Hi = Lo;
} else if (Size == 128) {
Lo = SSE;
@@ -555,8 +555,8 @@
// If this complex type crosses an eightbyte boundary then it
// should be split.
- uint64_t EB_Real = (OffsetBase) >> 3;
- uint64_t EB_Imag = (OffsetBase + Size) >> 3;
+ uint64_t EB_Real = (OffsetBase) / 64;
+ uint64_t EB_Imag = (OffsetBase + Context.getTypeSize(ET)) / 64;
if (Hi == NoClass && EB_Real != EB_Imag)
Hi = Lo;
} else if (const ConstantArrayType *AT = Context.getAsConstantArrayType(Ty)) {
More information about the cfe-commits
mailing list