1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-30 20:29:25 +00:00

Added more function info

git-svn-id: svn://svn.cc65.org/cc65/trunk@4026 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-08-16 16:38:25 +00:00
parent aa7d419165
commit 3aa4d74b18
2 changed files with 100 additions and 18 deletions

View File

@ -73,6 +73,10 @@ struct FuncInfo {
unsigned short Chg; /* Changed/destroyed registers */
};
/* Note for the shift functions: Shifts are done modulo 32, so all shift
* routines are marked to use only the A register. The remainder is ignored
* anyway.
*/
static const FuncInfo FuncInfoTable[] = {
{ "addeq0sp", REG_AX, REG_AXY },
{ "addeqysp", REG_AXY, REG_AXY },
@ -215,12 +219,14 @@ static const FuncInfo FuncInfoTable[] = {
{ "tosadda0", REG_A, REG_AXY },
{ "tosaddax", REG_AX, REG_AXY },
{ "tosaddeax", REG_EAX, REG_EAXY | REG_TMP1 },
{ "tosand0ax", REG_AX, REG_EAX | REG_TMP1 },
{ "tosanda0", REG_A, REG_AXY },
{ "tosandax", REG_AX, REG_AXY },
{ "tosaslax", REG_AX, REG_AXY | REG_TMP1 },
{ "tosasleax", REG_EAX, REG_EAXY | REG_TMP1 },
{ "tosasrax", REG_AX, REG_AXY | REG_TMP1 },
{ "tosasreax", REG_EAX, REG_EAXY | REG_TMP1 },
{ "tosandeax", REG_EAX, REG_EAX | REG_TMP1 },
{ "tosaslax", REG_A, REG_AXY | REG_TMP1 },
{ "tosasleax", REG_A, REG_EAXY | REG_TMP1 },
{ "tosasrax", REG_A, REG_AXY | REG_TMP1 },
{ "tosasreax", REG_A, REG_EAXY | REG_TMP1 },
{ "tosdiv0ax", REG_AX, REG_ALL },
{ "tosdiva0", REG_AY, REG_ALL },
{ "tosdivax", REG_AXY, REG_ALL },
@ -258,8 +264,14 @@ static const FuncInfo FuncInfoTable[] = {
{ "tosnea0", REG_A, REG_AXY | REG_SREG },
{ "tosneax", REG_AX, REG_AXY | REG_SREG },
{ "tosneeax", REG_EAX, REG_AXY | REG_PTR1 },
{ "tosor0ax", REG_AX, REG_EAX | REG_TMP1 },
{ "tosora0", REG_A, REG_AXY | REG_TMP1 },
{ "tosorax", REG_AX, REG_AXY | REG_TMP1 },
{ "tosoreax", REG_EAX, REG_EAX | REG_TMP1 },
{ "tosrsub0ax", REG_AX, REG_EAX | REG_TMP1 },
{ "tosrsuba0", REG_A, REG_AX | REG_TMP1 },
{ "tosrsubax", REG_AX, REG_AX | REG_TMP1 },
{ "tosrsubeax", REG_EAX, REG_EAX | REG_TMP1 },
{ "tosshlax", REG_A, REG_AXY | REG_TMP1 },
{ "tosshleax", REG_A, REG_EAXY | REG_TMP1 },
{ "tosshrax", REG_A, REG_AXY | REG_TMP1 },
@ -296,6 +308,10 @@ static const FuncInfo FuncInfoTable[] = {
{ "tosumula0", REG_AX, REG_ALL },
{ "tosumulax", REG_AX, REG_ALL },
{ "tosumuleax", REG_EAX, REG_ALL },
{ "tosxor0ax", REG_AX, REG_EAX | REG_TMP1 },
{ "tosxora0", REG_A, REG_AX | REG_TMP1 },
{ "tosxorax", REG_AX, REG_AX | REG_TMP1 },
{ "tosxoreax", REG_EAX, REG_EAX | REG_TMP1 },
{ "tsteax", REG_EAX, REG_Y },
{ "utsteax", REG_EAX, REG_Y },
};

View File

@ -83,6 +83,26 @@ static const CallDesc CallTable [] = {
},
F_NONE,
"addeq0sp"
},{
"laddeq",
{
/* A X Y SRegLo */
1, 0, UNKNOWN_REGVAL, 0,
/* SRegHi Ptr1Lo Ptr1Hi Tmp1 */
0, UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL
},
F_NONE,
"laddeq1"
},{
"laddeq",
{
/* A X Y SRegLo */
UNKNOWN_REGVAL, 0, UNKNOWN_REGVAL, 0,
/* SRegHi Ptr1Lo Ptr1Hi Tmp1 */
0, UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL
},
F_NONE,
"laddeqa"
},{
"laddeqysp",
{
@ -133,6 +153,26 @@ static const CallDesc CallTable [] = {
},
F_NONE,
"ldeax0sp"
},{
"lsubeq",
{
/* A X Y SRegLo */
1, 0, UNKNOWN_REGVAL, 0,
/* SRegHi Ptr1Lo Ptr1Hi Tmp1 */
0, UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL
},
F_NONE,
"lsubeq1"
},{
"lsubeq",
{
/* A X Y SRegLo */
UNKNOWN_REGVAL, 0, UNKNOWN_REGVAL, 0,
/* SRegHi Ptr1Lo Ptr1Hi Tmp1 */
0, UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL
},
F_NONE,
"lsubeqa"
},{
"lsubeqysp",
{
@ -373,6 +413,16 @@ static const CallDesc CallTable [] = {
},
F_NONE,
"tosanda0"
},{
"tosandeax",
{
/* A X Y SRegLo */
UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL, 0,
/* SRegHi Ptr1Lo Ptr1Hi Tmp1 */
0, UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL
},
F_NONE,
"tosand0ax"
},{
"tosdivax",
{
@ -563,6 +613,16 @@ static const CallDesc CallTable [] = {
},
F_NONE,
"tosora0"
},{
"tosoreax",
{
/* A X Y SRegLo */
UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL, 0,
/* SRegHi Ptr1Lo Ptr1Hi Tmp1 */
0, UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL
},
F_NONE,
"tosor0ax"
},{
"tosrsubax",
{
@ -573,6 +633,16 @@ static const CallDesc CallTable [] = {
},
F_NONE,
"tosrsuba0"
},{
"tosrsubeax",
{
/* A X Y SRegLo */
UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL, 0,
/* SRegHi Ptr1Lo Ptr1Hi Tmp1 */
0, UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL
},
F_NONE,
"tosrsub0ax"
},{
"tossubax",
{
@ -703,22 +773,18 @@ static const CallDesc CallTable [] = {
},
F_NONE,
"tosxora0"
},{
"tosxoreax",
{
/* A X Y SRegLo */
UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL, 0,
/* SRegHi Ptr1Lo Ptr1Hi Tmp1 */
0, UNKNOWN_REGVAL, UNKNOWN_REGVAL, UNKNOWN_REGVAL
},
F_NONE,
"tosxor0ax"
},
#if 0
"laddeqa", /* laddeq, sreg = 0, x = 0 */
"laddeq1", /* laddeq, sreg = 0, x = 0, a = 1 */
"tosand0ax", /* tosandeax, sreg = 0 */
"tosor0ax", /* tosoreax, sreg = 0 */
"tosrsub0ax", /* tosrsubeax, sreg = 0 */
"tosshl0ax", /* tosshleax, sreg = 0 */
"tosasl0ax", /* tosasleax, sreg = 0 */
"tosshr0ax", /* tosshreax, sreg = 0 */
"tosasr0ax", /* tosasreax, sreg = 0 */
"lsubeqa", /* lsubeq, sreg = 0, x = 0 */
"lsubeq1", /* lsubeq, sreg = 0, x = 0, a = 1 */
"tosxor0ax", /* tosxoreax, sreg = 0 */
#endif
};
#define CALL_COUNT (sizeof(CallTable) / sizeof(CallTable[0]))