Hi, wanted to thank all of you for your rapid and excellent help!
Compiling with --nogcse made everything work, with a 5% (if not more) 
codesize increase, which put me right up to full.  Reading the docs and 
using #pragma to turn it off for my (pretty long) main() solved it with 
little codesize increase.

Back on track!
Thanks again everyone.

Now for a 2nd question... I recently fixed a bug due to what I think is 
incorrect type promotion.  Given the polish SDCC has I suspect it is my 
misunderstanding, but I wanted to ask.

unsigned long var32;
unsigned short var16;

If I do this:

var32= var16 * 60;

I get a 16-bit multiply, not a 32-bit.  This caused an overflow and a 
bug.  doing this:

var32= *(unsigned long)var16) * 60;

solves that.

But, I thought that there was automatic type promotion such that if the 
l-value is 32bits, then var16 would be promoted to 32bits prior to the 
multiply.  Am I just wrong here?  Is there any way to make SDCC do it 
that way?  I'd rather waste some codespace/execution speed and never 
have an unanticipated overflow...

Thanks all
J



> Message: 3 Date: Tue, 09 Sep 2008 11:31:31 -0500 From: Bobby Garner
> <[EMAIL PROTECTED]> Subject: Re: [Sdcc-user] Emergency help... linker
> memory error with DSEG To: sdcc-user@lists.sourceforge.net 
> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain;
> charset="iso-8859-1"
> 
> 'Spill loactions' is mentioned one time in the manual: "3.2.8
> Optimization Options --nogcse Will not do global subexpression
> elimination, this option may be used when the compiler creates 
> undesirably large stack/data spaces to store compiler temporaries
> (spill locations, sloc). A warning message will be generated when
> this happens and the compiler will indicate the number of extra bytes
>  it allocated. It is recommended that this option NOT be used,
> #pragma nogcse can be used to turn off global subexpression
> elimination for a given function only."
> 
> Would it help to use this option, maybe as a test?
> 
> Bobby
> 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to