From: SourceForge.net <no...@so...> - 2005-03-14 01:29:57
|
Bugs item #1161927, was opened at 2005-03-12 14:00 Message generated for change (Comment added) made by vrokas You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1161927&group_id=599 Category: pic16 target Group: None Status: Open Resolution: None Priority: 6 Submitted By: riedel (riedel_teco) Assigned to: Nobody/Anonymous (nobody) Summary: call with cast argument: CLRF POSTDEC1 "sets" temp reg Initial Comment: SDCC : pic16 2.4.8 #970 (Mar 11 2005) (UNIX) The attached asm file was generated with this code: benchmarks[1]=read_benchmark_nofs(n); benchmarks[0]=read_benchmark_nofs(n); n is an unsigned char, read_benchmark takes an unsigned int (thus one byte can be simply cleared on call) the first call executes correctly the second call will lead to a set upper byte in the argument (former contents of temp reg). ---------------------------------------------------------------------- >Comment By: Vangelis Rokas (vrokas) Date: 2005-03-14 03:29 Message: Logged In: YES user_id=770505 Fixed in SDCC v.2.4.8 #972 ---------------------------------------------------------------------- Comment By: Vangelis Rokas (vrokas) Date: 2005-03-14 00:55 Message: Logged In: YES user_id=770505 Sorry for the last comment. It was sent unintentionally... Vangelis ---------------------------------------------------------------------- Comment By: Vangelis Rokas (vrokas) Date: 2005-03-14 00:42 Message: Logged In: YES user_id=770505 Can you reproduce this bug with the latest version of SDCC? If you still get it, please send the C source that generates this problem, because I cannot reproduce it. Vangelis ---------------------------------------------------------------------- Comment By: riedel (riedel_teco) Date: 2005-03-13 16:33 Message: Logged In: YES user_id=1212716 reproducable with: SDCC : pic16 2.4.8 #971 (Mar 13 2005) (UNIX) I prepared my sources so you can reproduce the effects with: sdcc -mpic16 -p18f6720 -c demo.c ---------------------------------------------------------------------- Comment By: Vangelis Rokas (vrokas) Date: 2005-03-13 12:01 Message: Logged In: YES user_id=770505 Can you reproduce this bug with the latest version of SDCC? If you still get it, please send the C source that generates this problem, because I cannot reproduce it. Vangelis ---------------------------------------------------------------------- Comment By: riedel (riedel_teco) Date: 2005-03-12 14:40 Message: Logged In: YES user_id=1212716 this seems to work around the problem The code at this level seems correct though, this probably meens that the bug persists at some other place. RCS file: /cvsroot/sdcc/sdcc/src/pic16/gen.c,v retrieving revision 1.80 diff -u -r1.80 gen.c --- src/pic16/gen.c 10 Mar 2005 15:09:48 -0000 1.80 +++ src/pic16/gen.c 12 Mar 2005 12:37:02 -0000 @@ -3309,9 +3309,9 @@ pic16_AopType(AOP_TYPE(IC_LEFT(sic)))); DEBUGpic16_emitcode("; ", "push %d", psuedoStkPtr-1); -// pushaop(AOP(IC_LEFT(sic)), size); - pic16_mov2w (AOP(IC_LEFT(sic)), size); - pushw(); + pushaop(AOP(IC_LEFT(sic)), size); +// pic16_mov2w (AOP(IC_LEFT(sic)), size); +// pushw(); } } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1161927&group_id=599 |