mirror of
https://github.com/cc65/cc65.git
synced 2025-08-10 20:25:20 +00:00
Added an utility function to check for quasi-constant addresses (of stack variables).
This commit is contained in:
@@ -408,6 +408,15 @@ int ED_IsConst (const ExprDesc* Expr)
|
||||
|
||||
|
||||
|
||||
int ED_IsQuasiConst (const ExprDesc* Expr)
|
||||
/* Return true if the expression denotes a quasi-constant of some sort. This
|
||||
** can be a numeric constant, a constant address or a stack variable address.
|
||||
*/
|
||||
{
|
||||
return (Expr->Flags & E_MASK_LOC) == E_LOC_NONE || ED_IsQuasiConstAddr (Expr);
|
||||
}
|
||||
|
||||
|
||||
int ED_IsConstAddr (const ExprDesc* Expr)
|
||||
/* Return true if the expression denotes a constant address of some sort. This
|
||||
** can be the address of a global variable (maybe with offset) or similar.
|
||||
|
@@ -649,6 +649,11 @@ int ED_IsConst (const ExprDesc* Expr);
|
||||
** similar.
|
||||
*/
|
||||
|
||||
int ED_IsQuasiConst (const ExprDesc* Expr);
|
||||
/* Return true if the expression denotes a quasi-constant of some sort. This
|
||||
** can be a numeric constant, a constant address or a stack variable address.
|
||||
*/
|
||||
|
||||
int ED_IsConstAddr (const ExprDesc* Expr);
|
||||
/* Return true if the expression denotes a constant address of some sort. This
|
||||
** can be the address of a global variable (maybe with offset) or similar.
|
||||
|
Reference in New Issue
Block a user