mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 19:29:37 +00:00
E_ADDRESS_OF logic fix.
This commit is contained in:
parent
9e82de4607
commit
80a468f8bd
@ -93,8 +93,7 @@ int ED_IsLocPrimaryOrExpr (const ExprDesc* Expr)
|
||||
int ED_IsIndExpr (const ExprDesc* Expr)
|
||||
/* Check if the expression is a reference to its value */
|
||||
{
|
||||
return (Expr->Flags & E_ADDRESS_OF) == 0 &&
|
||||
!ED_IsLocNone (Expr) && !ED_IsLocPrimary (Expr);
|
||||
return (Expr->Flags & E_ADDRESS_OF) == 0 && !ED_IsLocNone (Expr);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -282,7 +281,7 @@ ExprDesc* ED_AddrExpr (ExprDesc* Expr)
|
||||
|
||||
case E_LOC_EXPR:
|
||||
Expr->Flags &= ~(E_MASK_LOC | E_MASK_RTYPE);
|
||||
Expr->Flags |= E_LOC_PRIMARY | E_RTYPE_RVAL;
|
||||
Expr->Flags |= E_ADDRESS_OF | E_LOC_PRIMARY | E_RTYPE_RVAL;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -493,8 +493,7 @@ INLINE int ED_IsAddrExpr (const ExprDesc* Expr)
|
||||
INLINE int ED_IsIndExpr (const ExprDesc* Expr)
|
||||
/* Check if the expression is a reference to its value */
|
||||
{
|
||||
return (Expr->Flags & E_ADDRESS_OF) == 0 &&
|
||||
!ED_IsLocNone (Expr) && !ED_IsLocPrimary (Expr);
|
||||
return (Expr->Flags & E_ADDRESS_OF) == 0 && !ED_IsLocNone (Expr);
|
||||
}
|
||||
#else
|
||||
int ED_IsIndExpr (const ExprDesc* Expr);
|
||||
|
@ -92,6 +92,7 @@ static void LoadAddress (unsigned Flags, ExprDesc* Expr)
|
||||
g_leasp (Expr->IVal);
|
||||
break;
|
||||
|
||||
case E_LOC_PRIMARY:
|
||||
case E_LOC_EXPR:
|
||||
if (Expr->IVal != 0) {
|
||||
/* We have an expression in the primary plus a constant
|
||||
|
Loading…
Reference in New Issue
Block a user