From: SourceForge.net <no...@so...> - 2005-07-01 23:56:12
|
Bugs item #637944, was opened at 2002-11-13 19:39 Message generated for change (Comment added) made by tecodev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=637944&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pic14 target >Group: unreproducable Status: Open >Resolution: Works For Me Priority: 7 Submitted By: Rasmus Kjeldsen (rasmuskjeldsen) Assigned to: Scott Dattalo (sdattalo) Summary: Missing bank switch in one bit and/or Initial Comment: When doing _one_ bit bitwise and/or, needed bank switches is not inserted. Example: PORTA|=0x01; TRISA|=0x01; // or TRISA&=0xfe; Compiles to: ; PORTA|=0x01; BSF _PORTA,0 ;#CSRC test.c 51 ; TRISA|=0x01; BSF _TRISA,0 It should have compiled to: ; PORTA|=0x01; BSF _PORTA,0 BSF _STATUS,5 ;#CSRC test.c 51 ; TRISA|=0x01; BSF _TRISA,0 BCF _STATUS,5 Below is a patch agains the CVS from 13/11-02, which fixes the bug. I don't fully understand the compiler code yet, so it might have unpleasent side effects though. --- sdcc/src/pic/pcode.c 2002-08-09 16:28:53.000000000 +0200 +++ sdcc.oneBitAndOrPatch/src/pic/pcode.c 2002-11-13 20:11:31.000000000 +0100 @@ -3268,7 +3268,8 @@ //return NULL; // PCOR(PCI(pc)->pcop)->r; case PO_GPR_BIT: - return PCOR(PCI(pc)->pcop)->r; + return dirregWithName(PCI(pc)->pcop->name); +// return PCOR(PCI(pc)->pcop)->r; case PO_DIR: //fprintf(stderr, "getRegFromInstruction - dir\n"); ---------------------------------------------------------------------- >Comment By: Raphael Neider (tecodev) Date: 2005-07-01 23:56 Message: Logged In: YES user_id=1115835 Works with SDCC 2.5.1 #1053. I will close this in less than two years time if nobody disagrees ;-) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=637944&group_id=599 |