From 1f5ca744f202c9a9e9fa6a9249056a499d529fb4 Mon Sep 17 00:00:00 2001 From: sandeep Date: Fri, 23 Nov 2001 21:42:21 +0000 Subject: [PATCH] More fixes for DPTR use git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1635 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/ds390/ralloc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ds390/ralloc.c b/src/ds390/ralloc.c index 0fcff1dd..27b8c1e4 100644 --- a/src/ds390/ralloc.c +++ b/src/ds390/ralloc.c @@ -2123,7 +2123,7 @@ packRegsDPTRuse (operand * op) (!isOperandInFarSpace(IC_RIGHT(ic)) || isOperandInReg(IC_RIGHT(ic)))) continue ; - /* special case */ + /* special cases */ /* 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)) && -- 2.30.2