From: SourceForge.net <no...@so...> - 2008-02-01 12:02:43
|
Feature Requests item #1859849, was opened at 2007-12-28 20:48 Message generated for change (Comment added) made by maartenbrock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1859849&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: None Group: None Status: Open Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Volatile Direct Pointer not optimized Initial Comment: Accessing memory using a construct like (* (volatile xdata TestStruct *)0xF000).Var1 (where TestStruct is a struct) generates a load of unnecessary assembler instructions if another as the first variable is accessed. mov r2,#0x00 mov r3,#0xF0 mov dpl,r2 mov dph,r3 inc dptr mov a,#0x04 movx @dptr,a instead of mov dptr,#0xF001 mov a,#0x03 movx @dptr,a Please see the attached test file. ---------------------------------------------------------------------- >Comment By: Maarten Brock (maartenbrock) Date: 2008-02-01 13:02 Message: Logged In: YES user_id=888171 Originator: NO Apparently the result differs whether the struct is volatile or not. But this is not a result of the peephole optimizer. Rather the '+' operator is not optimized in the ast. This is no bug, because the generated code works perfectly though suboptimal. Therefor I move this to the feature requests. ---------------------------------------------------------------------- Comment By: Johann Glaser (hansiglaser) Date: 2007-12-28 20:56 Message: Logged In: YES user_id=14698 Originator: NO Oops, forgot to login before submitting the bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1859849&group_id=599 |