+2003-08-31 Vangelis Rokas <vrokas@otenet.gr>
+ * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
+ * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
+ before instructions that use the _STATUS register
+
2003-08-31 Bernhard Held <bernhard@bernhardheld.de>
* src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
#endif
#if 0
- if (options.model != MODEL_FLAT24)
- {
- /* Let the default code handle it. */
- return FALSE;
- }
+ if (options.model != MODEL_FLAT24) {
+ /* Let the default code handle it. */
+ return FALSE;
+ }
#endif
/* PIC18F family has only two interrupts, the high and the low
- * priority interrupts, which reside in 0x0008 and 0x0018 respectively */
+ * priority interrupts, which reside at 0x0008 and 0x0018 respectively - VR */
fprintf(of, "; RESET vector\n");
fprintf(of, "\tgoto\t__sdcc_gsinit_startup\n");
- fprintf(of, "\tres 2\n");
+ fprintf(of, "\tres 6\n");
fprintf(of, "; High priority interrupt vector 0x0008\n");
-
if(interrupts[1]) {
fprintf(of, "\tgoto\t%s\n", interrupts[1]->rname);
- fprintf(of, "\tres\t6\n");
+ fprintf(of, "\tres\t8\n");
} else {
fprintf(of, "\tretfie\n");
- fprintf(of, "\tres\t14\n");
+ fprintf(of, "\tres\t8\n");
}
fprintf(of, "; Low priority interrupt vector 0x0018\n");
}
#endif
+#warning Fix this if-conditional
/* the !(reg->rIdx==-1) is a temporary hack. It should be changed - VR 6-Jun-2003 */
- if( ( (reg && !(reg->rIdx==-1) && !isACCESS_BANK(reg) /*&& REG_BANK(reg)!=cur_bank*/ && !isBankInstruction(pc)) ||
- ((PCI(pc)->op != POC_CALL) /*&& (cur_bank != 0)*/ ) ) &&
- (!isPCI_LIT(pc)) ) {
+ if( ( (reg /*&& !(reg->rIdx==-1)*/ && !isACCESS_BANK(reg) && (isBankInstruction(pc)==-1) && !(reg->alias == 0x80) )
+ /*|| (PCI(pc)->op != POC_CALL)*/ )
+ && (!isPCI_LIT(pc)) ) {
/* Examine the instruction before this one to make sure it is
reg_bank = (reg) ? REG_BANK(reg) : 0;
-// fprintf(stderr, "%s:%d add bank = %d\n", __FUNCTION__, __LINE__, reg_bank);
-// pc->print(stderr, pc);
+#if 0
+ fprintf(stderr, "%s:%d add bank = %d\n", __FUNCTION__, __LINE__, reg_bank);
+ pc->print(stderr, pc);
+#endif
// if (cur_bank != reg_bank) {
cur_bank = reg_bank;