From: <no...@so...> - 2002-04-07 03:37:03
|
Bugs item #540417, was opened at 2002-04-06 18:37 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=100599&aid=540417&group_id=599 Category: ds390 target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Karl Bongers (kbongers) Assigned to: Nobody/Anonymous (nobody) Summary: dual dptr misuse Initial Comment: genPlus, genAssign load up result into dptr1 while it is still being used as a pointer. typedef struct { int head_size; //int mac_head_size; int length; int data_length; PDBYTE buf; // ptr to start of ip PDBYTE macbuf; // ptr to start of raw ethernet buf } Ip_Data; data word temp; <cut> void rx_icmp(Ip_Data XDATA *ip) { <cut> LINE 1307: temp = ip->data_length/2; LINE 1308: dbg_str(" dlen: "); CODE GENERATED: ; eth.c:1307: temp = ip->data_length/2; ; genPlus mov dptr,#_rx_icmp_ip_1_1 ; Swapped plus args. movx a,@dptr add a,#0x04 mov dpl1,a inc dptr movx a,@dptr addc a,#0x00 mov dph1,a inc dptr movx a,@dptr addc a,#0x00 mov dpx1,a ; genPointerGet ; genFarPointerGet inc dps movx a,@dptr inc dptr mov dpl1,a <--- dpl1 & dph1 in use, can't use! movx a,@dptr mov dph1,a mov dps,#0 ; genAssign ; genAssign: resultIsFar = TRUE mov dptr,#__divsint_PARM_2 mov a,#0x02 movx @dptr,a clr a inc dptr movx @dptr,a ; genCall ; genSend argreg = 1, size = 2 mov dpl,dpl1 mov dph,dph1 lcall __divsint ; genAssign ; genAssign: resultIsFar = FALSE mov _temp,dpl mov (_temp + 1),dph ; eth.c:1308: dbg_str(" dlen: "); ; genCall ; genSend argreg = 1, size = 4 ; Peephole 182b used 24 bit load of DPTR mov dptr,#__str_0 mov b,#0x02 lcall _tx_str ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=100599&aid=540417&group_id=599 |