gnupic: SDCC Pic Port
Subject:
Re: SDCC Pic Port
From:
Wojtek Zabolotny ####@####.####
Date:
14 Nov 2000 22:01:07 -0000
Message-Id: <20001114230256.A2044@wzab.nasz.dom>
On Tue, Nov 14, 2000 at 07:42:13AM -0600, Scott Dattalo wrote:
>
> It's obviously doing a little analysis to be able to determine that these two
> functions can share storage for their temporary variables.
>
In the last version I've used, that rule was very simple: the local
variables in functions which don't call other functions are overlayed.
The consequences were serious - every function using the float or even
int(*/) arithmetic could not use the data overlaying.
Below is the corresponding quotation from SDCCUdoc.txt
# For non-reentrant functions SDCC will try to reduce internal ram space
# usage by overlaying parameters and local variables of a function (if
# possible). Parameters and local variables of a function will be allocated
# to an overlayable segment if the function has no other function calls
# and the function is non-reentrant and the memory model is small. If
# an explicit storage class is specified for a local variable , it will
# NOT be overlayed.
# [...]
# Parameters and Local variables of functions that contain 16 or 32 bit
# multiplication or division will NOT be overlayed since these are implemented
# using external functions.
I've heard, that this is associated with the linker's limitations (?).
--
HTH & Regards
Wojciech Zabolotny
http://www.ise.pw.edu.pl/~wzab
http://www.debian.org Use Linux - save your data and time