mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-15 12:23:13 +01:00
fixes #450 :: real inside a class breaks interface casting on x86_64; patch by prokhin_alexey
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user