* src/SDCCglue.c (tempfileandname): changed un*x tmp search paths to /tmp and /var...
[fw/sdcc] / ChangeLog
1 2006-10-06 Bernhard Held <bernhard AT bernhardheld.de>
2
3         * src/SDCCglue.c (tempfileandname): changed un*x tmp search paths
4         to /tmp and /var/tmp acc. LSB
5         * src/SDCCast.c (addCast): Fixed bug 1571231: promote in case of
6         RESULT_TYPE_IFX
7         * support/regression/tests/onebyte.c: added test
8
9 2006-10-05 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
10
11         * src/mcs51/gen.c: emitcode for "add a,0x%02x" requires only 8 bits.
12
13 2006-10-05 Borut Razem <borut.razem AT siol.net>
14
15         * partially fixed [ 1570701 ] peephole - not replacing code from multiline macros,
16           thanks to dfulab:
17           - sdcc.dsw: changed property eol-style to CRLF
18           - support/scripts/resource.rc: replaced references to "afxres.h" with "winres.h"
19
20 2006-10-04 Raphael Neider <rneider AT web.de>
21
22         * device/include/pic/{pic16f84.h,pic16f84a.h},
23         * device/lib/pic/libdev/{pic16f84.c,pic16f84a.c}: added PORT[AB]_bits
24           from patch #1522504, thanks to Robas Teodor
25
26 2006-10-02 Maarten Brock <sourceforge.brock AT dse.nl>
27
28         * as/link/z80/lkarea.c: essentially reverted lnksect() to #4380 which
29           fixes bug 1566015
30
31 2006-10-01 Maarten Brock <sourceforge.brock AT dse.nl>
32
33         * src/pic16/glue.c (pic16emitMaps),
34         * src/pic/glue.c (pic14emitMaps): hopefully fixed bug 1568779
35         * device/lib/gets.c: fixed bug 1568829,thanks Philipp Krause
36         * device/lib/pic16/libc/string/memcpypgm2ram.c,
37         * device/lib/pic16/libc/string/memcpyram2ram.c: fixed bug 1568836, thanks
38           Philipp Krause
39         * as/mcs51/asmain.c (asmbl, newdot): fixed problems with absolute areas
40         * as/link/mcs51/lkmem.c (summary2): reverted, do do count abs segments
41
42 2006-09-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
43
44         * support/librarian/sdcclib.c: Added option -l.
45         * as/link/mcs51/lkmem.c: don't use absolute segments to compute memory
46           usage totals.
47         * device/lib/make51lib.bat: added.  Allows building mcs51 libraries easily
48           using Windows command prompt.
49
50 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
51
52         * device/lib/libsdcc.lib: added module rand
53         * src/ds390/ralloc.c (rematStr),
54         * src/hc08/ralloc.c (rematStr),
55         * src/mcs51/ralloc.c (rematStr),
56         * src/z80/ralloc.c (rematStr): made output more consistent
57         * src/mcs51/gen.c: cosmetic changes
58
59 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
60
61         * src/port.h: added mem.cabs_name to PORT
62         * src/ds390/main.c,
63         * src/hc08/main.c,
64         * src/mcs51/main.c,
65         * src/pic16/main.c,
66         * src/pic/main.c,
67         * src/xa51/main.c,
68         * src/z80/main.c: added cabs_name initializers
69         * src/SDCCglue.c (emitStaticSeg): allocate and initialize absolute
70           constants
71           (emitMaps): emit absolutes in code memory into cabs_name
72         * src/SDCCmem.c,
73         * src/SDCCmem.h: added memory map c_abs and defined CABS_NAME
74         * src/ds390/gen.c (genCodePointerGet): fixed bug if left is a literal
75         * support/regression/fwk/include/testfwk.h: added define for at
76         * support/regression/tests/absolute.c: added, new
77
78 2006-09-29 Maarten Brock <sourceforge.brock AT dse.nl>
79
80         * src/mcs51/gen.c (genPlusIncr, genMinusDec, genAddrOf): small
81           optimizations, see also patch 887161 by Stas Sergeev
82         * src/mcs51/peeph.def(104, 207, 209, 212): disabled as they do not seem
83           to be necessary anymore,
84           (102, 103, 104, 127): renamed all occurances of bp to _bp
85
86 2006-09-27 Maarten Brock <sourceforge.brock AT dse.nl>
87
88         * device/include/mcs51/at89c51snd1c.h: fixed MSK_SREQ definition
89           thanks Weston T. Schmidt for patch 1555221
90         * src/mcs51/peeph.def: renamed rule 257 to 257.a, added 257.b
91         * src/SDCCicode.c(geniCodeMultiply): small optimization
92
93 2006-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
94
95         * device/include/stdlib.h: added rand prototypes
96         * device/lib/rand.c: new, added
97         * device/lib/Makefile.in: added rand.c
98         * src/z80/peeph.def,
99         * src/z80/peeph-gbz80.def,
100         * src/z80/peeph-z80.def: updated conditonals, fixed bug 1565908
101
102 2006-09-20 Raphael Neider <rneider AT web.de>
103
104         * device/lib/pic16/libio/i2c/i2cnack.c (i2c_nack): fixed ACKDT bit
105
106 2006-09-19 Maarten Brock <sourceforge.brock AT dse.nl>
107
108         * as/link/aslink.h: cosmetic changes
109         * as/link/mcs51/Makefile.in,
110         * as/link/z80/Makefile.in: fixed build on CF where VPATH is used
111
112 2006-09-17 Maarten Brock <sourceforge.brock AT dse.nl>
113
114         * as/link/aslink.h,
115         * as/link/mcs51/aslink.h,
116         * as/link/z80/aslink.h: merged and moved to as/link/
117         * as/link/lkstore.c,
118         * as/link/mcs51/lkstore.c: moved to as/link/
119         * as/link/clean.mk: remove *.o
120         * as/link/mcs51/alloc.h: deleted
121         * as/link/mcs51/lkarea.c: added lnksect prototype
122         * as/link/mcs51/lkdata.c,
123         * as/link/mcs51/lklex.c,
124         * as/link/mcs51/lkmain.c: renamed as_getline to lk_getline
125         * as/link/mcs51/lkmem.c,
126         * as/link/mcs51/lknoice.c: removed include strcmpi.h
127         * as/link/mcs51/lksym.c: include stdlib.h instead of malloc.h or alloc.h
128         * as/link/mcs51/aslink.dsp,
129         * as/link/mcs51/Makefile.aslink,
130         * as/link/mcs51/Makefile.bcc,
131         * as/link/mcs51/Makefile.in: updated for moved files
132         * as/link/z80/lkarea.c,
133         * as/link/z80/lkhead.c,
134         * as/link/z80/lklex.c,
135         * as/link/z80/lklibr.c,
136         * as/link/z80/lklist.c,
137         * as/link/z80/lkmain.c,
138         * as/link/z80/lkrloc.c,
139         * as/link/z80/lksym.c: synced with mcs51
140         * as/link/z80/lkdata.c,
141         * as/link/z80/lkeval.c,
142         * as/link/z80/lkihx.c,
143         * as/link/z80/lks19.c: cosmetic changes
144         * as/link/z80/Makefile.in,
145         * as/link/z80/linkgbz80.dsp,
146         * as/link/z80/linkz80.dsp: updated for moved files
147
148 2006-09-16 Borut Razem <borut.razem AT siol.net>
149
150         * debugger/mcs51/sdcdb.c: partially fixed
151           [ 1203664 ] sdcdb fails to open files w. two "." periods
152         * debugger/mcs51/simi.c, debugger/mcs51/symtab.c,
153           debugger/mcs51/symtab.h: fixed indenting
154         * configure.in, configure: up to date with latest Maarten's changes
155
156 2006-09-15 Maarten Brock <sourceforge.brock AT dse.nl>
157
158         as/link/mcs51
159         as/aslink.dsp,                  as/link/mcs51/aslink.dsp,
160         as/link/mcs51/aslink.h,         as/mcs51/aslink.h,
161         as/link/mcs51/aslink.mak,       as/mcs51/aslink.mak,
162         as/link/mcs51/lkaomf51.c,       as/mcs51/lkaomf51.c,
163         as/link/mcs51/lkarea.c,         as/mcs51/lkarea.c,
164         as/link/mcs51/lkdata.c,         as/mcs51/lkdata.c,
165         as/link/mcs51/lkeval.c,         as/mcs51/lkeval.c,
166         as/link/mcs51/lkhead.c,         as/mcs51/lkhead.c,
167         as/link/mcs51/lkihx.c,          as/mcs51/lkihx.c,
168         as/link/mcs51/lklex.c,          as/mcs51/lklex.c,
169         as/link/mcs51/lklibr.c,         as/mcs51/lklibr.c,
170         as/link/mcs51/lklist.c,         as/mcs51/lklist.c,
171         as/link/mcs51/lkmain.c,         as/mcs51/lkmain.c,
172         as/link/mcs51/lkmem.c,          as/mcs51/lkmem.c,
173         as/link/mcs51/lknoice.c,        as/mcs51/lknoice.c,
174         as/link/mcs51/lkrloc.c,         as/mcs51/lkrloc.c,
175         as/link/mcs51/lks19.c,          as/mcs51/lks19.c,
176         as/link/mcs51/lkstore.c,        as/mcs51/lkstore.c,
177         as/link/mcs51/lksym.c,          as/mcs51/lksym.c,
178         as/link/mcs51/Makefile.aslink,  as/mcs51/Makefile.aslink,
179         as/link/mcs51/alloc.h,
180         as/link/mcs51/clean.mk,
181         as/link/mcs51/conf.mk,
182         as/link/mcs51/Makefile.bcc,
183         as/link/mcs51/Makefile.in,
184         as/link/mcs51/readme.390,
185         as/link/mcs51/strcmpi.c,
186         as/link/mcs51/strcmpi.h,
187         as/mcs51/clean.mk,
188         as/mcs51/Makefile.bcc,
189         as/mcs51/Makefile.in,
190         configure,
191         Makefile.in,
192         sdcc.dsw: moved mcs51 linker to as/link/mcs51
193
194 2006-09-14 Maarten Brock <sourceforge.brock AT dse.nl>
195
196         * as/link,
197         * as/link/Makefile.in,
198         * as/link/z80/linkgbz80.dsp,
199         * as/link/z80/linkz80.dsp,
200         * configure,
201         * link,
202         * link/clean.mk,
203         * link/Makefile.in,
204         * link/README,
205         * link/z80,
206         * link/z80/aslink.h,
207         * link/z80/clean.mk,
208         * link/z80/conf.mk,
209         * link/z80/linkgbz80.dsp,
210         * link/z80/linkz80.dsp,
211         * link/z80/lkarea.c,
212         * link/z80/lkdata.c,
213         * link/z80/lkeval.c,
214         * link/z80/lkgb.c,
215         * link/z80/lkgg.c,
216         * link/z80/lkhead.c,
217         * link/z80/lkihx.c,
218         * link/z80/lklex.c,
219         * link/z80/lklibr.c,
220         * link/z80/lklist.c,
221         * link/z80/lkmain.c,
222         * link/z80/lkrloc.c,
223         * link/z80/lks19.c,
224         * link/z80/lksym.c,
225         * link/z80/Makefile.in,
226         * Makefile.in,
227         * sdcc.dsw: moved link/ to as/link/
228
229 2006-09-11 Maarten Brock <sourceforge.brock AT dse.nl>
230
231         * as/mcs51/i51mch.c (machine): fixed warning
232
233 2006-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
234
235         * as/mcs51/i51mch.c (machine): S_DJNZ fixed bug 1554318
236
237 2006-09-09 Borut Razem <borut.razem AT siol.net>
238
239         * debugger/mcs51/sdcdb.c, debugger/mcs51/simi.c:
240           sdcdb WIN32 native port
241         * src/clean.mk: fixed
242
243 2006-09-08 Borut Razem <borut.razem AT siol.net>
244
245         * doc/sdccman.lyx: SDCDB and ucSim are available on Win32 platforms.
246
247 2006-09-08 Raphael Neider <rneider AT web.de>
248
249         * src/pic16/main.c (_pic16_linkEdit,pic16_linkCmd),
250         * src/pic/main.c(_pic14_do_link, linkCmd): pass "-w" and "-r"
251             to gplink to disable processor mismatch warning and to allow
252             the use of devices with only aliased (shared) memory banks,
253           (_pic16_genAssemblerPreamble): include pXXX.inc on --mplab-comp
254
255 2006-09-07 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
256
257         * doc/sdccman.lyx: Some re-formating plus example on using
258           #pragma preproc_asm +/-
259
260 2006-09-07 Borut Razem <borut.razem AT siol.net>
261
262         * support/scripts/sdcc.nsi: added SDCDB executables in a separate
263           section
264
265 2006-09-06 Borut Razem <borut.razem AT siol.net>
266
267         * support/scripts/sdcc.nsi: fixed Error: unterminated string parsing
268           line at sdcc.nsi:153
269         * sdcc/debugger/mcs51/simi.c: argsToCmdLine() fixes
270
271 2006-09-05 Borut Razem <borut.razem AT siol.net>
272
273         * configure.in, configure: support for winsock2
274         * debugger/mcs51/break.h, debugger/mcs51/cmd.c,
275           debugger/mcs51/cmd.h, debugger/mcs51/sdcdb.c,
276           debugger/mcs51/sdcdb.h, debugger/mcs51/simi.c,
277           debugger/mcs51/simi.h, debugger/mcs51/symtab.c,
278           debugger/mcs51/symtab.h: sdcdb WIN32 native port
279
280 2006-09-05 Maarten Brock <sourceforge.brock AT dse.nl>
281
282         * src/SDCCopt.c (cnvToFcall): fixed bug 1551947 by updating OP_USES
283           and OP_DEFS
284         * support/regression/tests/bug1551947.c: new, added
285         * src/SDCCsymt.h: strings are char* not byte*
286
287 2006-09-05 Raphael Neider <rneider AT web.de>
288
289         * device/lib/pic16/libdev/pic18f4550.c,
290           device/include/pic16/pic18f4550.h: added PORTD/TRISD
291             declarations/definitions from patch #1520949
292
293 2006-09-05 Raphael Neider <rneider AT web.de>
294
295         * src/pic16/gen.c (genPackBits): fix assignment to 8-bit,
296           byte-aligned bitfields, fixes #1539278
297
298 2006-09-05 Raphael Neider <rneider AT web.de>
299
300         * src/pic/gen.c (genReceive): skip unreferenced arguments,
301           fixes #1544120
302
303 2006-09-04 Borut Razem <borut.razem AT siol.net>
304
305         * support/scripts/sdcc.nsi: move ucSim executables to a separate section
306         * support/scripts/sdcc_cygwin_mingw32: don't disable ucsim,
307           -mno-cygwin is a part of the compiler name
308         * support/scripts/sdcc_mingw32: don't disable ucsim
309
310 2006-09-03 Borut Razem <borut.razem AT siol.net>
311
312         * sdcc.spec: corrected for 2.6.0. Thanks to Christer Weinigel.
313         * device/lib/Makefile.in device/lib/clean.mk: small but essential corrections
314
315 2006-09-03 Raphael Neider <rneider AT web.de>
316
317         * src/pic/ralloc.c,
318         * src/pic/pcode.c (InitReuseRegs): allocate registers with pseudo
319           indices >= 0x1000 to disambiguate them from fixed regs __at(addr),
320           fixes #1550049
321
322 2006-09-01 Borut Razem <borut.razem AT siol.net>
323
324         * sim/ucsim/cmd.src/cmdutil.cc: #include <sys/time.h> and <unistd.h>
325           to make ppc-osx happy
326
327 2006-08-31 Borut Razem <borut.razem AT siol.net>
328
329         * sim/ucsim/cmd.src/newcmdposix.cc: #include <assert.h>
330         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
331         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
332         * support/regression/ports/ds390/spec.mk,
333           support/regression/ports/mcs51/spec.mk,
334           support/regression/ports/xa51/spec.mk: introduced DEV_NULL variable.
335           To run regression tests in mingw environment:
336           make DEV_NULL=NUL CC=gcc
337
338 2006-08-30 Borut Razem <borut.razem AT siol.net>
339
340         * sim/ucsim/cmd.src/newcmdposix.cc, sim/ucsim/cmd.src/newcmdposixcl.h,
341           sim/ucsim/cmd.src/newcmdwin32.cc, sim/ucsim/cmd.src/newcmdwin32cl.h,
342           sim/ucsim/app.cc, sim/ucsim/appcl.h, sim/ucsim/configure,
343           sim/ucsim/configure.in, sim/ucsim/ddconfig_in.h, sim/ucsim/error.cc,
344           sim/ucsim/errorcl.h, sim/ucsim/option.cc, sim/ucsim/optioncl.h,
345           sim/ucsim/utils.cc, sim/ucsim/utils.h, sim/ucsim/cmd.src/Makefile.in,
346           sim/ucsim/avr.src/avr.cc, sim/ucsim/avr.src/avrcl.h,
347           sim/ucsim/cmd.src/bp.cc, sim/ucsim/cmd.src/bpcl.h,
348           sim/ucsim/cmd.src/cmdconf.cc, sim/ucsim/cmd.src/cmdgui.cc,
349           sim/ucsim/cmd.src/cmdmem.cc, sim/ucsim/cmd.src/cmdset.cc,
350           sim/ucsim/cmd.src/cmdsetcl.h, sim/ucsim/cmd.src/cmdstat.cc,
351           sim/ucsim/cmd.src/cmduc.cc, sim/ucsim/cmd.src/cmduccl.h,
352           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
353           sim/ucsim/cmd.src/command.cc, sim/ucsim/cmd.src/commandcl.h,
354           sim/ucsim/cmd.src/get.cc, sim/ucsim/cmd.src/getcl.h,
355           sim/ucsim/cmd.src/info.cc, sim/ucsim/cmd.src/newcmd.cc,
356           sim/ucsim/cmd.src/newcmdcl.h, sim/ucsim/cmd.src/set.cc,
357           sim/ucsim/cmd.src/show.cc, sim/ucsim/cmd.src/timer.cc,
358           sim/ucsim/hc08.src/hc08.cc, sim/ucsim/hc08.src/hc08cl.h,
359           sim/ucsim/s51.src/Makefile.in, sim/ucsim/s51.src/interrupt.cc,
360           sim/ucsim/s51.src/interruptcl.h, sim/ucsim/s51.src/pca.cc,
361           sim/ucsim/s51.src/pcacl.h, sim/ucsim/s51.src/port.cc,
362           sim/ucsim/s51.src/portcl.h, sim/ucsim/s51.src/serial.cc,
363           sim/ucsim/s51.src/serialcl.h, sim/ucsim/s51.src/timer0.cc,
364           sim/ucsim/s51.src/timer0cl.h, sim/ucsim/s51.src/timer1.cc,
365           sim/ucsim/s51.src/timer1cl.h, sim/ucsim/s51.src/timer2.cc,
366           sim/ucsim/s51.src/timer2cl.h, sim/ucsim/s51.src/uc390.cc,
367           sim/ucsim/s51.src/uc390cl.h, sim/ucsim/s51.src/uc390hw.cc,
368           sim/ucsim/s51.src/uc390hwcl.h, sim/ucsim/s51.src/uc51.cc,
369           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/wdt.cc,
370           sim/ucsim/s51.src/wdtcl.h, sim/ucsim/sim.src/hw.cc,
371           sim/ucsim/sim.src/hwcl.h, sim/ucsim/sim.src/mem.cc,
372           sim/ucsim/sim.src/memcl.h, sim/ucsim/sim.src/obsolete.cc,
373           sim/ucsim/sim.src/obsolete.h, sim/ucsim/sim.src/sim.cc,
374           sim/ucsim/sim.src/simcl.h, sim/ucsim/sim.src/stack.cc,
375           sim/ucsim/sim.src/stackcl.h, sim/ucsim/sim.src/test_mem_speed.cc,
376           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
377           sim/ucsim/xa.src/xa.cc, sim/ucsim/xa.src/xacl.h,
378           sim/ucsim/z80.src/z80.cc, sim/ucsim/z80.src/z80cl.h:
379           ucsim WIN32 native port
380
381 2006-08-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
382
383         * doc/sdccman.lyx: added note on dynamic memory heap initialization
384
385 2006-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
386
387         * src/mcs51/gen.c (genAnd, genOr, genXor): fixed bug 1546986
388         * src/ds390/gen.c (aopGetUsesAcc): handle AOP_DPTR2 and AOP_DPTRn too
389
390 2006-08-26 Maarten Brock <sourceforge.brock AT dse.nl>
391
392         * src/ds390/gen.c (genAnd, genOr, genXor): fixed bug 1546986
393         * support/regression/tests/bug1546986.c: new, added
394         * as/mcs51/.cvsignore,
395         * debugger/mcs51/.cvsignore,
396         * src/.cvsignore: deleted
397
398 2006-08-25 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
399
400         * device/include/mcs51/P89c51RD2.h: fixed bug 1546936 (error in sbit
401           definitions)
402
403 2006-08-20 Borut Razem <borut.razem AT siol.net>
404
405         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h:
406           removed cl_listen_console::match(), cl_console::match(),
407           restructured cl_commander::proc_input()
408
409 2006-08-16 Borut Razem <borut.razem AT siol.net>
410
411         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h,
412           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
413           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/uc.cc: code cleaning
414
415 2006-08-14 Borut Razem <borut.razem AT siol.net>
416
417         * support/regression/Makefile.in,
418           support/regression/ports/pic14/gpsim.cmd,
419           support/regression/ports/pic14/spec.mk,
420           support/regression/ports/pic14/support.c:
421           added pic14 regression test
422
423 2006-08-14 Maarten Brock <sourceforge.brock AT dse.nl>
424
425         * as/doc/asxhtm.html: documented changed ABS behaviour
426         * as/doc/README: fixed some typos
427
428 2006-08-13 Maarten Brock <sourceforge.brock AT dse.nl>
429
430         * support/regression/tests/float_trans.c: disabled test if __STDC_IEC_559__
431           not defined on host
432
433 2006-08-12 Borut Razem <borut.razem AT siol.net>
434
435         * support/regression/fwk/include/testfwk.h,
436           support/regression/fwk/lib/testfwk.c,
437           support/regression/generate-cases.py,
438           support/regression/Makefile.in:
439           regression test framework does not depend on function pointers and
440           variable arguments
441
442 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
443
444         * device/include/stddef.h: c temporary hack to fix bug 1518273
445
446 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
447
448         * device/include/mcs51/cc2510fx.h: added
449         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
450           to projects.
451
452 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
453
454         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
455         * as/z80/Makefile.in: added strcmpi.c
456         * as/z80/z80adr.c: added upper case registers and lower case conditionals
457         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
458
459 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
460
461         * device/lib/gbz80/asm_strings.s,
462         * device/lib/gbz80/crt0_rle.s,
463         * device/lib/gbz80/div.s,
464         * device/lib/gbz80/mul.s,
465         * device/lib/gbz80/shift.s,
466         * device/lib/z80/asm_strings.s,
467         * device/lib/z80/crt0_rle.s,
468         * device/lib/z80/div.s,
469         * device/lib/z80/mul.s,
470         * device/lib/z80/shift.s: changed to all lower case menmonics except the
471           flags which are all upper case
472
473 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
474
475         * as/z80/asm.h: made CASE_SENSITIVE 1
476         * link/z80/aslink.h: made CASE_SENSITIVE 1
477         * src/z80/gen.c (throughout): made all conditionals upper case
478         * support/regression/tests/bug1503067.c: new
479
480 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
481
482         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
483           (shiftIntoPair): added case 2 for PAIR_IY,
484           (setupToPreserveCarry): replaced parameters with iCode and check if
485            PAIR_DE is in use to fix bug 1399290,
486           (genPlus, genMinus): updated call to setupToPreserveCarry
487         * support/regression/tests/bug1399290.c: new
488
489 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
490
491         * device/lib/Makefile.in (Z80SOURCES): enabled float support
492         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
493         * src/ds390/gen.c (shiftRLong),
494         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
495         * src/mcs51/gen.c (sameReg): changed to sameByte,
496           (xch_a_aopGet): new,
497           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
498            shiftRLong): fixed bug 1533966
499         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
500           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
501         * support/regression/Makefile.in: disabled z80, enabled ucz80
502         * support/regression/tests/float_trans.c: enabled test for z80 and host
503         * support/regression/tests/shifts2.c: new, for testing bug 1533966
504
505 2006-08-01 Borut Razem <borut.razem AT siol.net>
506
507         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
508           comparison is always false due to limited range of data type
509           on PPC64 machine (openpower-linux1) where "char = unsigned char"
510
511 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
512
513         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
514         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
515         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
516         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
517
518 2006-07-31 Borut Razem <borut.razem AT siol.net>
519
520         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
521           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
522           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
523           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
524           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
525           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
526           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
527           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
528           enable ucsim mingw compilation. Serial port is disabled,
529           since it uses termios.h API, which is not available on native
530           WIN32
531
532 2006-07-31 Borut Razem <borut.razem AT siol.net>
533
534         * Small Device C Compiler 2.6.0 released
535         * support/scripts/sdcc.nsi: added FULL_DOC option
536         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
537
538 2006-07-28 Borut Razem <borut.razem AT siol.net>
539
540         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
541         * doc/INSTALL.txt: updated
542
543 2006-07-27 Borut Razem <borut.razem AT siol.net>
544
545         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
546           device/lib/pic/libdev/Makefile.in: fixed bug
547           [ 1438354 ] pic libsdcc: distclean doesn't work
548         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
549           device/lib/pic16/libio/Makefile.in: fixed bug
550           [ 1438344 ] pic16 lib: clean doesn't work properly
551         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
552
553 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
554
555         * device/lib/pic/libsdcc/fsdiv.c,
556         * device/lib/pic/libsdcc/fsmul.c,
557         * device/lib/pic16/libsdcc/float/fsdiv.c,
558         * device/lib/pic16/libsdcc/float/fsmul.c,
559         * device/lib/_fsdiv.c,
560         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
561         * support/regression/tests/bug1520966.c: added
562         * doc/knownbugs.html: removed [ 1520966 ] from the list
563
564 2006-07-25 Borut Razem <borut.razem AT siol.net>
565
566         * configure.in, configure, sdccconf_in.h: fixed bug
567           [ 1519095 ] regression test onebyte.c fails on ppc64 host
568         * doc/knownbugs.html: removed [ 1519095 ] from the list
569
570 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
571
572         * doc/knownbugs.html: added, contains list of known bugs at release
573         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
574
575 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
576
577         * device/include/mcs51/compiler.h: added SFRX for xdata based special
578           function registers and corrected defaults with additional warning
579         * device/lib/malloc.c: cosmetic changes
580         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
581         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
582           (fillGaps): and used it
583
584 2006-07-20 Raphael Neider <rneider AT web.de>
585
586         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
587           output unless SDCCPICDEBUG is set
588         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
589           output if SILENT is set
590
591 2006-07-11 Borut Razem <borut.razem AT siol.net>
592
593         * doc/README.txt: updated
594
595 2006-07-10 Borut Razem <borut.razem AT siol.net>
596
597         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
598           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
599           in WIN32 installation
600         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
601           release candidate 1
602
603 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
604
605         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
606         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
607
608 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
609
610         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
611
612 2006-07-06 Borut Razem <borut.razem AT siol.net>
613
614         * support/regression/tests/bitfields.c:
615           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
616         * support/regression/tests/constantRange.c:
617           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
618
619 2006-07-04 Borut Razem <borut.razem AT siol.net>
620
621         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
622           src/port.mk,
623           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
624           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
625           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
626           reverted changes from 2006-07-03
627         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
628         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
629           added CPPFLAGS, used by the host port
630
631 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
632
633         * support/regression/valdiag/tests/switch.c,
634         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
635         * support/regression/tests/libmullong.c: fixed for host
636         * support/regression/ports/host/spec.mk: disable all warnings for host,
637         SDCC runs with --less-pedantic too
638
639 2006-07-03 Borut Razem <borut.razem AT siol.net>
640
641         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
642           defined CPPFLAGS
643         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
644         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
645           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
646           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
647           include ../port.mk
648         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
649           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
650           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
651           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
652
653 2006-07-02 Raphael Neider <rneider AT web.de>
654
655         * src/pic16/devices.inc,
656         * device/include/pic16/pic18fregs.h,
657         * device/include/pic16/pic18f4550.h,
658         * device/lib/pic16/pics.all,
659         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
660
661 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
662
663         * as/hc08/lkaomf51.c (OutputName),
664         * as/mcs51/lkaomf51.c (OutputName),
665         * as/z80/asmain.c (asmbl),
666         * src/ds390/main.c (asmLineNodeFromLineNode),
667         * src/hc08/ralloc.c (hc08_assignRegisters),
668         * src/mcs51/main.c (asmLineNodeFromLineNode),
669         * src/xa51/ralloc.c (checkRegMask),
670         * src/xa51/gen.c (emitcode),
671         * src/z80/gen.c (_emit2),
672         * src/SDCCast.c (searchLitOp),
673         * src/SDCCglobl.h,
674         * support/packihx/packihx.c,
675         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
676         * src/ds390/gen.c (aopPutUsesAcc),
677         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
678         * support/regression/tests/libmullong.c (mullong_wrapper),
679         * src/SDCCsymt.c (powof2),
680         * src/SDCCast.c,
681         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
682         * src/SDCCsymt.h: added TYPE_TARGET_*
683         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
684         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
685         SDCCast because 1) header problems 2) this is the right place
686         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
687         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
688         prototype
689
690 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
691
692         * src/SDCCicode.h: removed buggy semicolon in unused macro
693         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
694         search for previous definiton of auto symbols too,
695         (findPrevUse): fixed logic of emitWarnings
696
697 2006-06-26 Raphael Neider <rneider AT web.de>
698
699         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
700           PCLATH and PCLATU on interrupts, potentially fixes #1505141
701
702 2006-06-25 Raphael Neider <rneider AT web.de>
703
704         * device/lib/pic/libm: NEW, added math library functions
705         * device/lib/pic/libsdcc: NEW; added float support functions
706         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
707         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
708           NEW, added math related headers
709         * device/include/asm/pic/features.h: NEW
710         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
711           (popGet): allow larger offsets for AOP_PCODE,
712           (genDataPointerSet): handle literals explicitly, more debug output,
713           (genAssign): fixed for float using aopLiteral ;-)
714         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
715           GOTO initialisation routine
716         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
717           flag on registers, fixes #1469043 (local variables do not work)
718         * src/pic/main.c (_pic14_do_link),
719         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
720           available
721
722 2006-06-25 Borut Razem <borut.razem AT siol.net>
723
724         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
725           characters printed (not including the trailing '\0' used to end
726           output to strings). Problem detected in regression test bug-927659.c.
727           NOTE: printf() family functions should return int instead
728           unsigned int!
729         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
730           specifier are printed as themselves
731         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
732           support flags, width and precision specifiers
733
734 2006-06-24 Borut Razem <borut.razem AT siol.net>
735
736         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
737           to the list of sdcc tagrets not supporting bit type
738         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
739           testfor pic16 due to bug:
740           [ 1511794 ] pic16: regression test bug-895992.c fails
741
742 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
743
744         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
745         * src/SDCCglue.c (initPointer), fixed bug 1496419
746         * support/regression/tests/bug1496419.c: new, added
747
748 2006-06-22 Borut Razem <borut.razem AT siol.net>
749
750         * support/regression/ports/pic16/support.c: use gpsim usart module from
751           libgpsim_modules library
752
753 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
754
755         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
756         IP0H to IPH0.
757
758 2006-06-19 Raphael Neider <rneider AT web.de>
759
760         * src/pic/glue.h,src/pic16/glue.h: added prototypes
761         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
762           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
763           (pic14printExterns,pic14printPublics,pic16printPublics,
764           pic16_printExterns): use new functions to emit symbols
765           (picglue,pic16glue): emit publics before emitting externs
766         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
767           locally defined functions to avoid bug #1443651
768         * support/regression/tests/bug-716242.c: removed pic16 workaround
769         * support/regression/ports/pic16/spec.mk: ignore errors during build
770
771 2006-06-19 Raphael Neider <rneider AT web.de>
772
773         * src/pic/glue.h: added pic14aopLiteral prototype
774         * src/pic/glue.c (pic14aopLiteral): return unsigned int
775         * src/pic/gen.c: removed stdint.h dependency
776           (aopGet): use Safe_strdup()
777           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
778           (genDataPointerSet): use pic14aopLiteral()
779         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
780           for pic16; thanks to Bernhard and Maarten
781
782 2006-06-18 Borut Razem <borut.razem AT siol.net>
783
784         * support/regression/tests/structflexarray.c: flexible array members
785           not supported by gcc < 3
786         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
787           GUI tool by default
788         * src/pic/gen.c: don't include [p]strdin.h on solaris
789         * support/Util/pstdint.h: addad svn attributes
790         * support/regression/tests/constantRange.c,
791           support/regression/tests/rotate.c: include inttypes.h instead
792           stdint.h on solaris, addad svn attributes
793
794 2006-06-18 Raphael Neider <rneider AT web.de>
795
796         * src/SDCCsymt.c (initCSupport): change return type of divschar to
797           int for PIC16
798         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
799           (pic16_genMinusBits): simplified sign-extension
800           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
801             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
802             adjusted to correctly handle mixed-signed operands, disabled
803             now unused multiplciation routines
804         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
805           (assignResultValue): added argument denoting the size of the result
806             as returned by the function (fixes upcasts in assigning from
807             function calls: char foo(); int i = foo();)
808           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
809             function result to assignResultValue
810           (genMult): disabled inlined multiplication code
811           (genDiv): augmented to also handle the modulus operator, fixed to
812             handle mixed-signed operands correctly
813           (genMod): simply call genDiv, disabled unused code
814           (genAssign): fixed missing (sign-)extension on result
815         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
816             valid char operands, allow signed operands for native code, added
817             division and modulo operator handling
818         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
819
820         As a consequence, onebyte.c (if split into two files) and muldiv.c
821         pass regression tests.
822
823 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
824
825         * doc/Makefile.in: two runs of makeindex seem needed to get
826         correct page references in the index of sdccman.pdf
827         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
828
829 2006-06-17 Borut Razem <borut.razem AT siol.net>
830
831         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
832
833 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
834
835         * doc/sdccman.lyx: updated, added (porting source code, debugging),
836         mentioned ec2drv and paulmon
837
838 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
839
840         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
841           consecutive abs areas
842           (find_empty_space, allocate_space): added map to handle codemap or
843            xdatamap,
844           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
845            absolute idata and xdata
846         * as/mcs51/lkmem.c (summary2): updated legend
847
848 2006-06-16 Raphael Neider <rneider AT web.de>
849
850         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
851
852 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
853
854         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
855           1208515
856         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
857
858 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
859
860         * src/port.h (struct PORT): added field gp_tags, to hold the tag
861         value of generic pointers,
862         * src/avr/main.c,
863           src/ds390/main.c,
864           src/hc08/main.c,
865           src/izt/i186.c,
866           src/izt/tlcs900h.c,
867           src/mcs51/main.c,
868           src/pic/main.c,
869           src/pic16/main.c,
870           src/xa51/main.c,
871           src/z80/main.c: PORT structure, added elements for gp_tags field,
872         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
873         fields in the PORT structure of each port,
874         * src/SDCCast.c (decorateType): allow processing of generic pointers
875         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
876         S_FIXED symbols
877
878 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
879
880         * link/z80/lkgb.c,
881         * link/z80/lkgg.c,
882         * src/pic16/gen.c,
883         * src/pic16/main.c,
884         * src/pic16/pcode.c,
885         * src/pic/main.c,
886         * src/pic/pcoderegs.c,
887         * src/SDCCicode.c,
888         * src/SDCCmain.c,
889         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
890           bug 1504689 on minGW
891
892 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
893
894         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
895
896 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
897
898         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
899
900 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
901
902         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
903           for optimization
904
905 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
906
907         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
908         to a char variable. Fixed bug #1504211
909         * device/include/pic16/adc.h,
910         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
911         and fixed bug #1364390
912
913 2006-06-10 Borut Razem <borut.razem AT siol.net>
914
915         * CVSROOT: removed the CVS left-over
916
917 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
918
919         * as/hc08/asmain.c (asexit),
920         * as/hc08/lkmain.c (lkexit),
921         * as/mcs51/asmain.c (asexit),
922         * as/mcs51/lkmain.c (lkexit),
923         * src/SDCCglue.c (DEFSETFUNC),
924         * src/SDCCmain.c (linkEdit, assemble),
925         * support/librarian/sdcclib.c (AddRel),
926           replaced unlink() by standard C remove()
927         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
928         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
929           gatherImplicitVariables): new, added to fix bug 608752,
930           (createFunction): added gatherImplicitVariables()
931         * src/SDCCast.h: added createRMW prototype
932         * src/SDCCsymt.h (struct symbol): added infertype
933         * support/regression/tests/bug608752.c: new, added
934
935 2006-06-10 Raphael Neider <rneider AT web.de>
936
937         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
938           multibyte dummy reads (fixes #1503234)
939
940 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
941
942         * device/include/mcs51/compiler.h: new, added header file to enable
943           creating common sfr definition header files for different compilers
944
945 2006-06-05 Raphael Neider <rneider AT web.de>
946
947         * src/pic16/{pcode.h,genarith.c}:
948           introduced pCodeOp combining any two pCodeOps (previously only
949           two register operands could be combined), removed pcop2 from
950           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
951         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
952         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
953           rewritten to use new PO_TWO_OPS
954         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
955         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
956           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
957           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
958           (pic16_get_op): embraced return arg to allow #define return(x),
959             added new case for combined opcodes
960           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
961           (pic16_pCode2str,pic16_getRegFrompCodeOp,
962            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
963
964 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
965
966         * src/SDCCval.c (checkConstantRange): added
967         * src/SDCCval.h: added checkConstantRange
968         * support/Util/SDCCerr.c,
969         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
970         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
971         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
972         * src/SDCCast.c (decorateType): added checkConstantRange,
973         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
974         can be emitted with the correct always true/false warning,
975         added optimization for double '!';
976         result of decorateType() must be assigned back to the tree, because
977         decorateType() can change the tree
978         * src/SDCCicode.c (geniCodeLogic),
979         (geniCodeAssign): replaced new checkConstantRange, added warnings,
980         (checkConstantRange): removed, it was only a fragment which never
981         emitted a warning
982         * src/SDCCsymt.c (computeType): fixed promotion for
983         "-1 < (unsigned bit) b"
984         * src/pic/ralloc.c (packRegsForAssign),
985         * src/pic16/ralloc.c (packRegsForAssign),
986         * src/hc08/ralloc.c (packRegsForAssign),
987         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
988         from mcs51
989         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
990         * support/regression/tests/constantRange.c: added
991         * support/valdiag/tests/constantRange.c: added
992         * support/valdiag/valdiag.py: added -DPORT_HOST=1
993
994 2006-06-02 Borut Razem <borut.razem AT siol.net>
995
996         * support/regression/ports/pic16/support.c: increase stack size
997           to 255 bytes
998         * support/regression/Makefile.in: sort tests by name so that the
999           resutlts can be compared on different machines / platforms
1000
1001 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
1002
1003         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
1004         * src/ds390/gen.c (emitLabel): new, added,
1005           (genDjnz): fixed stack overflow bug,
1006           (throughout): cosmetic changes to sync with mcs51/gen.c,
1007           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
1008         * src/mcs51/gen.c (genEndFunction): small optimization,
1009           (throughout): cosmetic changes to sync with ds390/gen.c
1010
1011 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
1012
1013         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
1014           (_print_format): fixed printing pointers
1015         * src/mcs51/gen.c (emitLabel, movb): new, added,
1016           (genAssign): small optimization,
1017           (genDjnz): fixed stack overflow bug,
1018           (throughout): replaced sprintf with SNPRINTF,
1019           replaced mcs51_regWithIdx with REG_WITH_INDEX,
1020           replaced emitcode("mov", "b,...") with MOVB(...),
1021           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
1022           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
1023         * src/mcs51/peeph.def: added rules 140 and 264
1024         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
1025           so they may get optimized into registers
1026
1027 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
1028
1029         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
1030           immediately when encountered,
1031           (printUsage): always use stderr even on windows
1032
1033 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
1034
1035         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
1036         (processParms): fixed bug #1247551
1037         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
1038         parseCmdLine, main): print '--version' to stdout,
1039         print 'help' to stdout if --help is given,
1040         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
1041         arguments are given; fixed --help
1042
1043 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
1044
1045         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
1046         * support/regression/tests/bug-1493710.c: added
1047
1048 2006-05-27 Borut Razem <borut.razem AT siol.net>
1049
1050         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
1051           static instead auto
1052         * support/regression/ports/pic16/support.c: increase stack size
1053           from default 64 bytes to 128 bytes
1054         * support/regression/tests/staticinit.c,
1055           support/regression/tests/float.c: regression tests fully enabled
1056           for pic16 port by putting the initialized data arrays into the code
1057           section
1058         * support/regression/ports/pic16/spec.mk: don't link default libraries.
1059           This was changed by mistake in the previous version.
1060
1061 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
1062
1063         * src/pic16/gen.c (genFunction, genEndFunction): some
1064         beautifications, fixed bug with falsely restoring FSR2 in large
1065         stack model, thanks to Beau E. Cox for reporting the bug
1066
1067 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1068
1069         * debugger/mcs51/break.c,
1070         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
1071           use %p to print pointers, made address variables unsigned
1072         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
1073         * debugger/mcs51/symtab.c (parseSymbol): must return something
1074         * src/mcs51/gen.c (aopForSym): small optimization,
1075            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
1076           (freeAsmop): added missing break,
1077           (aopPut): removed parameter bvolatile, determine it inside the function,
1078           (saveRegisters, unsaveRegisters): small optimization,
1079           (genIpush): removed pointless check,
1080           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
1081           replaced sprintf with SNPRINTF,
1082           replaced strcpy with strncpyz,
1083           updated aopPut calls,
1084           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
1085         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
1086
1087 2006-05-24 Borut Razem <borut.razem AT siol.net>
1088
1089         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
1090           modification of test for the pic16 port, put the array to the code
1091           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
1092
1093 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1094
1095         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
1096         * support/Util/pstdint.h: added
1097
1098 2006-05-22 Borut Razem <borut.razem AT siol.net>
1099
1100         * src/regression/Makefile: removed bool2.c test, added -q linker option
1101         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
1102           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
1103           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
1104           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
1105           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
1106           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
1107           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
1108           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
1109           define SUPPORT_BIT_TYPES 0, removed unused bit variables
1110
1111 2006-05-22 Raphael Neider <rneider AT web.de>
1112
1113         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
1114           bug #1492360 (problematic due to generic pointers, see code)
1115
1116 2006-05-22 Borut Razem <borut.razem AT siol.net>
1117
1118         * support/regression/ports/pic16/specs.mk: removed stack size linker
1119           directive
1120         * support/regression/tests/array.c,
1121           support/regression/tests/bitopcse.c,
1122           support/regression/tests/bug-908454.c,
1123           support/regression/tests/malloc.c: modified for pic16 regression test
1124         * support/regression/tests/bitfields.c:
1125           pic16 - excluded bitfileds of size > 8
1126         * support/regression/tests/bp.c: pic16 - reduced data size
1127         * support/regression/tests/bug-221100.c: pic16 - reduced data size
1128         * support/regression/tests/bug-460010.c:
1129           pic16 - used the absolute address the fits in memory
1130         * support/regression/tests/bug-716242.c:
1131           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
1132         * support/regression/tests/float.c:
1133           pic16 - excluded - data size too big
1134         * support/regression/tests/onebyte.c:
1135           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
1136         * support/regression/tests/shifts.c:
1137           pic16 - function names probably have to differ in first X characters
1138           (gpasm limitation?)
1139         * support/regression/tests/staticinit.c:
1140           pic16 - excluded some tests due error: no target memory available for
1141           section ".idata"
1142
1143 2006-05-22 Borut Razem <borut.razem AT siol.net>
1144
1145         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1146           second try. Thanks Stas Sergeev once more.
1147
1148 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1149
1150         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
1151           (genLeftShift, genRightShift): fixed bug 1491627
1152         * src/hc08/peeph.def (rules 7, 8.x): added
1153         * support/regression/tests/shifts.c (ShiftLeftByParam,
1154           ShiftRightByParam, testShiftByParam): added to test variable shifting
1155
1156 2006-05-20 Raphael Neider <rneider AT web.de>
1157
1158         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
1159         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
1160           (allocReg): add only new registers to dynAllocRegs,
1161           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
1162             #1489055, #1445850, and probably #1483693
1163
1164 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
1165
1166         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
1167         bug in for-loop that didn't emit the last of CONFIG and ID registers
1168
1169 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
1170
1171         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
1172           with offset
1173         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
1174           1489016, 1434401 and 1490124
1175         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
1176           1489016, 1434401 and 1490124
1177
1178 2006-05-17 Borut Razem <borut.razem AT siol.net>
1179
1180         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1181           thanks Stas Sergeev
1182
1183 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1184
1185         * device/include/mcs51/P89c51RD2.h,
1186         * device/include/mcs51/P89LPC901.h,
1187         * device/include/mcs51/P89LPC922.h,
1188         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
1189
1190 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1191
1192         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
1193         to fix missing stack pragma in compiled binary object file,
1194
1195 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
1196
1197         * support/packihx/configure.in,
1198         * support/packihx/configure: removed warning, autoconf >= 2.5x can
1199         determine sizeof basic types even while cross compiling
1200
1201 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
1202
1203         * src/avr/gen.c (aopop),
1204         * src/ds390/gen.c (aopOp),
1205         * src/hc08/gen.c (aopOp),
1206         * src/mcs51/gen.c (aopop),
1207         * src/pic16/gen.c (pic16_aopOp),
1208         * src/pic/gen.c (aopOp),
1209         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
1210         if size of operand is smaller than spill location
1211
1212 2006-05-12 Borut Razem <borut.razem AT siol.net>
1213
1214         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
1215           have to have CR/LF line endings even if they are checked out on *nix
1216           or on WIN32 in cygwin binmode
1217
1218 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
1219
1220         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
1221         * device/include/ds80c390.h: added sfr16 definitions
1222         * src/ds390/gen.c,
1223         * src/ds390/gen.h,
1224         * src/ds390/main.c,
1225         * src/ds390/ralloc.c,
1226         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
1227           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
1228           bit returning functions
1229         * support/regression/tests/sfr16.c: enabled test on ds390
1230
1231 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1232
1233         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
1234         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
1235
1236 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
1237
1238         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
1239         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
1240           (cl_address_space constructor): removed expensive initialization,
1241           (cl_address_space::get_cell): extended for late initialization,
1242           (cl_address_space::*): use late initialization,
1243           (cl_address_decoder::activate): removed expensive initialization,
1244           This reduced regression test running time by 25%
1245
1246 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
1247
1248         * packihx/,
1249         * configure.in,
1250         * configure,
1251         * sdcc.dsw,
1252         * Makefile.bcc,
1253         * Makefile.in,
1254         * support/packihx/Makefile.in,
1255         * support/packihx/clean.mk,
1256         * support/packihx/Makefile.bcc,
1257         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
1258
1259 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1260
1261         * src/SDCCval.c (valNot): fix for regression test failure
1262           of not.c on big endian hosts
1263
1264 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1265
1266         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
1267
1268 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1269
1270         * device/lib/mcs51/Makefile.in: changed string comparison operator
1271           to = for POSIX compliance; == is bash extension
1272
1273 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1274
1275         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
1276           kosmonaut_pirx
1277
1278 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
1279
1280         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
1281         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
1282         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
1283         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
1284         bug report #1478657,
1285
1286 2006-05-05 Borut Razem <borut.razem AT siol.net>
1287
1288         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
1289           making the html
1290
1291 2006-05-02 Borut Razem <borut.razem AT siol.net>
1292
1293         * doc/Makefile.in: removed *.ind dependency since there is no rule to
1294           create *.ind, which made make to fail if invoked with -j 2
1295
1296 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
1297
1298         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
1299           Hubert Sack for patch 1479782
1300
1301 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
1302
1303         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
1304
1305 2006-05-01 Raphael Neider <rneider AT web.de>
1306
1307         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
1308           (create_pic): store only prefix-free device name,
1309           (init_pic): check for device names with "16" prefix,
1310           (list_valid_pics),
1311         * src/pic/device.h (struct PIC_device),
1312         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
1313             stored device name,
1314         * device/include/pic/pic12f{635,675,629,683}.h,
1315         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
1316         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
1317         * device/include/pic/pic16f505.h,
1318         * device/lib/pic/libdev/pic16f505.c: removed
1319         * device/include/pic/pic14devices.txt: added support for pic12f
1320             devices, removed unsupported non 16-bit devices
1321             [above changes provided by patch from Zik Saleeba]
1322         * src/pic/*, src/pic16/*, device/include/pic16/*,
1323           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
1324
1325 2006-05-01 Borut Razem <borut.razem AT siol.net>
1326
1327         * configure.in, configure, doc/Makefile.in:
1328           sync with nightly build makefile - latex, dvipdf and dvips
1329           not needed any more
1330
1331 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
1332
1333         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
1334         in the library source
1335
1336 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
1337
1338         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
1339
1340 2006-04-28 Raphael Neider <rneider AT web.de>
1341
1342         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
1343         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
1344           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
1345         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
1346
1347 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
1348
1349         * device/lib/pic/libdev/Makefile.in,
1350         * device/lib/hc08/Makefile.in,
1351         * device/lib/gbz80/Makefile.in,
1352         * device/lib/z80/Makefile.in,
1353         * device/lib/ds390/Makefile.in,
1354         * device/lib/ds400/Makefile.in: added srcdir to include search path,
1355         thanks to Borut for the bug report
1356         * configure.in,
1357         * configure: always create doc/Makefile independent from --enable-doc
1358         * Makefile.in: always install from directory doc independent from
1359         --enable-doc
1360         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
1361         removed
1362         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
1363         * doc/Makefile.in: install *.txt if present
1364         * device/include/Makefile.in (install): added installation of pic/*.inc
1365         and pic/*.txt files again, they were erroneously removed
1366
1367 2006-04-28 Raphael Neider <rneider AT web.de>
1368
1369         * src/pic/{gen.c,main.h,pcode.c},
1370         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
1371             concerning signedness with casts
1372
1373 2006-04-28 Raphael Neider <rneider AT web.de>
1374
1375         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
1376             definition of an interrupt handler,
1377         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
1378             interrupt handler stuff from picglue() to separate routine,
1379           (picglue): enabled definition of intr handlers in files w/o main()
1380
1381 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1382
1383         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
1384           compilation with MSVC 2005 Express Edition (VC8)
1385
1386 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
1387
1388         * device/lib/Makefile: fixed build of gbz80 lib
1389
1390 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1391
1392         * support/regression/tests/bug-460010.c,
1393         * support/regression/tests/bug-524691.c,
1394         * support/regression/tests/bug-716242.c: removed conditional defines
1395           that are already in testfwk.h
1396
1397 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1398
1399         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
1400           (AccAXRsh1): added, shift right by 1,
1401           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
1402            AccAXLrl1
1403         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
1404
1405 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
1406
1407         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
1408         remove cast to same type
1409         * src/SDCCast.c (decorateType): fix for RFE 1475742,
1410         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
1411         * as/z80/Makefile,
1412         * link/z80/Makefile: removed, they have moved to
1413         Makefile.in files
1414         * configure,
1415         * configure.in: replaced duplicate message about ucsim by missing sdcpp
1416         * install-sh: fix bug #1204398 by setting umask 0022
1417         * device/lib/Makefile: separate build of z80 and gbz80 lib
1418
1419 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
1420
1421         Enabled VPATH feature: changed nearly all Makefiles (149 files).
1422         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
1423
1424         One basic decision: e.g. src/clean.mk includes further files. In order
1425         to make this work there are two solutions:
1426         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
1427           run configure on them. This way they can use
1428           'include $(srcdir)/port-clean.mk'
1429         - always include clean.mk by the Makefile at the same level. To avoid
1430           that `make clean` tries to include and build Makefile.dep the
1431           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
1432           implemented, because now even `make uninstall` doesn't create
1433           Makefile.in. clean.mk could be eliminated by pasting it in
1434           Makefile.in.
1435
1436         * debugger/mcs51/Makefile.in: build own objects from library sources
1437         (SLIB, SDCC) in current directory
1438
1439         * configure, configure.in: renamed --disable-device-lib-build in
1440         --disable-device-lib; added --enable-doc, the required tools are
1441         searched by configure; added result message; the toolchain for the
1442         belonging ports are now only built, if the port is enabled.
1443
1444         * support/regression/*: all output is written in directory gen, because
1445         the fwk and ports directories don't livet in the build tree using vpath
1446
1447         * doc/sdccman.lyx: renamed --disable-device-lib-build to
1448         --disable-device-lib, added --enable-doc, added section VPATH
1449
1450         * sim/ucsim/configure.in,
1451         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
1452         z80 are enabled by default
1453
1454 2006-04-24 Raphael Neider <rneider AT web.de>
1455
1456         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
1457             to config word, "pic14_"-prefixed some extern functions
1458           (pic14_emitConfigWord): emit __config directive(s) if assignment to
1459             config word has been found
1460         * src/pic/device.h: added prototypes
1461         * src/pic/pcode.c: added "pic14_"-prefix where needed
1462         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
1463             fixup
1464         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
1465             words,
1466           (pic14emitRegularMap): ignore config words,
1467           (pic14createInterruptVect): moved generating __config directives away
1468           (picglue): have __config directives emitted
1469
1470 2006-04-24 Borut Razem <borut.razem AT siol.net>
1471
1472         * doc/Makefile: sync with nightly build makefile
1473
1474 2006-04-24 Raphael Neider <rneider AT web.de>
1475
1476         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
1477             registers that have not been assigned proper liveranges,
1478             fixes #1469504 and #1474602,
1479           (pCodeRegOptimizeRegUsage): fixed typo in comment
1480
1481 2006-04-24 Borut Razem <borut.razem AT siol.net>
1482
1483         * device/examples/main8051.c: deleted - it was removed from CVS
1484           24.mar.2000 and after that modified 18.feb.2001, so it reappered
1485           after the transition to Subversion
1486         * src/SDCCalloc.h: deleted - it was removed  from CVS
1487           3.feb.2001 and after that modified 18.feb.2001, so it reappered
1488           after the transition to Subversion
1489         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
1490           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
1491           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
1492           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
1493
1494 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
1495
1496         * as/asx8051.dsp: added mcs51/strcmpi.h
1497         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
1498         * as/hc08/aslink.h: updated lnksect prototype
1499         * as/hc08/asm.h,
1500         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
1501         * as/hc08/asmain.c,
1502         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
1503           (newdot): handle A_ABS
1504         * as/hc08/asout.c,
1505         * as/mcs51/asout.c (outarea): output address
1506         * as/hc08/lkaomf51.c,
1507         * as/mcs51/lkaomf51.c: disabled unused array UsageType
1508         * as/hc08/m08pst.c,
1509         * as/mcs51/i51pst.c,
1510         * as/z80/z80pst.c: "ABS" is not A_OVR
1511         * as/hc08/lkarea.c (newarea): read a_addr,
1512           (lnkarea): added codemap array, sort absolute areas to the front,
1513            combine all GSINITx/GSFINAL,
1514           (find_empty_space, allocate_space): new functions,
1515           (lnksect): return next address, handle absolute sections
1516         * as/mcs51/lkarea.c (newarea): read a_addr,
1517           lnksect2 prototype changed,
1518           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
1519           (find_empty_space, allocate_space): new, factored out of lnksect2,
1520           (lnksect2): return next address, handle absolute sections
1521         * as/hc08/lkhead.c,
1522         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
1523         * as/hc08/lklibr.c (addfile, fndsym),
1524         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
1525           index out of range and detect both '\' and '/'
1526         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
1527         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
1528           regression tests (ds390 cannot return bool yet)
1529         * doc/sdccman.lyx: changed version number, document changed --no-peep,
1530           document critical interrupts on z80, document changed SDCC define
1531         * src/asm.c (_asxxxx_mapping): fixed .org directive,
1532           (_a390_mapping): added .org directive
1533         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
1534           (genMultOneByte): fixed warnings
1535         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
1536           ones
1537         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
1538         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
1539           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
1540         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
1541         * src/pic16/main.c: removed newReg prototype
1542         * src/pic16/pcode.c,
1543         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
1544           warnings
1545         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
1546           ones
1547         * src/pic16/ralloc.c
1548         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
1549           to fix warnings
1550         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
1551           from short to PIC_OPTYPE
1552         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
1553         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
1554           optype from short to PIC_OPTYPE
1555         * src/port.h: made int_size unsigned to fix warnings
1556         * src/SDCC.y: fixed warning on MSVC
1557         * src/SDCCicode.c (getArraySizePtr): return unsigned int
1558         * src/SDCCopt.c (convertToFcall): fixed warnings
1559         * src/SDCCsymt.h: removed double prototype for genSymName
1560         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
1561           offset int to fix warnings
1562
1563 2006-04-22 Borut Razem <borut.razem AT siol.net>
1564
1565         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1566           references to CVS replaced with Subversion
1567
1568 2006-04-21 Borut Razem <borut.razem AT siol.net>
1569
1570         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1571           references to CVS replaced with Subversion
1572
1573 2006-04-19 Borut Razem <borut.razem AT siol.net>
1574
1575         * src/version.awk: adapted for svn
1576         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
1577           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
1578           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
1579           /binutils-avr/etc/*.vi, *.jin: removed all properties
1580           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
1581
1582 2006-04-19 Borut Razem <borut.razem AT siol.net>
1583
1584         * CVS to Subversion migration completed
1585
1586 2006-04-18 Borut Razem <borut.razem AT siol.net>
1587
1588         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
1589           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
1590
1591 2006-04-17 Borut Razem <borut.razem AT siol.net>
1592
1593         * device/include/Makefile.in: added pic/*.inc to the installation
1594
1595 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
1596
1597         * support/regression/collate-results.py: fixed output in case of
1598         a valdiag error
1599         * support/regression/generate-cases.py: fixed splitting of pathnames
1600         with dots
1601         * as/hc08/lklibr.c (addfile),
1602         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
1603
1604 2006-04-11 Raphael Neider <rneider AT web.de>
1605
1606         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
1607         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
1608         * src/pic16/pcode.c (assignValnums): fixed #1460578
1609
1610 2006-04-11 Raphael Neider <rneider AT web.de>
1611
1612         * device/lib/pic/libdev/*.c,
1613         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
1614           fixes #1468739, enables compilation in --std-c99 mode
1615         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
1616
1617 2006-04-11 Raphael Neider <rneider AT web.de>
1618
1619         * src/pic/device.c (find_device): removed debug output
1620           (list_valid_pics): enabled verbose listing of supported devices
1621         * device/include/stdbool.h: define bool as char for pic14/16 as well
1622
1623 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1624
1625         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
1626
1627 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1628
1629         * .version: bumped version to 2.5.6
1630         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
1631
1632 2006-04-06 Raphael Neider <rneider AT web.de>
1633
1634         * .version: bumped version to 2.5.6 (pic14 ABI changed)
1635         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
1636         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
1637           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
1638             pic14_constructAbsMap
1639           (pic14printPublics): declare absolute global symbols as global
1640           (pic14createInterruptVect),
1641         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
1642           (newReg): assume new registers unused, use correct name in
1643             hashtable (reg->name instead of name), more debugLog output
1644         * src/pic/device.h (PIC_device): added fields for verbose output
1645         * src/pic/device.c: moved device definition to pic14devices.txt,
1646             added routines for runtime parsing of pic14devices.txt,
1647             added support for second config word
1648         * src/pic/main.c (_process_pragma): removed #pragma maxram,
1649           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
1650           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
1651           (_pic14_parseOptions): moved pCodeInitRegisters here
1652           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
1653         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
1654           (pCodeInitRegisters): rewrapped comments, perpared new approach to
1655             handling the pseudo stack
1656         * device/lib/Makefile.in: ignore failures in objects-pic16,
1657         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
1658         * device/lib/pic/NEWS: document new dependency on picXXX.lib
1659         * device/lib/pic/Makefile.subdir,
1660         * device/lib/pic16/Makefile.subdir: improved clean rules
1661         * device/lib/pic/libdev/: NEW, pic14 device libraries
1662         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
1663         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
1664         * device/include/Makefile.in: create subdir and install pic14 headers
1665         * device/include/pic/p16f_common.inc: removed unused declarations
1666         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
1667             PICs from inc2h.pl v1.6,
1668             replaced BIT_AT macros with struct declarations
1669         * device/include/pic/pic14devices.txt: definition of supported devices,
1670             all above improvements contributed by Zik Saleeba, thanks
1671         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
1672         * support/scripts/sdcc.nsi: also install pic14 device libraries and
1673             headers
1674
1675 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1676
1677         * device/include/mcs51/c8051f410.h: added interrupt numbers,
1678         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
1679           thanks to Charles Olds
1680
1681 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1682
1683         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
1684
1685 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1686
1687         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
1688         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
1689         * support/regression/bug1464657.c: added, new test
1690
1691 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1692
1693         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
1694           version number
1695
1696 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1697
1698         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
1699           --no-peep and --peep-file <file> are used don't use default rules but
1700           do use the <file>
1701
1702 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1703
1704         * src/mcs51/gen.c (genCall): fixed bug 1457608
1705
1706 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1707
1708         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1709         changes seem to cause (trigger?) problems with the build system.
1710
1711 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1712
1713         * src/SDCCpeeph.c (operandsLiteral): new, added,
1714           (callFuncByName): inserted operandsLiteral
1715         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1716
1717 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1718
1719         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1720         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1721
1722 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1723
1724         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1725           implemented patch 1120823 Thanks to Willy De la Court (normal
1726           interrupts need an interrupt number now if they are made critical),
1727           and enabled nesting of critical functions though not for gbz80
1728           (genCritical, genEndCritical): added functions
1729           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1730         * src/z80/mappings.i: added "ei" to all mappings
1731
1732 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1733
1734         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1735         submitted by the Debian SDCC maintainer Aurelien Jarno:
1736         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1737         archive with gcc 4.1 on mips and wrote the patch"
1738
1739 2006-03-16 Raphael Neider <rneider AT web.de>
1740
1741         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1742           the left operand is shorter than the result (c* = lit-c* + int),
1743           fixes bug #1450796
1744         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1745           OP_SYMBOL
1746
1747 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1748
1749         * src/.version: increased version number to 2.5.5
1750         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1751         linking is done manually in pic16 port's _linkEdit,
1752         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1753         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1754         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1755         allocate asmop as AOP_ACC,
1756         (aopForRemat): added parameter 'bool result' in function declaration,
1757         (pic16_aopGet): return AOP_ACC when accessing WREG,
1758         (pic16_popGetTempReg): minor modification,
1759         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1760         'pic16_allocWithIdx',
1761         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1762         calling function in absolute addresses,
1763         (genAssign): take into account AOP_ACC asmop,
1764         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1765         * src/pic16/pcoderegs.c: some debug functions and lines added,
1766         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1767         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1768         register too,
1769         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1770         call to allocReg, not by manually allocating a new one,
1771         (pic16_assignRegisters): now before going through the register
1772         allocating functions mark all registers as free. This eliminates some
1773         side effects resulting from peephole parser done earlier in the backbone
1774
1775 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1776
1777         * src/SDCCicode.c (geniCodeLogic),
1778         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1779
1780 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1781
1782         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1783           (genSend): bugfix, do not allocate and free twice,
1784           (shiftRLong): handle partially overlapping aops
1785         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1786
1787 2006-03-08 Borut Razem <borut.razem AT siol.net>
1788
1789         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1790           for pic16
1791
1792 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1793
1794         * support/regression/tests/bug1409955.c: new, added
1795         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1796         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1797           (aopForSym, aopOp): increment asmop.allocated if reused,
1798           (freeAsmop): decrement asmop.allocated and check for zero instead of
1799           using asmop.freed,
1800           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1801           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1802            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1803            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1804            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1805            genSignedRightShift, genRightShift, genDataPointerGet,
1806            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1807            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1808             in reverse order from allocation,
1809           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1810             added swappedLR to keep track
1811         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1812           pdata & code for GCC, z80, gbz80 & hc08
1813         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1814
1815 2006-03-08 Raphael Neider <rneider AT web.de>
1816
1817         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1818
1819 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1820
1821         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1822         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1823         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1824
1825 2006-03-06 Borut Razem <borut.razem AT siol.net>
1826
1827         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1828           made the linker quiet
1829
1830 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1831
1832         * src/pic16/gen.c (genPcall): fixed bug #1443644
1833         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1834         which dumps before the function entry point a data byte which represents
1835         the number of the local variables used by the specified function, added
1836         'xinst' for initial support for Extended Instruction Support,
1837         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1838         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1839         port->fun_prefix anymore (may change later),
1840         (genFunction, genEndFunction): do not store/restore local registers for
1841         _main (this should take care the --main-return command line option in
1842         the future),
1843         (genOr): removed some legacy pic-port instructions,
1844         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1845         performing operations with SFR's causes data to be written more than
1846         once to each SFR. Perhaps SFRs should be handled in special cases...
1847         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1848         pcode.h
1849         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1850         into account for stack starting position,
1851         (struct OPTIONS pic16_optionsTable): added command line argument
1852         --extended or -y for Extended Instruction Support,
1853         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1854         (deassignLRs): *** perhaps the most important change, old 'for' code
1855         (commented out for reference), didn't account for some registers which
1856         were left marked 'not free' after a pointer operation. The change
1857         reduces register usage a lot in some cases
1858
1859 2006-03-04 Borut Razem <borut.razem AT siol.net>
1860
1861         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1862           _clean
1863         * support/regression/tests/bug-524697.c: decreased array size for
1864           mcs51 to fit into the internal RAM
1865         * support/regression/Makefile.in: a little bit more verbose
1866
1867 2006-03-03 Borut Razem <borut.razem AT siol.net>
1868
1869         * support/regression/fwk/lib/testfwk.c,
1870           support/regression/fwk/include/testfwk.h: introduced function
1871           _prints(), nonrecursive _printn(), call _initEmu() from main()
1872         * support/regression/ports/gbz80/support.asm,
1873           support/regression/ports/ucz80/support.asm,
1874           support/regression/ports/z80/support.asm,
1875           support/regression/ports/ds390/support.c,
1876           support/regression/ports/hc08/support.c,
1877           support/regression/ports/host/support.c,
1878           support/regression/ports/mcs51/support.c,
1879           support/regression/ports/xa51/support.c: added empty _initEmu()
1880           function
1881         * support/regression/ports/pic16/gpsim.cmd,
1882           support/regression/ports/pic16/spec.mk,
1883           support/regression/ports/pic16/support.c,
1884           support/regression/Makefile.in: added pic16 regression test
1885
1886 2006-03-01 Raphael Neider <rneider AT web.de>
1887
1888         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1889           genConstPointerGet): use safe way of generating MOVFF to cover
1890             literals as well as registers, fixes bug #1440527
1891         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1892             dereference
1893           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1894             more correctly, fixes bug #1232186
1895           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1896         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1897             gplink guess the correct processor in more cases, applied patch
1898             from Till Riedel attached to and fixing bug #1436552
1899
1900 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1901
1902         * support/regression/tests/array.c: added, contains check for #1434401
1903         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1904
1905 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1906
1907         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1908         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1909         * device/include/mcs51/c8051f326.h,
1910         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1911         * device/include/mcs51/c8051f000.h,
1912         * device/include/mcs51/c8051f018.h,
1913         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1914           PCON_IDLE,PCON_STOP and added sfr16 definitions
1915
1916 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1917
1918         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1919           genGetWord): fixed bug 1409955
1920
1921 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1922
1923         * device/include/hc08/mc68hc908gp32.h,
1924         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1925
1926 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1927
1928         * src/SDCCast.c (constExprValue): return NULL if not a value
1929         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1930         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1931         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1932
1933 2006-02-13 Borut Razem <borut.razem AT siol.net>
1934
1935         * src/regression/ptrarg.c: added, fails due to bug #1430967
1936         * src/regression/Makefile: ptrarg.c added, ...
1937
1938 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1939
1940         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1941         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1942
1943 2006-02-11 Borut Razem <borut.razem AT siol.net>
1944
1945         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1946           print "Processor: xxx" message to stdout only if --verbose
1947
1948 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1949
1950         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1951         * support/regression/tests/bug1426356.c: added
1952         * support/regression/tests/bitfields.c: removed 2 tests
1953
1954 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1955
1956         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1957         * device/include/mcs51/c8051f330.h,
1958         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1959           PCON_IDLE,PCON_STOP and added sfr16 definitions
1960         * device/lib/_divsint.c,
1961         * device/lib/_divuint.c,
1962         * device/lib/_divulong.c,
1963         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1964           register bank bug for small stackauto
1965
1966 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1967
1968         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1969
1970 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1971
1972         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1973         * all.dsp: corrected several bin paths
1974         * device/include/mcs51/c8051f120.h,
1975         * device/include/mcs51/c8051f300.h,
1976         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1977           to PCON_IDLE,PCON_STOP
1978         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1979         * device/lib/printf_large.c (output_float): fixed bug 1388703
1980         * support/regression/tests/bug1057979.c: added test for bug 1388703
1981
1982 2006-02-08 Raphael Neider <rneider AT web.de>
1983
1984         * src/pic/pcode.c (pciTRIS): fixed typo,
1985           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1986           (LinkFlow): fixed handling of flows that end in a call,
1987           (ReuseReg): perform safety check earlier
1988         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1989             to work with flows at the beginning of a pBlock,
1990             fixes #1426557 (Symbol not previously defined),
1991           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1992             usage information
1993           (RemoveUnusedRegisters): update register usage info
1994         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1995             created, reuse existing ones instead
1996         * src/pic/gen.c (genPcall): fixed #1424719
1997
1998 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1999
2000         * link/z80/lkmain.c,
2001         * link/z80/lklex.c,
2002         * link/z80/lkdata.c,
2003         * link/z80/aslink.h: fixed build on current cygwin:
2004         replaced getline() by lk_getline()
2005
2006 2006-02-01 Borut Razem <borut.razem AT siol.net>
2007
2008         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
2009           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
2010           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
2011           src/regression/bool1.c, src/regression/bool2.c,
2012           src/regression/bool3.c, src/regression/call1.c,
2013           src/regression/compare.c, src/regression/compare10.c,
2014           src/regression/compare2.c, src/regression/compare3.c,
2015           src/regression/compare4.c, src/regression/compare5.c,
2016           src/regression/compare6.c, src/regression/compare7.c,
2017           src/regression/compare8.c, src/regression/compare9.c,
2018           src/regression/configword.c, src/regression/for.c,
2019           src/regression/inline.c, src/regression/mult1.c,
2020           src/regression/nestfor.c, src/regression/or1.c,
2021           src/regression/pointer1.c, src/regression/ptrfunc.c,
2022           src/regression/rotate1.c, src/regression/rotate2.c,
2023           src/regression/rotate3.c, src/regression/rotate4.c,
2024           src/regression/rotate5.c, src/regression/rotate6.c,
2025           src/regression/rotate7.c, src/regression/string1.c,
2026           src/regression/struct1.c, src/regression/sub.c,
2027           src/regression/sub2.c, src/regression/switch1.c,
2028           src/regression/while.c, src/regression/xor.c,
2029           src/regression/create_stc, src/regression/simulate,
2030           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
2031           regression tests
2032         * src/regression/gpsim_assert.h: added
2033
2034 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
2035
2036         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
2037         ((void (code *) (void)) 0) ();
2038         * as/hc08/aslex.c,
2039         * as/hc08/aslink.h,
2040         * as/hc08/asm.h,
2041         * as/hc08/asmain.c,
2042         * as/hc08/lkdata.c,
2043         * as/hc08/lklex.c,
2044         * as/hc08/lkmain.c,
2045         * as/mcs51/aslex.c,
2046         * as/mcs51/aslink.h,
2047         * as/mcs51/asm.h,
2048         * as/mcs51/asmain.c,
2049         * as/mcs51/lkdata.c,
2050         * as/mcs51/lklex.c,
2051         * as/mcs51/lkmain.c,
2052         * as/z80/aslex.c,
2053         * as/z80/asm.h,
2054         * as/z80/asmain.c: fixed build on current cygwin:
2055         replaced getline() by as_getline()
2056
2057 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
2058
2059         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
2060         declarator in the symbol chain
2061         * src/SDCCsymt.h,
2062         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
2063         parameter list for function pointers
2064         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
2065         * support/regression/tests/bug-716242.c: added
2066
2067 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
2068
2069         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
2070         offset if possible
2071         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
2072
2073 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
2074
2075         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
2076         inifinitely recurseable, added static
2077         * support/regression/tests/bug-1408066.c: added
2078
2079 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
2080
2081         * src/SDCCicode.h,
2082         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
2083         renamed, added possibility to create "postLoopLbl"-labels
2084         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
2085         newiTempLoopHeaderLabel
2086         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
2087         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
2088         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
2089         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
2090         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
2091         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
2092         (basicInduction): fixed bug #136564, made static,
2093         (loopInduction): changed parameter of basicInduction, made static,
2094         (addPostLoopBlock): added
2095         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
2096         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
2097         findLoopEndSeq
2098         * support/regression/tests/bug-136564.c: added
2099         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
2100         --std-sdcc99 to LIBSDCCFLAGS
2101
2102 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
2103
2104         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
2105         while loop
2106         * support/regression/tests/bug-1406131.c: added
2107
2108 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
2109
2110         * src/SDCCast.c (decorateType): fix promotion of unary minus
2111         * src/SDCCsymt.c (computeType): beautified
2112         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
2113         (valUnaryPM, valComplement): fix sign and promotion,
2114         (valNot): ANSI: result type is int (SDCC: unsigned char)
2115         * support/regression/tests/uminus.c: speedup by removing superflous
2116         test case 'int'
2117         * support/regression/tests/onebyte.c: added promotion and signedness
2118         tests for unary minus
2119         * support/regressions/tests/bug-477927.c: disable warning about
2120         uninitialized variables
2121         * support/regression/tests/not.c: added
2122
2123 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
2124
2125         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
2126         * src/mcs51/gen.c (gen51Code): show final register usage after
2127         fillGaps in asm with --i-code-in-asm
2128         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
2129         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
2130         incUsed, rliveClear, adjustIChain): made static,
2131         (setFromRange): excluded because it's unused,
2132         (findPrevUseSym, markWholeLoop): added,
2133         (findPrevUse): rewritten; fixes bug 895992; now a complete search
2134         through all branches of predecessors enables sdcc to emit the warning
2135         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
2136         (rlivePoint): made static, added parameter emitWarnings which is only
2137         true during the first run out of two,
2138         (findRecursiveSucc, findRecursivePred): removed,
2139         (computeLiveRanges): made static, added parameter emitWarnings,
2140         (dumpIcRlive): added for debugging only
2141         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
2142         removed prototype of setFromRange()
2143         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
2144         in call of computeLiveRanges()
2145         * support/regression/tests/bug-895992.c: added
2146         * support/regression/tests/bug-971834.c: added
2147         * support/valdiag/tests/bug-895992.c: added
2148         * support/valdiag/tests/bug-971834.c: added
2149
2150 2005-12-18 Raphael Neider <rneider AT web.de>
2151
2152         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
2153           (genUnpackBits): improved code for direct operands,
2154           (genPackBits): improved code for literal assignment to bitfields
2155             and for direct destination operands (no FSR indirection),
2156             prevented redundant AND, fixes #1362800,
2157           (AccLsh): added parameter to disable masking of the result
2158         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
2159           skip instructions with side-effects (like incfsz),
2160           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
2161         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
2162         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
2163           fixes #1375263
2164
2165 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
2166
2167         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
2168         volatile variables as spill location
2169
2170 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
2171
2172         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
2173         replacing literals
2174         * support/regression/tests/bug-1376320.c: added
2175
2176 2005-12-08 Raphael Neider <rneider AT web.de>
2177
2178         * src/pic/device.c: renamed is_shared to pic14_is_shared
2179         * src/pic/gen.c (genIfx): re-enabled handling of sbits
2180         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
2181           (is_valid_identifier): added for above workaround
2182
2183 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
2184
2185         * device/lib/Makefile.in: fixed to enable port-specific-objects
2186         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
2187           char, thanks Hubert Sack
2188         * doc/sdccman.lyx: documented --xstack-loc,
2189           elaborated a bit more on interrupts and pitfalls,
2190           removed "setjmp/longjmp unsupported",
2191           documented some unsupported C99 features
2192         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
2193         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
2194           if, thanks Hubert Sack
2195         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
2196         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
2197           make make_library
2198         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
2199           regression tests can report resource usage (rfe 700441)
2200         * support/regression/collate-results.py: report resource usage
2201         * support/regression/ports/ds390/spec.mk,
2202         * support/regression/ports/hc08/spec.mk,
2203         * support/regression/ports/mcs51/spec.mk,
2204         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
2205         * support/regression/ports/ds390/uCsim.cmd,
2206         * support/regression/ports/hc08/uCsim.cmd,
2207         * support/regression/ports/mcs51/uCsim.cmd,
2208         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
2209         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
2210           library, use the default one
2211         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
2212           building the library
2213
2214 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
2215
2216         * config.dsp: added dependency on .version and configure_vc.awk
2217         * device/include/setjmp.h: updated for --stack-auto and --xstack
2218         * device/include/mcs51/at89c51snd1c.h: corrected line endings
2219         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
2220         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
2221         * device/lib/libsdcc.lib: added _setjmp
2222         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
2223           (decorateType): fixed bug 1372851,
2224           (optimizeGetHbit): fixed warning
2225         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
2226           array initialisation
2227         * support/regression/tests/bug1057979.c: added test for bug 1358192
2228         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
2229
2230 2005-12-03 Borut Razem <borut.razem AT siol.net>
2231
2232         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
2233           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
2234
2235 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2236
2237         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
2238         createIval): implement symbol independant "flexible array member",
2239         (createIvalCharPtr): implemented flexible array initialisation with a
2240         string
2241         * src/SDCCsymt.c (copyStruct): removed,
2242         (getSize): fixed misleading comment,
2243         (getAllocSize): removed, the additional allocation size is now in
2244         sym->flexArrayLength,
2245         (checkStructFlexArray): new, syntax checks for flexible array members,
2246         (compStructSize): added syntax checks for "flexible array members"
2247         (copyStruct): removed,
2248         (copyLinkChain): removed inefficient fix for bug 770487
2249         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
2250         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
2251         symbol->flexArrayLength
2252         * src/SDCCerr.c,
2253         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
2254         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
2255         * support/regression/tests/structflexarray.c: added
2256         * support/valdiag/tests/structflexiblearray.c: added
2257
2258 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2259
2260         * src/SDCCast.c (decorateType): fixed bug 1368489
2261         * support/Util/SDCCerr.c,
2262         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
2263
2264 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2265
2266         * device/include/mcs51/at89c51snd1c.h: added file submitted by
2267           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
2268
2269 2005-11-27 Borut Razem <borut.razem AT siol.net>
2270
2271         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
2272           support/cpp2/mkdeps.h: added command line option
2273           -obj-ext=<extension> to SDCPP to define object file externion, used
2274           for generation of make dependencies (-M)
2275         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
2276
2277 2005-11-26 Borut Razem <borut.razem AT siol.net>
2278
2279         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
2280           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
2281           added pic and pic16 libraries
2282
2283 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2284
2285         * device/include/float.h: Corrected typo in prototype of __fsgt
2286
2287 2005-11-25 Borut Razem <borut.razem AT siol.net>
2288
2289         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
2290           added creation of model-mcs51-stack-auto libraries
2291
2292 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
2293
2294         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
2295         and fields-list too
2296         * src/SDCCast.c (createIvalArray): removed obsolete comment
2297
2298 2005-11-24 Borut Razem <borut.razem AT siol.net>
2299
2300         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
2301           added missing device/lib/mcs51/crt*.asm sources
2302
2303 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
2304
2305         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
2306
2307 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
2308
2309         * device/lib/_fs2schar.c,
2310         * device/lib/_fs2sint.c,
2311         * device/lib/_fs2slong.c: optimized inline asm
2312
2313 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2314
2315         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2316           Better handling of floats between -1.0 and 0.0.
2317
2318 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2319
2320         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
2321           (the missing "if"s prohibited removal of redundant labels)
2322
2323 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2324
2325         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2326           Properly convert floats between -1.0 and 0.0 to long, int, and char
2327           types (max integer value of negative floats tends to zero).
2328         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2329           Removed changes made so to work properly with floats between
2330           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
2331           and _fs2char.c
2332
2333 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2334
2335         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
2336         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
2337         (genCast) cosmetic change
2338         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
2339         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
2340         from mcs51
2341         * support/regression/tests/bitfields (testSignedBitfields): added
2342
2343 2005-11-18 Borut Razem <borut.razem AT siol.net>
2344
2345         * sdcc/device/lib/Makefile.in: remove all unnecessary files
2346         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
2347           introduced SILENT option to make building of pic16 libraries less
2348
2349 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2350
2351         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2352           Now they work properly with floats between -1.0 and 0.0
2353         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
2354
2355 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2356
2357         * src/SDCCicode.c (printOperand): added missing else
2358
2359 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2360
2361         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
2362         reformatted for better readability
2363         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
2364         signed bitfields
2365
2366 2005-11-17 Borut Razem <borut.razem AT siol.net>
2367
2368         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
2369           introduced SILENT option to make building of pic16 libraries less
2370           verbose - used for nightly snapshot build
2371         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
2372           available on Win32 platforms.
2373         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
2374           medium, large, pic and pic16
2375
2376 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2377
2378         * device/lib/printf_large.c: Temporary patch for bug 1358192:
2379           printf("%f"...) sets fraction to zero.
2380
2381 2005-11-16 Raphael Neider <rneider AT web.de>
2382
2383         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
2384           fixes #1357221
2385         * src/pic/gen.c (genIfx): implemented for CARRY bit
2386         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
2387           to generic pointers, fixes #1357332,
2388           (pic16_movLit2f): NEW,
2389           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
2390
2391 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2392
2393         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
2394
2395 2005-11-11 Raphael Neider <rneider AT web.de>
2396
2397         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
2398         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
2399           compute pointer's type from operand,
2400           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
2401           improved single bit reads, fixes bug #1353379
2402
2403 2005-11-09 Borut Razem <borut.razem AT siol.net>
2404
2405         * support/scripts/sdcc.nsi: added lib/pic to the package
2406
2407 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
2408
2409         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
2410
2411 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2412
2413         * support/regression/tests/bug1348008.c: added
2414         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
2415         * support/regression/tests/bug1337835.c: updated comment
2416
2417 2005-11-06 Borut Razem <borut.razem AT siol.net>
2418
2419         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2420           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2421           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2422           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2423           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
2424           dynamic construction of cl_error_class and derivates - 2.nd try
2425
2426 2005-11-05 Borut Razem <borut.razem AT siol.net>
2427
2428         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
2429           bug, which caused Bus Errors on sparc solaris
2430
2431 2005-11-04 Borut Razem <borut.razem AT siol.net>
2432
2433         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2434           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2435           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2436           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2437           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
2438           and derivates to resolve the initialization problem on OSX
2439
2440 2005-11-02 Borut Razem <borut.razem AT siol.net>
2441
2442         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2443           corrected typo - #include <winsock2.h>
2444
2445 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
2446
2447         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
2448           (_asxxxx_mapping): added org directive for future enhancements
2449
2450 2005-11-01 Borut Razem <borut.razem AT siol.net>
2451
2452         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2453           enabled sockets on WIN32
2454         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
2455
2456 2005-10-31 Borut Razem <borut.razem AT siol.net>
2457
2458         * support/regression/generate-cases.py: escape backslashes in {testcase}:
2459           WIN32 backslash path delimiters should be escaped when used in C strings
2460         * support/regression/tests/bitfields.c: exclude failing assertions for
2461           __CYGWIN32__ and __MINGW32__ hosts
2462
2463 2005-10-30 Borut Razem <borut.razem AT siol.net>
2464
2465         * src/SDCCutil.c: corrected double comparison typo
2466
2467 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
2468
2469         * device/lib/medium/Makefile: added for new memory model medium
2470         * device/include/asm/mcs51/features.h: updated for medium/pdata
2471         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
2472           added Multiply & Accumulate sbit's and MAC0_PAGE define
2473         * device/include/mcs51/c8051f300.h: added sfr16 definitions
2474         * device/include/mcs51/c8051f310.h: added sfr16 definitions
2475         * device/lib/_mullong.c: update for medium model
2476         * device/lib/incl.mk: added medium model
2477         * doc/sdccman.lyx: documented medium model
2478         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
2479         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
2480         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
2481         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
2482           (allocParms): set SCLS and OCLS to pdata for medium model
2483         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
2484           for pdata,
2485           (powof2): return <0 if not power of 2
2486         * src/avr/gen.c (genBitWise): use updated powof2
2487         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
2488           (shiftR2Left2Result): small optimization in setup, save acc when storing,
2489           (shiftLLeftOrResult): use B if necessary
2490         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
2491         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
2492         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
2493         * support/regression/Makefile.in: added test-mcs51-medium
2494         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
2495
2496 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2497
2498         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
2499         specifier unsigned
2500         * device/lib/time.c (mktime): fixed bug 1334315
2501
2502 2005-10-28 Raphael Neider <rneider AT web.de>
2503
2504         * device/include/pic/p16f_common.inc: added common declarations
2505         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
2506
2507 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2508
2509         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
2510           (aopPutUsesAcc): added to predict accumulator use,
2511           (assignResultValue): save acc if necessary,
2512           (genMinusDec): store result if indirectly addressed,
2513           (genDivOneByte):  save acc if necessary,
2514           (movLeft2Result): bugfix if left already in acc,
2515           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
2516             attention to accumulator use (esp. pdata),
2517           (genReceive): receive pdata correctly
2518         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
2519         * src/SDCCicode.h: added isOperandInPagedSpace prototype
2520
2521 2005-10-27 Raphael Neider <rneider AT web.de>
2522
2523         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
2524
2525 2005-10-27 Raphael Neider <rneider AT web.de>
2526
2527         * .version: changed version to 2.5.4
2528         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
2529         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
2530           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
2531             arithmetics support routines
2532         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
2533         * device/lib/Makefile.in: also create installdir for pic
2534
2535         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
2536           pic14 port as well
2537         * src/pic/device.c (dump_sfr): rewritten to delegate register
2538           placement to the linker (use `extern sym' rather than sym EQU addr),
2539           (validAddress): fixed to check last specified address
2540         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
2541           (popGetLit): truncate literal value to 8 bit,
2542           (popGet): moved assert to more appropriate place
2543           (popGetExternal): create pCode operand from and mark the according
2544             symbol as being `extern'
2545           (popGetAddr): added sanity check on immediate's offset, provide
2546             GPOINTER tag on demand
2547           (aopPut): fixed for immediates,
2548           (mov2w_op): move operand's address or contents to WREG (depending on
2549             operand type), safer variant of mov2w,
2550           (movwf,call_libraryfunc): NEW, handy abbreviations,
2551           (get_argument_pcop,get_return_val_pcop,pass_argument,
2552           get_returnvalue): interface for accessing function parameters and
2553             return values,
2554           (assignResultValuei,genRet): use new parameter/return value interface
2555           (pic14_getDataSize): back to old version handling generic pointers,
2556           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
2557             provided implementation and/or fixed old one,
2558           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
2559             calls, removed legacy 8051 reference code
2560           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
2561           (loadSignToC): NEW, move the operands sign bit to CARRY,
2562           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
2563             genRightShiftSigned, accepts negative shift counts,
2564           (setup_fsr): load FSR and adjust IRP (indirect memory access),
2565           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
2566             generic pointers, __data pointers and __code pointers,
2567           (genUnpackBits,genPackBits): rewritten to work with generic pointers
2568             and signed bitfields, limit bitfields to 8 bit,
2569           (genDataPointerGet): fixed number of bytes read,
2570           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
2571           (genPointerGet,genPointerSet): fixed handling of __code pointers,
2572             pointers to constant data are no longer assumed to point to __code
2573             space, removed invalid pointer types,
2574           (bitpatternFromVal): retrieve the PICs representation of an integer
2575             or float literal,
2576           (genDataPointerSet): fixed assigning to po_immediate operands,
2577           (genGenPointerSet): implemented as library call,
2578           (genIfx): fixed incorrect condition,
2579           (genAddrOf): limit generic pointers' addresses to 2 bytes,
2580             provide GPOINTER tag according to destination's storage class,
2581           (genCast): added code to handle casting to generic pointers, added
2582             sign-/zero extension of the result
2583           (aop_isLitLike,op_isLitLike): fixed handling of immediates
2584         * src/pic/gen.h: added macros to access IRP bit in STATUS register
2585         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
2586           extend the result
2587         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
2588           address/register resides in the shared banks
2589           (emitSymbolToFile): improved to handle global and `pinned' symbols,
2590             put all variables into separate sections (have the linker arrange
2591             them)
2592           (picglue): put init code and interrupt handlers in separate sections
2593         * src/pic/main.c: added port specific options table, modified to PORT
2594           structure to make GPOINTERs 3 byte, added pic14_options
2595           (_pic14_do_link): private linking routine (update paths to libraries,
2596             add libsdcc.lib by default)
2597         * src/pic/main.h: declare pic14_options
2598         * src/pic/pcode.c: fixed instructions i/o relations,
2599           (RegCond): reverted to correct version,
2600           (newpCodeOpLit): truncate literals to 8 bit,
2601           (genericPrint): added debug output,
2602           (getRegFromInstruction): fixed for various operand types, simplified
2603           (BuildFlow): fixed broken handling of isntructions with labels
2604           (LinkFlow): start at last instruction in flow (skip trailing comments),
2605             pass the flow on to the next instruction after CALL
2606           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
2607           (insertPCodeInstruction): fixed inserting after a skip instruction,
2608           (DoBankSelect): fixed for labeled instructions
2609           (OptimizepBlock): honor --nopeep switch
2610           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
2611         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
2612         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
2613           (pCodeOptime2pCodes): allow disabling this optimization via
2614             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
2615             but is still buggy), started implementation of a dataflow based
2616             pCode optimization (CSE + dead code elimination)
2617           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
2618         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
2619           names are independant of the stack location and therefore portable across
2620           devices
2621
2622 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2623
2624         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
2625           (selectSpil): fixed bug 1337835 by not spilling bit variables
2626         * support/regression/tests/bug1337835.c: added test for this bug
2627         * src/mcs51/peeph.def: restart after rule 3.c,
2628           addded rules 263.x to optimize loading constants
2629
2630 2005-10-26 Raphael Neider <rneider AT web.de>
2631
2632         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
2633         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
2634           (genAssign): emit warning when casting literals to generic pointer
2635             type, also applies when taking the address of a fixed variable,
2636           (genCast): improved casting to generic pointers
2637         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
2638           extern variables, added verbose error message
2639         * device/include/pic16/{string.h,errno.h}: added #pragma library c
2640
2641 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
2642
2643         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
2644         carry must be complemented too
2645         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
2646         could be emitted by genMinus
2647         * src/SDCCval.c (constVal): fixed bug 1305065
2648
2649 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
2650
2651         * src/SDCCast.c (addCast): added promotion for bit variables
2652         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
2653         promotion casts + optimisation
2654         (optimizeGetWord): fix warning 'i' might be used uninitialized
2655         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
2656         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
2657
2658 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2659
2660         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
2661         all chars are promoted to int; promotion should be handled in SDCCast.c
2662
2663 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2664
2665         * device/lib/_strcmp.c: Fixed bug 1326457
2666
2667 2005-10-11 Raphael Neider <rneider AT web.de>
2668
2669         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
2670         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
2671
2672 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2673
2674         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
2675         * support/regression/tests/sfr16.c: added test for the sfr32 bug
2676
2677 2005-10-04 Raphael Neider <rneider AT web.de>
2678
2679         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
2680           device/lib/pic16/pics.all: added pic18f1320
2681         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
2682
2683 2005-09-30 Raphael Neider <rneider AT web.de>
2684
2685         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
2686         * src/pic16/devices.inc: NEW, provides device descriptions
2687         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
2688
2689 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
2690
2691         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
2692           GETHBIT
2693
2694 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
2695
2696         * doc/sdccman.lyx: updated Highest Order Bit documentation,
2697           documented Any Order Bit, Higher Order Byte and Higher Order Word
2698         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
2699         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2700           (optimizeGetAbit): new, to get any bit, not only the high bit,
2701           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2702           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2703           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2704           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2705             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2706             GETABIT, GETBYTE, GETWORD: decorate them,
2707           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2708           (ast_print): added GETABIT, GETBYTE, GETWORD
2709         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2710         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2711           (geniCodeBinary): new generic binary icode,
2712           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2713         * src/port.h: updated comment for PORT.hasExtBitOp
2714         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2715           (genGetByte): new, to get a single byte,
2716           (genGetWord): new, to get a word from a long,
2717           (gen51Code): added GETABIT, GETBYTE, GETWORD
2718         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2719
2720 2005-09-23 Raphael Neider <rneider AT web.de>
2721
2722         * configure.in, configure: have device/lib/pic configured
2723         * device/lib/Makefile.in: added model-pic14
2724         * device/lib/clean.mk: added pic/ to clean rule
2725         * device/lib/pic: added rudimentary pic14 library providing support
2726           functions for multiplication/division/generic pointer access
2727         * src/SDCCopt.c (convilong): mark support functions as extern
2728           for pic14 port as well
2729         * src/pic/gen.c (genMult): added assertions,
2730           (genpic14Code): emit warning on unhandled iCodes
2731         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2732         * src/pic/pcode.c (pCodeOpCopy),
2733         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2734           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2735           SFR_REGISTER}), made safe for future extensions
2736         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2737           instructions even if preceeded by SKIP instructions (also remove
2738           them); removed unused code
2739         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2740           prevents leaving parts of the structure uninitialized after copying
2741
2742 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2743
2744         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2745           ago by me
2746         * support/regression/tests/addsub.c: added test for the bug
2747
2748 2005-09-21 Raphael Neider <rneider AT web.de>
2749
2750         * device/include/pic16/pic18f1220.h,
2751           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2752         * device/lib/pic16/Makefile.rules: added missing opening paren
2753         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2754           are provided in genutils.c,
2755           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2756           operand/result sizes,
2757           (genCmp): assert on NULL pointers first, then check deref'ed values
2758         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2759           result size
2760
2761 2005-09-18 Raphael Neider <rneider AT web.de>
2762
2763         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2764           as these are now unused,
2765           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2766         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2767           local, avoids uninitialized pointer dereference on r->name
2768         * src/pic16/ralloc.c (newReg): fixed indentation
2769
2770 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2771
2772         * src/SDCCval.c (constVal): fixed bug 730366
2773         * support/Util/SDCCerr.c,
2774         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2775
2776 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2777
2778         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2779
2780 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2781
2782         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2783
2784 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2785
2786         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2787           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2788         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2789           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2790         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2791         * packihx/packihx.c (hexDigit): made c unsigned char
2792         * as/mcs51/lklibr.c (fndsym),
2793         * link/z80/lkgb.c (gb),
2794         * link/z80/lklibr.c (fndsym),
2795         * link/z80/lkrloc.c (relr),
2796         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2797         * src/SDCC.lex (checkCurrFile, process_pragma),
2798         * src/SDCCglue.c (spacesToUnderscores),
2799         * src/SDCCmain.c (setParseWithComma, processFile),
2800         * src/asm.c (tvsprintf, printCLine),
2801         * src/avr/gen.c (emitcode, aopPut),
2802         * src/ds390/gen.c (emitcode),
2803         * src/hc08/gen.c (emitcode, emitinline),
2804         * src/mcs51/gen.c (emitcode, genInline),
2805         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2806           tokenizeLineNode),
2807         * src/pic/ralloc.c (debugLog),
2808         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2809           tokenizeLineNode),
2810         * src/pic16/ralloc.c (debugLog),
2811         * src/z80/main.c (_process_pragma):
2812            made all ctype.h function calls safe
2813         * src/SDCCopt.c: include math.h for fabs
2814         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2815           and used them throughout the code to make ctype.h function calls safe
2816         * src/ds390/main.c (asmLineNodeFromLineNode),
2817         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2818         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2819            unsigned char*
2820         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2821           (newpCodeAsmDir): made ctype.h function calls safe
2822         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2823           pic16_emitcode):  made lbp unsigned char*
2824         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2825           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2826         * src/xa51/gen.c (emitcode),
2827         * src/z80/gen.c (_emit2): made lbp unsigned char*
2828         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2829            char*
2830
2831 2005-09-05 Raphael Neider <rneider AT web.de>
2832
2833         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2834           access bank splitpoint
2835
2836 2005-09-05 Raphael Neider <rneider AT web.de>
2837
2838         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2839
2840 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2841
2842         * .version: changed to version 2.5.3
2843         * doc/sdccman.lyx: changed version to 2.5.3,
2844           documented --codeseg and --constseg and pragma codeseg and constseg,
2845           documented bit parameters (reentrant) and bit returning
2846         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2847            currFunc->recvSize, but is this ok for all ports?
2848           (ast2iCode): result of ~ on unsigned char must be cast to int for
2849            bool to work
2850         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2851           function pointers in bit space
2852         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2853           (processFuncArgs): call port.reg_parm() with reentrancy info
2854         * src/port.h,
2855         * src/avr/main.c,
2856         * src/ds390/main.c,
2857         * src/hc08/main.c,
2858         * src/pic/main.c,
2859         * src/pic16/main.c,
2860         * src/xa51/main.c,
2861         * src/z80/main.c: port.reg_parm prototype extended with
2862           "bool reentrant" parameter
2863         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2864           options.stackAuto for allocating bit register parameters
2865         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2866           (genSend): set BitBankUsed if it is,
2867           (selectRegBank): factored out of genCall for use in genPcall,
2868           (genCall): removed redundant dtype assignmen, use selectRegBank,
2869           (genPcall): handle returning in Carry properly, save in F0 if needed,
2870           (genReceive): handle bit register parameters
2871         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2872           (mcs51_assignRegisters): enable bit registers for all reentrant
2873            functions and don't set BitBankUsed unconditionally
2874         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2875         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2876         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2877
2878 2005-08-27 Borut Razem <borut.razem AT siol.net>
2879
2880         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2881         ppc-osx (Darwin) does not support -u option. It seems that it is
2882         supported only on Linux - GNU cp
2883
2884 2005-08-25 Borut Razem <borut.razem AT siol.net>
2885
2886         * sim/ucsim/gui.src/serio.src/Makefile.in,
2887           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2888           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2889           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2890           install and strip, since the strip at /usr/ccs/bin should be used
2891           on solaris
2892
2893 2005-08-24 Borut Razem <borut.razem AT siol.net>
2894
2895         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2896
2897 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2898
2899         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2900         ffffffffu
2901
2902 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2903
2904         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2905         * as/mcs51/lkmain.c (link_main): fixed warning
2906         * device/include/stdbool.h: ds390 has no advanced bit support yet
2907         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2908         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2909         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2910           and updated their macros
2911         * src/SDCCval.c (constVal): updated comment for renamed b_long
2912
2913 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2914
2915         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2916         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2917           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2918           (oprio): set priority for '['
2919         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2920            and adb_24_bit
2921         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2922         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2923         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2924         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2925           added overlayable BIT_BANK area
2926         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2927           (summary2): explain 'T' in legenda
2928         * as/mcs51/lkrloc.c: replaced old K&R style,
2929           (relr): added R_BIT processing,
2930           (errmsg): added "Bit-addressable relocation error",
2931           (adb_bit): added for converting from byte- to bit-addressable space,
2932           (adb_24_bit): added for converting from byte- to bit-addressable space
2933         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2934            used in reentrant functions now even as return value
2935         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2936         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2937           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2938         * src/SDCCglobl.h: added indicator BitBankUsed
2939         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2940            the bit registers b0-b7
2941         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2942           (geniCodeCast): fixed bug 1263853,
2943           (geniCodeLogicAndOr): put result in bool or char,
2944           (geniCodeReceive): added parameter func for accessing the return type,
2945           (geniCodeFunctionBody): pass func to geniCodeReceive
2946         * src/SDCCmain.c: added indicator BitBankUsed
2947         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2948         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2949           (checkSClass): don't put automatic bool/bit on stack,
2950           (checkFunction): removed check on function cannot return bit
2951         * src/SDCCsymt.h: added newBoolLink prototype
2952         * src/mcs51/gen.c (rb1regs): added bit registers,
2953           (movc): created for assigning to carry,
2954           (pushReg, popReg): created for pushing registers,
2955           (sameRegs): check both AOP_REG and AOP_CRY types,
2956           (aopOp): handle bit registers,
2957           (aopPut): optimization no self-assign,
2958           (saveRegisters): push reg->base (bits) only once for bit registers,
2959            and use pushReg,
2960           (unsaveRegisters): pop reg->base only once and use popReg,
2961           (assignResultValue): added parameter func and return in carry for bits,
2962           (genIpush): optimization no reload in A if not changed,
2963           (genSend): bit parameters in reentrant functions are passed in bit
2964            registers by first assigning to bits in B, then save registers and
2965            copy B to bits,
2966           (genCall): handle returning in Carry properly, save it in F0 if needed,
2967           (genPcall): updated assignResultValue call, this is not safe yet for bit
2968            returning function !!!
2969           (genFunction): don't generate equ's for bit registers and use pushReg,
2970           (genEndFunction): take care of bit returning functions and use popReg,
2971           (genRet): return bit in Carry,
2972           (genIfx): optimize bit registers and other directly addressable bits,
2973           (genReceive): updated assignResultValue call
2974         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2975           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2976            registers when using stack-auto
2977         * src/mcs51/ralloc.c (_G): added allBitregs,
2978           (regs8051): added the bit registers,
2979           (createStackSpil): use macro IS_BIT,
2980           (getRegBit): added to allocate a bit register, else spill,
2981           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2982           (updateRegUsage): factored out to ease stepping while debugging,
2983           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2984            also allocate bit registers,
2985           (fillGaps): handle bit registers,
2986           (findAllBitregs): added to create bit vector with all bit registers,
2987           (mcs51_allBitregs): returns this bit vector,
2988           (mcs51_assignRegisters): when using stack-auto use bit registers for
2989            passing parameters and creating local variables
2990         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2991
2992 2005-08-22 Borut Razem <borut.razem AT siol.net>
2993
2994         * device/lib/Makefile.in: replaced find option -or with -o
2995           to make it run on solaris
2996
2997 2005-08-22 Raphael Neider <rneider AT web.de>
2998
2999         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
3000           fixes #1265442 (crash on Solaris)
3001
3002 2005-08-20 Borut Razem <borut.razem AT siol.net>
3003
3004         * configure, configure.in: added tests for libsocket and libnsl libraries,
3005           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
3006           from support/regression/Makefile.in
3007         * support/regression/Makefile.in: added
3008         * device/lib/pic16/Makefile.common.in: force make to use bash shell
3009         * sim/ucsim/libtool: regenerated on sparc-solaris
3010         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
3011           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
3012           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
3013           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
3014           sparc-solaris, which doesn't use GNU ld linker
3015         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
3016         * as/Makefile: find on sparc-solaris does not support -maxdepth option
3017
3018 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
3019
3020         * src/mcs51/peeph.def: updated comments
3021
3022 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3023
3024         * device/lib/_gptrget.c,
3025         * device/lib/_gptrput.c: slightly shorter
3026         * doc/sdccman.lyx: incremented version
3027         * src/mcs51/peeph.def: moved peephole comments to the line of first
3028           change to better keep line correlation, reanimated 186.e
3029         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
3030
3031 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3032
3033         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
3034           David Saxton with quotes around file name.
3035
3036 2005-08-15 Borut Razem <borut.razem AT siol.net>
3037
3038         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
3039           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
3040           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
3041           make tests run on x86_64 platform
3042
3043 2005-08-13 Raphael Neider <rneider AT web.de>
3044
3045         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
3046           as it might be executed DURING a build (parallel make is wonderful)
3047
3048 2005-08-13 Raphael Neider <rneider AT web.de>
3049
3050         * device/lib/Makefile.in (port-specific-objects-pic16):
3051           revert to cp $(PORT)/bin/*.* $(PORTDIR)
3052         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
3053           dependency
3054         * device/lib/pic16/Makefile.rules: build subdirs before creating
3055           the library, removed builddir rule, create $(builddir) early in
3056           recurse rule, use empty recurse rule for leaf directories
3057         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
3058           mkdir errors (race condition), removed duplicate suffix "hex"
3059           from clean rules
3060         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
3061         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
3062           prevents mkdir -p from aborting on Alpha
3063
3064 2005-08-12 Raphael Neider <rneider AT web.de>
3065
3066         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
3067           db-statements in order to allow for arrays of pointers in code
3068           sections to be placed without interspersed 0-padding, fixes
3069           bug #1256215
3070         * (emitStatistics): fixed division by zero for pic18f1220
3071         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
3072           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
3073         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
3074         * (pic16_pCodeConstString): keep track of already emitted string
3075           literals to prevent "duplicate definitions of symbol _str_NR"
3076         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
3077           debug message
3078         * device/lib/Makefile.in: ignore failing PIC16 library builds
3079         * device/lib/pic16/Makefile: do not build if gputils are missing
3080         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
3081
3082 2005-08-10 Raphael Neider <rneider AT web.de>
3083
3084         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
3085           my last commit)
3086
3087 2005-08-10 Raphael Neider <rneider AT web.de>
3088
3089         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
3090           Rokas' patch to add the new fixed point type "__fixed16x16"
3091         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
3092           functions for __fixed16x16 arithmetics
3093         * device/lib/pic16: reimplemented the build system to support
3094           a separate build directory, better handling of libio (create
3095           the library in a separate subdir for each architecture) and
3096           easier configuration (centralized in Makefile.common)
3097
3098 2005-08-07 Raphael Neider <rneider AT web.de>
3099
3100         * src/pic16/gen.c (genrshTwo): fixed sign extension
3101         * src/pic16/device.c: added pic18f2320, 4220 and 4320
3102         * device/include/pic16/pic18f2220.h: changed some bit definitions,
3103           added T0CONbits
3104         * device/include/pic16/pic18f4220.h: NEW, header for
3105           pic18f4220 and pic18f4320
3106         * device/include/pic16/pic18fregs.h: added new devices,
3107           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
3108         * device/include/pic16/signal.h: resolved name clashes
3109           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
3110           to also allow testing for interrupt enable bits, added
3111           comments on how to use the macros
3112         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
3113         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
3114           register definitions for the devices
3115         * device/lib/pic16/pics.all: added new devices
3116         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
3117           allocated memory
3118         * device/lib/pic16/libc/stdlib/memfree: do not count
3119           the block header as free memory
3120         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
3121           simplified and added missing end-of-blocklist-marker
3122           (reported by Peter Onion, fixes #1252814)
3123         * (_mergeHeapBlock): fixed loop condition
3124         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
3125           len==0, restructured code
3126         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
3127           up a bit, reduced bitfield accesses, prevent endless loops
3128           in case of heap corruption
3129         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
3130           "unreferenced arguments/must return a value" warnings
3131         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
3132           replaced BAUDREG with SPBRG
3133         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
3134           device/lib/pic16/debug/gstack/gstack.c: replaced
3135           _naked, _asm, _endasm with __naked, __asm, __endasm
3136
3137 2005-08-05 Raphael Neider <rneider AT web.de>
3138
3139         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
3140           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
3141
3142 2005-08-05 Borut Razem <borut.razem AT siol.net>
3143
3144         * device/lib/Makefile.in: added missing ';'
3145         * configure: removed ^M characters
3146
3147 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3148
3149         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
3150           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
3151           License
3152
3153 2005-08-04 Borut Razem <borut.razem AT siol.net>
3154
3155         * configure.in: pic16 libraries build 2nd try - enable running
3156           configure in device/lib/pic16
3157         * configure: regenerated from configure.in
3158         * device/lib/Makefile.in: create $(PORT)/bin directory
3159
3160 2005-08-03 Raphael Neider <rneider AT web.de>
3161
3162         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
3163           to get/set values via pointers
3164         * (genUnpackBits,genPackBits): changed detection of
3165           ptr->bitfield vs. sym.bitfield, fixed access via generic
3166           pointers, removed dead (wrong) code for multibyte bitfields
3167         * (genNearPointerGet, genGenPointerGet): removed useless code,
3168           fixed bitfield detection, fixes #1250594
3169         * (genNearPointerSet): removed useless code
3170         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
3171           and introduced macro pic16_emitpcode that conditionally emits
3172           the origin of the following pCode (useful for debugging SDCC)
3173         * src/pic16/pcode.c: changed (and disabled) some debug outputs
3174         * (createDefmap): fixed handling of LFSR for --optimize-df
3175
3176 2005-08-02 Borut Razem <borut.razem AT siol.net>
3177
3178         * device/lib/Makefile.in: pic16 libraries build enabled since
3179           gputils-0.13.2 are now localy installed at sourceforge's compile farm
3180
3181 2005-08-02 Raphael Neider <rneider AT web.de>
3182
3183         * src/pic16/gen.c (genPackBits): removed deprecated warning
3184         * (genGenPointerSet): fixed bitfield detection
3185
3186 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3187
3188         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
3189
3190 2005-07-31 Raphael Neider <rneider AT web.de>
3191
3192         * device/lib/pic16/libdev/pic18f458.c,
3193           device/include/pic16/pic18f458.h: added missing T0CONbits
3194
3195 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3196
3197         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
3198
3199 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
3200
3201         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
3202
3203 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3204
3205         * device/include/mcs51/at89c51ed2.h: added.
3206
3207 2005-07-23 Raphael Neider <rneider AT web.de>
3208
3209         * src/pic/gen.h: added emitpcode macro for debugging
3210         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
3211           and replace by macro adding debug information on demand
3212         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
3213         * (gencjne): tried to fix; replaced with correct (slower) code
3214         * (gen{Unp,P}ackBits): fixed single bit access
3215         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
3216         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
3217           previous instruction
3218         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
3219           register has to be handled with care (forbidding movement
3220           of assignments/uses, removing assignments completely, ...)
3221         * (pCodeOptime2pCodes): make use of regIsSpecial
3222         * added lots of debugging output (commented out)
3223         * src/pic/rallloc.c (deassignLRs): prevent operand registers
3224           from being reused as result UNLESS it is known to work
3225
3226 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
3227
3228         * support/Util/dbuf.h: include <stddef.h> for size_t
3229         * .version: changed to version 2.5.2
3230
3231 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3232
3233         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
3234
3235 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3236
3237         * src/hc08/gen.c (genMinus): fixed bug #1241835,
3238           (genModOneByte): removed needless psha/pula
3239
3240 2005-07-22 Raphael Neider <rneider AT web.de>
3241
3242         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
3243           have PIC14 handled like PIC16, fixes broken pic14 linker calls
3244         * src/pic/gen.c (resolveIfx): do not "invent" labels
3245         * (genSkipc): changed to positive logic
3246         * (genSkipCond): removed as no longer needed
3247         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
3248           backport from PIC16
3249         * (genLeftShift): check operands are in different registers
3250         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
3251           INCF does not update CARRY...
3252         * src/pic/main.c: fixed _linkCmd
3253         * src/pic/pcode.c (unlinkpCode): added inactive code
3254         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
3255           alive (do not assign result and operand overlapping registers)
3256
3257 2005-07-22 Raphael Neider <rneider AT web.de>
3258
3259         * src/pic/device.c (dump_sfr): replaced register declaration with
3260           call to emitSymbolToFile() to avoid duplicate symbols
3261         * (assignRelocatableRegisters): do not declare external symbols
3262         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
3263           right (take size of type, not etype)
3264         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
3265         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
3266         * (packRegsForAccUse): disabled assignment of WREG as
3267           the result reg to prevent occurence of just fixed #1235003,
3268           fixes #1242954
3269         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
3270           symbols (avoids duplicate symbols in .asm file)
3271         * (pic14emitRegularMap): use emitSymbolToFile()
3272         * src/pic/gen.c (aopOp): fixed spillLocation handling
3273         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
3274         * (genDataPointerSet): removed unneccessary variables/output
3275
3276 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
3277
3278         * as/mcs51/lkarea.c: enlarged codemap for banked memory
3279         * device/lib/mcs51/crtbank.asm: added # to 0x0F
3280
3281 2005-07-21 Raphael Neider <rneider AT web.de>
3282
3283         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
3284           architecture cannot handle them efficiently, fixes bug #1235003
3285         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
3286           check for empty sets before using them (fixes bug #1232190)
3287
3288 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
3289
3290         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
3291           (lnksect2): generate warnings for memory overlap
3292         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
3293           constseg to set the name of these segments so you can instruct the linker
3294           to place them in banks
3295         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
3296         * src/SDCCglobl.h: added MODEL_HUGE to enum,
3297           added code_seg and const_seg to options
3298         * src/SDCCglue.c (emitMaps): use options.const_seg,
3299           (createInterruptVect): put interrupt vectors in segment HOME,
3300           (glue): put HOME before static segment and put the main glue in HOME,
3301           (glue): use options.code_seg
3302         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
3303         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
3304           these segments so you can instruct the linker to place them in banks
3305           (linkEdit): use code_loc for HOME segment which should be the first
3306           segment in code memory now
3307         * src/SDCCmem.c: fixed more stuff like bug 1238386
3308         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
3309           (changePointer): don't change function pointers to code pointers for
3310           banked functions,
3311           (compareType): added exceptional check for banked function pointers
3312         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
3313         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
3314           after static in code memory
3315         * src/mcs51/gen.c: added aopLiteralLong prototype,
3316           (aopForSym): use getSize for functions,
3317           (genCall): generate banked calls over one trampoline __sdcc_banked_call
3318           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
3319           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
3320           the segment,
3321           (genPcall): use call for literal function pointers and generate banked
3322           calls over the one trampoline so there's only one place for the user to
3323           modify according to his/hers hardware,
3324           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
3325           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
3326         * src/mcs51/main.c: added keyword banked,
3327           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
3328         * support/Util/SDCCerr.c,
3329         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
3330           needed for passing the bank and address to the trampoline
3331         * device/lib/mcs51/crtbank.asm: added for bankswitching
3332         * device/lib/mcs51/Makefile: added crtbank
3333
3334 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3335
3336         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
3337           for fields at offset 0 of a struct or union as reported
3338           on 2005-07-07 in the developer mailing list.
3339
3340 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
3341
3342         * src/SDCCmem.c: fixed bug 1238386
3343
3344 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3345
3346         * src/mcs51/peeph.def: added labelrefcounting for peepholes
3347           (patch #1144962), added peephole 300, enabled 259.x
3348         * doc/sdccman.lyx: removed screenshot and provided link instead
3349
3350 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3351
3352         * doc/sdccman.lyx: added section about debugging with ddd
3353         * doc/figures/ddd_example.eps: screenshot of debugging session
3354
3355 2005-07-04 Raphael Neider <rneider AT web.de>
3356
3357         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
3358           like CODE pointers, fixes #1115683
3359         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
3360           call, fixes bugs #1232211, #1228110,
3361           fixed wrong casts to pCodeFlow from pCodeInstructions
3362
3363 2005-07-04 Raphael Neider <rneider AT web.de>
3364
3365         * src/pic/gen.c (popGet): changed assert to allow for
3366           bit operands
3367         * (popGetAddr): changed signature to provide
3368           an additional index, patched all call sites
3369         * (genCmpEq): handle literal-like operands correctly
3370         * (genAddrOf): added sanity checks on __code/__data pointers
3371         * (genAssign): added handling of symbols from __code section
3372         * (gencjne): do not generate code for comparisons whose result
3373           is neither stored nor used, fixes bug #1171114
3374         * (AccLsh, AccRsh): operate on operand instead of WREG
3375         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
3376           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
3377           by known count
3378         * rewrote complete shift-by-literal logic, commented unused
3379           functions out
3380         * (genConstPointerGet): get multiple bytes (if result size > 1),
3381           fixed handling of non-immediate addresses
3382         * (genPointerGet): handle CODE pointers like CONST pointers
3383         * (genpic14Code): insert C-SRC lines as Cource-pCodes
3384         * ({aop,op}_isLitLike): NEW, single place to decide whether an
3385           operand is to be treated as a literal or not
3386         * (mov2w,genPcall,genCmpEq),
3387           src/pic/genarith.c: use aop_isLitLike() to decide between
3388           literal/register contents
3389         * (addSign): added missing offset
3390         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
3391           only emit comment in debug-mode,
3392           use {aop,op}_isLitLike throughout the file
3393         * src/pic/glue.c: fix initializers for pointers (work in progress)
3394         * src/pic/pcode.c (get_op): honor index on _const symbols
3395         * ({reset,dump}pCodeStatistics): NEW, estimate code size
3396         * (dumppBlock): added pCode size estimation
3397         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
3398           check for IS_SYMOP before OP_SYMBOL'ing
3399         * fixed indentation, compacted switch-statements
3400         * (allocReg): find free register and allocate it instead of
3401           allocating new registers all the time
3402         * (deassignLRs): prevent POINTER_GET's from being assigned the same
3403           registers as its operands (necessary only for multibyte GETs)
3404
3405 2005-07-01 Raphael Neider <rneider AT web.de>
3406
3407         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
3408           debugging .asm-output macros FENTRY + FEXIT
3409         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
3410           way... I wonder...
3411         * (emitpComment): NEW, printf to pCode
3412         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
3413           offset handling
3414         * (popGetAddr): NEW, variant of popGet to access an immediates
3415           high(er) bytes instead of the n'th byte of memory they reference,
3416           replaced popGet with popGetAddr where neccessary
3417         * (genDataPointerGet): reactivated and fixed implementation
3418         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
3419           accesses
3420         * (genDataPointerSet): fixed multibyte assignments
3421         * (genpic14Code): fixed --i-code-in-asm handling
3422         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
3423         * (genPlus): fixed index-out-of-bounds error
3424         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
3425         * src/pic/ralloc.c: added debugging output macro FENTRY2
3426         * (spillThis): fixed indentation, enbraced for-body for clarity
3427         * (rematStr): commented out as now unused
3428         * (regTypeNum): commented out special spill case (overwrites
3429           arbitrary values)
3430         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
3431
3432 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
3433
3434         * doc/sdccman.lyx: documented sfr16/sfr32,
3435           added example for using storage class with function pointers
3436         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
3437
3438 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
3439
3440         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
3441         * device/lib/_itoa.c,
3442         * device/lib/_ltoa.c: optimized codesize
3443         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
3444           but don't know how to suppress the double warning.
3445         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
3446         * support/Util/SDCCerr.c,
3447         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
3448
3449 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
3450
3451         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
3452           fixed old K&R prototypes
3453         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
3454         * device/lib/_gptrget.c,
3455         * device/lib/_gptrgetc.c,
3456         * device/lib/_gptrput.c: changed versions for new memory indicator values,
3457           also new versions for small generic pointers and banked generic pointers
3458         * src/port.h: added const_name
3459         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
3460         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
3461         * src/SDCCcse.c (findPrevIc): check all associative operators
3462         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
3463         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
3464         * src/SDCCmem.c: updated comments,
3465           set far-space to 0 for pdata, results in optimized code
3466         * src/SDCCmem.h: added macro CONST_NAME
3467         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
3468           moving the info into the highest bits, see also gptrget/gptrput
3469         * src/src.dsp: added sdcc.ico to project files
3470         * src/avr/gen.c (genCast): fixed bug 0x%d
3471         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
3472         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
3473           relation between ptr_type and DCL_TYPE,
3474           (genCast): fixed bug 0x%d
3475         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
3476           (CODE)" for const_name
3477         * src/hc08/gen.c (genCast): fixed bug 0x%d
3478         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
3479           (hc08_port): added "CONST (CODE)" for const_name
3480         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
3481           (aopForRemat, adjustArithmeticResult): disconnected direct relation
3482           between ptr_type and DCL_TYPE,
3483           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
3484           operand* and took AOP() inside function so sfr-ness can be checked,
3485           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
3486           new prototype,
3487           (genFunction, genEndFunction): optimized stack setup,
3488           (genMinus): optimized for literals with ending zeroes (in bytes),
3489           (genCast): fixed bug 0x%d
3490         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
3491           (mcs51_port): added "CONST (CODE)" for const_name
3492         * src/mcs51/peeph.def: made rule 226 more generic
3493         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
3494         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
3495         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
3496         * src/z80/main.c (z80_port): added NULL for const_name,
3497           (gbz80_port): added NULL for const_name
3498         * support/regression/tests/bug663539.c,
3499         * support/regression/tests/sfr16.c: new tests
3500
3501 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3502
3503         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
3504
3505 2005-06-24 Raphael Neider <rneider AT web.de>
3506
3507         * device/lib/pic16/libdev/pic18f[68][567]20.c:
3508           corrected typos...
3509         * device/include/pic16/signal.h: added USBIF
3510           and SIG_USB
3511
3512 2005-06-24 Raphael Neider <rneider AT web.de>
3513
3514         * device/lib/pic16/libdev/pic18f2455.c,
3515           device/include/pic16/pic18f2455.h: NEW
3516         * device/include/pic16/pic18fregs.h,
3517           device/lib/pic16/pics.all,
3518           src/pic16/device.c: added 18f2455
3519         * device/lib/pic16/libdev/pic18f[68][567]20.c,
3520           device/include/pic16/{pic18f[68][567].h,usart.h}:
3521           replaced MULTIPLE_USARTS define with more relaible
3522           compatibility sfrs (for USART access)
3523
3524 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
3525
3526         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
3527           and the output asm file line is printed on two lines.
3528
3529 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3530
3531         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
3532           BGT, BLE, BHI, and BLS instructions
3533         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
3534           genCmpEq): removed
3535         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
3536           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
3537           fixes bug #1216342
3538         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
3539
3540 2005-06-15 Raphael Neider <rneider AT web.de>
3541
3542         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
3543         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
3544         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
3545           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
3546           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
3547
3548 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3549
3550         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
3551           Marcel Telka in bug #1215704
3552
3553 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
3554
3555         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
3556           located in shared memory bank.
3557
3558 2005-05-31 Raphael Neider <rneider AT web.de>
3559
3560         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
3561           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
3562           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
3563
3564 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
3565
3566         * device/lib/_strncpy.c: fixed the fix
3567
3568 2005-05-26 Raphael Neider <rneider AT web.de>
3569
3570         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
3571           initializers with \0, bug #1208187
3572         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
3573           intializers with \0, bug #1208187
3574
3575 2005-05-26 Raphael Neider <rneider AT web.de>
3576
3577         * src/pic16/glue.c (pic16_printIvalChar): fixed string
3578           initializers with \0, bug #1208187
3579         * src/pic16/main.c (_process_pragma): added sanity checks
3580           for stack position and size, emit warnings when appropriate
3581
3582 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
3583
3584         * device/lib/_strncpy.c: fixed not filling with \0
3585
3586 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3587
3588         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
3589           createFunction),
3590         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
3591           compound_statement),
3592         * src/SDCCsymt.h,
3593         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
3594
3595 2005-05-24 Raphael Neider <rneider AT web.de>
3596
3597         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
3598
3599 2005-05-24 Raphael Neider <rneider AT web.de>
3600
3601         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
3602           TRISE definitions, closes bug #1162453
3603
3604 2005-05-22 Raphael Neider <rneider AT web.de>
3605
3606         * src/pic16/main.c (_process_pragma): check for missing
3607           arguments to pragmas code and udata
3608         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
3609           consistency fixes to match other headers (thanks to Jim Paris)
3610         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
3611
3612 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
3613
3614         * src/SDCCicode.c (isOperandEqual): fixed missing ;
3615
3616 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
3617
3618         * support/regression/tests/bug1198642.c: new test
3619         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
3620         * src/SDCCcse.c (findPrevIc): added comment, please have a look
3621         * support/scripts/resource.h,
3622         * support/scripts/resource.rc,
3623         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
3624         * support/scripts/sdcc.ico: added 32x32 icon
3625
3626 2005-05-18 Raphael Neider <rneider AT web.de>
3627
3628         * device/lib/pic16/libdev/pic18f*.c,
3629         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
3630           keywords to "__sfr" and "__at (X)"
3631         * device/include/pic16/pic18fregs.h: added pic18f4520
3632         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
3633           #1203088 (MPLAB compatibility)
3634
3635 2005-05-17 Raphael Neider <rneider AT web.de>
3636
3637         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
3638         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
3639         * device/lib/pic16/pics.all: added new devices
3640         * src/pic16/device.c: added support for pic18f4520
3641
3642 2005-05-16 Raphael Neider <rneider AT web.de>
3643         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
3644         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
3645         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
3646           convenience function for bit access
3647
3648 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3649
3650         * device/lib/printf_large.c: fixed bug 1193299
3651         * support/regression/tests/bug1057979.c: added test %3.3s
3652
3653 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3654
3655         * device/include/mcs51/8051.h,
3656         * device/include/mcs51/8052.h: made parseable with lint
3657         * device/include/mcs51/lint.h: added include file for (sp)lint
3658         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
3659         * doc/cdbfileformat.lyx,
3660         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
3661
3662 2005-05-14 Raphael Neider <rneider AT web.de>
3663
3664         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
3665         * device/lib/pic16/libc/stdlib/itoa.c (new)
3666         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
3667         * device/lib/pic16/libio/Makefile: exclude subdir according to
3668           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
3669         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
3670         * src/pic16/gen.c (genFunction): prevent annoying warning
3671         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
3672           nameclashes on BeOS
3673         * support/cpp2/cppmain.c (cpp_output_string): new
3674         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
3675           fixes bug 1116802
3676
3677 2005-05-13 Borut Razem <borut.razem AT siol.net>
3678
3679         * src/SDCCmain.c (linkEdit): fixed bug 1195202
3680
3681 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3682
3683         * .version: changed to version 2.5.1; back to bleeding edge development
3684
3685 2005-05-11 Borut Razem <borut.razem AT siol.net>
3686
3687         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
3688           generate PDF version 1.3 documents
3689
3690 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3691
3692         * .version: changed to version 2.5.0
3693
3694 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3695
3696         * doc/sdccman.lyx: updated weblinks, index and smaller updates
3697
3698 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3699
3700         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3701         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3702         well as many smaller updates.
3703         * .version: changed to version 2.5.0-pre1
3704
3705 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3706
3707         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3708
3709 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3710
3711         * support/regression/tests/bug1185672.c: added
3712         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3713           bug 1185672
3714         * src/mcs51/gen.c (genCall): added comments, made it look safer
3715         * src/mcs51/gen.c (genEndFunction): simplified
3716
3717 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3718
3719         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3720
3721 2005-04-14 Borut Razem <borut.razem AT siol.net>
3722
3723         * fixed bug 1045046 - SIGSEGV with really simple code?:
3724           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3725           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3726
3727 2005-04-14 Borut Razem <borut.razem AT siol.net>
3728
3729         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3730           src/pic16/device.h: temporarily disabled experimental #inline pragma
3731           for 2.5.0 release
3732
3733 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3734
3735         * device/include/z80/stdio.h,
3736         * device/include/z80/string.h: removed these highly incomplete files so
3737           SDCC can use the default ones in device/include/
3738
3739 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3740
3741         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3742         gcc warning.
3743         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3744         fix sdcpp warnings.
3745
3746 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3747
3748         * device/include/malloc.h: removed redundant __reentrant prototypes
3749         * device/lib/_mullong.c: added working xstack variant in asm (C version
3750           doesn't pass regression tests)
3751         * device/lib/bpx.c: used __data and made bpx char for mcs51
3752         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3753           (createFunction): fixed bug with xstackPtr
3754         * src/SDCCcse.c: corrected comments
3755         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3756           (killDeadCode, eBBlockFromiCode): removed unused code
3757         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3758           corrected comments
3759         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3760           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3761           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3762           (genModOneByte): fixed warning in MSVC
3763         * src/mcs51/main.c (): added comments
3764         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3765
3766 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3767
3768         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3769
3770 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3771
3772         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3773
3774 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3775
3776         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3777         characters arrays of larger size than the declared one.
3778
3779 2005-04-10 Borut Razem <borut.razem AT siol.net>
3780
3781         * src/pic/gen.c (genInline),
3782           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3783           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3784           (findNextInstruction), (findPrevInstruction),
3785           (findInstructionUsingLabel),
3786           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3787         * src/pic/pcode.c (findLabel): added missing '\n'
3788         * src/src.dsp: added SDCCdwarf2.c to the project
3789
3790 2005-04-09 Borut Razem <borut.razem AT siol.net>
3791
3792         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3793
3794 2005-04-08 Raphael Neider <rneider AT web.de>
3795
3796         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3797           into the chain after a given one) and mergeDefmapSymbols (combine
3798           defmap entries for each symbol per pcode)
3799         * (createDefmap): have defmap entries merged in the end
3800         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3801           a symbol before replacing one access type's symbol, merge symbols in
3802           the end (replacement symbol might already have an entry)
3803         * (assignValnums): keep reference to written WREG intact
3804
3805 2005-04-08 Raphael Neider <rneider AT web.de>
3806
3807         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3808           Alpha)
3809
3810 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3811
3812         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3813         bytes
3814
3815 2005-04-07 Raphael Neider <rneider AT web.de>
3816
3817         * device/include/pic16/usart.h: added compatibility defines for
3818           devices with more than one USART
3819         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3820
3821 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3822
3823         * device/lib/Makefile.in: updated for port specific include
3824
3825 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3826
3827         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3828
3829 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3830
3831         * device/include/8051.h,
3832         * device/include/8052.h,
3833         * device/include/at89S8252.h,
3834         * device/include/at89c55.h,
3835         * device/include/at89x051.h,
3836         * device/include/at89x51.h,
3837         * device/include/at89x52.h,
3838         * device/include/mcs51reg.h,
3839         * device/include/reg51.h,
3840         * device/include/reg764.h,
3841         * device/include/regc515c.h,
3842         * device/include/sab80515.h: (re)moved these 12 files
3843         * device/include/mcs51/8051.h,
3844         * device/include/mcs51/8052.h,
3845         * device/include/mcs51/at89S8252.h,
3846         * device/include/mcs51/at89c55.h,
3847         * device/include/mcs51/at89x051.h,
3848         * device/include/mcs51/at89x51.h,
3849         * device/include/mcs51/at89x52.h,
3850         * device/include/mcs51/mcs51reg.h,
3851         * device/include/mcs51/reg51.h,
3852         * device/include/mcs51/reg764.h,
3853         * device/include/mcs51/regc515c.h,
3854         * device/include/mcs51/sab80515.h: and added them here
3855
3856 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3857
3858         * device/include/stdarg.h: changed SDCC specific keywords to double
3859           underlined form.
3860         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3861           mcs51 and ds390.
3862         * device/include/hc08/mc68hc908gp32.h,
3863         * device/include/hc08/mc68hc908jb8.h,
3864         * device/include/hc08/mc68hc908jkjl.h,
3865         * device/include/hc08/mc68hc908qy.h: fixed comments
3866         * device/include/mcs51/README: updated
3867         * device/include/mcs51/c8051f120.h: added PINRSF
3868         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3869         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3870           amidst code. Also inline is not supported.
3871
3872 2005-04-06 Raphael Neider <rneider AT web.de>
3873
3874         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3875         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3876           callers stack/frame pointers
3877
3878 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3879
3880         * device/include/pic16/usart.h: added, missing in previous commit,
3881         * device/include/pic16/adc.h: fixed typo,
3882         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3883         commit,
3884         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3885         <p18fxxx.inc>
3886         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3887         uninitialized because a bug appears with gplink
3888         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3889         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3890         complains for unrecognised option
3891
3892 2005-04-05 Raphael Neider <rneider AT web.de>
3893
3894         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3895           structs as well (using memcpy)
3896         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3897           on ISRs (GOTO has no label)
3898         * src/pic16/device.h: added OF_OPTIMIZE_DF
3899         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3900           new data flow analysis/optimization
3901         * src/pic16/pcode.c: added (prototypes for and implementation of)
3902           dataflow analysis functions, fixed pCodeInstructions' inCond and
3903           outCond values, made RCALL a branch instruction
3904         * (pic16_unlinkpCode): keep C line if possible
3905         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3906           C line moved if possible
3907         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3908         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3909           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3910         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3911           new flow)
3912         * (pic16_getJumptabpCode): NEW, needed in...
3913         * (LinkFlow): fixed handling of jumptables, calls and conditional
3914           branches
3915         * (pic16_InsertCommentAfter): NEW
3916         * (pic16_pCodeReplace): made verbose and flow preserving
3917         * (AnalyzeFlow): added call to data flow analysis
3918         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3919         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3920         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3921
3922 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3923
3924         * src/SDCCast.c (decorateType): fixed bug #1105626
3925
3926 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3927
3928         * device/include/asm/pic16/features.h,
3929         * pic18f*.h headers,
3930         * device/include/pic16/adc.h,
3931         * device/include/pic16/delay.h,
3932         * device/include/pic16/i2c.h,
3933         * device/include/pic16/malloc.h,
3934         * device/include/pic16/stdio.h,
3935         * device/include/pic16/stdlib.h,
3936         * device/include/pic16/string.h,
3937         * device/lib/pic16/libc/stdio/printf_tiny.c,
3938         * device/lib/pic16/libc/stdio/printf_small.c,
3939         * device/lib/pic16/libc/stdio/strmgpsim.c,
3940         * device/lib/pic16/libc/stdio/strmmssp.c,
3941         * device/lib/pic16/libc/stdio/strmusart.c,
3942         * device/lib/pic16/libc/stdio/vfprintf.c,
3943         * device/lib/pic16/libc/stdlib/ltoa.c,
3944         * device/lib/pic16/libc/stdlib/putchar.c,
3945         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3946         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3947         * device/lib/pic16/libc/stdlib/memchrram.c,
3948         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3949         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3950         * device/lib/pic16/libio/adc/adcbusy.c,
3951         * device/lib/pic16/libio/adc/adcread.c,
3952         * device/lib/pic16/libio/adc/adcsetch.c,
3953         * device/lib/pic16/libio/usart/ubaud.c,
3954         * device/lib/pic16/libio/usart/ubusy.c,
3955         * device/lib/pic16/libio/usart/udrdy.c,
3956         * device/lib/pic16/libio/usart/uopen.c,
3957         * device/lib/pic16/libio/usart/uputc.c,
3958         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3959         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3960         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3961         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3962         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3963         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3964         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3965         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3966         specific keywords to double underlined form,
3967         * device/lib/pic16/libc/Makefile.rules,
3968         * device/lib/pic16/libsdcc/Makefile.rules,
3969         * device/lib/pic16/libm/Makefile,
3970         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3971         to compile with C standard set in Makefile.common
3972         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3973         rand.c and crc.c in compilation process,
3974         * device/lib/pic16/libsdcc/int/divuint.c,
3975         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3976         `c' from signed to unsigned,
3977         * device/lib/pic16/startup/crt0.c,
3978         * device/lib/pic16/startup/crt0i.c,
3979         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3980         keywords to double underlined form, bug fixes in _do_cinit function
3981         which prevented the correct initialization of the .idata segment,
3982         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3983         core to enter a infinite loop
3984         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3985
3986 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3987
3988         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3989
3990 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3991
3992         * device/include/Makefile.in: add support for hc08 subdirectory
3993         * device/include/hc08/: new subdirectory
3994         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3995         Lucas Loizaga, thanks!
3996         * device/include/hc08/mc68hc908qy.h,
3997         * device/include/hc08/mc68hc908gp32.h,
3998         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3999         their own directory. Changed internal macro names to use the compiler
4000         reserved namespace. Changed SDCC specific keywords to double
4001         underlined form.
4002         * device/include/math.h,
4003         * device/include/malloc.h,
4004         * device/include/stdarg.h,
4005         * device/include/stdbool.h
4006         * device/include/string.h,
4007         * device/include/tinibios.h,
4008         * device/include/ds400rom.h,
4009         * device/include/8051.h,
4010         * device/include/8052.h,
4011         * device/include/80c51xa.h,
4012         * device/include/at89c55.h,
4013         * device/include/at89S8252.h,
4014         * device/include/at89x51.h,
4015         * device/include/at89x52.h,
4016         * device/include/ds80c390.h,
4017         * device/include/reg764.h,
4018         * device/include/regc515c.h,
4019         * device/include/sab80515.h,
4020         * device/include/mcs51/c8051f000.h,
4021         * device/include/mcs51/c8051f018.h,
4022         * device/include/mcs51/c8051f020.h,
4023         * device/include/mcs51/c8051f040.h,
4024         * device/include/mcs51/c8051f060.h,
4025         * device/include/mcs51/c8051f120.h,
4026         * device/include/mcs51/c8051f300.h,
4027         * device/include/mcs51/c8051f310.h,
4028         * device/include/mcs51/c8051f320.h,
4029         * device/include/mcs51/c8051f330.h,
4030         * device/include/mcs51/c8051f350.h,
4031         * device/include/z180.h: Changed SDCC specific keywords to double
4032         underlined form.
4033
4034 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
4035
4036         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
4037         18F4455,
4038         * (pic16_assignConfigWordValue): disable testing of configuration
4039         register value with config mask,
4040         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
4041         function with port->fun_prefix,
4042         * (genFunction): when generating a naked interrupt function never
4043         create an absolute segment placed in interrupt vector address, place
4044         the actual interrupt function at IVA instead, when an interrupt
4045         function is generated with unspecified interrupt then do not create
4046         the absolute section,
4047         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
4048         code for generating a call to generic pointer get/put function with
4049         a call to function pic16_callGenericPointer(),
4050         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
4051         the call to the generic pointer get/put functions with prefixing the
4052         function name with port->fun_prefix,
4053         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
4054         * src/pic16/main.c (_process_pragma): prefix function with
4055         port->fun_prefix,
4056         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
4057         calling assembler, old 18Fxxxx macro is deprecated,
4058         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
4059         PC_ASMDIR in while condition,
4060         * (findInstruction): add PC_ASMDIR in while condition,
4061         * (buildCallTree): prefix main with port->fun_prefix,
4062         * (pic16_pCode2str): fixed bug that didn't emit the memory access
4063         identifier for variable with banked access in instructions BTFSS,
4064         BTFSC, BCF, BSF, BTG
4065         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
4066         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
4067         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
4068         perform optimization when enviroment variable NO_REG_OPT is set,
4069         * (insideLRBlock): NEW, return 1 if register is inside an
4070         INF_LOCALREGS block,
4071         * (RemoveRegFromLRBlock): remove a register that is completely
4072         eliminated by register optimization, but it is still left in local
4073         register store/restore in/from stack block,
4074         * (Remove2pcodes): after removing register, check to see if it
4075         should be removed from local register store/restore in/from stack
4076         block,
4077         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
4078         DUMMY_READ_VOLATILE,
4079
4080         * device/include/pic16/adc.h: minor prototype modifications and
4081         update,
4082         * device/include/pic16/malloc.h: added GPL notice various
4083         modifications,
4084         * device/include/pic16/stdint.h: NEW, standard header for ints
4085         * device/include/pic16/delay.h: NEW, header for delay functions,
4086         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
4087         delay1mtcy,
4088         * device/include/pic16/signal.h: NEW, header providing helper macros
4089         for implementing signal handlers,
4090         * device/include/pic16/stdio.h: added prototypes for functions,
4091         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
4092         prototypes for stdin and stdout, added macro PUTCHAR to
4093         automatically implement putchar function prototype,
4094         * device/include/pic16/usart.h: modified and updated USART library,
4095         * device/lib/pic16/libio/adc/,
4096         * device/lib/pic16/libio/i2c: some modifications to improve library
4097         performance,
4098         * device/lib/pic16/libc/stdio/: modifications for the new printf*
4099         family of functions,
4100         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
4101         family of functions and other sources,
4102         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
4103         of the PIC18Fxx[28] devices,
4104         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
4105         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
4106         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
4107         _do_cinit function, because the previous failed when local variables
4108         where not placed in the same memory bank,
4109         * device/lib/pic16/libsdcc/char/: various modifications to improve
4110         library performance,
4111         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
4112         information on the new functions of the c library and more...
4113
4114 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4115
4116         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
4117
4118 2005-03-26 Raphael Neider <rneider AT web.de>
4119
4120         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
4121           if condition == CARRY)
4122         * (genCmp): adapted to new genSkipc semantics
4123         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
4124           on rIfx (genCmp was broken)
4125
4126 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4127
4128         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
4129         * src/z80/main.c (_keywords[]),
4130         * src/SDCCglobal.h (struct options),
4131         * src/SDCC.y,
4132         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
4133         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
4134         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
4135         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
4136         always available in leading double underscore form. The C99 support is
4137         mostly missing, but it's a start.
4138         * support/regression/tests/bug-227710.c: fixed nonconforming use of
4139         reserved identifier "__data".
4140
4141 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
4142
4143         * src/mcs51/peeph.def: fixed bug 1170013
4144
4145 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
4146
4147         * device/include/mcs51reg.h: fixed bug 842007
4148
4149 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4150
4151         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
4152         last time.
4153
4154 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4155
4156         * src/port.h (struct PORT),
4157         * src/avr/ralloc.c (avr_assignRegisters),
4158         * src/avr/main.c,
4159         * src/ds390/ralloc.c (ds390_assignRegisters),
4160         * src/ds390/main.c,
4161         * src/hc08/ralloc.c (hc08_assignRegisters),
4162         * src/hc08/main.c,
4163         * src/mcs51/ralloc.c (mcs51_assignRegisters),
4164         * src/mcs51/main.c,
4165         * src/pic/ralloc.c (pic14_assignRegisters),
4166         * src/pic/main.c,
4167         * src/pic16/ralloc.c (pic16_assignRegisters),
4168         * src/pic16/main.c,
4169         * src/xa51/ralloc.c (xa51_assignRegisters),
4170         * src/xa51/main.c,
4171         * src/z80/ralloc.c (z80_assignRegisters),
4172         * src/z80/ralloc.h,
4173         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
4174         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
4175         * src/SDCCcse.h,
4176         * src/SDCCdflow.c (computeDataFlow),
4177         * src/SDCCdflow.h,
4178         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
4179         * src/SDCCloop.h,
4180         * src/SDCCcflow.c (*),
4181         * src/SDCCcflow.h,
4182         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
4183         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
4184         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
4185         immedDom() returning wrong block; probably fixes bug #1160833)
4186
4187 2005-03-20 Borut Razem <borut.razem AT siol.net>
4188
4189         * support/scripts/inc2h.pl: WIN32 port
4190
4191 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
4192
4193         * device/lib/makefile.in: added abs.c and labs.c
4194
4195 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
4196
4197         * device/include/stdint.h: added
4198         * device/lib/abs.c: added
4199         * device/lib/labs.c: added
4200         * device/include/stdlib.h: added abs() and labs() prototypes
4201         * device/lib/libsdcc.lib: added abs and labs
4202         * device/include/float.h,
4203         * device/lib/_fsmul.c,
4204         * device/lib/printf_fast.c,
4205         * device/lib/printf_tiny.c: updated comments
4206
4207 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4208
4209         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
4210         bug #1164313
4211
4212 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4213
4214         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
4215         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
4216
4217 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
4218
4219         * device/lib/printf_large.c: removed inline assembly for portability and
4220           readability. Use printf_fast if speed or size are more important.
4221         * src/pic16/gen.c: removed conditions around use of DEBUGpc
4222         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
4223
4224 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
4225
4226         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
4227         prevent compiler warning
4228
4229 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
4230
4231         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
4232         moved to level 0 and declared as static. Also they are explicit
4233         placed in access bank. This was necessery because some times they
4234         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
4235         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
4236         optimizations. Currently only compare to unsigned char is implemented,
4237         * src/pic16/gen.c: added fReturnIdx array,
4238         * (struct resolvedIfx) is moved to gen.h and made public,
4239         * (struct _G): added sregsAlloc and sregsAllocSet fields,
4240         * (aopForSym): added an optimization to directly store in stack of
4241         the operand of a SEND iCode,
4242         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
4243         but as registers instead (AOP_REG) using the fReturnIdx array,
4244         * (pic16_freeAsmop): remove the freed register from the
4245         _G.sregsAlloc field,
4246         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
4247         a compare of 'WREG',
4248         * (pic16_popGetTempRegCond): changed function prototype, now
4249         function takes also a bitVector argument v which holds the current
4250         set of registers that are allocated for stack access by aopForSym,
4251         registers allocated in aopForSym for accessing stack symbols are not
4252         any more part of the functions usedRegs field,
4253         * (genCall): some times aopOp is called for a stack variable to be
4254         send, aopForSym might perform the push, if this is true make sure
4255         that genCall doesn't push the variable twice by testing _G.resDirect,
4256         * (genFunction): changed testing for unspecified interrupt number
4257         from 256 to INTNO_UNSPEC,
4258         * modified selection scheme of frame pointer generation. Previously
4259         if function did use local registers a frame pointer was generated,
4260         now a frame pointer is generated only if function has arguments
4261         (that need PLUSW2 register access), or has stack arguments, or the
4262         compiler is not instructed to omit the frame pointer,
4263         * (genEndFunction): before restoring local registers that were saved
4264         in the function preamble, also restore the registers that *might*
4265         have been allocated for stack access,
4266         * (genRet): removed some old comments,
4267         * (genCmp, the active (RN's) version): added a call to the
4268         pic16_genCmp_special function to perform the compare with a more
4269         robust and optimized way,
4270         * (genInline): a feature has been added in inline code generation,
4271         which allows a wildcard variable substitution when writing inline
4272         assembly. Code is incomplete and experimental therefore undocumented,
4273         * (genCast): changed order of aopOp for result and right to allow
4274         aopForSym to directly load the result if possible,
4275         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
4276         perform an optimized compare on some selected special occasions,
4277         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
4278         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
4279         generate an IVT any more,
4280         * src/pic16/main.c (pic16_optionsTable): added command line option
4281         --optimize-cmp,
4282         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
4283         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
4284         macros,
4285         * src/pic16/NOTES: Raphael Neider added in list of active developers
4286         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
4287         jumptable_end to prevent bug #,
4288         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
4289         inCond and outCond fields,
4290         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
4291         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
4292         turn off register spilling,
4293         * (packRegsForOneUse): synced with other ports' versions although it
4294         is not used currently,
4295         * (pic16_packRegisters): added an optimization while reading
4296         structure bitfields, some registers may be saved (malloc code is
4297         decreased by 80 bytes)
4298
4299 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
4300
4301         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
4302         left is a bitfield, if yes, then don't optimize assignment. Perhaps
4303         this can be optimized more?
4304
4305 2005-03-10 Raphael Neider <rneider AT web.de>
4306
4307         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
4308           genNearPointerGet): (hopefully) fixed access to bitfields via
4309           pointers (p->bitN = x; and x = p->bitN; failed)
4310
4311 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
4312
4313         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
4314
4315 2005-03-09 Raphael Neider <rneider AT web.de>
4316
4317         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
4318
4319 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
4320
4321         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
4322         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
4323           (regTypeNum): set REG_BIT type if necessary
4324         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
4325         * support/regression/tests/critical.c: check bug 1144613
4326
4327 2005-03-02 Raphael Neider <rneider AT web.de>
4328
4329         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
4330
4331 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4332
4333         * src/avr/ralloc.c (serialRegAssign),
4334         * src/ds390/ralloc.c (serialRegAssign),
4335         * src/hc08/ralloc.c (serialRegAssign),
4336         * src/mcs51/ralloc.c (serialRegAssign),
4337         * src/pic/ralloc.c (serialRegAssign),
4338         * src/pic16/ralloc.c (serialRegAssign),
4339         * src/xa51/ralloc.c (serialRegAssign),
4340         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
4341
4342 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
4343
4344         * src/SDCCast.c (decorateType): fixed bug 1124787
4345
4346 2005-02-20 Hubert Sack <sack AT digiplan.de>
4347         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4348
4349         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
4350         patch #1121755
4351
4352 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4353
4354         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
4355         to keep the correct label reference count when adding/removing references
4356         to labels. A peephole file using this is appended to patch #1144962.
4357
4358 2005-02-14 Raphael Neider <rneider AT web.de>
4359
4360         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
4361         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
4362         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
4363           retrievals of result operand's value on assignment
4364
4365 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
4366
4367         * device/include/pic16/string.h: modified prototype for memccpy()
4368         to memccpy(void *, void *, char, size_t)
4369         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
4370         check whether to omit frame pointer or not,
4371         * (genInline): convert all occurences of "\n" to LF in inline
4372         assembler blocks, this helps formatting the inline text,
4373         * (pic16_loadFSR0): modified prototype,
4374         * (genNearPointerGet, genNearPointerSet): reorganization of code,
4375         removed some 8051 legacy code,
4376         * (genPackBits): enabled handling bitfields exceeding one byte in size,
4377         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
4378         before allocating temporary registers in functions,
4379
4380 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
4381
4382         * support/regression/tests/bitvars.c: corrected the "fix"
4383
4384 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
4385
4386         * support/regression/tests/bitvars.c,
4387         * support/regression/tests/bitwise.c,
4388         * support/regression/tests/rotate.c: "fixed" problems on Alpha
4389
4390 2005-02-10 Raphael Neider <rneider AT web.de>
4391
4392         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
4393           different size for Alpha
4394         * src/pic16/gen.c (genCmpEq) : improved compare with 0
4395
4396 2005-02-09 Raphael Neider <rneider AT web.de>
4397
4398         * src/SDCC.lex(doPragma) : save and restore warning options as well
4399           (also added new stack plus clone- and copyAndFreeSDCCERRG())
4400         * have #pragma less_pedantic set the errorlevel to WARNING
4401           (fixes #1117001)
4402         * (cloneOptimize) : fixed wrong malloc's size
4403         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
4404           facilitate correct handling of #pragma (save|restore)
4405
4406 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
4407
4408         * src/mcs51/gen.c: removed non-standard C nameless struct/union
4409
4410 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
4411
4412         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
4413
4414 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
4415
4416         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
4417
4418 2005-02-02 Raphael Neider <rneider AT web.de>
4419
4420         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
4421         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
4422         * (pic16_storeForReturn): fixed to allow returning function pointers
4423         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
4424         * device/include/pic16/{stddef.h,stdbool.h}: added
4425
4426 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
4427
4428         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
4429
4430 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
4431
4432         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
4433         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
4434          appeared to be required
4435
4436 2005-01-31 Borut Razem <borut.razem AT siol.net>
4437
4438         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
4439           include/mcs51 and include/z80 directories to the package
4440
4441 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4442
4443         * src/hc08/gen.c (genFunction): fixed bug #1112752
4444
4445 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4446
4447         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
4448
4449 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4450
4451         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
4452
4453 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
4454
4455         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
4456
4457 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
4458
4459         * device/include/c8051fxxx.h: removed these 6 files
4460         * device/include/mcs51/c8051fxxx.h: added these 11 new files
4461
4462 2005-01-26 Raphael Neider <rneider AT web.de>
4463
4464         * src/pic16/gen.c (genAssign): fixed assignment from longs
4465           in codespace (were cut to three bytes)
4466         * (genDummyRead): implemented (except for CODESPACE...),
4467           fixed bug #1108575
4468         * src/pic16/glue.c (emitStatistics): beautified
4469         * device/lib/pic16/libm/Makefile: added include path
4470
4471 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4472
4473         * src/z80/gen.c (aopPut): fixed bug #1103902
4474
4475 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4476
4477         * device/lib/expf.c: fixed bug #1095792
4478
4479 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
4480
4481         * device/lib/pic16/libm: added Math library sources
4482
4483 2005-01-24 Raphael Neider <rneider AT web.de>
4484
4485         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
4486           to enable upcast to pCodeOpReg2 (there is no type tag to
4487           differenciate the two and pic16_popGet2p cast into PCOR2)
4488         * src/pic16/main.c (_process_pragma): fixed another malloc bug
4489           (sizeof(sectNames) changed to sizeof(sectName))
4490           Both patches fix segfaults under MinGW.
4491
4492 2005-01-23 Raphael Neider <rneider AT web.de>
4493
4494         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
4495           Safe_[mc]?alloc()'ed variables
4496         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
4497           of (byte sized) temporaries (assign them to WREG for now)
4498         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
4499           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
4500           this might fix SIGSEGVs on MinGW...
4501         * src/SDCCopt.c (killDeadCode): restored original behaviour
4502           (volatile operands might get thrown away though)
4503
4504 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
4505
4506         * src/pic16/gen.c: fixed bug #1106975,
4507         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
4508         pointer update, INTCON is saved, global interrupts are disabled and
4509         restored after updateing TOS.
4510         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
4511         * added function attribute 'shadowregs' to take advantage of shadow
4512         registers,
4513         * added function attribute 'wparam' as an alternative to the wparam
4514         pragma,
4515         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
4516         user declares a non-ISR function as 'shadowregs',
4517         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
4518
4519 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
4520
4521         * .version: bumped version number to 2.4.8
4522         * device/lib/pic16/pics.all: list of PIC18F devices supported by
4523         pic16 port,
4524         * device/lib/pic16/libio/i2c/: I2C module support library,
4525         * device/include/pic16/i2c.h: I2C support library header,
4526         * device/lib/pic16/libc/stdio/: standard IO support sources,
4527         * (printf_small.c): printf_small() source, supports float print,
4528         * (printf_tiny.c): printf_tiny() source, does not support floats,
4529         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
4530         enable global optimizations for entire library source, other
4531         Makefiles in the source tree are also modified to reflect this,
4532         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
4533         function,
4534         * doc/sdccman.lyx: updated to reflect new changes,
4535         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
4536         sym->onStack if-case,
4537         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
4538         sbit, idata, _idata, xdata, _xdata,
4539         * added pragma library, to link an external library, (see doc),
4540         * removed command line options, --pomit-config-words, --pomit-ivt,
4541         --pleave-reset-vector,
4542         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
4543         when calling assembler to reflect memory model used, also define
4544         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
4545         reflect stack model used,
4546         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
4547         on stack return NULL,
4548
4549 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4550
4551         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
4552           of the operands is volatile. Fixes #1020220
4553
4554 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4555
4556         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
4557         * (OptimizeRegUsage): make sure that there is really no other flow where
4558           the first pCode is used
4559
4560 2005-01-22 Raphael Neider <rneider AT web.de>
4561
4562         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
4563           to fix #1106967 (pCode->seq are not set up correctly)
4564
4565 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4566
4567         * src/SDCCglue.c (glue): make sure code area is declared before the
4568         static initialization area.
4569
4570 2005-01-21 Raphael Neider <rneider AT web.de>
4571
4572         * device/lib/Makefile.in: fixed test for pic16 install dir
4573         * device/lib/pic16/*/Makefile*: modified compile flags to enable
4574           optimizations
4575         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
4576           added --optimize-goto compiler switch and pragma wparam documentation
4577         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
4578         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
4579           and PRODH closing bug #1071770 (peephole optimizer)
4580
4581 2005-01-19 Raphael Neider <rneider AT web.de>
4582
4583         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
4584           cmdLine buffers (used when calling sdcpp...) are large enough
4585           (MAX_PATH=256 truncates arguments leading to system halts when
4586           used in MinGW...)
4587         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
4588         * (genUminus): rewritten to for efficiency
4589         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
4590           used uninitialized in some cases)
4591         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
4592           copy the third byte from the int -- now assumes 0x80 (data memory)
4593         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
4594           operands (genAddLit expects the iCode's operands to swapped as
4595           well), fixed leftover bytes (crashed for short left operands)
4596         * (pic16_genMinusDec): performance improvements, removed false
4597           PIC14 emitSKPNCs
4598         * (pic16_genMinus): fixed to cope with differently sized operands
4599         * src/pic16/glue.c (pic16_glue): added new banksel optimization
4600           for --obanksel > 1
4601         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
4602         * src/pic16/graph.[ch]: implementation of directed graphs, used by
4603           new banksel optimization
4604         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
4605           analysis for temporary registers (segfaults...)
4606         * src/pic16/peeph.def: added rule
4607
4608 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
4609
4610         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
4611         which converts a float number to its ASCII representation
4612         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
4613         functions to convert the fractional and integer part of a float to ASCII,
4614         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
4615         realloc.c): added _MALLOC_SPEC to explicit place variables in data
4616         ram
4617         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
4618         _STATMEM macros,
4619         * device/include/pic16/adc.h: added GPL info,
4620         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
4621         a pCodeOp as tested operand,
4622         * (genNearPointerGet): optimized bit testing, does not use
4623         intermediate register for bit value, test directly instead with
4624         BTFSS, BTFSC, works only for single bits,
4625         * (genpic16Code): dump the name of the iCode in the asm,
4626         * src/pic16/ralloc.c (decodeOp): removed static declaration and
4627         renamed to pic16_decodeOp,
4628         * (serialRegAssign): do not allocate a temporary register for iCode
4629         sequences that test a single bit for 1/0
4630
4631 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
4632
4633         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
4634         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
4635         access stack and frame pointers. They are initially assigned to
4636         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
4637         accessing SFRs. Updated all occurences of modification of stack or
4638         frame pointer in gen.c and pcode.c,
4639         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
4640         assigning of a literal value to pointers,
4641         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
4642         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
4643         selected
4644
4645 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4646
4647         * doc/sdccman.lyx: update documentation about stack pragma, added
4648         some info for stack memory models
4649
4650 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4651
4652         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
4653
4654 2005-01-08 Raphael Neider <rneider AT web.de>
4655
4656         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
4657           udata sections to fix bug #1097823
4658
4659 2005-01-05 Raphael Neider <rneider AT web.de>
4660
4661         * src/pic16/gen.c (genGenericShift): added handling of differently
4662           sized left operand and result
4663
4664 2005-01-04 Raphael Neider <rneider AT web.de>
4665
4666         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
4667         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
4668           to hold the condition bit)
4669         * added new version of genCmp (old code available via #define)
4670         * added new version of genShiftLeft/genShiftRight in a generic
4671           way, now supports shifting by negative values
4672         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
4673           shiftCount (expected by genGenericShift)
4674         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
4675         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
4676           dump
4677         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
4678           is an invalid literal too...)
4679
4680 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
4681
4682         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
4683         from Raphael Neider,
4684         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
4685         for 8-bit literals. This fixes some literal operands which are sign
4686         extended to 16-bits ints when instruction needs only 8-bits.
4687
4688 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
4689
4690         * device/lib/logf.c: added mcs51 assembly version
4691         * device/lib/expf.c: added mcs51 assembly version
4692         * device/lib/_logexpf.c: new shared asm code for expf and logf
4693         * device/include/math.h: add defines for assembly math library
4694         * device/lib/Makefile.in: build new _logexpf.c
4695         * device/lib/libfloat.lib: use new _logexpf.c
4696
4697 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4698
4699         * src/pic/device.c
4700         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4701           device types which have less than 0x7f registers.
4702
4703 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4704
4705         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4706
4707 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4708
4709         * device/lib/printf_fast.c: only build on supported arch.
4710         * device/lib/printf_tiny.c: only build on supported arch.
4711         * device/lib/printf_fast_f.c: only build if asm float lib
4712         * device/lib/_fsget1arg.c: only build if asm float lib
4713         * device/lib/_fsget2args.c: only build if asm float lib
4714         * device/lib/_fsnormalize.c: only build if asm float lib
4715         * device/lib/_fsreturnval.c: only build if asm float lib
4716         * device/lib/_fsrshift.c: only build if asm float lib
4717         * device/lib/_fsswapargs.c: only build if asm float lib
4718         * device/include/stdio.h: don't provide print_fast,
4719           print_fast_f, print_tiny prototypes if --xstack used
4720
4721 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4722
4723         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4724         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4725           to the SOURCES
4726
4727 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4728
4729         * device/lib/printf_fast_f.c: same as printf_fast, but
4730           with floating point enabled
4731         * device/lib/printf_fast.c: minor tweaks
4732         * device/include/stdio.h: add printf_fast_f
4733
4734 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4735
4736         * src/SDCCmain.c: make --float-reent default for mcs51
4737         * device/lib/_fsadd.c: added mcs51 assembly version
4738         * device/lib/_fssub.c: added mcs51 assembly version
4739         * device/lib/_fsmul.c: added mcs51 assembly version
4740         * device/lib/_fsdiv.c: added mcs51 assembly version
4741         * device/lib/_fseq.c: added mcs51 assembly version
4742         * device/lib/_fsneq.c: added mcs51 assembly version
4743         * device/lib/_fsgt.c: added mcs51 assembly version
4744         * device/lib/_fslt.c: added mcs51 assembly version
4745         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4746         * device/lib/Makefile.in: add _fscmp to build
4747         * device/lib/libfloat.lib: add _fscmp to build
4748
4749 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4750
4751         * device/lib/_fs2slong.c: added mcs51 assembly version
4752         * device/lib/_fs2sint.c: added mcs51 assembly version
4753         * device/lib/_fs2schar.c: added mcs51 assembly version
4754         * device/lib/_fs2ulong.c: added mcs51 assembly version
4755         * device/lib/_fs2uint.c: added mcs51 assembly version
4756         * device/lib/_fs2uchar.c: added mcs51 assembly version
4757         * device/lib/_slong2fs.c: added mcs51 assembly version
4758         * device/lib/_sint2fs.c: added mcs51 assembly version
4759         * device/lib/_schar2fs.c: added mcs51 assembly version
4760         * device/lib/_ulong2fs.c: added mcs51 assembly version
4761         * device/lib/_uint2fs.c: added mcs51 assembly version
4762         * device/lib/_uchar2fs.c: added mcs51 assembly version
4763         * device/include/float.h: added #define to select asm vs c
4764
4765 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4766
4767         * device/lib/printf_fast.c: improvements to float output
4768         * device/include/float.h: add defines for assembly float library
4769         * device/lib/_fsget1arg.c: receive 1 float arg
4770         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4771         * device/lib/_fsnormalize.c: normalize a float
4772         * device/lib/_fsreturnval.c: return float, various helper routines
4773         * device/lib/_fsrshift.c: right shift a float's mantissa
4774         * device/lib/_fsswapargs.c: swap 2 floats
4775         * device/lib/Makefile.in: build these 6 new files for mcs51
4776         * device/lib/libfloat.lib: add these 6 files to the library
4777
4778 2004-12-26 Borut Razem <borut.razem AT siol.net>
4779
4780         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4781           built by gcc 3.4.2
4782
4783 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4784
4785         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4786           and fully reentrant and register bank neutral.
4787         * device/lib/printf_fast.c: added float (not enabled by default),
4788           added compact/slower integer (also not enabled by default),
4789           improved size/speed of fast integer code, other minor changes
4790         * device/include/stdio.h, device/lib/Makefile.in,
4791           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4792
4793 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4794
4795         * src/pic16/pcode.c: declaring variables other than at the start of a
4796           block is not supported in C by VC6.
4797
4798 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4799
4800         * applied a previous patch from Raphael Neider that wasn't included
4801         in the previous commits, which fixes infinite loops within jumptable
4802         improvements,
4803         * made some fixes that previous patches introduced
4804
4805 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4806
4807         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4808         that fixes an issue with AOP_PCODE asmop's offset,
4809         * (pic16_popCopyReg): update instance field too,
4810         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4811         function of pic port,
4812         * (genCmp, genAnd, genAssign),
4813         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4814
4815 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4816
4817         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4818         variables initial values to idata section,
4819         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4820         variables in some functions. This utilizes parmBytes field of iCode
4821         structure to hold the offset of the variable in stack. (might be
4822         able to use the stack field too?)
4823         * applied patch from Raphael Neider # ### , # ###
4824         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4825         variable initial values in idata section,
4826         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4827         for static variables with initial value
4828         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4829         applied fix in while loop from Raphael Neider.
4830
4831 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4832
4833         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4834         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4835         * src/ds390/ralloc.c (serialRegAssign): spill bits
4836         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4837         * support/Util/SDCCerr.c,
4838         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4839         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4840         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4841
4842 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4843
4844         * device/include/sdcc-lib.h: inserted LGPL, added includes
4845           asm/ds390/features.h and asm/mcs51/features.h
4846         * device/include/asm/default/features.h,
4847         * device/include/asm/gbz80/features.h,
4848         * device/include/asm/z80/features.h: added empty _AUTOMEM
4849           and _STATMEM
4850         * device/include/asm/ds390/features.h,
4851         * device/include/asm/mcs51/features.h: added files with defines for
4852           _AUTOMEM and _STATMEM indicating automatic and static storage class
4853         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4854         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4855         * src/SDCCicode.c (geniCodeCast),
4856         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4857         * src/SDCCloop.c (loopInduction): removed unused variable lr
4858         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4859           to convertToFcall to include char modulo (RFE 1065037), added check
4860           if left operand is unsigned and use abs of literal value
4861         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4862           as it doesn't work after conversion from peephole.def to peephole.rul
4863         * src/mcs51/gen.c (toBoolean): added check for size,
4864           (genModOneByte): optimized code for signed char modulo a literal
4865           power of 2 (thanks to Hubert Sack),
4866           (genRRC): removed unnecessary "clr c",
4867           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4868         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4869           jump optimization,
4870           swapped rules 256.c and 256.d,
4871           extended 256.d by using new multiple checks (thanks Erik),
4872           added rules 256.e and 256.f,
4873           updated rule 261.a and 261.b to new generated code
4874         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4875
4876 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4877
4878         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4879           induction related bugs, including first part of bug #1074377
4880
4881 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4882
4883         * applied patch from bug-report #1076292,
4884         * applied patches for genAnd and Goto-optimizations for Raphael
4885         Neider,
4886         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4887         dump a less iCode information,
4888         * src/pic16/device.h (pic16_options_t): added field debgen,
4889         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4890         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4891         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4892         puclic,
4893         * (various functions): added macros FENTRY and FENTRY2 to functions,
4894         to emit function prologue,
4895         * (various functions): fixed indentation,
4896         * (genNearPointerGet): fixed loading of FSR0,
4897         * (genPackBits): applied patch from Raphael Neider to fix updating
4898         of FSR0 and touching only the modified bits,
4899         * src/pic16/genarith.c (various functions): added macros FENTRY to
4900         emit function prologue in comments,
4901         * src/pic16/pcode.h: added functions debugf2, debugf3,
4902         * src/pic16/ralloc.c: partial fix for packForPush caused
4903         segmentation fault,
4904
4905 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4906
4907         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4908           <stsp AT users.sourceforge.net> with reversed byte order
4909         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4910
4911 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4912
4913         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4914           bug #1074377
4915         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4916         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4917
4918 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4919
4920         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4921
4922 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4923
4924         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4925           conditions,
4926           (setFromConditionArgs): friendly operand parser for peephole rules,
4927           (operandBaseName, operandsNotRelated): new peephole condition
4928           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4929           architecture specific register naming into account, handles n-way
4930           comparisons, and supports quoted literals
4931         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4932
4933 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4934
4935         * src/mcs51/peeph.def: fixed bug #1076940
4936
4937 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4938
4939         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4940
4941 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4942
4943         Adding support for replacing ljmps with sjmps in jumptables
4944         generated for switch statements. For now you need to set the
4945         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4946         Now 4 algorithms for mcs51 jumptable generation are used:
4947         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4948         addresses loaded pc-relative for up to 112 cases and stack-pushing
4949         target addresses loaded with offset from dptr for up to 256 cases.
4950
4951         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4952         * src/mcs51/main.c: adapted constants for switch table generation
4953         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4954
4955 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4956
4957         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4958         * support/regression/tests/bug1057979.c: added test for bug 1073386
4959
4960 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4961
4962         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4963         compilers
4964
4965 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4966
4967         * src/pic16/device.h,
4968         * src/pic16/genarith.c,
4969         * src/pic16/glue.c,
4970         * src/pic16/main.c,
4971         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4972
4973 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4974
4975         Large cummulative patch for pic16 port.
4976         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4977         to call when a stack overflow occurs,
4978         * (malloc.h): added CVS Id tag,
4979         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4980         variable,
4981         * added libc directory. The current version of LibC contains string
4982         functions, ctype functions and macros and some functions of the
4983         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4984         be extensively tested in the future. Standard disclaimer here.
4985         Library is not automatically build yet. But one can build it by
4986         invoking 'make' inside the libc directory.
4987         * added ADC library under libio. Preliminary version yet.
4988
4989         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4990         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4991         aopForRemat() now and not by pic16_aopOp(),
4992         * (pic16_popGetTempReg): removed warning messgae when allocating
4993         temporary registers, its a buggy feature and will be removed,
4994         * (pic16_popGet): set register instance field in AOP_CRY,
4995         * (pic16_outBitC): fixed for results in size greater than 1,
4996         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4997         * (pic16_storeForReturn): optimized return of 0,
4998         * (genCmp): experimental code for new genCmp which uses PIC18's
4999         special compare&skip instructions. Initial tests fail some times
5000         with variables grater than 1 byte in size, so new code is disabled,
5001         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
5002         a single bit,
5003         * (genCast): began a fix to optimize the casting of a bit to another
5004         bit, now assigning a bitfield to another bitfield will fail, sorry,
5005         * src/pic16/main.c: disabled the use of lr-support feature,
5006         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
5007         * added some function prototypes, added function _debugf prototype,
5008         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
5009         bits with offset (case PO_GPR_BIT),
5010         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
5011         command line,
5012         * (isBankInstruction): modified to return 0 for no banking instruction,
5013         and 1 for banking instruction,
5014         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
5015         caused stop processing pCodes after a inline assembly block,
5016         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
5017         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
5018         registers when it shouldn't,
5019         * src/pic16/ralloc.c (allocReg): add preliminary support for
5020         supporting a limited set of temporary registers,
5021
5022 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5023
5024         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
5025           genDataPointerSet): ensure assignments always copy in MSB to LSB
5026           order,
5027           (loadRegFromAop): recognize CLRH optimization,
5028           (genFunction): optimize RECEIVE iCodes in reentrant functions
5029
5030 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5031
5032         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
5033           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
5034           selected.
5035         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
5036         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
5037           contiguous with data
5038
5039 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5040
5041         * device/lib/_gptrget.c (_gptrget),
5042         * device/lib/_gptrgetc.c (_gptrgetc),
5043         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
5044           instead of sjmp to ret
5045         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
5046           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
5047
5048 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
5049
5050         * .version: bumped version to 2.4.7
5051         * device/lib/_gptrget.c (_gptrget): is now _naked
5052         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
5053         * device/lib/_gptrput.c (_gptrput): is now _naked
5054         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
5055           (createFunction): fixed xstack
5056         * src/SDCCglue.c (emitMaps): set allocation required for bit area
5057         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
5058           or bit either,
5059           (geniCodeCritical): store original interrupt state in an iTemp bit
5060           var unless stack-auto
5061         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
5062         * src/SDCCmain.c (setIncludePath): added include/target to search path
5063         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
5064         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
5065           prototype,
5066           (processFuncArgs): put bit vars in bit area
5067         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
5068           unsaveRBank): fixed xstack,
5069           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
5070           (genFunction, genEndFunction): fixed xstack,
5071           (genAssign): optimization don't walk backwards through mem
5072         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
5073         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
5074         * support/regression/Makefile: also make library (for stack-auto) when
5075           making "all" and added "test-mcs51-xstack-auto"
5076         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
5077         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
5078         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
5079         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
5080         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
5081           make-library by MAKE_LIBRARY
5082         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
5083           regression tests for xstack
5084         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
5085         * support/regression/tests/critical.c: test for critical on mcs51
5086
5087 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5088
5089         * support/regression/ports/ucz80/spec.mk: use include and lib files from
5090           built version of sdcc instead of installed version
5091
5092 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
5093
5094         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
5095         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
5096           vprintf.c now
5097         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
5098         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
5099           WARNING: remove device/lib/build/z80/printf.o by hand when
5100           updating from previous build!
5101         * device/lib/z80/printf.c: updated comment
5102         * support/regression/tests/bug1057979.c: test all ports now
5103         * support/regression/tests/bug1065458.c: file added
5104
5105 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5106
5107         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
5108           *_start and *_end symbols for static functions
5109
5110 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
5111
5112         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
5113           and search crt0.o in all library paths,
5114           (setIncludePath): proper handling of --nostdinc,
5115           (setLibPath): proper handling of --nostdlib
5116         * support/regression/Makefile,
5117         * support/regression/ports/ds390/spec.mk,
5118         * support/regression/ports/gbz80/spec.mk,
5119         * support/regression/ports/hc08/spec.mk,
5120         * support/regression/ports/mcs51/spec.mk,
5121         * support/regression/ports/mcs51-large/spec.mk,
5122         * support/regression/ports/mcs51-stack-auto/spec.mk,
5123         * support/regression/ports/z80/spec.mk: use include and lib files from
5124           built version of sdcc instead of installed version
5125         * doc/sdccman.lyx: fixed typo in --nostdinc
5126
5127 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
5128
5129         * src/pic/pcode.c,
5130         * src/pic/device.c,
5131         * src/pic/ralloc.c,
5132         * src/pic/gen.c : added support to generate code for struct bit fields.
5133
5134 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
5135
5136         * as/xa51/xa_version.h,
5137         * device/include/errno.h,
5138         * device/include/regc515c.h,
5139         * device/lib/_itoa.c,
5140         * device/lib/_ltoa.c,
5141         * device/lib/ser_ir_cts_rts.c,
5142         * sim/ucsim/xa.src/glob.cc,
5143         * sim/ucsim/xa.src/inst_gen.cc,
5144         * sim/ucsim/xa.src/xa_bit.cc,
5145         * sim/ucsim/xa.src/xa_sfr.cc,
5146         * sim/ucsim/z80.src/inst_dd.cc,
5147         * sim/ucsim/z80.src/inst_fdcb.cc,
5148         * support/scripts/keil2sdcc.pl,
5149         * src/pic16/pic16.dsp,
5150         * src/pic16/pic16a.dsp: corrected cvs line endings
5151         * device/lib/printf_large.c: fixed bug 1057979
5152         * src/pic16/gen.c: fixed non-C standard code
5153         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
5154         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
5155         * support/regression/ports/mcs51/support.c: reload T1 asap
5156         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
5157           pdata use and clear idata startup behaviour
5158         * support/regression/tests/bug1057979.c: added
5159
5160 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
5161
5162         * device/examples/ds390/ow390/ad26.h,
5163         * device/examples/ds390/ow390/cnt1d.h,
5164         * device/examples/ds390/ow390/crcutil.c,
5165         * device/examples/ds390/ow390/ownet.h,
5166         * device/examples/ds390/ow390/owsesu.c,
5167         * device/examples/ds390/ow390/swt12.h,
5168         * device/examples/ds390/ow390/swtoper.c,
5169         * device/examples/ds390/ow390/temp10.h,
5170         * device/examples/ds390/ow390/thermodl.c,
5171         * device/examples/ds390/tinitalk/tinitalk.dsp,
5172         * device/examples/ds390/tinitalk/tinitalk.dsw,
5173         * device/examples/mcs51/clock/hw.h,
5174         * device/examples/mcs51/simple2/go.bat,
5175         * device/examples/serialcomm/windows/serial.h,
5176         * device/examples/xa51/dummy.c,
5177         * device/examples/xa51/hello.c,
5178         * device/include/80c51xa.h,
5179         * device/include/at89x051.h: corrected cvs line endings
5180
5181 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
5182
5183         * src/pic16/main.c (options): added command line --gstack, to trace
5184         stack over/under flows,
5185         * added pragma 'wparam' to allow passing first byte of function
5186         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
5187         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
5188         call to __gstack_test function and sets up the symbol as extern,
5189         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
5190         * popaop): added call to pic16_testStackOverflow,
5191         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
5192         wparamList list,
5193         * (genCall, genPcall): now all parameters are passed via stack
5194         except in functions that are pass to wparam pragma in which WREG is
5195         used too,
5196         * (genPcall): REENTRANT flag is checked to see if variable prototype
5197         contains reentrant keyword, don't call a non-reentrant function, via
5198         a reentrant function pointer or vice versa, functions are never
5199         passed via WREG,
5200         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
5201         D.Winkler,
5202         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
5203         SIGSEGV when accessing a NULL register stucture,
5204         * (pic16_printGPointerType): modified to handle UPPER modifier for
5205         function initializers, changed prototype of function to simpler one,
5206         * (pic16_printIvalFuncPtr): check to see if function is already
5207         added in externs list,
5208         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
5209         optimized a move from W to SFR with a move to the same register
5210         later after a CALL,
5211         * device/lib/pic16/debug: NEW directory, contains debug features
5212         which are enabled when linking with libdebug.lib, currently command
5213         line option --gstack enables stack pointer tracing for over/under
5214         flow, corresponding sources are in debug/gstack
5215
5216 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
5217
5218         * doc/sdccman.lyx: updated SDCC version,
5219         * (PIC16 port): update list of command line options,
5220         * src/pic16/device.h (structure pic16_options_t): added field gstack
5221         to enable stack overflow tracing on push/pops,
5222         * src/pic16/device.c (statistics structure): added statistics
5223         structure,
5224         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
5225         pic16_dump_int_registers): increase statistics counters for each
5226         * variable which is encountered
5227         * (pic16_dump_usection): emit each .udata variable to its own udata
5228         section,
5229         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
5230         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
5231         parameters via stack, otherwise use old scheme,
5232         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
5233         assembler output file,
5234         * src/pic16/main.c: added command line options --gstack to enable
5235         push/pop tracing for stack overflow,
5236         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
5237         instructions): added size of each instruction,
5238         * (pic16_countInstruction): estimate size of instructions in
5239         the_pFile list, inline assembly blocks are not counted,
5240         * (pic16_FixRegisterBanking): trace previous register usage, when
5241         banksel optimizations is greater than 0, don't emit a redudant
5242         banksel directive,
5243
5244 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
5245
5246         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
5247         * src/pic16/ralloc.c : applied same fix for pic16.
5248         * src/pic/gen.c : tidied it up a little.
5249
5250 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5251
5252         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
5253         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
5254
5255 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5256
5257         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
5258
5259 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5260
5261         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
5262         non-reentrant function __modsint in the interrupt function (thus
5263         corrupting math operations during serial I/O)
5264         * device/lib/ser_ir.c: as above, changed buffersize
5265         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
5266         256.c,d for zeroing
5267         * doc/Makefile: added option -t for rsync
5268
5269 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5270
5271         * src/SDCCast.h (struct ast),
5272         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
5273
5274 2004-10-20 Borut Razem <borut.razem AT siol.net>
5275
5276         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
5277         package
5278
5279 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
5280
5281         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
5282         makefile targets,
5283         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
5284         support functions to replace long sequences of MOVFF's from access
5285         bank registers to stack and vice versa,
5286         * src/pic16/device.h: added new field opt_flags, where optimization
5287         flags can be set to enable certain features,
5288         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
5289         * pBlock, (genFunction, genEndFunction): surroung loop for
5290         saving/loading used registers in stack with PC_INFO pCodes,
5291         INF_LREGS. Code in between can then be optimized by pCode optimizer
5292         to support function calls,
5293         * (genDataPointerSet): fixed bug which loaded float fields in
5294         structures with corrupt data,
5295         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
5296         in a standard way debug info on stderr. Feature used for developing
5297         and debugging only,
5298         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
5299         obsolete chunks of code,
5300         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
5301         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
5302         * pic16/src/pcode.c (pic16_newpCodeInfo,
5303         * (pic16_newpCodeOpLocalRegs),
5304         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
5305         feature,
5306         * (pic16_pCodeConstString): printing of the initial value of a
5307         symbol as a comment is inhibited since parsing was already done by
5308         copyStr and output is corrupt,
5309         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
5310
5311 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5312
5313         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
5314
5315 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
5316
5317         * as/mcs51/lkarea.c: removed old K&R style,
5318           (lnksect): changed check on boundary error,
5319           (lnksect2): changed check on boundary error,
5320           (lnksect2): extend XSTK to end of page if size = 1
5321         * as/mcs51/lkmain.c: removed old K&R style,
5322           (Areas51): create l_IRAM symbol
5323         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
5324         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
5325           model-mcs51-stack-auto, added model-mcs51-xstack-auto
5326         * device/lib/_mullong.c: added version to be compiled with xstack
5327         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
5328         * device/lib/mcs51/crtxclear.asm: clear pdata as well
5329         * device/lib/mcs51/crtxstack.asm: fixed comment
5330         * src/SDCCglue.c: maxInterrupts defaults to 0,
5331           (emitMaps): added pdata,
5332           (createInterruptVect): (re)moved default,
5333           (glue): added pdata,
5334           (glue): moved __start__xstack to XSTK with default size 1
5335         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
5336           and options.float_rent when options.stackAuto is set,
5337           (linkEdit): only write XDATA_NAME if provided on command line
5338         * src/SDCCmem.h,
5339         * src/SDCCmem.c: added pdata
5340         * src/port.h: added pdata_name to PORT
5341         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
5342           (saveRegisters, unsaveRegisters): removed usage of B,
5343           (genMinus): fixed accumulator clash,
5344           (genJumpTab): added comment, this needs another look
5345         * src/mcs51/gen.c: added check for "B in use" paranoia,
5346           added pushB() and popB()
5347         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
5348           chance
5349         * src/avr/main.c,
5350         * src/ds390/main.c,
5351         * src/hc08/main.c,
5352         * src/mcs51/main.c,
5353         * src/pic/main.c,
5354         * src/pic16/main.c,
5355         * src/xa51/main.c,
5356         * src/z80/main.c: (reset_regparms) made void parameter explicit and
5357           added PSEG (PAG,XDATA) or NULL to port specifier
5358         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
5359         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
5360           (_mcs51_genInitStartup): removed __start__xstack equ,
5361           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
5362         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
5363         * src/z80/gen.c (_rleAppend): fixed warnings
5364         * support/regression/tests/zeropad.c: added pdata test
5365         * .version: bumped to 2.4.6
5366
5367 2004-10-17 Borut Razem <borut.razem AT siol.net>
5368
5369         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
5370         as a part of nightly build
5371
5372 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
5373
5374         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
5375         WREG holds the first byte function parameters,
5376         * (aopForSym): take special case for symbols which are in FARSPACE
5377         but in CODESPACE too,
5378         * (assignResultValue): modified to take into account _G.useWreg,
5379         * (genCall): don't use wreg for parameter passing when function is
5380         declared as reentrant, too, added optimization INCF to stack
5381         pointer when stack parameter count is 1,
5382         * (genFunction, genEndFunction): refurnished and fixed to not using
5383         wreg for passing parameters when function has varargs or is
5384         reentrant, fixed bug with symbol name compare for generating
5385         functions in absolute address,
5386         * (pic16_storeForReturn): refurnished,
5387         * (genCmp): began writing a new version of the function, not ready
5388         yet, therefore it is disabled,
5389         * (genAssign): do not read code memory when assigning a function to
5390         a pointer function,
5391         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
5392         array of characters, not pointer,
5393         * (pic16initialComments): in debug mode emit an .ident directive for
5394         the assembler,
5395         * (_process_pragma): emit a new warning type (internal to pic16)
5396         when setting stack to default length, emit a similar warning when
5397         placing a function at absolute address and address is not word aligned
5398         * (_pic16_parseOptions): added 'return TRUE' statement,
5399         * (_pic16_linkEdit): if compiling a source, then add the source's
5400         file object, first in the list of objects to link,
5401
5402 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
5403
5404         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
5405         * src/pic/main.c : removed VC warning.
5406         * src/pic/gen.c : changed comment.
5407
5408 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
5409
5410         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
5411         reference to a deprecated symbol _GPTRREG was causing failure to
5412         link. Thanks G. M. Gallant for the info.
5413
5414 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
5415
5416         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
5417         comments for Bugs item #954788.
5418
5419 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
5420
5421         * src/pic16/device.c (pic16_dump_gsection,
5422         * pic16_groupRegistersInSection): handle symbols declared to be in
5423         access bank differently,
5424         * src/pic16/gen.c (struct _G): added field resDirect,
5425         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
5426         send values read from stack directly to result and don't allocate
5427         temporary values,
5428         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
5429         same registers,
5430         * (pic16_sameRegsOfs): NEW,
5431         * (freeAsmop): if _G.resDirect is set then do not mark registers as
5432         free because they were not allocated from temporary pool,
5433         * pic16_popRegFromString): workaround to fix a problem with
5434         allocating variables twice or never,
5435         * (genGenPointerGet): using PRODL instead of FSR0H,
5436         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
5437         instead of FSR0H,
5438         * (genAssign): take advantage of the _G.resDirect flag,
5439         * (genCast): around line 11844, use mov2f instead of directly
5440         MOVFF'ing between operands to account for literal values,
5441         * src/pic16/genutils.c: some new debug functions for gpsim have been
5442         added,
5443         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
5444         float with integer part only,
5445         * src/pic16/main.c (_process_pragma): handle pragma udata access to
5446         place variables in access bank
5447         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
5448         updated sources to reflect recent changes in gen.c
5449
5450 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
5451
5452         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
5453         sources that searched for headers in installation path, now the
5454         device/include/pic16 is used,
5455         * src/pic16/glue.c (pic16glue),
5456         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
5457         .line directives if not in debug mode, this suppresses assembler's
5458         warnings for ignored directives
5459
5460 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
5461
5462         * src/port.h: made reset_regparms prototype void parameter explicit.
5463         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
5464         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
5465         * doc/sdccman.lyx: documented warning disabling and how to use
5466           printf_large to make it print floats.
5467         * device/include/stdbool.h: NEW
5468         * device/lib/_atof.c,
5469         * device/lib/_divuint.c,
5470         * device/lib/_divulong.c,
5471         * device/lib/expf.c,
5472         * device/lib/printf_large.c,
5473         * device/lib/sincosf.c,
5474         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
5475         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
5476           a completely reentrant lib.
5477
5478 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
5479
5480         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
5481         * device/include/pic16/stdio.h: fixed bug with colon
5482
5483 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
5484
5485         * device/include/pic16/stdio.h,
5486         * device/include/pic16/stdlib.h,
5487         * device/include/pic16/math.h: NEW
5488         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
5489         declared as _naked to reduce overhead
5490         * device/lib/Makefile.in (target port-specific-objects-pic16):
5491         changed * to *.* so to ignore the CVS directory,
5492         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
5493         stacked variables back in stack,
5494         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
5495         corruption
5496
5497 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
5498
5499         * .version: bumped version number to 2.4.5
5500         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
5501         * support/Util/SDCCerr.c (messages structure): added entry for
5502         W_POSSBUG2
5503
5504         Large cumulative patch for pic16 port and libraries.
5505         * device/include/pic16/sdcc-lib.h,
5506         * device/include/pic16/stdarg.h,
5507         * device/include/asm/pic16/features.h,
5508         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
5509         * device/include/pic16/float.h: changes reentrant keyword with
5510         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
5511         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
5512         updated target build-libraries to include objects from gptr,
5513         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
5514         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
5515         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
5516         all function headings,
5517         * src/SDCCmain.c: added global parameter userIncDirsSet,
5518         * (parseCmdLine): when option -I is encountered add directory to
5519         userIncDirsSet too,
5520         * src/version.awk: added space between control and long,
5521         * src/pic16/NOTES: added some notes for the port,
5522         * src/pic16/gen.c: added prototype for mov2fp function,
5523         * (fReturnpic16[]): properly named return value registers,
5524         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
5525         * (aopForSym): added code to handle symbols with onStack flag set,
5526         symbols onStack are allocated PTRSIZE bytes,
5527         * (aopFreeAsmop): handles special case where asmops are stack objects,
5528         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
5529         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
5530         added argument lock to trace flaws in allocating temporary registers
5531         when developing port,
5532         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
5533         * (pic16_popRegFromString): reenabled allocating a direct register
5534         from string,
5535         * (assignResultValue): various beautifications,
5536         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
5537         referenced function argument,
5538         * (genIpush): reenabled to allow stacked arguments, handles only
5539         ic->parmPush iCodes,
5540         * (genCall, genPcall): major changes to allow for variable argument
5541         functions, fixed a bug with falsely restoring stack pointer after
5542         returning from call,
5543         * (genFunction): pending code for critical function,
5544         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
5545         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
5546         * (genNearPointerGet): fixed bug with indirect reading, was always
5547         reading from INDF0
5548         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
5549         pointers,
5550         * (genAddrOf): rewrote code to take address of a stacked function parameter
5551         * (genCast): fixed casting to generic pointer type,
5552         * src/pic16/gen.h: added AOP_STA,
5553         * (struct asmop): added field stk,
5554         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
5555         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
5556         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
5557         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
5558         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
5559         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
5560         generic pointers,
5561         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
5562         and library paths,
5563         * (pic16_port structure): generic pointer size is set to 3,
5564         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
5565         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
5566         compiler warning,
5567         * src/pic16/ralloc.c (allocReg): prevent allocating register when
5568         operand is an iTemp,
5569
5570 2004-09-24 Martin Helmling <mh AT octo-soft.de>
5571
5572         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
5573         * debugger/mcs51/simi.c: addapt new syntax of s51
5574
5575 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
5576
5577         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
5578         * src/pic16/pcode.c: commented out some calls to free() in order to
5579         fix bug #989576,
5580
5581 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5582
5583         * src/SDCCicode.h,
5584         * src/SDCCicode.c (isiCodeInFunctionCall),
5585         * src/avr/ralloc.c (selectSpil),
5586         * src/pic/ralloc.c (selectSpil),
5587         * src/pic16/ralloc.c (selectSpil),
5588         * src/ds390/ralloc.c (selectSpil),
5589         * src/hc08/ralloc.c (selectSpil),
5590         * src/xa51/ralloc.c (selectSpil),
5591         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
5592         stack in the middle of a function call sequence (fixes bug #1020268)
5593         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
5594         costs associated with the minimum switch case.
5595
5596 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5597
5598         * src/SDCC.lex: fixed bug #1030549
5599
5600 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5601
5602         * src/SDCCcse.h (struct cseDef),
5603         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
5604         over a function call if the CSE is derived from a symbol whose
5605         address has been taken (fixes bug #1029883)
5606         * support/regression/tests/bug-1029883: a new regression test for
5607         this bug
5608
5609 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5610
5611         * src/hc08/gen.c (emitinline): fixed bug #1029778
5612         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
5613         to a cast object is no longer a syntax error ("fixes" bug #1030006,
5614         and starts toward RFE #905167)
5615
5616 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
5617
5618         * src/pic16/gen.c (mov2f): New function to move an operand to
5619         another without considering if it is a literal or a register,
5620         * (pic16_sameRegs): don't check if they are both AOP_REG,
5621         * (AccRsh): removed andmask=0 lines,
5622         * (genLeftShift): duplicated to be improved in future versions,
5623         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
5624         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
5625         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
5626         * (pic16initMnemonics): added initialization for POC_INFSNZW,
5627         * (insertBankSwitch): fixed inserting banksel directives algorithm
5628         for instructions that follow a skip instruction, this fixes a report
5629         for broken subtraction code generation,
5630         * src/pic16/ralloc.c (deassignLRs): do not free register if current
5631         iCode is a left op, just in case result and right share the same
5632         registers
5633
5634 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5635
5636         * src/hc08/main.c,
5637         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
5638         preservation of HX
5639         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
5640         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
5641         on 2004-09-12; it was buggy
5642
5643 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
5644
5645         * src/SDCCsymt.h: removed RESULT_CHECK
5646         * src/SDCCast.c,
5647         * src/SDCCglue.c,
5648         * src/SDCCval.c,
5649         * src/pic/glue.c,
5650         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
5651
5652 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
5653
5654         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
5655         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
5656         configuration values no more rejected by compiler, they are assigned
5657         to configuration registers with a warning message instead,
5658         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
5659         the for-loop so last conf register is emitted too,
5660         * (_pic16_initPaths): link library libsdcc.lib by default,
5661         * (_hasNativeMulFor): modified test for multiplication according to
5662         Raphael Neider's remarks. Integer multiplication is also done with
5663         support functions,
5664         * device/include/pic16/pic18fregs.h: corrected type error in while
5665         testing and including 18f6720 header file
5666
5667 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
5668
5669         * src/pic16/device.h (pic16_options): removed field use_crt,
5670         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
5671         until an optimization to handle single bits is added,
5672         * (pic16_loadFSR0): moved before genUnpackBits,
5673         * (genAnd): some white lines removed,
5674         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
5675         leave_reset flags in pic16_options when using crt modules,
5676
5677 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
5678
5679         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
5680           for bugs 898889 & 979599. Also used some safer print instructions.
5681
5682 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
5683
5684         * src/pic16/device.h (pic16_options_t): added field use_crt,
5685         crt_name, no_crt,
5686         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
5687         catch a probable future bug,
5688         * src/pic16/gen.c: aopIdx function commented out,
5689         * (genAssign): commented out old code which used aopIdx,
5690         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
5691         code, added if conditionals to take into account the --use-crt
5692         command line options,
5693         * src/pic16/main.c (pic16_optionsTable): added new command line
5694         options, --use-crt= and --no-crt,
5695         * (_pic16_linkEdit): now the proper crt object is added in the
5696         linker command line except than when --no-crt is specified,
5697         * src/pic16/pcode.c,
5698         * src/pic16/pcode.h: added some structures and functions for a new
5699         optimization scheme to compansate for instruction overhead between
5700         same iCodes, this scheme is currently under development and is not
5701         working in any way,
5702         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5703         to && operator,
5704         * device/lib/pic16/startup/crt0i.c,
5705         * device/lib/pic16/startup/crt0iz.c: added global char variable
5706         __uflags to force the generation of an idata section
5707
5708 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5709
5710         * doc/Makefile,
5711         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5712         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5713
5714 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5715
5716         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5717         Frieder) and clarified the default code optimization mode
5718
5719 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5720
5721         * src/SDCC.lex (doPragma, process_pragma),
5722         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5723         "opt_code_size", and "opt_code_balanced"
5724         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5725         regrouped options by category, added support for category headers
5726         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5727         and "--opt-code-size"
5728         * doc/sdccman.lyx: documented these new options and pragmas
5729         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5730         preference into account
5731
5732 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5733
5734         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5735           geniCodePreDec): Fixed bug 904237 by generating a warning
5736         * src/SDCCerr.h,
5737         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5738
5739 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5740
5741         * src/pic/device.c : When no max ram set validate full memory range.
5742         * src/pic/pcode.c,
5743         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5744
5745 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5746
5747         * device/lib/_gptrget.c,
5748         * device/lib/_gptrput.c: updated comment
5749         * device/lib/calloc.c,
5750         * device/lib/free.c,
5751         * device/lib/malloc.c,
5752         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5753         * src/SDCCcse.c (cseBBlock),
5754         * src/SDCCicode.c (printOperand, geniCodeArray),
5755         * src/SDCCicode.h (struct operand): fixed bug 868103
5756         * support/regression/tests/bug-868103.c: added
5757         * src/SDCCast.c (searchLitOp),
5758         * src/SDCCcse.h (struct cseDef),
5759         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5760         * src/SDCCicode.h (struct operand),
5761         * src/SDCCsymt.h (struct sym_link),
5762         * src/avr/gen.c (hasInc),
5763         * src/ds390/gen.c (hasInc),
5764         * src/hc08/gen.c (genPlusIncr, hasInc),
5765         * src/mcs51/gen.c (hasInc),
5766         * src/pic16/glue.c (pic16_printIvalChar),
5767         * src/pic16/ralloc.c (regWithIdx),
5768         * src/xa51/gen.c (hasInc) : removed warnings
5769         * src/SDCCast.c (createBlock): added comment ???
5770         * src/hc08/ralloc.c: updated comments
5771
5772 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5773
5774         * doc/sdccman.lyx: updated section on switch statements, added
5775         section about semaphore locking
5776         * doc/Makefile: added option -info for latex2html
5777         * device/lib/_gptrget.c,
5778         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5779
5780 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5781
5782         * src/pic/device.h,
5783         * src/pic/device.c,
5784         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5785          maxram is less than 0x100.
5786
5787 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5788
5789         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5790
5791 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5792
5793         * src/port.h,
5794         * src/mcs51/main.c,
5795         * src/ds390/main.c,
5796         * src/z80/main.c,
5797         * src/hc08/main.c,
5798         * src/pic/main.c,
5799         * src/pic16/main.c,
5800         * src/avr/main.c,
5801         * src/xa51/main.c
5802         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5803         a jump table is the best form for a switch statement, including
5804         automatic insertion of missing cases to make the case range
5805         continuous. Developed in collaboration with Frieder Ferlemann.
5806
5807 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5808
5809         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5810         accumulator result if it needs sign extension
5811
5812 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5813
5814         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5815
5816 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5817
5818         * device/lib/gbz80/printf.c,
5819         * device/lib/z80/printf.c: removed define for NULL
5820
5821 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5822
5823         * as/xa51/xa_link.c,
5824         * device/examples/ds390/ow390/ad26.c,
5825         * device/examples/ds390/ow390/cnt1d.c,
5826         * device/examples/ds390/ow390/counter.c,
5827         * device/examples/ds390/ow390/ds2480.h,
5828         * device/examples/ds390/ow390/ds2480ut.c,
5829         * device/examples/ds390/ow390/findtype.c,
5830         * device/examples/ds390/ow390/gethumd.c,
5831         * device/examples/ds390/ow390/owllu.c,
5832         * device/examples/ds390/ow390/ownetu.c,
5833         * device/examples/ds390/ow390/swt12.c,
5834         * device/examples/ds390/ow390/swtloop.c,
5835         * device/examples/ds390/ow390/temp.c,
5836         * device/examples/ds390/ow390/temp10.c,
5837         * device/examples/ds390/ow390/thermo21.c,
5838         * device/examples/ds390/ow390/tinilnk.c,
5839         * device/examples/ds390/ow390/tstfind.c,
5840         * device/examples/serialcomm/windows/serial.cpp,
5841         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5842         * device/include/reg51.h: fixed line endings for cvs
5843
5844 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5845
5846         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5847         packRegsForAccUse, packRegisters): new accumulator register
5848         packing algorithm
5849         * support/regression/ports/hc08/support.c (_putchar): suppress
5850         warning of unused variable
5851         * src/SDCCicode.c: added SWAP entry to codeTable
5852
5853 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5854
5855         * device/lib/sprintf.c: forgot to add this file before previous commit
5856
5857 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5858
5859         * src/pic16/gen.c (genPackBits): added operand right in function
5860         parameters, load result directly if p_type is POINTER (that is
5861         called by genNearPointerSet)
5862         * (genUnPackBits): added operand left in function parameters,
5863         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5864         FSR0 if accessing bitfields,
5865
5866 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5867
5868         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5869           _print_format; updated printf, sprintf, vsprintf
5870         * device/include/asm/default/features.h: corrected comment/define
5871         * device/lib/Makefile.in: added sprintf.c
5872         * device/lib/libsdcc.lib: added sprintf module
5873         * device/lib/printf_large.c,
5874         * device/lib/vprintf.c,
5875         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5876           into these 3 files
5877         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5878         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5879         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5880           hc08 test
5881         * support/regression/tests/zeropad.c: define idata as data for hc08
5882
5883 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5884
5885         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5886         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5887         labels are referenced at least once (even if a reference is not found)
5888         * src/hc08/gen.c (emitcode): set isComment flag for comments
5889         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5890         loads), rules 6a..6b (optimize jumps to return)
5891
5892 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5893
5894         * device/lib/acosf.c (acosf),
5895         * device/lib/asinf.c (asinf),
5896         * device/lib/atanf.c (atanf),
5897         * device/lib/ceilf.c (ceilf),
5898         * device/lib/cosf.c (cosf),
5899         * device/lib/coshf.c (coshf),
5900         * device/lib/cotf.c (cotf),
5901         * device/lib/fabsf.c (fabsf),
5902         * device/lib/floorf.c (floorf),
5903         * device/lib/log10f.c (log10f),
5904         * device/lib/logf.c (logf),
5905         * device/lib/sinf.c (sinf),
5906         * device/lib/sinhf.c (sinhf),
5907         * device/lib/sqrtf.c (sqrtf),
5908         * device/lib/tanf.c (tanf),
5909         * device/lib/tanhf.c (tanhf),
5910         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5911         replaced all instances of "reentrant" in the library functions
5912         defined in math.h with this macro.
5913         * support/regression/tests/float_trans.c: reenabled test for hc08
5914
5915 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5916
5917         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5918         erroneously deleted
5919
5920 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5921
5922         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5923         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5924         multi-byte volatile operands are used
5925         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5926         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5927         initialization to area GSINIT0 so that it would always precede
5928         any static initializers in GSINIT
5929         * support/regression/tests/zeropad.c: fixed idata define for hc08
5930         * support/regression/tests/bug-927659.c,
5931         * support/regression/tests/float_trans.c: disabled tests for hc08
5932         pending missing library routines
5933         * .version: increased version number to 2.4.4 - hc08 port now passes
5934         regression tests
5935
5936
5937 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5938
5939         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5940         * Makefile.common.in,
5941         * as/Makefile,
5942         * as/hc08/Makefile.in,
5943         * as/mcs51/Makefile.in,
5944         * as/z80/Makefile.in,
5945         * debugger/mcs51/Makefile.in,
5946         * device/include/Makefile.in,
5947         * device/lib/Makefile.in,
5948         * doc/Makefile,
5949         * link/Makefile,
5950         * link/z80/Makefile.in,
5951         * packihx/Makefile.in,
5952         * sim/ucsim/main_in.mk,
5953         * sim/ucsim/avr.src/Makefile.in,
5954         * sim/ucsim/doc/Makefile.in,
5955         * sim/ucsim/gui.src/serio.src/Makefile.in,
5956         * sim/ucsim/hc08.src/Makefile.in,
5957         * sim/ucsim/s51.src/Makefile.in,
5958         * sim/ucsim/xa.src/Makefile.in,
5959         * sim/ucsim/z80.src/Makefile.in,
5960         * src/Makefile.in,
5961         * support/cpp2/Makefile.in,
5962         * support/librarian/Makefile,
5963         * support/makebin/Makefile: added DESTDIR to the install path proposed
5964         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5965         * doc/sdccman.lyx: added DESTDIR documentation
5966
5967 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5968
5969         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5970         instruction for interrupt handlers, use fast returns when returning
5971         from high priority interrupts
5972
5973 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5974
5975         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5976         code generation
5977         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5978         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5979         bugs, ported much of Bernhard's code from mcs51
5980         * src/mcs51/gen.c (genSend),
5981         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5982         than one when calling a reentrant function
5983         * device/lib/_mullong.c: defined an alternate struct layout for big
5984         endian ports (hc08)
5985
5986 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5987
5988         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5989         test
5990
5991 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5992
5993         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5994         are sane and complete before asking the port its prefered parameter
5995         passing method (fixes bug #1017633)
5996         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5997         and _ret3
5998
5999 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6000
6001         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
6002         problem in bitfields >= 8 bits.
6003
6004 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6005
6006         * src/SDCCsymt.c: undid changes that were not meant to be committed
6007
6008 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6009
6010         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
6011
6012 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6013
6014         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
6015           copied and wrong bit got inverted
6016
6017 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6018
6019         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
6020         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
6021         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
6022         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
6023         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
6024         assignments to bitfields at known addresses
6025         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
6026         reads from bitfields at known addresses
6027         * src/hc08/ralloc.c (packRegisters),
6028         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
6029         genhc08Code): optimize pointer get values used as conditionals
6030         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
6031         and branch
6032
6033 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
6036         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
6037         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
6038         as conditionals
6039
6040 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6041
6042         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
6043
6044 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6045
6046         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
6047         related problems
6048
6049 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
6050
6051         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
6052
6053 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6054
6055         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
6056         mcs51 port
6057
6058 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
6059
6060         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
6061
6062 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6063
6064         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
6065         cases use more compact code.
6066
6067 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
6068
6069         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
6070
6071 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6072
6073         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
6074
6075 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6076
6077         * src/SDCCsymt.h,
6078         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
6079         parameter of changePointer() from symbol* to sym_link*
6080         * src/SDCCast.c (decorateType): call changePointer() for CAST op
6081         * src/SDCCsymt.c (compareType): void* type is castable to other
6082         pointers, but not necesarily an exact match.
6083         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
6084         is no longer blindly treated as an exact match.
6085         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
6086
6087 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
6088
6089         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
6090
6091 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
6092
6093         * src/pic/gen.c,
6094         * src/pic/pcode.c,
6095         * src/pic/ralloc.h,
6096         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
6097
6098 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
6099
6100         * src/pic/device.c,
6101         * src/pic/device.h,
6102         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
6103
6104 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6105
6106         * src/mcs51/gen.c (emitcode): fixed bug #992819
6107
6108 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
6109
6110         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
6111           there's no need to make it worse
6112
6113 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6114
6115         * src/mcs51/ralloc.c (deassignLR),
6116         * src/ds390/ralloc.c (deassignLR),
6117         * src/hc08/ralloc.c (deassignLR),
6118         * src/z80/ralloc.c (deassignLR),
6119         * src/pic/ralloc.c (deassignLR),
6120         * src/pic16/ralloc.c (deassignLR),
6121         * src/avr/ralloc.c (deassignLR),
6122         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
6123         rlivePoint): fixed another part of bug #971834
6124
6125 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6126
6127         * src/z80/main.c: enabled "critical" keyword
6128         * src/z80/mappings.i,
6129         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
6130         functions (fixes bug #979646)
6131         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
6132
6133 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6134
6135         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
6136           such as c:\mydir.
6137
6138 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
6139
6140         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
6141           doesn't disable too much optimizations
6142
6143 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6144
6145         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
6146
6147 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
6148
6149         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
6150
6151 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6152
6153         * src/pic/gen.c tidied up tabs
6154         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
6155         * src/pic/main.c tidied up tabs
6156         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
6157         * src/pic/pcoderegs.c tidied up tabs
6158         * src/pic/ralloc.c tidied up tabs
6159
6160 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
6161
6162         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
6163         to S_FIXED for pic16 port and when symbol is not in level 0,
6164         allocate for S_REGISTER storage class and pic16 port, too,
6165         * src/pic16/device.h: prototype for checkSym,
6166         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
6167         * (pic16_assignConfigWordValue): test the value and the mask to
6168         validate that the value is suitable for the configuration word,
6169         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
6170         collect extern declared symbols, don't emit symbol twice, check
6171         first if symbol is in publics set first,
6172         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
6173         * added command line '--fstack' which enables an experimental
6174         feature for stack access, too buggy to be used yet...
6175         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
6176         * (pic16_allocDirReg): when register has storage class S_REGISTER
6177         allocate in pic16_dynAccessRegs,
6178         * device/include/pic16/pic18f????.h: modified configuration word
6179         naming convention, words started as CONFIG0H but should be CONFIG1H
6180
6181 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
6182
6183         * device/include/mcs51reg.h: fixed bug 970993
6184
6185 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
6186
6187         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
6188         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
6189         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
6190         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
6191         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
6192         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
6193           error/warning numbers,
6194           added function setWarningDisabled()
6195         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
6196         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
6197           _memcmp.c _memmove.c calloc.c realloc.c free.c
6198         * support/regression/tests/malloc.c: added tests for new functionality
6199         * support/regression/tests/zeropad.c: added tests for truncated initializers
6200           and initialized char arrays starting with '\x0'
6201         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
6202
6203 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
6204
6205         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
6206
6207 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6208
6209         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
6210         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
6211         peephole 177.e. Thanks to anonymous
6212
6213 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
6214
6215         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
6216         function isn't used in the source but referenced as a
6217         variable initializer then declare it as extern in .asm file
6218
6219 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
6220
6221         * .version: increased version number to 2.4.3
6222
6223         Adding version extension according to ChangeLog CVS revision
6224         * src/Makefile.in (target all): added dependency 'version.h'
6225         * (rule version.h): added rule to create version.h from ChangeLog,
6226         * (rule dep): added dependency version.h,
6227         * src/version.awk: AWK script to create version.h
6228         * src/SDCCdwarf2.c (dwWriteModule),
6229         * src/SDCCglue.c (initialComments),
6230         * src/SDCCmain.c (printVersionInfo): modified to write after
6231         version string the version extension number,
6232         * src/SDCCutil.c: included "version.h"
6233         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
6234         number,
6235         * src/SDCCutil.h: added prototype for getBuildNumber
6236
6237         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
6238         includeDirsSet, too,
6239         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
6240         const char [] is found in function prototype...
6241
6242         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
6243         moving to WREG with source is already in WREG,
6244         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
6245         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
6246         * (aopForSym): stack'ed symbols are partially supported, added
6247         if-clause to support symbols in FARSPACE,
6248         * (sameRegs): added test for AOP_ACC to see if registers are same,
6249         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
6250         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
6251         * (pic16_popRegFromString): will not allocate a new register if it
6252         doesn't find one by name, bug may have introduced...
6253         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
6254         * (genIpush): revived to use pic16 port's stack,
6255         * (genAddrOf): added incomplete case for stack'ed operand,
6256         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
6257         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
6258         can handle multibyte operands,
6259         * src/pic16/glue.c (pic16_printIval*): some debug info added,
6260         * (pic16initialComments): added message for MPLAB compatibility
6261         mode enabled,
6262         * src/pic16/main.h: prototype for pic16_mplab_comp,
6263         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
6264         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
6265         * (_pic16_linkEdit): NEW, handles link stage, transferred here
6266         because of increased complexity of procedure,
6267         * (_process_pragma): stack pragma changed to format 'stack pos len',
6268         emit symbol '_stack_end' to conform with gplink,
6269         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
6270         to search for register,
6271         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
6272         PO_GPR_REGISTER,
6273         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
6274         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
6275         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6276         case for PO_GPR_REGISTER,
6277         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
6278         dies, the new era is ahead !...
6279         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
6280         pic16_dynInternalRegs,
6281         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
6282         * (pic16_allocDirReg): minor optimizations and bug fixes,
6283         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
6284
6285         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
6286         load stack and frame pointer with address of 'stack_end' symbol
6287
6288 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
6289
6290         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
6291         without source code but only variable initializers
6292
6293 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
6294
6295         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
6296         external are not declared as extern to reduce overhead while linking
6297
6298 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
6299
6300         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
6301
6302 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
6303
6304         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
6305           Yee Keat for the patch
6306         * src/SDCCast.c (decorateType): fixed bug #979599
6307         * src/ds390/gen.h: removed local fReturnSizeDS390
6308         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
6309         * src/ds390/gen.c (genAnd, genOr, genXor),
6310         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
6311
6312 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
6313
6314         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
6315         add relFilesSet to $3, manipulate $2 to handle linking of object
6316         files without source files in command line,
6317         * device/include/pic16 (all headers): added ID location macros,
6318         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
6319         entries for ID location bytes,
6320         * (pic16_assignIdByteValue): NEW,
6321         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
6322         added field dumpcalltree to pic16_options_t,
6323         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
6324         is used instead of pic16_Gstack_base_addr, check if (ifx) before
6325         emitting rFalseIfx label after check_carry label,
6326         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
6327         pic16_emitDIRegs), NEW
6328         * (pic16glue): dump .calltree file when option --calltree found,
6329         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
6330         * (_pic16_genAssemblerPreamble): emit ID locations after
6331         configuration registers,
6332         * (pic16_linkCmd): modifications of the link command,
6333         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
6334         * (pic16_pCodeInitRegisters): don't init stack registers,
6335         * (pic16_findPrevInstruction): fixed bug,
6336         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
6337         bug with immediate registers,
6338         * (buildCallTree): traces stack push and pop,
6339         * (pct2): dump also stack usage for each function,
6340         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
6341         * (pic16_allocDirReg): various modifications,
6342         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
6343         fixed to 1,
6344
6345 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
6346
6347         * src/pic16/pcode.c: removed buggy double colon
6348
6349 2004-07-01 Borut Razem <borut.razem AT siol.net>
6350
6351         * support/scripts/sdcc.nsi: added include/pic16 to setup
6352
6353 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
6354
6355         * device/lib/Makefile.in: fixed bug in target objects-pic16,
6356         * device/lib/pic16/Makefile: prefixed with dash (-) command under
6357         target 'clean',
6358         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
6359         specific command line arguments. Also added sample lkr script
6360         for placing a variable at a specific memory bank.
6361         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
6362         at a specific memory bank,
6363         * (pic16_dump_isection): fixed bug which caused string literals to
6364         be omitted when dumping idata section,
6365         * (pic16_groupRegistersInSection): added code to handle registers
6366         in specific memory banks,
6367         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
6368         public, all references are renamed too,
6369         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
6370         AOP_DPTR2,
6371         * (pic16_storeForReturn): added case to handle when dest is WREG,
6372         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
6373         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
6374         pic16_rel_udata, check to see if that register is marked as being
6375         a member of a specific memory bank,
6376         * (pic16_printIvalCharPtr): added code to add string literals either
6377         to code or the idata sections,
6378         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
6379         also accept the 'udata' pragma,
6380         * src/pic16/main.h: new structure types sectName and sectSym
6381         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
6382         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
6383         * (pic16_findPrevInstruction): fixed, it returned nothing,
6384         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
6385         instruction combinations,
6386         * (pic16_FixRegisterBanking): heavily reorganised,
6387         * (pic16_AnalyzeBanking): if generating banksel directives is
6388         disabled, then don't call FixRegisterBanking at all,
6389         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
6390         completely removed,
6391         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
6392
6393 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
6394
6395         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
6396         Phuah Yee Keat <yk.phuah AT nestac.com>
6397
6398 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6399
6400         * src/pic16/glue.c (pic16createInterruptVect): function now emits
6401         correctly the IVT even if it is relocated to some other location
6402
6403 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6404
6405         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
6406         * device/include/pic16/pic18f2220.h: NEW,
6407         * device/lib/pic16/libdev/pic18f2220.c: NEW,
6408         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
6409         * src/pic16/device.c (struct Pics16): added info for 18f2220,
6410         * src/pic16/device.h (struct pic16_options): added ivt_loc and
6411         nodefaultlibs, ivt_loc is the location of the interrupt vector
6412         table, and nodefaultlibs signs that default libraries should not be
6413         linked in link stage,
6414         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
6415         according to --ivt-loc argument,
6416         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
6417         when pragma stack is found,
6418
6419 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6420
6421         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
6422         256 (range check), 257 (do while), 258.a-f (bit banging
6423         f.e. on 3-wire SPI bus)
6424
6425 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6426
6427         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
6428         variables used exclusively within a loop
6429
6430 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
6431
6432         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
6433
6434 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6435
6436         * src/SDCClrange.c (computeClash): fixed bug #971834
6437
6438 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6439
6440         * src/mcs51/gen.c (genCmp): fixed bug #975903
6441         * src/hc08/gen.c (operandsEqu),
6442         * src/ds390/gen.c (operandsEqu),
6443         * src/z80/gen.c (operandsEqu),
6444         * src/pic/gen.c (operandsEqu),
6445         * src/pic16/gen.c (operandsEqu),
6446         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
6447         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
6448
6449 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6450
6451         * src/SDCCcse.c (cseBBlock): fixed bug #966963
6452
6453 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
6454
6455         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
6456         default case in switch statement,
6457         * glue.c (pic16_initPointer): expr is initialised via decoarteType
6458         to eliminate problem with initialisation of pointers, but problem
6459         still exists,
6460         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
6461         * (emitStaticSegment): removed various lines emitting debug info,
6462         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
6463         added processor registers for utilizing EEPROM,
6464         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
6465         configurable and set 8
6466
6467 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
6468
6469         * .version: increased version number to 2.4.2,
6470
6471         Cumulative patch for pic16 port
6472         * src/pic16/device.c: changed scheme to dump initial values for
6473         variables in idata segment, all print_idata* functions were removed,
6474         now the pic16_printIval* will be called,
6475         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
6476         * _pic16_printPointerType, pic16_printPointerType,
6477         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
6478         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
6479         NEW, similar to the respective functions in SDCCglue.c,
6480         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
6481         way, emitting hex bytes,
6482         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
6483
6484 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6485
6486         * src/avr/ralloc.c (serialRegAssign),
6487         * src/xa51/ralloc.c (serialRegAssign),
6488         * src/pic/ralloc.c (serialRegAssign),
6489         * src/pic16/ralloc.c (serialRegAssign),
6490         * src/hc08/ralloc.c (serialRegAssign),
6491         * src/z80/ralloc.c (serialRegAssign),
6492         * src/ds390/ralloc.c (serialRegAssign),
6493         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
6494
6495 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6496
6497         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
6498         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
6499
6500 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
6501
6502         Cumulative patch for pic16 port:
6503         * src/pic16/device.h (typedef PIC16_device) modified fields for
6504         defining microcontrollers,
6505         * src/pic16/device.c: added new info for all devices in Pics16 array,
6506         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
6507         to be optimised out by the pCode optimiser,
6508         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
6509         specially, bug reported by G.M. Gallant,
6510         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
6511         as force'd so that cannot be optimised out by pCode optimiser,
6512         * src/pic16/pcode.c,
6513         * src/pic16/pcodepeeph.c,
6514         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
6515         they are disabled by default, but can be enabled explicit with
6516         command argument --denable-peeps, for testing,
6517         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
6518         --pomit-ivt in COMPILE_FLAGS
6519
6520 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6521
6522         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
6523           compilation on MSVC
6524
6525 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6526
6527         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
6528
6529 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6530
6531         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
6532         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
6533
6534 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
6535
6536         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
6537         would only assign 0x300001 register.
6538
6539 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
6540
6541         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
6542         in COMPILE_FLAGS. Thanks to G. Gallant for report.
6543
6544 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6545
6546         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
6547         for ds80c400
6548         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
6549         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
6550         added peephole 254 (left shift), 255 (jump table)
6551
6552 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
6553
6554         * device/lib/Makefile.in: removed comment line with model-pic16,
6555         * (target port-specific-objects-pic16): the libraries and objects
6556         are copied to the build directory form the device/lib/pic16/bin
6557         directory
6558
6559         Cumulative patch concerning pic16 port:
6560         * library directory has been re-organized,
6561         * added support for PIC18F1220,
6562         * added headers and library sources for chips 18f1220,18f6520,
6563         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
6564
6565         * configuration registers setting has changed, now each supported
6566         device has a complete description of the registers it uses,
6567         * all initialisations are moved to idata sections, these section
6568         can be absolute or relocatable,
6569         * fixed initialisation of codespace variables,
6570         * fixed warning about PCLATU and gpsim,
6571         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
6572         * (genAssign): use table reads when assigning from variables in codespace,
6573         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
6574         char/int variables placed in codespace,
6575         * (pic16_emitConfigRegs): NEW, emits a list with configuration
6576         registers set in .asm file, no need for --pomit-config-words anymore,
6577         * (pic16glue): some 8051 legacy segments are commented out
6578         (to be removed completely),
6579         * added support for alternative assembler and linker with --asm=
6580         and --link= command line arguments,
6581         * peepholes are disabled automatically in the port, no need to
6582         specify on command line,
6583         * port supports natively char/int/long multiplication, but converts
6584         all divisions to support functions,
6585         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
6586         to the file set in variable $2,
6587         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
6588         strings in ASCII format and not in hex,
6589         * ralloc.c (serialRegAssign): added a triplet of conditional calls
6590         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
6591         allocate proper register if iCodes aren't temporary,
6592
6593 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
6594
6595         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
6596
6597 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
6598
6599         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
6600         is commented out
6601
6602 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6603
6604         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
6605         computed address is reused
6606         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
6607         multi-byte bitfields
6608
6609 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6610
6611         * src/z80/gen.c: (genArrayInit): must check for pointers too
6612
6613 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6614
6615         * support/regression/tests/zeropad.c: never meant to commit the
6616           nestedstruct test: removed, added check for GCC version
6617
6618 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
6619
6620         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
6621         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
6622         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
6623           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
6624           bugs 928906 and 954082 half-empty initializers
6625         * src/SDCCsymt.h,
6626         * src/SDCCsymt.c (getAllocSize): added for above fix
6627         * src/z80/gen.c (genArrayInit): fixed bug 741044
6628         * support/regression/tests/zeropad.c: added tests
6629
6630 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
6631
6632         * src/pic16/device.c (pic16_dump_section): corrected bug which
6633         caused some symbols of the libraries to be misplaced
6634
6635 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6636
6637         * src/pic16/glue.c,
6638         * src/pic16/ralloc.h,
6639         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
6640         to fix conflict with pic port
6641
6642 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6643
6644         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
6645         externs configuration variables,
6646         * src/pic16/ralloc.h,
6647         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
6648         prototype in header, commented out some debug messages
6649
6650 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
6651
6652         * src/pic16/glue.c,
6653         * src/pic16/main.c,
6654         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
6655         for gpasm COFF object generation. Thanks to D. Hawkins for
6656         his patch info
6657
6658 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6659
6660         * src/ds390/main.c,
6661         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
6662         Brock for spotting this)
6663         * src/ds390/gen.c (genEndFunction),
6664         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
6665         interrupt handler and critical. Disable push/pop optimizations when
6666         peephole optimizations disabled.
6667
6668 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6669
6670         Updated pic16 library sources and headers.
6671         * device/lib/pic16/pic18f*/ ,
6672         * device/include/pic16/*.h: modified to handle structured SFR
6673         definitions
6674
6675 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6676
6677         * src/port.h (PORT structure): added hook initPaths, now each
6678         port can declare its own default search paths,
6679         which can been seen with the --print-search-dirs option,
6680         see pic16 port for example,
6681         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
6682         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
6683         * (doPrintSearchDirs): NEW, replaces in a central manner the
6684         printing of search dirs which was split in set*Paths functions,
6685         * (main): added call to port->initPaths and doPrintSearchDirs,
6686         * src/avr/main.c,
6687         * src/ds390/main.c,
6688         * src/hc08/main.c,
6689         * src/izt/i186.c,
6690         * src/izt/tlcs900h.c,
6691         * src/mcs51/main.c,
6692         * src/pic/main.c,
6693         * src/pic16/main.c: modified port structures to reflect addition of
6694         initPaths hook,
6695
6696         * src/pic16/device.c (regCompare): registers are finally sorted by name,
6697         * (pic16_dump_section): for registers in same address reserve memory once,
6698         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
6699         to no_banksel,
6700         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6701         result is greater in size than right or left,
6702         * (pic16_genUMult8X8_8): there are some cases where the result can
6703         be 16 bits size, so handle these,
6704         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6705         * (pic16_outBitC): modified to emit pcodes,
6706         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6707         or not,
6708         * (genDivOneByte): implemented algorithm to divide 8-bits,
6709         * (genCmp): uncommented goto, but issues still exist,
6710         * (genAnd): fixed a bug with variables >8bits,
6711         * (genPackBits): optimization added that uses BCF/BSF to change a
6712         single bit,
6713         * (genAssign): fixed bug when assigning floating point literals,
6714         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6715         __sdcc_gsinit_startup label,
6716         * src/pic16/main.c (_pic16_init): removed search directory
6717         initialisations,
6718         * (_pic16_initPaths): NEW, used to initialise search directories,
6719         * (_hasNativeMulFor): support functions for all except char/int
6720         multiplication, and char division,
6721         * (PIC16_port struct): modified entry for native mul support,
6722         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6723         no_banksel option,
6724         * (buildCallTree): call to register_usage is ifdef'ed out,
6725
6726 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6727
6728         * device/include/string.h: applied Stas Sergeev's patch to make this
6729         header file compatible with the preprocessor -Wundef option
6730         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6731         failure (fixes bug #941458)
6732
6733 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6734
6735         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6736         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6737         that the variable, not the function, should be static
6738         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6739         to be consistent with non-literal case
6740
6741 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6742
6743         * src/SDCCast.c (isConformingBody): fixed bug #949967
6744         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6745         convilong): fixed bug #952086
6746
6747 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6748
6749         * src/SDCCmem.c (allocVariables): fixed bug #955321
6750
6751 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6752
6753         * src/hc08/main.c (_hc08_genAssemblerEnd),
6754         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6755         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6756         completely eliminated the use of a temporary file
6757         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6758         when more than one file linked
6759         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6760
6761 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6762
6763         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6764         which fixes bug #543481
6765         * support/regression/tests/bug-751703.c: fixed comments left from a
6766         cut and paste error
6767         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6768         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6769         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6770         scopes
6771         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6772         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6773         are now changed to underscores in moduleName
6774
6775 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6776
6777         * as/mcs51/lkmem.c: better fix for bug #954173
6778
6779 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6780         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6781
6782         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6783         * device/include/c8051f000.h,
6784         * device/include/c8051f120.h,
6785         * device/include/c8051f300.h,
6786         * device/include/c8051f310.h,
6787         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6788         PWM16) and detab'ed
6789
6790 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6791
6792         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6793         and mailing lists, doc'ed --no-peep-comments, removed reference
6794         to knoppix (newest version has no LyX/LaTeX), other minor changes
6795         * src/SDCCglue.c (glue): save 2 bytes stack space with
6796         option --main-return. The ljmp could probably be avoided too
6797
6798 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6799
6800         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6801
6802 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6803
6804         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6805         * src/SDCCopt.c (isLocalWithoutDef),
6806         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6807         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6808         (credit to Maarten Brock for patch #949363, on which this is based)
6809         * support/regression/tests/bug-751703.c: some test cases of extern used
6810         within inner scopes.
6811
6812 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6813
6814         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6815         SPEC_STRUCT
6816         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6817         struct definitions
6818         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6819         dwWriteLabel): fix to create valid debugger symbols even when
6820         the module name has non-alphanumeric symbols in it
6821         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6822         when a variable's allocation has been optimized away
6823
6824
6825 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6826
6827         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6828         * src/hc08/main.c,
6829         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6830         * src/mcs51/main.c,
6831         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6832         * src/ds390/main.c,
6833         * src/z80/gen.c (z80_emitDebuggerSymbol),
6834         * src/z80/main.c,
6835         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6836         * src/pic/main.c,
6837         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6838         * src/pic16/main.c,
6839         * src/avr/gen.c (avr_emitDebuggerSymbol),
6840         * src/avr/main.c,
6841         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6842         * src/xa51/main.c,
6843         * src/SDCCdebug.c (emitDebuggerSymbol),
6844         * src/SDCCdebug.h,
6845         * src/port.h: added a debugger struct to the port struct. Added a
6846         callback for defining debugger symbols
6847
6848         * src/SDCCast.c (createLabel),
6849         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6850         with isitmp = 1
6851         * src/SDCCicode.h,
6852         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6853         iCode back to the ast for the function
6854
6855         * src/hc08/ralloc.c (hc08_assignRegisters),
6856         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6857         unneeded fields from the regs struct.
6858         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6859         pushReg() & pullReg() functions instead of emitcode()
6860
6861         * src/hc08/gen.c (genLabel, genhc08Code),
6862         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6863
6864         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6865         debugger hooks
6866
6867         * src/hc08/gen.c (genEndFunction, genhc08Code),
6868         * src/hc08/gen.h,
6869         * src/mcs51/gen.c (genEndFunction, gen51Code),
6870         * src/mcs51/gen.h,
6871         * src/ds390/gen.c (genEndFunction, gen390Code),
6872         * src/ds390/gen.h,
6873         * src/z80/gen.c (genEndFunction, genZ80Code),
6874         * src/z80/gen.h,
6875         * src/z80/z80.h,
6876         * src/pic/gen.c (genEndFunction, genpic14Code),
6877         * src/pic/gen.h,
6878         * src/pic16/gen.c (genEndFunction, genpic16Code),
6879         * src/pic16/gen.h,
6880         * src/avr/gen.c (genEndFunction, genAVRCode),
6881         * src/avr/gen.h,
6882         * src/xa51/gen.c (genEndFunction, genXA51Code),
6883         * src/xa51/gen.h,
6884         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6885         specific code to cdbFile.c and out of the backend code generators
6886
6887         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6888         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6889         starting address is now 0
6890
6891         * as/hc08/asm.h,
6892         * as/hc08/m08pst.c,
6893         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6894         assembler directive for DWARF support
6895         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6896
6897         * src/src.dsp,
6898         * src/Makefile.in,
6899         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6900
6901 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6902
6903         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6904         and inappropriate peephole optimization in jump tables
6905
6906 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6907
6908         * as/hc08/m08pst.c,
6909         * src/SDCCglue.c: sdccopt works for the hc08 port now
6910
6911 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6912
6913         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6914
6915 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6916
6917         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6918
6919 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6920
6921         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6922         rules
6923         * src/SDCCmain.c,
6924         * src/SDCCglobl.h,
6925         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6926         comments from the peephole optimizer replacement rules
6927         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6928         symbols
6929         * src/SDCCcse.c (updateSpillLocation),
6930         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6931         equivalents
6932         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6933         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6934         objects far pointers
6935
6936 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6937
6938         * src/SDCCsymt.h: a missing part of my last change
6939         * src/pic/ralloc.c (regTypeNum),
6940         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6941
6942 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6943
6944         * src/SDCCicode.h,
6945         * src/SDCCicode.c (aggrToPtrDclType),
6946         * src/SDCCptropt.h,
6947         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6948         ptrPseudoSymConvert),
6949         * src/pic/ralloc.c (regTypeNum),
6950         * src/pic16/ralloc.c (regTypeNum),
6951         * src/hc08/ralloc.c (regTypeNum),
6952         * src/ds390/ralloc.c (regTypeNum),
6953         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6954         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6955
6956 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6957
6958         * link/z80/lkmain.c (afile),
6959         * as/hc08/lkmain.c (afile),
6960         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6961         prevent a pointer problem when a filename has no directory and
6962         no extension specified.
6963
6964 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6965
6966         * link/z80/lkmain.c (afile): allow periods in directory names
6967         * link/z80/lkmain.c (afile),
6968         * as/mcs51/lkmain.c (afile),
6969         * as/hc08/lkmain.c (afile): allow linker script file to have an
6970         extension other than ".lnk"
6971         * link/z80/lklex.c (getfid),
6972         * link/z80/lkmain.c (parse),
6973         * as/mcs51/lklex.c (getfid),
6974         * as/mcs51/lkmain.c (parse),
6975         * as/hc08/lklex.c (getfid),
6976         * as/hc08/lkmain.c (parse): Support comments in the linker script
6977         file on lines by themselves and after filenames
6978
6979 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6980
6981         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6982
6983 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6984
6985         * src/z80/peeph-z80.def: removed some peephole rules that don't
6986         work with multibyte arithmetic (fixed bug #937126)
6987         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6988         to registers and not global variables
6989         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6990         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6991         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6992         checking for assignments not internally generated (fixed bug #931895)
6993         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6994         structure member (fixed bug #930072)
6995
6996 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6997
6998         * src/SDCCmain.c (linkEdit),
6999         * src/hc08/main.c (_hc08_parseOptions),
7000         * as/hc08/Makefile.in,
7001         * as/hc08/aslink.h,
7002         * as/hc08/asm.h,
7003         * as/hc08/m08pst.c,
7004         * as/hc08/lkrloc.c (relr, rele),
7005         * as/hc08/lkarea.c (lnkarea)
7006         * as/hc08/lkmain.c (afile, parse),
7007         * as/hc08/lkelf.c: support for ELF output
7008         * as/hc08/lks19.c (s19),
7009         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
7010
7011 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7012
7013         * as/mcs51/lkihx.c: Fixed bug #899105.
7014
7015 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7016
7017         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
7018         .dsp files from Unix to DOS.
7019
7020 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7021
7022         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
7023         function pointers; we have been compliant for several months now.
7024         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
7025         change that was accidently commented out
7026         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
7027         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
7028         bug #922319
7029
7030 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7031
7032         * src/hc08/gen.c: output of all of the internal debugging information
7033         is now controlled by the D() macro; it is disabled by default
7034
7035 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7036
7037         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
7038         harder to keep the same registers during a CAST iCode
7039         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
7040         long via int can be done in a single cast, if the signedness is
7041         correct.
7042         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
7043         putchar() in tinibios.c in ds390's library
7044
7045 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
7046
7047         * src/SDCCast.c (decorateType): fixed bug #898889,
7048         cast result of a literal complement too
7049         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
7050         fixed check for bitfields
7051
7052 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
7053
7054         * src/SDCCicode.c (geniCodeLogic): made it static,
7055         (geniCodeLogicAndOr): added in order to fix bug #905492,
7056         (ast2iCode): fixed bug #905492
7057         * support/regression/tests/bug-905492.c: added
7058         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
7059         (processParms): fixed bug #927659: don't copy parms, this will clear
7060         decorated flag
7061         * support/regression/tests/bug-927659.c: added
7062
7063 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
7064
7065         * src/SDCCast.c (addCast): don't cast float to char
7066         * device/lib/libsdcc.lib: added _memmove
7067
7068 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
7069
7070         * device/lib/large/Makefile: fixed parallel execution by
7071         replacing `make` by `$(MAKE)`
7072
7073 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7074
7075         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
7076         offsets (fixes bug #923936)
7077
7078 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
7079
7080         * device/lib/small/Makefile: fixed parallel execution by
7081         replacing `make` by `$(MAKE)`
7082
7083 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7084
7085         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
7086
7087 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
7088
7089         * src/pic/gen.c (genCpl): multi-byte complements were not working.
7090         * src/regression/Makefile: Regression test was not running.
7091
7092 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7093
7094         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
7095         complement if possible
7096         * src/SDCCval.c (valComplement),
7097         * src/SDCCicode.c (operandOperation): fixed complement of literal
7098         * support/regression/tests/onebyte.c (testComplement): added
7099
7100 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
7101
7102         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
7103         return an optimized tree; actually replace actParm with the new tree
7104         * src/SDCCast.h: added some parantheses to remove side effects
7105         * support/regression/tests/bug-920866.c
7106
7107 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
7108         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
7109         Bit operands were not being handled properly in the pic14 port.
7110         (now src/regression/add.c passes again).
7111
7112 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7113
7114         * src/SDCC.y (labeled_statement): case and default no longer require
7115         a following statement (RFE #893037)
7116
7117 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7118
7119         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
7120         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
7121         disabled (fixes bug #916294)
7122         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
7123         "mov a,acc"; patch provided by Lenny Story
7124         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
7125
7126 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7127
7128         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
7129         functions
7130         * src/ds390/gen.c (genFunction, genEndFunction),
7131         * src/ds390/ralloc.c (ds390_assignRegisters),
7132         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
7133         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
7134         pushed if there are parameters passed on the stack. Also, a cleaner
7135         way to decide if r0/r1 should be pushed/popped. (Together they fix
7136         bug #918693)
7137
7138 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7139
7140         * doc/sdccman.lyx,
7141         * device/lib/mcs51/crtpagesfr.asm,
7142         * device/lib/mcs51/crtxinit.asm,
7143         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
7144         to avoid confusion with Si Lab's SFRPAGE register.
7145
7146 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7147
7148         * src/SDCCglue.c (emitMaps): allow public sfr variables
7149         * src/SDCCglue.c (initialComments): include compiler build date
7150         with compiler version and put the timestamp of the generated
7151         assembly file on a serperate line to be less confusing.
7152         * src/port.h: added genInitStartup hook
7153         * src/avr/main.c,
7154         * src/ds390/main.c,
7155         * src/hc08/main.c,
7156         * src/pic/main.c,
7157         * src/pic16/main.c,
7158         * src/xa51/main.c,
7159         * src/z80/main.c: genInitStartup initialize as NULL (default to
7160         historical behaviour)
7161         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
7162         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
7163         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
7164         library instead of hard coding it into the compiler.
7165         * support/regression/ports/mcs51-stack-auto/spec.mk,
7166         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
7167         * device/lib/mcs51/Makefile,
7168         * device/lib/small/Makefile,
7169         * device/lib/large/Makefile,
7170         * device/lib/mcs51/crtpagesfr.asm,
7171         * device/lib/mcs51/crtstart.asm,
7172         * device/lib/mcs51/crtxclear.asm,
7173         * device/lib/mcs51/crtxinit.asm,
7174         * device/lib/mcs51/crtclear.asm,
7175         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
7176         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
7177         and into user configurable files.
7178         * device/lib/clean.mk: clean mcs51 directory too
7179         * support/regression/tests/longlit.c: added static to T1 declaration
7180         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
7181         accesses in the initialization code
7182
7183 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7184
7185         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
7186         OSCTRIMVAL as noted in bug #916008
7187
7188 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7189
7190         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
7191         in loops with multiple exits (reported as incorrect registers
7192         used by Martin Helmling in Sdcc-user list)
7193
7194 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7195
7196         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
7197         made ds390 register extensions look less like error messages
7198
7199 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7200
7201         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
7202         reported by Adam Wozniak in Sdcc-user list
7203
7204 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
7205
7206         * src/SDCCast.c (decorateType): fixed with bug and promotion in
7207         arithmetic optimizations, added debug output
7208
7209 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
7210
7211         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
7212         * sdcc.spec: updated and split sdcc into 3 rpms
7213         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
7214         needed for literals of LEFT_OP and '+'
7215         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
7216         introduced RESULT_TYPE_NOPROM
7217         (geniCodeMultiply): fixed logic for decision if mul is optimized to
7218         left shift
7219         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
7220         limited promotion to int only for '*'
7221         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
7222
7223 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
7224
7225         * src/pic16/gen.c (genSkip),
7226         (genc16bit2lit), (gencjneshort): commented out
7227         (is_LitOp): new helper function, checks operand type
7228         (genCmpEq): rewritten
7229
7230 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
7231
7232         * support/regression/tests/bug-908454.c: added
7233
7234 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
7235
7236         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
7237         * src/SDCCicode.c (usualBinaryConversions): op needs int type
7238         (geniCodeCast): cosmetic, don't preserve bit storage class
7239         (geniCodeLeftShift): added promotion
7240         (geniCodeLogic): fixed regression
7241         * src/SDCCsymt.c (computeTypeOr): accept bits too
7242         (compareType): 2nd part of fix for bug #908454, needed for bitfields
7243
7244 2004-03-07  Borut Razem <borut.razem AT siol.net>
7245
7246         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
7247
7248 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
7249
7250         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
7251         version of pic16_genPackRegisters which does not check if ic is a
7252         CAST operator,
7253         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
7254         function cause string1.c regression test fails
7255
7256 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
7257
7258         * sim/ucsim/configure.in,
7259         * sim/ucsim/configure,
7260         * sim/ucsim/doc/Makefile.in: use docdir
7261         * src/SDCC.y: fixed sbit atrributes
7262         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
7263         * src/SDCCast.c (decorateType): |^& need special promotion handling
7264         * src/SDCCast.h,
7265         * src/SDCCsymt.h: moved definition of RESULT_TYPE
7266         * src/SDCCsymt.h (computeType),
7267         * src/SDCCicode.c: computeType() needs op
7268         * src/SDCCsymt.c (checkTypeSanity),
7269         * doc/sddman.lyx: "plain" bitfields are unsigned
7270         * src/SDCCsymt.c (computeTypeOr): added
7271         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
7272         |^& ops
7273         * src/SDCCval.c (val*): computeType() needs op
7274         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
7275         * support/regression/tests/onebyte.c: added tests for |^&
7276
7277 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
7278
7279         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
7280         for writing icode into asm output.
7281
7282 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
7283
7284         * src/pic16/device.c: added some debug lines enabled
7285         with macro DEBUG_CHECK,
7286         * src/pic16/genarith.c: more debug in genPlus,
7287         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
7288         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
7289         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
7290         * (aopForSym): onStack symbols are re-placed in data memspace,
7291         and onStack flag is cleared,
7292         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
7293         copy temporary pcodeop,
7294         * (genPcall): added warning for not updating PCLATU,
7295         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
7296         always true for pic16 port,
7297         * (genMultOneWord): NEW, supports integer multiplication,
7298         * (genMult): modified to call genMultOneWord,
7299         * (ifxForOp): added warning when return NULL,
7300         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
7301         flag is set before call to operandFromSymbol for implicit
7302         added structures,
7303         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
7304         options.intlong_rent are set by default,
7305         * (_hasNativeMulFor): modified to allow port generation of integer
7306         multiplication,
7307         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
7308         set regtype to REG_SFR for all registers, restricting seting the
7309         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
7310
7311 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7312
7313         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
7314         more than 500 times in the regression tests
7315
7316 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7317
7318         * support/Util/SDCCerr.h,
7319         * support/Util/SDCCerr.c,
7320         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7321         enumerator_list),
7322         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
7323         for symbol conflicts.
7324         * support/valdiags/tests/enum.c,
7325         * support/valdiags/tests/tentdecl.c,
7326         * support/valdiags/tests/struct.c: expect possible error messages
7327         referring to original symbol definitions.
7328         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
7329         * src/SDCCsymt.h,
7330         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
7331
7332 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
7333
7334         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
7335
7336 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
7337
7338         * src/pic16/ralloc.c (newReg): fixed bug #908929
7339
7340 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7341
7342         * src/ds390/gen.c: added missing #include "main.h"
7343
7344 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
7345
7346         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
7347         checking if symbol is already in set,
7348         * src/pic16/device.h: prototype for checkAddSym,
7349         * src/pic16/gen.c: (_G): added entry interruptvector,
7350         * (assignResultValue): removed some commented out lines,
7351         * (genFunction): check for ISR via sym->type, absolute section for
7352         interrupt code is created via a new pBlock, the goto instruction is
7353         placed now correctly at the interrupt vector position, changed all
7354         references from ivec to _G.interruptvector,
7355         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
7356         is the interrupt is a high priority one, same for return from ISR,
7357         * src/pic16/glue.c: changed all calls of addSetHead for publics and
7358         externs to calls of checkAddSym,
7359         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
7360         pic16_pcode_verbose flag is set,
7361         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
7362         * src/pic16/pcoderegs.c: message about how many registers are saved
7363         will only be emitted if pic16_pcode_verbose flag is set,
7364
7365 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7366
7367         * src/ds390/ralloc.h,
7368         * src/ds390/ralloc.c (ds390_regWithIdx),
7369         * src/ds390/gen.c (emitcode),
7370         * src/ds390/main.h,
7371         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
7372         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7373         ds390operandCompare, getRegsRead, getRegsWritten,
7374         initializeAsmLineNode): customized instruction size calculation for
7375         ds390, started basis for some register optimizations
7376         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
7377         corresponding assembly output
7378         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
7379         missing push/pop of r0/r1. Optimized push/pops
7380
7381 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7382
7383         * src/mcs51/main.c (instructionSize): fixed ACALL size
7384         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
7385
7386 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
7387
7388         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
7389         the sorting of rlist with NULL elements
7390         * (print_idataType, print_idata): NEW to create idata sections
7391         * src/pic16/device.h: idataSymSet new variable
7392         * src/pic16/gen.c (genFunction): fixed some bugs in string
7393         comparing, improved the absolute section creation for ISRs,
7394         added FSR0L/FSR0H in registers that are saved in an ISR,
7395         * (genInline): fixed the processing of inline snippets,
7396         now they undergo no process by the peephole optimizer
7397         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
7398         are placed in idataSymSet,
7399         * (pic16emitStaticSeg): extern symbols are added in externs,
7400         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
7401         switching when aboslute variables are placed in access bank memory
7402         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
7403         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
7404         commented out with #if,
7405         * (pic16_packRegisters): reintroduce the check for CAST because some
7406         symbols are not correctly handled,
7407         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
7408         pCodeInstruction instead of pCode,
7409         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
7410         pCodeAsmDir definition,
7411         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
7412         directive, then the argument directive is emitted without the leading
7413         tab, hack for inline labels which must be in the first column,
7414         * (compareLabel,pic16_findNextInstruction),
7415         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
7416         * (insertBankSwitch): modified for the new pCodeAsmDir,
7417
7418 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7419         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
7420
7421         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
7422         instance,
7423         * (pushSide): commented out with #if,
7424         * (assignResultValue): fixed some typos in saving
7425         registers,
7426         * (genPcall): FIXED and sync'ed with genCall,
7427         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
7428         * (genNearPointerGet): fixed to handle some more cases,
7429         implementation scheme via table reads,
7430         * (genConstPointerGet): modified to access code memory correct,
7431         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
7432         and improved to handle some cases
7433         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
7434         instead of "RETLW" for init data
7435         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
7436         not IN_DIRSPACE, work around to reduce bank switching when aboslute
7437         variables are placed in access bank memory (<0x80 and >=0xf80),
7438         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
7439         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
7440         TBLWT_POSTDEC,TBLWT_PREINC
7441         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
7442         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
7443         directives
7444         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
7445         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
7446         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
7447         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
7448
7449 2004-02-29  Borut Razem <borut.razem AT siol.net>
7450
7451         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
7452         support/Util/findme.h, support/Util/system.h: enhance binary relative
7453         search for lib and include by using findProgramPath()
7454
7455 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7456
7457         * src/SDCCpeeph.h,
7458         * src/SDCCpeeph.c (pcDistance),
7459         * src/port.h,
7460         * src/mcs51/ralloc.h,
7461         * src/mcs51/ralloc.c (mcs51_regWithIdx),
7462         * src/mcs51/main.h,
7463         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
7464         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7465         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
7466         size calculation port specific, started basis for some register
7467         optimizations
7468         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
7469         missing push/pop of r0/r1. Optimized push/pops
7470         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
7471         * device/lib/_modsint.c (_modsint),
7472         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
7473         and stack version so regression tests pass
7474
7475 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
7476
7477         * src/Makefile.in (dep): include SLIBOBJS in dependency check
7478         * src/SDCCast.c (decorateType): catch another small optimization
7479         with '?' operator
7480         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
7481         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
7482         modified to finally use computeType() all over SDCC,
7483         see Feature Request #877103
7484         * src/SDCCval.h: cosmetic
7485         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
7486         valCompare(); regression tested in muldiv.c
7487         * support/regression/tests/muldiv.c (testMod): mod sign follows
7488         dividend only
7489
7490 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
7491
7492         * src/SDCCast.c (decorateType): fixed bug #902362
7493         * doc/INSTALL.txt: fixed install instructions for win32
7494
7495 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
7496
7497         * device/include/Makefile.in (install): fixed by replacing spaces
7498         by tabs
7499         * doc/README.txt,
7500         * doc/INSTALL.txt: updated for release
7501         * doc/sdccman.lyx: added warning for --xstack being buggy
7502
7503 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
7504
7505         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
7506         to eliminate build warnings.
7507         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
7508
7509 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
7510            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7511
7512         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
7513         removed -penable-stack, added comment for stack pragma, added
7514         warning for not initializing the stack/frame registers, removed
7515         comment at interrupts section
7516
7517         Stack is made permanent, there is no ability to disable stack usage.
7518         * src/pic16/device.h,
7519         * src/pic16/device.c: removed all references to USE_STACK macro,
7520         * src/pic16/device.c (pic16_dump_section): when no elements in
7521         rlist, free rlist before return,
7522         * (pic16_dump_int_registers): NEW, internal registers are a new set
7523         of general purpose registers reused by each function,
7524         * (checkAddReg): returns 1 if registers is added to set,
7525         * (pic16_groupRegistersInSection): when a registers is of type
7526         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
7527         * src/pic16/device.h: memRange and Assigned Memory are deleted,
7528         SRCASECMP macro is moved here from device.c
7529         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
7530         PO_PCLATU, PO_PRODL, PO_PRODH,
7531         * (pic16_pCodeOpType, genMinus,
7532         changed compares to "a" register, with AOP_ACC,
7533         * (pic16_genPlus): fixed some bugs and indented properly,
7534         * (pic16_addSign): changed size to size+offset in the MOVWF
7535         instruction,
7536         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
7537         multiply 8-bit operand by literal, result is 8-bit,
7538         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
7539         multiply 2 8-bit operand, result is 8-bit,
7540         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
7541         genUMult8X*_16,
7542         * src/pic16/gen.c: changed accUse to contain WREG only,
7543         * (pic16_emitcomment): renamed to pic16_emitpcomment,
7544         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
7545         true, do not use immediate addressing any more unless sym is a
7546         pointer in codespace,
7547         * (aopForRemat): do not use immediate addressing when symbol not in
7548         codespace and when symbol's address is requested,
7549         * (aopOp): for-loop in if(sym->accUse) is modified for the new
7550         accUse size (= 1),
7551         * (aopGet): added case for AOP_ACC and don't return "accumulator
7552         bug" but WREG instead,
7553         * (popGetTempReg): pushes contents of temporary register in stack,
7554         * (popReleaseTempReg): pops contents of temporary register from
7555         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
7556         * (pic16_popGet): separated case AOP_ACC to return register WREG
7557         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
7558         or PO_IMMEDIATE and initializes their instance/offset appropriately,
7559         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
7560         the use of immediate pointers to certain cases only.
7561
7562         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
7563         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
7564         * (assignResultValue, genCall, genRet): modified to use the new
7565         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
7566         genPcall is still broken,
7567         * (genFunction): added code to create 'A' type pBlocks when
7568         interrupt functions are generated, code not extensively tested yet,
7569         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
7570         * (genEndFunction): modified so ISRs pop stored registers from stack,
7571         * (genMultOneByte): cleanup,
7572         * (AccRsh): added flag andmask, to and result with appropriate mask,
7573         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
7574         * (genDataPointerGet): fixed and reenabled its use,
7575         * (genNearDataPointerGet): bugs fixed,
7576         * (genDataPointerSet): bugs fixed,
7577         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
7578         pic16_DumpSymbol, pic16_DumpOp,
7579         * src/pic16/genutils.h: function prototypes for the above functions,
7580         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
7581         pointers,
7582         * (pic16emitRegularMap): many many many improvements, but needs a
7583         major cleanup,
7584         * src/pic16/main.c: enable_stack in pic16_options is removed,
7585         * (_pic16_parseOptions): removed command line options -penable-stack,
7586         * (_process_pragma): emit stack symbol only when stack pragma is
7587         processed,
7588         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
7589         redirected to FSR0L/FSR0H pair,
7590         * (pic16_get_op, pic16_get_op2): modifications and improvements,
7591         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7592         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
7593         for immediates,
7594         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
7595         * (dumpPicOptype): NEW,
7596         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
7597         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
7598         with movff instruction,
7599         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
7600         added pic16_int_regs, some packRegsFor* functions are commented out,
7601         because produce errors,
7602         * src/pic16/NOTES: minor modifications
7603
7604 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7605
7606         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
7607         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
7608         --pack-iram.
7609         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
7610         * as/mcs51/lkaomf51.c: fixed bug #895763
7611
7612 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
7613
7614         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
7615
7616 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7617
7618         * doc/sdccman.lyx: added details about the HC08 storage classes and
7619         interrupts, fixed the register usage info for z80 & gbz80
7620
7621 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
7622
7623         * doc/sdccman.lyx: added more pic16 port documentation
7624         * device/include/pic16/: added header pic18fregs.h
7625
7626 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
7627
7628         * doc/sdccman.lyx: added Vangelis' contribution
7629
7630 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7631
7632         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
7633         extend to the next CALL or PCALL, not just to the next CALL.
7634
7635 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
7636
7637         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
7638
7639 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7640
7641         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
7642         bug #895752 and a better fix for bug #716790
7643
7644 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7645
7646         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
7647
7648 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7649
7650         * doc/sdccman.lyx: minor changes, minor changed
7651
7652 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
7653
7654         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
7655         which can't handle SDCC_NEWONEBYTEOPS,
7656         (geniCodeMultiply): removed conversion from mult to shift for pic14
7657         and pic16
7658
7659 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7660
7661         * src/hc08/gen.h,
7662         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
7663         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
7664         thus fixing bug #895406
7665
7666 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
7667
7668         * device/lib/_modsint.c,
7669         * device/lib/_modslong.c: sign follows divisor only
7670         * src/hc08/gen.c (genMultOneByte): if result size is 1,
7671         signs or signedness can be ignored
7672         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
7673         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
7674         added optimization for IFX,
7675         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
7676         arguments;
7677         reenabled optimization for IFX, which was removed on 2004-01-11
7678         * src/SDCCast.h: added return type IFX
7679         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
7680         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
7681         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
7682         SDCC_OLDONEBYTEOPS selects the old behaviour
7683         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
7684         changed again and commented promotion rule
7685         * src/SDCCval.c (valDiv): promotion no longer necessary
7686         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
7687         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
7688         rewritten
7689         * support/regression/tests/onebyte.c: added
7690
7691 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
7692
7693         * gen.c (genInline): reverted to old code for assemnling inline
7694         code because of bug reported James Chadd
7695
7696 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
7697
7698         * ralloc.h: missing declarations from previous patch,
7699         seems that patch for ralloc.h was never applied, fixed
7700
7701 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7702            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7703
7704         * pcode.c,
7705         * pcode.h,
7706         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7707         indirect addressing. Marked FSR0 as deprecated
7708         * gen.c (pointerCode): commented out, not needed now
7709         (pic16_popGet2p): new MOVFF helper function
7710         (genGenPointerGet),
7711         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7712         (shiftRLong): removed duplicate debugging info
7713
7714 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7715
7716         * src/ds390/gen.c (genNearPointerGet),
7717         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7718         optimization with bits, but not bitfields.
7719         * src/ds390/ralloc.c (packRegisters),
7720         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7721
7722 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7723
7724         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7725
7726 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7727
7728         * src/SDCCsymt.h,
7729         * src/SDCCicode.c (operandFromSymbol),
7730         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7731         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7732         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7733         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7734         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7735         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7736         bug #892038
7737         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7738         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7739         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7740         * src/SDCCsymt.c (newSymbol),
7741         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7742         enumerator_list),
7743         * src/SDCCval.h,
7744         * src/SDCCval.c (newiList): fixed bug #885705
7745
7746 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7747
7748         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7749         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7750
7751 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7752
7753         * device/include/c8051f120.h,
7754         * device/include/c8051f300.h,
7755         * device/include/c8051f310.h: added/updated header files for Silicon
7756         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7757         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7758         in new section Submitting patches
7759
7760 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7761
7762         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7763         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7764         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7765         genGenPointerSet),
7766         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7767         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7768         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7769         genGenPointerSet),
7770         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7771         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7772         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7773         genGenPointerSet),
7774         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7775         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7776         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7777         genGenPointerSet): fixed bug #892400
7778         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7779         to eliminate build warnings.
7780         * src/SDCCast.c (processParms),
7781         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7782         fixed bug 751859
7783         * support/valdiag/valdiag.py: added GCC to the list of defines active
7784         when compiling with gcc
7785
7786 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7787
7788         * support/Util/SDCCerr.h,
7789         * support/Util/SDCCerr.c,
7790         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7791         with an incomplete type (fixed bug #883734)
7792         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7793
7794 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7795
7796         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7797
7798 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7799
7800         * src/SDCCast.c (decorateType),
7801         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7802         function pointer implementation
7803         * support/regression/tests/funptrs.c: added tests to verify both forms
7804         of function pointers work correctly. Added tests to verify parameters
7805         are passed in the correct order.
7806
7807 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7808
7809         * device.c (regCompare): registers are sorted by ascending
7810         address and increasing size,
7811         * main.c (_pic16_finaliseOptions): removed the declaration
7812         of compiler macro MCU. Now a macro of the format pic18fxxxx
7813         will be defined from the command line
7814
7815 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7816             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7817
7818         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7819         PCOP_RLCF was overwritten!
7820         * gen.c (genSkip): commented out calls to pic16_emitcode,
7821         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7822         * (genlshTwo),
7823         * (genRRC): added debugging info,
7824         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7825         overwritten while shifting,
7826         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7827         overwritten while shifting,
7828         * (AccLsh),
7829         * (AccRsh),
7830         * (shiftLLeftOrResult),
7831         * (shiftRLeftOrResult),
7832         * (shiftRLong),
7833         * (shiftLLong): Implemented with pic16_emitpcode
7834         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7835         * (genLeftShift): Fixed bug, operand for shift by variable always
7836         was "and"ed with 0x0f,
7837         * (genLeftShiftLiteral),
7838         * (genrshTwo),
7839         * (genRightShiftLiteral): added debugging info,
7840         * (genrshFour): added comment,
7841         * (genRightShift): determined signedness from operand "left"
7842         instead of "result"
7843
7844 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7845
7846         * src/SDCCicode.c (geniCodeParms),
7847         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7848         function pointers, fixed function pointer bugs #861242 and #861896
7849
7850 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7851
7852         * device/include/c8051f000.h,
7853         * device/include/c8051f120.h,
7854         * device/include/c8051f300.h: added header files for Silicon
7855         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7856
7857 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7858
7859         * src/SDCCast.c (processParams): added new type flow and restructured
7860         (gatherAutoInit): added new type flow
7861         (addCast): cosmetic changes
7862         (getLeftResultType): added new type flow for array indices, patch
7863         provided by Stas, see FR #877103
7864         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7865         array index patch by Stas
7866         * src/SDCCast.h: added prototype getResultTypeFromType()
7867         * src/SDCCval.h,
7868         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7869         * src/pic/glue.c (pic14emitStaticSeg),
7870         * src/pic16/glue.c (pic16emitStaticSeg),
7871         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7872         for initialization of symbols
7873         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7874         * support/Util/SDCCerr.h:
7875         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7876         * .version: bumped version number to 2.3.8
7877         * device/include/Makefile.in (install),
7878         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7879         avoid warnings
7880
7881 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7882
7883         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7884         Slade Rich fixed an optimization bug
7885         * src/pic/pcodepeep.c,
7886         * src/pic/pcoderegs.c
7887         * doc/Makefile (install): added test for directory
7888
7889 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7890
7891         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7892         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7893         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7894         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7895         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7896         * as/mcs51/asexpr.c (term),
7897         * as/hc08/asexpr.c (term): fixed bug #887146
7898
7899 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7900
7901         * src/z80/gen.c (genMult): handle single byte result product
7902         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7903         DUMMY_READ_VOLATILE (fixed bug #886367)
7904
7905 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7906
7907         * support/regression/tests/libmullong.c: fixed logic, on little endian
7908         hosts we ended without a mullong_wrapper()
7909
7910 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7911
7912         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7913         virus/worm forged address usage.
7914
7915 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7916
7917         Fixed promotion, it should be done on AST level:
7918         * src/SDCCast.c (addCast): added promotion to int
7919         (decorateType): updated call to upCast()
7920         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7921         usualUnaryConversions()
7922
7923 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7924
7925         * support/regression/tests/literalop.c (mulWrapper): Added a
7926         wrapper to remove integer overflow warnings.
7927
7928         * support/regression/tests/float_trans.c: Made work on host.
7929
7930         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7931         location of sz80.
7932
7933         * support/regression/generate-cases.py (main): Changed from inline
7934         to a main method.
7935
7936         * doc/Makefile (install): Changed to depth first to get rid of
7937         missing directory install warning.
7938
7939         * as/Makefile (install-doc): Made work on Mac.
7940
7941 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7942
7943         * src/SDCCast.c: added an additional type flow in decorateType() of
7944         opposite direction, see feature request #860006; it's enabled at runtime
7945         by setting the environment variable SDCC_NEWTYPEFLOW
7946         * src/SDCCast.h: changed prototype of decorateType()
7947         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7948         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7949         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7950         see feature request #877103
7951         * src/SDCCval.c: updated call of decorateType()
7952         (valBitwise): fixed bug #882876
7953         (valMinus): added promotion
7954         (valLogicAndOr): result is unsigned
7955         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7956         * src/SDCCsymt.c (computeType),
7957         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7958         must not cause an unsigned operation
7959         * src/pic/glue (pic14emitRegularMap),
7960         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7961
7962 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7963
7964         * src/pic/pcode.c (PCodeID): commented out left over debug code
7965
7966 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7967
7968         * support/valdiag/tests/overflow.c: added shift tests
7969         * src/pic/device.c,
7970         * src/pic/gen.c,
7971         * src/pic/gen.h,
7972         * src/pic/glue.c,
7973         * src/pic/main.c,
7974         * src/pic/pcode.c,
7975         * src/pic/pcode.h,
7976         * src/pic/pcodepeep.c,
7977         * src/pic/pcoderegs.c,
7978         * src/pic/ralloc.c,
7979         * src/pic/ralloc.h: applied patch from Slade Rich;
7980         added support for multiple code pages and multiple RAM banks on the
7981         PIC 14 port. The ASM files now no longer simply assume all the
7982         code / RAM are in the same page / bank. This means the linker can
7983         safely allocate code/RAM of separate ASM files to different pages/banks.
7984         * doc/sdccman.lyx: added Slade's tips
7985         * src/mcs51/peeph.def: fixed bug #880768
7986
7987 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7988
7989         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7990         * src/SDCCast.c (decorateType): fixed bug #880197
7991
7992 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7993
7994         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7995         getopt.h.
7996
7997         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7998         strtof is not part of C89 and isn't included with Mac OS X.
7999
8000 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8001
8002         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
8003         shiftL2Left2Result): fixed bug #879326
8004         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
8005         (genMultOneByte): fixed bug in signed vs unsigned multiplication
8006         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
8007         address fetch for clr instruction
8008         * device/lib/hc08/_mulint.c: created optimized assembly version
8009         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
8010
8011 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
8012
8013         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
8014         proposed in FR #877103
8015
8016 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
8017
8018         * src/SDCCval.c (cheapestVal): added missing checks
8019         * src/SDCCicode.c (usualBinaryConversions): fixed condition
8020         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
8021
8022 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
8023
8024         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
8025         equal operands
8026
8027 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
8028
8029         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
8030         loaded with the linker search paths (-L arguments) and the libraries
8031         to be linked with the current source (-l arguments). Changes
8032         currently will affect only the pic16 port.
8033         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
8034         include path the port specific paths and port specific libraries,
8035         * gplink command now contains the $3 argument,
8036         * src/pic16/device.h,
8037         * src/pic16/device.c,: structure PIC_device is made public and
8038         renamed to PIC16_device, the same for variable Pics which is renamed
8039         to Pics16. Updated all references to them.
8040         * src/pic16/glue.c (pic16glue): corrected bug with code
8041         initialization which bypassed the variable initializations block.
8042
8043         * device/lib/pic16/Makefile.rules: removed --penable-stack from
8044         COMPILE_FLAGS and added the --nostdinc option
8045
8046 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8047
8048         * device/include/mc68hc908jb8.h: Register defs for another member
8049         of the hc08 family. Contributed by Bjorn Bringert - thanks!
8050
8051 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
8052
8053         Documenting changes from previous commits.
8054         * configure.in (version 1.56),
8055         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
8056         when generating output files to configure the pic16 library,
8057         but now I've commented it out, since gputils aren't installed in the
8058         SF compile farm, so library won't compile
8059
8060         * device/lib/Makefile.in (version 1.56): initially I've added in
8061         target 'all' the prerequestive 'model-pic16' so it compiled the
8062         pic16 library, but now I've commented it out for the same reasons
8063         above,
8064         * added targets 'model-pic16' and 'objects-pic16' to compile the
8065         library
8066         * added target 'port-specific-objects-pic16' to handle the
8067         generated libraries and copy them into the build/ directory
8068         * added target 'clean-intermediate-pic16' to clean intermediate
8069         files into pic16 directory
8070         * in target 'installdirs' added line to create directory pic16 in
8071         the installation path
8072
8073         * device/include/Makefile.in (version 1.11): in target 'install'
8074         added lines to copy all header files to installation path,
8075         * in target 'installdirs' added line create directory for pic16
8076         headers in the installation path
8077
8078 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
8079
8080         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
8081          a function call
8082
8083 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
8084
8085         * configure,
8086         * device/lib/configure.in,
8087         * device/lib/configure: fixed for autoconf 2.57
8088
8089 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8090
8091         * src/z80/main.c (_parseOptions): fixed the portmode= command line
8092         option so that it actually works. Made it specific to the z80, since
8093         the gbz80 doesn't have these kinds of I/O ports.
8094
8095 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8096
8097         * device/include/z180.h,
8098         * device/lib/_memcpy.c,
8099         * device/lib/_memmove.c,
8100         * device/lib/_mulint.c,
8101         * device/lib/ser_ir.c,
8102         * device/lib/ser_ir_cts_rts.c,
8103         * device/lib/_strcmp.c,
8104         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
8105         * src/z80/main.c (_process_pragma): add support for pragmas bank and
8106         portmode; added deprecation warning for bank= and protmode= forms.
8107         Also, guard against buffer overflow.
8108         * src/z80/gen.c (aopGet): generate better code for sfr banked read
8109
8110 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8111
8112         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
8113         changed interrupt vector table generation to only emit declared vectors.
8114         * device/include/Makefile.in: added missing backslash
8115         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
8116
8117 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8118
8119         Mainly changes to support compilation of the device libraries
8120         * src/pic16/device.c: stack is allocated via symbol and not
8121         via literal number. The symbol is placed in the corresponding
8122         position of the data ram
8123         * (pic16_dump_section): relocatable and absolute uninitialized
8124         data are now emitted in sorted order to reduce section naming,
8125         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
8126         weren't marked as being in the access bank,
8127
8128 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8129
8130         Added portion of GNU PIC Library under the directory
8131         device/include/pic16 and device/lib/pic16. These files
8132         contain the declarations of SFRs for the PIC18Fxx2 devices.
8133         The directory is initialized via configure from toplevel.
8134
8135 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
8136
8137         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
8138         the spilllocations to be compared correctly
8139
8140 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8141
8142         * src/SDCCast.c (decorateType): fixed bug introduced today
8143
8144 2004-01-12  Borut Razem <borut.razem AT siol.net>
8145
8146         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
8147         doc/sdccman.lyx: upper case pragmas are deprecated
8148
8149 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8150
8151         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
8152         in simpler and even better code
8153
8154 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
8155
8156         * src/SDCCicode.c (operandOperation): fixed bug #874819
8157         * src/SDCCast.c (decorateType): fixed
8158         char foo (unsigned long ul) { return ul > 0; }
8159
8160 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8161
8162         * doc/sdccman.lyx: Moved and added some sections, small changes
8163         all over. Telling LaTeX to be less strict with word spacing
8164         to better keep the right margin. Changed some notes about
8165         maintainance of the ports in section 3.2.1 - is it OK like this?
8166
8167 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
8168
8169         SDCC source changes:
8170         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
8171         convilong): modified to inform the pic16 port that builtin functions
8172         are external
8173
8174         PIC16 PORT specific changes:
8175         * src/pic16/device.c pic16_dump_equates() added,
8176         processor registers declared internally by the port are emitted in
8177         the translation as equates,
8178         * src/pic16/gen.c: inline code is passed unprocessed to the
8179         translation,
8180         * (pic16_popGetLit2): fnuction modified to take second operand as
8181         pCodeOp pointer and not as literal,
8182         * (popRegFromIdx): prefixed with pic16_,
8183         * (pic16_popCombine2): modified to receive already allocated pCode
8184         operands,
8185         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
8186         * (genFunction): initializes local stack frame and pushes on stack
8187         all the registers used by this function,
8188         * (genEndFunction): restores all registers from stack and restores
8189         stack frame,
8190         * src/pic16/glue.c (pic16emitRegularMap): various changes and
8191         improvements,
8192         * (pic16glue): changed the program startup sequence,
8193         * added new dbName code 'A' for functions placed in absolute section
8194         * src/pic16/main.c: added function attribute _naked,
8195         * added pragma 'code' to place a fnuction at an absolute address,
8196         * added command line arguments --debug-ralloc and --pcode-verbose,
8197         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
8198         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
8199         * (pic16_newpCodeOpLit2): modified to take the second operand as
8200         pCodeOp pointer,
8201         * (pic16_printpBlock): modified to emit each function in a separate
8202         section,
8203         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
8204         UPPER for immediate operands,
8205         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
8206         instruction,
8207         * src/pic16/peeph.def: all peepholes with movff are commented out,
8208         because there is a problem in the pcode peep optimizer,
8209         * src/pic16/ralloc.c: the register allocator can now reuse local
8210         function symbols for another function. This saves register usage.
8211         * src/pic16/ralloc.h: added flag isLocal in structure regs,
8212
8213         Added file src/pic16/NOTES with information about program writing on
8214         the current port version.
8215
8216 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8217
8218         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
8219         and peephole 252 (array access)
8220
8221 2004-01-09  Borut Razem <borut.razem AT siol.net>
8222
8223         * src/SDCCmain.c : fixed #872250: -l command line defined library
8224           files are scanned before standard library files
8225
8226 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8227
8228         * src/SDCCast.c (decorateType): fixed bug #874046
8229
8230 2004-01-09  Borut Razem <borut.razem AT siol.net>
8231
8232         * support/scripts/sdcc.nsi: remove previous installation
8233
8234 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8235
8236         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
8237         bytes for last interrupt vector (mcs51)
8238         * sdcc.spec: fixed typo
8239
8240 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8241
8242         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
8243         gen51Code): more efficient parameter receive for --model-large
8244         ("bug" #845294)
8245
8246 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8247
8248         * src/ds390/main.c,
8249         * src/z80/main.c: added missed needLinkerScript flags (more than
8250         one port structure defined in these file)
8251         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
8252         bug #795325
8253
8254 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
8255
8256         * src/SDCCmain.c: removed various references to DEFAULT_PORT
8257         * src/port.h: added flag needLinkerScript in port->linker
8258         structure to inform whether to create a .lnk file or not,
8259         * src/avr/main.c,
8260         * src/ds390/main.c,
8261         * src/hc08/main.c,
8262         * src/mcs51/main.c,
8263         * src/pic/main.c,
8264         * src/pic16/main.c,
8265         * src/xa51/main.c,
8266         * src/z80/main.c: changed appropriately to configure
8267         needLinkerScript flag
8268         * src/pic/gen.c,
8269         * src/pic16/gen.c (genAddrOf): fixed bug #863624
8270         * src/pic/glue.c: added variable udata_section_name to
8271         override default uninitialized data segment definition for
8272         devices only with SHAREBANK memory (reported from Erik Epetrich)
8273         * (pic14emitOverlay): modified to emit a commented overlay segment
8274         directive when no overlay data exist
8275         * (picglue): modified to emit uninitialized data segment
8276         according to udata_section_name
8277         * src/pic/main.c (_pic14_parseOptions): added command line
8278         options --udata-section-name=[name] to override default
8279         udata definition name
8280         * modified _linkCmd and _asmCmd to include compiler passed
8281         arguments via -W option
8282         * src/pic16/main.c: added $l in _asmCmd, changed extension for
8283         object file from '.rel' to '.o' in port->linker structure,
8284         changed size of fptr from 2 to 3 in port structure
8285
8286 2004-01-07  Borut Razem <borut.razem AT siol.net>
8287
8288         * support/scripts/sdcc.nsi: update PATH
8289         * support/scripts/sdcc.ico: craeted
8290
8291 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
8292
8293         * device/include/Makefile.in: fix install
8294         * doc/Makefile: fix install
8295
8296 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8297
8298         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
8299         in bug #860505
8300         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
8301         how the function variable allocation summary is displayed; also
8302         include information about variables allocated to the overlay
8303         segment
8304
8305 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8306
8307         * as/mcs51/lkmain.c: Help about -Y option
8308         * as/mcs51/lkarea.c: Fixed gcc warnings
8309
8310 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8311
8312         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
8313         fixed warning
8314         * support/valdiag/tests/overflow.c: added
8315         * src/SDCCast.c (decorateType),
8316         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
8317         LEFT_OP (left shift)
8318
8319 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8320
8321         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
8322         (default behaviour).
8323
8324 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8325
8326         A python script to validate compiler diagnostic messages. It can be
8327         used to verify that sdcc complains about bad c source code and
8328         gives a good location of the error.
8329         * support/valdiag/Makefile,
8330         * support/valdiag/valdiag.py,
8331         * support/valdiag/tests/*
8332
8333 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8334
8335         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
8336         * src/SDCCsymt.c (newEnumType),
8337         * src/SDCCsymt.h
8338         * support/Util/SDCCerr.c,
8339         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
8340         enum related bugs.
8341         * support/regression/tests/enum.c: added test for enum values that
8342         require at least 2 bytes of storage.
8343
8344 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8345
8346         * src/common.h: added ifndef/define/endif macros
8347         around the header file.
8348         Bug reported from Jesus Calvino-Fraga
8349
8350 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8351
8352         * sdcc.spec: updated
8353         * device/include/Makefile.in: don't install CVS directories
8354         * device/lib/Makefile.in: added removal of CVS directories after install
8355         * doc/Makefile: fixed install, added local_icons
8356         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
8357         * src/mcs51/gen.c (genRightShift): fixed bug #870788
8358         * src/ds390/gen.c (genRightShift): fixed bug #870788
8359         * src/SDCCast.c (decorateType): fixed bug #870781
8360
8361 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8362
8363         PIC16 port related changes:
8364         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
8365         added variable stackPos,
8366
8367         * gen.c: genCall, assignResultValue: added support for
8368         pushing/retrieving function parameters to/from stack,
8369         genFunction,genEndFunction: setup stack frame for the
8370         generated function,
8371         genAddrOf: will be changed according to bug 863624
8372
8373         * added files genutils.c and genutils.h which contain gen*
8374         debugged and optimised functions extracted from gen.c
8375
8376         * glue.c: added variable 'externs' which holds extern symbols,
8377         pic16emitRegularMap: is modified to properly handle relocatable
8378          symbols under the new scheme,
8379         pic16createInterruptVect: is modified
8380         pic16printPublics: is modified to emit 'global' assembler directives,
8381         added pic16_printExterns to print extern symbols,
8382         pic16glue: initializes stack/frame pointer in the beginning of
8383         the assembly output. Temporary hack, will be corrected later,
8384         because gplink yet does not support stack and SDCC does not
8385         yet support a type of crt0.o object to create the final binary.
8386
8387         * Removed many lines that contain 8051 legacy code.
8388         * The code is finally placed under a 'code' directive.
8389         * Added port specific options.
8390
8391         * _process_pragma: simplified since now we do not need *special*
8392         include file to define SFR registers. But a separate header
8393         will be needed. This will be developed later.
8394         * _pic16_parseOptions: added, parses port specific options:
8395         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
8396         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
8397         --preplace-udata-with=
8398
8399         * _pic16_setDefaultOptions: modified to initialize section names,
8400         but hack is temporarly out of order since it needs improvement.
8401         * _pic16_genAssemblerPreamble: configuration words are emitted by
8402         their address instead of their name. This part is incomplete and
8403         supports only the 18Fxx2 devices. Other devices will emit an error
8404         during assembly since they do not contain the same set of config
8405         registers
8406         * _pic16_genIVT: is modified,
8407
8408         * pcode.c: added definitions for some hardware registers that are needed
8409         for stack support
8410         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
8411         All PCI entries are updated. Now LFSR is supported.
8412         * Removed pic16_pciTRIS is mentioned by mdubuc in source
8413         * added pic16_newpCodeOpLit2 to support instructions with
8414         two literal arguments
8415         * pic16_pCode2str: corrected code that emits assembler instructions
8416         with two literal operands and those that have an access bit modifier
8417         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
8418         this fixes a bug which caused some labels to be lost, when an
8419         assembler directive was added, i.e. banksel,
8420         * pic16_FixRegisterBanking: improved logic that causes the insertion
8421         of bank switching,
8422         * InlineFunction: functions that are called once, are not any more
8423         inlined. This can be a port option in the future,
8424
8425         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
8426
8427         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
8428         hold the corresponding uninitialized symbols,
8429         * pic16_allocProcessorRegister: registers have explicit marked the
8430         accessBank field,
8431         * pic16_allocInternalRegister: registers are explicit marked as
8432         not used,
8433         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
8434         processing list, so bit registers were lost,
8435         *
8436
8437         * ralloc.h: added field 'accessBank' and original symbol operand
8438         in register definition,
8439         * removed the field isMapped from register definition,
8440
8441         ** Several functions have been removed from various sources:
8442         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
8443         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
8444         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
8445         pic16_assignRelocatableRegisters
8446
8447         ** others have been introduced:
8448         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
8449         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
8450
8451 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
8452
8453         * support/scripts/inc2h.pl: changed definition of BIT_AT
8454         to emit 'sbit at' instead of 'bit at'. This was a request.
8455
8456         PIC16 port related preliminary changes:
8457         * gen.c: prefixed function popRegFromString with
8458         pic16_ and all references to it corrected
8459         * pcode.c: all pic16_pc_* hardware registers prefixed
8460         with underscore (_),
8461         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
8462         * ralloc.c: newReg(): when register is REG_SFR then
8463         set address to rIdx,
8464         pic16_allocProcessorRegister(): marks register wasUsed=0
8465         pic16_writeUsedRegs(): added a call to assign processor
8466         registers via pic16_assignFixedRegisters
8467
8468 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8469
8470         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
8471         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
8472         variables in unused register banks.  Also the SSEG is placed
8473         wherever there is enough space for it, and IDATA can be anywhere
8474         in internal RAM.  For now compile using -Wl-Y[stack_size].
8475         The mem file is different for this option as well, since it
8476         makes no sense of talking about DSEG lenght.
8477
8478 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
8479
8480         * src/SDCClrange.c: fixed bug 869095 that caused segfault
8481         in certain cases, e.g. when ROM assignment, patch provided
8482         from Albert den Haan.
8483
8484 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
8485
8486         Many signedness and type propagation fixes:
8487         * src/SDCCicode.c: made geniCodeCast() static
8488         replaced SPEC_ by IS_ (cosmetic)
8489         (operandOperation): fixed div and mod operation
8490         (usualBinaryConversions): added support for promotion of char
8491         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
8492         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
8493         (geniCodeAdd): an array index will stay unsigned, even if promoted
8494         from char to int
8495         (geniCodeArray): ditto
8496         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
8497         * src/SDCCsymt.c (computeType): added more support for char;
8498         promotion of char is selectable by promoteCharToInt, fixed signedness
8499         for all cases
8500         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8501         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8502         * src/SDCCval (val*): replaced signedness calculation by
8503         computeType()
8504         rearranged if-branches (cosmetic)
8505         (valShift): added warning W_SHIFT_CHANGED
8506         (valCompare): fixed problem with different types
8507         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
8508         * support/regression/tests/literalop.c: added many cases
8509         * support/regression/tests/ast_constant_folding.c: changed finally to
8510         'unsigned int'
8511         * .version: new year, new version: 2.3.7
8512         * src/SDCCmain.c (main): applied patch #866468
8513         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
8514         provided by Scott Bronson
8515         * doc/sdccman.lyx: updated documentation for sdcdb
8516         updated and added chapter tips
8517
8518 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8519
8520         * src/SDCCsymt.h: missing from yesterday's commits
8521
8522 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8523
8524         * src/SDCC.y (struct_or_union_specifier),
8525         * support/Util/SDCCerr.c,
8526         * support/Util/SDCCerr.h: verify that struct & union tags are used
8527         as declared.
8528
8529 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8530
8531         * src/SDCCglobl.h: missing from yesterday's commits
8532
8533 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8534
8535         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
8536         sft_attributes, struct_declaration, parameter_declaration,
8537         type_name, start_block, declaration_list),
8538         * src/SDCC.lex (check_type): support redefinition of typedef names
8539
8540 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8541
8542         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
8543         aligned xdata arrays. Erik helped me with the if clause.
8544
8545 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8546
8547         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
8548         warning
8549
8550 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8551
8552         * src/SDCCast.h,
8553         * src/SDCCast.c (newAst_),
8554         * src/SDCCicode.h,
8555         * src/SDCCicode.c (ast2iCode, newiCode),
8556         * src/SDCCglobl.h,
8557         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
8558         expr, statement, expression_statement, selection_statement,
8559         iteration_statement, expr_opt, jump_statement): foundation for tracking
8560         sequence points
8561         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
8562         point code too)
8563
8564 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8565
8566         * support/Util/SDCCerr.c,
8567         * src/SDCCast.h,
8568         * src/SDCCast.c (createCase, createDefault, decorateType),
8569         * src/SDCClabel.c (labelUnreach),
8570         * src/SDCC.y (labeled_statement, jump_statement): More improvements
8571         to error messages.
8572         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
8573         (with thanks to Stas Sergeev)
8574         * device/include/time.h,
8575         * device/lib/time.c (CheckTime): suppress unreachable code warning
8576
8577 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8578
8579         * src/SDCCast.c (createIvalCharPtr),
8580         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
8581         bug #753752)
8582         * support/regression/tests/nullstring.c: tests for these two bugs
8583
8584 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8585
8586         * support/Util/SDCCerr.h,
8587         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
8588         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
8589         about storage class and 'at' used inside struct or union
8590         * src/SDCCBBlock.c (iCodeFromeBBlock),
8591         * src/SDCCcse.c (ifxOptimize),
8592         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
8593         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
8594         printIval, emitStaticSeg, emitOverlay),
8595         * src/SDCClabel.c (deleteIfx),
8596         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
8597         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
8598         gatherAutoInit, processParms),
8599         * support/Util/SDCCerr.h,
8600         * support/Util/SDCCerr.c (werrorfl): Support for better error location
8601         reporting for post-parse errors.
8602
8603 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8604
8605         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
8606         implicit casts via union; they don't work on big endian systems
8607         (possible fix for bug #861138)
8608
8609 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8610
8611         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
8612         * src/mcs51/main.c: fixed the fix for bug #737001
8613
8614 2003-12-15  Borut Razem <borut.razem AT siol.net>
8615
8616         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
8617
8618 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8619
8620         * support/makebin/makebin.c: put output in binary mode
8621
8622 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8623
8624         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
8625         xdata and data memory on startup. Set the environment variable
8626         SDCC_NOGENRAMCLEAR to disable this.
8627         * src/mcs51/peephole.def,
8628         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
8629         (allows non-interrupt and interrupt code to safely compete for a resource
8630         without the non-interrupt code having to disable interrupts)
8631
8632 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8633
8634         * src/SDCCicode.c (geniCodeAdd),
8635         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
8636         with valFromType if type might be a pointer and host is big endian).
8637         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
8638         types, not just integer types.
8639         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
8640         multiply defined with mismatching "at" address.
8641
8642 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8643
8644         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
8645         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
8646         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
8647         with embedded nulls (fixed bug #753752)
8648
8649 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8650
8651         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
8652         Apparently this did not see much testing (endless loop)
8653
8654 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8655
8656         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
8657
8658 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8659
8660         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
8661         gracefully handle NULL memmap pointers
8662
8663 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8664
8665         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
8666         instead of deleting the iCode when an operand is volatile
8667         * src/z80/gen.c (genDummyRead),
8668         * src/mcs51/gen.c (genDummyRead),
8669         * src/ds390/gen.c (genDummyRead),
8670         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
8671         not just IC_RIGHT
8672         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
8673         * src/SDCC.y: fixed bug #850420
8674
8675 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8676
8677         Applied z80 i/o port patch from Peter Townson and fixed some operators
8678         to better handle operands in A register.
8679         * device/include/z180.h
8680         * src/SDCC.y
8681         * src/SDCCglue.c
8682         * src/z80/gen.c
8683         * src/z80/gen.h
8684         * src/z80/main.c
8685         * src/z80/peeph-z80.def
8686         * src/z80/peeph.def
8687         * src/z80/z80.h
8688
8689 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8690
8691         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
8692
8693 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8694
8695         * device/lib/hc08/_mullong.c: Removed extra #endif
8696
8697 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8698
8699         * sim/ucsim/hc08.src/inst.cc,
8700         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8701         carries from x to h
8702         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8703         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8704         * device/include/stdarg.h: fixed varargs for hc08
8705         * device/lib/Makefile.in,
8706         * device/lib/hc08/Makefile,
8707         * device/lib/hc08/_mulint.c,
8708         * device/lib/hc08/_mullong.c: fixed some endian problems
8709
8710 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8711
8712         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8713         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8714         * device/lib/_gptrget.c,
8715         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8716
8717 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8718
8719         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8720         * src/SDCCast.c (astErrors): fixed bug #846007
8721         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8722
8723 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8724
8725         * src/SDCCast.c (decorateType): disabled a transformation I added in
8726         revision 1.188 (access to fields of a structure at an absolute address);
8727         it breaks with bitfields, extern declarations, and gcse analysis.
8728         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8729         could be assigned through a pointer, so don't complain.
8730         * src/SDCCast.c (astErrors),
8731         * src/SDCCast.h,
8732         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8733
8734 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8735
8736         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8737         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8738         output of __config directives, since gpasm now supports them
8739         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8740         pre-processor macro, i.e. -DMCU=p18f452
8741         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8742         and modified to handle 'cast' icode similarly to '=' icode
8743         * src/pic16/device.h (typedef struct PIC_device): added field
8744         'extMIface' to indicate that chip has external memory interface
8745         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8746         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8747         18F8720
8748
8749 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8750
8751         * src/SDCC.y (pointer): fixed bug #846006
8752         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8753         * src/SDCCast.c (decorateType): fixed bug #846009
8754         * src/ds390/peeph.def,
8755         * src/ds390/gen.c (genAnd, genOr),
8756         * src/mcs51/peeph.def,
8757         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8758
8759 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8760
8761         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8762         * src/SDCCdflow.c
8763         * src/SDCCcse.c
8764         * src/SDCCcse.h
8765         * src/SDCCBBlock.h
8766         * src/SDCCBBlock.c
8767
8768 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8769
8770         fixed bug #845089
8771         * src/SDCCbitv.h,
8772         * src/SDCCbitv.c: added function to free a bitvector
8773         * src/SDCClrange.h,
8774         * src/SDCClrange.c: added function to recompute the liveranges
8775         * src/avr/ralloc.c,
8776         * src/ds390/ralloc.c,
8777         * src/hc08/ralloc.c,
8778         * src/mcs51/ralloc.c,
8779         * src/pic/ralloc.c,
8780         * src/pic16/ralloc.c,
8781         * src/xa51/ralloc.c,
8782         * src/z80/ralloc.c: recompute the liveranges after register packing
8783
8784 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8785
8786         * src/SDCCloop.c (newInduction): fixed bug #845630
8787
8788 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8789
8790         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8791         inadvertantly left behind from my 2003-11-12 change
8792
8793 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8794
8795         Updated headers I neglected to commit yesterday.
8796         * src/SDCClrange.h,
8797         * src/SDCCicode.h
8798
8799 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8800
8801         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8802         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8803         * src/SDCCopt.c (eBBlockFromiCode),
8804         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8805         the creation of the key hash table from the sequencing so it can be used
8806         earlier (for some GCSE bug fixes still pending)
8807
8808 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8809
8810         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8811         * support/regression/tests/addsub.c: testing genPlus shortcut
8812
8813 2003-11-15  Borut Razem <borut.razem AT siol.net>
8814
8815         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8816
8817 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8818
8819         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8820         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8821         ordering is immaterial.
8822         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8823
8824 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8825
8826         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8827         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8828         (SIGSEV) of bug #840381
8829         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8830         unlink new file before rename if new and old filenames are the same)
8831
8832 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8833
8834         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8835         uninitialized variables) for the mcs51. Set environment variable
8836         SDCC_GENRAMCLEAR to test.
8837         xdata initialization slightly shorter
8838
8839 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8840
8841         * src/SDCCsymt.h,
8842         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8843         #838241 & 780691 (basicly the same bug)
8844         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8845         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8846
8847 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8848
8849         * src/SDCCmain.c (linkEdit): "fix" #834252
8850
8851 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8852
8853         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8854         * src/SDCCast.h,
8855         * src/SDCC.y: fixed bug #819403
8856
8857 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8858
8859         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8860         the reentrant attribute.
8861         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8862         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8863         simulation
8864         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8865         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8866         erroneously reduced to a literal.
8867         * src/hc08/ralloc.c (packRegisters, rematStr),
8868         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8869         some cases
8870
8871 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8872
8873         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8874         * doc/sdccman.lyx: changed from 'article' to 'book'
8875         * doc/Makefile: readded test_suite_spec and cdbfileformat
8876
8877 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8878
8879         * device/include/stdlib.h: include malloc.h to comply with ANSI
8880         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8881
8882 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8883
8884         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8885         * doc/clean.mk: also remove *.out files
8886         * doc/sdccman.lyx: some additions, larger top/bottom margins
8887
8888 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8889
8890         * src/SDCC.y: fixed bug #837365
8891         * support/regression/tests/bitopcse.c
8892         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8893         a symbol (might be valop instead)
8894         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8895         * device/lib/clean.mk: added hc08 to the cleaning list
8896
8897 2003-11-04  Borut Razem <borut.razem AT siol.net>
8898
8899         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8900           made 2003-11-04
8901         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8902           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8903           malloc is declared in standard stdlib.h
8904
8905 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8906
8907         * device/lib/hc08/Makefile: need to clean .rel not .o files
8908         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8909
8910 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8911
8912         * src/port.h,
8913         * src/hc08/main.c,
8914         * src/mcs51/main.c,
8915         * src/ds390/main.c,
8916         * src/z80/main.c,
8917         * src/avr/main.c,
8918         * src/pic/main.c,
8919         * src/pic16/main.c,
8920         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8921         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8922         tests (which uses the port's oclsExpense function)
8923         * src/SDCC.y,
8924         * src/SDCCast.c,
8925         * src/SDCCicode.c,
8926         * src/hc08/gen.c,
8927         * src/ds390/gen.c,
8928         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8929
8930 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8931
8932         * src/SDCCcse.c (ifxOptimize),
8933         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8934         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8935         deleting the IFX iCode.
8936         * src/hc08/ralloc.c: reduced unneeded slocs
8937         * src/hc08/gen.c: fixed bug in asmopToBoolean
8938
8939 2003-11-04  Borut Razem <borut.razem AT siol.net>
8940
8941         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8942           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8943           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8944           transferred to configure
8945
8946 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8947
8948         Use headers defined in the C[++] standards:
8949         * sim/ucsim/gui.src/serio.src/fileio.cc
8950         * sim/ucsim/gui.src/serio.src/frontend.cc
8951         * sim/ucsim/gui.src/serio.src/main.cc
8952         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8953         * support/Util/NewAlloc.c
8954         * as/hc08/lklibr.c
8955         * as/mcs51/lklibr.c
8956         * as/z80/aslist.c
8957         * as/z80/assym.c
8958
8959 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8960
8961         * Added MSVC projects for hc08 assembler and linker:
8962         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8963         /as/hc08/link_hc08.dsp
8964
8965 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8966
8967         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8968
8969 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8970
8971         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8972
8973 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8974
8975         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8976
8977 2003-10-31  Borut Razem <borut.razem AT siol.net>
8978
8979         * support/cpp2/cpplib.h,
8980           support/cpp2/cpplib.c,
8981           support/cpp2/cpplex.c,
8982           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8983           to switch _asm block preprocessing on / off. Default is
8984           #pragma preproc_asm +
8985
8986 2003-10-31  Borut Razem <borut.razem AT siol.net>
8987
8988         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8989           when outputting comment blocks (when executed with -C option) and
8990           _asm (SDCPP specific) blocks
8991
8992 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8993
8994         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8995
8996 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8997
8998         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8999
9000 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
9001
9002         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
9003         * src/SDCCast.c (decorateType): fixed bug #832664
9004
9005 2003-10-31  Borut Razem <borut.razem AT siol.net>
9006
9007         * support/cpp2/cpplex.c: fixed for SDCPP:
9008           comments(when executed with -C option) and _asm blocks
9009           were included even if they where in skipped #if block.
9010           Applied solution from GCC cpp 3.3.2
9011
9012 2003-10-31  Borut Razem <borut.razem AT siol.net>
9013
9014         * src/SDCC.lex: sdcc now understands both formats:
9015           '# <line_number> <file_name>' and
9016           '#line <line_number> <file_name>'
9017         * support/cpp2/cppmain.c: sdcpp now generates the standard
9018           '# <line_number> <file_name>' instead of former
9019           '#line <line_number> <file_name>'
9020
9021 2003-10-30  Borut Razem <borut.razem AT siol.net>
9022
9023         * support/cpp2/cpphash.h,
9024         * support/cpp2/cpplib.h
9025         * support/cpp2/cpplex.c,
9026         * support/cpp2/cppmain.c,
9027         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
9028
9029 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9030
9031         Fixed a number of problems revealed by bug #827883.
9032         * src/SDCCloop.c (loopInvariants): Spill location of the
9033         result operand should be recomputed if extracted from
9034         a loop. Also, don't extract assignments of an iTemp
9035         from a literal.
9036         * src/SDCCast.c (isConformingBody): loop reversal should
9037         not occur if the control variable is involved with a
9038         relational operator.
9039
9040 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
9041
9042         * .version: bumped to 2.3.6 to reflect the big improvements
9043         made by Erik and Klaus. Thanks!
9044
9045 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
9046
9047         Replaced the livrange code.
9048         * src/SDCClrange.c: added new LR code
9049         * src/SDCCloop.c,
9050         * src/SDCCBBlock.h: removed remainig parts from old LR code
9051         * src/ds390/ralloc.c,
9052         * src/ds390/gen.c: minor fixes to make it work with new code
9053
9054 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9055
9056         * as/hc08/asm.h,
9057         * as/hc08/lkrloc.c,
9058         * src/hc08/gen.c,
9059         * src/hc08/ralloc.c: Fix various warnings related to the hc08
9060         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
9061         (tweaked fix for bug #818696)
9062
9063 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9064
9065         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
9066
9067 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9068
9069         * src/SDCCmain.c,
9070         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
9071         * src/mcs51/gen.c (gencjneshort),
9072         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
9073         more efficient (per Scott Bronson's suggestion)
9074
9075 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9076
9077         Extended the semantics of the critical keyword to include
9078         individual statements. See RFE #827755 and #799831
9079         * src/SDCC.y
9080         * src/SDCCicode.c
9081         * src/SDCCopt.c
9082         * src/SDCCast.c
9083         * support/Util/SDCCerr.c
9084         * support/Util/SDCCerr.h
9085         * src/mcs51/gen.c
9086         * src/ds390/gen.c
9087         * src/hc08/gen.c
9088
9089 2003-10-19  Borut Razem <borut.razem AT siol.net>
9090
9091         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
9092
9093 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9094
9095         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
9096         Fixed bug #818696
9097         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
9098         and predecrement operand is displayed
9099
9100 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9101
9102         * src/SDCCval.c (valMinus): fixed bug #826041
9103
9104 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9105
9106         Some hc08 related updates that I missed earlier
9107         * sim/ucsim/stypes.h
9108         * support/regression/ports/hc08/spec.mk
9109
9110 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9111
9112         New target "hc08" for the Motorola 68hc08 family of micros
9113
9114         * configure
9115         * configure.in
9116         * Makefile
9117         * src/hc08/*
9118         * src/SDCCmain.c
9119         * src/port.h
9120         * sim/ucsim/hc08.src/*
9121         * sim/ucsim/configure.in
9122         * src/ucsim/configure
9123         * sim/ucsim/packages_in.mk
9124         * as/hc08/*
9125         * as/Makefile
9126         * device/include/mc68hc908qy.h
9127         * device/lib/hc08/*
9128         * device/lib/Makefile.in
9129         * support/regression/ports/hc08/*
9130         * support/regression/Makefile
9131
9132 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9133
9134         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
9135         regression test
9136         * src/ds390/gen.c (genCast): fixed bug #821957
9137
9138 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9139
9140         * device/lib/logf.c: "fixed" overlay bug
9141         * support/regression/ports/host/spec.mk: added m library
9142         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
9143         * support/regression/tests/float_trans: added (for Eric)
9144
9145 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
9146
9147         * src/mcs51/gen.c (genCpl): fixed bug
9148         http://sf.net/mailarchive/message.php?msg_id=6263915
9149
9150 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
9151
9152         * src/SDCCast.c (decorateType): added extended constant folding
9153         * src/SDCCsymt.c (computeType): cleanup
9154         * src/SDCCval.c (valShift): minor optimization
9155         * support/regression/tests/ast_constant_folding.c: added
9156
9157 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9158
9159         * src/SDCCmain.c: removed some unintended changes
9160
9161 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9162
9163         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
9164         * src/z80/gen.c: fixed part of bug #817589
9165         * src/SDCCsymt.c (checkFunction): fixed bug #817895
9166
9167 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
9168
9169         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
9170         * src/SDCCcflow.c
9171         * src/SDCCcse.c
9172         * src/SDCCdflow.c
9173         * src/SDCClabel.c
9174         * src/SDCClrange.c
9175         * src/SDCCmem.c
9176         * src/SDCCopt.c
9177         * src/SDCCpeeph.c
9178         * src/SDCCset.c
9179         * src/avr/ralloc.c
9180         * src/ds390/ralloc.c
9181         * src/izt/ralloc.c
9182         * src/mcs51/ralloc.c
9183         * src/pic/ralloc.c
9184         * src/pic16/ralloc.c
9185         * src/xa51/ralloc.c
9186         * src/z80/ralloc.c
9187         * src/z80/gen.c: removed unused label "release:"
9188
9189 2003-10-06  Borut Razem <borut.razem AT siol.net>
9190
9191         * src/SDCC.lex: removed definition of unused variables
9192           save_optimize and save_options
9193
9194 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
9195
9196         * clean.mk: removed '=' in "-maxdepth=1"
9197         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
9198         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
9199
9200 2003-10-06  Borut Razem <borut.razem AT siol.net>
9201
9202         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
9203           my_unput() replaced by unput()
9204
9205 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
9206
9207         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
9208         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
9209         type-punned pointer will break strict-aliasing rules"
9210         Old LR behaviour is again default; Klaus' LR can be choosen by
9211         defining the environment variable LRKLAUS
9212         * src/SDCCBBlock.h
9213         * src/SDCCloop.c
9214         * src/SDCClrange.c
9215         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
9216         * clean.mk: fixed removal of files in bin/CVS/
9217         * device/lib/clean.mk: fixed removal of directories small and large
9218         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
9219         * src/SDCCicode.c,
9220         * src/SDCCval.c: removed superflous test for pedantic
9221
9222 2003-10-05  Borut Razem <borut.razem AT siol.net>
9223
9224         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
9225           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
9226           message "unmatched #pragma SAVE and #pragma RESTORE"
9227
9228 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9229
9230         * doc/sdccman.lyx: various additions and updates (interrupts, inline
9231           assembly, critical functions, atomic, nojtbound)
9232
9233 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
9234
9235         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
9236         * src/SDCCBBlock.h
9237         * src/SDCCloop.c
9238         * src/SDCCloop.h
9239         * src/SDCClrange.c
9240
9241 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9242
9243         * src/z80/gen.h,
9244         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9245         * src/mcs51/gen.h
9246         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9247         * src/ds390/gen.h
9248         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9249         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
9250         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
9251
9252 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9253
9254         * src/z80/gen.c (genRet): fixed bug #524753
9255         * src/z80/gen.c (genCast): fixed internal error on cast from
9256         pointer to long
9257         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
9258         fix for bug #477835 to the z80
9259         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
9260         for tracking iCodes in the peephole optimizer for z80
9261
9262 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9263
9264         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
9265         the other part of bug #814548
9266         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
9267
9268 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
9269
9270         * src/SDCCcse.c: fixed part of bug #814548
9271
9272 2003-09-28  Borut Razem <borut.razem AT siol.net>
9273
9274         * src/asm.c: rewrite of printILine() to use temporary file instead
9275           a pipe
9276         * src/xa51/main.c: commented out declaration of int rewinds
9277
9278 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9279
9280         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
9281
9282 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9283
9284         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
9285         * src/asm.c (printILine): Fixed bug #811015
9286
9287 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9288
9289         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
9290         freeing.
9291
9292 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9293
9294         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
9295         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
9296         to correctly handle general case of AOP_PAIRPTR
9297         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
9298
9299 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9300
9301         * src/mcs51/ralloc.c (fillGaps),
9302         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
9303         register positioning bug)
9304
9305 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
9306
9307         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
9308
9309 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9310
9311         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
9312         genCodePointerGet, genGenPointerGet, genFarPointerSet,
9313         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
9314         (ralloc doesn't intentionally do this now, but perhaps later)
9315         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
9316         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
9317         register positioning bugs (Fixed bug #762602 and #795325)
9318         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
9319         (Fixed bug #808779)
9320         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
9321         lines that --i-code-in-asm generates
9322
9323 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9324
9325         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
9326         trying to fclose a FILE* that was already closed.
9327
9328 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9329
9330         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
9331         of const struct should be treated as if const themselves)
9332
9333 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
9334
9335         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
9336
9337 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9338
9339         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
9340         Unix (/n) and DOS (/r/n) line terminations.
9341
9342 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9343
9344         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
9345         bug #613775
9346
9347 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9348
9349         * src/mcs51/gen.c (genFunction, genEndFunction),
9350         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
9351         and restore of EA so that stack offsets to parameters are
9352         correct when using both critical and reentrant/stack-auto.
9353         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
9354         size (can be triggered in error if sloc is shared between
9355         different sized objects)
9356         * device/include/float.h: fixed macros to explicitly use
9357         unsigned long where needed
9358
9359 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
9360
9361         Feature req. 799831: added code to allow nesting of critical functions
9362         * src/mcs51/gen.c (genFunction, genEndFunction)
9363         * src/ds390/gen.c (genFunction, genEndFunction)
9364
9365 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9366
9367         * src/SDCCsymt.c (sclsFromPtr),
9368         * src/SDCCsymt.h,
9369         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
9370         support for standard C idiom of memory mapped variables; for
9371         example, *((xdata int*)0x1234) = 1 is now internally equivalent
9372         to xdata int at 0x1234 tempvar = 1.
9373         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
9374         provided by Akiya ISHIDA
9375
9376 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
9377
9378         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
9379         * src/SDCCval.c (constVal): added reduction from int to char
9380         * src/SDCCval.c (valMult, valDiv): fixed sign handling
9381         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
9382         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
9383         to ignore the sign
9384         * support/regression/tests/shifts.c: fixed
9385
9386 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9387
9388         * src/z80/gen.c (genXor): Fixed bug #805445
9389
9390 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9391
9392         Fixed bug #621531 (const & volatile confusion in the type chain).
9393         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
9394         refer to the const or volatile state of the pointer itself.
9395
9396         * src/SDCCast.c
9397         * src/SDCCglue.c
9398         * src/SDCCicode.c
9399         * src/SDCCsymt.c
9400         * src/SDCCval.c
9401         * src/SDCC.y
9402         * src/SDCCsymt.h
9403         * src/pic/gen.c
9404         * src/pic/ralloc.c
9405         * src/pic16/gen.c
9406         * src/pic16/ralloc.c
9407         * support/regression/tests/const.c
9408
9409 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9410
9411         When checking for duplicated modules, use absolute paths
9412         instead of relative paths.  Files changed:
9413
9414         * as/mcs51/lklib.c
9415         * link/z80/lklib.c
9416
9417 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9418
9419         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
9420
9421 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9422
9423         * device/include/string.h: added size_t typedef, changed
9424         prototypes to use size_t, eliminated separate reentrant and
9425         non-reentrant declarations, added _memmove declaration
9426         * device/lib/_memcpy.c: changed to use size_t instead of int,
9427         changed /4 to >>2 to avoid division library call
9428         * device/lib/_memcmp.c,
9429         * device/lib/_memset.c,
9430         * device/lib/_strncat.c,
9431         * device/lib/_strncpy.c,
9432         * device/lib/_strncmp.c: changed to use size_t instead of int
9433         * device/lib/_memmove.c: new file (fixed bug #772294)
9434         * device/lib/Makefile.in: added _memmove.c
9435         * device/lib/z80/asm_strings.s: fixed bug #772290
9436         * support/regression/tests/bitfields.c: attempt to fix host assertion
9437         failure on amd64-unknown-linux2.2
9438
9439 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9440
9441         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
9442         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
9443         * as/z80/asmain.c (main): fixed bug #801766
9444
9445 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
9446
9447         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
9448         compilers
9449
9450 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9451
9452         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
9453         reported in bug #800609
9454
9455 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
9456
9457         * Top header beautifications in src/pic16 directory:
9458           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
9459           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
9460           pcoderegs.h, ralloc.c, ralloc.h
9461         * main.c: added top header and GPL license notice
9462         * pcode.c: fixed the if-conditional warning
9463
9464 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
9465
9466         * device/lib/_mullong.c: replaced int by short for gcc
9467
9468 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9469
9470         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
9471         and JUMPTABLE iCodes properly now (worked by accident before)
9472         * src/mcs51/gen.c (leftRightUseAcc),
9473         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
9474         iCode properly now. Use getSize instead of nRegs since a & b
9475         aren't part of the nRegs tally.
9476
9477 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
9478
9479         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
9480         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
9481           before instructions that use the _STATUS register
9482
9483 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
9484
9485         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
9486         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
9487         fetching of the pointer
9488         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
9489         copied from genNearPointerSet()
9490         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
9491         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
9492         If they pop r0/r1 they must be called in the opposite order than aopOp().
9493         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
9494         (resp. --stack-auto), prepared for --xstack
9495
9496 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9497
9498         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
9499
9500 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9501
9502         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
9503         these ports have their own __sdcc_external_start()
9504
9505 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
9506
9507         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9508         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
9509         type for bits was changed. It resulted in bit variables becoming
9510         global, which is not permitted in PIC 14 assembly output.
9511
9512 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9513
9514         * doc/sdccman.lyx: various additions and updates. Rearranged sections
9515
9516 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9517
9518         Z80 and MCS51 linkers complaint if a public symbol is defined
9519         in more than one library module:
9520
9521         * as/mcs51/lklib.c
9522         * link/z80/lklib.c
9523         * as/mcs51/Makefile.in
9524
9525 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9526
9527         A few small changes that speed up the peephole optimizer.
9528
9529         * src/SDCCpeeph.c
9530
9531 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9532
9533         Try to make the peephole optimizer smarter by maintaining
9534         an association between the assembly source code and the
9535         iCodes that originated them. Put this information to use
9536         with a new peephole rule condition "notVolatile" so that
9537         the rules can be aggressive yet still safe.
9538
9539         * src/SDCCpeeph.c
9540         * src/SDCCpeeph.h
9541         * src/mcs51/gen.c
9542         * src/mcs51/peeph.def
9543
9544 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9545
9546         Fixed bug #741761
9547
9548         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
9549         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
9550         if the left or right operand symbols have the accuse flag set.
9551
9552 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9553
9554         Changed the type of the result of the ! (NOT) operator to char;
9555         previously it returned the same type as the source. This allows
9556         us to eliminate all the genFloatNot functions (all of its target
9557         implementations were very buggy) since !float can use the same
9558         code as !long now.
9559
9560         * src/SDCCicode.c (ast2iCode): ! returns char
9561         * src/mcs51/gen.c (genNot, genNotFloat),
9562         * src/ds390/gen.c (genNot, genNotFloat),
9563         * src/z80/gen.c (genNot, genNotFloat),
9564         * src/pic/gen.c (genNot, genNotFloat),
9565         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
9566
9567 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
9568
9569         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9570         1. Interrupt would not compile properly. Ensure PCLATH register is saved
9571            during interrupts. Ensure WSAVE is located at a shared bank address.
9572         2. Fixed page selection in some places
9573         3. Fixed BTFSS/C to where necessary use registers directly and not simply
9574            the registers name strings.
9575         4. Fixed "signed / unsigned compare" compiler warnings.
9576         5. The PIC port manages its own allocation of the general purpose
9577            registers, but makes no attempt to reuse them. As a result when
9578            compiling it soon runs out of general purpose registers. Some
9579            additional code was added to the files pcode.c and device.c to walk
9580            through the function call tree and rename the registers so that they
9581            get reused.
9582
9583         * src/pic/device.c
9584         * src/pic/gen.c
9585         * src/pic/glue.c
9586         * src/pic/pcode.c
9587         * src/pic/pcode.h
9588         * src/pic/ralloc.c
9589         * src/pic/ralloc.h
9590         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
9591         genPlus() & genMinus() when the result is the same as left or right
9592
9593 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9594
9595         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
9596
9597 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9598
9599         Made bitfield a distinct type from bit so that bitfields
9600         convert as per ANSI C and bits retain their traditional
9601         boolean style behaviour. Implemented bitfield support in
9602         the z80 port.
9603
9604         * src/SDCCsymt.h,
9605         * src/SDCCsymt.c,
9606         * src/SDCCast.c,
9607         * src/cdbFile.c,
9608         * src/mcs51/gen.c,
9609         * src/ds390/gen.c: bit v bitfield split
9610         * src/z80/gen.c: New support for bitfields
9611         * support/regression/tests/bitfields.c: reenabled z80,
9612         added more tests
9613
9614 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9615
9616         Rules 246.x, 247.x relate to bitfields, the others speed up
9617         access to xdata mapped I/O devices.
9618
9619         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
9620
9621 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9622
9623         Cleaned up genPackBits and genUnpackBits and added two helper
9624         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
9625         for literal assignments in genPackBits (thanks to Frieder for
9626         reminding me).
9627
9628         * src/mcs51/gen.c
9629         * src/ds390/gen.c
9630
9631 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9632
9633         Fixed bug #748310 (pointer to function type mishandled when the
9634         function name is omitted). Also fixed a SIGSEGV when a function
9635         attribute (reentrant, etc) is used on a non-function or on a
9636         function but misplaced before the parameter list.
9637
9638         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
9639         bug #748310
9640         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
9641         * support/Util/SDCCerr.h,
9642         * support/Util/SDCCerr.c: Added func attr misuse error msg
9643
9644 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9645
9646         Fixed bug #787649 by anonymous
9647         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
9648         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
9649
9650 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9651
9652         Fixed numerous bitfield problems.
9653
9654         * src/SDCC.y: More bitfield related error checking
9655         * src/SDCCsymt.h,
9656         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
9657         * support/Util/SDCCerr.h,
9658         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
9659         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9660         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9661         * support/regression/tests/bitfields.c: tests added
9662
9663 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9664
9665         Made the constant following the "interrupt" keyword optional. If
9666         omitted, the function will not automatically be given an entry
9667         in the interrupt vector table (similar to #pragma NOIV, but
9668         less syntacticly kludgy). The interrupt number is also now
9669         range checked. Also fixed a bug in the high order bit example
9670         in the manual.
9671
9672         * src/SDCC.y
9673         * src/SDCCmem.c
9674         * src/SDCCglue.c
9675         * src/SDCCsymt.h
9676         * support/Util/SDCCerr.c
9677         * support/Util/SDCCerr.h
9678         * doc/sdccman.lyx
9679
9680 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9681
9682         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
9683         * src/SDCCicode.c (operandOperation): rewritten some ops
9684         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
9685         * src/SDCCsymt.c (computeType): literals are handled the same way as any
9686         other type
9687         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
9688         be re-activated by defining REDUCE_LITERALS)
9689         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
9690         unsigned, but are signed by default
9691         * src/SDCCval.c (constVal): rearranged
9692         * src/SDCCval.c (valMod): preliminary fix
9693         * src/SDCCval.c (valCastLiteral): use TYPE_* types
9694         * support/regression/literalop.c: added, work in progress
9695
9696 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9697
9698         Generate warnings for useless declarations like "char data;"
9699         that don't do what new users expect.
9700
9701         * src/SDCC.y
9702         * support/Util/SDCCerr.h
9703         * support/Util/SDCCerr.c
9704
9705 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9706
9707         * src/SDCCval.c (valMult): fix overflow detection of negative int
9708
9709 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9710
9711         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9712
9713         Changes to support big endian targets:
9714
9715         * src/ports.h
9716         * src/SDCCglue.c
9717         * src/avr/main.c
9718         * src/ds390/main.c
9719         * src/izt/i186.c
9720         * src/mcs51/main.c
9721         * src/pic/main.c
9722         * src/pic16/main.c
9723         * src/xa51/main.c
9724         * src/z80/main.c
9725
9726 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9727
9728         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9729         * device/lib/time.c: fixed warning "integer overflow in expression"
9730
9731 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9732
9733         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9734         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9735         constants are unsigned; added recognition of "u" flag for unsigned
9736         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9737         * src/SDCCval.c (valDiv, valMod): fixed signdness
9738         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9739         signedness of modulo, left and right shift
9740         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9741         * support/Util/SDCCerr.h: added warning W_INT_OVL
9742         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9743         * src/SDCCast.c (ast_print): improved output of constants
9744
9745 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9746
9747         Fixed some warnings when building with MSVC:
9748
9749         * as/mcs51/asdata.c
9750         * as/z80/asdata.c
9751         * as/mcs51/asm.h
9752         * as/z80/asm.h
9753         * link/z80/aslink.h
9754         * link/z80/lkdata.c
9755         * link/z80/lkeval.c
9756         * link/z80/lkgb.c
9757         * link/z80/lkihx.c
9758         * link/z80/lks19.c
9759         * link/z80/lksym.c
9760         * support/cpp2/cpplib.c
9761         * src/ds390/gen.c
9762         * src/mcs51/gen.c
9763
9764 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9765
9766         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9767
9768 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9769
9770         * support/librarian/clean.mk: Do not remove Makefile.
9771         * support/librarian/Makefile: added.
9772
9773 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9774
9775         Added librarian to MSVC build:
9776         * all.dsp
9777         * sdcc.dsw
9778         * support/librarian/librarian.dsp
9779
9780         'configure' not needed for librarian, removed:
9781         * support/librarian/configure
9782         * support/librarian/configure.in
9783         * support/librarian/config_in.h
9784         * support/librarian/Makefile.in
9785
9786         Hopefully these ones built the librarian and the rest of sdcc properly:
9787         * Makefile
9788         * Makefile.common.in
9789
9790         Messed up 'configure', so revert to previous version:
9791         * configure
9792         * configure.in
9793
9794 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9795
9796         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9797         there, while the mantissa of a double is "only" 53 bits wide.
9798
9799 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9800
9801         Adding sdcclib to the build.  MSVC project coming soon.
9802         Files added/changed:
9803
9804         * support/librarian/clean.mk
9805         * support/librarian/configure
9806         * support/librarian/configure.in
9807         * support/librarian/config_in.h
9808         * support/librarian/Makefile.bcc
9809         * support/librarian/Makefile.in
9810         * support/librarian/sdcclib.c
9811         * Makefile.bcc
9812         * Makefile
9813         * Makefile.common.in
9814         * configure
9815         * configure.in
9816
9817 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9818
9819         Linker now complaints if linked modules have conflicting options, for
9820         example, one compiled using --model-large and another one compiled with
9821         --model-small.  The following files were modified:
9822
9823         * as/mcs51/asdata.c
9824         * as/mcs51/aslink.h
9825         * as/mcs51/asm.h
9826         * as/mcs51/asmain.c
9827         * as/mcs51/asout.c
9828         * as/mcs51/i51pst.c
9829         * as/mcs51/lkdata.c
9830         * as/mcs51/lklibr.c
9831         * as/mcs51/lkmain.c
9832         * as/z80/asdata.c
9833         * as/z80/asm.h
9834         * as/z80/asmain.c
9835         * as/z80/asout.c
9836         * as/z80/z80pst.c
9837         * link/z80/aslink.h
9838         * link/z80/lkdata.c
9839         * link/z80/lklibr.c
9840         * link/z80/lkmain.c
9841         * src/SDCCglue.c
9842
9843 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9844
9845         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9846         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9847
9848 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9849
9850         * src/z80/mappings.i: fix _mul[us][int,long] entries
9851
9852 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9853
9854         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9855
9856 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9857
9858         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9859         * support/regression/tests/bitopcse.c: added
9860         fixed warning:
9861         * src/avr/gen.c:
9862         * src/pic/gen.c:
9863         * src/pic16/gen.c:
9864         * src/z80/gen.c:
9865         * src/xa51/gen.c:
9866
9867 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9868
9869         added support for new library format to z80, gbz80 linkers:
9870         *link/z80/aslink.h
9871         *link/z80/lklex.c
9872         *link/z80/lklib.c
9873         *link/z80/lklist.c
9874
9875 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9876
9877         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9878         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9879
9880 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9881
9882         added DUMMY_READ_VOLATILE:
9883         * src/SDCC.y:
9884         * src/avr/gen.c:
9885         * src/xa51/gen.c:
9886         * src/z80/gen.c:
9887         * src/pic/gen.c:
9888         * src/pic16/gen.c:
9889         * src/mcs51/gen.c:
9890         * src/ds390/gen.c:
9891         * src/SDCCcse.c (algebraicOpts): many improvements
9892         * src/SDCCcse.h: removed algebraicOpts()
9893         * src/SDCCicode.c (picDummyRead): added
9894
9895 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9896
9897         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9898         "Insufficient space in data memory".
9899
9900 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9901
9902         * src/mcs51/gen.c: fixed bug #771358
9903         * src/z80/gen.c: fixed bug #759087
9904
9905 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9906
9907         * src/pic16/glue.c: minor cleanup by Vangelis
9908
9909 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9910
9911         * device/include/regc515c.h: fixed #758477
9912         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9913         * device/lib/_gptrput.c: saved a few bytes
9914         * my tab spacing is 8, yours too?)
9915         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9916         * device/lib/serial.c: process RX bytes earlier than TX bytes
9917         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9918
9919 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9920
9921         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9922
9923 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9924
9925     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9926
9927 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9928
9929         * device/lib/Makefile.in: bad fix, reverted to 1.43
9930
9931 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9932
9933         * device/lib/Makefile.in: added missing z80 object files
9934
9935 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9936
9937         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9938         pic16 progress by Vangelis:
9939         * src/SDCCglobl.h:
9940         * src/SDCCmain.c:
9941         * src/pic/Makefile:
9942         * src/pic:
9943         * pic/Makefile:
9944         * pic16/device.c:
9945         * pic16/device.h:
9946         * pic16/gen.c:
9947         * pic16/gen.h:
9948         * pic16/genarith.c:
9949         * pic16/glue.c:
9950         * pic16/main.c:
9951         * pic16/pcode.c:
9952         * pic16/pcode.h:
9953         * pic16/pcodepeep.c:
9954         * pic16/peeph.def:
9955
9956 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9957
9958     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9959
9960 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9961
9962     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9963     added gbz80 build to MSVC project.
9964     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9965     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9966     from 8051 stuff and setup so it links using a .lnk file.
9967
9968 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9969
9970     * support/librarian/sdcclib.c: sdcc librarian.
9971     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9972     with sdcclib.
9973
9974 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9975
9976     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9977
9978 2003-07-02  Borut Razem <borut.razem AT siol.net>
9979
9980         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9981         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9982         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9983         src/xa51/main.c, src/z80/main.c:
9984         virtualization of glue() function: each port has it's own glue function,
9985         which is accessed by do_glue function pointer in PORT.general structure
9986
9987 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9988
9989         * DS800C400 fun, improved ROM interface and tinibios.
9990
9991 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9992
9993         * More support for DS80C400. Now includes beginning of interface to ROM.
9994
9995 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9996
9997         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9998
9999 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10000
10001         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
10002
10003 2003-06-19  Borut Razem <borut.razem AT siol.net>
10004
10005         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
10006
10007 2003-06-19  Borut Razem <borut.razem AT siol.net>
10008
10009         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
10010         fixed Z80 port - crt0.o: cannot open.
10011
10012 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
10013
10014         * support/Util/MySystem.c (merge_command): revert bad fix
10015
10016 2003-06-18  Borut Razem <borut.razem AT siol.net>
10017
10018         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
10019
10020 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10021
10022         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
10023         option --use-stdout sends errors to stdout instead of stderr.
10024
10025 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
10026
10027         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
10028
10029 2003-06-15  Borut Razem <borut.razem AT siol.net>
10030
10031         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
10032         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
10033         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
10034         fixed width array of pointers replaced with sets;
10035         multiple include and lib paths ared transferred to preprocessor and linker
10036         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
10037         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
10038         fixed width array of pointers
10039         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
10040         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
10041         fixupPath(), getPathDifference()
10042         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
10043         fixed width array of pointers
10044
10045 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
10046
10047         * src/pic16/ralloc.c: fix warnings
10048         * src/pic16/pcode.c: fix warning
10049
10050 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
10051
10052          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
10053         know all the details, but essentially this set of changes enable
10054         the pic16 port to generate movff instructions and generate assembler
10055         directives,
10056         * src/SDCCmain.c:
10057         * src/pic16/gen.c:
10058         * src/pic16/glue.c:
10059         * src/pic16/pcode.c:
10060         * src/pic16/device.c:
10061         * src/pic16/main.c:
10062         * src/pic16/pcode.h:
10063         * src/pic16/pcoderegs.c:
10064         * src/pic16/ralloc.c:
10065         * src/pic16/ralloc.h:
10066
10067 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10068
10069         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
10070         added option --vc, so sdcc errors and warnings are compatible with
10071         Microsoft Visual Studio.
10072
10073 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10074
10075         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
10076           device/lib/libfloat.lib: added atof function.
10077
10078 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
10079
10080         * doc/sdccman.lyx: updated to Lyx 1.3
10081         * doc/cdbfileformat.lyx: updated to Lyx 1.3
10082         * doc/test_suite_spec.lyx: updated to Lyx 1.3
10083         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
10084
10085 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
10086
10087         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
10088
10089 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10090
10091         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
10092           additions to the "related tools/documentation" section
10093
10094 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
10095
10096         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
10097
10098 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
10099
10100         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
10101         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
10102
10103 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
10104
10105         * doc/sdccman.lyx: fix double dash and other minor things
10106         * doc/Makefile: fix double dash
10107
10108 2003-05-28  Karl Bongers(patches from Martin Helmling)
10109         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
10110           condition and ignore commands.
10111
10112 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10113
10114         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
10115           is in parts still quite out of date, I did changes as far as I felt makes sense
10116           for a non-native english speaker.
10117           Please feel free to add to the manual or to correct my changes.
10118         * doc/Makefile: undid touching the date of intermediate tex files.
10119
10120 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10121
10122         * doc/sdccman.lyx: Manual has an index now
10123
10124 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
10125
10126         Finalize muluint/mulsint and mululong/mulslong merging:
10127         * device/lib/_mulint.c
10128         * device/lib/_mullong.c
10129         * device/lib/gbz80/mul.s
10130         * device/lib/gbz80/stubs.s
10131         * device/lib/z80/mul.s
10132         * device/lib/z80/stubs.s
10133         * src/SDCCsymt.c (initCSupport)
10134
10135 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10136
10137         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
10138         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
10139           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
10140           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
10141           instead of /Zm500.
10142
10143 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10144
10145         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
10146           the regression tests I'm not brave enough to enable 245.b, 245.c
10147         * doc/sdccman.lyx: added latex preamble for hyperref package.
10148           Using pdflatex this will give you a hyperlinked pdf file with
10149           bookmarks. (prepend '%' before /usepackage if this breaks something)
10150
10151 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10152
10153          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
10154
10155 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
10156
10157         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
10158
10159 2003-05-21    <johan AT balder>
10160
10161         * src/SDCCglue.c (printIval): fixed bug #739934
10162
10163 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10164
10165         Applied patch from bug 737905 (renamed yylineo to mylineno):
10166         * src/altlex.c
10167         * src/SDCCast.c
10168         * src/SDCglobl.h
10169         * src/SDCC.lex
10170         * src/SDCCsymt.c
10171         * src/SDCCval.c
10172         * src/pic16/pcode.c: Cleaned warnings
10173         * src/pic16/pcodeflow.c: Cleaned warnings
10174         * src/pic16/pcoderegs.c: Cleaned warnings
10175
10176 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
10177
10178         * src/pic16/pcode.c: Cleaned warnings
10179         * src/pic16/pcodepeep.c: Cleaned warnings
10180         * src/pic16/ralloc.c: Cleaned warnings
10181
10182 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10183
10184         * doc/sdccman.lyx: fixed bug 739745
10185         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
10186
10187 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
10188
10189         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
10190         it can be defined with CFLAGS when running configure
10191         * src/SDCCmain.c: fixed compiling + linking with object files
10192
10193 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
10194
10195         * configure.in: configure for pic16 port,
10196             added --disable-pic16-port
10197         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
10198         * src/SDCCmain.c: linkOptions is changed to set *,
10199             added if/endif conditional macros to remove options help
10200             messages from optionsTable when a port is not configured, added
10201             support for the PIc16 port in the ports table, when executing
10202             the compiler with no port specified on command line, a default
10203             port is selected with the new macro DEFAULT_PORT which is
10204             defined in port.h, in setDefaultOptions() linkOptions is removed
10205             from initialization assignment, since now it is a set,
10206             parseCmdLine uses setParseWithComma for linkOptions, in
10207             linkEdit() linkOptions are accessed with new function indexSet()
10208             which returns the i'th item of a set variable. See SDCCset.c, in
10209             linkEdit() when calling buildCmdLine(), added linkOptions as
10210             last argument. Now users can pass arguments to gplink via the
10211             -Wl option, main() uses pic16glue() to glue up pic16 programs
10212         * src/SDCCpeeph.c: various changes to support pic16
10213         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
10214             return the i'th item of the set
10215         * src/SDCCset.h: added function prototype for indexSet()
10216         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
10217         * src/clean.mk: added pic16 in CLEANALLPORTS variable
10218         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
10219             added macro DEFAULT_PORT
10220         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
10221         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
10222             generated
10223         * src/pic16/glue.c: commented out some error producing lines
10224         * src/pic16/main.c: __config directives are commented out to stop
10225             gpasm complaining and test the linkage with gplink, _linkCmd and
10226             _asmCmd changed to be more gplink and gpasm friendly
10227         * src/pic16/peeph.def: peep rule 3 is commented out, since it
10228             produced an error when parsed, peep rule 12 is added to utilize
10229             movff, but it is commented out since the pCode does not support
10230             yet a command with 2 address arguments
10231
10232 2003-05-18    <johan AT balder>
10233
10234         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10235         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10236 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
10237
10238         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
10239   Added feature to script commands from file.
10240
10241 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
10242
10243         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
10244         * src/SDCCutil.c: include ctype.h for win32
10245
10246 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
10247
10248         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
10249
10250 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
10251
10252         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
10253   Fixed so you can set breakpoints prior to run, run does not stop
10254   on entry now.  Add tbreak.  Other enhancements and fixes for use
10255   with ddd.
10256
10257 2003-05-12  Borut Razem <borut.razem AT siol.net>
10258
10259         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
10260
10261 2003-05-11  Borut Razem <borut.razem AT siol.net>
10262
10263         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
10264         the path of bin directory, so that PATH is the only env. variable, which has to be set
10265         in case of standard installation.
10266         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
10267         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
10268         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
10269
10270 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10271
10272         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
10273         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
10274         temp files are in the port dir; clean the gen/test directory when
10275         generating new test.c
10276         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
10277         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
10278         * support/regression/tests/zeropad.c: added
10279
10280 2003-05-09    <johan AT balder>
10281
10282         * src/SDCCglue.c: fixed bug #597940
10283
10284 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
10285
10286         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10287   cache sfr, optimize next,step, fix off by one sourceline,
10288   support ddd list function.
10289         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
10290
10291 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10292
10293         * support/regression/HTMLgen.py: added compare_s2f()
10294         * support/regression/Makefile: redo 1.27
10295         * support/regression/generate-cases.py: redo 1.5
10296
10297 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
10298
10299         * support/regression/tests/float.c: workaround 33 bit hex constant
10300         * support/regression/tests/simplefloat.c: fix division for host
10301
10302 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
10303
10304         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
10305         that tame's the PIC's over-aggressive optimizer.
10306
10307 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10308
10309          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
10310          support for MSVC.
10311
10312 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
10313
10314         Initial support for DS80C400. "Hello world" runs on TINIm400
10315         (with polled I/O).
10316
10317 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
10318
10319          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10320          * Some notes on ddd usage added in debugger/README
10321          Martin Helmling adding more features and fixes for ddd GUI debugger.
10322          Code added for nexti, stepi, up, down, and other adjustments.
10323
10324 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
10325
10326         * src/pic/pCodepeep.c non-wildcard asmops are now handled
10327         * src/pic/peeph.def Added two rules to optimize carry manipulation
10328         * src/pic/* removed debug printfs
10329
10330 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
10331
10332         * debugger/mcs51/cmd.c: added header newalloc.h
10333
10334 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
10335
10336         * as/Makefile: new EXEEXT
10337         * as/z80/Makefile: remove trailing slash of BUILDIR
10338         * as/z80/clean.mk: new EXEEXT
10339         * Makefile.common.in: add to CFLAGS (and others), don't replace it
10340         * support/cpp2/Makefile.in: new EXEEXT
10341         * src/pic/glue.c (pic14emitRegularMap): fixed warning
10342
10343 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
10344
10345         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
10346         EXEEXT was introduced to fix all related problems with targets
10347         "clean", "install" and "uninstall"; a couple of further flaws
10348         especially with "clean" have been fixed too
10349         * as/mcs51/Makefile.in
10350         * as/mcs51/clean.mk
10351         * as/z80/Makefile
10352         * Makefile
10353         * clean.mk
10354         * debugger/mcs51/Makefile.in
10355         * debugger/mcs51/clean.mk
10356         * link/z80/Makefile
10357         * link/z80/Makefile.in
10358         * link/z80/clean.mk
10359         * link/Makefile
10360         * packihx/Makefile.in
10361         * packihx/clean.mk
10362         * sim/ucsim/Makefile
10363         * sim/ucsim/clean.mk
10364         * sim/ucsim/avr.src/Makefile.in
10365         * sim/ucsim/avr.src/clean.mk
10366         * sim/ucsim/s51.src/Makefile.in
10367         * sim/ucsim/s51.src/clean.mk
10368         * sim/ucsim/xa.src/Makefile.in
10369         * sim/ucsim/xa.src/clean.mk
10370         * sim/ucsim/z80.src/Makefile.in
10371         * sim/ucsim/z80.src/clean.mk
10372         * sim/ucsim/main_in.mk
10373         * sim/ucsim/packages_in.mk
10374         * sim/ucsim/gui.src/Makefile.in
10375         * sim/ucsim/gui.src/serio.src/Makefile.in
10376         * sim/ucsim/gui.src/serio.src/clean.mk
10377         * src/Makefile.in
10378         * src/clean.mk
10379         * support/cpp2/Makefile.in
10380         * support/cpp2/clean.mk
10381         * support/makebin/Makefile
10382         * support/makebin/clean.mk
10383         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
10384         * doc/sdccman.lyx: --program-suffix no longer needed
10385
10386 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
10387
10388          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
10389          Martin Helmling added support for ddd GUI debugger.
10390          Code added to display assembly, set variables, and other commands
10391          to interface to ddd.
10392
10393 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
10394
10395         * as/Makefile: fix target clean
10396         * as/clean.mk: fix target clean
10397         * as/z80/clean.mk: fix target clean
10398
10399 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
10400
10401         * Makefile.common.in: added  AT EXEEXT AT
10402         * configure.in: removed all mingw32 stuff
10403         * configure: rebuilt from configure.in
10404         * doc/sdccman.lyx: updated section "installation"
10405         * support/scripts/sdcc_mingw32: adapted to configure
10406         * support/scripts/sdcc_cygwin_mingw32: added
10407
10408 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
10409
10410         * src/pic Added object file support for the PIC port
10411         * src/pic Applied patch from Craig Franklin (this started the object file support)
10412         * src/regression Updated the PIC regression tests for object files
10413
10414 2003-04-20  Borut Razem <borut.razem AT siol.net>
10415
10416         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
10417           lklex.c: In function `getfid':
10418           lklex.c:203: warning: array subscript has type `char'
10419         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
10420           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
10421         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
10422           stack handling macros
10423
10424 2003-04-19  Borut Razem <borut.razem AT siol.net>
10425
10426         * "handling space characters in file path" task:
10427         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
10428         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
10429         * support/Util/MySystem.h: make it self-sufficient
10430         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
10431           src/z80/main.c, sdcc/as/mcs51/lklex.c:
10432           handling space characters in file path
10433         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
10434           (it will be used by assemblers, which have their own includes, e.g. gpasm)
10435         * support/Util/MySystem.c: handling space characters in executable's path
10436
10437 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
10438
10439         * as/z80/Makefile: fix permanent rebuild of z80
10440         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
10441         * support/regression/tests/bitfields.c: added Johan's bitfields.c
10442
10443 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
10444
10445         * src/SDCCopt.c: add special case optimization to replace modulo by
10446           a power of two with a bitwise AND.
10447
10448 2003-04-18    <johan AT balder>
10449
10450         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
10451
10452 2003-04-17    <johan AT balder>
10453
10454         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
10455         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
10456
10457 2003-04-13  Borut Razem <borut.razem AT siol.net>
10458
10459         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
10460         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
10461           fixed mingw problem in adl_NORMALIZE_PATH
10462
10463 2003-04-12  Borut Razem <borut.razem AT siol.net>
10464
10465         * fixed "#pragma SAVE/RESTORE can not be nested":
10466         * src/SDCC.lex: reworked pragma handling functions
10467         * sdcc/src/SDCCglobl.h: reworked stack handling macros
10468         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
10469
10470 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10471
10472         * src/SDCCutil.c (pathEquivalent): defined but not used
10473         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
10474         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
10475         * configure: rebuilt from configure.in
10476         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10477         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10478         * device/include/Makefile.in: replace sdcc_datadir
10479         * device/lib/Makefile.in: replace sdcc_datadir
10480         * Makefile.common.in: add LDFLAGS from configure
10481         * packihx/Makefile.in: use LDFLAGS
10482         * src/Makefile.in: use LDFLAGS
10483         * support/cpp2/Makefile.in: add LDFLAGS from configure
10484         * support/makebin/Makefile: use LDFLAGS
10485         * .version: bumped version number to 2.3.5
10486
10487 2003-04-12  Borut Razem <borut.razem AT siol.net>
10488
10489         * completed "different paths" task:
10490         * src/SDCCmacro.c: fixed bug in handling quotes
10491         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
10492         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
10493
10494 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10495
10496         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
10497
10498 2003-04-11 kevin Vigor <kevin AT vigor.nu>
10499
10500         * ds390/gen.c ds390/peeph.def: fix bug 706781
10501
10502 2003-04-11  Borut Razem <borut.razem AT siol.net>
10503
10504         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
10505
10506 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
10507
10508         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
10509         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
10510          set - this bit used to not be set...).
10511         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
10512           bad code in PIC Port
10513         * src/regression/and2.c added to test bug 609268
10514         * src/regression/Makefile added and2.c to regression test
10515
10516
10517 2003-04-08    <johan AT CP255758-A>
10518
10519         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
10520         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
10521         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
10522
10523 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
10524
10525         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
10526         fix bug #487815
10527         * support/cpp2/Makefile.in: fix bug #487815
10528         * configure: rebuilt from configure.in
10529         * Makefile.common.in: docdir changed, new path suffixes
10530         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10531         * sdcc_vc_in.h: reflect changes from sdccconf.h
10532         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
10533         * src/SDCCutil.h: remove BINDIR hack
10534         * doc/sdccman.lyx: update new path hierarchy
10535
10536 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10537
10538         * src/SDCCpeeph.c: added okToRemoveSLOC test
10539
10540 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10541
10542         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
10543
10544 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10545
10546         * src/SDCCpeeph.c: added labelIsReturnOnly test
10547         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
10548
10549 2003-04-05    <johan AT balder>
10550
10551         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
10552         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
10553         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
10554         * src/SDCCast.c: fixed a warning
10555         * src/SDCCast.h: fixed a warning
10556         * src/SDCCicode.c (operandFromAst): fixed a warning
10557
10558 2003-04-04    <johan AT balder>
10559
10560         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
10561         * src/SDCCast.c (decorateType): fixed bug #715076
10562         * src/SDCC.y: fixed bug #702907
10563
10564 2003-04-03    <johan AT balder>
10565
10566         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
10567         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
10568         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
10569         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
10570         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
10571
10572 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
10573
10574         * _decdptr.c: fix return values
10575         * _gptrget.c: fix return values
10576         * _gptrgetc.c: fix return values
10577         * _gptrput.c: fix return values
10578         * _mulint.c: fix return values
10579         * as/z80/Makefile: fix 'make -j' problem
10580
10581 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
10582
10583         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
10584         * configure.in: big cleanup, updated to autoconf 2.5x
10585         * configure: rebuilt from configure.in
10586         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10587         * sdcc_vc_in.h: reflect changes from sdccconf.h
10588         * doc/Makefile: fixed a flaw in "make install"
10589
10590 2003-04-02    <johan AT balder>
10591
10592         * src/ds390/gen.c (genCmp): no comments
10593         * src/mcs51/gen.c (genCmp): no comments
10594         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
10595         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
10596
10597 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
10598
10599         * support/regression/generate-cases.py: place generated file in given sub directory
10600         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
10601         * support/regression/Makefile: improvements for 'make -j';
10602         side effect: it's simpler and faster now
10603
10604 2003-03-31  Borut Razem <borut.razem AT siol.net>
10605
10606         * src/z80/main.c: link-{port} and as-{port} defined without path
10607         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
10608
10609 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
10610
10611         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
10612
10613 2003-03-30  Borut Razem <borut.razem AT siol.net>
10614
10615         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
10616           changed type of list parameter to set
10617         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
10618         * src/port.h: changed type of do_assemble() parameter to set
10619         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
10620           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
10621           definition of "cppoutfilename" macro with NULL value in preProcess()
10622         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
10623         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
10624         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
10625           replaced with set *binPathSet
10626         * shash_add() deallocates the item, if allready exsists, before adding the new one
10627         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
10628
10629 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
10630
10631         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
10632           a nested for loop bug in the PIC port
10633         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
10634           for loops
10635
10636 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
10637
10638         * support/Util/dbuf.h: remove C++ stuff to make it portable
10639
10640 2003-03-28  Borut Razem <borut.razem AT siol.net>
10641
10642         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
10643           literal strings in stringLiteral()
10644         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
10645         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
10646           to the project
10647
10648 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
10649
10650         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
10651
10652 2003-03-26    <johan AT balder>
10653
10654         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
10655         * src/ds390/gen.c (saveRegisters): catched symbol abuse
10656         * src/SDCCast.c (decorateType): fixed " -v < 3"
10657
10658 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
10659
10660         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
10661         Added Lenny Story's debug infrastructure changes:
10662         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
10663         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
10664         * src/cdbFile.c: added
10665         * src/SDCCdebug.c: added
10666         * src/SDCCdebug.h: added
10667         * src/SDCCast.c (createFunction)
10668         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
10669         * src/SDCCmain.c (parseCmdLine, main)
10670         * src/SDCCmem.c (redoStackOffsets)
10671         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
10672         * src/SDCCsymt.h
10673         * src/common.h
10674         * src/avr/gen.c (genAVRCode)
10675         * src/ds390/gen.c (gen390Code)
10676         * src/mcs51/gen.c (gen51Code)
10677         * src/pic/gen.c (genpic14Code)
10678         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
10679         * src/xa51/gen.c (genXA51Code)
10680         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
10681
10682 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10683
10684         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
10685         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
10686
10687 2003-03-22    <johan AT balder>
10688
10689         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
10690
10691 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
10692
10693         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
10694         * doc/cdbfileformat.lyx: added, written by Lenny Story
10695         * doc/Makefile: added cdbfileformat.lyx
10696         * doc/clean.mk: added cdbfileformat.lyx
10697
10698 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
10699
10700         * src/mcs51/peeph.def: fix bug #705773
10701
10702 2003-03-20    <johan AT balder>
10703
10704         An sfr/sbit can have an "at #" AND an initializer
10705         * src/SDCCsymt.c (checkSClass):
10706         * src/SDCCmem.c (allocGlobal):
10707         * src/SDCCmem.c (allocLocal):
10708         * src/SDCCast.c (createBlock):
10709
10710 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10711
10712         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10713
10714 2003-03-16    <johan AT balder>
10715
10716         Undid the hackup of const and volatile, the problem is much bigger
10717         * src/SDCC.y:1.65
10718         * src/SDCCast.c:1.171
10719         * src/SDCCglue.c:1.138
10720         * src/SDCCicode.c:1.146
10721         * src/SDCCsymt.c:1.150
10722         * src/SDCCval.c:1.65
10723
10724 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10725
10726         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10727         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10728
10729 2003-03-13    <johan AT balder>
10730
10731         Hackup const and volatile modifiers in type chains a bit:
10732         * src/SDCC.y:1.63
10733         * src/SDCCast.c:1.169
10734         * src/SDCCglue.c:1.136
10735         * src/SDCCicode.c:1.143
10736         * src/SDCCsymt.c1.146
10737         * src/SDCCsymt.h1.59
10738         * src/SDCCval.c:1.63
10739
10740 2003-03-12    <johan AT balder>
10741
10742         * src/SDCCBBlock.h: more LRH debugging junk
10743         * src/SDCCcflow.h: more LRH debugging junk
10744         * src/SDCCloop.c: more LRH debugging junk
10745         * src/SDCC.y (struct_declaration): fixed bug #697590
10746         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10747         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10748         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10749
10750 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10751         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10752         test function names must now match exactly).
10753         * src/SDCCcse.c: added special case in findCheaperOp to allow
10754         extending a short integer. Makes less awful code for bug 700121 test case.
10755
10756 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10757
10758         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10759         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10760
10761 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10762
10763         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10764         actually called (operandsNotEqual() was called for all
10765         operandsNotEqualX tests).
10766
10767 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10768
10769         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10770         with shorter literals. Fixes bug 700121.
10771
10772 2003-03-11    <johan AT balder>
10773
10774         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10775
10776 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10777
10778         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10779         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10780
10781 2003-03-10  Borut Razem <borut.razem AT siol.net>
10782
10783         * src/SDCCmain.c: pipe preprocessor's output
10784         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10785         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10786         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10787         which closes all pipes in pipeSet set
10788         * src/SDCCset.c: free deleted item in function deleteSetItem()
10789         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10790         moved from z80 to src subproject
10791         * .version: increased version number to 2.3.4
10792
10793 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10794
10795         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10796         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10797         * support/regression/ports/xa51/spec.mk: fix typo
10798
10799 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10800
10801         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10802
10803 2003-03-09  Borut Razem <borut.razem AT siol.net>
10804
10805         * src/SDCCmain.c: pipe preprocessor's output
10806         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10807         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10808         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10809         which closes all pipes in pipeSet set
10810         * src/SDCCset.c: free deleted item in function deleteSetItem()
10811         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10812         moved from z80 to src subproject
10813
10814 2003-03-09  Borut Razem <borut.razem AT siol.net>
10815
10816         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10817         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10818         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10819         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10820         * src/SDCCglobl.h: unification of WIN32 native definitions
10821
10822 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10823
10824         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10825
10826 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10827
10828         * src/configure.in:   check for endianess (even while cross-compiling)
10829         * src/configure:      check for endianess (even while cross-compiling)
10830         * src/configure_in.h: check for endianess (even while cross-compiling)
10831         * src/avr/gen.c:        remove old endianess stuff
10832         * src/mcs51/gen.c:      remove old endianess stuff
10833         * src/ds390/gen.c:      remove old endianess stuff
10834         * src/pic/gen.c:        remove old endianess stuff
10835         * src/pic/genarith.c:   remove old endianess stuff
10836         * src/pic/glue.c:       fix endianess check
10837         * src/pic16/gen.c:      remove old endianess stuff
10838         * src/pic16/genarith.c: remove old endianess stuff
10839         * src/pic16/glue.c:     fix endianess check
10840         * src/xa51/gen.c:       remove old endianess stuff
10841         * src/z80/gen.c:        fix endianess check
10842         * src/SDCCglue.c:       fix endianess check
10843         * src/ds390/peeph.def: fix bug 700036
10844
10845 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10846
10847         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10848         * src/configure: find appropriate data-types on host for SDCC's int and long
10849         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10850         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10851         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10852
10853 2003-03-07    <johan AT balder>
10854
10855         Just a big NOOP:
10856                 some minor cleanups before the big shot
10857                 OP_DEFS and OP_USES now use Kevin's protection
10858                 new option --nolabelopt
10859
10860         * src/SDCCBBlock.c:
10861         * src/SDCCast.c,:
10862         * src/SDCCcflow.c:
10863         * src/SDCCcse.c:
10864         * src/SDCCicode.c:
10865         * src/SDCCicode.h:
10866         * src/SDCClabel.c:
10867         * src/SDCCloop.c:
10868         * src/SDCCmain.c:
10869         * src/ds390/ralloc.c:
10870         * src/mcs51/ralloc.c:
10871         * src/pic/ralloc.c:
10872         * src/xa51/ralloc.c:
10873         * src/z80/ralloc.c:
10874
10875 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10876
10877         * src/pic/pcode.c (get_op): fix 64 bit warnings
10878         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10879         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10880         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10881         * support/regression/tests/malloc.c: fix 64 bit warnings
10882
10883 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10884
10885         * src/mcs51/gen.c (genMinus): fixed bug 696436
10886
10887 2003-03-02  Borut Razem <borut.razem AT siol.net>
10888
10889         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10890
10891 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10892
10893         * configure.in: test for mkstemp
10894         * sdccconf_in.h: add HAVE_MKSTEMP
10895
10896 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10897
10898         * device/include/ctype.h: removed warning while using --stack-auto
10899         * device/include/malloc.h: removed warning while using --stack-auto
10900         * device/include/string.h: removed warning while using --stack-auto
10901
10902 2003-02-23  Borut Razem <borut.razem AT siol.net>
10903
10904         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10905         because NDEBUG is defined (see man assert)
10906         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10907
10908 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10909
10910         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10911         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10912
10913 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10914
10915         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10916         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10917
10918 2003-02-18    <johan AT balder>
10919
10920         * as/mcs51/asmain.c (asmbl): module can start with a digit
10921         * as/z80/asmain.c (asmbl): module can start with a digit
10922
10923 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10924
10925         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10926         * src/asm.c: fix pipe() for Mingw32
10927
10928 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10929
10930         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10931         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10932         make -V work again; --c1mode reads now from stdin
10933         * doc/sdccman.lyx: added --c1mode
10934         * support/Util/SDCCerr.c: new messages for c1 mode
10935         * support/Util/SDCCerr.h: new messages for c1 mode
10936         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10937
10938 2003-02-15    <johan AT balder>
10939
10940         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10941
10942 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10943
10944         * doc/sdccman.lyx: Environment variables, -o and other minor things
10945
10946 2003-02-14    <johan AT balder>
10947
10948         * src/xa51/main.c: before anyone really tries to use it :)
10949
10950         * Install doc's in share/sdcc/doc
10951         * removed some obsolete files
10952         * Do a proper make distclean and uninstall
10953         M Makefile.common.in
10954         R sdccbuild.sh
10955         M as/Makefile
10956         M device/include/Makefile.in
10957         M device/lib/Makefile.in
10958         M doc/sdccman.lyx
10959         M link/Makefile
10960         M sim/ucsim/doc/Makefile.in
10961         M src/clean.mk
10962         R src/avr/peeph.rul
10963         R src/xa51/peeph.rul
10964         M support/cpp2/Makefile.in
10965         M support/makebin/Makefile
10966
10967
10968 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10969
10970         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10971
10972 2003-02-10  Borut Razem <borut.razem AT siol.net>
10973
10974         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10975         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10976         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10977         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10978         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10979         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10980         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10981         src/z80/Makefile.bcc: Borland Makefile cleanup
10982         * as/z80/Makefile.bcc: Added Borland Makefile
10983         * support/cpp2/borland.h: Removed
10984
10985 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10986
10987         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10988         * src/SDCC.lex: new pragma NOIV
10989         * src/SDCCglobl.h: new pragma NOIV
10990         * src/SDCCmem.c: new pragma NOIV
10991
10992 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10993
10994         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10995
10996 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10997
10998         * src/SDCCmain.c: signal handling is switched off by --debug
10999         * doc/Makefile: small fix for install; use clean.mk again
11000         * doc/clean.mk: clean *.pdf and *.html too
11001
11002 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
11003
11004         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
11005         * device/lib/printfl.c: fix a ds390 bug by making it portable
11006         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
11007         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
11008         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
11009         * debugger/mcs51/cmd.c: converted multi-line string literals
11010         * sim/ucsim/globals.cc: converted multi-line string literals
11011         * src/SDCCmain.c: introduced signal handler to remove temp files
11012         * doc/Makefile: small tweaks, implement clean
11013         * doc: removed generated files
11014
11015 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11016
11017         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
11018         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
11019         Address Record is not correctly generated for DS390."
11020
11021 2003-02-02  Borut Razem <borut.razem AT siol.net>
11022
11023         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
11024         * as/mcs51/asm.h: fixed compilation with Borland C
11025         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
11026         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
11027         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
11028         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
11029         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
11030         src/z80/Makefile.bcc: delete $(LIB) only if exist
11031         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
11032
11033 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
11034
11035         * device/include/malloc.h: introduced NULL
11036         * device/include/string.h: introduced NULL
11037         * device/include/stdlib.h: introduced NULL
11038         * device/lib/_memcpy.c: removed NULL
11039         * device/lib/_strcat.c: removed NULL
11040         * device/lib/_strchr.c: removed NULL
11041         * device/lib/_strcmp.c: removed NULL
11042         * device/lib/_strcpy.c: removed NULL
11043         * device/lib/_strcspn.c: removed NULL
11044         * device/lib/_strlen.c: removed NULL
11045         * device/lib/_strncat.c: removed NULL
11046         * device/lib/_strncmp.c: removed NULL
11047         * device/lib/_strncpy.c: removed NULL
11048         * device/lib/_strpbrk.c: removed NULL
11049         * device/lib/_strrchr.c: removed NULL
11050         * device/lib/_strspn.c: removed NULL
11051         * device/lib/_strstr.c: removed NULL
11052         * device/lib/_strtok.c: removed NULL
11053         * device/lib/malloc.c: removed NULL, include own header
11054
11055 2003-02-02    <johan AT balder>
11056
11057         * src/mcs51/ralloc.c (packForPush): fixed bug #631653, maybe other ports need this too? At least now some new alerts in SDCCBBlock.c and SDCCicode.c gives an early warning
11058         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
11059         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
11060         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
11061         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
11062         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
11063
11064 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11065
11066         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
11067         area 'DATA'"
11068
11069 2003-02-01    <johan AT balder>
11070
11071         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
11072
11073 2003-01-31    <johan AT CP255758-A>
11074
11075         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
11076
11077 2003-01-30    <johan AT balder>
11078
11079         * src/SDCCBBlock.c: automatic bug detection
11080         * src/SDCCicode.c: automatic bug detection
11081
11082 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11083
11084         * src/SDCCglobl.h:   now --xram-size 0 works
11085         * src/SDCCmain.c:    now --xram-size 0 works
11086
11087 2003-01-29    <johan AT balder>
11088
11089         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
11090
11091 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11092
11093         * as/mcs51/aslink.h: Added options --xram-size and --code-size
11094         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
11095         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
11096         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
11097         * src/SDCCglobl.h:   Added options --xram-size and --code-size
11098         * src/SDCCmain.c:    Added options --xram-size and --code-size
11099
11100 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
11101
11102         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
11103         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
11104
11105 2003-01-27    <johan AT balder>
11106
11107         * src/SDCC.y: fixed bug #613764
11108
11109 2003-01-26    <johan AT balder>
11110
11111         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
11112         * src/SDCCsymt.h: fixed bug #673374
11113         * src/SDCCglue.c: fixed bug #661910
11114         * src/SDCCast.c: fixed bug #458099 and 673374
11115
11116 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
11117
11118         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
11119         * as/mcs51/strcmpi.h: added
11120         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
11121         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
11122         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
11123         * as/mcs51/assym.c: strcmpi -> as_strcmpi
11124         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
11125         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
11126         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
11127         * as/mcs51/Makefile.aslink: new module strcmpi
11128         * as/mcs51/Makefile.asx8051: new module strcmpi
11129         * as/mcs51/Makefil.bcc: new module strcmpi
11130         * as/mcs51/Makefile.in: new module strcmpi
11131         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
11132
11133 2003-01-26    <johan AT balder>
11134
11135         * src/SDCCglue.c: reverted back to 1.124
11136         * src/SDCCast.c: reverted back to 1.156
11137         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
11138
11139 2003-01-25    <johan AT balder>
11140
11141         * src/SDCCglue.c: A better fix for bug #661910
11142         * src/SDCCast.c: A better fix for bug #661910
11143         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
11144
11145 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11146
11147         * src/Makefile.in: remove spawn.o
11148         * src/SDCCmain.c: remove spawn.h
11149         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
11150         * src/spawn.c: removed
11151         * src/spawn.h: removed
11152         * support/regression/ports/ds390/spec.mk: link with -r
11153
11154 2003-01-24    <johan AT CP255758-A>
11155
11156         * src/ds390/gen.c (aopOp): fixed bug #667458
11157         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
11158         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
11159         (createIvalCharPtr): an ival doesn't always have a storage class anymore
11160
11161 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11162
11163         * src/mcs51/peeph.def: better assembler identation by Frieder
11164         * src/mcs51/gen.c: better assembler identation by Frieder
11165
11166 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
11167
11168         * as/z80/string.h: removed for gcc 3.2
11169         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
11170         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
11171
11172 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11173
11174         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
11175         * src/SDCCpeeph.c (replaceRule): fix bug #663503
11176         * support/regression/Makefile: separate temp files for ports
11177         * support/regression/generate-cases.py: separate temp files for ports
11178         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11179         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11180
11181 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11182
11183         * moved tinitalk to device/examples/ds390
11184
11185 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
11186
11187         * as/mcs51/lkmem.c: rflag is for DS390
11188         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
11189         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
11190                          (linkEdit): move mem- and map-files the same way as ihx-files
11191         * src/z80/main.c (_setDefaultOptions): removed --generic
11192         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
11193         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
11194         * src/pic/glue.c (picglue): --c1mode works again
11195         * src/pic16/glue.c (pic16glue): --c1mode works again
11196         * src/asm.c (printCLine): fix #660034
11197
11198 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
11199
11200         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
11201         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
11202         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
11203         * as/mcs51/lkmem (summary): better fix for sp problem
11204         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
11205         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
11206         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
11207                                               remove --stack-after-data
11208
11209 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
11210
11211         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
11212         * src/SDCCutil.c (join): ugly bug: missing '\0'
11213         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
11214
11215 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11216
11217         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
11218         * src/port.h: typo
11219         * src/pic/main.c (_asmCmd): gpasm supports -o
11220         * src/z80/main.c: more general macros
11221         * device/lib/Makefile.in: remove intermediate files
11222
11223 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11224
11225         * .version: Bumped version number to 2.3.3
11226         * src/SDCCBBlock.c: new option -o
11227         * src/SDCCglobl.h: new option -o
11228         * src/SDCCglue.c: new option -o
11229         * src/SDCCmain.c: new option -o
11230         * src/asm.c: new option -o
11231         * src/ds390/main.c: new option -o
11232         * src/pic/glue.c: new option -o
11233         * src/pic/pcode.c: new option -o
11234         * src/pic/ralloc.c: new option -o
11235         * src/pic16/glue.c: new option -o
11236         * src/pic16/pcode.c: new option -o
11237         * src/pic16/ralloc.c: new option -o
11238         * src/z80/main.c: new option -o
11239         * device/lib/Makefile.in: use -o
11240         * support/regression/ports/ds390/spec.mk: use -o
11241         * support/regression/ports/gbz80/spec.mk: use -o
11242         * support/regression/ports/mcs51/spec.mk: use -o
11243         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
11244         * support/regression/ports/z80/spec.mk: use -o
11245         * support/regression/ports/ucz80/spec.mk: use -o
11246         * support/regression/ports/xa51/spec.mk: use -o
11247         * support/regression/fwk/lib/timeout.c: fix usage string
11248
11249 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
11250         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
11251
11252 2003-01-07    <johan AT balder>
11253
11254         * src/SDCCast.c (decorateType): fixed bug #600035
11255
11256 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
11257         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
11258         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
11259         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
11260         * src/pic/pcode.c: outcommented unused variable to remove warnings
11261         * src/pic/ralloc.c: outcommented unused variable to remove warnings
11262
11263 2003-01-06    <karl AT turbobit.com>
11264         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
11265    regression tests.
11266
11267 2003-01-06    <johan AT balder>
11268
11269         * src/SDCCicode.c: fixed array add
11270
11271 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
11272         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
11273         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
11274
11275 2003-01-04    <johan AT balder>
11276
11277         * src/SDCCval.c (getNelements): fixed the initialized array of structures
11278
11279 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11280         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
11281
11282 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11283         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
11284         * support/regression/tests/bug-524697.c: fit mem usage into 8032
11285
11286 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11287         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
11288
11289 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
11290         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
11291
11292 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
11293         * src/mcs51/main.c: removed {bindir}{sep} from aslink
11294
11295 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11296
11297     * in /sdcc/as/mcs51/ changed these files in order to create an
11298     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
11299     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
11300     following files to include the previous two files: aslink.dsp,
11301     Makefile.aslink, Makefile.bcc, and Makefile.in.
11302
11303     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
11304     .adb instead of .cdb
11305
11306 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11307
11308         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
11309         value from option --iram-size.
11310
11311 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11312
11313         * /sdcc/as/mcs51/lklist.c: added boundary check before using
11314         dram[] array.
11315
11316 2002-09-18    <wiml AT hhhh.org>
11317
11318         * SDCClrange.h: exposed setFromRange() and setToRange()
11319         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
11320           packRegsForAccUse() (bug 542397)
11321         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
11322           multiple times and emitting the fetch operations more than once
11323           added aopGetUsesAcc() function to allow binary operators to
11324           fetch their operands in the correct order; made genMinus() emit
11325           compact code for X = LITERAL - Y
11326
11327 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11328         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
11329         sprintf() in line 1267.
11330
11331 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11332         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
11333         like ports.
11334
11335 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11336         Changes to aslink (All the changes are marked with 'JCF'):
11337
11338         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
11339         summary().
11340
11341         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
11342         area BSEG.  Also moves, if possible, the DATA area down into the internal
11343         ram so more space is available.
11344
11345         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
11346         sflag.
11347
11348         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
11349         not bytes.  Function summary() which creates a memory usage summary
11350         file with extension .mem.  Reports of overlaping stack and small stack
11351         size.  If the space for the stack is less than 16 bytes aslink trows a
11352         warning.
11353
11354         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
11355         the 8051.  Option 'y' for memory summary output file.
11356
11357         Changes to sdcc (All the changes are marked with 'JCF'):
11358
11359         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
11360
11361         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
11362         overlaying area for it (uses RegBankUsed[4]).
11363
11364         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
11365         bank zero as used by default.  By default aslink locates the stack
11366         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
11367         the creation of the .mem file.  Delegates the allocation of data area
11368         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
11369         the begining of the stack area to aslink.
11370
11371         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
11372         glue() in SDCCglue.c creates an area for it.
11373
11374 2002-09-03  Borut Razem <borut.razem AT siol.net>
11375         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
11376         sdcc/src/pic/glue.c:
11377         introduced atexit() handler for teporay files removal in case of
11378         errors, assertions, ...
11379
11380 2002-08-29  Borut Razem <borut.razem AT siol.net>
11381         * sdcc/support/cpp2/auto-host_vc_in.h:
11382         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
11383         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
11384         Maybe there is a similar problem with BORLANDC? It should be checked!
11385
11386         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
11387         corrected improper use of assert: the assignment to clr variable was done inside the assert.
11388         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
11389         was not executed, and the compiler (cl) launched a warning:
11390         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
11391
11392 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
11393         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
11394
11395 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
11396         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
11397
11398         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11399           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
11400           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
11401           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11402           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
11403           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
11404           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
11405         - added Release configuration in VS projects
11406         - review of compiler an linker options
11407         - VC .exe files are generated in bin_vc directory, not to interfere
11408           with binaries generated from other projects (cygwin, mingw, bcc ...)
11409
11410         * sdcc/src/yacc.dsp: added
11411
11412         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
11413         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
11414         and insert the version number definitions from .version
11415
11416         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
11417
11418         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
11419         added - genarate auto-host.h using auto-host_vc_in.h as template
11420
11421         * sdcc/sdcc_vc.h,
11422         removed from CVS, generated automatically
11423
11424 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
11425         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
11426
11427 2002-08-11  Borut Razem <borut.razem AT siol.net>
11428         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
11429
11430 2002-08-10  Borut Razem <borut.razem AT siol.net>
11431         * src/SDCCmain.c (main):
11432         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
11433         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
11434         The consequence was that some temporary files were not removed.
11435
11436         * src/SDCCglue.c:
11437         unification of code in functions tempfilename() and tempfile():
11438         function tempnam() is defined in Visual Studio 6.0 and .NET
11439
11440         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
11441
11442         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11443           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
11444         - removed compiler command line option /WX: Treats all warnings as errors
11445         - update a list of source files, included into the project
11446
11447         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11448           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
11449         changed project type to Generic Project so that can be correcly converted to VS.NET project
11450
11451         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
11452
11453         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
11454
11455         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
11456
11457         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
11458         added return 0 statements after assert() to make compiler happy
11459
11460         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
11461         added newline in the def file to keep MSC compiler satisfied
11462
11463         * sdcc/src/z80/gen.c:
11464         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
11465           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
11466         - solved MSC error in function aopDump()
11467
11468         * sdcc_vc.h: define PREFIX as "\\sdcc"
11469
11470 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
11471         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
11472
11473 2002-06-22  Scott Dattalo <scott AT dattalo.com>
11474         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
11475         - Rewrote the register banking algorithm.
11476         - Added pCode live-range analysis to registers (for now, only non-used and
11477         singly-used registers optimized away)
11478
11479         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
11480
11481         * support/scripts/inc2h.pl Kevin L. Pauba <klpauba AT cox.net> submitted this perl script for converting MicroChip include files into SDCC Pic include files.
11482
11483 2002-05-10  Scott Dattalo <scott AT dattalo.com>
11484         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
11485
11486 2002-04-22  Michael Hope  <michaelh AT vroom>
11487
11488         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
11489
11490         * configure.in (DD_COPT): Added include support required for gbdk.
11491
11492         * .version: Bumped version number just to increase it.
11493
11494         * src/SDCCmain.c: Added -nostdinc to the default options.
11495
11496 2002-04-15  Michael Hope  <michaelh AT vroom>
11497
11498         * device/lib/z80/printf.c (sprintf): Added.
11499
11500         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
11501
11502         * src/z80/peeph.def: Added transpose redundent load rule.
11503
11504         * src/z80/main.c: Added force callee saves for jaune.
11505
11506         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
11507
11508         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
11509
11510 2002-03-28  Johan Knol  <johan AT balder>
11511
11512         * src/SDCCval.c: fixed bug #532436
11513
11514 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11515         * /src/port.h:
11516         Added "char *Processor" field to the port structure.
11517
11518         * /src/SDCCmain.c:
11519         Added -p option. Allows port dependent processor to be specified.
11520
11521         * all ports:
11522         Initialized the new field char *Processor field to NULL in all ports
11523
11524         * /src/pic/*:
11525         Compiler generated registers for interrupt context saving
11526         were not getting allocated.
11527
11528 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
11529
11530         * /src/SDCCast.c:
11531         Fixed left shift. Will promote the left side of a left shift
11532         if a) left shifting more than size of operand or b) when assigned
11533         to something size > size of left side
11534
11535 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11536         * src/pic/*
11537         tons of changes. Register allocation has been
11538         rewritten. Added customization for the various PICs. Flow
11539         analysis is restructured. ...
11540
11541         * src/pic/device.h:
11542         Added
11543
11544         * src/pic/device.c:
11545         Added. device.c is a PIC port hack to accomodate variations
11546         in PIC devices.
11547
11548 2002-03-13  Michael Hope  <michaelh AT vroom>
11549
11550         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
11551
11552 2002-03-04  johanknol  <johanknol AT manik>
11553
11554         * /src/SDCCval.c: fixed
11555
11556         const unsigned char arr[][2] = { { 0, 1 } };
11557         t18.c:1: error: Initializer element is not constant
11558
11559 2002-03-04  bela  <bela AT manik>
11560
11561         * /device/include/mcs51reg.h:
11562         ds89c420 register definition update
11563
11564 2002-03-03    <johan AT FRIJA>
11565
11566         * support/Util/SDCCerr.c: did something, but don't no why anymore
11567
11568         * support/regression/tests/bug-524691.c: made it a little less shy
11569
11570         * src/SDCCast.c (decorateType): fixed bug #524697
11571
11572         * src/SDCCast.c: made some lineno improvements
11573
11574         * src/SDCCval.c (getNelements): changed warning to error
11575
11576         * src/SDCCglue.c (printIvalArray): changed warning to error
11577
11578         * src/SDCCicode.c: fixed a warning for mingw
11579
11580         * src/SDCCast.c (decorateType): fixed the << promotion for ops
11581
11582         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
11583
11584 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
11585
11586         * src/ds390/peeph.def:
11587         Added some more peephole rules
11588
11589         * src/ds390/gen.c: Various fixes & enhancements
11590
11591         * src/SDCClrange.c, src/SDCClrange.h:
11592         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
11593
11594         * src/ds390/ralloc.c:
11595         various fixes & enhancements (ds390) specific
11596
11597         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
11598         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
11599         from rallocs.
11600
11601         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
11602
11603 2002-03-02    <johan AT FRIJA>
11604
11605         * src/SDCCast.c (decorateType): fixed bug #524708
11606
11607         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
11608
11609         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
11610
11611 2002-03-01  Michael Hope  <michaelh AT vroom>
11612
11613         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
11614
11615         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
11616
11617 2002-03-01    <johan AT FRIJA>
11618
11619         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
11620
11621         * src/SDCCast.c (decorateType): fixed bug #524209
11622
11623         * src/SDCCval.c (valNot): fixed bug #524195
11624
11625 2002-02-26    <johan AT balder>
11626
11627         * src/xa51/gen.c: fixed a warning
11628
11629         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
11630
11631         * src/SDCCast.c (decorateType): fixed bug #522534
11632
11633 2002-02-23    <johan AT balder>
11634
11635         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
11636
11637 2002-02-22    <johan AT balder>
11638
11639         * src/SDCCast.c: fixed bug #514865
11640
11641         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
11642
11643 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
11644
11645         * sdcc/src/SDCCloop.c:
11646         Previous fix was not good. basic blocks that have "break" or "return" are
11647         not really partof a loop , but live ranges used in these blocks should
11648         be live thru the entire loop, so set partOfLoop but don't add them to
11649         loop region
11650
11651 2002-02-21    <johan AT FRIJA>
11652
11653         * src/SDCCcse.c: fixed bug #514308
11654
11655 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
11656
11657         * src/SDCCloop.c:
11658         Fixed BUG #519583. If a conditional block ended in a return/break
11659         statement inside a loop, it was not being considered part of the loop.
11660
11661         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
11662
11663 2002-02-10  Karl Bongers <karl AT turbobit.com>
11664
11665         * debugger/*:
11666         Fixed up SDCDB debugger somewhat.  Updated debugger/README
11667         with lots of comments and notes.
11668
11669         * device/examples/test2.c:
11670         Fix bug, "red" variable not being initialized(compiler complained).
11671
11672         * device/examples/Makefile, examples/test3.c:
11673         Add Makefile in device/examples folder, compiles test3.c
11674         for use as a multiple module SDCDB test case.
11675
11676         * sim/ucsim/cmd.src/cmdset.cc:
11677         Took out debug printfs in ucsim "next" command.
11678
11679         * sim/ucsim/xa.src:
11680         Karl and Johan start ucsim XA support.  Most dissassembly working,
11681         about 75% emulation done(plenty of work remaining).
11682
11683         * sim/ucsim/z80.src:
11684         Add Z80 support to ucsim, add test-ucz80 regression test,
11685         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
11686         Notice z80 compiler fails on examples/test3.c/crc code.
11687
11688 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
11689
11690         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
11691         Added support for --parms-in-bank1
11692
11693         * src/ds390/peeph.def:
11694         added a few more peephole optimzations
11695
11696         * src/ds390/main.c:
11697         1) added __builtin_inp & __builtin_outp used to read in data of given length
11698            from a memory mapped port
11699         2) added __builtin_memcmp
11700         3) added __builtin_swapw swap bytes of a short
11701
11702         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11703         1) handle multiple send & receives from register bank1
11704         2) ralloc can now allocate DPTR1 to some liveRanges
11705
11706         * src/SDCCsymt.c, src/SDCCsymt.h:
11707         changes to handle multiple sends & receives
11708
11709         * src/SDCCptropt.h:
11710         added some pointer arithmetic optimization
11711
11712         * src/SDCCptropt.c:
11713         added some pointer arithmetic optimizations but not stable yet so not
11714         called from anywhere (will get this working shortly)
11715
11716         * src/SDCCopt.c: fixed for multiple sends & receives
11717
11718         * src/SDCCmain.c:
11719         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11720         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11721            set preprocessor defines (depending on options)
11722
11723         * src/SDCCicode.c, src/SDCCicode.h:
11724         changes made to handle multiple sends & receives
11725
11726         * src/SDCCglobl.h:
11727         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11728
11729         * src/SDCCcse.c, src/SDCCcse.h:
11730         added function findbackward def (to be used in upcoming optimization)
11731
11732         * src/SDCCcflow.c, src/SDCCcflow.h:
11733         added function returnAtEnd - to determine if a basic block terminates with
11734         a RETURN iCode
11735
11736         * src/SDCCast.c, src/SDCCast.h:
11737         added option parms-in-bank1
11738
11739         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11740         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11741         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11742         adjusted for --parms-in-bank1 option
11743
11744         * device/include/string.h:
11745         donot redefine "reentrant" keyword
11746
11747         * device/include/ds80c390.h: Added some more SFRs
11748
11749 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11750
11751         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11752
11753 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11754
11755         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11756
11757 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11758
11759         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11760
11761 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11762
11763         * Added --xram-movc option
11764
11765 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11766
11767         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11768
11769 2002-01-11  Johan Knol
11770
11771         * Added math lib of Jesus Calvino-Fraga
11772
11773 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11774
11775         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11776         * support/regression/Makefile: new target test-mcs51-stack-auto
11777         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11778
11779 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11780
11781         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11782
11783 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11784
11785         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11786
11787 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11788
11789         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11790
11791         * src/SDCCglue.h: add definition for printIvalChar()
11792
11793 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11794
11795         * src/SDCCast.c: fix #498138 by Johan
11796
11797         * src/SDCCglue.c: fix #498138 by Johan
11798
11799 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11800
11801         * support/regression/Makefile: fix clean
11802
11803         * support/regression/ports/ds390/support.c: fix transmission of last character
11804
11805 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11806
11807         * /sdcc/src/ds390/gen.c:
11808         a) improved computing address of stack variable
11809         b) took out some #if 0 code
11810         c) improved parmBytes adjustment
11811         d) improved genPlusIncr & genMinusIncr
11812         e) genCmp could generate bad code (when left assigned to DPTR)
11813         f) Fixed bug in hasInc
11814
11815         * /sdcc/src/ds390/ralloc.c:
11816         a) packRegsForSupport could mess up live information (Fixed)
11817         b) packRegsDPTRuse could be incorrect for left & right shift
11818
11819         * /sdcc/src/mcs51/ralloc.c:
11820         packRegsForSupport could mess up the live information (Fixed)
11821
11822         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11823
11824         * /sdcc/src/SDCCast.c:
11825         can reverse a loop even if function call is present as long
11826         as the loop control variable is local & is not passed as parameter
11827
11828 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11829
11830         * /sdcc/ChangeLog: *** empty log message ***
11831
11832         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11833         More builtin function additions for TININative
11834
11835         * /sdcc/src/ds390/ralloc.c:
11836         Had broken the regression testsuite
11837
11838         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11839
11840         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11841         Added funcattr hasStackParms will be set for reentrant functions when there
11842         are paramteres on the stack, this helps in minimizing frame pointer generation
11843         typeFromStr can handle function pointers now
11844
11845         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11846         *** empty log message ***
11847
11848 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11849
11850         * /src/ds390/gen.c, /src/ds390/main.c:
11851         More builtin function additions for TININative
11852
11853         * /src/ds390/ralloc.c:
11854         Had broken the regression testsuite
11855
11856         * /src/SDCCast.c: Fixed a bug in dumptree
11857
11858         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11859         Added funcattr hasStackParms will be set for reentrant functions when there
11860         are paramteres on the stack, this helps in minimizing frame pointer generation
11861         typeFromStr can handle function pointers now
11862
11863         * /doc/builtins.txt, /doc/TININative.txt:
11864         *** empty log message ***
11865
11866
11867 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11868
11869         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11870         ALPHA version for -mTININative
11871
11872         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11873         updated to reflect changes in the port structure
11874
11875         * /src/port.h:
11876         added function do_assemble (similar to do_link) if non-null this function
11877         will be called to do assembly (-mTININative) requires a multi command
11878         assembly
11879         added function genAssemblerEnd will be called to generate assembler Epilogue
11880
11881         * /src/SDCCsymt.c:
11882         added _JavaNative to debug info printing
11883
11884         * /src/SDCCmain.c: added option --tini-libid
11885         added port->do_assemble function (-mTININative) has a multi command assemble
11886
11887         * /src/SDCCglue.c: Disabled "constExpr" check
11888         added port->genAssemblerEnd function
11889
11890         * /src/SDCCglobl.h: Added option --tini-libid value
11891
11892         * /src/SDCCast.h:
11893         tookout optimizeCompare from the header (has no external references)
11894
11895         * /src/SDCCast.c: made one more function "static"
11896
11897 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11898
11899         * src/z80/mappings.i: Added z80asm support.
11900
11901         * src/z80/main.c: Added z80asm support on --asm=z80asm
11902
11903         * src/z80/gen.c: Fixed asm portability issues.
11904
11905         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11906
11907         * src/SDCCglue.c (printExterns): Added global/extern split.
11908
11909 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11910
11911         * support/regression/Makefile: added test for mcs51 model large
11912
11913         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11914
11915         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11916
11917 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11918
11919         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11920
11921 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11922
11923         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11924
11925         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11926
11927 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11928
11929         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11930
11931         * support/regression/tests/simplefloat.c: Port to mcs51.
11932
11933 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11934         * support/regression/tests/bug-485362.c: Added.
11935
11936         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11937
11938         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11939
11940         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11941
11942         * src/z80/gen.c (aopDump): Added a dump function.
11943
11944 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11945         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11946
11947         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11948
11949         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11950
11951         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11952
11953         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11954
11955         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11956
11957         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11958
11959         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11960
11961         * support/regression/ports/ds390/support.c: Use tinibios.
11962
11963         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11964
11965 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11966
11967         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11968         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11969
11970         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11971
11972         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11973
11974 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11975
11976         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11977
11978         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11979         (packRegsForIYUse): Created and optimised.
11980
11981 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11982
11983         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11984 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11985
11986         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11987
11988         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11989
11990         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11991
11992 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11993
11994         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11995
11996         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11997
11998 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11999
12000         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
12001
12002         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
12003
12004         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
12005
12006 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
12007
12008         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
12009         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
12010         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
12011
12012         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
12013
12014         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
12015         (genNotFloat): Added.
12016         (genUminusFloat): Added.
12017
12018         * device/lib/z80/Makefile: Added floating pt stubs.
12019
12020         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
12021
12022         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
12023
12024         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
12025
12026 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
12027
12028         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
12029
12030         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
12031
12032         * sdcc/support/regression/Makefile: Add port ds390.
12033
12034         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
12035
12036         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
12037
12038         * sdcc/support/regression/ports/ds390/spec.mk: Added.
12039
12040         * sdcc/support/regression/ports/ds390/support.c: Added.
12041
12042         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
12043
12044         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
12045
12046         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
12047
12048 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12049
12050         * device/include/malloc.h: Added z80 and gbz80 support.
12051
12052         * device/lib/gbz80/heap.s: Added.
12053
12054         * device/lib/z80/heap.s: Added.
12055
12056         * device/lib/malloc.c: Added z80 and gbz80 support.
12057
12058         * support/regression/tests/malloc.c (testMalloc): Added.
12059
12060         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
12061
12062         * support/regression/tests/bug-478094.c: Added.
12063
12064         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
12065
12066 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
12067
12068         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
12069
12070         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
12071
12072         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
12073
12074         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
12075
12076         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
12077
12078 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12079
12080         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
12081
12082 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
12083
12084         * support/regression/tests/bug-477927.c: Added.
12085
12086         * src/z80/peeph.def: Added minor rules.
12087
12088         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
12089
12090         * src/z80/peeph.def: Added jump optimisation modification.
12091
12092 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
12093
12094         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
12095
12096 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
12097
12098         * support/regression/tests/funptrs.c: Added.
12099
12100 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
12101
12102         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
12103
12104 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
12105
12106         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
12107
12108         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
12109
12110         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
12111         (movLeft2ResultLong): Created.
12112
12113         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
12114         (joinPushes): Added.  Joins two char pushes into a word push.
12115
12116 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
12117
12118         * support/cpp2/Makefile.in (install): Added creation of dest dir.
12119
12120         * support/makebin/Makefile (install): Added creation of dest dir.
12121
12122 2001-10-24 Karl Bongers <karl AT turbobit.com>
12123
12124         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
12125
12126 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
12127
12128         * src/z80/ralloc.c: Turned off faulty pack for one use.
12129
12130         * src/z80/peeph-gbz80.def: Removed redundent restart options.
12131
12132         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
12133
12134 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
12135
12136         * support/regression/Makefile: Improved clean
12137
12138         * support/regression/ports/gbz80/spec.mk: Added clean
12139
12140         * support/regression/ports/host/spec.mk: Added clean
12141
12142         * support/regression/ports/z80/spec.mk: Added clean
12143
12144         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
12145
12146         * support/regression/ports/mcs51/timeout.c: little improvements
12147
12148 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
12149
12150         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
12151
12152         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
12153
12154         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
12155
12156 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
12157
12158         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
12159
12160         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
12161
12162 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
12163         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
12164
12165         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
12166
12167         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
12168
12169         * src/mcs51/main.c (_linkCmd): Added bin path to command.
12170
12171         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
12172
12173         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
12174
12175         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
12176
12177         * support/regression/tests/longor.c: Added.
12178
12179 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
12180
12181         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
12182
12183         * as/mcs51/aslink.h: define PATH_MAX
12184
12185         * as/mcs51/asm.h: define PATH_MAX
12186
12187         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
12188
12189         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
12190
12191         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
12192
12193         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
12194
12195         * src/SDCCglobl.h: define PATH_MAX
12196
12197         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
12198
12199         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
12200
12201 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
12202
12203         * src/z80/gen.c (gencjneshort): Fixed
12204
12205         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
12206
12207 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
12208
12209         * support/regression/tests/bug-469671.c: Added.
12210
12211         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
12212
12213 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
12214
12215         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
12216
12217         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
12218
12219 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
12220
12221         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
12222
12223         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
12224
12225         * src/device/lib/_mullong.c : removed hint: nooverlay bug
12226
12227         * src/device/lib/_divuint.c : removed hint: nooverlay bug
12228
12229         * src/device/lib/_divulong.c: removed hint: nooverlay bug
12230
12231         * src/device/lib/_moduint.c : removed hint: nooverlay bug
12232
12233         * src/device/lib/_modulong.c: removed hint: nooverlay bug
12234
12235 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
12236
12237         * src/z80/gen.c (setupPair): Added 'extended stack' support for the z80.  Can now have local variables or parameters of more than 127 bytes in size.  Increadibly slow, but it will work.  Currently anything involving the carry flag.
12238
12239         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
12240
12241         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
12242
12243 2001-10-07    <johan AT FRIJA>
12244
12245         * device/lib/gets.c (gets): fixed the return value.
12246
12247 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
12248         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
12249
12250         * src/SDCCpeeph.c (peepHole): Fixed all leaks.  Added trace support for freeing lines.  Optimised restart logic to re-run instead of restart.  Now compiles dscan.c on ~60MB instead of ~200MB.
12251
12252         * support/Util/NewAlloc.c: Added ability to use libgc instead of malloc.  Added Safe_free and Safe_strdup.  Added trace support where you can log allocations and free all at once.
12253
12254         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
12255
12256         * src/pic/gen.c: Removed Safe_strdup.
12257
12258         * configure.in: Added option to enable libgc support.
12259
12260         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
12261         (bitVectUnion): Optimised.
12262         (bitVectIntersect): Optimised.
12263         (bitVectBitsInCommon): Optimised.
12264         (bitVectCplAnd): Optimised.
12265
12266         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
12267
12268 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12269
12270         * src/SDCCmain.c: distinguish between assembler debug and plain options
12271
12272         * src/avr/main.c:   remove standard assembler options
12273
12274         * src/ds390/main.c: remove standard assembler options
12275
12276         * src/mcs51/main.c: remove standard assembler options
12277
12278         * src/port.h: removed "PENDING" comment
12279
12280 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12281
12282         * src/device/lib/_mulint.c  : new, with assember functions
12283
12284         * src/device/lib/_mullong.c : new, with assember functions
12285
12286         * src/device/lib/_divuint.c : with assember functions
12287
12288         * src/device/lib/_divsint.c : with assember functions
12289
12290         * src/device/lib/_divulong.c: with assember functions
12291
12292         * src/device/lib/_divslong.c: with assember functions
12293
12294         * src/device/lib/_moduint.c : with assember functions
12295
12296         * src/device/lib/_modsint.c : with assember functions
12297
12298         * src/device/lib/_modulong.c: with assember functions
12299
12300         * src/device/lib/_modslong.c: with assember functions
12301
12302         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
12303
12304         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
12305
12306         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
12307                                       replaced _mululong.c and _mulslong.c by _mullong.c
12308
12309 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12310
12311         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
12312
12313 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12314
12315         * src/SDCCglue.c: test, if win32api is available for MINGW
12316
12317 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12318
12319         * src/SDCCsymt.c: no more _modifier in printTypeChain()
12320         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
12321         * support/regression/ports/gbz80/spec.mk: removed GENERIC
12322         * support/regression/ports/host/spec.mk: removed GENERIC
12323         * support/regression/ports/mcs51/spec.mk: removed GENERIC
12324         * support/regression/ports/z80/spec.mk: removed GENERIC
12325
12326 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
12327
12328         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
12329
12330         * support/regression/tests/bug-467035.c: Created.
12331
12332 2001-10-01    <johan AT FRIJA>
12333
12334         * src/SDCC.y: fixed bug #466586 part 1
12335
12336 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
12337
12338         * SDCCicode.c: z80 has no generic pointers
12339         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
12340
12341 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
12342
12343         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
12344
12345 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
12346
12347         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
12348
12349         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
12350
12351 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
12352
12353         * configure.in: Fixed up so that ucsim is only configured once.
12354
12355         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
12356
12357         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
12358         (getPathDifference): As above.
12359
12360         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
12361
12362         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
12363
12364 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
12365         * .version: Updated to 2.3.1
12366
12367         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
12368         Added copyright header.
12369
12370         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
12371         (assemble): Added support for macro based assembler commands.
12372         (linkEdit): Added support for macro based linker commands.
12373         (preProcess): Changed the pre-processor to use macros.
12374         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
12375         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
12376
12377         * device/lib/z80/crt0.s: Added module name for debugging.
12378
12379 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
12380
12381         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12382
12383         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
12384
12385         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
12386
12387         * src/Makefile.in: Added SDCCmacro and SDCCutil
12388
12389 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
12390
12391         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12392
12393 2001-09-16    <johan AT FRIJA>
12394
12395         * support/Util/SDCCerr.c: fixed up the error/warning/info database. I only changed the E_ W_ I_ prefix to what SDCCerr.c says it is.
12396
12397 2001-09-15    <johan AT FRIJA>
12398
12399         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
12400         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
12401
12402 2001-09-11    <johan AT FRIJA>
12403
12404         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
12405
12406 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
12407
12408         * support/regression/tests/bug-460444.c: Added test case.
12409
12410         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
12411         (genCast): Added justification for all of the asserts.
12412
12413 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
12414
12415         * support/regression/support.c: _xdata replaced by xdata
12416
12417         * support/regression/spec.mk: removed _generic
12418
12419 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
12420
12421         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
12422
12423         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
12424         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
12425
12426         * src/z80/peeph.def: Added a rule to optimise shift then compare.
12427
12428         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
12429
12430         * support/regression/tests/bug-460010.c: Added test case.
12431
12432         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
12433
12434 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
12435
12436         * support/regression/Makefile: inter-port-clean adjusted for mcs51
12437
12438         * support/regression/testfwk.c: removed workaround for bug #436344
12439
12440         * support/regression/tests/bp.c: use less memory with mcs51
12441
12442         * support/regression/tests/bug-441448.c: use less memory
12443
12444         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
12445
12446         * support/regression/collate-results.py: typo
12447
12448 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
12449
12450         * support/regression/tests/fetchoverlap.c: Added new test case.
12451
12452         * support/regression/tests/bp.c: Added new test case.
12453
12454         * support/regression/tests/bug-448984.c: Added new test case.
12455
12456         * support/regression/tests/pow2shifts.c: Added new test case.
12457
12458         * src/z80/gen.c: Turned off the noise it normally generates for the release.
12459         (genlshTwo): Fixed right shift for count > 8.
12460
12461         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
12462
12463 2001-09-08    <johan AT FRIJA>
12464
12465         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
12466
12467 2001-09-07    <johan AT FRIJA>
12468
12469         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
12470
12471         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
12472
12473 2001-09-06    <johan AT FRIJA>
12474
12475         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
12476         * bernhard noted me at this: "() equals to (void)" (1.38)
12477
12478 2001-09-05    <johan AT FRIJA>
12479
12480         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
12481
12482 2001-09-04    <johan AT FRIJA>
12483
12484         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
12485
12486
12487 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
12488
12489         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
12490
12491 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
12492
12493         * link/z80/aslink.h: Fixed path for PATH_MAX
12494
12495 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
12496
12497         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
12498
12499         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
12500
12501         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
12502
12503         * src/z80/gen.c (genUminus): Fixed add, sub, and uminus on the gbz80 port for longs.  Had to shift some functions about to do it.
12504
12505 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
12506
12507         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
12508         (genCmp): Fixed up genCmp for the GB with longs.
12509
12510         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
12511
12512         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
12513
12514         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
12515
12516         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
12517
12518 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
12519
12520         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
12521
12522 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
12523
12524         * device/lib/gbz80/crt0.s (init): Fixed up support for the gbz80 such that it will at least run (and fail badly) the regression tests.
12525
12526         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
12527
12528 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
12529
12530         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
12531
12532         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
12533
12534 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
12535
12536   * sim/ucsim/configure:    little improvement of Cygwin-detection
12537   * sim/ucsim/configure.in: little improvement of Cygwin-detection
12538   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
12539   * support/regression/tests/bug-221100.c: small changes for mcs51
12540   * support/regression/tests/bug-221168.c: small changes for mcs51
12541   * support/regression/tests/bug-227710.c: small changes for mcs51
12542   * support/regression/tests/staticinit.c: small changes for mcs51
12543   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
12544   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12545   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12546
12547 $Revision$