* src/SDCCcse.c (findPointerSet): fixed bug #1493710
[fw/sdcc] / src / SDCCopt.c
index 64b49c6fdd5ac15277f8fe27cc9225681aca34f1..822afc72b20b3c5047f9ee3fcdbffbebd3580a4b 100644 (file)
@@ -219,7 +219,7 @@ cnvToFcall (iCode * ic, eBBlock * ebp)
   if (currFunc)
     FUNC_HASFCALL (currFunc->type) = 1;
 
-  if(TARGET_IS_PIC16) {
+  if(TARGET_IS_PIC16 || TARGET_IS_PIC) {
         /* normally these functions aren't marked external, so we can use their
          * _extern field to marked as already added to symbol table */
 
@@ -316,7 +316,7 @@ found:
   if (currFunc)
     FUNC_HASFCALL (currFunc->type) = 1;
 
-  if(TARGET_IS_PIC16) {
+  if(TARGET_IS_PIC16 || TARGET_IS_PIC) {
        /* normally these functions aren't marked external, so we can use their
         * _extern field to marked as already added to symbol table */
 
@@ -408,7 +408,7 @@ found:
   if (currFunc)
     FUNC_HASFCALL (currFunc->type) = 1;
 
-  if(TARGET_IS_PIC16) {
+  if(TARGET_IS_PIC16 || TARGET_IS_PIC) {
         /* normally these functions aren't marked external, so we can use their
          * _extern field to marked as already added to symbol table */
 
@@ -501,7 +501,7 @@ found:
   if (currFunc)
     FUNC_HASFCALL (currFunc->type) = 1;
 
-  if(TARGET_IS_PIC16) {
+  if(TARGET_IS_PIC16 || TARGET_IS_PIC) {
         /* normally these functions aren't marked external, so we can use their
          * _extern field to marked as already added to symbol table */
 
@@ -601,7 +601,7 @@ found:
   if (currFunc)
     FUNC_HASFCALL (currFunc->type) = 1;
 
-  if(TARGET_IS_PIC16) {
+  if(TARGET_IS_PIC16 || TARGET_IS_PIC) {
        /* normally these functions aren't marked external, so we can use their
         * _extern field to marked as already added to symbol table */
 
@@ -741,7 +741,7 @@ found:
   if (currFunc)
     FUNC_HASFCALL (currFunc->type) = 1;
 
-  if(TARGET_IS_PIC16) {
+  if(TARGET_IS_PIC || TARGET_IS_PIC16) {
         /* normally these functions aren't marked external, so we can use their
          * _extern field to marked as already added to symbol table */
 
@@ -778,8 +778,8 @@ convertToFcall (eBBlock ** ebbs, int count)
              converted to function calls */
           if ((IS_CONDITIONAL (ic) ||
                IS_ARITHMETIC_OP (ic)) &&
-             (IS_FLOAT (operandType (IC_RIGHT (ic)))
-               || IS_FIXED( operandType (IC_RIGHT (ic)))))
+              (IS_FLOAT (operandType (IC_RIGHT (ic))) ||
+               IS_FIXED( operandType (IC_RIGHT (ic)))))
             {
 
               cnvToFcall (ic, ebbs[i]);
@@ -803,7 +803,7 @@ convertToFcall (eBBlock ** ebbs, int count)
           if (ic->op == '%' && isOperandLiteral(IC_RIGHT(ic)) &&
               IS_UNSIGNED(operandType(IC_LEFT(ic))))
             {
-              unsigned litVal = fabs(operandLitValue(IC_RIGHT(ic)));
+              unsigned litVal = abs((unsigned)operandLitValue(IC_RIGHT(ic)));
 
               /* modulo by 1: no remainder */
               if (litVal == 1)
@@ -1558,7 +1558,7 @@ eBBlockFromiCode (iCode * ic)
   convertToFcall (ebbi->bbOrder, ebbi->count);
 
   /* compute the live ranges */
-  computeLiveRanges (ebbi->bbOrder, ebbi->count);
+  computeLiveRanges (ebbi->bbOrder, ebbi->count, TRUE);
 
   if (options.dump_range)
     dumpEbbsToFileExt (DUMP_RANGE, ebbi);