Index: gen.c =================================================================== RCS file: /cvsroot/sdcc/sdcc/src/pic16/gen.c,v retrieving revision 1.48 diff -c -p -r1.48 gen.c *** gen.c 17 Sep 2004 00:27:35 -0000 1.48 --- gen.c 24 Sep 2004 09:19:21 -0000 *************** static void shiftR1Left2ResultSigned (op *** 7725,7732 **** pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); } ! pic16_emitpcode(POC_RLCFW, pic16_popGet(AOP(result),offr)); ! pic16_emitpcode(POC_RLCFW, pic16_popGet(AOP(result),offr)); pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0x1f)); pic16_emitpcode(POC_BTFSC, pic16_newpCodeOpBit(pic16_aopGet(AOP(result),offr,FALSE,FALSE),3,0, PO_GPR_REGISTER)); --- 7725,7732 ---- pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); } ! pic16_emitpcode(POC_RLNCFW, pic16_popGet(AOP(result),offr)); ! //pic16_emitpcode(POC_RLCFW, pic16_popGet(AOP(result),offr)); pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0x1f)); pic16_emitpcode(POC_BTFSC, pic16_newpCodeOpBit(pic16_aopGet(AOP(result),offr,FALSE,FALSE),3,0, PO_GPR_REGISTER)); *************** static void shiftR1Left2Result (operand *** 7841,7848 **** pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); } ! pic16_emitpcode(POC_RLCFW, pic16_popGet(AOP(result),offr)); ! pic16_emitpcode(POC_RLCFW, pic16_popGet(AOP(result),offr)); pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0x1f)); pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); break; --- 7841,7848 ---- pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); } ! pic16_emitpcode(POC_RLNCFW, pic16_popGet(AOP(result),offr)); ! //pic16_emitpcode(POC_RLCFW, pic16_popGet(AOP(result),offr)); pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0x1f)); pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); break; *************** static void shiftR1Left2Result (operand *** 7855,7873 **** case 5: pic16_emitpcode(POC_SWAPFW, pic16_popGet(AOP(left),offl)); ! pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0x0f)); pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); ! emitCLRC; ! pic16_emitpcode(POC_RRCF, pic16_popGet(AOP(result),offr)); break; case 6: ! pic16_emitpcode(POC_RLCFW, pic16_popGet(AOP(left),offl)); ! pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0x80)); pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); ! pic16_emitpcode(POC_RLCF, pic16_popGet(AOP(result),offr)); ! pic16_emitpcode(POC_RLCF, pic16_popGet(AOP(result),offr)); break; case 7: --- 7855,7873 ---- case 5: pic16_emitpcode(POC_SWAPFW, pic16_popGet(AOP(left),offl)); ! pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0x0e)); pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); ! //emitCLRC; ! pic16_emitpcode(POC_RRNCF, pic16_popGet(AOP(result),offr)); break; case 6: ! pic16_emitpcode(POC_RLNCFW, pic16_popGet(AOP(left),offl)); ! pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0x81)); pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); ! //pic16_emitpcode(POC_RLCF, pic16_popGet(AOP(result),offr)); ! pic16_emitpcode(POC_RLNCF, pic16_popGet(AOP(result),offr)); break; case 7: *************** static void shiftL2Left2Result (operand *** 8081,8087 **** pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr+MSB16)); pic16_emitpcode(POC_SWAPFW,pic16_popGet(AOP(left),offl)); pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); ! pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0xF0)); pic16_emitpcode(POC_XORWF, pic16_popGet(AOP(result),offr)); pic16_emitpcode(POC_ADDWF, pic16_popGet(AOP(result),offr+MSB16)); --- 8081,8087 ---- pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr+MSB16)); pic16_emitpcode(POC_SWAPFW,pic16_popGet(AOP(left),offl)); pic16_emitpcode(POC_MOVWF, pic16_popGet(AOP(result),offr)); ! pic16_emitpcode(POC_ANDLW, pic16_popGetLit(0x0F)); pic16_emitpcode(POC_XORWF, pic16_popGet(AOP(result),offr)); pic16_emitpcode(POC_ADDWF, pic16_popGet(AOP(result),offr+MSB16)); *************** static void shiftR2Left2Result (operand *** 8218,8224 **** pic16_emitpcode(POC_ANDLW,pic16_popGetLit(0x03)); if(sign) { pic16_emitpcode(POC_BTFSC, ! pic16_newpCodeOpBit(pic16_aopGet(AOP(result),offr+MSB16,FALSE,FALSE),1,0, PO_GPR_REGISTER)); pic16_emitpcode(POC_IORLW,pic16_popGetLit(0xfc)); } pic16_emitpcode(POC_XORFW,pic16_popGet(AOP(result),offr+MSB16)); --- 8218,8224 ---- pic16_emitpcode(POC_ANDLW,pic16_popGetLit(0x03)); if(sign) { pic16_emitpcode(POC_BTFSC, ! pic16_newpCodeOpBit(pic16_aopGet(AOP(result),offr,FALSE,FALSE),0,0, PO_GPR_REGISTER)); pic16_emitpcode(POC_IORLW,pic16_popGetLit(0xfc)); } pic16_emitpcode(POC_XORFW,pic16_popGet(AOP(result),offr+MSB16)); *************** static void shiftLLong (operand *left, o *** 8354,8360 **** pic16_emitpcode(POC_MOVFW,pic16_popGet(AOP(left),LSB+offr)); } ! if (size >= LSB+offr ){ if (same) { pic16_emitpcode(POC_ADDWF,pic16_popGet(AOP(left),LSB+offr)); } else { --- 8354,8360 ---- pic16_emitpcode(POC_MOVFW,pic16_popGet(AOP(left),LSB+offr)); } ! if (size > LSB+offr ){ if (same) { pic16_emitpcode(POC_ADDWF,pic16_popGet(AOP(left),LSB+offr)); } else { *************** static void shiftLLong (operand *left, o *** 8363,8369 **** } } ! if(size >= MSB16+offr){ if (same) { pic16_emitpcode(POC_RLCF, pic16_popGet(AOP(left),MSB16+offr)); } else { --- 8363,8369 ---- } } ! if(size > MSB16+offr){ if (same) { pic16_emitpcode(POC_RLCF, pic16_popGet(AOP(left),MSB16+offr)); } else { *************** static void shiftLLong (operand *left, o *** 8372,8378 **** } } ! if(size >= MSB24+offr){ if (same) { pic16_emitpcode(POC_RLCF, pic16_popGet(AOP(left),MSB24+offr)); } else { --- 8372,8378 ---- } } ! if(size > MSB24+offr){ if (same) { pic16_emitpcode(POC_RLCF, pic16_popGet(AOP(left),MSB24+offr)); } else {