mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 19:29:37 +00:00
Improved code generation
git-svn-id: svn://svn.cc65.org/cc65/trunk@3072 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
01104d26ea
commit
2fa9b6e5ac
@ -1676,10 +1676,14 @@ void hie10 (ExprDesc* Expr)
|
|||||||
|
|
||||||
case TOK_STAR:
|
case TOK_STAR:
|
||||||
NextToken ();
|
NextToken ();
|
||||||
if (evalexpr (CF_NONE, hie10, Expr) != 0) {
|
ExprWithCheck (hie10, Expr);
|
||||||
/* Expression is not const, indirect value loaded into primary */
|
if (ED_IsLVal (Expr) || !(ED_IsLocConst (Expr) || ED_IsLocStack (Expr)))) {
|
||||||
ED_MakeRValExpr (Expr);
|
/* Not a const, load it into the primary and make it a
|
||||||
}
|
* calculated value.
|
||||||
|
*/
|
||||||
|
ExprLoad (CF_NONE, Expr);
|
||||||
|
ED_MakeRValExpr (Expr);
|
||||||
|
}
|
||||||
/* If the expression is already a pointer to function, the
|
/* If the expression is already a pointer to function, the
|
||||||
* additional dereferencing operator must be ignored.
|
* additional dereferencing operator must be ignored.
|
||||||
*/
|
*/
|
||||||
@ -1698,7 +1702,7 @@ void hie10 (ExprDesc* Expr)
|
|||||||
|
|
||||||
case TOK_AND:
|
case TOK_AND:
|
||||||
NextToken ();
|
NextToken ();
|
||||||
hie10 (Expr);
|
ExprWithCheck (hie10, Expr);
|
||||||
/* The & operator may be applied to any lvalue, and it may be
|
/* The & operator may be applied to any lvalue, and it may be
|
||||||
* applied to functions, even if they're no lvalues.
|
* applied to functions, even if they're no lvalues.
|
||||||
*/
|
*/
|
||||||
|
@ -197,7 +197,7 @@ int ED_IsConstAbs (const ExprDesc* Expr)
|
|||||||
* a numeric constant, cast to any type.
|
* a numeric constant, cast to any type.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
return ED_IsConst (Expr) && ED_IsLocAbs (Expr);
|
return (Expr->Flags & (E_MASK_LOC|E_MASK_RTYPE)) == (E_LOC_ABS|E_RTYPE_RVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user