+2005-09-18 Raphael Neider <rneider AT web.de>
+
+ * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
+ as these are now unused,
+ (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
+ * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
+ local, avoids uninitialized pointer dereference on r->name
+ * src/pic16/ralloc.c (newReg): fixed indentation
+
2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
* src/SDCCval.c (constVal): fixed bug 730366
}
+#if 0
+/* This code is not adjusted to PIC16 and fails utterly.
+ * On the other hand: PIC16 does not support xdata (the only mem FPOINTERs are used for) anyway... */
+
/*-----------------------------------------------------------------*/
/* genFarPointerGet - gget value from far space */
/*-----------------------------------------------------------------*/
pic16_freeAsmop(result,NULL,ic,TRUE);
}
+#endif
#if 0
/*-----------------------------------------------------------------*/
the pointer values */
switch (p_type) {
case POINTER:
+ case FPOINTER:
case IPOINTER:
genNearPointerGet (left,result,ic);
break;
genPagedPointerGet(left,result,ic);
break;
+#if 0
+ /* PICs do not support FAR pointers... */
+ /* MUST move them somewhere; handle FPOINTERs like POINTERS or like GPOINTERs?!? */
case FPOINTER:
genFarPointerGet (left,result,ic);
break;
+#endif
case CPOINTER:
genConstPointerGet (left,result,ic);
}
+#if 0
+/* This code is not adjusted to PIC16 and fails utterly...
+ * On the other hand: PIC16 has no xdata anyway (the only memory FPOINTERs are use for) */
+
/*-----------------------------------------------------------------*/
/* genFarPointerSet - set value from far space */
/*-----------------------------------------------------------------*/
pic16_freeAsmop(right,NULL,ic,TRUE);
}
+#endif
/*-----------------------------------------------------------------*/
/* genGenPointerSet - set value from generic pointer space */
the pointer values */
switch (p_type) {
case POINTER:
+ case FPOINTER:
case IPOINTER:
genNearPointerSet (right,result,ic);
break;
genPagedPointerSet (right,result,ic);
break;
+#if 0
+ /* MUST move them somewhere; handle FPOINTERs like POINTERS or like GPOINTERs?!? */
case FPOINTER:
genFarPointerSet (right,result,ic);
break;
+#endif
case GPOINTER:
genGenPointerSet (right,result,ic);
dReg->name = Safe_strdup(name);
else {
sprintf(buffer,"r0x%02X", dReg->rIdx);
- if(type == REG_STK)
+ if(type == REG_STK) {
*buffer = 's';
- dReg->name = Safe_strdup(buffer);
+ }
+ dReg->name = Safe_strdup(buffer);
}
}
#if NEWREG_DEBUG
- fprintf(stderr,"newReg: %s, rIdx = 0x%02x\taccess= %d\tregop= %p\n",dReg->name,rIdx, dReg->accessBank, refop);
+ fprintf(stderr,"newReg @ %p: %s, rIdx = 0x%02x\taccess= %d\tregop= %p\n",dReg, dReg->name,rIdx, dReg->accessBank, refop);
#endif
dReg->size = size;
dReg->alias = alias;