mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-22 15:53:14 +01:00
Make the alignment computations of the frontend match the llvm default alignment.
Breaks run/double_03 because it assumes double.alignof >= 8, which does not seem to be the case for llvm.
This commit is contained in:
12
dmd/mtype.c
12
dmd/mtype.c
@@ -1002,10 +1002,20 @@ unsigned TypeBasic::alignsize()
|
||||
|
||||
switch (ty)
|
||||
{
|
||||
//LLVMDC: llvm aligns 12 byte reals to 4 byte
|
||||
case Tfloat80:
|
||||
case Timaginary80:
|
||||
case Tcomplex80:
|
||||
sz = REALSIZE;
|
||||
//sz = REALSIZE;
|
||||
sz = 4;
|
||||
break;
|
||||
|
||||
//LLVMDC: llvm aligns these to 4 byte boundaries
|
||||
case Tint64:
|
||||
case Tuns64:
|
||||
case Tfloat64:
|
||||
case Timaginary64:
|
||||
sz = 4;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user