From: Karl B. <ka...@tu...> - 2000-08-25 21:09:03
|
Dai, Here is a message from Sandeep which was on the list a few days ago. A number of people have noticed this "overflow spill" of temporary variables problem. You might be able to fix this by careful examination of your map, and rellocating various ram usage, by command line switches, etc. A more drastic approach is to change the coding style: Use functions with 1 parameter only, take a look at where the temporary vars are being made in the assembly .lst and based on this try to simplify the code in this area. Switching to a commercial compiler might be a solution, I don't know as I don't have much experience with them other than INTELS original PLM compiler. Which by the way, would generate similiar overflow problems once the code got large. We have PLM code that has function parameters elliminated and changed to global variables(yuk)... I was using a free limited trial version of the Keil compiler with the cool USB/MCS51 chip from Anchor(now owned by Cypress) for a short time. I would like to find time to run some complex code threw this compiler to see how it compares. Can anyone comment on experience? In general I think this is a tough problem to solve for the compiler coders, given the 8051 hardware. On the one hand you want to make something work efficiently for a small 8051 with only 128 bytes of ram, on the other you have designs with lots of external RAM/ROM, and programs trying to use floats and longs on a processor with just a handful of byte sized registers and a undersized stack. Karl. -------------------- From: "Sandeep Dutta" <sa...@dd...> To: "'Dai Yuwen'" <yu...@mi...>, <sdc...@li...> Subject: RE: [Sdcc-user] How to prevent DSEG from expanding over ISEG? Date: Tue, 22 Aug 2000 15:43:39 -0700 X-MSMail-Priority: Normal Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Sender: sdc...@li... Errors-To: sdc...@li... X-Mailman-Version: 1.1 List-Id: <sdcc-user.lists.sourceforge.net> X-BeenThere: sdc...@li... Hello Dai Yuwen Try compiling with --noloopinvariant & --noloop-induction options these typically increase the spils, Will shortly provide options to disable optimizations selectively. Also will provide infrastructure to reduce spills automatically. This is becoming more more of a serious issue as people try to compile larger & larger programs. Regards Sandeep -----Original Message----- From: sdc...@li... [mailto:sdc...@li...]On Behalf Of Dai Yuwen Sent: Tuesday, August 22, 2000 3:58 AM To: sdc...@li... Subject: [Sdcc-user] How to prevent DSEG from expanding over ISEG? Hi, I use SDCC to compile a large program. There're so many local variables located in the DSEG that some of them have addresses large than 0x80 which is the start address of ISEG. Then the generated asm code may be invalid: mov local, A where local is namely in DSEG and its address is 0xD8. However, we know that direct memory address above 0x80 is invalid in 8051. In order to force SDCC to put local variables in XSEG, I used the "module-large" option. But in vain. DSEG still expanded over ISEG. Some one can help? Thanks in advance. Dai Yuwen |