]> git.sur5r.net Git - cc65/commitdiff
Fixed register info for several runtime functions. Info for the Y register was
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 2 Nov 2010 18:05:19 +0000 (18:05 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 2 Nov 2010 18:05:19 +0000 (18:05 +0000)
wrong, so the optimizer assumed it wouldn't change across a call.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4836 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/codeinfo.c

index 50052d59de82ff0f13a830ae8b9c28bfbccd7cd2..4f576d440b71bd2019fac78fc0456d34bce1af7e 100644 (file)
@@ -232,18 +232,18 @@ 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             },
+    { "tosand0ax",      REG_AX,               REG_EAXY | REG_TMP1            },
     { "tosanda0",       REG_A,                REG_AXY                        },
     { "tosandax",       REG_AX,               REG_AXY                        },
-    { "tosandeax",      REG_EAX,              REG_EAX | REG_TMP1             },
+    { "tosandeax",      REG_EAX,              REG_EAXY | 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_A,                REG_ALL                       },
-    { "tosdivax",       REG_AX,               REG_ALL                       },
-    { "tosdiveax",      REG_EAX,              REG_ALL                       },
+    { "tosdiv0ax",      REG_AX,               REG_ALL                       },
+    { "tosdiva0",       REG_A,                REG_ALL                       },
+    { "tosdivax",       REG_AX,               REG_ALL                       },
+    { "tosdiveax",      REG_EAX,              REG_ALL                       },
     { "toseq00",        REG_NONE,                    REG_AXY | REG_SREG             },
     { "toseqa0",        REG_A,               REG_AXY | REG_SREG             },
     { "toseqax",        REG_AX,                      REG_AXY | REG_SREG             },
@@ -256,7 +256,7 @@ static const FuncInfo FuncInfoTable[] = {
     { "tosgta0",        REG_A,               REG_AXY | REG_SREG             },
     { "tosgtax",        REG_AX,                      REG_AXY | REG_SREG             },
     { "tosgteax",       REG_EAX,                     REG_AXY | REG_PTR1             },
-    { "tosicmp",               REG_AX,               REG_AXY | REG_SREG             },
+    { "tosicmp",               REG_AX,               REG_AXY | REG_SREG             },
     { "tosicmp0",       REG_A,                REG_AXY | REG_SREG             },
     { "toslcmp",        REG_EAX,                     REG_A | REG_Y | REG_PTR1       },
     { "tosle00",        REG_NONE,                    REG_AXY | REG_SREG             },
@@ -267,24 +267,24 @@ static const FuncInfo FuncInfoTable[] = {
     { "toslta0",        REG_A,               REG_AXY | REG_SREG             },
     { "tosltax",        REG_AX,                      REG_AXY | REG_SREG             },
     { "toslteax",       REG_EAX,                     REG_AXY | REG_PTR1             },
-    { "tosmod0ax",      REG_AX,               REG_ALL                       },
-    { "tosmodeax",      REG_EAX,              REG_ALL                       },
-    { "tosmul0ax",      REG_AX,              REG_ALL                        },
-    { "tosmula0",       REG_A,               REG_ALL                        },
-    { "tosmulax",       REG_AX,                      REG_ALL                        },
-    { "tosmuleax",      REG_EAX,                     REG_ALL                        },
+    { "tosmod0ax",      REG_AX,               REG_ALL                       },
+    { "tosmodeax",      REG_EAX,              REG_ALL                       },
+    { "tosmul0ax",      REG_AX,              REG_ALL                        },
+    { "tosmula0",       REG_A,               REG_ALL                        },
+    { "tosmulax",       REG_AX,                      REG_ALL                        },
+    { "tosmuleax",      REG_EAX,                     REG_ALL                        },
     { "tosne00",        REG_NONE,                    REG_AXY | REG_SREG             },
     { "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             },
+    { "tosor0ax",       REG_AX,               REG_EAXY | 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             },
+    { "tosoreax",       REG_EAX,              REG_EAXY | REG_TMP1            },
+    { "tosrsub0ax",     REG_AX,               REG_EAXY | REG_TMP1            },
+    { "tosrsuba0",      REG_A,                REG_AXY | REG_TMP1             },
+    { "tosrsubax",      REG_AX,               REG_AXY | REG_TMP1             },
+    { "tosrsubeax",     REG_EAX,              REG_EAXY | REG_TMP1            },
     { "tosshlax",       REG_A,                REG_AXY | REG_TMP1             },
     { "tosshleax",      REG_A,                       REG_EAXY | REG_TMP1            },
     { "tosshrax",       REG_A,                REG_AXY | REG_TMP1             },
@@ -317,14 +317,14 @@ static const FuncInfo FuncInfoTable[] = {
     { "tosumoda0",      REG_A,                REG_EAXY | REG_PTR1            }, /* also ptr4 */
     { "tosumodax",      REG_AX,               REG_EAXY | REG_PTR1            }, /* also ptr4 */
     { "tosumodeax",     REG_EAX,              REG_ALL & ~REG_SAVE            },
-    { "tosumul0ax",     REG_AX,              REG_ALL                        },
-    { "tosumula0",      REG_A,                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             },
+    { "tosumul0ax",     REG_AX,              REG_ALL                        },
+    { "tosumula0",      REG_A,                REG_ALL                       },
+    { "tosumulax",      REG_AX,                      REG_ALL                        },
+    { "tosumuleax",     REG_EAX,                     REG_ALL                        },
+    { "tosxor0ax",      REG_AX,               REG_EAXY | REG_TMP1            },
+    { "tosxora0",       REG_A,                REG_AXY | REG_TMP1             },
+    { "tosxorax",       REG_AX,               REG_AXY | REG_TMP1             },
+    { "tosxoreax",      REG_EAX,              REG_EAXY | REG_TMP1            },
     { "tsteax",         REG_EAX,              REG_Y                          },
     { "utsteax",        REG_EAX,              REG_Y                          },
 };