(lineHead = newLineNode(lb)));
lineCurr->isInline = _G.inLine;
lineCurr->isDebug = _G.debugLine;
+ lineCurr->isComment = 1;
pic16_addpCode2pBlock(pb,pic16_newpCodeCharP(lb));
va_end(ap);
(lineHead = newLineNode(lb)));
lineCurr->isInline = _G.inLine;
lineCurr->isDebug = _G.debugLine;
+ lineCurr->isLabel = (lbp[strlen (lbp) - 1] == ':');
+ lineCurr->isComment = (*lbp == ';');
// VR fprintf(stderr, "lb = <%s>\n", lbp);
pic16_pushpCodeOp( pic16_popCopyReg( &pic16_pc_prodh ));
pic16_pushpCodeOp( pic16_popCopyReg( &pic16_pc_fsr0l ));
pic16_pushpCodeOp( pic16_popCopyReg( &pic16_pc_fsr0h ));
+ pic16_pushpCodeOp( pic16_popCopyReg( &pic16_pc_pclath ));
+ pic16_pushpCodeOp( pic16_popCopyReg( &pic16_pc_pclatu ));
// pic16_pBlockConvert2ISR(pb);
}
_G.useWreg = 0;
if (IFFUNC_ISISR(sym->type)) {
+ pic16_poppCodeOp( pic16_popCopyReg( &pic16_pc_pclatu ));
+ pic16_poppCodeOp( pic16_popCopyReg( &pic16_pc_pclath ));
pic16_poppCodeOp( pic16_popCopyReg( &pic16_pc_fsr0h ));
pic16_poppCodeOp( pic16_popCopyReg( &pic16_pc_fsr0l));
pic16_poppCodeOp( pic16_popCopyReg( &pic16_pc_prodh ));
|| SPEC_BLEN(etype) <= 8 ) {
int fsr0_setup = 0;
- if (blen != 8 || bstr != 0) {
+ if (blen != 8 || (bstr % 8) != 0) {
// we need to combine the value with the old value
if(!shifted_and_masked)
{
if (lit != 0)
pic16_emitpcode(POC_IORLW, pic16_popGetLit(lit));
}
- } // if (blen != 8 || bstr != 0)
+ } else { // if (blen == 8 && (bstr % 8) == 0)
+ if (shifted_and_masked) {
+ // move right (literal) to WREG (only case where right is not yet in WREG)
+ pic16_mov2w(AOP(right), (bstr / 8));
+ }
+ }
/* write new value back */
if ((IS_SYMOP(result) && !IS_PTR(operandType(result)))