Expression::optimize everything to resolve manifest constants in inline asm.

This commit is contained in:
David Nadlinger
2013-06-12 20:16:37 +02:00
parent 2ebf677661
commit d7526157ab
+2 -9
View File
@@ -2586,15 +2586,7 @@ namespace AsmParserx8664
bool isIntExp ( Expression * exp ) bool isIntExp ( Expression * exp )
{ {
if ( exp->op == TOKint64 ) return exp->op == TOKint64;
return 1;
if ( exp->op == TOKvar )
{
Declaration * v = ( ( VarExp * ) exp )->var;
if ( v->isConst() && v->type->isintegral() )
return 1;
}
return 0;
} }
bool isRegExp ( Expression * exp ) { return exp->op == TOKmod; } // ewww.%% bool isRegExp ( Expression * exp ) { return exp->op == TOKmod; } // ewww.%%
bool isLocalSize ( Expression * exp ) bool isLocalSize ( Expression * exp )
@@ -3220,6 +3212,7 @@ namespace AsmParserx8664
} }
e = e->semantic ( sc ); e = e->semantic ( sc );
e = e->optimize (WANTvalue);
// Special case for floating point constant declarations. // Special case for floating point constant declarations.
if ( e->op == TOKfloat64 ) if ( e->op == TOKfloat64 )