> According to the datasheet, the C8051F120 has 256 B __idata memory that
> can be used for the stack. By default, SDCC uses the the 128B __data
> memory (the lower part half of __idata) for the stack. And indeed, when
> compiling a program using --model-large --stack-auto, it only uses
> __data and runs out of stack space soon.
> SDCC has the --xstack option to place the stack in the 256 B __pdata.
>
> But is using the 256 B __idata for the stack possible in SDCC?
>
> Philipp

SDCC already uses the full 256 bytes of __idata (minus registers, bits,
and allocated variables and spills in __data/__idata). I don't understand
why you believe it doesn't.

Using --xstack is less efficient than without. But it places return
addresses on normal stack and data on xstack. Further xstack can use the
full 256 bytes of __pdata. So it provides more stack space.

Maarten



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to