From: SourceForge.net <no...@so...> - 2003-02-04 18:46:11
|
Bugs item #521500, was opened at 2002-02-22 15:45 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=521500&group_id=599 Category: msc51(8051) target Group: None Status: Closed Resolution: None Priority: 5 Submitted By: Paul Stoffregen (pjs) Assigned to: Nobody/Anonymous (nobody) Summary: Available registers not utilited Initial Comment: This probably is more of a feature request than a bug... but here goes. When using mcs51 large memory model, local variables are often not allocated to unused registers, which leads to larger and slower code (and in the case of my little mp3 player project, a lot more external MOVX bus activity than necessary which temporarily suspend DMA transfers). Here's a code sample from the project, separated into a single self-contained file: http://www.pjrc.com/tmp/test.c In this case, there are two 16-bit local variables that are both allocated to external memory, even though the compiler only uses 4 of the 8 registers. When the code is compiled with small model, the locals are allocated very nicely to registers, and SDCC does a really nice job of packing it all into just 6 registers instead of 8. Is there any chance of getting this smarter register usage ported from small to large model? Thanks, Paul ---------------------------------------------------------------------- >Comment By: Johan Knol (johanknol) Date: 2003-02-04 18:52 Message: Logged In: YES user_id=63512 Sandeep fixed this a long time ago with fillInGaps() ---------------------------------------------------------------------- Comment By: Johan Knol (johanknol) Date: 2003-02-04 18:38 Message: Logged In: YES user_id=63512 Sandeep fixed this a long time ago with fillInGaps() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=521500&group_id=599 |