mirror of
https://github.com/cc65/cc65.git
synced 2024-06-07 07:29:33 +00:00
Added an utility function to check for quasi-constant addresses (of stack variables).
This commit is contained in:
parent
0a8ca3041a
commit
c4a2620e29
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user