mirror of
https://github.com/cc65/cc65.git
synced 2024-12-24 11:31:31 +00:00
parent
48d3578c24
commit
49c5cfd65b
@ -61,6 +61,7 @@
|
||||
/* Flags used */
|
||||
#define CEF_USERMARK 0x0001U /* Generic mark by user functions */
|
||||
#define CEF_NUMARG 0x0002U /* Insn has numerical argument */
|
||||
#define CEF_DONT_REMOVE 0x0004U /* Insn shouldn't be removed, marked by user functions */
|
||||
|
||||
/* Code entry structure */
|
||||
typedef struct CodeEntry CodeEntry;
|
||||
|
@ -375,7 +375,7 @@ static int CompareFuncInfo (const void* Key, const void* Info)
|
||||
|
||||
|
||||
|
||||
void GetFuncInfo (const char* Name, unsigned short* Use, unsigned short* Chg)
|
||||
fncls_t GetFuncInfo (const char* Name, unsigned short* Use, unsigned short* Chg)
|
||||
/* For the given function, lookup register information and store it into
|
||||
** the given variables. If the function is unknown, assume it will use and
|
||||
** load all registers.
|
||||
@ -430,7 +430,7 @@ void GetFuncInfo (const char* Name, unsigned short* Use, unsigned short* Chg)
|
||||
*Chg = REG_ALL;
|
||||
|
||||
/* Done */
|
||||
return;
|
||||
return FNCLS_GLOBAL;
|
||||
}
|
||||
|
||||
} else if (IsDigit (Name[0]) || Name[0] == '$') {
|
||||
@ -441,7 +441,7 @@ void GetFuncInfo (const char* Name, unsigned short* Use, unsigned short* Chg)
|
||||
*/
|
||||
*Use = REG_ALL;
|
||||
*Chg = REG_ALL;
|
||||
return;
|
||||
return FNCLS_NUMERIC;
|
||||
|
||||
} else {
|
||||
|
||||
@ -466,7 +466,7 @@ void GetFuncInfo (const char* Name, unsigned short* Use, unsigned short* Chg)
|
||||
*Use = REG_ALL;
|
||||
*Chg = REG_ALL;
|
||||
}
|
||||
return;
|
||||
return FNCLS_BUILTIN;
|
||||
}
|
||||
|
||||
/* Function not found - assume that the primary register is input, and all
|
||||
@ -474,6 +474,8 @@ void GetFuncInfo (const char* Name, unsigned short* Use, unsigned short* Chg)
|
||||
*/
|
||||
*Use = REG_EAXY;
|
||||
*Chg = REG_ALL;
|
||||
|
||||
return FNCLS_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
|
@ -120,16 +120,27 @@ typedef enum {
|
||||
|
||||
|
||||
|
||||
/* Defines for the conditions in a compare */
|
||||
typedef enum {
|
||||
FNCLS_UNKNOWN = -1, /* Unknown */
|
||||
FNCLS_BUILTIN, /* Builtin */
|
||||
FNCLS_GLOBAL, /* Found in global sym table minus the leading underscore */
|
||||
FNCLS_NUMERIC /* A call to a numeric address */
|
||||
} fncls_t;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
void GetFuncInfo (const char* Name, unsigned short* Use, unsigned short* Chg);
|
||||
fncls_t GetFuncInfo (const char* Name, unsigned short* Use, unsigned short* Chg);
|
||||
/* For the given function, lookup register information and store it into
|
||||
** the given variables. If the function is unknown, assume it will use and
|
||||
** load all registers.
|
||||
** Return the whatever category the function is in.
|
||||
*/
|
||||
|
||||
const ZPInfo* GetZPInfo (const char* Name);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user