+2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
+
+ * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
+ * src/pic16/device.c (pic16_assignConfigWordValues): wrong
+ configuration values no more rejected by compiler, they are assigned
+ to configuration registers with a warning message instead,
+ * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
+ the for-loop so last conf register is emitted too,
+ * (_pic16_initPaths): link library libsdcc.lib by default,
+ * (_hasNativeMulFor): modified test for multiplication according to
+ Raphael Neider's remarks. Integer multiplication is also done with
+ support functions,
+ * device/include/pic16/pic18fregs.h: corrected type error in while
+ testing and including 18f6720 header file
+
2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
* src/pic16/device.h (pic16_options): removed field use_crt,
/* force a new aop if sizes differ */
sym->usl.spillLoc->aop = NULL;
}
+
+#if 0
DEBUGpic16_emitcode(";","%s %d %s sym->rname = %s, offset %d",
__FUNCTION__,__LINE__,
sym->usl.spillLoc->rname,
sym->rname, sym->usl.spillLoc->offset);
+#endif
sym->aop = op->aop = aop = newAsmop(AOP_PCODE);
//aop->aopu.pcop = pic16_popGetImmd(sym->usl.spillLoc->rname,0,sym->usl.spillLoc->offset);
(posbit-1),0, PO_GPR_REGISTER));
pic16_emitpcode(POC_BRA, pic16_popGetLabel(tlbl->key));
+// pic16_emitpcode(POC_BRA, pic16_popGetLabel(rIfx.lbl->key));
} else {
if (bytelit == 0xff) {
/* Aaron had a MOVF instruction here, changed to MOVFW cause
set *pic16libDirsSet;
char devlib[512];
- setMainValue("mcu", pic16->name[2] );
- addSet(&preArgvSet, Safe_strdup("-D{mcu}"));
+ setMainValue("mcu", pic16->name[2] );
+ addSet(&preArgvSet, Safe_strdup("-D{mcu}"));
- sprintf(pic16incDir, "%s%cpic16", INCLUDE_DIR_SUFFIX, DIR_SEPARATOR_CHAR);
- sprintf(pic16libDir, "%s%cpic16", LIB_DIR_SUFFIX, DIR_SEPARATOR_CHAR);
+ sprintf(pic16incDir, "%s%cpic16", INCLUDE_DIR_SUFFIX, DIR_SEPARATOR_CHAR);
+ sprintf(pic16libDir, "%s%cpic16", LIB_DIR_SUFFIX, DIR_SEPARATOR_CHAR);
- if(!options.nostdinc) {
- /* setup pic16 include directory */
- pic16incDirsSet = appendStrSet(dataDirsSet, NULL, pic16incDir);
- mergeSets(&includeDirsSet, pic16incDirsSet);
- }
-
- if(!options.nostdlib) {
- /* setup pic16 library directory */
- pic16libDirsSet = appendStrSet(dataDirsSet, NULL, pic16libDir);
- mergeSets(&libDirsSet, pic16libDirsSet);
- }
-
- if(!pic16_options.nodefaultlibs) {
- /* now add the library for the device */
- sprintf(devlib, "%s.lib", pic16->name[2]);
- addSet(&libFilesSet, Safe_strdup(devlib));
- }
+ if(!options.nostdinc) {
+ /* setup pic16 include directory */
+ pic16incDirsSet = appendStrSet(dataDirsSet, NULL, pic16incDir);
+ mergeSets(&includeDirsSet, pic16incDirsSet);
+ }
+
+ if(!options.nostdlib) {
+ /* setup pic16 library directory */
+ pic16libDirsSet = appendStrSet(dataDirsSet, NULL, pic16libDir);
+ mergeSets(&libDirsSet, pic16libDirsSet);
+ }
+
+ if(!pic16_options.nodefaultlibs) {
+ /* now add the library for the device */
+ sprintf(devlib, "%s.lib", pic16->name[2]);
+ addSet(&libFilesSet, Safe_strdup(devlib));
+
+ /* add the internal SDCC library */
+ addSet(&libFilesSet, Safe_strdup( "libsdcc.lib" ));
+ }
}
extern set *linkOptionsSet;
#if 1
/* multiplication is fixed */
/* support mul for char/int/long */
- if((getSize(OP_SYMBOL(IC_LEFT(ic))->type ) <= 4)
- && (ic->op == '*'))return TRUE;
+ if((ic->op == '*')
+ && (getSize(OP_SYMBOL(IC_LEFT(ic))->type ) < 2))return TRUE;
#endif
#if 0
/* support div for char/int/long */
- if((getSize(OP_SYMBOL(IC_LEFT(ic))->type ) <= 0)
+ if((getSize(OP_SYMBOL(IC_LEFT(ic))->type ) < 0)
&& (ic->op == '/'))return TRUE;
#endif