+ // add leftover bytes
+ // either left or right is too short
+ for (i=size; i < AOP_SIZE(result); i++) {
+ // get right operand into WREG
+ if (i < AOP_SIZE(right)) {
+ pic16_mov2w (AOP(right), i);
+ } else {
+ // right is too short
+ pic16_emitpcode (POC_CLRF, pic16_popCopyReg (&pic16_pc_wreg));
+ if (!SPEC_USIGN(getSpec(operandType(right)))) {
+ // right operand is signed
+ pic16_emitpcode(POC_BTFSC, pic16_newpCodeOpBit(pic16_aopGet(AOP(right),AOP_SIZE(right)-1,FALSE,FALSE),7,0, PO_GPR_REGISTER));
+ pic16_emitpcode(POC_COMF, pic16_popCopyReg (&pic16_pc_wreg));
+ }
+ }
+
+ // get left+WREG+CARRY into result
+ if (i < AOP_SIZE(left)) {
+ if (pic16_sameRegs (AOP(left), AOP(result))) {
+ pic16_emitpcode (POC_ADDWFC, pic16_popGet (AOP(result), i));
+ } else {
+ pic16_emitpcode (POC_ADDFWC, pic16_popGet (AOP(left), i));
+ pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),i));
+ }
+ } else {
+ // left is too short
+ pic16_emitpcode (POC_CLRF, pic16_popGet (AOP(result), i));
+ if (!SPEC_USIGN(getSpec(operandType(left)))) {
+ // left operand is signed
+ pic16_emitpcode(POC_BTFSC, pic16_newpCodeOpBit(pic16_aopGet(AOP(left),AOP_SIZE(left)-1,FALSE,FALSE),7,0, PO_GPR_REGISTER));
+ pic16_emitpcode(POC_COMF, pic16_popGet (AOP(result), i));
+ }
+ pic16_emitpcode (POC_ADDWFC, pic16_popGet (AOP(result), i));
+ }
+ } // for i
+ goto release;
+
+#if 0