mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-21 09:25:07 +00:00
Although targets are not required to support integers > 64bits, TargetData
must in order for backends that do want to support large integer types to be able to function. Consequently, don't assert if the bitwidth > 64 bits when computing the size and alignment. Instead, compute the size by rounding up to the next even number of bytes for the size. Compute the alignment as the same as the LongABIAlignment. These provide reasonable defaults that the target can override. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33943 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
554cec6e65
commit
d2a988caad
@ -295,8 +295,10 @@ static inline void getTypeInfoABI(const Type *Ty, const TargetData *TD,
|
||||
Size = 4; Alignment = TD->getIntABIAlignment();
|
||||
} else if (BitWidth <= 64) {
|
||||
Size = 8; Alignment = TD->getLongABIAlignment();
|
||||
} else
|
||||
assert(0 && "Integer types > 64 bits not supported.");
|
||||
} else {
|
||||
Size = ((BitWidth + 7) / 8) & ~1;
|
||||
Alignment = TD->getLongABIAlignment();
|
||||
}
|
||||
return;
|
||||
}
|
||||
case Type::VoidTyID: Size = 1; Alignment = TD->getByteABIAlignment(); return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user