Mercurial > projects > ldc
comparison dmd/mtype.c @ 489:822774a94750
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.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 10 Aug 2008 13:42:08 +0200 |
parents | a34078905d01 |
children | 337554fd34f1 |
comparison
equal
deleted
inserted
replaced
488:993b217af574 | 489:822774a94750 |
---|---|
1000 unsigned TypeBasic::alignsize() | 1000 unsigned TypeBasic::alignsize() |
1001 { unsigned sz; | 1001 { unsigned sz; |
1002 | 1002 |
1003 switch (ty) | 1003 switch (ty) |
1004 { | 1004 { |
1005 //LLVMDC: llvm aligns 12 byte reals to 4 byte | |
1005 case Tfloat80: | 1006 case Tfloat80: |
1006 case Timaginary80: | 1007 case Timaginary80: |
1007 case Tcomplex80: | 1008 case Tcomplex80: |
1008 sz = REALSIZE; | 1009 //sz = REALSIZE; |
1010 sz = 4; | |
1011 break; | |
1012 | |
1013 //LLVMDC: llvm aligns these to 4 byte boundaries | |
1014 case Tint64: | |
1015 case Tuns64: | |
1016 case Tfloat64: | |
1017 case Timaginary64: | |
1018 sz = 4; | |
1009 break; | 1019 break; |
1010 | 1020 |
1011 default: | 1021 default: |
1012 sz = size(0); | 1022 sz = size(0); |
1013 break; | 1023 break; |