1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-28 06:30:16 +00:00

New function RegAXUsed

git-svn-id: svn://svn.cc65.org/cc65/trunk@1060 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2001-10-18 19:21:40 +00:00
parent 1366b6cbea
commit 564fbbe448
2 changed files with 10 additions and 1 deletions

View File

@ -534,5 +534,11 @@ int RegYUsed (struct CodeSeg* S, unsigned Index)
int RegAXUsed (struct CodeSeg* S, unsigned Index)
/* Check if the value in A or(!) the value in X are used. */
{
return (GetRegInfo (S, Index, REG_AX) & REG_AX) != 0;
}

View File

@ -82,7 +82,7 @@ struct CodeSeg;
#define REG_AY (REG_A | REG_Y) #define REG_AY (REG_A | REG_Y)
#define REG_XY (REG_X | REG_Y) #define REG_XY (REG_X | REG_Y)
#define REG_AXY (REG_AX | REG_Y) #define REG_AXY (REG_AX | REG_Y)
#define REG_EAX (REG_AX | REG_SREG) #define REG_EAX (REG_AX | REG_SREG)
#define REG_EAXY (REG_EAX | REG_Y) #define REG_EAXY (REG_EAX | REG_Y)
#define REG_ZP 0xFFF8U #define REG_ZP 0xFFF8U
#define REG_ALL 0xFFFFU #define REG_ALL 0xFFFFU
@ -131,6 +131,9 @@ int RegXUsed (struct CodeSeg* S, unsigned Index);
int RegYUsed (struct CodeSeg* S, unsigned Index); int RegYUsed (struct CodeSeg* S, unsigned Index);
/* Check if the value in Y is used. */ /* Check if the value in Y is used. */
int RegAXUsed (struct CodeSeg* S, unsigned Index);
/* Check if the value in A or(!) the value in X are used. */
/* End of codeinfo.h */ /* End of codeinfo.h */