I recently extracted the CVS snapshot. I found a lot of changes in the code
as compared to 2.3.0. I am happy that this is much more stable now. I was
trying to figure out why the memory segments XINIT, XIDATA were introduced?,
but couldn't get them. Plese help.
From: Bernhard Held [mailto:bernhard@...]
Sent: Friday, April 26, 2002 3:32 PM
To: Royce & Sharal Pereira; SDCC list
Subject: Re: [Sdcc-user] SDCC v 2.3.0
> V2.3.1 works fine, thanks!!
> Some overhead code is generated by _sdcc_init_data which was not there in
> earlier versions. What does this code do?
> ; _mcs51_genXINIT() start
> mov a,#l_XINIT
> orl a,#l_XINIT>>8
> jz 00003$
> mov a,#s_XINIT
> add a,#l_XINIT
> mov r1,a
> mov a,#s_XINIT>>8
> addc a,#l_XINIT>>8... etc....
This initializes data in XRAM at startup. If you define e.g.
xdata char str = "This is a real long and boring text!";
SDCC 2.3.0 generated very inefficient code:
mov dptr,#(_str + 0x0001)
mov dptr,#(_str + 0x0002)
SDCC 2.3.1 gathers these data in special segments, so that it can be
initialized in a short., efficient loop.
Sdcc-user mailing list
Get latest updates about Open Source Projects, Conferences and News.