From: cuz Date: Wed, 30 Jun 2004 19:18:56 +0000 (+0000) Subject: Changed shift functions, added info about shift runtime functions X-Git-Tag: V2.12.0~690 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=07419b62f8a958dfac9b49c59f38326c19d59c67;p=cc65 Changed shift functions, added info about shift runtime functions git-svn-id: svn://svn.cc65.org/cc65/trunk@3142 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 07bbf6a23..879c58d86 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -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) { diff --git a/src/cc65/codeinfo.c b/src/cc65/codeinfo.c index 8215bba1c..254b4e07d 100644 --- a/src/cc65/codeinfo.c +++ b/src/cc65/codeinfo.c @@ -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 },