diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-01-30 22:40:15 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-01-30 22:40:15 +0000 |
commit | cdf920ed6c610e21fc899ada93370a68c900d180 (patch) | |
tree | 6f6e9a64f085c223c37412c4599872fbbaa0527c /lib/CodeGen/CGCall.cpp | |
parent | b574e5630d66629ccc8f2432e60b59ae42f1f363 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index ba27200f2c..666d427a25 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -416,9 +416,9 @@ class X86_64ABIInfo : public ABIInfo { /// /// \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 @@ void X86_64ABIInfo::classify(QualType Ty, // 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 @@ void X86_64ABIInfo::classify(QualType Ty, // 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)) { |