* src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
[fw/sdcc] / src / ds390 / ralloc.c
index 1af7fdea07f70697b01f35f1fa71b60d22daf70c..3743e964dcf776f0369cdb7aa3971d007aa844e4 100644 (file)
@@ -3153,6 +3153,14 @@ ds390_assignRegisters (eBBlock ** ebbs, int count)
   if (currFunc)
     redoStackOffsets ();
 
+  /* make sure r0 & r1 are flagged as used if they might be used */
+  /* as pointers */
+  if (currFunc && ds390_ptrRegReq)
+    {
+      currFunc->regsUsed = bitVectSetBit (currFunc->regsUsed, R0_IDX);
+      currFunc->regsUsed = bitVectSetBit (currFunc->regsUsed, R1_IDX);
+    }
+    
   if (options.dump_rassgn) {
     dumpEbbsToFileExt (DUMP_RASSGN, ebbs, count);
     dumpLiveRanges (DUMP_LRANGE, liveRanges);