]> git.sur5r.net Git - cc65/commitdiff
Changed shift functions, added info about shift runtime functions
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 30 Jun 2004 19:18:56 +0000 (19:18 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 30 Jun 2004 19:18:56 +0000 (19:18 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3142 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/codegen.c
src/cc65/codeinfo.c

index 07bbf6a23d0bf2f3a64a5dca69ff71847f573fe3..879c58d8615a741ba84bb82583c04d0989997a6d 100644 (file)
@@ -2990,8 +2990,8 @@ void g_asr (unsigned flags, unsigned long val)
 /* Primary = TOS >> Primary */
 {
     static char* ops [12] = {
-       0,              "tosasra0",     "tosasrax",
-       0,              "tosshra0",     "tosshrax",
+       0,              0,              "tosasrax",
+       0,              0,              "tosshrax",
        0,              0,              "tosasreax",
        0,              0,              "tosshreax",
     };
@@ -3080,8 +3080,8 @@ void g_asl (unsigned flags, unsigned long val)
 /* Primary = TOS << Primary */
 {
     static char* ops [12] = {
-       0,              "tosasla0",     "tosaslax",
-       0,              "tosshla0",     "tosshlax",
+               0,              0,              "tosaslax",
+       0,              0,              "tosshlax",
        0,              0,              "tosasleax",
        0,              0,              "tosshleax",
     };
@@ -3090,7 +3090,7 @@ void g_asl (unsigned flags, unsigned long val)
     /* If the right hand side is const, the lhs is not on stack but still
      * in the primary register.
      */
-    if (flags & CF_CONST) {
+    if (flags & CF_CONST) {             
 
        switch (flags & CF_TYPE) {
 
index 8215bba1c5a730a53c556f11945a03d397eb5819..254b4e07ddca6f757348ae72782f5b1167ddcc3c 100644 (file)
@@ -191,6 +191,10 @@ static const FuncInfo FuncInfoTable[] = {
     { "tosaddax",       REG_AX,               REG_AXY                        },
     { "tosanda0",       REG_A,                REG_AXY                        },
     { "tosandax",       REG_AX,               REG_AXY                        },
+    { "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            },
     { "tosdiva0",       REG_AY,              REG_ALL                        },
     { "tosdivax",       REG_AXY,              REG_ALL                       },
     { "tosdiveax",      REG_EAXY,             REG_ALL                       },
@@ -205,7 +209,10 @@ static const FuncInfo FuncInfoTable[] = {
     { "tosmulax",       REG_AX,                      REG_ALL                        },
     { "tosmuleax",      REG_EAX,                     REG_ALL                        },
     { "tosneeax",       REG_EAX,                     REG_AXY | REG_PTR1             },
-    { "tosshreax",      REG_EAX,                     REG_EAXY | REG_PTR1 | REG_PTR2 },
+    { "tosshlax",       REG_A,                REG_AXY | REG_TMP1             },
+    { "tosshleax",      REG_A,                       REG_EAXY | REG_TMP1            },
+    { "tosshrax",       REG_A,                REG_AXY | REG_TMP1             },
+    { "tosshreax",      REG_A,                       REG_EAXY | REG_TMP1            },
     { "tossuba0",       REG_A,                REG_AXY                        },
     { "tossubax",       REG_AX,               REG_AXY                        },
     { "tossubeax",      REG_EAX,              REG_EAXY                       },