- D(printf("Attempting fillGaps on %s: [",sym->name));
- /* THERE IS HOPE !!!! */
- for (i=0; i < sym->nRegs ; i++ ) {
- if (sym->regType == REG_PTR)
- sym->regs[i] = getRegPtrNoSpil ();
- else if (sym->regType == REG_BIT)
- sym->regs[i] = getRegBitNoSpil ();
- else
- {
- sym->regs[i] = NULL;
- if (ic && ic->op == CAST && IS_SYMOP (IC_RIGHT (ic)))
- {
- symbol * right = OP_SYMBOL (IC_RIGHT (ic));
-
- if (right->regs[i])
- sym->regs[i] = allocThisReg (right->regs[i]);
- }
- if (!sym->regs[i])
- sym->regs[i] = getRegGprNoSpil ();
- }
- D(printf("%s ", sym->regs[i]->name));
- }
- D(printf("]\n"));
-
- /* For all its definitions check if the registers
- allocated needs positioning NOTE: we can position
- only ONCE if more than One positioning required
- then give up.
- We may need to perform the checks twice; once to
- position the registers as needed, the second to
- verify any register repositioning is still
- compatible.
- */
- sym->isspilt = 0;
- for (pass=0; pass<2; pass++) {
- D(printf(" checking definitions\n"));
- for (i = 0 ; i < sym->defs->size ; i++ ) {
- if (bitVectBitValue(sym->defs,i)) {
- if (!(ic = hTabItemWithKey(iCodehTab,i))) continue ;
- D(printf(" ic->seq = %d\n", ic->seq));
- if (SKIP_IC(ic)) continue;
- assert(isSymbolEqual(sym,OP_SYMBOL(IC_RESULT(ic)))); /* just making sure */
- /* if left is assigned to registers */
- if (IS_SYMOP(IC_LEFT(ic)))
- {
- D(printf(" left = "));
- D(printOperand(IC_LEFT(ic),NULL));
- }
- if (IS_SYMOP(IC_LEFT(ic)) &&
- bitVectBitValue(_G.totRegAssigned,OP_SYMBOL(IC_LEFT(ic))->key)) {
- pdone += (positionRegs(sym,OP_SYMBOL(IC_LEFT(ic)))>0);
+ if (right->regs[i])
+ sym->regs[i] = allocThisReg (right->regs[i]);
+ }
+ if (!sym->regs[i])
+ sym->regs[i] = getRegGprNoSpil ();
+ }
+ D(printf("%s ", sym->regs[i]->name));
+ }
+ D(printf("]\n"));
+
+ /* For all its definitions check if the registers
+ allocated needs positioning NOTE: we can position
+ only ONCE if more than One positioning required
+ then give up.
+ We may need to perform the checks twice; once to
+ position the registers as needed, the second to
+ verify any register repositioning is still
+ compatible.
+ */
+ sym->isspilt = 0;
+ for (pass=0; pass<2; pass++)
+ {
+ D(printf(" checking definitions\n"));
+ for (i = 0 ; i < sym->defs->size ; i++ )
+ {
+ if (bitVectBitValue(sym->defs,i))
+ {
+ if (!(ic = hTabItemWithKey(iCodehTab,i)))
+ continue;
+ D(printf(" ic->seq = %d\n", ic->seq));
+ if (SKIP_IC(ic))
+ continue;
+ assert(isSymbolEqual(sym,OP_SYMBOL(IC_RESULT(ic)))); /* just making sure */
+ /* if left is assigned to registers */
+ if (IS_SYMOP(IC_LEFT(ic)))
+ {
+ D(printf(" left = "));
+ D(printOperand(IC_LEFT(ic),NULL));