Misc flat 24 stack handling fixes
[fw/sdcc] / src / mcs51 / ralloc.c
index 11d2216b9f075b1dfb669329fdd0675c0dbd2467..eb82aff5a155d9b2d33bf801a7fcad80a2970175 100644 (file)
@@ -1721,7 +1721,7 @@ static iCode *packRegsForOneuse (iCode *ic, operand *op , eBBlock *ebp)
     
     /* only upto 2 bytes since we cannot predict
        the usage of b, & acc */
-    if (getSize(operandType(op)) > 2 && 
+    if (getSize(operandType(op)) >  (fReturnSize - 2) &&
        ic->op != RETURN             &&
        ic->op != SEND)
        return NULL;