More fixes for DPTR use
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 23 Nov 2001 21:42:21 +0000 (21:42 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 23 Nov 2001 21:42:21 +0000 (21:42 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1635 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/ds390/ralloc.c

index 0fcff1ddcd9063c2c1c77708b6ae77c9f5bbda6b..27b8c1e4b5940dc8a429a7911c91585e5a77797f 100644 (file)
@@ -2123,7 +2123,7 @@ packRegsDPTRuse (operand * op)
            (!isOperandInFarSpace(IC_RIGHT(ic)) || 
             isOperandInReg(IC_RIGHT(ic)))) continue ;
 
-       /* special case */
+       /* special case */
        /* pointerGet */
        if (POINTER_GET(ic) && !isOperandEqual(IC_LEFT(ic),op) &&
            getSize(operandType(IC_LEFT(ic))) > 1 ) return NULL ;
@@ -2132,8 +2132,9 @@ packRegsDPTRuse (operand * op)
        if (POINTER_SET(ic) && !isOperandEqual(IC_RESULT(ic),op) &&
            getSize(operandType(IC_RESULT(ic))) > 1 ) return NULL;
 
-       /* conditionals can destroy 'b' */
-       if (IS_CONDITIONAL(ic) && getSize(operandType(op)) > 3) return NULL;
+       /* conditionals can destroy 'b' - make sure B wont be used in this one*/
+       if ((IS_CONDITIONAL(ic) || ic->op == '*' || ic->op == '/' ) && 
+           getSize(operandType(op)) > 3) return NULL;
 
        /* general case */
        if (IC_RESULT(ic) && IS_SYMOP(IC_RESULT(ic)) &&