From: SourceForge.net <no...@so...> - 2003-11-20 18:49:55
|
Feature Requests item #846027, was opened at 2003-11-20 21:49 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=846027&group_id=599 Category: None Group: None Status: Open Priority: 5 Submitted By: Stas Sergeev (stsp) Assigned to: Nobody/Anonymous (nobody) Summary: Allocate unused reg banks even when bit vars exist Initial Comment: Hi. There seem to be a problem (almost a bug, actually, given that we have only 256 bytes of data to use, it is more severe than some bugs are:) that the unused register banks are allocated for data only if there is no bit variables defined. It is very inefficient to use "char" instead of "bit", but loosing 24 bytes is even worse, so I have to use "char" when "bit" is enough. The following example demonstrates the problem: --- char a[20]; bit b; int main() { return a[0]; } --- The .mem file contains the following: --- DATA 0x21 0x34 20 128 ---------------- -------- -------- -------- -------- TOTAL: 0x00 0x34 29 128 Stack starts at: 0x35 (sp set to 0x34) with 203 bytes available --- But should I remove the "bit b;" line, and the .mem file contains: --- DATA 0x08 0x1b 20 128 ---------------- -------- -------- -------- -------- TOTAL: 0x00 0x1b 28 128 Stack starts at: 0x1c (sp set to 0x1b) with 228 bytes available --- Very annoying. My current work-around is to do a manual data storing using an "at" keyword to fill the gap of 24 bytes. Can this please be improved? I hope I am not missing something obvious and it is not the matter of some command-line option, or is it? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=846027&group_id=599 |