* as/link/z80/lkarea.c: essentially reverted lnksect() to #4380 which
[fw/sdcc] / ChangeLog
1 2006-10-02 Maarten Brock <sourceforge.brock AT dse.nl>
2
3         * as/link/z80/lkarea.c: essentially reverted lnksect() to #4380 which
4           fixes bug 1566015
5
6 2006-10-01 Maarten Brock <sourceforge.brock AT dse.nl>
7
8         * src/pic16/glue.c (pic16emitMaps),
9         * src/pic/glue.c (pic14emitMaps): hopefully fixed bug 1568779
10         * device/lib/gets.c: fixed bug 1568829,thanks Philipp Krause
11         * device/lib/pic16/libc/string/memcpypgm2ram.c,
12         * device/lib/pic16/libc/string/memcpyram2ram.c: fixed bug 1568836, thanks
13           Philipp Krause
14         * as/mcs51/asmain.c (asmbl, newdot): fixed problems with absolute areas
15         * as/link/mcs51/lkmem.c (summary2): reverted, do do count abs segments
16
17 2006-09-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
18
19         * support/librarian/sdcclib.c: Added option -l.
20         * as/link/mcs51/lkmem.c: don't use absolute segments to compute memory
21           usage totals.
22         * device/lib/make51lib.bat: added.  Allows building mcs51 libraries easily
23           using Windows command prompt.
24
25 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
26
27         * device/lib/libsdcc.lib: added module rand
28         * src/ds390/ralloc.c (rematStr),
29         * src/hc08/ralloc.c (rematStr),
30         * src/mcs51/ralloc.c (rematStr),
31         * src/z80/ralloc.c (rematStr): made output more consistent
32         * src/mcs51/gen.c: cosmetic changes
33
34 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
35
36         * src/port.h: added mem.cabs_name to PORT
37         * src/ds390/main.c,
38         * src/hc08/main.c,
39         * src/mcs51/main.c,
40         * src/pic16/main.c,
41         * src/pic/main.c,
42         * src/xa51/main.c,
43         * src/z80/main.c: added cabs_name initializers
44         * src/SDCCglue.c (emitStaticSeg): allocate and initialize absolute
45           constants
46           (emitMaps): emit absolutes in code memory into cabs_name
47         * src/SDCCmem.c,
48         * src/SDCCmem.h: added memory map c_abs and defined CABS_NAME
49         * src/ds390/gen.c (genCodePointerGet): fixed bug if left is a literal
50         * support/regression/fwk/include/testfwk.h: added define for at
51         * support/regression/tests/absolute.c: added, new
52
53 2006-09-29 Maarten Brock <sourceforge.brock AT dse.nl>
54
55         * src/mcs51/gen.c (genPlusIncr, genMinusDec, genAddrOf): small
56           optimizations, see also patch 887161 by Stas Sergeev
57         * src/mcs51/peeph.def(104, 207, 209, 212): disabled as they do not seem
58           to be necessary anymore,
59           (102, 103, 104, 127): renamed all occurances of bp to _bp
60
61 2006-09-27 Maarten Brock <sourceforge.brock AT dse.nl>
62
63         * device/include/mcs51/at89c51snd1c.h: fixed MSK_SREQ definition
64           thanks Weston T. Schmidt for patch 1555221
65         * src/mcs51/peeph.def: renamed rule 257 to 257.a, added 257.b
66         * src/SDCCicode.c(geniCodeMultiply): small optimization
67
68 2006-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
69
70         * device/include/stdlib.h: added rand prototypes
71         * device/lib/rand.c: new, added
72         * device/lib/Makefile.in: added rand.c
73         * src/z80/peeph.def,
74         * src/z80/peeph-gbz80.def,
75         * src/z80/peeph-z80.def: updated conditonals, fixed bug 1565908
76
77 2006-09-20 Raphael Neider <rneider AT web.de>
78
79         * device/lib/pic16/libio/i2c/i2cnack.c (i2c_nack): fixed ACKDT bit
80
81 2006-09-19 Maarten Brock <sourceforge.brock AT dse.nl>
82
83         * as/link/aslink.h: cosmetic changes
84         * as/link/mcs51/Makefile.in,
85         * as/link/z80/Makefile.in: fixed build on CF where VPATH is used
86
87 2006-09-17 Maarten Brock <sourceforge.brock AT dse.nl>
88
89         * as/link/aslink.h,
90         * as/link/mcs51/aslink.h,
91         * as/link/z80/aslink.h: merged and moved to as/link/
92         * as/link/lkstore.c,
93         * as/link/mcs51/lkstore.c: moved to as/link/
94         * as/link/clean.mk: remove *.o
95         * as/link/mcs51/alloc.h: deleted
96         * as/link/mcs51/lkarea.c: added lnksect prototype
97         * as/link/mcs51/lkdata.c,
98         * as/link/mcs51/lklex.c,
99         * as/link/mcs51/lkmain.c: renamed as_getline to lk_getline
100         * as/link/mcs51/lkmem.c,
101         * as/link/mcs51/lknoice.c: removed include strcmpi.h
102         * as/link/mcs51/lksym.c: include stdlib.h instead of malloc.h or alloc.h
103         * as/link/mcs51/aslink.dsp,
104         * as/link/mcs51/Makefile.aslink,
105         * as/link/mcs51/Makefile.bcc,
106         * as/link/mcs51/Makefile.in: updated for moved files
107         * as/link/z80/lkarea.c,
108         * as/link/z80/lkhead.c,
109         * as/link/z80/lklex.c,
110         * as/link/z80/lklibr.c,
111         * as/link/z80/lklist.c,
112         * as/link/z80/lkmain.c,
113         * as/link/z80/lkrloc.c,
114         * as/link/z80/lksym.c: synced with mcs51
115         * as/link/z80/lkdata.c,
116         * as/link/z80/lkeval.c,
117         * as/link/z80/lkihx.c,
118         * as/link/z80/lks19.c: cosmetic changes
119         * as/link/z80/Makefile.in,
120         * as/link/z80/linkgbz80.dsp,
121         * as/link/z80/linkz80.dsp: updated for moved files
122
123 2006-09-16 Borut Razem <borut.razem AT siol.net>
124
125         * debugger/mcs51/sdcdb.c: partially fixed
126           [ 1203664 ] sdcdb fails to open files w. two "." periods
127         * debugger/mcs51/simi.c, debugger/mcs51/symtab.c,
128           debugger/mcs51/symtab.h: fixed indenting
129         * configure.in, configure: up to date with latest Maarten's changes
130
131 2006-09-15 Maarten Brock <sourceforge.brock AT dse.nl>
132
133         as/link/mcs51
134         as/aslink.dsp,                  as/link/mcs51/aslink.dsp,
135         as/link/mcs51/aslink.h,         as/mcs51/aslink.h,
136         as/link/mcs51/aslink.mak,       as/mcs51/aslink.mak,
137         as/link/mcs51/lkaomf51.c,       as/mcs51/lkaomf51.c,
138         as/link/mcs51/lkarea.c,         as/mcs51/lkarea.c,
139         as/link/mcs51/lkdata.c,         as/mcs51/lkdata.c,
140         as/link/mcs51/lkeval.c,         as/mcs51/lkeval.c,
141         as/link/mcs51/lkhead.c,         as/mcs51/lkhead.c,
142         as/link/mcs51/lkihx.c,          as/mcs51/lkihx.c,
143         as/link/mcs51/lklex.c,          as/mcs51/lklex.c,
144         as/link/mcs51/lklibr.c,         as/mcs51/lklibr.c,
145         as/link/mcs51/lklist.c,         as/mcs51/lklist.c,
146         as/link/mcs51/lkmain.c,         as/mcs51/lkmain.c,
147         as/link/mcs51/lkmem.c,          as/mcs51/lkmem.c,
148         as/link/mcs51/lknoice.c,        as/mcs51/lknoice.c,
149         as/link/mcs51/lkrloc.c,         as/mcs51/lkrloc.c,
150         as/link/mcs51/lks19.c,          as/mcs51/lks19.c,
151         as/link/mcs51/lkstore.c,        as/mcs51/lkstore.c,
152         as/link/mcs51/lksym.c,          as/mcs51/lksym.c,
153         as/link/mcs51/Makefile.aslink,  as/mcs51/Makefile.aslink,
154         as/link/mcs51/alloc.h,
155         as/link/mcs51/clean.mk,
156         as/link/mcs51/conf.mk,
157         as/link/mcs51/Makefile.bcc,
158         as/link/mcs51/Makefile.in,
159         as/link/mcs51/readme.390,
160         as/link/mcs51/strcmpi.c,
161         as/link/mcs51/strcmpi.h,
162         as/mcs51/clean.mk,
163         as/mcs51/Makefile.bcc,
164         as/mcs51/Makefile.in,
165         configure,
166         Makefile.in,
167         sdcc.dsw: moved mcs51 linker to as/link/mcs51
168
169 2006-09-14 Maarten Brock <sourceforge.brock AT dse.nl>
170
171         * as/link,
172         * as/link/Makefile.in,
173         * as/link/z80/linkgbz80.dsp,
174         * as/link/z80/linkz80.dsp,
175         * configure,
176         * link,
177         * link/clean.mk,
178         * link/Makefile.in,
179         * link/README,
180         * link/z80,
181         * link/z80/aslink.h,
182         * link/z80/clean.mk,
183         * link/z80/conf.mk,
184         * link/z80/linkgbz80.dsp,
185         * link/z80/linkz80.dsp,
186         * link/z80/lkarea.c,
187         * link/z80/lkdata.c,
188         * link/z80/lkeval.c,
189         * link/z80/lkgb.c,
190         * link/z80/lkgg.c,
191         * link/z80/lkhead.c,
192         * link/z80/lkihx.c,
193         * link/z80/lklex.c,
194         * link/z80/lklibr.c,
195         * link/z80/lklist.c,
196         * link/z80/lkmain.c,
197         * link/z80/lkrloc.c,
198         * link/z80/lks19.c,
199         * link/z80/lksym.c,
200         * link/z80/Makefile.in,
201         * Makefile.in,
202         * sdcc.dsw: moved link/ to as/link/
203
204 2006-09-11 Maarten Brock <sourceforge.brock AT dse.nl>
205
206         * as/mcs51/i51mch.c (machine): fixed warning
207
208 2006-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
209
210         * as/mcs51/i51mch.c (machine): S_DJNZ fixed bug 1554318
211
212 2006-09-09 Borut Razem <borut.razem AT siol.net>
213
214         * debugger/mcs51/sdcdb.c, debugger/mcs51/simi.c:
215           sdcdb WIN32 native port
216         * src/clean.mk: fixed
217
218 2006-09-08 Borut Razem <borut.razem AT siol.net>
219
220         * doc/sdccman.lyx: SDCDB and ucSim are available on Win32 platforms.
221
222 2006-09-08 Raphael Neider <rneider AT web.de>
223
224         * src/pic16/main.c (_pic16_linkEdit,pic16_linkCmd),
225         * src/pic/main.c(_pic14_do_link, linkCmd): pass "-w" and "-r"
226             to gplink to disable processor mismatch warning and to allow
227             the use of devices with only aliased (shared) memory banks,
228           (_pic16_genAssemblerPreamble): include pXXX.inc on --mplab-comp
229
230 2006-09-07 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
231
232         * doc/sdccman.lyx: Some re-formating plus example on using
233           #pragma preproc_asm +/-
234
235 2006-09-07 Borut Razem <borut.razem AT siol.net>
236
237         * support/scripts/sdcc.nsi: added SDCDB executables in a separate
238           section
239
240 2006-09-06 Borut Razem <borut.razem AT siol.net>
241
242         * support/scripts/sdcc.nsi: fixed Error: unterminated string parsing
243           line at sdcc.nsi:153
244         * sdcc/debugger/mcs51/simi.c: argsToCmdLine() fixes
245
246 2006-09-05 Borut Razem <borut.razem AT siol.net>
247
248         * configure.in, configure: support for winsock2
249         * debugger/mcs51/break.h, debugger/mcs51/cmd.c,
250           debugger/mcs51/cmd.h, debugger/mcs51/sdcdb.c,
251           debugger/mcs51/sdcdb.h, debugger/mcs51/simi.c,
252           debugger/mcs51/simi.h, debugger/mcs51/symtab.c,
253           debugger/mcs51/symtab.h: sdcdb WIN32 native port
254
255 2006-09-05 Maarten Brock <sourceforge.brock AT dse.nl>
256
257         * src/SDCCopt.c (cnvToFcall): fixed bug 1551947 by updating OP_USES
258           and OP_DEFS
259         * support/regression/tests/bug1551947.c: new, added
260         * src/SDCCsymt.h: strings are char* not byte*
261
262 2006-09-05 Raphael Neider <rneider AT web.de>
263
264         * device/lib/pic16/libdev/pic18f4550.c,
265           device/include/pic16/pic18f4550.h: added PORTD/TRISD
266             declarations/definitions from patch #1520949
267
268 2006-09-05 Raphael Neider <rneider AT web.de>
269
270         * src/pic16/gen.c (genPackBits): fix assignment to 8-bit,
271           byte-aligned bitfields, fixes #1539278
272
273 2006-09-05 Raphael Neider <rneider AT web.de>
274
275         * src/pic/gen.c (genReceive): skip unreferenced arguments,
276           fixes #1544120
277
278 2006-09-04 Borut Razem <borut.razem AT siol.net>
279
280         * support/scripts/sdcc.nsi: move ucSim executables to a separate section
281         * support/scripts/sdcc_cygwin_mingw32: don't disable ucsim,
282           -mno-cygwin is a part of the compiler name
283         * support/scripts/sdcc_mingw32: don't disable ucsim
284
285 2006-09-03 Borut Razem <borut.razem AT siol.net>
286
287         * sdcc.spec: corrected for 2.6.0. Thanks to Christer Weinigel.
288         * device/lib/Makefile.in device/lib/clean.mk: small but essential corrections
289
290 2006-09-03 Raphael Neider <rneider AT web.de>
291
292         * src/pic/ralloc.c,
293         * src/pic/pcode.c (InitReuseRegs): allocate registers with pseudo
294           indices >= 0x1000 to disambiguate them from fixed regs __at(addr),
295           fixes #1550049
296
297 2006-09-01 Borut Razem <borut.razem AT siol.net>
298
299         * sim/ucsim/cmd.src/cmdutil.cc: #include <sys/time.h> and <unistd.h>
300           to make ppc-osx happy
301
302 2006-08-31 Borut Razem <borut.razem AT siol.net>
303
304         * sim/ucsim/cmd.src/newcmdposix.cc: #include <assert.h>
305         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
306         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
307         * support/regression/ports/ds390/spec.mk,
308           support/regression/ports/mcs51/spec.mk,
309           support/regression/ports/xa51/spec.mk: introduced DEV_NULL variable.
310           To run regression tests in mingw environment:
311           make DEV_NULL=NUL CC=gcc
312
313 2006-08-30 Borut Razem <borut.razem AT siol.net>
314
315         * sim/ucsim/cmd.src/newcmdposix.cc, sim/ucsim/cmd.src/newcmdposixcl.h,
316           sim/ucsim/cmd.src/newcmdwin32.cc, sim/ucsim/cmd.src/newcmdwin32cl.h,
317           sim/ucsim/app.cc, sim/ucsim/appcl.h, sim/ucsim/configure,
318           sim/ucsim/configure.in, sim/ucsim/ddconfig_in.h, sim/ucsim/error.cc,
319           sim/ucsim/errorcl.h, sim/ucsim/option.cc, sim/ucsim/optioncl.h,
320           sim/ucsim/utils.cc, sim/ucsim/utils.h, sim/ucsim/cmd.src/Makefile.in,
321           sim/ucsim/avr.src/avr.cc, sim/ucsim/avr.src/avrcl.h,
322           sim/ucsim/cmd.src/bp.cc, sim/ucsim/cmd.src/bpcl.h,
323           sim/ucsim/cmd.src/cmdconf.cc, sim/ucsim/cmd.src/cmdgui.cc,
324           sim/ucsim/cmd.src/cmdmem.cc, sim/ucsim/cmd.src/cmdset.cc,
325           sim/ucsim/cmd.src/cmdsetcl.h, sim/ucsim/cmd.src/cmdstat.cc,
326           sim/ucsim/cmd.src/cmduc.cc, sim/ucsim/cmd.src/cmduccl.h,
327           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
328           sim/ucsim/cmd.src/command.cc, sim/ucsim/cmd.src/commandcl.h,
329           sim/ucsim/cmd.src/get.cc, sim/ucsim/cmd.src/getcl.h,
330           sim/ucsim/cmd.src/info.cc, sim/ucsim/cmd.src/newcmd.cc,
331           sim/ucsim/cmd.src/newcmdcl.h, sim/ucsim/cmd.src/set.cc,
332           sim/ucsim/cmd.src/show.cc, sim/ucsim/cmd.src/timer.cc,
333           sim/ucsim/hc08.src/hc08.cc, sim/ucsim/hc08.src/hc08cl.h,
334           sim/ucsim/s51.src/Makefile.in, sim/ucsim/s51.src/interrupt.cc,
335           sim/ucsim/s51.src/interruptcl.h, sim/ucsim/s51.src/pca.cc,
336           sim/ucsim/s51.src/pcacl.h, sim/ucsim/s51.src/port.cc,
337           sim/ucsim/s51.src/portcl.h, sim/ucsim/s51.src/serial.cc,
338           sim/ucsim/s51.src/serialcl.h, sim/ucsim/s51.src/timer0.cc,
339           sim/ucsim/s51.src/timer0cl.h, sim/ucsim/s51.src/timer1.cc,
340           sim/ucsim/s51.src/timer1cl.h, sim/ucsim/s51.src/timer2.cc,
341           sim/ucsim/s51.src/timer2cl.h, sim/ucsim/s51.src/uc390.cc,
342           sim/ucsim/s51.src/uc390cl.h, sim/ucsim/s51.src/uc390hw.cc,
343           sim/ucsim/s51.src/uc390hwcl.h, sim/ucsim/s51.src/uc51.cc,
344           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/wdt.cc,
345           sim/ucsim/s51.src/wdtcl.h, sim/ucsim/sim.src/hw.cc,
346           sim/ucsim/sim.src/hwcl.h, sim/ucsim/sim.src/mem.cc,
347           sim/ucsim/sim.src/memcl.h, sim/ucsim/sim.src/obsolete.cc,
348           sim/ucsim/sim.src/obsolete.h, sim/ucsim/sim.src/sim.cc,
349           sim/ucsim/sim.src/simcl.h, sim/ucsim/sim.src/stack.cc,
350           sim/ucsim/sim.src/stackcl.h, sim/ucsim/sim.src/test_mem_speed.cc,
351           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
352           sim/ucsim/xa.src/xa.cc, sim/ucsim/xa.src/xacl.h,
353           sim/ucsim/z80.src/z80.cc, sim/ucsim/z80.src/z80cl.h:
354           ucsim WIN32 native port
355
356 2006-08-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
357
358         * doc/sdccman.lyx: added note on dynamic memory heap initialization
359
360 2006-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
361
362         * src/mcs51/gen.c (genAnd, genOr, genXor): fixed bug 1546986
363         * src/ds390/gen.c (aopGetUsesAcc): handle AOP_DPTR2 and AOP_DPTRn too
364
365 2006-08-26 Maarten Brock <sourceforge.brock AT dse.nl>
366
367         * src/ds390/gen.c (genAnd, genOr, genXor): fixed bug 1546986
368         * support/regression/tests/bug1546986.c: new, added
369         * as/mcs51/.cvsignore,
370         * debugger/mcs51/.cvsignore,
371         * src/.cvsignore: deleted
372
373 2006-08-25 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
374
375         * device/include/mcs51/P89c51RD2.h: fixed bug 1546936 (error in sbit
376           definitions)
377
378 2006-08-20 Borut Razem <borut.razem AT siol.net>
379
380         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h:
381           removed cl_listen_console::match(), cl_console::match(),
382           restructured cl_commander::proc_input()
383
384 2006-08-16 Borut Razem <borut.razem AT siol.net>
385
386         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h,
387           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
388           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/uc.cc: code cleaning
389
390 2006-08-14 Borut Razem <borut.razem AT siol.net>
391
392         * support/regression/Makefile.in,
393           support/regression/ports/pic14/gpsim.cmd,
394           support/regression/ports/pic14/spec.mk,
395           support/regression/ports/pic14/support.c:
396           added pic14 regression test
397
398 2006-08-14 Maarten Brock <sourceforge.brock AT dse.nl>
399
400         * as/doc/asxhtm.html: documented changed ABS behaviour
401         * as/doc/README: fixed some typos
402
403 2006-08-13 Maarten Brock <sourceforge.brock AT dse.nl>
404
405         * support/regression/tests/float_trans.c: disabled test if __STDC_IEC_559__
406           not defined on host
407
408 2006-08-12 Borut Razem <borut.razem AT siol.net>
409
410         * support/regression/fwk/include/testfwk.h,
411           support/regression/fwk/lib/testfwk.c,
412           support/regression/generate-cases.py,
413           support/regression/Makefile.in:
414           regression test framework does not depend on function pointers and
415           variable arguments
416
417 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
418
419         * device/include/stddef.h: c temporary hack to fix bug 1518273
420
421 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
422
423         * device/include/mcs51/cc2510fx.h: added
424         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
425           to projects.
426
427 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
428
429         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
430         * as/z80/Makefile.in: added strcmpi.c
431         * as/z80/z80adr.c: added upper case registers and lower case conditionals
432         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
433
434 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
435
436         * device/lib/gbz80/asm_strings.s,
437         * device/lib/gbz80/crt0_rle.s,
438         * device/lib/gbz80/div.s,
439         * device/lib/gbz80/mul.s,
440         * device/lib/gbz80/shift.s,
441         * device/lib/z80/asm_strings.s,
442         * device/lib/z80/crt0_rle.s,
443         * device/lib/z80/div.s,
444         * device/lib/z80/mul.s,
445         * device/lib/z80/shift.s: changed to all lower case menmonics except the
446           flags which are all upper case
447
448 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
449
450         * as/z80/asm.h: made CASE_SENSITIVE 1
451         * link/z80/aslink.h: made CASE_SENSITIVE 1
452         * src/z80/gen.c (throughout): made all conditionals upper case
453         * support/regression/tests/bug1503067.c: new
454
455 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
456
457         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
458           (shiftIntoPair): added case 2 for PAIR_IY,
459           (setupToPreserveCarry): replaced parameters with iCode and check if
460            PAIR_DE is in use to fix bug 1399290,
461           (genPlus, genMinus): updated call to setupToPreserveCarry
462         * support/regression/tests/bug1399290.c: new
463
464 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
465
466         * device/lib/Makefile.in (Z80SOURCES): enabled float support
467         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
468         * src/ds390/gen.c (shiftRLong),
469         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
470         * src/mcs51/gen.c (sameReg): changed to sameByte,
471           (xch_a_aopGet): new,
472           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
473            shiftRLong): fixed bug 1533966
474         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
475           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
476         * support/regression/Makefile.in: disabled z80, enabled ucz80
477         * support/regression/tests/float_trans.c: enabled test for z80 and host
478         * support/regression/tests/shifts2.c: new, for testing bug 1533966
479
480 2006-08-01 Borut Razem <borut.razem AT siol.net>
481
482         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
483           comparison is always false due to limited range of data type
484           on PPC64 machine (openpower-linux1) where "char = unsigned char"
485
486 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
487
488         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
489         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
490         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
491         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
492
493 2006-07-31 Borut Razem <borut.razem AT siol.net>
494
495         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
496           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
497           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
498           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
499           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
500           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
501           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
502           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
503           enable ucsim mingw compilation. Serial port is disabled,
504           since it uses termios.h API, which is not available on native
505           WIN32
506
507 2006-07-31 Borut Razem <borut.razem AT siol.net>
508
509         * Small Device C Compiler 2.6.0 released
510         * support/scripts/sdcc.nsi: added FULL_DOC option
511         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
512
513 2006-07-28 Borut Razem <borut.razem AT siol.net>
514
515         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
516         * doc/INSTALL.txt: updated
517
518 2006-07-27 Borut Razem <borut.razem AT siol.net>
519
520         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
521           device/lib/pic/libdev/Makefile.in: fixed bug
522           [ 1438354 ] pic libsdcc: distclean doesn't work
523         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
524           device/lib/pic16/libio/Makefile.in: fixed bug
525           [ 1438344 ] pic16 lib: clean doesn't work properly
526         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
527
528 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
529
530         * device/lib/pic/libsdcc/fsdiv.c,
531         * device/lib/pic/libsdcc/fsmul.c,
532         * device/lib/pic16/libsdcc/float/fsdiv.c,
533         * device/lib/pic16/libsdcc/float/fsmul.c,
534         * device/lib/_fsdiv.c,
535         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
536         * support/regression/tests/bug1520966.c: added
537         * doc/knownbugs.html: removed [ 1520966 ] from the list
538
539 2006-07-25 Borut Razem <borut.razem AT siol.net>
540
541         * configure.in, configure, sdccconf_in.h: fixed bug
542           [ 1519095 ] regression test onebyte.c fails on ppc64 host
543         * doc/knownbugs.html: removed [ 1519095 ] from the list
544
545 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
546
547         * doc/knownbugs.html: added, contains list of known bugs at release
548         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
549
550 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
551
552         * device/include/mcs51/compiler.h: added SFRX for xdata based special
553           function registers and corrected defaults with additional warning
554         * device/lib/malloc.c: cosmetic changes
555         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
556         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
557           (fillGaps): and used it
558
559 2006-07-20 Raphael Neider <rneider AT web.de>
560
561         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
562           output unless SDCCPICDEBUG is set
563         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
564           output if SILENT is set
565
566 2006-07-11 Borut Razem <borut.razem AT siol.net>
567
568         * doc/README.txt: updated
569
570 2006-07-10 Borut Razem <borut.razem AT siol.net>
571
572         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
573           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
574           in WIN32 installation
575         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
576           release candidate 1
577
578 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
579
580         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
581         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
582
583 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
584
585         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
586
587 2006-07-06 Borut Razem <borut.razem AT siol.net>
588
589         * support/regression/tests/bitfields.c:
590           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
591         * support/regression/tests/constantRange.c:
592           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
593
594 2006-07-04 Borut Razem <borut.razem AT siol.net>
595
596         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
597           src/port.mk,
598           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
599           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
600           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
601           reverted changes from 2006-07-03
602         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
603         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
604           added CPPFLAGS, used by the host port
605
606 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
607
608         * support/regression/valdiag/tests/switch.c,
609         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
610         * support/regression/tests/libmullong.c: fixed for host
611         * support/regression/ports/host/spec.mk: disable all warnings for host,
612         SDCC runs with --less-pedantic too
613
614 2006-07-03 Borut Razem <borut.razem AT siol.net>
615
616         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
617           defined CPPFLAGS
618         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
619         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
620           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
621           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
622           include ../port.mk
623         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
624           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
625           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
626           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
627
628 2006-07-02 Raphael Neider <rneider AT web.de>
629
630         * src/pic16/devices.inc,
631         * device/include/pic16/pic18fregs.h,
632         * device/include/pic16/pic18f4550.h,
633         * device/lib/pic16/pics.all,
634         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
635
636 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
637
638         * as/hc08/lkaomf51.c (OutputName),
639         * as/mcs51/lkaomf51.c (OutputName),
640         * as/z80/asmain.c (asmbl),
641         * src/ds390/main.c (asmLineNodeFromLineNode),
642         * src/hc08/ralloc.c (hc08_assignRegisters),
643         * src/mcs51/main.c (asmLineNodeFromLineNode),
644         * src/xa51/ralloc.c (checkRegMask),
645         * src/xa51/gen.c (emitcode),
646         * src/z80/gen.c (_emit2),
647         * src/SDCCast.c (searchLitOp),
648         * src/SDCCglobl.h,
649         * support/packihx/packihx.c,
650         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
651         * src/ds390/gen.c (aopPutUsesAcc),
652         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
653         * support/regression/tests/libmullong.c (mullong_wrapper),
654         * src/SDCCsymt.c (powof2),
655         * src/SDCCast.c,
656         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
657         * src/SDCCsymt.h: added TYPE_TARGET_*
658         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
659         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
660         SDCCast because 1) header problems 2) this is the right place
661         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
662         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
663         prototype
664
665 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
666
667         * src/SDCCicode.h: removed buggy semicolon in unused macro
668         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
669         search for previous definiton of auto symbols too,
670         (findPrevUse): fixed logic of emitWarnings
671
672 2006-06-26 Raphael Neider <rneider AT web.de>
673
674         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
675           PCLATH and PCLATU on interrupts, potentially fixes #1505141
676
677 2006-06-25 Raphael Neider <rneider AT web.de>
678
679         * device/lib/pic/libm: NEW, added math library functions
680         * device/lib/pic/libsdcc: NEW; added float support functions
681         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
682         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
683           NEW, added math related headers
684         * device/include/asm/pic/features.h: NEW
685         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
686           (popGet): allow larger offsets for AOP_PCODE,
687           (genDataPointerSet): handle literals explicitly, more debug output,
688           (genAssign): fixed for float using aopLiteral ;-)
689         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
690           GOTO initialisation routine
691         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
692           flag on registers, fixes #1469043 (local variables do not work)
693         * src/pic/main.c (_pic14_do_link),
694         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
695           available
696
697 2006-06-25 Borut Razem <borut.razem AT siol.net>
698
699         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
700           characters printed (not including the trailing '\0' used to end
701           output to strings). Problem detected in regression test bug-927659.c.
702           NOTE: printf() family functions should return int instead
703           unsigned int!
704         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
705           specifier are printed as themselves
706         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
707           support flags, width and precision specifiers
708
709 2006-06-24 Borut Razem <borut.razem AT siol.net>
710
711         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
712           to the list of sdcc tagrets not supporting bit type
713         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
714           testfor pic16 due to bug:
715           [ 1511794 ] pic16: regression test bug-895992.c fails
716
717 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
718
719         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
720         * src/SDCCglue.c (initPointer), fixed bug 1496419
721         * support/regression/tests/bug1496419.c: new, added
722
723 2006-06-22 Borut Razem <borut.razem AT siol.net>
724
725         * support/regression/ports/pic16/support.c: use gpsim usart module from
726           libgpsim_modules library
727
728 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
729
730         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
731         IP0H to IPH0.
732
733 2006-06-19 Raphael Neider <rneider AT web.de>
734
735         * src/pic/glue.h,src/pic16/glue.h: added prototypes
736         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
737           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
738           (pic14printExterns,pic14printPublics,pic16printPublics,
739           pic16_printExterns): use new functions to emit symbols
740           (picglue,pic16glue): emit publics before emitting externs
741         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
742           locally defined functions to avoid bug #1443651
743         * support/regression/tests/bug-716242.c: removed pic16 workaround
744         * support/regression/ports/pic16/spec.mk: ignore errors during build
745
746 2006-06-19 Raphael Neider <rneider AT web.de>
747
748         * src/pic/glue.h: added pic14aopLiteral prototype
749         * src/pic/glue.c (pic14aopLiteral): return unsigned int
750         * src/pic/gen.c: removed stdint.h dependency
751           (aopGet): use Safe_strdup()
752           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
753           (genDataPointerSet): use pic14aopLiteral()
754         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
755           for pic16; thanks to Bernhard and Maarten
756
757 2006-06-18 Borut Razem <borut.razem AT siol.net>
758
759         * support/regression/tests/structflexarray.c: flexible array members
760           not supported by gcc < 3
761         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
762           GUI tool by default
763         * src/pic/gen.c: don't include [p]strdin.h on solaris
764         * support/Util/pstdint.h: addad svn attributes
765         * support/regression/tests/constantRange.c,
766           support/regression/tests/rotate.c: include inttypes.h instead
767           stdint.h on solaris, addad svn attributes
768
769 2006-06-18 Raphael Neider <rneider AT web.de>
770
771         * src/SDCCsymt.c (initCSupport): change return type of divschar to
772           int for PIC16
773         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
774           (pic16_genMinusBits): simplified sign-extension
775           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
776             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
777             adjusted to correctly handle mixed-signed operands, disabled
778             now unused multiplciation routines
779         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
780           (assignResultValue): added argument denoting the size of the result
781             as returned by the function (fixes upcasts in assigning from
782             function calls: char foo(); int i = foo();)
783           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
784             function result to assignResultValue
785           (genMult): disabled inlined multiplication code
786           (genDiv): augmented to also handle the modulus operator, fixed to
787             handle mixed-signed operands correctly
788           (genMod): simply call genDiv, disabled unused code
789           (genAssign): fixed missing (sign-)extension on result
790         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
791             valid char operands, allow signed operands for native code, added
792             division and modulo operator handling
793         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
794
795         As a consequence, onebyte.c (if split into two files) and muldiv.c
796         pass regression tests.
797
798 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
799
800         * doc/Makefile.in: two runs of makeindex seem needed to get
801         correct page references in the index of sdccman.pdf
802         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
803
804 2006-06-17 Borut Razem <borut.razem AT siol.net>
805
806         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
807
808 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
809
810         * doc/sdccman.lyx: updated, added (porting source code, debugging),
811         mentioned ec2drv and paulmon
812
813 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
814
815         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
816           consecutive abs areas
817           (find_empty_space, allocate_space): added map to handle codemap or
818            xdatamap,
819           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
820            absolute idata and xdata
821         * as/mcs51/lkmem.c (summary2): updated legend
822
823 2006-06-16 Raphael Neider <rneider AT web.de>
824
825         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
826
827 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
828
829         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
830           1208515
831         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
832
833 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
834
835         * src/port.h (struct PORT): added field gp_tags, to hold the tag
836         value of generic pointers,
837         * src/avr/main.c,
838           src/ds390/main.c,
839           src/hc08/main.c,
840           src/izt/i186.c,
841           src/izt/tlcs900h.c,
842           src/mcs51/main.c,
843           src/pic/main.c,
844           src/pic16/main.c,
845           src/xa51/main.c,
846           src/z80/main.c: PORT structure, added elements for gp_tags field,
847         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
848         fields in the PORT structure of each port,
849         * src/SDCCast.c (decorateType): allow processing of generic pointers
850         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
851         S_FIXED symbols
852
853 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
854
855         * link/z80/lkgb.c,
856         * link/z80/lkgg.c,
857         * src/pic16/gen.c,
858         * src/pic16/main.c,
859         * src/pic16/pcode.c,
860         * src/pic/main.c,
861         * src/pic/pcoderegs.c,
862         * src/SDCCicode.c,
863         * src/SDCCmain.c,
864         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
865           bug 1504689 on minGW
866
867 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
868
869         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
870
871 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
872
873         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
874
875 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
876
877         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
878           for optimization
879
880 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
881
882         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
883         to a char variable. Fixed bug #1504211
884         * device/include/pic16/adc.h,
885         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
886         and fixed bug #1364390
887
888 2006-06-10 Borut Razem <borut.razem AT siol.net>
889
890         * CVSROOT: removed the CVS left-over
891
892 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
893
894         * as/hc08/asmain.c (asexit),
895         * as/hc08/lkmain.c (lkexit),
896         * as/mcs51/asmain.c (asexit),
897         * as/mcs51/lkmain.c (lkexit),
898         * src/SDCCglue.c (DEFSETFUNC),
899         * src/SDCCmain.c (linkEdit, assemble),
900         * support/librarian/sdcclib.c (AddRel),
901           replaced unlink() by standard C remove()
902         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
903         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
904           gatherImplicitVariables): new, added to fix bug 608752,
905           (createFunction): added gatherImplicitVariables()
906         * src/SDCCast.h: added createRMW prototype
907         * src/SDCCsymt.h (struct symbol): added infertype
908         * support/regression/tests/bug608752.c: new, added
909
910 2006-06-10 Raphael Neider <rneider AT web.de>
911
912         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
913           multibyte dummy reads (fixes #1503234)
914
915 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
916
917         * device/include/mcs51/compiler.h: new, added header file to enable
918           creating common sfr definition header files for different compilers
919
920 2006-06-05 Raphael Neider <rneider AT web.de>
921
922         * src/pic16/{pcode.h,genarith.c}:
923           introduced pCodeOp combining any two pCodeOps (previously only
924           two register operands could be combined), removed pcop2 from
925           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
926         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
927         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
928           rewritten to use new PO_TWO_OPS
929         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
930         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
931           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
932           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
933           (pic16_get_op): embraced return arg to allow #define return(x),
934             added new case for combined opcodes
935           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
936           (pic16_pCode2str,pic16_getRegFrompCodeOp,
937            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
938
939 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
940
941         * src/SDCCval.c (checkConstantRange): added
942         * src/SDCCval.h: added checkConstantRange
943         * support/Util/SDCCerr.c,
944         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
945         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
946         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
947         * src/SDCCast.c (decorateType): added checkConstantRange,
948         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
949         can be emitted with the correct always true/false warning,
950         added optimization for double '!';
951         result of decorateType() must be assigned back to the tree, because
952         decorateType() can change the tree
953         * src/SDCCicode.c (geniCodeLogic),
954         (geniCodeAssign): replaced new checkConstantRange, added warnings,
955         (checkConstantRange): removed, it was only a fragment which never
956         emitted a warning
957         * src/SDCCsymt.c (computeType): fixed promotion for
958         "-1 < (unsigned bit) b"
959         * src/pic/ralloc.c (packRegsForAssign),
960         * src/pic16/ralloc.c (packRegsForAssign),
961         * src/hc08/ralloc.c (packRegsForAssign),
962         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
963         from mcs51
964         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
965         * support/regression/tests/constantRange.c: added
966         * support/valdiag/tests/constantRange.c: added
967         * support/valdiag/valdiag.py: added -DPORT_HOST=1
968
969 2006-06-02 Borut Razem <borut.razem AT siol.net>
970
971         * support/regression/ports/pic16/support.c: increase stack size
972           to 255 bytes
973         * support/regression/Makefile.in: sort tests by name so that the
974           resutlts can be compared on different machines / platforms
975
976 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
977
978         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
979         * src/ds390/gen.c (emitLabel): new, added,
980           (genDjnz): fixed stack overflow bug,
981           (throughout): cosmetic changes to sync with mcs51/gen.c,
982           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
983         * src/mcs51/gen.c (genEndFunction): small optimization,
984           (throughout): cosmetic changes to sync with ds390/gen.c
985
986 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
987
988         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
989           (_print_format): fixed printing pointers
990         * src/mcs51/gen.c (emitLabel, movb): new, added,
991           (genAssign): small optimization,
992           (genDjnz): fixed stack overflow bug,
993           (throughout): replaced sprintf with SNPRINTF,
994           replaced mcs51_regWithIdx with REG_WITH_INDEX,
995           replaced emitcode("mov", "b,...") with MOVB(...),
996           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
997           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
998         * src/mcs51/peeph.def: added rules 140 and 264
999         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
1000           so they may get optimized into registers
1001
1002 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
1003
1004         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
1005           immediately when encountered,
1006           (printUsage): always use stderr even on windows
1007
1008 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
1009
1010         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
1011         (processParms): fixed bug #1247551
1012         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
1013         parseCmdLine, main): print '--version' to stdout,
1014         print 'help' to stdout if --help is given,
1015         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
1016         arguments are given; fixed --help
1017
1018 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
1019
1020         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
1021         * support/regression/tests/bug-1493710.c: added
1022
1023 2006-05-27 Borut Razem <borut.razem AT siol.net>
1024
1025         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
1026           static instead auto
1027         * support/regression/ports/pic16/support.c: increase stack size
1028           from default 64 bytes to 128 bytes
1029         * support/regression/tests/staticinit.c,
1030           support/regression/tests/float.c: regression tests fully enabled
1031           for pic16 port by putting the initialized data arrays into the code
1032           section
1033         * support/regression/ports/pic16/spec.mk: don't link default libraries.
1034           This was changed by mistake in the previous version.
1035
1036 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
1037
1038         * src/pic16/gen.c (genFunction, genEndFunction): some
1039         beautifications, fixed bug with falsely restoring FSR2 in large
1040         stack model, thanks to Beau E. Cox for reporting the bug
1041
1042 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1043
1044         * debugger/mcs51/break.c,
1045         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
1046           use %p to print pointers, made address variables unsigned
1047         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
1048         * debugger/mcs51/symtab.c (parseSymbol): must return something
1049         * src/mcs51/gen.c (aopForSym): small optimization,
1050            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
1051           (freeAsmop): added missing break,
1052           (aopPut): removed parameter bvolatile, determine it inside the function,
1053           (saveRegisters, unsaveRegisters): small optimization,
1054           (genIpush): removed pointless check,
1055           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
1056           replaced sprintf with SNPRINTF,
1057           replaced strcpy with strncpyz,
1058           updated aopPut calls,
1059           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
1060         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
1061
1062 2006-05-24 Borut Razem <borut.razem AT siol.net>
1063
1064         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
1065           modification of test for the pic16 port, put the array to the code
1066           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
1067
1068 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1069
1070         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
1071         * support/Util/pstdint.h: added
1072
1073 2006-05-22 Borut Razem <borut.razem AT siol.net>
1074
1075         * src/regression/Makefile: removed bool2.c test, added -q linker option
1076         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
1077           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
1078           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
1079           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
1080           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
1081           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
1082           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
1083           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
1084           define SUPPORT_BIT_TYPES 0, removed unused bit variables
1085
1086 2006-05-22 Raphael Neider <rneider AT web.de>
1087
1088         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
1089           bug #1492360 (problematic due to generic pointers, see code)
1090
1091 2006-05-22 Borut Razem <borut.razem AT siol.net>
1092
1093         * support/regression/ports/pic16/specs.mk: removed stack size linker
1094           directive
1095         * support/regression/tests/array.c,
1096           support/regression/tests/bitopcse.c,
1097           support/regression/tests/bug-908454.c,
1098           support/regression/tests/malloc.c: modified for pic16 regression test
1099         * support/regression/tests/bitfields.c:
1100           pic16 - excluded bitfileds of size > 8
1101         * support/regression/tests/bp.c: pic16 - reduced data size
1102         * support/regression/tests/bug-221100.c: pic16 - reduced data size
1103         * support/regression/tests/bug-460010.c:
1104           pic16 - used the absolute address the fits in memory
1105         * support/regression/tests/bug-716242.c:
1106           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
1107         * support/regression/tests/float.c:
1108           pic16 - excluded - data size too big
1109         * support/regression/tests/onebyte.c:
1110           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
1111         * support/regression/tests/shifts.c:
1112           pic16 - function names probably have to differ in first X characters
1113           (gpasm limitation?)
1114         * support/regression/tests/staticinit.c:
1115           pic16 - excluded some tests due error: no target memory available for
1116           section ".idata"
1117
1118 2006-05-22 Borut Razem <borut.razem AT siol.net>
1119
1120         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1121           second try. Thanks Stas Sergeev once more.
1122
1123 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1124
1125         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
1126           (genLeftShift, genRightShift): fixed bug 1491627
1127         * src/hc08/peeph.def (rules 7, 8.x): added
1128         * support/regression/tests/shifts.c (ShiftLeftByParam,
1129           ShiftRightByParam, testShiftByParam): added to test variable shifting
1130
1131 2006-05-20 Raphael Neider <rneider AT web.de>
1132
1133         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
1134         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
1135           (allocReg): add only new registers to dynAllocRegs,
1136           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
1137             #1489055, #1445850, and probably #1483693
1138
1139 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
1140
1141         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
1142         bug in for-loop that didn't emit the last of CONFIG and ID registers
1143
1144 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
1145
1146         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
1147           with offset
1148         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
1149           1489016, 1434401 and 1490124
1150         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
1151           1489016, 1434401 and 1490124
1152
1153 2006-05-17 Borut Razem <borut.razem AT siol.net>
1154
1155         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1156           thanks Stas Sergeev
1157
1158 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1159
1160         * device/include/mcs51/P89c51RD2.h,
1161         * device/include/mcs51/P89LPC901.h,
1162         * device/include/mcs51/P89LPC922.h,
1163         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
1164
1165 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1166
1167         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
1168         to fix missing stack pragma in compiled binary object file,
1169
1170 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
1171
1172         * support/packihx/configure.in,
1173         * support/packihx/configure: removed warning, autoconf >= 2.5x can
1174         determine sizeof basic types even while cross compiling
1175
1176 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
1177
1178         * src/avr/gen.c (aopop),
1179         * src/ds390/gen.c (aopOp),
1180         * src/hc08/gen.c (aopOp),
1181         * src/mcs51/gen.c (aopop),
1182         * src/pic16/gen.c (pic16_aopOp),
1183         * src/pic/gen.c (aopOp),
1184         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
1185         if size of operand is smaller than spill location
1186
1187 2006-05-12 Borut Razem <borut.razem AT siol.net>
1188
1189         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
1190           have to have CR/LF line endings even if they are checked out on *nix
1191           or on WIN32 in cygwin binmode
1192
1193 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
1194
1195         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
1196         * device/include/ds80c390.h: added sfr16 definitions
1197         * src/ds390/gen.c,
1198         * src/ds390/gen.h,
1199         * src/ds390/main.c,
1200         * src/ds390/ralloc.c,
1201         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
1202           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
1203           bit returning functions
1204         * support/regression/tests/sfr16.c: enabled test on ds390
1205
1206 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1207
1208         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
1209         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
1210
1211 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
1212
1213         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
1214         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
1215           (cl_address_space constructor): removed expensive initialization,
1216           (cl_address_space::get_cell): extended for late initialization,
1217           (cl_address_space::*): use late initialization,
1218           (cl_address_decoder::activate): removed expensive initialization,
1219           This reduced regression test running time by 25%
1220
1221 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
1222
1223         * packihx/,
1224         * configure.in,
1225         * configure,
1226         * sdcc.dsw,
1227         * Makefile.bcc,
1228         * Makefile.in,
1229         * support/packihx/Makefile.in,
1230         * support/packihx/clean.mk,
1231         * support/packihx/Makefile.bcc,
1232         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
1233
1234 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1235
1236         * src/SDCCval.c (valNot): fix for regression test failure
1237           of not.c on big endian hosts
1238
1239 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1240
1241         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
1242
1243 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1244
1245         * device/lib/mcs51/Makefile.in: changed string comparison operator
1246           to = for POSIX compliance; == is bash extension
1247
1248 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1249
1250         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
1251           kosmonaut_pirx
1252
1253 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
1254
1255         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
1256         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
1257         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
1258         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
1259         bug report #1478657,
1260
1261 2006-05-05 Borut Razem <borut.razem AT siol.net>
1262
1263         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
1264           making the html
1265
1266 2006-05-02 Borut Razem <borut.razem AT siol.net>
1267
1268         * doc/Makefile.in: removed *.ind dependency since there is no rule to
1269           create *.ind, which made make to fail if invoked with -j 2
1270
1271 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
1272
1273         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
1274           Hubert Sack for patch 1479782
1275
1276 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
1277
1278         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
1279
1280 2006-05-01 Raphael Neider <rneider AT web.de>
1281
1282         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
1283           (create_pic): store only prefix-free device name,
1284           (init_pic): check for device names with "16" prefix,
1285           (list_valid_pics),
1286         * src/pic/device.h (struct PIC_device),
1287         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
1288             stored device name,
1289         * device/include/pic/pic12f{635,675,629,683}.h,
1290         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
1291         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
1292         * device/include/pic/pic16f505.h,
1293         * device/lib/pic/libdev/pic16f505.c: removed
1294         * device/include/pic/pic14devices.txt: added support for pic12f
1295             devices, removed unsupported non 16-bit devices
1296             [above changes provided by patch from Zik Saleeba]
1297         * src/pic/*, src/pic16/*, device/include/pic16/*,
1298           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
1299
1300 2006-05-01 Borut Razem <borut.razem AT siol.net>
1301
1302         * configure.in, configure, doc/Makefile.in:
1303           sync with nightly build makefile - latex, dvipdf and dvips
1304           not needed any more
1305
1306 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
1307
1308         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
1309         in the library source
1310
1311 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
1312
1313         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
1314
1315 2006-04-28 Raphael Neider <rneider AT web.de>
1316
1317         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
1318         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
1319           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
1320         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
1321
1322 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
1323
1324         * device/lib/pic/libdev/Makefile.in,
1325         * device/lib/hc08/Makefile.in,
1326         * device/lib/gbz80/Makefile.in,
1327         * device/lib/z80/Makefile.in,
1328         * device/lib/ds390/Makefile.in,
1329         * device/lib/ds400/Makefile.in: added srcdir to include search path,
1330         thanks to Borut for the bug report
1331         * configure.in,
1332         * configure: always create doc/Makefile independent from --enable-doc
1333         * Makefile.in: always install from directory doc independent from
1334         --enable-doc
1335         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
1336         removed
1337         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
1338         * doc/Makefile.in: install *.txt if present
1339         * device/include/Makefile.in (install): added installation of pic/*.inc
1340         and pic/*.txt files again, they were erroneously removed
1341
1342 2006-04-28 Raphael Neider <rneider AT web.de>
1343
1344         * src/pic/{gen.c,main.h,pcode.c},
1345         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
1346             concerning signedness with casts
1347
1348 2006-04-28 Raphael Neider <rneider AT web.de>
1349
1350         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
1351             definition of an interrupt handler,
1352         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
1353             interrupt handler stuff from picglue() to separate routine,
1354           (picglue): enabled definition of intr handlers in files w/o main()
1355
1356 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1357
1358         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
1359           compilation with MSVC 2005 Express Edition (VC8)
1360
1361 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
1362
1363         * device/lib/Makefile: fixed build of gbz80 lib
1364
1365 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1366
1367         * support/regression/tests/bug-460010.c,
1368         * support/regression/tests/bug-524691.c,
1369         * support/regression/tests/bug-716242.c: removed conditional defines
1370           that are already in testfwk.h
1371
1372 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1373
1374         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
1375           (AccAXRsh1): added, shift right by 1,
1376           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
1377            AccAXLrl1
1378         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
1379
1380 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
1381
1382         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
1383         remove cast to same type
1384         * src/SDCCast.c (decorateType): fix for RFE 1475742,
1385         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
1386         * as/z80/Makefile,
1387         * link/z80/Makefile: removed, they have moved to
1388         Makefile.in files
1389         * configure,
1390         * configure.in: replaced duplicate message about ucsim by missing sdcpp
1391         * install-sh: fix bug #1204398 by setting umask 0022
1392         * device/lib/Makefile: separate build of z80 and gbz80 lib
1393
1394 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
1395
1396         Enabled VPATH feature: changed nearly all Makefiles (149 files).
1397         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
1398
1399         One basic decision: e.g. src/clean.mk includes further files. In order
1400         to make this work there are two solutions:
1401         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
1402           run configure on them. This way they can use
1403           'include $(srcdir)/port-clean.mk'
1404         - always include clean.mk by the Makefile at the same level. To avoid
1405           that `make clean` tries to include and build Makefile.dep the
1406           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
1407           implemented, because now even `make uninstall` doesn't create
1408           Makefile.in. clean.mk could be eliminated by pasting it in
1409           Makefile.in.
1410
1411         * debugger/mcs51/Makefile.in: build own objects from library sources
1412         (SLIB, SDCC) in current directory
1413
1414         * configure, configure.in: renamed --disable-device-lib-build in
1415         --disable-device-lib; added --enable-doc, the required tools are
1416         searched by configure; added result message; the toolchain for the
1417         belonging ports are now only built, if the port is enabled.
1418
1419         * support/regression/*: all output is written in directory gen, because
1420         the fwk and ports directories don't livet in the build tree using vpath
1421
1422         * doc/sdccman.lyx: renamed --disable-device-lib-build to
1423         --disable-device-lib, added --enable-doc, added section VPATH
1424
1425         * sim/ucsim/configure.in,
1426         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
1427         z80 are enabled by default
1428
1429 2006-04-24 Raphael Neider <rneider AT web.de>
1430
1431         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
1432             to config word, "pic14_"-prefixed some extern functions
1433           (pic14_emitConfigWord): emit __config directive(s) if assignment to
1434             config word has been found
1435         * src/pic/device.h: added prototypes
1436         * src/pic/pcode.c: added "pic14_"-prefix where needed
1437         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
1438             fixup
1439         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
1440             words,
1441           (pic14emitRegularMap): ignore config words,
1442           (pic14createInterruptVect): moved generating __config directives away
1443           (picglue): have __config directives emitted
1444
1445 2006-04-24 Borut Razem <borut.razem AT siol.net>
1446
1447         * doc/Makefile: sync with nightly build makefile
1448
1449 2006-04-24 Raphael Neider <rneider AT web.de>
1450
1451         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
1452             registers that have not been assigned proper liveranges,
1453             fixes #1469504 and #1474602,
1454           (pCodeRegOptimizeRegUsage): fixed typo in comment
1455
1456 2006-04-24 Borut Razem <borut.razem AT siol.net>
1457
1458         * device/examples/main8051.c: deleted - it was removed from CVS
1459           24.mar.2000 and after that modified 18.feb.2001, so it reappered
1460           after the transition to Subversion
1461         * src/SDCCalloc.h: deleted - it was removed  from CVS
1462           3.feb.2001 and after that modified 18.feb.2001, so it reappered
1463           after the transition to Subversion
1464         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
1465           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
1466           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
1467           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
1468
1469 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
1470
1471         * as/asx8051.dsp: added mcs51/strcmpi.h
1472         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
1473         * as/hc08/aslink.h: updated lnksect prototype
1474         * as/hc08/asm.h,
1475         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
1476         * as/hc08/asmain.c,
1477         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
1478           (newdot): handle A_ABS
1479         * as/hc08/asout.c,
1480         * as/mcs51/asout.c (outarea): output address
1481         * as/hc08/lkaomf51.c,
1482         * as/mcs51/lkaomf51.c: disabled unused array UsageType
1483         * as/hc08/m08pst.c,
1484         * as/mcs51/i51pst.c,
1485         * as/z80/z80pst.c: "ABS" is not A_OVR
1486         * as/hc08/lkarea.c (newarea): read a_addr,
1487           (lnkarea): added codemap array, sort absolute areas to the front,
1488            combine all GSINITx/GSFINAL,
1489           (find_empty_space, allocate_space): new functions,
1490           (lnksect): return next address, handle absolute sections
1491         * as/mcs51/lkarea.c (newarea): read a_addr,
1492           lnksect2 prototype changed,
1493           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
1494           (find_empty_space, allocate_space): new, factored out of lnksect2,
1495           (lnksect2): return next address, handle absolute sections
1496         * as/hc08/lkhead.c,
1497         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
1498         * as/hc08/lklibr.c (addfile, fndsym),
1499         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
1500           index out of range and detect both '\' and '/'
1501         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
1502         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
1503           regression tests (ds390 cannot return bool yet)
1504         * doc/sdccman.lyx: changed version number, document changed --no-peep,
1505           document critical interrupts on z80, document changed SDCC define
1506         * src/asm.c (_asxxxx_mapping): fixed .org directive,
1507           (_a390_mapping): added .org directive
1508         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
1509           (genMultOneByte): fixed warnings
1510         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
1511           ones
1512         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
1513         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
1514           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
1515         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
1516         * src/pic16/main.c: removed newReg prototype
1517         * src/pic16/pcode.c,
1518         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
1519           warnings
1520         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
1521           ones
1522         * src/pic16/ralloc.c
1523         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
1524           to fix warnings
1525         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
1526           from short to PIC_OPTYPE
1527         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
1528         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
1529           optype from short to PIC_OPTYPE
1530         * src/port.h: made int_size unsigned to fix warnings
1531         * src/SDCC.y: fixed warning on MSVC
1532         * src/SDCCicode.c (getArraySizePtr): return unsigned int
1533         * src/SDCCopt.c (convertToFcall): fixed warnings
1534         * src/SDCCsymt.h: removed double prototype for genSymName
1535         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
1536           offset int to fix warnings
1537
1538 2006-04-22 Borut Razem <borut.razem AT siol.net>
1539
1540         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1541           references to CVS replaced with Subversion
1542
1543 2006-04-21 Borut Razem <borut.razem AT siol.net>
1544
1545         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1546           references to CVS replaced with Subversion
1547
1548 2006-04-19 Borut Razem <borut.razem AT siol.net>
1549
1550         * src/version.awk: adapted for svn
1551         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
1552           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
1553           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
1554           /binutils-avr/etc/*.vi, *.jin: removed all properties
1555           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
1556
1557 2006-04-19 Borut Razem <borut.razem AT siol.net>
1558
1559         * CVS to Subversion migration completed
1560
1561 2006-04-18 Borut Razem <borut.razem AT siol.net>
1562
1563         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
1564           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
1565
1566 2006-04-17 Borut Razem <borut.razem AT siol.net>
1567
1568         * device/include/Makefile.in: added pic/*.inc to the installation
1569
1570 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
1571
1572         * support/regression/collate-results.py: fixed output in case of
1573         a valdiag error
1574         * support/regression/generate-cases.py: fixed splitting of pathnames
1575         with dots
1576         * as/hc08/lklibr.c (addfile),
1577         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
1578
1579 2006-04-11 Raphael Neider <rneider AT web.de>
1580
1581         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
1582         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
1583         * src/pic16/pcode.c (assignValnums): fixed #1460578
1584
1585 2006-04-11 Raphael Neider <rneider AT web.de>
1586
1587         * device/lib/pic/libdev/*.c,
1588         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
1589           fixes #1468739, enables compilation in --std-c99 mode
1590         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
1591
1592 2006-04-11 Raphael Neider <rneider AT web.de>
1593
1594         * src/pic/device.c (find_device): removed debug output
1595           (list_valid_pics): enabled verbose listing of supported devices
1596         * device/include/stdbool.h: define bool as char for pic14/16 as well
1597
1598 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1599
1600         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
1601
1602 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1603
1604         * .version: bumped version to 2.5.6
1605         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
1606
1607 2006-04-06 Raphael Neider <rneider AT web.de>
1608
1609         * .version: bumped version to 2.5.6 (pic14 ABI changed)
1610         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
1611         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
1612           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
1613             pic14_constructAbsMap
1614           (pic14printPublics): declare absolute global symbols as global
1615           (pic14createInterruptVect),
1616         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
1617           (newReg): assume new registers unused, use correct name in
1618             hashtable (reg->name instead of name), more debugLog output
1619         * src/pic/device.h (PIC_device): added fields for verbose output
1620         * src/pic/device.c: moved device definition to pic14devices.txt,
1621             added routines for runtime parsing of pic14devices.txt,
1622             added support for second config word
1623         * src/pic/main.c (_process_pragma): removed #pragma maxram,
1624           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
1625           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
1626           (_pic14_parseOptions): moved pCodeInitRegisters here
1627           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
1628         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
1629           (pCodeInitRegisters): rewrapped comments, perpared new approach to
1630             handling the pseudo stack
1631         * device/lib/Makefile.in: ignore failures in objects-pic16,
1632         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
1633         * device/lib/pic/NEWS: document new dependency on picXXX.lib
1634         * device/lib/pic/Makefile.subdir,
1635         * device/lib/pic16/Makefile.subdir: improved clean rules
1636         * device/lib/pic/libdev/: NEW, pic14 device libraries
1637         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
1638         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
1639         * device/include/Makefile.in: create subdir and install pic14 headers
1640         * device/include/pic/p16f_common.inc: removed unused declarations
1641         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
1642             PICs from inc2h.pl v1.6,
1643             replaced BIT_AT macros with struct declarations
1644         * device/include/pic/pic14devices.txt: definition of supported devices,
1645             all above improvements contributed by Zik Saleeba, thanks
1646         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
1647         * support/scripts/sdcc.nsi: also install pic14 device libraries and
1648             headers
1649
1650 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1651
1652         * device/include/mcs51/c8051f410.h: added interrupt numbers,
1653         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
1654           thanks to Charles Olds
1655
1656 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1657
1658         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
1659
1660 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1661
1662         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
1663         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
1664         * support/regression/bug1464657.c: added, new test
1665
1666 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1667
1668         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
1669           version number
1670
1671 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1672
1673         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
1674           --no-peep and --peep-file <file> are used don't use default rules but
1675           do use the <file>
1676
1677 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1678
1679         * src/mcs51/gen.c (genCall): fixed bug 1457608
1680
1681 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1682
1683         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1684         changes seem to cause (trigger?) problems with the build system.
1685
1686 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1687
1688         * src/SDCCpeeph.c (operandsLiteral): new, added,
1689           (callFuncByName): inserted operandsLiteral
1690         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1691
1692 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1693
1694         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1695         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1696
1697 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1698
1699         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1700           implemented patch 1120823 Thanks to Willy De la Court (normal
1701           interrupts need an interrupt number now if they are made critical),
1702           and enabled nesting of critical functions though not for gbz80
1703           (genCritical, genEndCritical): added functions
1704           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1705         * src/z80/mappings.i: added "ei" to all mappings
1706
1707 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1708
1709         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1710         submitted by the Debian SDCC maintainer Aurelien Jarno:
1711         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1712         archive with gcc 4.1 on mips and wrote the patch"
1713
1714 2006-03-16 Raphael Neider <rneider AT web.de>
1715
1716         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1717           the left operand is shorter than the result (c* = lit-c* + int),
1718           fixes bug #1450796
1719         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1720           OP_SYMBOL
1721
1722 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1723
1724         * src/.version: increased version number to 2.5.5
1725         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1726         linking is done manually in pic16 port's _linkEdit,
1727         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1728         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1729         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1730         allocate asmop as AOP_ACC,
1731         (aopForRemat): added parameter 'bool result' in function declaration,
1732         (pic16_aopGet): return AOP_ACC when accessing WREG,
1733         (pic16_popGetTempReg): minor modification,
1734         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1735         'pic16_allocWithIdx',
1736         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1737         calling function in absolute addresses,
1738         (genAssign): take into account AOP_ACC asmop,
1739         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1740         * src/pic16/pcoderegs.c: some debug functions and lines added,
1741         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1742         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1743         register too,
1744         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1745         call to allocReg, not by manually allocating a new one,
1746         (pic16_assignRegisters): now before going through the register
1747         allocating functions mark all registers as free. This eliminates some
1748         side effects resulting from peephole parser done earlier in the backbone
1749
1750 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1751
1752         * src/SDCCicode.c (geniCodeLogic),
1753         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1754
1755 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1756
1757         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1758           (genSend): bugfix, do not allocate and free twice,
1759           (shiftRLong): handle partially overlapping aops
1760         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1761
1762 2006-03-08 Borut Razem <borut.razem AT siol.net>
1763
1764         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1765           for pic16
1766
1767 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1768
1769         * support/regression/tests/bug1409955.c: new, added
1770         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1771         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1772           (aopForSym, aopOp): increment asmop.allocated if reused,
1773           (freeAsmop): decrement asmop.allocated and check for zero instead of
1774           using asmop.freed,
1775           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1776           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1777            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1778            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1779            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1780            genSignedRightShift, genRightShift, genDataPointerGet,
1781            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1782            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1783             in reverse order from allocation,
1784           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1785             added swappedLR to keep track
1786         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1787           pdata & code for GCC, z80, gbz80 & hc08
1788         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1789
1790 2006-03-08 Raphael Neider <rneider AT web.de>
1791
1792         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1793
1794 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1795
1796         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1797         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1798         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1799
1800 2006-03-06 Borut Razem <borut.razem AT siol.net>
1801
1802         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1803           made the linker quiet
1804
1805 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1806
1807         * src/pic16/gen.c (genPcall): fixed bug #1443644
1808         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1809         which dumps before the function entry point a data byte which represents
1810         the number of the local variables used by the specified function, added
1811         'xinst' for initial support for Extended Instruction Support,
1812         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1813         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1814         port->fun_prefix anymore (may change later),
1815         (genFunction, genEndFunction): do not store/restore local registers for
1816         _main (this should take care the --main-return command line option in
1817         the future),
1818         (genOr): removed some legacy pic-port instructions,
1819         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1820         performing operations with SFR's causes data to be written more than
1821         once to each SFR. Perhaps SFRs should be handled in special cases...
1822         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1823         pcode.h
1824         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1825         into account for stack starting position,
1826         (struct OPTIONS pic16_optionsTable): added command line argument
1827         --extended or -y for Extended Instruction Support,
1828         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1829         (deassignLRs): *** perhaps the most important change, old 'for' code
1830         (commented out for reference), didn't account for some registers which
1831         were left marked 'not free' after a pointer operation. The change
1832         reduces register usage a lot in some cases
1833
1834 2006-03-04 Borut Razem <borut.razem AT siol.net>
1835
1836         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1837           _clean
1838         * support/regression/tests/bug-524697.c: decreased array size for
1839           mcs51 to fit into the internal RAM
1840         * support/regression/Makefile.in: a little bit more verbose
1841
1842 2006-03-03 Borut Razem <borut.razem AT siol.net>
1843
1844         * support/regression/fwk/lib/testfwk.c,
1845           support/regression/fwk/include/testfwk.h: introduced function
1846           _prints(), nonrecursive _printn(), call _initEmu() from main()
1847         * support/regression/ports/gbz80/support.asm,
1848           support/regression/ports/ucz80/support.asm,
1849           support/regression/ports/z80/support.asm,
1850           support/regression/ports/ds390/support.c,
1851           support/regression/ports/hc08/support.c,
1852           support/regression/ports/host/support.c,
1853           support/regression/ports/mcs51/support.c,
1854           support/regression/ports/xa51/support.c: added empty _initEmu()
1855           function
1856         * support/regression/ports/pic16/gpsim.cmd,
1857           support/regression/ports/pic16/spec.mk,
1858           support/regression/ports/pic16/support.c,
1859           support/regression/Makefile.in: added pic16 regression test
1860
1861 2006-03-01 Raphael Neider <rneider AT web.de>
1862
1863         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1864           genConstPointerGet): use safe way of generating MOVFF to cover
1865             literals as well as registers, fixes bug #1440527
1866         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1867             dereference
1868           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1869             more correctly, fixes bug #1232186
1870           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1871         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1872             gplink guess the correct processor in more cases, applied patch
1873             from Till Riedel attached to and fixing bug #1436552
1874
1875 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1876
1877         * support/regression/tests/array.c: added, contains check for #1434401
1878         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1879
1880 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1881
1882         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1883         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1884         * device/include/mcs51/c8051f326.h,
1885         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1886         * device/include/mcs51/c8051f000.h,
1887         * device/include/mcs51/c8051f018.h,
1888         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1889           PCON_IDLE,PCON_STOP and added sfr16 definitions
1890
1891 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1892
1893         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1894           genGetWord): fixed bug 1409955
1895
1896 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1897
1898         * device/include/hc08/mc68hc908gp32.h,
1899         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1900
1901 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1902
1903         * src/SDCCast.c (constExprValue): return NULL if not a value
1904         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1905         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1906         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1907
1908 2006-02-13 Borut Razem <borut.razem AT siol.net>
1909
1910         * src/regression/ptrarg.c: added, fails due to bug #1430967
1911         * src/regression/Makefile: ptrarg.c added, ...
1912
1913 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1914
1915         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1916         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1917
1918 2006-02-11 Borut Razem <borut.razem AT siol.net>
1919
1920         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1921           print "Processor: xxx" message to stdout only if --verbose
1922
1923 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1924
1925         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1926         * support/regression/tests/bug1426356.c: added
1927         * support/regression/tests/bitfields.c: removed 2 tests
1928
1929 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1930
1931         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1932         * device/include/mcs51/c8051f330.h,
1933         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1934           PCON_IDLE,PCON_STOP and added sfr16 definitions
1935         * device/lib/_divsint.c,
1936         * device/lib/_divuint.c,
1937         * device/lib/_divulong.c,
1938         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1939           register bank bug for small stackauto
1940
1941 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1942
1943         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1944
1945 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1946
1947         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1948         * all.dsp: corrected several bin paths
1949         * device/include/mcs51/c8051f120.h,
1950         * device/include/mcs51/c8051f300.h,
1951         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1952           to PCON_IDLE,PCON_STOP
1953         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1954         * device/lib/printf_large.c (output_float): fixed bug 1388703
1955         * support/regression/tests/bug1057979.c: added test for bug 1388703
1956
1957 2006-02-08 Raphael Neider <rneider AT web.de>
1958
1959         * src/pic/pcode.c (pciTRIS): fixed typo,
1960           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1961           (LinkFlow): fixed handling of flows that end in a call,
1962           (ReuseReg): perform safety check earlier
1963         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1964             to work with flows at the beginning of a pBlock,
1965             fixes #1426557 (Symbol not previously defined),
1966           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1967             usage information
1968           (RemoveUnusedRegisters): update register usage info
1969         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1970             created, reuse existing ones instead
1971         * src/pic/gen.c (genPcall): fixed #1424719
1972
1973 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1974
1975         * link/z80/lkmain.c,
1976         * link/z80/lklex.c,
1977         * link/z80/lkdata.c,
1978         * link/z80/aslink.h: fixed build on current cygwin:
1979         replaced getline() by lk_getline()
1980
1981 2006-02-01 Borut Razem <borut.razem AT siol.net>
1982
1983         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1984           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1985           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1986           src/regression/bool1.c, src/regression/bool2.c,
1987           src/regression/bool3.c, src/regression/call1.c,
1988           src/regression/compare.c, src/regression/compare10.c,
1989           src/regression/compare2.c, src/regression/compare3.c,
1990           src/regression/compare4.c, src/regression/compare5.c,
1991           src/regression/compare6.c, src/regression/compare7.c,
1992           src/regression/compare8.c, src/regression/compare9.c,
1993           src/regression/configword.c, src/regression/for.c,
1994           src/regression/inline.c, src/regression/mult1.c,
1995           src/regression/nestfor.c, src/regression/or1.c,
1996           src/regression/pointer1.c, src/regression/ptrfunc.c,
1997           src/regression/rotate1.c, src/regression/rotate2.c,
1998           src/regression/rotate3.c, src/regression/rotate4.c,
1999           src/regression/rotate5.c, src/regression/rotate6.c,
2000           src/regression/rotate7.c, src/regression/string1.c,
2001           src/regression/struct1.c, src/regression/sub.c,
2002           src/regression/sub2.c, src/regression/switch1.c,
2003           src/regression/while.c, src/regression/xor.c,
2004           src/regression/create_stc, src/regression/simulate,
2005           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
2006           regression tests
2007         * src/regression/gpsim_assert.h: added
2008
2009 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
2010
2011         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
2012         ((void (code *) (void)) 0) ();
2013         * as/hc08/aslex.c,
2014         * as/hc08/aslink.h,
2015         * as/hc08/asm.h,
2016         * as/hc08/asmain.c,
2017         * as/hc08/lkdata.c,
2018         * as/hc08/lklex.c,
2019         * as/hc08/lkmain.c,
2020         * as/mcs51/aslex.c,
2021         * as/mcs51/aslink.h,
2022         * as/mcs51/asm.h,
2023         * as/mcs51/asmain.c,
2024         * as/mcs51/lkdata.c,
2025         * as/mcs51/lklex.c,
2026         * as/mcs51/lkmain.c,
2027         * as/z80/aslex.c,
2028         * as/z80/asm.h,
2029         * as/z80/asmain.c: fixed build on current cygwin:
2030         replaced getline() by as_getline()
2031
2032 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
2033
2034         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
2035         declarator in the symbol chain
2036         * src/SDCCsymt.h,
2037         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
2038         parameter list for function pointers
2039         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
2040         * support/regression/tests/bug-716242.c: added
2041
2042 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
2043
2044         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
2045         offset if possible
2046         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
2047
2048 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
2049
2050         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
2051         inifinitely recurseable, added static
2052         * support/regression/tests/bug-1408066.c: added
2053
2054 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
2055
2056         * src/SDCCicode.h,
2057         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
2058         renamed, added possibility to create "postLoopLbl"-labels
2059         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
2060         newiTempLoopHeaderLabel
2061         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
2062         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
2063         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
2064         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
2065         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
2066         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
2067         (basicInduction): fixed bug #136564, made static,
2068         (loopInduction): changed parameter of basicInduction, made static,
2069         (addPostLoopBlock): added
2070         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
2071         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
2072         findLoopEndSeq
2073         * support/regression/tests/bug-136564.c: added
2074         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
2075         --std-sdcc99 to LIBSDCCFLAGS
2076
2077 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
2078
2079         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
2080         while loop
2081         * support/regression/tests/bug-1406131.c: added
2082
2083 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
2084
2085         * src/SDCCast.c (decorateType): fix promotion of unary minus
2086         * src/SDCCsymt.c (computeType): beautified
2087         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
2088         (valUnaryPM, valComplement): fix sign and promotion,
2089         (valNot): ANSI: result type is int (SDCC: unsigned char)
2090         * support/regression/tests/uminus.c: speedup by removing superflous
2091         test case 'int'
2092         * support/regression/tests/onebyte.c: added promotion and signedness
2093         tests for unary minus
2094         * support/regressions/tests/bug-477927.c: disable warning about
2095         uninitialized variables
2096         * support/regression/tests/not.c: added
2097
2098 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
2099
2100         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
2101         * src/mcs51/gen.c (gen51Code): show final register usage after
2102         fillGaps in asm with --i-code-in-asm
2103         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
2104         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
2105         incUsed, rliveClear, adjustIChain): made static,
2106         (setFromRange): excluded because it's unused,
2107         (findPrevUseSym, markWholeLoop): added,
2108         (findPrevUse): rewritten; fixes bug 895992; now a complete search
2109         through all branches of predecessors enables sdcc to emit the warning
2110         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
2111         (rlivePoint): made static, added parameter emitWarnings which is only
2112         true during the first run out of two,
2113         (findRecursiveSucc, findRecursivePred): removed,
2114         (computeLiveRanges): made static, added parameter emitWarnings,
2115         (dumpIcRlive): added for debugging only
2116         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
2117         removed prototype of setFromRange()
2118         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
2119         in call of computeLiveRanges()
2120         * support/regression/tests/bug-895992.c: added
2121         * support/regression/tests/bug-971834.c: added
2122         * support/valdiag/tests/bug-895992.c: added
2123         * support/valdiag/tests/bug-971834.c: added
2124
2125 2005-12-18 Raphael Neider <rneider AT web.de>
2126
2127         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
2128           (genUnpackBits): improved code for direct operands,
2129           (genPackBits): improved code for literal assignment to bitfields
2130             and for direct destination operands (no FSR indirection),
2131             prevented redundant AND, fixes #1362800,
2132           (AccLsh): added parameter to disable masking of the result
2133         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
2134           skip instructions with side-effects (like incfsz),
2135           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
2136         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
2137         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
2138           fixes #1375263
2139
2140 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
2141
2142         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
2143         volatile variables as spill location
2144
2145 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
2146
2147         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
2148         replacing literals
2149         * support/regression/tests/bug-1376320.c: added
2150
2151 2005-12-08 Raphael Neider <rneider AT web.de>
2152
2153         * src/pic/device.c: renamed is_shared to pic14_is_shared
2154         * src/pic/gen.c (genIfx): re-enabled handling of sbits
2155         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
2156           (is_valid_identifier): added for above workaround
2157
2158 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
2159
2160         * device/lib/Makefile.in: fixed to enable port-specific-objects
2161         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
2162           char, thanks Hubert Sack
2163         * doc/sdccman.lyx: documented --xstack-loc,
2164           elaborated a bit more on interrupts and pitfalls,
2165           removed "setjmp/longjmp unsupported",
2166           documented some unsupported C99 features
2167         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
2168         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
2169           if, thanks Hubert Sack
2170         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
2171         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
2172           make make_library
2173         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
2174           regression tests can report resource usage (rfe 700441)
2175         * support/regression/collate-results.py: report resource usage
2176         * support/regression/ports/ds390/spec.mk,
2177         * support/regression/ports/hc08/spec.mk,
2178         * support/regression/ports/mcs51/spec.mk,
2179         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
2180         * support/regression/ports/ds390/uCsim.cmd,
2181         * support/regression/ports/hc08/uCsim.cmd,
2182         * support/regression/ports/mcs51/uCsim.cmd,
2183         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
2184         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
2185           library, use the default one
2186         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
2187           building the library
2188
2189 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
2190
2191         * config.dsp: added dependency on .version and configure_vc.awk
2192         * device/include/setjmp.h: updated for --stack-auto and --xstack
2193         * device/include/mcs51/at89c51snd1c.h: corrected line endings
2194         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
2195         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
2196         * device/lib/libsdcc.lib: added _setjmp
2197         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
2198           (decorateType): fixed bug 1372851,
2199           (optimizeGetHbit): fixed warning
2200         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
2201           array initialisation
2202         * support/regression/tests/bug1057979.c: added test for bug 1358192
2203         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
2204
2205 2005-12-03 Borut Razem <borut.razem AT siol.net>
2206
2207         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
2208           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
2209
2210 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2211
2212         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
2213         createIval): implement symbol independant "flexible array member",
2214         (createIvalCharPtr): implemented flexible array initialisation with a
2215         string
2216         * src/SDCCsymt.c (copyStruct): removed,
2217         (getSize): fixed misleading comment,
2218         (getAllocSize): removed, the additional allocation size is now in
2219         sym->flexArrayLength,
2220         (checkStructFlexArray): new, syntax checks for flexible array members,
2221         (compStructSize): added syntax checks for "flexible array members"
2222         (copyStruct): removed,
2223         (copyLinkChain): removed inefficient fix for bug 770487
2224         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
2225         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
2226         symbol->flexArrayLength
2227         * src/SDCCerr.c,
2228         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
2229         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
2230         * support/regression/tests/structflexarray.c: added
2231         * support/valdiag/tests/structflexiblearray.c: added
2232
2233 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2234
2235         * src/SDCCast.c (decorateType): fixed bug 1368489
2236         * support/Util/SDCCerr.c,
2237         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
2238
2239 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2240
2241         * device/include/mcs51/at89c51snd1c.h: added file submitted by
2242           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
2243
2244 2005-11-27 Borut Razem <borut.razem AT siol.net>
2245
2246         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
2247           support/cpp2/mkdeps.h: added command line option
2248           -obj-ext=<extension> to SDCPP to define object file externion, used
2249           for generation of make dependencies (-M)
2250         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
2251
2252 2005-11-26 Borut Razem <borut.razem AT siol.net>
2253
2254         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
2255           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
2256           added pic and pic16 libraries
2257
2258 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2259
2260         * device/include/float.h: Corrected typo in prototype of __fsgt
2261
2262 2005-11-25 Borut Razem <borut.razem AT siol.net>
2263
2264         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
2265           added creation of model-mcs51-stack-auto libraries
2266
2267 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
2268
2269         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
2270         and fields-list too
2271         * src/SDCCast.c (createIvalArray): removed obsolete comment
2272
2273 2005-11-24 Borut Razem <borut.razem AT siol.net>
2274
2275         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
2276           added missing device/lib/mcs51/crt*.asm sources
2277
2278 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
2279
2280         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
2281
2282 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
2283
2284         * device/lib/_fs2schar.c,
2285         * device/lib/_fs2sint.c,
2286         * device/lib/_fs2slong.c: optimized inline asm
2287
2288 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2289
2290         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2291           Better handling of floats between -1.0 and 0.0.
2292
2293 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2294
2295         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
2296           (the missing "if"s prohibited removal of redundant labels)
2297
2298 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2299
2300         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2301           Properly convert floats between -1.0 and 0.0 to long, int, and char
2302           types (max integer value of negative floats tends to zero).
2303         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2304           Removed changes made so to work properly with floats between
2305           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
2306           and _fs2char.c
2307
2308 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2309
2310         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
2311         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
2312         (genCast) cosmetic change
2313         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
2314         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
2315         from mcs51
2316         * support/regression/tests/bitfields (testSignedBitfields): added
2317
2318 2005-11-18 Borut Razem <borut.razem AT siol.net>
2319
2320         * sdcc/device/lib/Makefile.in: remove all unnecessary files
2321         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
2322           introduced SILENT option to make building of pic16 libraries less
2323
2324 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2325
2326         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2327           Now they work properly with floats between -1.0 and 0.0
2328         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
2329
2330 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2331
2332         * src/SDCCicode.c (printOperand): added missing else
2333
2334 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2335
2336         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
2337         reformatted for better readability
2338         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
2339         signed bitfields
2340
2341 2005-11-17 Borut Razem <borut.razem AT siol.net>
2342
2343         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
2344           introduced SILENT option to make building of pic16 libraries less
2345           verbose - used for nightly snapshot build
2346         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
2347           available on Win32 platforms.
2348         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
2349           medium, large, pic and pic16
2350
2351 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2352
2353         * device/lib/printf_large.c: Temporary patch for bug 1358192:
2354           printf("%f"...) sets fraction to zero.
2355
2356 2005-11-16 Raphael Neider <rneider AT web.de>
2357
2358         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
2359           fixes #1357221
2360         * src/pic/gen.c (genIfx): implemented for CARRY bit
2361         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
2362           to generic pointers, fixes #1357332,
2363           (pic16_movLit2f): NEW,
2364           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
2365
2366 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2367
2368         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
2369
2370 2005-11-11 Raphael Neider <rneider AT web.de>
2371
2372         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
2373         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
2374           compute pointer's type from operand,
2375           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
2376           improved single bit reads, fixes bug #1353379
2377
2378 2005-11-09 Borut Razem <borut.razem AT siol.net>
2379
2380         * support/scripts/sdcc.nsi: added lib/pic to the package
2381
2382 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
2383
2384         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
2385
2386 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2387
2388         * support/regression/tests/bug1348008.c: added
2389         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
2390         * support/regression/tests/bug1337835.c: updated comment
2391
2392 2005-11-06 Borut Razem <borut.razem AT siol.net>
2393
2394         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2395           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2396           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2397           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2398           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
2399           dynamic construction of cl_error_class and derivates - 2.nd try
2400
2401 2005-11-05 Borut Razem <borut.razem AT siol.net>
2402
2403         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
2404           bug, which caused Bus Errors on sparc solaris
2405
2406 2005-11-04 Borut Razem <borut.razem AT siol.net>
2407
2408         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2409           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2410           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2411           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2412           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
2413           and derivates to resolve the initialization problem on OSX
2414
2415 2005-11-02 Borut Razem <borut.razem AT siol.net>
2416
2417         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2418           corrected typo - #include <winsock2.h>
2419
2420 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
2421
2422         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
2423           (_asxxxx_mapping): added org directive for future enhancements
2424
2425 2005-11-01 Borut Razem <borut.razem AT siol.net>
2426
2427         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2428           enabled sockets on WIN32
2429         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
2430
2431 2005-10-31 Borut Razem <borut.razem AT siol.net>
2432
2433         * support/regression/generate-cases.py: escape backslashes in {testcase}:
2434           WIN32 backslash path delimiters should be escaped when used in C strings
2435         * support/regression/tests/bitfields.c: exclude failing assertions for
2436           __CYGWIN32__ and __MINGW32__ hosts
2437
2438 2005-10-30 Borut Razem <borut.razem AT siol.net>
2439
2440         * src/SDCCutil.c: corrected double comparison typo
2441
2442 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
2443
2444         * device/lib/medium/Makefile: added for new memory model medium
2445         * device/include/asm/mcs51/features.h: updated for medium/pdata
2446         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
2447           added Multiply & Accumulate sbit's and MAC0_PAGE define
2448         * device/include/mcs51/c8051f300.h: added sfr16 definitions
2449         * device/include/mcs51/c8051f310.h: added sfr16 definitions
2450         * device/lib/_mullong.c: update for medium model
2451         * device/lib/incl.mk: added medium model
2452         * doc/sdccman.lyx: documented medium model
2453         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
2454         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
2455         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
2456         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
2457           (allocParms): set SCLS and OCLS to pdata for medium model
2458         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
2459           for pdata,
2460           (powof2): return <0 if not power of 2
2461         * src/avr/gen.c (genBitWise): use updated powof2
2462         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
2463           (shiftR2Left2Result): small optimization in setup, save acc when storing,
2464           (shiftLLeftOrResult): use B if necessary
2465         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
2466         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
2467         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
2468         * support/regression/Makefile.in: added test-mcs51-medium
2469         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
2470
2471 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2472
2473         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
2474         specifier unsigned
2475         * device/lib/time.c (mktime): fixed bug 1334315
2476
2477 2005-10-28 Raphael Neider <rneider AT web.de>
2478
2479         * device/include/pic/p16f_common.inc: added common declarations
2480         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
2481
2482 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2483
2484         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
2485           (aopPutUsesAcc): added to predict accumulator use,
2486           (assignResultValue): save acc if necessary,
2487           (genMinusDec): store result if indirectly addressed,
2488           (genDivOneByte):  save acc if necessary,
2489           (movLeft2Result): bugfix if left already in acc,
2490           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
2491             attention to accumulator use (esp. pdata),
2492           (genReceive): receive pdata correctly
2493         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
2494         * src/SDCCicode.h: added isOperandInPagedSpace prototype
2495
2496 2005-10-27 Raphael Neider <rneider AT web.de>
2497
2498         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
2499
2500 2005-10-27 Raphael Neider <rneider AT web.de>
2501
2502         * .version: changed version to 2.5.4
2503         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
2504         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
2505           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
2506             arithmetics support routines
2507         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
2508         * device/lib/Makefile.in: also create installdir for pic
2509
2510         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
2511           pic14 port as well
2512         * src/pic/device.c (dump_sfr): rewritten to delegate register
2513           placement to the linker (use `extern sym' rather than sym EQU addr),
2514           (validAddress): fixed to check last specified address
2515         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
2516           (popGetLit): truncate literal value to 8 bit,
2517           (popGet): moved assert to more appropriate place
2518           (popGetExternal): create pCode operand from and mark the according
2519             symbol as being `extern'
2520           (popGetAddr): added sanity check on immediate's offset, provide
2521             GPOINTER tag on demand
2522           (aopPut): fixed for immediates,
2523           (mov2w_op): move operand's address or contents to WREG (depending on
2524             operand type), safer variant of mov2w,
2525           (movwf,call_libraryfunc): NEW, handy abbreviations,
2526           (get_argument_pcop,get_return_val_pcop,pass_argument,
2527           get_returnvalue): interface for accessing function parameters and
2528             return values,
2529           (assignResultValuei,genRet): use new parameter/return value interface
2530           (pic14_getDataSize): back to old version handling generic pointers,
2531           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
2532             provided implementation and/or fixed old one,
2533           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
2534             calls, removed legacy 8051 reference code
2535           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
2536           (loadSignToC): NEW, move the operands sign bit to CARRY,
2537           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
2538             genRightShiftSigned, accepts negative shift counts,
2539           (setup_fsr): load FSR and adjust IRP (indirect memory access),
2540           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
2541             generic pointers, __data pointers and __code pointers,
2542           (genUnpackBits,genPackBits): rewritten to work with generic pointers
2543             and signed bitfields, limit bitfields to 8 bit,
2544           (genDataPointerGet): fixed number of bytes read,
2545           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
2546           (genPointerGet,genPointerSet): fixed handling of __code pointers,
2547             pointers to constant data are no longer assumed to point to __code
2548             space, removed invalid pointer types,
2549           (bitpatternFromVal): retrieve the PICs representation of an integer
2550             or float literal,
2551           (genDataPointerSet): fixed assigning to po_immediate operands,
2552           (genGenPointerSet): implemented as library call,
2553           (genIfx): fixed incorrect condition,
2554           (genAddrOf): limit generic pointers' addresses to 2 bytes,
2555             provide GPOINTER tag according to destination's storage class,
2556           (genCast): added code to handle casting to generic pointers, added
2557             sign-/zero extension of the result
2558           (aop_isLitLike,op_isLitLike): fixed handling of immediates
2559         * src/pic/gen.h: added macros to access IRP bit in STATUS register
2560         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
2561           extend the result
2562         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
2563           address/register resides in the shared banks
2564           (emitSymbolToFile): improved to handle global and `pinned' symbols,
2565             put all variables into separate sections (have the linker arrange
2566             them)
2567           (picglue): put init code and interrupt handlers in separate sections
2568         * src/pic/main.c: added port specific options table, modified to PORT
2569           structure to make GPOINTERs 3 byte, added pic14_options
2570           (_pic14_do_link): private linking routine (update paths to libraries,
2571             add libsdcc.lib by default)
2572         * src/pic/main.h: declare pic14_options
2573         * src/pic/pcode.c: fixed instructions i/o relations,
2574           (RegCond): reverted to correct version,
2575           (newpCodeOpLit): truncate literals to 8 bit,
2576           (genericPrint): added debug output,
2577           (getRegFromInstruction): fixed for various operand types, simplified
2578           (BuildFlow): fixed broken handling of isntructions with labels
2579           (LinkFlow): start at last instruction in flow (skip trailing comments),
2580             pass the flow on to the next instruction after CALL
2581           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
2582           (insertPCodeInstruction): fixed inserting after a skip instruction,
2583           (DoBankSelect): fixed for labeled instructions
2584           (OptimizepBlock): honor --nopeep switch
2585           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
2586         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
2587         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
2588           (pCodeOptime2pCodes): allow disabling this optimization via
2589             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
2590             but is still buggy), started implementation of a dataflow based
2591             pCode optimization (CSE + dead code elimination)
2592           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
2593         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
2594           names are independant of the stack location and therefore portable across
2595           devices
2596
2597 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2598
2599         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
2600           (selectSpil): fixed bug 1337835 by not spilling bit variables
2601         * support/regression/tests/bug1337835.c: added test for this bug
2602         * src/mcs51/peeph.def: restart after rule 3.c,
2603           addded rules 263.x to optimize loading constants
2604
2605 2005-10-26 Raphael Neider <rneider AT web.de>
2606
2607         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
2608         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
2609           (genAssign): emit warning when casting literals to generic pointer
2610             type, also applies when taking the address of a fixed variable,
2611           (genCast): improved casting to generic pointers
2612         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
2613           extern variables, added verbose error message
2614         * device/include/pic16/{string.h,errno.h}: added #pragma library c
2615
2616 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
2617
2618         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
2619         carry must be complemented too
2620         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
2621         could be emitted by genMinus
2622         * src/SDCCval.c (constVal): fixed bug 1305065
2623
2624 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
2625
2626         * src/SDCCast.c (addCast): added promotion for bit variables
2627         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
2628         promotion casts + optimisation
2629         (optimizeGetWord): fix warning 'i' might be used uninitialized
2630         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
2631         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
2632
2633 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2634
2635         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
2636         all chars are promoted to int; promotion should be handled in SDCCast.c
2637
2638 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2639
2640         * device/lib/_strcmp.c: Fixed bug 1326457
2641
2642 2005-10-11 Raphael Neider <rneider AT web.de>
2643
2644         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
2645         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
2646
2647 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2648
2649         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
2650         * support/regression/tests/sfr16.c: added test for the sfr32 bug
2651
2652 2005-10-04 Raphael Neider <rneider AT web.de>
2653
2654         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
2655           device/lib/pic16/pics.all: added pic18f1320
2656         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
2657
2658 2005-09-30 Raphael Neider <rneider AT web.de>
2659
2660         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
2661         * src/pic16/devices.inc: NEW, provides device descriptions
2662         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
2663
2664 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
2665
2666         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
2667           GETHBIT
2668
2669 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
2670
2671         * doc/sdccman.lyx: updated Highest Order Bit documentation,
2672           documented Any Order Bit, Higher Order Byte and Higher Order Word
2673         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
2674         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2675           (optimizeGetAbit): new, to get any bit, not only the high bit,
2676           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2677           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2678           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2679           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2680             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2681             GETABIT, GETBYTE, GETWORD: decorate them,
2682           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2683           (ast_print): added GETABIT, GETBYTE, GETWORD
2684         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2685         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2686           (geniCodeBinary): new generic binary icode,
2687           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2688         * src/port.h: updated comment for PORT.hasExtBitOp
2689         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2690           (genGetByte): new, to get a single byte,
2691           (genGetWord): new, to get a word from a long,
2692           (gen51Code): added GETABIT, GETBYTE, GETWORD
2693         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2694
2695 2005-09-23 Raphael Neider <rneider AT web.de>
2696
2697         * configure.in, configure: have device/lib/pic configured
2698         * device/lib/Makefile.in: added model-pic14
2699         * device/lib/clean.mk: added pic/ to clean rule
2700         * device/lib/pic: added rudimentary pic14 library providing support
2701           functions for multiplication/division/generic pointer access
2702         * src/SDCCopt.c (convilong): mark support functions as extern
2703           for pic14 port as well
2704         * src/pic/gen.c (genMult): added assertions,
2705           (genpic14Code): emit warning on unhandled iCodes
2706         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2707         * src/pic/pcode.c (pCodeOpCopy),
2708         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2709           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2710           SFR_REGISTER}), made safe for future extensions
2711         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2712           instructions even if preceeded by SKIP instructions (also remove
2713           them); removed unused code
2714         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2715           prevents leaving parts of the structure uninitialized after copying
2716
2717 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2718
2719         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2720           ago by me
2721         * support/regression/tests/addsub.c: added test for the bug
2722
2723 2005-09-21 Raphael Neider <rneider AT web.de>
2724
2725         * device/include/pic16/pic18f1220.h,
2726           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2727         * device/lib/pic16/Makefile.rules: added missing opening paren
2728         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2729           are provided in genutils.c,
2730           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2731           operand/result sizes,
2732           (genCmp): assert on NULL pointers first, then check deref'ed values
2733         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2734           result size
2735
2736 2005-09-18 Raphael Neider <rneider AT web.de>
2737
2738         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2739           as these are now unused,
2740           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2741         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2742           local, avoids uninitialized pointer dereference on r->name
2743         * src/pic16/ralloc.c (newReg): fixed indentation
2744
2745 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2746
2747         * src/SDCCval.c (constVal): fixed bug 730366
2748         * support/Util/SDCCerr.c,
2749         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2750
2751 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2752
2753         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2754
2755 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2756
2757         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2758
2759 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2760
2761         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2762           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2763         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2764           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2765         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2766         * packihx/packihx.c (hexDigit): made c unsigned char
2767         * as/mcs51/lklibr.c (fndsym),
2768         * link/z80/lkgb.c (gb),
2769         * link/z80/lklibr.c (fndsym),
2770         * link/z80/lkrloc.c (relr),
2771         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2772         * src/SDCC.lex (checkCurrFile, process_pragma),
2773         * src/SDCCglue.c (spacesToUnderscores),
2774         * src/SDCCmain.c (setParseWithComma, processFile),
2775         * src/asm.c (tvsprintf, printCLine),
2776         * src/avr/gen.c (emitcode, aopPut),
2777         * src/ds390/gen.c (emitcode),
2778         * src/hc08/gen.c (emitcode, emitinline),
2779         * src/mcs51/gen.c (emitcode, genInline),
2780         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2781           tokenizeLineNode),
2782         * src/pic/ralloc.c (debugLog),
2783         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2784           tokenizeLineNode),
2785         * src/pic16/ralloc.c (debugLog),
2786         * src/z80/main.c (_process_pragma):
2787            made all ctype.h function calls safe
2788         * src/SDCCopt.c: include math.h for fabs
2789         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2790           and used them throughout the code to make ctype.h function calls safe
2791         * src/ds390/main.c (asmLineNodeFromLineNode),
2792         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2793         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2794            unsigned char*
2795         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2796           (newpCodeAsmDir): made ctype.h function calls safe
2797         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2798           pic16_emitcode):  made lbp unsigned char*
2799         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2800           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2801         * src/xa51/gen.c (emitcode),
2802         * src/z80/gen.c (_emit2): made lbp unsigned char*
2803         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2804            char*
2805
2806 2005-09-05 Raphael Neider <rneider AT web.de>
2807
2808         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2809           access bank splitpoint
2810
2811 2005-09-05 Raphael Neider <rneider AT web.de>
2812
2813         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2814
2815 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2816
2817         * .version: changed to version 2.5.3
2818         * doc/sdccman.lyx: changed version to 2.5.3,
2819           documented --codeseg and --constseg and pragma codeseg and constseg,
2820           documented bit parameters (reentrant) and bit returning
2821         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2822            currFunc->recvSize, but is this ok for all ports?
2823           (ast2iCode): result of ~ on unsigned char must be cast to int for
2824            bool to work
2825         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2826           function pointers in bit space
2827         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2828           (processFuncArgs): call port.reg_parm() with reentrancy info
2829         * src/port.h,
2830         * src/avr/main.c,
2831         * src/ds390/main.c,
2832         * src/hc08/main.c,
2833         * src/pic/main.c,
2834         * src/pic16/main.c,
2835         * src/xa51/main.c,
2836         * src/z80/main.c: port.reg_parm prototype extended with
2837           "bool reentrant" parameter
2838         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2839           options.stackAuto for allocating bit register parameters
2840         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2841           (genSend): set BitBankUsed if it is,
2842           (selectRegBank): factored out of genCall for use in genPcall,
2843           (genCall): removed redundant dtype assignmen, use selectRegBank,
2844           (genPcall): handle returning in Carry properly, save in F0 if needed,
2845           (genReceive): handle bit register parameters
2846         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2847           (mcs51_assignRegisters): enable bit registers for all reentrant
2848            functions and don't set BitBankUsed unconditionally
2849         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2850         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2851         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2852
2853 2005-08-27 Borut Razem <borut.razem AT siol.net>
2854
2855         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2856         ppc-osx (Darwin) does not support -u option. It seems that it is
2857         supported only on Linux - GNU cp
2858
2859 2005-08-25 Borut Razem <borut.razem AT siol.net>
2860
2861         * sim/ucsim/gui.src/serio.src/Makefile.in,
2862           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2863           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2864           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2865           install and strip, since the strip at /usr/ccs/bin should be used
2866           on solaris
2867
2868 2005-08-24 Borut Razem <borut.razem AT siol.net>
2869
2870         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2871
2872 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2873
2874         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2875         ffffffffu
2876
2877 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2878
2879         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2880         * as/mcs51/lkmain.c (link_main): fixed warning
2881         * device/include/stdbool.h: ds390 has no advanced bit support yet
2882         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2883         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2884         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2885           and updated their macros
2886         * src/SDCCval.c (constVal): updated comment for renamed b_long
2887
2888 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2889
2890         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2891         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2892           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2893           (oprio): set priority for '['
2894         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2895            and adb_24_bit
2896         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2897         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2898         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2899         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2900           added overlayable BIT_BANK area
2901         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2902           (summary2): explain 'T' in legenda
2903         * as/mcs51/lkrloc.c: replaced old K&R style,
2904           (relr): added R_BIT processing,
2905           (errmsg): added "Bit-addressable relocation error",
2906           (adb_bit): added for converting from byte- to bit-addressable space,
2907           (adb_24_bit): added for converting from byte- to bit-addressable space
2908         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2909            used in reentrant functions now even as return value
2910         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2911         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2912           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2913         * src/SDCCglobl.h: added indicator BitBankUsed
2914         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2915            the bit registers b0-b7
2916         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2917           (geniCodeCast): fixed bug 1263853,
2918           (geniCodeLogicAndOr): put result in bool or char,
2919           (geniCodeReceive): added parameter func for accessing the return type,
2920           (geniCodeFunctionBody): pass func to geniCodeReceive
2921         * src/SDCCmain.c: added indicator BitBankUsed
2922         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2923         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2924           (checkSClass): don't put automatic bool/bit on stack,
2925           (checkFunction): removed check on function cannot return bit
2926         * src/SDCCsymt.h: added newBoolLink prototype
2927         * src/mcs51/gen.c (rb1regs): added bit registers,
2928           (movc): created for assigning to carry,
2929           (pushReg, popReg): created for pushing registers,
2930           (sameRegs): check both AOP_REG and AOP_CRY types,
2931           (aopOp): handle bit registers,
2932           (aopPut): optimization no self-assign,
2933           (saveRegisters): push reg->base (bits) only once for bit registers,
2934            and use pushReg,
2935           (unsaveRegisters): pop reg->base only once and use popReg,
2936           (assignResultValue): added parameter func and return in carry for bits,
2937           (genIpush): optimization no reload in A if not changed,
2938           (genSend): bit parameters in reentrant functions are passed in bit
2939            registers by first assigning to bits in B, then save registers and
2940            copy B to bits,
2941           (genCall): handle returning in Carry properly, save it in F0 if needed,
2942           (genPcall): updated assignResultValue call, this is not safe yet for bit
2943            returning function !!!
2944           (genFunction): don't generate equ's for bit registers and use pushReg,
2945           (genEndFunction): take care of bit returning functions and use popReg,
2946           (genRet): return bit in Carry,
2947           (genIfx): optimize bit registers and other directly addressable bits,
2948           (genReceive): updated assignResultValue call
2949         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2950           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2951            registers when using stack-auto
2952         * src/mcs51/ralloc.c (_G): added allBitregs,
2953           (regs8051): added the bit registers,
2954           (createStackSpil): use macro IS_BIT,
2955           (getRegBit): added to allocate a bit register, else spill,
2956           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2957           (updateRegUsage): factored out to ease stepping while debugging,
2958           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2959            also allocate bit registers,
2960           (fillGaps): handle bit registers,
2961           (findAllBitregs): added to create bit vector with all bit registers,
2962           (mcs51_allBitregs): returns this bit vector,
2963           (mcs51_assignRegisters): when using stack-auto use bit registers for
2964            passing parameters and creating local variables
2965         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2966
2967 2005-08-22 Borut Razem <borut.razem AT siol.net>
2968
2969         * device/lib/Makefile.in: replaced find option -or with -o
2970           to make it run on solaris
2971
2972 2005-08-22 Raphael Neider <rneider AT web.de>
2973
2974         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2975           fixes #1265442 (crash on Solaris)
2976
2977 2005-08-20 Borut Razem <borut.razem AT siol.net>
2978
2979         * configure, configure.in: added tests for libsocket and libnsl libraries,
2980           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2981           from support/regression/Makefile.in
2982         * support/regression/Makefile.in: added
2983         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2984         * sim/ucsim/libtool: regenerated on sparc-solaris
2985         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2986           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2987           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2988           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2989           sparc-solaris, which doesn't use GNU ld linker
2990         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2991         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2992
2993 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2994
2995         * src/mcs51/peeph.def: updated comments
2996
2997 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2998
2999         * device/lib/_gptrget.c,
3000         * device/lib/_gptrput.c: slightly shorter
3001         * doc/sdccman.lyx: incremented version
3002         * src/mcs51/peeph.def: moved peephole comments to the line of first
3003           change to better keep line correlation, reanimated 186.e
3004         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
3005
3006 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3007
3008         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
3009           David Saxton with quotes around file name.
3010
3011 2005-08-15 Borut Razem <borut.razem AT siol.net>
3012
3013         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
3014           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
3015           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
3016           make tests run on x86_64 platform
3017
3018 2005-08-13 Raphael Neider <rneider AT web.de>
3019
3020         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
3021           as it might be executed DURING a build (parallel make is wonderful)
3022
3023 2005-08-13 Raphael Neider <rneider AT web.de>
3024
3025         * device/lib/Makefile.in (port-specific-objects-pic16):
3026           revert to cp $(PORT)/bin/*.* $(PORTDIR)
3027         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
3028           dependency
3029         * device/lib/pic16/Makefile.rules: build subdirs before creating
3030           the library, removed builddir rule, create $(builddir) early in
3031           recurse rule, use empty recurse rule for leaf directories
3032         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
3033           mkdir errors (race condition), removed duplicate suffix "hex"
3034           from clean rules
3035         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
3036         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
3037           prevents mkdir -p from aborting on Alpha
3038
3039 2005-08-12 Raphael Neider <rneider AT web.de>
3040
3041         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
3042           db-statements in order to allow for arrays of pointers in code
3043           sections to be placed without interspersed 0-padding, fixes
3044           bug #1256215
3045         * (emitStatistics): fixed division by zero for pic18f1220
3046         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
3047           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
3048         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
3049         * (pic16_pCodeConstString): keep track of already emitted string
3050           literals to prevent "duplicate definitions of symbol _str_NR"
3051         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
3052           debug message
3053         * device/lib/Makefile.in: ignore failing PIC16 library builds
3054         * device/lib/pic16/Makefile: do not build if gputils are missing
3055         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
3056
3057 2005-08-10 Raphael Neider <rneider AT web.de>
3058
3059         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
3060           my last commit)
3061
3062 2005-08-10 Raphael Neider <rneider AT web.de>
3063
3064         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
3065           Rokas' patch to add the new fixed point type "__fixed16x16"
3066         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
3067           functions for __fixed16x16 arithmetics
3068         * device/lib/pic16: reimplemented the build system to support
3069           a separate build directory, better handling of libio (create
3070           the library in a separate subdir for each architecture) and
3071           easier configuration (centralized in Makefile.common)
3072
3073 2005-08-07 Raphael Neider <rneider AT web.de>
3074
3075         * src/pic16/gen.c (genrshTwo): fixed sign extension
3076         * src/pic16/device.c: added pic18f2320, 4220 and 4320
3077         * device/include/pic16/pic18f2220.h: changed some bit definitions,
3078           added T0CONbits
3079         * device/include/pic16/pic18f4220.h: NEW, header for
3080           pic18f4220 and pic18f4320
3081         * device/include/pic16/pic18fregs.h: added new devices,
3082           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
3083         * device/include/pic16/signal.h: resolved name clashes
3084           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
3085           to also allow testing for interrupt enable bits, added
3086           comments on how to use the macros
3087         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
3088         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
3089           register definitions for the devices
3090         * device/lib/pic16/pics.all: added new devices
3091         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
3092           allocated memory
3093         * device/lib/pic16/libc/stdlib/memfree: do not count
3094           the block header as free memory
3095         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
3096           simplified and added missing end-of-blocklist-marker
3097           (reported by Peter Onion, fixes #1252814)
3098         * (_mergeHeapBlock): fixed loop condition
3099         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
3100           len==0, restructured code
3101         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
3102           up a bit, reduced bitfield accesses, prevent endless loops
3103           in case of heap corruption
3104         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
3105           "unreferenced arguments/must return a value" warnings
3106         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
3107           replaced BAUDREG with SPBRG
3108         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
3109           device/lib/pic16/debug/gstack/gstack.c: replaced
3110           _naked, _asm, _endasm with __naked, __asm, __endasm
3111
3112 2005-08-05 Raphael Neider <rneider AT web.de>
3113
3114         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
3115           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
3116
3117 2005-08-05 Borut Razem <borut.razem AT siol.net>
3118
3119         * device/lib/Makefile.in: added missing ';'
3120         * configure: removed ^M characters
3121
3122 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3123
3124         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
3125           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
3126           License
3127
3128 2005-08-04 Borut Razem <borut.razem AT siol.net>
3129
3130         * configure.in: pic16 libraries build 2nd try - enable running
3131           configure in device/lib/pic16
3132         * configure: regenerated from configure.in
3133         * device/lib/Makefile.in: create $(PORT)/bin directory
3134
3135 2005-08-03 Raphael Neider <rneider AT web.de>
3136
3137         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
3138           to get/set values via pointers
3139         * (genUnpackBits,genPackBits): changed detection of
3140           ptr->bitfield vs. sym.bitfield, fixed access via generic
3141           pointers, removed dead (wrong) code for multibyte bitfields
3142         * (genNearPointerGet, genGenPointerGet): removed useless code,
3143           fixed bitfield detection, fixes #1250594
3144         * (genNearPointerSet): removed useless code
3145         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
3146           and introduced macro pic16_emitpcode that conditionally emits
3147           the origin of the following pCode (useful for debugging SDCC)
3148         * src/pic16/pcode.c: changed (and disabled) some debug outputs
3149         * (createDefmap): fixed handling of LFSR for --optimize-df
3150
3151 2005-08-02 Borut Razem <borut.razem AT siol.net>
3152
3153         * device/lib/Makefile.in: pic16 libraries build enabled since
3154           gputils-0.13.2 are now localy installed at sourceforge's compile farm
3155
3156 2005-08-02 Raphael Neider <rneider AT web.de>
3157
3158         * src/pic16/gen.c (genPackBits): removed deprecated warning
3159         * (genGenPointerSet): fixed bitfield detection
3160
3161 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3162
3163         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
3164
3165 2005-07-31 Raphael Neider <rneider AT web.de>
3166
3167         * device/lib/pic16/libdev/pic18f458.c,
3168           device/include/pic16/pic18f458.h: added missing T0CONbits
3169
3170 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3171
3172         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
3173
3174 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
3175
3176         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
3177
3178 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3179
3180         * device/include/mcs51/at89c51ed2.h: added.
3181
3182 2005-07-23 Raphael Neider <rneider AT web.de>
3183
3184         * src/pic/gen.h: added emitpcode macro for debugging
3185         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
3186           and replace by macro adding debug information on demand
3187         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
3188         * (gencjne): tried to fix; replaced with correct (slower) code
3189         * (gen{Unp,P}ackBits): fixed single bit access
3190         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
3191         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
3192           previous instruction
3193         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
3194           register has to be handled with care (forbidding movement
3195           of assignments/uses, removing assignments completely, ...)
3196         * (pCodeOptime2pCodes): make use of regIsSpecial
3197         * added lots of debugging output (commented out)
3198         * src/pic/rallloc.c (deassignLRs): prevent operand registers
3199           from being reused as result UNLESS it is known to work
3200
3201 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
3202
3203         * support/Util/dbuf.h: include <stddef.h> for size_t
3204         * .version: changed to version 2.5.2
3205
3206 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3207
3208         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
3209
3210 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3211
3212         * src/hc08/gen.c (genMinus): fixed bug #1241835,
3213           (genModOneByte): removed needless psha/pula
3214
3215 2005-07-22 Raphael Neider <rneider AT web.de>
3216
3217         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
3218           have PIC14 handled like PIC16, fixes broken pic14 linker calls
3219         * src/pic/gen.c (resolveIfx): do not "invent" labels
3220         * (genSkipc): changed to positive logic
3221         * (genSkipCond): removed as no longer needed
3222         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
3223           backport from PIC16
3224         * (genLeftShift): check operands are in different registers
3225         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
3226           INCF does not update CARRY...
3227         * src/pic/main.c: fixed _linkCmd
3228         * src/pic/pcode.c (unlinkpCode): added inactive code
3229         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
3230           alive (do not assign result and operand overlapping registers)
3231
3232 2005-07-22 Raphael Neider <rneider AT web.de>
3233
3234         * src/pic/device.c (dump_sfr): replaced register declaration with
3235           call to emitSymbolToFile() to avoid duplicate symbols
3236         * (assignRelocatableRegisters): do not declare external symbols
3237         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
3238           right (take size of type, not etype)
3239         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
3240         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
3241         * (packRegsForAccUse): disabled assignment of WREG as
3242           the result reg to prevent occurence of just fixed #1235003,
3243           fixes #1242954
3244         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
3245           symbols (avoids duplicate symbols in .asm file)
3246         * (pic14emitRegularMap): use emitSymbolToFile()
3247         * src/pic/gen.c (aopOp): fixed spillLocation handling
3248         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
3249         * (genDataPointerSet): removed unneccessary variables/output
3250
3251 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
3252
3253         * as/mcs51/lkarea.c: enlarged codemap for banked memory
3254         * device/lib/mcs51/crtbank.asm: added # to 0x0F
3255
3256 2005-07-21 Raphael Neider <rneider AT web.de>
3257
3258         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
3259           architecture cannot handle them efficiently, fixes bug #1235003
3260         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
3261           check for empty sets before using them (fixes bug #1232190)
3262
3263 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
3264
3265         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
3266           (lnksect2): generate warnings for memory overlap
3267         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
3268           constseg to set the name of these segments so you can instruct the linker
3269           to place them in banks
3270         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
3271         * src/SDCCglobl.h: added MODEL_HUGE to enum,
3272           added code_seg and const_seg to options
3273         * src/SDCCglue.c (emitMaps): use options.const_seg,
3274           (createInterruptVect): put interrupt vectors in segment HOME,
3275           (glue): put HOME before static segment and put the main glue in HOME,
3276           (glue): use options.code_seg
3277         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
3278         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
3279           these segments so you can instruct the linker to place them in banks
3280           (linkEdit): use code_loc for HOME segment which should be the first
3281           segment in code memory now
3282         * src/SDCCmem.c: fixed more stuff like bug 1238386
3283         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
3284           (changePointer): don't change function pointers to code pointers for
3285           banked functions,
3286           (compareType): added exceptional check for banked function pointers
3287         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
3288         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
3289           after static in code memory
3290         * src/mcs51/gen.c: added aopLiteralLong prototype,
3291           (aopForSym): use getSize for functions,
3292           (genCall): generate banked calls over one trampoline __sdcc_banked_call
3293           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
3294           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
3295           the segment,
3296           (genPcall): use call for literal function pointers and generate banked
3297           calls over the one trampoline so there's only one place for the user to
3298           modify according to his/hers hardware,
3299           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
3300           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
3301         * src/mcs51/main.c: added keyword banked,
3302           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
3303         * support/Util/SDCCerr.c,
3304         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
3305           needed for passing the bank and address to the trampoline
3306         * device/lib/mcs51/crtbank.asm: added for bankswitching
3307         * device/lib/mcs51/Makefile: added crtbank
3308
3309 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3310
3311         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
3312           for fields at offset 0 of a struct or union as reported
3313           on 2005-07-07 in the developer mailing list.
3314
3315 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
3316
3317         * src/SDCCmem.c: fixed bug 1238386
3318
3319 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3320
3321         * src/mcs51/peeph.def: added labelrefcounting for peepholes
3322           (patch #1144962), added peephole 300, enabled 259.x
3323         * doc/sdccman.lyx: removed screenshot and provided link instead
3324
3325 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3326
3327         * doc/sdccman.lyx: added section about debugging with ddd
3328         * doc/figures/ddd_example.eps: screenshot of debugging session
3329
3330 2005-07-04 Raphael Neider <rneider AT web.de>
3331
3332         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
3333           like CODE pointers, fixes #1115683
3334         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
3335           call, fixes bugs #1232211, #1228110,
3336           fixed wrong casts to pCodeFlow from pCodeInstructions
3337
3338 2005-07-04 Raphael Neider <rneider AT web.de>
3339
3340         * src/pic/gen.c (popGet): changed assert to allow for
3341           bit operands
3342         * (popGetAddr): changed signature to provide
3343           an additional index, patched all call sites
3344         * (genCmpEq): handle literal-like operands correctly
3345         * (genAddrOf): added sanity checks on __code/__data pointers
3346         * (genAssign): added handling of symbols from __code section
3347         * (gencjne): do not generate code for comparisons whose result
3348           is neither stored nor used, fixes bug #1171114
3349         * (AccLsh, AccRsh): operate on operand instead of WREG
3350         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
3351           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
3352           by known count
3353         * rewrote complete shift-by-literal logic, commented unused
3354           functions out
3355         * (genConstPointerGet): get multiple bytes (if result size > 1),
3356           fixed handling of non-immediate addresses
3357         * (genPointerGet): handle CODE pointers like CONST pointers
3358         * (genpic14Code): insert C-SRC lines as Cource-pCodes
3359         * ({aop,op}_isLitLike): NEW, single place to decide whether an
3360           operand is to be treated as a literal or not
3361         * (mov2w,genPcall,genCmpEq),
3362           src/pic/genarith.c: use aop_isLitLike() to decide between
3363           literal/register contents
3364         * (addSign): added missing offset
3365         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
3366           only emit comment in debug-mode,
3367           use {aop,op}_isLitLike throughout the file
3368         * src/pic/glue.c: fix initializers for pointers (work in progress)
3369         * src/pic/pcode.c (get_op): honor index on _const symbols
3370         * ({reset,dump}pCodeStatistics): NEW, estimate code size
3371         * (dumppBlock): added pCode size estimation
3372         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
3373           check for IS_SYMOP before OP_SYMBOL'ing
3374         * fixed indentation, compacted switch-statements
3375         * (allocReg): find free register and allocate it instead of
3376           allocating new registers all the time
3377         * (deassignLRs): prevent POINTER_GET's from being assigned the same
3378           registers as its operands (necessary only for multibyte GETs)
3379
3380 2005-07-01 Raphael Neider <rneider AT web.de>
3381
3382         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
3383           debugging .asm-output macros FENTRY + FEXIT
3384         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
3385           way... I wonder...
3386         * (emitpComment): NEW, printf to pCode
3387         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
3388           offset handling
3389         * (popGetAddr): NEW, variant of popGet to access an immediates
3390           high(er) bytes instead of the n'th byte of memory they reference,
3391           replaced popGet with popGetAddr where neccessary
3392         * (genDataPointerGet): reactivated and fixed implementation
3393         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
3394           accesses
3395         * (genDataPointerSet): fixed multibyte assignments
3396         * (genpic14Code): fixed --i-code-in-asm handling
3397         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
3398         * (genPlus): fixed index-out-of-bounds error
3399         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
3400         * src/pic/ralloc.c: added debugging output macro FENTRY2
3401         * (spillThis): fixed indentation, enbraced for-body for clarity
3402         * (rematStr): commented out as now unused
3403         * (regTypeNum): commented out special spill case (overwrites
3404           arbitrary values)
3405         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
3406
3407 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
3408
3409         * doc/sdccman.lyx: documented sfr16/sfr32,
3410           added example for using storage class with function pointers
3411         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
3412
3413 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
3414
3415         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
3416         * device/lib/_itoa.c,
3417         * device/lib/_ltoa.c: optimized codesize
3418         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
3419           but don't know how to suppress the double warning.
3420         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
3421         * support/Util/SDCCerr.c,
3422         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
3423
3424 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
3425
3426         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
3427           fixed old K&R prototypes
3428         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
3429         * device/lib/_gptrget.c,
3430         * device/lib/_gptrgetc.c,
3431         * device/lib/_gptrput.c: changed versions for new memory indicator values,
3432           also new versions for small generic pointers and banked generic pointers
3433         * src/port.h: added const_name
3434         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
3435         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
3436         * src/SDCCcse.c (findPrevIc): check all associative operators
3437         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
3438         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
3439         * src/SDCCmem.c: updated comments,
3440           set far-space to 0 for pdata, results in optimized code
3441         * src/SDCCmem.h: added macro CONST_NAME
3442         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
3443           moving the info into the highest bits, see also gptrget/gptrput
3444         * src/src.dsp: added sdcc.ico to project files
3445         * src/avr/gen.c (genCast): fixed bug 0x%d
3446         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
3447         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
3448           relation between ptr_type and DCL_TYPE,
3449           (genCast): fixed bug 0x%d
3450         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
3451           (CODE)" for const_name
3452         * src/hc08/gen.c (genCast): fixed bug 0x%d
3453         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
3454           (hc08_port): added "CONST (CODE)" for const_name
3455         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
3456           (aopForRemat, adjustArithmeticResult): disconnected direct relation
3457           between ptr_type and DCL_TYPE,
3458           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
3459           operand* and took AOP() inside function so sfr-ness can be checked,
3460           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
3461           new prototype,
3462           (genFunction, genEndFunction): optimized stack setup,
3463           (genMinus): optimized for literals with ending zeroes (in bytes),
3464           (genCast): fixed bug 0x%d
3465         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
3466           (mcs51_port): added "CONST (CODE)" for const_name
3467         * src/mcs51/peeph.def: made rule 226 more generic
3468         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
3469         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
3470         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
3471         * src/z80/main.c (z80_port): added NULL for const_name,
3472           (gbz80_port): added NULL for const_name
3473         * support/regression/tests/bug663539.c,
3474         * support/regression/tests/sfr16.c: new tests
3475
3476 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3477
3478         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
3479
3480 2005-06-24 Raphael Neider <rneider AT web.de>
3481
3482         * device/lib/pic16/libdev/pic18f[68][567]20.c:
3483           corrected typos...
3484         * device/include/pic16/signal.h: added USBIF
3485           and SIG_USB
3486
3487 2005-06-24 Raphael Neider <rneider AT web.de>
3488
3489         * device/lib/pic16/libdev/pic18f2455.c,
3490           device/include/pic16/pic18f2455.h: NEW
3491         * device/include/pic16/pic18fregs.h,
3492           device/lib/pic16/pics.all,
3493           src/pic16/device.c: added 18f2455
3494         * device/lib/pic16/libdev/pic18f[68][567]20.c,
3495           device/include/pic16/{pic18f[68][567].h,usart.h}:
3496           replaced MULTIPLE_USARTS define with more relaible
3497           compatibility sfrs (for USART access)
3498
3499 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
3500
3501         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
3502           and the output asm file line is printed on two lines.
3503
3504 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3505
3506         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
3507           BGT, BLE, BHI, and BLS instructions
3508         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
3509           genCmpEq): removed
3510         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
3511           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
3512           fixes bug #1216342
3513         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
3514
3515 2005-06-15 Raphael Neider <rneider AT web.de>
3516
3517         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
3518         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
3519         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
3520           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
3521           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
3522
3523 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3524
3525         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
3526           Marcel Telka in bug #1215704
3527
3528 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
3529
3530         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
3531           located in shared memory bank.
3532
3533 2005-05-31 Raphael Neider <rneider AT web.de>
3534
3535         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
3536           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
3537           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
3538
3539 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
3540
3541         * device/lib/_strncpy.c: fixed the fix
3542
3543 2005-05-26 Raphael Neider <rneider AT web.de>
3544
3545         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
3546           initializers with \0, bug #1208187
3547         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
3548           intializers with \0, bug #1208187
3549
3550 2005-05-26 Raphael Neider <rneider AT web.de>
3551
3552         * src/pic16/glue.c (pic16_printIvalChar): fixed string
3553           initializers with \0, bug #1208187
3554         * src/pic16/main.c (_process_pragma): added sanity checks
3555           for stack position and size, emit warnings when appropriate
3556
3557 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
3558
3559         * device/lib/_strncpy.c: fixed not filling with \0
3560
3561 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3562
3563         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
3564           createFunction),
3565         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
3566           compound_statement),
3567         * src/SDCCsymt.h,
3568         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
3569
3570 2005-05-24 Raphael Neider <rneider AT web.de>
3571
3572         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
3573
3574 2005-05-24 Raphael Neider <rneider AT web.de>
3575
3576         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
3577           TRISE definitions, closes bug #1162453
3578
3579 2005-05-22 Raphael Neider <rneider AT web.de>
3580
3581         * src/pic16/main.c (_process_pragma): check for missing
3582           arguments to pragmas code and udata
3583         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
3584           consistency fixes to match other headers (thanks to Jim Paris)
3585         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
3586
3587 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
3588
3589         * src/SDCCicode.c (isOperandEqual): fixed missing ;
3590
3591 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
3592
3593         * support/regression/tests/bug1198642.c: new test
3594         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
3595         * src/SDCCcse.c (findPrevIc): added comment, please have a look
3596         * support/scripts/resource.h,
3597         * support/scripts/resource.rc,
3598         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
3599         * support/scripts/sdcc.ico: added 32x32 icon
3600
3601 2005-05-18 Raphael Neider <rneider AT web.de>
3602
3603         * device/lib/pic16/libdev/pic18f*.c,
3604         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
3605           keywords to "__sfr" and "__at (X)"
3606         * device/include/pic16/pic18fregs.h: added pic18f4520
3607         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
3608           #1203088 (MPLAB compatibility)
3609
3610 2005-05-17 Raphael Neider <rneider AT web.de>
3611
3612         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
3613         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
3614         * device/lib/pic16/pics.all: added new devices
3615         * src/pic16/device.c: added support for pic18f4520
3616
3617 2005-05-16 Raphael Neider <rneider AT web.de>
3618         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
3619         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
3620         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
3621           convenience function for bit access
3622
3623 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3624
3625         * device/lib/printf_large.c: fixed bug 1193299
3626         * support/regression/tests/bug1057979.c: added test %3.3s
3627
3628 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3629
3630         * device/include/mcs51/8051.h,
3631         * device/include/mcs51/8052.h: made parseable with lint
3632         * device/include/mcs51/lint.h: added include file for (sp)lint
3633         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
3634         * doc/cdbfileformat.lyx,
3635         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
3636
3637 2005-05-14 Raphael Neider <rneider AT web.de>
3638
3639         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
3640         * device/lib/pic16/libc/stdlib/itoa.c (new)
3641         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
3642         * device/lib/pic16/libio/Makefile: exclude subdir according to
3643           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
3644         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
3645         * src/pic16/gen.c (genFunction): prevent annoying warning
3646         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
3647           nameclashes on BeOS
3648         * support/cpp2/cppmain.c (cpp_output_string): new
3649         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
3650           fixes bug 1116802
3651
3652 2005-05-13 Borut Razem <borut.razem AT siol.net>
3653
3654         * src/SDCCmain.c (linkEdit): fixed bug 1195202
3655
3656 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3657
3658         * .version: changed to version 2.5.1; back to bleeding edge development
3659
3660 2005-05-11 Borut Razem <borut.razem AT siol.net>
3661
3662         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
3663           generate PDF version 1.3 documents
3664
3665 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3666
3667         * .version: changed to version 2.5.0
3668
3669 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3670
3671         * doc/sdccman.lyx: updated weblinks, index and smaller updates
3672
3673 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3674
3675         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3676         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3677         well as many smaller updates.
3678         * .version: changed to version 2.5.0-pre1
3679
3680 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3681
3682         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3683
3684 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3685
3686         * support/regression/tests/bug1185672.c: added
3687         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3688           bug 1185672
3689         * src/mcs51/gen.c (genCall): added comments, made it look safer
3690         * src/mcs51/gen.c (genEndFunction): simplified
3691
3692 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3693
3694         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3695
3696 2005-04-14 Borut Razem <borut.razem AT siol.net>
3697
3698         * fixed bug 1045046 - SIGSEGV with really simple code?:
3699           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3700           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3701
3702 2005-04-14 Borut Razem <borut.razem AT siol.net>
3703
3704         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3705           src/pic16/device.h: temporarily disabled experimental #inline pragma
3706           for 2.5.0 release
3707
3708 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3709
3710         * device/include/z80/stdio.h,
3711         * device/include/z80/string.h: removed these highly incomplete files so
3712           SDCC can use the default ones in device/include/
3713
3714 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3715
3716         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3717         gcc warning.
3718         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3719         fix sdcpp warnings.
3720
3721 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3722
3723         * device/include/malloc.h: removed redundant __reentrant prototypes
3724         * device/lib/_mullong.c: added working xstack variant in asm (C version
3725           doesn't pass regression tests)
3726         * device/lib/bpx.c: used __data and made bpx char for mcs51
3727         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3728           (createFunction): fixed bug with xstackPtr
3729         * src/SDCCcse.c: corrected comments
3730         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3731           (killDeadCode, eBBlockFromiCode): removed unused code
3732         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3733           corrected comments
3734         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3735           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3736           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3737           (genModOneByte): fixed warning in MSVC
3738         * src/mcs51/main.c (): added comments
3739         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3740
3741 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3742
3743         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3744
3745 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3746
3747         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3748
3749 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3750
3751         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3752         characters arrays of larger size than the declared one.
3753
3754 2005-04-10 Borut Razem <borut.razem AT siol.net>
3755
3756         * src/pic/gen.c (genInline),
3757           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3758           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3759           (findNextInstruction), (findPrevInstruction),
3760           (findInstructionUsingLabel),
3761           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3762         * src/pic/pcode.c (findLabel): added missing '\n'
3763         * src/src.dsp: added SDCCdwarf2.c to the project
3764
3765 2005-04-09 Borut Razem <borut.razem AT siol.net>
3766
3767         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3768
3769 2005-04-08 Raphael Neider <rneider AT web.de>
3770
3771         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3772           into the chain after a given one) and mergeDefmapSymbols (combine
3773           defmap entries for each symbol per pcode)
3774         * (createDefmap): have defmap entries merged in the end
3775         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3776           a symbol before replacing one access type's symbol, merge symbols in
3777           the end (replacement symbol might already have an entry)
3778         * (assignValnums): keep reference to written WREG intact
3779
3780 2005-04-08 Raphael Neider <rneider AT web.de>
3781
3782         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3783           Alpha)
3784
3785 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3786
3787         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3788         bytes
3789
3790 2005-04-07 Raphael Neider <rneider AT web.de>
3791
3792         * device/include/pic16/usart.h: added compatibility defines for
3793           devices with more than one USART
3794         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3795
3796 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3797
3798         * device/lib/Makefile.in: updated for port specific include
3799
3800 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3801
3802         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3803
3804 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3805
3806         * device/include/8051.h,
3807         * device/include/8052.h,
3808         * device/include/at89S8252.h,
3809         * device/include/at89c55.h,
3810         * device/include/at89x051.h,
3811         * device/include/at89x51.h,
3812         * device/include/at89x52.h,
3813         * device/include/mcs51reg.h,
3814         * device/include/reg51.h,
3815         * device/include/reg764.h,
3816         * device/include/regc515c.h,
3817         * device/include/sab80515.h: (re)moved these 12 files
3818         * device/include/mcs51/8051.h,
3819         * device/include/mcs51/8052.h,
3820         * device/include/mcs51/at89S8252.h,
3821         * device/include/mcs51/at89c55.h,
3822         * device/include/mcs51/at89x051.h,
3823         * device/include/mcs51/at89x51.h,
3824         * device/include/mcs51/at89x52.h,
3825         * device/include/mcs51/mcs51reg.h,
3826         * device/include/mcs51/reg51.h,
3827         * device/include/mcs51/reg764.h,
3828         * device/include/mcs51/regc515c.h,
3829         * device/include/mcs51/sab80515.h: and added them here
3830
3831 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3832
3833         * device/include/stdarg.h: changed SDCC specific keywords to double
3834           underlined form.
3835         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3836           mcs51 and ds390.
3837         * device/include/hc08/mc68hc908gp32.h,
3838         * device/include/hc08/mc68hc908jb8.h,
3839         * device/include/hc08/mc68hc908jkjl.h,
3840         * device/include/hc08/mc68hc908qy.h: fixed comments
3841         * device/include/mcs51/README: updated
3842         * device/include/mcs51/c8051f120.h: added PINRSF
3843         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3844         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3845           amidst code. Also inline is not supported.
3846
3847 2005-04-06 Raphael Neider <rneider AT web.de>
3848
3849         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3850         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3851           callers stack/frame pointers
3852
3853 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3854
3855         * device/include/pic16/usart.h: added, missing in previous commit,
3856         * device/include/pic16/adc.h: fixed typo,
3857         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3858         commit,
3859         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3860         <p18fxxx.inc>
3861         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3862         uninitialized because a bug appears with gplink
3863         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3864         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3865         complains for unrecognised option
3866
3867 2005-04-05 Raphael Neider <rneider AT web.de>
3868
3869         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3870           structs as well (using memcpy)
3871         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3872           on ISRs (GOTO has no label)
3873         * src/pic16/device.h: added OF_OPTIMIZE_DF
3874         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3875           new data flow analysis/optimization
3876         * src/pic16/pcode.c: added (prototypes for and implementation of)
3877           dataflow analysis functions, fixed pCodeInstructions' inCond and
3878           outCond values, made RCALL a branch instruction
3879         * (pic16_unlinkpCode): keep C line if possible
3880         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3881           C line moved if possible
3882         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3883         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3884           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3885         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3886           new flow)
3887         * (pic16_getJumptabpCode): NEW, needed in...
3888         * (LinkFlow): fixed handling of jumptables, calls and conditional
3889           branches
3890         * (pic16_InsertCommentAfter): NEW
3891         * (pic16_pCodeReplace): made verbose and flow preserving
3892         * (AnalyzeFlow): added call to data flow analysis
3893         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3894         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3895         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3896
3897 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3898
3899         * src/SDCCast.c (decorateType): fixed bug #1105626
3900
3901 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3902
3903         * device/include/asm/pic16/features.h,
3904         * pic18f*.h headers,
3905         * device/include/pic16/adc.h,
3906         * device/include/pic16/delay.h,
3907         * device/include/pic16/i2c.h,
3908         * device/include/pic16/malloc.h,
3909         * device/include/pic16/stdio.h,
3910         * device/include/pic16/stdlib.h,
3911         * device/include/pic16/string.h,
3912         * device/lib/pic16/libc/stdio/printf_tiny.c,
3913         * device/lib/pic16/libc/stdio/printf_small.c,
3914         * device/lib/pic16/libc/stdio/strmgpsim.c,
3915         * device/lib/pic16/libc/stdio/strmmssp.c,
3916         * device/lib/pic16/libc/stdio/strmusart.c,
3917         * device/lib/pic16/libc/stdio/vfprintf.c,
3918         * device/lib/pic16/libc/stdlib/ltoa.c,
3919         * device/lib/pic16/libc/stdlib/putchar.c,
3920         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3921         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3922         * device/lib/pic16/libc/stdlib/memchrram.c,
3923         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3924         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3925         * device/lib/pic16/libio/adc/adcbusy.c,
3926         * device/lib/pic16/libio/adc/adcread.c,
3927         * device/lib/pic16/libio/adc/adcsetch.c,
3928         * device/lib/pic16/libio/usart/ubaud.c,
3929         * device/lib/pic16/libio/usart/ubusy.c,
3930         * device/lib/pic16/libio/usart/udrdy.c,
3931         * device/lib/pic16/libio/usart/uopen.c,
3932         * device/lib/pic16/libio/usart/uputc.c,
3933         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3934         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3935         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3936         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3937         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3938         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3939         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3940         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3941         specific keywords to double underlined form,
3942         * device/lib/pic16/libc/Makefile.rules,
3943         * device/lib/pic16/libsdcc/Makefile.rules,
3944         * device/lib/pic16/libm/Makefile,
3945         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3946         to compile with C standard set in Makefile.common
3947         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3948         rand.c and crc.c in compilation process,
3949         * device/lib/pic16/libsdcc/int/divuint.c,
3950         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3951         `c' from signed to unsigned,
3952         * device/lib/pic16/startup/crt0.c,
3953         * device/lib/pic16/startup/crt0i.c,
3954         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3955         keywords to double underlined form, bug fixes in _do_cinit function
3956         which prevented the correct initialization of the .idata segment,
3957         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3958         core to enter a infinite loop
3959         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3960
3961 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3962
3963         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3964
3965 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3966
3967         * device/include/Makefile.in: add support for hc08 subdirectory
3968         * device/include/hc08/: new subdirectory
3969         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3970         Lucas Loizaga, thanks!
3971         * device/include/hc08/mc68hc908qy.h,
3972         * device/include/hc08/mc68hc908gp32.h,
3973         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3974         their own directory. Changed internal macro names to use the compiler
3975         reserved namespace. Changed SDCC specific keywords to double
3976         underlined form.
3977         * device/include/math.h,
3978         * device/include/malloc.h,
3979         * device/include/stdarg.h,
3980         * device/include/stdbool.h
3981         * device/include/string.h,
3982         * device/include/tinibios.h,
3983         * device/include/ds400rom.h,
3984         * device/include/8051.h,
3985         * device/include/8052.h,
3986         * device/include/80c51xa.h,
3987         * device/include/at89c55.h,
3988         * device/include/at89S8252.h,
3989         * device/include/at89x51.h,
3990         * device/include/at89x52.h,
3991         * device/include/ds80c390.h,
3992         * device/include/reg764.h,
3993         * device/include/regc515c.h,
3994         * device/include/sab80515.h,
3995         * device/include/mcs51/c8051f000.h,
3996         * device/include/mcs51/c8051f018.h,
3997         * device/include/mcs51/c8051f020.h,
3998         * device/include/mcs51/c8051f040.h,
3999         * device/include/mcs51/c8051f060.h,
4000         * device/include/mcs51/c8051f120.h,
4001         * device/include/mcs51/c8051f300.h,
4002         * device/include/mcs51/c8051f310.h,
4003         * device/include/mcs51/c8051f320.h,
4004         * device/include/mcs51/c8051f330.h,
4005         * device/include/mcs51/c8051f350.h,
4006         * device/include/z180.h: Changed SDCC specific keywords to double
4007         underlined form.
4008
4009 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
4010
4011         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
4012         18F4455,
4013         * (pic16_assignConfigWordValue): disable testing of configuration
4014         register value with config mask,
4015         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
4016         function with port->fun_prefix,
4017         * (genFunction): when generating a naked interrupt function never
4018         create an absolute segment placed in interrupt vector address, place
4019         the actual interrupt function at IVA instead, when an interrupt
4020         function is generated with unspecified interrupt then do not create
4021         the absolute section,
4022         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
4023         code for generating a call to generic pointer get/put function with
4024         a call to function pic16_callGenericPointer(),
4025         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
4026         the call to the generic pointer get/put functions with prefixing the
4027         function name with port->fun_prefix,
4028         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
4029         * src/pic16/main.c (_process_pragma): prefix function with
4030         port->fun_prefix,
4031         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
4032         calling assembler, old 18Fxxxx macro is deprecated,
4033         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
4034         PC_ASMDIR in while condition,
4035         * (findInstruction): add PC_ASMDIR in while condition,
4036         * (buildCallTree): prefix main with port->fun_prefix,
4037         * (pic16_pCode2str): fixed bug that didn't emit the memory access
4038         identifier for variable with banked access in instructions BTFSS,
4039         BTFSC, BCF, BSF, BTG
4040         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
4041         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
4042         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
4043         perform optimization when enviroment variable NO_REG_OPT is set,
4044         * (insideLRBlock): NEW, return 1 if register is inside an
4045         INF_LOCALREGS block,
4046         * (RemoveRegFromLRBlock): remove a register that is completely
4047         eliminated by register optimization, but it is still left in local
4048         register store/restore in/from stack block,
4049         * (Remove2pcodes): after removing register, check to see if it
4050         should be removed from local register store/restore in/from stack
4051         block,
4052         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
4053         DUMMY_READ_VOLATILE,
4054
4055         * device/include/pic16/adc.h: minor prototype modifications and
4056         update,
4057         * device/include/pic16/malloc.h: added GPL notice various
4058         modifications,
4059         * device/include/pic16/stdint.h: NEW, standard header for ints
4060         * device/include/pic16/delay.h: NEW, header for delay functions,
4061         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
4062         delay1mtcy,
4063         * device/include/pic16/signal.h: NEW, header providing helper macros
4064         for implementing signal handlers,
4065         * device/include/pic16/stdio.h: added prototypes for functions,
4066         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
4067         prototypes for stdin and stdout, added macro PUTCHAR to
4068         automatically implement putchar function prototype,
4069         * device/include/pic16/usart.h: modified and updated USART library,
4070         * device/lib/pic16/libio/adc/,
4071         * device/lib/pic16/libio/i2c: some modifications to improve library
4072         performance,
4073         * device/lib/pic16/libc/stdio/: modifications for the new printf*
4074         family of functions,
4075         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
4076         family of functions and other sources,
4077         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
4078         of the PIC18Fxx[28] devices,
4079         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
4080         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
4081         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
4082         _do_cinit function, because the previous failed when local variables
4083         where not placed in the same memory bank,
4084         * device/lib/pic16/libsdcc/char/: various modifications to improve
4085         library performance,
4086         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
4087         information on the new functions of the c library and more...
4088
4089 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4090
4091         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
4092
4093 2005-03-26 Raphael Neider <rneider AT web.de>
4094
4095         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
4096           if condition == CARRY)
4097         * (genCmp): adapted to new genSkipc semantics
4098         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
4099           on rIfx (genCmp was broken)
4100
4101 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4102
4103         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
4104         * src/z80/main.c (_keywords[]),
4105         * src/SDCCglobal.h (struct options),
4106         * src/SDCC.y,
4107         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
4108         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
4109         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
4110         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
4111         always available in leading double underscore form. The C99 support is
4112         mostly missing, but it's a start.
4113         * support/regression/tests/bug-227710.c: fixed nonconforming use of
4114         reserved identifier "__data".
4115
4116 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
4117
4118         * src/mcs51/peeph.def: fixed bug 1170013
4119
4120 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
4121
4122         * device/include/mcs51reg.h: fixed bug 842007
4123
4124 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4125
4126         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
4127         last time.
4128
4129 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4130
4131         * src/port.h (struct PORT),
4132         * src/avr/ralloc.c (avr_assignRegisters),
4133         * src/avr/main.c,
4134         * src/ds390/ralloc.c (ds390_assignRegisters),
4135         * src/ds390/main.c,
4136         * src/hc08/ralloc.c (hc08_assignRegisters),
4137         * src/hc08/main.c,
4138         * src/mcs51/ralloc.c (mcs51_assignRegisters),
4139         * src/mcs51/main.c,
4140         * src/pic/ralloc.c (pic14_assignRegisters),
4141         * src/pic/main.c,
4142         * src/pic16/ralloc.c (pic16_assignRegisters),
4143         * src/pic16/main.c,
4144         * src/xa51/ralloc.c (xa51_assignRegisters),
4145         * src/xa51/main.c,
4146         * src/z80/ralloc.c (z80_assignRegisters),
4147         * src/z80/ralloc.h,
4148         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
4149         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
4150         * src/SDCCcse.h,
4151         * src/SDCCdflow.c (computeDataFlow),
4152         * src/SDCCdflow.h,
4153         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
4154         * src/SDCCloop.h,
4155         * src/SDCCcflow.c (*),
4156         * src/SDCCcflow.h,
4157         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
4158         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
4159         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
4160         immedDom() returning wrong block; probably fixes bug #1160833)
4161
4162 2005-03-20 Borut Razem <borut.razem AT siol.net>
4163
4164         * support/scripts/inc2h.pl: WIN32 port
4165
4166 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
4167
4168         * device/lib/makefile.in: added abs.c and labs.c
4169
4170 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
4171
4172         * device/include/stdint.h: added
4173         * device/lib/abs.c: added
4174         * device/lib/labs.c: added
4175         * device/include/stdlib.h: added abs() and labs() prototypes
4176         * device/lib/libsdcc.lib: added abs and labs
4177         * device/include/float.h,
4178         * device/lib/_fsmul.c,
4179         * device/lib/printf_fast.c,
4180         * device/lib/printf_tiny.c: updated comments
4181
4182 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4183
4184         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
4185         bug #1164313
4186
4187 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4188
4189         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
4190         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
4191
4192 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
4193
4194         * device/lib/printf_large.c: removed inline assembly for portability and
4195           readability. Use printf_fast if speed or size are more important.
4196         * src/pic16/gen.c: removed conditions around use of DEBUGpc
4197         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
4198
4199 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
4200
4201         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
4202         prevent compiler warning
4203
4204 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
4205
4206         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
4207         moved to level 0 and declared as static. Also they are explicit
4208         placed in access bank. This was necessery because some times they
4209         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
4210         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
4211         optimizations. Currently only compare to unsigned char is implemented,
4212         * src/pic16/gen.c: added fReturnIdx array,
4213         * (struct resolvedIfx) is moved to gen.h and made public,
4214         * (struct _G): added sregsAlloc and sregsAllocSet fields,
4215         * (aopForSym): added an optimization to directly store in stack of
4216         the operand of a SEND iCode,
4217         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
4218         but as registers instead (AOP_REG) using the fReturnIdx array,
4219         * (pic16_freeAsmop): remove the freed register from the
4220         _G.sregsAlloc field,
4221         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
4222         a compare of 'WREG',
4223         * (pic16_popGetTempRegCond): changed function prototype, now
4224         function takes also a bitVector argument v which holds the current
4225         set of registers that are allocated for stack access by aopForSym,
4226         registers allocated in aopForSym for accessing stack symbols are not
4227         any more part of the functions usedRegs field,
4228         * (genCall): some times aopOp is called for a stack variable to be
4229         send, aopForSym might perform the push, if this is true make sure
4230         that genCall doesn't push the variable twice by testing _G.resDirect,
4231         * (genFunction): changed testing for unspecified interrupt number
4232         from 256 to INTNO_UNSPEC,
4233         * modified selection scheme of frame pointer generation. Previously
4234         if function did use local registers a frame pointer was generated,
4235         now a frame pointer is generated only if function has arguments
4236         (that need PLUSW2 register access), or has stack arguments, or the
4237         compiler is not instructed to omit the frame pointer,
4238         * (genEndFunction): before restoring local registers that were saved
4239         in the function preamble, also restore the registers that *might*
4240         have been allocated for stack access,
4241         * (genRet): removed some old comments,
4242         * (genCmp, the active (RN's) version): added a call to the
4243         pic16_genCmp_special function to perform the compare with a more
4244         robust and optimized way,
4245         * (genInline): a feature has been added in inline code generation,
4246         which allows a wildcard variable substitution when writing inline
4247         assembly. Code is incomplete and experimental therefore undocumented,
4248         * (genCast): changed order of aopOp for result and right to allow
4249         aopForSym to directly load the result if possible,
4250         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
4251         perform an optimized compare on some selected special occasions,
4252         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
4253         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
4254         generate an IVT any more,
4255         * src/pic16/main.c (pic16_optionsTable): added command line option
4256         --optimize-cmp,
4257         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
4258         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
4259         macros,
4260         * src/pic16/NOTES: Raphael Neider added in list of active developers
4261         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
4262         jumptable_end to prevent bug #,
4263         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
4264         inCond and outCond fields,
4265         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
4266         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
4267         turn off register spilling,
4268         * (packRegsForOneUse): synced with other ports' versions although it
4269         is not used currently,
4270         * (pic16_packRegisters): added an optimization while reading
4271         structure bitfields, some registers may be saved (malloc code is
4272         decreased by 80 bytes)
4273
4274 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
4275
4276         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
4277         left is a bitfield, if yes, then don't optimize assignment. Perhaps
4278         this can be optimized more?
4279
4280 2005-03-10 Raphael Neider <rneider AT web.de>
4281
4282         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
4283           genNearPointerGet): (hopefully) fixed access to bitfields via
4284           pointers (p->bitN = x; and x = p->bitN; failed)
4285
4286 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
4287
4288         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
4289
4290 2005-03-09 Raphael Neider <rneider AT web.de>
4291
4292         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
4293
4294 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
4295
4296         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
4297         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
4298           (regTypeNum): set REG_BIT type if necessary
4299         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
4300         * support/regression/tests/critical.c: check bug 1144613
4301
4302 2005-03-02 Raphael Neider <rneider AT web.de>
4303
4304         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
4305
4306 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4307
4308         * src/avr/ralloc.c (serialRegAssign),
4309         * src/ds390/ralloc.c (serialRegAssign),
4310         * src/hc08/ralloc.c (serialRegAssign),
4311         * src/mcs51/ralloc.c (serialRegAssign),
4312         * src/pic/ralloc.c (serialRegAssign),
4313         * src/pic16/ralloc.c (serialRegAssign),
4314         * src/xa51/ralloc.c (serialRegAssign),
4315         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
4316
4317 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
4318
4319         * src/SDCCast.c (decorateType): fixed bug 1124787
4320
4321 2005-02-20 Hubert Sack <sack AT digiplan.de>
4322         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4323
4324         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
4325         patch #1121755
4326
4327 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4328
4329         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
4330         to keep the correct label reference count when adding/removing references
4331         to labels. A peephole file using this is appended to patch #1144962.
4332
4333 2005-02-14 Raphael Neider <rneider AT web.de>
4334
4335         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
4336         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
4337         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
4338           retrievals of result operand's value on assignment
4339
4340 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
4341
4342         * device/include/pic16/string.h: modified prototype for memccpy()
4343         to memccpy(void *, void *, char, size_t)
4344         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
4345         check whether to omit frame pointer or not,
4346         * (genInline): convert all occurences of "\n" to LF in inline
4347         assembler blocks, this helps formatting the inline text,
4348         * (pic16_loadFSR0): modified prototype,
4349         * (genNearPointerGet, genNearPointerSet): reorganization of code,
4350         removed some 8051 legacy code,
4351         * (genPackBits): enabled handling bitfields exceeding one byte in size,
4352         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
4353         before allocating temporary registers in functions,
4354
4355 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
4356
4357         * support/regression/tests/bitvars.c: corrected the "fix"
4358
4359 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
4360
4361         * support/regression/tests/bitvars.c,
4362         * support/regression/tests/bitwise.c,
4363         * support/regression/tests/rotate.c: "fixed" problems on Alpha
4364
4365 2005-02-10 Raphael Neider <rneider AT web.de>
4366
4367         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
4368           different size for Alpha
4369         * src/pic16/gen.c (genCmpEq) : improved compare with 0
4370
4371 2005-02-09 Raphael Neider <rneider AT web.de>
4372
4373         * src/SDCC.lex(doPragma) : save and restore warning options as well
4374           (also added new stack plus clone- and copyAndFreeSDCCERRG())
4375         * have #pragma less_pedantic set the errorlevel to WARNING
4376           (fixes #1117001)
4377         * (cloneOptimize) : fixed wrong malloc's size
4378         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
4379           facilitate correct handling of #pragma (save|restore)
4380
4381 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
4382
4383         * src/mcs51/gen.c: removed non-standard C nameless struct/union
4384
4385 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
4386
4387         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
4388
4389 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
4390
4391         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
4392
4393 2005-02-02 Raphael Neider <rneider AT web.de>
4394
4395         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
4396         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
4397         * (pic16_storeForReturn): fixed to allow returning function pointers
4398         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
4399         * device/include/pic16/{stddef.h,stdbool.h}: added
4400
4401 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
4402
4403         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
4404
4405 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
4406
4407         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
4408         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
4409          appeared to be required
4410
4411 2005-01-31 Borut Razem <borut.razem AT siol.net>
4412
4413         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
4414           include/mcs51 and include/z80 directories to the package
4415
4416 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4417
4418         * src/hc08/gen.c (genFunction): fixed bug #1112752
4419
4420 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4421
4422         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
4423
4424 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4425
4426         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
4427
4428 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
4429
4430         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
4431
4432 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
4433
4434         * device/include/c8051fxxx.h: removed these 6 files
4435         * device/include/mcs51/c8051fxxx.h: added these 11 new files
4436
4437 2005-01-26 Raphael Neider <rneider AT web.de>
4438
4439         * src/pic16/gen.c (genAssign): fixed assignment from longs
4440           in codespace (were cut to three bytes)
4441         * (genDummyRead): implemented (except for CODESPACE...),
4442           fixed bug #1108575
4443         * src/pic16/glue.c (emitStatistics): beautified
4444         * device/lib/pic16/libm/Makefile: added include path
4445
4446 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4447
4448         * src/z80/gen.c (aopPut): fixed bug #1103902
4449
4450 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4451
4452         * device/lib/expf.c: fixed bug #1095792
4453
4454 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
4455
4456         * device/lib/pic16/libm: added Math library sources
4457
4458 2005-01-24 Raphael Neider <rneider AT web.de>
4459
4460         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
4461           to enable upcast to pCodeOpReg2 (there is no type tag to
4462           differenciate the two and pic16_popGet2p cast into PCOR2)
4463         * src/pic16/main.c (_process_pragma): fixed another malloc bug
4464           (sizeof(sectNames) changed to sizeof(sectName))
4465           Both patches fix segfaults under MinGW.
4466
4467 2005-01-23 Raphael Neider <rneider AT web.de>
4468
4469         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
4470           Safe_[mc]?alloc()'ed variables
4471         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
4472           of (byte sized) temporaries (assign them to WREG for now)
4473         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
4474           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
4475           this might fix SIGSEGVs on MinGW...
4476         * src/SDCCopt.c (killDeadCode): restored original behaviour
4477           (volatile operands might get thrown away though)
4478
4479 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
4480
4481         * src/pic16/gen.c: fixed bug #1106975,
4482         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
4483         pointer update, INTCON is saved, global interrupts are disabled and
4484         restored after updateing TOS.
4485         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
4486         * added function attribute 'shadowregs' to take advantage of shadow
4487         registers,
4488         * added function attribute 'wparam' as an alternative to the wparam
4489         pragma,
4490         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
4491         user declares a non-ISR function as 'shadowregs',
4492         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
4493
4494 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
4495
4496         * .version: bumped version number to 2.4.8
4497         * device/lib/pic16/pics.all: list of PIC18F devices supported by
4498         pic16 port,
4499         * device/lib/pic16/libio/i2c/: I2C module support library,
4500         * device/include/pic16/i2c.h: I2C support library header,
4501         * device/lib/pic16/libc/stdio/: standard IO support sources,
4502         * (printf_small.c): printf_small() source, supports float print,
4503         * (printf_tiny.c): printf_tiny() source, does not support floats,
4504         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
4505         enable global optimizations for entire library source, other
4506         Makefiles in the source tree are also modified to reflect this,
4507         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
4508         function,
4509         * doc/sdccman.lyx: updated to reflect new changes,
4510         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
4511         sym->onStack if-case,
4512         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
4513         sbit, idata, _idata, xdata, _xdata,
4514         * added pragma library, to link an external library, (see doc),
4515         * removed command line options, --pomit-config-words, --pomit-ivt,
4516         --pleave-reset-vector,
4517         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
4518         when calling assembler to reflect memory model used, also define
4519         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
4520         reflect stack model used,
4521         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
4522         on stack return NULL,
4523
4524 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4525
4526         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
4527           of the operands is volatile. Fixes #1020220
4528
4529 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4530
4531         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
4532         * (OptimizeRegUsage): make sure that there is really no other flow where
4533           the first pCode is used
4534
4535 2005-01-22 Raphael Neider <rneider AT web.de>
4536
4537         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
4538           to fix #1106967 (pCode->seq are not set up correctly)
4539
4540 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4541
4542         * src/SDCCglue.c (glue): make sure code area is declared before the
4543         static initialization area.
4544
4545 2005-01-21 Raphael Neider <rneider AT web.de>
4546
4547         * device/lib/Makefile.in: fixed test for pic16 install dir
4548         * device/lib/pic16/*/Makefile*: modified compile flags to enable
4549           optimizations
4550         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
4551           added --optimize-goto compiler switch and pragma wparam documentation
4552         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
4553         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
4554           and PRODH closing bug #1071770 (peephole optimizer)
4555
4556 2005-01-19 Raphael Neider <rneider AT web.de>
4557
4558         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
4559           cmdLine buffers (used when calling sdcpp...) are large enough
4560           (MAX_PATH=256 truncates arguments leading to system halts when
4561           used in MinGW...)
4562         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
4563         * (genUminus): rewritten to for efficiency
4564         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
4565           used uninitialized in some cases)
4566         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
4567           copy the third byte from the int -- now assumes 0x80 (data memory)
4568         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
4569           operands (genAddLit expects the iCode's operands to swapped as
4570           well), fixed leftover bytes (crashed for short left operands)
4571         * (pic16_genMinusDec): performance improvements, removed false
4572           PIC14 emitSKPNCs
4573         * (pic16_genMinus): fixed to cope with differently sized operands
4574         * src/pic16/glue.c (pic16_glue): added new banksel optimization
4575           for --obanksel > 1
4576         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
4577         * src/pic16/graph.[ch]: implementation of directed graphs, used by
4578           new banksel optimization
4579         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
4580           analysis for temporary registers (segfaults...)
4581         * src/pic16/peeph.def: added rule
4582
4583 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
4584
4585         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
4586         which converts a float number to its ASCII representation
4587         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
4588         functions to convert the fractional and integer part of a float to ASCII,
4589         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
4590         realloc.c): added _MALLOC_SPEC to explicit place variables in data
4591         ram
4592         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
4593         _STATMEM macros,
4594         * device/include/pic16/adc.h: added GPL info,
4595         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
4596         a pCodeOp as tested operand,
4597         * (genNearPointerGet): optimized bit testing, does not use
4598         intermediate register for bit value, test directly instead with
4599         BTFSS, BTFSC, works only for single bits,
4600         * (genpic16Code): dump the name of the iCode in the asm,
4601         * src/pic16/ralloc.c (decodeOp): removed static declaration and
4602         renamed to pic16_decodeOp,
4603         * (serialRegAssign): do not allocate a temporary register for iCode
4604         sequences that test a single bit for 1/0
4605
4606 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
4607
4608         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
4609         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
4610         access stack and frame pointers. They are initially assigned to
4611         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
4612         accessing SFRs. Updated all occurences of modification of stack or
4613         frame pointer in gen.c and pcode.c,
4614         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
4615         assigning of a literal value to pointers,
4616         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
4617         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
4618         selected
4619
4620 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4621
4622         * doc/sdccman.lyx: update documentation about stack pragma, added
4623         some info for stack memory models
4624
4625 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4626
4627         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
4628
4629 2005-01-08 Raphael Neider <rneider AT web.de>
4630
4631         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
4632           udata sections to fix bug #1097823
4633
4634 2005-01-05 Raphael Neider <rneider AT web.de>
4635
4636         * src/pic16/gen.c (genGenericShift): added handling of differently
4637           sized left operand and result
4638
4639 2005-01-04 Raphael Neider <rneider AT web.de>
4640
4641         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
4642         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
4643           to hold the condition bit)
4644         * added new version of genCmp (old code available via #define)
4645         * added new version of genShiftLeft/genShiftRight in a generic
4646           way, now supports shifting by negative values
4647         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
4648           shiftCount (expected by genGenericShift)
4649         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
4650         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
4651           dump
4652         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
4653           is an invalid literal too...)
4654
4655 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
4656
4657         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
4658         from Raphael Neider,
4659         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
4660         for 8-bit literals. This fixes some literal operands which are sign
4661         extended to 16-bits ints when instruction needs only 8-bits.
4662
4663 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
4664
4665         * device/lib/logf.c: added mcs51 assembly version
4666         * device/lib/expf.c: added mcs51 assembly version
4667         * device/lib/_logexpf.c: new shared asm code for expf and logf
4668         * device/include/math.h: add defines for assembly math library
4669         * device/lib/Makefile.in: build new _logexpf.c
4670         * device/lib/libfloat.lib: use new _logexpf.c
4671
4672 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4673
4674         * src/pic/device.c
4675         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4676           device types which have less than 0x7f registers.
4677
4678 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4679
4680         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4681
4682 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4683
4684         * device/lib/printf_fast.c: only build on supported arch.
4685         * device/lib/printf_tiny.c: only build on supported arch.
4686         * device/lib/printf_fast_f.c: only build if asm float lib
4687         * device/lib/_fsget1arg.c: only build if asm float lib
4688         * device/lib/_fsget2args.c: only build if asm float lib
4689         * device/lib/_fsnormalize.c: only build if asm float lib
4690         * device/lib/_fsreturnval.c: only build if asm float lib
4691         * device/lib/_fsrshift.c: only build if asm float lib
4692         * device/lib/_fsswapargs.c: only build if asm float lib
4693         * device/include/stdio.h: don't provide print_fast,
4694           print_fast_f, print_tiny prototypes if --xstack used
4695
4696 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4697
4698         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4699         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4700           to the SOURCES
4701
4702 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4703
4704         * device/lib/printf_fast_f.c: same as printf_fast, but
4705           with floating point enabled
4706         * device/lib/printf_fast.c: minor tweaks
4707         * device/include/stdio.h: add printf_fast_f
4708
4709 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4710
4711         * src/SDCCmain.c: make --float-reent default for mcs51
4712         * device/lib/_fsadd.c: added mcs51 assembly version
4713         * device/lib/_fssub.c: added mcs51 assembly version
4714         * device/lib/_fsmul.c: added mcs51 assembly version
4715         * device/lib/_fsdiv.c: added mcs51 assembly version
4716         * device/lib/_fseq.c: added mcs51 assembly version
4717         * device/lib/_fsneq.c: added mcs51 assembly version
4718         * device/lib/_fsgt.c: added mcs51 assembly version
4719         * device/lib/_fslt.c: added mcs51 assembly version
4720         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4721         * device/lib/Makefile.in: add _fscmp to build
4722         * device/lib/libfloat.lib: add _fscmp to build
4723
4724 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4725
4726         * device/lib/_fs2slong.c: added mcs51 assembly version
4727         * device/lib/_fs2sint.c: added mcs51 assembly version
4728         * device/lib/_fs2schar.c: added mcs51 assembly version
4729         * device/lib/_fs2ulong.c: added mcs51 assembly version
4730         * device/lib/_fs2uint.c: added mcs51 assembly version
4731         * device/lib/_fs2uchar.c: added mcs51 assembly version
4732         * device/lib/_slong2fs.c: added mcs51 assembly version
4733         * device/lib/_sint2fs.c: added mcs51 assembly version
4734         * device/lib/_schar2fs.c: added mcs51 assembly version
4735         * device/lib/_ulong2fs.c: added mcs51 assembly version
4736         * device/lib/_uint2fs.c: added mcs51 assembly version
4737         * device/lib/_uchar2fs.c: added mcs51 assembly version
4738         * device/include/float.h: added #define to select asm vs c
4739
4740 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4741
4742         * device/lib/printf_fast.c: improvements to float output
4743         * device/include/float.h: add defines for assembly float library
4744         * device/lib/_fsget1arg.c: receive 1 float arg
4745         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4746         * device/lib/_fsnormalize.c: normalize a float
4747         * device/lib/_fsreturnval.c: return float, various helper routines
4748         * device/lib/_fsrshift.c: right shift a float's mantissa
4749         * device/lib/_fsswapargs.c: swap 2 floats
4750         * device/lib/Makefile.in: build these 6 new files for mcs51
4751         * device/lib/libfloat.lib: add these 6 files to the library
4752
4753 2004-12-26 Borut Razem <borut.razem AT siol.net>
4754
4755         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4756           built by gcc 3.4.2
4757
4758 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4759
4760         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4761           and fully reentrant and register bank neutral.
4762         * device/lib/printf_fast.c: added float (not enabled by default),
4763           added compact/slower integer (also not enabled by default),
4764           improved size/speed of fast integer code, other minor changes
4765         * device/include/stdio.h, device/lib/Makefile.in,
4766           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4767
4768 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4769
4770         * src/pic16/pcode.c: declaring variables other than at the start of a
4771           block is not supported in C by VC6.
4772
4773 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4774
4775         * applied a previous patch from Raphael Neider that wasn't included
4776         in the previous commits, which fixes infinite loops within jumptable
4777         improvements,
4778         * made some fixes that previous patches introduced
4779
4780 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4781
4782         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4783         that fixes an issue with AOP_PCODE asmop's offset,
4784         * (pic16_popCopyReg): update instance field too,
4785         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4786         function of pic port,
4787         * (genCmp, genAnd, genAssign),
4788         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4789
4790 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4791
4792         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4793         variables initial values to idata section,
4794         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4795         variables in some functions. This utilizes parmBytes field of iCode
4796         structure to hold the offset of the variable in stack. (might be
4797         able to use the stack field too?)
4798         * applied patch from Raphael Neider # ### , # ###
4799         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4800         variable initial values in idata section,
4801         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4802         for static variables with initial value
4803         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4804         applied fix in while loop from Raphael Neider.
4805
4806 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4807
4808         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4809         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4810         * src/ds390/ralloc.c (serialRegAssign): spill bits
4811         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4812         * support/Util/SDCCerr.c,
4813         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4814         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4815         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4816
4817 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4818
4819         * device/include/sdcc-lib.h: inserted LGPL, added includes
4820           asm/ds390/features.h and asm/mcs51/features.h
4821         * device/include/asm/default/features.h,
4822         * device/include/asm/gbz80/features.h,
4823         * device/include/asm/z80/features.h: added empty _AUTOMEM
4824           and _STATMEM
4825         * device/include/asm/ds390/features.h,
4826         * device/include/asm/mcs51/features.h: added files with defines for
4827           _AUTOMEM and _STATMEM indicating automatic and static storage class
4828         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4829         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4830         * src/SDCCicode.c (geniCodeCast),
4831         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4832         * src/SDCCloop.c (loopInduction): removed unused variable lr
4833         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4834           to convertToFcall to include char modulo (RFE 1065037), added check
4835           if left operand is unsigned and use abs of literal value
4836         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4837           as it doesn't work after conversion from peephole.def to peephole.rul
4838         * src/mcs51/gen.c (toBoolean): added check for size,
4839           (genModOneByte): optimized code for signed char modulo a literal
4840           power of 2 (thanks to Hubert Sack),
4841           (genRRC): removed unnecessary "clr c",
4842           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4843         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4844           jump optimization,
4845           swapped rules 256.c and 256.d,
4846           extended 256.d by using new multiple checks (thanks Erik),
4847           added rules 256.e and 256.f,
4848           updated rule 261.a and 261.b to new generated code
4849         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4850
4851 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4852
4853         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4854           induction related bugs, including first part of bug #1074377
4855
4856 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4857
4858         * applied patch from bug-report #1076292,
4859         * applied patches for genAnd and Goto-optimizations for Raphael
4860         Neider,
4861         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4862         dump a less iCode information,
4863         * src/pic16/device.h (pic16_options_t): added field debgen,
4864         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4865         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4866         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4867         puclic,
4868         * (various functions): added macros FENTRY and FENTRY2 to functions,
4869         to emit function prologue,
4870         * (various functions): fixed indentation,
4871         * (genNearPointerGet): fixed loading of FSR0,
4872         * (genPackBits): applied patch from Raphael Neider to fix updating
4873         of FSR0 and touching only the modified bits,
4874         * src/pic16/genarith.c (various functions): added macros FENTRY to
4875         emit function prologue in comments,
4876         * src/pic16/pcode.h: added functions debugf2, debugf3,
4877         * src/pic16/ralloc.c: partial fix for packForPush caused
4878         segmentation fault,
4879
4880 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4881
4882         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4883           <stsp AT users.sourceforge.net> with reversed byte order
4884         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4885
4886 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4887
4888         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4889           bug #1074377
4890         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4891         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4892
4893 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4894
4895         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4896
4897 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4898
4899         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4900           conditions,
4901           (setFromConditionArgs): friendly operand parser for peephole rules,
4902           (operandBaseName, operandsNotRelated): new peephole condition
4903           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4904           architecture specific register naming into account, handles n-way
4905           comparisons, and supports quoted literals
4906         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4907
4908 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4909
4910         * src/mcs51/peeph.def: fixed bug #1076940
4911
4912 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4913
4914         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4915
4916 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4917
4918         Adding support for replacing ljmps with sjmps in jumptables
4919         generated for switch statements. For now you need to set the
4920         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4921         Now 4 algorithms for mcs51 jumptable generation are used:
4922         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4923         addresses loaded pc-relative for up to 112 cases and stack-pushing
4924         target addresses loaded with offset from dptr for up to 256 cases.
4925
4926         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4927         * src/mcs51/main.c: adapted constants for switch table generation
4928         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4929
4930 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4931
4932         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4933         * support/regression/tests/bug1057979.c: added test for bug 1073386
4934
4935 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4936
4937         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4938         compilers
4939
4940 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4941
4942         * src/pic16/device.h,
4943         * src/pic16/genarith.c,
4944         * src/pic16/glue.c,
4945         * src/pic16/main.c,
4946         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4947
4948 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4949
4950         Large cummulative patch for pic16 port.
4951         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4952         to call when a stack overflow occurs,
4953         * (malloc.h): added CVS Id tag,
4954         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4955         variable,
4956         * added libc directory. The current version of LibC contains string
4957         functions, ctype functions and macros and some functions of the
4958         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4959         be extensively tested in the future. Standard disclaimer here.
4960         Library is not automatically build yet. But one can build it by
4961         invoking 'make' inside the libc directory.
4962         * added ADC library under libio. Preliminary version yet.
4963
4964         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4965         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4966         aopForRemat() now and not by pic16_aopOp(),
4967         * (pic16_popGetTempReg): removed warning messgae when allocating
4968         temporary registers, its a buggy feature and will be removed,
4969         * (pic16_popGet): set register instance field in AOP_CRY,
4970         * (pic16_outBitC): fixed for results in size greater than 1,
4971         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4972         * (pic16_storeForReturn): optimized return of 0,
4973         * (genCmp): experimental code for new genCmp which uses PIC18's
4974         special compare&skip instructions. Initial tests fail some times
4975         with variables grater than 1 byte in size, so new code is disabled,
4976         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4977         a single bit,
4978         * (genCast): began a fix to optimize the casting of a bit to another
4979         bit, now assigning a bitfield to another bitfield will fail, sorry,
4980         * src/pic16/main.c: disabled the use of lr-support feature,
4981         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4982         * added some function prototypes, added function _debugf prototype,
4983         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4984         bits with offset (case PO_GPR_BIT),
4985         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4986         command line,
4987         * (isBankInstruction): modified to return 0 for no banking instruction,
4988         and 1 for banking instruction,
4989         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4990         caused stop processing pCodes after a inline assembly block,
4991         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4992         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4993         registers when it shouldn't,
4994         * src/pic16/ralloc.c (allocReg): add preliminary support for
4995         supporting a limited set of temporary registers,
4996
4997 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4998
4999         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
5000           genDataPointerSet): ensure assignments always copy in MSB to LSB
5001           order,
5002           (loadRegFromAop): recognize CLRH optimization,
5003           (genFunction): optimize RECEIVE iCodes in reentrant functions
5004
5005 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5006
5007         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
5008           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
5009           selected.
5010         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
5011         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
5012           contiguous with data
5013
5014 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5015
5016         * device/lib/_gptrget.c (_gptrget),
5017         * device/lib/_gptrgetc.c (_gptrgetc),
5018         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
5019           instead of sjmp to ret
5020         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
5021           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
5022
5023 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
5024
5025         * .version: bumped version to 2.4.7
5026         * device/lib/_gptrget.c (_gptrget): is now _naked
5027         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
5028         * device/lib/_gptrput.c (_gptrput): is now _naked
5029         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
5030           (createFunction): fixed xstack
5031         * src/SDCCglue.c (emitMaps): set allocation required for bit area
5032         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
5033           or bit either,
5034           (geniCodeCritical): store original interrupt state in an iTemp bit
5035           var unless stack-auto
5036         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
5037         * src/SDCCmain.c (setIncludePath): added include/target to search path
5038         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
5039         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
5040           prototype,
5041           (processFuncArgs): put bit vars in bit area
5042         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
5043           unsaveRBank): fixed xstack,
5044           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
5045           (genFunction, genEndFunction): fixed xstack,
5046           (genAssign): optimization don't walk backwards through mem
5047         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
5048         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
5049         * support/regression/Makefile: also make library (for stack-auto) when
5050           making "all" and added "test-mcs51-xstack-auto"
5051         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
5052         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
5053         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
5054         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
5055         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
5056           make-library by MAKE_LIBRARY
5057         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
5058           regression tests for xstack
5059         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
5060         * support/regression/tests/critical.c: test for critical on mcs51
5061
5062 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5063
5064         * support/regression/ports/ucz80/spec.mk: use include and lib files from
5065           built version of sdcc instead of installed version
5066
5067 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
5068
5069         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
5070         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
5071           vprintf.c now
5072         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
5073         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
5074           WARNING: remove device/lib/build/z80/printf.o by hand when
5075           updating from previous build!
5076         * device/lib/z80/printf.c: updated comment
5077         * support/regression/tests/bug1057979.c: test all ports now
5078         * support/regression/tests/bug1065458.c: file added
5079
5080 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5081
5082         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
5083           *_start and *_end symbols for static functions
5084
5085 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
5086
5087         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
5088           and search crt0.o in all library paths,
5089           (setIncludePath): proper handling of --nostdinc,
5090           (setLibPath): proper handling of --nostdlib
5091         * support/regression/Makefile,
5092         * support/regression/ports/ds390/spec.mk,
5093         * support/regression/ports/gbz80/spec.mk,
5094         * support/regression/ports/hc08/spec.mk,
5095         * support/regression/ports/mcs51/spec.mk,
5096         * support/regression/ports/mcs51-large/spec.mk,
5097         * support/regression/ports/mcs51-stack-auto/spec.mk,
5098         * support/regression/ports/z80/spec.mk: use include and lib files from
5099           built version of sdcc instead of installed version
5100         * doc/sdccman.lyx: fixed typo in --nostdinc
5101
5102 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
5103
5104         * src/pic/pcode.c,
5105         * src/pic/device.c,
5106         * src/pic/ralloc.c,
5107         * src/pic/gen.c : added support to generate code for struct bit fields.
5108
5109 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
5110
5111         * as/xa51/xa_version.h,
5112         * device/include/errno.h,
5113         * device/include/regc515c.h,
5114         * device/lib/_itoa.c,
5115         * device/lib/_ltoa.c,
5116         * device/lib/ser_ir_cts_rts.c,
5117         * sim/ucsim/xa.src/glob.cc,
5118         * sim/ucsim/xa.src/inst_gen.cc,
5119         * sim/ucsim/xa.src/xa_bit.cc,
5120         * sim/ucsim/xa.src/xa_sfr.cc,
5121         * sim/ucsim/z80.src/inst_dd.cc,
5122         * sim/ucsim/z80.src/inst_fdcb.cc,
5123         * support/scripts/keil2sdcc.pl,
5124         * src/pic16/pic16.dsp,
5125         * src/pic16/pic16a.dsp: corrected cvs line endings
5126         * device/lib/printf_large.c: fixed bug 1057979
5127         * src/pic16/gen.c: fixed non-C standard code
5128         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
5129         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
5130         * support/regression/ports/mcs51/support.c: reload T1 asap
5131         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
5132           pdata use and clear idata startup behaviour
5133         * support/regression/tests/bug1057979.c: added
5134
5135 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
5136
5137         * device/examples/ds390/ow390/ad26.h,
5138         * device/examples/ds390/ow390/cnt1d.h,
5139         * device/examples/ds390/ow390/crcutil.c,
5140         * device/examples/ds390/ow390/ownet.h,
5141         * device/examples/ds390/ow390/owsesu.c,
5142         * device/examples/ds390/ow390/swt12.h,
5143         * device/examples/ds390/ow390/swtoper.c,
5144         * device/examples/ds390/ow390/temp10.h,
5145         * device/examples/ds390/ow390/thermodl.c,
5146         * device/examples/ds390/tinitalk/tinitalk.dsp,
5147         * device/examples/ds390/tinitalk/tinitalk.dsw,
5148         * device/examples/mcs51/clock/hw.h,
5149         * device/examples/mcs51/simple2/go.bat,
5150         * device/examples/serialcomm/windows/serial.h,
5151         * device/examples/xa51/dummy.c,
5152         * device/examples/xa51/hello.c,
5153         * device/include/80c51xa.h,
5154         * device/include/at89x051.h: corrected cvs line endings
5155
5156 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
5157
5158         * src/pic16/main.c (options): added command line --gstack, to trace
5159         stack over/under flows,
5160         * added pragma 'wparam' to allow passing first byte of function
5161         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
5162         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
5163         call to __gstack_test function and sets up the symbol as extern,
5164         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
5165         * popaop): added call to pic16_testStackOverflow,
5166         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
5167         wparamList list,
5168         * (genCall, genPcall): now all parameters are passed via stack
5169         except in functions that are pass to wparam pragma in which WREG is
5170         used too,
5171         * (genPcall): REENTRANT flag is checked to see if variable prototype
5172         contains reentrant keyword, don't call a non-reentrant function, via
5173         a reentrant function pointer or vice versa, functions are never
5174         passed via WREG,
5175         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
5176         D.Winkler,
5177         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
5178         SIGSEGV when accessing a NULL register stucture,
5179         * (pic16_printGPointerType): modified to handle UPPER modifier for
5180         function initializers, changed prototype of function to simpler one,
5181         * (pic16_printIvalFuncPtr): check to see if function is already
5182         added in externs list,
5183         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
5184         optimized a move from W to SFR with a move to the same register
5185         later after a CALL,
5186         * device/lib/pic16/debug: NEW directory, contains debug features
5187         which are enabled when linking with libdebug.lib, currently command
5188         line option --gstack enables stack pointer tracing for over/under
5189         flow, corresponding sources are in debug/gstack
5190
5191 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
5192
5193         * doc/sdccman.lyx: updated SDCC version,
5194         * (PIC16 port): update list of command line options,
5195         * src/pic16/device.h (structure pic16_options_t): added field gstack
5196         to enable stack overflow tracing on push/pops,
5197         * src/pic16/device.c (statistics structure): added statistics
5198         structure,
5199         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
5200         pic16_dump_int_registers): increase statistics counters for each
5201         * variable which is encountered
5202         * (pic16_dump_usection): emit each .udata variable to its own udata
5203         section,
5204         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
5205         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
5206         parameters via stack, otherwise use old scheme,
5207         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
5208         assembler output file,
5209         * src/pic16/main.c: added command line options --gstack to enable
5210         push/pop tracing for stack overflow,
5211         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
5212         instructions): added size of each instruction,
5213         * (pic16_countInstruction): estimate size of instructions in
5214         the_pFile list, inline assembly blocks are not counted,
5215         * (pic16_FixRegisterBanking): trace previous register usage, when
5216         banksel optimizations is greater than 0, don't emit a redudant
5217         banksel directive,
5218
5219 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
5220
5221         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
5222         * src/pic16/ralloc.c : applied same fix for pic16.
5223         * src/pic/gen.c : tidied it up a little.
5224
5225 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5226
5227         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
5228         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
5229
5230 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5231
5232         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
5233
5234 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5235
5236         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
5237         non-reentrant function __modsint in the interrupt function (thus
5238         corrupting math operations during serial I/O)
5239         * device/lib/ser_ir.c: as above, changed buffersize
5240         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
5241         256.c,d for zeroing
5242         * doc/Makefile: added option -t for rsync
5243
5244 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5245
5246         * src/SDCCast.h (struct ast),
5247         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
5248
5249 2004-10-20 Borut Razem <borut.razem AT siol.net>
5250
5251         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
5252         package
5253
5254 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
5255
5256         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
5257         makefile targets,
5258         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
5259         support functions to replace long sequences of MOVFF's from access
5260         bank registers to stack and vice versa,
5261         * src/pic16/device.h: added new field opt_flags, where optimization
5262         flags can be set to enable certain features,
5263         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
5264         * pBlock, (genFunction, genEndFunction): surroung loop for
5265         saving/loading used registers in stack with PC_INFO pCodes,
5266         INF_LREGS. Code in between can then be optimized by pCode optimizer
5267         to support function calls,
5268         * (genDataPointerSet): fixed bug which loaded float fields in
5269         structures with corrupt data,
5270         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
5271         in a standard way debug info on stderr. Feature used for developing
5272         and debugging only,
5273         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
5274         obsolete chunks of code,
5275         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
5276         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
5277         * pic16/src/pcode.c (pic16_newpCodeInfo,
5278         * (pic16_newpCodeOpLocalRegs),
5279         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
5280         feature,
5281         * (pic16_pCodeConstString): printing of the initial value of a
5282         symbol as a comment is inhibited since parsing was already done by
5283         copyStr and output is corrupt,
5284         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
5285
5286 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5287
5288         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
5289
5290 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
5291
5292         * as/mcs51/lkarea.c: removed old K&R style,
5293           (lnksect): changed check on boundary error,
5294           (lnksect2): changed check on boundary error,
5295           (lnksect2): extend XSTK to end of page if size = 1
5296         * as/mcs51/lkmain.c: removed old K&R style,
5297           (Areas51): create l_IRAM symbol
5298         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
5299         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
5300           model-mcs51-stack-auto, added model-mcs51-xstack-auto
5301         * device/lib/_mullong.c: added version to be compiled with xstack
5302         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
5303         * device/lib/mcs51/crtxclear.asm: clear pdata as well
5304         * device/lib/mcs51/crtxstack.asm: fixed comment
5305         * src/SDCCglue.c: maxInterrupts defaults to 0,
5306           (emitMaps): added pdata,
5307           (createInterruptVect): (re)moved default,
5308           (glue): added pdata,
5309           (glue): moved __start__xstack to XSTK with default size 1
5310         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
5311           and options.float_rent when options.stackAuto is set,
5312           (linkEdit): only write XDATA_NAME if provided on command line
5313         * src/SDCCmem.h,
5314         * src/SDCCmem.c: added pdata
5315         * src/port.h: added pdata_name to PORT
5316         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
5317           (saveRegisters, unsaveRegisters): removed usage of B,
5318           (genMinus): fixed accumulator clash,
5319           (genJumpTab): added comment, this needs another look
5320         * src/mcs51/gen.c: added check for "B in use" paranoia,
5321           added pushB() and popB()
5322         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
5323           chance
5324         * src/avr/main.c,
5325         * src/ds390/main.c,
5326         * src/hc08/main.c,
5327         * src/mcs51/main.c,
5328         * src/pic/main.c,
5329         * src/pic16/main.c,
5330         * src/xa51/main.c,
5331         * src/z80/main.c: (reset_regparms) made void parameter explicit and
5332           added PSEG (PAG,XDATA) or NULL to port specifier
5333         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
5334         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
5335           (_mcs51_genInitStartup): removed __start__xstack equ,
5336           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
5337         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
5338         * src/z80/gen.c (_rleAppend): fixed warnings
5339         * support/regression/tests/zeropad.c: added pdata test
5340         * .version: bumped to 2.4.6
5341
5342 2004-10-17 Borut Razem <borut.razem AT siol.net>
5343
5344         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
5345         as a part of nightly build
5346
5347 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
5348
5349         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
5350         WREG holds the first byte function parameters,
5351         * (aopForSym): take special case for symbols which are in FARSPACE
5352         but in CODESPACE too,
5353         * (assignResultValue): modified to take into account _G.useWreg,
5354         * (genCall): don't use wreg for parameter passing when function is
5355         declared as reentrant, too, added optimization INCF to stack
5356         pointer when stack parameter count is 1,
5357         * (genFunction, genEndFunction): refurnished and fixed to not using
5358         wreg for passing parameters when function has varargs or is
5359         reentrant, fixed bug with symbol name compare for generating
5360         functions in absolute address,
5361         * (pic16_storeForReturn): refurnished,
5362         * (genCmp): began writing a new version of the function, not ready
5363         yet, therefore it is disabled,
5364         * (genAssign): do not read code memory when assigning a function to
5365         a pointer function,
5366         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
5367         array of characters, not pointer,
5368         * (pic16initialComments): in debug mode emit an .ident directive for
5369         the assembler,
5370         * (_process_pragma): emit a new warning type (internal to pic16)
5371         when setting stack to default length, emit a similar warning when
5372         placing a function at absolute address and address is not word aligned
5373         * (_pic16_parseOptions): added 'return TRUE' statement,
5374         * (_pic16_linkEdit): if compiling a source, then add the source's
5375         file object, first in the list of objects to link,
5376
5377 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
5378
5379         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
5380         * src/pic/main.c : removed VC warning.
5381         * src/pic/gen.c : changed comment.
5382
5383 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
5384
5385         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
5386         reference to a deprecated symbol _GPTRREG was causing failure to
5387         link. Thanks G. M. Gallant for the info.
5388
5389 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
5390
5391         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
5392         comments for Bugs item #954788.
5393
5394 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
5395
5396         * src/pic16/device.c (pic16_dump_gsection,
5397         * pic16_groupRegistersInSection): handle symbols declared to be in
5398         access bank differently,
5399         * src/pic16/gen.c (struct _G): added field resDirect,
5400         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
5401         send values read from stack directly to result and don't allocate
5402         temporary values,
5403         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
5404         same registers,
5405         * (pic16_sameRegsOfs): NEW,
5406         * (freeAsmop): if _G.resDirect is set then do not mark registers as
5407         free because they were not allocated from temporary pool,
5408         * pic16_popRegFromString): workaround to fix a problem with
5409         allocating variables twice or never,
5410         * (genGenPointerGet): using PRODL instead of FSR0H,
5411         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
5412         instead of FSR0H,
5413         * (genAssign): take advantage of the _G.resDirect flag,
5414         * (genCast): around line 11844, use mov2f instead of directly
5415         MOVFF'ing between operands to account for literal values,
5416         * src/pic16/genutils.c: some new debug functions for gpsim have been
5417         added,
5418         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
5419         float with integer part only,
5420         * src/pic16/main.c (_process_pragma): handle pragma udata access to
5421         place variables in access bank
5422         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
5423         updated sources to reflect recent changes in gen.c
5424
5425 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
5426
5427         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
5428         sources that searched for headers in installation path, now the
5429         device/include/pic16 is used,
5430         * src/pic16/glue.c (pic16glue),
5431         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
5432         .line directives if not in debug mode, this suppresses assembler's
5433         warnings for ignored directives
5434
5435 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
5436
5437         * src/port.h: made reset_regparms prototype void parameter explicit.
5438         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
5439         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
5440         * doc/sdccman.lyx: documented warning disabling and how to use
5441           printf_large to make it print floats.
5442         * device/include/stdbool.h: NEW
5443         * device/lib/_atof.c,
5444         * device/lib/_divuint.c,
5445         * device/lib/_divulong.c,
5446         * device/lib/expf.c,
5447         * device/lib/printf_large.c,
5448         * device/lib/sincosf.c,
5449         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
5450         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
5451           a completely reentrant lib.
5452
5453 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
5454
5455         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
5456         * device/include/pic16/stdio.h: fixed bug with colon
5457
5458 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
5459
5460         * device/include/pic16/stdio.h,
5461         * device/include/pic16/stdlib.h,
5462         * device/include/pic16/math.h: NEW
5463         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
5464         declared as _naked to reduce overhead
5465         * device/lib/Makefile.in (target port-specific-objects-pic16):
5466         changed * to *.* so to ignore the CVS directory,
5467         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
5468         stacked variables back in stack,
5469         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
5470         corruption
5471
5472 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
5473
5474         * .version: bumped version number to 2.4.5
5475         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
5476         * support/Util/SDCCerr.c (messages structure): added entry for
5477         W_POSSBUG2
5478
5479         Large cumulative patch for pic16 port and libraries.
5480         * device/include/pic16/sdcc-lib.h,
5481         * device/include/pic16/stdarg.h,
5482         * device/include/asm/pic16/features.h,
5483         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
5484         * device/include/pic16/float.h: changes reentrant keyword with
5485         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
5486         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
5487         updated target build-libraries to include objects from gptr,
5488         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
5489         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
5490         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
5491         all function headings,
5492         * src/SDCCmain.c: added global parameter userIncDirsSet,
5493         * (parseCmdLine): when option -I is encountered add directory to
5494         userIncDirsSet too,
5495         * src/version.awk: added space between control and long,
5496         * src/pic16/NOTES: added some notes for the port,
5497         * src/pic16/gen.c: added prototype for mov2fp function,
5498         * (fReturnpic16[]): properly named return value registers,
5499         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
5500         * (aopForSym): added code to handle symbols with onStack flag set,
5501         symbols onStack are allocated PTRSIZE bytes,
5502         * (aopFreeAsmop): handles special case where asmops are stack objects,
5503         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
5504         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
5505         added argument lock to trace flaws in allocating temporary registers
5506         when developing port,
5507         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
5508         * (pic16_popRegFromString): reenabled allocating a direct register
5509         from string,
5510         * (assignResultValue): various beautifications,
5511         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
5512         referenced function argument,
5513         * (genIpush): reenabled to allow stacked arguments, handles only
5514         ic->parmPush iCodes,
5515         * (genCall, genPcall): major changes to allow for variable argument
5516         functions, fixed a bug with falsely restoring stack pointer after
5517         returning from call,
5518         * (genFunction): pending code for critical function,
5519         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
5520         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
5521         * (genNearPointerGet): fixed bug with indirect reading, was always
5522         reading from INDF0
5523         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
5524         pointers,
5525         * (genAddrOf): rewrote code to take address of a stacked function parameter
5526         * (genCast): fixed casting to generic pointer type,
5527         * src/pic16/gen.h: added AOP_STA,
5528         * (struct asmop): added field stk,
5529         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
5530         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
5531         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
5532         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
5533         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
5534         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
5535         generic pointers,
5536         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
5537         and library paths,
5538         * (pic16_port structure): generic pointer size is set to 3,
5539         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
5540         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
5541         compiler warning,
5542         * src/pic16/ralloc.c (allocReg): prevent allocating register when
5543         operand is an iTemp,
5544
5545 2004-09-24 Martin Helmling <mh AT octo-soft.de>
5546
5547         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
5548         * debugger/mcs51/simi.c: addapt new syntax of s51
5549
5550 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
5551
5552         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
5553         * src/pic16/pcode.c: commented out some calls to free() in order to
5554         fix bug #989576,
5555
5556 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5557
5558         * src/SDCCicode.h,
5559         * src/SDCCicode.c (isiCodeInFunctionCall),
5560         * src/avr/ralloc.c (selectSpil),
5561         * src/pic/ralloc.c (selectSpil),
5562         * src/pic16/ralloc.c (selectSpil),
5563         * src/ds390/ralloc.c (selectSpil),
5564         * src/hc08/ralloc.c (selectSpil),
5565         * src/xa51/ralloc.c (selectSpil),
5566         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
5567         stack in the middle of a function call sequence (fixes bug #1020268)
5568         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
5569         costs associated with the minimum switch case.
5570
5571 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5572
5573         * src/SDCC.lex: fixed bug #1030549
5574
5575 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5576
5577         * src/SDCCcse.h (struct cseDef),
5578         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
5579         over a function call if the CSE is derived from a symbol whose
5580         address has been taken (fixes bug #1029883)
5581         * support/regression/tests/bug-1029883: a new regression test for
5582         this bug
5583
5584 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5585
5586         * src/hc08/gen.c (emitinline): fixed bug #1029778
5587         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
5588         to a cast object is no longer a syntax error ("fixes" bug #1030006,
5589         and starts toward RFE #905167)
5590
5591 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
5592
5593         * src/pic16/gen.c (mov2f): New function to move an operand to
5594         another without considering if it is a literal or a register,
5595         * (pic16_sameRegs): don't check if they are both AOP_REG,
5596         * (AccRsh): removed andmask=0 lines,
5597         * (genLeftShift): duplicated to be improved in future versions,
5598         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
5599         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
5600         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
5601         * (pic16initMnemonics): added initialization for POC_INFSNZW,
5602         * (insertBankSwitch): fixed inserting banksel directives algorithm
5603         for instructions that follow a skip instruction, this fixes a report
5604         for broken subtraction code generation,
5605         * src/pic16/ralloc.c (deassignLRs): do not free register if current
5606         iCode is a left op, just in case result and right share the same
5607         registers
5608
5609 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5610
5611         * src/hc08/main.c,
5612         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
5613         preservation of HX
5614         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
5615         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
5616         on 2004-09-12; it was buggy
5617
5618 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
5619
5620         * src/SDCCsymt.h: removed RESULT_CHECK
5621         * src/SDCCast.c,
5622         * src/SDCCglue.c,
5623         * src/SDCCval.c,
5624         * src/pic/glue.c,
5625         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
5626
5627 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
5628
5629         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
5630         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
5631         configuration values no more rejected by compiler, they are assigned
5632         to configuration registers with a warning message instead,
5633         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
5634         the for-loop so last conf register is emitted too,
5635         * (_pic16_initPaths): link library libsdcc.lib by default,
5636         * (_hasNativeMulFor): modified test for multiplication according to
5637         Raphael Neider's remarks. Integer multiplication is also done with
5638         support functions,
5639         * device/include/pic16/pic18fregs.h: corrected type error in while
5640         testing and including 18f6720 header file
5641
5642 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
5643
5644         * src/pic16/device.h (pic16_options): removed field use_crt,
5645         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
5646         until an optimization to handle single bits is added,
5647         * (pic16_loadFSR0): moved before genUnpackBits,
5648         * (genAnd): some white lines removed,
5649         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
5650         leave_reset flags in pic16_options when using crt modules,
5651
5652 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
5653
5654         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
5655           for bugs 898889 & 979599. Also used some safer print instructions.
5656
5657 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
5658
5659         * src/pic16/device.h (pic16_options_t): added field use_crt,
5660         crt_name, no_crt,
5661         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
5662         catch a probable future bug,
5663         * src/pic16/gen.c: aopIdx function commented out,
5664         * (genAssign): commented out old code which used aopIdx,
5665         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
5666         code, added if conditionals to take into account the --use-crt
5667         command line options,
5668         * src/pic16/main.c (pic16_optionsTable): added new command line
5669         options, --use-crt= and --no-crt,
5670         * (_pic16_linkEdit): now the proper crt object is added in the
5671         linker command line except than when --no-crt is specified,
5672         * src/pic16/pcode.c,
5673         * src/pic16/pcode.h: added some structures and functions for a new
5674         optimization scheme to compansate for instruction overhead between
5675         same iCodes, this scheme is currently under development and is not
5676         working in any way,
5677         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5678         to && operator,
5679         * device/lib/pic16/startup/crt0i.c,
5680         * device/lib/pic16/startup/crt0iz.c: added global char variable
5681         __uflags to force the generation of an idata section
5682
5683 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5684
5685         * doc/Makefile,
5686         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5687         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5688
5689 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5690
5691         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5692         Frieder) and clarified the default code optimization mode
5693
5694 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5695
5696         * src/SDCC.lex (doPragma, process_pragma),
5697         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5698         "opt_code_size", and "opt_code_balanced"
5699         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5700         regrouped options by category, added support for category headers
5701         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5702         and "--opt-code-size"
5703         * doc/sdccman.lyx: documented these new options and pragmas
5704         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5705         preference into account
5706
5707 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5708
5709         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5710           geniCodePreDec): Fixed bug 904237 by generating a warning
5711         * src/SDCCerr.h,
5712         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5713
5714 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5715
5716         * src/pic/device.c : When no max ram set validate full memory range.
5717         * src/pic/pcode.c,
5718         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5719
5720 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5721
5722         * device/lib/_gptrget.c,
5723         * device/lib/_gptrput.c: updated comment
5724         * device/lib/calloc.c,
5725         * device/lib/free.c,
5726         * device/lib/malloc.c,
5727         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5728         * src/SDCCcse.c (cseBBlock),
5729         * src/SDCCicode.c (printOperand, geniCodeArray),
5730         * src/SDCCicode.h (struct operand): fixed bug 868103
5731         * support/regression/tests/bug-868103.c: added
5732         * src/SDCCast.c (searchLitOp),
5733         * src/SDCCcse.h (struct cseDef),
5734         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5735         * src/SDCCicode.h (struct operand),
5736         * src/SDCCsymt.h (struct sym_link),
5737         * src/avr/gen.c (hasInc),
5738         * src/ds390/gen.c (hasInc),
5739         * src/hc08/gen.c (genPlusIncr, hasInc),
5740         * src/mcs51/gen.c (hasInc),
5741         * src/pic16/glue.c (pic16_printIvalChar),
5742         * src/pic16/ralloc.c (regWithIdx),
5743         * src/xa51/gen.c (hasInc) : removed warnings
5744         * src/SDCCast.c (createBlock): added comment ???
5745         * src/hc08/ralloc.c: updated comments
5746
5747 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5748
5749         * doc/sdccman.lyx: updated section on switch statements, added
5750         section about semaphore locking
5751         * doc/Makefile: added option -info for latex2html
5752         * device/lib/_gptrget.c,
5753         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5754
5755 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5756
5757         * src/pic/device.h,
5758         * src/pic/device.c,
5759         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5760          maxram is less than 0x100.
5761
5762 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5763
5764         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5765
5766 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5767
5768         * src/port.h,
5769         * src/mcs51/main.c,
5770         * src/ds390/main.c,
5771         * src/z80/main.c,
5772         * src/hc08/main.c,
5773         * src/pic/main.c,
5774         * src/pic16/main.c,
5775         * src/avr/main.c,
5776         * src/xa51/main.c
5777         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5778         a jump table is the best form for a switch statement, including
5779         automatic insertion of missing cases to make the case range
5780         continuous. Developed in collaboration with Frieder Ferlemann.
5781
5782 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5783
5784         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5785         accumulator result if it needs sign extension
5786
5787 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5788
5789         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5790
5791 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5792
5793         * device/lib/gbz80/printf.c,
5794         * device/lib/z80/printf.c: removed define for NULL
5795
5796 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5797
5798         * as/xa51/xa_link.c,
5799         * device/examples/ds390/ow390/ad26.c,
5800         * device/examples/ds390/ow390/cnt1d.c,
5801         * device/examples/ds390/ow390/counter.c,
5802         * device/examples/ds390/ow390/ds2480.h,
5803         * device/examples/ds390/ow390/ds2480ut.c,
5804         * device/examples/ds390/ow390/findtype.c,
5805         * device/examples/ds390/ow390/gethumd.c,
5806         * device/examples/ds390/ow390/owllu.c,
5807         * device/examples/ds390/ow390/ownetu.c,
5808         * device/examples/ds390/ow390/swt12.c,
5809         * device/examples/ds390/ow390/swtloop.c,
5810         * device/examples/ds390/ow390/temp.c,
5811         * device/examples/ds390/ow390/temp10.c,
5812         * device/examples/ds390/ow390/thermo21.c,
5813         * device/examples/ds390/ow390/tinilnk.c,
5814         * device/examples/ds390/ow390/tstfind.c,
5815         * device/examples/serialcomm/windows/serial.cpp,
5816         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5817         * device/include/reg51.h: fixed line endings for cvs
5818
5819 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5820
5821         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5822         packRegsForAccUse, packRegisters): new accumulator register
5823         packing algorithm
5824         * support/regression/ports/hc08/support.c (_putchar): suppress
5825         warning of unused variable
5826         * src/SDCCicode.c: added SWAP entry to codeTable
5827
5828 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5829
5830         * device/lib/sprintf.c: forgot to add this file before previous commit
5831
5832 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5833
5834         * src/pic16/gen.c (genPackBits): added operand right in function
5835         parameters, load result directly if p_type is POINTER (that is
5836         called by genNearPointerSet)
5837         * (genUnPackBits): added operand left in function parameters,
5838         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5839         FSR0 if accessing bitfields,
5840
5841 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5842
5843         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5844           _print_format; updated printf, sprintf, vsprintf
5845         * device/include/asm/default/features.h: corrected comment/define
5846         * device/lib/Makefile.in: added sprintf.c
5847         * device/lib/libsdcc.lib: added sprintf module
5848         * device/lib/printf_large.c,
5849         * device/lib/vprintf.c,
5850         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5851           into these 3 files
5852         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5853         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5854         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5855           hc08 test
5856         * support/regression/tests/zeropad.c: define idata as data for hc08
5857
5858 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5859
5860         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5861         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5862         labels are referenced at least once (even if a reference is not found)
5863         * src/hc08/gen.c (emitcode): set isComment flag for comments
5864         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5865         loads), rules 6a..6b (optimize jumps to return)
5866
5867 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5868
5869         * device/lib/acosf.c (acosf),
5870         * device/lib/asinf.c (asinf),
5871         * device/lib/atanf.c (atanf),
5872         * device/lib/ceilf.c (ceilf),
5873         * device/lib/cosf.c (cosf),
5874         * device/lib/coshf.c (coshf),
5875         * device/lib/cotf.c (cotf),
5876         * device/lib/fabsf.c (fabsf),
5877         * device/lib/floorf.c (floorf),
5878         * device/lib/log10f.c (log10f),
5879         * device/lib/logf.c (logf),
5880         * device/lib/sinf.c (sinf),
5881         * device/lib/sinhf.c (sinhf),
5882         * device/lib/sqrtf.c (sqrtf),
5883         * device/lib/tanf.c (tanf),
5884         * device/lib/tanhf.c (tanhf),
5885         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5886         replaced all instances of "reentrant" in the library functions
5887         defined in math.h with this macro.
5888         * support/regression/tests/float_trans.c: reenabled test for hc08
5889
5890 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5891
5892         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5893         erroneously deleted
5894
5895 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5896
5897         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5898         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5899         multi-byte volatile operands are used
5900         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5901         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5902         initialization to area GSINIT0 so that it would always precede
5903         any static initializers in GSINIT
5904         * support/regression/tests/zeropad.c: fixed idata define for hc08
5905         * support/regression/tests/bug-927659.c,
5906         * support/regression/tests/float_trans.c: disabled tests for hc08
5907         pending missing library routines
5908         * .version: increased version number to 2.4.4 - hc08 port now passes
5909         regression tests
5910
5911
5912 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5913
5914         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5915         * Makefile.common.in,
5916         * as/Makefile,
5917         * as/hc08/Makefile.in,
5918         * as/mcs51/Makefile.in,
5919         * as/z80/Makefile.in,
5920         * debugger/mcs51/Makefile.in,
5921         * device/include/Makefile.in,
5922         * device/lib/Makefile.in,
5923         * doc/Makefile,
5924         * link/Makefile,
5925         * link/z80/Makefile.in,
5926         * packihx/Makefile.in,
5927         * sim/ucsim/main_in.mk,
5928         * sim/ucsim/avr.src/Makefile.in,
5929         * sim/ucsim/doc/Makefile.in,
5930         * sim/ucsim/gui.src/serio.src/Makefile.in,
5931         * sim/ucsim/hc08.src/Makefile.in,
5932         * sim/ucsim/s51.src/Makefile.in,
5933         * sim/ucsim/xa.src/Makefile.in,
5934         * sim/ucsim/z80.src/Makefile.in,
5935         * src/Makefile.in,
5936         * support/cpp2/Makefile.in,
5937         * support/librarian/Makefile,
5938         * support/makebin/Makefile: added DESTDIR to the install path proposed
5939         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5940         * doc/sdccman.lyx: added DESTDIR documentation
5941
5942 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5943
5944         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5945         instruction for interrupt handlers, use fast returns when returning
5946         from high priority interrupts
5947
5948 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5949
5950         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5951         code generation
5952         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5953         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5954         bugs, ported much of Bernhard's code from mcs51
5955         * src/mcs51/gen.c (genSend),
5956         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5957         than one when calling a reentrant function
5958         * device/lib/_mullong.c: defined an alternate struct layout for big
5959         endian ports (hc08)
5960
5961 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5962
5963         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5964         test
5965
5966 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5967
5968         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5969         are sane and complete before asking the port its prefered parameter
5970         passing method (fixes bug #1017633)
5971         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5972         and _ret3
5973
5974 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5975
5976         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5977         problem in bitfields >= 8 bits.
5978
5979 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5980
5981         * src/SDCCsymt.c: undid changes that were not meant to be committed
5982
5983 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5984
5985         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5986
5987 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5988
5989         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5990           copied and wrong bit got inverted
5991
5992 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5993
5994         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5995         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5996         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5997         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5998         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5999         assignments to bitfields at known addresses
6000         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
6001         reads from bitfields at known addresses
6002         * src/hc08/ralloc.c (packRegisters),
6003         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
6004         genhc08Code): optimize pointer get values used as conditionals
6005         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
6006         and branch
6007
6008 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6009
6010         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
6011         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
6012         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
6013         as conditionals
6014
6015 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6016
6017         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
6018
6019 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6020
6021         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
6022         related problems
6023
6024 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
6025
6026         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
6027
6028 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6029
6030         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
6031         mcs51 port
6032
6033 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
6034
6035         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
6036
6037 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6038
6039         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
6040         cases use more compact code.
6041
6042 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
6043
6044         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
6045
6046 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6047
6048         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
6049
6050 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6051
6052         * src/SDCCsymt.h,
6053         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
6054         parameter of changePointer() from symbol* to sym_link*
6055         * src/SDCCast.c (decorateType): call changePointer() for CAST op
6056         * src/SDCCsymt.c (compareType): void* type is castable to other
6057         pointers, but not necesarily an exact match.
6058         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
6059         is no longer blindly treated as an exact match.
6060         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
6061
6062 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
6063
6064         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
6065
6066 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
6067
6068         * src/pic/gen.c,
6069         * src/pic/pcode.c,
6070         * src/pic/ralloc.h,
6071         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
6072
6073 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
6074
6075         * src/pic/device.c,
6076         * src/pic/device.h,
6077         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
6078
6079 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6080
6081         * src/mcs51/gen.c (emitcode): fixed bug #992819
6082
6083 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
6084
6085         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
6086           there's no need to make it worse
6087
6088 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6089
6090         * src/mcs51/ralloc.c (deassignLR),
6091         * src/ds390/ralloc.c (deassignLR),
6092         * src/hc08/ralloc.c (deassignLR),
6093         * src/z80/ralloc.c (deassignLR),
6094         * src/pic/ralloc.c (deassignLR),
6095         * src/pic16/ralloc.c (deassignLR),
6096         * src/avr/ralloc.c (deassignLR),
6097         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
6098         rlivePoint): fixed another part of bug #971834
6099
6100 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6101
6102         * src/z80/main.c: enabled "critical" keyword
6103         * src/z80/mappings.i,
6104         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
6105         functions (fixes bug #979646)
6106         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
6107
6108 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6109
6110         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
6111           such as c:\mydir.
6112
6113 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
6114
6115         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
6116           doesn't disable too much optimizations
6117
6118 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6119
6120         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
6121
6122 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
6123
6124         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
6125
6126 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6127
6128         * src/pic/gen.c tidied up tabs
6129         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
6130         * src/pic/main.c tidied up tabs
6131         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
6132         * src/pic/pcoderegs.c tidied up tabs
6133         * src/pic/ralloc.c tidied up tabs
6134
6135 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
6136
6137         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
6138         to S_FIXED for pic16 port and when symbol is not in level 0,
6139         allocate for S_REGISTER storage class and pic16 port, too,
6140         * src/pic16/device.h: prototype for checkSym,
6141         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
6142         * (pic16_assignConfigWordValue): test the value and the mask to
6143         validate that the value is suitable for the configuration word,
6144         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
6145         collect extern declared symbols, don't emit symbol twice, check
6146         first if symbol is in publics set first,
6147         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
6148         * added command line '--fstack' which enables an experimental
6149         feature for stack access, too buggy to be used yet...
6150         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
6151         * (pic16_allocDirReg): when register has storage class S_REGISTER
6152         allocate in pic16_dynAccessRegs,
6153         * device/include/pic16/pic18f????.h: modified configuration word
6154         naming convention, words started as CONFIG0H but should be CONFIG1H
6155
6156 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
6157
6158         * device/include/mcs51reg.h: fixed bug 970993
6159
6160 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
6161
6162         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
6163         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
6164         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
6165         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
6166         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
6167         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
6168           error/warning numbers,
6169           added function setWarningDisabled()
6170         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
6171         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
6172           _memcmp.c _memmove.c calloc.c realloc.c free.c
6173         * support/regression/tests/malloc.c: added tests for new functionality
6174         * support/regression/tests/zeropad.c: added tests for truncated initializers
6175           and initialized char arrays starting with '\x0'
6176         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
6177
6178 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
6179
6180         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
6181
6182 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6183
6184         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
6185         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
6186         peephole 177.e. Thanks to anonymous
6187
6188 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
6189
6190         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
6191         function isn't used in the source but referenced as a
6192         variable initializer then declare it as extern in .asm file
6193
6194 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
6195
6196         * .version: increased version number to 2.4.3
6197
6198         Adding version extension according to ChangeLog CVS revision
6199         * src/Makefile.in (target all): added dependency 'version.h'
6200         * (rule version.h): added rule to create version.h from ChangeLog,
6201         * (rule dep): added dependency version.h,
6202         * src/version.awk: AWK script to create version.h
6203         * src/SDCCdwarf2.c (dwWriteModule),
6204         * src/SDCCglue.c (initialComments),
6205         * src/SDCCmain.c (printVersionInfo): modified to write after
6206         version string the version extension number,
6207         * src/SDCCutil.c: included "version.h"
6208         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
6209         number,
6210         * src/SDCCutil.h: added prototype for getBuildNumber
6211
6212         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
6213         includeDirsSet, too,
6214         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
6215         const char [] is found in function prototype...
6216
6217         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
6218         moving to WREG with source is already in WREG,
6219         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
6220         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
6221         * (aopForSym): stack'ed symbols are partially supported, added
6222         if-clause to support symbols in FARSPACE,
6223         * (sameRegs): added test for AOP_ACC to see if registers are same,
6224         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
6225         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
6226         * (pic16_popRegFromString): will not allocate a new register if it
6227         doesn't find one by name, bug may have introduced...
6228         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
6229         * (genIpush): revived to use pic16 port's stack,
6230         * (genAddrOf): added incomplete case for stack'ed operand,
6231         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
6232         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
6233         can handle multibyte operands,
6234         * src/pic16/glue.c (pic16_printIval*): some debug info added,
6235         * (pic16initialComments): added message for MPLAB compatibility
6236         mode enabled,
6237         * src/pic16/main.h: prototype for pic16_mplab_comp,
6238         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
6239         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
6240         * (_pic16_linkEdit): NEW, handles link stage, transferred here
6241         because of increased complexity of procedure,
6242         * (_process_pragma): stack pragma changed to format 'stack pos len',
6243         emit symbol '_stack_end' to conform with gplink,
6244         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
6245         to search for register,
6246         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
6247         PO_GPR_REGISTER,
6248         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
6249         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
6250         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6251         case for PO_GPR_REGISTER,
6252         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
6253         dies, the new era is ahead !...
6254         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
6255         pic16_dynInternalRegs,
6256         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
6257         * (pic16_allocDirReg): minor optimizations and bug fixes,
6258         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
6259
6260         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
6261         load stack and frame pointer with address of 'stack_end' symbol
6262
6263 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
6264
6265         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
6266         without source code but only variable initializers
6267
6268 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
6269
6270         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
6271         external are not declared as extern to reduce overhead while linking
6272
6273 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
6274
6275         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
6276
6277 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
6278
6279         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
6280           Yee Keat for the patch
6281         * src/SDCCast.c (decorateType): fixed bug #979599
6282         * src/ds390/gen.h: removed local fReturnSizeDS390
6283         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
6284         * src/ds390/gen.c (genAnd, genOr, genXor),
6285         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
6286
6287 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
6288
6289         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
6290         add relFilesSet to $3, manipulate $2 to handle linking of object
6291         files without source files in command line,
6292         * device/include/pic16 (all headers): added ID location macros,
6293         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
6294         entries for ID location bytes,
6295         * (pic16_assignIdByteValue): NEW,
6296         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
6297         added field dumpcalltree to pic16_options_t,
6298         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
6299         is used instead of pic16_Gstack_base_addr, check if (ifx) before
6300         emitting rFalseIfx label after check_carry label,
6301         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
6302         pic16_emitDIRegs), NEW
6303         * (pic16glue): dump .calltree file when option --calltree found,
6304         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
6305         * (_pic16_genAssemblerPreamble): emit ID locations after
6306         configuration registers,
6307         * (pic16_linkCmd): modifications of the link command,
6308         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
6309         * (pic16_pCodeInitRegisters): don't init stack registers,
6310         * (pic16_findPrevInstruction): fixed bug,
6311         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
6312         bug with immediate registers,
6313         * (buildCallTree): traces stack push and pop,
6314         * (pct2): dump also stack usage for each function,
6315         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
6316         * (pic16_allocDirReg): various modifications,
6317         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
6318         fixed to 1,
6319
6320 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
6321
6322         * src/pic16/pcode.c: removed buggy double colon
6323
6324 2004-07-01 Borut Razem <borut.razem AT siol.net>
6325
6326         * support/scripts/sdcc.nsi: added include/pic16 to setup
6327
6328 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
6329
6330         * device/lib/Makefile.in: fixed bug in target objects-pic16,
6331         * device/lib/pic16/Makefile: prefixed with dash (-) command under
6332         target 'clean',
6333         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
6334         specific command line arguments. Also added sample lkr script
6335         for placing a variable at a specific memory bank.
6336         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
6337         at a specific memory bank,
6338         * (pic16_dump_isection): fixed bug which caused string literals to
6339         be omitted when dumping idata section,
6340         * (pic16_groupRegistersInSection): added code to handle registers
6341         in specific memory banks,
6342         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
6343         public, all references are renamed too,
6344         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
6345         AOP_DPTR2,
6346         * (pic16_storeForReturn): added case to handle when dest is WREG,
6347         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
6348         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
6349         pic16_rel_udata, check to see if that register is marked as being
6350         a member of a specific memory bank,
6351         * (pic16_printIvalCharPtr): added code to add string literals either
6352         to code or the idata sections,
6353         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
6354         also accept the 'udata' pragma,
6355         * src/pic16/main.h: new structure types sectName and sectSym
6356         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
6357         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
6358         * (pic16_findPrevInstruction): fixed, it returned nothing,
6359         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
6360         instruction combinations,
6361         * (pic16_FixRegisterBanking): heavily reorganised,
6362         * (pic16_AnalyzeBanking): if generating banksel directives is
6363         disabled, then don't call FixRegisterBanking at all,
6364         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
6365         completely removed,
6366         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
6367
6368 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
6369
6370         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
6371         Phuah Yee Keat <yk.phuah AT nestac.com>
6372
6373 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6374
6375         * src/pic16/glue.c (pic16createInterruptVect): function now emits
6376         correctly the IVT even if it is relocated to some other location
6377
6378 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6379
6380         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
6381         * device/include/pic16/pic18f2220.h: NEW,
6382         * device/lib/pic16/libdev/pic18f2220.c: NEW,
6383         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
6384         * src/pic16/device.c (struct Pics16): added info for 18f2220,
6385         * src/pic16/device.h (struct pic16_options): added ivt_loc and
6386         nodefaultlibs, ivt_loc is the location of the interrupt vector
6387         table, and nodefaultlibs signs that default libraries should not be
6388         linked in link stage,
6389         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
6390         according to --ivt-loc argument,
6391         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
6392         when pragma stack is found,
6393
6394 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6395
6396         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
6397         256 (range check), 257 (do while), 258.a-f (bit banging
6398         f.e. on 3-wire SPI bus)
6399
6400 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6401
6402         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
6403         variables used exclusively within a loop
6404
6405 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
6406
6407         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
6408
6409 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6410
6411         * src/SDCClrange.c (computeClash): fixed bug #971834
6412
6413 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6414
6415         * src/mcs51/gen.c (genCmp): fixed bug #975903
6416         * src/hc08/gen.c (operandsEqu),
6417         * src/ds390/gen.c (operandsEqu),
6418         * src/z80/gen.c (operandsEqu),
6419         * src/pic/gen.c (operandsEqu),
6420         * src/pic16/gen.c (operandsEqu),
6421         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
6422         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
6423
6424 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6425
6426         * src/SDCCcse.c (cseBBlock): fixed bug #966963
6427
6428 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
6429
6430         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
6431         default case in switch statement,
6432         * glue.c (pic16_initPointer): expr is initialised via decoarteType
6433         to eliminate problem with initialisation of pointers, but problem
6434         still exists,
6435         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
6436         * (emitStaticSegment): removed various lines emitting debug info,
6437         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
6438         added processor registers for utilizing EEPROM,
6439         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
6440         configurable and set 8
6441
6442 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
6443
6444         * .version: increased version number to 2.4.2,
6445
6446         Cumulative patch for pic16 port
6447         * src/pic16/device.c: changed scheme to dump initial values for
6448         variables in idata segment, all print_idata* functions were removed,
6449         now the pic16_printIval* will be called,
6450         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
6451         * _pic16_printPointerType, pic16_printPointerType,
6452         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
6453         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
6454         NEW, similar to the respective functions in SDCCglue.c,
6455         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
6456         way, emitting hex bytes,
6457         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
6458
6459 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6460
6461         * src/avr/ralloc.c (serialRegAssign),
6462         * src/xa51/ralloc.c (serialRegAssign),
6463         * src/pic/ralloc.c (serialRegAssign),
6464         * src/pic16/ralloc.c (serialRegAssign),
6465         * src/hc08/ralloc.c (serialRegAssign),
6466         * src/z80/ralloc.c (serialRegAssign),
6467         * src/ds390/ralloc.c (serialRegAssign),
6468         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
6469
6470 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6471
6472         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
6473         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
6474
6475 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
6476
6477         Cumulative patch for pic16 port:
6478         * src/pic16/device.h (typedef PIC16_device) modified fields for
6479         defining microcontrollers,
6480         * src/pic16/device.c: added new info for all devices in Pics16 array,
6481         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
6482         to be optimised out by the pCode optimiser,
6483         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
6484         specially, bug reported by G.M. Gallant,
6485         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
6486         as force'd so that cannot be optimised out by pCode optimiser,
6487         * src/pic16/pcode.c,
6488         * src/pic16/pcodepeeph.c,
6489         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
6490         they are disabled by default, but can be enabled explicit with
6491         command argument --denable-peeps, for testing,
6492         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
6493         --pomit-ivt in COMPILE_FLAGS
6494
6495 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6496
6497         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
6498           compilation on MSVC
6499
6500 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6501
6502         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
6503
6504 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6505
6506         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
6507         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
6508
6509 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
6510
6511         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
6512         would only assign 0x300001 register.
6513
6514 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
6515
6516         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
6517         in COMPILE_FLAGS. Thanks to G. Gallant for report.
6518
6519 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6520
6521         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
6522         for ds80c400
6523         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
6524         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
6525         added peephole 254 (left shift), 255 (jump table)
6526
6527 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
6528
6529         * device/lib/Makefile.in: removed comment line with model-pic16,
6530         * (target port-specific-objects-pic16): the libraries and objects
6531         are copied to the build directory form the device/lib/pic16/bin
6532         directory
6533
6534         Cumulative patch concerning pic16 port:
6535         * library directory has been re-organized,
6536         * added support for PIC18F1220,
6537         * added headers and library sources for chips 18f1220,18f6520,
6538         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
6539
6540         * configuration registers setting has changed, now each supported
6541         device has a complete description of the registers it uses,
6542         * all initialisations are moved to idata sections, these section
6543         can be absolute or relocatable,
6544         * fixed initialisation of codespace variables,
6545         * fixed warning about PCLATU and gpsim,
6546         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
6547         * (genAssign): use table reads when assigning from variables in codespace,
6548         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
6549         char/int variables placed in codespace,
6550         * (pic16_emitConfigRegs): NEW, emits a list with configuration
6551         registers set in .asm file, no need for --pomit-config-words anymore,
6552         * (pic16glue): some 8051 legacy segments are commented out
6553         (to be removed completely),
6554         * added support for alternative assembler and linker with --asm=
6555         and --link= command line arguments,
6556         * peepholes are disabled automatically in the port, no need to
6557         specify on command line,
6558         * port supports natively char/int/long multiplication, but converts
6559         all divisions to support functions,
6560         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
6561         to the file set in variable $2,
6562         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
6563         strings in ASCII format and not in hex,
6564         * ralloc.c (serialRegAssign): added a triplet of conditional calls
6565         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
6566         allocate proper register if iCodes aren't temporary,
6567
6568 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
6569
6570         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
6571
6572 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
6573
6574         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
6575         is commented out
6576
6577 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6578
6579         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
6580         computed address is reused
6581         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
6582         multi-byte bitfields
6583
6584 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6585
6586         * src/z80/gen.c: (genArrayInit): must check for pointers too
6587
6588 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6589
6590         * support/regression/tests/zeropad.c: never meant to commit the
6591           nestedstruct test: removed, added check for GCC version
6592
6593 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
6594
6595         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
6596         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
6597         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
6598           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
6599           bugs 928906 and 954082 half-empty initializers
6600         * src/SDCCsymt.h,
6601         * src/SDCCsymt.c (getAllocSize): added for above fix
6602         * src/z80/gen.c (genArrayInit): fixed bug 741044
6603         * support/regression/tests/zeropad.c: added tests
6604
6605 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
6606
6607         * src/pic16/device.c (pic16_dump_section): corrected bug which
6608         caused some symbols of the libraries to be misplaced
6609
6610 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6611
6612         * src/pic16/glue.c,
6613         * src/pic16/ralloc.h,
6614         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
6615         to fix conflict with pic port
6616
6617 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6618
6619         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
6620         externs configuration variables,
6621         * src/pic16/ralloc.h,
6622         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
6623         prototype in header, commented out some debug messages
6624
6625 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
6626
6627         * src/pic16/glue.c,
6628         * src/pic16/main.c,
6629         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
6630         for gpasm COFF object generation. Thanks to D. Hawkins for
6631         his patch info
6632
6633 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6634
6635         * src/ds390/main.c,
6636         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
6637         Brock for spotting this)
6638         * src/ds390/gen.c (genEndFunction),
6639         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
6640         interrupt handler and critical. Disable push/pop optimizations when
6641         peephole optimizations disabled.
6642
6643 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6644
6645         Updated pic16 library sources and headers.
6646         * device/lib/pic16/pic18f*/ ,
6647         * device/include/pic16/*.h: modified to handle structured SFR
6648         definitions
6649
6650 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6651
6652         * src/port.h (PORT structure): added hook initPaths, now each
6653         port can declare its own default search paths,
6654         which can been seen with the --print-search-dirs option,
6655         see pic16 port for example,
6656         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
6657         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
6658         * (doPrintSearchDirs): NEW, replaces in a central manner the
6659         printing of search dirs which was split in set*Paths functions,
6660         * (main): added call to port->initPaths and doPrintSearchDirs,
6661         * src/avr/main.c,
6662         * src/ds390/main.c,
6663         * src/hc08/main.c,
6664         * src/izt/i186.c,
6665         * src/izt/tlcs900h.c,
6666         * src/mcs51/main.c,
6667         * src/pic/main.c,
6668         * src/pic16/main.c: modified port structures to reflect addition of
6669         initPaths hook,
6670
6671         * src/pic16/device.c (regCompare): registers are finally sorted by name,
6672         * (pic16_dump_section): for registers in same address reserve memory once,
6673         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
6674         to no_banksel,
6675         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6676         result is greater in size than right or left,
6677         * (pic16_genUMult8X8_8): there are some cases where the result can
6678         be 16 bits size, so handle these,
6679         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6680         * (pic16_outBitC): modified to emit pcodes,
6681         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6682         or not,
6683         * (genDivOneByte): implemented algorithm to divide 8-bits,
6684         * (genCmp): uncommented goto, but issues still exist,
6685         * (genAnd): fixed a bug with variables >8bits,
6686         * (genPackBits): optimization added that uses BCF/BSF to change a
6687         single bit,
6688         * (genAssign): fixed bug when assigning floating point literals,
6689         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6690         __sdcc_gsinit_startup label,
6691         * src/pic16/main.c (_pic16_init): removed search directory
6692         initialisations,
6693         * (_pic16_initPaths): NEW, used to initialise search directories,
6694         * (_hasNativeMulFor): support functions for all except char/int
6695         multiplication, and char division,
6696         * (PIC16_port struct): modified entry for native mul support,
6697         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6698         no_banksel option,
6699         * (buildCallTree): call to register_usage is ifdef'ed out,
6700
6701 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6702
6703         * device/include/string.h: applied Stas Sergeev's patch to make this
6704         header file compatible with the preprocessor -Wundef option
6705         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6706         failure (fixes bug #941458)
6707
6708 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6709
6710         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6711         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6712         that the variable, not the function, should be static
6713         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6714         to be consistent with non-literal case
6715
6716 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6717
6718         * src/SDCCast.c (isConformingBody): fixed bug #949967
6719         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6720         convilong): fixed bug #952086
6721
6722 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6723
6724         * src/SDCCmem.c (allocVariables): fixed bug #955321
6725
6726 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6727
6728         * src/hc08/main.c (_hc08_genAssemblerEnd),
6729         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6730         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6731         completely eliminated the use of a temporary file
6732         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6733         when more than one file linked
6734         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6735
6736 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6737
6738         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6739         which fixes bug #543481
6740         * support/regression/tests/bug-751703.c: fixed comments left from a
6741         cut and paste error
6742         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6743         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6744         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6745         scopes
6746         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6747         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6748         are now changed to underscores in moduleName
6749
6750 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6751
6752         * as/mcs51/lkmem.c: better fix for bug #954173
6753
6754 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6755         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6756
6757         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6758         * device/include/c8051f000.h,
6759         * device/include/c8051f120.h,
6760         * device/include/c8051f300.h,
6761         * device/include/c8051f310.h,
6762         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6763         PWM16) and detab'ed
6764
6765 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6766
6767         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6768         and mailing lists, doc'ed --no-peep-comments, removed reference
6769         to knoppix (newest version has no LyX/LaTeX), other minor changes
6770         * src/SDCCglue.c (glue): save 2 bytes stack space with
6771         option --main-return. The ljmp could probably be avoided too
6772
6773 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6774
6775         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6776
6777 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6778
6779         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6780         * src/SDCCopt.c (isLocalWithoutDef),
6781         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6782         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6783         (credit to Maarten Brock for patch #949363, on which this is based)
6784         * support/regression/tests/bug-751703.c: some test cases of extern used
6785         within inner scopes.
6786
6787 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6788
6789         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6790         SPEC_STRUCT
6791         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6792         struct definitions
6793         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6794         dwWriteLabel): fix to create valid debugger symbols even when
6795         the module name has non-alphanumeric symbols in it
6796         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6797         when a variable's allocation has been optimized away
6798
6799
6800 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6801
6802         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6803         * src/hc08/main.c,
6804         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6805         * src/mcs51/main.c,
6806         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6807         * src/ds390/main.c,
6808         * src/z80/gen.c (z80_emitDebuggerSymbol),
6809         * src/z80/main.c,
6810         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6811         * src/pic/main.c,
6812         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6813         * src/pic16/main.c,
6814         * src/avr/gen.c (avr_emitDebuggerSymbol),
6815         * src/avr/main.c,
6816         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6817         * src/xa51/main.c,
6818         * src/SDCCdebug.c (emitDebuggerSymbol),
6819         * src/SDCCdebug.h,
6820         * src/port.h: added a debugger struct to the port struct. Added a
6821         callback for defining debugger symbols
6822
6823         * src/SDCCast.c (createLabel),
6824         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6825         with isitmp = 1
6826         * src/SDCCicode.h,
6827         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6828         iCode back to the ast for the function
6829
6830         * src/hc08/ralloc.c (hc08_assignRegisters),
6831         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6832         unneeded fields from the regs struct.
6833         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6834         pushReg() & pullReg() functions instead of emitcode()
6835
6836         * src/hc08/gen.c (genLabel, genhc08Code),
6837         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6838
6839         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6840         debugger hooks
6841
6842         * src/hc08/gen.c (genEndFunction, genhc08Code),
6843         * src/hc08/gen.h,
6844         * src/mcs51/gen.c (genEndFunction, gen51Code),
6845         * src/mcs51/gen.h,
6846         * src/ds390/gen.c (genEndFunction, gen390Code),
6847         * src/ds390/gen.h,
6848         * src/z80/gen.c (genEndFunction, genZ80Code),
6849         * src/z80/gen.h,
6850         * src/z80/z80.h,
6851         * src/pic/gen.c (genEndFunction, genpic14Code),
6852         * src/pic/gen.h,
6853         * src/pic16/gen.c (genEndFunction, genpic16Code),
6854         * src/pic16/gen.h,
6855         * src/avr/gen.c (genEndFunction, genAVRCode),
6856         * src/avr/gen.h,
6857         * src/xa51/gen.c (genEndFunction, genXA51Code),
6858         * src/xa51/gen.h,
6859         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6860         specific code to cdbFile.c and out of the backend code generators
6861
6862         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6863         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6864         starting address is now 0
6865
6866         * as/hc08/asm.h,
6867         * as/hc08/m08pst.c,
6868         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6869         assembler directive for DWARF support
6870         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6871
6872         * src/src.dsp,
6873         * src/Makefile.in,
6874         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6875
6876 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6877
6878         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6879         and inappropriate peephole optimization in jump tables
6880
6881 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6882
6883         * as/hc08/m08pst.c,
6884         * src/SDCCglue.c: sdccopt works for the hc08 port now
6885
6886 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6887
6888         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6889
6890 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6891
6892         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6893
6894 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6895
6896         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6897         rules
6898         * src/SDCCmain.c,
6899         * src/SDCCglobl.h,
6900         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6901         comments from the peephole optimizer replacement rules
6902         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6903         symbols
6904         * src/SDCCcse.c (updateSpillLocation),
6905         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6906         equivalents
6907         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6908         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6909         objects far pointers
6910
6911 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6912
6913         * src/SDCCsymt.h: a missing part of my last change
6914         * src/pic/ralloc.c (regTypeNum),
6915         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6916
6917 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6918
6919         * src/SDCCicode.h,
6920         * src/SDCCicode.c (aggrToPtrDclType),
6921         * src/SDCCptropt.h,
6922         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6923         ptrPseudoSymConvert),
6924         * src/pic/ralloc.c (regTypeNum),
6925         * src/pic16/ralloc.c (regTypeNum),
6926         * src/hc08/ralloc.c (regTypeNum),
6927         * src/ds390/ralloc.c (regTypeNum),
6928         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6929         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6930
6931 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6932
6933         * link/z80/lkmain.c (afile),
6934         * as/hc08/lkmain.c (afile),
6935         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6936         prevent a pointer problem when a filename has no directory and
6937         no extension specified.
6938
6939 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6940
6941         * link/z80/lkmain.c (afile): allow periods in directory names
6942         * link/z80/lkmain.c (afile),
6943         * as/mcs51/lkmain.c (afile),
6944         * as/hc08/lkmain.c (afile): allow linker script file to have an
6945         extension other than ".lnk"
6946         * link/z80/lklex.c (getfid),
6947         * link/z80/lkmain.c (parse),
6948         * as/mcs51/lklex.c (getfid),
6949         * as/mcs51/lkmain.c (parse),
6950         * as/hc08/lklex.c (getfid),
6951         * as/hc08/lkmain.c (parse): Support comments in the linker script
6952         file on lines by themselves and after filenames
6953
6954 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6955
6956         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6957
6958 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6959
6960         * src/z80/peeph-z80.def: removed some peephole rules that don't
6961         work with multibyte arithmetic (fixed bug #937126)
6962         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6963         to registers and not global variables
6964         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6965         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6966         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6967         checking for assignments not internally generated (fixed bug #931895)
6968         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6969         structure member (fixed bug #930072)
6970
6971 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6972
6973         * src/SDCCmain.c (linkEdit),
6974         * src/hc08/main.c (_hc08_parseOptions),
6975         * as/hc08/Makefile.in,
6976         * as/hc08/aslink.h,
6977         * as/hc08/asm.h,
6978         * as/hc08/m08pst.c,
6979         * as/hc08/lkrloc.c (relr, rele),
6980         * as/hc08/lkarea.c (lnkarea)
6981         * as/hc08/lkmain.c (afile, parse),
6982         * as/hc08/lkelf.c: support for ELF output
6983         * as/hc08/lks19.c (s19),
6984         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6985
6986 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6987
6988         * as/mcs51/lkihx.c: Fixed bug #899105.
6989
6990 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6991
6992         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6993         .dsp files from Unix to DOS.
6994
6995 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6996
6997         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6998         function pointers; we have been compliant for several months now.
6999         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
7000         change that was accidently commented out
7001         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
7002         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
7003         bug #922319
7004
7005 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7006
7007         * src/hc08/gen.c: output of all of the internal debugging information
7008         is now controlled by the D() macro; it is disabled by default
7009
7010 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7011
7012         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
7013         harder to keep the same registers during a CAST iCode
7014         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
7015         long via int can be done in a single cast, if the signedness is
7016         correct.
7017         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
7018         putchar() in tinibios.c in ds390's library
7019
7020 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
7021
7022         * src/SDCCast.c (decorateType): fixed bug #898889,
7023         cast result of a literal complement too
7024         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
7025         fixed check for bitfields
7026
7027 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
7028
7029         * src/SDCCicode.c (geniCodeLogic): made it static,
7030         (geniCodeLogicAndOr): added in order to fix bug #905492,
7031         (ast2iCode): fixed bug #905492
7032         * support/regression/tests/bug-905492.c: added
7033         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
7034         (processParms): fixed bug #927659: don't copy parms, this will clear
7035         decorated flag
7036         * support/regression/tests/bug-927659.c: added
7037
7038 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
7039
7040         * src/SDCCast.c (addCast): don't cast float to char
7041         * device/lib/libsdcc.lib: added _memmove
7042
7043 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
7044
7045         * device/lib/large/Makefile: fixed parallel execution by
7046         replacing `make` by `$(MAKE)`
7047
7048 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7049
7050         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
7051         offsets (fixes bug #923936)
7052
7053 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
7054
7055         * device/lib/small/Makefile: fixed parallel execution by
7056         replacing `make` by `$(MAKE)`
7057
7058 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7059
7060         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
7061
7062 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
7063
7064         * src/pic/gen.c (genCpl): multi-byte complements were not working.
7065         * src/regression/Makefile: Regression test was not running.
7066
7067 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7068
7069         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
7070         complement if possible
7071         * src/SDCCval.c (valComplement),
7072         * src/SDCCicode.c (operandOperation): fixed complement of literal
7073         * support/regression/tests/onebyte.c (testComplement): added
7074
7075 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
7076
7077         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
7078         return an optimized tree; actually replace actParm with the new tree
7079         * src/SDCCast.h: added some parantheses to remove side effects
7080         * support/regression/tests/bug-920866.c
7081
7082 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
7083         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
7084         Bit operands were not being handled properly in the pic14 port.
7085         (now src/regression/add.c passes again).
7086
7087 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7088
7089         * src/SDCC.y (labeled_statement): case and default no longer require
7090         a following statement (RFE #893037)
7091
7092 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7093
7094         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
7095         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
7096         disabled (fixes bug #916294)
7097         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
7098         "mov a,acc"; patch provided by Lenny Story
7099         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
7100
7101 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7102
7103         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
7104         functions
7105         * src/ds390/gen.c (genFunction, genEndFunction),
7106         * src/ds390/ralloc.c (ds390_assignRegisters),
7107         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
7108         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
7109         pushed if there are parameters passed on the stack. Also, a cleaner
7110         way to decide if r0/r1 should be pushed/popped. (Together they fix
7111         bug #918693)
7112
7113 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7114
7115         * doc/sdccman.lyx,
7116         * device/lib/mcs51/crtpagesfr.asm,
7117         * device/lib/mcs51/crtxinit.asm,
7118         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
7119         to avoid confusion with Si Lab's SFRPAGE register.
7120
7121 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7122
7123         * src/SDCCglue.c (emitMaps): allow public sfr variables
7124         * src/SDCCglue.c (initialComments): include compiler build date
7125         with compiler version and put the timestamp of the generated
7126         assembly file on a serperate line to be less confusing.
7127         * src/port.h: added genInitStartup hook
7128         * src/avr/main.c,
7129         * src/ds390/main.c,
7130         * src/hc08/main.c,
7131         * src/pic/main.c,
7132         * src/pic16/main.c,
7133         * src/xa51/main.c,
7134         * src/z80/main.c: genInitStartup initialize as NULL (default to
7135         historical behaviour)
7136         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
7137         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
7138         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
7139         library instead of hard coding it into the compiler.
7140         * support/regression/ports/mcs51-stack-auto/spec.mk,
7141         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
7142         * device/lib/mcs51/Makefile,
7143         * device/lib/small/Makefile,
7144         * device/lib/large/Makefile,
7145         * device/lib/mcs51/crtpagesfr.asm,
7146         * device/lib/mcs51/crtstart.asm,
7147         * device/lib/mcs51/crtxclear.asm,
7148         * device/lib/mcs51/crtxinit.asm,
7149         * device/lib/mcs51/crtclear.asm,
7150         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
7151         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
7152         and into user configurable files.
7153         * device/lib/clean.mk: clean mcs51 directory too
7154         * support/regression/tests/longlit.c: added static to T1 declaration
7155         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
7156         accesses in the initialization code
7157
7158 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7159
7160         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
7161         OSCTRIMVAL as noted in bug #916008
7162
7163 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7164
7165         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
7166         in loops with multiple exits (reported as incorrect registers
7167         used by Martin Helmling in Sdcc-user list)
7168
7169 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7170
7171         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
7172         made ds390 register extensions look less like error messages
7173
7174 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7175
7176         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
7177         reported by Adam Wozniak in Sdcc-user list
7178
7179 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
7180
7181         * src/SDCCast.c (decorateType): fixed with bug and promotion in
7182         arithmetic optimizations, added debug output
7183
7184 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
7185
7186         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
7187         * sdcc.spec: updated and split sdcc into 3 rpms
7188         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
7189         needed for literals of LEFT_OP and '+'
7190         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
7191         introduced RESULT_TYPE_NOPROM
7192         (geniCodeMultiply): fixed logic for decision if mul is optimized to
7193         left shift
7194         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
7195         limited promotion to int only for '*'
7196         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
7197
7198 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
7199
7200         * src/pic16/gen.c (genSkip),
7201         (genc16bit2lit), (gencjneshort): commented out
7202         (is_LitOp): new helper function, checks operand type
7203         (genCmpEq): rewritten
7204
7205 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
7206
7207         * support/regression/tests/bug-908454.c: added
7208
7209 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
7210
7211         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
7212         * src/SDCCicode.c (usualBinaryConversions): op needs int type
7213         (geniCodeCast): cosmetic, don't preserve bit storage class
7214         (geniCodeLeftShift): added promotion
7215         (geniCodeLogic): fixed regression
7216         * src/SDCCsymt.c (computeTypeOr): accept bits too
7217         (compareType): 2nd part of fix for bug #908454, needed for bitfields
7218
7219 2004-03-07  Borut Razem <borut.razem AT siol.net>
7220
7221         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
7222
7223 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
7224
7225         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
7226         version of pic16_genPackRegisters which does not check if ic is a
7227         CAST operator,
7228         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
7229         function cause string1.c regression test fails
7230
7231 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
7232
7233         * sim/ucsim/configure.in,
7234         * sim/ucsim/configure,
7235         * sim/ucsim/doc/Makefile.in: use docdir
7236         * src/SDCC.y: fixed sbit atrributes
7237         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
7238         * src/SDCCast.c (decorateType): |^& need special promotion handling
7239         * src/SDCCast.h,
7240         * src/SDCCsymt.h: moved definition of RESULT_TYPE
7241         * src/SDCCsymt.h (computeType),
7242         * src/SDCCicode.c: computeType() needs op
7243         * src/SDCCsymt.c (checkTypeSanity),
7244         * doc/sddman.lyx: "plain" bitfields are unsigned
7245         * src/SDCCsymt.c (computeTypeOr): added
7246         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
7247         |^& ops
7248         * src/SDCCval.c (val*): computeType() needs op
7249         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
7250         * support/regression/tests/onebyte.c: added tests for |^&
7251
7252 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
7253
7254         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
7255         for writing icode into asm output.
7256
7257 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
7258
7259         * src/pic16/device.c: added some debug lines enabled
7260         with macro DEBUG_CHECK,
7261         * src/pic16/genarith.c: more debug in genPlus,
7262         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
7263         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
7264         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
7265         * (aopForSym): onStack symbols are re-placed in data memspace,
7266         and onStack flag is cleared,
7267         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
7268         copy temporary pcodeop,
7269         * (genPcall): added warning for not updating PCLATU,
7270         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
7271         always true for pic16 port,
7272         * (genMultOneWord): NEW, supports integer multiplication,
7273         * (genMult): modified to call genMultOneWord,
7274         * (ifxForOp): added warning when return NULL,
7275         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
7276         flag is set before call to operandFromSymbol for implicit
7277         added structures,
7278         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
7279         options.intlong_rent are set by default,
7280         * (_hasNativeMulFor): modified to allow port generation of integer
7281         multiplication,
7282         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
7283         set regtype to REG_SFR for all registers, restricting seting the
7284         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
7285
7286 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7287
7288         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
7289         more than 500 times in the regression tests
7290
7291 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7292
7293         * support/Util/SDCCerr.h,
7294         * support/Util/SDCCerr.c,
7295         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7296         enumerator_list),
7297         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
7298         for symbol conflicts.
7299         * support/valdiags/tests/enum.c,
7300         * support/valdiags/tests/tentdecl.c,
7301         * support/valdiags/tests/struct.c: expect possible error messages
7302         referring to original symbol definitions.
7303         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
7304         * src/SDCCsymt.h,
7305         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
7306
7307 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
7308
7309         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
7310
7311 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
7312
7313         * src/pic16/ralloc.c (newReg): fixed bug #908929
7314
7315 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7316
7317         * src/ds390/gen.c: added missing #include "main.h"
7318
7319 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
7320
7321         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
7322         checking if symbol is already in set,
7323         * src/pic16/device.h: prototype for checkAddSym,
7324         * src/pic16/gen.c: (_G): added entry interruptvector,
7325         * (assignResultValue): removed some commented out lines,
7326         * (genFunction): check for ISR via sym->type, absolute section for
7327         interrupt code is created via a new pBlock, the goto instruction is
7328         placed now correctly at the interrupt vector position, changed all
7329         references from ivec to _G.interruptvector,
7330         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
7331         is the interrupt is a high priority one, same for return from ISR,
7332         * src/pic16/glue.c: changed all calls of addSetHead for publics and
7333         externs to calls of checkAddSym,
7334         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
7335         pic16_pcode_verbose flag is set,
7336         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
7337         * src/pic16/pcoderegs.c: message about how many registers are saved
7338         will only be emitted if pic16_pcode_verbose flag is set,
7339
7340 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7341
7342         * src/ds390/ralloc.h,
7343         * src/ds390/ralloc.c (ds390_regWithIdx),
7344         * src/ds390/gen.c (emitcode),
7345         * src/ds390/main.h,
7346         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
7347         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7348         ds390operandCompare, getRegsRead, getRegsWritten,
7349         initializeAsmLineNode): customized instruction size calculation for
7350         ds390, started basis for some register optimizations
7351         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
7352         corresponding assembly output
7353         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
7354         missing push/pop of r0/r1. Optimized push/pops
7355
7356 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7357
7358         * src/mcs51/main.c (instructionSize): fixed ACALL size
7359         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
7360
7361 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
7362
7363         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
7364         the sorting of rlist with NULL elements
7365         * (print_idataType, print_idata): NEW to create idata sections
7366         * src/pic16/device.h: idataSymSet new variable
7367         * src/pic16/gen.c (genFunction): fixed some bugs in string
7368         comparing, improved the absolute section creation for ISRs,
7369         added FSR0L/FSR0H in registers that are saved in an ISR,
7370         * (genInline): fixed the processing of inline snippets,
7371         now they undergo no process by the peephole optimizer
7372         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
7373         are placed in idataSymSet,
7374         * (pic16emitStaticSeg): extern symbols are added in externs,
7375         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
7376         switching when aboslute variables are placed in access bank memory
7377         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
7378         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
7379         commented out with #if,
7380         * (pic16_packRegisters): reintroduce the check for CAST because some
7381         symbols are not correctly handled,
7382         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
7383         pCodeInstruction instead of pCode,
7384         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
7385         pCodeAsmDir definition,
7386         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
7387         directive, then the argument directive is emitted without the leading
7388         tab, hack for inline labels which must be in the first column,
7389         * (compareLabel,pic16_findNextInstruction),
7390         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
7391         * (insertBankSwitch): modified for the new pCodeAsmDir,
7392
7393 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7394         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
7395
7396         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
7397         instance,
7398         * (pushSide): commented out with #if,
7399         * (assignResultValue): fixed some typos in saving
7400         registers,
7401         * (genPcall): FIXED and sync'ed with genCall,
7402         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
7403         * (genNearPointerGet): fixed to handle some more cases,
7404         implementation scheme via table reads,
7405         * (genConstPointerGet): modified to access code memory correct,
7406         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
7407         and improved to handle some cases
7408         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
7409         instead of "RETLW" for init data
7410         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
7411         not IN_DIRSPACE, work around to reduce bank switching when aboslute
7412         variables are placed in access bank memory (<0x80 and >=0xf80),
7413         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
7414         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
7415         TBLWT_POSTDEC,TBLWT_PREINC
7416         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
7417         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
7418         directives
7419         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
7420         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
7421         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
7422         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
7423
7424 2004-02-29  Borut Razem <borut.razem AT siol.net>
7425
7426         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
7427         support/Util/findme.h, support/Util/system.h: enhance binary relative
7428         search for lib and include by using findProgramPath()
7429
7430 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7431
7432         * src/SDCCpeeph.h,
7433         * src/SDCCpeeph.c (pcDistance),
7434         * src/port.h,
7435         * src/mcs51/ralloc.h,
7436         * src/mcs51/ralloc.c (mcs51_regWithIdx),
7437         * src/mcs51/main.h,
7438         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
7439         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7440         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
7441         size calculation port specific, started basis for some register
7442         optimizations
7443         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
7444         missing push/pop of r0/r1. Optimized push/pops
7445         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
7446         * device/lib/_modsint.c (_modsint),
7447         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
7448         and stack version so regression tests pass
7449
7450 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
7451
7452         * src/Makefile.in (dep): include SLIBOBJS in dependency check
7453         * src/SDCCast.c (decorateType): catch another small optimization
7454         with '?' operator
7455         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
7456         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
7457         modified to finally use computeType() all over SDCC,
7458         see Feature Request #877103
7459         * src/SDCCval.h: cosmetic
7460         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
7461         valCompare(); regression tested in muldiv.c
7462         * support/regression/tests/muldiv.c (testMod): mod sign follows
7463         dividend only
7464
7465 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
7466
7467         * src/SDCCast.c (decorateType): fixed bug #902362
7468         * doc/INSTALL.txt: fixed install instructions for win32
7469
7470 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
7471
7472         * device/include/Makefile.in (install): fixed by replacing spaces
7473         by tabs
7474         * doc/README.txt,
7475         * doc/INSTALL.txt: updated for release
7476         * doc/sdccman.lyx: added warning for --xstack being buggy
7477
7478 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
7479
7480         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
7481         to eliminate build warnings.
7482         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
7483
7484 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
7485            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7486
7487         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
7488         removed -penable-stack, added comment for stack pragma, added
7489         warning for not initializing the stack/frame registers, removed
7490         comment at interrupts section
7491
7492         Stack is made permanent, there is no ability to disable stack usage.
7493         * src/pic16/device.h,
7494         * src/pic16/device.c: removed all references to USE_STACK macro,
7495         * src/pic16/device.c (pic16_dump_section): when no elements in
7496         rlist, free rlist before return,
7497         * (pic16_dump_int_registers): NEW, internal registers are a new set
7498         of general purpose registers reused by each function,
7499         * (checkAddReg): returns 1 if registers is added to set,
7500         * (pic16_groupRegistersInSection): when a registers is of type
7501         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
7502         * src/pic16/device.h: memRange and Assigned Memory are deleted,
7503         SRCASECMP macro is moved here from device.c
7504         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
7505         PO_PCLATU, PO_PRODL, PO_PRODH,
7506         * (pic16_pCodeOpType, genMinus,
7507         changed compares to "a" register, with AOP_ACC,
7508         * (pic16_genPlus): fixed some bugs and indented properly,
7509         * (pic16_addSign): changed size to size+offset in the MOVWF
7510         instruction,
7511         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
7512         multiply 8-bit operand by literal, result is 8-bit,
7513         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
7514         multiply 2 8-bit operand, result is 8-bit,
7515         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
7516         genUMult8X*_16,
7517         * src/pic16/gen.c: changed accUse to contain WREG only,
7518         * (pic16_emitcomment): renamed to pic16_emitpcomment,
7519         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
7520         true, do not use immediate addressing any more unless sym is a
7521         pointer in codespace,
7522         * (aopForRemat): do not use immediate addressing when symbol not in
7523         codespace and when symbol's address is requested,
7524         * (aopOp): for-loop in if(sym->accUse) is modified for the new
7525         accUse size (= 1),
7526         * (aopGet): added case for AOP_ACC and don't return "accumulator
7527         bug" but WREG instead,
7528         * (popGetTempReg): pushes contents of temporary register in stack,
7529         * (popReleaseTempReg): pops contents of temporary register from
7530         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
7531         * (pic16_popGet): separated case AOP_ACC to return register WREG
7532         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
7533         or PO_IMMEDIATE and initializes their instance/offset appropriately,
7534         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
7535         the use of immediate pointers to certain cases only.
7536
7537         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
7538         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
7539         * (assignResultValue, genCall, genRet): modified to use the new
7540         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
7541         genPcall is still broken,
7542         * (genFunction): added code to create 'A' type pBlocks when
7543         interrupt functions are generated, code not extensively tested yet,
7544         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
7545         * (genEndFunction): modified so ISRs pop stored registers from stack,
7546         * (genMultOneByte): cleanup,
7547         * (AccRsh): added flag andmask, to and result with appropriate mask,
7548         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
7549         * (genDataPointerGet): fixed and reenabled its use,
7550         * (genNearDataPointerGet): bugs fixed,
7551         * (genDataPointerSet): bugs fixed,
7552         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
7553         pic16_DumpSymbol, pic16_DumpOp,
7554         * src/pic16/genutils.h: function prototypes for the above functions,
7555         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
7556         pointers,
7557         * (pic16emitRegularMap): many many many improvements, but needs a
7558         major cleanup,
7559         * src/pic16/main.c: enable_stack in pic16_options is removed,
7560         * (_pic16_parseOptions): removed command line options -penable-stack,
7561         * (_process_pragma): emit stack symbol only when stack pragma is
7562         processed,
7563         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
7564         redirected to FSR0L/FSR0H pair,
7565         * (pic16_get_op, pic16_get_op2): modifications and improvements,
7566         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7567         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
7568         for immediates,
7569         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
7570         * (dumpPicOptype): NEW,
7571         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
7572         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
7573         with movff instruction,
7574         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
7575         added pic16_int_regs, some packRegsFor* functions are commented out,
7576         because produce errors,
7577         * src/pic16/NOTES: minor modifications
7578
7579 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7580
7581         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
7582         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
7583         --pack-iram.
7584         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
7585         * as/mcs51/lkaomf51.c: fixed bug #895763
7586
7587 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
7588
7589         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
7590
7591 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7592
7593         * doc/sdccman.lyx: added details about the HC08 storage classes and
7594         interrupts, fixed the register usage info for z80 & gbz80
7595
7596 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
7597
7598         * doc/sdccman.lyx: added more pic16 port documentation
7599         * device/include/pic16/: added header pic18fregs.h
7600
7601 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
7602
7603         * doc/sdccman.lyx: added Vangelis' contribution
7604
7605 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7606
7607         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
7608         extend to the next CALL or PCALL, not just to the next CALL.
7609
7610 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
7611
7612         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
7613
7614 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7615
7616         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
7617         bug #895752 and a better fix for bug #716790
7618
7619 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7620
7621         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
7622
7623 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7624
7625         * doc/sdccman.lyx: minor changes, minor changed
7626
7627 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
7628
7629         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
7630         which can't handle SDCC_NEWONEBYTEOPS,
7631         (geniCodeMultiply): removed conversion from mult to shift for pic14
7632         and pic16
7633
7634 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7635
7636         * src/hc08/gen.h,
7637         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
7638         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
7639         thus fixing bug #895406
7640
7641 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
7642
7643         * device/lib/_modsint.c,
7644         * device/lib/_modslong.c: sign follows divisor only
7645         * src/hc08/gen.c (genMultOneByte): if result size is 1,
7646         signs or signedness can be ignored
7647         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
7648         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
7649         added optimization for IFX,
7650         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
7651         arguments;
7652         reenabled optimization for IFX, which was removed on 2004-01-11
7653         * src/SDCCast.h: added return type IFX
7654         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
7655         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
7656         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
7657         SDCC_OLDONEBYTEOPS selects the old behaviour
7658         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
7659         changed again and commented promotion rule
7660         * src/SDCCval.c (valDiv): promotion no longer necessary
7661         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
7662         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
7663         rewritten
7664         * support/regression/tests/onebyte.c: added
7665
7666 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
7667
7668         * gen.c (genInline): reverted to old code for assemnling inline
7669         code because of bug reported James Chadd
7670
7671 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
7672
7673         * ralloc.h: missing declarations from previous patch,
7674         seems that patch for ralloc.h was never applied, fixed
7675
7676 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7677            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7678
7679         * pcode.c,
7680         * pcode.h,
7681         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7682         indirect addressing. Marked FSR0 as deprecated
7683         * gen.c (pointerCode): commented out, not needed now
7684         (pic16_popGet2p): new MOVFF helper function
7685         (genGenPointerGet),
7686         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7687         (shiftRLong): removed duplicate debugging info
7688
7689 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7690
7691         * src/ds390/gen.c (genNearPointerGet),
7692         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7693         optimization with bits, but not bitfields.
7694         * src/ds390/ralloc.c (packRegisters),
7695         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7696
7697 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7698
7699         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7700
7701 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7702
7703         * src/SDCCsymt.h,
7704         * src/SDCCicode.c (operandFromSymbol),
7705         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7706         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7707         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7708         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7709         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7710         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7711         bug #892038
7712         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7713         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7714         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7715         * src/SDCCsymt.c (newSymbol),
7716         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7717         enumerator_list),
7718         * src/SDCCval.h,
7719         * src/SDCCval.c (newiList): fixed bug #885705
7720
7721 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7722
7723         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7724         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7725
7726 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7727
7728         * device/include/c8051f120.h,
7729         * device/include/c8051f300.h,
7730         * device/include/c8051f310.h: added/updated header files for Silicon
7731         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7732         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7733         in new section Submitting patches
7734
7735 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7736
7737         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7738         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7739         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7740         genGenPointerSet),
7741         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7742         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7743         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7744         genGenPointerSet),
7745         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7746         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7747         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7748         genGenPointerSet),
7749         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7750         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7751         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7752         genGenPointerSet): fixed bug #892400
7753         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7754         to eliminate build warnings.
7755         * src/SDCCast.c (processParms),
7756         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7757         fixed bug 751859
7758         * support/valdiag/valdiag.py: added GCC to the list of defines active
7759         when compiling with gcc
7760
7761 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7762
7763         * support/Util/SDCCerr.h,
7764         * support/Util/SDCCerr.c,
7765         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7766         with an incomplete type (fixed bug #883734)
7767         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7768
7769 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7770
7771         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7772
7773 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7774
7775         * src/SDCCast.c (decorateType),
7776         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7777         function pointer implementation
7778         * support/regression/tests/funptrs.c: added tests to verify both forms
7779         of function pointers work correctly. Added tests to verify parameters
7780         are passed in the correct order.
7781
7782 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7783
7784         * device.c (regCompare): registers are sorted by ascending
7785         address and increasing size,
7786         * main.c (_pic16_finaliseOptions): removed the declaration
7787         of compiler macro MCU. Now a macro of the format pic18fxxxx
7788         will be defined from the command line
7789
7790 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7791             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7792
7793         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7794         PCOP_RLCF was overwritten!
7795         * gen.c (genSkip): commented out calls to pic16_emitcode,
7796         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7797         * (genlshTwo),
7798         * (genRRC): added debugging info,
7799         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7800         overwritten while shifting,
7801         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7802         overwritten while shifting,
7803         * (AccLsh),
7804         * (AccRsh),
7805         * (shiftLLeftOrResult),
7806         * (shiftRLeftOrResult),
7807         * (shiftRLong),
7808         * (shiftLLong): Implemented with pic16_emitpcode
7809         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7810         * (genLeftShift): Fixed bug, operand for shift by variable always
7811         was "and"ed with 0x0f,
7812         * (genLeftShiftLiteral),
7813         * (genrshTwo),
7814         * (genRightShiftLiteral): added debugging info,
7815         * (genrshFour): added comment,
7816         * (genRightShift): determined signedness from operand "left"
7817         instead of "result"
7818
7819 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7820
7821         * src/SDCCicode.c (geniCodeParms),
7822         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7823         function pointers, fixed function pointer bugs #861242 and #861896
7824
7825 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7826
7827         * device/include/c8051f000.h,
7828         * device/include/c8051f120.h,
7829         * device/include/c8051f300.h: added header files for Silicon
7830         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7831
7832 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7833
7834         * src/SDCCast.c (processParams): added new type flow and restructured
7835         (gatherAutoInit): added new type flow
7836         (addCast): cosmetic changes
7837         (getLeftResultType): added new type flow for array indices, patch
7838         provided by Stas, see FR #877103
7839         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7840         array index patch by Stas
7841         * src/SDCCast.h: added prototype getResultTypeFromType()
7842         * src/SDCCval.h,
7843         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7844         * src/pic/glue.c (pic14emitStaticSeg),
7845         * src/pic16/glue.c (pic16emitStaticSeg),
7846         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7847         for initialization of symbols
7848         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7849         * support/Util/SDCCerr.h:
7850         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7851         * .version: bumped version number to 2.3.8
7852         * device/include/Makefile.in (install),
7853         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7854         avoid warnings
7855
7856 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7857
7858         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7859         Slade Rich fixed an optimization bug
7860         * src/pic/pcodepeep.c,
7861         * src/pic/pcoderegs.c
7862         * doc/Makefile (install): added test for directory
7863
7864 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7865
7866         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7867         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7868         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7869         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7870         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7871         * as/mcs51/asexpr.c (term),
7872         * as/hc08/asexpr.c (term): fixed bug #887146
7873
7874 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7875
7876         * src/z80/gen.c (genMult): handle single byte result product
7877         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7878         DUMMY_READ_VOLATILE (fixed bug #886367)
7879
7880 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7881
7882         * support/regression/tests/libmullong.c: fixed logic, on little endian
7883         hosts we ended without a mullong_wrapper()
7884
7885 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7886
7887         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7888         virus/worm forged address usage.
7889
7890 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7891
7892         Fixed promotion, it should be done on AST level:
7893         * src/SDCCast.c (addCast): added promotion to int
7894         (decorateType): updated call to upCast()
7895         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7896         usualUnaryConversions()
7897
7898 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7899
7900         * support/regression/tests/literalop.c (mulWrapper): Added a
7901         wrapper to remove integer overflow warnings.
7902
7903         * support/regression/tests/float_trans.c: Made work on host.
7904
7905         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7906         location of sz80.
7907
7908         * support/regression/generate-cases.py (main): Changed from inline
7909         to a main method.
7910
7911         * doc/Makefile (install): Changed to depth first to get rid of
7912         missing directory install warning.
7913
7914         * as/Makefile (install-doc): Made work on Mac.
7915
7916 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7917
7918         * src/SDCCast.c: added an additional type flow in decorateType() of
7919         opposite direction, see feature request #860006; it's enabled at runtime
7920         by setting the environment variable SDCC_NEWTYPEFLOW
7921         * src/SDCCast.h: changed prototype of decorateType()
7922         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7923         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7924         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7925         see feature request #877103
7926         * src/SDCCval.c: updated call of decorateType()
7927         (valBitwise): fixed bug #882876
7928         (valMinus): added promotion
7929         (valLogicAndOr): result is unsigned
7930         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7931         * src/SDCCsymt.c (computeType),
7932         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7933         must not cause an unsigned operation
7934         * src/pic/glue (pic14emitRegularMap),
7935         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7936
7937 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7938
7939         * src/pic/pcode.c (PCodeID): commented out left over debug code
7940
7941 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7942
7943         * support/valdiag/tests/overflow.c: added shift tests
7944         * src/pic/device.c,
7945         * src/pic/gen.c,
7946         * src/pic/gen.h,
7947         * src/pic/glue.c,
7948         * src/pic/main.c,
7949         * src/pic/pcode.c,
7950         * src/pic/pcode.h,
7951         * src/pic/pcodepeep.c,
7952         * src/pic/pcoderegs.c,
7953         * src/pic/ralloc.c,
7954         * src/pic/ralloc.h: applied patch from Slade Rich;
7955         added support for multiple code pages and multiple RAM banks on the
7956         PIC 14 port. The ASM files now no longer simply assume all the
7957         code / RAM are in the same page / bank. This means the linker can
7958         safely allocate code/RAM of separate ASM files to different pages/banks.
7959         * doc/sdccman.lyx: added Slade's tips
7960         * src/mcs51/peeph.def: fixed bug #880768
7961
7962 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7963
7964         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7965         * src/SDCCast.c (decorateType): fixed bug #880197
7966
7967 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7968
7969         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7970         getopt.h.
7971
7972         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7973         strtof is not part of C89 and isn't included with Mac OS X.
7974
7975 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7976
7977         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7978         shiftL2Left2Result): fixed bug #879326
7979         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7980         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7981         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7982         address fetch for clr instruction
7983         * device/lib/hc08/_mulint.c: created optimized assembly version
7984         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7985
7986 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7987
7988         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7989         proposed in FR #877103
7990
7991 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7992
7993         * src/SDCCval.c (cheapestVal): added missing checks
7994         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7995         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7996
7997 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7998
7999         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
8000         equal operands
8001
8002 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
8003
8004         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
8005         loaded with the linker search paths (-L arguments) and the libraries
8006         to be linked with the current source (-l arguments). Changes
8007         currently will affect only the pic16 port.
8008         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
8009         include path the port specific paths and port specific libraries,
8010         * gplink command now contains the $3 argument,
8011         * src/pic16/device.h,
8012         * src/pic16/device.c,: structure PIC_device is made public and
8013         renamed to PIC16_device, the same for variable Pics which is renamed
8014         to Pics16. Updated all references to them.
8015         * src/pic16/glue.c (pic16glue): corrected bug with code
8016         initialization which bypassed the variable initializations block.
8017
8018         * device/lib/pic16/Makefile.rules: removed --penable-stack from
8019         COMPILE_FLAGS and added the --nostdinc option
8020
8021 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8022
8023         * device/include/mc68hc908jb8.h: Register defs for another member
8024         of the hc08 family. Contributed by Bjorn Bringert - thanks!
8025
8026 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
8027
8028         Documenting changes from previous commits.
8029         * configure.in (version 1.56),
8030         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
8031         when generating output files to configure the pic16 library,
8032         but now I've commented it out, since gputils aren't installed in the
8033         SF compile farm, so library won't compile
8034
8035         * device/lib/Makefile.in (version 1.56): initially I've added in
8036         target 'all' the prerequestive 'model-pic16' so it compiled the
8037         pic16 library, but now I've commented it out for the same reasons
8038         above,
8039         * added targets 'model-pic16' and 'objects-pic16' to compile the
8040         library
8041         * added target 'port-specific-objects-pic16' to handle the
8042         generated libraries and copy them into the build/ directory
8043         * added target 'clean-intermediate-pic16' to clean intermediate
8044         files into pic16 directory
8045         * in target 'installdirs' added line to create directory pic16 in
8046         the installation path
8047
8048         * device/include/Makefile.in (version 1.11): in target 'install'
8049         added lines to copy all header files to installation path,
8050         * in target 'installdirs' added line create directory for pic16
8051         headers in the installation path
8052
8053 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
8054
8055         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
8056          a function call
8057
8058 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
8059
8060         * configure,
8061         * device/lib/configure.in,
8062         * device/lib/configure: fixed for autoconf 2.57
8063
8064 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8065
8066         * src/z80/main.c (_parseOptions): fixed the portmode= command line
8067         option so that it actually works. Made it specific to the z80, since
8068         the gbz80 doesn't have these kinds of I/O ports.
8069
8070 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8071
8072         * device/include/z180.h,
8073         * device/lib/_memcpy.c,
8074         * device/lib/_memmove.c,
8075         * device/lib/_mulint.c,
8076         * device/lib/ser_ir.c,
8077         * device/lib/ser_ir_cts_rts.c,
8078         * device/lib/_strcmp.c,
8079         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
8080         * src/z80/main.c (_process_pragma): add support for pragmas bank and
8081         portmode; added deprecation warning for bank= and protmode= forms.
8082         Also, guard against buffer overflow.
8083         * src/z80/gen.c (aopGet): generate better code for sfr banked read
8084
8085 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8086
8087         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
8088         changed interrupt vector table generation to only emit declared vectors.
8089         * device/include/Makefile.in: added missing backslash
8090         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
8091
8092 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8093
8094         Mainly changes to support compilation of the device libraries
8095         * src/pic16/device.c: stack is allocated via symbol and not
8096         via literal number. The symbol is placed in the corresponding
8097         position of the data ram
8098         * (pic16_dump_section): relocatable and absolute uninitialized
8099         data are now emitted in sorted order to reduce section naming,
8100         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
8101         weren't marked as being in the access bank,
8102
8103 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8104
8105         Added portion of GNU PIC Library under the directory
8106         device/include/pic16 and device/lib/pic16. These files
8107         contain the declarations of SFRs for the PIC18Fxx2 devices.
8108         The directory is initialized via configure from toplevel.
8109
8110 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
8111
8112         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
8113         the spilllocations to be compared correctly
8114
8115 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8116
8117         * src/SDCCast.c (decorateType): fixed bug introduced today
8118
8119 2004-01-12  Borut Razem <borut.razem AT siol.net>
8120
8121         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
8122         doc/sdccman.lyx: upper case pragmas are deprecated
8123
8124 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8125
8126         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
8127         in simpler and even better code
8128
8129 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
8130
8131         * src/SDCCicode.c (operandOperation): fixed bug #874819
8132         * src/SDCCast.c (decorateType): fixed
8133         char foo (unsigned long ul) { return ul > 0; }
8134
8135 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8136
8137         * doc/sdccman.lyx: Moved and added some sections, small changes
8138         all over. Telling LaTeX to be less strict with word spacing
8139         to better keep the right margin. Changed some notes about
8140         maintainance of the ports in section 3.2.1 - is it OK like this?
8141
8142 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
8143
8144         SDCC source changes:
8145         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
8146         convilong): modified to inform the pic16 port that builtin functions
8147         are external
8148
8149         PIC16 PORT specific changes:
8150         * src/pic16/device.c pic16_dump_equates() added,
8151         processor registers declared internally by the port are emitted in
8152         the translation as equates,
8153         * src/pic16/gen.c: inline code is passed unprocessed to the
8154         translation,
8155         * (pic16_popGetLit2): fnuction modified to take second operand as
8156         pCodeOp pointer and not as literal,
8157         * (popRegFromIdx): prefixed with pic16_,
8158         * (pic16_popCombine2): modified to receive already allocated pCode
8159         operands,
8160         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
8161         * (genFunction): initializes local stack frame and pushes on stack
8162         all the registers used by this function,
8163         * (genEndFunction): restores all registers from stack and restores
8164         stack frame,
8165         * src/pic16/glue.c (pic16emitRegularMap): various changes and
8166         improvements,
8167         * (pic16glue): changed the program startup sequence,
8168         * added new dbName code 'A' for functions placed in absolute section
8169         * src/pic16/main.c: added function attribute _naked,
8170         * added pragma 'code' to place a fnuction at an absolute address,
8171         * added command line arguments --debug-ralloc and --pcode-verbose,
8172         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
8173         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
8174         * (pic16_newpCodeOpLit2): modified to take the second operand as
8175         pCodeOp pointer,
8176         * (pic16_printpBlock): modified to emit each function in a separate
8177         section,
8178         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
8179         UPPER for immediate operands,
8180         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
8181         instruction,
8182         * src/pic16/peeph.def: all peepholes with movff are commented out,
8183         because there is a problem in the pcode peep optimizer,
8184         * src/pic16/ralloc.c: the register allocator can now reuse local
8185         function symbols for another function. This saves register usage.
8186         * src/pic16/ralloc.h: added flag isLocal in structure regs,
8187
8188         Added file src/pic16/NOTES with information about program writing on
8189         the current port version.
8190
8191 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8192
8193         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
8194         and peephole 252 (array access)
8195
8196 2004-01-09  Borut Razem <borut.razem AT siol.net>
8197
8198         * src/SDCCmain.c : fixed #872250: -l command line defined library
8199           files are scanned before standard library files
8200
8201 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8202
8203         * src/SDCCast.c (decorateType): fixed bug #874046
8204
8205 2004-01-09  Borut Razem <borut.razem AT siol.net>
8206
8207         * support/scripts/sdcc.nsi: remove previous installation
8208
8209 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8210
8211         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
8212         bytes for last interrupt vector (mcs51)
8213         * sdcc.spec: fixed typo
8214
8215 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8216
8217         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
8218         gen51Code): more efficient parameter receive for --model-large
8219         ("bug" #845294)
8220
8221 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8222
8223         * src/ds390/main.c,
8224         * src/z80/main.c: added missed needLinkerScript flags (more than
8225         one port structure defined in these file)
8226         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
8227         bug #795325
8228
8229 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
8230
8231         * src/SDCCmain.c: removed various references to DEFAULT_PORT
8232         * src/port.h: added flag needLinkerScript in port->linker
8233         structure to inform whether to create a .lnk file or not,
8234         * src/avr/main.c,
8235         * src/ds390/main.c,
8236         * src/hc08/main.c,
8237         * src/mcs51/main.c,
8238         * src/pic/main.c,
8239         * src/pic16/main.c,
8240         * src/xa51/main.c,
8241         * src/z80/main.c: changed appropriately to configure
8242         needLinkerScript flag
8243         * src/pic/gen.c,
8244         * src/pic16/gen.c (genAddrOf): fixed bug #863624
8245         * src/pic/glue.c: added variable udata_section_name to
8246         override default uninitialized data segment definition for
8247         devices only with SHAREBANK memory (reported from Erik Epetrich)
8248         * (pic14emitOverlay): modified to emit a commented overlay segment
8249         directive when no overlay data exist
8250         * (picglue): modified to emit uninitialized data segment
8251         according to udata_section_name
8252         * src/pic/main.c (_pic14_parseOptions): added command line
8253         options --udata-section-name=[name] to override default
8254         udata definition name
8255         * modified _linkCmd and _asmCmd to include compiler passed
8256         arguments via -W option
8257         * src/pic16/main.c: added $l in _asmCmd, changed extension for
8258         object file from '.rel' to '.o' in port->linker structure,
8259         changed size of fptr from 2 to 3 in port structure
8260
8261 2004-01-07  Borut Razem <borut.razem AT siol.net>
8262
8263         * support/scripts/sdcc.nsi: update PATH
8264         * support/scripts/sdcc.ico: craeted
8265
8266 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
8267
8268         * device/include/Makefile.in: fix install
8269         * doc/Makefile: fix install
8270
8271 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8272
8273         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
8274         in bug #860505
8275         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
8276         how the function variable allocation summary is displayed; also
8277         include information about variables allocated to the overlay
8278         segment
8279
8280 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8281
8282         * as/mcs51/lkmain.c: Help about -Y option
8283         * as/mcs51/lkarea.c: Fixed gcc warnings
8284
8285 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8286
8287         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
8288         fixed warning
8289         * support/valdiag/tests/overflow.c: added
8290         * src/SDCCast.c (decorateType),
8291         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
8292         LEFT_OP (left shift)
8293
8294 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8295
8296         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
8297         (default behaviour).
8298
8299 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8300
8301         A python script to validate compiler diagnostic messages. It can be
8302         used to verify that sdcc complains about bad c source code and
8303         gives a good location of the error.
8304         * support/valdiag/Makefile,
8305         * support/valdiag/valdiag.py,
8306         * support/valdiag/tests/*
8307
8308 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8309
8310         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
8311         * src/SDCCsymt.c (newEnumType),
8312         * src/SDCCsymt.h
8313         * support/Util/SDCCerr.c,
8314         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
8315         enum related bugs.
8316         * support/regression/tests/enum.c: added test for enum values that
8317         require at least 2 bytes of storage.
8318
8319 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8320
8321         * src/common.h: added ifndef/define/endif macros
8322         around the header file.
8323         Bug reported from Jesus Calvino-Fraga
8324
8325 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8326
8327         * sdcc.spec: updated
8328         * device/include/Makefile.in: don't install CVS directories
8329         * device/lib/Makefile.in: added removal of CVS directories after install
8330         * doc/Makefile: fixed install, added local_icons
8331         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
8332         * src/mcs51/gen.c (genRightShift): fixed bug #870788
8333         * src/ds390/gen.c (genRightShift): fixed bug #870788
8334         * src/SDCCast.c (decorateType): fixed bug #870781
8335
8336 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8337
8338         PIC16 port related changes:
8339         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
8340         added variable stackPos,
8341
8342         * gen.c: genCall, assignResultValue: added support for
8343         pushing/retrieving function parameters to/from stack,
8344         genFunction,genEndFunction: setup stack frame for the
8345         generated function,
8346         genAddrOf: will be changed according to bug 863624
8347
8348         * added files genutils.c and genutils.h which contain gen*
8349         debugged and optimised functions extracted from gen.c
8350
8351         * glue.c: added variable 'externs' which holds extern symbols,
8352         pic16emitRegularMap: is modified to properly handle relocatable
8353          symbols under the new scheme,
8354         pic16createInterruptVect: is modified
8355         pic16printPublics: is modified to emit 'global' assembler directives,
8356         added pic16_printExterns to print extern symbols,
8357         pic16glue: initializes stack/frame pointer in the beginning of
8358         the assembly output. Temporary hack, will be corrected later,
8359         because gplink yet does not support stack and SDCC does not
8360         yet support a type of crt0.o object to create the final binary.
8361
8362         * Removed many lines that contain 8051 legacy code.
8363         * The code is finally placed under a 'code' directive.
8364         * Added port specific options.
8365
8366         * _process_pragma: simplified since now we do not need *special*
8367         include file to define SFR registers. But a separate header
8368         will be needed. This will be developed later.
8369         * _pic16_parseOptions: added, parses port specific options:
8370         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
8371         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
8372         --preplace-udata-with=
8373
8374         * _pic16_setDefaultOptions: modified to initialize section names,
8375         but hack is temporarly out of order since it needs improvement.
8376         * _pic16_genAssemblerPreamble: configuration words are emitted by
8377         their address instead of their name. This part is incomplete and
8378         supports only the 18Fxx2 devices. Other devices will emit an error
8379         during assembly since they do not contain the same set of config
8380         registers
8381         * _pic16_genIVT: is modified,
8382
8383         * pcode.c: added definitions for some hardware registers that are needed
8384         for stack support
8385         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
8386         All PCI entries are updated. Now LFSR is supported.
8387         * Removed pic16_pciTRIS is mentioned by mdubuc in source
8388         * added pic16_newpCodeOpLit2 to support instructions with
8389         two literal arguments
8390         * pic16_pCode2str: corrected code that emits assembler instructions
8391         with two literal operands and those that have an access bit modifier
8392         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
8393         this fixes a bug which caused some labels to be lost, when an
8394         assembler directive was added, i.e. banksel,
8395         * pic16_FixRegisterBanking: improved logic that causes the insertion
8396         of bank switching,
8397         * InlineFunction: functions that are called once, are not any more
8398         inlined. This can be a port option in the future,
8399
8400         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
8401
8402         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
8403         hold the corresponding uninitialized symbols,
8404         * pic16_allocProcessorRegister: registers have explicit marked the
8405         accessBank field,
8406         * pic16_allocInternalRegister: registers are explicit marked as
8407         not used,
8408         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
8409         processing list, so bit registers were lost,
8410         *
8411
8412         * ralloc.h: added field 'accessBank' and original symbol operand
8413         in register definition,
8414         * removed the field isMapped from register definition,
8415
8416         ** Several functions have been removed from various sources:
8417         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
8418         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
8419         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
8420         pic16_assignRelocatableRegisters
8421
8422         ** others have been introduced:
8423         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
8424         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
8425
8426 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
8427
8428         * support/scripts/inc2h.pl: changed definition of BIT_AT
8429         to emit 'sbit at' instead of 'bit at'. This was a request.
8430
8431         PIC16 port related preliminary changes:
8432         * gen.c: prefixed function popRegFromString with
8433         pic16_ and all references to it corrected
8434         * pcode.c: all pic16_pc_* hardware registers prefixed
8435         with underscore (_),
8436         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
8437         * ralloc.c: newReg(): when register is REG_SFR then
8438         set address to rIdx,
8439         pic16_allocProcessorRegister(): marks register wasUsed=0
8440         pic16_writeUsedRegs(): added a call to assign processor
8441         registers via pic16_assignFixedRegisters
8442
8443 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8444
8445         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
8446         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
8447         variables in unused register banks.  Also the SSEG is placed
8448         wherever there is enough space for it, and IDATA can be anywhere
8449         in internal RAM.  For now compile using -Wl-Y[stack_size].
8450         The mem file is different for this option as well, since it
8451         makes no sense of talking about DSEG lenght.
8452
8453 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
8454
8455         * src/SDCClrange.c: fixed bug 869095 that caused segfault
8456         in certain cases, e.g. when ROM assignment, patch provided
8457         from Albert den Haan.
8458
8459 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
8460
8461         Many signedness and type propagation fixes:
8462         * src/SDCCicode.c: made geniCodeCast() static
8463         replaced SPEC_ by IS_ (cosmetic)
8464         (operandOperation): fixed div and mod operation
8465         (usualBinaryConversions): added support for promotion of char
8466         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
8467         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
8468         (geniCodeAdd): an array index will stay unsigned, even if promoted
8469         from char to int
8470         (geniCodeArray): ditto
8471         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
8472         * src/SDCCsymt.c (computeType): added more support for char;
8473         promotion of char is selectable by promoteCharToInt, fixed signedness
8474         for all cases
8475         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8476         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8477         * src/SDCCval (val*): replaced signedness calculation by
8478         computeType()
8479         rearranged if-branches (cosmetic)
8480         (valShift): added warning W_SHIFT_CHANGED
8481         (valCompare): fixed problem with different types
8482         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
8483         * support/regression/tests/literalop.c: added many cases
8484         * support/regression/tests/ast_constant_folding.c: changed finally to
8485         'unsigned int'
8486         * .version: new year, new version: 2.3.7
8487         * src/SDCCmain.c (main): applied patch #866468
8488         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
8489         provided by Scott Bronson
8490         * doc/sdccman.lyx: updated documentation for sdcdb
8491         updated and added chapter tips
8492
8493 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8494
8495         * src/SDCCsymt.h: missing from yesterday's commits
8496
8497 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8498
8499         * src/SDCC.y (struct_or_union_specifier),
8500         * support/Util/SDCCerr.c,
8501         * support/Util/SDCCerr.h: verify that struct & union tags are used
8502         as declared.
8503
8504 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8505
8506         * src/SDCCglobl.h: missing from yesterday's commits
8507
8508 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8509
8510         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
8511         sft_attributes, struct_declaration, parameter_declaration,
8512         type_name, start_block, declaration_list),
8513         * src/SDCC.lex (check_type): support redefinition of typedef names
8514
8515 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8516
8517         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
8518         aligned xdata arrays. Erik helped me with the if clause.
8519
8520 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8521
8522         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
8523         warning
8524
8525 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8526
8527         * src/SDCCast.h,
8528         * src/SDCCast.c (newAst_),
8529         * src/SDCCicode.h,
8530         * src/SDCCicode.c (ast2iCode, newiCode),
8531         * src/SDCCglobl.h,
8532         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
8533         expr, statement, expression_statement, selection_statement,
8534         iteration_statement, expr_opt, jump_statement): foundation for tracking
8535         sequence points
8536         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
8537         point code too)
8538
8539 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8540
8541         * support/Util/SDCCerr.c,
8542         * src/SDCCast.h,
8543         * src/SDCCast.c (createCase, createDefault, decorateType),
8544         * src/SDCClabel.c (labelUnreach),
8545         * src/SDCC.y (labeled_statement, jump_statement): More improvements
8546         to error messages.
8547         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
8548         (with thanks to Stas Sergeev)
8549         * device/include/time.h,
8550         * device/lib/time.c (CheckTime): suppress unreachable code warning
8551
8552 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8553
8554         * src/SDCCast.c (createIvalCharPtr),
8555         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
8556         bug #753752)
8557         * support/regression/tests/nullstring.c: tests for these two bugs
8558
8559 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8560
8561         * support/Util/SDCCerr.h,
8562         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
8563         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
8564         about storage class and 'at' used inside struct or union
8565         * src/SDCCBBlock.c (iCodeFromeBBlock),
8566         * src/SDCCcse.c (ifxOptimize),
8567         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
8568         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
8569         printIval, emitStaticSeg, emitOverlay),
8570         * src/SDCClabel.c (deleteIfx),
8571         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
8572         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
8573         gatherAutoInit, processParms),
8574         * support/Util/SDCCerr.h,
8575         * support/Util/SDCCerr.c (werrorfl): Support for better error location
8576         reporting for post-parse errors.
8577
8578 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8579
8580         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
8581         implicit casts via union; they don't work on big endian systems
8582         (possible fix for bug #861138)
8583
8584 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8585
8586         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
8587         * src/mcs51/main.c: fixed the fix for bug #737001
8588
8589 2003-12-15  Borut Razem <borut.razem AT siol.net>
8590
8591         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
8592
8593 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8594
8595         * support/makebin/makebin.c: put output in binary mode
8596
8597 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8598
8599         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
8600         xdata and data memory on startup. Set the environment variable
8601         SDCC_NOGENRAMCLEAR to disable this.
8602         * src/mcs51/peephole.def,
8603         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
8604         (allows non-interrupt and interrupt code to safely compete for a resource
8605         without the non-interrupt code having to disable interrupts)
8606
8607 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8608
8609         * src/SDCCicode.c (geniCodeAdd),
8610         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
8611         with valFromType if type might be a pointer and host is big endian).
8612         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
8613         types, not just integer types.
8614         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
8615         multiply defined with mismatching "at" address.
8616
8617 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8618
8619         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
8620         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
8621         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
8622         with embedded nulls (fixed bug #753752)
8623
8624 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8625
8626         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
8627         Apparently this did not see much testing (endless loop)
8628
8629 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8630
8631         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
8632
8633 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8634
8635         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
8636         gracefully handle NULL memmap pointers
8637
8638 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8639
8640         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
8641         instead of deleting the iCode when an operand is volatile
8642         * src/z80/gen.c (genDummyRead),
8643         * src/mcs51/gen.c (genDummyRead),
8644         * src/ds390/gen.c (genDummyRead),
8645         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
8646         not just IC_RIGHT
8647         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
8648         * src/SDCC.y: fixed bug #850420
8649
8650 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8651
8652         Applied z80 i/o port patch from Peter Townson and fixed some operators
8653         to better handle operands in A register.
8654         * device/include/z180.h
8655         * src/SDCC.y
8656         * src/SDCCglue.c
8657         * src/z80/gen.c
8658         * src/z80/gen.h
8659         * src/z80/main.c
8660         * src/z80/peeph-z80.def
8661         * src/z80/peeph.def
8662         * src/z80/z80.h
8663
8664 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8665
8666         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
8667
8668 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8669
8670         * device/lib/hc08/_mullong.c: Removed extra #endif
8671
8672 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8673
8674         * sim/ucsim/hc08.src/inst.cc,
8675         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8676         carries from x to h
8677         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8678         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8679         * device/include/stdarg.h: fixed varargs for hc08
8680         * device/lib/Makefile.in,
8681         * device/lib/hc08/Makefile,
8682         * device/lib/hc08/_mulint.c,
8683         * device/lib/hc08/_mullong.c: fixed some endian problems
8684
8685 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8686
8687         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8688         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8689         * device/lib/_gptrget.c,
8690         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8691
8692 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8693
8694         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8695         * src/SDCCast.c (astErrors): fixed bug #846007
8696         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8697
8698 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8699
8700         * src/SDCCast.c (decorateType): disabled a transformation I added in
8701         revision 1.188 (access to fields of a structure at an absolute address);
8702         it breaks with bitfields, extern declarations, and gcse analysis.
8703         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8704         could be assigned through a pointer, so don't complain.
8705         * src/SDCCast.c (astErrors),
8706         * src/SDCCast.h,
8707         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8708
8709 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8710
8711         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8712         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8713         output of __config directives, since gpasm now supports them
8714         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8715         pre-processor macro, i.e. -DMCU=p18f452
8716         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8717         and modified to handle 'cast' icode similarly to '=' icode
8718         * src/pic16/device.h (typedef struct PIC_device): added field
8719         'extMIface' to indicate that chip has external memory interface
8720         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8721         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8722         18F8720
8723
8724 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8725
8726         * src/SDCC.y (pointer): fixed bug #846006
8727         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8728         * src/SDCCast.c (decorateType): fixed bug #846009
8729         * src/ds390/peeph.def,
8730         * src/ds390/gen.c (genAnd, genOr),
8731         * src/mcs51/peeph.def,
8732         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8733
8734 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8735
8736         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8737         * src/SDCCdflow.c
8738         * src/SDCCcse.c
8739         * src/SDCCcse.h
8740         * src/SDCCBBlock.h
8741         * src/SDCCBBlock.c
8742
8743 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8744
8745         fixed bug #845089
8746         * src/SDCCbitv.h,
8747         * src/SDCCbitv.c: added function to free a bitvector
8748         * src/SDCClrange.h,
8749         * src/SDCClrange.c: added function to recompute the liveranges
8750         * src/avr/ralloc.c,
8751         * src/ds390/ralloc.c,
8752         * src/hc08/ralloc.c,
8753         * src/mcs51/ralloc.c,
8754         * src/pic/ralloc.c,
8755         * src/pic16/ralloc.c,
8756         * src/xa51/ralloc.c,
8757         * src/z80/ralloc.c: recompute the liveranges after register packing
8758
8759 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8760
8761         * src/SDCCloop.c (newInduction): fixed bug #845630
8762
8763 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8764
8765         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8766         inadvertantly left behind from my 2003-11-12 change
8767
8768 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8769
8770         Updated headers I neglected to commit yesterday.
8771         * src/SDCClrange.h,
8772         * src/SDCCicode.h
8773
8774 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8775
8776         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8777         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8778         * src/SDCCopt.c (eBBlockFromiCode),
8779         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8780         the creation of the key hash table from the sequencing so it can be used
8781         earlier (for some GCSE bug fixes still pending)
8782
8783 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8784
8785         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8786         * support/regression/tests/addsub.c: testing genPlus shortcut
8787
8788 2003-11-15  Borut Razem <borut.razem AT siol.net>
8789
8790         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8791
8792 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8793
8794         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8795         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8796         ordering is immaterial.
8797         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8798
8799 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8800
8801         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8802         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8803         (SIGSEV) of bug #840381
8804         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8805         unlink new file before rename if new and old filenames are the same)
8806
8807 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8808
8809         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8810         uninitialized variables) for the mcs51. Set environment variable
8811         SDCC_GENRAMCLEAR to test.
8812         xdata initialization slightly shorter
8813
8814 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8815
8816         * src/SDCCsymt.h,
8817         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8818         #838241 & 780691 (basicly the same bug)
8819         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8820         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8821
8822 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8823
8824         * src/SDCCmain.c (linkEdit): "fix" #834252
8825
8826 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8827
8828         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8829         * src/SDCCast.h,
8830         * src/SDCC.y: fixed bug #819403
8831
8832 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8833
8834         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8835         the reentrant attribute.
8836         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8837         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8838         simulation
8839         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8840         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8841         erroneously reduced to a literal.
8842         * src/hc08/ralloc.c (packRegisters, rematStr),
8843         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8844         some cases
8845
8846 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8847
8848         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8849         * doc/sdccman.lyx: changed from 'article' to 'book'
8850         * doc/Makefile: readded test_suite_spec and cdbfileformat
8851
8852 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8853
8854         * device/include/stdlib.h: include malloc.h to comply with ANSI
8855         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8856
8857 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8858
8859         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8860         * doc/clean.mk: also remove *.out files
8861         * doc/sdccman.lyx: some additions, larger top/bottom margins
8862
8863 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8864
8865         * src/SDCC.y: fixed bug #837365
8866         * support/regression/tests/bitopcse.c
8867         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8868         a symbol (might be valop instead)
8869         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8870         * device/lib/clean.mk: added hc08 to the cleaning list
8871
8872 2003-11-04  Borut Razem <borut.razem AT siol.net>
8873
8874         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8875           made 2003-11-04
8876         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8877           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8878           malloc is declared in standard stdlib.h
8879
8880 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8881
8882         * device/lib/hc08/Makefile: need to clean .rel not .o files
8883         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8884
8885 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8886
8887         * src/port.h,
8888         * src/hc08/main.c,
8889         * src/mcs51/main.c,
8890         * src/ds390/main.c,
8891         * src/z80/main.c,
8892         * src/avr/main.c,
8893         * src/pic/main.c,
8894         * src/pic16/main.c,
8895         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8896         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8897         tests (which uses the port's oclsExpense function)
8898         * src/SDCC.y,
8899         * src/SDCCast.c,
8900         * src/SDCCicode.c,
8901         * src/hc08/gen.c,
8902         * src/ds390/gen.c,
8903         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8904
8905 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8906
8907         * src/SDCCcse.c (ifxOptimize),
8908         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8909         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8910         deleting the IFX iCode.
8911         * src/hc08/ralloc.c: reduced unneeded slocs
8912         * src/hc08/gen.c: fixed bug in asmopToBoolean
8913
8914 2003-11-04  Borut Razem <borut.razem AT siol.net>
8915
8916         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8917           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8918           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8919           transferred to configure
8920
8921 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8922
8923         Use headers defined in the C[++] standards:
8924         * sim/ucsim/gui.src/serio.src/fileio.cc
8925         * sim/ucsim/gui.src/serio.src/frontend.cc
8926         * sim/ucsim/gui.src/serio.src/main.cc
8927         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8928         * support/Util/NewAlloc.c
8929         * as/hc08/lklibr.c
8930         * as/mcs51/lklibr.c
8931         * as/z80/aslist.c
8932         * as/z80/assym.c
8933
8934 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8935
8936         * Added MSVC projects for hc08 assembler and linker:
8937         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8938         /as/hc08/link_hc08.dsp
8939
8940 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8941
8942         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8943
8944 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8945
8946         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8947
8948 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8949
8950         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8951
8952 2003-10-31  Borut Razem <borut.razem AT siol.net>
8953
8954         * support/cpp2/cpplib.h,
8955           support/cpp2/cpplib.c,
8956           support/cpp2/cpplex.c,
8957           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8958           to switch _asm block preprocessing on / off. Default is
8959           #pragma preproc_asm +
8960
8961 2003-10-31  Borut Razem <borut.razem AT siol.net>
8962
8963         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8964           when outputting comment blocks (when executed with -C option) and
8965           _asm (SDCPP specific) blocks
8966
8967 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8968
8969         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8970
8971 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8972
8973         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8974
8975 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8976
8977         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8978         * src/SDCCast.c (decorateType): fixed bug #832664
8979
8980 2003-10-31  Borut Razem <borut.razem AT siol.net>
8981
8982         * support/cpp2/cpplex.c: fixed for SDCPP:
8983           comments(when executed with -C option) and _asm blocks
8984           were included even if they where in skipped #if block.
8985           Applied solution from GCC cpp 3.3.2
8986
8987 2003-10-31  Borut Razem <borut.razem AT siol.net>
8988
8989         * src/SDCC.lex: sdcc now understands both formats:
8990           '# <line_number> <file_name>' and
8991           '#line <line_number> <file_name>'
8992         * support/cpp2/cppmain.c: sdcpp now generates the standard
8993           '# <line_number> <file_name>' instead of former
8994           '#line <line_number> <file_name>'
8995
8996 2003-10-30  Borut Razem <borut.razem AT siol.net>
8997
8998         * support/cpp2/cpphash.h,
8999         * support/cpp2/cpplib.h
9000         * support/cpp2/cpplex.c,
9001         * support/cpp2/cppmain.c,
9002         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
9003
9004 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9005
9006         Fixed a number of problems revealed by bug #827883.
9007         * src/SDCCloop.c (loopInvariants): Spill location of the
9008         result operand should be recomputed if extracted from
9009         a loop. Also, don't extract assignments of an iTemp
9010         from a literal.
9011         * src/SDCCast.c (isConformingBody): loop reversal should
9012         not occur if the control variable is involved with a
9013         relational operator.
9014
9015 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
9016
9017         * .version: bumped to 2.3.6 to reflect the big improvements
9018         made by Erik and Klaus. Thanks!
9019
9020 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
9021
9022         Replaced the livrange code.
9023         * src/SDCClrange.c: added new LR code
9024         * src/SDCCloop.c,
9025         * src/SDCCBBlock.h: removed remainig parts from old LR code
9026         * src/ds390/ralloc.c,
9027         * src/ds390/gen.c: minor fixes to make it work with new code
9028
9029 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9030
9031         * as/hc08/asm.h,
9032         * as/hc08/lkrloc.c,
9033         * src/hc08/gen.c,
9034         * src/hc08/ralloc.c: Fix various warnings related to the hc08
9035         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
9036         (tweaked fix for bug #818696)
9037
9038 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9039
9040         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
9041
9042 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9043
9044         * src/SDCCmain.c,
9045         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
9046         * src/mcs51/gen.c (gencjneshort),
9047         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
9048         more efficient (per Scott Bronson's suggestion)
9049
9050 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9051
9052         Extended the semantics of the critical keyword to include
9053         individual statements. See RFE #827755 and #799831
9054         * src/SDCC.y
9055         * src/SDCCicode.c
9056         * src/SDCCopt.c
9057         * src/SDCCast.c
9058         * support/Util/SDCCerr.c
9059         * support/Util/SDCCerr.h
9060         * src/mcs51/gen.c
9061         * src/ds390/gen.c
9062         * src/hc08/gen.c
9063
9064 2003-10-19  Borut Razem <borut.razem AT siol.net>
9065
9066         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
9067
9068 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9069
9070         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
9071         Fixed bug #818696
9072         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
9073         and predecrement operand is displayed
9074
9075 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9076
9077         * src/SDCCval.c (valMinus): fixed bug #826041
9078
9079 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9080
9081         Some hc08 related updates that I missed earlier
9082         * sim/ucsim/stypes.h
9083         * support/regression/ports/hc08/spec.mk
9084
9085 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9086
9087         New target "hc08" for the Motorola 68hc08 family of micros
9088
9089         * configure
9090         * configure.in
9091         * Makefile
9092         * src/hc08/*
9093         * src/SDCCmain.c
9094         * src/port.h
9095         * sim/ucsim/hc08.src/*
9096         * sim/ucsim/configure.in
9097         * src/ucsim/configure
9098         * sim/ucsim/packages_in.mk
9099         * as/hc08/*
9100         * as/Makefile
9101         * device/include/mc68hc908qy.h
9102         * device/lib/hc08/*
9103         * device/lib/Makefile.in
9104         * support/regression/ports/hc08/*
9105         * support/regression/Makefile
9106
9107 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9108
9109         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
9110         regression test
9111         * src/ds390/gen.c (genCast): fixed bug #821957
9112
9113 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9114
9115         * device/lib/logf.c: "fixed" overlay bug
9116         * support/regression/ports/host/spec.mk: added m library
9117         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
9118         * support/regression/tests/float_trans: added (for Eric)
9119
9120 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
9121
9122         * src/mcs51/gen.c (genCpl): fixed bug
9123         http://sf.net/mailarchive/message.php?msg_id=6263915
9124
9125 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
9126
9127         * src/SDCCast.c (decorateType): added extended constant folding
9128         * src/SDCCsymt.c (computeType): cleanup
9129         * src/SDCCval.c (valShift): minor optimization
9130         * support/regression/tests/ast_constant_folding.c: added
9131
9132 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9133
9134         * src/SDCCmain.c: removed some unintended changes
9135
9136 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9137
9138         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
9139         * src/z80/gen.c: fixed part of bug #817589
9140         * src/SDCCsymt.c (checkFunction): fixed bug #817895
9141
9142 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
9143
9144         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
9145         * src/SDCCcflow.c
9146         * src/SDCCcse.c
9147         * src/SDCCdflow.c
9148         * src/SDCClabel.c
9149         * src/SDCClrange.c
9150         * src/SDCCmem.c
9151         * src/SDCCopt.c
9152         * src/SDCCpeeph.c
9153         * src/SDCCset.c
9154         * src/avr/ralloc.c
9155         * src/ds390/ralloc.c
9156         * src/izt/ralloc.c
9157         * src/mcs51/ralloc.c
9158         * src/pic/ralloc.c
9159         * src/pic16/ralloc.c
9160         * src/xa51/ralloc.c
9161         * src/z80/ralloc.c
9162         * src/z80/gen.c: removed unused label "release:"
9163
9164 2003-10-06  Borut Razem <borut.razem AT siol.net>
9165
9166         * src/SDCC.lex: removed definition of unused variables
9167           save_optimize and save_options
9168
9169 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
9170
9171         * clean.mk: removed '=' in "-maxdepth=1"
9172         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
9173         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
9174
9175 2003-10-06  Borut Razem <borut.razem AT siol.net>
9176
9177         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
9178           my_unput() replaced by unput()
9179
9180 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
9181
9182         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
9183         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
9184         type-punned pointer will break strict-aliasing rules"
9185         Old LR behaviour is again default; Klaus' LR can be choosen by
9186         defining the environment variable LRKLAUS
9187         * src/SDCCBBlock.h
9188         * src/SDCCloop.c
9189         * src/SDCClrange.c
9190         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
9191         * clean.mk: fixed removal of files in bin/CVS/
9192         * device/lib/clean.mk: fixed removal of directories small and large
9193         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
9194         * src/SDCCicode.c,
9195         * src/SDCCval.c: removed superflous test for pedantic
9196
9197 2003-10-05  Borut Razem <borut.razem AT siol.net>
9198
9199         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
9200           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
9201           message "unmatched #pragma SAVE and #pragma RESTORE"
9202
9203 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9204
9205         * doc/sdccman.lyx: various additions and updates (interrupts, inline
9206           assembly, critical functions, atomic, nojtbound)
9207
9208 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
9209
9210         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
9211         * src/SDCCBBlock.h
9212         * src/SDCCloop.c
9213         * src/SDCCloop.h
9214         * src/SDCClrange.c
9215
9216 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9217
9218         * src/z80/gen.h,
9219         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9220         * src/mcs51/gen.h
9221         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9222         * src/ds390/gen.h
9223         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9224         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
9225         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
9226
9227 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9228
9229         * src/z80/gen.c (genRet): fixed bug #524753
9230         * src/z80/gen.c (genCast): fixed internal error on cast from
9231         pointer to long
9232         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
9233         fix for bug #477835 to the z80
9234         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
9235         for tracking iCodes in the peephole optimizer for z80
9236
9237 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9238
9239         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
9240         the other part of bug #814548
9241         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
9242
9243 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
9244
9245         * src/SDCCcse.c: fixed part of bug #814548
9246
9247 2003-09-28  Borut Razem <borut.razem AT siol.net>
9248
9249         * src/asm.c: rewrite of printILine() to use temporary file instead
9250           a pipe
9251         * src/xa51/main.c: commented out declaration of int rewinds
9252
9253 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9254
9255         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
9256
9257 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9258
9259         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
9260         * src/asm.c (printILine): Fixed bug #811015
9261
9262 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9263
9264         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
9265         freeing.
9266
9267 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9268
9269         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
9270         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
9271         to correctly handle general case of AOP_PAIRPTR
9272         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
9273
9274 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9275
9276         * src/mcs51/ralloc.c (fillGaps),
9277         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
9278         register positioning bug)
9279
9280 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
9281
9282         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
9283
9284 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9285
9286         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
9287         genCodePointerGet, genGenPointerGet, genFarPointerSet,
9288         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
9289         (ralloc doesn't intentionally do this now, but perhaps later)
9290         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
9291         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
9292         register positioning bugs (Fixed bug #762602 and #795325)
9293         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
9294         (Fixed bug #808779)
9295         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
9296         lines that --i-code-in-asm generates
9297
9298 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9299
9300         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
9301         trying to fclose a FILE* that was already closed.
9302
9303 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9304
9305         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
9306         of const struct should be treated as if const themselves)
9307
9308 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
9309
9310         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
9311
9312 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9313
9314         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
9315         Unix (/n) and DOS (/r/n) line terminations.
9316
9317 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9318
9319         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
9320         bug #613775
9321
9322 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9323
9324         * src/mcs51/gen.c (genFunction, genEndFunction),
9325         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
9326         and restore of EA so that stack offsets to parameters are
9327         correct when using both critical and reentrant/stack-auto.
9328         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
9329         size (can be triggered in error if sloc is shared between
9330         different sized objects)
9331         * device/include/float.h: fixed macros to explicitly use
9332         unsigned long where needed
9333
9334 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
9335
9336         Feature req. 799831: added code to allow nesting of critical functions
9337         * src/mcs51/gen.c (genFunction, genEndFunction)
9338         * src/ds390/gen.c (genFunction, genEndFunction)
9339
9340 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9341
9342         * src/SDCCsymt.c (sclsFromPtr),
9343         * src/SDCCsymt.h,
9344         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
9345         support for standard C idiom of memory mapped variables; for
9346         example, *((xdata int*)0x1234) = 1 is now internally equivalent
9347         to xdata int at 0x1234 tempvar = 1.
9348         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
9349         provided by Akiya ISHIDA
9350
9351 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
9352
9353         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
9354         * src/SDCCval.c (constVal): added reduction from int to char
9355         * src/SDCCval.c (valMult, valDiv): fixed sign handling
9356         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
9357         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
9358         to ignore the sign
9359         * support/regression/tests/shifts.c: fixed
9360
9361 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9362
9363         * src/z80/gen.c (genXor): Fixed bug #805445
9364
9365 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9366
9367         Fixed bug #621531 (const & volatile confusion in the type chain).
9368         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
9369         refer to the const or volatile state of the pointer itself.
9370
9371         * src/SDCCast.c
9372         * src/SDCCglue.c
9373         * src/SDCCicode.c
9374         * src/SDCCsymt.c
9375         * src/SDCCval.c
9376         * src/SDCC.y
9377         * src/SDCCsymt.h
9378         * src/pic/gen.c
9379         * src/pic/ralloc.c
9380         * src/pic16/gen.c
9381         * src/pic16/ralloc.c
9382         * support/regression/tests/const.c
9383
9384 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9385
9386         When checking for duplicated modules, use absolute paths
9387         instead of relative paths.  Files changed:
9388
9389         * as/mcs51/lklib.c
9390         * link/z80/lklib.c
9391
9392 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9393
9394         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
9395
9396 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9397
9398         * device/include/string.h: added size_t typedef, changed
9399         prototypes to use size_t, eliminated separate reentrant and
9400         non-reentrant declarations, added _memmove declaration
9401         * device/lib/_memcpy.c: changed to use size_t instead of int,
9402         changed /4 to >>2 to avoid division library call
9403         * device/lib/_memcmp.c,
9404         * device/lib/_memset.c,
9405         * device/lib/_strncat.c,
9406         * device/lib/_strncpy.c,
9407         * device/lib/_strncmp.c: changed to use size_t instead of int
9408         * device/lib/_memmove.c: new file (fixed bug #772294)
9409         * device/lib/Makefile.in: added _memmove.c
9410         * device/lib/z80/asm_strings.s: fixed bug #772290
9411         * support/regression/tests/bitfields.c: attempt to fix host assertion
9412         failure on amd64-unknown-linux2.2
9413
9414 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9415
9416         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
9417         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
9418         * as/z80/asmain.c (main): fixed bug #801766
9419
9420 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
9421
9422         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
9423         compilers
9424
9425 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9426
9427         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
9428         reported in bug #800609
9429
9430 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
9431
9432         * Top header beautifications in src/pic16 directory:
9433           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
9434           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
9435           pcoderegs.h, ralloc.c, ralloc.h
9436         * main.c: added top header and GPL license notice
9437         * pcode.c: fixed the if-conditional warning
9438
9439 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
9440
9441         * device/lib/_mullong.c: replaced int by short for gcc
9442
9443 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9444
9445         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
9446         and JUMPTABLE iCodes properly now (worked by accident before)
9447         * src/mcs51/gen.c (leftRightUseAcc),
9448         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
9449         iCode properly now. Use getSize instead of nRegs since a & b
9450         aren't part of the nRegs tally.
9451
9452 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
9453
9454         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
9455         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
9456           before instructions that use the _STATUS register
9457
9458 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
9459
9460         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
9461         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
9462         fetching of the pointer
9463         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
9464         copied from genNearPointerSet()
9465         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
9466         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
9467         If they pop r0/r1 they must be called in the opposite order than aopOp().
9468         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
9469         (resp. --stack-auto), prepared for --xstack
9470
9471 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9472
9473         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
9474
9475 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9476
9477         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
9478         these ports have their own __sdcc_external_start()
9479
9480 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
9481
9482         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9483         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
9484         type for bits was changed. It resulted in bit variables becoming
9485         global, which is not permitted in PIC 14 assembly output.
9486
9487 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9488
9489         * doc/sdccman.lyx: various additions and updates. Rearranged sections
9490
9491 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9492
9493         Z80 and MCS51 linkers complaint if a public symbol is defined
9494         in more than one library module:
9495
9496         * as/mcs51/lklib.c
9497         * link/z80/lklib.c
9498         * as/mcs51/Makefile.in
9499
9500 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9501
9502         A few small changes that speed up the peephole optimizer.
9503
9504         * src/SDCCpeeph.c
9505
9506 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9507
9508         Try to make the peephole optimizer smarter by maintaining
9509         an association between the assembly source code and the
9510         iCodes that originated them. Put this information to use
9511         with a new peephole rule condition "notVolatile" so that
9512         the rules can be aggressive yet still safe.
9513
9514         * src/SDCCpeeph.c
9515         * src/SDCCpeeph.h
9516         * src/mcs51/gen.c
9517         * src/mcs51/peeph.def
9518
9519 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9520
9521         Fixed bug #741761
9522
9523         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
9524         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
9525         if the left or right operand symbols have the accuse flag set.
9526
9527 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9528
9529         Changed the type of the result of the ! (NOT) operator to char;
9530         previously it returned the same type as the source. This allows
9531         us to eliminate all the genFloatNot functions (all of its target
9532         implementations were very buggy) since !float can use the same
9533         code as !long now.
9534
9535         * src/SDCCicode.c (ast2iCode): ! returns char
9536         * src/mcs51/gen.c (genNot, genNotFloat),
9537         * src/ds390/gen.c (genNot, genNotFloat),
9538         * src/z80/gen.c (genNot, genNotFloat),
9539         * src/pic/gen.c (genNot, genNotFloat),
9540         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
9541
9542 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
9543
9544         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9545         1. Interrupt would not compile properly. Ensure PCLATH register is saved
9546            during interrupts. Ensure WSAVE is located at a shared bank address.
9547         2. Fixed page selection in some places
9548         3. Fixed BTFSS/C to where necessary use registers directly and not simply
9549            the registers name strings.
9550         4. Fixed "signed / unsigned compare" compiler warnings.
9551         5. The PIC port manages its own allocation of the general purpose
9552            registers, but makes no attempt to reuse them. As a result when
9553            compiling it soon runs out of general purpose registers. Some
9554            additional code was added to the files pcode.c and device.c to walk
9555            through the function call tree and rename the registers so that they
9556            get reused.
9557
9558         * src/pic/device.c
9559         * src/pic/gen.c
9560         * src/pic/glue.c
9561         * src/pic/pcode.c
9562         * src/pic/pcode.h
9563         * src/pic/ralloc.c
9564         * src/pic/ralloc.h
9565         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
9566         genPlus() & genMinus() when the result is the same as left or right
9567
9568 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9569
9570         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
9571
9572 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9573
9574         Made bitfield a distinct type from bit so that bitfields
9575         convert as per ANSI C and bits retain their traditional
9576         boolean style behaviour. Implemented bitfield support in
9577         the z80 port.
9578
9579         * src/SDCCsymt.h,
9580         * src/SDCCsymt.c,
9581         * src/SDCCast.c,
9582         * src/cdbFile.c,
9583         * src/mcs51/gen.c,
9584         * src/ds390/gen.c: bit v bitfield split
9585         * src/z80/gen.c: New support for bitfields
9586         * support/regression/tests/bitfields.c: reenabled z80,
9587         added more tests
9588
9589 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9590
9591         Rules 246.x, 247.x relate to bitfields, the others speed up
9592         access to xdata mapped I/O devices.
9593
9594         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
9595
9596 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9597
9598         Cleaned up genPackBits and genUnpackBits and added two helper
9599         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
9600         for literal assignments in genPackBits (thanks to Frieder for
9601         reminding me).
9602
9603         * src/mcs51/gen.c
9604         * src/ds390/gen.c
9605
9606 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9607
9608         Fixed bug #748310 (pointer to function type mishandled when the
9609         function name is omitted). Also fixed a SIGSEGV when a function
9610         attribute (reentrant, etc) is used on a non-function or on a
9611         function but misplaced before the parameter list.
9612
9613         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
9614         bug #748310
9615         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
9616         * support/Util/SDCCerr.h,
9617         * support/Util/SDCCerr.c: Added func attr misuse error msg
9618
9619 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9620
9621         Fixed bug #787649 by anonymous
9622         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
9623         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
9624
9625 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9626
9627         Fixed numerous bitfield problems.
9628
9629         * src/SDCC.y: More bitfield related error checking
9630         * src/SDCCsymt.h,
9631         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
9632         * support/Util/SDCCerr.h,
9633         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
9634         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9635         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9636         * support/regression/tests/bitfields.c: tests added
9637
9638 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9639
9640         Made the constant following the "interrupt" keyword optional. If
9641         omitted, the function will not automatically be given an entry
9642         in the interrupt vector table (similar to #pragma NOIV, but
9643         less syntacticly kludgy). The interrupt number is also now
9644         range checked. Also fixed a bug in the high order bit example
9645         in the manual.
9646
9647         * src/SDCC.y
9648         * src/SDCCmem.c
9649         * src/SDCCglue.c
9650         * src/SDCCsymt.h
9651         * support/Util/SDCCerr.c
9652         * support/Util/SDCCerr.h
9653         * doc/sdccman.lyx
9654
9655 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9656
9657         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
9658         * src/SDCCicode.c (operandOperation): rewritten some ops
9659         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
9660         * src/SDCCsymt.c (computeType): literals are handled the same way as any
9661         other type
9662         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
9663         be re-activated by defining REDUCE_LITERALS)
9664         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
9665         unsigned, but are signed by default
9666         * src/SDCCval.c (constVal): rearranged
9667         * src/SDCCval.c (valMod): preliminary fix
9668         * src/SDCCval.c (valCastLiteral): use TYPE_* types
9669         * support/regression/literalop.c: added, work in progress
9670
9671 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9672
9673         Generate warnings for useless declarations like "char data;"
9674         that don't do what new users expect.
9675
9676         * src/SDCC.y
9677         * support/Util/SDCCerr.h
9678         * support/Util/SDCCerr.c
9679
9680 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9681
9682         * src/SDCCval.c (valMult): fix overflow detection of negative int
9683
9684 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9685
9686         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9687
9688         Changes to support big endian targets:
9689
9690         * src/ports.h
9691         * src/SDCCglue.c
9692         * src/avr/main.c
9693         * src/ds390/main.c
9694         * src/izt/i186.c
9695         * src/mcs51/main.c
9696         * src/pic/main.c
9697         * src/pic16/main.c
9698         * src/xa51/main.c
9699         * src/z80/main.c
9700
9701 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9702
9703         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9704         * device/lib/time.c: fixed warning "integer overflow in expression"
9705
9706 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9707
9708         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9709         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9710         constants are unsigned; added recognition of "u" flag for unsigned
9711         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9712         * src/SDCCval.c (valDiv, valMod): fixed signdness
9713         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9714         signedness of modulo, left and right shift
9715         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9716         * support/Util/SDCCerr.h: added warning W_INT_OVL
9717         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9718         * src/SDCCast.c (ast_print): improved output of constants
9719
9720 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9721
9722         Fixed some warnings when building with MSVC:
9723
9724         * as/mcs51/asdata.c
9725         * as/z80/asdata.c
9726         * as/mcs51/asm.h
9727         * as/z80/asm.h
9728         * link/z80/aslink.h
9729         * link/z80/lkdata.c
9730         * link/z80/lkeval.c
9731         * link/z80/lkgb.c
9732         * link/z80/lkihx.c
9733         * link/z80/lks19.c
9734         * link/z80/lksym.c
9735         * support/cpp2/cpplib.c
9736         * src/ds390/gen.c
9737         * src/mcs51/gen.c
9738
9739 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9740
9741         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9742
9743 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9744
9745         * support/librarian/clean.mk: Do not remove Makefile.
9746         * support/librarian/Makefile: added.
9747
9748 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9749
9750         Added librarian to MSVC build:
9751         * all.dsp
9752         * sdcc.dsw
9753         * support/librarian/librarian.dsp
9754
9755         'configure' not needed for librarian, removed:
9756         * support/librarian/configure
9757         * support/librarian/configure.in
9758         * support/librarian/config_in.h
9759         * support/librarian/Makefile.in
9760
9761         Hopefully these ones built the librarian and the rest of sdcc properly:
9762         * Makefile
9763         * Makefile.common.in
9764
9765         Messed up 'configure', so revert to previous version:
9766         * configure
9767         * configure.in
9768
9769 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9770
9771         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9772         there, while the mantissa of a double is "only" 53 bits wide.
9773
9774 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9775
9776         Adding sdcclib to the build.  MSVC project coming soon.
9777         Files added/changed:
9778
9779         * support/librarian/clean.mk
9780         * support/librarian/configure
9781         * support/librarian/configure.in
9782         * support/librarian/config_in.h
9783         * support/librarian/Makefile.bcc
9784         * support/librarian/Makefile.in
9785         * support/librarian/sdcclib.c
9786         * Makefile.bcc
9787         * Makefile
9788         * Makefile.common.in
9789         * configure
9790         * configure.in
9791
9792 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9793
9794         Linker now complaints if linked modules have conflicting options, for
9795         example, one compiled using --model-large and another one compiled with
9796         --model-small.  The following files were modified:
9797
9798         * as/mcs51/asdata.c
9799         * as/mcs51/aslink.h
9800         * as/mcs51/asm.h
9801         * as/mcs51/asmain.c
9802         * as/mcs51/asout.c
9803         * as/mcs51/i51pst.c
9804         * as/mcs51/lkdata.c
9805         * as/mcs51/lklibr.c
9806         * as/mcs51/lkmain.c
9807         * as/z80/asdata.c
9808         * as/z80/asm.h
9809         * as/z80/asmain.c
9810         * as/z80/asout.c
9811         * as/z80/z80pst.c
9812         * link/z80/aslink.h
9813         * link/z80/lkdata.c
9814         * link/z80/lklibr.c
9815         * link/z80/lkmain.c
9816         * src/SDCCglue.c
9817
9818 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9819
9820         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9821         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9822
9823 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9824
9825         * src/z80/mappings.i: fix _mul[us][int,long] entries
9826
9827 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9828
9829         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9830
9831 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9832
9833         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9834         * support/regression/tests/bitopcse.c: added
9835         fixed warning:
9836         * src/avr/gen.c:
9837         * src/pic/gen.c:
9838         * src/pic16/gen.c:
9839         * src/z80/gen.c:
9840         * src/xa51/gen.c:
9841
9842 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9843
9844         added support for new library format to z80, gbz80 linkers:
9845         *link/z80/aslink.h
9846         *link/z80/lklex.c
9847         *link/z80/lklib.c
9848         *link/z80/lklist.c
9849
9850 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9851
9852         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9853         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9854
9855 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9856
9857         added DUMMY_READ_VOLATILE:
9858         * src/SDCC.y:
9859         * src/avr/gen.c:
9860         * src/xa51/gen.c:
9861         * src/z80/gen.c:
9862         * src/pic/gen.c:
9863         * src/pic16/gen.c:
9864         * src/mcs51/gen.c:
9865         * src/ds390/gen.c:
9866         * src/SDCCcse.c (algebraicOpts): many improvements
9867         * src/SDCCcse.h: removed algebraicOpts()
9868         * src/SDCCicode.c (picDummyRead): added
9869
9870 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9871
9872         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9873         "Insufficient space in data memory".
9874
9875 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9876
9877         * src/mcs51/gen.c: fixed bug #771358
9878         * src/z80/gen.c: fixed bug #759087
9879
9880 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9881
9882         * src/pic16/glue.c: minor cleanup by Vangelis
9883
9884 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9885
9886         * device/include/regc515c.h: fixed #758477
9887         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9888         * device/lib/_gptrput.c: saved a few bytes
9889         * my tab spacing is 8, yours too?)
9890         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9891         * device/lib/serial.c: process RX bytes earlier than TX bytes
9892         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9893
9894 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9895
9896         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9897
9898 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9899
9900     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9901
9902 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9903
9904         * device/lib/Makefile.in: bad fix, reverted to 1.43
9905
9906 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9907
9908         * device/lib/Makefile.in: added missing z80 object files
9909
9910 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9911
9912         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9913         pic16 progress by Vangelis:
9914         * src/SDCCglobl.h:
9915         * src/SDCCmain.c:
9916         * src/pic/Makefile:
9917         * src/pic:
9918         * pic/Makefile:
9919         * pic16/device.c:
9920         * pic16/device.h:
9921         * pic16/gen.c:
9922         * pic16/gen.h:
9923         * pic16/genarith.c:
9924         * pic16/glue.c:
9925         * pic16/main.c:
9926         * pic16/pcode.c:
9927         * pic16/pcode.h:
9928         * pic16/pcodepeep.c:
9929         * pic16/peeph.def:
9930
9931 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9932
9933     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9934
9935 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9936
9937     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9938     added gbz80 build to MSVC project.
9939     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9940     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9941     from 8051 stuff and setup so it links using a .lnk file.
9942
9943 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9944
9945     * support/librarian/sdcclib.c: sdcc librarian.
9946     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9947     with sdcclib.
9948
9949 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9950
9951     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9952
9953 2003-07-02  Borut Razem <borut.razem AT siol.net>
9954
9955         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9956         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9957         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9958         src/xa51/main.c, src/z80/main.c:
9959         virtualization of glue() function: each port has it's own glue function,
9960         which is accessed by do_glue function pointer in PORT.general structure
9961
9962 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9963
9964         * DS800C400 fun, improved ROM interface and tinibios.
9965
9966 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9967
9968         * More support for DS80C400. Now includes beginning of interface to ROM.
9969
9970 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9971
9972         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9973
9974 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9975
9976         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9977
9978 2003-06-19  Borut Razem <borut.razem AT siol.net>
9979
9980         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9981
9982 2003-06-19  Borut Razem <borut.razem AT siol.net>
9983
9984         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9985         fixed Z80 port - crt0.o: cannot open.
9986
9987 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9988
9989         * support/Util/MySystem.c (merge_command): revert bad fix
9990
9991 2003-06-18  Borut Razem <borut.razem AT siol.net>
9992
9993         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9994
9995 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9996
9997         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9998         option --use-stdout sends errors to stdout instead of stderr.
9999
10000 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
10001
10002         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
10003
10004 2003-06-15  Borut Razem <borut.razem AT siol.net>
10005
10006         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
10007         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
10008         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
10009         fixed width array of pointers replaced with sets;
10010         multiple include and lib paths ared transferred to preprocessor and linker
10011         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
10012         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
10013         fixed width array of pointers
10014         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
10015         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
10016         fixupPath(), getPathDifference()
10017         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
10018         fixed width array of pointers
10019
10020 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
10021
10022         * src/pic16/ralloc.c: fix warnings
10023         * src/pic16/pcode.c: fix warning
10024
10025 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
10026
10027          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
10028         know all the details, but essentially this set of changes enable
10029         the pic16 port to generate movff instructions and generate assembler
10030         directives,
10031         * src/SDCCmain.c:
10032         * src/pic16/gen.c:
10033         * src/pic16/glue.c:
10034         * src/pic16/pcode.c:
10035         * src/pic16/device.c:
10036         * src/pic16/main.c:
10037         * src/pic16/pcode.h:
10038         * src/pic16/pcoderegs.c:
10039         * src/pic16/ralloc.c:
10040         * src/pic16/ralloc.h:
10041
10042 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10043
10044         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
10045         added option --vc, so sdcc errors and warnings are compatible with
10046         Microsoft Visual Studio.
10047
10048 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10049
10050         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
10051           device/lib/libfloat.lib: added atof function.
10052
10053 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
10054
10055         * doc/sdccman.lyx: updated to Lyx 1.3
10056         * doc/cdbfileformat.lyx: updated to Lyx 1.3
10057         * doc/test_suite_spec.lyx: updated to Lyx 1.3
10058         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
10059
10060 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
10061
10062         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
10063
10064 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10065
10066         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
10067           additions to the "related tools/documentation" section
10068
10069 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
10070
10071         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
10072
10073 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
10074
10075         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
10076         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
10077
10078 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
10079
10080         * doc/sdccman.lyx: fix double dash and other minor things
10081         * doc/Makefile: fix double dash
10082
10083 2003-05-28  Karl Bongers(patches from Martin Helmling)
10084         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
10085           condition and ignore commands.
10086
10087 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10088
10089         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
10090           is in parts still quite out of date, I did changes as far as I felt makes sense
10091           for a non-native english speaker.
10092           Please feel free to add to the manual or to correct my changes.
10093         * doc/Makefile: undid touching the date of intermediate tex files.
10094
10095 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10096
10097         * doc/sdccman.lyx: Manual has an index now
10098
10099 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
10100
10101         Finalize muluint/mulsint and mululong/mulslong merging:
10102         * device/lib/_mulint.c
10103         * device/lib/_mullong.c
10104         * device/lib/gbz80/mul.s
10105         * device/lib/gbz80/stubs.s
10106         * device/lib/z80/mul.s
10107         * device/lib/z80/stubs.s
10108         * src/SDCCsymt.c (initCSupport)
10109
10110 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10111
10112         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
10113         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
10114           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
10115           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
10116           instead of /Zm500.
10117
10118 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10119
10120         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
10121           the regression tests I'm not brave enough to enable 245.b, 245.c
10122         * doc/sdccman.lyx: added latex preamble for hyperref package.
10123           Using pdflatex this will give you a hyperlinked pdf file with
10124           bookmarks. (prepend '%' before /usepackage if this breaks something)
10125
10126 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10127
10128          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
10129
10130 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
10131
10132         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
10133
10134 2003-05-21    <johan AT balder>
10135
10136         * src/SDCCglue.c (printIval): fixed bug #739934
10137
10138 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10139
10140         Applied patch from bug 737905 (renamed yylineo to mylineno):
10141         * src/altlex.c
10142         * src/SDCCast.c
10143         * src/SDCglobl.h
10144         * src/SDCC.lex
10145         * src/SDCCsymt.c
10146         * src/SDCCval.c
10147         * src/pic16/pcode.c: Cleaned warnings
10148         * src/pic16/pcodeflow.c: Cleaned warnings
10149         * src/pic16/pcoderegs.c: Cleaned warnings
10150
10151 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
10152
10153         * src/pic16/pcode.c: Cleaned warnings
10154         * src/pic16/pcodepeep.c: Cleaned warnings
10155         * src/pic16/ralloc.c: Cleaned warnings
10156
10157 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10158
10159         * doc/sdccman.lyx: fixed bug 739745
10160         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
10161
10162 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
10163
10164         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
10165         it can be defined with CFLAGS when running configure
10166         * src/SDCCmain.c: fixed compiling + linking with object files
10167
10168 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
10169
10170         * configure.in: configure for pic16 port,
10171             added --disable-pic16-port
10172         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
10173         * src/SDCCmain.c: linkOptions is changed to set *,
10174             added if/endif conditional macros to remove options help
10175             messages from optionsTable when a port is not configured, added
10176             support for the PIc16 port in the ports table, when executing
10177             the compiler with no port specified on command line, a default
10178             port is selected with the new macro DEFAULT_PORT which is
10179             defined in port.h, in setDefaultOptions() linkOptions is removed
10180             from initialization assignment, since now it is a set,
10181             parseCmdLine uses setParseWithComma for linkOptions, in
10182             linkEdit() linkOptions are accessed with new function indexSet()
10183             which returns the i'th item of a set variable. See SDCCset.c, in
10184             linkEdit() when calling buildCmdLine(), added linkOptions as
10185             last argument. Now users can pass arguments to gplink via the
10186             -Wl option, main() uses pic16glue() to glue up pic16 programs
10187         * src/SDCCpeeph.c: various changes to support pic16
10188         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
10189             return the i'th item of the set
10190         * src/SDCCset.h: added function prototype for indexSet()
10191         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
10192         * src/clean.mk: added pic16 in CLEANALLPORTS variable
10193         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
10194             added macro DEFAULT_PORT
10195         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
10196         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
10197             generated
10198         * src/pic16/glue.c: commented out some error producing lines
10199         * src/pic16/main.c: __config directives are commented out to stop
10200             gpasm complaining and test the linkage with gplink, _linkCmd and
10201             _asmCmd changed to be more gplink and gpasm friendly
10202         * src/pic16/peeph.def: peep rule 3 is commented out, since it
10203             produced an error when parsed, peep rule 12 is added to utilize
10204             movff, but it is commented out since the pCode does not support
10205             yet a command with 2 address arguments
10206
10207 2003-05-18    <johan AT balder>
10208
10209         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10210         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10211 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
10212
10213         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
10214   Added feature to script commands from file.
10215
10216 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
10217
10218         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
10219         * src/SDCCutil.c: include ctype.h for win32
10220
10221 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
10222
10223         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
10224
10225 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
10226
10227         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
10228   Fixed so you can set breakpoints prior to run, run does not stop
10229   on entry now.  Add tbreak.  Other enhancements and fixes for use
10230   with ddd.
10231
10232 2003-05-12  Borut Razem <borut.razem AT siol.net>
10233
10234         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
10235
10236 2003-05-11  Borut Razem <borut.razem AT siol.net>
10237
10238         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
10239         the path of bin directory, so that PATH is the only env. variable, which has to be set
10240         in case of standard installation.
10241         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
10242         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
10243         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
10244
10245 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10246
10247         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
10248         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
10249         temp files are in the port dir; clean the gen/test directory when
10250         generating new test.c
10251         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
10252         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
10253         * support/regression/tests/zeropad.c: added
10254
10255 2003-05-09    <johan AT balder>
10256
10257         * src/SDCCglue.c: fixed bug #597940
10258
10259 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
10260
10261         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10262   cache sfr, optimize next,step, fix off by one sourceline,
10263   support ddd list function.
10264         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
10265
10266 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10267
10268         * support/regression/HTMLgen.py: added compare_s2f()
10269         * support/regression/Makefile: redo 1.27
10270         * support/regression/generate-cases.py: redo 1.5
10271
10272 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
10273
10274         * support/regression/tests/float.c: workaround 33 bit hex constant
10275         * support/regression/tests/simplefloat.c: fix division for host
10276
10277 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
10278
10279         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
10280         that tame's the PIC's over-aggressive optimizer.
10281
10282 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10283
10284          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
10285          support for MSVC.
10286
10287 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
10288
10289         Initial support for DS80C400. "Hello world" runs on TINIm400
10290         (with polled I/O).
10291
10292 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
10293
10294          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10295          * Some notes on ddd usage added in debugger/README
10296          Martin Helmling adding more features and fixes for ddd GUI debugger.
10297          Code added for nexti, stepi, up, down, and other adjustments.
10298
10299 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
10300
10301         * src/pic/pCodepeep.c non-wildcard asmops are now handled
10302         * src/pic/peeph.def Added two rules to optimize carry manipulation
10303         * src/pic/* removed debug printfs
10304
10305 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
10306
10307         * debugger/mcs51/cmd.c: added header newalloc.h
10308
10309 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
10310
10311         * as/Makefile: new EXEEXT
10312         * as/z80/Makefile: remove trailing slash of BUILDIR
10313         * as/z80/clean.mk: new EXEEXT
10314         * Makefile.common.in: add to CFLAGS (and others), don't replace it
10315         * support/cpp2/Makefile.in: new EXEEXT
10316         * src/pic/glue.c (pic14emitRegularMap): fixed warning
10317
10318 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
10319
10320         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
10321         EXEEXT was introduced to fix all related problems with targets
10322         "clean", "install" and "uninstall"; a couple of further flaws
10323         especially with "clean" have been fixed too
10324         * as/mcs51/Makefile.in
10325         * as/mcs51/clean.mk
10326         * as/z80/Makefile
10327         * Makefile
10328         * clean.mk
10329         * debugger/mcs51/Makefile.in
10330         * debugger/mcs51/clean.mk
10331         * link/z80/Makefile
10332         * link/z80/Makefile.in
10333         * link/z80/clean.mk
10334         * link/Makefile
10335         * packihx/Makefile.in
10336         * packihx/clean.mk
10337         * sim/ucsim/Makefile
10338         * sim/ucsim/clean.mk
10339         * sim/ucsim/avr.src/Makefile.in
10340         * sim/ucsim/avr.src/clean.mk
10341         * sim/ucsim/s51.src/Makefile.in
10342         * sim/ucsim/s51.src/clean.mk
10343         * sim/ucsim/xa.src/Makefile.in
10344         * sim/ucsim/xa.src/clean.mk
10345         * sim/ucsim/z80.src/Makefile.in
10346         * sim/ucsim/z80.src/clean.mk
10347         * sim/ucsim/main_in.mk
10348         * sim/ucsim/packages_in.mk
10349         * sim/ucsim/gui.src/Makefile.in
10350         * sim/ucsim/gui.src/serio.src/Makefile.in
10351         * sim/ucsim/gui.src/serio.src/clean.mk
10352         * src/Makefile.in
10353         * src/clean.mk
10354         * support/cpp2/Makefile.in
10355         * support/cpp2/clean.mk
10356         * support/makebin/Makefile
10357         * support/makebin/clean.mk
10358         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
10359         * doc/sdccman.lyx: --program-suffix no longer needed
10360
10361 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
10362
10363          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
10364          Martin Helmling added support for ddd GUI debugger.
10365          Code added to display assembly, set variables, and other commands
10366          to interface to ddd.
10367
10368 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
10369
10370         * as/Makefile: fix target clean
10371         * as/clean.mk: fix target clean
10372         * as/z80/clean.mk: fix target clean
10373
10374 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
10375
10376         * Makefile.common.in: added  AT EXEEXT AT
10377         * configure.in: removed all mingw32 stuff
10378         * configure: rebuilt from configure.in
10379         * doc/sdccman.lyx: updated section "installation"
10380         * support/scripts/sdcc_mingw32: adapted to configure
10381         * support/scripts/sdcc_cygwin_mingw32: added
10382
10383 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
10384
10385         * src/pic Added object file support for the PIC port
10386         * src/pic Applied patch from Craig Franklin (this started the object file support)
10387         * src/regression Updated the PIC regression tests for object files
10388
10389 2003-04-20  Borut Razem <borut.razem AT siol.net>
10390
10391         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
10392           lklex.c: In function `getfid':
10393           lklex.c:203: warning: array subscript has type `char'
10394         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
10395           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
10396         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
10397           stack handling macros
10398
10399 2003-04-19  Borut Razem <borut.razem AT siol.net>
10400
10401         * "handling space characters in file path" task:
10402         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
10403         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
10404         * support/Util/MySystem.h: make it self-sufficient
10405         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
10406           src/z80/main.c, sdcc/as/mcs51/lklex.c:
10407           handling space characters in file path
10408         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
10409           (it will be used by assemblers, which have their own includes, e.g. gpasm)
10410         * support/Util/MySystem.c: handling space characters in executable's path
10411
10412 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
10413
10414         * as/z80/Makefile: fix permanent rebuild of z80
10415         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
10416         * support/regression/tests/bitfields.c: added Johan's bitfields.c
10417
10418 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
10419
10420         * src/SDCCopt.c: add special case optimization to replace modulo by
10421           a power of two with a bitwise AND.
10422
10423 2003-04-18    <johan AT balder>
10424
10425         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
10426
10427 2003-04-17    <johan AT balder>
10428
10429         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
10430         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
10431
10432 2003-04-13  Borut Razem <borut.razem AT siol.net>
10433
10434         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
10435         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
10436           fixed mingw problem in adl_NORMALIZE_PATH
10437
10438 2003-04-12  Borut Razem <borut.razem AT siol.net>
10439
10440         * fixed "#pragma SAVE/RESTORE can not be nested":
10441         * src/SDCC.lex: reworked pragma handling functions
10442         * sdcc/src/SDCCglobl.h: reworked stack handling macros
10443         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
10444
10445 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10446
10447         * src/SDCCutil.c (pathEquivalent): defined but not used
10448         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
10449         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
10450         * configure: rebuilt from configure.in
10451         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10452         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10453         * device/include/Makefile.in: replace sdcc_datadir
10454         * device/lib/Makefile.in: replace sdcc_datadir
10455         * Makefile.common.in: add LDFLAGS from configure
10456         * packihx/Makefile.in: use LDFLAGS
10457         * src/Makefile.in: use LDFLAGS
10458         * support/cpp2/Makefile.in: add LDFLAGS from configure
10459         * support/makebin/Makefile: use LDFLAGS
10460         * .version: bumped version number to 2.3.5
10461
10462 2003-04-12  Borut Razem <borut.razem AT siol.net>
10463
10464         * completed "different paths" task:
10465         * src/SDCCmacro.c: fixed bug in handling quotes
10466         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
10467         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
10468
10469 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10470
10471         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
10472
10473 2003-04-11 kevin Vigor <kevin AT vigor.nu>
10474
10475         * ds390/gen.c ds390/peeph.def: fix bug 706781
10476
10477 2003-04-11  Borut Razem <borut.razem AT siol.net>
10478
10479         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
10480
10481 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
10482
10483         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
10484         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
10485          set - this bit used to not be set...).
10486         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
10487           bad code in PIC Port
10488         * src/regression/and2.c added to test bug 609268
10489         * src/regression/Makefile added and2.c to regression test
10490
10491
10492 2003-04-08    <johan AT CP255758-A>
10493
10494         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
10495         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
10496         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
10497
10498 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
10499
10500         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
10501         fix bug #487815
10502         * support/cpp2/Makefile.in: fix bug #487815
10503         * configure: rebuilt from configure.in
10504         * Makefile.common.in: docdir changed, new path suffixes
10505         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10506         * sdcc_vc_in.h: reflect changes from sdccconf.h
10507         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
10508         * src/SDCCutil.h: remove BINDIR hack
10509         * doc/sdccman.lyx: update new path hierarchy
10510
10511 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10512
10513         * src/SDCCpeeph.c: added okToRemoveSLOC test
10514
10515 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10516
10517         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
10518
10519 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10520
10521         * src/SDCCpeeph.c: added labelIsReturnOnly test
10522         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
10523
10524 2003-04-05    <johan AT balder>
10525
10526         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
10527         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
10528         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
10529         * src/SDCCast.c: fixed a warning
10530         * src/SDCCast.h: fixed a warning
10531         * src/SDCCicode.c (operandFromAst): fixed a warning
10532
10533 2003-04-04    <johan AT balder>
10534
10535         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
10536         * src/SDCCast.c (decorateType): fixed bug #715076
10537         * src/SDCC.y: fixed bug #702907
10538
10539 2003-04-03    <johan AT balder>
10540
10541         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
10542         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
10543         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
10544         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
10545         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
10546
10547 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
10548
10549         * _decdptr.c: fix return values
10550         * _gptrget.c: fix return values
10551         * _gptrgetc.c: fix return values
10552         * _gptrput.c: fix return values
10553         * _mulint.c: fix return values
10554         * as/z80/Makefile: fix 'make -j' problem
10555
10556 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
10557
10558         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
10559         * configure.in: big cleanup, updated to autoconf 2.5x
10560         * configure: rebuilt from configure.in
10561         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10562         * sdcc_vc_in.h: reflect changes from sdccconf.h
10563         * doc/Makefile: fixed a flaw in "make install"
10564
10565 2003-04-02    <johan AT balder>
10566
10567         * src/ds390/gen.c (genCmp): no comments
10568         * src/mcs51/gen.c (genCmp): no comments
10569         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
10570         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
10571
10572 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
10573
10574         * support/regression/generate-cases.py: place generated file in given sub directory
10575         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
10576         * support/regression/Makefile: improvements for 'make -j';
10577         side effect: it's simpler and faster now
10578
10579 2003-03-31  Borut Razem <borut.razem AT siol.net>
10580
10581         * src/z80/main.c: link-{port} and as-{port} defined without path
10582         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
10583
10584 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
10585
10586         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
10587
10588 2003-03-30  Borut Razem <borut.razem AT siol.net>
10589
10590         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
10591           changed type of list parameter to set
10592         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
10593         * src/port.h: changed type of do_assemble() parameter to set
10594         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
10595           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
10596           definition of "cppoutfilename" macro with NULL value in preProcess()
10597         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
10598         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
10599         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
10600           replaced with set *binPathSet
10601         * shash_add() deallocates the item, if allready exsists, before adding the new one
10602         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
10603
10604 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
10605
10606         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
10607           a nested for loop bug in the PIC port
10608         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
10609           for loops
10610
10611 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
10612
10613         * support/Util/dbuf.h: remove C++ stuff to make it portable
10614
10615 2003-03-28  Borut Razem <borut.razem AT siol.net>
10616
10617         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
10618           literal strings in stringLiteral()
10619         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
10620         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
10621           to the project
10622
10623 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
10624
10625         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
10626
10627 2003-03-26    <johan AT balder>
10628
10629         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
10630         * src/ds390/gen.c (saveRegisters): catched symbol abuse
10631         * src/SDCCast.c (decorateType): fixed " -v < 3"
10632
10633 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
10634
10635         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
10636         Added Lenny Story's debug infrastructure changes:
10637         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
10638         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
10639         * src/cdbFile.c: added
10640         * src/SDCCdebug.c: added
10641         * src/SDCCdebug.h: added
10642         * src/SDCCast.c (createFunction)
10643         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
10644         * src/SDCCmain.c (parseCmdLine, main)
10645         * src/SDCCmem.c (redoStackOffsets)
10646         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
10647         * src/SDCCsymt.h
10648         * src/common.h
10649         * src/avr/gen.c (genAVRCode)
10650         * src/ds390/gen.c (gen390Code)
10651         * src/mcs51/gen.c (gen51Code)
10652         * src/pic/gen.c (genpic14Code)
10653         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
10654         * src/xa51/gen.c (genXA51Code)
10655         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
10656
10657 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10658
10659         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
10660         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
10661
10662 2003-03-22    <johan AT balder>
10663
10664         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
10665
10666 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
10667
10668         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
10669         * doc/cdbfileformat.lyx: added, written by Lenny Story
10670         * doc/Makefile: added cdbfileformat.lyx
10671         * doc/clean.mk: added cdbfileformat.lyx
10672
10673 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
10674
10675         * src/mcs51/peeph.def: fix bug #705773
10676
10677 2003-03-20    <johan AT balder>
10678
10679         An sfr/sbit can have an "at #" AND an initializer
10680         * src/SDCCsymt.c (checkSClass):
10681         * src/SDCCmem.c (allocGlobal):
10682         * src/SDCCmem.c (allocLocal):
10683         * src/SDCCast.c (createBlock):
10684
10685 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10686
10687         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10688
10689 2003-03-16    <johan AT balder>
10690
10691         Undid the hackup of const and volatile, the problem is much bigger
10692         * src/SDCC.y:1.65
10693         * src/SDCCast.c:1.171
10694         * src/SDCCglue.c:1.138
10695         * src/SDCCicode.c:1.146
10696         * src/SDCCsymt.c:1.150
10697         * src/SDCCval.c:1.65
10698
10699 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10700
10701         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10702         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10703
10704 2003-03-13    <johan AT balder>
10705
10706         Hackup const and volatile modifiers in type chains a bit:
10707         * src/SDCC.y:1.63
10708         * src/SDCCast.c:1.169
10709         * src/SDCCglue.c:1.136
10710         * src/SDCCicode.c:1.143
10711         * src/SDCCsymt.c1.146
10712         * src/SDCCsymt.h1.59
10713         * src/SDCCval.c:1.63
10714
10715 2003-03-12    <johan AT balder>
10716
10717         * src/SDCCBBlock.h: more LRH debugging junk
10718         * src/SDCCcflow.h: more LRH debugging junk
10719         * src/SDCCloop.c: more LRH debugging junk
10720         * src/SDCC.y (struct_declaration): fixed bug #697590
10721         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10722         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10723         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10724
10725 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10726         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10727         test function names must now match exactly).
10728         * src/SDCCcse.c: added special case in findCheaperOp to allow
10729         extending a short integer. Makes less awful code for bug 700121 test case.
10730
10731 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10732
10733         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10734         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10735
10736 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10737
10738         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10739         actually called (operandsNotEqual() was called for all
10740         operandsNotEqualX tests).
10741
10742 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10743
10744         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10745         with shorter literals. Fixes bug 700121.
10746
10747 2003-03-11    <johan AT balder>
10748
10749         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10750
10751 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10752
10753         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10754         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10755
10756 2003-03-10  Borut Razem <borut.razem AT siol.net>
10757
10758         * src/SDCCmain.c: pipe preprocessor's output
10759         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10760         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10761         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10762         which closes all pipes in pipeSet set
10763         * src/SDCCset.c: free deleted item in function deleteSetItem()
10764         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10765         moved from z80 to src subproject
10766         * .version: increased version number to 2.3.4
10767
10768 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10769
10770         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10771         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10772         * support/regression/ports/xa51/spec.mk: fix typo
10773
10774 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10775
10776         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10777
10778 2003-03-09  Borut Razem <borut.razem AT siol.net>
10779
10780         * src/SDCCmain.c: pipe preprocessor's output
10781         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10782         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10783         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10784         which closes all pipes in pipeSet set
10785         * src/SDCCset.c: free deleted item in function deleteSetItem()
10786         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10787         moved from z80 to src subproject
10788
10789 2003-03-09  Borut Razem <borut.razem AT siol.net>
10790
10791         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10792         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10793         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10794         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10795         * src/SDCCglobl.h: unification of WIN32 native definitions
10796
10797 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10798
10799         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10800
10801 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10802
10803         * src/configure.in:   check for endianess (even while cross-compiling)
10804         * src/configure:      check for endianess (even while cross-compiling)
10805         * src/configure_in.h: check for endianess (even while cross-compiling)
10806         * src/avr/gen.c:        remove old endianess stuff
10807         * src/mcs51/gen.c:      remove old endianess stuff
10808         * src/ds390/gen.c:      remove old endianess stuff
10809         * src/pic/gen.c:        remove old endianess stuff
10810         * src/pic/genarith.c:   remove old endianess stuff
10811         * src/pic/glue.c:       fix endianess check
10812         * src/pic16/gen.c:      remove old endianess stuff
10813         * src/pic16/genarith.c: remove old endianess stuff
10814         * src/pic16/glue.c:     fix endianess check
10815         * src/xa51/gen.c:       remove old endianess stuff
10816         * src/z80/gen.c:        fix endianess check
10817         * src/SDCCglue.c:       fix endianess check
10818         * src/ds390/peeph.def: fix bug 700036
10819
10820 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10821
10822         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10823         * src/configure: find appropriate data-types on host for SDCC's int and long
10824         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10825         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10826         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10827
10828 2003-03-07    <johan AT balder>
10829
10830         Just a big NOOP:
10831                 some minor cleanups before the big shot
10832                 OP_DEFS and OP_USES now use Kevin's protection
10833                 new option --nolabelopt
10834
10835         * src/SDCCBBlock.c:
10836         * src/SDCCast.c,:
10837         * src/SDCCcflow.c:
10838         * src/SDCCcse.c:
10839         * src/SDCCicode.c:
10840         * src/SDCCicode.h:
10841         * src/SDCClabel.c:
10842         * src/SDCCloop.c:
10843         * src/SDCCmain.c:
10844         * src/ds390/ralloc.c:
10845         * src/mcs51/ralloc.c:
10846         * src/pic/ralloc.c:
10847         * src/xa51/ralloc.c:
10848         * src/z80/ralloc.c:
10849
10850 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10851
10852         * src/pic/pcode.c (get_op): fix 64 bit warnings
10853         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10854         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10855         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10856         * support/regression/tests/malloc.c: fix 64 bit warnings
10857
10858 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10859
10860         * src/mcs51/gen.c (genMinus): fixed bug 696436
10861
10862 2003-03-02  Borut Razem <borut.razem AT siol.net>
10863
10864         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10865
10866 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10867
10868         * configure.in: test for mkstemp
10869         * sdccconf_in.h: add HAVE_MKSTEMP
10870
10871 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10872
10873         * device/include/ctype.h: removed warning while using --stack-auto
10874         * device/include/malloc.h: removed warning while using --stack-auto
10875         * device/include/string.h: removed warning while using --stack-auto
10876
10877 2003-02-23  Borut Razem <borut.razem AT siol.net>
10878
10879         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10880         because NDEBUG is defined (see man assert)
10881         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10882
10883 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10884
10885         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10886         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10887
10888 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10889
10890         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10891         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10892
10893 2003-02-18    <johan AT balder>
10894
10895         * as/mcs51/asmain.c (asmbl): module can start with a digit
10896         * as/z80/asmain.c (asmbl): module can start with a digit
10897
10898 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10899
10900         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10901         * src/asm.c: fix pipe() for Mingw32
10902
10903 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10904
10905         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10906         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10907         make -V work again; --c1mode reads now from stdin
10908         * doc/sdccman.lyx: added --c1mode
10909         * support/Util/SDCCerr.c: new messages for c1 mode
10910         * support/Util/SDCCerr.h: new messages for c1 mode
10911         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10912
10913 2003-02-15    <johan AT balder>
10914
10915         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10916
10917 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10918
10919         * doc/sdccman.lyx: Environment variables, -o and other minor things
10920
10921 2003-02-14    <johan AT balder>
10922
10923         * src/xa51/main.c: before anyone really tries to use it :)
10924
10925         * Install doc's in share/sdcc/doc
10926         * removed some obsolete files
10927         * Do a proper make distclean and uninstall
10928         M Makefile.common.in
10929         R sdccbuild.sh
10930         M as/Makefile
10931         M device/include/Makefile.in
10932         M device/lib/Makefile.in
10933         M doc/sdccman.lyx
10934         M link/Makefile
10935         M sim/ucsim/doc/Makefile.in
10936         M src/clean.mk
10937         R src/avr/peeph.rul
10938         R src/xa51/peeph.rul
10939         M support/cpp2/Makefile.in
10940         M support/makebin/Makefile
10941
10942
10943 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10944
10945         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10946
10947 2003-02-10  Borut Razem <borut.razem AT siol.net>
10948
10949         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10950         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10951         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10952         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10953         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10954         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10955         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10956         src/z80/Makefile.bcc: Borland Makefile cleanup
10957         * as/z80/Makefile.bcc: Added Borland Makefile
10958         * support/cpp2/borland.h: Removed
10959
10960 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10961
10962         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10963         * src/SDCC.lex: new pragma NOIV
10964         * src/SDCCglobl.h: new pragma NOIV
10965         * src/SDCCmem.c: new pragma NOIV
10966
10967 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10968
10969         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10970
10971 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10972
10973         * src/SDCCmain.c: signal handling is switched off by --debug
10974         * doc/Makefile: small fix for install; use clean.mk again
10975         * doc/clean.mk: clean *.pdf and *.html too
10976
10977 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10978
10979         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10980         * device/lib/printfl.c: fix a ds390 bug by making it portable
10981         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10982         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10983         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10984         * debugger/mcs51/cmd.c: converted multi-line string literals
10985         * sim/ucsim/globals.cc: converted multi-line string literals
10986         * src/SDCCmain.c: introduced signal handler to remove temp files
10987         * doc/Makefile: small tweaks, implement clean
10988         * doc: removed generated files
10989
10990 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10991
10992         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10993         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10994         Address Record is not correctly generated for DS390."
10995
10996 2003-02-02  Borut Razem <borut.razem AT siol.net>
10997
10998         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10999         * as/mcs51/asm.h: fixed compilation with Borland C
11000         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
11001         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
11002         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
11003         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
11004         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
11005         src/z80/Makefile.bcc: delete $(LIB) only if exist
11006         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
11007
11008 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
11009
11010         * device/include/malloc.h: introduced NULL
11011         * device/include/string.h: introduced NULL
11012         * device/include/stdlib.h: introduced NULL
11013         * device/lib/_memcpy.c: removed NULL
11014         * device/lib/_strcat.c: removed NULL
11015         * device/lib/_strchr.c: removed NULL
11016         * device/lib/_strcmp.c: removed NULL
11017         * device/lib/_strcpy.c: removed NULL
11018         * device/lib/_strcspn.c: removed NULL
11019         * device/lib/_strlen.c: removed NULL
11020         * device/lib/_strncat.c: removed NULL
11021         * device/lib/_strncmp.c: removed NULL
11022         * device/lib/_strncpy.c: removed NULL
11023         * device/lib/_strpbrk.c: removed NULL
11024         * device/lib/_strrchr.c: removed NULL
11025         * device/lib/_strspn.c: removed NULL
11026         * device/lib/_strstr.c: removed NULL
11027         * device/lib/_strtok.c: removed NULL
11028         * device/lib/malloc.c: removed NULL, include own header
11029
11030 2003-02-02    <johan AT balder>
11031
11032         * 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
11033         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
11034         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
11035         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
11036         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
11037         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
11038
11039 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11040
11041         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
11042         area 'DATA'"
11043
11044 2003-02-01    <johan AT balder>
11045
11046         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
11047
11048 2003-01-31    <johan AT CP255758-A>
11049
11050         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
11051
11052 2003-01-30    <johan AT balder>
11053
11054         * src/SDCCBBlock.c: automatic bug detection
11055         * src/SDCCicode.c: automatic bug detection
11056
11057 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11058
11059         * src/SDCCglobl.h:   now --xram-size 0 works
11060         * src/SDCCmain.c:    now --xram-size 0 works
11061
11062 2003-01-29    <johan AT balder>
11063
11064         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
11065
11066 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11067
11068         * as/mcs51/aslink.h: Added options --xram-size and --code-size
11069         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
11070         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
11071         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
11072         * src/SDCCglobl.h:   Added options --xram-size and --code-size
11073         * src/SDCCmain.c:    Added options --xram-size and --code-size
11074
11075 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
11076
11077         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
11078         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
11079
11080 2003-01-27    <johan AT balder>
11081
11082         * src/SDCC.y: fixed bug #613764
11083
11084 2003-01-26    <johan AT balder>
11085
11086         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
11087         * src/SDCCsymt.h: fixed bug #673374
11088         * src/SDCCglue.c: fixed bug #661910
11089         * src/SDCCast.c: fixed bug #458099 and 673374
11090
11091 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
11092
11093         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
11094         * as/mcs51/strcmpi.h: added
11095         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
11096         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
11097         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
11098         * as/mcs51/assym.c: strcmpi -> as_strcmpi
11099         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
11100         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
11101         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
11102         * as/mcs51/Makefile.aslink: new module strcmpi
11103         * as/mcs51/Makefile.asx8051: new module strcmpi
11104         * as/mcs51/Makefil.bcc: new module strcmpi
11105         * as/mcs51/Makefile.in: new module strcmpi
11106         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
11107
11108 2003-01-26    <johan AT balder>
11109
11110         * src/SDCCglue.c: reverted back to 1.124
11111         * src/SDCCast.c: reverted back to 1.156
11112         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
11113
11114 2003-01-25    <johan AT balder>
11115
11116         * src/SDCCglue.c: A better fix for bug #661910
11117         * src/SDCCast.c: A better fix for bug #661910
11118         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
11119
11120 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11121
11122         * src/Makefile.in: remove spawn.o
11123         * src/SDCCmain.c: remove spawn.h
11124         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
11125         * src/spawn.c: removed
11126         * src/spawn.h: removed
11127         * support/regression/ports/ds390/spec.mk: link with -r
11128
11129 2003-01-24    <johan AT CP255758-A>
11130
11131         * src/ds390/gen.c (aopOp): fixed bug #667458
11132         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
11133         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
11134         (createIvalCharPtr): an ival doesn't always have a storage class anymore
11135
11136 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11137
11138         * src/mcs51/peeph.def: better assembler identation by Frieder
11139         * src/mcs51/gen.c: better assembler identation by Frieder
11140
11141 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
11142
11143         * as/z80/string.h: removed for gcc 3.2
11144         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
11145         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
11146
11147 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11148
11149         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
11150         * src/SDCCpeeph.c (replaceRule): fix bug #663503
11151         * support/regression/Makefile: separate temp files for ports
11152         * support/regression/generate-cases.py: separate temp files for ports
11153         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11154         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11155
11156 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11157
11158         * moved tinitalk to device/examples/ds390
11159
11160 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
11161
11162         * as/mcs51/lkmem.c: rflag is for DS390
11163         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
11164         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
11165                          (linkEdit): move mem- and map-files the same way as ihx-files
11166         * src/z80/main.c (_setDefaultOptions): removed --generic
11167         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
11168         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
11169         * src/pic/glue.c (picglue): --c1mode works again
11170         * src/pic16/glue.c (pic16glue): --c1mode works again
11171         * src/asm.c (printCLine): fix #660034
11172
11173 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
11174
11175         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
11176         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
11177         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
11178         * as/mcs51/lkmem (summary): better fix for sp problem
11179         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
11180         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
11181         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
11182                                               remove --stack-after-data
11183
11184 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
11185
11186         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
11187         * src/SDCCutil.c (join): ugly bug: missing '\0'
11188         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
11189
11190 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11191
11192         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
11193         * src/port.h: typo
11194         * src/pic/main.c (_asmCmd): gpasm supports -o
11195         * src/z80/main.c: more general macros
11196         * device/lib/Makefile.in: remove intermediate files
11197
11198 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11199
11200         * .version: Bumped version number to 2.3.3
11201         * src/SDCCBBlock.c: new option -o
11202         * src/SDCCglobl.h: new option -o
11203         * src/SDCCglue.c: new option -o
11204         * src/SDCCmain.c: new option -o
11205         * src/asm.c: new option -o
11206         * src/ds390/main.c: new option -o
11207         * src/pic/glue.c: new option -o
11208         * src/pic/pcode.c: new option -o
11209         * src/pic/ralloc.c: new option -o
11210         * src/pic16/glue.c: new option -o
11211         * src/pic16/pcode.c: new option -o
11212         * src/pic16/ralloc.c: new option -o
11213         * src/z80/main.c: new option -o
11214         * device/lib/Makefile.in: use -o
11215         * support/regression/ports/ds390/spec.mk: use -o
11216         * support/regression/ports/gbz80/spec.mk: use -o
11217         * support/regression/ports/mcs51/spec.mk: use -o
11218         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
11219         * support/regression/ports/z80/spec.mk: use -o
11220         * support/regression/ports/ucz80/spec.mk: use -o
11221         * support/regression/ports/xa51/spec.mk: use -o
11222         * support/regression/fwk/lib/timeout.c: fix usage string
11223
11224 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
11225         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
11226
11227 2003-01-07    <johan AT balder>
11228
11229         * src/SDCCast.c (decorateType): fixed bug #600035
11230
11231 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
11232         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
11233         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
11234         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
11235         * src/pic/pcode.c: outcommented unused variable to remove warnings
11236         * src/pic/ralloc.c: outcommented unused variable to remove warnings
11237
11238 2003-01-06    <karl AT turbobit.com>
11239         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
11240    regression tests.
11241
11242 2003-01-06    <johan AT balder>
11243
11244         * src/SDCCicode.c: fixed array add
11245
11246 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
11247         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
11248         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
11249
11250 2003-01-04    <johan AT balder>
11251
11252         * src/SDCCval.c (getNelements): fixed the initialized array of structures
11253
11254 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11255         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
11256
11257 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11258         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
11259         * support/regression/tests/bug-524697.c: fit mem usage into 8032
11260
11261 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11262         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
11263
11264 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
11265         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
11266
11267 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
11268         * src/mcs51/main.c: removed {bindir}{sep} from aslink
11269
11270 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11271
11272     * in /sdcc/as/mcs51/ changed these files in order to create an
11273     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
11274     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
11275     following files to include the previous two files: aslink.dsp,
11276     Makefile.aslink, Makefile.bcc, and Makefile.in.
11277
11278     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
11279     .adb instead of .cdb
11280
11281 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11282
11283         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
11284         value from option --iram-size.
11285
11286 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11287
11288         * /sdcc/as/mcs51/lklist.c: added boundary check before using
11289         dram[] array.
11290
11291 2002-09-18    <wiml AT hhhh.org>
11292
11293         * SDCClrange.h: exposed setFromRange() and setToRange()
11294         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
11295           packRegsForAccUse() (bug 542397)
11296         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
11297           multiple times and emitting the fetch operations more than once
11298           added aopGetUsesAcc() function to allow binary operators to
11299           fetch their operands in the correct order; made genMinus() emit
11300           compact code for X = LITERAL - Y
11301
11302 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11303         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
11304         sprintf() in line 1267.
11305
11306 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11307         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
11308         like ports.
11309
11310 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11311         Changes to aslink (All the changes are marked with 'JCF'):
11312
11313         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
11314         summary().
11315
11316         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
11317         area BSEG.  Also moves, if possible, the DATA area down into the internal
11318         ram so more space is available.
11319
11320         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
11321         sflag.
11322
11323         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
11324         not bytes.  Function summary() which creates a memory usage summary
11325         file with extension .mem.  Reports of overlaping stack and small stack
11326         size.  If the space for the stack is less than 16 bytes aslink trows a
11327         warning.
11328
11329         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
11330         the 8051.  Option 'y' for memory summary output file.
11331
11332         Changes to sdcc (All the changes are marked with 'JCF'):
11333
11334         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
11335
11336         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
11337         overlaying area for it (uses RegBankUsed[4]).
11338
11339         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
11340         bank zero as used by default.  By default aslink locates the stack
11341         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
11342         the creation of the .mem file.  Delegates the allocation of data area
11343         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
11344         the begining of the stack area to aslink.
11345
11346         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
11347         glue() in SDCCglue.c creates an area for it.
11348
11349 2002-09-03  Borut Razem <borut.razem AT siol.net>
11350         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
11351         sdcc/src/pic/glue.c:
11352         introduced atexit() handler for teporay files removal in case of
11353         errors, assertions, ...
11354
11355 2002-08-29  Borut Razem <borut.razem AT siol.net>
11356         * sdcc/support/cpp2/auto-host_vc_in.h:
11357         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
11358         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
11359         Maybe there is a similar problem with BORLANDC? It should be checked!
11360
11361         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
11362         corrected improper use of assert: the assignment to clr variable was done inside the assert.
11363         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
11364         was not executed, and the compiler (cl) launched a warning:
11365         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
11366
11367 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
11368         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
11369
11370 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
11371         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
11372
11373         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11374           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
11375           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
11376           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11377           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
11378           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
11379           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
11380         - added Release configuration in VS projects
11381         - review of compiler an linker options
11382         - VC .exe files are generated in bin_vc directory, not to interfere
11383           with binaries generated from other projects (cygwin, mingw, bcc ...)
11384
11385         * sdcc/src/yacc.dsp: added
11386
11387         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
11388         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
11389         and insert the version number definitions from .version
11390
11391         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
11392
11393         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
11394         added - genarate auto-host.h using auto-host_vc_in.h as template
11395
11396         * sdcc/sdcc_vc.h,
11397         removed from CVS, generated automatically
11398
11399 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
11400         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
11401
11402 2002-08-11  Borut Razem <borut.razem AT siol.net>
11403         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
11404
11405 2002-08-10  Borut Razem <borut.razem AT siol.net>
11406         * src/SDCCmain.c (main):
11407         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
11408         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
11409         The consequence was that some temporary files were not removed.
11410
11411         * src/SDCCglue.c:
11412         unification of code in functions tempfilename() and tempfile():
11413         function tempnam() is defined in Visual Studio 6.0 and .NET
11414
11415         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
11416
11417         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11418           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
11419         - removed compiler command line option /WX: Treats all warnings as errors
11420         - update a list of source files, included into the project
11421
11422         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11423           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
11424         changed project type to Generic Project so that can be correcly converted to VS.NET project
11425
11426         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
11427
11428         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
11429
11430         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
11431
11432         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
11433         added return 0 statements after assert() to make compiler happy
11434
11435         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
11436         added newline in the def file to keep MSC compiler satisfied
11437
11438         * sdcc/src/z80/gen.c:
11439         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
11440           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
11441         - solved MSC error in function aopDump()
11442
11443         * sdcc_vc.h: define PREFIX as "\\sdcc"
11444
11445 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
11446         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
11447
11448 2002-06-22  Scott Dattalo <scott AT dattalo.com>
11449         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
11450         - Rewrote the register banking algorithm.
11451         - Added pCode live-range analysis to registers (for now, only non-used and
11452         singly-used registers optimized away)
11453
11454         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
11455
11456         * 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.
11457
11458 2002-05-10  Scott Dattalo <scott AT dattalo.com>
11459         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
11460
11461 2002-04-22  Michael Hope  <michaelh AT vroom>
11462
11463         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
11464
11465         * configure.in (DD_COPT): Added include support required for gbdk.
11466
11467         * .version: Bumped version number just to increase it.
11468
11469         * src/SDCCmain.c: Added -nostdinc to the default options.
11470
11471 2002-04-15  Michael Hope  <michaelh AT vroom>
11472
11473         * device/lib/z80/printf.c (sprintf): Added.
11474
11475         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
11476
11477         * src/z80/peeph.def: Added transpose redundent load rule.
11478
11479         * src/z80/main.c: Added force callee saves for jaune.
11480
11481         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
11482
11483         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
11484
11485 2002-03-28  Johan Knol  <johan AT balder>
11486
11487         * src/SDCCval.c: fixed bug #532436
11488
11489 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11490         * /src/port.h:
11491         Added "char *Processor" field to the port structure.
11492
11493         * /src/SDCCmain.c:
11494         Added -p option. Allows port dependent processor to be specified.
11495
11496         * all ports:
11497         Initialized the new field char *Processor field to NULL in all ports
11498
11499         * /src/pic/*:
11500         Compiler generated registers for interrupt context saving
11501         were not getting allocated.
11502
11503 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
11504
11505         * /src/SDCCast.c:
11506         Fixed left shift. Will promote the left side of a left shift
11507         if a) left shifting more than size of operand or b) when assigned
11508         to something size > size of left side
11509
11510 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11511         * src/pic/*
11512         tons of changes. Register allocation has been
11513         rewritten. Added customization for the various PICs. Flow
11514         analysis is restructured. ...
11515
11516         * src/pic/device.h:
11517         Added
11518
11519         * src/pic/device.c:
11520         Added. device.c is a PIC port hack to accomodate variations
11521         in PIC devices.
11522
11523 2002-03-13  Michael Hope  <michaelh AT vroom>
11524
11525         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
11526
11527 2002-03-04  johanknol  <johanknol AT manik>
11528
11529         * /src/SDCCval.c: fixed
11530
11531         const unsigned char arr[][2] = { { 0, 1 } };
11532         t18.c:1: error: Initializer element is not constant
11533
11534 2002-03-04  bela  <bela AT manik>
11535
11536         * /device/include/mcs51reg.h:
11537         ds89c420 register definition update
11538
11539 2002-03-03    <johan AT FRIJA>
11540
11541         * support/Util/SDCCerr.c: did something, but don't no why anymore
11542
11543         * support/regression/tests/bug-524691.c: made it a little less shy
11544
11545         * src/SDCCast.c (decorateType): fixed bug #524697
11546
11547         * src/SDCCast.c: made some lineno improvements
11548
11549         * src/SDCCval.c (getNelements): changed warning to error
11550
11551         * src/SDCCglue.c (printIvalArray): changed warning to error
11552
11553         * src/SDCCicode.c: fixed a warning for mingw
11554
11555         * src/SDCCast.c (decorateType): fixed the << promotion for ops
11556
11557         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
11558
11559 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
11560
11561         * src/ds390/peeph.def:
11562         Added some more peephole rules
11563
11564         * src/ds390/gen.c: Various fixes & enhancements
11565
11566         * src/SDCClrange.c, src/SDCClrange.h:
11567         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
11568
11569         * src/ds390/ralloc.c:
11570         various fixes & enhancements (ds390) specific
11571
11572         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
11573         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
11574         from rallocs.
11575
11576         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
11577
11578 2002-03-02    <johan AT FRIJA>
11579
11580         * src/SDCCast.c (decorateType): fixed bug #524708
11581
11582         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
11583
11584         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
11585
11586 2002-03-01  Michael Hope  <michaelh AT vroom>
11587
11588         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
11589
11590         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
11591
11592 2002-03-01    <johan AT FRIJA>
11593
11594         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
11595
11596         * src/SDCCast.c (decorateType): fixed bug #524209
11597
11598         * src/SDCCval.c (valNot): fixed bug #524195
11599
11600 2002-02-26    <johan AT balder>
11601
11602         * src/xa51/gen.c: fixed a warning
11603
11604         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
11605
11606         * src/SDCCast.c (decorateType): fixed bug #522534
11607
11608 2002-02-23    <johan AT balder>
11609
11610         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
11611
11612 2002-02-22    <johan AT balder>
11613
11614         * src/SDCCast.c: fixed bug #514865
11615
11616         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
11617
11618 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
11619
11620         * sdcc/src/SDCCloop.c:
11621         Previous fix was not good. basic blocks that have "break" or "return" are
11622         not really partof a loop , but live ranges used in these blocks should
11623         be live thru the entire loop, so set partOfLoop but don't add them to
11624         loop region
11625
11626 2002-02-21    <johan AT FRIJA>
11627
11628         * src/SDCCcse.c: fixed bug #514308
11629
11630 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
11631
11632         * src/SDCCloop.c:
11633         Fixed BUG #519583. If a conditional block ended in a return/break
11634         statement inside a loop, it was not being considered part of the loop.
11635
11636         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
11637
11638 2002-02-10  Karl Bongers <karl AT turbobit.com>
11639
11640         * debugger/*:
11641         Fixed up SDCDB debugger somewhat.  Updated debugger/README
11642         with lots of comments and notes.
11643
11644         * device/examples/test2.c:
11645         Fix bug, "red" variable not being initialized(compiler complained).
11646
11647         * device/examples/Makefile, examples/test3.c:
11648         Add Makefile in device/examples folder, compiles test3.c
11649         for use as a multiple module SDCDB test case.
11650
11651         * sim/ucsim/cmd.src/cmdset.cc:
11652         Took out debug printfs in ucsim "next" command.
11653
11654         * sim/ucsim/xa.src:
11655         Karl and Johan start ucsim XA support.  Most dissassembly working,
11656         about 75% emulation done(plenty of work remaining).
11657
11658         * sim/ucsim/z80.src:
11659         Add Z80 support to ucsim, add test-ucz80 regression test,
11660         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
11661         Notice z80 compiler fails on examples/test3.c/crc code.
11662
11663 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
11664
11665         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
11666         Added support for --parms-in-bank1
11667
11668         * src/ds390/peeph.def:
11669         added a few more peephole optimzations
11670
11671         * src/ds390/main.c:
11672         1) added __builtin_inp & __builtin_outp used to read in data of given length
11673            from a memory mapped port
11674         2) added __builtin_memcmp
11675         3) added __builtin_swapw swap bytes of a short
11676
11677         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11678         1) handle multiple send & receives from register bank1
11679         2) ralloc can now allocate DPTR1 to some liveRanges
11680
11681         * src/SDCCsymt.c, src/SDCCsymt.h:
11682         changes to handle multiple sends & receives
11683
11684         * src/SDCCptropt.h:
11685         added some pointer arithmetic optimization
11686
11687         * src/SDCCptropt.c:
11688         added some pointer arithmetic optimizations but not stable yet so not
11689         called from anywhere (will get this working shortly)
11690
11691         * src/SDCCopt.c: fixed for multiple sends & receives
11692
11693         * src/SDCCmain.c:
11694         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11695         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11696            set preprocessor defines (depending on options)
11697
11698         * src/SDCCicode.c, src/SDCCicode.h:
11699         changes made to handle multiple sends & receives
11700
11701         * src/SDCCglobl.h:
11702         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11703
11704         * src/SDCCcse.c, src/SDCCcse.h:
11705         added function findbackward def (to be used in upcoming optimization)
11706
11707         * src/SDCCcflow.c, src/SDCCcflow.h:
11708         added function returnAtEnd - to determine if a basic block terminates with
11709         a RETURN iCode
11710
11711         * src/SDCCast.c, src/SDCCast.h:
11712         added option parms-in-bank1
11713
11714         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11715         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11716         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11717         adjusted for --parms-in-bank1 option
11718
11719         * device/include/string.h:
11720         donot redefine "reentrant" keyword
11721
11722         * device/include/ds80c390.h: Added some more SFRs
11723
11724 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11725
11726         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11727
11728 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11729
11730         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11731
11732 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11733
11734         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11735
11736 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11737
11738         * Added --xram-movc option
11739
11740 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11741
11742         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11743
11744 2002-01-11  Johan Knol
11745
11746         * Added math lib of Jesus Calvino-Fraga
11747
11748 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11749
11750         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11751         * support/regression/Makefile: new target test-mcs51-stack-auto
11752         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11753
11754 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11755
11756         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11757
11758 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11759
11760         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11761
11762 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11763
11764         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11765
11766         * src/SDCCglue.h: add definition for printIvalChar()
11767
11768 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11769
11770         * src/SDCCast.c: fix #498138 by Johan
11771
11772         * src/SDCCglue.c: fix #498138 by Johan
11773
11774 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11775
11776         * support/regression/Makefile: fix clean
11777
11778         * support/regression/ports/ds390/support.c: fix transmission of last character
11779
11780 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11781
11782         * /sdcc/src/ds390/gen.c:
11783         a) improved computing address of stack variable
11784         b) took out some #if 0 code
11785         c) improved parmBytes adjustment
11786         d) improved genPlusIncr & genMinusIncr
11787         e) genCmp could generate bad code (when left assigned to DPTR)
11788         f) Fixed bug in hasInc
11789
11790         * /sdcc/src/ds390/ralloc.c:
11791         a) packRegsForSupport could mess up live information (Fixed)
11792         b) packRegsDPTRuse could be incorrect for left & right shift
11793
11794         * /sdcc/src/mcs51/ralloc.c:
11795         packRegsForSupport could mess up the live information (Fixed)
11796
11797         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11798
11799         * /sdcc/src/SDCCast.c:
11800         can reverse a loop even if function call is present as long
11801         as the loop control variable is local & is not passed as parameter
11802
11803 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11804
11805         * /sdcc/ChangeLog: *** empty log message ***
11806
11807         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11808         More builtin function additions for TININative
11809
11810         * /sdcc/src/ds390/ralloc.c:
11811         Had broken the regression testsuite
11812
11813         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11814
11815         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11816         Added funcattr hasStackParms will be set for reentrant functions when there
11817         are paramteres on the stack, this helps in minimizing frame pointer generation
11818         typeFromStr can handle function pointers now
11819
11820         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11821         *** empty log message ***
11822
11823 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11824
11825         * /src/ds390/gen.c, /src/ds390/main.c:
11826         More builtin function additions for TININative
11827
11828         * /src/ds390/ralloc.c:
11829         Had broken the regression testsuite
11830
11831         * /src/SDCCast.c: Fixed a bug in dumptree
11832
11833         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11834         Added funcattr hasStackParms will be set for reentrant functions when there
11835         are paramteres on the stack, this helps in minimizing frame pointer generation
11836         typeFromStr can handle function pointers now
11837
11838         * /doc/builtins.txt, /doc/TININative.txt:
11839         *** empty log message ***
11840
11841
11842 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11843
11844         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11845         ALPHA version for -mTININative
11846
11847         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11848         updated to reflect changes in the port structure
11849
11850         * /src/port.h:
11851         added function do_assemble (similar to do_link) if non-null this function
11852         will be called to do assembly (-mTININative) requires a multi command
11853         assembly
11854         added function genAssemblerEnd will be called to generate assembler Epilogue
11855
11856         * /src/SDCCsymt.c:
11857         added _JavaNative to debug info printing
11858
11859         * /src/SDCCmain.c: added option --tini-libid
11860         added port->do_assemble function (-mTININative) has a multi command assemble
11861
11862         * /src/SDCCglue.c: Disabled "constExpr" check
11863         added port->genAssemblerEnd function
11864
11865         * /src/SDCCglobl.h: Added option --tini-libid value
11866
11867         * /src/SDCCast.h:
11868         tookout optimizeCompare from the header (has no external references)
11869
11870         * /src/SDCCast.c: made one more function "static"
11871
11872 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11873
11874         * src/z80/mappings.i: Added z80asm support.
11875
11876         * src/z80/main.c: Added z80asm support on --asm=z80asm
11877
11878         * src/z80/gen.c: Fixed asm portability issues.
11879
11880         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11881
11882         * src/SDCCglue.c (printExterns): Added global/extern split.
11883
11884 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11885
11886         * support/regression/Makefile: added test for mcs51 model large
11887
11888         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11889
11890         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11891
11892 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11893
11894         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11895
11896 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11897
11898         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11899
11900         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11901
11902 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11903
11904         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11905
11906         * support/regression/tests/simplefloat.c: Port to mcs51.
11907
11908 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11909         * support/regression/tests/bug-485362.c: Added.
11910
11911         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11912
11913         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11914
11915         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11916
11917         * src/z80/gen.c (aopDump): Added a dump function.
11918
11919 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11920         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11921
11922         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11923
11924         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11925
11926         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11927
11928         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11929
11930         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11931
11932         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11933
11934         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11935
11936         * support/regression/ports/ds390/support.c: Use tinibios.
11937
11938         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11939
11940 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11941
11942         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11943         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11944
11945         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11946
11947         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11948
11949 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11950
11951         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11952
11953         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11954         (packRegsForIYUse): Created and optimised.
11955
11956 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11957
11958         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11959 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11960
11961         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11962
11963         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11964
11965         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11966
11967 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11968
11969         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11970
11971         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11972
11973 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11974
11975         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11976
11977         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11978
11979         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11980
11981 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11982
11983         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11984         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11985         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11986
11987         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11988
11989         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11990         (genNotFloat): Added.
11991         (genUminusFloat): Added.
11992
11993         * device/lib/z80/Makefile: Added floating pt stubs.
11994
11995         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11996
11997         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11998
11999         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
12000
12001 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
12002
12003         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
12004
12005         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
12006
12007         * sdcc/support/regression/Makefile: Add port ds390.
12008
12009         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
12010
12011         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
12012
12013         * sdcc/support/regression/ports/ds390/spec.mk: Added.
12014
12015         * sdcc/support/regression/ports/ds390/support.c: Added.
12016
12017         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
12018
12019         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
12020
12021         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
12022
12023 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12024
12025         * device/include/malloc.h: Added z80 and gbz80 support.
12026
12027         * device/lib/gbz80/heap.s: Added.
12028
12029         * device/lib/z80/heap.s: Added.
12030
12031         * device/lib/malloc.c: Added z80 and gbz80 support.
12032
12033         * support/regression/tests/malloc.c (testMalloc): Added.
12034
12035         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
12036
12037         * support/regression/tests/bug-478094.c: Added.
12038
12039         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
12040
12041 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
12042
12043         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
12044
12045         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
12046
12047         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
12048
12049         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
12050
12051         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
12052
12053 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12054
12055         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
12056
12057 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
12058
12059         * support/regression/tests/bug-477927.c: Added.
12060
12061         * src/z80/peeph.def: Added minor rules.
12062
12063         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
12064
12065         * src/z80/peeph.def: Added jump optimisation modification.
12066
12067 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
12068
12069         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
12070
12071 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
12072
12073         * support/regression/tests/funptrs.c: Added.
12074
12075 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
12076
12077         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
12078
12079 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
12080
12081         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
12082
12083         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
12084
12085         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
12086         (movLeft2ResultLong): Created.
12087
12088         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
12089         (joinPushes): Added.  Joins two char pushes into a word push.
12090
12091 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
12092
12093         * support/cpp2/Makefile.in (install): Added creation of dest dir.
12094
12095         * support/makebin/Makefile (install): Added creation of dest dir.
12096
12097 2001-10-24 Karl Bongers <karl AT turbobit.com>
12098
12099         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
12100
12101 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
12102
12103         * src/z80/ralloc.c: Turned off faulty pack for one use.
12104
12105         * src/z80/peeph-gbz80.def: Removed redundent restart options.
12106
12107         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
12108
12109 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
12110
12111         * support/regression/Makefile: Improved clean
12112
12113         * support/regression/ports/gbz80/spec.mk: Added clean
12114
12115         * support/regression/ports/host/spec.mk: Added clean
12116
12117         * support/regression/ports/z80/spec.mk: Added clean
12118
12119         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
12120
12121         * support/regression/ports/mcs51/timeout.c: little improvements
12122
12123 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
12124
12125         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
12126
12127         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
12128
12129         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
12130
12131 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
12132
12133         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
12134
12135         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
12136
12137 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
12138         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
12139
12140         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
12141
12142         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
12143
12144         * src/mcs51/main.c (_linkCmd): Added bin path to command.
12145
12146         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
12147
12148         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
12149
12150         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
12151
12152         * support/regression/tests/longor.c: Added.
12153
12154 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
12155
12156         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
12157
12158         * as/mcs51/aslink.h: define PATH_MAX
12159
12160         * as/mcs51/asm.h: define PATH_MAX
12161
12162         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
12163
12164         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
12165
12166         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
12167
12168         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
12169
12170         * src/SDCCglobl.h: define PATH_MAX
12171
12172         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
12173
12174         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
12175
12176 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
12177
12178         * src/z80/gen.c (gencjneshort): Fixed
12179
12180         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
12181
12182 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
12183
12184         * support/regression/tests/bug-469671.c: Added.
12185
12186         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
12187
12188 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
12189
12190         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
12191
12192         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
12193
12194 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
12195
12196         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
12197
12198         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
12199
12200         * src/device/lib/_mullong.c : removed hint: nooverlay bug
12201
12202         * src/device/lib/_divuint.c : removed hint: nooverlay bug
12203
12204         * src/device/lib/_divulong.c: removed hint: nooverlay bug
12205
12206         * src/device/lib/_moduint.c : removed hint: nooverlay bug
12207
12208         * src/device/lib/_modulong.c: removed hint: nooverlay bug
12209
12210 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
12211
12212         * 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.
12213
12214         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
12215
12216         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
12217
12218 2001-10-07    <johan AT FRIJA>
12219
12220         * device/lib/gets.c (gets): fixed the return value.
12221
12222 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
12223         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
12224
12225         * 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.
12226
12227         * 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.
12228
12229         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
12230
12231         * src/pic/gen.c: Removed Safe_strdup.
12232
12233         * configure.in: Added option to enable libgc support.
12234
12235         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
12236         (bitVectUnion): Optimised.
12237         (bitVectIntersect): Optimised.
12238         (bitVectBitsInCommon): Optimised.
12239         (bitVectCplAnd): Optimised.
12240
12241         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
12242
12243 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12244
12245         * src/SDCCmain.c: distinguish between assembler debug and plain options
12246
12247         * src/avr/main.c:   remove standard assembler options
12248
12249         * src/ds390/main.c: remove standard assembler options
12250
12251         * src/mcs51/main.c: remove standard assembler options
12252
12253         * src/port.h: removed "PENDING" comment
12254
12255 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12256
12257         * src/device/lib/_mulint.c  : new, with assember functions
12258
12259         * src/device/lib/_mullong.c : new, with assember functions
12260
12261         * src/device/lib/_divuint.c : with assember functions
12262
12263         * src/device/lib/_divsint.c : with assember functions
12264
12265         * src/device/lib/_divulong.c: with assember functions
12266
12267         * src/device/lib/_divslong.c: with assember functions
12268
12269         * src/device/lib/_moduint.c : with assember functions
12270
12271         * src/device/lib/_modsint.c : with assember functions
12272
12273         * src/device/lib/_modulong.c: with assember functions
12274
12275         * src/device/lib/_modslong.c: with assember functions
12276
12277         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
12278
12279         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
12280
12281         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
12282                                       replaced _mululong.c and _mulslong.c by _mullong.c
12283
12284 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12285
12286         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
12287
12288 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12289
12290         * src/SDCCglue.c: test, if win32api is available for MINGW
12291
12292 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12293
12294         * src/SDCCsymt.c: no more _modifier in printTypeChain()
12295         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
12296         * support/regression/ports/gbz80/spec.mk: removed GENERIC
12297         * support/regression/ports/host/spec.mk: removed GENERIC
12298         * support/regression/ports/mcs51/spec.mk: removed GENERIC
12299         * support/regression/ports/z80/spec.mk: removed GENERIC
12300
12301 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
12302
12303         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
12304
12305         * support/regression/tests/bug-467035.c: Created.
12306
12307 2001-10-01    <johan AT FRIJA>
12308
12309         * src/SDCC.y: fixed bug #466586 part 1
12310
12311 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
12312
12313         * SDCCicode.c: z80 has no generic pointers
12314         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
12315
12316 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
12317
12318         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
12319
12320 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
12321
12322         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
12323
12324         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
12325
12326 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
12327
12328         * configure.in: Fixed up so that ucsim is only configured once.
12329
12330         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
12331
12332         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
12333         (getPathDifference): As above.
12334
12335         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
12336
12337         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
12338
12339 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
12340         * .version: Updated to 2.3.1
12341
12342         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
12343         Added copyright header.
12344
12345         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
12346         (assemble): Added support for macro based assembler commands.
12347         (linkEdit): Added support for macro based linker commands.
12348         (preProcess): Changed the pre-processor to use macros.
12349         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
12350         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
12351
12352         * device/lib/z80/crt0.s: Added module name for debugging.
12353
12354 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
12355
12356         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12357
12358         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
12359
12360         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
12361
12362         * src/Makefile.in: Added SDCCmacro and SDCCutil
12363
12364 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
12365
12366         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12367
12368 2001-09-16    <johan AT FRIJA>
12369
12370         * 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.
12371
12372 2001-09-15    <johan AT FRIJA>
12373
12374         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
12375         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
12376
12377 2001-09-11    <johan AT FRIJA>
12378
12379         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
12380
12381 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
12382
12383         * support/regression/tests/bug-460444.c: Added test case.
12384
12385         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
12386         (genCast): Added justification for all of the asserts.
12387
12388 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
12389
12390         * support/regression/support.c: _xdata replaced by xdata
12391
12392         * support/regression/spec.mk: removed _generic
12393
12394 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
12395
12396         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
12397
12398         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
12399         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
12400
12401         * src/z80/peeph.def: Added a rule to optimise shift then compare.
12402
12403         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
12404
12405         * support/regression/tests/bug-460010.c: Added test case.
12406
12407         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
12408
12409 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
12410
12411         * support/regression/Makefile: inter-port-clean adjusted for mcs51
12412
12413         * support/regression/testfwk.c: removed workaround for bug #436344
12414
12415         * support/regression/tests/bp.c: use less memory with mcs51
12416
12417         * support/regression/tests/bug-441448.c: use less memory
12418
12419         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
12420
12421         * support/regression/collate-results.py: typo
12422
12423 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
12424
12425         * support/regression/tests/fetchoverlap.c: Added new test case.
12426
12427         * support/regression/tests/bp.c: Added new test case.
12428
12429         * support/regression/tests/bug-448984.c: Added new test case.
12430
12431         * support/regression/tests/pow2shifts.c: Added new test case.
12432
12433         * src/z80/gen.c: Turned off the noise it normally generates for the release.
12434         (genlshTwo): Fixed right shift for count > 8.
12435
12436         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
12437
12438 2001-09-08    <johan AT FRIJA>
12439
12440         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
12441
12442 2001-09-07    <johan AT FRIJA>
12443
12444         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
12445
12446         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
12447
12448 2001-09-06    <johan AT FRIJA>
12449
12450         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
12451         * bernhard noted me at this: "() equals to (void)" (1.38)
12452
12453 2001-09-05    <johan AT FRIJA>
12454
12455         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
12456
12457 2001-09-04    <johan AT FRIJA>
12458
12459         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
12460
12461
12462 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
12463
12464         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
12465
12466 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
12467
12468         * link/z80/aslink.h: Fixed path for PATH_MAX
12469
12470 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
12471
12472         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
12473
12474         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
12475
12476         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
12477
12478         * 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.
12479
12480 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
12481
12482         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
12483         (genCmp): Fixed up genCmp for the GB with longs.
12484
12485         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
12486
12487         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
12488
12489         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
12490
12491         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
12492
12493 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
12494
12495         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
12496
12497 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
12498
12499         * 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.
12500
12501         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
12502
12503 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
12504
12505         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
12506
12507         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
12508
12509 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
12510
12511   * sim/ucsim/configure:    little improvement of Cygwin-detection
12512   * sim/ucsim/configure.in: little improvement of Cygwin-detection
12513   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
12514   * support/regression/tests/bug-221100.c: small changes for mcs51
12515   * support/regression/tests/bug-221168.c: small changes for mcs51
12516   * support/regression/tests/bug-227710.c: small changes for mcs51
12517   * support/regression/tests/staticinit.c: small changes for mcs51
12518   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
12519   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12520   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12521
12522 $Revision$