From: SourceForge.net <no...@so...> - 2004-11-29 16:23:59
|
Feature Requests item #1017497, was opened at 2004-08-27 12:37 Message generated for change (Comment added) made by maartenbrock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1017497&group_id=599 Category: None Group: None Status: Open Priority: 1 Submitted By: Frieder Ferlemann (frief) Assigned to: Nobody/Anonymous (nobody) Summary: 256 byte arrays into paged area? Initial Comment: Hi, it would be nice if char arrays of 256 byte length were automagically allocated to a paged (256 byte aligned) area: .area XBSEG (XDATA,PAG) This might allow to reduce the overhead for an xdata array access xdata unsigned char buf[256]; From: ; buf[ head ] = c; ; genPlus mov a,_head add a,#_buf mov dpl,a clr a addc a,#(_buf >> 8) mov dph,a mov a,r2 movx @dptr,a Down to: ; buf[ head ] = c; ; genPlus ; genPlus aligned array mov dpl,_head mov dph,#(_buf >> 8) mov a,r2 movx @dptr,a (SDCC generates this code if an absolute address like "at 0x8000" was specified for the array. This request is somewhat similar to RFE #774501 but it doesn't require an additional keyword) ---------------------------------------------------------------------- >Comment By: Maarten Brock (maartenbrock) Date: 2004-11-29 17:23 Message: Logged In: YES user_id=888171 Looked into this. It's probably not so hard to make the linker move such arrays to the front of the list and thereby allocating them to page boundaries. This assumes xdata starts at a page boundary. (Not true if pdata is used and <256 and no xstack. Also not true if --xram-loc says so.) But the problem is that the compiler doesn't know all this. So a special keyword might be in place. Maybe something like "at page" instead of "at 0x0000"? ---------------------------------------------------------------------- Comment By: Frieder Ferlemann (frief) Date: 2004-10-19 18:36 Message: Logged In: YES user_id=589052 Hi Maarten, thanks a lot for adding pdata access!) !) When I filed this request, I had buffers (like those two 256 byte buffers in sdcc/device/lib/serial.c) in my mind. I wouldn't want to loose the newly won memory space for only one of those buffers;) ---------------------------------------------------------------------- Comment By: Maarten Brock (maartenbrock) Date: 2004-10-19 14:02 Message: Logged In: YES user_id=888171 Feel free to store it in pdata instead of xdata ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1017497&group_id=599 |