From: SourceForge.net <no...@so...> - 2008-03-28 10:58:23
|
Bugs item #1921073, was opened at 2008-03-20 14:57 Message generated for change (Comment added) made by patryks You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1921073&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: mcs51(8051) target Group: fixed Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Patryk (patryks) Assigned to: Maarten Brock (maartenbrock) Summary: Bad code when casting from code to generic ptr in 2.8.0 RC1 Initial Comment: SDCC 2.8.0 RC1 #5082 (also #5108) generates incorrect code, was OK in 2.7.4 #4972. Third byte of generic pointer is set incorrectly (0 - XDATA) or not set at all (f2() call). There are other places in my sources where it is copied from B register that is not set before. This bug may be related to #1839277: Implicit typecast from code to generic pointer is wrong void f1(char c, const void * p); void f2(const void * p); void g(void) { f1(5, (code void *)0x1234); f2((code void *)0x1234); } mov _f1_PARM_2,#0x34 mov (_f1_PARM_2 + 1),#0x12 mov (_f1_PARM_2 + 2),#0x00 mov dpl,#0x05 lcall _f1 mov dptr,#0x1234 ljmp _f2 SDCC version: mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5082 (Mar 9 2008) (MINGW32) command line: sdcc.exe -c --debug --use-stdout -V --std-sdcc99 -I... Source7.c WXP HE PL SP2, AMD Athlon XP 1700+ ---------------------------------------------------------------------- >Comment By: Patryk (patryks) Date: 2008-03-28 11:58 Message: Logged In: YES user_id=1788180 Originator: YES I confirm: every place affected by this bug in my code is now (RC2 - #5117) compiled properly: same result as with #4972. ---------------------------------------------------------------------- Comment By: Maarten Brock (maartenbrock) Date: 2008-03-20 20:39 Message: Logged In: YES user_id=888171 Originator: NO Fixed in revision #5109. ---------------------------------------------------------------------- Comment By: Borut Ražem (borutr) Date: 2008-03-20 17:20 Message: Logged In: YES user_id=568035 Originator: NO This bug was introduced in svn revision #5009 as side effect of fixing bug #1281583: code pointer array referencing Maarten, can you take a look ASAP? Borut ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1921073&group_id=599 |