28eb260168aaf7a9d53c4ef8f006a2dbfb1f27b7
[fw/sdcc] / ChangeLog
1 2006-10-05 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
2
3         * src/mcs51/gen.c: emitcode for "add a,0x%02x" requires only 8 bits.
4
5 2006-10-05 Borut Razem <borut.razem AT siol.net>
6
7         * partially fixed [ 1570701 ] peephole - not replacing code from multiline macros,
8           thanks to dfulab:
9           - sdcc.dsw: changed property eol-style to CRLF
10           - support/scripts/resource.rc: replaced references to "afxres.h" with "winres.h"
11
12 2006-10-04 Raphael Neider <rneider AT web.de>
13
14         * device/include/pic/{pic16f84.h,pic16f84a.h},
15         * device/lib/pic/libdev/{pic16f84.c,pic16f84a.c}: added PORT[AB]_bits
16           from patch #1522504, thanks to Robas Teodor
17
18 2006-10-02 Maarten Brock <sourceforge.brock AT dse.nl>
19
20         * as/link/z80/lkarea.c: essentially reverted lnksect() to #4380 which
21           fixes bug 1566015
22
23 2006-10-01 Maarten Brock <sourceforge.brock AT dse.nl>
24
25         * src/pic16/glue.c (pic16emitMaps),
26         * src/pic/glue.c (pic14emitMaps): hopefully fixed bug 1568779
27         * device/lib/gets.c: fixed bug 1568829,thanks Philipp Krause
28         * device/lib/pic16/libc/string/memcpypgm2ram.c,
29         * device/lib/pic16/libc/string/memcpyram2ram.c: fixed bug 1568836, thanks
30           Philipp Krause
31         * as/mcs51/asmain.c (asmbl, newdot): fixed problems with absolute areas
32         * as/link/mcs51/lkmem.c (summary2): reverted, do do count abs segments
33
34 2006-09-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
35
36         * support/librarian/sdcclib.c: Added option -l.
37         * as/link/mcs51/lkmem.c: don't use absolute segments to compute memory
38           usage totals.
39         * device/lib/make51lib.bat: added.  Allows building mcs51 libraries easily
40           using Windows command prompt.
41
42 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
43
44         * device/lib/libsdcc.lib: added module rand
45         * src/ds390/ralloc.c (rematStr),
46         * src/hc08/ralloc.c (rematStr),
47         * src/mcs51/ralloc.c (rematStr),
48         * src/z80/ralloc.c (rematStr): made output more consistent
49         * src/mcs51/gen.c: cosmetic changes
50
51 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
52
53         * src/port.h: added mem.cabs_name to PORT
54         * src/ds390/main.c,
55         * src/hc08/main.c,
56         * src/mcs51/main.c,
57         * src/pic16/main.c,
58         * src/pic/main.c,
59         * src/xa51/main.c,
60         * src/z80/main.c: added cabs_name initializers
61         * src/SDCCglue.c (emitStaticSeg): allocate and initialize absolute
62           constants
63           (emitMaps): emit absolutes in code memory into cabs_name
64         * src/SDCCmem.c,
65         * src/SDCCmem.h: added memory map c_abs and defined CABS_NAME
66         * src/ds390/gen.c (genCodePointerGet): fixed bug if left is a literal
67         * support/regression/fwk/include/testfwk.h: added define for at
68         * support/regression/tests/absolute.c: added, new
69
70 2006-09-29 Maarten Brock <sourceforge.brock AT dse.nl>
71
72         * src/mcs51/gen.c (genPlusIncr, genMinusDec, genAddrOf): small
73           optimizations, see also patch 887161 by Stas Sergeev
74         * src/mcs51/peeph.def(104, 207, 209, 212): disabled as they do not seem
75           to be necessary anymore,
76           (102, 103, 104, 127): renamed all occurances of bp to _bp
77
78 2006-09-27 Maarten Brock <sourceforge.brock AT dse.nl>
79
80         * device/include/mcs51/at89c51snd1c.h: fixed MSK_SREQ definition
81           thanks Weston T. Schmidt for patch 1555221
82         * src/mcs51/peeph.def: renamed rule 257 to 257.a, added 257.b
83         * src/SDCCicode.c(geniCodeMultiply): small optimization
84
85 2006-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
86
87         * device/include/stdlib.h: added rand prototypes
88         * device/lib/rand.c: new, added
89         * device/lib/Makefile.in: added rand.c
90         * src/z80/peeph.def,
91         * src/z80/peeph-gbz80.def,
92         * src/z80/peeph-z80.def: updated conditonals, fixed bug 1565908
93
94 2006-09-20 Raphael Neider <rneider AT web.de>
95
96         * device/lib/pic16/libio/i2c/i2cnack.c (i2c_nack): fixed ACKDT bit
97
98 2006-09-19 Maarten Brock <sourceforge.brock AT dse.nl>
99
100         * as/link/aslink.h: cosmetic changes
101         * as/link/mcs51/Makefile.in,
102         * as/link/z80/Makefile.in: fixed build on CF where VPATH is used
103
104 2006-09-17 Maarten Brock <sourceforge.brock AT dse.nl>
105
106         * as/link/aslink.h,
107         * as/link/mcs51/aslink.h,
108         * as/link/z80/aslink.h: merged and moved to as/link/
109         * as/link/lkstore.c,
110         * as/link/mcs51/lkstore.c: moved to as/link/
111         * as/link/clean.mk: remove *.o
112         * as/link/mcs51/alloc.h: deleted
113         * as/link/mcs51/lkarea.c: added lnksect prototype
114         * as/link/mcs51/lkdata.c,
115         * as/link/mcs51/lklex.c,
116         * as/link/mcs51/lkmain.c: renamed as_getline to lk_getline
117         * as/link/mcs51/lkmem.c,
118         * as/link/mcs51/lknoice.c: removed include strcmpi.h
119         * as/link/mcs51/lksym.c: include stdlib.h instead of malloc.h or alloc.h
120         * as/link/mcs51/aslink.dsp,
121         * as/link/mcs51/Makefile.aslink,
122         * as/link/mcs51/Makefile.bcc,
123         * as/link/mcs51/Makefile.in: updated for moved files
124         * as/link/z80/lkarea.c,
125         * as/link/z80/lkhead.c,
126         * as/link/z80/lklex.c,
127         * as/link/z80/lklibr.c,
128         * as/link/z80/lklist.c,
129         * as/link/z80/lkmain.c,
130         * as/link/z80/lkrloc.c,
131         * as/link/z80/lksym.c: synced with mcs51
132         * as/link/z80/lkdata.c,
133         * as/link/z80/lkeval.c,
134         * as/link/z80/lkihx.c,
135         * as/link/z80/lks19.c: cosmetic changes
136         * as/link/z80/Makefile.in,
137         * as/link/z80/linkgbz80.dsp,
138         * as/link/z80/linkz80.dsp: updated for moved files
139
140 2006-09-16 Borut Razem <borut.razem AT siol.net>
141
142         * debugger/mcs51/sdcdb.c: partially fixed
143           [ 1203664 ] sdcdb fails to open files w. two "." periods
144         * debugger/mcs51/simi.c, debugger/mcs51/symtab.c,
145           debugger/mcs51/symtab.h: fixed indenting
146         * configure.in, configure: up to date with latest Maarten's changes
147
148 2006-09-15 Maarten Brock <sourceforge.brock AT dse.nl>
149
150         as/link/mcs51
151         as/aslink.dsp,                  as/link/mcs51/aslink.dsp,
152         as/link/mcs51/aslink.h,         as/mcs51/aslink.h,
153         as/link/mcs51/aslink.mak,       as/mcs51/aslink.mak,
154         as/link/mcs51/lkaomf51.c,       as/mcs51/lkaomf51.c,
155         as/link/mcs51/lkarea.c,         as/mcs51/lkarea.c,
156         as/link/mcs51/lkdata.c,         as/mcs51/lkdata.c,
157         as/link/mcs51/lkeval.c,         as/mcs51/lkeval.c,
158         as/link/mcs51/lkhead.c,         as/mcs51/lkhead.c,
159         as/link/mcs51/lkihx.c,          as/mcs51/lkihx.c,
160         as/link/mcs51/lklex.c,          as/mcs51/lklex.c,
161         as/link/mcs51/lklibr.c,         as/mcs51/lklibr.c,
162         as/link/mcs51/lklist.c,         as/mcs51/lklist.c,
163         as/link/mcs51/lkmain.c,         as/mcs51/lkmain.c,
164         as/link/mcs51/lkmem.c,          as/mcs51/lkmem.c,
165         as/link/mcs51/lknoice.c,        as/mcs51/lknoice.c,
166         as/link/mcs51/lkrloc.c,         as/mcs51/lkrloc.c,
167         as/link/mcs51/lks19.c,          as/mcs51/lks19.c,
168         as/link/mcs51/lkstore.c,        as/mcs51/lkstore.c,
169         as/link/mcs51/lksym.c,          as/mcs51/lksym.c,
170         as/link/mcs51/Makefile.aslink,  as/mcs51/Makefile.aslink,
171         as/link/mcs51/alloc.h,
172         as/link/mcs51/clean.mk,
173         as/link/mcs51/conf.mk,
174         as/link/mcs51/Makefile.bcc,
175         as/link/mcs51/Makefile.in,
176         as/link/mcs51/readme.390,
177         as/link/mcs51/strcmpi.c,
178         as/link/mcs51/strcmpi.h,
179         as/mcs51/clean.mk,
180         as/mcs51/Makefile.bcc,
181         as/mcs51/Makefile.in,
182         configure,
183         Makefile.in,
184         sdcc.dsw: moved mcs51 linker to as/link/mcs51
185
186 2006-09-14 Maarten Brock <sourceforge.brock AT dse.nl>
187
188         * as/link,
189         * as/link/Makefile.in,
190         * as/link/z80/linkgbz80.dsp,
191         * as/link/z80/linkz80.dsp,
192         * configure,
193         * link,
194         * link/clean.mk,
195         * link/Makefile.in,
196         * link/README,
197         * link/z80,
198         * link/z80/aslink.h,
199         * link/z80/clean.mk,
200         * link/z80/conf.mk,
201         * link/z80/linkgbz80.dsp,
202         * link/z80/linkz80.dsp,
203         * link/z80/lkarea.c,
204         * link/z80/lkdata.c,
205         * link/z80/lkeval.c,
206         * link/z80/lkgb.c,
207         * link/z80/lkgg.c,
208         * link/z80/lkhead.c,
209         * link/z80/lkihx.c,
210         * link/z80/lklex.c,
211         * link/z80/lklibr.c,
212         * link/z80/lklist.c,
213         * link/z80/lkmain.c,
214         * link/z80/lkrloc.c,
215         * link/z80/lks19.c,
216         * link/z80/lksym.c,
217         * link/z80/Makefile.in,
218         * Makefile.in,
219         * sdcc.dsw: moved link/ to as/link/
220
221 2006-09-11 Maarten Brock <sourceforge.brock AT dse.nl>
222
223         * as/mcs51/i51mch.c (machine): fixed warning
224
225 2006-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
226
227         * as/mcs51/i51mch.c (machine): S_DJNZ fixed bug 1554318
228
229 2006-09-09 Borut Razem <borut.razem AT siol.net>
230
231         * debugger/mcs51/sdcdb.c, debugger/mcs51/simi.c:
232           sdcdb WIN32 native port
233         * src/clean.mk: fixed
234
235 2006-09-08 Borut Razem <borut.razem AT siol.net>
236
237         * doc/sdccman.lyx: SDCDB and ucSim are available on Win32 platforms.
238
239 2006-09-08 Raphael Neider <rneider AT web.de>
240
241         * src/pic16/main.c (_pic16_linkEdit,pic16_linkCmd),
242         * src/pic/main.c(_pic14_do_link, linkCmd): pass "-w" and "-r"
243             to gplink to disable processor mismatch warning and to allow
244             the use of devices with only aliased (shared) memory banks,
245           (_pic16_genAssemblerPreamble): include pXXX.inc on --mplab-comp
246
247 2006-09-07 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
248
249         * doc/sdccman.lyx: Some re-formating plus example on using
250           #pragma preproc_asm +/-
251
252 2006-09-07 Borut Razem <borut.razem AT siol.net>
253
254         * support/scripts/sdcc.nsi: added SDCDB executables in a separate
255           section
256
257 2006-09-06 Borut Razem <borut.razem AT siol.net>
258
259         * support/scripts/sdcc.nsi: fixed Error: unterminated string parsing
260           line at sdcc.nsi:153
261         * sdcc/debugger/mcs51/simi.c: argsToCmdLine() fixes
262
263 2006-09-05 Borut Razem <borut.razem AT siol.net>
264
265         * configure.in, configure: support for winsock2
266         * debugger/mcs51/break.h, debugger/mcs51/cmd.c,
267           debugger/mcs51/cmd.h, debugger/mcs51/sdcdb.c,
268           debugger/mcs51/sdcdb.h, debugger/mcs51/simi.c,
269           debugger/mcs51/simi.h, debugger/mcs51/symtab.c,
270           debugger/mcs51/symtab.h: sdcdb WIN32 native port
271
272 2006-09-05 Maarten Brock <sourceforge.brock AT dse.nl>
273
274         * src/SDCCopt.c (cnvToFcall): fixed bug 1551947 by updating OP_USES
275           and OP_DEFS
276         * support/regression/tests/bug1551947.c: new, added
277         * src/SDCCsymt.h: strings are char* not byte*
278
279 2006-09-05 Raphael Neider <rneider AT web.de>
280
281         * device/lib/pic16/libdev/pic18f4550.c,
282           device/include/pic16/pic18f4550.h: added PORTD/TRISD
283             declarations/definitions from patch #1520949
284
285 2006-09-05 Raphael Neider <rneider AT web.de>
286
287         * src/pic16/gen.c (genPackBits): fix assignment to 8-bit,
288           byte-aligned bitfields, fixes #1539278
289
290 2006-09-05 Raphael Neider <rneider AT web.de>
291
292         * src/pic/gen.c (genReceive): skip unreferenced arguments,
293           fixes #1544120
294
295 2006-09-04 Borut Razem <borut.razem AT siol.net>
296
297         * support/scripts/sdcc.nsi: move ucSim executables to a separate section
298         * support/scripts/sdcc_cygwin_mingw32: don't disable ucsim,
299           -mno-cygwin is a part of the compiler name
300         * support/scripts/sdcc_mingw32: don't disable ucsim
301
302 2006-09-03 Borut Razem <borut.razem AT siol.net>
303
304         * sdcc.spec: corrected for 2.6.0. Thanks to Christer Weinigel.
305         * device/lib/Makefile.in device/lib/clean.mk: small but essential corrections
306
307 2006-09-03 Raphael Neider <rneider AT web.de>
308
309         * src/pic/ralloc.c,
310         * src/pic/pcode.c (InitReuseRegs): allocate registers with pseudo
311           indices >= 0x1000 to disambiguate them from fixed regs __at(addr),
312           fixes #1550049
313
314 2006-09-01 Borut Razem <borut.razem AT siol.net>
315
316         * sim/ucsim/cmd.src/cmdutil.cc: #include <sys/time.h> and <unistd.h>
317           to make ppc-osx happy
318
319 2006-08-31 Borut Razem <borut.razem AT siol.net>
320
321         * sim/ucsim/cmd.src/newcmdposix.cc: #include <assert.h>
322         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
323         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
324         * support/regression/ports/ds390/spec.mk,
325           support/regression/ports/mcs51/spec.mk,
326           support/regression/ports/xa51/spec.mk: introduced DEV_NULL variable.
327           To run regression tests in mingw environment:
328           make DEV_NULL=NUL CC=gcc
329
330 2006-08-30 Borut Razem <borut.razem AT siol.net>
331
332         * sim/ucsim/cmd.src/newcmdposix.cc, sim/ucsim/cmd.src/newcmdposixcl.h,
333           sim/ucsim/cmd.src/newcmdwin32.cc, sim/ucsim/cmd.src/newcmdwin32cl.h,
334           sim/ucsim/app.cc, sim/ucsim/appcl.h, sim/ucsim/configure,
335           sim/ucsim/configure.in, sim/ucsim/ddconfig_in.h, sim/ucsim/error.cc,
336           sim/ucsim/errorcl.h, sim/ucsim/option.cc, sim/ucsim/optioncl.h,
337           sim/ucsim/utils.cc, sim/ucsim/utils.h, sim/ucsim/cmd.src/Makefile.in,
338           sim/ucsim/avr.src/avr.cc, sim/ucsim/avr.src/avrcl.h,
339           sim/ucsim/cmd.src/bp.cc, sim/ucsim/cmd.src/bpcl.h,
340           sim/ucsim/cmd.src/cmdconf.cc, sim/ucsim/cmd.src/cmdgui.cc,
341           sim/ucsim/cmd.src/cmdmem.cc, sim/ucsim/cmd.src/cmdset.cc,
342           sim/ucsim/cmd.src/cmdsetcl.h, sim/ucsim/cmd.src/cmdstat.cc,
343           sim/ucsim/cmd.src/cmduc.cc, sim/ucsim/cmd.src/cmduccl.h,
344           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
345           sim/ucsim/cmd.src/command.cc, sim/ucsim/cmd.src/commandcl.h,
346           sim/ucsim/cmd.src/get.cc, sim/ucsim/cmd.src/getcl.h,
347           sim/ucsim/cmd.src/info.cc, sim/ucsim/cmd.src/newcmd.cc,
348           sim/ucsim/cmd.src/newcmdcl.h, sim/ucsim/cmd.src/set.cc,
349           sim/ucsim/cmd.src/show.cc, sim/ucsim/cmd.src/timer.cc,
350           sim/ucsim/hc08.src/hc08.cc, sim/ucsim/hc08.src/hc08cl.h,
351           sim/ucsim/s51.src/Makefile.in, sim/ucsim/s51.src/interrupt.cc,
352           sim/ucsim/s51.src/interruptcl.h, sim/ucsim/s51.src/pca.cc,
353           sim/ucsim/s51.src/pcacl.h, sim/ucsim/s51.src/port.cc,
354           sim/ucsim/s51.src/portcl.h, sim/ucsim/s51.src/serial.cc,
355           sim/ucsim/s51.src/serialcl.h, sim/ucsim/s51.src/timer0.cc,
356           sim/ucsim/s51.src/timer0cl.h, sim/ucsim/s51.src/timer1.cc,
357           sim/ucsim/s51.src/timer1cl.h, sim/ucsim/s51.src/timer2.cc,
358           sim/ucsim/s51.src/timer2cl.h, sim/ucsim/s51.src/uc390.cc,
359           sim/ucsim/s51.src/uc390cl.h, sim/ucsim/s51.src/uc390hw.cc,
360           sim/ucsim/s51.src/uc390hwcl.h, sim/ucsim/s51.src/uc51.cc,
361           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/wdt.cc,
362           sim/ucsim/s51.src/wdtcl.h, sim/ucsim/sim.src/hw.cc,
363           sim/ucsim/sim.src/hwcl.h, sim/ucsim/sim.src/mem.cc,
364           sim/ucsim/sim.src/memcl.h, sim/ucsim/sim.src/obsolete.cc,
365           sim/ucsim/sim.src/obsolete.h, sim/ucsim/sim.src/sim.cc,
366           sim/ucsim/sim.src/simcl.h, sim/ucsim/sim.src/stack.cc,
367           sim/ucsim/sim.src/stackcl.h, sim/ucsim/sim.src/test_mem_speed.cc,
368           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
369           sim/ucsim/xa.src/xa.cc, sim/ucsim/xa.src/xacl.h,
370           sim/ucsim/z80.src/z80.cc, sim/ucsim/z80.src/z80cl.h:
371           ucsim WIN32 native port
372
373 2006-08-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
374
375         * doc/sdccman.lyx: added note on dynamic memory heap initialization
376
377 2006-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
378
379         * src/mcs51/gen.c (genAnd, genOr, genXor): fixed bug 1546986
380         * src/ds390/gen.c (aopGetUsesAcc): handle AOP_DPTR2 and AOP_DPTRn too
381
382 2006-08-26 Maarten Brock <sourceforge.brock AT dse.nl>
383
384         * src/ds390/gen.c (genAnd, genOr, genXor): fixed bug 1546986
385         * support/regression/tests/bug1546986.c: new, added
386         * as/mcs51/.cvsignore,
387         * debugger/mcs51/.cvsignore,
388         * src/.cvsignore: deleted
389
390 2006-08-25 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
391
392         * device/include/mcs51/P89c51RD2.h: fixed bug 1546936 (error in sbit
393           definitions)
394
395 2006-08-20 Borut Razem <borut.razem AT siol.net>
396
397         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h:
398           removed cl_listen_console::match(), cl_console::match(),
399           restructured cl_commander::proc_input()
400
401 2006-08-16 Borut Razem <borut.razem AT siol.net>
402
403         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h,
404           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
405           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/uc.cc: code cleaning
406
407 2006-08-14 Borut Razem <borut.razem AT siol.net>
408
409         * support/regression/Makefile.in,
410           support/regression/ports/pic14/gpsim.cmd,
411           support/regression/ports/pic14/spec.mk,
412           support/regression/ports/pic14/support.c:
413           added pic14 regression test
414
415 2006-08-14 Maarten Brock <sourceforge.brock AT dse.nl>
416
417         * as/doc/asxhtm.html: documented changed ABS behaviour
418         * as/doc/README: fixed some typos
419
420 2006-08-13 Maarten Brock <sourceforge.brock AT dse.nl>
421
422         * support/regression/tests/float_trans.c: disabled test if __STDC_IEC_559__
423           not defined on host
424
425 2006-08-12 Borut Razem <borut.razem AT siol.net>
426
427         * support/regression/fwk/include/testfwk.h,
428           support/regression/fwk/lib/testfwk.c,
429           support/regression/generate-cases.py,
430           support/regression/Makefile.in:
431           regression test framework does not depend on function pointers and
432           variable arguments
433
434 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
435
436         * device/include/stddef.h: c temporary hack to fix bug 1518273
437
438 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
439
440         * device/include/mcs51/cc2510fx.h: added
441         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
442           to projects.
443
444 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
445
446         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
447         * as/z80/Makefile.in: added strcmpi.c
448         * as/z80/z80adr.c: added upper case registers and lower case conditionals
449         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
450
451 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
452
453         * device/lib/gbz80/asm_strings.s,
454         * device/lib/gbz80/crt0_rle.s,
455         * device/lib/gbz80/div.s,
456         * device/lib/gbz80/mul.s,
457         * device/lib/gbz80/shift.s,
458         * device/lib/z80/asm_strings.s,
459         * device/lib/z80/crt0_rle.s,
460         * device/lib/z80/div.s,
461         * device/lib/z80/mul.s,
462         * device/lib/z80/shift.s: changed to all lower case menmonics except the
463           flags which are all upper case
464
465 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
466
467         * as/z80/asm.h: made CASE_SENSITIVE 1
468         * link/z80/aslink.h: made CASE_SENSITIVE 1
469         * src/z80/gen.c (throughout): made all conditionals upper case
470         * support/regression/tests/bug1503067.c: new
471
472 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
473
474         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
475           (shiftIntoPair): added case 2 for PAIR_IY,
476           (setupToPreserveCarry): replaced parameters with iCode and check if
477            PAIR_DE is in use to fix bug 1399290,
478           (genPlus, genMinus): updated call to setupToPreserveCarry
479         * support/regression/tests/bug1399290.c: new
480
481 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
482
483         * device/lib/Makefile.in (Z80SOURCES): enabled float support
484         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
485         * src/ds390/gen.c (shiftRLong),
486         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
487         * src/mcs51/gen.c (sameReg): changed to sameByte,
488           (xch_a_aopGet): new,
489           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
490            shiftRLong): fixed bug 1533966
491         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
492           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
493         * support/regression/Makefile.in: disabled z80, enabled ucz80
494         * support/regression/tests/float_trans.c: enabled test for z80 and host
495         * support/regression/tests/shifts2.c: new, for testing bug 1533966
496
497 2006-08-01 Borut Razem <borut.razem AT siol.net>
498
499         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
500           comparison is always false due to limited range of data type
501           on PPC64 machine (openpower-linux1) where "char = unsigned char"
502
503 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
504
505         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
506         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
507         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
508         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
509
510 2006-07-31 Borut Razem <borut.razem AT siol.net>
511
512         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
513           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
514           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
515           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
516           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
517           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
518           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
519           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
520           enable ucsim mingw compilation. Serial port is disabled,
521           since it uses termios.h API, which is not available on native
522           WIN32
523
524 2006-07-31 Borut Razem <borut.razem AT siol.net>
525
526         * Small Device C Compiler 2.6.0 released
527         * support/scripts/sdcc.nsi: added FULL_DOC option
528         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
529
530 2006-07-28 Borut Razem <borut.razem AT siol.net>
531
532         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
533         * doc/INSTALL.txt: updated
534
535 2006-07-27 Borut Razem <borut.razem AT siol.net>
536
537         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
538           device/lib/pic/libdev/Makefile.in: fixed bug
539           [ 1438354 ] pic libsdcc: distclean doesn't work
540         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
541           device/lib/pic16/libio/Makefile.in: fixed bug
542           [ 1438344 ] pic16 lib: clean doesn't work properly
543         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
544
545 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
546
547         * device/lib/pic/libsdcc/fsdiv.c,
548         * device/lib/pic/libsdcc/fsmul.c,
549         * device/lib/pic16/libsdcc/float/fsdiv.c,
550         * device/lib/pic16/libsdcc/float/fsmul.c,
551         * device/lib/_fsdiv.c,
552         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
553         * support/regression/tests/bug1520966.c: added
554         * doc/knownbugs.html: removed [ 1520966 ] from the list
555
556 2006-07-25 Borut Razem <borut.razem AT siol.net>
557
558         * configure.in, configure, sdccconf_in.h: fixed bug
559           [ 1519095 ] regression test onebyte.c fails on ppc64 host
560         * doc/knownbugs.html: removed [ 1519095 ] from the list
561
562 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
563
564         * doc/knownbugs.html: added, contains list of known bugs at release
565         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
566
567 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
568
569         * device/include/mcs51/compiler.h: added SFRX for xdata based special
570           function registers and corrected defaults with additional warning
571         * device/lib/malloc.c: cosmetic changes
572         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
573         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
574           (fillGaps): and used it
575
576 2006-07-20 Raphael Neider <rneider AT web.de>
577
578         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
579           output unless SDCCPICDEBUG is set
580         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
581           output if SILENT is set
582
583 2006-07-11 Borut Razem <borut.razem AT siol.net>
584
585         * doc/README.txt: updated
586
587 2006-07-10 Borut Razem <borut.razem AT siol.net>
588
589         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
590           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
591           in WIN32 installation
592         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
593           release candidate 1
594
595 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
596
597         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
598         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
599
600 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
601
602         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
603
604 2006-07-06 Borut Razem <borut.razem AT siol.net>
605
606         * support/regression/tests/bitfields.c:
607           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
608         * support/regression/tests/constantRange.c:
609           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
610
611 2006-07-04 Borut Razem <borut.razem AT siol.net>
612
613         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
614           src/port.mk,
615           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
616           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
617           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
618           reverted changes from 2006-07-03
619         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
620         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
621           added CPPFLAGS, used by the host port
622
623 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
624
625         * support/regression/valdiag/tests/switch.c,
626         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
627         * support/regression/tests/libmullong.c: fixed for host
628         * support/regression/ports/host/spec.mk: disable all warnings for host,
629         SDCC runs with --less-pedantic too
630
631 2006-07-03 Borut Razem <borut.razem AT siol.net>
632
633         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
634           defined CPPFLAGS
635         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
636         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
637           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
638           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
639           include ../port.mk
640         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
641           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
642           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
643           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
644
645 2006-07-02 Raphael Neider <rneider AT web.de>
646
647         * src/pic16/devices.inc,
648         * device/include/pic16/pic18fregs.h,
649         * device/include/pic16/pic18f4550.h,
650         * device/lib/pic16/pics.all,
651         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
652
653 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
654
655         * as/hc08/lkaomf51.c (OutputName),
656         * as/mcs51/lkaomf51.c (OutputName),
657         * as/z80/asmain.c (asmbl),
658         * src/ds390/main.c (asmLineNodeFromLineNode),
659         * src/hc08/ralloc.c (hc08_assignRegisters),
660         * src/mcs51/main.c (asmLineNodeFromLineNode),
661         * src/xa51/ralloc.c (checkRegMask),
662         * src/xa51/gen.c (emitcode),
663         * src/z80/gen.c (_emit2),
664         * src/SDCCast.c (searchLitOp),
665         * src/SDCCglobl.h,
666         * support/packihx/packihx.c,
667         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
668         * src/ds390/gen.c (aopPutUsesAcc),
669         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
670         * support/regression/tests/libmullong.c (mullong_wrapper),
671         * src/SDCCsymt.c (powof2),
672         * src/SDCCast.c,
673         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
674         * src/SDCCsymt.h: added TYPE_TARGET_*
675         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
676         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
677         SDCCast because 1) header problems 2) this is the right place
678         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
679         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
680         prototype
681
682 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
683
684         * src/SDCCicode.h: removed buggy semicolon in unused macro
685         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
686         search for previous definiton of auto symbols too,
687         (findPrevUse): fixed logic of emitWarnings
688
689 2006-06-26 Raphael Neider <rneider AT web.de>
690
691         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
692           PCLATH and PCLATU on interrupts, potentially fixes #1505141
693
694 2006-06-25 Raphael Neider <rneider AT web.de>
695
696         * device/lib/pic/libm: NEW, added math library functions
697         * device/lib/pic/libsdcc: NEW; added float support functions
698         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
699         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
700           NEW, added math related headers
701         * device/include/asm/pic/features.h: NEW
702         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
703           (popGet): allow larger offsets for AOP_PCODE,
704           (genDataPointerSet): handle literals explicitly, more debug output,
705           (genAssign): fixed for float using aopLiteral ;-)
706         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
707           GOTO initialisation routine
708         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
709           flag on registers, fixes #1469043 (local variables do not work)
710         * src/pic/main.c (_pic14_do_link),
711         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
712           available
713
714 2006-06-25 Borut Razem <borut.razem AT siol.net>
715
716         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
717           characters printed (not including the trailing '\0' used to end
718           output to strings). Problem detected in regression test bug-927659.c.
719           NOTE: printf() family functions should return int instead
720           unsigned int!
721         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
722           specifier are printed as themselves
723         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
724           support flags, width and precision specifiers
725
726 2006-06-24 Borut Razem <borut.razem AT siol.net>
727
728         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
729           to the list of sdcc tagrets not supporting bit type
730         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
731           testfor pic16 due to bug:
732           [ 1511794 ] pic16: regression test bug-895992.c fails
733
734 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
735
736         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
737         * src/SDCCglue.c (initPointer), fixed bug 1496419
738         * support/regression/tests/bug1496419.c: new, added
739
740 2006-06-22 Borut Razem <borut.razem AT siol.net>
741
742         * support/regression/ports/pic16/support.c: use gpsim usart module from
743           libgpsim_modules library
744
745 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
746
747         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
748         IP0H to IPH0.
749
750 2006-06-19 Raphael Neider <rneider AT web.de>
751
752         * src/pic/glue.h,src/pic16/glue.h: added prototypes
753         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
754           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
755           (pic14printExterns,pic14printPublics,pic16printPublics,
756           pic16_printExterns): use new functions to emit symbols
757           (picglue,pic16glue): emit publics before emitting externs
758         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
759           locally defined functions to avoid bug #1443651
760         * support/regression/tests/bug-716242.c: removed pic16 workaround
761         * support/regression/ports/pic16/spec.mk: ignore errors during build
762
763 2006-06-19 Raphael Neider <rneider AT web.de>
764
765         * src/pic/glue.h: added pic14aopLiteral prototype
766         * src/pic/glue.c (pic14aopLiteral): return unsigned int
767         * src/pic/gen.c: removed stdint.h dependency
768           (aopGet): use Safe_strdup()
769           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
770           (genDataPointerSet): use pic14aopLiteral()
771         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
772           for pic16; thanks to Bernhard and Maarten
773
774 2006-06-18 Borut Razem <borut.razem AT siol.net>
775
776         * support/regression/tests/structflexarray.c: flexible array members
777           not supported by gcc < 3
778         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
779           GUI tool by default
780         * src/pic/gen.c: don't include [p]strdin.h on solaris
781         * support/Util/pstdint.h: addad svn attributes
782         * support/regression/tests/constantRange.c,
783           support/regression/tests/rotate.c: include inttypes.h instead
784           stdint.h on solaris, addad svn attributes
785
786 2006-06-18 Raphael Neider <rneider AT web.de>
787
788         * src/SDCCsymt.c (initCSupport): change return type of divschar to
789           int for PIC16
790         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
791           (pic16_genMinusBits): simplified sign-extension
792           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
793             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
794             adjusted to correctly handle mixed-signed operands, disabled
795             now unused multiplciation routines
796         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
797           (assignResultValue): added argument denoting the size of the result
798             as returned by the function (fixes upcasts in assigning from
799             function calls: char foo(); int i = foo();)
800           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
801             function result to assignResultValue
802           (genMult): disabled inlined multiplication code
803           (genDiv): augmented to also handle the modulus operator, fixed to
804             handle mixed-signed operands correctly
805           (genMod): simply call genDiv, disabled unused code
806           (genAssign): fixed missing (sign-)extension on result
807         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
808             valid char operands, allow signed operands for native code, added
809             division and modulo operator handling
810         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
811
812         As a consequence, onebyte.c (if split into two files) and muldiv.c
813         pass regression tests.
814
815 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
816
817         * doc/Makefile.in: two runs of makeindex seem needed to get
818         correct page references in the index of sdccman.pdf
819         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
820
821 2006-06-17 Borut Razem <borut.razem AT siol.net>
822
823         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
824
825 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
826
827         * doc/sdccman.lyx: updated, added (porting source code, debugging),
828         mentioned ec2drv and paulmon
829
830 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
831
832         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
833           consecutive abs areas
834           (find_empty_space, allocate_space): added map to handle codemap or
835            xdatamap,
836           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
837            absolute idata and xdata
838         * as/mcs51/lkmem.c (summary2): updated legend
839
840 2006-06-16 Raphael Neider <rneider AT web.de>
841
842         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
843
844 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
845
846         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
847           1208515
848         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
849
850 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
851
852         * src/port.h (struct PORT): added field gp_tags, to hold the tag
853         value of generic pointers,
854         * src/avr/main.c,
855           src/ds390/main.c,
856           src/hc08/main.c,
857           src/izt/i186.c,
858           src/izt/tlcs900h.c,
859           src/mcs51/main.c,
860           src/pic/main.c,
861           src/pic16/main.c,
862           src/xa51/main.c,
863           src/z80/main.c: PORT structure, added elements for gp_tags field,
864         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
865         fields in the PORT structure of each port,
866         * src/SDCCast.c (decorateType): allow processing of generic pointers
867         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
868         S_FIXED symbols
869
870 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
871
872         * link/z80/lkgb.c,
873         * link/z80/lkgg.c,
874         * src/pic16/gen.c,
875         * src/pic16/main.c,
876         * src/pic16/pcode.c,
877         * src/pic/main.c,
878         * src/pic/pcoderegs.c,
879         * src/SDCCicode.c,
880         * src/SDCCmain.c,
881         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
882           bug 1504689 on minGW
883
884 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
885
886         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
887
888 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
889
890         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
891
892 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
893
894         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
895           for optimization
896
897 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
898
899         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
900         to a char variable. Fixed bug #1504211
901         * device/include/pic16/adc.h,
902         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
903         and fixed bug #1364390
904
905 2006-06-10 Borut Razem <borut.razem AT siol.net>
906
907         * CVSROOT: removed the CVS left-over
908
909 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
910
911         * as/hc08/asmain.c (asexit),
912         * as/hc08/lkmain.c (lkexit),
913         * as/mcs51/asmain.c (asexit),
914         * as/mcs51/lkmain.c (lkexit),
915         * src/SDCCglue.c (DEFSETFUNC),
916         * src/SDCCmain.c (linkEdit, assemble),
917         * support/librarian/sdcclib.c (AddRel),
918           replaced unlink() by standard C remove()
919         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
920         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
921           gatherImplicitVariables): new, added to fix bug 608752,
922           (createFunction): added gatherImplicitVariables()
923         * src/SDCCast.h: added createRMW prototype
924         * src/SDCCsymt.h (struct symbol): added infertype
925         * support/regression/tests/bug608752.c: new, added
926
927 2006-06-10 Raphael Neider <rneider AT web.de>
928
929         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
930           multibyte dummy reads (fixes #1503234)
931
932 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
933
934         * device/include/mcs51/compiler.h: new, added header file to enable
935           creating common sfr definition header files for different compilers
936
937 2006-06-05 Raphael Neider <rneider AT web.de>
938
939         * src/pic16/{pcode.h,genarith.c}:
940           introduced pCodeOp combining any two pCodeOps (previously only
941           two register operands could be combined), removed pcop2 from
942           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
943         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
944         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
945           rewritten to use new PO_TWO_OPS
946         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
947         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
948           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
949           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
950           (pic16_get_op): embraced return arg to allow #define return(x),
951             added new case for combined opcodes
952           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
953           (pic16_pCode2str,pic16_getRegFrompCodeOp,
954            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
955
956 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
957
958         * src/SDCCval.c (checkConstantRange): added
959         * src/SDCCval.h: added checkConstantRange
960         * support/Util/SDCCerr.c,
961         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
962         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
963         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
964         * src/SDCCast.c (decorateType): added checkConstantRange,
965         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
966         can be emitted with the correct always true/false warning,
967         added optimization for double '!';
968         result of decorateType() must be assigned back to the tree, because
969         decorateType() can change the tree
970         * src/SDCCicode.c (geniCodeLogic),
971         (geniCodeAssign): replaced new checkConstantRange, added warnings,
972         (checkConstantRange): removed, it was only a fragment which never
973         emitted a warning
974         * src/SDCCsymt.c (computeType): fixed promotion for
975         "-1 < (unsigned bit) b"
976         * src/pic/ralloc.c (packRegsForAssign),
977         * src/pic16/ralloc.c (packRegsForAssign),
978         * src/hc08/ralloc.c (packRegsForAssign),
979         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
980         from mcs51
981         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
982         * support/regression/tests/constantRange.c: added
983         * support/valdiag/tests/constantRange.c: added
984         * support/valdiag/valdiag.py: added -DPORT_HOST=1
985
986 2006-06-02 Borut Razem <borut.razem AT siol.net>
987
988         * support/regression/ports/pic16/support.c: increase stack size
989           to 255 bytes
990         * support/regression/Makefile.in: sort tests by name so that the
991           resutlts can be compared on different machines / platforms
992
993 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
994
995         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
996         * src/ds390/gen.c (emitLabel): new, added,
997           (genDjnz): fixed stack overflow bug,
998           (throughout): cosmetic changes to sync with mcs51/gen.c,
999           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
1000         * src/mcs51/gen.c (genEndFunction): small optimization,
1001           (throughout): cosmetic changes to sync with ds390/gen.c
1002
1003 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
1004
1005         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
1006           (_print_format): fixed printing pointers
1007         * src/mcs51/gen.c (emitLabel, movb): new, added,
1008           (genAssign): small optimization,
1009           (genDjnz): fixed stack overflow bug,
1010           (throughout): replaced sprintf with SNPRINTF,
1011           replaced mcs51_regWithIdx with REG_WITH_INDEX,
1012           replaced emitcode("mov", "b,...") with MOVB(...),
1013           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
1014           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
1015         * src/mcs51/peeph.def: added rules 140 and 264
1016         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
1017           so they may get optimized into registers
1018
1019 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
1020
1021         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
1022           immediately when encountered,
1023           (printUsage): always use stderr even on windows
1024
1025 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
1026
1027         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
1028         (processParms): fixed bug #1247551
1029         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
1030         parseCmdLine, main): print '--version' to stdout,
1031         print 'help' to stdout if --help is given,
1032         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
1033         arguments are given; fixed --help
1034
1035 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
1036
1037         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
1038         * support/regression/tests/bug-1493710.c: added
1039
1040 2006-05-27 Borut Razem <borut.razem AT siol.net>
1041
1042         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
1043           static instead auto
1044         * support/regression/ports/pic16/support.c: increase stack size
1045           from default 64 bytes to 128 bytes
1046         * support/regression/tests/staticinit.c,
1047           support/regression/tests/float.c: regression tests fully enabled
1048           for pic16 port by putting the initialized data arrays into the code
1049           section
1050         * support/regression/ports/pic16/spec.mk: don't link default libraries.
1051           This was changed by mistake in the previous version.
1052
1053 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
1054
1055         * src/pic16/gen.c (genFunction, genEndFunction): some
1056         beautifications, fixed bug with falsely restoring FSR2 in large
1057         stack model, thanks to Beau E. Cox for reporting the bug
1058
1059 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1060
1061         * debugger/mcs51/break.c,
1062         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
1063           use %p to print pointers, made address variables unsigned
1064         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
1065         * debugger/mcs51/symtab.c (parseSymbol): must return something
1066         * src/mcs51/gen.c (aopForSym): small optimization,
1067            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
1068           (freeAsmop): added missing break,
1069           (aopPut): removed parameter bvolatile, determine it inside the function,
1070           (saveRegisters, unsaveRegisters): small optimization,
1071           (genIpush): removed pointless check,
1072           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
1073           replaced sprintf with SNPRINTF,
1074           replaced strcpy with strncpyz,
1075           updated aopPut calls,
1076           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
1077         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
1078
1079 2006-05-24 Borut Razem <borut.razem AT siol.net>
1080
1081         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
1082           modification of test for the pic16 port, put the array to the code
1083           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
1084
1085 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1086
1087         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
1088         * support/Util/pstdint.h: added
1089
1090 2006-05-22 Borut Razem <borut.razem AT siol.net>
1091
1092         * src/regression/Makefile: removed bool2.c test, added -q linker option
1093         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
1094           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
1095           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
1096           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
1097           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
1098           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
1099           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
1100           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
1101           define SUPPORT_BIT_TYPES 0, removed unused bit variables
1102
1103 2006-05-22 Raphael Neider <rneider AT web.de>
1104
1105         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
1106           bug #1492360 (problematic due to generic pointers, see code)
1107
1108 2006-05-22 Borut Razem <borut.razem AT siol.net>
1109
1110         * support/regression/ports/pic16/specs.mk: removed stack size linker
1111           directive
1112         * support/regression/tests/array.c,
1113           support/regression/tests/bitopcse.c,
1114           support/regression/tests/bug-908454.c,
1115           support/regression/tests/malloc.c: modified for pic16 regression test
1116         * support/regression/tests/bitfields.c:
1117           pic16 - excluded bitfileds of size > 8
1118         * support/regression/tests/bp.c: pic16 - reduced data size
1119         * support/regression/tests/bug-221100.c: pic16 - reduced data size
1120         * support/regression/tests/bug-460010.c:
1121           pic16 - used the absolute address the fits in memory
1122         * support/regression/tests/bug-716242.c:
1123           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
1124         * support/regression/tests/float.c:
1125           pic16 - excluded - data size too big
1126         * support/regression/tests/onebyte.c:
1127           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
1128         * support/regression/tests/shifts.c:
1129           pic16 - function names probably have to differ in first X characters
1130           (gpasm limitation?)
1131         * support/regression/tests/staticinit.c:
1132           pic16 - excluded some tests due error: no target memory available for
1133           section ".idata"
1134
1135 2006-05-22 Borut Razem <borut.razem AT siol.net>
1136
1137         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1138           second try. Thanks Stas Sergeev once more.
1139
1140 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1141
1142         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
1143           (genLeftShift, genRightShift): fixed bug 1491627
1144         * src/hc08/peeph.def (rules 7, 8.x): added
1145         * support/regression/tests/shifts.c (ShiftLeftByParam,
1146           ShiftRightByParam, testShiftByParam): added to test variable shifting
1147
1148 2006-05-20 Raphael Neider <rneider AT web.de>
1149
1150         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
1151         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
1152           (allocReg): add only new registers to dynAllocRegs,
1153           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
1154             #1489055, #1445850, and probably #1483693
1155
1156 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
1157
1158         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
1159         bug in for-loop that didn't emit the last of CONFIG and ID registers
1160
1161 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
1162
1163         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
1164           with offset
1165         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
1166           1489016, 1434401 and 1490124
1167         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
1168           1489016, 1434401 and 1490124
1169
1170 2006-05-17 Borut Razem <borut.razem AT siol.net>
1171
1172         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1173           thanks Stas Sergeev
1174
1175 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1176
1177         * device/include/mcs51/P89c51RD2.h,
1178         * device/include/mcs51/P89LPC901.h,
1179         * device/include/mcs51/P89LPC922.h,
1180         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
1181
1182 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1183
1184         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
1185         to fix missing stack pragma in compiled binary object file,
1186
1187 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
1188
1189         * support/packihx/configure.in,
1190         * support/packihx/configure: removed warning, autoconf >= 2.5x can
1191         determine sizeof basic types even while cross compiling
1192
1193 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
1194
1195         * src/avr/gen.c (aopop),
1196         * src/ds390/gen.c (aopOp),
1197         * src/hc08/gen.c (aopOp),
1198         * src/mcs51/gen.c (aopop),
1199         * src/pic16/gen.c (pic16_aopOp),
1200         * src/pic/gen.c (aopOp),
1201         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
1202         if size of operand is smaller than spill location
1203
1204 2006-05-12 Borut Razem <borut.razem AT siol.net>
1205
1206         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
1207           have to have CR/LF line endings even if they are checked out on *nix
1208           or on WIN32 in cygwin binmode
1209
1210 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
1211
1212         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
1213         * device/include/ds80c390.h: added sfr16 definitions
1214         * src/ds390/gen.c,
1215         * src/ds390/gen.h,
1216         * src/ds390/main.c,
1217         * src/ds390/ralloc.c,
1218         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
1219           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
1220           bit returning functions
1221         * support/regression/tests/sfr16.c: enabled test on ds390
1222
1223 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1224
1225         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
1226         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
1227
1228 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
1229
1230         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
1231         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
1232           (cl_address_space constructor): removed expensive initialization,
1233           (cl_address_space::get_cell): extended for late initialization,
1234           (cl_address_space::*): use late initialization,
1235           (cl_address_decoder::activate): removed expensive initialization,
1236           This reduced regression test running time by 25%
1237
1238 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
1239
1240         * packihx/,
1241         * configure.in,
1242         * configure,
1243         * sdcc.dsw,
1244         * Makefile.bcc,
1245         * Makefile.in,
1246         * support/packihx/Makefile.in,
1247         * support/packihx/clean.mk,
1248         * support/packihx/Makefile.bcc,
1249         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
1250
1251 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1252
1253         * src/SDCCval.c (valNot): fix for regression test failure
1254           of not.c on big endian hosts
1255
1256 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1257
1258         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
1259
1260 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1261
1262         * device/lib/mcs51/Makefile.in: changed string comparison operator
1263           to = for POSIX compliance; == is bash extension
1264
1265 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1266
1267         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
1268           kosmonaut_pirx
1269
1270 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
1271
1272         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
1273         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
1274         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
1275         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
1276         bug report #1478657,
1277
1278 2006-05-05 Borut Razem <borut.razem AT siol.net>
1279
1280         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
1281           making the html
1282
1283 2006-05-02 Borut Razem <borut.razem AT siol.net>
1284
1285         * doc/Makefile.in: removed *.ind dependency since there is no rule to
1286           create *.ind, which made make to fail if invoked with -j 2
1287
1288 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
1289
1290         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
1291           Hubert Sack for patch 1479782
1292
1293 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
1294
1295         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
1296
1297 2006-05-01 Raphael Neider <rneider AT web.de>
1298
1299         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
1300           (create_pic): store only prefix-free device name,
1301           (init_pic): check for device names with "16" prefix,
1302           (list_valid_pics),
1303         * src/pic/device.h (struct PIC_device),
1304         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
1305             stored device name,
1306         * device/include/pic/pic12f{635,675,629,683}.h,
1307         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
1308         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
1309         * device/include/pic/pic16f505.h,
1310         * device/lib/pic/libdev/pic16f505.c: removed
1311         * device/include/pic/pic14devices.txt: added support for pic12f
1312             devices, removed unsupported non 16-bit devices
1313             [above changes provided by patch from Zik Saleeba]
1314         * src/pic/*, src/pic16/*, device/include/pic16/*,
1315           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
1316
1317 2006-05-01 Borut Razem <borut.razem AT siol.net>
1318
1319         * configure.in, configure, doc/Makefile.in:
1320           sync with nightly build makefile - latex, dvipdf and dvips
1321           not needed any more
1322
1323 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
1324
1325         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
1326         in the library source
1327
1328 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
1329
1330         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
1331
1332 2006-04-28 Raphael Neider <rneider AT web.de>
1333
1334         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
1335         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
1336           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
1337         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
1338
1339 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
1340
1341         * device/lib/pic/libdev/Makefile.in,
1342         * device/lib/hc08/Makefile.in,
1343         * device/lib/gbz80/Makefile.in,
1344         * device/lib/z80/Makefile.in,
1345         * device/lib/ds390/Makefile.in,
1346         * device/lib/ds400/Makefile.in: added srcdir to include search path,
1347         thanks to Borut for the bug report
1348         * configure.in,
1349         * configure: always create doc/Makefile independent from --enable-doc
1350         * Makefile.in: always install from directory doc independent from
1351         --enable-doc
1352         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
1353         removed
1354         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
1355         * doc/Makefile.in: install *.txt if present
1356         * device/include/Makefile.in (install): added installation of pic/*.inc
1357         and pic/*.txt files again, they were erroneously removed
1358
1359 2006-04-28 Raphael Neider <rneider AT web.de>
1360
1361         * src/pic/{gen.c,main.h,pcode.c},
1362         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
1363             concerning signedness with casts
1364
1365 2006-04-28 Raphael Neider <rneider AT web.de>
1366
1367         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
1368             definition of an interrupt handler,
1369         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
1370             interrupt handler stuff from picglue() to separate routine,
1371           (picglue): enabled definition of intr handlers in files w/o main()
1372
1373 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1374
1375         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
1376           compilation with MSVC 2005 Express Edition (VC8)
1377
1378 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
1379
1380         * device/lib/Makefile: fixed build of gbz80 lib
1381
1382 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1383
1384         * support/regression/tests/bug-460010.c,
1385         * support/regression/tests/bug-524691.c,
1386         * support/regression/tests/bug-716242.c: removed conditional defines
1387           that are already in testfwk.h
1388
1389 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1390
1391         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
1392           (AccAXRsh1): added, shift right by 1,
1393           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
1394            AccAXLrl1
1395         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
1396
1397 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
1398
1399         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
1400         remove cast to same type
1401         * src/SDCCast.c (decorateType): fix for RFE 1475742,
1402         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
1403         * as/z80/Makefile,
1404         * link/z80/Makefile: removed, they have moved to
1405         Makefile.in files
1406         * configure,
1407         * configure.in: replaced duplicate message about ucsim by missing sdcpp
1408         * install-sh: fix bug #1204398 by setting umask 0022
1409         * device/lib/Makefile: separate build of z80 and gbz80 lib
1410
1411 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
1412
1413         Enabled VPATH feature: changed nearly all Makefiles (149 files).
1414         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
1415
1416         One basic decision: e.g. src/clean.mk includes further files. In order
1417         to make this work there are two solutions:
1418         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
1419           run configure on them. This way they can use
1420           'include $(srcdir)/port-clean.mk'
1421         - always include clean.mk by the Makefile at the same level. To avoid
1422           that `make clean` tries to include and build Makefile.dep the
1423           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
1424           implemented, because now even `make uninstall` doesn't create
1425           Makefile.in. clean.mk could be eliminated by pasting it in
1426           Makefile.in.
1427
1428         * debugger/mcs51/Makefile.in: build own objects from library sources
1429         (SLIB, SDCC) in current directory
1430
1431         * configure, configure.in: renamed --disable-device-lib-build in
1432         --disable-device-lib; added --enable-doc, the required tools are
1433         searched by configure; added result message; the toolchain for the
1434         belonging ports are now only built, if the port is enabled.
1435
1436         * support/regression/*: all output is written in directory gen, because
1437         the fwk and ports directories don't livet in the build tree using vpath
1438
1439         * doc/sdccman.lyx: renamed --disable-device-lib-build to
1440         --disable-device-lib, added --enable-doc, added section VPATH
1441
1442         * sim/ucsim/configure.in,
1443         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
1444         z80 are enabled by default
1445
1446 2006-04-24 Raphael Neider <rneider AT web.de>
1447
1448         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
1449             to config word, "pic14_"-prefixed some extern functions
1450           (pic14_emitConfigWord): emit __config directive(s) if assignment to
1451             config word has been found
1452         * src/pic/device.h: added prototypes
1453         * src/pic/pcode.c: added "pic14_"-prefix where needed
1454         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
1455             fixup
1456         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
1457             words,
1458           (pic14emitRegularMap): ignore config words,
1459           (pic14createInterruptVect): moved generating __config directives away
1460           (picglue): have __config directives emitted
1461
1462 2006-04-24 Borut Razem <borut.razem AT siol.net>
1463
1464         * doc/Makefile: sync with nightly build makefile
1465
1466 2006-04-24 Raphael Neider <rneider AT web.de>
1467
1468         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
1469             registers that have not been assigned proper liveranges,
1470             fixes #1469504 and #1474602,
1471           (pCodeRegOptimizeRegUsage): fixed typo in comment
1472
1473 2006-04-24 Borut Razem <borut.razem AT siol.net>
1474
1475         * device/examples/main8051.c: deleted - it was removed from CVS
1476           24.mar.2000 and after that modified 18.feb.2001, so it reappered
1477           after the transition to Subversion
1478         * src/SDCCalloc.h: deleted - it was removed  from CVS
1479           3.feb.2001 and after that modified 18.feb.2001, so it reappered
1480           after the transition to Subversion
1481         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
1482           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
1483           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
1484           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
1485
1486 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
1487
1488         * as/asx8051.dsp: added mcs51/strcmpi.h
1489         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
1490         * as/hc08/aslink.h: updated lnksect prototype
1491         * as/hc08/asm.h,
1492         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
1493         * as/hc08/asmain.c,
1494         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
1495           (newdot): handle A_ABS
1496         * as/hc08/asout.c,
1497         * as/mcs51/asout.c (outarea): output address
1498         * as/hc08/lkaomf51.c,
1499         * as/mcs51/lkaomf51.c: disabled unused array UsageType
1500         * as/hc08/m08pst.c,
1501         * as/mcs51/i51pst.c,
1502         * as/z80/z80pst.c: "ABS" is not A_OVR
1503         * as/hc08/lkarea.c (newarea): read a_addr,
1504           (lnkarea): added codemap array, sort absolute areas to the front,
1505            combine all GSINITx/GSFINAL,
1506           (find_empty_space, allocate_space): new functions,
1507           (lnksect): return next address, handle absolute sections
1508         * as/mcs51/lkarea.c (newarea): read a_addr,
1509           lnksect2 prototype changed,
1510           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
1511           (find_empty_space, allocate_space): new, factored out of lnksect2,
1512           (lnksect2): return next address, handle absolute sections
1513         * as/hc08/lkhead.c,
1514         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
1515         * as/hc08/lklibr.c (addfile, fndsym),
1516         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
1517           index out of range and detect both '\' and '/'
1518         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
1519         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
1520           regression tests (ds390 cannot return bool yet)
1521         * doc/sdccman.lyx: changed version number, document changed --no-peep,
1522           document critical interrupts on z80, document changed SDCC define
1523         * src/asm.c (_asxxxx_mapping): fixed .org directive,
1524           (_a390_mapping): added .org directive
1525         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
1526           (genMultOneByte): fixed warnings
1527         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
1528           ones
1529         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
1530         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
1531           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
1532         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
1533         * src/pic16/main.c: removed newReg prototype
1534         * src/pic16/pcode.c,
1535         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
1536           warnings
1537         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
1538           ones
1539         * src/pic16/ralloc.c
1540         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
1541           to fix warnings
1542         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
1543           from short to PIC_OPTYPE
1544         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
1545         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
1546           optype from short to PIC_OPTYPE
1547         * src/port.h: made int_size unsigned to fix warnings
1548         * src/SDCC.y: fixed warning on MSVC
1549         * src/SDCCicode.c (getArraySizePtr): return unsigned int
1550         * src/SDCCopt.c (convertToFcall): fixed warnings
1551         * src/SDCCsymt.h: removed double prototype for genSymName
1552         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
1553           offset int to fix warnings
1554
1555 2006-04-22 Borut Razem <borut.razem AT siol.net>
1556
1557         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1558           references to CVS replaced with Subversion
1559
1560 2006-04-21 Borut Razem <borut.razem AT siol.net>
1561
1562         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1563           references to CVS replaced with Subversion
1564
1565 2006-04-19 Borut Razem <borut.razem AT siol.net>
1566
1567         * src/version.awk: adapted for svn
1568         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
1569           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
1570           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
1571           /binutils-avr/etc/*.vi, *.jin: removed all properties
1572           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
1573
1574 2006-04-19 Borut Razem <borut.razem AT siol.net>
1575
1576         * CVS to Subversion migration completed
1577
1578 2006-04-18 Borut Razem <borut.razem AT siol.net>
1579
1580         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
1581           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
1582
1583 2006-04-17 Borut Razem <borut.razem AT siol.net>
1584
1585         * device/include/Makefile.in: added pic/*.inc to the installation
1586
1587 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
1588
1589         * support/regression/collate-results.py: fixed output in case of
1590         a valdiag error
1591         * support/regression/generate-cases.py: fixed splitting of pathnames
1592         with dots
1593         * as/hc08/lklibr.c (addfile),
1594         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
1595
1596 2006-04-11 Raphael Neider <rneider AT web.de>
1597
1598         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
1599         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
1600         * src/pic16/pcode.c (assignValnums): fixed #1460578
1601
1602 2006-04-11 Raphael Neider <rneider AT web.de>
1603
1604         * device/lib/pic/libdev/*.c,
1605         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
1606           fixes #1468739, enables compilation in --std-c99 mode
1607         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
1608
1609 2006-04-11 Raphael Neider <rneider AT web.de>
1610
1611         * src/pic/device.c (find_device): removed debug output
1612           (list_valid_pics): enabled verbose listing of supported devices
1613         * device/include/stdbool.h: define bool as char for pic14/16 as well
1614
1615 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1616
1617         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
1618
1619 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1620
1621         * .version: bumped version to 2.5.6
1622         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
1623
1624 2006-04-06 Raphael Neider <rneider AT web.de>
1625
1626         * .version: bumped version to 2.5.6 (pic14 ABI changed)
1627         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
1628         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
1629           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
1630             pic14_constructAbsMap
1631           (pic14printPublics): declare absolute global symbols as global
1632           (pic14createInterruptVect),
1633         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
1634           (newReg): assume new registers unused, use correct name in
1635             hashtable (reg->name instead of name), more debugLog output
1636         * src/pic/device.h (PIC_device): added fields for verbose output
1637         * src/pic/device.c: moved device definition to pic14devices.txt,
1638             added routines for runtime parsing of pic14devices.txt,
1639             added support for second config word
1640         * src/pic/main.c (_process_pragma): removed #pragma maxram,
1641           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
1642           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
1643           (_pic14_parseOptions): moved pCodeInitRegisters here
1644           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
1645         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
1646           (pCodeInitRegisters): rewrapped comments, perpared new approach to
1647             handling the pseudo stack
1648         * device/lib/Makefile.in: ignore failures in objects-pic16,
1649         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
1650         * device/lib/pic/NEWS: document new dependency on picXXX.lib
1651         * device/lib/pic/Makefile.subdir,
1652         * device/lib/pic16/Makefile.subdir: improved clean rules
1653         * device/lib/pic/libdev/: NEW, pic14 device libraries
1654         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
1655         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
1656         * device/include/Makefile.in: create subdir and install pic14 headers
1657         * device/include/pic/p16f_common.inc: removed unused declarations
1658         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
1659             PICs from inc2h.pl v1.6,
1660             replaced BIT_AT macros with struct declarations
1661         * device/include/pic/pic14devices.txt: definition of supported devices,
1662             all above improvements contributed by Zik Saleeba, thanks
1663         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
1664         * support/scripts/sdcc.nsi: also install pic14 device libraries and
1665             headers
1666
1667 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1668
1669         * device/include/mcs51/c8051f410.h: added interrupt numbers,
1670         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
1671           thanks to Charles Olds
1672
1673 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1674
1675         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
1676
1677 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1678
1679         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
1680         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
1681         * support/regression/bug1464657.c: added, new test
1682
1683 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1684
1685         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
1686           version number
1687
1688 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1689
1690         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
1691           --no-peep and --peep-file <file> are used don't use default rules but
1692           do use the <file>
1693
1694 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1695
1696         * src/mcs51/gen.c (genCall): fixed bug 1457608
1697
1698 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1699
1700         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1701         changes seem to cause (trigger?) problems with the build system.
1702
1703 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1704
1705         * src/SDCCpeeph.c (operandsLiteral): new, added,
1706           (callFuncByName): inserted operandsLiteral
1707         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1708
1709 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1710
1711         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1712         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1713
1714 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1715
1716         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1717           implemented patch 1120823 Thanks to Willy De la Court (normal
1718           interrupts need an interrupt number now if they are made critical),
1719           and enabled nesting of critical functions though not for gbz80
1720           (genCritical, genEndCritical): added functions
1721           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1722         * src/z80/mappings.i: added "ei" to all mappings
1723
1724 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1725
1726         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1727         submitted by the Debian SDCC maintainer Aurelien Jarno:
1728         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1729         archive with gcc 4.1 on mips and wrote the patch"
1730
1731 2006-03-16 Raphael Neider <rneider AT web.de>
1732
1733         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1734           the left operand is shorter than the result (c* = lit-c* + int),
1735           fixes bug #1450796
1736         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1737           OP_SYMBOL
1738
1739 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1740
1741         * src/.version: increased version number to 2.5.5
1742         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1743         linking is done manually in pic16 port's _linkEdit,
1744         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1745         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1746         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1747         allocate asmop as AOP_ACC,
1748         (aopForRemat): added parameter 'bool result' in function declaration,
1749         (pic16_aopGet): return AOP_ACC when accessing WREG,
1750         (pic16_popGetTempReg): minor modification,
1751         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1752         'pic16_allocWithIdx',
1753         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1754         calling function in absolute addresses,
1755         (genAssign): take into account AOP_ACC asmop,
1756         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1757         * src/pic16/pcoderegs.c: some debug functions and lines added,
1758         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1759         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1760         register too,
1761         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1762         call to allocReg, not by manually allocating a new one,
1763         (pic16_assignRegisters): now before going through the register
1764         allocating functions mark all registers as free. This eliminates some
1765         side effects resulting from peephole parser done earlier in the backbone
1766
1767 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1768
1769         * src/SDCCicode.c (geniCodeLogic),
1770         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1771
1772 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1773
1774         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1775           (genSend): bugfix, do not allocate and free twice,
1776           (shiftRLong): handle partially overlapping aops
1777         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1778
1779 2006-03-08 Borut Razem <borut.razem AT siol.net>
1780
1781         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1782           for pic16
1783
1784 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1785
1786         * support/regression/tests/bug1409955.c: new, added
1787         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1788         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1789           (aopForSym, aopOp): increment asmop.allocated if reused,
1790           (freeAsmop): decrement asmop.allocated and check for zero instead of
1791           using asmop.freed,
1792           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1793           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1794            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1795            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1796            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1797            genSignedRightShift, genRightShift, genDataPointerGet,
1798            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1799            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1800             in reverse order from allocation,
1801           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1802             added swappedLR to keep track
1803         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1804           pdata & code for GCC, z80, gbz80 & hc08
1805         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1806
1807 2006-03-08 Raphael Neider <rneider AT web.de>
1808
1809         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1810
1811 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1812
1813         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1814         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1815         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1816
1817 2006-03-06 Borut Razem <borut.razem AT siol.net>
1818
1819         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1820           made the linker quiet
1821
1822 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1823
1824         * src/pic16/gen.c (genPcall): fixed bug #1443644
1825         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1826         which dumps before the function entry point a data byte which represents
1827         the number of the local variables used by the specified function, added
1828         'xinst' for initial support for Extended Instruction Support,
1829         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1830         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1831         port->fun_prefix anymore (may change later),
1832         (genFunction, genEndFunction): do not store/restore local registers for
1833         _main (this should take care the --main-return command line option in
1834         the future),
1835         (genOr): removed some legacy pic-port instructions,
1836         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1837         performing operations with SFR's causes data to be written more than
1838         once to each SFR. Perhaps SFRs should be handled in special cases...
1839         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1840         pcode.h
1841         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1842         into account for stack starting position,
1843         (struct OPTIONS pic16_optionsTable): added command line argument
1844         --extended or -y for Extended Instruction Support,
1845         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1846         (deassignLRs): *** perhaps the most important change, old 'for' code
1847         (commented out for reference), didn't account for some registers which
1848         were left marked 'not free' after a pointer operation. The change
1849         reduces register usage a lot in some cases
1850
1851 2006-03-04 Borut Razem <borut.razem AT siol.net>
1852
1853         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1854           _clean
1855         * support/regression/tests/bug-524697.c: decreased array size for
1856           mcs51 to fit into the internal RAM
1857         * support/regression/Makefile.in: a little bit more verbose
1858
1859 2006-03-03 Borut Razem <borut.razem AT siol.net>
1860
1861         * support/regression/fwk/lib/testfwk.c,
1862           support/regression/fwk/include/testfwk.h: introduced function
1863           _prints(), nonrecursive _printn(), call _initEmu() from main()
1864         * support/regression/ports/gbz80/support.asm,
1865           support/regression/ports/ucz80/support.asm,
1866           support/regression/ports/z80/support.asm,
1867           support/regression/ports/ds390/support.c,
1868           support/regression/ports/hc08/support.c,
1869           support/regression/ports/host/support.c,
1870           support/regression/ports/mcs51/support.c,
1871           support/regression/ports/xa51/support.c: added empty _initEmu()
1872           function
1873         * support/regression/ports/pic16/gpsim.cmd,
1874           support/regression/ports/pic16/spec.mk,
1875           support/regression/ports/pic16/support.c,
1876           support/regression/Makefile.in: added pic16 regression test
1877
1878 2006-03-01 Raphael Neider <rneider AT web.de>
1879
1880         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1881           genConstPointerGet): use safe way of generating MOVFF to cover
1882             literals as well as registers, fixes bug #1440527
1883         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1884             dereference
1885           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1886             more correctly, fixes bug #1232186
1887           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1888         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1889             gplink guess the correct processor in more cases, applied patch
1890             from Till Riedel attached to and fixing bug #1436552
1891
1892 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1893
1894         * support/regression/tests/array.c: added, contains check for #1434401
1895         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1896
1897 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1898
1899         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1900         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1901         * device/include/mcs51/c8051f326.h,
1902         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1903         * device/include/mcs51/c8051f000.h,
1904         * device/include/mcs51/c8051f018.h,
1905         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1906           PCON_IDLE,PCON_STOP and added sfr16 definitions
1907
1908 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1909
1910         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1911           genGetWord): fixed bug 1409955
1912
1913 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1914
1915         * device/include/hc08/mc68hc908gp32.h,
1916         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1917
1918 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1919
1920         * src/SDCCast.c (constExprValue): return NULL if not a value
1921         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1922         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1923         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1924
1925 2006-02-13 Borut Razem <borut.razem AT siol.net>
1926
1927         * src/regression/ptrarg.c: added, fails due to bug #1430967
1928         * src/regression/Makefile: ptrarg.c added, ...
1929
1930 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1931
1932         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1933         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1934
1935 2006-02-11 Borut Razem <borut.razem AT siol.net>
1936
1937         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1938           print "Processor: xxx" message to stdout only if --verbose
1939
1940 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1941
1942         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1943         * support/regression/tests/bug1426356.c: added
1944         * support/regression/tests/bitfields.c: removed 2 tests
1945
1946 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1947
1948         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1949         * device/include/mcs51/c8051f330.h,
1950         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1951           PCON_IDLE,PCON_STOP and added sfr16 definitions
1952         * device/lib/_divsint.c,
1953         * device/lib/_divuint.c,
1954         * device/lib/_divulong.c,
1955         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1956           register bank bug for small stackauto
1957
1958 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1959
1960         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1961
1962 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1963
1964         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1965         * all.dsp: corrected several bin paths
1966         * device/include/mcs51/c8051f120.h,
1967         * device/include/mcs51/c8051f300.h,
1968         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1969           to PCON_IDLE,PCON_STOP
1970         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1971         * device/lib/printf_large.c (output_float): fixed bug 1388703
1972         * support/regression/tests/bug1057979.c: added test for bug 1388703
1973
1974 2006-02-08 Raphael Neider <rneider AT web.de>
1975
1976         * src/pic/pcode.c (pciTRIS): fixed typo,
1977           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1978           (LinkFlow): fixed handling of flows that end in a call,
1979           (ReuseReg): perform safety check earlier
1980         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1981             to work with flows at the beginning of a pBlock,
1982             fixes #1426557 (Symbol not previously defined),
1983           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1984             usage information
1985           (RemoveUnusedRegisters): update register usage info
1986         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1987             created, reuse existing ones instead
1988         * src/pic/gen.c (genPcall): fixed #1424719
1989
1990 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1991
1992         * link/z80/lkmain.c,
1993         * link/z80/lklex.c,
1994         * link/z80/lkdata.c,
1995         * link/z80/aslink.h: fixed build on current cygwin:
1996         replaced getline() by lk_getline()
1997
1998 2006-02-01 Borut Razem <borut.razem AT siol.net>
1999
2000         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
2001           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
2002           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
2003           src/regression/bool1.c, src/regression/bool2.c,
2004           src/regression/bool3.c, src/regression/call1.c,
2005           src/regression/compare.c, src/regression/compare10.c,
2006           src/regression/compare2.c, src/regression/compare3.c,
2007           src/regression/compare4.c, src/regression/compare5.c,
2008           src/regression/compare6.c, src/regression/compare7.c,
2009           src/regression/compare8.c, src/regression/compare9.c,
2010           src/regression/configword.c, src/regression/for.c,
2011           src/regression/inline.c, src/regression/mult1.c,
2012           src/regression/nestfor.c, src/regression/or1.c,
2013           src/regression/pointer1.c, src/regression/ptrfunc.c,
2014           src/regression/rotate1.c, src/regression/rotate2.c,
2015           src/regression/rotate3.c, src/regression/rotate4.c,
2016           src/regression/rotate5.c, src/regression/rotate6.c,
2017           src/regression/rotate7.c, src/regression/string1.c,
2018           src/regression/struct1.c, src/regression/sub.c,
2019           src/regression/sub2.c, src/regression/switch1.c,
2020           src/regression/while.c, src/regression/xor.c,
2021           src/regression/create_stc, src/regression/simulate,
2022           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
2023           regression tests
2024         * src/regression/gpsim_assert.h: added
2025
2026 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
2027
2028         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
2029         ((void (code *) (void)) 0) ();
2030         * as/hc08/aslex.c,
2031         * as/hc08/aslink.h,
2032         * as/hc08/asm.h,
2033         * as/hc08/asmain.c,
2034         * as/hc08/lkdata.c,
2035         * as/hc08/lklex.c,
2036         * as/hc08/lkmain.c,
2037         * as/mcs51/aslex.c,
2038         * as/mcs51/aslink.h,
2039         * as/mcs51/asm.h,
2040         * as/mcs51/asmain.c,
2041         * as/mcs51/lkdata.c,
2042         * as/mcs51/lklex.c,
2043         * as/mcs51/lkmain.c,
2044         * as/z80/aslex.c,
2045         * as/z80/asm.h,
2046         * as/z80/asmain.c: fixed build on current cygwin:
2047         replaced getline() by as_getline()
2048
2049 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
2050
2051         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
2052         declarator in the symbol chain
2053         * src/SDCCsymt.h,
2054         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
2055         parameter list for function pointers
2056         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
2057         * support/regression/tests/bug-716242.c: added
2058
2059 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
2060
2061         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
2062         offset if possible
2063         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
2064
2065 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
2066
2067         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
2068         inifinitely recurseable, added static
2069         * support/regression/tests/bug-1408066.c: added
2070
2071 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
2072
2073         * src/SDCCicode.h,
2074         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
2075         renamed, added possibility to create "postLoopLbl"-labels
2076         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
2077         newiTempLoopHeaderLabel
2078         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
2079         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
2080         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
2081         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
2082         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
2083         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
2084         (basicInduction): fixed bug #136564, made static,
2085         (loopInduction): changed parameter of basicInduction, made static,
2086         (addPostLoopBlock): added
2087         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
2088         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
2089         findLoopEndSeq
2090         * support/regression/tests/bug-136564.c: added
2091         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
2092         --std-sdcc99 to LIBSDCCFLAGS
2093
2094 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
2095
2096         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
2097         while loop
2098         * support/regression/tests/bug-1406131.c: added
2099
2100 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
2101
2102         * src/SDCCast.c (decorateType): fix promotion of unary minus
2103         * src/SDCCsymt.c (computeType): beautified
2104         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
2105         (valUnaryPM, valComplement): fix sign and promotion,
2106         (valNot): ANSI: result type is int (SDCC: unsigned char)
2107         * support/regression/tests/uminus.c: speedup by removing superflous
2108         test case 'int'
2109         * support/regression/tests/onebyte.c: added promotion and signedness
2110         tests for unary minus
2111         * support/regressions/tests/bug-477927.c: disable warning about
2112         uninitialized variables
2113         * support/regression/tests/not.c: added
2114
2115 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
2116
2117         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
2118         * src/mcs51/gen.c (gen51Code): show final register usage after
2119         fillGaps in asm with --i-code-in-asm
2120         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
2121         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
2122         incUsed, rliveClear, adjustIChain): made static,
2123         (setFromRange): excluded because it's unused,
2124         (findPrevUseSym, markWholeLoop): added,
2125         (findPrevUse): rewritten; fixes bug 895992; now a complete search
2126         through all branches of predecessors enables sdcc to emit the warning
2127         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
2128         (rlivePoint): made static, added parameter emitWarnings which is only
2129         true during the first run out of two,
2130         (findRecursiveSucc, findRecursivePred): removed,
2131         (computeLiveRanges): made static, added parameter emitWarnings,
2132         (dumpIcRlive): added for debugging only
2133         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
2134         removed prototype of setFromRange()
2135         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
2136         in call of computeLiveRanges()
2137         * support/regression/tests/bug-895992.c: added
2138         * support/regression/tests/bug-971834.c: added
2139         * support/valdiag/tests/bug-895992.c: added
2140         * support/valdiag/tests/bug-971834.c: added
2141
2142 2005-12-18 Raphael Neider <rneider AT web.de>
2143
2144         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
2145           (genUnpackBits): improved code for direct operands,
2146           (genPackBits): improved code for literal assignment to bitfields
2147             and for direct destination operands (no FSR indirection),
2148             prevented redundant AND, fixes #1362800,
2149           (AccLsh): added parameter to disable masking of the result
2150         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
2151           skip instructions with side-effects (like incfsz),
2152           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
2153         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
2154         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
2155           fixes #1375263
2156
2157 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
2158
2159         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
2160         volatile variables as spill location
2161
2162 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
2163
2164         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
2165         replacing literals
2166         * support/regression/tests/bug-1376320.c: added
2167
2168 2005-12-08 Raphael Neider <rneider AT web.de>
2169
2170         * src/pic/device.c: renamed is_shared to pic14_is_shared
2171         * src/pic/gen.c (genIfx): re-enabled handling of sbits
2172         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
2173           (is_valid_identifier): added for above workaround
2174
2175 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
2176
2177         * device/lib/Makefile.in: fixed to enable port-specific-objects
2178         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
2179           char, thanks Hubert Sack
2180         * doc/sdccman.lyx: documented --xstack-loc,
2181           elaborated a bit more on interrupts and pitfalls,
2182           removed "setjmp/longjmp unsupported",
2183           documented some unsupported C99 features
2184         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
2185         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
2186           if, thanks Hubert Sack
2187         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
2188         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
2189           make make_library
2190         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
2191           regression tests can report resource usage (rfe 700441)
2192         * support/regression/collate-results.py: report resource usage
2193         * support/regression/ports/ds390/spec.mk,
2194         * support/regression/ports/hc08/spec.mk,
2195         * support/regression/ports/mcs51/spec.mk,
2196         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
2197         * support/regression/ports/ds390/uCsim.cmd,
2198         * support/regression/ports/hc08/uCsim.cmd,
2199         * support/regression/ports/mcs51/uCsim.cmd,
2200         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
2201         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
2202           library, use the default one
2203         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
2204           building the library
2205
2206 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
2207
2208         * config.dsp: added dependency on .version and configure_vc.awk
2209         * device/include/setjmp.h: updated for --stack-auto and --xstack
2210         * device/include/mcs51/at89c51snd1c.h: corrected line endings
2211         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
2212         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
2213         * device/lib/libsdcc.lib: added _setjmp
2214         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
2215           (decorateType): fixed bug 1372851,
2216           (optimizeGetHbit): fixed warning
2217         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
2218           array initialisation
2219         * support/regression/tests/bug1057979.c: added test for bug 1358192
2220         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
2221
2222 2005-12-03 Borut Razem <borut.razem AT siol.net>
2223
2224         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
2225           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
2226
2227 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2228
2229         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
2230         createIval): implement symbol independant "flexible array member",
2231         (createIvalCharPtr): implemented flexible array initialisation with a
2232         string
2233         * src/SDCCsymt.c (copyStruct): removed,
2234         (getSize): fixed misleading comment,
2235         (getAllocSize): removed, the additional allocation size is now in
2236         sym->flexArrayLength,
2237         (checkStructFlexArray): new, syntax checks for flexible array members,
2238         (compStructSize): added syntax checks for "flexible array members"
2239         (copyStruct): removed,
2240         (copyLinkChain): removed inefficient fix for bug 770487
2241         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
2242         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
2243         symbol->flexArrayLength
2244         * src/SDCCerr.c,
2245         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
2246         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
2247         * support/regression/tests/structflexarray.c: added
2248         * support/valdiag/tests/structflexiblearray.c: added
2249
2250 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2251
2252         * src/SDCCast.c (decorateType): fixed bug 1368489
2253         * support/Util/SDCCerr.c,
2254         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
2255
2256 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2257
2258         * device/include/mcs51/at89c51snd1c.h: added file submitted by
2259           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
2260
2261 2005-11-27 Borut Razem <borut.razem AT siol.net>
2262
2263         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
2264           support/cpp2/mkdeps.h: added command line option
2265           -obj-ext=<extension> to SDCPP to define object file externion, used
2266           for generation of make dependencies (-M)
2267         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
2268
2269 2005-11-26 Borut Razem <borut.razem AT siol.net>
2270
2271         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
2272           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
2273           added pic and pic16 libraries
2274
2275 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2276
2277         * device/include/float.h: Corrected typo in prototype of __fsgt
2278
2279 2005-11-25 Borut Razem <borut.razem AT siol.net>
2280
2281         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
2282           added creation of model-mcs51-stack-auto libraries
2283
2284 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
2285
2286         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
2287         and fields-list too
2288         * src/SDCCast.c (createIvalArray): removed obsolete comment
2289
2290 2005-11-24 Borut Razem <borut.razem AT siol.net>
2291
2292         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
2293           added missing device/lib/mcs51/crt*.asm sources
2294
2295 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
2296
2297         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
2298
2299 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
2300
2301         * device/lib/_fs2schar.c,
2302         * device/lib/_fs2sint.c,
2303         * device/lib/_fs2slong.c: optimized inline asm
2304
2305 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2306
2307         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2308           Better handling of floats between -1.0 and 0.0.
2309
2310 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2311
2312         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
2313           (the missing "if"s prohibited removal of redundant labels)
2314
2315 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2316
2317         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2318           Properly convert floats between -1.0 and 0.0 to long, int, and char
2319           types (max integer value of negative floats tends to zero).
2320         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2321           Removed changes made so to work properly with floats between
2322           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
2323           and _fs2char.c
2324
2325 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2326
2327         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
2328         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
2329         (genCast) cosmetic change
2330         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
2331         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
2332         from mcs51
2333         * support/regression/tests/bitfields (testSignedBitfields): added
2334
2335 2005-11-18 Borut Razem <borut.razem AT siol.net>
2336
2337         * sdcc/device/lib/Makefile.in: remove all unnecessary files
2338         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
2339           introduced SILENT option to make building of pic16 libraries less
2340
2341 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2342
2343         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2344           Now they work properly with floats between -1.0 and 0.0
2345         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
2346
2347 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2348
2349         * src/SDCCicode.c (printOperand): added missing else
2350
2351 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2352
2353         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
2354         reformatted for better readability
2355         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
2356         signed bitfields
2357
2358 2005-11-17 Borut Razem <borut.razem AT siol.net>
2359
2360         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
2361           introduced SILENT option to make building of pic16 libraries less
2362           verbose - used for nightly snapshot build
2363         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
2364           available on Win32 platforms.
2365         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
2366           medium, large, pic and pic16
2367
2368 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2369
2370         * device/lib/printf_large.c: Temporary patch for bug 1358192:
2371           printf("%f"...) sets fraction to zero.
2372
2373 2005-11-16 Raphael Neider <rneider AT web.de>
2374
2375         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
2376           fixes #1357221
2377         * src/pic/gen.c (genIfx): implemented for CARRY bit
2378         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
2379           to generic pointers, fixes #1357332,
2380           (pic16_movLit2f): NEW,
2381           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
2382
2383 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2384
2385         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
2386
2387 2005-11-11 Raphael Neider <rneider AT web.de>
2388
2389         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
2390         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
2391           compute pointer's type from operand,
2392           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
2393           improved single bit reads, fixes bug #1353379
2394
2395 2005-11-09 Borut Razem <borut.razem AT siol.net>
2396
2397         * support/scripts/sdcc.nsi: added lib/pic to the package
2398
2399 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
2400
2401         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
2402
2403 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2404
2405         * support/regression/tests/bug1348008.c: added
2406         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
2407         * support/regression/tests/bug1337835.c: updated comment
2408
2409 2005-11-06 Borut Razem <borut.razem AT siol.net>
2410
2411         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2412           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2413           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2414           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2415           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
2416           dynamic construction of cl_error_class and derivates - 2.nd try
2417
2418 2005-11-05 Borut Razem <borut.razem AT siol.net>
2419
2420         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
2421           bug, which caused Bus Errors on sparc solaris
2422
2423 2005-11-04 Borut Razem <borut.razem AT siol.net>
2424
2425         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2426           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2427           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2428           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2429           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
2430           and derivates to resolve the initialization problem on OSX
2431
2432 2005-11-02 Borut Razem <borut.razem AT siol.net>
2433
2434         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2435           corrected typo - #include <winsock2.h>
2436
2437 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
2438
2439         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
2440           (_asxxxx_mapping): added org directive for future enhancements
2441
2442 2005-11-01 Borut Razem <borut.razem AT siol.net>
2443
2444         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2445           enabled sockets on WIN32
2446         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
2447
2448 2005-10-31 Borut Razem <borut.razem AT siol.net>
2449
2450         * support/regression/generate-cases.py: escape backslashes in {testcase}:
2451           WIN32 backslash path delimiters should be escaped when used in C strings
2452         * support/regression/tests/bitfields.c: exclude failing assertions for
2453           __CYGWIN32__ and __MINGW32__ hosts
2454
2455 2005-10-30 Borut Razem <borut.razem AT siol.net>
2456
2457         * src/SDCCutil.c: corrected double comparison typo
2458
2459 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
2460
2461         * device/lib/medium/Makefile: added for new memory model medium
2462         * device/include/asm/mcs51/features.h: updated for medium/pdata
2463         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
2464           added Multiply & Accumulate sbit's and MAC0_PAGE define
2465         * device/include/mcs51/c8051f300.h: added sfr16 definitions
2466         * device/include/mcs51/c8051f310.h: added sfr16 definitions
2467         * device/lib/_mullong.c: update for medium model
2468         * device/lib/incl.mk: added medium model
2469         * doc/sdccman.lyx: documented medium model
2470         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
2471         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
2472         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
2473         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
2474           (allocParms): set SCLS and OCLS to pdata for medium model
2475         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
2476           for pdata,
2477           (powof2): return <0 if not power of 2
2478         * src/avr/gen.c (genBitWise): use updated powof2
2479         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
2480           (shiftR2Left2Result): small optimization in setup, save acc when storing,
2481           (shiftLLeftOrResult): use B if necessary
2482         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
2483         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
2484         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
2485         * support/regression/Makefile.in: added test-mcs51-medium
2486         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
2487
2488 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2489
2490         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
2491         specifier unsigned
2492         * device/lib/time.c (mktime): fixed bug 1334315
2493
2494 2005-10-28 Raphael Neider <rneider AT web.de>
2495
2496         * device/include/pic/p16f_common.inc: added common declarations
2497         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
2498
2499 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2500
2501         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
2502           (aopPutUsesAcc): added to predict accumulator use,
2503           (assignResultValue): save acc if necessary,
2504           (genMinusDec): store result if indirectly addressed,
2505           (genDivOneByte):  save acc if necessary,
2506           (movLeft2Result): bugfix if left already in acc,
2507           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
2508             attention to accumulator use (esp. pdata),
2509           (genReceive): receive pdata correctly
2510         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
2511         * src/SDCCicode.h: added isOperandInPagedSpace prototype
2512
2513 2005-10-27 Raphael Neider <rneider AT web.de>
2514
2515         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
2516
2517 2005-10-27 Raphael Neider <rneider AT web.de>
2518
2519         * .version: changed version to 2.5.4
2520         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
2521         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
2522           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
2523             arithmetics support routines
2524         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
2525         * device/lib/Makefile.in: also create installdir for pic
2526
2527         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
2528           pic14 port as well
2529         * src/pic/device.c (dump_sfr): rewritten to delegate register
2530           placement to the linker (use `extern sym' rather than sym EQU addr),
2531           (validAddress): fixed to check last specified address
2532         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
2533           (popGetLit): truncate literal value to 8 bit,
2534           (popGet): moved assert to more appropriate place
2535           (popGetExternal): create pCode operand from and mark the according
2536             symbol as being `extern'
2537           (popGetAddr): added sanity check on immediate's offset, provide
2538             GPOINTER tag on demand
2539           (aopPut): fixed for immediates,
2540           (mov2w_op): move operand's address or contents to WREG (depending on
2541             operand type), safer variant of mov2w,
2542           (movwf,call_libraryfunc): NEW, handy abbreviations,
2543           (get_argument_pcop,get_return_val_pcop,pass_argument,
2544           get_returnvalue): interface for accessing function parameters and
2545             return values,
2546           (assignResultValuei,genRet): use new parameter/return value interface
2547           (pic14_getDataSize): back to old version handling generic pointers,
2548           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
2549             provided implementation and/or fixed old one,
2550           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
2551             calls, removed legacy 8051 reference code
2552           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
2553           (loadSignToC): NEW, move the operands sign bit to CARRY,
2554           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
2555             genRightShiftSigned, accepts negative shift counts,
2556           (setup_fsr): load FSR and adjust IRP (indirect memory access),
2557           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
2558             generic pointers, __data pointers and __code pointers,
2559           (genUnpackBits,genPackBits): rewritten to work with generic pointers
2560             and signed bitfields, limit bitfields to 8 bit,
2561           (genDataPointerGet): fixed number of bytes read,
2562           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
2563           (genPointerGet,genPointerSet): fixed handling of __code pointers,
2564             pointers to constant data are no longer assumed to point to __code
2565             space, removed invalid pointer types,
2566           (bitpatternFromVal): retrieve the PICs representation of an integer
2567             or float literal,
2568           (genDataPointerSet): fixed assigning to po_immediate operands,
2569           (genGenPointerSet): implemented as library call,
2570           (genIfx): fixed incorrect condition,
2571           (genAddrOf): limit generic pointers' addresses to 2 bytes,
2572             provide GPOINTER tag according to destination's storage class,
2573           (genCast): added code to handle casting to generic pointers, added
2574             sign-/zero extension of the result
2575           (aop_isLitLike,op_isLitLike): fixed handling of immediates
2576         * src/pic/gen.h: added macros to access IRP bit in STATUS register
2577         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
2578           extend the result
2579         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
2580           address/register resides in the shared banks
2581           (emitSymbolToFile): improved to handle global and `pinned' symbols,
2582             put all variables into separate sections (have the linker arrange
2583             them)
2584           (picglue): put init code and interrupt handlers in separate sections
2585         * src/pic/main.c: added port specific options table, modified to PORT
2586           structure to make GPOINTERs 3 byte, added pic14_options
2587           (_pic14_do_link): private linking routine (update paths to libraries,
2588             add libsdcc.lib by default)
2589         * src/pic/main.h: declare pic14_options
2590         * src/pic/pcode.c: fixed instructions i/o relations,
2591           (RegCond): reverted to correct version,
2592           (newpCodeOpLit): truncate literals to 8 bit,
2593           (genericPrint): added debug output,
2594           (getRegFromInstruction): fixed for various operand types, simplified
2595           (BuildFlow): fixed broken handling of isntructions with labels
2596           (LinkFlow): start at last instruction in flow (skip trailing comments),
2597             pass the flow on to the next instruction after CALL
2598           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
2599           (insertPCodeInstruction): fixed inserting after a skip instruction,
2600           (DoBankSelect): fixed for labeled instructions
2601           (OptimizepBlock): honor --nopeep switch
2602           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
2603         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
2604         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
2605           (pCodeOptime2pCodes): allow disabling this optimization via
2606             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
2607             but is still buggy), started implementation of a dataflow based
2608             pCode optimization (CSE + dead code elimination)
2609           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
2610         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
2611           names are independant of the stack location and therefore portable across
2612           devices
2613
2614 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2615
2616         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
2617           (selectSpil): fixed bug 1337835 by not spilling bit variables
2618         * support/regression/tests/bug1337835.c: added test for this bug
2619         * src/mcs51/peeph.def: restart after rule 3.c,
2620           addded rules 263.x to optimize loading constants
2621
2622 2005-10-26 Raphael Neider <rneider AT web.de>
2623
2624         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
2625         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
2626           (genAssign): emit warning when casting literals to generic pointer
2627             type, also applies when taking the address of a fixed variable,
2628           (genCast): improved casting to generic pointers
2629         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
2630           extern variables, added verbose error message
2631         * device/include/pic16/{string.h,errno.h}: added #pragma library c
2632
2633 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
2634
2635         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
2636         carry must be complemented too
2637         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
2638         could be emitted by genMinus
2639         * src/SDCCval.c (constVal): fixed bug 1305065
2640
2641 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
2642
2643         * src/SDCCast.c (addCast): added promotion for bit variables
2644         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
2645         promotion casts + optimisation
2646         (optimizeGetWord): fix warning 'i' might be used uninitialized
2647         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
2648         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
2649
2650 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2651
2652         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
2653         all chars are promoted to int; promotion should be handled in SDCCast.c
2654
2655 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2656
2657         * device/lib/_strcmp.c: Fixed bug 1326457
2658
2659 2005-10-11 Raphael Neider <rneider AT web.de>
2660
2661         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
2662         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
2663
2664 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2665
2666         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
2667         * support/regression/tests/sfr16.c: added test for the sfr32 bug
2668
2669 2005-10-04 Raphael Neider <rneider AT web.de>
2670
2671         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
2672           device/lib/pic16/pics.all: added pic18f1320
2673         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
2674
2675 2005-09-30 Raphael Neider <rneider AT web.de>
2676
2677         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
2678         * src/pic16/devices.inc: NEW, provides device descriptions
2679         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
2680
2681 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
2682
2683         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
2684           GETHBIT
2685
2686 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
2687
2688         * doc/sdccman.lyx: updated Highest Order Bit documentation,
2689           documented Any Order Bit, Higher Order Byte and Higher Order Word
2690         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
2691         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2692           (optimizeGetAbit): new, to get any bit, not only the high bit,
2693           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2694           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2695           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2696           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2697             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2698             GETABIT, GETBYTE, GETWORD: decorate them,
2699           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2700           (ast_print): added GETABIT, GETBYTE, GETWORD
2701         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2702         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2703           (geniCodeBinary): new generic binary icode,
2704           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2705         * src/port.h: updated comment for PORT.hasExtBitOp
2706         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2707           (genGetByte): new, to get a single byte,
2708           (genGetWord): new, to get a word from a long,
2709           (gen51Code): added GETABIT, GETBYTE, GETWORD
2710         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2711
2712 2005-09-23 Raphael Neider <rneider AT web.de>
2713
2714         * configure.in, configure: have device/lib/pic configured
2715         * device/lib/Makefile.in: added model-pic14
2716         * device/lib/clean.mk: added pic/ to clean rule
2717         * device/lib/pic: added rudimentary pic14 library providing support
2718           functions for multiplication/division/generic pointer access
2719         * src/SDCCopt.c (convilong): mark support functions as extern
2720           for pic14 port as well
2721         * src/pic/gen.c (genMult): added assertions,
2722           (genpic14Code): emit warning on unhandled iCodes
2723         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2724         * src/pic/pcode.c (pCodeOpCopy),
2725         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2726           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2727           SFR_REGISTER}), made safe for future extensions
2728         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2729           instructions even if preceeded by SKIP instructions (also remove
2730           them); removed unused code
2731         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2732           prevents leaving parts of the structure uninitialized after copying
2733
2734 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2735
2736         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2737           ago by me
2738         * support/regression/tests/addsub.c: added test for the bug
2739
2740 2005-09-21 Raphael Neider <rneider AT web.de>
2741
2742         * device/include/pic16/pic18f1220.h,
2743           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2744         * device/lib/pic16/Makefile.rules: added missing opening paren
2745         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2746           are provided in genutils.c,
2747           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2748           operand/result sizes,
2749           (genCmp): assert on NULL pointers first, then check deref'ed values
2750         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2751           result size
2752
2753 2005-09-18 Raphael Neider <rneider AT web.de>
2754
2755         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2756           as these are now unused,
2757           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2758         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2759           local, avoids uninitialized pointer dereference on r->name
2760         * src/pic16/ralloc.c (newReg): fixed indentation
2761
2762 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2763
2764         * src/SDCCval.c (constVal): fixed bug 730366
2765         * support/Util/SDCCerr.c,
2766         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2767
2768 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2769
2770         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2771
2772 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2773
2774         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2775
2776 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2777
2778         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2779           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2780         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2781           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2782         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2783         * packihx/packihx.c (hexDigit): made c unsigned char
2784         * as/mcs51/lklibr.c (fndsym),
2785         * link/z80/lkgb.c (gb),
2786         * link/z80/lklibr.c (fndsym),
2787         * link/z80/lkrloc.c (relr),
2788         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2789         * src/SDCC.lex (checkCurrFile, process_pragma),
2790         * src/SDCCglue.c (spacesToUnderscores),
2791         * src/SDCCmain.c (setParseWithComma, processFile),
2792         * src/asm.c (tvsprintf, printCLine),
2793         * src/avr/gen.c (emitcode, aopPut),
2794         * src/ds390/gen.c (emitcode),
2795         * src/hc08/gen.c (emitcode, emitinline),
2796         * src/mcs51/gen.c (emitcode, genInline),
2797         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2798           tokenizeLineNode),
2799         * src/pic/ralloc.c (debugLog),
2800         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2801           tokenizeLineNode),
2802         * src/pic16/ralloc.c (debugLog),
2803         * src/z80/main.c (_process_pragma):
2804            made all ctype.h function calls safe
2805         * src/SDCCopt.c: include math.h for fabs
2806         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2807           and used them throughout the code to make ctype.h function calls safe
2808         * src/ds390/main.c (asmLineNodeFromLineNode),
2809         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2810         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2811            unsigned char*
2812         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2813           (newpCodeAsmDir): made ctype.h function calls safe
2814         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2815           pic16_emitcode):  made lbp unsigned char*
2816         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2817           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2818         * src/xa51/gen.c (emitcode),
2819         * src/z80/gen.c (_emit2): made lbp unsigned char*
2820         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2821            char*
2822
2823 2005-09-05 Raphael Neider <rneider AT web.de>
2824
2825         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2826           access bank splitpoint
2827
2828 2005-09-05 Raphael Neider <rneider AT web.de>
2829
2830         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2831
2832 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2833
2834         * .version: changed to version 2.5.3
2835         * doc/sdccman.lyx: changed version to 2.5.3,
2836           documented --codeseg and --constseg and pragma codeseg and constseg,
2837           documented bit parameters (reentrant) and bit returning
2838         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2839            currFunc->recvSize, but is this ok for all ports?
2840           (ast2iCode): result of ~ on unsigned char must be cast to int for
2841            bool to work
2842         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2843           function pointers in bit space
2844         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2845           (processFuncArgs): call port.reg_parm() with reentrancy info
2846         * src/port.h,
2847         * src/avr/main.c,
2848         * src/ds390/main.c,
2849         * src/hc08/main.c,
2850         * src/pic/main.c,
2851         * src/pic16/main.c,
2852         * src/xa51/main.c,
2853         * src/z80/main.c: port.reg_parm prototype extended with
2854           "bool reentrant" parameter
2855         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2856           options.stackAuto for allocating bit register parameters
2857         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2858           (genSend): set BitBankUsed if it is,
2859           (selectRegBank): factored out of genCall for use in genPcall,
2860           (genCall): removed redundant dtype assignmen, use selectRegBank,
2861           (genPcall): handle returning in Carry properly, save in F0 if needed,
2862           (genReceive): handle bit register parameters
2863         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2864           (mcs51_assignRegisters): enable bit registers for all reentrant
2865            functions and don't set BitBankUsed unconditionally
2866         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2867         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2868         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2869
2870 2005-08-27 Borut Razem <borut.razem AT siol.net>
2871
2872         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2873         ppc-osx (Darwin) does not support -u option. It seems that it is
2874         supported only on Linux - GNU cp
2875
2876 2005-08-25 Borut Razem <borut.razem AT siol.net>
2877
2878         * sim/ucsim/gui.src/serio.src/Makefile.in,
2879           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2880           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2881           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2882           install and strip, since the strip at /usr/ccs/bin should be used
2883           on solaris
2884
2885 2005-08-24 Borut Razem <borut.razem AT siol.net>
2886
2887         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2888
2889 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2890
2891         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2892         ffffffffu
2893
2894 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2895
2896         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2897         * as/mcs51/lkmain.c (link_main): fixed warning
2898         * device/include/stdbool.h: ds390 has no advanced bit support yet
2899         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2900         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2901         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2902           and updated their macros
2903         * src/SDCCval.c (constVal): updated comment for renamed b_long
2904
2905 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2906
2907         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2908         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2909           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2910           (oprio): set priority for '['
2911         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2912            and adb_24_bit
2913         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2914         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2915         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2916         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2917           added overlayable BIT_BANK area
2918         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2919           (summary2): explain 'T' in legenda
2920         * as/mcs51/lkrloc.c: replaced old K&R style,
2921           (relr): added R_BIT processing,
2922           (errmsg): added "Bit-addressable relocation error",
2923           (adb_bit): added for converting from byte- to bit-addressable space,
2924           (adb_24_bit): added for converting from byte- to bit-addressable space
2925         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2926            used in reentrant functions now even as return value
2927         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2928         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2929           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2930         * src/SDCCglobl.h: added indicator BitBankUsed
2931         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2932            the bit registers b0-b7
2933         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2934           (geniCodeCast): fixed bug 1263853,
2935           (geniCodeLogicAndOr): put result in bool or char,
2936           (geniCodeReceive): added parameter func for accessing the return type,
2937           (geniCodeFunctionBody): pass func to geniCodeReceive
2938         * src/SDCCmain.c: added indicator BitBankUsed
2939         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2940         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2941           (checkSClass): don't put automatic bool/bit on stack,
2942           (checkFunction): removed check on function cannot return bit
2943         * src/SDCCsymt.h: added newBoolLink prototype
2944         * src/mcs51/gen.c (rb1regs): added bit registers,
2945           (movc): created for assigning to carry,
2946           (pushReg, popReg): created for pushing registers,
2947           (sameRegs): check both AOP_REG and AOP_CRY types,
2948           (aopOp): handle bit registers,
2949           (aopPut): optimization no self-assign,
2950           (saveRegisters): push reg->base (bits) only once for bit registers,
2951            and use pushReg,
2952           (unsaveRegisters): pop reg->base only once and use popReg,
2953           (assignResultValue): added parameter func and return in carry for bits,
2954           (genIpush): optimization no reload in A if not changed,
2955           (genSend): bit parameters in reentrant functions are passed in bit
2956            registers by first assigning to bits in B, then save registers and
2957            copy B to bits,
2958           (genCall): handle returning in Carry properly, save it in F0 if needed,
2959           (genPcall): updated assignResultValue call, this is not safe yet for bit
2960            returning function !!!
2961           (genFunction): don't generate equ's for bit registers and use pushReg,
2962           (genEndFunction): take care of bit returning functions and use popReg,
2963           (genRet): return bit in Carry,
2964           (genIfx): optimize bit registers and other directly addressable bits,
2965           (genReceive): updated assignResultValue call
2966         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2967           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2968            registers when using stack-auto
2969         * src/mcs51/ralloc.c (_G): added allBitregs,
2970           (regs8051): added the bit registers,
2971           (createStackSpil): use macro IS_BIT,
2972           (getRegBit): added to allocate a bit register, else spill,
2973           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2974           (updateRegUsage): factored out to ease stepping while debugging,
2975           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2976            also allocate bit registers,
2977           (fillGaps): handle bit registers,
2978           (findAllBitregs): added to create bit vector with all bit registers,
2979           (mcs51_allBitregs): returns this bit vector,
2980           (mcs51_assignRegisters): when using stack-auto use bit registers for
2981            passing parameters and creating local variables
2982         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2983
2984 2005-08-22 Borut Razem <borut.razem AT siol.net>
2985
2986         * device/lib/Makefile.in: replaced find option -or with -o
2987           to make it run on solaris
2988
2989 2005-08-22 Raphael Neider <rneider AT web.de>
2990
2991         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2992           fixes #1265442 (crash on Solaris)
2993
2994 2005-08-20 Borut Razem <borut.razem AT siol.net>
2995
2996         * configure, configure.in: added tests for libsocket and libnsl libraries,
2997           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2998           from support/regression/Makefile.in
2999         * support/regression/Makefile.in: added
3000         * device/lib/pic16/Makefile.common.in: force make to use bash shell
3001         * sim/ucsim/libtool: regenerated on sparc-solaris
3002         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
3003           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
3004           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
3005           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
3006           sparc-solaris, which doesn't use GNU ld linker
3007         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
3008         * as/Makefile: find on sparc-solaris does not support -maxdepth option
3009
3010 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
3011
3012         * src/mcs51/peeph.def: updated comments
3013
3014 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3015
3016         * device/lib/_gptrget.c,
3017         * device/lib/_gptrput.c: slightly shorter
3018         * doc/sdccman.lyx: incremented version
3019         * src/mcs51/peeph.def: moved peephole comments to the line of first
3020           change to better keep line correlation, reanimated 186.e
3021         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
3022
3023 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3024
3025         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
3026           David Saxton with quotes around file name.
3027
3028 2005-08-15 Borut Razem <borut.razem AT siol.net>
3029
3030         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
3031           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
3032           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
3033           make tests run on x86_64 platform
3034
3035 2005-08-13 Raphael Neider <rneider AT web.de>
3036
3037         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
3038           as it might be executed DURING a build (parallel make is wonderful)
3039
3040 2005-08-13 Raphael Neider <rneider AT web.de>
3041
3042         * device/lib/Makefile.in (port-specific-objects-pic16):
3043           revert to cp $(PORT)/bin/*.* $(PORTDIR)
3044         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
3045           dependency
3046         * device/lib/pic16/Makefile.rules: build subdirs before creating
3047           the library, removed builddir rule, create $(builddir) early in
3048           recurse rule, use empty recurse rule for leaf directories
3049         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
3050           mkdir errors (race condition), removed duplicate suffix "hex"
3051           from clean rules
3052         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
3053         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
3054           prevents mkdir -p from aborting on Alpha
3055
3056 2005-08-12 Raphael Neider <rneider AT web.de>
3057
3058         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
3059           db-statements in order to allow for arrays of pointers in code
3060           sections to be placed without interspersed 0-padding, fixes
3061           bug #1256215
3062         * (emitStatistics): fixed division by zero for pic18f1220
3063         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
3064           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
3065         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
3066         * (pic16_pCodeConstString): keep track of already emitted string
3067           literals to prevent "duplicate definitions of symbol _str_NR"
3068         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
3069           debug message
3070         * device/lib/Makefile.in: ignore failing PIC16 library builds
3071         * device/lib/pic16/Makefile: do not build if gputils are missing
3072         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
3073
3074 2005-08-10 Raphael Neider <rneider AT web.de>
3075
3076         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
3077           my last commit)
3078
3079 2005-08-10 Raphael Neider <rneider AT web.de>
3080
3081         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
3082           Rokas' patch to add the new fixed point type "__fixed16x16"
3083         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
3084           functions for __fixed16x16 arithmetics
3085         * device/lib/pic16: reimplemented the build system to support
3086           a separate build directory, better handling of libio (create
3087           the library in a separate subdir for each architecture) and
3088           easier configuration (centralized in Makefile.common)
3089
3090 2005-08-07 Raphael Neider <rneider AT web.de>
3091
3092         * src/pic16/gen.c (genrshTwo): fixed sign extension
3093         * src/pic16/device.c: added pic18f2320, 4220 and 4320
3094         * device/include/pic16/pic18f2220.h: changed some bit definitions,
3095           added T0CONbits
3096         * device/include/pic16/pic18f4220.h: NEW, header for
3097           pic18f4220 and pic18f4320
3098         * device/include/pic16/pic18fregs.h: added new devices,
3099           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
3100         * device/include/pic16/signal.h: resolved name clashes
3101           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
3102           to also allow testing for interrupt enable bits, added
3103           comments on how to use the macros
3104         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
3105         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
3106           register definitions for the devices
3107         * device/lib/pic16/pics.all: added new devices
3108         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
3109           allocated memory
3110         * device/lib/pic16/libc/stdlib/memfree: do not count
3111           the block header as free memory
3112         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
3113           simplified and added missing end-of-blocklist-marker
3114           (reported by Peter Onion, fixes #1252814)
3115         * (_mergeHeapBlock): fixed loop condition
3116         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
3117           len==0, restructured code
3118         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
3119           up a bit, reduced bitfield accesses, prevent endless loops
3120           in case of heap corruption
3121         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
3122           "unreferenced arguments/must return a value" warnings
3123         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
3124           replaced BAUDREG with SPBRG
3125         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
3126           device/lib/pic16/debug/gstack/gstack.c: replaced
3127           _naked, _asm, _endasm with __naked, __asm, __endasm
3128
3129 2005-08-05 Raphael Neider <rneider AT web.de>
3130
3131         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
3132           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
3133
3134 2005-08-05 Borut Razem <borut.razem AT siol.net>
3135
3136         * device/lib/Makefile.in: added missing ';'
3137         * configure: removed ^M characters
3138
3139 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3140
3141         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
3142           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
3143           License
3144
3145 2005-08-04 Borut Razem <borut.razem AT siol.net>
3146
3147         * configure.in: pic16 libraries build 2nd try - enable running
3148           configure in device/lib/pic16
3149         * configure: regenerated from configure.in
3150         * device/lib/Makefile.in: create $(PORT)/bin directory
3151
3152 2005-08-03 Raphael Neider <rneider AT web.de>
3153
3154         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
3155           to get/set values via pointers
3156         * (genUnpackBits,genPackBits): changed detection of
3157           ptr->bitfield vs. sym.bitfield, fixed access via generic
3158           pointers, removed dead (wrong) code for multibyte bitfields
3159         * (genNearPointerGet, genGenPointerGet): removed useless code,
3160           fixed bitfield detection, fixes #1250594
3161         * (genNearPointerSet): removed useless code
3162         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
3163           and introduced macro pic16_emitpcode that conditionally emits
3164           the origin of the following pCode (useful for debugging SDCC)
3165         * src/pic16/pcode.c: changed (and disabled) some debug outputs
3166         * (createDefmap): fixed handling of LFSR for --optimize-df
3167
3168 2005-08-02 Borut Razem <borut.razem AT siol.net>
3169
3170         * device/lib/Makefile.in: pic16 libraries build enabled since
3171           gputils-0.13.2 are now localy installed at sourceforge's compile farm
3172
3173 2005-08-02 Raphael Neider <rneider AT web.de>
3174
3175         * src/pic16/gen.c (genPackBits): removed deprecated warning
3176         * (genGenPointerSet): fixed bitfield detection
3177
3178 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3179
3180         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
3181
3182 2005-07-31 Raphael Neider <rneider AT web.de>
3183
3184         * device/lib/pic16/libdev/pic18f458.c,
3185           device/include/pic16/pic18f458.h: added missing T0CONbits
3186
3187 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3188
3189         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
3190
3191 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
3192
3193         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
3194
3195 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3196
3197         * device/include/mcs51/at89c51ed2.h: added.
3198
3199 2005-07-23 Raphael Neider <rneider AT web.de>
3200
3201         * src/pic/gen.h: added emitpcode macro for debugging
3202         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
3203           and replace by macro adding debug information on demand
3204         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
3205         * (gencjne): tried to fix; replaced with correct (slower) code
3206         * (gen{Unp,P}ackBits): fixed single bit access
3207         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
3208         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
3209           previous instruction
3210         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
3211           register has to be handled with care (forbidding movement
3212           of assignments/uses, removing assignments completely, ...)
3213         * (pCodeOptime2pCodes): make use of regIsSpecial
3214         * added lots of debugging output (commented out)
3215         * src/pic/rallloc.c (deassignLRs): prevent operand registers
3216           from being reused as result UNLESS it is known to work
3217
3218 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
3219
3220         * support/Util/dbuf.h: include <stddef.h> for size_t
3221         * .version: changed to version 2.5.2
3222
3223 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3224
3225         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
3226
3227 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3228
3229         * src/hc08/gen.c (genMinus): fixed bug #1241835,
3230           (genModOneByte): removed needless psha/pula
3231
3232 2005-07-22 Raphael Neider <rneider AT web.de>
3233
3234         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
3235           have PIC14 handled like PIC16, fixes broken pic14 linker calls
3236         * src/pic/gen.c (resolveIfx): do not "invent" labels
3237         * (genSkipc): changed to positive logic
3238         * (genSkipCond): removed as no longer needed
3239         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
3240           backport from PIC16
3241         * (genLeftShift): check operands are in different registers
3242         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
3243           INCF does not update CARRY...
3244         * src/pic/main.c: fixed _linkCmd
3245         * src/pic/pcode.c (unlinkpCode): added inactive code
3246         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
3247           alive (do not assign result and operand overlapping registers)
3248
3249 2005-07-22 Raphael Neider <rneider AT web.de>
3250
3251         * src/pic/device.c (dump_sfr): replaced register declaration with
3252           call to emitSymbolToFile() to avoid duplicate symbols
3253         * (assignRelocatableRegisters): do not declare external symbols
3254         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
3255           right (take size of type, not etype)
3256         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
3257         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
3258         * (packRegsForAccUse): disabled assignment of WREG as
3259           the result reg to prevent occurence of just fixed #1235003,
3260           fixes #1242954
3261         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
3262           symbols (avoids duplicate symbols in .asm file)
3263         * (pic14emitRegularMap): use emitSymbolToFile()
3264         * src/pic/gen.c (aopOp): fixed spillLocation handling
3265         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
3266         * (genDataPointerSet): removed unneccessary variables/output
3267
3268 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
3269
3270         * as/mcs51/lkarea.c: enlarged codemap for banked memory
3271         * device/lib/mcs51/crtbank.asm: added # to 0x0F
3272
3273 2005-07-21 Raphael Neider <rneider AT web.de>
3274
3275         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
3276           architecture cannot handle them efficiently, fixes bug #1235003
3277         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
3278           check for empty sets before using them (fixes bug #1232190)
3279
3280 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
3281
3282         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
3283           (lnksect2): generate warnings for memory overlap
3284         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
3285           constseg to set the name of these segments so you can instruct the linker
3286           to place them in banks
3287         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
3288         * src/SDCCglobl.h: added MODEL_HUGE to enum,
3289           added code_seg and const_seg to options
3290         * src/SDCCglue.c (emitMaps): use options.const_seg,
3291           (createInterruptVect): put interrupt vectors in segment HOME,
3292           (glue): put HOME before static segment and put the main glue in HOME,
3293           (glue): use options.code_seg
3294         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
3295         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
3296           these segments so you can instruct the linker to place them in banks
3297           (linkEdit): use code_loc for HOME segment which should be the first
3298           segment in code memory now
3299         * src/SDCCmem.c: fixed more stuff like bug 1238386
3300         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
3301           (changePointer): don't change function pointers to code pointers for
3302           banked functions,
3303           (compareType): added exceptional check for banked function pointers
3304         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
3305         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
3306           after static in code memory
3307         * src/mcs51/gen.c: added aopLiteralLong prototype,
3308           (aopForSym): use getSize for functions,
3309           (genCall): generate banked calls over one trampoline __sdcc_banked_call
3310           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
3311           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
3312           the segment,
3313           (genPcall): use call for literal function pointers and generate banked
3314           calls over the one trampoline so there's only one place for the user to
3315           modify according to his/hers hardware,
3316           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
3317           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
3318         * src/mcs51/main.c: added keyword banked,
3319           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
3320         * support/Util/SDCCerr.c,
3321         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
3322           needed for passing the bank and address to the trampoline
3323         * device/lib/mcs51/crtbank.asm: added for bankswitching
3324         * device/lib/mcs51/Makefile: added crtbank
3325
3326 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3327
3328         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
3329           for fields at offset 0 of a struct or union as reported
3330           on 2005-07-07 in the developer mailing list.
3331
3332 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
3333
3334         * src/SDCCmem.c: fixed bug 1238386
3335
3336 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3337
3338         * src/mcs51/peeph.def: added labelrefcounting for peepholes
3339           (patch #1144962), added peephole 300, enabled 259.x
3340         * doc/sdccman.lyx: removed screenshot and provided link instead
3341
3342 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3343
3344         * doc/sdccman.lyx: added section about debugging with ddd
3345         * doc/figures/ddd_example.eps: screenshot of debugging session
3346
3347 2005-07-04 Raphael Neider <rneider AT web.de>
3348
3349         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
3350           like CODE pointers, fixes #1115683
3351         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
3352           call, fixes bugs #1232211, #1228110,
3353           fixed wrong casts to pCodeFlow from pCodeInstructions
3354
3355 2005-07-04 Raphael Neider <rneider AT web.de>
3356
3357         * src/pic/gen.c (popGet): changed assert to allow for
3358           bit operands
3359         * (popGetAddr): changed signature to provide
3360           an additional index, patched all call sites
3361         * (genCmpEq): handle literal-like operands correctly
3362         * (genAddrOf): added sanity checks on __code/__data pointers
3363         * (genAssign): added handling of symbols from __code section
3364         * (gencjne): do not generate code for comparisons whose result
3365           is neither stored nor used, fixes bug #1171114
3366         * (AccLsh, AccRsh): operate on operand instead of WREG
3367         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
3368           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
3369           by known count
3370         * rewrote complete shift-by-literal logic, commented unused
3371           functions out
3372         * (genConstPointerGet): get multiple bytes (if result size > 1),
3373           fixed handling of non-immediate addresses
3374         * (genPointerGet): handle CODE pointers like CONST pointers
3375         * (genpic14Code): insert C-SRC lines as Cource-pCodes
3376         * ({aop,op}_isLitLike): NEW, single place to decide whether an
3377           operand is to be treated as a literal or not
3378         * (mov2w,genPcall,genCmpEq),
3379           src/pic/genarith.c: use aop_isLitLike() to decide between
3380           literal/register contents
3381         * (addSign): added missing offset
3382         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
3383           only emit comment in debug-mode,
3384           use {aop,op}_isLitLike throughout the file
3385         * src/pic/glue.c: fix initializers for pointers (work in progress)
3386         * src/pic/pcode.c (get_op): honor index on _const symbols
3387         * ({reset,dump}pCodeStatistics): NEW, estimate code size
3388         * (dumppBlock): added pCode size estimation
3389         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
3390           check for IS_SYMOP before OP_SYMBOL'ing
3391         * fixed indentation, compacted switch-statements
3392         * (allocReg): find free register and allocate it instead of
3393           allocating new registers all the time
3394         * (deassignLRs): prevent POINTER_GET's from being assigned the same
3395           registers as its operands (necessary only for multibyte GETs)
3396
3397 2005-07-01 Raphael Neider <rneider AT web.de>
3398
3399         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
3400           debugging .asm-output macros FENTRY + FEXIT
3401         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
3402           way... I wonder...
3403         * (emitpComment): NEW, printf to pCode
3404         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
3405           offset handling
3406         * (popGetAddr): NEW, variant of popGet to access an immediates
3407           high(er) bytes instead of the n'th byte of memory they reference,
3408           replaced popGet with popGetAddr where neccessary
3409         * (genDataPointerGet): reactivated and fixed implementation
3410         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
3411           accesses
3412         * (genDataPointerSet): fixed multibyte assignments
3413         * (genpic14Code): fixed --i-code-in-asm handling
3414         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
3415         * (genPlus): fixed index-out-of-bounds error
3416         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
3417         * src/pic/ralloc.c: added debugging output macro FENTRY2
3418         * (spillThis): fixed indentation, enbraced for-body for clarity
3419         * (rematStr): commented out as now unused
3420         * (regTypeNum): commented out special spill case (overwrites
3421           arbitrary values)
3422         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
3423
3424 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
3425
3426         * doc/sdccman.lyx: documented sfr16/sfr32,
3427           added example for using storage class with function pointers
3428         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
3429
3430 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
3431
3432         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
3433         * device/lib/_itoa.c,
3434         * device/lib/_ltoa.c: optimized codesize
3435         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
3436           but don't know how to suppress the double warning.
3437         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
3438         * support/Util/SDCCerr.c,
3439         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
3440
3441 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
3442
3443         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
3444           fixed old K&R prototypes
3445         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
3446         * device/lib/_gptrget.c,
3447         * device/lib/_gptrgetc.c,
3448         * device/lib/_gptrput.c: changed versions for new memory indicator values,
3449           also new versions for small generic pointers and banked generic pointers
3450         * src/port.h: added const_name
3451         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
3452         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
3453         * src/SDCCcse.c (findPrevIc): check all associative operators
3454         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
3455         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
3456         * src/SDCCmem.c: updated comments,
3457           set far-space to 0 for pdata, results in optimized code
3458         * src/SDCCmem.h: added macro CONST_NAME
3459         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
3460           moving the info into the highest bits, see also gptrget/gptrput
3461         * src/src.dsp: added sdcc.ico to project files
3462         * src/avr/gen.c (genCast): fixed bug 0x%d
3463         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
3464         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
3465           relation between ptr_type and DCL_TYPE,
3466           (genCast): fixed bug 0x%d
3467         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
3468           (CODE)" for const_name
3469         * src/hc08/gen.c (genCast): fixed bug 0x%d
3470         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
3471           (hc08_port): added "CONST (CODE)" for const_name
3472         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
3473           (aopForRemat, adjustArithmeticResult): disconnected direct relation
3474           between ptr_type and DCL_TYPE,
3475           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
3476           operand* and took AOP() inside function so sfr-ness can be checked,
3477           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
3478           new prototype,
3479           (genFunction, genEndFunction): optimized stack setup,
3480           (genMinus): optimized for literals with ending zeroes (in bytes),
3481           (genCast): fixed bug 0x%d
3482         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
3483           (mcs51_port): added "CONST (CODE)" for const_name
3484         * src/mcs51/peeph.def: made rule 226 more generic
3485         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
3486         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
3487         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
3488         * src/z80/main.c (z80_port): added NULL for const_name,
3489           (gbz80_port): added NULL for const_name
3490         * support/regression/tests/bug663539.c,
3491         * support/regression/tests/sfr16.c: new tests
3492
3493 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3494
3495         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
3496
3497 2005-06-24 Raphael Neider <rneider AT web.de>
3498
3499         * device/lib/pic16/libdev/pic18f[68][567]20.c:
3500           corrected typos...
3501         * device/include/pic16/signal.h: added USBIF
3502           and SIG_USB
3503
3504 2005-06-24 Raphael Neider <rneider AT web.de>
3505
3506         * device/lib/pic16/libdev/pic18f2455.c,
3507           device/include/pic16/pic18f2455.h: NEW
3508         * device/include/pic16/pic18fregs.h,
3509           device/lib/pic16/pics.all,
3510           src/pic16/device.c: added 18f2455
3511         * device/lib/pic16/libdev/pic18f[68][567]20.c,
3512           device/include/pic16/{pic18f[68][567].h,usart.h}:
3513           replaced MULTIPLE_USARTS define with more relaible
3514           compatibility sfrs (for USART access)
3515
3516 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
3517
3518         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
3519           and the output asm file line is printed on two lines.
3520
3521 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3522
3523         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
3524           BGT, BLE, BHI, and BLS instructions
3525         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
3526           genCmpEq): removed
3527         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
3528           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
3529           fixes bug #1216342
3530         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
3531
3532 2005-06-15 Raphael Neider <rneider AT web.de>
3533
3534         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
3535         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
3536         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
3537           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
3538           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
3539
3540 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3541
3542         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
3543           Marcel Telka in bug #1215704
3544
3545 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
3546
3547         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
3548           located in shared memory bank.
3549
3550 2005-05-31 Raphael Neider <rneider AT web.de>
3551
3552         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
3553           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
3554           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
3555
3556 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
3557
3558         * device/lib/_strncpy.c: fixed the fix
3559
3560 2005-05-26 Raphael Neider <rneider AT web.de>
3561
3562         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
3563           initializers with \0, bug #1208187
3564         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
3565           intializers with \0, bug #1208187
3566
3567 2005-05-26 Raphael Neider <rneider AT web.de>
3568
3569         * src/pic16/glue.c (pic16_printIvalChar): fixed string
3570           initializers with \0, bug #1208187
3571         * src/pic16/main.c (_process_pragma): added sanity checks
3572           for stack position and size, emit warnings when appropriate
3573
3574 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
3575
3576         * device/lib/_strncpy.c: fixed not filling with \0
3577
3578 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3579
3580         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
3581           createFunction),
3582         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
3583           compound_statement),
3584         * src/SDCCsymt.h,
3585         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
3586
3587 2005-05-24 Raphael Neider <rneider AT web.de>
3588
3589         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
3590
3591 2005-05-24 Raphael Neider <rneider AT web.de>
3592
3593         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
3594           TRISE definitions, closes bug #1162453
3595
3596 2005-05-22 Raphael Neider <rneider AT web.de>
3597
3598         * src/pic16/main.c (_process_pragma): check for missing
3599           arguments to pragmas code and udata
3600         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
3601           consistency fixes to match other headers (thanks to Jim Paris)
3602         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
3603
3604 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
3605
3606         * src/SDCCicode.c (isOperandEqual): fixed missing ;
3607
3608 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
3609
3610         * support/regression/tests/bug1198642.c: new test
3611         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
3612         * src/SDCCcse.c (findPrevIc): added comment, please have a look
3613         * support/scripts/resource.h,
3614         * support/scripts/resource.rc,
3615         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
3616         * support/scripts/sdcc.ico: added 32x32 icon
3617
3618 2005-05-18 Raphael Neider <rneider AT web.de>
3619
3620         * device/lib/pic16/libdev/pic18f*.c,
3621         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
3622           keywords to "__sfr" and "__at (X)"
3623         * device/include/pic16/pic18fregs.h: added pic18f4520
3624         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
3625           #1203088 (MPLAB compatibility)
3626
3627 2005-05-17 Raphael Neider <rneider AT web.de>
3628
3629         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
3630         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
3631         * device/lib/pic16/pics.all: added new devices
3632         * src/pic16/device.c: added support for pic18f4520
3633
3634 2005-05-16 Raphael Neider <rneider AT web.de>
3635         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
3636         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
3637         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
3638           convenience function for bit access
3639
3640 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3641
3642         * device/lib/printf_large.c: fixed bug 1193299
3643         * support/regression/tests/bug1057979.c: added test %3.3s
3644
3645 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3646
3647         * device/include/mcs51/8051.h,
3648         * device/include/mcs51/8052.h: made parseable with lint
3649         * device/include/mcs51/lint.h: added include file for (sp)lint
3650         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
3651         * doc/cdbfileformat.lyx,
3652         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
3653
3654 2005-05-14 Raphael Neider <rneider AT web.de>
3655
3656         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
3657         * device/lib/pic16/libc/stdlib/itoa.c (new)
3658         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
3659         * device/lib/pic16/libio/Makefile: exclude subdir according to
3660           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
3661         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
3662         * src/pic16/gen.c (genFunction): prevent annoying warning
3663         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
3664           nameclashes on BeOS
3665         * support/cpp2/cppmain.c (cpp_output_string): new
3666         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
3667           fixes bug 1116802
3668
3669 2005-05-13 Borut Razem <borut.razem AT siol.net>
3670
3671         * src/SDCCmain.c (linkEdit): fixed bug 1195202
3672
3673 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3674
3675         * .version: changed to version 2.5.1; back to bleeding edge development
3676
3677 2005-05-11 Borut Razem <borut.razem AT siol.net>
3678
3679         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
3680           generate PDF version 1.3 documents
3681
3682 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3683
3684         * .version: changed to version 2.5.0
3685
3686 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3687
3688         * doc/sdccman.lyx: updated weblinks, index and smaller updates
3689
3690 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3691
3692         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3693         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3694         well as many smaller updates.
3695         * .version: changed to version 2.5.0-pre1
3696
3697 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3698
3699         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3700
3701 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3702
3703         * support/regression/tests/bug1185672.c: added
3704         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3705           bug 1185672
3706         * src/mcs51/gen.c (genCall): added comments, made it look safer
3707         * src/mcs51/gen.c (genEndFunction): simplified
3708
3709 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3710
3711         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3712
3713 2005-04-14 Borut Razem <borut.razem AT siol.net>
3714
3715         * fixed bug 1045046 - SIGSEGV with really simple code?:
3716           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3717           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3718
3719 2005-04-14 Borut Razem <borut.razem AT siol.net>
3720
3721         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3722           src/pic16/device.h: temporarily disabled experimental #inline pragma
3723           for 2.5.0 release
3724
3725 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3726
3727         * device/include/z80/stdio.h,
3728         * device/include/z80/string.h: removed these highly incomplete files so
3729           SDCC can use the default ones in device/include/
3730
3731 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3732
3733         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3734         gcc warning.
3735         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3736         fix sdcpp warnings.
3737
3738 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3739
3740         * device/include/malloc.h: removed redundant __reentrant prototypes
3741         * device/lib/_mullong.c: added working xstack variant in asm (C version
3742           doesn't pass regression tests)
3743         * device/lib/bpx.c: used __data and made bpx char for mcs51
3744         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3745           (createFunction): fixed bug with xstackPtr
3746         * src/SDCCcse.c: corrected comments
3747         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3748           (killDeadCode, eBBlockFromiCode): removed unused code
3749         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3750           corrected comments
3751         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3752           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3753           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3754           (genModOneByte): fixed warning in MSVC
3755         * src/mcs51/main.c (): added comments
3756         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3757
3758 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3759
3760         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3761
3762 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3763
3764         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3765
3766 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3767
3768         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3769         characters arrays of larger size than the declared one.
3770
3771 2005-04-10 Borut Razem <borut.razem AT siol.net>
3772
3773         * src/pic/gen.c (genInline),
3774           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3775           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3776           (findNextInstruction), (findPrevInstruction),
3777           (findInstructionUsingLabel),
3778           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3779         * src/pic/pcode.c (findLabel): added missing '\n'
3780         * src/src.dsp: added SDCCdwarf2.c to the project
3781
3782 2005-04-09 Borut Razem <borut.razem AT siol.net>
3783
3784         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3785
3786 2005-04-08 Raphael Neider <rneider AT web.de>
3787
3788         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3789           into the chain after a given one) and mergeDefmapSymbols (combine
3790           defmap entries for each symbol per pcode)
3791         * (createDefmap): have defmap entries merged in the end
3792         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3793           a symbol before replacing one access type's symbol, merge symbols in
3794           the end (replacement symbol might already have an entry)
3795         * (assignValnums): keep reference to written WREG intact
3796
3797 2005-04-08 Raphael Neider <rneider AT web.de>
3798
3799         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3800           Alpha)
3801
3802 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3803
3804         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3805         bytes
3806
3807 2005-04-07 Raphael Neider <rneider AT web.de>
3808
3809         * device/include/pic16/usart.h: added compatibility defines for
3810           devices with more than one USART
3811         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3812
3813 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3814
3815         * device/lib/Makefile.in: updated for port specific include
3816
3817 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3818
3819         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3820
3821 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3822
3823         * device/include/8051.h,
3824         * device/include/8052.h,
3825         * device/include/at89S8252.h,
3826         * device/include/at89c55.h,
3827         * device/include/at89x051.h,
3828         * device/include/at89x51.h,
3829         * device/include/at89x52.h,
3830         * device/include/mcs51reg.h,
3831         * device/include/reg51.h,
3832         * device/include/reg764.h,
3833         * device/include/regc515c.h,
3834         * device/include/sab80515.h: (re)moved these 12 files
3835         * device/include/mcs51/8051.h,
3836         * device/include/mcs51/8052.h,
3837         * device/include/mcs51/at89S8252.h,
3838         * device/include/mcs51/at89c55.h,
3839         * device/include/mcs51/at89x051.h,
3840         * device/include/mcs51/at89x51.h,
3841         * device/include/mcs51/at89x52.h,
3842         * device/include/mcs51/mcs51reg.h,
3843         * device/include/mcs51/reg51.h,
3844         * device/include/mcs51/reg764.h,
3845         * device/include/mcs51/regc515c.h,
3846         * device/include/mcs51/sab80515.h: and added them here
3847
3848 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3849
3850         * device/include/stdarg.h: changed SDCC specific keywords to double
3851           underlined form.
3852         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3853           mcs51 and ds390.
3854         * device/include/hc08/mc68hc908gp32.h,
3855         * device/include/hc08/mc68hc908jb8.h,
3856         * device/include/hc08/mc68hc908jkjl.h,
3857         * device/include/hc08/mc68hc908qy.h: fixed comments
3858         * device/include/mcs51/README: updated
3859         * device/include/mcs51/c8051f120.h: added PINRSF
3860         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3861         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3862           amidst code. Also inline is not supported.
3863
3864 2005-04-06 Raphael Neider <rneider AT web.de>
3865
3866         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3867         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3868           callers stack/frame pointers
3869
3870 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3871
3872         * device/include/pic16/usart.h: added, missing in previous commit,
3873         * device/include/pic16/adc.h: fixed typo,
3874         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3875         commit,
3876         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3877         <p18fxxx.inc>
3878         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3879         uninitialized because a bug appears with gplink
3880         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3881         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3882         complains for unrecognised option
3883
3884 2005-04-05 Raphael Neider <rneider AT web.de>
3885
3886         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3887           structs as well (using memcpy)
3888         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3889           on ISRs (GOTO has no label)
3890         * src/pic16/device.h: added OF_OPTIMIZE_DF
3891         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3892           new data flow analysis/optimization
3893         * src/pic16/pcode.c: added (prototypes for and implementation of)
3894           dataflow analysis functions, fixed pCodeInstructions' inCond and
3895           outCond values, made RCALL a branch instruction
3896         * (pic16_unlinkpCode): keep C line if possible
3897         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3898           C line moved if possible
3899         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3900         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3901           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3902         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3903           new flow)
3904         * (pic16_getJumptabpCode): NEW, needed in...
3905         * (LinkFlow): fixed handling of jumptables, calls and conditional
3906           branches
3907         * (pic16_InsertCommentAfter): NEW
3908         * (pic16_pCodeReplace): made verbose and flow preserving
3909         * (AnalyzeFlow): added call to data flow analysis
3910         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3911         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3912         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3913
3914 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3915
3916         * src/SDCCast.c (decorateType): fixed bug #1105626
3917
3918 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3919
3920         * device/include/asm/pic16/features.h,
3921         * pic18f*.h headers,
3922         * device/include/pic16/adc.h,
3923         * device/include/pic16/delay.h,
3924         * device/include/pic16/i2c.h,
3925         * device/include/pic16/malloc.h,
3926         * device/include/pic16/stdio.h,
3927         * device/include/pic16/stdlib.h,
3928         * device/include/pic16/string.h,
3929         * device/lib/pic16/libc/stdio/printf_tiny.c,
3930         * device/lib/pic16/libc/stdio/printf_small.c,
3931         * device/lib/pic16/libc/stdio/strmgpsim.c,
3932         * device/lib/pic16/libc/stdio/strmmssp.c,
3933         * device/lib/pic16/libc/stdio/strmusart.c,
3934         * device/lib/pic16/libc/stdio/vfprintf.c,
3935         * device/lib/pic16/libc/stdlib/ltoa.c,
3936         * device/lib/pic16/libc/stdlib/putchar.c,
3937         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3938         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3939         * device/lib/pic16/libc/stdlib/memchrram.c,
3940         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3941         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3942         * device/lib/pic16/libio/adc/adcbusy.c,
3943         * device/lib/pic16/libio/adc/adcread.c,
3944         * device/lib/pic16/libio/adc/adcsetch.c,
3945         * device/lib/pic16/libio/usart/ubaud.c,
3946         * device/lib/pic16/libio/usart/ubusy.c,
3947         * device/lib/pic16/libio/usart/udrdy.c,
3948         * device/lib/pic16/libio/usart/uopen.c,
3949         * device/lib/pic16/libio/usart/uputc.c,
3950         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3951         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3952         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3953         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3954         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3955         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3956         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3957         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3958         specific keywords to double underlined form,
3959         * device/lib/pic16/libc/Makefile.rules,
3960         * device/lib/pic16/libsdcc/Makefile.rules,
3961         * device/lib/pic16/libm/Makefile,
3962         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3963         to compile with C standard set in Makefile.common
3964         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3965         rand.c and crc.c in compilation process,
3966         * device/lib/pic16/libsdcc/int/divuint.c,
3967         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3968         `c' from signed to unsigned,
3969         * device/lib/pic16/startup/crt0.c,
3970         * device/lib/pic16/startup/crt0i.c,
3971         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3972         keywords to double underlined form, bug fixes in _do_cinit function
3973         which prevented the correct initialization of the .idata segment,
3974         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3975         core to enter a infinite loop
3976         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3977
3978 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3979
3980         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3981
3982 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3983
3984         * device/include/Makefile.in: add support for hc08 subdirectory
3985         * device/include/hc08/: new subdirectory
3986         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3987         Lucas Loizaga, thanks!
3988         * device/include/hc08/mc68hc908qy.h,
3989         * device/include/hc08/mc68hc908gp32.h,
3990         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3991         their own directory. Changed internal macro names to use the compiler
3992         reserved namespace. Changed SDCC specific keywords to double
3993         underlined form.
3994         * device/include/math.h,
3995         * device/include/malloc.h,
3996         * device/include/stdarg.h,
3997         * device/include/stdbool.h
3998         * device/include/string.h,
3999         * device/include/tinibios.h,
4000         * device/include/ds400rom.h,
4001         * device/include/8051.h,
4002         * device/include/8052.h,
4003         * device/include/80c51xa.h,
4004         * device/include/at89c55.h,
4005         * device/include/at89S8252.h,
4006         * device/include/at89x51.h,
4007         * device/include/at89x52.h,
4008         * device/include/ds80c390.h,
4009         * device/include/reg764.h,
4010         * device/include/regc515c.h,
4011         * device/include/sab80515.h,
4012         * device/include/mcs51/c8051f000.h,
4013         * device/include/mcs51/c8051f018.h,
4014         * device/include/mcs51/c8051f020.h,
4015         * device/include/mcs51/c8051f040.h,
4016         * device/include/mcs51/c8051f060.h,
4017         * device/include/mcs51/c8051f120.h,
4018         * device/include/mcs51/c8051f300.h,
4019         * device/include/mcs51/c8051f310.h,
4020         * device/include/mcs51/c8051f320.h,
4021         * device/include/mcs51/c8051f330.h,
4022         * device/include/mcs51/c8051f350.h,
4023         * device/include/z180.h: Changed SDCC specific keywords to double
4024         underlined form.
4025
4026 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
4027
4028         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
4029         18F4455,
4030         * (pic16_assignConfigWordValue): disable testing of configuration
4031         register value with config mask,
4032         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
4033         function with port->fun_prefix,
4034         * (genFunction): when generating a naked interrupt function never
4035         create an absolute segment placed in interrupt vector address, place
4036         the actual interrupt function at IVA instead, when an interrupt
4037         function is generated with unspecified interrupt then do not create
4038         the absolute section,
4039         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
4040         code for generating a call to generic pointer get/put function with
4041         a call to function pic16_callGenericPointer(),
4042         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
4043         the call to the generic pointer get/put functions with prefixing the
4044         function name with port->fun_prefix,
4045         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
4046         * src/pic16/main.c (_process_pragma): prefix function with
4047         port->fun_prefix,
4048         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
4049         calling assembler, old 18Fxxxx macro is deprecated,
4050         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
4051         PC_ASMDIR in while condition,
4052         * (findInstruction): add PC_ASMDIR in while condition,
4053         * (buildCallTree): prefix main with port->fun_prefix,
4054         * (pic16_pCode2str): fixed bug that didn't emit the memory access
4055         identifier for variable with banked access in instructions BTFSS,
4056         BTFSC, BCF, BSF, BTG
4057         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
4058         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
4059         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
4060         perform optimization when enviroment variable NO_REG_OPT is set,
4061         * (insideLRBlock): NEW, return 1 if register is inside an
4062         INF_LOCALREGS block,
4063         * (RemoveRegFromLRBlock): remove a register that is completely
4064         eliminated by register optimization, but it is still left in local
4065         register store/restore in/from stack block,
4066         * (Remove2pcodes): after removing register, check to see if it
4067         should be removed from local register store/restore in/from stack
4068         block,
4069         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
4070         DUMMY_READ_VOLATILE,
4071
4072         * device/include/pic16/adc.h: minor prototype modifications and
4073         update,
4074         * device/include/pic16/malloc.h: added GPL notice various
4075         modifications,
4076         * device/include/pic16/stdint.h: NEW, standard header for ints
4077         * device/include/pic16/delay.h: NEW, header for delay functions,
4078         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
4079         delay1mtcy,
4080         * device/include/pic16/signal.h: NEW, header providing helper macros
4081         for implementing signal handlers,
4082         * device/include/pic16/stdio.h: added prototypes for functions,
4083         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
4084         prototypes for stdin and stdout, added macro PUTCHAR to
4085         automatically implement putchar function prototype,
4086         * device/include/pic16/usart.h: modified and updated USART library,
4087         * device/lib/pic16/libio/adc/,
4088         * device/lib/pic16/libio/i2c: some modifications to improve library
4089         performance,
4090         * device/lib/pic16/libc/stdio/: modifications for the new printf*
4091         family of functions,
4092         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
4093         family of functions and other sources,
4094         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
4095         of the PIC18Fxx[28] devices,
4096         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
4097         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
4098         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
4099         _do_cinit function, because the previous failed when local variables
4100         where not placed in the same memory bank,
4101         * device/lib/pic16/libsdcc/char/: various modifications to improve
4102         library performance,
4103         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
4104         information on the new functions of the c library and more...
4105
4106 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4107
4108         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
4109
4110 2005-03-26 Raphael Neider <rneider AT web.de>
4111
4112         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
4113           if condition == CARRY)
4114         * (genCmp): adapted to new genSkipc semantics
4115         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
4116           on rIfx (genCmp was broken)
4117
4118 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4119
4120         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
4121         * src/z80/main.c (_keywords[]),
4122         * src/SDCCglobal.h (struct options),
4123         * src/SDCC.y,
4124         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
4125         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
4126         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
4127         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
4128         always available in leading double underscore form. The C99 support is
4129         mostly missing, but it's a start.
4130         * support/regression/tests/bug-227710.c: fixed nonconforming use of
4131         reserved identifier "__data".
4132
4133 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
4134
4135         * src/mcs51/peeph.def: fixed bug 1170013
4136
4137 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
4138
4139         * device/include/mcs51reg.h: fixed bug 842007
4140
4141 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4142
4143         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
4144         last time.
4145
4146 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4147
4148         * src/port.h (struct PORT),
4149         * src/avr/ralloc.c (avr_assignRegisters),
4150         * src/avr/main.c,
4151         * src/ds390/ralloc.c (ds390_assignRegisters),
4152         * src/ds390/main.c,
4153         * src/hc08/ralloc.c (hc08_assignRegisters),
4154         * src/hc08/main.c,
4155         * src/mcs51/ralloc.c (mcs51_assignRegisters),
4156         * src/mcs51/main.c,
4157         * src/pic/ralloc.c (pic14_assignRegisters),
4158         * src/pic/main.c,
4159         * src/pic16/ralloc.c (pic16_assignRegisters),
4160         * src/pic16/main.c,
4161         * src/xa51/ralloc.c (xa51_assignRegisters),
4162         * src/xa51/main.c,
4163         * src/z80/ralloc.c (z80_assignRegisters),
4164         * src/z80/ralloc.h,
4165         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
4166         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
4167         * src/SDCCcse.h,
4168         * src/SDCCdflow.c (computeDataFlow),
4169         * src/SDCCdflow.h,
4170         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
4171         * src/SDCCloop.h,
4172         * src/SDCCcflow.c (*),
4173         * src/SDCCcflow.h,
4174         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
4175         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
4176         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
4177         immedDom() returning wrong block; probably fixes bug #1160833)
4178
4179 2005-03-20 Borut Razem <borut.razem AT siol.net>
4180
4181         * support/scripts/inc2h.pl: WIN32 port
4182
4183 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
4184
4185         * device/lib/makefile.in: added abs.c and labs.c
4186
4187 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
4188
4189         * device/include/stdint.h: added
4190         * device/lib/abs.c: added
4191         * device/lib/labs.c: added
4192         * device/include/stdlib.h: added abs() and labs() prototypes
4193         * device/lib/libsdcc.lib: added abs and labs
4194         * device/include/float.h,
4195         * device/lib/_fsmul.c,
4196         * device/lib/printf_fast.c,
4197         * device/lib/printf_tiny.c: updated comments
4198
4199 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4200
4201         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
4202         bug #1164313
4203
4204 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4205
4206         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
4207         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
4208
4209 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
4210
4211         * device/lib/printf_large.c: removed inline assembly for portability and
4212           readability. Use printf_fast if speed or size are more important.
4213         * src/pic16/gen.c: removed conditions around use of DEBUGpc
4214         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
4215
4216 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
4217
4218         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
4219         prevent compiler warning
4220
4221 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
4222
4223         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
4224         moved to level 0 and declared as static. Also they are explicit
4225         placed in access bank. This was necessery because some times they
4226         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
4227         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
4228         optimizations. Currently only compare to unsigned char is implemented,
4229         * src/pic16/gen.c: added fReturnIdx array,
4230         * (struct resolvedIfx) is moved to gen.h and made public,
4231         * (struct _G): added sregsAlloc and sregsAllocSet fields,
4232         * (aopForSym): added an optimization to directly store in stack of
4233         the operand of a SEND iCode,
4234         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
4235         but as registers instead (AOP_REG) using the fReturnIdx array,
4236         * (pic16_freeAsmop): remove the freed register from the
4237         _G.sregsAlloc field,
4238         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
4239         a compare of 'WREG',
4240         * (pic16_popGetTempRegCond): changed function prototype, now
4241         function takes also a bitVector argument v which holds the current
4242         set of registers that are allocated for stack access by aopForSym,
4243         registers allocated in aopForSym for accessing stack symbols are not
4244         any more part of the functions usedRegs field,
4245         * (genCall): some times aopOp is called for a stack variable to be
4246         send, aopForSym might perform the push, if this is true make sure
4247         that genCall doesn't push the variable twice by testing _G.resDirect,
4248         * (genFunction): changed testing for unspecified interrupt number
4249         from 256 to INTNO_UNSPEC,
4250         * modified selection scheme of frame pointer generation. Previously
4251         if function did use local registers a frame pointer was generated,
4252         now a frame pointer is generated only if function has arguments
4253         (that need PLUSW2 register access), or has stack arguments, or the
4254         compiler is not instructed to omit the frame pointer,
4255         * (genEndFunction): before restoring local registers that were saved
4256         in the function preamble, also restore the registers that *might*
4257         have been allocated for stack access,
4258         * (genRet): removed some old comments,
4259         * (genCmp, the active (RN's) version): added a call to the
4260         pic16_genCmp_special function to perform the compare with a more
4261         robust and optimized way,
4262         * (genInline): a feature has been added in inline code generation,
4263         which allows a wildcard variable substitution when writing inline
4264         assembly. Code is incomplete and experimental therefore undocumented,
4265         * (genCast): changed order of aopOp for result and right to allow
4266         aopForSym to directly load the result if possible,
4267         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
4268         perform an optimized compare on some selected special occasions,
4269         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
4270         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
4271         generate an IVT any more,
4272         * src/pic16/main.c (pic16_optionsTable): added command line option
4273         --optimize-cmp,
4274         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
4275         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
4276         macros,
4277         * src/pic16/NOTES: Raphael Neider added in list of active developers
4278         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
4279         jumptable_end to prevent bug #,
4280         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
4281         inCond and outCond fields,
4282         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
4283         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
4284         turn off register spilling,
4285         * (packRegsForOneUse): synced with other ports' versions although it
4286         is not used currently,
4287         * (pic16_packRegisters): added an optimization while reading
4288         structure bitfields, some registers may be saved (malloc code is
4289         decreased by 80 bytes)
4290
4291 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
4292
4293         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
4294         left is a bitfield, if yes, then don't optimize assignment. Perhaps
4295         this can be optimized more?
4296
4297 2005-03-10 Raphael Neider <rneider AT web.de>
4298
4299         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
4300           genNearPointerGet): (hopefully) fixed access to bitfields via
4301           pointers (p->bitN = x; and x = p->bitN; failed)
4302
4303 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
4304
4305         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
4306
4307 2005-03-09 Raphael Neider <rneider AT web.de>
4308
4309         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
4310
4311 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
4312
4313         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
4314         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
4315           (regTypeNum): set REG_BIT type if necessary
4316         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
4317         * support/regression/tests/critical.c: check bug 1144613
4318
4319 2005-03-02 Raphael Neider <rneider AT web.de>
4320
4321         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
4322
4323 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4324
4325         * src/avr/ralloc.c (serialRegAssign),
4326         * src/ds390/ralloc.c (serialRegAssign),
4327         * src/hc08/ralloc.c (serialRegAssign),
4328         * src/mcs51/ralloc.c (serialRegAssign),
4329         * src/pic/ralloc.c (serialRegAssign),
4330         * src/pic16/ralloc.c (serialRegAssign),
4331         * src/xa51/ralloc.c (serialRegAssign),
4332         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
4333
4334 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
4335
4336         * src/SDCCast.c (decorateType): fixed bug 1124787
4337
4338 2005-02-20 Hubert Sack <sack AT digiplan.de>
4339         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4340
4341         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
4342         patch #1121755
4343
4344 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4345
4346         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
4347         to keep the correct label reference count when adding/removing references
4348         to labels. A peephole file using this is appended to patch #1144962.
4349
4350 2005-02-14 Raphael Neider <rneider AT web.de>
4351
4352         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
4353         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
4354         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
4355           retrievals of result operand's value on assignment
4356
4357 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
4358
4359         * device/include/pic16/string.h: modified prototype for memccpy()
4360         to memccpy(void *, void *, char, size_t)
4361         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
4362         check whether to omit frame pointer or not,
4363         * (genInline): convert all occurences of "\n" to LF in inline
4364         assembler blocks, this helps formatting the inline text,
4365         * (pic16_loadFSR0): modified prototype,
4366         * (genNearPointerGet, genNearPointerSet): reorganization of code,
4367         removed some 8051 legacy code,
4368         * (genPackBits): enabled handling bitfields exceeding one byte in size,
4369         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
4370         before allocating temporary registers in functions,
4371
4372 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
4373
4374         * support/regression/tests/bitvars.c: corrected the "fix"
4375
4376 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
4377
4378         * support/regression/tests/bitvars.c,
4379         * support/regression/tests/bitwise.c,
4380         * support/regression/tests/rotate.c: "fixed" problems on Alpha
4381
4382 2005-02-10 Raphael Neider <rneider AT web.de>
4383
4384         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
4385           different size for Alpha
4386         * src/pic16/gen.c (genCmpEq) : improved compare with 0
4387
4388 2005-02-09 Raphael Neider <rneider AT web.de>
4389
4390         * src/SDCC.lex(doPragma) : save and restore warning options as well
4391           (also added new stack plus clone- and copyAndFreeSDCCERRG())
4392         * have #pragma less_pedantic set the errorlevel to WARNING
4393           (fixes #1117001)
4394         * (cloneOptimize) : fixed wrong malloc's size
4395         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
4396           facilitate correct handling of #pragma (save|restore)
4397
4398 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
4399
4400         * src/mcs51/gen.c: removed non-standard C nameless struct/union
4401
4402 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
4403
4404         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
4405
4406 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
4407
4408         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
4409
4410 2005-02-02 Raphael Neider <rneider AT web.de>
4411
4412         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
4413         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
4414         * (pic16_storeForReturn): fixed to allow returning function pointers
4415         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
4416         * device/include/pic16/{stddef.h,stdbool.h}: added
4417
4418 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
4419
4420         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
4421
4422 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
4423
4424         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
4425         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
4426          appeared to be required
4427
4428 2005-01-31 Borut Razem <borut.razem AT siol.net>
4429
4430         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
4431           include/mcs51 and include/z80 directories to the package
4432
4433 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4434
4435         * src/hc08/gen.c (genFunction): fixed bug #1112752
4436
4437 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4438
4439         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
4440
4441 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4442
4443         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
4444
4445 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
4446
4447         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
4448
4449 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
4450
4451         * device/include/c8051fxxx.h: removed these 6 files
4452         * device/include/mcs51/c8051fxxx.h: added these 11 new files
4453
4454 2005-01-26 Raphael Neider <rneider AT web.de>
4455
4456         * src/pic16/gen.c (genAssign): fixed assignment from longs
4457           in codespace (were cut to three bytes)
4458         * (genDummyRead): implemented (except for CODESPACE...),
4459           fixed bug #1108575
4460         * src/pic16/glue.c (emitStatistics): beautified
4461         * device/lib/pic16/libm/Makefile: added include path
4462
4463 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4464
4465         * src/z80/gen.c (aopPut): fixed bug #1103902
4466
4467 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4468
4469         * device/lib/expf.c: fixed bug #1095792
4470
4471 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
4472
4473         * device/lib/pic16/libm: added Math library sources
4474
4475 2005-01-24 Raphael Neider <rneider AT web.de>
4476
4477         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
4478           to enable upcast to pCodeOpReg2 (there is no type tag to
4479           differenciate the two and pic16_popGet2p cast into PCOR2)
4480         * src/pic16/main.c (_process_pragma): fixed another malloc bug
4481           (sizeof(sectNames) changed to sizeof(sectName))
4482           Both patches fix segfaults under MinGW.
4483
4484 2005-01-23 Raphael Neider <rneider AT web.de>
4485
4486         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
4487           Safe_[mc]?alloc()'ed variables
4488         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
4489           of (byte sized) temporaries (assign them to WREG for now)
4490         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
4491           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
4492           this might fix SIGSEGVs on MinGW...
4493         * src/SDCCopt.c (killDeadCode): restored original behaviour
4494           (volatile operands might get thrown away though)
4495
4496 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
4497
4498         * src/pic16/gen.c: fixed bug #1106975,
4499         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
4500         pointer update, INTCON is saved, global interrupts are disabled and
4501         restored after updateing TOS.
4502         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
4503         * added function attribute 'shadowregs' to take advantage of shadow
4504         registers,
4505         * added function attribute 'wparam' as an alternative to the wparam
4506         pragma,
4507         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
4508         user declares a non-ISR function as 'shadowregs',
4509         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
4510
4511 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
4512
4513         * .version: bumped version number to 2.4.8
4514         * device/lib/pic16/pics.all: list of PIC18F devices supported by
4515         pic16 port,
4516         * device/lib/pic16/libio/i2c/: I2C module support library,
4517         * device/include/pic16/i2c.h: I2C support library header,
4518         * device/lib/pic16/libc/stdio/: standard IO support sources,
4519         * (printf_small.c): printf_small() source, supports float print,
4520         * (printf_tiny.c): printf_tiny() source, does not support floats,
4521         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
4522         enable global optimizations for entire library source, other
4523         Makefiles in the source tree are also modified to reflect this,
4524         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
4525         function,
4526         * doc/sdccman.lyx: updated to reflect new changes,
4527         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
4528         sym->onStack if-case,
4529         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
4530         sbit, idata, _idata, xdata, _xdata,
4531         * added pragma library, to link an external library, (see doc),
4532         * removed command line options, --pomit-config-words, --pomit-ivt,
4533         --pleave-reset-vector,
4534         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
4535         when calling assembler to reflect memory model used, also define
4536         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
4537         reflect stack model used,
4538         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
4539         on stack return NULL,
4540
4541 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4542
4543         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
4544           of the operands is volatile. Fixes #1020220
4545
4546 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4547
4548         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
4549         * (OptimizeRegUsage): make sure that there is really no other flow where
4550           the first pCode is used
4551
4552 2005-01-22 Raphael Neider <rneider AT web.de>
4553
4554         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
4555           to fix #1106967 (pCode->seq are not set up correctly)
4556
4557 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4558
4559         * src/SDCCglue.c (glue): make sure code area is declared before the
4560         static initialization area.
4561
4562 2005-01-21 Raphael Neider <rneider AT web.de>
4563
4564         * device/lib/Makefile.in: fixed test for pic16 install dir
4565         * device/lib/pic16/*/Makefile*: modified compile flags to enable
4566           optimizations
4567         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
4568           added --optimize-goto compiler switch and pragma wparam documentation
4569         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
4570         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
4571           and PRODH closing bug #1071770 (peephole optimizer)
4572
4573 2005-01-19 Raphael Neider <rneider AT web.de>
4574
4575         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
4576           cmdLine buffers (used when calling sdcpp...) are large enough
4577           (MAX_PATH=256 truncates arguments leading to system halts when
4578           used in MinGW...)
4579         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
4580         * (genUminus): rewritten to for efficiency
4581         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
4582           used uninitialized in some cases)
4583         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
4584           copy the third byte from the int -- now assumes 0x80 (data memory)
4585         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
4586           operands (genAddLit expects the iCode's operands to swapped as
4587           well), fixed leftover bytes (crashed for short left operands)
4588         * (pic16_genMinusDec): performance improvements, removed false
4589           PIC14 emitSKPNCs
4590         * (pic16_genMinus): fixed to cope with differently sized operands
4591         * src/pic16/glue.c (pic16_glue): added new banksel optimization
4592           for --obanksel > 1
4593         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
4594         * src/pic16/graph.[ch]: implementation of directed graphs, used by
4595           new banksel optimization
4596         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
4597           analysis for temporary registers (segfaults...)
4598         * src/pic16/peeph.def: added rule
4599
4600 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
4601
4602         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
4603         which converts a float number to its ASCII representation
4604         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
4605         functions to convert the fractional and integer part of a float to ASCII,
4606         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
4607         realloc.c): added _MALLOC_SPEC to explicit place variables in data
4608         ram
4609         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
4610         _STATMEM macros,
4611         * device/include/pic16/adc.h: added GPL info,
4612         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
4613         a pCodeOp as tested operand,
4614         * (genNearPointerGet): optimized bit testing, does not use
4615         intermediate register for bit value, test directly instead with
4616         BTFSS, BTFSC, works only for single bits,
4617         * (genpic16Code): dump the name of the iCode in the asm,
4618         * src/pic16/ralloc.c (decodeOp): removed static declaration and
4619         renamed to pic16_decodeOp,
4620         * (serialRegAssign): do not allocate a temporary register for iCode
4621         sequences that test a single bit for 1/0
4622
4623 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
4624
4625         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
4626         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
4627         access stack and frame pointers. They are initially assigned to
4628         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
4629         accessing SFRs. Updated all occurences of modification of stack or
4630         frame pointer in gen.c and pcode.c,
4631         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
4632         assigning of a literal value to pointers,
4633         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
4634         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
4635         selected
4636
4637 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4638
4639         * doc/sdccman.lyx: update documentation about stack pragma, added
4640         some info for stack memory models
4641
4642 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4643
4644         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
4645
4646 2005-01-08 Raphael Neider <rneider AT web.de>
4647
4648         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
4649           udata sections to fix bug #1097823
4650
4651 2005-01-05 Raphael Neider <rneider AT web.de>
4652
4653         * src/pic16/gen.c (genGenericShift): added handling of differently
4654           sized left operand and result
4655
4656 2005-01-04 Raphael Neider <rneider AT web.de>
4657
4658         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
4659         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
4660           to hold the condition bit)
4661         * added new version of genCmp (old code available via #define)
4662         * added new version of genShiftLeft/genShiftRight in a generic
4663           way, now supports shifting by negative values
4664         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
4665           shiftCount (expected by genGenericShift)
4666         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
4667         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
4668           dump
4669         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
4670           is an invalid literal too...)
4671
4672 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
4673
4674         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
4675         from Raphael Neider,
4676         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
4677         for 8-bit literals. This fixes some literal operands which are sign
4678         extended to 16-bits ints when instruction needs only 8-bits.
4679
4680 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
4681
4682         * device/lib/logf.c: added mcs51 assembly version
4683         * device/lib/expf.c: added mcs51 assembly version
4684         * device/lib/_logexpf.c: new shared asm code for expf and logf
4685         * device/include/math.h: add defines for assembly math library
4686         * device/lib/Makefile.in: build new _logexpf.c
4687         * device/lib/libfloat.lib: use new _logexpf.c
4688
4689 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4690
4691         * src/pic/device.c
4692         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4693           device types which have less than 0x7f registers.
4694
4695 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4696
4697         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4698
4699 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4700
4701         * device/lib/printf_fast.c: only build on supported arch.
4702         * device/lib/printf_tiny.c: only build on supported arch.
4703         * device/lib/printf_fast_f.c: only build if asm float lib
4704         * device/lib/_fsget1arg.c: only build if asm float lib
4705         * device/lib/_fsget2args.c: only build if asm float lib
4706         * device/lib/_fsnormalize.c: only build if asm float lib
4707         * device/lib/_fsreturnval.c: only build if asm float lib
4708         * device/lib/_fsrshift.c: only build if asm float lib
4709         * device/lib/_fsswapargs.c: only build if asm float lib
4710         * device/include/stdio.h: don't provide print_fast,
4711           print_fast_f, print_tiny prototypes if --xstack used
4712
4713 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4714
4715         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4716         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4717           to the SOURCES
4718
4719 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4720
4721         * device/lib/printf_fast_f.c: same as printf_fast, but
4722           with floating point enabled
4723         * device/lib/printf_fast.c: minor tweaks
4724         * device/include/stdio.h: add printf_fast_f
4725
4726 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4727
4728         * src/SDCCmain.c: make --float-reent default for mcs51
4729         * device/lib/_fsadd.c: added mcs51 assembly version
4730         * device/lib/_fssub.c: added mcs51 assembly version
4731         * device/lib/_fsmul.c: added mcs51 assembly version
4732         * device/lib/_fsdiv.c: added mcs51 assembly version
4733         * device/lib/_fseq.c: added mcs51 assembly version
4734         * device/lib/_fsneq.c: added mcs51 assembly version
4735         * device/lib/_fsgt.c: added mcs51 assembly version
4736         * device/lib/_fslt.c: added mcs51 assembly version
4737         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4738         * device/lib/Makefile.in: add _fscmp to build
4739         * device/lib/libfloat.lib: add _fscmp to build
4740
4741 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4742
4743         * device/lib/_fs2slong.c: added mcs51 assembly version
4744         * device/lib/_fs2sint.c: added mcs51 assembly version
4745         * device/lib/_fs2schar.c: added mcs51 assembly version
4746         * device/lib/_fs2ulong.c: added mcs51 assembly version
4747         * device/lib/_fs2uint.c: added mcs51 assembly version
4748         * device/lib/_fs2uchar.c: added mcs51 assembly version
4749         * device/lib/_slong2fs.c: added mcs51 assembly version
4750         * device/lib/_sint2fs.c: added mcs51 assembly version
4751         * device/lib/_schar2fs.c: added mcs51 assembly version
4752         * device/lib/_ulong2fs.c: added mcs51 assembly version
4753         * device/lib/_uint2fs.c: added mcs51 assembly version
4754         * device/lib/_uchar2fs.c: added mcs51 assembly version
4755         * device/include/float.h: added #define to select asm vs c
4756
4757 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4758
4759         * device/lib/printf_fast.c: improvements to float output
4760         * device/include/float.h: add defines for assembly float library
4761         * device/lib/_fsget1arg.c: receive 1 float arg
4762         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4763         * device/lib/_fsnormalize.c: normalize a float
4764         * device/lib/_fsreturnval.c: return float, various helper routines
4765         * device/lib/_fsrshift.c: right shift a float's mantissa
4766         * device/lib/_fsswapargs.c: swap 2 floats
4767         * device/lib/Makefile.in: build these 6 new files for mcs51
4768         * device/lib/libfloat.lib: add these 6 files to the library
4769
4770 2004-12-26 Borut Razem <borut.razem AT siol.net>
4771
4772         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4773           built by gcc 3.4.2
4774
4775 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4776
4777         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4778           and fully reentrant and register bank neutral.
4779         * device/lib/printf_fast.c: added float (not enabled by default),
4780           added compact/slower integer (also not enabled by default),
4781           improved size/speed of fast integer code, other minor changes
4782         * device/include/stdio.h, device/lib/Makefile.in,
4783           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4784
4785 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4786
4787         * src/pic16/pcode.c: declaring variables other than at the start of a
4788           block is not supported in C by VC6.
4789
4790 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4791
4792         * applied a previous patch from Raphael Neider that wasn't included
4793         in the previous commits, which fixes infinite loops within jumptable
4794         improvements,
4795         * made some fixes that previous patches introduced
4796
4797 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4798
4799         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4800         that fixes an issue with AOP_PCODE asmop's offset,
4801         * (pic16_popCopyReg): update instance field too,
4802         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4803         function of pic port,
4804         * (genCmp, genAnd, genAssign),
4805         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4806
4807 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4808
4809         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4810         variables initial values to idata section,
4811         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4812         variables in some functions. This utilizes parmBytes field of iCode
4813         structure to hold the offset of the variable in stack. (might be
4814         able to use the stack field too?)
4815         * applied patch from Raphael Neider # ### , # ###
4816         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4817         variable initial values in idata section,
4818         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4819         for static variables with initial value
4820         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4821         applied fix in while loop from Raphael Neider.
4822
4823 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4824
4825         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4826         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4827         * src/ds390/ralloc.c (serialRegAssign): spill bits
4828         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4829         * support/Util/SDCCerr.c,
4830         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4831         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4832         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4833
4834 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4835
4836         * device/include/sdcc-lib.h: inserted LGPL, added includes
4837           asm/ds390/features.h and asm/mcs51/features.h
4838         * device/include/asm/default/features.h,
4839         * device/include/asm/gbz80/features.h,
4840         * device/include/asm/z80/features.h: added empty _AUTOMEM
4841           and _STATMEM
4842         * device/include/asm/ds390/features.h,
4843         * device/include/asm/mcs51/features.h: added files with defines for
4844           _AUTOMEM and _STATMEM indicating automatic and static storage class
4845         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4846         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4847         * src/SDCCicode.c (geniCodeCast),
4848         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4849         * src/SDCCloop.c (loopInduction): removed unused variable lr
4850         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4851           to convertToFcall to include char modulo (RFE 1065037), added check
4852           if left operand is unsigned and use abs of literal value
4853         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4854           as it doesn't work after conversion from peephole.def to peephole.rul
4855         * src/mcs51/gen.c (toBoolean): added check for size,
4856           (genModOneByte): optimized code for signed char modulo a literal
4857           power of 2 (thanks to Hubert Sack),
4858           (genRRC): removed unnecessary "clr c",
4859           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4860         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4861           jump optimization,
4862           swapped rules 256.c and 256.d,
4863           extended 256.d by using new multiple checks (thanks Erik),
4864           added rules 256.e and 256.f,
4865           updated rule 261.a and 261.b to new generated code
4866         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4867
4868 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4869
4870         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4871           induction related bugs, including first part of bug #1074377
4872
4873 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4874
4875         * applied patch from bug-report #1076292,
4876         * applied patches for genAnd and Goto-optimizations for Raphael
4877         Neider,
4878         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4879         dump a less iCode information,
4880         * src/pic16/device.h (pic16_options_t): added field debgen,
4881         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4882         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4883         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4884         puclic,
4885         * (various functions): added macros FENTRY and FENTRY2 to functions,
4886         to emit function prologue,
4887         * (various functions): fixed indentation,
4888         * (genNearPointerGet): fixed loading of FSR0,
4889         * (genPackBits): applied patch from Raphael Neider to fix updating
4890         of FSR0 and touching only the modified bits,
4891         * src/pic16/genarith.c (various functions): added macros FENTRY to
4892         emit function prologue in comments,
4893         * src/pic16/pcode.h: added functions debugf2, debugf3,
4894         * src/pic16/ralloc.c: partial fix for packForPush caused
4895         segmentation fault,
4896
4897 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4898
4899         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4900           <stsp AT users.sourceforge.net> with reversed byte order
4901         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4902
4903 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4904
4905         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4906           bug #1074377
4907         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4908         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4909
4910 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4911
4912         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4913
4914 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4915
4916         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4917           conditions,
4918           (setFromConditionArgs): friendly operand parser for peephole rules,
4919           (operandBaseName, operandsNotRelated): new peephole condition
4920           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4921           architecture specific register naming into account, handles n-way
4922           comparisons, and supports quoted literals
4923         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4924
4925 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4926
4927         * src/mcs51/peeph.def: fixed bug #1076940
4928
4929 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4930
4931         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4932
4933 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4934
4935         Adding support for replacing ljmps with sjmps in jumptables
4936         generated for switch statements. For now you need to set the
4937         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4938         Now 4 algorithms for mcs51 jumptable generation are used:
4939         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4940         addresses loaded pc-relative for up to 112 cases and stack-pushing
4941         target addresses loaded with offset from dptr for up to 256 cases.
4942
4943         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4944         * src/mcs51/main.c: adapted constants for switch table generation
4945         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4946
4947 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4948
4949         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4950         * support/regression/tests/bug1057979.c: added test for bug 1073386
4951
4952 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4953
4954         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4955         compilers
4956
4957 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4958
4959         * src/pic16/device.h,
4960         * src/pic16/genarith.c,
4961         * src/pic16/glue.c,
4962         * src/pic16/main.c,
4963         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4964
4965 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4966
4967         Large cummulative patch for pic16 port.
4968         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4969         to call when a stack overflow occurs,
4970         * (malloc.h): added CVS Id tag,
4971         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4972         variable,
4973         * added libc directory. The current version of LibC contains string
4974         functions, ctype functions and macros and some functions of the
4975         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4976         be extensively tested in the future. Standard disclaimer here.
4977         Library is not automatically build yet. But one can build it by
4978         invoking 'make' inside the libc directory.
4979         * added ADC library under libio. Preliminary version yet.
4980
4981         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4982         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4983         aopForRemat() now and not by pic16_aopOp(),
4984         * (pic16_popGetTempReg): removed warning messgae when allocating
4985         temporary registers, its a buggy feature and will be removed,
4986         * (pic16_popGet): set register instance field in AOP_CRY,
4987         * (pic16_outBitC): fixed for results in size greater than 1,
4988         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4989         * (pic16_storeForReturn): optimized return of 0,
4990         * (genCmp): experimental code for new genCmp which uses PIC18's
4991         special compare&skip instructions. Initial tests fail some times
4992         with variables grater than 1 byte in size, so new code is disabled,
4993         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4994         a single bit,
4995         * (genCast): began a fix to optimize the casting of a bit to another
4996         bit, now assigning a bitfield to another bitfield will fail, sorry,
4997         * src/pic16/main.c: disabled the use of lr-support feature,
4998         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4999         * added some function prototypes, added function _debugf prototype,
5000         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
5001         bits with offset (case PO_GPR_BIT),
5002         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
5003         command line,
5004         * (isBankInstruction): modified to return 0 for no banking instruction,
5005         and 1 for banking instruction,
5006         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
5007         caused stop processing pCodes after a inline assembly block,
5008         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
5009         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
5010         registers when it shouldn't,
5011         * src/pic16/ralloc.c (allocReg): add preliminary support for
5012         supporting a limited set of temporary registers,
5013
5014 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5015
5016         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
5017           genDataPointerSet): ensure assignments always copy in MSB to LSB
5018           order,
5019           (loadRegFromAop): recognize CLRH optimization,
5020           (genFunction): optimize RECEIVE iCodes in reentrant functions
5021
5022 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5023
5024         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
5025           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
5026           selected.
5027         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
5028         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
5029           contiguous with data
5030
5031 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5032
5033         * device/lib/_gptrget.c (_gptrget),
5034         * device/lib/_gptrgetc.c (_gptrgetc),
5035         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
5036           instead of sjmp to ret
5037         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
5038           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
5039
5040 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
5041
5042         * .version: bumped version to 2.4.7
5043         * device/lib/_gptrget.c (_gptrget): is now _naked
5044         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
5045         * device/lib/_gptrput.c (_gptrput): is now _naked
5046         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
5047           (createFunction): fixed xstack
5048         * src/SDCCglue.c (emitMaps): set allocation required for bit area
5049         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
5050           or bit either,
5051           (geniCodeCritical): store original interrupt state in an iTemp bit
5052           var unless stack-auto
5053         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
5054         * src/SDCCmain.c (setIncludePath): added include/target to search path
5055         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
5056         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
5057           prototype,
5058           (processFuncArgs): put bit vars in bit area
5059         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
5060           unsaveRBank): fixed xstack,
5061           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
5062           (genFunction, genEndFunction): fixed xstack,
5063           (genAssign): optimization don't walk backwards through mem
5064         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
5065         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
5066         * support/regression/Makefile: also make library (for stack-auto) when
5067           making "all" and added "test-mcs51-xstack-auto"
5068         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
5069         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
5070         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
5071         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
5072         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
5073           make-library by MAKE_LIBRARY
5074         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
5075           regression tests for xstack
5076         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
5077         * support/regression/tests/critical.c: test for critical on mcs51
5078
5079 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5080
5081         * support/regression/ports/ucz80/spec.mk: use include and lib files from
5082           built version of sdcc instead of installed version
5083
5084 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
5085
5086         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
5087         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
5088           vprintf.c now
5089         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
5090         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
5091           WARNING: remove device/lib/build/z80/printf.o by hand when
5092           updating from previous build!
5093         * device/lib/z80/printf.c: updated comment
5094         * support/regression/tests/bug1057979.c: test all ports now
5095         * support/regression/tests/bug1065458.c: file added
5096
5097 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5098
5099         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
5100           *_start and *_end symbols for static functions
5101
5102 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
5103
5104         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
5105           and search crt0.o in all library paths,
5106           (setIncludePath): proper handling of --nostdinc,
5107           (setLibPath): proper handling of --nostdlib
5108         * support/regression/Makefile,
5109         * support/regression/ports/ds390/spec.mk,
5110         * support/regression/ports/gbz80/spec.mk,
5111         * support/regression/ports/hc08/spec.mk,
5112         * support/regression/ports/mcs51/spec.mk,
5113         * support/regression/ports/mcs51-large/spec.mk,
5114         * support/regression/ports/mcs51-stack-auto/spec.mk,
5115         * support/regression/ports/z80/spec.mk: use include and lib files from
5116           built version of sdcc instead of installed version
5117         * doc/sdccman.lyx: fixed typo in --nostdinc
5118
5119 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
5120
5121         * src/pic/pcode.c,
5122         * src/pic/device.c,
5123         * src/pic/ralloc.c,
5124         * src/pic/gen.c : added support to generate code for struct bit fields.
5125
5126 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
5127
5128         * as/xa51/xa_version.h,
5129         * device/include/errno.h,
5130         * device/include/regc515c.h,
5131         * device/lib/_itoa.c,
5132         * device/lib/_ltoa.c,
5133         * device/lib/ser_ir_cts_rts.c,
5134         * sim/ucsim/xa.src/glob.cc,
5135         * sim/ucsim/xa.src/inst_gen.cc,
5136         * sim/ucsim/xa.src/xa_bit.cc,
5137         * sim/ucsim/xa.src/xa_sfr.cc,
5138         * sim/ucsim/z80.src/inst_dd.cc,
5139         * sim/ucsim/z80.src/inst_fdcb.cc,
5140         * support/scripts/keil2sdcc.pl,
5141         * src/pic16/pic16.dsp,
5142         * src/pic16/pic16a.dsp: corrected cvs line endings
5143         * device/lib/printf_large.c: fixed bug 1057979
5144         * src/pic16/gen.c: fixed non-C standard code
5145         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
5146         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
5147         * support/regression/ports/mcs51/support.c: reload T1 asap
5148         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
5149           pdata use and clear idata startup behaviour
5150         * support/regression/tests/bug1057979.c: added
5151
5152 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
5153
5154         * device/examples/ds390/ow390/ad26.h,
5155         * device/examples/ds390/ow390/cnt1d.h,
5156         * device/examples/ds390/ow390/crcutil.c,
5157         * device/examples/ds390/ow390/ownet.h,
5158         * device/examples/ds390/ow390/owsesu.c,
5159         * device/examples/ds390/ow390/swt12.h,
5160         * device/examples/ds390/ow390/swtoper.c,
5161         * device/examples/ds390/ow390/temp10.h,
5162         * device/examples/ds390/ow390/thermodl.c,
5163         * device/examples/ds390/tinitalk/tinitalk.dsp,
5164         * device/examples/ds390/tinitalk/tinitalk.dsw,
5165         * device/examples/mcs51/clock/hw.h,
5166         * device/examples/mcs51/simple2/go.bat,
5167         * device/examples/serialcomm/windows/serial.h,
5168         * device/examples/xa51/dummy.c,
5169         * device/examples/xa51/hello.c,
5170         * device/include/80c51xa.h,
5171         * device/include/at89x051.h: corrected cvs line endings
5172
5173 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
5174
5175         * src/pic16/main.c (options): added command line --gstack, to trace
5176         stack over/under flows,
5177         * added pragma 'wparam' to allow passing first byte of function
5178         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
5179         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
5180         call to __gstack_test function and sets up the symbol as extern,
5181         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
5182         * popaop): added call to pic16_testStackOverflow,
5183         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
5184         wparamList list,
5185         * (genCall, genPcall): now all parameters are passed via stack
5186         except in functions that are pass to wparam pragma in which WREG is
5187         used too,
5188         * (genPcall): REENTRANT flag is checked to see if variable prototype
5189         contains reentrant keyword, don't call a non-reentrant function, via
5190         a reentrant function pointer or vice versa, functions are never
5191         passed via WREG,
5192         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
5193         D.Winkler,
5194         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
5195         SIGSEGV when accessing a NULL register stucture,
5196         * (pic16_printGPointerType): modified to handle UPPER modifier for
5197         function initializers, changed prototype of function to simpler one,
5198         * (pic16_printIvalFuncPtr): check to see if function is already
5199         added in externs list,
5200         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
5201         optimized a move from W to SFR with a move to the same register
5202         later after a CALL,
5203         * device/lib/pic16/debug: NEW directory, contains debug features
5204         which are enabled when linking with libdebug.lib, currently command
5205         line option --gstack enables stack pointer tracing for over/under
5206         flow, corresponding sources are in debug/gstack
5207
5208 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
5209
5210         * doc/sdccman.lyx: updated SDCC version,
5211         * (PIC16 port): update list of command line options,
5212         * src/pic16/device.h (structure pic16_options_t): added field gstack
5213         to enable stack overflow tracing on push/pops,
5214         * src/pic16/device.c (statistics structure): added statistics
5215         structure,
5216         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
5217         pic16_dump_int_registers): increase statistics counters for each
5218         * variable which is encountered
5219         * (pic16_dump_usection): emit each .udata variable to its own udata
5220         section,
5221         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
5222         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
5223         parameters via stack, otherwise use old scheme,
5224         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
5225         assembler output file,
5226         * src/pic16/main.c: added command line options --gstack to enable
5227         push/pop tracing for stack overflow,
5228         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
5229         instructions): added size of each instruction,
5230         * (pic16_countInstruction): estimate size of instructions in
5231         the_pFile list, inline assembly blocks are not counted,
5232         * (pic16_FixRegisterBanking): trace previous register usage, when
5233         banksel optimizations is greater than 0, don't emit a redudant
5234         banksel directive,
5235
5236 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
5237
5238         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
5239         * src/pic16/ralloc.c : applied same fix for pic16.
5240         * src/pic/gen.c : tidied it up a little.
5241
5242 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5243
5244         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
5245         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
5246
5247 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5248
5249         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
5250
5251 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5252
5253         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
5254         non-reentrant function __modsint in the interrupt function (thus
5255         corrupting math operations during serial I/O)
5256         * device/lib/ser_ir.c: as above, changed buffersize
5257         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
5258         256.c,d for zeroing
5259         * doc/Makefile: added option -t for rsync
5260
5261 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5262
5263         * src/SDCCast.h (struct ast),
5264         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
5265
5266 2004-10-20 Borut Razem <borut.razem AT siol.net>
5267
5268         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
5269         package
5270
5271 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
5272
5273         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
5274         makefile targets,
5275         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
5276         support functions to replace long sequences of MOVFF's from access
5277         bank registers to stack and vice versa,
5278         * src/pic16/device.h: added new field opt_flags, where optimization
5279         flags can be set to enable certain features,
5280         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
5281         * pBlock, (genFunction, genEndFunction): surroung loop for
5282         saving/loading used registers in stack with PC_INFO pCodes,
5283         INF_LREGS. Code in between can then be optimized by pCode optimizer
5284         to support function calls,
5285         * (genDataPointerSet): fixed bug which loaded float fields in
5286         structures with corrupt data,
5287         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
5288         in a standard way debug info on stderr. Feature used for developing
5289         and debugging only,
5290         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
5291         obsolete chunks of code,
5292         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
5293         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
5294         * pic16/src/pcode.c (pic16_newpCodeInfo,
5295         * (pic16_newpCodeOpLocalRegs),
5296         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
5297         feature,
5298         * (pic16_pCodeConstString): printing of the initial value of a
5299         symbol as a comment is inhibited since parsing was already done by
5300         copyStr and output is corrupt,
5301         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
5302
5303 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5304
5305         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
5306
5307 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
5308
5309         * as/mcs51/lkarea.c: removed old K&R style,
5310           (lnksect): changed check on boundary error,
5311           (lnksect2): changed check on boundary error,
5312           (lnksect2): extend XSTK to end of page if size = 1
5313         * as/mcs51/lkmain.c: removed old K&R style,
5314           (Areas51): create l_IRAM symbol
5315         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
5316         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
5317           model-mcs51-stack-auto, added model-mcs51-xstack-auto
5318         * device/lib/_mullong.c: added version to be compiled with xstack
5319         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
5320         * device/lib/mcs51/crtxclear.asm: clear pdata as well
5321         * device/lib/mcs51/crtxstack.asm: fixed comment
5322         * src/SDCCglue.c: maxInterrupts defaults to 0,
5323           (emitMaps): added pdata,
5324           (createInterruptVect): (re)moved default,
5325           (glue): added pdata,
5326           (glue): moved __start__xstack to XSTK with default size 1
5327         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
5328           and options.float_rent when options.stackAuto is set,
5329           (linkEdit): only write XDATA_NAME if provided on command line
5330         * src/SDCCmem.h,
5331         * src/SDCCmem.c: added pdata
5332         * src/port.h: added pdata_name to PORT
5333         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
5334           (saveRegisters, unsaveRegisters): removed usage of B,
5335           (genMinus): fixed accumulator clash,
5336           (genJumpTab): added comment, this needs another look
5337         * src/mcs51/gen.c: added check for "B in use" paranoia,
5338           added pushB() and popB()
5339         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
5340           chance
5341         * src/avr/main.c,
5342         * src/ds390/main.c,
5343         * src/hc08/main.c,
5344         * src/mcs51/main.c,
5345         * src/pic/main.c,
5346         * src/pic16/main.c,
5347         * src/xa51/main.c,
5348         * src/z80/main.c: (reset_regparms) made void parameter explicit and
5349           added PSEG (PAG,XDATA) or NULL to port specifier
5350         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
5351         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
5352           (_mcs51_genInitStartup): removed __start__xstack equ,
5353           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
5354         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
5355         * src/z80/gen.c (_rleAppend): fixed warnings
5356         * support/regression/tests/zeropad.c: added pdata test
5357         * .version: bumped to 2.4.6
5358
5359 2004-10-17 Borut Razem <borut.razem AT siol.net>
5360
5361         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
5362         as a part of nightly build
5363
5364 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
5365
5366         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
5367         WREG holds the first byte function parameters,
5368         * (aopForSym): take special case for symbols which are in FARSPACE
5369         but in CODESPACE too,
5370         * (assignResultValue): modified to take into account _G.useWreg,
5371         * (genCall): don't use wreg for parameter passing when function is
5372         declared as reentrant, too, added optimization INCF to stack
5373         pointer when stack parameter count is 1,
5374         * (genFunction, genEndFunction): refurnished and fixed to not using
5375         wreg for passing parameters when function has varargs or is
5376         reentrant, fixed bug with symbol name compare for generating
5377         functions in absolute address,
5378         * (pic16_storeForReturn): refurnished,
5379         * (genCmp): began writing a new version of the function, not ready
5380         yet, therefore it is disabled,
5381         * (genAssign): do not read code memory when assigning a function to
5382         a pointer function,
5383         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
5384         array of characters, not pointer,
5385         * (pic16initialComments): in debug mode emit an .ident directive for
5386         the assembler,
5387         * (_process_pragma): emit a new warning type (internal to pic16)
5388         when setting stack to default length, emit a similar warning when
5389         placing a function at absolute address and address is not word aligned
5390         * (_pic16_parseOptions): added 'return TRUE' statement,
5391         * (_pic16_linkEdit): if compiling a source, then add the source's
5392         file object, first in the list of objects to link,
5393
5394 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
5395
5396         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
5397         * src/pic/main.c : removed VC warning.
5398         * src/pic/gen.c : changed comment.
5399
5400 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
5401
5402         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
5403         reference to a deprecated symbol _GPTRREG was causing failure to
5404         link. Thanks G. M. Gallant for the info.
5405
5406 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
5407
5408         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
5409         comments for Bugs item #954788.
5410
5411 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
5412
5413         * src/pic16/device.c (pic16_dump_gsection,
5414         * pic16_groupRegistersInSection): handle symbols declared to be in
5415         access bank differently,
5416         * src/pic16/gen.c (struct _G): added field resDirect,
5417         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
5418         send values read from stack directly to result and don't allocate
5419         temporary values,
5420         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
5421         same registers,
5422         * (pic16_sameRegsOfs): NEW,
5423         * (freeAsmop): if _G.resDirect is set then do not mark registers as
5424         free because they were not allocated from temporary pool,
5425         * pic16_popRegFromString): workaround to fix a problem with
5426         allocating variables twice or never,
5427         * (genGenPointerGet): using PRODL instead of FSR0H,
5428         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
5429         instead of FSR0H,
5430         * (genAssign): take advantage of the _G.resDirect flag,
5431         * (genCast): around line 11844, use mov2f instead of directly
5432         MOVFF'ing between operands to account for literal values,
5433         * src/pic16/genutils.c: some new debug functions for gpsim have been
5434         added,
5435         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
5436         float with integer part only,
5437         * src/pic16/main.c (_process_pragma): handle pragma udata access to
5438         place variables in access bank
5439         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
5440         updated sources to reflect recent changes in gen.c
5441
5442 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
5443
5444         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
5445         sources that searched for headers in installation path, now the
5446         device/include/pic16 is used,
5447         * src/pic16/glue.c (pic16glue),
5448         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
5449         .line directives if not in debug mode, this suppresses assembler's
5450         warnings for ignored directives
5451
5452 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
5453
5454         * src/port.h: made reset_regparms prototype void parameter explicit.
5455         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
5456         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
5457         * doc/sdccman.lyx: documented warning disabling and how to use
5458           printf_large to make it print floats.
5459         * device/include/stdbool.h: NEW
5460         * device/lib/_atof.c,
5461         * device/lib/_divuint.c,
5462         * device/lib/_divulong.c,
5463         * device/lib/expf.c,
5464         * device/lib/printf_large.c,
5465         * device/lib/sincosf.c,
5466         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
5467         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
5468           a completely reentrant lib.
5469
5470 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
5471
5472         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
5473         * device/include/pic16/stdio.h: fixed bug with colon
5474
5475 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
5476
5477         * device/include/pic16/stdio.h,
5478         * device/include/pic16/stdlib.h,
5479         * device/include/pic16/math.h: NEW
5480         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
5481         declared as _naked to reduce overhead
5482         * device/lib/Makefile.in (target port-specific-objects-pic16):
5483         changed * to *.* so to ignore the CVS directory,
5484         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
5485         stacked variables back in stack,
5486         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
5487         corruption
5488
5489 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
5490
5491         * .version: bumped version number to 2.4.5
5492         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
5493         * support/Util/SDCCerr.c (messages structure): added entry for
5494         W_POSSBUG2
5495
5496         Large cumulative patch for pic16 port and libraries.
5497         * device/include/pic16/sdcc-lib.h,
5498         * device/include/pic16/stdarg.h,
5499         * device/include/asm/pic16/features.h,
5500         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
5501         * device/include/pic16/float.h: changes reentrant keyword with
5502         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
5503         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
5504         updated target build-libraries to include objects from gptr,
5505         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
5506         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
5507         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
5508         all function headings,
5509         * src/SDCCmain.c: added global parameter userIncDirsSet,
5510         * (parseCmdLine): when option -I is encountered add directory to
5511         userIncDirsSet too,
5512         * src/version.awk: added space between control and long,
5513         * src/pic16/NOTES: added some notes for the port,
5514         * src/pic16/gen.c: added prototype for mov2fp function,
5515         * (fReturnpic16[]): properly named return value registers,
5516         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
5517         * (aopForSym): added code to handle symbols with onStack flag set,
5518         symbols onStack are allocated PTRSIZE bytes,
5519         * (aopFreeAsmop): handles special case where asmops are stack objects,
5520         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
5521         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
5522         added argument lock to trace flaws in allocating temporary registers
5523         when developing port,
5524         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
5525         * (pic16_popRegFromString): reenabled allocating a direct register
5526         from string,
5527         * (assignResultValue): various beautifications,
5528         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
5529         referenced function argument,
5530         * (genIpush): reenabled to allow stacked arguments, handles only
5531         ic->parmPush iCodes,
5532         * (genCall, genPcall): major changes to allow for variable argument
5533         functions, fixed a bug with falsely restoring stack pointer after
5534         returning from call,
5535         * (genFunction): pending code for critical function,
5536         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
5537         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
5538         * (genNearPointerGet): fixed bug with indirect reading, was always
5539         reading from INDF0
5540         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
5541         pointers,
5542         * (genAddrOf): rewrote code to take address of a stacked function parameter
5543         * (genCast): fixed casting to generic pointer type,
5544         * src/pic16/gen.h: added AOP_STA,
5545         * (struct asmop): added field stk,
5546         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
5547         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
5548         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
5549         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
5550         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
5551         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
5552         generic pointers,
5553         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
5554         and library paths,
5555         * (pic16_port structure): generic pointer size is set to 3,
5556         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
5557         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
5558         compiler warning,
5559         * src/pic16/ralloc.c (allocReg): prevent allocating register when
5560         operand is an iTemp,
5561
5562 2004-09-24 Martin Helmling <mh AT octo-soft.de>
5563
5564         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
5565         * debugger/mcs51/simi.c: addapt new syntax of s51
5566
5567 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
5568
5569         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
5570         * src/pic16/pcode.c: commented out some calls to free() in order to
5571         fix bug #989576,
5572
5573 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5574
5575         * src/SDCCicode.h,
5576         * src/SDCCicode.c (isiCodeInFunctionCall),
5577         * src/avr/ralloc.c (selectSpil),
5578         * src/pic/ralloc.c (selectSpil),
5579         * src/pic16/ralloc.c (selectSpil),
5580         * src/ds390/ralloc.c (selectSpil),
5581         * src/hc08/ralloc.c (selectSpil),
5582         * src/xa51/ralloc.c (selectSpil),
5583         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
5584         stack in the middle of a function call sequence (fixes bug #1020268)
5585         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
5586         costs associated with the minimum switch case.
5587
5588 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5589
5590         * src/SDCC.lex: fixed bug #1030549
5591
5592 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5593
5594         * src/SDCCcse.h (struct cseDef),
5595         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
5596         over a function call if the CSE is derived from a symbol whose
5597         address has been taken (fixes bug #1029883)
5598         * support/regression/tests/bug-1029883: a new regression test for
5599         this bug
5600
5601 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5602
5603         * src/hc08/gen.c (emitinline): fixed bug #1029778
5604         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
5605         to a cast object is no longer a syntax error ("fixes" bug #1030006,
5606         and starts toward RFE #905167)
5607
5608 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
5609
5610         * src/pic16/gen.c (mov2f): New function to move an operand to
5611         another without considering if it is a literal or a register,
5612         * (pic16_sameRegs): don't check if they are both AOP_REG,
5613         * (AccRsh): removed andmask=0 lines,
5614         * (genLeftShift): duplicated to be improved in future versions,
5615         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
5616         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
5617         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
5618         * (pic16initMnemonics): added initialization for POC_INFSNZW,
5619         * (insertBankSwitch): fixed inserting banksel directives algorithm
5620         for instructions that follow a skip instruction, this fixes a report
5621         for broken subtraction code generation,
5622         * src/pic16/ralloc.c (deassignLRs): do not free register if current
5623         iCode is a left op, just in case result and right share the same
5624         registers
5625
5626 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5627
5628         * src/hc08/main.c,
5629         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
5630         preservation of HX
5631         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
5632         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
5633         on 2004-09-12; it was buggy
5634
5635 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
5636
5637         * src/SDCCsymt.h: removed RESULT_CHECK
5638         * src/SDCCast.c,
5639         * src/SDCCglue.c,
5640         * src/SDCCval.c,
5641         * src/pic/glue.c,
5642         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
5643
5644 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
5645
5646         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
5647         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
5648         configuration values no more rejected by compiler, they are assigned
5649         to configuration registers with a warning message instead,
5650         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
5651         the for-loop so last conf register is emitted too,
5652         * (_pic16_initPaths): link library libsdcc.lib by default,
5653         * (_hasNativeMulFor): modified test for multiplication according to
5654         Raphael Neider's remarks. Integer multiplication is also done with
5655         support functions,
5656         * device/include/pic16/pic18fregs.h: corrected type error in while
5657         testing and including 18f6720 header file
5658
5659 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
5660
5661         * src/pic16/device.h (pic16_options): removed field use_crt,
5662         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
5663         until an optimization to handle single bits is added,
5664         * (pic16_loadFSR0): moved before genUnpackBits,
5665         * (genAnd): some white lines removed,
5666         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
5667         leave_reset flags in pic16_options when using crt modules,
5668
5669 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
5670
5671         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
5672           for bugs 898889 & 979599. Also used some safer print instructions.
5673
5674 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
5675
5676         * src/pic16/device.h (pic16_options_t): added field use_crt,
5677         crt_name, no_crt,
5678         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
5679         catch a probable future bug,
5680         * src/pic16/gen.c: aopIdx function commented out,
5681         * (genAssign): commented out old code which used aopIdx,
5682         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
5683         code, added if conditionals to take into account the --use-crt
5684         command line options,
5685         * src/pic16/main.c (pic16_optionsTable): added new command line
5686         options, --use-crt= and --no-crt,
5687         * (_pic16_linkEdit): now the proper crt object is added in the
5688         linker command line except than when --no-crt is specified,
5689         * src/pic16/pcode.c,
5690         * src/pic16/pcode.h: added some structures and functions for a new
5691         optimization scheme to compansate for instruction overhead between
5692         same iCodes, this scheme is currently under development and is not
5693         working in any way,
5694         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5695         to && operator,
5696         * device/lib/pic16/startup/crt0i.c,
5697         * device/lib/pic16/startup/crt0iz.c: added global char variable
5698         __uflags to force the generation of an idata section
5699
5700 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5701
5702         * doc/Makefile,
5703         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5704         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5705
5706 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5707
5708         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5709         Frieder) and clarified the default code optimization mode
5710
5711 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5712
5713         * src/SDCC.lex (doPragma, process_pragma),
5714         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5715         "opt_code_size", and "opt_code_balanced"
5716         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5717         regrouped options by category, added support for category headers
5718         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5719         and "--opt-code-size"
5720         * doc/sdccman.lyx: documented these new options and pragmas
5721         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5722         preference into account
5723
5724 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5725
5726         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5727           geniCodePreDec): Fixed bug 904237 by generating a warning
5728         * src/SDCCerr.h,
5729         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5730
5731 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5732
5733         * src/pic/device.c : When no max ram set validate full memory range.
5734         * src/pic/pcode.c,
5735         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5736
5737 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5738
5739         * device/lib/_gptrget.c,
5740         * device/lib/_gptrput.c: updated comment
5741         * device/lib/calloc.c,
5742         * device/lib/free.c,
5743         * device/lib/malloc.c,
5744         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5745         * src/SDCCcse.c (cseBBlock),
5746         * src/SDCCicode.c (printOperand, geniCodeArray),
5747         * src/SDCCicode.h (struct operand): fixed bug 868103
5748         * support/regression/tests/bug-868103.c: added
5749         * src/SDCCast.c (searchLitOp),
5750         * src/SDCCcse.h (struct cseDef),
5751         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5752         * src/SDCCicode.h (struct operand),
5753         * src/SDCCsymt.h (struct sym_link),
5754         * src/avr/gen.c (hasInc),
5755         * src/ds390/gen.c (hasInc),
5756         * src/hc08/gen.c (genPlusIncr, hasInc),
5757         * src/mcs51/gen.c (hasInc),
5758         * src/pic16/glue.c (pic16_printIvalChar),
5759         * src/pic16/ralloc.c (regWithIdx),
5760         * src/xa51/gen.c (hasInc) : removed warnings
5761         * src/SDCCast.c (createBlock): added comment ???
5762         * src/hc08/ralloc.c: updated comments
5763
5764 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5765
5766         * doc/sdccman.lyx: updated section on switch statements, added
5767         section about semaphore locking
5768         * doc/Makefile: added option -info for latex2html
5769         * device/lib/_gptrget.c,
5770         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5771
5772 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5773
5774         * src/pic/device.h,
5775         * src/pic/device.c,
5776         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5777          maxram is less than 0x100.
5778
5779 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5780
5781         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5782
5783 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5784
5785         * src/port.h,
5786         * src/mcs51/main.c,
5787         * src/ds390/main.c,
5788         * src/z80/main.c,
5789         * src/hc08/main.c,
5790         * src/pic/main.c,
5791         * src/pic16/main.c,
5792         * src/avr/main.c,
5793         * src/xa51/main.c
5794         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5795         a jump table is the best form for a switch statement, including
5796         automatic insertion of missing cases to make the case range
5797         continuous. Developed in collaboration with Frieder Ferlemann.
5798
5799 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5800
5801         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5802         accumulator result if it needs sign extension
5803
5804 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5805
5806         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5807
5808 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5809
5810         * device/lib/gbz80/printf.c,
5811         * device/lib/z80/printf.c: removed define for NULL
5812
5813 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5814
5815         * as/xa51/xa_link.c,
5816         * device/examples/ds390/ow390/ad26.c,
5817         * device/examples/ds390/ow390/cnt1d.c,
5818         * device/examples/ds390/ow390/counter.c,
5819         * device/examples/ds390/ow390/ds2480.h,
5820         * device/examples/ds390/ow390/ds2480ut.c,
5821         * device/examples/ds390/ow390/findtype.c,
5822         * device/examples/ds390/ow390/gethumd.c,
5823         * device/examples/ds390/ow390/owllu.c,
5824         * device/examples/ds390/ow390/ownetu.c,
5825         * device/examples/ds390/ow390/swt12.c,
5826         * device/examples/ds390/ow390/swtloop.c,
5827         * device/examples/ds390/ow390/temp.c,
5828         * device/examples/ds390/ow390/temp10.c,
5829         * device/examples/ds390/ow390/thermo21.c,
5830         * device/examples/ds390/ow390/tinilnk.c,
5831         * device/examples/ds390/ow390/tstfind.c,
5832         * device/examples/serialcomm/windows/serial.cpp,
5833         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5834         * device/include/reg51.h: fixed line endings for cvs
5835
5836 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5837
5838         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5839         packRegsForAccUse, packRegisters): new accumulator register
5840         packing algorithm
5841         * support/regression/ports/hc08/support.c (_putchar): suppress
5842         warning of unused variable
5843         * src/SDCCicode.c: added SWAP entry to codeTable
5844
5845 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5846
5847         * device/lib/sprintf.c: forgot to add this file before previous commit
5848
5849 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5850
5851         * src/pic16/gen.c (genPackBits): added operand right in function
5852         parameters, load result directly if p_type is POINTER (that is
5853         called by genNearPointerSet)
5854         * (genUnPackBits): added operand left in function parameters,
5855         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5856         FSR0 if accessing bitfields,
5857
5858 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5859
5860         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5861           _print_format; updated printf, sprintf, vsprintf
5862         * device/include/asm/default/features.h: corrected comment/define
5863         * device/lib/Makefile.in: added sprintf.c
5864         * device/lib/libsdcc.lib: added sprintf module
5865         * device/lib/printf_large.c,
5866         * device/lib/vprintf.c,
5867         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5868           into these 3 files
5869         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5870         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5871         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5872           hc08 test
5873         * support/regression/tests/zeropad.c: define idata as data for hc08
5874
5875 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5876
5877         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5878         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5879         labels are referenced at least once (even if a reference is not found)
5880         * src/hc08/gen.c (emitcode): set isComment flag for comments
5881         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5882         loads), rules 6a..6b (optimize jumps to return)
5883
5884 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5885
5886         * device/lib/acosf.c (acosf),
5887         * device/lib/asinf.c (asinf),
5888         * device/lib/atanf.c (atanf),
5889         * device/lib/ceilf.c (ceilf),
5890         * device/lib/cosf.c (cosf),
5891         * device/lib/coshf.c (coshf),
5892         * device/lib/cotf.c (cotf),
5893         * device/lib/fabsf.c (fabsf),
5894         * device/lib/floorf.c (floorf),
5895         * device/lib/log10f.c (log10f),
5896         * device/lib/logf.c (logf),
5897         * device/lib/sinf.c (sinf),
5898         * device/lib/sinhf.c (sinhf),
5899         * device/lib/sqrtf.c (sqrtf),
5900         * device/lib/tanf.c (tanf),
5901         * device/lib/tanhf.c (tanhf),
5902         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5903         replaced all instances of "reentrant" in the library functions
5904         defined in math.h with this macro.
5905         * support/regression/tests/float_trans.c: reenabled test for hc08
5906
5907 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5908
5909         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5910         erroneously deleted
5911
5912 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5913
5914         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5915         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5916         multi-byte volatile operands are used
5917         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5918         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5919         initialization to area GSINIT0 so that it would always precede
5920         any static initializers in GSINIT
5921         * support/regression/tests/zeropad.c: fixed idata define for hc08
5922         * support/regression/tests/bug-927659.c,
5923         * support/regression/tests/float_trans.c: disabled tests for hc08
5924         pending missing library routines
5925         * .version: increased version number to 2.4.4 - hc08 port now passes
5926         regression tests
5927
5928
5929 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5930
5931         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5932         * Makefile.common.in,
5933         * as/Makefile,
5934         * as/hc08/Makefile.in,
5935         * as/mcs51/Makefile.in,
5936         * as/z80/Makefile.in,
5937         * debugger/mcs51/Makefile.in,
5938         * device/include/Makefile.in,
5939         * device/lib/Makefile.in,
5940         * doc/Makefile,
5941         * link/Makefile,
5942         * link/z80/Makefile.in,
5943         * packihx/Makefile.in,
5944         * sim/ucsim/main_in.mk,
5945         * sim/ucsim/avr.src/Makefile.in,
5946         * sim/ucsim/doc/Makefile.in,
5947         * sim/ucsim/gui.src/serio.src/Makefile.in,
5948         * sim/ucsim/hc08.src/Makefile.in,
5949         * sim/ucsim/s51.src/Makefile.in,
5950         * sim/ucsim/xa.src/Makefile.in,
5951         * sim/ucsim/z80.src/Makefile.in,
5952         * src/Makefile.in,
5953         * support/cpp2/Makefile.in,
5954         * support/librarian/Makefile,
5955         * support/makebin/Makefile: added DESTDIR to the install path proposed
5956         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5957         * doc/sdccman.lyx: added DESTDIR documentation
5958
5959 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5960
5961         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5962         instruction for interrupt handlers, use fast returns when returning
5963         from high priority interrupts
5964
5965 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5966
5967         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5968         code generation
5969         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5970         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5971         bugs, ported much of Bernhard's code from mcs51
5972         * src/mcs51/gen.c (genSend),
5973         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5974         than one when calling a reentrant function
5975         * device/lib/_mullong.c: defined an alternate struct layout for big
5976         endian ports (hc08)
5977
5978 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5979
5980         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5981         test
5982
5983 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5984
5985         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5986         are sane and complete before asking the port its prefered parameter
5987         passing method (fixes bug #1017633)
5988         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5989         and _ret3
5990
5991 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5992
5993         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5994         problem in bitfields >= 8 bits.
5995
5996 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5997
5998         * src/SDCCsymt.c: undid changes that were not meant to be committed
5999
6000 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6001
6002         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
6003
6004 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6005
6006         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
6007           copied and wrong bit got inverted
6008
6009 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6010
6011         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
6012         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
6013         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
6014         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
6015         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
6016         assignments to bitfields at known addresses
6017         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
6018         reads from bitfields at known addresses
6019         * src/hc08/ralloc.c (packRegisters),
6020         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
6021         genhc08Code): optimize pointer get values used as conditionals
6022         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
6023         and branch
6024
6025 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6026
6027         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
6028         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
6029         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
6030         as conditionals
6031
6032 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6033
6034         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
6035
6036 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6037
6038         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
6039         related problems
6040
6041 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
6042
6043         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
6044
6045 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6046
6047         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
6048         mcs51 port
6049
6050 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
6051
6052         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
6053
6054 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6055
6056         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
6057         cases use more compact code.
6058
6059 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
6060
6061         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
6062
6063 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6064
6065         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
6066
6067 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6068
6069         * src/SDCCsymt.h,
6070         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
6071         parameter of changePointer() from symbol* to sym_link*
6072         * src/SDCCast.c (decorateType): call changePointer() for CAST op
6073         * src/SDCCsymt.c (compareType): void* type is castable to other
6074         pointers, but not necesarily an exact match.
6075         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
6076         is no longer blindly treated as an exact match.
6077         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
6078
6079 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
6080
6081         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
6082
6083 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
6084
6085         * src/pic/gen.c,
6086         * src/pic/pcode.c,
6087         * src/pic/ralloc.h,
6088         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
6089
6090 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
6091
6092         * src/pic/device.c,
6093         * src/pic/device.h,
6094         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
6095
6096 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6097
6098         * src/mcs51/gen.c (emitcode): fixed bug #992819
6099
6100 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
6101
6102         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
6103           there's no need to make it worse
6104
6105 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6106
6107         * src/mcs51/ralloc.c (deassignLR),
6108         * src/ds390/ralloc.c (deassignLR),
6109         * src/hc08/ralloc.c (deassignLR),
6110         * src/z80/ralloc.c (deassignLR),
6111         * src/pic/ralloc.c (deassignLR),
6112         * src/pic16/ralloc.c (deassignLR),
6113         * src/avr/ralloc.c (deassignLR),
6114         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
6115         rlivePoint): fixed another part of bug #971834
6116
6117 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6118
6119         * src/z80/main.c: enabled "critical" keyword
6120         * src/z80/mappings.i,
6121         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
6122         functions (fixes bug #979646)
6123         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
6124
6125 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6126
6127         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
6128           such as c:\mydir.
6129
6130 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
6131
6132         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
6133           doesn't disable too much optimizations
6134
6135 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6136
6137         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
6138
6139 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
6140
6141         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
6142
6143 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6144
6145         * src/pic/gen.c tidied up tabs
6146         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
6147         * src/pic/main.c tidied up tabs
6148         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
6149         * src/pic/pcoderegs.c tidied up tabs
6150         * src/pic/ralloc.c tidied up tabs
6151
6152 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
6153
6154         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
6155         to S_FIXED for pic16 port and when symbol is not in level 0,
6156         allocate for S_REGISTER storage class and pic16 port, too,
6157         * src/pic16/device.h: prototype for checkSym,
6158         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
6159         * (pic16_assignConfigWordValue): test the value and the mask to
6160         validate that the value is suitable for the configuration word,
6161         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
6162         collect extern declared symbols, don't emit symbol twice, check
6163         first if symbol is in publics set first,
6164         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
6165         * added command line '--fstack' which enables an experimental
6166         feature for stack access, too buggy to be used yet...
6167         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
6168         * (pic16_allocDirReg): when register has storage class S_REGISTER
6169         allocate in pic16_dynAccessRegs,
6170         * device/include/pic16/pic18f????.h: modified configuration word
6171         naming convention, words started as CONFIG0H but should be CONFIG1H
6172
6173 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
6174
6175         * device/include/mcs51reg.h: fixed bug 970993
6176
6177 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
6178
6179         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
6180         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
6181         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
6182         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
6183         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
6184         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
6185           error/warning numbers,
6186           added function setWarningDisabled()
6187         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
6188         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
6189           _memcmp.c _memmove.c calloc.c realloc.c free.c
6190         * support/regression/tests/malloc.c: added tests for new functionality
6191         * support/regression/tests/zeropad.c: added tests for truncated initializers
6192           and initialized char arrays starting with '\x0'
6193         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
6194
6195 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
6196
6197         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
6198
6199 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6200
6201         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
6202         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
6203         peephole 177.e. Thanks to anonymous
6204
6205 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
6206
6207         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
6208         function isn't used in the source but referenced as a
6209         variable initializer then declare it as extern in .asm file
6210
6211 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
6212
6213         * .version: increased version number to 2.4.3
6214
6215         Adding version extension according to ChangeLog CVS revision
6216         * src/Makefile.in (target all): added dependency 'version.h'
6217         * (rule version.h): added rule to create version.h from ChangeLog,
6218         * (rule dep): added dependency version.h,
6219         * src/version.awk: AWK script to create version.h
6220         * src/SDCCdwarf2.c (dwWriteModule),
6221         * src/SDCCglue.c (initialComments),
6222         * src/SDCCmain.c (printVersionInfo): modified to write after
6223         version string the version extension number,
6224         * src/SDCCutil.c: included "version.h"
6225         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
6226         number,
6227         * src/SDCCutil.h: added prototype for getBuildNumber
6228
6229         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
6230         includeDirsSet, too,
6231         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
6232         const char [] is found in function prototype...
6233
6234         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
6235         moving to WREG with source is already in WREG,
6236         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
6237         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
6238         * (aopForSym): stack'ed symbols are partially supported, added
6239         if-clause to support symbols in FARSPACE,
6240         * (sameRegs): added test for AOP_ACC to see if registers are same,
6241         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
6242         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
6243         * (pic16_popRegFromString): will not allocate a new register if it
6244         doesn't find one by name, bug may have introduced...
6245         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
6246         * (genIpush): revived to use pic16 port's stack,
6247         * (genAddrOf): added incomplete case for stack'ed operand,
6248         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
6249         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
6250         can handle multibyte operands,
6251         * src/pic16/glue.c (pic16_printIval*): some debug info added,
6252         * (pic16initialComments): added message for MPLAB compatibility
6253         mode enabled,
6254         * src/pic16/main.h: prototype for pic16_mplab_comp,
6255         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
6256         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
6257         * (_pic16_linkEdit): NEW, handles link stage, transferred here
6258         because of increased complexity of procedure,
6259         * (_process_pragma): stack pragma changed to format 'stack pos len',
6260         emit symbol '_stack_end' to conform with gplink,
6261         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
6262         to search for register,
6263         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
6264         PO_GPR_REGISTER,
6265         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
6266         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
6267         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6268         case for PO_GPR_REGISTER,
6269         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
6270         dies, the new era is ahead !...
6271         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
6272         pic16_dynInternalRegs,
6273         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
6274         * (pic16_allocDirReg): minor optimizations and bug fixes,
6275         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
6276
6277         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
6278         load stack and frame pointer with address of 'stack_end' symbol
6279
6280 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
6281
6282         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
6283         without source code but only variable initializers
6284
6285 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
6286
6287         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
6288         external are not declared as extern to reduce overhead while linking
6289
6290 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
6291
6292         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
6293
6294 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
6295
6296         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
6297           Yee Keat for the patch
6298         * src/SDCCast.c (decorateType): fixed bug #979599
6299         * src/ds390/gen.h: removed local fReturnSizeDS390
6300         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
6301         * src/ds390/gen.c (genAnd, genOr, genXor),
6302         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
6303
6304 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
6305
6306         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
6307         add relFilesSet to $3, manipulate $2 to handle linking of object
6308         files without source files in command line,
6309         * device/include/pic16 (all headers): added ID location macros,
6310         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
6311         entries for ID location bytes,
6312         * (pic16_assignIdByteValue): NEW,
6313         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
6314         added field dumpcalltree to pic16_options_t,
6315         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
6316         is used instead of pic16_Gstack_base_addr, check if (ifx) before
6317         emitting rFalseIfx label after check_carry label,
6318         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
6319         pic16_emitDIRegs), NEW
6320         * (pic16glue): dump .calltree file when option --calltree found,
6321         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
6322         * (_pic16_genAssemblerPreamble): emit ID locations after
6323         configuration registers,
6324         * (pic16_linkCmd): modifications of the link command,
6325         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
6326         * (pic16_pCodeInitRegisters): don't init stack registers,
6327         * (pic16_findPrevInstruction): fixed bug,
6328         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
6329         bug with immediate registers,
6330         * (buildCallTree): traces stack push and pop,
6331         * (pct2): dump also stack usage for each function,
6332         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
6333         * (pic16_allocDirReg): various modifications,
6334         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
6335         fixed to 1,
6336
6337 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
6338
6339         * src/pic16/pcode.c: removed buggy double colon
6340
6341 2004-07-01 Borut Razem <borut.razem AT siol.net>
6342
6343         * support/scripts/sdcc.nsi: added include/pic16 to setup
6344
6345 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
6346
6347         * device/lib/Makefile.in: fixed bug in target objects-pic16,
6348         * device/lib/pic16/Makefile: prefixed with dash (-) command under
6349         target 'clean',
6350         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
6351         specific command line arguments. Also added sample lkr script
6352         for placing a variable at a specific memory bank.
6353         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
6354         at a specific memory bank,
6355         * (pic16_dump_isection): fixed bug which caused string literals to
6356         be omitted when dumping idata section,
6357         * (pic16_groupRegistersInSection): added code to handle registers
6358         in specific memory banks,
6359         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
6360         public, all references are renamed too,
6361         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
6362         AOP_DPTR2,
6363         * (pic16_storeForReturn): added case to handle when dest is WREG,
6364         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
6365         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
6366         pic16_rel_udata, check to see if that register is marked as being
6367         a member of a specific memory bank,
6368         * (pic16_printIvalCharPtr): added code to add string literals either
6369         to code or the idata sections,
6370         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
6371         also accept the 'udata' pragma,
6372         * src/pic16/main.h: new structure types sectName and sectSym
6373         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
6374         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
6375         * (pic16_findPrevInstruction): fixed, it returned nothing,
6376         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
6377         instruction combinations,
6378         * (pic16_FixRegisterBanking): heavily reorganised,
6379         * (pic16_AnalyzeBanking): if generating banksel directives is
6380         disabled, then don't call FixRegisterBanking at all,
6381         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
6382         completely removed,
6383         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
6384
6385 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
6386
6387         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
6388         Phuah Yee Keat <yk.phuah AT nestac.com>
6389
6390 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6391
6392         * src/pic16/glue.c (pic16createInterruptVect): function now emits
6393         correctly the IVT even if it is relocated to some other location
6394
6395 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6396
6397         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
6398         * device/include/pic16/pic18f2220.h: NEW,
6399         * device/lib/pic16/libdev/pic18f2220.c: NEW,
6400         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
6401         * src/pic16/device.c (struct Pics16): added info for 18f2220,
6402         * src/pic16/device.h (struct pic16_options): added ivt_loc and
6403         nodefaultlibs, ivt_loc is the location of the interrupt vector
6404         table, and nodefaultlibs signs that default libraries should not be
6405         linked in link stage,
6406         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
6407         according to --ivt-loc argument,
6408         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
6409         when pragma stack is found,
6410
6411 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6412
6413         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
6414         256 (range check), 257 (do while), 258.a-f (bit banging
6415         f.e. on 3-wire SPI bus)
6416
6417 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6418
6419         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
6420         variables used exclusively within a loop
6421
6422 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
6423
6424         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
6425
6426 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         * src/SDCClrange.c (computeClash): fixed bug #971834
6429
6430 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6431
6432         * src/mcs51/gen.c (genCmp): fixed bug #975903
6433         * src/hc08/gen.c (operandsEqu),
6434         * src/ds390/gen.c (operandsEqu),
6435         * src/z80/gen.c (operandsEqu),
6436         * src/pic/gen.c (operandsEqu),
6437         * src/pic16/gen.c (operandsEqu),
6438         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
6439         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
6440
6441 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6442
6443         * src/SDCCcse.c (cseBBlock): fixed bug #966963
6444
6445 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
6446
6447         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
6448         default case in switch statement,
6449         * glue.c (pic16_initPointer): expr is initialised via decoarteType
6450         to eliminate problem with initialisation of pointers, but problem
6451         still exists,
6452         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
6453         * (emitStaticSegment): removed various lines emitting debug info,
6454         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
6455         added processor registers for utilizing EEPROM,
6456         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
6457         configurable and set 8
6458
6459 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
6460
6461         * .version: increased version number to 2.4.2,
6462
6463         Cumulative patch for pic16 port
6464         * src/pic16/device.c: changed scheme to dump initial values for
6465         variables in idata segment, all print_idata* functions were removed,
6466         now the pic16_printIval* will be called,
6467         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
6468         * _pic16_printPointerType, pic16_printPointerType,
6469         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
6470         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
6471         NEW, similar to the respective functions in SDCCglue.c,
6472         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
6473         way, emitting hex bytes,
6474         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
6475
6476 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6477
6478         * src/avr/ralloc.c (serialRegAssign),
6479         * src/xa51/ralloc.c (serialRegAssign),
6480         * src/pic/ralloc.c (serialRegAssign),
6481         * src/pic16/ralloc.c (serialRegAssign),
6482         * src/hc08/ralloc.c (serialRegAssign),
6483         * src/z80/ralloc.c (serialRegAssign),
6484         * src/ds390/ralloc.c (serialRegAssign),
6485         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
6486
6487 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6488
6489         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
6490         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
6491
6492 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
6493
6494         Cumulative patch for pic16 port:
6495         * src/pic16/device.h (typedef PIC16_device) modified fields for
6496         defining microcontrollers,
6497         * src/pic16/device.c: added new info for all devices in Pics16 array,
6498         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
6499         to be optimised out by the pCode optimiser,
6500         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
6501         specially, bug reported by G.M. Gallant,
6502         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
6503         as force'd so that cannot be optimised out by pCode optimiser,
6504         * src/pic16/pcode.c,
6505         * src/pic16/pcodepeeph.c,
6506         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
6507         they are disabled by default, but can be enabled explicit with
6508         command argument --denable-peeps, for testing,
6509         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
6510         --pomit-ivt in COMPILE_FLAGS
6511
6512 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6513
6514         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
6515           compilation on MSVC
6516
6517 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6518
6519         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
6520
6521 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6522
6523         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
6524         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
6525
6526 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
6527
6528         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
6529         would only assign 0x300001 register.
6530
6531 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
6532
6533         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
6534         in COMPILE_FLAGS. Thanks to G. Gallant for report.
6535
6536 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6537
6538         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
6539         for ds80c400
6540         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
6541         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
6542         added peephole 254 (left shift), 255 (jump table)
6543
6544 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
6545
6546         * device/lib/Makefile.in: removed comment line with model-pic16,
6547         * (target port-specific-objects-pic16): the libraries and objects
6548         are copied to the build directory form the device/lib/pic16/bin
6549         directory
6550
6551         Cumulative patch concerning pic16 port:
6552         * library directory has been re-organized,
6553         * added support for PIC18F1220,
6554         * added headers and library sources for chips 18f1220,18f6520,
6555         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
6556
6557         * configuration registers setting has changed, now each supported
6558         device has a complete description of the registers it uses,
6559         * all initialisations are moved to idata sections, these section
6560         can be absolute or relocatable,
6561         * fixed initialisation of codespace variables,
6562         * fixed warning about PCLATU and gpsim,
6563         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
6564         * (genAssign): use table reads when assigning from variables in codespace,
6565         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
6566         char/int variables placed in codespace,
6567         * (pic16_emitConfigRegs): NEW, emits a list with configuration
6568         registers set in .asm file, no need for --pomit-config-words anymore,
6569         * (pic16glue): some 8051 legacy segments are commented out
6570         (to be removed completely),
6571         * added support for alternative assembler and linker with --asm=
6572         and --link= command line arguments,
6573         * peepholes are disabled automatically in the port, no need to
6574         specify on command line,
6575         * port supports natively char/int/long multiplication, but converts
6576         all divisions to support functions,
6577         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
6578         to the file set in variable $2,
6579         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
6580         strings in ASCII format and not in hex,
6581         * ralloc.c (serialRegAssign): added a triplet of conditional calls
6582         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
6583         allocate proper register if iCodes aren't temporary,
6584
6585 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
6586
6587         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
6588
6589 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
6590
6591         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
6592         is commented out
6593
6594 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6595
6596         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
6597         computed address is reused
6598         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
6599         multi-byte bitfields
6600
6601 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6602
6603         * src/z80/gen.c: (genArrayInit): must check for pointers too
6604
6605 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6606
6607         * support/regression/tests/zeropad.c: never meant to commit the
6608           nestedstruct test: removed, added check for GCC version
6609
6610 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
6611
6612         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
6613         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
6614         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
6615           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
6616           bugs 928906 and 954082 half-empty initializers
6617         * src/SDCCsymt.h,
6618         * src/SDCCsymt.c (getAllocSize): added for above fix
6619         * src/z80/gen.c (genArrayInit): fixed bug 741044
6620         * support/regression/tests/zeropad.c: added tests
6621
6622 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
6623
6624         * src/pic16/device.c (pic16_dump_section): corrected bug which
6625         caused some symbols of the libraries to be misplaced
6626
6627 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6628
6629         * src/pic16/glue.c,
6630         * src/pic16/ralloc.h,
6631         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
6632         to fix conflict with pic port
6633
6634 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6635
6636         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
6637         externs configuration variables,
6638         * src/pic16/ralloc.h,
6639         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
6640         prototype in header, commented out some debug messages
6641
6642 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
6643
6644         * src/pic16/glue.c,
6645         * src/pic16/main.c,
6646         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
6647         for gpasm COFF object generation. Thanks to D. Hawkins for
6648         his patch info
6649
6650 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6651
6652         * src/ds390/main.c,
6653         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
6654         Brock for spotting this)
6655         * src/ds390/gen.c (genEndFunction),
6656         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
6657         interrupt handler and critical. Disable push/pop optimizations when
6658         peephole optimizations disabled.
6659
6660 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6661
6662         Updated pic16 library sources and headers.
6663         * device/lib/pic16/pic18f*/ ,
6664         * device/include/pic16/*.h: modified to handle structured SFR
6665         definitions
6666
6667 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6668
6669         * src/port.h (PORT structure): added hook initPaths, now each
6670         port can declare its own default search paths,
6671         which can been seen with the --print-search-dirs option,
6672         see pic16 port for example,
6673         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
6674         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
6675         * (doPrintSearchDirs): NEW, replaces in a central manner the
6676         printing of search dirs which was split in set*Paths functions,
6677         * (main): added call to port->initPaths and doPrintSearchDirs,
6678         * src/avr/main.c,
6679         * src/ds390/main.c,
6680         * src/hc08/main.c,
6681         * src/izt/i186.c,
6682         * src/izt/tlcs900h.c,
6683         * src/mcs51/main.c,
6684         * src/pic/main.c,
6685         * src/pic16/main.c: modified port structures to reflect addition of
6686         initPaths hook,
6687
6688         * src/pic16/device.c (regCompare): registers are finally sorted by name,
6689         * (pic16_dump_section): for registers in same address reserve memory once,
6690         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
6691         to no_banksel,
6692         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6693         result is greater in size than right or left,
6694         * (pic16_genUMult8X8_8): there are some cases where the result can
6695         be 16 bits size, so handle these,
6696         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6697         * (pic16_outBitC): modified to emit pcodes,
6698         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6699         or not,
6700         * (genDivOneByte): implemented algorithm to divide 8-bits,
6701         * (genCmp): uncommented goto, but issues still exist,
6702         * (genAnd): fixed a bug with variables >8bits,
6703         * (genPackBits): optimization added that uses BCF/BSF to change a
6704         single bit,
6705         * (genAssign): fixed bug when assigning floating point literals,
6706         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6707         __sdcc_gsinit_startup label,
6708         * src/pic16/main.c (_pic16_init): removed search directory
6709         initialisations,
6710         * (_pic16_initPaths): NEW, used to initialise search directories,
6711         * (_hasNativeMulFor): support functions for all except char/int
6712         multiplication, and char division,
6713         * (PIC16_port struct): modified entry for native mul support,
6714         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6715         no_banksel option,
6716         * (buildCallTree): call to register_usage is ifdef'ed out,
6717
6718 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6719
6720         * device/include/string.h: applied Stas Sergeev's patch to make this
6721         header file compatible with the preprocessor -Wundef option
6722         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6723         failure (fixes bug #941458)
6724
6725 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6726
6727         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6728         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6729         that the variable, not the function, should be static
6730         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6731         to be consistent with non-literal case
6732
6733 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6734
6735         * src/SDCCast.c (isConformingBody): fixed bug #949967
6736         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6737         convilong): fixed bug #952086
6738
6739 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6740
6741         * src/SDCCmem.c (allocVariables): fixed bug #955321
6742
6743 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6744
6745         * src/hc08/main.c (_hc08_genAssemblerEnd),
6746         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6747         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6748         completely eliminated the use of a temporary file
6749         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6750         when more than one file linked
6751         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6752
6753 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6754
6755         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6756         which fixes bug #543481
6757         * support/regression/tests/bug-751703.c: fixed comments left from a
6758         cut and paste error
6759         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6760         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6761         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6762         scopes
6763         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6764         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6765         are now changed to underscores in moduleName
6766
6767 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6768
6769         * as/mcs51/lkmem.c: better fix for bug #954173
6770
6771 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6772         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6773
6774         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6775         * device/include/c8051f000.h,
6776         * device/include/c8051f120.h,
6777         * device/include/c8051f300.h,
6778         * device/include/c8051f310.h,
6779         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6780         PWM16) and detab'ed
6781
6782 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6783
6784         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6785         and mailing lists, doc'ed --no-peep-comments, removed reference
6786         to knoppix (newest version has no LyX/LaTeX), other minor changes
6787         * src/SDCCglue.c (glue): save 2 bytes stack space with
6788         option --main-return. The ljmp could probably be avoided too
6789
6790 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6791
6792         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6793
6794 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6795
6796         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6797         * src/SDCCopt.c (isLocalWithoutDef),
6798         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6799         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6800         (credit to Maarten Brock for patch #949363, on which this is based)
6801         * support/regression/tests/bug-751703.c: some test cases of extern used
6802         within inner scopes.
6803
6804 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6805
6806         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6807         SPEC_STRUCT
6808         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6809         struct definitions
6810         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6811         dwWriteLabel): fix to create valid debugger symbols even when
6812         the module name has non-alphanumeric symbols in it
6813         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6814         when a variable's allocation has been optimized away
6815
6816
6817 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6818
6819         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6820         * src/hc08/main.c,
6821         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6822         * src/mcs51/main.c,
6823         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6824         * src/ds390/main.c,
6825         * src/z80/gen.c (z80_emitDebuggerSymbol),
6826         * src/z80/main.c,
6827         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6828         * src/pic/main.c,
6829         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6830         * src/pic16/main.c,
6831         * src/avr/gen.c (avr_emitDebuggerSymbol),
6832         * src/avr/main.c,
6833         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6834         * src/xa51/main.c,
6835         * src/SDCCdebug.c (emitDebuggerSymbol),
6836         * src/SDCCdebug.h,
6837         * src/port.h: added a debugger struct to the port struct. Added a
6838         callback for defining debugger symbols
6839
6840         * src/SDCCast.c (createLabel),
6841         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6842         with isitmp = 1
6843         * src/SDCCicode.h,
6844         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6845         iCode back to the ast for the function
6846
6847         * src/hc08/ralloc.c (hc08_assignRegisters),
6848         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6849         unneeded fields from the regs struct.
6850         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6851         pushReg() & pullReg() functions instead of emitcode()
6852
6853         * src/hc08/gen.c (genLabel, genhc08Code),
6854         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6855
6856         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6857         debugger hooks
6858
6859         * src/hc08/gen.c (genEndFunction, genhc08Code),
6860         * src/hc08/gen.h,
6861         * src/mcs51/gen.c (genEndFunction, gen51Code),
6862         * src/mcs51/gen.h,
6863         * src/ds390/gen.c (genEndFunction, gen390Code),
6864         * src/ds390/gen.h,
6865         * src/z80/gen.c (genEndFunction, genZ80Code),
6866         * src/z80/gen.h,
6867         * src/z80/z80.h,
6868         * src/pic/gen.c (genEndFunction, genpic14Code),
6869         * src/pic/gen.h,
6870         * src/pic16/gen.c (genEndFunction, genpic16Code),
6871         * src/pic16/gen.h,
6872         * src/avr/gen.c (genEndFunction, genAVRCode),
6873         * src/avr/gen.h,
6874         * src/xa51/gen.c (genEndFunction, genXA51Code),
6875         * src/xa51/gen.h,
6876         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6877         specific code to cdbFile.c and out of the backend code generators
6878
6879         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6880         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6881         starting address is now 0
6882
6883         * as/hc08/asm.h,
6884         * as/hc08/m08pst.c,
6885         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6886         assembler directive for DWARF support
6887         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6888
6889         * src/src.dsp,
6890         * src/Makefile.in,
6891         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6892
6893 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6894
6895         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6896         and inappropriate peephole optimization in jump tables
6897
6898 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6899
6900         * as/hc08/m08pst.c,
6901         * src/SDCCglue.c: sdccopt works for the hc08 port now
6902
6903 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6904
6905         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6906
6907 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6908
6909         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6910
6911 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6912
6913         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6914         rules
6915         * src/SDCCmain.c,
6916         * src/SDCCglobl.h,
6917         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6918         comments from the peephole optimizer replacement rules
6919         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6920         symbols
6921         * src/SDCCcse.c (updateSpillLocation),
6922         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6923         equivalents
6924         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6925         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6926         objects far pointers
6927
6928 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6929
6930         * src/SDCCsymt.h: a missing part of my last change
6931         * src/pic/ralloc.c (regTypeNum),
6932         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6933
6934 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6935
6936         * src/SDCCicode.h,
6937         * src/SDCCicode.c (aggrToPtrDclType),
6938         * src/SDCCptropt.h,
6939         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6940         ptrPseudoSymConvert),
6941         * src/pic/ralloc.c (regTypeNum),
6942         * src/pic16/ralloc.c (regTypeNum),
6943         * src/hc08/ralloc.c (regTypeNum),
6944         * src/ds390/ralloc.c (regTypeNum),
6945         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6946         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6947
6948 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6949
6950         * link/z80/lkmain.c (afile),
6951         * as/hc08/lkmain.c (afile),
6952         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6953         prevent a pointer problem when a filename has no directory and
6954         no extension specified.
6955
6956 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6957
6958         * link/z80/lkmain.c (afile): allow periods in directory names
6959         * link/z80/lkmain.c (afile),
6960         * as/mcs51/lkmain.c (afile),
6961         * as/hc08/lkmain.c (afile): allow linker script file to have an
6962         extension other than ".lnk"
6963         * link/z80/lklex.c (getfid),
6964         * link/z80/lkmain.c (parse),
6965         * as/mcs51/lklex.c (getfid),
6966         * as/mcs51/lkmain.c (parse),
6967         * as/hc08/lklex.c (getfid),
6968         * as/hc08/lkmain.c (parse): Support comments in the linker script
6969         file on lines by themselves and after filenames
6970
6971 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6972
6973         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6974
6975 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6976
6977         * src/z80/peeph-z80.def: removed some peephole rules that don't
6978         work with multibyte arithmetic (fixed bug #937126)
6979         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6980         to registers and not global variables
6981         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6982         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6983         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6984         checking for assignments not internally generated (fixed bug #931895)
6985         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6986         structure member (fixed bug #930072)
6987
6988 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6989
6990         * src/SDCCmain.c (linkEdit),
6991         * src/hc08/main.c (_hc08_parseOptions),
6992         * as/hc08/Makefile.in,
6993         * as/hc08/aslink.h,
6994         * as/hc08/asm.h,
6995         * as/hc08/m08pst.c,
6996         * as/hc08/lkrloc.c (relr, rele),
6997         * as/hc08/lkarea.c (lnkarea)
6998         * as/hc08/lkmain.c (afile, parse),
6999         * as/hc08/lkelf.c: support for ELF output
7000         * as/hc08/lks19.c (s19),
7001         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
7002
7003 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7004
7005         * as/mcs51/lkihx.c: Fixed bug #899105.
7006
7007 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7008
7009         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
7010         .dsp files from Unix to DOS.
7011
7012 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7013
7014         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
7015         function pointers; we have been compliant for several months now.
7016         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
7017         change that was accidently commented out
7018         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
7019         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
7020         bug #922319
7021
7022 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7023
7024         * src/hc08/gen.c: output of all of the internal debugging information
7025         is now controlled by the D() macro; it is disabled by default
7026
7027 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7028
7029         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
7030         harder to keep the same registers during a CAST iCode
7031         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
7032         long via int can be done in a single cast, if the signedness is
7033         correct.
7034         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
7035         putchar() in tinibios.c in ds390's library
7036
7037 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
7038
7039         * src/SDCCast.c (decorateType): fixed bug #898889,
7040         cast result of a literal complement too
7041         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
7042         fixed check for bitfields
7043
7044 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
7045
7046         * src/SDCCicode.c (geniCodeLogic): made it static,
7047         (geniCodeLogicAndOr): added in order to fix bug #905492,
7048         (ast2iCode): fixed bug #905492
7049         * support/regression/tests/bug-905492.c: added
7050         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
7051         (processParms): fixed bug #927659: don't copy parms, this will clear
7052         decorated flag
7053         * support/regression/tests/bug-927659.c: added
7054
7055 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
7056
7057         * src/SDCCast.c (addCast): don't cast float to char
7058         * device/lib/libsdcc.lib: added _memmove
7059
7060 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
7061
7062         * device/lib/large/Makefile: fixed parallel execution by
7063         replacing `make` by `$(MAKE)`
7064
7065 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7066
7067         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
7068         offsets (fixes bug #923936)
7069
7070 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
7071
7072         * device/lib/small/Makefile: fixed parallel execution by
7073         replacing `make` by `$(MAKE)`
7074
7075 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7076
7077         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
7078
7079 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
7080
7081         * src/pic/gen.c (genCpl): multi-byte complements were not working.
7082         * src/regression/Makefile: Regression test was not running.
7083
7084 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7085
7086         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
7087         complement if possible
7088         * src/SDCCval.c (valComplement),
7089         * src/SDCCicode.c (operandOperation): fixed complement of literal
7090         * support/regression/tests/onebyte.c (testComplement): added
7091
7092 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
7093
7094         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
7095         return an optimized tree; actually replace actParm with the new tree
7096         * src/SDCCast.h: added some parantheses to remove side effects
7097         * support/regression/tests/bug-920866.c
7098
7099 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
7100         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
7101         Bit operands were not being handled properly in the pic14 port.
7102         (now src/regression/add.c passes again).
7103
7104 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7105
7106         * src/SDCC.y (labeled_statement): case and default no longer require
7107         a following statement (RFE #893037)
7108
7109 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7110
7111         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
7112         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
7113         disabled (fixes bug #916294)
7114         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
7115         "mov a,acc"; patch provided by Lenny Story
7116         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
7117
7118 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7119
7120         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
7121         functions
7122         * src/ds390/gen.c (genFunction, genEndFunction),
7123         * src/ds390/ralloc.c (ds390_assignRegisters),
7124         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
7125         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
7126         pushed if there are parameters passed on the stack. Also, a cleaner
7127         way to decide if r0/r1 should be pushed/popped. (Together they fix
7128         bug #918693)
7129
7130 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7131
7132         * doc/sdccman.lyx,
7133         * device/lib/mcs51/crtpagesfr.asm,
7134         * device/lib/mcs51/crtxinit.asm,
7135         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
7136         to avoid confusion with Si Lab's SFRPAGE register.
7137
7138 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7139
7140         * src/SDCCglue.c (emitMaps): allow public sfr variables
7141         * src/SDCCglue.c (initialComments): include compiler build date
7142         with compiler version and put the timestamp of the generated
7143         assembly file on a serperate line to be less confusing.
7144         * src/port.h: added genInitStartup hook
7145         * src/avr/main.c,
7146         * src/ds390/main.c,
7147         * src/hc08/main.c,
7148         * src/pic/main.c,
7149         * src/pic16/main.c,
7150         * src/xa51/main.c,
7151         * src/z80/main.c: genInitStartup initialize as NULL (default to
7152         historical behaviour)
7153         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
7154         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
7155         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
7156         library instead of hard coding it into the compiler.
7157         * support/regression/ports/mcs51-stack-auto/spec.mk,
7158         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
7159         * device/lib/mcs51/Makefile,
7160         * device/lib/small/Makefile,
7161         * device/lib/large/Makefile,
7162         * device/lib/mcs51/crtpagesfr.asm,
7163         * device/lib/mcs51/crtstart.asm,
7164         * device/lib/mcs51/crtxclear.asm,
7165         * device/lib/mcs51/crtxinit.asm,
7166         * device/lib/mcs51/crtclear.asm,
7167         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
7168         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
7169         and into user configurable files.
7170         * device/lib/clean.mk: clean mcs51 directory too
7171         * support/regression/tests/longlit.c: added static to T1 declaration
7172         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
7173         accesses in the initialization code
7174
7175 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7176
7177         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
7178         OSCTRIMVAL as noted in bug #916008
7179
7180 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7181
7182         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
7183         in loops with multiple exits (reported as incorrect registers
7184         used by Martin Helmling in Sdcc-user list)
7185
7186 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7187
7188         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
7189         made ds390 register extensions look less like error messages
7190
7191 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7192
7193         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
7194         reported by Adam Wozniak in Sdcc-user list
7195
7196 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
7197
7198         * src/SDCCast.c (decorateType): fixed with bug and promotion in
7199         arithmetic optimizations, added debug output
7200
7201 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
7202
7203         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
7204         * sdcc.spec: updated and split sdcc into 3 rpms
7205         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
7206         needed for literals of LEFT_OP and '+'
7207         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
7208         introduced RESULT_TYPE_NOPROM
7209         (geniCodeMultiply): fixed logic for decision if mul is optimized to
7210         left shift
7211         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
7212         limited promotion to int only for '*'
7213         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
7214
7215 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
7216
7217         * src/pic16/gen.c (genSkip),
7218         (genc16bit2lit), (gencjneshort): commented out
7219         (is_LitOp): new helper function, checks operand type
7220         (genCmpEq): rewritten
7221
7222 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
7223
7224         * support/regression/tests/bug-908454.c: added
7225
7226 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
7227
7228         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
7229         * src/SDCCicode.c (usualBinaryConversions): op needs int type
7230         (geniCodeCast): cosmetic, don't preserve bit storage class
7231         (geniCodeLeftShift): added promotion
7232         (geniCodeLogic): fixed regression
7233         * src/SDCCsymt.c (computeTypeOr): accept bits too
7234         (compareType): 2nd part of fix for bug #908454, needed for bitfields
7235
7236 2004-03-07  Borut Razem <borut.razem AT siol.net>
7237
7238         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
7239
7240 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
7241
7242         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
7243         version of pic16_genPackRegisters which does not check if ic is a
7244         CAST operator,
7245         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
7246         function cause string1.c regression test fails
7247
7248 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
7249
7250         * sim/ucsim/configure.in,
7251         * sim/ucsim/configure,
7252         * sim/ucsim/doc/Makefile.in: use docdir
7253         * src/SDCC.y: fixed sbit atrributes
7254         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
7255         * src/SDCCast.c (decorateType): |^& need special promotion handling
7256         * src/SDCCast.h,
7257         * src/SDCCsymt.h: moved definition of RESULT_TYPE
7258         * src/SDCCsymt.h (computeType),
7259         * src/SDCCicode.c: computeType() needs op
7260         * src/SDCCsymt.c (checkTypeSanity),
7261         * doc/sddman.lyx: "plain" bitfields are unsigned
7262         * src/SDCCsymt.c (computeTypeOr): added
7263         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
7264         |^& ops
7265         * src/SDCCval.c (val*): computeType() needs op
7266         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
7267         * support/regression/tests/onebyte.c: added tests for |^&
7268
7269 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
7270
7271         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
7272         for writing icode into asm output.
7273
7274 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
7275
7276         * src/pic16/device.c: added some debug lines enabled
7277         with macro DEBUG_CHECK,
7278         * src/pic16/genarith.c: more debug in genPlus,
7279         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
7280         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
7281         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
7282         * (aopForSym): onStack symbols are re-placed in data memspace,
7283         and onStack flag is cleared,
7284         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
7285         copy temporary pcodeop,
7286         * (genPcall): added warning for not updating PCLATU,
7287         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
7288         always true for pic16 port,
7289         * (genMultOneWord): NEW, supports integer multiplication,
7290         * (genMult): modified to call genMultOneWord,
7291         * (ifxForOp): added warning when return NULL,
7292         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
7293         flag is set before call to operandFromSymbol for implicit
7294         added structures,
7295         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
7296         options.intlong_rent are set by default,
7297         * (_hasNativeMulFor): modified to allow port generation of integer
7298         multiplication,
7299         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
7300         set regtype to REG_SFR for all registers, restricting seting the
7301         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
7302
7303 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7304
7305         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
7306         more than 500 times in the regression tests
7307
7308 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7309
7310         * support/Util/SDCCerr.h,
7311         * support/Util/SDCCerr.c,
7312         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7313         enumerator_list),
7314         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
7315         for symbol conflicts.
7316         * support/valdiags/tests/enum.c,
7317         * support/valdiags/tests/tentdecl.c,
7318         * support/valdiags/tests/struct.c: expect possible error messages
7319         referring to original symbol definitions.
7320         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
7321         * src/SDCCsymt.h,
7322         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
7323
7324 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
7325
7326         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
7327
7328 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
7329
7330         * src/pic16/ralloc.c (newReg): fixed bug #908929
7331
7332 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7333
7334         * src/ds390/gen.c: added missing #include "main.h"
7335
7336 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
7337
7338         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
7339         checking if symbol is already in set,
7340         * src/pic16/device.h: prototype for checkAddSym,
7341         * src/pic16/gen.c: (_G): added entry interruptvector,
7342         * (assignResultValue): removed some commented out lines,
7343         * (genFunction): check for ISR via sym->type, absolute section for
7344         interrupt code is created via a new pBlock, the goto instruction is
7345         placed now correctly at the interrupt vector position, changed all
7346         references from ivec to _G.interruptvector,
7347         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
7348         is the interrupt is a high priority one, same for return from ISR,
7349         * src/pic16/glue.c: changed all calls of addSetHead for publics and
7350         externs to calls of checkAddSym,
7351         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
7352         pic16_pcode_verbose flag is set,
7353         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
7354         * src/pic16/pcoderegs.c: message about how many registers are saved
7355         will only be emitted if pic16_pcode_verbose flag is set,
7356
7357 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7358
7359         * src/ds390/ralloc.h,
7360         * src/ds390/ralloc.c (ds390_regWithIdx),
7361         * src/ds390/gen.c (emitcode),
7362         * src/ds390/main.h,
7363         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
7364         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7365         ds390operandCompare, getRegsRead, getRegsWritten,
7366         initializeAsmLineNode): customized instruction size calculation for
7367         ds390, started basis for some register optimizations
7368         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
7369         corresponding assembly output
7370         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
7371         missing push/pop of r0/r1. Optimized push/pops
7372
7373 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7374
7375         * src/mcs51/main.c (instructionSize): fixed ACALL size
7376         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
7377
7378 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
7379
7380         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
7381         the sorting of rlist with NULL elements
7382         * (print_idataType, print_idata): NEW to create idata sections
7383         * src/pic16/device.h: idataSymSet new variable
7384         * src/pic16/gen.c (genFunction): fixed some bugs in string
7385         comparing, improved the absolute section creation for ISRs,
7386         added FSR0L/FSR0H in registers that are saved in an ISR,
7387         * (genInline): fixed the processing of inline snippets,
7388         now they undergo no process by the peephole optimizer
7389         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
7390         are placed in idataSymSet,
7391         * (pic16emitStaticSeg): extern symbols are added in externs,
7392         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
7393         switching when aboslute variables are placed in access bank memory
7394         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
7395         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
7396         commented out with #if,
7397         * (pic16_packRegisters): reintroduce the check for CAST because some
7398         symbols are not correctly handled,
7399         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
7400         pCodeInstruction instead of pCode,
7401         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
7402         pCodeAsmDir definition,
7403         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
7404         directive, then the argument directive is emitted without the leading
7405         tab, hack for inline labels which must be in the first column,
7406         * (compareLabel,pic16_findNextInstruction),
7407         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
7408         * (insertBankSwitch): modified for the new pCodeAsmDir,
7409
7410 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7411         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
7412
7413         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
7414         instance,
7415         * (pushSide): commented out with #if,
7416         * (assignResultValue): fixed some typos in saving
7417         registers,
7418         * (genPcall): FIXED and sync'ed with genCall,
7419         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
7420         * (genNearPointerGet): fixed to handle some more cases,
7421         implementation scheme via table reads,
7422         * (genConstPointerGet): modified to access code memory correct,
7423         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
7424         and improved to handle some cases
7425         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
7426         instead of "RETLW" for init data
7427         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
7428         not IN_DIRSPACE, work around to reduce bank switching when aboslute
7429         variables are placed in access bank memory (<0x80 and >=0xf80),
7430         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
7431         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
7432         TBLWT_POSTDEC,TBLWT_PREINC
7433         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
7434         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
7435         directives
7436         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
7437         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
7438         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
7439         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
7440
7441 2004-02-29  Borut Razem <borut.razem AT siol.net>
7442
7443         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
7444         support/Util/findme.h, support/Util/system.h: enhance binary relative
7445         search for lib and include by using findProgramPath()
7446
7447 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7448
7449         * src/SDCCpeeph.h,
7450         * src/SDCCpeeph.c (pcDistance),
7451         * src/port.h,
7452         * src/mcs51/ralloc.h,
7453         * src/mcs51/ralloc.c (mcs51_regWithIdx),
7454         * src/mcs51/main.h,
7455         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
7456         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7457         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
7458         size calculation port specific, started basis for some register
7459         optimizations
7460         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
7461         missing push/pop of r0/r1. Optimized push/pops
7462         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
7463         * device/lib/_modsint.c (_modsint),
7464         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
7465         and stack version so regression tests pass
7466
7467 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
7468
7469         * src/Makefile.in (dep): include SLIBOBJS in dependency check
7470         * src/SDCCast.c (decorateType): catch another small optimization
7471         with '?' operator
7472         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
7473         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
7474         modified to finally use computeType() all over SDCC,
7475         see Feature Request #877103
7476         * src/SDCCval.h: cosmetic
7477         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
7478         valCompare(); regression tested in muldiv.c
7479         * support/regression/tests/muldiv.c (testMod): mod sign follows
7480         dividend only
7481
7482 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
7483
7484         * src/SDCCast.c (decorateType): fixed bug #902362
7485         * doc/INSTALL.txt: fixed install instructions for win32
7486
7487 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
7488
7489         * device/include/Makefile.in (install): fixed by replacing spaces
7490         by tabs
7491         * doc/README.txt,
7492         * doc/INSTALL.txt: updated for release
7493         * doc/sdccman.lyx: added warning for --xstack being buggy
7494
7495 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
7496
7497         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
7498         to eliminate build warnings.
7499         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
7500
7501 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
7502            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7503
7504         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
7505         removed -penable-stack, added comment for stack pragma, added
7506         warning for not initializing the stack/frame registers, removed
7507         comment at interrupts section
7508
7509         Stack is made permanent, there is no ability to disable stack usage.
7510         * src/pic16/device.h,
7511         * src/pic16/device.c: removed all references to USE_STACK macro,
7512         * src/pic16/device.c (pic16_dump_section): when no elements in
7513         rlist, free rlist before return,
7514         * (pic16_dump_int_registers): NEW, internal registers are a new set
7515         of general purpose registers reused by each function,
7516         * (checkAddReg): returns 1 if registers is added to set,
7517         * (pic16_groupRegistersInSection): when a registers is of type
7518         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
7519         * src/pic16/device.h: memRange and Assigned Memory are deleted,
7520         SRCASECMP macro is moved here from device.c
7521         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
7522         PO_PCLATU, PO_PRODL, PO_PRODH,
7523         * (pic16_pCodeOpType, genMinus,
7524         changed compares to "a" register, with AOP_ACC,
7525         * (pic16_genPlus): fixed some bugs and indented properly,
7526         * (pic16_addSign): changed size to size+offset in the MOVWF
7527         instruction,
7528         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
7529         multiply 8-bit operand by literal, result is 8-bit,
7530         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
7531         multiply 2 8-bit operand, result is 8-bit,
7532         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
7533         genUMult8X*_16,
7534         * src/pic16/gen.c: changed accUse to contain WREG only,
7535         * (pic16_emitcomment): renamed to pic16_emitpcomment,
7536         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
7537         true, do not use immediate addressing any more unless sym is a
7538         pointer in codespace,
7539         * (aopForRemat): do not use immediate addressing when symbol not in
7540         codespace and when symbol's address is requested,
7541         * (aopOp): for-loop in if(sym->accUse) is modified for the new
7542         accUse size (= 1),
7543         * (aopGet): added case for AOP_ACC and don't return "accumulator
7544         bug" but WREG instead,
7545         * (popGetTempReg): pushes contents of temporary register in stack,
7546         * (popReleaseTempReg): pops contents of temporary register from
7547         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
7548         * (pic16_popGet): separated case AOP_ACC to return register WREG
7549         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
7550         or PO_IMMEDIATE and initializes their instance/offset appropriately,
7551         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
7552         the use of immediate pointers to certain cases only.
7553
7554         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
7555         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
7556         * (assignResultValue, genCall, genRet): modified to use the new
7557         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
7558         genPcall is still broken,
7559         * (genFunction): added code to create 'A' type pBlocks when
7560         interrupt functions are generated, code not extensively tested yet,
7561         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
7562         * (genEndFunction): modified so ISRs pop stored registers from stack,
7563         * (genMultOneByte): cleanup,
7564         * (AccRsh): added flag andmask, to and result with appropriate mask,
7565         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
7566         * (genDataPointerGet): fixed and reenabled its use,
7567         * (genNearDataPointerGet): bugs fixed,
7568         * (genDataPointerSet): bugs fixed,
7569         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
7570         pic16_DumpSymbol, pic16_DumpOp,
7571         * src/pic16/genutils.h: function prototypes for the above functions,
7572         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
7573         pointers,
7574         * (pic16emitRegularMap): many many many improvements, but needs a
7575         major cleanup,
7576         * src/pic16/main.c: enable_stack in pic16_options is removed,
7577         * (_pic16_parseOptions): removed command line options -penable-stack,
7578         * (_process_pragma): emit stack symbol only when stack pragma is
7579         processed,
7580         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
7581         redirected to FSR0L/FSR0H pair,
7582         * (pic16_get_op, pic16_get_op2): modifications and improvements,
7583         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7584         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
7585         for immediates,
7586         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
7587         * (dumpPicOptype): NEW,
7588         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
7589         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
7590         with movff instruction,
7591         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
7592         added pic16_int_regs, some packRegsFor* functions are commented out,
7593         because produce errors,
7594         * src/pic16/NOTES: minor modifications
7595
7596 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7597
7598         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
7599         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
7600         --pack-iram.
7601         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
7602         * as/mcs51/lkaomf51.c: fixed bug #895763
7603
7604 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
7605
7606         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
7607
7608 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7609
7610         * doc/sdccman.lyx: added details about the HC08 storage classes and
7611         interrupts, fixed the register usage info for z80 & gbz80
7612
7613 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
7614
7615         * doc/sdccman.lyx: added more pic16 port documentation
7616         * device/include/pic16/: added header pic18fregs.h
7617
7618 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
7619
7620         * doc/sdccman.lyx: added Vangelis' contribution
7621
7622 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7623
7624         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
7625         extend to the next CALL or PCALL, not just to the next CALL.
7626
7627 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
7628
7629         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
7630
7631 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7632
7633         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
7634         bug #895752 and a better fix for bug #716790
7635
7636 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7637
7638         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
7639
7640 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7641
7642         * doc/sdccman.lyx: minor changes, minor changed
7643
7644 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
7645
7646         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
7647         which can't handle SDCC_NEWONEBYTEOPS,
7648         (geniCodeMultiply): removed conversion from mult to shift for pic14
7649         and pic16
7650
7651 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7652
7653         * src/hc08/gen.h,
7654         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
7655         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
7656         thus fixing bug #895406
7657
7658 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
7659
7660         * device/lib/_modsint.c,
7661         * device/lib/_modslong.c: sign follows divisor only
7662         * src/hc08/gen.c (genMultOneByte): if result size is 1,
7663         signs or signedness can be ignored
7664         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
7665         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
7666         added optimization for IFX,
7667         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
7668         arguments;
7669         reenabled optimization for IFX, which was removed on 2004-01-11
7670         * src/SDCCast.h: added return type IFX
7671         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
7672         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
7673         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
7674         SDCC_OLDONEBYTEOPS selects the old behaviour
7675         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
7676         changed again and commented promotion rule
7677         * src/SDCCval.c (valDiv): promotion no longer necessary
7678         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
7679         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
7680         rewritten
7681         * support/regression/tests/onebyte.c: added
7682
7683 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
7684
7685         * gen.c (genInline): reverted to old code for assemnling inline
7686         code because of bug reported James Chadd
7687
7688 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
7689
7690         * ralloc.h: missing declarations from previous patch,
7691         seems that patch for ralloc.h was never applied, fixed
7692
7693 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7694            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7695
7696         * pcode.c,
7697         * pcode.h,
7698         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7699         indirect addressing. Marked FSR0 as deprecated
7700         * gen.c (pointerCode): commented out, not needed now
7701         (pic16_popGet2p): new MOVFF helper function
7702         (genGenPointerGet),
7703         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7704         (shiftRLong): removed duplicate debugging info
7705
7706 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7707
7708         * src/ds390/gen.c (genNearPointerGet),
7709         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7710         optimization with bits, but not bitfields.
7711         * src/ds390/ralloc.c (packRegisters),
7712         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7713
7714 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7715
7716         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7717
7718 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7719
7720         * src/SDCCsymt.h,
7721         * src/SDCCicode.c (operandFromSymbol),
7722         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7723         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7724         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7725         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7726         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7727         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7728         bug #892038
7729         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7730         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7731         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7732         * src/SDCCsymt.c (newSymbol),
7733         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7734         enumerator_list),
7735         * src/SDCCval.h,
7736         * src/SDCCval.c (newiList): fixed bug #885705
7737
7738 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7739
7740         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7741         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7742
7743 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7744
7745         * device/include/c8051f120.h,
7746         * device/include/c8051f300.h,
7747         * device/include/c8051f310.h: added/updated header files for Silicon
7748         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7749         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7750         in new section Submitting patches
7751
7752 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7753
7754         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7755         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7756         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7757         genGenPointerSet),
7758         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7759         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7760         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7761         genGenPointerSet),
7762         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7763         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7764         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7765         genGenPointerSet),
7766         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7767         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7768         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7769         genGenPointerSet): fixed bug #892400
7770         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7771         to eliminate build warnings.
7772         * src/SDCCast.c (processParms),
7773         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7774         fixed bug 751859
7775         * support/valdiag/valdiag.py: added GCC to the list of defines active
7776         when compiling with gcc
7777
7778 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7779
7780         * support/Util/SDCCerr.h,
7781         * support/Util/SDCCerr.c,
7782         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7783         with an incomplete type (fixed bug #883734)
7784         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7785
7786 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7787
7788         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7789
7790 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7791
7792         * src/SDCCast.c (decorateType),
7793         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7794         function pointer implementation
7795         * support/regression/tests/funptrs.c: added tests to verify both forms
7796         of function pointers work correctly. Added tests to verify parameters
7797         are passed in the correct order.
7798
7799 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7800
7801         * device.c (regCompare): registers are sorted by ascending
7802         address and increasing size,
7803         * main.c (_pic16_finaliseOptions): removed the declaration
7804         of compiler macro MCU. Now a macro of the format pic18fxxxx
7805         will be defined from the command line
7806
7807 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7808             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7809
7810         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7811         PCOP_RLCF was overwritten!
7812         * gen.c (genSkip): commented out calls to pic16_emitcode,
7813         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7814         * (genlshTwo),
7815         * (genRRC): added debugging info,
7816         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7817         overwritten while shifting,
7818         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7819         overwritten while shifting,
7820         * (AccLsh),
7821         * (AccRsh),
7822         * (shiftLLeftOrResult),
7823         * (shiftRLeftOrResult),
7824         * (shiftRLong),
7825         * (shiftLLong): Implemented with pic16_emitpcode
7826         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7827         * (genLeftShift): Fixed bug, operand for shift by variable always
7828         was "and"ed with 0x0f,
7829         * (genLeftShiftLiteral),
7830         * (genrshTwo),
7831         * (genRightShiftLiteral): added debugging info,
7832         * (genrshFour): added comment,
7833         * (genRightShift): determined signedness from operand "left"
7834         instead of "result"
7835
7836 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7837
7838         * src/SDCCicode.c (geniCodeParms),
7839         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7840         function pointers, fixed function pointer bugs #861242 and #861896
7841
7842 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7843
7844         * device/include/c8051f000.h,
7845         * device/include/c8051f120.h,
7846         * device/include/c8051f300.h: added header files for Silicon
7847         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7848
7849 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7850
7851         * src/SDCCast.c (processParams): added new type flow and restructured
7852         (gatherAutoInit): added new type flow
7853         (addCast): cosmetic changes
7854         (getLeftResultType): added new type flow for array indices, patch
7855         provided by Stas, see FR #877103
7856         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7857         array index patch by Stas
7858         * src/SDCCast.h: added prototype getResultTypeFromType()
7859         * src/SDCCval.h,
7860         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7861         * src/pic/glue.c (pic14emitStaticSeg),
7862         * src/pic16/glue.c (pic16emitStaticSeg),
7863         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7864         for initialization of symbols
7865         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7866         * support/Util/SDCCerr.h:
7867         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7868         * .version: bumped version number to 2.3.8
7869         * device/include/Makefile.in (install),
7870         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7871         avoid warnings
7872
7873 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7874
7875         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7876         Slade Rich fixed an optimization bug
7877         * src/pic/pcodepeep.c,
7878         * src/pic/pcoderegs.c
7879         * doc/Makefile (install): added test for directory
7880
7881 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7882
7883         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7884         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7885         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7886         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7887         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7888         * as/mcs51/asexpr.c (term),
7889         * as/hc08/asexpr.c (term): fixed bug #887146
7890
7891 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7892
7893         * src/z80/gen.c (genMult): handle single byte result product
7894         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7895         DUMMY_READ_VOLATILE (fixed bug #886367)
7896
7897 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7898
7899         * support/regression/tests/libmullong.c: fixed logic, on little endian
7900         hosts we ended without a mullong_wrapper()
7901
7902 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7903
7904         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7905         virus/worm forged address usage.
7906
7907 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7908
7909         Fixed promotion, it should be done on AST level:
7910         * src/SDCCast.c (addCast): added promotion to int
7911         (decorateType): updated call to upCast()
7912         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7913         usualUnaryConversions()
7914
7915 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7916
7917         * support/regression/tests/literalop.c (mulWrapper): Added a
7918         wrapper to remove integer overflow warnings.
7919
7920         * support/regression/tests/float_trans.c: Made work on host.
7921
7922         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7923         location of sz80.
7924
7925         * support/regression/generate-cases.py (main): Changed from inline
7926         to a main method.
7927
7928         * doc/Makefile (install): Changed to depth first to get rid of
7929         missing directory install warning.
7930
7931         * as/Makefile (install-doc): Made work on Mac.
7932
7933 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7934
7935         * src/SDCCast.c: added an additional type flow in decorateType() of
7936         opposite direction, see feature request #860006; it's enabled at runtime
7937         by setting the environment variable SDCC_NEWTYPEFLOW
7938         * src/SDCCast.h: changed prototype of decorateType()
7939         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7940         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7941         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7942         see feature request #877103
7943         * src/SDCCval.c: updated call of decorateType()
7944         (valBitwise): fixed bug #882876
7945         (valMinus): added promotion
7946         (valLogicAndOr): result is unsigned
7947         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7948         * src/SDCCsymt.c (computeType),
7949         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7950         must not cause an unsigned operation
7951         * src/pic/glue (pic14emitRegularMap),
7952         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7953
7954 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7955
7956         * src/pic/pcode.c (PCodeID): commented out left over debug code
7957
7958 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7959
7960         * support/valdiag/tests/overflow.c: added shift tests
7961         * src/pic/device.c,
7962         * src/pic/gen.c,
7963         * src/pic/gen.h,
7964         * src/pic/glue.c,
7965         * src/pic/main.c,
7966         * src/pic/pcode.c,
7967         * src/pic/pcode.h,
7968         * src/pic/pcodepeep.c,
7969         * src/pic/pcoderegs.c,
7970         * src/pic/ralloc.c,
7971         * src/pic/ralloc.h: applied patch from Slade Rich;
7972         added support for multiple code pages and multiple RAM banks on the
7973         PIC 14 port. The ASM files now no longer simply assume all the
7974         code / RAM are in the same page / bank. This means the linker can
7975         safely allocate code/RAM of separate ASM files to different pages/banks.
7976         * doc/sdccman.lyx: added Slade's tips
7977         * src/mcs51/peeph.def: fixed bug #880768
7978
7979 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7980
7981         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7982         * src/SDCCast.c (decorateType): fixed bug #880197
7983
7984 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7985
7986         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7987         getopt.h.
7988
7989         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7990         strtof is not part of C89 and isn't included with Mac OS X.
7991
7992 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7993
7994         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7995         shiftL2Left2Result): fixed bug #879326
7996         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7997         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7998         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7999         address fetch for clr instruction
8000         * device/lib/hc08/_mulint.c: created optimized assembly version
8001         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
8002
8003 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
8004
8005         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
8006         proposed in FR #877103
8007
8008 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
8009
8010         * src/SDCCval.c (cheapestVal): added missing checks
8011         * src/SDCCicode.c (usualBinaryConversions): fixed condition
8012         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
8013
8014 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
8015
8016         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
8017         equal operands
8018
8019 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
8020
8021         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
8022         loaded with the linker search paths (-L arguments) and the libraries
8023         to be linked with the current source (-l arguments). Changes
8024         currently will affect only the pic16 port.
8025         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
8026         include path the port specific paths and port specific libraries,
8027         * gplink command now contains the $3 argument,
8028         * src/pic16/device.h,
8029         * src/pic16/device.c,: structure PIC_device is made public and
8030         renamed to PIC16_device, the same for variable Pics which is renamed
8031         to Pics16. Updated all references to them.
8032         * src/pic16/glue.c (pic16glue): corrected bug with code
8033         initialization which bypassed the variable initializations block.
8034
8035         * device/lib/pic16/Makefile.rules: removed --penable-stack from
8036         COMPILE_FLAGS and added the --nostdinc option
8037
8038 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8039
8040         * device/include/mc68hc908jb8.h: Register defs for another member
8041         of the hc08 family. Contributed by Bjorn Bringert - thanks!
8042
8043 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
8044
8045         Documenting changes from previous commits.
8046         * configure.in (version 1.56),
8047         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
8048         when generating output files to configure the pic16 library,
8049         but now I've commented it out, since gputils aren't installed in the
8050         SF compile farm, so library won't compile
8051
8052         * device/lib/Makefile.in (version 1.56): initially I've added in
8053         target 'all' the prerequestive 'model-pic16' so it compiled the
8054         pic16 library, but now I've commented it out for the same reasons
8055         above,
8056         * added targets 'model-pic16' and 'objects-pic16' to compile the
8057         library
8058         * added target 'port-specific-objects-pic16' to handle the
8059         generated libraries and copy them into the build/ directory
8060         * added target 'clean-intermediate-pic16' to clean intermediate
8061         files into pic16 directory
8062         * in target 'installdirs' added line to create directory pic16 in
8063         the installation path
8064
8065         * device/include/Makefile.in (version 1.11): in target 'install'
8066         added lines to copy all header files to installation path,
8067         * in target 'installdirs' added line create directory for pic16
8068         headers in the installation path
8069
8070 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
8071
8072         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
8073          a function call
8074
8075 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
8076
8077         * configure,
8078         * device/lib/configure.in,
8079         * device/lib/configure: fixed for autoconf 2.57
8080
8081 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8082
8083         * src/z80/main.c (_parseOptions): fixed the portmode= command line
8084         option so that it actually works. Made it specific to the z80, since
8085         the gbz80 doesn't have these kinds of I/O ports.
8086
8087 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8088
8089         * device/include/z180.h,
8090         * device/lib/_memcpy.c,
8091         * device/lib/_memmove.c,
8092         * device/lib/_mulint.c,
8093         * device/lib/ser_ir.c,
8094         * device/lib/ser_ir_cts_rts.c,
8095         * device/lib/_strcmp.c,
8096         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
8097         * src/z80/main.c (_process_pragma): add support for pragmas bank and
8098         portmode; added deprecation warning for bank= and protmode= forms.
8099         Also, guard against buffer overflow.
8100         * src/z80/gen.c (aopGet): generate better code for sfr banked read
8101
8102 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8103
8104         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
8105         changed interrupt vector table generation to only emit declared vectors.
8106         * device/include/Makefile.in: added missing backslash
8107         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
8108
8109 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8110
8111         Mainly changes to support compilation of the device libraries
8112         * src/pic16/device.c: stack is allocated via symbol and not
8113         via literal number. The symbol is placed in the corresponding
8114         position of the data ram
8115         * (pic16_dump_section): relocatable and absolute uninitialized
8116         data are now emitted in sorted order to reduce section naming,
8117         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
8118         weren't marked as being in the access bank,
8119
8120 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8121
8122         Added portion of GNU PIC Library under the directory
8123         device/include/pic16 and device/lib/pic16. These files
8124         contain the declarations of SFRs for the PIC18Fxx2 devices.
8125         The directory is initialized via configure from toplevel.
8126
8127 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
8128
8129         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
8130         the spilllocations to be compared correctly
8131
8132 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8133
8134         * src/SDCCast.c (decorateType): fixed bug introduced today
8135
8136 2004-01-12  Borut Razem <borut.razem AT siol.net>
8137
8138         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
8139         doc/sdccman.lyx: upper case pragmas are deprecated
8140
8141 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8142
8143         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
8144         in simpler and even better code
8145
8146 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
8147
8148         * src/SDCCicode.c (operandOperation): fixed bug #874819
8149         * src/SDCCast.c (decorateType): fixed
8150         char foo (unsigned long ul) { return ul > 0; }
8151
8152 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8153
8154         * doc/sdccman.lyx: Moved and added some sections, small changes
8155         all over. Telling LaTeX to be less strict with word spacing
8156         to better keep the right margin. Changed some notes about
8157         maintainance of the ports in section 3.2.1 - is it OK like this?
8158
8159 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
8160
8161         SDCC source changes:
8162         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
8163         convilong): modified to inform the pic16 port that builtin functions
8164         are external
8165
8166         PIC16 PORT specific changes:
8167         * src/pic16/device.c pic16_dump_equates() added,
8168         processor registers declared internally by the port are emitted in
8169         the translation as equates,
8170         * src/pic16/gen.c: inline code is passed unprocessed to the
8171         translation,
8172         * (pic16_popGetLit2): fnuction modified to take second operand as
8173         pCodeOp pointer and not as literal,
8174         * (popRegFromIdx): prefixed with pic16_,
8175         * (pic16_popCombine2): modified to receive already allocated pCode
8176         operands,
8177         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
8178         * (genFunction): initializes local stack frame and pushes on stack
8179         all the registers used by this function,
8180         * (genEndFunction): restores all registers from stack and restores
8181         stack frame,
8182         * src/pic16/glue.c (pic16emitRegularMap): various changes and
8183         improvements,
8184         * (pic16glue): changed the program startup sequence,
8185         * added new dbName code 'A' for functions placed in absolute section
8186         * src/pic16/main.c: added function attribute _naked,
8187         * added pragma 'code' to place a fnuction at an absolute address,
8188         * added command line arguments --debug-ralloc and --pcode-verbose,
8189         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
8190         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
8191         * (pic16_newpCodeOpLit2): modified to take the second operand as
8192         pCodeOp pointer,
8193         * (pic16_printpBlock): modified to emit each function in a separate
8194         section,
8195         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
8196         UPPER for immediate operands,
8197         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
8198         instruction,
8199         * src/pic16/peeph.def: all peepholes with movff are commented out,
8200         because there is a problem in the pcode peep optimizer,
8201         * src/pic16/ralloc.c: the register allocator can now reuse local
8202         function symbols for another function. This saves register usage.
8203         * src/pic16/ralloc.h: added flag isLocal in structure regs,
8204
8205         Added file src/pic16/NOTES with information about program writing on
8206         the current port version.
8207
8208 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8209
8210         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
8211         and peephole 252 (array access)
8212
8213 2004-01-09  Borut Razem <borut.razem AT siol.net>
8214
8215         * src/SDCCmain.c : fixed #872250: -l command line defined library
8216           files are scanned before standard library files
8217
8218 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8219
8220         * src/SDCCast.c (decorateType): fixed bug #874046
8221
8222 2004-01-09  Borut Razem <borut.razem AT siol.net>
8223
8224         * support/scripts/sdcc.nsi: remove previous installation
8225
8226 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8227
8228         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
8229         bytes for last interrupt vector (mcs51)
8230         * sdcc.spec: fixed typo
8231
8232 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8233
8234         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
8235         gen51Code): more efficient parameter receive for --model-large
8236         ("bug" #845294)
8237
8238 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8239
8240         * src/ds390/main.c,
8241         * src/z80/main.c: added missed needLinkerScript flags (more than
8242         one port structure defined in these file)
8243         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
8244         bug #795325
8245
8246 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
8247
8248         * src/SDCCmain.c: removed various references to DEFAULT_PORT
8249         * src/port.h: added flag needLinkerScript in port->linker
8250         structure to inform whether to create a .lnk file or not,
8251         * src/avr/main.c,
8252         * src/ds390/main.c,
8253         * src/hc08/main.c,
8254         * src/mcs51/main.c,
8255         * src/pic/main.c,
8256         * src/pic16/main.c,
8257         * src/xa51/main.c,
8258         * src/z80/main.c: changed appropriately to configure
8259         needLinkerScript flag
8260         * src/pic/gen.c,
8261         * src/pic16/gen.c (genAddrOf): fixed bug #863624
8262         * src/pic/glue.c: added variable udata_section_name to
8263         override default uninitialized data segment definition for
8264         devices only with SHAREBANK memory (reported from Erik Epetrich)
8265         * (pic14emitOverlay): modified to emit a commented overlay segment
8266         directive when no overlay data exist
8267         * (picglue): modified to emit uninitialized data segment
8268         according to udata_section_name
8269         * src/pic/main.c (_pic14_parseOptions): added command line
8270         options --udata-section-name=[name] to override default
8271         udata definition name
8272         * modified _linkCmd and _asmCmd to include compiler passed
8273         arguments via -W option
8274         * src/pic16/main.c: added $l in _asmCmd, changed extension for
8275         object file from '.rel' to '.o' in port->linker structure,
8276         changed size of fptr from 2 to 3 in port structure
8277
8278 2004-01-07  Borut Razem <borut.razem AT siol.net>
8279
8280         * support/scripts/sdcc.nsi: update PATH
8281         * support/scripts/sdcc.ico: craeted
8282
8283 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
8284
8285         * device/include/Makefile.in: fix install
8286         * doc/Makefile: fix install
8287
8288 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8289
8290         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
8291         in bug #860505
8292         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
8293         how the function variable allocation summary is displayed; also
8294         include information about variables allocated to the overlay
8295         segment
8296
8297 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8298
8299         * as/mcs51/lkmain.c: Help about -Y option
8300         * as/mcs51/lkarea.c: Fixed gcc warnings
8301
8302 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8303
8304         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
8305         fixed warning
8306         * support/valdiag/tests/overflow.c: added
8307         * src/SDCCast.c (decorateType),
8308         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
8309         LEFT_OP (left shift)
8310
8311 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8312
8313         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
8314         (default behaviour).
8315
8316 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8317
8318         A python script to validate compiler diagnostic messages. It can be
8319         used to verify that sdcc complains about bad c source code and
8320         gives a good location of the error.
8321         * support/valdiag/Makefile,
8322         * support/valdiag/valdiag.py,
8323         * support/valdiag/tests/*
8324
8325 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8326
8327         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
8328         * src/SDCCsymt.c (newEnumType),
8329         * src/SDCCsymt.h
8330         * support/Util/SDCCerr.c,
8331         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
8332         enum related bugs.
8333         * support/regression/tests/enum.c: added test for enum values that
8334         require at least 2 bytes of storage.
8335
8336 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8337
8338         * src/common.h: added ifndef/define/endif macros
8339         around the header file.
8340         Bug reported from Jesus Calvino-Fraga
8341
8342 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8343
8344         * sdcc.spec: updated
8345         * device/include/Makefile.in: don't install CVS directories
8346         * device/lib/Makefile.in: added removal of CVS directories after install
8347         * doc/Makefile: fixed install, added local_icons
8348         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
8349         * src/mcs51/gen.c (genRightShift): fixed bug #870788
8350         * src/ds390/gen.c (genRightShift): fixed bug #870788
8351         * src/SDCCast.c (decorateType): fixed bug #870781
8352
8353 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8354
8355         PIC16 port related changes:
8356         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
8357         added variable stackPos,
8358
8359         * gen.c: genCall, assignResultValue: added support for
8360         pushing/retrieving function parameters to/from stack,
8361         genFunction,genEndFunction: setup stack frame for the
8362         generated function,
8363         genAddrOf: will be changed according to bug 863624
8364
8365         * added files genutils.c and genutils.h which contain gen*
8366         debugged and optimised functions extracted from gen.c
8367
8368         * glue.c: added variable 'externs' which holds extern symbols,
8369         pic16emitRegularMap: is modified to properly handle relocatable
8370          symbols under the new scheme,
8371         pic16createInterruptVect: is modified
8372         pic16printPublics: is modified to emit 'global' assembler directives,
8373         added pic16_printExterns to print extern symbols,
8374         pic16glue: initializes stack/frame pointer in the beginning of
8375         the assembly output. Temporary hack, will be corrected later,
8376         because gplink yet does not support stack and SDCC does not
8377         yet support a type of crt0.o object to create the final binary.
8378
8379         * Removed many lines that contain 8051 legacy code.
8380         * The code is finally placed under a 'code' directive.
8381         * Added port specific options.
8382
8383         * _process_pragma: simplified since now we do not need *special*
8384         include file to define SFR registers. But a separate header
8385         will be needed. This will be developed later.
8386         * _pic16_parseOptions: added, parses port specific options:
8387         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
8388         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
8389         --preplace-udata-with=
8390
8391         * _pic16_setDefaultOptions: modified to initialize section names,
8392         but hack is temporarly out of order since it needs improvement.
8393         * _pic16_genAssemblerPreamble: configuration words are emitted by
8394         their address instead of their name. This part is incomplete and
8395         supports only the 18Fxx2 devices. Other devices will emit an error
8396         during assembly since they do not contain the same set of config
8397         registers
8398         * _pic16_genIVT: is modified,
8399
8400         * pcode.c: added definitions for some hardware registers that are needed
8401         for stack support
8402         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
8403         All PCI entries are updated. Now LFSR is supported.
8404         * Removed pic16_pciTRIS is mentioned by mdubuc in source
8405         * added pic16_newpCodeOpLit2 to support instructions with
8406         two literal arguments
8407         * pic16_pCode2str: corrected code that emits assembler instructions
8408         with two literal operands and those that have an access bit modifier
8409         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
8410         this fixes a bug which caused some labels to be lost, when an
8411         assembler directive was added, i.e. banksel,
8412         * pic16_FixRegisterBanking: improved logic that causes the insertion
8413         of bank switching,
8414         * InlineFunction: functions that are called once, are not any more
8415         inlined. This can be a port option in the future,
8416
8417         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
8418
8419         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
8420         hold the corresponding uninitialized symbols,
8421         * pic16_allocProcessorRegister: registers have explicit marked the
8422         accessBank field,
8423         * pic16_allocInternalRegister: registers are explicit marked as
8424         not used,
8425         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
8426         processing list, so bit registers were lost,
8427         *
8428
8429         * ralloc.h: added field 'accessBank' and original symbol operand
8430         in register definition,
8431         * removed the field isMapped from register definition,
8432
8433         ** Several functions have been removed from various sources:
8434         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
8435         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
8436         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
8437         pic16_assignRelocatableRegisters
8438
8439         ** others have been introduced:
8440         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
8441         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
8442
8443 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
8444
8445         * support/scripts/inc2h.pl: changed definition of BIT_AT
8446         to emit 'sbit at' instead of 'bit at'. This was a request.
8447
8448         PIC16 port related preliminary changes:
8449         * gen.c: prefixed function popRegFromString with
8450         pic16_ and all references to it corrected
8451         * pcode.c: all pic16_pc_* hardware registers prefixed
8452         with underscore (_),
8453         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
8454         * ralloc.c: newReg(): when register is REG_SFR then
8455         set address to rIdx,
8456         pic16_allocProcessorRegister(): marks register wasUsed=0
8457         pic16_writeUsedRegs(): added a call to assign processor
8458         registers via pic16_assignFixedRegisters
8459
8460 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8461
8462         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
8463         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
8464         variables in unused register banks.  Also the SSEG is placed
8465         wherever there is enough space for it, and IDATA can be anywhere
8466         in internal RAM.  For now compile using -Wl-Y[stack_size].
8467         The mem file is different for this option as well, since it
8468         makes no sense of talking about DSEG lenght.
8469
8470 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
8471
8472         * src/SDCClrange.c: fixed bug 869095 that caused segfault
8473         in certain cases, e.g. when ROM assignment, patch provided
8474         from Albert den Haan.
8475
8476 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
8477
8478         Many signedness and type propagation fixes:
8479         * src/SDCCicode.c: made geniCodeCast() static
8480         replaced SPEC_ by IS_ (cosmetic)
8481         (operandOperation): fixed div and mod operation
8482         (usualBinaryConversions): added support for promotion of char
8483         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
8484         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
8485         (geniCodeAdd): an array index will stay unsigned, even if promoted
8486         from char to int
8487         (geniCodeArray): ditto
8488         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
8489         * src/SDCCsymt.c (computeType): added more support for char;
8490         promotion of char is selectable by promoteCharToInt, fixed signedness
8491         for all cases
8492         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8493         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8494         * src/SDCCval (val*): replaced signedness calculation by
8495         computeType()
8496         rearranged if-branches (cosmetic)
8497         (valShift): added warning W_SHIFT_CHANGED
8498         (valCompare): fixed problem with different types
8499         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
8500         * support/regression/tests/literalop.c: added many cases
8501         * support/regression/tests/ast_constant_folding.c: changed finally to
8502         'unsigned int'
8503         * .version: new year, new version: 2.3.7
8504         * src/SDCCmain.c (main): applied patch #866468
8505         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
8506         provided by Scott Bronson
8507         * doc/sdccman.lyx: updated documentation for sdcdb
8508         updated and added chapter tips
8509
8510 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8511
8512         * src/SDCCsymt.h: missing from yesterday's commits
8513
8514 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8515
8516         * src/SDCC.y (struct_or_union_specifier),
8517         * support/Util/SDCCerr.c,
8518         * support/Util/SDCCerr.h: verify that struct & union tags are used
8519         as declared.
8520
8521 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8522
8523         * src/SDCCglobl.h: missing from yesterday's commits
8524
8525 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8526
8527         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
8528         sft_attributes, struct_declaration, parameter_declaration,
8529         type_name, start_block, declaration_list),
8530         * src/SDCC.lex (check_type): support redefinition of typedef names
8531
8532 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8533
8534         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
8535         aligned xdata arrays. Erik helped me with the if clause.
8536
8537 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8538
8539         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
8540         warning
8541
8542 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8543
8544         * src/SDCCast.h,
8545         * src/SDCCast.c (newAst_),
8546         * src/SDCCicode.h,
8547         * src/SDCCicode.c (ast2iCode, newiCode),
8548         * src/SDCCglobl.h,
8549         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
8550         expr, statement, expression_statement, selection_statement,
8551         iteration_statement, expr_opt, jump_statement): foundation for tracking
8552         sequence points
8553         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
8554         point code too)
8555
8556 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8557
8558         * support/Util/SDCCerr.c,
8559         * src/SDCCast.h,
8560         * src/SDCCast.c (createCase, createDefault, decorateType),
8561         * src/SDCClabel.c (labelUnreach),
8562         * src/SDCC.y (labeled_statement, jump_statement): More improvements
8563         to error messages.
8564         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
8565         (with thanks to Stas Sergeev)
8566         * device/include/time.h,
8567         * device/lib/time.c (CheckTime): suppress unreachable code warning
8568
8569 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8570
8571         * src/SDCCast.c (createIvalCharPtr),
8572         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
8573         bug #753752)
8574         * support/regression/tests/nullstring.c: tests for these two bugs
8575
8576 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8577
8578         * support/Util/SDCCerr.h,
8579         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
8580         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
8581         about storage class and 'at' used inside struct or union
8582         * src/SDCCBBlock.c (iCodeFromeBBlock),
8583         * src/SDCCcse.c (ifxOptimize),
8584         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
8585         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
8586         printIval, emitStaticSeg, emitOverlay),
8587         * src/SDCClabel.c (deleteIfx),
8588         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
8589         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
8590         gatherAutoInit, processParms),
8591         * support/Util/SDCCerr.h,
8592         * support/Util/SDCCerr.c (werrorfl): Support for better error location
8593         reporting for post-parse errors.
8594
8595 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8596
8597         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
8598         implicit casts via union; they don't work on big endian systems
8599         (possible fix for bug #861138)
8600
8601 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8602
8603         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
8604         * src/mcs51/main.c: fixed the fix for bug #737001
8605
8606 2003-12-15  Borut Razem <borut.razem AT siol.net>
8607
8608         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
8609
8610 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8611
8612         * support/makebin/makebin.c: put output in binary mode
8613
8614 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8615
8616         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
8617         xdata and data memory on startup. Set the environment variable
8618         SDCC_NOGENRAMCLEAR to disable this.
8619         * src/mcs51/peephole.def,
8620         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
8621         (allows non-interrupt and interrupt code to safely compete for a resource
8622         without the non-interrupt code having to disable interrupts)
8623
8624 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8625
8626         * src/SDCCicode.c (geniCodeAdd),
8627         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
8628         with valFromType if type might be a pointer and host is big endian).
8629         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
8630         types, not just integer types.
8631         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
8632         multiply defined with mismatching "at" address.
8633
8634 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8635
8636         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
8637         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
8638         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
8639         with embedded nulls (fixed bug #753752)
8640
8641 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8642
8643         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
8644         Apparently this did not see much testing (endless loop)
8645
8646 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8647
8648         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
8649
8650 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8651
8652         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
8653         gracefully handle NULL memmap pointers
8654
8655 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8656
8657         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
8658         instead of deleting the iCode when an operand is volatile
8659         * src/z80/gen.c (genDummyRead),
8660         * src/mcs51/gen.c (genDummyRead),
8661         * src/ds390/gen.c (genDummyRead),
8662         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
8663         not just IC_RIGHT
8664         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
8665         * src/SDCC.y: fixed bug #850420
8666
8667 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8668
8669         Applied z80 i/o port patch from Peter Townson and fixed some operators
8670         to better handle operands in A register.
8671         * device/include/z180.h
8672         * src/SDCC.y
8673         * src/SDCCglue.c
8674         * src/z80/gen.c
8675         * src/z80/gen.h
8676         * src/z80/main.c
8677         * src/z80/peeph-z80.def
8678         * src/z80/peeph.def
8679         * src/z80/z80.h
8680
8681 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8682
8683         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
8684
8685 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8686
8687         * device/lib/hc08/_mullong.c: Removed extra #endif
8688
8689 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8690
8691         * sim/ucsim/hc08.src/inst.cc,
8692         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8693         carries from x to h
8694         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8695         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8696         * device/include/stdarg.h: fixed varargs for hc08
8697         * device/lib/Makefile.in,
8698         * device/lib/hc08/Makefile,
8699         * device/lib/hc08/_mulint.c,
8700         * device/lib/hc08/_mullong.c: fixed some endian problems
8701
8702 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8703
8704         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8705         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8706         * device/lib/_gptrget.c,
8707         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8708
8709 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8710
8711         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8712         * src/SDCCast.c (astErrors): fixed bug #846007
8713         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8714
8715 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8716
8717         * src/SDCCast.c (decorateType): disabled a transformation I added in
8718         revision 1.188 (access to fields of a structure at an absolute address);
8719         it breaks with bitfields, extern declarations, and gcse analysis.
8720         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8721         could be assigned through a pointer, so don't complain.
8722         * src/SDCCast.c (astErrors),
8723         * src/SDCCast.h,
8724         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8725
8726 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8727
8728         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8729         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8730         output of __config directives, since gpasm now supports them
8731         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8732         pre-processor macro, i.e. -DMCU=p18f452
8733         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8734         and modified to handle 'cast' icode similarly to '=' icode
8735         * src/pic16/device.h (typedef struct PIC_device): added field
8736         'extMIface' to indicate that chip has external memory interface
8737         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8738         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8739         18F8720
8740
8741 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8742
8743         * src/SDCC.y (pointer): fixed bug #846006
8744         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8745         * src/SDCCast.c (decorateType): fixed bug #846009
8746         * src/ds390/peeph.def,
8747         * src/ds390/gen.c (genAnd, genOr),
8748         * src/mcs51/peeph.def,
8749         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8750
8751 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8752
8753         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8754         * src/SDCCdflow.c
8755         * src/SDCCcse.c
8756         * src/SDCCcse.h
8757         * src/SDCCBBlock.h
8758         * src/SDCCBBlock.c
8759
8760 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8761
8762         fixed bug #845089
8763         * src/SDCCbitv.h,
8764         * src/SDCCbitv.c: added function to free a bitvector
8765         * src/SDCClrange.h,
8766         * src/SDCClrange.c: added function to recompute the liveranges
8767         * src/avr/ralloc.c,
8768         * src/ds390/ralloc.c,
8769         * src/hc08/ralloc.c,
8770         * src/mcs51/ralloc.c,
8771         * src/pic/ralloc.c,
8772         * src/pic16/ralloc.c,
8773         * src/xa51/ralloc.c,
8774         * src/z80/ralloc.c: recompute the liveranges after register packing
8775
8776 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8777
8778         * src/SDCCloop.c (newInduction): fixed bug #845630
8779
8780 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8781
8782         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8783         inadvertantly left behind from my 2003-11-12 change
8784
8785 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8786
8787         Updated headers I neglected to commit yesterday.
8788         * src/SDCClrange.h,
8789         * src/SDCCicode.h
8790
8791 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8792
8793         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8794         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8795         * src/SDCCopt.c (eBBlockFromiCode),
8796         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8797         the creation of the key hash table from the sequencing so it can be used
8798         earlier (for some GCSE bug fixes still pending)
8799
8800 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8801
8802         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8803         * support/regression/tests/addsub.c: testing genPlus shortcut
8804
8805 2003-11-15  Borut Razem <borut.razem AT siol.net>
8806
8807         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8808
8809 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8810
8811         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8812         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8813         ordering is immaterial.
8814         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8815
8816 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8817
8818         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8819         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8820         (SIGSEV) of bug #840381
8821         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8822         unlink new file before rename if new and old filenames are the same)
8823
8824 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8825
8826         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8827         uninitialized variables) for the mcs51. Set environment variable
8828         SDCC_GENRAMCLEAR to test.
8829         xdata initialization slightly shorter
8830
8831 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8832
8833         * src/SDCCsymt.h,
8834         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8835         #838241 & 780691 (basicly the same bug)
8836         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8837         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8838
8839 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8840
8841         * src/SDCCmain.c (linkEdit): "fix" #834252
8842
8843 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8844
8845         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8846         * src/SDCCast.h,
8847         * src/SDCC.y: fixed bug #819403
8848
8849 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8850
8851         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8852         the reentrant attribute.
8853         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8854         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8855         simulation
8856         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8857         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8858         erroneously reduced to a literal.
8859         * src/hc08/ralloc.c (packRegisters, rematStr),
8860         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8861         some cases
8862
8863 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8864
8865         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8866         * doc/sdccman.lyx: changed from 'article' to 'book'
8867         * doc/Makefile: readded test_suite_spec and cdbfileformat
8868
8869 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8870
8871         * device/include/stdlib.h: include malloc.h to comply with ANSI
8872         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8873
8874 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8875
8876         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8877         * doc/clean.mk: also remove *.out files
8878         * doc/sdccman.lyx: some additions, larger top/bottom margins
8879
8880 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8881
8882         * src/SDCC.y: fixed bug #837365
8883         * support/regression/tests/bitopcse.c
8884         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8885         a symbol (might be valop instead)
8886         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8887         * device/lib/clean.mk: added hc08 to the cleaning list
8888
8889 2003-11-04  Borut Razem <borut.razem AT siol.net>
8890
8891         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8892           made 2003-11-04
8893         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8894           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8895           malloc is declared in standard stdlib.h
8896
8897 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8898
8899         * device/lib/hc08/Makefile: need to clean .rel not .o files
8900         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8901
8902 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8903
8904         * src/port.h,
8905         * src/hc08/main.c,
8906         * src/mcs51/main.c,
8907         * src/ds390/main.c,
8908         * src/z80/main.c,
8909         * src/avr/main.c,
8910         * src/pic/main.c,
8911         * src/pic16/main.c,
8912         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8913         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8914         tests (which uses the port's oclsExpense function)
8915         * src/SDCC.y,
8916         * src/SDCCast.c,
8917         * src/SDCCicode.c,
8918         * src/hc08/gen.c,
8919         * src/ds390/gen.c,
8920         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8921
8922 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8923
8924         * src/SDCCcse.c (ifxOptimize),
8925         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8926         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8927         deleting the IFX iCode.
8928         * src/hc08/ralloc.c: reduced unneeded slocs
8929         * src/hc08/gen.c: fixed bug in asmopToBoolean
8930
8931 2003-11-04  Borut Razem <borut.razem AT siol.net>
8932
8933         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8934           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8935           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8936           transferred to configure
8937
8938 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8939
8940         Use headers defined in the C[++] standards:
8941         * sim/ucsim/gui.src/serio.src/fileio.cc
8942         * sim/ucsim/gui.src/serio.src/frontend.cc
8943         * sim/ucsim/gui.src/serio.src/main.cc
8944         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8945         * support/Util/NewAlloc.c
8946         * as/hc08/lklibr.c
8947         * as/mcs51/lklibr.c
8948         * as/z80/aslist.c
8949         * as/z80/assym.c
8950
8951 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8952
8953         * Added MSVC projects for hc08 assembler and linker:
8954         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8955         /as/hc08/link_hc08.dsp
8956
8957 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8958
8959         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8960
8961 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8962
8963         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8964
8965 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8966
8967         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8968
8969 2003-10-31  Borut Razem <borut.razem AT siol.net>
8970
8971         * support/cpp2/cpplib.h,
8972           support/cpp2/cpplib.c,
8973           support/cpp2/cpplex.c,
8974           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8975           to switch _asm block preprocessing on / off. Default is
8976           #pragma preproc_asm +
8977
8978 2003-10-31  Borut Razem <borut.razem AT siol.net>
8979
8980         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8981           when outputting comment blocks (when executed with -C option) and
8982           _asm (SDCPP specific) blocks
8983
8984 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8985
8986         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8987
8988 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8989
8990         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8991
8992 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8993
8994         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8995         * src/SDCCast.c (decorateType): fixed bug #832664
8996
8997 2003-10-31  Borut Razem <borut.razem AT siol.net>
8998
8999         * support/cpp2/cpplex.c: fixed for SDCPP:
9000           comments(when executed with -C option) and _asm blocks
9001           were included even if they where in skipped #if block.
9002           Applied solution from GCC cpp 3.3.2
9003
9004 2003-10-31  Borut Razem <borut.razem AT siol.net>
9005
9006         * src/SDCC.lex: sdcc now understands both formats:
9007           '# <line_number> <file_name>' and
9008           '#line <line_number> <file_name>'
9009         * support/cpp2/cppmain.c: sdcpp now generates the standard
9010           '# <line_number> <file_name>' instead of former
9011           '#line <line_number> <file_name>'
9012
9013 2003-10-30  Borut Razem <borut.razem AT siol.net>
9014
9015         * support/cpp2/cpphash.h,
9016         * support/cpp2/cpplib.h
9017         * support/cpp2/cpplex.c,
9018         * support/cpp2/cppmain.c,
9019         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
9020
9021 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9022
9023         Fixed a number of problems revealed by bug #827883.
9024         * src/SDCCloop.c (loopInvariants): Spill location of the
9025         result operand should be recomputed if extracted from
9026         a loop. Also, don't extract assignments of an iTemp
9027         from a literal.
9028         * src/SDCCast.c (isConformingBody): loop reversal should
9029         not occur if the control variable is involved with a
9030         relational operator.
9031
9032 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
9033
9034         * .version: bumped to 2.3.6 to reflect the big improvements
9035         made by Erik and Klaus. Thanks!
9036
9037 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
9038
9039         Replaced the livrange code.
9040         * src/SDCClrange.c: added new LR code
9041         * src/SDCCloop.c,
9042         * src/SDCCBBlock.h: removed remainig parts from old LR code
9043         * src/ds390/ralloc.c,
9044         * src/ds390/gen.c: minor fixes to make it work with new code
9045
9046 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9047
9048         * as/hc08/asm.h,
9049         * as/hc08/lkrloc.c,
9050         * src/hc08/gen.c,
9051         * src/hc08/ralloc.c: Fix various warnings related to the hc08
9052         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
9053         (tweaked fix for bug #818696)
9054
9055 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9056
9057         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
9058
9059 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9060
9061         * src/SDCCmain.c,
9062         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
9063         * src/mcs51/gen.c (gencjneshort),
9064         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
9065         more efficient (per Scott Bronson's suggestion)
9066
9067 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9068
9069         Extended the semantics of the critical keyword to include
9070         individual statements. See RFE #827755 and #799831
9071         * src/SDCC.y
9072         * src/SDCCicode.c
9073         * src/SDCCopt.c
9074         * src/SDCCast.c
9075         * support/Util/SDCCerr.c
9076         * support/Util/SDCCerr.h
9077         * src/mcs51/gen.c
9078         * src/ds390/gen.c
9079         * src/hc08/gen.c
9080
9081 2003-10-19  Borut Razem <borut.razem AT siol.net>
9082
9083         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
9084
9085 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9086
9087         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
9088         Fixed bug #818696
9089         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
9090         and predecrement operand is displayed
9091
9092 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9093
9094         * src/SDCCval.c (valMinus): fixed bug #826041
9095
9096 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9097
9098         Some hc08 related updates that I missed earlier
9099         * sim/ucsim/stypes.h
9100         * support/regression/ports/hc08/spec.mk
9101
9102 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9103
9104         New target "hc08" for the Motorola 68hc08 family of micros
9105
9106         * configure
9107         * configure.in
9108         * Makefile
9109         * src/hc08/*
9110         * src/SDCCmain.c
9111         * src/port.h
9112         * sim/ucsim/hc08.src/*
9113         * sim/ucsim/configure.in
9114         * src/ucsim/configure
9115         * sim/ucsim/packages_in.mk
9116         * as/hc08/*
9117         * as/Makefile
9118         * device/include/mc68hc908qy.h
9119         * device/lib/hc08/*
9120         * device/lib/Makefile.in
9121         * support/regression/ports/hc08/*
9122         * support/regression/Makefile
9123
9124 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9125
9126         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
9127         regression test
9128         * src/ds390/gen.c (genCast): fixed bug #821957
9129
9130 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9131
9132         * device/lib/logf.c: "fixed" overlay bug
9133         * support/regression/ports/host/spec.mk: added m library
9134         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
9135         * support/regression/tests/float_trans: added (for Eric)
9136
9137 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
9138
9139         * src/mcs51/gen.c (genCpl): fixed bug
9140         http://sf.net/mailarchive/message.php?msg_id=6263915
9141
9142 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
9143
9144         * src/SDCCast.c (decorateType): added extended constant folding
9145         * src/SDCCsymt.c (computeType): cleanup
9146         * src/SDCCval.c (valShift): minor optimization
9147         * support/regression/tests/ast_constant_folding.c: added
9148
9149 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9150
9151         * src/SDCCmain.c: removed some unintended changes
9152
9153 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9154
9155         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
9156         * src/z80/gen.c: fixed part of bug #817589
9157         * src/SDCCsymt.c (checkFunction): fixed bug #817895
9158
9159 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
9160
9161         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
9162         * src/SDCCcflow.c
9163         * src/SDCCcse.c
9164         * src/SDCCdflow.c
9165         * src/SDCClabel.c
9166         * src/SDCClrange.c
9167         * src/SDCCmem.c
9168         * src/SDCCopt.c
9169         * src/SDCCpeeph.c
9170         * src/SDCCset.c
9171         * src/avr/ralloc.c
9172         * src/ds390/ralloc.c
9173         * src/izt/ralloc.c
9174         * src/mcs51/ralloc.c
9175         * src/pic/ralloc.c
9176         * src/pic16/ralloc.c
9177         * src/xa51/ralloc.c
9178         * src/z80/ralloc.c
9179         * src/z80/gen.c: removed unused label "release:"
9180
9181 2003-10-06  Borut Razem <borut.razem AT siol.net>
9182
9183         * src/SDCC.lex: removed definition of unused variables
9184           save_optimize and save_options
9185
9186 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
9187
9188         * clean.mk: removed '=' in "-maxdepth=1"
9189         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
9190         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
9191
9192 2003-10-06  Borut Razem <borut.razem AT siol.net>
9193
9194         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
9195           my_unput() replaced by unput()
9196
9197 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
9198
9199         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
9200         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
9201         type-punned pointer will break strict-aliasing rules"
9202         Old LR behaviour is again default; Klaus' LR can be choosen by
9203         defining the environment variable LRKLAUS
9204         * src/SDCCBBlock.h
9205         * src/SDCCloop.c
9206         * src/SDCClrange.c
9207         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
9208         * clean.mk: fixed removal of files in bin/CVS/
9209         * device/lib/clean.mk: fixed removal of directories small and large
9210         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
9211         * src/SDCCicode.c,
9212         * src/SDCCval.c: removed superflous test for pedantic
9213
9214 2003-10-05  Borut Razem <borut.razem AT siol.net>
9215
9216         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
9217           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
9218           message "unmatched #pragma SAVE and #pragma RESTORE"
9219
9220 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9221
9222         * doc/sdccman.lyx: various additions and updates (interrupts, inline
9223           assembly, critical functions, atomic, nojtbound)
9224
9225 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
9226
9227         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
9228         * src/SDCCBBlock.h
9229         * src/SDCCloop.c
9230         * src/SDCCloop.h
9231         * src/SDCClrange.c
9232
9233 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9234
9235         * src/z80/gen.h,
9236         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9237         * src/mcs51/gen.h
9238         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9239         * src/ds390/gen.h
9240         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9241         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
9242         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
9243
9244 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9245
9246         * src/z80/gen.c (genRet): fixed bug #524753
9247         * src/z80/gen.c (genCast): fixed internal error on cast from
9248         pointer to long
9249         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
9250         fix for bug #477835 to the z80
9251         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
9252         for tracking iCodes in the peephole optimizer for z80
9253
9254 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9255
9256         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
9257         the other part of bug #814548
9258         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
9259
9260 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
9261
9262         * src/SDCCcse.c: fixed part of bug #814548
9263
9264 2003-09-28  Borut Razem <borut.razem AT siol.net>
9265
9266         * src/asm.c: rewrite of printILine() to use temporary file instead
9267           a pipe
9268         * src/xa51/main.c: commented out declaration of int rewinds
9269
9270 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9271
9272         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
9273
9274 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9275
9276         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
9277         * src/asm.c (printILine): Fixed bug #811015
9278
9279 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9280
9281         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
9282         freeing.
9283
9284 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9285
9286         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
9287         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
9288         to correctly handle general case of AOP_PAIRPTR
9289         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
9290
9291 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9292
9293         * src/mcs51/ralloc.c (fillGaps),
9294         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
9295         register positioning bug)
9296
9297 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
9298
9299         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
9300
9301 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9302
9303         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
9304         genCodePointerGet, genGenPointerGet, genFarPointerSet,
9305         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
9306         (ralloc doesn't intentionally do this now, but perhaps later)
9307         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
9308         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
9309         register positioning bugs (Fixed bug #762602 and #795325)
9310         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
9311         (Fixed bug #808779)
9312         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
9313         lines that --i-code-in-asm generates
9314
9315 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9316
9317         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
9318         trying to fclose a FILE* that was already closed.
9319
9320 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9321
9322         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
9323         of const struct should be treated as if const themselves)
9324
9325 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
9326
9327         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
9328
9329 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9330
9331         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
9332         Unix (/n) and DOS (/r/n) line terminations.
9333
9334 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9335
9336         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
9337         bug #613775
9338
9339 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9340
9341         * src/mcs51/gen.c (genFunction, genEndFunction),
9342         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
9343         and restore of EA so that stack offsets to parameters are
9344         correct when using both critical and reentrant/stack-auto.
9345         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
9346         size (can be triggered in error if sloc is shared between
9347         different sized objects)
9348         * device/include/float.h: fixed macros to explicitly use
9349         unsigned long where needed
9350
9351 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
9352
9353         Feature req. 799831: added code to allow nesting of critical functions
9354         * src/mcs51/gen.c (genFunction, genEndFunction)
9355         * src/ds390/gen.c (genFunction, genEndFunction)
9356
9357 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9358
9359         * src/SDCCsymt.c (sclsFromPtr),
9360         * src/SDCCsymt.h,
9361         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
9362         support for standard C idiom of memory mapped variables; for
9363         example, *((xdata int*)0x1234) = 1 is now internally equivalent
9364         to xdata int at 0x1234 tempvar = 1.
9365         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
9366         provided by Akiya ISHIDA
9367
9368 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
9369
9370         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
9371         * src/SDCCval.c (constVal): added reduction from int to char
9372         * src/SDCCval.c (valMult, valDiv): fixed sign handling
9373         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
9374         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
9375         to ignore the sign
9376         * support/regression/tests/shifts.c: fixed
9377
9378 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9379
9380         * src/z80/gen.c (genXor): Fixed bug #805445
9381
9382 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9383
9384         Fixed bug #621531 (const & volatile confusion in the type chain).
9385         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
9386         refer to the const or volatile state of the pointer itself.
9387
9388         * src/SDCCast.c
9389         * src/SDCCglue.c
9390         * src/SDCCicode.c
9391         * src/SDCCsymt.c
9392         * src/SDCCval.c
9393         * src/SDCC.y
9394         * src/SDCCsymt.h
9395         * src/pic/gen.c
9396         * src/pic/ralloc.c
9397         * src/pic16/gen.c
9398         * src/pic16/ralloc.c
9399         * support/regression/tests/const.c
9400
9401 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9402
9403         When checking for duplicated modules, use absolute paths
9404         instead of relative paths.  Files changed:
9405
9406         * as/mcs51/lklib.c
9407         * link/z80/lklib.c
9408
9409 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9410
9411         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
9412
9413 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9414
9415         * device/include/string.h: added size_t typedef, changed
9416         prototypes to use size_t, eliminated separate reentrant and
9417         non-reentrant declarations, added _memmove declaration
9418         * device/lib/_memcpy.c: changed to use size_t instead of int,
9419         changed /4 to >>2 to avoid division library call
9420         * device/lib/_memcmp.c,
9421         * device/lib/_memset.c,
9422         * device/lib/_strncat.c,
9423         * device/lib/_strncpy.c,
9424         * device/lib/_strncmp.c: changed to use size_t instead of int
9425         * device/lib/_memmove.c: new file (fixed bug #772294)
9426         * device/lib/Makefile.in: added _memmove.c
9427         * device/lib/z80/asm_strings.s: fixed bug #772290
9428         * support/regression/tests/bitfields.c: attempt to fix host assertion
9429         failure on amd64-unknown-linux2.2
9430
9431 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9432
9433         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
9434         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
9435         * as/z80/asmain.c (main): fixed bug #801766
9436
9437 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
9438
9439         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
9440         compilers
9441
9442 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9443
9444         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
9445         reported in bug #800609
9446
9447 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
9448
9449         * Top header beautifications in src/pic16 directory:
9450           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
9451           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
9452           pcoderegs.h, ralloc.c, ralloc.h
9453         * main.c: added top header and GPL license notice
9454         * pcode.c: fixed the if-conditional warning
9455
9456 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
9457
9458         * device/lib/_mullong.c: replaced int by short for gcc
9459
9460 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9461
9462         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
9463         and JUMPTABLE iCodes properly now (worked by accident before)
9464         * src/mcs51/gen.c (leftRightUseAcc),
9465         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
9466         iCode properly now. Use getSize instead of nRegs since a & b
9467         aren't part of the nRegs tally.
9468
9469 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
9470
9471         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
9472         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
9473           before instructions that use the _STATUS register
9474
9475 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
9476
9477         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
9478         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
9479         fetching of the pointer
9480         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
9481         copied from genNearPointerSet()
9482         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
9483         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
9484         If they pop r0/r1 they must be called in the opposite order than aopOp().
9485         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
9486         (resp. --stack-auto), prepared for --xstack
9487
9488 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9489
9490         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
9491
9492 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9493
9494         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
9495         these ports have their own __sdcc_external_start()
9496
9497 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
9498
9499         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9500         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
9501         type for bits was changed. It resulted in bit variables becoming
9502         global, which is not permitted in PIC 14 assembly output.
9503
9504 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9505
9506         * doc/sdccman.lyx: various additions and updates. Rearranged sections
9507
9508 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9509
9510         Z80 and MCS51 linkers complaint if a public symbol is defined
9511         in more than one library module:
9512
9513         * as/mcs51/lklib.c
9514         * link/z80/lklib.c
9515         * as/mcs51/Makefile.in
9516
9517 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9518
9519         A few small changes that speed up the peephole optimizer.
9520
9521         * src/SDCCpeeph.c
9522
9523 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9524
9525         Try to make the peephole optimizer smarter by maintaining
9526         an association between the assembly source code and the
9527         iCodes that originated them. Put this information to use
9528         with a new peephole rule condition "notVolatile" so that
9529         the rules can be aggressive yet still safe.
9530
9531         * src/SDCCpeeph.c
9532         * src/SDCCpeeph.h
9533         * src/mcs51/gen.c
9534         * src/mcs51/peeph.def
9535
9536 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9537
9538         Fixed bug #741761
9539
9540         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
9541         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
9542         if the left or right operand symbols have the accuse flag set.
9543
9544 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9545
9546         Changed the type of the result of the ! (NOT) operator to char;
9547         previously it returned the same type as the source. This allows
9548         us to eliminate all the genFloatNot functions (all of its target
9549         implementations were very buggy) since !float can use the same
9550         code as !long now.
9551
9552         * src/SDCCicode.c (ast2iCode): ! returns char
9553         * src/mcs51/gen.c (genNot, genNotFloat),
9554         * src/ds390/gen.c (genNot, genNotFloat),
9555         * src/z80/gen.c (genNot, genNotFloat),
9556         * src/pic/gen.c (genNot, genNotFloat),
9557         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
9558
9559 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
9560
9561         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9562         1. Interrupt would not compile properly. Ensure PCLATH register is saved
9563            during interrupts. Ensure WSAVE is located at a shared bank address.
9564         2. Fixed page selection in some places
9565         3. Fixed BTFSS/C to where necessary use registers directly and not simply
9566            the registers name strings.
9567         4. Fixed "signed / unsigned compare" compiler warnings.
9568         5. The PIC port manages its own allocation of the general purpose
9569            registers, but makes no attempt to reuse them. As a result when
9570            compiling it soon runs out of general purpose registers. Some
9571            additional code was added to the files pcode.c and device.c to walk
9572            through the function call tree and rename the registers so that they
9573            get reused.
9574
9575         * src/pic/device.c
9576         * src/pic/gen.c
9577         * src/pic/glue.c
9578         * src/pic/pcode.c
9579         * src/pic/pcode.h
9580         * src/pic/ralloc.c
9581         * src/pic/ralloc.h
9582         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
9583         genPlus() & genMinus() when the result is the same as left or right
9584
9585 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9586
9587         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
9588
9589 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9590
9591         Made bitfield a distinct type from bit so that bitfields
9592         convert as per ANSI C and bits retain their traditional
9593         boolean style behaviour. Implemented bitfield support in
9594         the z80 port.
9595
9596         * src/SDCCsymt.h,
9597         * src/SDCCsymt.c,
9598         * src/SDCCast.c,
9599         * src/cdbFile.c,
9600         * src/mcs51/gen.c,
9601         * src/ds390/gen.c: bit v bitfield split
9602         * src/z80/gen.c: New support for bitfields
9603         * support/regression/tests/bitfields.c: reenabled z80,
9604         added more tests
9605
9606 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9607
9608         Rules 246.x, 247.x relate to bitfields, the others speed up
9609         access to xdata mapped I/O devices.
9610
9611         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
9612
9613 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9614
9615         Cleaned up genPackBits and genUnpackBits and added two helper
9616         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
9617         for literal assignments in genPackBits (thanks to Frieder for
9618         reminding me).
9619
9620         * src/mcs51/gen.c
9621         * src/ds390/gen.c
9622
9623 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9624
9625         Fixed bug #748310 (pointer to function type mishandled when the
9626         function name is omitted). Also fixed a SIGSEGV when a function
9627         attribute (reentrant, etc) is used on a non-function or on a
9628         function but misplaced before the parameter list.
9629
9630         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
9631         bug #748310
9632         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
9633         * support/Util/SDCCerr.h,
9634         * support/Util/SDCCerr.c: Added func attr misuse error msg
9635
9636 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9637
9638         Fixed bug #787649 by anonymous
9639         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
9640         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
9641
9642 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9643
9644         Fixed numerous bitfield problems.
9645
9646         * src/SDCC.y: More bitfield related error checking
9647         * src/SDCCsymt.h,
9648         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
9649         * support/Util/SDCCerr.h,
9650         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
9651         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9652         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9653         * support/regression/tests/bitfields.c: tests added
9654
9655 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9656
9657         Made the constant following the "interrupt" keyword optional. If
9658         omitted, the function will not automatically be given an entry
9659         in the interrupt vector table (similar to #pragma NOIV, but
9660         less syntacticly kludgy). The interrupt number is also now
9661         range checked. Also fixed a bug in the high order bit example
9662         in the manual.
9663
9664         * src/SDCC.y
9665         * src/SDCCmem.c
9666         * src/SDCCglue.c
9667         * src/SDCCsymt.h
9668         * support/Util/SDCCerr.c
9669         * support/Util/SDCCerr.h
9670         * doc/sdccman.lyx
9671
9672 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9673
9674         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
9675         * src/SDCCicode.c (operandOperation): rewritten some ops
9676         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
9677         * src/SDCCsymt.c (computeType): literals are handled the same way as any
9678         other type
9679         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
9680         be re-activated by defining REDUCE_LITERALS)
9681         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
9682         unsigned, but are signed by default
9683         * src/SDCCval.c (constVal): rearranged
9684         * src/SDCCval.c (valMod): preliminary fix
9685         * src/SDCCval.c (valCastLiteral): use TYPE_* types
9686         * support/regression/literalop.c: added, work in progress
9687
9688 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9689
9690         Generate warnings for useless declarations like "char data;"
9691         that don't do what new users expect.
9692
9693         * src/SDCC.y
9694         * support/Util/SDCCerr.h
9695         * support/Util/SDCCerr.c
9696
9697 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9698
9699         * src/SDCCval.c (valMult): fix overflow detection of negative int
9700
9701 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9702
9703         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9704
9705         Changes to support big endian targets:
9706
9707         * src/ports.h
9708         * src/SDCCglue.c
9709         * src/avr/main.c
9710         * src/ds390/main.c
9711         * src/izt/i186.c
9712         * src/mcs51/main.c
9713         * src/pic/main.c
9714         * src/pic16/main.c
9715         * src/xa51/main.c
9716         * src/z80/main.c
9717
9718 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9719
9720         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9721         * device/lib/time.c: fixed warning "integer overflow in expression"
9722
9723 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9724
9725         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9726         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9727         constants are unsigned; added recognition of "u" flag for unsigned
9728         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9729         * src/SDCCval.c (valDiv, valMod): fixed signdness
9730         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9731         signedness of modulo, left and right shift
9732         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9733         * support/Util/SDCCerr.h: added warning W_INT_OVL
9734         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9735         * src/SDCCast.c (ast_print): improved output of constants
9736
9737 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9738
9739         Fixed some warnings when building with MSVC:
9740
9741         * as/mcs51/asdata.c
9742         * as/z80/asdata.c
9743         * as/mcs51/asm.h
9744         * as/z80/asm.h
9745         * link/z80/aslink.h
9746         * link/z80/lkdata.c
9747         * link/z80/lkeval.c
9748         * link/z80/lkgb.c
9749         * link/z80/lkihx.c
9750         * link/z80/lks19.c
9751         * link/z80/lksym.c
9752         * support/cpp2/cpplib.c
9753         * src/ds390/gen.c
9754         * src/mcs51/gen.c
9755
9756 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9757
9758         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9759
9760 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9761
9762         * support/librarian/clean.mk: Do not remove Makefile.
9763         * support/librarian/Makefile: added.
9764
9765 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9766
9767         Added librarian to MSVC build:
9768         * all.dsp
9769         * sdcc.dsw
9770         * support/librarian/librarian.dsp
9771
9772         'configure' not needed for librarian, removed:
9773         * support/librarian/configure
9774         * support/librarian/configure.in
9775         * support/librarian/config_in.h
9776         * support/librarian/Makefile.in
9777
9778         Hopefully these ones built the librarian and the rest of sdcc properly:
9779         * Makefile
9780         * Makefile.common.in
9781
9782         Messed up 'configure', so revert to previous version:
9783         * configure
9784         * configure.in
9785
9786 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9787
9788         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9789         there, while the mantissa of a double is "only" 53 bits wide.
9790
9791 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9792
9793         Adding sdcclib to the build.  MSVC project coming soon.
9794         Files added/changed:
9795
9796         * support/librarian/clean.mk
9797         * support/librarian/configure
9798         * support/librarian/configure.in
9799         * support/librarian/config_in.h
9800         * support/librarian/Makefile.bcc
9801         * support/librarian/Makefile.in
9802         * support/librarian/sdcclib.c
9803         * Makefile.bcc
9804         * Makefile
9805         * Makefile.common.in
9806         * configure
9807         * configure.in
9808
9809 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9810
9811         Linker now complaints if linked modules have conflicting options, for
9812         example, one compiled using --model-large and another one compiled with
9813         --model-small.  The following files were modified:
9814
9815         * as/mcs51/asdata.c
9816         * as/mcs51/aslink.h
9817         * as/mcs51/asm.h
9818         * as/mcs51/asmain.c
9819         * as/mcs51/asout.c
9820         * as/mcs51/i51pst.c
9821         * as/mcs51/lkdata.c
9822         * as/mcs51/lklibr.c
9823         * as/mcs51/lkmain.c
9824         * as/z80/asdata.c
9825         * as/z80/asm.h
9826         * as/z80/asmain.c
9827         * as/z80/asout.c
9828         * as/z80/z80pst.c
9829         * link/z80/aslink.h
9830         * link/z80/lkdata.c
9831         * link/z80/lklibr.c
9832         * link/z80/lkmain.c
9833         * src/SDCCglue.c
9834
9835 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9836
9837         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9838         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9839
9840 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9841
9842         * src/z80/mappings.i: fix _mul[us][int,long] entries
9843
9844 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9845
9846         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9847
9848 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9849
9850         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9851         * support/regression/tests/bitopcse.c: added
9852         fixed warning:
9853         * src/avr/gen.c:
9854         * src/pic/gen.c:
9855         * src/pic16/gen.c:
9856         * src/z80/gen.c:
9857         * src/xa51/gen.c:
9858
9859 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9860
9861         added support for new library format to z80, gbz80 linkers:
9862         *link/z80/aslink.h
9863         *link/z80/lklex.c
9864         *link/z80/lklib.c
9865         *link/z80/lklist.c
9866
9867 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9868
9869         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9870         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9871
9872 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9873
9874         added DUMMY_READ_VOLATILE:
9875         * src/SDCC.y:
9876         * src/avr/gen.c:
9877         * src/xa51/gen.c:
9878         * src/z80/gen.c:
9879         * src/pic/gen.c:
9880         * src/pic16/gen.c:
9881         * src/mcs51/gen.c:
9882         * src/ds390/gen.c:
9883         * src/SDCCcse.c (algebraicOpts): many improvements
9884         * src/SDCCcse.h: removed algebraicOpts()
9885         * src/SDCCicode.c (picDummyRead): added
9886
9887 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9888
9889         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9890         "Insufficient space in data memory".
9891
9892 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9893
9894         * src/mcs51/gen.c: fixed bug #771358
9895         * src/z80/gen.c: fixed bug #759087
9896
9897 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9898
9899         * src/pic16/glue.c: minor cleanup by Vangelis
9900
9901 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9902
9903         * device/include/regc515c.h: fixed #758477
9904         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9905         * device/lib/_gptrput.c: saved a few bytes
9906         * my tab spacing is 8, yours too?)
9907         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9908         * device/lib/serial.c: process RX bytes earlier than TX bytes
9909         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9910
9911 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9912
9913         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9914
9915 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9916
9917     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9918
9919 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9920
9921         * device/lib/Makefile.in: bad fix, reverted to 1.43
9922
9923 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9924
9925         * device/lib/Makefile.in: added missing z80 object files
9926
9927 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9928
9929         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9930         pic16 progress by Vangelis:
9931         * src/SDCCglobl.h:
9932         * src/SDCCmain.c:
9933         * src/pic/Makefile:
9934         * src/pic:
9935         * pic/Makefile:
9936         * pic16/device.c:
9937         * pic16/device.h:
9938         * pic16/gen.c:
9939         * pic16/gen.h:
9940         * pic16/genarith.c:
9941         * pic16/glue.c:
9942         * pic16/main.c:
9943         * pic16/pcode.c:
9944         * pic16/pcode.h:
9945         * pic16/pcodepeep.c:
9946         * pic16/peeph.def:
9947
9948 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9949
9950     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9951
9952 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9953
9954     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9955     added gbz80 build to MSVC project.
9956     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9957     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9958     from 8051 stuff and setup so it links using a .lnk file.
9959
9960 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9961
9962     * support/librarian/sdcclib.c: sdcc librarian.
9963     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9964     with sdcclib.
9965
9966 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9967
9968     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9969
9970 2003-07-02  Borut Razem <borut.razem AT siol.net>
9971
9972         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9973         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9974         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9975         src/xa51/main.c, src/z80/main.c:
9976         virtualization of glue() function: each port has it's own glue function,
9977         which is accessed by do_glue function pointer in PORT.general structure
9978
9979 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9980
9981         * DS800C400 fun, improved ROM interface and tinibios.
9982
9983 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9984
9985         * More support for DS80C400. Now includes beginning of interface to ROM.
9986
9987 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9988
9989         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9990
9991 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9992
9993         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9994
9995 2003-06-19  Borut Razem <borut.razem AT siol.net>
9996
9997         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9998
9999 2003-06-19  Borut Razem <borut.razem AT siol.net>
10000
10001         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
10002         fixed Z80 port - crt0.o: cannot open.
10003
10004 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
10005
10006         * support/Util/MySystem.c (merge_command): revert bad fix
10007
10008 2003-06-18  Borut Razem <borut.razem AT siol.net>
10009
10010         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
10011
10012 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10013
10014         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
10015         option --use-stdout sends errors to stdout instead of stderr.
10016
10017 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
10018
10019         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
10020
10021 2003-06-15  Borut Razem <borut.razem AT siol.net>
10022
10023         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
10024         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
10025         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
10026         fixed width array of pointers replaced with sets;
10027         multiple include and lib paths ared transferred to preprocessor and linker
10028         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
10029         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
10030         fixed width array of pointers
10031         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
10032         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
10033         fixupPath(), getPathDifference()
10034         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
10035         fixed width array of pointers
10036
10037 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
10038
10039         * src/pic16/ralloc.c: fix warnings
10040         * src/pic16/pcode.c: fix warning
10041
10042 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
10043
10044          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
10045         know all the details, but essentially this set of changes enable
10046         the pic16 port to generate movff instructions and generate assembler
10047         directives,
10048         * src/SDCCmain.c:
10049         * src/pic16/gen.c:
10050         * src/pic16/glue.c:
10051         * src/pic16/pcode.c:
10052         * src/pic16/device.c:
10053         * src/pic16/main.c:
10054         * src/pic16/pcode.h:
10055         * src/pic16/pcoderegs.c:
10056         * src/pic16/ralloc.c:
10057         * src/pic16/ralloc.h:
10058
10059 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10060
10061         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
10062         added option --vc, so sdcc errors and warnings are compatible with
10063         Microsoft Visual Studio.
10064
10065 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10066
10067         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
10068           device/lib/libfloat.lib: added atof function.
10069
10070 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
10071
10072         * doc/sdccman.lyx: updated to Lyx 1.3
10073         * doc/cdbfileformat.lyx: updated to Lyx 1.3
10074         * doc/test_suite_spec.lyx: updated to Lyx 1.3
10075         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
10076
10077 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
10078
10079         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
10080
10081 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10082
10083         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
10084           additions to the "related tools/documentation" section
10085
10086 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
10087
10088         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
10089
10090 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
10091
10092         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
10093         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
10094
10095 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
10096
10097         * doc/sdccman.lyx: fix double dash and other minor things
10098         * doc/Makefile: fix double dash
10099
10100 2003-05-28  Karl Bongers(patches from Martin Helmling)
10101         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
10102           condition and ignore commands.
10103
10104 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10105
10106         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
10107           is in parts still quite out of date, I did changes as far as I felt makes sense
10108           for a non-native english speaker.
10109           Please feel free to add to the manual or to correct my changes.
10110         * doc/Makefile: undid touching the date of intermediate tex files.
10111
10112 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10113
10114         * doc/sdccman.lyx: Manual has an index now
10115
10116 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
10117
10118         Finalize muluint/mulsint and mululong/mulslong merging:
10119         * device/lib/_mulint.c
10120         * device/lib/_mullong.c
10121         * device/lib/gbz80/mul.s
10122         * device/lib/gbz80/stubs.s
10123         * device/lib/z80/mul.s
10124         * device/lib/z80/stubs.s
10125         * src/SDCCsymt.c (initCSupport)
10126
10127 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10128
10129         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
10130         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
10131           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
10132           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
10133           instead of /Zm500.
10134
10135 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10136
10137         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
10138           the regression tests I'm not brave enough to enable 245.b, 245.c
10139         * doc/sdccman.lyx: added latex preamble for hyperref package.
10140           Using pdflatex this will give you a hyperlinked pdf file with
10141           bookmarks. (prepend '%' before /usepackage if this breaks something)
10142
10143 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10144
10145          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
10146
10147 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
10148
10149         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
10150
10151 2003-05-21    <johan AT balder>
10152
10153         * src/SDCCglue.c (printIval): fixed bug #739934
10154
10155 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10156
10157         Applied patch from bug 737905 (renamed yylineo to mylineno):
10158         * src/altlex.c
10159         * src/SDCCast.c
10160         * src/SDCglobl.h
10161         * src/SDCC.lex
10162         * src/SDCCsymt.c
10163         * src/SDCCval.c
10164         * src/pic16/pcode.c: Cleaned warnings
10165         * src/pic16/pcodeflow.c: Cleaned warnings
10166         * src/pic16/pcoderegs.c: Cleaned warnings
10167
10168 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
10169
10170         * src/pic16/pcode.c: Cleaned warnings
10171         * src/pic16/pcodepeep.c: Cleaned warnings
10172         * src/pic16/ralloc.c: Cleaned warnings
10173
10174 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10175
10176         * doc/sdccman.lyx: fixed bug 739745
10177         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
10178
10179 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
10180
10181         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
10182         it can be defined with CFLAGS when running configure
10183         * src/SDCCmain.c: fixed compiling + linking with object files
10184
10185 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
10186
10187         * configure.in: configure for pic16 port,
10188             added --disable-pic16-port
10189         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
10190         * src/SDCCmain.c: linkOptions is changed to set *,
10191             added if/endif conditional macros to remove options help
10192             messages from optionsTable when a port is not configured, added
10193             support for the PIc16 port in the ports table, when executing
10194             the compiler with no port specified on command line, a default
10195             port is selected with the new macro DEFAULT_PORT which is
10196             defined in port.h, in setDefaultOptions() linkOptions is removed
10197             from initialization assignment, since now it is a set,
10198             parseCmdLine uses setParseWithComma for linkOptions, in
10199             linkEdit() linkOptions are accessed with new function indexSet()
10200             which returns the i'th item of a set variable. See SDCCset.c, in
10201             linkEdit() when calling buildCmdLine(), added linkOptions as
10202             last argument. Now users can pass arguments to gplink via the
10203             -Wl option, main() uses pic16glue() to glue up pic16 programs
10204         * src/SDCCpeeph.c: various changes to support pic16
10205         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
10206             return the i'th item of the set
10207         * src/SDCCset.h: added function prototype for indexSet()
10208         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
10209         * src/clean.mk: added pic16 in CLEANALLPORTS variable
10210         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
10211             added macro DEFAULT_PORT
10212         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
10213         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
10214             generated
10215         * src/pic16/glue.c: commented out some error producing lines
10216         * src/pic16/main.c: __config directives are commented out to stop
10217             gpasm complaining and test the linkage with gplink, _linkCmd and
10218             _asmCmd changed to be more gplink and gpasm friendly
10219         * src/pic16/peeph.def: peep rule 3 is commented out, since it
10220             produced an error when parsed, peep rule 12 is added to utilize
10221             movff, but it is commented out since the pCode does not support
10222             yet a command with 2 address arguments
10223
10224 2003-05-18    <johan AT balder>
10225
10226         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10227         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10228 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
10229
10230         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
10231   Added feature to script commands from file.
10232
10233 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
10234
10235         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
10236         * src/SDCCutil.c: include ctype.h for win32
10237
10238 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
10239
10240         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
10241
10242 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
10243
10244         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
10245   Fixed so you can set breakpoints prior to run, run does not stop
10246   on entry now.  Add tbreak.  Other enhancements and fixes for use
10247   with ddd.
10248
10249 2003-05-12  Borut Razem <borut.razem AT siol.net>
10250
10251         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
10252
10253 2003-05-11  Borut Razem <borut.razem AT siol.net>
10254
10255         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
10256         the path of bin directory, so that PATH is the only env. variable, which has to be set
10257         in case of standard installation.
10258         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
10259         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
10260         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
10261
10262 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10263
10264         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
10265         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
10266         temp files are in the port dir; clean the gen/test directory when
10267         generating new test.c
10268         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
10269         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
10270         * support/regression/tests/zeropad.c: added
10271
10272 2003-05-09    <johan AT balder>
10273
10274         * src/SDCCglue.c: fixed bug #597940
10275
10276 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
10277
10278         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10279   cache sfr, optimize next,step, fix off by one sourceline,
10280   support ddd list function.
10281         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
10282
10283 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10284
10285         * support/regression/HTMLgen.py: added compare_s2f()
10286         * support/regression/Makefile: redo 1.27
10287         * support/regression/generate-cases.py: redo 1.5
10288
10289 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
10290
10291         * support/regression/tests/float.c: workaround 33 bit hex constant
10292         * support/regression/tests/simplefloat.c: fix division for host
10293
10294 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
10295
10296         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
10297         that tame's the PIC's over-aggressive optimizer.
10298
10299 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10300
10301          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
10302          support for MSVC.
10303
10304 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
10305
10306         Initial support for DS80C400. "Hello world" runs on TINIm400
10307         (with polled I/O).
10308
10309 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
10310
10311          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10312          * Some notes on ddd usage added in debugger/README
10313          Martin Helmling adding more features and fixes for ddd GUI debugger.
10314          Code added for nexti, stepi, up, down, and other adjustments.
10315
10316 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
10317
10318         * src/pic/pCodepeep.c non-wildcard asmops are now handled
10319         * src/pic/peeph.def Added two rules to optimize carry manipulation
10320         * src/pic/* removed debug printfs
10321
10322 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
10323
10324         * debugger/mcs51/cmd.c: added header newalloc.h
10325
10326 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
10327
10328         * as/Makefile: new EXEEXT
10329         * as/z80/Makefile: remove trailing slash of BUILDIR
10330         * as/z80/clean.mk: new EXEEXT
10331         * Makefile.common.in: add to CFLAGS (and others), don't replace it
10332         * support/cpp2/Makefile.in: new EXEEXT
10333         * src/pic/glue.c (pic14emitRegularMap): fixed warning
10334
10335 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
10336
10337         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
10338         EXEEXT was introduced to fix all related problems with targets
10339         "clean", "install" and "uninstall"; a couple of further flaws
10340         especially with "clean" have been fixed too
10341         * as/mcs51/Makefile.in
10342         * as/mcs51/clean.mk
10343         * as/z80/Makefile
10344         * Makefile
10345         * clean.mk
10346         * debugger/mcs51/Makefile.in
10347         * debugger/mcs51/clean.mk
10348         * link/z80/Makefile
10349         * link/z80/Makefile.in
10350         * link/z80/clean.mk
10351         * link/Makefile
10352         * packihx/Makefile.in
10353         * packihx/clean.mk
10354         * sim/ucsim/Makefile
10355         * sim/ucsim/clean.mk
10356         * sim/ucsim/avr.src/Makefile.in
10357         * sim/ucsim/avr.src/clean.mk
10358         * sim/ucsim/s51.src/Makefile.in
10359         * sim/ucsim/s51.src/clean.mk
10360         * sim/ucsim/xa.src/Makefile.in
10361         * sim/ucsim/xa.src/clean.mk
10362         * sim/ucsim/z80.src/Makefile.in
10363         * sim/ucsim/z80.src/clean.mk
10364         * sim/ucsim/main_in.mk
10365         * sim/ucsim/packages_in.mk
10366         * sim/ucsim/gui.src/Makefile.in
10367         * sim/ucsim/gui.src/serio.src/Makefile.in
10368         * sim/ucsim/gui.src/serio.src/clean.mk
10369         * src/Makefile.in
10370         * src/clean.mk
10371         * support/cpp2/Makefile.in
10372         * support/cpp2/clean.mk
10373         * support/makebin/Makefile
10374         * support/makebin/clean.mk
10375         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
10376         * doc/sdccman.lyx: --program-suffix no longer needed
10377
10378 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
10379
10380          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
10381          Martin Helmling added support for ddd GUI debugger.
10382          Code added to display assembly, set variables, and other commands
10383          to interface to ddd.
10384
10385 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
10386
10387         * as/Makefile: fix target clean
10388         * as/clean.mk: fix target clean
10389         * as/z80/clean.mk: fix target clean
10390
10391 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
10392
10393         * Makefile.common.in: added  AT EXEEXT AT
10394         * configure.in: removed all mingw32 stuff
10395         * configure: rebuilt from configure.in
10396         * doc/sdccman.lyx: updated section "installation"
10397         * support/scripts/sdcc_mingw32: adapted to configure
10398         * support/scripts/sdcc_cygwin_mingw32: added
10399
10400 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
10401
10402         * src/pic Added object file support for the PIC port
10403         * src/pic Applied patch from Craig Franklin (this started the object file support)
10404         * src/regression Updated the PIC regression tests for object files
10405
10406 2003-04-20  Borut Razem <borut.razem AT siol.net>
10407
10408         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
10409           lklex.c: In function `getfid':
10410           lklex.c:203: warning: array subscript has type `char'
10411         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
10412           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
10413         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
10414           stack handling macros
10415
10416 2003-04-19  Borut Razem <borut.razem AT siol.net>
10417
10418         * "handling space characters in file path" task:
10419         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
10420         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
10421         * support/Util/MySystem.h: make it self-sufficient
10422         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
10423           src/z80/main.c, sdcc/as/mcs51/lklex.c:
10424           handling space characters in file path
10425         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
10426           (it will be used by assemblers, which have their own includes, e.g. gpasm)
10427         * support/Util/MySystem.c: handling space characters in executable's path
10428
10429 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
10430
10431         * as/z80/Makefile: fix permanent rebuild of z80
10432         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
10433         * support/regression/tests/bitfields.c: added Johan's bitfields.c
10434
10435 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
10436
10437         * src/SDCCopt.c: add special case optimization to replace modulo by
10438           a power of two with a bitwise AND.
10439
10440 2003-04-18    <johan AT balder>
10441
10442         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
10443
10444 2003-04-17    <johan AT balder>
10445
10446         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
10447         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
10448
10449 2003-04-13  Borut Razem <borut.razem AT siol.net>
10450
10451         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
10452         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
10453           fixed mingw problem in adl_NORMALIZE_PATH
10454
10455 2003-04-12  Borut Razem <borut.razem AT siol.net>
10456
10457         * fixed "#pragma SAVE/RESTORE can not be nested":
10458         * src/SDCC.lex: reworked pragma handling functions
10459         * sdcc/src/SDCCglobl.h: reworked stack handling macros
10460         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
10461
10462 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10463
10464         * src/SDCCutil.c (pathEquivalent): defined but not used
10465         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
10466         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
10467         * configure: rebuilt from configure.in
10468         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10469         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10470         * device/include/Makefile.in: replace sdcc_datadir
10471         * device/lib/Makefile.in: replace sdcc_datadir
10472         * Makefile.common.in: add LDFLAGS from configure
10473         * packihx/Makefile.in: use LDFLAGS
10474         * src/Makefile.in: use LDFLAGS
10475         * support/cpp2/Makefile.in: add LDFLAGS from configure
10476         * support/makebin/Makefile: use LDFLAGS
10477         * .version: bumped version number to 2.3.5
10478
10479 2003-04-12  Borut Razem <borut.razem AT siol.net>
10480
10481         * completed "different paths" task:
10482         * src/SDCCmacro.c: fixed bug in handling quotes
10483         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
10484         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
10485
10486 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10487
10488         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
10489
10490 2003-04-11 kevin Vigor <kevin AT vigor.nu>
10491
10492         * ds390/gen.c ds390/peeph.def: fix bug 706781
10493
10494 2003-04-11  Borut Razem <borut.razem AT siol.net>
10495
10496         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
10497
10498 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
10499
10500         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
10501         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
10502          set - this bit used to not be set...).
10503         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
10504           bad code in PIC Port
10505         * src/regression/and2.c added to test bug 609268
10506         * src/regression/Makefile added and2.c to regression test
10507
10508
10509 2003-04-08    <johan AT CP255758-A>
10510
10511         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
10512         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
10513         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
10514
10515 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
10516
10517         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
10518         fix bug #487815
10519         * support/cpp2/Makefile.in: fix bug #487815
10520         * configure: rebuilt from configure.in
10521         * Makefile.common.in: docdir changed, new path suffixes
10522         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10523         * sdcc_vc_in.h: reflect changes from sdccconf.h
10524         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
10525         * src/SDCCutil.h: remove BINDIR hack
10526         * doc/sdccman.lyx: update new path hierarchy
10527
10528 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10529
10530         * src/SDCCpeeph.c: added okToRemoveSLOC test
10531
10532 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10533
10534         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
10535
10536 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10537
10538         * src/SDCCpeeph.c: added labelIsReturnOnly test
10539         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
10540
10541 2003-04-05    <johan AT balder>
10542
10543         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
10544         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
10545         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
10546         * src/SDCCast.c: fixed a warning
10547         * src/SDCCast.h: fixed a warning
10548         * src/SDCCicode.c (operandFromAst): fixed a warning
10549
10550 2003-04-04    <johan AT balder>
10551
10552         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
10553         * src/SDCCast.c (decorateType): fixed bug #715076
10554         * src/SDCC.y: fixed bug #702907
10555
10556 2003-04-03    <johan AT balder>
10557
10558         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
10559         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
10560         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
10561         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
10562         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
10563
10564 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
10565
10566         * _decdptr.c: fix return values
10567         * _gptrget.c: fix return values
10568         * _gptrgetc.c: fix return values
10569         * _gptrput.c: fix return values
10570         * _mulint.c: fix return values
10571         * as/z80/Makefile: fix 'make -j' problem
10572
10573 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
10574
10575         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
10576         * configure.in: big cleanup, updated to autoconf 2.5x
10577         * configure: rebuilt from configure.in
10578         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10579         * sdcc_vc_in.h: reflect changes from sdccconf.h
10580         * doc/Makefile: fixed a flaw in "make install"
10581
10582 2003-04-02    <johan AT balder>
10583
10584         * src/ds390/gen.c (genCmp): no comments
10585         * src/mcs51/gen.c (genCmp): no comments
10586         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
10587         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
10588
10589 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
10590
10591         * support/regression/generate-cases.py: place generated file in given sub directory
10592         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
10593         * support/regression/Makefile: improvements for 'make -j';
10594         side effect: it's simpler and faster now
10595
10596 2003-03-31  Borut Razem <borut.razem AT siol.net>
10597
10598         * src/z80/main.c: link-{port} and as-{port} defined without path
10599         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
10600
10601 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
10602
10603         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
10604
10605 2003-03-30  Borut Razem <borut.razem AT siol.net>
10606
10607         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
10608           changed type of list parameter to set
10609         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
10610         * src/port.h: changed type of do_assemble() parameter to set
10611         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
10612           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
10613           definition of "cppoutfilename" macro with NULL value in preProcess()
10614         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
10615         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
10616         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
10617           replaced with set *binPathSet
10618         * shash_add() deallocates the item, if allready exsists, before adding the new one
10619         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
10620
10621 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
10622
10623         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
10624           a nested for loop bug in the PIC port
10625         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
10626           for loops
10627
10628 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
10629
10630         * support/Util/dbuf.h: remove C++ stuff to make it portable
10631
10632 2003-03-28  Borut Razem <borut.razem AT siol.net>
10633
10634         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
10635           literal strings in stringLiteral()
10636         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
10637         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
10638           to the project
10639
10640 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
10641
10642         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
10643
10644 2003-03-26    <johan AT balder>
10645
10646         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
10647         * src/ds390/gen.c (saveRegisters): catched symbol abuse
10648         * src/SDCCast.c (decorateType): fixed " -v < 3"
10649
10650 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
10651
10652         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
10653         Added Lenny Story's debug infrastructure changes:
10654         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
10655         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
10656         * src/cdbFile.c: added
10657         * src/SDCCdebug.c: added
10658         * src/SDCCdebug.h: added
10659         * src/SDCCast.c (createFunction)
10660         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
10661         * src/SDCCmain.c (parseCmdLine, main)
10662         * src/SDCCmem.c (redoStackOffsets)
10663         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
10664         * src/SDCCsymt.h
10665         * src/common.h
10666         * src/avr/gen.c (genAVRCode)
10667         * src/ds390/gen.c (gen390Code)
10668         * src/mcs51/gen.c (gen51Code)
10669         * src/pic/gen.c (genpic14Code)
10670         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
10671         * src/xa51/gen.c (genXA51Code)
10672         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
10673
10674 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10675
10676         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
10677         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
10678
10679 2003-03-22    <johan AT balder>
10680
10681         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
10682
10683 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
10684
10685         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
10686         * doc/cdbfileformat.lyx: added, written by Lenny Story
10687         * doc/Makefile: added cdbfileformat.lyx
10688         * doc/clean.mk: added cdbfileformat.lyx
10689
10690 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
10691
10692         * src/mcs51/peeph.def: fix bug #705773
10693
10694 2003-03-20    <johan AT balder>
10695
10696         An sfr/sbit can have an "at #" AND an initializer
10697         * src/SDCCsymt.c (checkSClass):
10698         * src/SDCCmem.c (allocGlobal):
10699         * src/SDCCmem.c (allocLocal):
10700         * src/SDCCast.c (createBlock):
10701
10702 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10703
10704         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10705
10706 2003-03-16    <johan AT balder>
10707
10708         Undid the hackup of const and volatile, the problem is much bigger
10709         * src/SDCC.y:1.65
10710         * src/SDCCast.c:1.171
10711         * src/SDCCglue.c:1.138
10712         * src/SDCCicode.c:1.146
10713         * src/SDCCsymt.c:1.150
10714         * src/SDCCval.c:1.65
10715
10716 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10717
10718         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10719         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10720
10721 2003-03-13    <johan AT balder>
10722
10723         Hackup const and volatile modifiers in type chains a bit:
10724         * src/SDCC.y:1.63
10725         * src/SDCCast.c:1.169
10726         * src/SDCCglue.c:1.136
10727         * src/SDCCicode.c:1.143
10728         * src/SDCCsymt.c1.146
10729         * src/SDCCsymt.h1.59
10730         * src/SDCCval.c:1.63
10731
10732 2003-03-12    <johan AT balder>
10733
10734         * src/SDCCBBlock.h: more LRH debugging junk
10735         * src/SDCCcflow.h: more LRH debugging junk
10736         * src/SDCCloop.c: more LRH debugging junk
10737         * src/SDCC.y (struct_declaration): fixed bug #697590
10738         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10739         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10740         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10741
10742 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10743         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10744         test function names must now match exactly).
10745         * src/SDCCcse.c: added special case in findCheaperOp to allow
10746         extending a short integer. Makes less awful code for bug 700121 test case.
10747
10748 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10749
10750         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10751         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10752
10753 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10754
10755         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10756         actually called (operandsNotEqual() was called for all
10757         operandsNotEqualX tests).
10758
10759 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10760
10761         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10762         with shorter literals. Fixes bug 700121.
10763
10764 2003-03-11    <johan AT balder>
10765
10766         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10767
10768 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10769
10770         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10771         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10772
10773 2003-03-10  Borut Razem <borut.razem AT siol.net>
10774
10775         * src/SDCCmain.c: pipe preprocessor's output
10776         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10777         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10778         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10779         which closes all pipes in pipeSet set
10780         * src/SDCCset.c: free deleted item in function deleteSetItem()
10781         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10782         moved from z80 to src subproject
10783         * .version: increased version number to 2.3.4
10784
10785 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10786
10787         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10788         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10789         * support/regression/ports/xa51/spec.mk: fix typo
10790
10791 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10792
10793         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10794
10795 2003-03-09  Borut Razem <borut.razem AT siol.net>
10796
10797         * src/SDCCmain.c: pipe preprocessor's output
10798         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10799         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10800         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10801         which closes all pipes in pipeSet set
10802         * src/SDCCset.c: free deleted item in function deleteSetItem()
10803         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10804         moved from z80 to src subproject
10805
10806 2003-03-09  Borut Razem <borut.razem AT siol.net>
10807
10808         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10809         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10810         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10811         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10812         * src/SDCCglobl.h: unification of WIN32 native definitions
10813
10814 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10815
10816         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10817
10818 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10819
10820         * src/configure.in:   check for endianess (even while cross-compiling)
10821         * src/configure:      check for endianess (even while cross-compiling)
10822         * src/configure_in.h: check for endianess (even while cross-compiling)
10823         * src/avr/gen.c:        remove old endianess stuff
10824         * src/mcs51/gen.c:      remove old endianess stuff
10825         * src/ds390/gen.c:      remove old endianess stuff
10826         * src/pic/gen.c:        remove old endianess stuff
10827         * src/pic/genarith.c:   remove old endianess stuff
10828         * src/pic/glue.c:       fix endianess check
10829         * src/pic16/gen.c:      remove old endianess stuff
10830         * src/pic16/genarith.c: remove old endianess stuff
10831         * src/pic16/glue.c:     fix endianess check
10832         * src/xa51/gen.c:       remove old endianess stuff
10833         * src/z80/gen.c:        fix endianess check
10834         * src/SDCCglue.c:       fix endianess check
10835         * src/ds390/peeph.def: fix bug 700036
10836
10837 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10838
10839         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10840         * src/configure: find appropriate data-types on host for SDCC's int and long
10841         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10842         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10843         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10844
10845 2003-03-07    <johan AT balder>
10846
10847         Just a big NOOP:
10848                 some minor cleanups before the big shot
10849                 OP_DEFS and OP_USES now use Kevin's protection
10850                 new option --nolabelopt
10851
10852         * src/SDCCBBlock.c:
10853         * src/SDCCast.c,:
10854         * src/SDCCcflow.c:
10855         * src/SDCCcse.c:
10856         * src/SDCCicode.c:
10857         * src/SDCCicode.h:
10858         * src/SDCClabel.c:
10859         * src/SDCCloop.c:
10860         * src/SDCCmain.c:
10861         * src/ds390/ralloc.c:
10862         * src/mcs51/ralloc.c:
10863         * src/pic/ralloc.c:
10864         * src/xa51/ralloc.c:
10865         * src/z80/ralloc.c:
10866
10867 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10868
10869         * src/pic/pcode.c (get_op): fix 64 bit warnings
10870         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10871         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10872         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10873         * support/regression/tests/malloc.c: fix 64 bit warnings
10874
10875 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10876
10877         * src/mcs51/gen.c (genMinus): fixed bug 696436
10878
10879 2003-03-02  Borut Razem <borut.razem AT siol.net>
10880
10881         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10882
10883 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10884
10885         * configure.in: test for mkstemp
10886         * sdccconf_in.h: add HAVE_MKSTEMP
10887
10888 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10889
10890         * device/include/ctype.h: removed warning while using --stack-auto
10891         * device/include/malloc.h: removed warning while using --stack-auto
10892         * device/include/string.h: removed warning while using --stack-auto
10893
10894 2003-02-23  Borut Razem <borut.razem AT siol.net>
10895
10896         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10897         because NDEBUG is defined (see man assert)
10898         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10899
10900 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10901
10902         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10903         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10904
10905 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10906
10907         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10908         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10909
10910 2003-02-18    <johan AT balder>
10911
10912         * as/mcs51/asmain.c (asmbl): module can start with a digit
10913         * as/z80/asmain.c (asmbl): module can start with a digit
10914
10915 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10916
10917         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10918         * src/asm.c: fix pipe() for Mingw32
10919
10920 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10921
10922         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10923         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10924         make -V work again; --c1mode reads now from stdin
10925         * doc/sdccman.lyx: added --c1mode
10926         * support/Util/SDCCerr.c: new messages for c1 mode
10927         * support/Util/SDCCerr.h: new messages for c1 mode
10928         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10929
10930 2003-02-15    <johan AT balder>
10931
10932         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10933
10934 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10935
10936         * doc/sdccman.lyx: Environment variables, -o and other minor things
10937
10938 2003-02-14    <johan AT balder>
10939
10940         * src/xa51/main.c: before anyone really tries to use it :)
10941
10942         * Install doc's in share/sdcc/doc
10943         * removed some obsolete files
10944         * Do a proper make distclean and uninstall
10945         M Makefile.common.in
10946         R sdccbuild.sh
10947         M as/Makefile
10948         M device/include/Makefile.in
10949         M device/lib/Makefile.in
10950         M doc/sdccman.lyx
10951         M link/Makefile
10952         M sim/ucsim/doc/Makefile.in
10953         M src/clean.mk
10954         R src/avr/peeph.rul
10955         R src/xa51/peeph.rul
10956         M support/cpp2/Makefile.in
10957         M support/makebin/Makefile
10958
10959
10960 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10961
10962         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10963
10964 2003-02-10  Borut Razem <borut.razem AT siol.net>
10965
10966         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10967         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10968         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10969         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10970         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10971         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10972         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10973         src/z80/Makefile.bcc: Borland Makefile cleanup
10974         * as/z80/Makefile.bcc: Added Borland Makefile
10975         * support/cpp2/borland.h: Removed
10976
10977 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10978
10979         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10980         * src/SDCC.lex: new pragma NOIV
10981         * src/SDCCglobl.h: new pragma NOIV
10982         * src/SDCCmem.c: new pragma NOIV
10983
10984 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10985
10986         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10987
10988 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10989
10990         * src/SDCCmain.c: signal handling is switched off by --debug
10991         * doc/Makefile: small fix for install; use clean.mk again
10992         * doc/clean.mk: clean *.pdf and *.html too
10993
10994 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10995
10996         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10997         * device/lib/printfl.c: fix a ds390 bug by making it portable
10998         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10999         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
11000         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
11001         * debugger/mcs51/cmd.c: converted multi-line string literals
11002         * sim/ucsim/globals.cc: converted multi-line string literals
11003         * src/SDCCmain.c: introduced signal handler to remove temp files
11004         * doc/Makefile: small tweaks, implement clean
11005         * doc: removed generated files
11006
11007 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11008
11009         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
11010         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
11011         Address Record is not correctly generated for DS390."
11012
11013 2003-02-02  Borut Razem <borut.razem AT siol.net>
11014
11015         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
11016         * as/mcs51/asm.h: fixed compilation with Borland C
11017         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
11018         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
11019         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
11020         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
11021         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
11022         src/z80/Makefile.bcc: delete $(LIB) only if exist
11023         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
11024
11025 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
11026
11027         * device/include/malloc.h: introduced NULL
11028         * device/include/string.h: introduced NULL
11029         * device/include/stdlib.h: introduced NULL
11030         * device/lib/_memcpy.c: removed NULL
11031         * device/lib/_strcat.c: removed NULL
11032         * device/lib/_strchr.c: removed NULL
11033         * device/lib/_strcmp.c: removed NULL
11034         * device/lib/_strcpy.c: removed NULL
11035         * device/lib/_strcspn.c: removed NULL
11036         * device/lib/_strlen.c: removed NULL
11037         * device/lib/_strncat.c: removed NULL
11038         * device/lib/_strncmp.c: removed NULL
11039         * device/lib/_strncpy.c: removed NULL
11040         * device/lib/_strpbrk.c: removed NULL
11041         * device/lib/_strrchr.c: removed NULL
11042         * device/lib/_strspn.c: removed NULL
11043         * device/lib/_strstr.c: removed NULL
11044         * device/lib/_strtok.c: removed NULL
11045         * device/lib/malloc.c: removed NULL, include own header
11046
11047 2003-02-02    <johan AT balder>
11048
11049         * 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
11050         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
11051         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
11052         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
11053         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
11054         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
11055
11056 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11057
11058         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
11059         area 'DATA'"
11060
11061 2003-02-01    <johan AT balder>
11062
11063         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
11064
11065 2003-01-31    <johan AT CP255758-A>
11066
11067         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
11068
11069 2003-01-30    <johan AT balder>
11070
11071         * src/SDCCBBlock.c: automatic bug detection
11072         * src/SDCCicode.c: automatic bug detection
11073
11074 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11075
11076         * src/SDCCglobl.h:   now --xram-size 0 works
11077         * src/SDCCmain.c:    now --xram-size 0 works
11078
11079 2003-01-29    <johan AT balder>
11080
11081         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
11082
11083 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11084
11085         * as/mcs51/aslink.h: Added options --xram-size and --code-size
11086         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
11087         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
11088         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
11089         * src/SDCCglobl.h:   Added options --xram-size and --code-size
11090         * src/SDCCmain.c:    Added options --xram-size and --code-size
11091
11092 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
11093
11094         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
11095         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
11096
11097 2003-01-27    <johan AT balder>
11098
11099         * src/SDCC.y: fixed bug #613764
11100
11101 2003-01-26    <johan AT balder>
11102
11103         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
11104         * src/SDCCsymt.h: fixed bug #673374
11105         * src/SDCCglue.c: fixed bug #661910
11106         * src/SDCCast.c: fixed bug #458099 and 673374
11107
11108 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
11109
11110         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
11111         * as/mcs51/strcmpi.h: added
11112         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
11113         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
11114         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
11115         * as/mcs51/assym.c: strcmpi -> as_strcmpi
11116         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
11117         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
11118         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
11119         * as/mcs51/Makefile.aslink: new module strcmpi
11120         * as/mcs51/Makefile.asx8051: new module strcmpi
11121         * as/mcs51/Makefil.bcc: new module strcmpi
11122         * as/mcs51/Makefile.in: new module strcmpi
11123         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
11124
11125 2003-01-26    <johan AT balder>
11126
11127         * src/SDCCglue.c: reverted back to 1.124
11128         * src/SDCCast.c: reverted back to 1.156
11129         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
11130
11131 2003-01-25    <johan AT balder>
11132
11133         * src/SDCCglue.c: A better fix for bug #661910
11134         * src/SDCCast.c: A better fix for bug #661910
11135         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
11136
11137 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11138
11139         * src/Makefile.in: remove spawn.o
11140         * src/SDCCmain.c: remove spawn.h
11141         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
11142         * src/spawn.c: removed
11143         * src/spawn.h: removed
11144         * support/regression/ports/ds390/spec.mk: link with -r
11145
11146 2003-01-24    <johan AT CP255758-A>
11147
11148         * src/ds390/gen.c (aopOp): fixed bug #667458
11149         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
11150         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
11151         (createIvalCharPtr): an ival doesn't always have a storage class anymore
11152
11153 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11154
11155         * src/mcs51/peeph.def: better assembler identation by Frieder
11156         * src/mcs51/gen.c: better assembler identation by Frieder
11157
11158 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
11159
11160         * as/z80/string.h: removed for gcc 3.2
11161         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
11162         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
11163
11164 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11165
11166         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
11167         * src/SDCCpeeph.c (replaceRule): fix bug #663503
11168         * support/regression/Makefile: separate temp files for ports
11169         * support/regression/generate-cases.py: separate temp files for ports
11170         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11171         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11172
11173 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11174
11175         * moved tinitalk to device/examples/ds390
11176
11177 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
11178
11179         * as/mcs51/lkmem.c: rflag is for DS390
11180         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
11181         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
11182                          (linkEdit): move mem- and map-files the same way as ihx-files
11183         * src/z80/main.c (_setDefaultOptions): removed --generic
11184         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
11185         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
11186         * src/pic/glue.c (picglue): --c1mode works again
11187         * src/pic16/glue.c (pic16glue): --c1mode works again
11188         * src/asm.c (printCLine): fix #660034
11189
11190 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
11191
11192         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
11193         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
11194         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
11195         * as/mcs51/lkmem (summary): better fix for sp problem
11196         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
11197         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
11198         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
11199                                               remove --stack-after-data
11200
11201 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
11202
11203         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
11204         * src/SDCCutil.c (join): ugly bug: missing '\0'
11205         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
11206
11207 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11208
11209         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
11210         * src/port.h: typo
11211         * src/pic/main.c (_asmCmd): gpasm supports -o
11212         * src/z80/main.c: more general macros
11213         * device/lib/Makefile.in: remove intermediate files
11214
11215 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11216
11217         * .version: Bumped version number to 2.3.3
11218         * src/SDCCBBlock.c: new option -o
11219         * src/SDCCglobl.h: new option -o
11220         * src/SDCCglue.c: new option -o
11221         * src/SDCCmain.c: new option -o
11222         * src/asm.c: new option -o
11223         * src/ds390/main.c: new option -o
11224         * src/pic/glue.c: new option -o
11225         * src/pic/pcode.c: new option -o
11226         * src/pic/ralloc.c: new option -o
11227         * src/pic16/glue.c: new option -o
11228         * src/pic16/pcode.c: new option -o
11229         * src/pic16/ralloc.c: new option -o
11230         * src/z80/main.c: new option -o
11231         * device/lib/Makefile.in: use -o
11232         * support/regression/ports/ds390/spec.mk: use -o
11233         * support/regression/ports/gbz80/spec.mk: use -o
11234         * support/regression/ports/mcs51/spec.mk: use -o
11235         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
11236         * support/regression/ports/z80/spec.mk: use -o
11237         * support/regression/ports/ucz80/spec.mk: use -o
11238         * support/regression/ports/xa51/spec.mk: use -o
11239         * support/regression/fwk/lib/timeout.c: fix usage string
11240
11241 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
11242         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
11243
11244 2003-01-07    <johan AT balder>
11245
11246         * src/SDCCast.c (decorateType): fixed bug #600035
11247
11248 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
11249         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
11250         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
11251         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
11252         * src/pic/pcode.c: outcommented unused variable to remove warnings
11253         * src/pic/ralloc.c: outcommented unused variable to remove warnings
11254
11255 2003-01-06    <karl AT turbobit.com>
11256         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
11257    regression tests.
11258
11259 2003-01-06    <johan AT balder>
11260
11261         * src/SDCCicode.c: fixed array add
11262
11263 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
11264         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
11265         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
11266
11267 2003-01-04    <johan AT balder>
11268
11269         * src/SDCCval.c (getNelements): fixed the initialized array of structures
11270
11271 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11272         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
11273
11274 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11275         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
11276         * support/regression/tests/bug-524697.c: fit mem usage into 8032
11277
11278 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11279         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
11280
11281 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
11282         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
11283
11284 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
11285         * src/mcs51/main.c: removed {bindir}{sep} from aslink
11286
11287 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11288
11289     * in /sdcc/as/mcs51/ changed these files in order to create an
11290     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
11291     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
11292     following files to include the previous two files: aslink.dsp,
11293     Makefile.aslink, Makefile.bcc, and Makefile.in.
11294
11295     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
11296     .adb instead of .cdb
11297
11298 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11299
11300         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
11301         value from option --iram-size.
11302
11303 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11304
11305         * /sdcc/as/mcs51/lklist.c: added boundary check before using
11306         dram[] array.
11307
11308 2002-09-18    <wiml AT hhhh.org>
11309
11310         * SDCClrange.h: exposed setFromRange() and setToRange()
11311         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
11312           packRegsForAccUse() (bug 542397)
11313         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
11314           multiple times and emitting the fetch operations more than once
11315           added aopGetUsesAcc() function to allow binary operators to
11316           fetch their operands in the correct order; made genMinus() emit
11317           compact code for X = LITERAL - Y
11318
11319 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11320         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
11321         sprintf() in line 1267.
11322
11323 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11324         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
11325         like ports.
11326
11327 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11328         Changes to aslink (All the changes are marked with 'JCF'):
11329
11330         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
11331         summary().
11332
11333         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
11334         area BSEG.  Also moves, if possible, the DATA area down into the internal
11335         ram so more space is available.
11336
11337         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
11338         sflag.
11339
11340         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
11341         not bytes.  Function summary() which creates a memory usage summary
11342         file with extension .mem.  Reports of overlaping stack and small stack
11343         size.  If the space for the stack is less than 16 bytes aslink trows a
11344         warning.
11345
11346         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
11347         the 8051.  Option 'y' for memory summary output file.
11348
11349         Changes to sdcc (All the changes are marked with 'JCF'):
11350
11351         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
11352
11353         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
11354         overlaying area for it (uses RegBankUsed[4]).
11355
11356         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
11357         bank zero as used by default.  By default aslink locates the stack
11358         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
11359         the creation of the .mem file.  Delegates the allocation of data area
11360         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
11361         the begining of the stack area to aslink.
11362
11363         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
11364         glue() in SDCCglue.c creates an area for it.
11365
11366 2002-09-03  Borut Razem <borut.razem AT siol.net>
11367         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
11368         sdcc/src/pic/glue.c:
11369         introduced atexit() handler for teporay files removal in case of
11370         errors, assertions, ...
11371
11372 2002-08-29  Borut Razem <borut.razem AT siol.net>
11373         * sdcc/support/cpp2/auto-host_vc_in.h:
11374         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
11375         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
11376         Maybe there is a similar problem with BORLANDC? It should be checked!
11377
11378         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
11379         corrected improper use of assert: the assignment to clr variable was done inside the assert.
11380         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
11381         was not executed, and the compiler (cl) launched a warning:
11382         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
11383
11384 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
11385         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
11386
11387 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
11388         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
11389
11390         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11391           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
11392           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
11393           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11394           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
11395           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
11396           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
11397         - added Release configuration in VS projects
11398         - review of compiler an linker options
11399         - VC .exe files are generated in bin_vc directory, not to interfere
11400           with binaries generated from other projects (cygwin, mingw, bcc ...)
11401
11402         * sdcc/src/yacc.dsp: added
11403
11404         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
11405         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
11406         and insert the version number definitions from .version
11407
11408         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
11409
11410         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
11411         added - genarate auto-host.h using auto-host_vc_in.h as template
11412
11413         * sdcc/sdcc_vc.h,
11414         removed from CVS, generated automatically
11415
11416 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
11417         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
11418
11419 2002-08-11  Borut Razem <borut.razem AT siol.net>
11420         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
11421
11422 2002-08-10  Borut Razem <borut.razem AT siol.net>
11423         * src/SDCCmain.c (main):
11424         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
11425         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
11426         The consequence was that some temporary files were not removed.
11427
11428         * src/SDCCglue.c:
11429         unification of code in functions tempfilename() and tempfile():
11430         function tempnam() is defined in Visual Studio 6.0 and .NET
11431
11432         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
11433
11434         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11435           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
11436         - removed compiler command line option /WX: Treats all warnings as errors
11437         - update a list of source files, included into the project
11438
11439         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11440           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
11441         changed project type to Generic Project so that can be correcly converted to VS.NET project
11442
11443         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
11444
11445         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
11446
11447         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
11448
11449         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
11450         added return 0 statements after assert() to make compiler happy
11451
11452         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
11453         added newline in the def file to keep MSC compiler satisfied
11454
11455         * sdcc/src/z80/gen.c:
11456         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
11457           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
11458         - solved MSC error in function aopDump()
11459
11460         * sdcc_vc.h: define PREFIX as "\\sdcc"
11461
11462 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
11463         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
11464
11465 2002-06-22  Scott Dattalo <scott AT dattalo.com>
11466         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
11467         - Rewrote the register banking algorithm.
11468         - Added pCode live-range analysis to registers (for now, only non-used and
11469         singly-used registers optimized away)
11470
11471         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
11472
11473         * 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.
11474
11475 2002-05-10  Scott Dattalo <scott AT dattalo.com>
11476         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
11477
11478 2002-04-22  Michael Hope  <michaelh AT vroom>
11479
11480         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
11481
11482         * configure.in (DD_COPT): Added include support required for gbdk.
11483
11484         * .version: Bumped version number just to increase it.
11485
11486         * src/SDCCmain.c: Added -nostdinc to the default options.
11487
11488 2002-04-15  Michael Hope  <michaelh AT vroom>
11489
11490         * device/lib/z80/printf.c (sprintf): Added.
11491
11492         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
11493
11494         * src/z80/peeph.def: Added transpose redundent load rule.
11495
11496         * src/z80/main.c: Added force callee saves for jaune.
11497
11498         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
11499
11500         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
11501
11502 2002-03-28  Johan Knol  <johan AT balder>
11503
11504         * src/SDCCval.c: fixed bug #532436
11505
11506 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11507         * /src/port.h:
11508         Added "char *Processor" field to the port structure.
11509
11510         * /src/SDCCmain.c:
11511         Added -p option. Allows port dependent processor to be specified.
11512
11513         * all ports:
11514         Initialized the new field char *Processor field to NULL in all ports
11515
11516         * /src/pic/*:
11517         Compiler generated registers for interrupt context saving
11518         were not getting allocated.
11519
11520 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
11521
11522         * /src/SDCCast.c:
11523         Fixed left shift. Will promote the left side of a left shift
11524         if a) left shifting more than size of operand or b) when assigned
11525         to something size > size of left side
11526
11527 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11528         * src/pic/*
11529         tons of changes. Register allocation has been
11530         rewritten. Added customization for the various PICs. Flow
11531         analysis is restructured. ...
11532
11533         * src/pic/device.h:
11534         Added
11535
11536         * src/pic/device.c:
11537         Added. device.c is a PIC port hack to accomodate variations
11538         in PIC devices.
11539
11540 2002-03-13  Michael Hope  <michaelh AT vroom>
11541
11542         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
11543
11544 2002-03-04  johanknol  <johanknol AT manik>
11545
11546         * /src/SDCCval.c: fixed
11547
11548         const unsigned char arr[][2] = { { 0, 1 } };
11549         t18.c:1: error: Initializer element is not constant
11550
11551 2002-03-04  bela  <bela AT manik>
11552
11553         * /device/include/mcs51reg.h:
11554         ds89c420 register definition update
11555
11556 2002-03-03    <johan AT FRIJA>
11557
11558         * support/Util/SDCCerr.c: did something, but don't no why anymore
11559
11560         * support/regression/tests/bug-524691.c: made it a little less shy
11561
11562         * src/SDCCast.c (decorateType): fixed bug #524697
11563
11564         * src/SDCCast.c: made some lineno improvements
11565
11566         * src/SDCCval.c (getNelements): changed warning to error
11567
11568         * src/SDCCglue.c (printIvalArray): changed warning to error
11569
11570         * src/SDCCicode.c: fixed a warning for mingw
11571
11572         * src/SDCCast.c (decorateType): fixed the << promotion for ops
11573
11574         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
11575
11576 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
11577
11578         * src/ds390/peeph.def:
11579         Added some more peephole rules
11580
11581         * src/ds390/gen.c: Various fixes & enhancements
11582
11583         * src/SDCClrange.c, src/SDCClrange.h:
11584         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
11585
11586         * src/ds390/ralloc.c:
11587         various fixes & enhancements (ds390) specific
11588
11589         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
11590         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
11591         from rallocs.
11592
11593         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
11594
11595 2002-03-02    <johan AT FRIJA>
11596
11597         * src/SDCCast.c (decorateType): fixed bug #524708
11598
11599         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
11600
11601         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
11602
11603 2002-03-01  Michael Hope  <michaelh AT vroom>
11604
11605         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
11606
11607         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
11608
11609 2002-03-01    <johan AT FRIJA>
11610
11611         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
11612
11613         * src/SDCCast.c (decorateType): fixed bug #524209
11614
11615         * src/SDCCval.c (valNot): fixed bug #524195
11616
11617 2002-02-26    <johan AT balder>
11618
11619         * src/xa51/gen.c: fixed a warning
11620
11621         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
11622
11623         * src/SDCCast.c (decorateType): fixed bug #522534
11624
11625 2002-02-23    <johan AT balder>
11626
11627         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
11628
11629 2002-02-22    <johan AT balder>
11630
11631         * src/SDCCast.c: fixed bug #514865
11632
11633         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
11634
11635 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
11636
11637         * sdcc/src/SDCCloop.c:
11638         Previous fix was not good. basic blocks that have "break" or "return" are
11639         not really partof a loop , but live ranges used in these blocks should
11640         be live thru the entire loop, so set partOfLoop but don't add them to
11641         loop region
11642
11643 2002-02-21    <johan AT FRIJA>
11644
11645         * src/SDCCcse.c: fixed bug #514308
11646
11647 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
11648
11649         * src/SDCCloop.c:
11650         Fixed BUG #519583. If a conditional block ended in a return/break
11651         statement inside a loop, it was not being considered part of the loop.
11652
11653         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
11654
11655 2002-02-10  Karl Bongers <karl AT turbobit.com>
11656
11657         * debugger/*:
11658         Fixed up SDCDB debugger somewhat.  Updated debugger/README
11659         with lots of comments and notes.
11660
11661         * device/examples/test2.c:
11662         Fix bug, "red" variable not being initialized(compiler complained).
11663
11664         * device/examples/Makefile, examples/test3.c:
11665         Add Makefile in device/examples folder, compiles test3.c
11666         for use as a multiple module SDCDB test case.
11667
11668         * sim/ucsim/cmd.src/cmdset.cc:
11669         Took out debug printfs in ucsim "next" command.
11670
11671         * sim/ucsim/xa.src:
11672         Karl and Johan start ucsim XA support.  Most dissassembly working,
11673         about 75% emulation done(plenty of work remaining).
11674
11675         * sim/ucsim/z80.src:
11676         Add Z80 support to ucsim, add test-ucz80 regression test,
11677         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
11678         Notice z80 compiler fails on examples/test3.c/crc code.
11679
11680 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
11681
11682         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
11683         Added support for --parms-in-bank1
11684
11685         * src/ds390/peeph.def:
11686         added a few more peephole optimzations
11687
11688         * src/ds390/main.c:
11689         1) added __builtin_inp & __builtin_outp used to read in data of given length
11690            from a memory mapped port
11691         2) added __builtin_memcmp
11692         3) added __builtin_swapw swap bytes of a short
11693
11694         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11695         1) handle multiple send & receives from register bank1
11696         2) ralloc can now allocate DPTR1 to some liveRanges
11697
11698         * src/SDCCsymt.c, src/SDCCsymt.h:
11699         changes to handle multiple sends & receives
11700
11701         * src/SDCCptropt.h:
11702         added some pointer arithmetic optimization
11703
11704         * src/SDCCptropt.c:
11705         added some pointer arithmetic optimizations but not stable yet so not
11706         called from anywhere (will get this working shortly)
11707
11708         * src/SDCCopt.c: fixed for multiple sends & receives
11709
11710         * src/SDCCmain.c:
11711         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11712         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11713            set preprocessor defines (depending on options)
11714
11715         * src/SDCCicode.c, src/SDCCicode.h:
11716         changes made to handle multiple sends & receives
11717
11718         * src/SDCCglobl.h:
11719         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11720
11721         * src/SDCCcse.c, src/SDCCcse.h:
11722         added function findbackward def (to be used in upcoming optimization)
11723
11724         * src/SDCCcflow.c, src/SDCCcflow.h:
11725         added function returnAtEnd - to determine if a basic block terminates with
11726         a RETURN iCode
11727
11728         * src/SDCCast.c, src/SDCCast.h:
11729         added option parms-in-bank1
11730
11731         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11732         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11733         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11734         adjusted for --parms-in-bank1 option
11735
11736         * device/include/string.h:
11737         donot redefine "reentrant" keyword
11738
11739         * device/include/ds80c390.h: Added some more SFRs
11740
11741 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11742
11743         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11744
11745 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11746
11747         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11748
11749 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11750
11751         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11752
11753 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11754
11755         * Added --xram-movc option
11756
11757 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11758
11759         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11760
11761 2002-01-11  Johan Knol
11762
11763         * Added math lib of Jesus Calvino-Fraga
11764
11765 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11766
11767         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11768         * support/regression/Makefile: new target test-mcs51-stack-auto
11769         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11770
11771 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11772
11773         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11774
11775 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11776
11777         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11778
11779 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11780
11781         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11782
11783         * src/SDCCglue.h: add definition for printIvalChar()
11784
11785 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11786
11787         * src/SDCCast.c: fix #498138 by Johan
11788
11789         * src/SDCCglue.c: fix #498138 by Johan
11790
11791 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11792
11793         * support/regression/Makefile: fix clean
11794
11795         * support/regression/ports/ds390/support.c: fix transmission of last character
11796
11797 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11798
11799         * /sdcc/src/ds390/gen.c:
11800         a) improved computing address of stack variable
11801         b) took out some #if 0 code
11802         c) improved parmBytes adjustment
11803         d) improved genPlusIncr & genMinusIncr
11804         e) genCmp could generate bad code (when left assigned to DPTR)
11805         f) Fixed bug in hasInc
11806
11807         * /sdcc/src/ds390/ralloc.c:
11808         a) packRegsForSupport could mess up live information (Fixed)
11809         b) packRegsDPTRuse could be incorrect for left & right shift
11810
11811         * /sdcc/src/mcs51/ralloc.c:
11812         packRegsForSupport could mess up the live information (Fixed)
11813
11814         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11815
11816         * /sdcc/src/SDCCast.c:
11817         can reverse a loop even if function call is present as long
11818         as the loop control variable is local & is not passed as parameter
11819
11820 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11821
11822         * /sdcc/ChangeLog: *** empty log message ***
11823
11824         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11825         More builtin function additions for TININative
11826
11827         * /sdcc/src/ds390/ralloc.c:
11828         Had broken the regression testsuite
11829
11830         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11831
11832         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11833         Added funcattr hasStackParms will be set for reentrant functions when there
11834         are paramteres on the stack, this helps in minimizing frame pointer generation
11835         typeFromStr can handle function pointers now
11836
11837         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11838         *** empty log message ***
11839
11840 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11841
11842         * /src/ds390/gen.c, /src/ds390/main.c:
11843         More builtin function additions for TININative
11844
11845         * /src/ds390/ralloc.c:
11846         Had broken the regression testsuite
11847
11848         * /src/SDCCast.c: Fixed a bug in dumptree
11849
11850         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11851         Added funcattr hasStackParms will be set for reentrant functions when there
11852         are paramteres on the stack, this helps in minimizing frame pointer generation
11853         typeFromStr can handle function pointers now
11854
11855         * /doc/builtins.txt, /doc/TININative.txt:
11856         *** empty log message ***
11857
11858
11859 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11860
11861         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11862         ALPHA version for -mTININative
11863
11864         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11865         updated to reflect changes in the port structure
11866
11867         * /src/port.h:
11868         added function do_assemble (similar to do_link) if non-null this function
11869         will be called to do assembly (-mTININative) requires a multi command
11870         assembly
11871         added function genAssemblerEnd will be called to generate assembler Epilogue
11872
11873         * /src/SDCCsymt.c:
11874         added _JavaNative to debug info printing
11875
11876         * /src/SDCCmain.c: added option --tini-libid
11877         added port->do_assemble function (-mTININative) has a multi command assemble
11878
11879         * /src/SDCCglue.c: Disabled "constExpr" check
11880         added port->genAssemblerEnd function
11881
11882         * /src/SDCCglobl.h: Added option --tini-libid value
11883
11884         * /src/SDCCast.h:
11885         tookout optimizeCompare from the header (has no external references)
11886
11887         * /src/SDCCast.c: made one more function "static"
11888
11889 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11890
11891         * src/z80/mappings.i: Added z80asm support.
11892
11893         * src/z80/main.c: Added z80asm support on --asm=z80asm
11894
11895         * src/z80/gen.c: Fixed asm portability issues.
11896
11897         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11898
11899         * src/SDCCglue.c (printExterns): Added global/extern split.
11900
11901 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11902
11903         * support/regression/Makefile: added test for mcs51 model large
11904
11905         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11906
11907         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11908
11909 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11910
11911         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11912
11913 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11914
11915         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11916
11917         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11918
11919 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11920
11921         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11922
11923         * support/regression/tests/simplefloat.c: Port to mcs51.
11924
11925 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11926         * support/regression/tests/bug-485362.c: Added.
11927
11928         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11929
11930         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11931
11932         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11933
11934         * src/z80/gen.c (aopDump): Added a dump function.
11935
11936 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11937         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11938
11939         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11940
11941         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11942
11943         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11944
11945         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11946
11947         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11948
11949         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11950
11951         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11952
11953         * support/regression/ports/ds390/support.c: Use tinibios.
11954
11955         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11956
11957 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11958
11959         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11960         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11961
11962         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11963
11964         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11965
11966 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11967
11968         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11969
11970         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11971         (packRegsForIYUse): Created and optimised.
11972
11973 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11974
11975         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11976 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11977
11978         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11979
11980         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11981
11982         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11983
11984 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11985
11986         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11987
11988         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11989
11990 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11991
11992         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11993
11994         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11995
11996         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11997
11998 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11999
12000         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
12001         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
12002         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
12003
12004         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
12005
12006         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
12007         (genNotFloat): Added.
12008         (genUminusFloat): Added.
12009
12010         * device/lib/z80/Makefile: Added floating pt stubs.
12011
12012         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
12013
12014         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
12015
12016         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
12017
12018 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
12019
12020         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
12021
12022         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
12023
12024         * sdcc/support/regression/Makefile: Add port ds390.
12025
12026         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
12027
12028         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
12029
12030         * sdcc/support/regression/ports/ds390/spec.mk: Added.
12031
12032         * sdcc/support/regression/ports/ds390/support.c: Added.
12033
12034         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
12035
12036         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
12037
12038         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
12039
12040 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12041
12042         * device/include/malloc.h: Added z80 and gbz80 support.
12043
12044         * device/lib/gbz80/heap.s: Added.
12045
12046         * device/lib/z80/heap.s: Added.
12047
12048         * device/lib/malloc.c: Added z80 and gbz80 support.
12049
12050         * support/regression/tests/malloc.c (testMalloc): Added.
12051
12052         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
12053
12054         * support/regression/tests/bug-478094.c: Added.
12055
12056         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
12057
12058 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
12059
12060         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
12061
12062         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
12063
12064         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
12065
12066         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
12067
12068         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
12069
12070 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12071
12072         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
12073
12074 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
12075
12076         * support/regression/tests/bug-477927.c: Added.
12077
12078         * src/z80/peeph.def: Added minor rules.
12079
12080         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
12081
12082         * src/z80/peeph.def: Added jump optimisation modification.
12083
12084 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
12085
12086         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
12087
12088 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
12089
12090         * support/regression/tests/funptrs.c: Added.
12091
12092 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
12093
12094         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
12095
12096 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
12097
12098         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
12099
12100         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
12101
12102         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
12103         (movLeft2ResultLong): Created.
12104
12105         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
12106         (joinPushes): Added.  Joins two char pushes into a word push.
12107
12108 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
12109
12110         * support/cpp2/Makefile.in (install): Added creation of dest dir.
12111
12112         * support/makebin/Makefile (install): Added creation of dest dir.
12113
12114 2001-10-24 Karl Bongers <karl AT turbobit.com>
12115
12116         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
12117
12118 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
12119
12120         * src/z80/ralloc.c: Turned off faulty pack for one use.
12121
12122         * src/z80/peeph-gbz80.def: Removed redundent restart options.
12123
12124         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
12125
12126 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
12127
12128         * support/regression/Makefile: Improved clean
12129
12130         * support/regression/ports/gbz80/spec.mk: Added clean
12131
12132         * support/regression/ports/host/spec.mk: Added clean
12133
12134         * support/regression/ports/z80/spec.mk: Added clean
12135
12136         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
12137
12138         * support/regression/ports/mcs51/timeout.c: little improvements
12139
12140 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
12141
12142         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
12143
12144         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
12145
12146         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
12147
12148 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
12149
12150         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
12151
12152         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
12153
12154 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
12155         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
12156
12157         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
12158
12159         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
12160
12161         * src/mcs51/main.c (_linkCmd): Added bin path to command.
12162
12163         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
12164
12165         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
12166
12167         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
12168
12169         * support/regression/tests/longor.c: Added.
12170
12171 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
12172
12173         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
12174
12175         * as/mcs51/aslink.h: define PATH_MAX
12176
12177         * as/mcs51/asm.h: define PATH_MAX
12178
12179         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
12180
12181         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
12182
12183         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
12184
12185         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
12186
12187         * src/SDCCglobl.h: define PATH_MAX
12188
12189         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
12190
12191         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
12192
12193 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
12194
12195         * src/z80/gen.c (gencjneshort): Fixed
12196
12197         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
12198
12199 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
12200
12201         * support/regression/tests/bug-469671.c: Added.
12202
12203         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
12204
12205 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
12206
12207         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
12208
12209         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
12210
12211 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
12212
12213         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
12214
12215         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
12216
12217         * src/device/lib/_mullong.c : removed hint: nooverlay bug
12218
12219         * src/device/lib/_divuint.c : removed hint: nooverlay bug
12220
12221         * src/device/lib/_divulong.c: removed hint: nooverlay bug
12222
12223         * src/device/lib/_moduint.c : removed hint: nooverlay bug
12224
12225         * src/device/lib/_modulong.c: removed hint: nooverlay bug
12226
12227 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
12228
12229         * 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.
12230
12231         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
12232
12233         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
12234
12235 2001-10-07    <johan AT FRIJA>
12236
12237         * device/lib/gets.c (gets): fixed the return value.
12238
12239 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
12240         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
12241
12242         * 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.
12243
12244         * 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.
12245
12246         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
12247
12248         * src/pic/gen.c: Removed Safe_strdup.
12249
12250         * configure.in: Added option to enable libgc support.
12251
12252         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
12253         (bitVectUnion): Optimised.
12254         (bitVectIntersect): Optimised.
12255         (bitVectBitsInCommon): Optimised.
12256         (bitVectCplAnd): Optimised.
12257
12258         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
12259
12260 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12261
12262         * src/SDCCmain.c: distinguish between assembler debug and plain options
12263
12264         * src/avr/main.c:   remove standard assembler options
12265
12266         * src/ds390/main.c: remove standard assembler options
12267
12268         * src/mcs51/main.c: remove standard assembler options
12269
12270         * src/port.h: removed "PENDING" comment
12271
12272 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12273
12274         * src/device/lib/_mulint.c  : new, with assember functions
12275
12276         * src/device/lib/_mullong.c : new, with assember functions
12277
12278         * src/device/lib/_divuint.c : with assember functions
12279
12280         * src/device/lib/_divsint.c : with assember functions
12281
12282         * src/device/lib/_divulong.c: with assember functions
12283
12284         * src/device/lib/_divslong.c: with assember functions
12285
12286         * src/device/lib/_moduint.c : with assember functions
12287
12288         * src/device/lib/_modsint.c : with assember functions
12289
12290         * src/device/lib/_modulong.c: with assember functions
12291
12292         * src/device/lib/_modslong.c: with assember functions
12293
12294         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
12295
12296         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
12297
12298         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
12299                                       replaced _mululong.c and _mulslong.c by _mullong.c
12300
12301 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12302
12303         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
12304
12305 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12306
12307         * src/SDCCglue.c: test, if win32api is available for MINGW
12308
12309 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12310
12311         * src/SDCCsymt.c: no more _modifier in printTypeChain()
12312         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
12313         * support/regression/ports/gbz80/spec.mk: removed GENERIC
12314         * support/regression/ports/host/spec.mk: removed GENERIC
12315         * support/regression/ports/mcs51/spec.mk: removed GENERIC
12316         * support/regression/ports/z80/spec.mk: removed GENERIC
12317
12318 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
12319
12320         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
12321
12322         * support/regression/tests/bug-467035.c: Created.
12323
12324 2001-10-01    <johan AT FRIJA>
12325
12326         * src/SDCC.y: fixed bug #466586 part 1
12327
12328 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
12329
12330         * SDCCicode.c: z80 has no generic pointers
12331         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
12332
12333 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
12334
12335         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
12336
12337 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
12338
12339         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
12340
12341         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
12342
12343 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
12344
12345         * configure.in: Fixed up so that ucsim is only configured once.
12346
12347         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
12348
12349         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
12350         (getPathDifference): As above.
12351
12352         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
12353
12354         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
12355
12356 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
12357         * .version: Updated to 2.3.1
12358
12359         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
12360         Added copyright header.
12361
12362         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
12363         (assemble): Added support for macro based assembler commands.
12364         (linkEdit): Added support for macro based linker commands.
12365         (preProcess): Changed the pre-processor to use macros.
12366         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
12367         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
12368
12369         * device/lib/z80/crt0.s: Added module name for debugging.
12370
12371 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
12372
12373         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12374
12375         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
12376
12377         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
12378
12379         * src/Makefile.in: Added SDCCmacro and SDCCutil
12380
12381 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
12382
12383         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12384
12385 2001-09-16    <johan AT FRIJA>
12386
12387         * 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.
12388
12389 2001-09-15    <johan AT FRIJA>
12390
12391         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
12392         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
12393
12394 2001-09-11    <johan AT FRIJA>
12395
12396         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
12397
12398 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
12399
12400         * support/regression/tests/bug-460444.c: Added test case.
12401
12402         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
12403         (genCast): Added justification for all of the asserts.
12404
12405 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
12406
12407         * support/regression/support.c: _xdata replaced by xdata
12408
12409         * support/regression/spec.mk: removed _generic
12410
12411 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
12412
12413         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
12414
12415         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
12416         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
12417
12418         * src/z80/peeph.def: Added a rule to optimise shift then compare.
12419
12420         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
12421
12422         * support/regression/tests/bug-460010.c: Added test case.
12423
12424         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
12425
12426 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
12427
12428         * support/regression/Makefile: inter-port-clean adjusted for mcs51
12429
12430         * support/regression/testfwk.c: removed workaround for bug #436344
12431
12432         * support/regression/tests/bp.c: use less memory with mcs51
12433
12434         * support/regression/tests/bug-441448.c: use less memory
12435
12436         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
12437
12438         * support/regression/collate-results.py: typo
12439
12440 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
12441
12442         * support/regression/tests/fetchoverlap.c: Added new test case.
12443
12444         * support/regression/tests/bp.c: Added new test case.
12445
12446         * support/regression/tests/bug-448984.c: Added new test case.
12447
12448         * support/regression/tests/pow2shifts.c: Added new test case.
12449
12450         * src/z80/gen.c: Turned off the noise it normally generates for the release.
12451         (genlshTwo): Fixed right shift for count > 8.
12452
12453         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
12454
12455 2001-09-08    <johan AT FRIJA>
12456
12457         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
12458
12459 2001-09-07    <johan AT FRIJA>
12460
12461         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
12462
12463         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
12464
12465 2001-09-06    <johan AT FRIJA>
12466
12467         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
12468         * bernhard noted me at this: "() equals to (void)" (1.38)
12469
12470 2001-09-05    <johan AT FRIJA>
12471
12472         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
12473
12474 2001-09-04    <johan AT FRIJA>
12475
12476         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
12477
12478
12479 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
12480
12481         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
12482
12483 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
12484
12485         * link/z80/aslink.h: Fixed path for PATH_MAX
12486
12487 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
12488
12489         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
12490
12491         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
12492
12493         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
12494
12495         * 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.
12496
12497 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
12498
12499         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
12500         (genCmp): Fixed up genCmp for the GB with longs.
12501
12502         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
12503
12504         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
12505
12506         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
12507
12508         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
12509
12510 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
12511
12512         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
12513
12514 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
12515
12516         * 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.
12517
12518         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
12519
12520 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
12521
12522         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
12523
12524         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
12525
12526 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
12527
12528   * sim/ucsim/configure:    little improvement of Cygwin-detection
12529   * sim/ucsim/configure.in: little improvement of Cygwin-detection
12530   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
12531   * support/regression/tests/bug-221100.c: small changes for mcs51
12532   * support/regression/tests/bug-221168.c: small changes for mcs51
12533   * support/regression/tests/bug-227710.c: small changes for mcs51
12534   * support/regression/tests/staticinit.c: small changes for mcs51
12535   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
12536   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12537   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12538
12539 $Revision$