Additional information...

With:

#pragma stack_cleanup on

in the code, there appears to be 1 additional assemply instruction added to
each function:

00000xxx: 4FEF 0014          lea       20(a7),a7

after the sysTrapFlpEmDispatch instruction.

However, the use of stack relative to A6 appears to be the same as it was
with the stack clean up set off.  Which still leads me to believe that the
expressions are using more stack space than necessary.

Ed

----- Original Message -----
From: "M. Edward Wilborne III" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Saturday, September 09, 2000 11:26 AM
Subject: CodeWarrior Compiler Glitch with temporary stack space?


> I apologize for the long nature of this message (with the assembly code in
> it, well it gets pretty large).
>
> This is just a snippet of working code, please disregard the fact that it
> returns no useful result.  It is intended as an example only.
>
> I was compiling a much larger version of this function ("useful results
> version") and kept having problems with stack overflows on Palm OS 3.0,
and
> 2.0, but the function would work fine on Palm OS 3.5.
>
> After taking a look at the disassembled version of the code, and trying to
> make heads of tails of what is going on, the conclusion that I have come
up
> with is that CodeWarrior is setting aside space on the stack for temporary
> or intermediate results, but doesn't appear to resuse that space once an
> expression is done with the intermediate result.  If you pile a bunch of
> expressions into the function, then codewarrior allocates a larger amount
of
> stack space, and eventually you can overflow the stack.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to