-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
Bugzilla Link | 3568 |
Resolution | WONTFIX |
Resolved on | Aug 08, 2010 01:46 |
Version | unspecified |
OS | Linux |
Extended Description
I added support for arbitrary-width integer types in r64434. The one known bug in the implementation is that Sema doesn't calculate the size/alignment consistently with LLVM. (And for 128-bit integers, it calculates the alignment to be 128 bits, which as far as I know is not consistent with gcc's TImode.)
LLVM logic for determining the size/alignment:
If there is at least one known integer type whose bitwidth is equal to or larger than the bitwidth of the given integer type, the alignment is that of the smallest such type. Otherwise, the alignment is the alignment of the largest known integer type. The size is then the bitwidth plus whatever padding is necessary to satisfy the alignment.
What makes this non-trivial is that TargetInfo doesn't expose a list of integer types outside of the target description string, and it's definitely too much work to parse the target description.