fixes #450 :: real inside a class breaks interface casting on x86_64; patch by prokhin_alexey

This commit is contained in:
Moritz Warning
2011-05-01 20:05:49 +02:00
parent 3a0dfac597
commit 5824fe4da7
4 changed files with 22 additions and 0 deletions

View File

@@ -1136,6 +1136,14 @@ unsigned TypeBasic::alignsize()
}
#if IN_LLVM
unsigned TypeBasic::memalign(unsigned salign)
{
if (global.params.cpu == ARCHx86_64 && (ty == Tfloat80 || ty == Timaginary80))
return 16;
return Type::memalign(salign);
}
#endif
Expression *TypeBasic::getProperty(Loc loc, Identifier *ident)
{

View File

@@ -337,6 +337,9 @@ struct TypeBasic : Type
Type *syntaxCopy();
d_uns64 size(Loc loc);
unsigned alignsize();
#if IN_LLVM
unsigned memalign(unsigned salign);
#endif
Expression *getProperty(Loc loc, Identifier *ident);
Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
char *toChars();

View File

@@ -2580,6 +2580,14 @@ unsigned TypeBasic::alignsize()
#endif
}
#if IN_LLVM
unsigned TypeBasic::memalign(unsigned salign)
{
if (global.params.cpu == ARCHx86_64 && (ty == Tfloat80 || ty == Timaginary80))
return 16;
return Type::memalign(salign);
}
#endif
Expression *TypeBasic::getProperty(Loc loc, Identifier *ident)
{

View File

@@ -400,6 +400,9 @@ struct TypeBasic : Type
Type *syntaxCopy();
d_uns64 size(Loc loc);
unsigned alignsize();
#if IN_LLVM
unsigned memalign(unsigned salign);
#endif
Expression *getProperty(Loc loc, Identifier *ident);
Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
char *toChars();