* sim/ucsim/cmd.src/cmdutil.cc: #include <sys/time.h> and <unistd.h>
[fw/sdcc] / ChangeLog
1 2006-09-01 Borut Razem <borut.razem AT siol.net>
2
3         * sim/ucsim/cmd.src/cmdutil.cc: #include <sys/time.h> and <unistd.h>
4           to make ppc-osx happy
5
6 2006-08-31 Borut Razem <borut.razem AT siol.net>
7
8         * sim/ucsim/cmd.src/newcmdposix.cc: #include <assert.h>
9         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
10         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
11         * support/regression/ports/ds390/spec.mk,
12           support/regression/ports/mcs51/spec.mk,
13           support/regression/ports/xa51/spec.mk: introduced DEV_NULL variable.
14           To run regression tests in mingw environment:
15           make DEV_NULL=NUL CC=gcc
16
17 2006-08-30 Borut Razem <borut.razem AT siol.net>
18
19         * sim/ucsim/cmd.src/newcmdposix.cc, sim/ucsim/cmd.src/newcmdposixcl.h,
20           sim/ucsim/cmd.src/newcmdwin32.cc, sim/ucsim/cmd.src/newcmdwin32cl.h,
21           sim/ucsim/app.cc, sim/ucsim/appcl.h, sim/ucsim/configure,
22           sim/ucsim/configure.in, sim/ucsim/ddconfig_in.h, sim/ucsim/error.cc,
23           sim/ucsim/errorcl.h, sim/ucsim/option.cc, sim/ucsim/optioncl.h,
24           sim/ucsim/utils.cc, sim/ucsim/utils.h, sim/ucsim/cmd.src/Makefile.in,
25           sim/ucsim/avr.src/avr.cc, sim/ucsim/avr.src/avrcl.h,
26           sim/ucsim/cmd.src/bp.cc, sim/ucsim/cmd.src/bpcl.h,
27           sim/ucsim/cmd.src/cmdconf.cc, sim/ucsim/cmd.src/cmdgui.cc,
28           sim/ucsim/cmd.src/cmdmem.cc, sim/ucsim/cmd.src/cmdset.cc,
29           sim/ucsim/cmd.src/cmdsetcl.h, sim/ucsim/cmd.src/cmdstat.cc,
30           sim/ucsim/cmd.src/cmduc.cc, sim/ucsim/cmd.src/cmduccl.h,
31           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
32           sim/ucsim/cmd.src/command.cc, sim/ucsim/cmd.src/commandcl.h,
33           sim/ucsim/cmd.src/get.cc, sim/ucsim/cmd.src/getcl.h,
34           sim/ucsim/cmd.src/info.cc, sim/ucsim/cmd.src/newcmd.cc,
35           sim/ucsim/cmd.src/newcmdcl.h, sim/ucsim/cmd.src/set.cc,
36           sim/ucsim/cmd.src/show.cc, sim/ucsim/cmd.src/timer.cc,
37           sim/ucsim/hc08.src/hc08.cc, sim/ucsim/hc08.src/hc08cl.h,
38           sim/ucsim/s51.src/Makefile.in, sim/ucsim/s51.src/interrupt.cc,
39           sim/ucsim/s51.src/interruptcl.h, sim/ucsim/s51.src/pca.cc,
40           sim/ucsim/s51.src/pcacl.h, sim/ucsim/s51.src/port.cc,
41           sim/ucsim/s51.src/portcl.h, sim/ucsim/s51.src/serial.cc,
42           sim/ucsim/s51.src/serialcl.h, sim/ucsim/s51.src/timer0.cc,
43           sim/ucsim/s51.src/timer0cl.h, sim/ucsim/s51.src/timer1.cc,
44           sim/ucsim/s51.src/timer1cl.h, sim/ucsim/s51.src/timer2.cc,
45           sim/ucsim/s51.src/timer2cl.h, sim/ucsim/s51.src/uc390.cc,
46           sim/ucsim/s51.src/uc390cl.h, sim/ucsim/s51.src/uc390hw.cc,
47           sim/ucsim/s51.src/uc390hwcl.h, sim/ucsim/s51.src/uc51.cc,
48           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/wdt.cc,
49           sim/ucsim/s51.src/wdtcl.h, sim/ucsim/sim.src/hw.cc,
50           sim/ucsim/sim.src/hwcl.h, sim/ucsim/sim.src/mem.cc,
51           sim/ucsim/sim.src/memcl.h, sim/ucsim/sim.src/obsolete.cc,
52           sim/ucsim/sim.src/obsolete.h, sim/ucsim/sim.src/sim.cc,
53           sim/ucsim/sim.src/simcl.h, sim/ucsim/sim.src/stack.cc,
54           sim/ucsim/sim.src/stackcl.h, sim/ucsim/sim.src/test_mem_speed.cc,
55           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
56           sim/ucsim/xa.src/xa.cc, sim/ucsim/xa.src/xacl.h,
57           sim/ucsim/z80.src/z80.cc, sim/ucsim/z80.src/z80cl.h:
58           ucsim WIN32 native port
59
60 2006-08-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
61
62         * doc/sdccman.lyx: added note on dynamic memory heap initialization
63
64 2006-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
65
66         * src/mcs51/gen.c (genAnd, genOr, genXor): fixed bug 1546986
67         * src/ds390/gen.c (aopGetUsesAcc): handle AOP_DPTR2 and AOP_DPTRn too
68
69 2006-08-26 Maarten Brock <sourceforge.brock AT dse.nl>
70
71         * src/ds390/gen.c (genAnd, genOr, genXor): fixed bug 1546986
72         * support/regression/tests/bug1546986.c: new, added
73         * as/mcs51/.cvsignore,
74         * debugger/mcs51/.cvsignore,
75         * src/.cvsignore: deleted
76
77 2006-08-25 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
78
79         * device/include/mcs51/P89c51RD2.h: fixed bug 1546936 (error in sbit
80           definitions)
81
82 2006-08-20 Borut Razem <borut.razem AT siol.net>
83
84         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h:
85           removed cl_listen_console::match(), cl_console::match(),
86           restructured cl_commander::proc_input()
87
88 2006-08-16 Borut Razem <borut.razem AT siol.net>
89
90         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h,
91           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
92           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/uc.cc: code cleaning
93
94 2006-08-14 Borut Razem <borut.razem AT siol.net>
95
96         * support/regression/Makefile.in,
97           support/regression/ports/pic14/gpsim.cmd,
98           support/regression/ports/pic14/spec.mk,
99           support/regression/ports/pic14/support.c:
100           added pic14 regression test
101
102 2006-08-14 Maarten Brock <sourceforge.brock AT dse.nl>
103
104         * as/doc/asxhtm.html: documented changed ABS behaviour
105         * as/doc/README: fixed some typos
106
107 2006-08-13 Maarten Brock <sourceforge.brock AT dse.nl>
108
109         * support/regression/tests/float_trans.c: disabled test if __STDC_IEC_559__
110           not defined on host
111
112 2006-08-12 Borut Razem <borut.razem AT siol.net>
113
114         * support/regression/fwk/include/testfwk.h,
115           support/regression/fwk/lib/testfwk.c,
116           support/regression/generate-cases.py,
117           support/regression/Makefile.in:
118           regression test framework does not depend on function pointers and
119           variable arguments
120
121 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
122
123         * device/include/stddef.h: c temporary hack to fix bug 1518273
124
125 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
126
127         * device/include/mcs51/cc2510fx.h: added
128         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
129           to projects.
130
131 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
132
133         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
134         * as/z80/Makefile.in: added strcmpi.c
135         * as/z80/z80adr.c: added upper case registers and lower case conditionals
136         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
137
138 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
139
140         * device/lib/gbz80/asm_strings.s,
141         * device/lib/gbz80/crt0_rle.s,
142         * device/lib/gbz80/div.s,
143         * device/lib/gbz80/mul.s,
144         * device/lib/gbz80/shift.s,
145         * device/lib/z80/asm_strings.s,
146         * device/lib/z80/crt0_rle.s,
147         * device/lib/z80/div.s,
148         * device/lib/z80/mul.s,
149         * device/lib/z80/shift.s: changed to all lower case menmonics except the
150           flags which are all upper case
151
152 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
153
154         * as/z80/asm.h: made CASE_SENSITIVE 1
155         * link/z80/aslink.h: made CASE_SENSITIVE 1
156         * src/z80/gen.c (throughout): made all conditionals upper case
157         * support/regression/tests/bug1503067.c: new
158
159 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
160
161         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
162           (shiftIntoPair): added case 2 for PAIR_IY,
163           (setupToPreserveCarry): replaced parameters with iCode and check if
164            PAIR_DE is in use to fix bug 1399290,
165           (genPlus, genMinus): updated call to setupToPreserveCarry
166         * support/regression/tests/bug1399290.c: new
167
168 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
169
170         * device/lib/Makefile.in (Z80SOURCES): enabled float support
171         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
172         * src/ds390/gen.c (shiftRLong),
173         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
174         * src/mcs51/gen.c (sameReg): changed to sameByte,
175           (xch_a_aopGet): new,
176           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
177            shiftRLong): fixed bug 1533966
178         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
179           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
180         * support/regression/Makefile.in: disabled z80, enabled ucz80
181         * support/regression/tests/float_trans.c: enabled test for z80 and host
182         * support/regression/tests/shifts2.c: new, for testing bug 1533966
183
184 2006-08-01 Borut Razem <borut.razem AT siol.net>
185
186         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
187           comparison is always false due to limited range of data type
188           on PPC64 machine (openpower-linux1) where "char = unsigned char"
189
190 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
191
192         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
193         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
194         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
195         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
196
197 2006-07-31 Borut Razem <borut.razem AT siol.net>
198
199         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
200           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
201           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
202           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
203           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
204           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
205           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
206           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
207           enable ucsim mingw compilation. Serial port is disabled,
208           since it uses termios.h API, which is not available on native
209           WIN32
210
211 2006-07-31 Borut Razem <borut.razem AT siol.net>
212
213         * Small Device C Compiler 2.6.0 released
214         * support/scripts/sdcc.nsi: added FULL_DOC option
215         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
216
217 2006-07-28 Borut Razem <borut.razem AT siol.net>
218
219         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
220         * doc/INSTALL.txt: updated
221
222 2006-07-27 Borut Razem <borut.razem AT siol.net>
223
224         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
225           device/lib/pic/libdev/Makefile.in: fixed bug
226           [ 1438354 ] pic libsdcc: distclean doesn't work
227         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
228           device/lib/pic16/libio/Makefile.in: fixed bug
229           [ 1438344 ] pic16 lib: clean doesn't work properly
230         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
231
232 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
233
234         * device/lib/pic/libsdcc/fsdiv.c,
235         * device/lib/pic/libsdcc/fsmul.c,
236         * device/lib/pic16/libsdcc/float/fsdiv.c,
237         * device/lib/pic16/libsdcc/float/fsmul.c,
238         * device/lib/_fsdiv.c,
239         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
240         * support/regression/tests/bug1520966.c: added
241         * doc/knownbugs.html: removed [ 1520966 ] from the list
242
243 2006-07-25 Borut Razem <borut.razem AT siol.net>
244
245         * configure.in, configure, sdccconf_in.h: fixed bug
246           [ 1519095 ] regression test onebyte.c fails on ppc64 host
247         * doc/knownbugs.html: removed [ 1519095 ] from the list
248
249 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
250
251         * doc/knownbugs.html: added, contains list of known bugs at release
252         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
253
254 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
255
256         * device/include/mcs51/compiler.h: added SFRX for xdata based special
257           function registers and corrected defaults with additional warning
258         * device/lib/malloc.c: cosmetic changes
259         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
260         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
261           (fillGaps): and used it
262
263 2006-07-20 Raphael Neider <rneider AT web.de>
264
265         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
266           output unless SDCCPICDEBUG is set
267         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
268           output if SILENT is set
269
270 2006-07-11 Borut Razem <borut.razem AT siol.net>
271
272         * doc/README.txt: updated
273
274 2006-07-10 Borut Razem <borut.razem AT siol.net>
275
276         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
277           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
278           in WIN32 installation
279         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
280           release candidate 1
281
282 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
283
284         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
285         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
286
287 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
288
289         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
290
291 2006-07-06 Borut Razem <borut.razem AT siol.net>
292
293         * support/regression/tests/bitfields.c:
294           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
295         * support/regression/tests/constantRange.c:
296           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
297
298 2006-07-04 Borut Razem <borut.razem AT siol.net>
299
300         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
301           src/port.mk,
302           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
303           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
304           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
305           reverted changes from 2006-07-03
306         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
307         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
308           added CPPFLAGS, used by the host port
309
310 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
311
312         * support/regression/valdiag/tests/switch.c,
313         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
314         * support/regression/tests/libmullong.c: fixed for host
315         * support/regression/ports/host/spec.mk: disable all warnings for host,
316         SDCC runs with --less-pedantic too
317
318 2006-07-03 Borut Razem <borut.razem AT siol.net>
319
320         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
321           defined CPPFLAGS
322         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
323         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
324           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
325           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
326           include ../port.mk
327         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
328           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
329           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
330           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
331
332 2006-07-02 Raphael Neider <rneider AT web.de>
333
334         * src/pic16/devices.inc,
335         * device/include/pic16/pic18fregs.h,
336         * device/include/pic16/pic18f4550.h,
337         * device/lib/pic16/pics.all,
338         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
339
340 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
341
342         * as/hc08/lkaomf51.c (OutputName),
343         * as/mcs51/lkaomf51.c (OutputName),
344         * as/z80/asmain.c (asmbl),
345         * src/ds390/main.c (asmLineNodeFromLineNode),
346         * src/hc08/ralloc.c (hc08_assignRegisters),
347         * src/mcs51/main.c (asmLineNodeFromLineNode),
348         * src/xa51/ralloc.c (checkRegMask),
349         * src/xa51/gen.c (emitcode),
350         * src/z80/gen.c (_emit2),
351         * src/SDCCast.c (searchLitOp),
352         * src/SDCCglobl.h,
353         * support/packihx/packihx.c,
354         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
355         * src/ds390/gen.c (aopPutUsesAcc),
356         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
357         * support/regression/tests/libmullong.c (mullong_wrapper),
358         * src/SDCCsymt.c (powof2),
359         * src/SDCCast.c,
360         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
361         * src/SDCCsymt.h: added TYPE_TARGET_*
362         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
363         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
364         SDCCast because 1) header problems 2) this is the right place
365         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
366         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
367         prototype
368
369 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
370
371         * src/SDCCicode.h: removed buggy semicolon in unused macro
372         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
373         search for previous definiton of auto symbols too,
374         (findPrevUse): fixed logic of emitWarnings
375
376 2006-06-26 Raphael Neider <rneider AT web.de>
377
378         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
379           PCLATH and PCLATU on interrupts, potentially fixes #1505141
380
381 2006-06-25 Raphael Neider <rneider AT web.de>
382
383         * device/lib/pic/libm: NEW, added math library functions
384         * device/lib/pic/libsdcc: NEW; added float support functions
385         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
386         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
387           NEW, added math related headers
388         * device/include/asm/pic/features.h: NEW
389         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
390           (popGet): allow larger offsets for AOP_PCODE,
391           (genDataPointerSet): handle literals explicitly, more debug output,
392           (genAssign): fixed for float using aopLiteral ;-)
393         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
394           GOTO initialisation routine
395         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
396           flag on registers, fixes #1469043 (local variables do not work)
397         * src/pic/main.c (_pic14_do_link),
398         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
399           available
400
401 2006-06-25 Borut Razem <borut.razem AT siol.net>
402
403         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
404           characters printed (not including the trailing '\0' used to end
405           output to strings). Problem detected in regression test bug-927659.c.
406           NOTE: printf() family functions should return int instead
407           unsigned int!
408         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
409           specifier are printed as themselves
410         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
411           support flags, width and precision specifiers
412
413 2006-06-24 Borut Razem <borut.razem AT siol.net>
414
415         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
416           to the list of sdcc tagrets not supporting bit type
417         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
418           testfor pic16 due to bug:
419           [ 1511794 ] pic16: regression test bug-895992.c fails
420
421 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
422
423         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
424         * src/SDCCglue.c (initPointer), fixed bug 1496419
425         * support/regression/tests/bug1496419.c: new, added
426
427 2006-06-22 Borut Razem <borut.razem AT siol.net>
428
429         * support/regression/ports/pic16/support.c: use gpsim usart module from
430           libgpsim_modules library
431
432 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
433
434         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
435         IP0H to IPH0.
436
437 2006-06-19 Raphael Neider <rneider AT web.de>
438
439         * src/pic/glue.h,src/pic16/glue.h: added prototypes
440         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
441           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
442           (pic14printExterns,pic14printPublics,pic16printPublics,
443           pic16_printExterns): use new functions to emit symbols
444           (picglue,pic16glue): emit publics before emitting externs
445         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
446           locally defined functions to avoid bug #1443651
447         * support/regression/tests/bug-716242.c: removed pic16 workaround
448         * support/regression/ports/pic16/spec.mk: ignore errors during build
449
450 2006-06-19 Raphael Neider <rneider AT web.de>
451
452         * src/pic/glue.h: added pic14aopLiteral prototype
453         * src/pic/glue.c (pic14aopLiteral): return unsigned int
454         * src/pic/gen.c: removed stdint.h dependency
455           (aopGet): use Safe_strdup()
456           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
457           (genDataPointerSet): use pic14aopLiteral()
458         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
459           for pic16; thanks to Bernhard and Maarten
460
461 2006-06-18 Borut Razem <borut.razem AT siol.net>
462
463         * support/regression/tests/structflexarray.c: flexible array members
464           not supported by gcc < 3
465         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
466           GUI tool by default
467         * src/pic/gen.c: don't include [p]strdin.h on solaris
468         * support/Util/pstdint.h: addad svn attributes
469         * support/regression/tests/constantRange.c,
470           support/regression/tests/rotate.c: include inttypes.h instead
471           stdint.h on solaris, addad svn attributes
472
473 2006-06-18 Raphael Neider <rneider AT web.de>
474
475         * src/SDCCsymt.c (initCSupport): change return type of divschar to
476           int for PIC16
477         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
478           (pic16_genMinusBits): simplified sign-extension
479           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
480             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
481             adjusted to correctly handle mixed-signed operands, disabled
482             now unused multiplciation routines
483         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
484           (assignResultValue): added argument denoting the size of the result
485             as returned by the function (fixes upcasts in assigning from
486             function calls: char foo(); int i = foo();)
487           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
488             function result to assignResultValue
489           (genMult): disabled inlined multiplication code
490           (genDiv): augmented to also handle the modulus operator, fixed to
491             handle mixed-signed operands correctly
492           (genMod): simply call genDiv, disabled unused code
493           (genAssign): fixed missing (sign-)extension on result
494         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
495             valid char operands, allow signed operands for native code, added
496             division and modulo operator handling
497         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
498
499         As a consequence, onebyte.c (if split into two files) and muldiv.c
500         pass regression tests.
501
502 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
503
504         * doc/Makefile.in: two runs of makeindex seem needed to get
505         correct page references in the index of sdccman.pdf
506         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
507
508 2006-06-17 Borut Razem <borut.razem AT siol.net>
509
510         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
511
512 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
513
514         * doc/sdccman.lyx: updated, added (porting source code, debugging),
515         mentioned ec2drv and paulmon
516
517 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
518
519         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
520           consecutive abs areas
521           (find_empty_space, allocate_space): added map to handle codemap or
522            xdatamap,
523           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
524            absolute idata and xdata
525         * as/mcs51/lkmem.c (summary2): updated legend
526
527 2006-06-16 Raphael Neider <rneider AT web.de>
528
529         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
530
531 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
532
533         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
534           1208515
535         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
536
537 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
538
539         * src/port.h (struct PORT): added field gp_tags, to hold the tag
540         value of generic pointers,
541         * src/avr/main.c,
542           src/ds390/main.c,
543           src/hc08/main.c,
544           src/izt/i186.c,
545           src/izt/tlcs900h.c,
546           src/mcs51/main.c,
547           src/pic/main.c,
548           src/pic16/main.c,
549           src/xa51/main.c,
550           src/z80/main.c: PORT structure, added elements for gp_tags field,
551         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
552         fields in the PORT structure of each port,
553         * src/SDCCast.c (decorateType): allow processing of generic pointers
554         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
555         S_FIXED symbols
556
557 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
558
559         * link/z80/lkgb.c,
560         * link/z80/lkgg.c,
561         * src/pic16/gen.c,
562         * src/pic16/main.c,
563         * src/pic16/pcode.c,
564         * src/pic/main.c,
565         * src/pic/pcoderegs.c,
566         * src/SDCCicode.c,
567         * src/SDCCmain.c,
568         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
569           bug 1504689 on minGW
570
571 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
572
573         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
574
575 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
576
577         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
578
579 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
580
581         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
582           for optimization
583
584 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
585
586         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
587         to a char variable. Fixed bug #1504211
588         * device/include/pic16/adc.h,
589         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
590         and fixed bug #1364390
591
592 2006-06-10 Borut Razem <borut.razem AT siol.net>
593
594         * CVSROOT: removed the CVS left-over
595
596 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
597
598         * as/hc08/asmain.c (asexit),
599         * as/hc08/lkmain.c (lkexit),
600         * as/mcs51/asmain.c (asexit),
601         * as/mcs51/lkmain.c (lkexit),
602         * src/SDCCglue.c (DEFSETFUNC),
603         * src/SDCCmain.c (linkEdit, assemble),
604         * support/librarian/sdcclib.c (AddRel),
605           replaced unlink() by standard C remove()
606         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
607         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
608           gatherImplicitVariables): new, added to fix bug 608752,
609           (createFunction): added gatherImplicitVariables()
610         * src/SDCCast.h: added createRMW prototype
611         * src/SDCCsymt.h (struct symbol): added infertype
612         * support/regression/tests/bug608752.c: new, added
613
614 2006-06-10 Raphael Neider <rneider AT web.de>
615
616         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
617           multibyte dummy reads (fixes #1503234)
618
619 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
620
621         * device/include/mcs51/compiler.h: new, added header file to enable
622           creating common sfr definition header files for different compilers
623
624 2006-06-05 Raphael Neider <rneider AT web.de>
625
626         * src/pic16/{pcode.h,genarith.c}:
627           introduced pCodeOp combining any two pCodeOps (previously only
628           two register operands could be combined), removed pcop2 from
629           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
630         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
631         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
632           rewritten to use new PO_TWO_OPS
633         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
634         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
635           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
636           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
637           (pic16_get_op): embraced return arg to allow #define return(x),
638             added new case for combined opcodes
639           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
640           (pic16_pCode2str,pic16_getRegFrompCodeOp,
641            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
642
643 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
644
645         * src/SDCCval.c (checkConstantRange): added
646         * src/SDCCval.h: added checkConstantRange
647         * support/Util/SDCCerr.c,
648         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
649         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
650         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
651         * src/SDCCast.c (decorateType): added checkConstantRange,
652         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
653         can be emitted with the correct always true/false warning,
654         added optimization for double '!';
655         result of decorateType() must be assigned back to the tree, because
656         decorateType() can change the tree
657         * src/SDCCicode.c (geniCodeLogic),
658         (geniCodeAssign): replaced new checkConstantRange, added warnings,
659         (checkConstantRange): removed, it was only a fragment which never
660         emitted a warning
661         * src/SDCCsymt.c (computeType): fixed promotion for
662         "-1 < (unsigned bit) b"
663         * src/pic/ralloc.c (packRegsForAssign),
664         * src/pic16/ralloc.c (packRegsForAssign),
665         * src/hc08/ralloc.c (packRegsForAssign),
666         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
667         from mcs51
668         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
669         * support/regression/tests/constantRange.c: added
670         * support/valdiag/tests/constantRange.c: added
671         * support/valdiag/valdiag.py: added -DPORT_HOST=1
672
673 2006-06-02 Borut Razem <borut.razem AT siol.net>
674
675         * support/regression/ports/pic16/support.c: increase stack size
676           to 255 bytes
677         * support/regression/Makefile.in: sort tests by name so that the
678           resutlts can be compared on different machines / platforms
679
680 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
681
682         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
683         * src/ds390/gen.c (emitLabel): new, added,
684           (genDjnz): fixed stack overflow bug,
685           (throughout): cosmetic changes to sync with mcs51/gen.c,
686           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
687         * src/mcs51/gen.c (genEndFunction): small optimization,
688           (throughout): cosmetic changes to sync with ds390/gen.c
689
690 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
691
692         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
693           (_print_format): fixed printing pointers
694         * src/mcs51/gen.c (emitLabel, movb): new, added,
695           (genAssign): small optimization,
696           (genDjnz): fixed stack overflow bug,
697           (throughout): replaced sprintf with SNPRINTF,
698           replaced mcs51_regWithIdx with REG_WITH_INDEX,
699           replaced emitcode("mov", "b,...") with MOVB(...),
700           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
701           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
702         * src/mcs51/peeph.def: added rules 140 and 264
703         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
704           so they may get optimized into registers
705
706 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
707
708         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
709           immediately when encountered,
710           (printUsage): always use stderr even on windows
711
712 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
713
714         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
715         (processParms): fixed bug #1247551
716         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
717         parseCmdLine, main): print '--version' to stdout,
718         print 'help' to stdout if --help is given,
719         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
720         arguments are given; fixed --help
721
722 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
723
724         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
725         * support/regression/tests/bug-1493710.c: added
726
727 2006-05-27 Borut Razem <borut.razem AT siol.net>
728
729         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
730           static instead auto
731         * support/regression/ports/pic16/support.c: increase stack size
732           from default 64 bytes to 128 bytes
733         * support/regression/tests/staticinit.c,
734           support/regression/tests/float.c: regression tests fully enabled
735           for pic16 port by putting the initialized data arrays into the code
736           section
737         * support/regression/ports/pic16/spec.mk: don't link default libraries.
738           This was changed by mistake in the previous version.
739
740 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
741
742         * src/pic16/gen.c (genFunction, genEndFunction): some
743         beautifications, fixed bug with falsely restoring FSR2 in large
744         stack model, thanks to Beau E. Cox for reporting the bug
745
746 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
747
748         * debugger/mcs51/break.c,
749         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
750           use %p to print pointers, made address variables unsigned
751         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
752         * debugger/mcs51/symtab.c (parseSymbol): must return something
753         * src/mcs51/gen.c (aopForSym): small optimization,
754            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
755           (freeAsmop): added missing break,
756           (aopPut): removed parameter bvolatile, determine it inside the function,
757           (saveRegisters, unsaveRegisters): small optimization,
758           (genIpush): removed pointless check,
759           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
760           replaced sprintf with SNPRINTF,
761           replaced strcpy with strncpyz,
762           updated aopPut calls,
763           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
764         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
765
766 2006-05-24 Borut Razem <borut.razem AT siol.net>
767
768         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
769           modification of test for the pic16 port, put the array to the code
770           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
771
772 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
773
774         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
775         * support/Util/pstdint.h: added
776
777 2006-05-22 Borut Razem <borut.razem AT siol.net>
778
779         * src/regression/Makefile: removed bool2.c test, added -q linker option
780         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
781           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
782           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
783           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
784           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
785           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
786           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
787           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
788           define SUPPORT_BIT_TYPES 0, removed unused bit variables
789
790 2006-05-22 Raphael Neider <rneider AT web.de>
791
792         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
793           bug #1492360 (problematic due to generic pointers, see code)
794
795 2006-05-22 Borut Razem <borut.razem AT siol.net>
796
797         * support/regression/ports/pic16/specs.mk: removed stack size linker
798           directive
799         * support/regression/tests/array.c,
800           support/regression/tests/bitopcse.c,
801           support/regression/tests/bug-908454.c,
802           support/regression/tests/malloc.c: modified for pic16 regression test
803         * support/regression/tests/bitfields.c:
804           pic16 - excluded bitfileds of size > 8
805         * support/regression/tests/bp.c: pic16 - reduced data size
806         * support/regression/tests/bug-221100.c: pic16 - reduced data size
807         * support/regression/tests/bug-460010.c:
808           pic16 - used the absolute address the fits in memory
809         * support/regression/tests/bug-716242.c:
810           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
811         * support/regression/tests/float.c:
812           pic16 - excluded - data size too big
813         * support/regression/tests/onebyte.c:
814           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
815         * support/regression/tests/shifts.c:
816           pic16 - function names probably have to differ in first X characters
817           (gpasm limitation?)
818         * support/regression/tests/staticinit.c:
819           pic16 - excluded some tests due error: no target memory available for
820           section ".idata"
821
822 2006-05-22 Borut Razem <borut.razem AT siol.net>
823
824         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
825           second try. Thanks Stas Sergeev once more.
826
827 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
828
829         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
830           (genLeftShift, genRightShift): fixed bug 1491627
831         * src/hc08/peeph.def (rules 7, 8.x): added
832         * support/regression/tests/shifts.c (ShiftLeftByParam,
833           ShiftRightByParam, testShiftByParam): added to test variable shifting
834
835 2006-05-20 Raphael Neider <rneider AT web.de>
836
837         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
838         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
839           (allocReg): add only new registers to dynAllocRegs,
840           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
841             #1489055, #1445850, and probably #1483693
842
843 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
844
845         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
846         bug in for-loop that didn't emit the last of CONFIG and ID registers
847
848 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
849
850         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
851           with offset
852         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
853           1489016, 1434401 and 1490124
854         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
855           1489016, 1434401 and 1490124
856
857 2006-05-17 Borut Razem <borut.razem AT siol.net>
858
859         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
860           thanks Stas Sergeev
861
862 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
863
864         * device/include/mcs51/P89c51RD2.h,
865         * device/include/mcs51/P89LPC901.h,
866         * device/include/mcs51/P89LPC922.h,
867         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
868
869 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
870
871         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
872         to fix missing stack pragma in compiled binary object file,
873
874 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
875
876         * support/packihx/configure.in,
877         * support/packihx/configure: removed warning, autoconf >= 2.5x can
878         determine sizeof basic types even while cross compiling
879
880 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
881
882         * src/avr/gen.c (aopop),
883         * src/ds390/gen.c (aopOp),
884         * src/hc08/gen.c (aopOp),
885         * src/mcs51/gen.c (aopop),
886         * src/pic16/gen.c (pic16_aopOp),
887         * src/pic/gen.c (aopOp),
888         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
889         if size of operand is smaller than spill location
890
891 2006-05-12 Borut Razem <borut.razem AT siol.net>
892
893         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
894           have to have CR/LF line endings even if they are checked out on *nix
895           or on WIN32 in cygwin binmode
896
897 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
898
899         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
900         * device/include/ds80c390.h: added sfr16 definitions
901         * src/ds390/gen.c,
902         * src/ds390/gen.h,
903         * src/ds390/main.c,
904         * src/ds390/ralloc.c,
905         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
906           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
907           bit returning functions
908         * support/regression/tests/sfr16.c: enabled test on ds390
909
910 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
911
912         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
913         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
914
915 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
916
917         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
918         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
919           (cl_address_space constructor): removed expensive initialization,
920           (cl_address_space::get_cell): extended for late initialization,
921           (cl_address_space::*): use late initialization,
922           (cl_address_decoder::activate): removed expensive initialization,
923           This reduced regression test running time by 25%
924
925 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
926
927         * packihx/,
928         * configure.in,
929         * configure,
930         * sdcc.dsw,
931         * Makefile.bcc,
932         * Makefile.in,
933         * support/packihx/Makefile.in,
934         * support/packihx/clean.mk,
935         * support/packihx/Makefile.bcc,
936         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
937
938 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
939
940         * src/SDCCval.c (valNot): fix for regression test failure
941           of not.c on big endian hosts
942
943 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
944
945         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
946
947 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
948
949         * device/lib/mcs51/Makefile.in: changed string comparison operator
950           to = for POSIX compliance; == is bash extension
951
952 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
953
954         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
955           kosmonaut_pirx
956
957 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
958
959         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
960         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
961         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
962         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
963         bug report #1478657,
964
965 2006-05-05 Borut Razem <borut.razem AT siol.net>
966
967         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
968           making the html
969
970 2006-05-02 Borut Razem <borut.razem AT siol.net>
971
972         * doc/Makefile.in: removed *.ind dependency since there is no rule to
973           create *.ind, which made make to fail if invoked with -j 2
974
975 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
976
977         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
978           Hubert Sack for patch 1479782
979
980 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
981
982         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
983
984 2006-05-01 Raphael Neider <rneider AT web.de>
985
986         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
987           (create_pic): store only prefix-free device name,
988           (init_pic): check for device names with "16" prefix,
989           (list_valid_pics),
990         * src/pic/device.h (struct PIC_device),
991         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
992             stored device name,
993         * device/include/pic/pic12f{635,675,629,683}.h,
994         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
995         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
996         * device/include/pic/pic16f505.h,
997         * device/lib/pic/libdev/pic16f505.c: removed
998         * device/include/pic/pic14devices.txt: added support for pic12f
999             devices, removed unsupported non 16-bit devices
1000             [above changes provided by patch from Zik Saleeba]
1001         * src/pic/*, src/pic16/*, device/include/pic16/*,
1002           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
1003
1004 2006-05-01 Borut Razem <borut.razem AT siol.net>
1005
1006         * configure.in, configure, doc/Makefile.in:
1007           sync with nightly build makefile - latex, dvipdf and dvips
1008           not needed any more
1009
1010 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
1011
1012         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
1013         in the library source
1014
1015 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
1016
1017         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
1018
1019 2006-04-28 Raphael Neider <rneider AT web.de>
1020
1021         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
1022         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
1023           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
1024         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
1025
1026 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
1027
1028         * device/lib/pic/libdev/Makefile.in,
1029         * device/lib/hc08/Makefile.in,
1030         * device/lib/gbz80/Makefile.in,
1031         * device/lib/z80/Makefile.in,
1032         * device/lib/ds390/Makefile.in,
1033         * device/lib/ds400/Makefile.in: added srcdir to include search path,
1034         thanks to Borut for the bug report
1035         * configure.in,
1036         * configure: always create doc/Makefile independent from --enable-doc
1037         * Makefile.in: always install from directory doc independent from
1038         --enable-doc
1039         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
1040         removed
1041         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
1042         * doc/Makefile.in: install *.txt if present
1043         * device/include/Makefile.in (install): added installation of pic/*.inc
1044         and pic/*.txt files again, they were erroneously removed
1045
1046 2006-04-28 Raphael Neider <rneider AT web.de>
1047
1048         * src/pic/{gen.c,main.h,pcode.c},
1049         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
1050             concerning signedness with casts
1051
1052 2006-04-28 Raphael Neider <rneider AT web.de>
1053
1054         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
1055             definition of an interrupt handler,
1056         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
1057             interrupt handler stuff from picglue() to separate routine,
1058           (picglue): enabled definition of intr handlers in files w/o main()
1059
1060 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1061
1062         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
1063           compilation with MSVC 2005 Express Edition (VC8)
1064
1065 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
1066
1067         * device/lib/Makefile: fixed build of gbz80 lib
1068
1069 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1070
1071         * support/regression/tests/bug-460010.c,
1072         * support/regression/tests/bug-524691.c,
1073         * support/regression/tests/bug-716242.c: removed conditional defines
1074           that are already in testfwk.h
1075
1076 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1077
1078         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
1079           (AccAXRsh1): added, shift right by 1,
1080           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
1081            AccAXLrl1
1082         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
1083
1084 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
1085
1086         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
1087         remove cast to same type
1088         * src/SDCCast.c (decorateType): fix for RFE 1475742,
1089         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
1090         * as/z80/Makefile,
1091         * link/z80/Makefile: removed, they have moved to
1092         Makefile.in files
1093         * configure,
1094         * configure.in: replaced duplicate message about ucsim by missing sdcpp
1095         * install-sh: fix bug #1204398 by setting umask 0022
1096         * device/lib/Makefile: separate build of z80 and gbz80 lib
1097
1098 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
1099
1100         Enabled VPATH feature: changed nearly all Makefiles (149 files).
1101         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
1102
1103         One basic decision: e.g. src/clean.mk includes further files. In order
1104         to make this work there are two solutions:
1105         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
1106           run configure on them. This way they can use
1107           'include $(srcdir)/port-clean.mk'
1108         - always include clean.mk by the Makefile at the same level. To avoid
1109           that `make clean` tries to include and build Makefile.dep the
1110           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
1111           implemented, because now even `make uninstall` doesn't create
1112           Makefile.in. clean.mk could be eliminated by pasting it in
1113           Makefile.in.
1114
1115         * debugger/mcs51/Makefile.in: build own objects from library sources
1116         (SLIB, SDCC) in current directory
1117
1118         * configure, configure.in: renamed --disable-device-lib-build in
1119         --disable-device-lib; added --enable-doc, the required tools are
1120         searched by configure; added result message; the toolchain for the
1121         belonging ports are now only built, if the port is enabled.
1122
1123         * support/regression/*: all output is written in directory gen, because
1124         the fwk and ports directories don't livet in the build tree using vpath
1125
1126         * doc/sdccman.lyx: renamed --disable-device-lib-build to
1127         --disable-device-lib, added --enable-doc, added section VPATH
1128
1129         * sim/ucsim/configure.in,
1130         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
1131         z80 are enabled by default
1132
1133 2006-04-24 Raphael Neider <rneider AT web.de>
1134
1135         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
1136             to config word, "pic14_"-prefixed some extern functions
1137           (pic14_emitConfigWord): emit __config directive(s) if assignment to
1138             config word has been found
1139         * src/pic/device.h: added prototypes
1140         * src/pic/pcode.c: added "pic14_"-prefix where needed
1141         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
1142             fixup
1143         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
1144             words,
1145           (pic14emitRegularMap): ignore config words,
1146           (pic14createInterruptVect): moved generating __config directives away
1147           (picglue): have __config directives emitted
1148
1149 2006-04-24 Borut Razem <borut.razem AT siol.net>
1150
1151         * doc/Makefile: sync with nightly build makefile
1152
1153 2006-04-24 Raphael Neider <rneider AT web.de>
1154
1155         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
1156             registers that have not been assigned proper liveranges,
1157             fixes #1469504 and #1474602,
1158           (pCodeRegOptimizeRegUsage): fixed typo in comment
1159
1160 2006-04-24 Borut Razem <borut.razem AT siol.net>
1161
1162         * device/examples/main8051.c: deleted - it was removed from CVS
1163           24.mar.2000 and after that modified 18.feb.2001, so it reappered
1164           after the transition to Subversion
1165         * src/SDCCalloc.h: deleted - it was removed  from CVS
1166           3.feb.2001 and after that modified 18.feb.2001, so it reappered
1167           after the transition to Subversion
1168         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
1169           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
1170           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
1171           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
1172
1173 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
1174
1175         * as/asx8051.dsp: added mcs51/strcmpi.h
1176         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
1177         * as/hc08/aslink.h: updated lnksect prototype
1178         * as/hc08/asm.h,
1179         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
1180         * as/hc08/asmain.c,
1181         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
1182           (newdot): handle A_ABS
1183         * as/hc08/asout.c,
1184         * as/mcs51/asout.c (outarea): output address
1185         * as/hc08/lkaomf51.c,
1186         * as/mcs51/lkaomf51.c: disabled unused array UsageType
1187         * as/hc08/m08pst.c,
1188         * as/mcs51/i51pst.c,
1189         * as/z80/z80pst.c: "ABS" is not A_OVR
1190         * as/hc08/lkarea.c (newarea): read a_addr,
1191           (lnkarea): added codemap array, sort absolute areas to the front,
1192            combine all GSINITx/GSFINAL,
1193           (find_empty_space, allocate_space): new functions,
1194           (lnksect): return next address, handle absolute sections
1195         * as/mcs51/lkarea.c (newarea): read a_addr,
1196           lnksect2 prototype changed,
1197           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
1198           (find_empty_space, allocate_space): new, factored out of lnksect2,
1199           (lnksect2): return next address, handle absolute sections
1200         * as/hc08/lkhead.c,
1201         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
1202         * as/hc08/lklibr.c (addfile, fndsym),
1203         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
1204           index out of range and detect both '\' and '/'
1205         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
1206         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
1207           regression tests (ds390 cannot return bool yet)
1208         * doc/sdccman.lyx: changed version number, document changed --no-peep,
1209           document critical interrupts on z80, document changed SDCC define
1210         * src/asm.c (_asxxxx_mapping): fixed .org directive,
1211           (_a390_mapping): added .org directive
1212         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
1213           (genMultOneByte): fixed warnings
1214         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
1215           ones
1216         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
1217         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
1218           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
1219         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
1220         * src/pic16/main.c: removed newReg prototype
1221         * src/pic16/pcode.c,
1222         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
1223           warnings
1224         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
1225           ones
1226         * src/pic16/ralloc.c
1227         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
1228           to fix warnings
1229         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
1230           from short to PIC_OPTYPE
1231         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
1232         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
1233           optype from short to PIC_OPTYPE
1234         * src/port.h: made int_size unsigned to fix warnings
1235         * src/SDCC.y: fixed warning on MSVC
1236         * src/SDCCicode.c (getArraySizePtr): return unsigned int
1237         * src/SDCCopt.c (convertToFcall): fixed warnings
1238         * src/SDCCsymt.h: removed double prototype for genSymName
1239         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
1240           offset int to fix warnings
1241
1242 2006-04-22 Borut Razem <borut.razem AT siol.net>
1243
1244         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1245           references to CVS replaced with Subversion
1246
1247 2006-04-21 Borut Razem <borut.razem AT siol.net>
1248
1249         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1250           references to CVS replaced with Subversion
1251
1252 2006-04-19 Borut Razem <borut.razem AT siol.net>
1253
1254         * src/version.awk: adapted for svn
1255         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
1256           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
1257           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
1258           /binutils-avr/etc/*.vi, *.jin: removed all properties
1259           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
1260
1261 2006-04-19 Borut Razem <borut.razem AT siol.net>
1262
1263         * CVS to Subversion migration completed
1264
1265 2006-04-18 Borut Razem <borut.razem AT siol.net>
1266
1267         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
1268           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
1269
1270 2006-04-17 Borut Razem <borut.razem AT siol.net>
1271
1272         * device/include/Makefile.in: added pic/*.inc to the installation
1273
1274 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
1275
1276         * support/regression/collate-results.py: fixed output in case of
1277         a valdiag error
1278         * support/regression/generate-cases.py: fixed splitting of pathnames
1279         with dots
1280         * as/hc08/lklibr.c (addfile),
1281         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
1282
1283 2006-04-11 Raphael Neider <rneider AT web.de>
1284
1285         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
1286         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
1287         * src/pic16/pcode.c (assignValnums): fixed #1460578
1288
1289 2006-04-11 Raphael Neider <rneider AT web.de>
1290
1291         * device/lib/pic/libdev/*.c,
1292         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
1293           fixes #1468739, enables compilation in --std-c99 mode
1294         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
1295
1296 2006-04-11 Raphael Neider <rneider AT web.de>
1297
1298         * src/pic/device.c (find_device): removed debug output
1299           (list_valid_pics): enabled verbose listing of supported devices
1300         * device/include/stdbool.h: define bool as char for pic14/16 as well
1301
1302 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1303
1304         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
1305
1306 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1307
1308         * .version: bumped version to 2.5.6
1309         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
1310
1311 2006-04-06 Raphael Neider <rneider AT web.de>
1312
1313         * .version: bumped version to 2.5.6 (pic14 ABI changed)
1314         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
1315         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
1316           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
1317             pic14_constructAbsMap
1318           (pic14printPublics): declare absolute global symbols as global
1319           (pic14createInterruptVect),
1320         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
1321           (newReg): assume new registers unused, use correct name in
1322             hashtable (reg->name instead of name), more debugLog output
1323         * src/pic/device.h (PIC_device): added fields for verbose output
1324         * src/pic/device.c: moved device definition to pic14devices.txt,
1325             added routines for runtime parsing of pic14devices.txt,
1326             added support for second config word
1327         * src/pic/main.c (_process_pragma): removed #pragma maxram,
1328           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
1329           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
1330           (_pic14_parseOptions): moved pCodeInitRegisters here
1331           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
1332         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
1333           (pCodeInitRegisters): rewrapped comments, perpared new approach to
1334             handling the pseudo stack
1335         * device/lib/Makefile.in: ignore failures in objects-pic16,
1336         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
1337         * device/lib/pic/NEWS: document new dependency on picXXX.lib
1338         * device/lib/pic/Makefile.subdir,
1339         * device/lib/pic16/Makefile.subdir: improved clean rules
1340         * device/lib/pic/libdev/: NEW, pic14 device libraries
1341         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
1342         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
1343         * device/include/Makefile.in: create subdir and install pic14 headers
1344         * device/include/pic/p16f_common.inc: removed unused declarations
1345         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
1346             PICs from inc2h.pl v1.6,
1347             replaced BIT_AT macros with struct declarations
1348         * device/include/pic/pic14devices.txt: definition of supported devices,
1349             all above improvements contributed by Zik Saleeba, thanks
1350         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
1351         * support/scripts/sdcc.nsi: also install pic14 device libraries and
1352             headers
1353
1354 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1355
1356         * device/include/mcs51/c8051f410.h: added interrupt numbers,
1357         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
1358           thanks to Charles Olds
1359
1360 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1361
1362         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
1363
1364 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1365
1366         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
1367         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
1368         * support/regression/bug1464657.c: added, new test
1369
1370 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1371
1372         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
1373           version number
1374
1375 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1376
1377         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
1378           --no-peep and --peep-file <file> are used don't use default rules but
1379           do use the <file>
1380
1381 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1382
1383         * src/mcs51/gen.c (genCall): fixed bug 1457608
1384
1385 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1386
1387         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1388         changes seem to cause (trigger?) problems with the build system.
1389
1390 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1391
1392         * src/SDCCpeeph.c (operandsLiteral): new, added,
1393           (callFuncByName): inserted operandsLiteral
1394         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1395
1396 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1397
1398         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1399         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1400
1401 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1402
1403         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1404           implemented patch 1120823 Thanks to Willy De la Court (normal
1405           interrupts need an interrupt number now if they are made critical),
1406           and enabled nesting of critical functions though not for gbz80
1407           (genCritical, genEndCritical): added functions
1408           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1409         * src/z80/mappings.i: added "ei" to all mappings
1410
1411 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1412
1413         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1414         submitted by the Debian SDCC maintainer Aurelien Jarno:
1415         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1416         archive with gcc 4.1 on mips and wrote the patch"
1417
1418 2006-03-16 Raphael Neider <rneider AT web.de>
1419
1420         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1421           the left operand is shorter than the result (c* = lit-c* + int),
1422           fixes bug #1450796
1423         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1424           OP_SYMBOL
1425
1426 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1427
1428         * src/.version: increased version number to 2.5.5
1429         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1430         linking is done manually in pic16 port's _linkEdit,
1431         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1432         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1433         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1434         allocate asmop as AOP_ACC,
1435         (aopForRemat): added parameter 'bool result' in function declaration,
1436         (pic16_aopGet): return AOP_ACC when accessing WREG,
1437         (pic16_popGetTempReg): minor modification,
1438         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1439         'pic16_allocWithIdx',
1440         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1441         calling function in absolute addresses,
1442         (genAssign): take into account AOP_ACC asmop,
1443         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1444         * src/pic16/pcoderegs.c: some debug functions and lines added,
1445         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1446         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1447         register too,
1448         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1449         call to allocReg, not by manually allocating a new one,
1450         (pic16_assignRegisters): now before going through the register
1451         allocating functions mark all registers as free. This eliminates some
1452         side effects resulting from peephole parser done earlier in the backbone
1453
1454 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1455
1456         * src/SDCCicode.c (geniCodeLogic),
1457         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1458
1459 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1460
1461         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1462           (genSend): bugfix, do not allocate and free twice,
1463           (shiftRLong): handle partially overlapping aops
1464         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1465
1466 2006-03-08 Borut Razem <borut.razem AT siol.net>
1467
1468         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1469           for pic16
1470
1471 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1472
1473         * support/regression/tests/bug1409955.c: new, added
1474         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1475         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1476           (aopForSym, aopOp): increment asmop.allocated if reused,
1477           (freeAsmop): decrement asmop.allocated and check for zero instead of
1478           using asmop.freed,
1479           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1480           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1481            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1482            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1483            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1484            genSignedRightShift, genRightShift, genDataPointerGet,
1485            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1486            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1487             in reverse order from allocation,
1488           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1489             added swappedLR to keep track
1490         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1491           pdata & code for GCC, z80, gbz80 & hc08
1492         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1493
1494 2006-03-08 Raphael Neider <rneider AT web.de>
1495
1496         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1497
1498 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1499
1500         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1501         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1502         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1503
1504 2006-03-06 Borut Razem <borut.razem AT siol.net>
1505
1506         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1507           made the linker quiet
1508
1509 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1510
1511         * src/pic16/gen.c (genPcall): fixed bug #1443644
1512         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1513         which dumps before the function entry point a data byte which represents
1514         the number of the local variables used by the specified function, added
1515         'xinst' for initial support for Extended Instruction Support,
1516         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1517         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1518         port->fun_prefix anymore (may change later),
1519         (genFunction, genEndFunction): do not store/restore local registers for
1520         _main (this should take care the --main-return command line option in
1521         the future),
1522         (genOr): removed some legacy pic-port instructions,
1523         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1524         performing operations with SFR's causes data to be written more than
1525         once to each SFR. Perhaps SFRs should be handled in special cases...
1526         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1527         pcode.h
1528         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1529         into account for stack starting position,
1530         (struct OPTIONS pic16_optionsTable): added command line argument
1531         --extended or -y for Extended Instruction Support,
1532         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1533         (deassignLRs): *** perhaps the most important change, old 'for' code
1534         (commented out for reference), didn't account for some registers which
1535         were left marked 'not free' after a pointer operation. The change
1536         reduces register usage a lot in some cases
1537
1538 2006-03-04 Borut Razem <borut.razem AT siol.net>
1539
1540         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1541           _clean
1542         * support/regression/tests/bug-524697.c: decreased array size for
1543           mcs51 to fit into the internal RAM
1544         * support/regression/Makefile.in: a little bit more verbose
1545
1546 2006-03-03 Borut Razem <borut.razem AT siol.net>
1547
1548         * support/regression/fwk/lib/testfwk.c,
1549           support/regression/fwk/include/testfwk.h: introduced function
1550           _prints(), nonrecursive _printn(), call _initEmu() from main()
1551         * support/regression/ports/gbz80/support.asm,
1552           support/regression/ports/ucz80/support.asm,
1553           support/regression/ports/z80/support.asm,
1554           support/regression/ports/ds390/support.c,
1555           support/regression/ports/hc08/support.c,
1556           support/regression/ports/host/support.c,
1557           support/regression/ports/mcs51/support.c,
1558           support/regression/ports/xa51/support.c: added empty _initEmu()
1559           function
1560         * support/regression/ports/pic16/gpsim.cmd,
1561           support/regression/ports/pic16/spec.mk,
1562           support/regression/ports/pic16/support.c,
1563           support/regression/Makefile.in: added pic16 regression test
1564
1565 2006-03-01 Raphael Neider <rneider AT web.de>
1566
1567         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1568           genConstPointerGet): use safe way of generating MOVFF to cover
1569             literals as well as registers, fixes bug #1440527
1570         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1571             dereference
1572           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1573             more correctly, fixes bug #1232186
1574           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1575         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1576             gplink guess the correct processor in more cases, applied patch
1577             from Till Riedel attached to and fixing bug #1436552
1578
1579 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1580
1581         * support/regression/tests/array.c: added, contains check for #1434401
1582         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1583
1584 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1585
1586         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1587         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1588         * device/include/mcs51/c8051f326.h,
1589         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1590         * device/include/mcs51/c8051f000.h,
1591         * device/include/mcs51/c8051f018.h,
1592         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1593           PCON_IDLE,PCON_STOP and added sfr16 definitions
1594
1595 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1596
1597         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1598           genGetWord): fixed bug 1409955
1599
1600 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1601
1602         * device/include/hc08/mc68hc908gp32.h,
1603         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1604
1605 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1606
1607         * src/SDCCast.c (constExprValue): return NULL if not a value
1608         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1609         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1610         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1611
1612 2006-02-13 Borut Razem <borut.razem AT siol.net>
1613
1614         * src/regression/ptrarg.c: added, fails due to bug #1430967
1615         * src/regression/Makefile: ptrarg.c added, ...
1616
1617 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1618
1619         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1620         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1621
1622 2006-02-11 Borut Razem <borut.razem AT siol.net>
1623
1624         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1625           print "Processor: xxx" message to stdout only if --verbose
1626
1627 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1628
1629         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1630         * support/regression/tests/bug1426356.c: added
1631         * support/regression/tests/bitfields.c: removed 2 tests
1632
1633 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1634
1635         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1636         * device/include/mcs51/c8051f330.h,
1637         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1638           PCON_IDLE,PCON_STOP and added sfr16 definitions
1639         * device/lib/_divsint.c,
1640         * device/lib/_divuint.c,
1641         * device/lib/_divulong.c,
1642         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1643           register bank bug for small stackauto
1644
1645 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1646
1647         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1648
1649 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1650
1651         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1652         * all.dsp: corrected several bin paths
1653         * device/include/mcs51/c8051f120.h,
1654         * device/include/mcs51/c8051f300.h,
1655         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1656           to PCON_IDLE,PCON_STOP
1657         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1658         * device/lib/printf_large.c (output_float): fixed bug 1388703
1659         * support/regression/tests/bug1057979.c: added test for bug 1388703
1660
1661 2006-02-08 Raphael Neider <rneider AT web.de>
1662
1663         * src/pic/pcode.c (pciTRIS): fixed typo,
1664           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1665           (LinkFlow): fixed handling of flows that end in a call,
1666           (ReuseReg): perform safety check earlier
1667         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1668             to work with flows at the beginning of a pBlock,
1669             fixes #1426557 (Symbol not previously defined),
1670           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1671             usage information
1672           (RemoveUnusedRegisters): update register usage info
1673         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1674             created, reuse existing ones instead
1675         * src/pic/gen.c (genPcall): fixed #1424719
1676
1677 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1678
1679         * link/z80/lkmain.c,
1680         * link/z80/lklex.c,
1681         * link/z80/lkdata.c,
1682         * link/z80/aslink.h: fixed build on current cygwin:
1683         replaced getline() by lk_getline()
1684
1685 2006-02-01 Borut Razem <borut.razem AT siol.net>
1686
1687         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1688           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1689           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1690           src/regression/bool1.c, src/regression/bool2.c,
1691           src/regression/bool3.c, src/regression/call1.c,
1692           src/regression/compare.c, src/regression/compare10.c,
1693           src/regression/compare2.c, src/regression/compare3.c,
1694           src/regression/compare4.c, src/regression/compare5.c,
1695           src/regression/compare6.c, src/regression/compare7.c,
1696           src/regression/compare8.c, src/regression/compare9.c,
1697           src/regression/configword.c, src/regression/for.c,
1698           src/regression/inline.c, src/regression/mult1.c,
1699           src/regression/nestfor.c, src/regression/or1.c,
1700           src/regression/pointer1.c, src/regression/ptrfunc.c,
1701           src/regression/rotate1.c, src/regression/rotate2.c,
1702           src/regression/rotate3.c, src/regression/rotate4.c,
1703           src/regression/rotate5.c, src/regression/rotate6.c,
1704           src/regression/rotate7.c, src/regression/string1.c,
1705           src/regression/struct1.c, src/regression/sub.c,
1706           src/regression/sub2.c, src/regression/switch1.c,
1707           src/regression/while.c, src/regression/xor.c,
1708           src/regression/create_stc, src/regression/simulate,
1709           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1710           regression tests
1711         * src/regression/gpsim_assert.h: added
1712
1713 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1714
1715         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1716         ((void (code *) (void)) 0) ();
1717         * as/hc08/aslex.c,
1718         * as/hc08/aslink.h,
1719         * as/hc08/asm.h,
1720         * as/hc08/asmain.c,
1721         * as/hc08/lkdata.c,
1722         * as/hc08/lklex.c,
1723         * as/hc08/lkmain.c,
1724         * as/mcs51/aslex.c,
1725         * as/mcs51/aslink.h,
1726         * as/mcs51/asm.h,
1727         * as/mcs51/asmain.c,
1728         * as/mcs51/lkdata.c,
1729         * as/mcs51/lklex.c,
1730         * as/mcs51/lkmain.c,
1731         * as/z80/aslex.c,
1732         * as/z80/asm.h,
1733         * as/z80/asmain.c: fixed build on current cygwin:
1734         replaced getline() by as_getline()
1735
1736 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1737
1738         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1739         declarator in the symbol chain
1740         * src/SDCCsymt.h,
1741         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1742         parameter list for function pointers
1743         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1744         * support/regression/tests/bug-716242.c: added
1745
1746 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1747
1748         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1749         offset if possible
1750         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1751
1752 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1753
1754         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1755         inifinitely recurseable, added static
1756         * support/regression/tests/bug-1408066.c: added
1757
1758 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1759
1760         * src/SDCCicode.h,
1761         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1762         renamed, added possibility to create "postLoopLbl"-labels
1763         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1764         newiTempLoopHeaderLabel
1765         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1766         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1767         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1768         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1769         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1770         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1771         (basicInduction): fixed bug #136564, made static,
1772         (loopInduction): changed parameter of basicInduction, made static,
1773         (addPostLoopBlock): added
1774         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1775         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1776         findLoopEndSeq
1777         * support/regression/tests/bug-136564.c: added
1778         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1779         --std-sdcc99 to LIBSDCCFLAGS
1780
1781 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1782
1783         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1784         while loop
1785         * support/regression/tests/bug-1406131.c: added
1786
1787 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1788
1789         * src/SDCCast.c (decorateType): fix promotion of unary minus
1790         * src/SDCCsymt.c (computeType): beautified
1791         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1792         (valUnaryPM, valComplement): fix sign and promotion,
1793         (valNot): ANSI: result type is int (SDCC: unsigned char)
1794         * support/regression/tests/uminus.c: speedup by removing superflous
1795         test case 'int'
1796         * support/regression/tests/onebyte.c: added promotion and signedness
1797         tests for unary minus
1798         * support/regressions/tests/bug-477927.c: disable warning about
1799         uninitialized variables
1800         * support/regression/tests/not.c: added
1801
1802 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1803
1804         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1805         * src/mcs51/gen.c (gen51Code): show final register usage after
1806         fillGaps in asm with --i-code-in-asm
1807         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1808         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1809         incUsed, rliveClear, adjustIChain): made static,
1810         (setFromRange): excluded because it's unused,
1811         (findPrevUseSym, markWholeLoop): added,
1812         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1813         through all branches of predecessors enables sdcc to emit the warning
1814         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1815         (rlivePoint): made static, added parameter emitWarnings which is only
1816         true during the first run out of two,
1817         (findRecursiveSucc, findRecursivePred): removed,
1818         (computeLiveRanges): made static, added parameter emitWarnings,
1819         (dumpIcRlive): added for debugging only
1820         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1821         removed prototype of setFromRange()
1822         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1823         in call of computeLiveRanges()
1824         * support/regression/tests/bug-895992.c: added
1825         * support/regression/tests/bug-971834.c: added
1826         * support/valdiag/tests/bug-895992.c: added
1827         * support/valdiag/tests/bug-971834.c: added
1828
1829 2005-12-18 Raphael Neider <rneider AT web.de>
1830
1831         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1832           (genUnpackBits): improved code for direct operands,
1833           (genPackBits): improved code for literal assignment to bitfields
1834             and for direct destination operands (no FSR indirection),
1835             prevented redundant AND, fixes #1362800,
1836           (AccLsh): added parameter to disable masking of the result
1837         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1838           skip instructions with side-effects (like incfsz),
1839           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1840         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1841         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1842           fixes #1375263
1843
1844 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1845
1846         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1847         volatile variables as spill location
1848
1849 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1850
1851         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1852         replacing literals
1853         * support/regression/tests/bug-1376320.c: added
1854
1855 2005-12-08 Raphael Neider <rneider AT web.de>
1856
1857         * src/pic/device.c: renamed is_shared to pic14_is_shared
1858         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1859         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1860           (is_valid_identifier): added for above workaround
1861
1862 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1863
1864         * device/lib/Makefile.in: fixed to enable port-specific-objects
1865         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1866           char, thanks Hubert Sack
1867         * doc/sdccman.lyx: documented --xstack-loc,
1868           elaborated a bit more on interrupts and pitfalls,
1869           removed "setjmp/longjmp unsupported",
1870           documented some unsupported C99 features
1871         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1872         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1873           if, thanks Hubert Sack
1874         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1875         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1876           make make_library
1877         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1878           regression tests can report resource usage (rfe 700441)
1879         * support/regression/collate-results.py: report resource usage
1880         * support/regression/ports/ds390/spec.mk,
1881         * support/regression/ports/hc08/spec.mk,
1882         * support/regression/ports/mcs51/spec.mk,
1883         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1884         * support/regression/ports/ds390/uCsim.cmd,
1885         * support/regression/ports/hc08/uCsim.cmd,
1886         * support/regression/ports/mcs51/uCsim.cmd,
1887         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1888         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1889           library, use the default one
1890         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1891           building the library
1892
1893 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1894
1895         * config.dsp: added dependency on .version and configure_vc.awk
1896         * device/include/setjmp.h: updated for --stack-auto and --xstack
1897         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1898         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1899         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1900         * device/lib/libsdcc.lib: added _setjmp
1901         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1902           (decorateType): fixed bug 1372851,
1903           (optimizeGetHbit): fixed warning
1904         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1905           array initialisation
1906         * support/regression/tests/bug1057979.c: added test for bug 1358192
1907         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1908
1909 2005-12-03 Borut Razem <borut.razem AT siol.net>
1910
1911         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1912           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1913
1914 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1915
1916         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1917         createIval): implement symbol independant "flexible array member",
1918         (createIvalCharPtr): implemented flexible array initialisation with a
1919         string
1920         * src/SDCCsymt.c (copyStruct): removed,
1921         (getSize): fixed misleading comment,
1922         (getAllocSize): removed, the additional allocation size is now in
1923         sym->flexArrayLength,
1924         (checkStructFlexArray): new, syntax checks for flexible array members,
1925         (compStructSize): added syntax checks for "flexible array members"
1926         (copyStruct): removed,
1927         (copyLinkChain): removed inefficient fix for bug 770487
1928         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1929         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1930         symbol->flexArrayLength
1931         * src/SDCCerr.c,
1932         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1933         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1934         * support/regression/tests/structflexarray.c: added
1935         * support/valdiag/tests/structflexiblearray.c: added
1936
1937 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1938
1939         * src/SDCCast.c (decorateType): fixed bug 1368489
1940         * support/Util/SDCCerr.c,
1941         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1942
1943 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1944
1945         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1946           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1947
1948 2005-11-27 Borut Razem <borut.razem AT siol.net>
1949
1950         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1951           support/cpp2/mkdeps.h: added command line option
1952           -obj-ext=<extension> to SDCPP to define object file externion, used
1953           for generation of make dependencies (-M)
1954         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1955
1956 2005-11-26 Borut Razem <borut.razem AT siol.net>
1957
1958         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1959           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1960           added pic and pic16 libraries
1961
1962 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1963
1964         * device/include/float.h: Corrected typo in prototype of __fsgt
1965
1966 2005-11-25 Borut Razem <borut.razem AT siol.net>
1967
1968         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1969           added creation of model-mcs51-stack-auto libraries
1970
1971 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1972
1973         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1974         and fields-list too
1975         * src/SDCCast.c (createIvalArray): removed obsolete comment
1976
1977 2005-11-24 Borut Razem <borut.razem AT siol.net>
1978
1979         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1980           added missing device/lib/mcs51/crt*.asm sources
1981
1982 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1983
1984         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1985
1986 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1987
1988         * device/lib/_fs2schar.c,
1989         * device/lib/_fs2sint.c,
1990         * device/lib/_fs2slong.c: optimized inline asm
1991
1992 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1993
1994         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1995           Better handling of floats between -1.0 and 0.0.
1996
1997 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1998
1999         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
2000           (the missing "if"s prohibited removal of redundant labels)
2001
2002 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2003
2004         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2005           Properly convert floats between -1.0 and 0.0 to long, int, and char
2006           types (max integer value of negative floats tends to zero).
2007         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2008           Removed changes made so to work properly with floats between
2009           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
2010           and _fs2char.c
2011
2012 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2013
2014         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
2015         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
2016         (genCast) cosmetic change
2017         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
2018         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
2019         from mcs51
2020         * support/regression/tests/bitfields (testSignedBitfields): added
2021
2022 2005-11-18 Borut Razem <borut.razem AT siol.net>
2023
2024         * sdcc/device/lib/Makefile.in: remove all unnecessary files
2025         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
2026           introduced SILENT option to make building of pic16 libraries less
2027
2028 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2029
2030         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2031           Now they work properly with floats between -1.0 and 0.0
2032         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
2033
2034 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2035
2036         * src/SDCCicode.c (printOperand): added missing else
2037
2038 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2039
2040         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
2041         reformatted for better readability
2042         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
2043         signed bitfields
2044
2045 2005-11-17 Borut Razem <borut.razem AT siol.net>
2046
2047         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
2048           introduced SILENT option to make building of pic16 libraries less
2049           verbose - used for nightly snapshot build
2050         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
2051           available on Win32 platforms.
2052         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
2053           medium, large, pic and pic16
2054
2055 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2056
2057         * device/lib/printf_large.c: Temporary patch for bug 1358192:
2058           printf("%f"...) sets fraction to zero.
2059
2060 2005-11-16 Raphael Neider <rneider AT web.de>
2061
2062         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
2063           fixes #1357221
2064         * src/pic/gen.c (genIfx): implemented for CARRY bit
2065         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
2066           to generic pointers, fixes #1357332,
2067           (pic16_movLit2f): NEW,
2068           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
2069
2070 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2071
2072         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
2073
2074 2005-11-11 Raphael Neider <rneider AT web.de>
2075
2076         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
2077         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
2078           compute pointer's type from operand,
2079           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
2080           improved single bit reads, fixes bug #1353379
2081
2082 2005-11-09 Borut Razem <borut.razem AT siol.net>
2083
2084         * support/scripts/sdcc.nsi: added lib/pic to the package
2085
2086 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
2087
2088         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
2089
2090 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2091
2092         * support/regression/tests/bug1348008.c: added
2093         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
2094         * support/regression/tests/bug1337835.c: updated comment
2095
2096 2005-11-06 Borut Razem <borut.razem AT siol.net>
2097
2098         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2099           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2100           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2101           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2102           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
2103           dynamic construction of cl_error_class and derivates - 2.nd try
2104
2105 2005-11-05 Borut Razem <borut.razem AT siol.net>
2106
2107         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
2108           bug, which caused Bus Errors on sparc solaris
2109
2110 2005-11-04 Borut Razem <borut.razem AT siol.net>
2111
2112         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2113           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2114           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2115           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2116           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
2117           and derivates to resolve the initialization problem on OSX
2118
2119 2005-11-02 Borut Razem <borut.razem AT siol.net>
2120
2121         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2122           corrected typo - #include <winsock2.h>
2123
2124 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
2125
2126         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
2127           (_asxxxx_mapping): added org directive for future enhancements
2128
2129 2005-11-01 Borut Razem <borut.razem AT siol.net>
2130
2131         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2132           enabled sockets on WIN32
2133         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
2134
2135 2005-10-31 Borut Razem <borut.razem AT siol.net>
2136
2137         * support/regression/generate-cases.py: escape backslashes in {testcase}:
2138           WIN32 backslash path delimiters should be escaped when used in C strings
2139         * support/regression/tests/bitfields.c: exclude failing assertions for
2140           __CYGWIN32__ and __MINGW32__ hosts
2141
2142 2005-10-30 Borut Razem <borut.razem AT siol.net>
2143
2144         * src/SDCCutil.c: corrected double comparison typo
2145
2146 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
2147
2148         * device/lib/medium/Makefile: added for new memory model medium
2149         * device/include/asm/mcs51/features.h: updated for medium/pdata
2150         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
2151           added Multiply & Accumulate sbit's and MAC0_PAGE define
2152         * device/include/mcs51/c8051f300.h: added sfr16 definitions
2153         * device/include/mcs51/c8051f310.h: added sfr16 definitions
2154         * device/lib/_mullong.c: update for medium model
2155         * device/lib/incl.mk: added medium model
2156         * doc/sdccman.lyx: documented medium model
2157         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
2158         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
2159         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
2160         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
2161           (allocParms): set SCLS and OCLS to pdata for medium model
2162         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
2163           for pdata,
2164           (powof2): return <0 if not power of 2
2165         * src/avr/gen.c (genBitWise): use updated powof2
2166         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
2167           (shiftR2Left2Result): small optimization in setup, save acc when storing,
2168           (shiftLLeftOrResult): use B if necessary
2169         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
2170         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
2171         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
2172         * support/regression/Makefile.in: added test-mcs51-medium
2173         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
2174
2175 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2176
2177         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
2178         specifier unsigned
2179         * device/lib/time.c (mktime): fixed bug 1334315
2180
2181 2005-10-28 Raphael Neider <rneider AT web.de>
2182
2183         * device/include/pic/p16f_common.inc: added common declarations
2184         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
2185
2186 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2187
2188         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
2189           (aopPutUsesAcc): added to predict accumulator use,
2190           (assignResultValue): save acc if necessary,
2191           (genMinusDec): store result if indirectly addressed,
2192           (genDivOneByte):  save acc if necessary,
2193           (movLeft2Result): bugfix if left already in acc,
2194           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
2195             attention to accumulator use (esp. pdata),
2196           (genReceive): receive pdata correctly
2197         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
2198         * src/SDCCicode.h: added isOperandInPagedSpace prototype
2199
2200 2005-10-27 Raphael Neider <rneider AT web.de>
2201
2202         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
2203
2204 2005-10-27 Raphael Neider <rneider AT web.de>
2205
2206         * .version: changed version to 2.5.4
2207         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
2208         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
2209           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
2210             arithmetics support routines
2211         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
2212         * device/lib/Makefile.in: also create installdir for pic
2213
2214         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
2215           pic14 port as well
2216         * src/pic/device.c (dump_sfr): rewritten to delegate register
2217           placement to the linker (use `extern sym' rather than sym EQU addr),
2218           (validAddress): fixed to check last specified address
2219         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
2220           (popGetLit): truncate literal value to 8 bit,
2221           (popGet): moved assert to more appropriate place
2222           (popGetExternal): create pCode operand from and mark the according
2223             symbol as being `extern'
2224           (popGetAddr): added sanity check on immediate's offset, provide
2225             GPOINTER tag on demand
2226           (aopPut): fixed for immediates,
2227           (mov2w_op): move operand's address or contents to WREG (depending on
2228             operand type), safer variant of mov2w,
2229           (movwf,call_libraryfunc): NEW, handy abbreviations,
2230           (get_argument_pcop,get_return_val_pcop,pass_argument,
2231           get_returnvalue): interface for accessing function parameters and
2232             return values,
2233           (assignResultValuei,genRet): use new parameter/return value interface
2234           (pic14_getDataSize): back to old version handling generic pointers,
2235           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
2236             provided implementation and/or fixed old one,
2237           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
2238             calls, removed legacy 8051 reference code
2239           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
2240           (loadSignToC): NEW, move the operands sign bit to CARRY,
2241           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
2242             genRightShiftSigned, accepts negative shift counts,
2243           (setup_fsr): load FSR and adjust IRP (indirect memory access),
2244           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
2245             generic pointers, __data pointers and __code pointers,
2246           (genUnpackBits,genPackBits): rewritten to work with generic pointers
2247             and signed bitfields, limit bitfields to 8 bit,
2248           (genDataPointerGet): fixed number of bytes read,
2249           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
2250           (genPointerGet,genPointerSet): fixed handling of __code pointers,
2251             pointers to constant data are no longer assumed to point to __code
2252             space, removed invalid pointer types,
2253           (bitpatternFromVal): retrieve the PICs representation of an integer
2254             or float literal,
2255           (genDataPointerSet): fixed assigning to po_immediate operands,
2256           (genGenPointerSet): implemented as library call,
2257           (genIfx): fixed incorrect condition,
2258           (genAddrOf): limit generic pointers' addresses to 2 bytes,
2259             provide GPOINTER tag according to destination's storage class,
2260           (genCast): added code to handle casting to generic pointers, added
2261             sign-/zero extension of the result
2262           (aop_isLitLike,op_isLitLike): fixed handling of immediates
2263         * src/pic/gen.h: added macros to access IRP bit in STATUS register
2264         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
2265           extend the result
2266         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
2267           address/register resides in the shared banks
2268           (emitSymbolToFile): improved to handle global and `pinned' symbols,
2269             put all variables into separate sections (have the linker arrange
2270             them)
2271           (picglue): put init code and interrupt handlers in separate sections
2272         * src/pic/main.c: added port specific options table, modified to PORT
2273           structure to make GPOINTERs 3 byte, added pic14_options
2274           (_pic14_do_link): private linking routine (update paths to libraries,
2275             add libsdcc.lib by default)
2276         * src/pic/main.h: declare pic14_options
2277         * src/pic/pcode.c: fixed instructions i/o relations,
2278           (RegCond): reverted to correct version,
2279           (newpCodeOpLit): truncate literals to 8 bit,
2280           (genericPrint): added debug output,
2281           (getRegFromInstruction): fixed for various operand types, simplified
2282           (BuildFlow): fixed broken handling of isntructions with labels
2283           (LinkFlow): start at last instruction in flow (skip trailing comments),
2284             pass the flow on to the next instruction after CALL
2285           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
2286           (insertPCodeInstruction): fixed inserting after a skip instruction,
2287           (DoBankSelect): fixed for labeled instructions
2288           (OptimizepBlock): honor --nopeep switch
2289           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
2290         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
2291         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
2292           (pCodeOptime2pCodes): allow disabling this optimization via
2293             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
2294             but is still buggy), started implementation of a dataflow based
2295             pCode optimization (CSE + dead code elimination)
2296           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
2297         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
2298           names are independant of the stack location and therefore portable across
2299           devices
2300
2301 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2302
2303         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
2304           (selectSpil): fixed bug 1337835 by not spilling bit variables
2305         * support/regression/tests/bug1337835.c: added test for this bug
2306         * src/mcs51/peeph.def: restart after rule 3.c,
2307           addded rules 263.x to optimize loading constants
2308
2309 2005-10-26 Raphael Neider <rneider AT web.de>
2310
2311         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
2312         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
2313           (genAssign): emit warning when casting literals to generic pointer
2314             type, also applies when taking the address of a fixed variable,
2315           (genCast): improved casting to generic pointers
2316         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
2317           extern variables, added verbose error message
2318         * device/include/pic16/{string.h,errno.h}: added #pragma library c
2319
2320 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
2321
2322         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
2323         carry must be complemented too
2324         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
2325         could be emitted by genMinus
2326         * src/SDCCval.c (constVal): fixed bug 1305065
2327
2328 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
2329
2330         * src/SDCCast.c (addCast): added promotion for bit variables
2331         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
2332         promotion casts + optimisation
2333         (optimizeGetWord): fix warning 'i' might be used uninitialized
2334         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
2335         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
2336
2337 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2338
2339         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
2340         all chars are promoted to int; promotion should be handled in SDCCast.c
2341
2342 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2343
2344         * device/lib/_strcmp.c: Fixed bug 1326457
2345
2346 2005-10-11 Raphael Neider <rneider AT web.de>
2347
2348         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
2349         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
2350
2351 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2352
2353         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
2354         * support/regression/tests/sfr16.c: added test for the sfr32 bug
2355
2356 2005-10-04 Raphael Neider <rneider AT web.de>
2357
2358         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
2359           device/lib/pic16/pics.all: added pic18f1320
2360         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
2361
2362 2005-09-30 Raphael Neider <rneider AT web.de>
2363
2364         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
2365         * src/pic16/devices.inc: NEW, provides device descriptions
2366         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
2367
2368 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
2369
2370         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
2371           GETHBIT
2372
2373 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
2374
2375         * doc/sdccman.lyx: updated Highest Order Bit documentation,
2376           documented Any Order Bit, Higher Order Byte and Higher Order Word
2377         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
2378         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2379           (optimizeGetAbit): new, to get any bit, not only the high bit,
2380           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2381           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2382           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2383           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2384             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2385             GETABIT, GETBYTE, GETWORD: decorate them,
2386           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2387           (ast_print): added GETABIT, GETBYTE, GETWORD
2388         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2389         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2390           (geniCodeBinary): new generic binary icode,
2391           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2392         * src/port.h: updated comment for PORT.hasExtBitOp
2393         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2394           (genGetByte): new, to get a single byte,
2395           (genGetWord): new, to get a word from a long,
2396           (gen51Code): added GETABIT, GETBYTE, GETWORD
2397         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2398
2399 2005-09-23 Raphael Neider <rneider AT web.de>
2400
2401         * configure.in, configure: have device/lib/pic configured
2402         * device/lib/Makefile.in: added model-pic14
2403         * device/lib/clean.mk: added pic/ to clean rule
2404         * device/lib/pic: added rudimentary pic14 library providing support
2405           functions for multiplication/division/generic pointer access
2406         * src/SDCCopt.c (convilong): mark support functions as extern
2407           for pic14 port as well
2408         * src/pic/gen.c (genMult): added assertions,
2409           (genpic14Code): emit warning on unhandled iCodes
2410         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2411         * src/pic/pcode.c (pCodeOpCopy),
2412         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2413           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2414           SFR_REGISTER}), made safe for future extensions
2415         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2416           instructions even if preceeded by SKIP instructions (also remove
2417           them); removed unused code
2418         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2419           prevents leaving parts of the structure uninitialized after copying
2420
2421 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2422
2423         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2424           ago by me
2425         * support/regression/tests/addsub.c: added test for the bug
2426
2427 2005-09-21 Raphael Neider <rneider AT web.de>
2428
2429         * device/include/pic16/pic18f1220.h,
2430           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2431         * device/lib/pic16/Makefile.rules: added missing opening paren
2432         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2433           are provided in genutils.c,
2434           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2435           operand/result sizes,
2436           (genCmp): assert on NULL pointers first, then check deref'ed values
2437         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2438           result size
2439
2440 2005-09-18 Raphael Neider <rneider AT web.de>
2441
2442         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2443           as these are now unused,
2444           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2445         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2446           local, avoids uninitialized pointer dereference on r->name
2447         * src/pic16/ralloc.c (newReg): fixed indentation
2448
2449 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2450
2451         * src/SDCCval.c (constVal): fixed bug 730366
2452         * support/Util/SDCCerr.c,
2453         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2454
2455 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2456
2457         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2458
2459 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2460
2461         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2462
2463 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2464
2465         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2466           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2467         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2468           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2469         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2470         * packihx/packihx.c (hexDigit): made c unsigned char
2471         * as/mcs51/lklibr.c (fndsym),
2472         * link/z80/lkgb.c (gb),
2473         * link/z80/lklibr.c (fndsym),
2474         * link/z80/lkrloc.c (relr),
2475         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2476         * src/SDCC.lex (checkCurrFile, process_pragma),
2477         * src/SDCCglue.c (spacesToUnderscores),
2478         * src/SDCCmain.c (setParseWithComma, processFile),
2479         * src/asm.c (tvsprintf, printCLine),
2480         * src/avr/gen.c (emitcode, aopPut),
2481         * src/ds390/gen.c (emitcode),
2482         * src/hc08/gen.c (emitcode, emitinline),
2483         * src/mcs51/gen.c (emitcode, genInline),
2484         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2485           tokenizeLineNode),
2486         * src/pic/ralloc.c (debugLog),
2487         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2488           tokenizeLineNode),
2489         * src/pic16/ralloc.c (debugLog),
2490         * src/z80/main.c (_process_pragma):
2491            made all ctype.h function calls safe
2492         * src/SDCCopt.c: include math.h for fabs
2493         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2494           and used them throughout the code to make ctype.h function calls safe
2495         * src/ds390/main.c (asmLineNodeFromLineNode),
2496         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2497         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2498            unsigned char*
2499         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2500           (newpCodeAsmDir): made ctype.h function calls safe
2501         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2502           pic16_emitcode):  made lbp unsigned char*
2503         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2504           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2505         * src/xa51/gen.c (emitcode),
2506         * src/z80/gen.c (_emit2): made lbp unsigned char*
2507         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2508            char*
2509
2510 2005-09-05 Raphael Neider <rneider AT web.de>
2511
2512         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2513           access bank splitpoint
2514
2515 2005-09-05 Raphael Neider <rneider AT web.de>
2516
2517         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2518
2519 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2520
2521         * .version: changed to version 2.5.3
2522         * doc/sdccman.lyx: changed version to 2.5.3,
2523           documented --codeseg and --constseg and pragma codeseg and constseg,
2524           documented bit parameters (reentrant) and bit returning
2525         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2526            currFunc->recvSize, but is this ok for all ports?
2527           (ast2iCode): result of ~ on unsigned char must be cast to int for
2528            bool to work
2529         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2530           function pointers in bit space
2531         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2532           (processFuncArgs): call port.reg_parm() with reentrancy info
2533         * src/port.h,
2534         * src/avr/main.c,
2535         * src/ds390/main.c,
2536         * src/hc08/main.c,
2537         * src/pic/main.c,
2538         * src/pic16/main.c,
2539         * src/xa51/main.c,
2540         * src/z80/main.c: port.reg_parm prototype extended with
2541           "bool reentrant" parameter
2542         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2543           options.stackAuto for allocating bit register parameters
2544         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2545           (genSend): set BitBankUsed if it is,
2546           (selectRegBank): factored out of genCall for use in genPcall,
2547           (genCall): removed redundant dtype assignmen, use selectRegBank,
2548           (genPcall): handle returning in Carry properly, save in F0 if needed,
2549           (genReceive): handle bit register parameters
2550         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2551           (mcs51_assignRegisters): enable bit registers for all reentrant
2552            functions and don't set BitBankUsed unconditionally
2553         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2554         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2555         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2556
2557 2005-08-27 Borut Razem <borut.razem AT siol.net>
2558
2559         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2560         ppc-osx (Darwin) does not support -u option. It seems that it is
2561         supported only on Linux - GNU cp
2562
2563 2005-08-25 Borut Razem <borut.razem AT siol.net>
2564
2565         * sim/ucsim/gui.src/serio.src/Makefile.in,
2566           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2567           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2568           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2569           install and strip, since the strip at /usr/ccs/bin should be used
2570           on solaris
2571
2572 2005-08-24 Borut Razem <borut.razem AT siol.net>
2573
2574         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2575
2576 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2577
2578         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2579         ffffffffu
2580
2581 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2582
2583         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2584         * as/mcs51/lkmain.c (link_main): fixed warning
2585         * device/include/stdbool.h: ds390 has no advanced bit support yet
2586         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2587         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2588         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2589           and updated their macros
2590         * src/SDCCval.c (constVal): updated comment for renamed b_long
2591
2592 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2593
2594         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2595         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2596           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2597           (oprio): set priority for '['
2598         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2599            and adb_24_bit
2600         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2601         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2602         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2603         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2604           added overlayable BIT_BANK area
2605         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2606           (summary2): explain 'T' in legenda
2607         * as/mcs51/lkrloc.c: replaced old K&R style,
2608           (relr): added R_BIT processing,
2609           (errmsg): added "Bit-addressable relocation error",
2610           (adb_bit): added for converting from byte- to bit-addressable space,
2611           (adb_24_bit): added for converting from byte- to bit-addressable space
2612         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2613            used in reentrant functions now even as return value
2614         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2615         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2616           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2617         * src/SDCCglobl.h: added indicator BitBankUsed
2618         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2619            the bit registers b0-b7
2620         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2621           (geniCodeCast): fixed bug 1263853,
2622           (geniCodeLogicAndOr): put result in bool or char,
2623           (geniCodeReceive): added parameter func for accessing the return type,
2624           (geniCodeFunctionBody): pass func to geniCodeReceive
2625         * src/SDCCmain.c: added indicator BitBankUsed
2626         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2627         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2628           (checkSClass): don't put automatic bool/bit on stack,
2629           (checkFunction): removed check on function cannot return bit
2630         * src/SDCCsymt.h: added newBoolLink prototype
2631         * src/mcs51/gen.c (rb1regs): added bit registers,
2632           (movc): created for assigning to carry,
2633           (pushReg, popReg): created for pushing registers,
2634           (sameRegs): check both AOP_REG and AOP_CRY types,
2635           (aopOp): handle bit registers,
2636           (aopPut): optimization no self-assign,
2637           (saveRegisters): push reg->base (bits) only once for bit registers,
2638            and use pushReg,
2639           (unsaveRegisters): pop reg->base only once and use popReg,
2640           (assignResultValue): added parameter func and return in carry for bits,
2641           (genIpush): optimization no reload in A if not changed,
2642           (genSend): bit parameters in reentrant functions are passed in bit
2643            registers by first assigning to bits in B, then save registers and
2644            copy B to bits,
2645           (genCall): handle returning in Carry properly, save it in F0 if needed,
2646           (genPcall): updated assignResultValue call, this is not safe yet for bit
2647            returning function !!!
2648           (genFunction): don't generate equ's for bit registers and use pushReg,
2649           (genEndFunction): take care of bit returning functions and use popReg,
2650           (genRet): return bit in Carry,
2651           (genIfx): optimize bit registers and other directly addressable bits,
2652           (genReceive): updated assignResultValue call
2653         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2654           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2655            registers when using stack-auto
2656         * src/mcs51/ralloc.c (_G): added allBitregs,
2657           (regs8051): added the bit registers,
2658           (createStackSpil): use macro IS_BIT,
2659           (getRegBit): added to allocate a bit register, else spill,
2660           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2661           (updateRegUsage): factored out to ease stepping while debugging,
2662           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2663            also allocate bit registers,
2664           (fillGaps): handle bit registers,
2665           (findAllBitregs): added to create bit vector with all bit registers,
2666           (mcs51_allBitregs): returns this bit vector,
2667           (mcs51_assignRegisters): when using stack-auto use bit registers for
2668            passing parameters and creating local variables
2669         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2670
2671 2005-08-22 Borut Razem <borut.razem AT siol.net>
2672
2673         * device/lib/Makefile.in: replaced find option -or with -o
2674           to make it run on solaris
2675
2676 2005-08-22 Raphael Neider <rneider AT web.de>
2677
2678         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2679           fixes #1265442 (crash on Solaris)
2680
2681 2005-08-20 Borut Razem <borut.razem AT siol.net>
2682
2683         * configure, configure.in: added tests for libsocket and libnsl libraries,
2684           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2685           from support/regression/Makefile.in
2686         * support/regression/Makefile.in: added
2687         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2688         * sim/ucsim/libtool: regenerated on sparc-solaris
2689         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2690           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2691           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2692           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2693           sparc-solaris, which doesn't use GNU ld linker
2694         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2695         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2696
2697 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2698
2699         * src/mcs51/peeph.def: updated comments
2700
2701 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2702
2703         * device/lib/_gptrget.c,
2704         * device/lib/_gptrput.c: slightly shorter
2705         * doc/sdccman.lyx: incremented version
2706         * src/mcs51/peeph.def: moved peephole comments to the line of first
2707           change to better keep line correlation, reanimated 186.e
2708         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2709
2710 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2711
2712         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2713           David Saxton with quotes around file name.
2714
2715 2005-08-15 Borut Razem <borut.razem AT siol.net>
2716
2717         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2718           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2719           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2720           make tests run on x86_64 platform
2721
2722 2005-08-13 Raphael Neider <rneider AT web.de>
2723
2724         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2725           as it might be executed DURING a build (parallel make is wonderful)
2726
2727 2005-08-13 Raphael Neider <rneider AT web.de>
2728
2729         * device/lib/Makefile.in (port-specific-objects-pic16):
2730           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2731         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2732           dependency
2733         * device/lib/pic16/Makefile.rules: build subdirs before creating
2734           the library, removed builddir rule, create $(builddir) early in
2735           recurse rule, use empty recurse rule for leaf directories
2736         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2737           mkdir errors (race condition), removed duplicate suffix "hex"
2738           from clean rules
2739         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2740         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2741           prevents mkdir -p from aborting on Alpha
2742
2743 2005-08-12 Raphael Neider <rneider AT web.de>
2744
2745         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2746           db-statements in order to allow for arrays of pointers in code
2747           sections to be placed without interspersed 0-padding, fixes
2748           bug #1256215
2749         * (emitStatistics): fixed division by zero for pic18f1220
2750         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2751           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2752         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2753         * (pic16_pCodeConstString): keep track of already emitted string
2754           literals to prevent "duplicate definitions of symbol _str_NR"
2755         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2756           debug message
2757         * device/lib/Makefile.in: ignore failing PIC16 library builds
2758         * device/lib/pic16/Makefile: do not build if gputils are missing
2759         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2760
2761 2005-08-10 Raphael Neider <rneider AT web.de>
2762
2763         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2764           my last commit)
2765
2766 2005-08-10 Raphael Neider <rneider AT web.de>
2767
2768         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2769           Rokas' patch to add the new fixed point type "__fixed16x16"
2770         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2771           functions for __fixed16x16 arithmetics
2772         * device/lib/pic16: reimplemented the build system to support
2773           a separate build directory, better handling of libio (create
2774           the library in a separate subdir for each architecture) and
2775           easier configuration (centralized in Makefile.common)
2776
2777 2005-08-07 Raphael Neider <rneider AT web.de>
2778
2779         * src/pic16/gen.c (genrshTwo): fixed sign extension
2780         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2781         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2782           added T0CONbits
2783         * device/include/pic16/pic18f4220.h: NEW, header for
2784           pic18f4220 and pic18f4320
2785         * device/include/pic16/pic18fregs.h: added new devices,
2786           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2787         * device/include/pic16/signal.h: resolved name clashes
2788           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2789           to also allow testing for interrupt enable bits, added
2790           comments on how to use the macros
2791         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2792         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2793           register definitions for the devices
2794         * device/lib/pic16/pics.all: added new devices
2795         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2796           allocated memory
2797         * device/lib/pic16/libc/stdlib/memfree: do not count
2798           the block header as free memory
2799         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2800           simplified and added missing end-of-blocklist-marker
2801           (reported by Peter Onion, fixes #1252814)
2802         * (_mergeHeapBlock): fixed loop condition
2803         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2804           len==0, restructured code
2805         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2806           up a bit, reduced bitfield accesses, prevent endless loops
2807           in case of heap corruption
2808         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2809           "unreferenced arguments/must return a value" warnings
2810         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2811           replaced BAUDREG with SPBRG
2812         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2813           device/lib/pic16/debug/gstack/gstack.c: replaced
2814           _naked, _asm, _endasm with __naked, __asm, __endasm
2815
2816 2005-08-05 Raphael Neider <rneider AT web.de>
2817
2818         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2819           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2820
2821 2005-08-05 Borut Razem <borut.razem AT siol.net>
2822
2823         * device/lib/Makefile.in: added missing ';'
2824         * configure: removed ^M characters
2825
2826 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2827
2828         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2829           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2830           License
2831
2832 2005-08-04 Borut Razem <borut.razem AT siol.net>
2833
2834         * configure.in: pic16 libraries build 2nd try - enable running
2835           configure in device/lib/pic16
2836         * configure: regenerated from configure.in
2837         * device/lib/Makefile.in: create $(PORT)/bin directory
2838
2839 2005-08-03 Raphael Neider <rneider AT web.de>
2840
2841         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2842           to get/set values via pointers
2843         * (genUnpackBits,genPackBits): changed detection of
2844           ptr->bitfield vs. sym.bitfield, fixed access via generic
2845           pointers, removed dead (wrong) code for multibyte bitfields
2846         * (genNearPointerGet, genGenPointerGet): removed useless code,
2847           fixed bitfield detection, fixes #1250594
2848         * (genNearPointerSet): removed useless code
2849         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2850           and introduced macro pic16_emitpcode that conditionally emits
2851           the origin of the following pCode (useful for debugging SDCC)
2852         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2853         * (createDefmap): fixed handling of LFSR for --optimize-df
2854
2855 2005-08-02 Borut Razem <borut.razem AT siol.net>
2856
2857         * device/lib/Makefile.in: pic16 libraries build enabled since
2858           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2859
2860 2005-08-02 Raphael Neider <rneider AT web.de>
2861
2862         * src/pic16/gen.c (genPackBits): removed deprecated warning
2863         * (genGenPointerSet): fixed bitfield detection
2864
2865 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2866
2867         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2868
2869 2005-07-31 Raphael Neider <rneider AT web.de>
2870
2871         * device/lib/pic16/libdev/pic18f458.c,
2872           device/include/pic16/pic18f458.h: added missing T0CONbits
2873
2874 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2875
2876         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2877
2878 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2879
2880         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2881
2882 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2883
2884         * device/include/mcs51/at89c51ed2.h: added.
2885
2886 2005-07-23 Raphael Neider <rneider AT web.de>
2887
2888         * src/pic/gen.h: added emitpcode macro for debugging
2889         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2890           and replace by macro adding debug information on demand
2891         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2892         * (gencjne): tried to fix; replaced with correct (slower) code
2893         * (gen{Unp,P}ackBits): fixed single bit access
2894         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2895         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2896           previous instruction
2897         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2898           register has to be handled with care (forbidding movement
2899           of assignments/uses, removing assignments completely, ...)
2900         * (pCodeOptime2pCodes): make use of regIsSpecial
2901         * added lots of debugging output (commented out)
2902         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2903           from being reused as result UNLESS it is known to work
2904
2905 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2906
2907         * support/Util/dbuf.h: include <stddef.h> for size_t
2908         * .version: changed to version 2.5.2
2909
2910 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2911
2912         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2913
2914 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2915
2916         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2917           (genModOneByte): removed needless psha/pula
2918
2919 2005-07-22 Raphael Neider <rneider AT web.de>
2920
2921         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2922           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2923         * src/pic/gen.c (resolveIfx): do not "invent" labels
2924         * (genSkipc): changed to positive logic
2925         * (genSkipCond): removed as no longer needed
2926         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2927           backport from PIC16
2928         * (genLeftShift): check operands are in different registers
2929         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2930           INCF does not update CARRY...
2931         * src/pic/main.c: fixed _linkCmd
2932         * src/pic/pcode.c (unlinkpCode): added inactive code
2933         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2934           alive (do not assign result and operand overlapping registers)
2935
2936 2005-07-22 Raphael Neider <rneider AT web.de>
2937
2938         * src/pic/device.c (dump_sfr): replaced register declaration with
2939           call to emitSymbolToFile() to avoid duplicate symbols
2940         * (assignRelocatableRegisters): do not declare external symbols
2941         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2942           right (take size of type, not etype)
2943         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2944         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2945         * (packRegsForAccUse): disabled assignment of WREG as
2946           the result reg to prevent occurence of just fixed #1235003,
2947           fixes #1242954
2948         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2949           symbols (avoids duplicate symbols in .asm file)
2950         * (pic14emitRegularMap): use emitSymbolToFile()
2951         * src/pic/gen.c (aopOp): fixed spillLocation handling
2952         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2953         * (genDataPointerSet): removed unneccessary variables/output
2954
2955 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2956
2957         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2958         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2959
2960 2005-07-21 Raphael Neider <rneider AT web.de>
2961
2962         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2963           architecture cannot handle them efficiently, fixes bug #1235003
2964         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2965           check for empty sets before using them (fixes bug #1232190)
2966
2967 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2968
2969         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2970           (lnksect2): generate warnings for memory overlap
2971         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2972           constseg to set the name of these segments so you can instruct the linker
2973           to place them in banks
2974         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2975         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2976           added code_seg and const_seg to options
2977         * src/SDCCglue.c (emitMaps): use options.const_seg,
2978           (createInterruptVect): put interrupt vectors in segment HOME,
2979           (glue): put HOME before static segment and put the main glue in HOME,
2980           (glue): use options.code_seg
2981         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2982         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2983           these segments so you can instruct the linker to place them in banks
2984           (linkEdit): use code_loc for HOME segment which should be the first
2985           segment in code memory now
2986         * src/SDCCmem.c: fixed more stuff like bug 1238386
2987         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2988           (changePointer): don't change function pointers to code pointers for
2989           banked functions,
2990           (compareType): added exceptional check for banked function pointers
2991         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2992         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2993           after static in code memory
2994         * src/mcs51/gen.c: added aopLiteralLong prototype,
2995           (aopForSym): use getSize for functions,
2996           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2997           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2998           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2999           the segment,
3000           (genPcall): use call for literal function pointers and generate banked
3001           calls over the one trampoline so there's only one place for the user to
3002           modify according to his/hers hardware,
3003           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
3004           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
3005         * src/mcs51/main.c: added keyword banked,
3006           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
3007         * support/Util/SDCCerr.c,
3008         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
3009           needed for passing the bank and address to the trampoline
3010         * device/lib/mcs51/crtbank.asm: added for bankswitching
3011         * device/lib/mcs51/Makefile: added crtbank
3012
3013 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3014
3015         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
3016           for fields at offset 0 of a struct or union as reported
3017           on 2005-07-07 in the developer mailing list.
3018
3019 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
3020
3021         * src/SDCCmem.c: fixed bug 1238386
3022
3023 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3024
3025         * src/mcs51/peeph.def: added labelrefcounting for peepholes
3026           (patch #1144962), added peephole 300, enabled 259.x
3027         * doc/sdccman.lyx: removed screenshot and provided link instead
3028
3029 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3030
3031         * doc/sdccman.lyx: added section about debugging with ddd
3032         * doc/figures/ddd_example.eps: screenshot of debugging session
3033
3034 2005-07-04 Raphael Neider <rneider AT web.de>
3035
3036         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
3037           like CODE pointers, fixes #1115683
3038         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
3039           call, fixes bugs #1232211, #1228110,
3040           fixed wrong casts to pCodeFlow from pCodeInstructions
3041
3042 2005-07-04 Raphael Neider <rneider AT web.de>
3043
3044         * src/pic/gen.c (popGet): changed assert to allow for
3045           bit operands
3046         * (popGetAddr): changed signature to provide
3047           an additional index, patched all call sites
3048         * (genCmpEq): handle literal-like operands correctly
3049         * (genAddrOf): added sanity checks on __code/__data pointers
3050         * (genAssign): added handling of symbols from __code section
3051         * (gencjne): do not generate code for comparisons whose result
3052           is neither stored nor used, fixes bug #1171114
3053         * (AccLsh, AccRsh): operate on operand instead of WREG
3054         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
3055           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
3056           by known count
3057         * rewrote complete shift-by-literal logic, commented unused
3058           functions out
3059         * (genConstPointerGet): get multiple bytes (if result size > 1),
3060           fixed handling of non-immediate addresses
3061         * (genPointerGet): handle CODE pointers like CONST pointers
3062         * (genpic14Code): insert C-SRC lines as Cource-pCodes
3063         * ({aop,op}_isLitLike): NEW, single place to decide whether an
3064           operand is to be treated as a literal or not
3065         * (mov2w,genPcall,genCmpEq),
3066           src/pic/genarith.c: use aop_isLitLike() to decide between
3067           literal/register contents
3068         * (addSign): added missing offset
3069         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
3070           only emit comment in debug-mode,
3071           use {aop,op}_isLitLike throughout the file
3072         * src/pic/glue.c: fix initializers for pointers (work in progress)
3073         * src/pic/pcode.c (get_op): honor index on _const symbols
3074         * ({reset,dump}pCodeStatistics): NEW, estimate code size
3075         * (dumppBlock): added pCode size estimation
3076         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
3077           check for IS_SYMOP before OP_SYMBOL'ing
3078         * fixed indentation, compacted switch-statements
3079         * (allocReg): find free register and allocate it instead of
3080           allocating new registers all the time
3081         * (deassignLRs): prevent POINTER_GET's from being assigned the same
3082           registers as its operands (necessary only for multibyte GETs)
3083
3084 2005-07-01 Raphael Neider <rneider AT web.de>
3085
3086         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
3087           debugging .asm-output macros FENTRY + FEXIT
3088         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
3089           way... I wonder...
3090         * (emitpComment): NEW, printf to pCode
3091         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
3092           offset handling
3093         * (popGetAddr): NEW, variant of popGet to access an immediates
3094           high(er) bytes instead of the n'th byte of memory they reference,
3095           replaced popGet with popGetAddr where neccessary
3096         * (genDataPointerGet): reactivated and fixed implementation
3097         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
3098           accesses
3099         * (genDataPointerSet): fixed multibyte assignments
3100         * (genpic14Code): fixed --i-code-in-asm handling
3101         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
3102         * (genPlus): fixed index-out-of-bounds error
3103         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
3104         * src/pic/ralloc.c: added debugging output macro FENTRY2
3105         * (spillThis): fixed indentation, enbraced for-body for clarity
3106         * (rematStr): commented out as now unused
3107         * (regTypeNum): commented out special spill case (overwrites
3108           arbitrary values)
3109         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
3110
3111 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
3112
3113         * doc/sdccman.lyx: documented sfr16/sfr32,
3114           added example for using storage class with function pointers
3115         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
3116
3117 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
3118
3119         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
3120         * device/lib/_itoa.c,
3121         * device/lib/_ltoa.c: optimized codesize
3122         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
3123           but don't know how to suppress the double warning.
3124         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
3125         * support/Util/SDCCerr.c,
3126         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
3127
3128 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
3129
3130         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
3131           fixed old K&R prototypes
3132         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
3133         * device/lib/_gptrget.c,
3134         * device/lib/_gptrgetc.c,
3135         * device/lib/_gptrput.c: changed versions for new memory indicator values,
3136           also new versions for small generic pointers and banked generic pointers
3137         * src/port.h: added const_name
3138         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
3139         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
3140         * src/SDCCcse.c (findPrevIc): check all associative operators
3141         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
3142         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
3143         * src/SDCCmem.c: updated comments,
3144           set far-space to 0 for pdata, results in optimized code
3145         * src/SDCCmem.h: added macro CONST_NAME
3146         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
3147           moving the info into the highest bits, see also gptrget/gptrput
3148         * src/src.dsp: added sdcc.ico to project files
3149         * src/avr/gen.c (genCast): fixed bug 0x%d
3150         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
3151         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
3152           relation between ptr_type and DCL_TYPE,
3153           (genCast): fixed bug 0x%d
3154         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
3155           (CODE)" for const_name
3156         * src/hc08/gen.c (genCast): fixed bug 0x%d
3157         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
3158           (hc08_port): added "CONST (CODE)" for const_name
3159         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
3160           (aopForRemat, adjustArithmeticResult): disconnected direct relation
3161           between ptr_type and DCL_TYPE,
3162           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
3163           operand* and took AOP() inside function so sfr-ness can be checked,
3164           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
3165           new prototype,
3166           (genFunction, genEndFunction): optimized stack setup,
3167           (genMinus): optimized for literals with ending zeroes (in bytes),
3168           (genCast): fixed bug 0x%d
3169         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
3170           (mcs51_port): added "CONST (CODE)" for const_name
3171         * src/mcs51/peeph.def: made rule 226 more generic
3172         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
3173         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
3174         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
3175         * src/z80/main.c (z80_port): added NULL for const_name,
3176           (gbz80_port): added NULL for const_name
3177         * support/regression/tests/bug663539.c,
3178         * support/regression/tests/sfr16.c: new tests
3179
3180 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3181
3182         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
3183
3184 2005-06-24 Raphael Neider <rneider AT web.de>
3185
3186         * device/lib/pic16/libdev/pic18f[68][567]20.c:
3187           corrected typos...
3188         * device/include/pic16/signal.h: added USBIF
3189           and SIG_USB
3190
3191 2005-06-24 Raphael Neider <rneider AT web.de>
3192
3193         * device/lib/pic16/libdev/pic18f2455.c,
3194           device/include/pic16/pic18f2455.h: NEW
3195         * device/include/pic16/pic18fregs.h,
3196           device/lib/pic16/pics.all,
3197           src/pic16/device.c: added 18f2455
3198         * device/lib/pic16/libdev/pic18f[68][567]20.c,
3199           device/include/pic16/{pic18f[68][567].h,usart.h}:
3200           replaced MULTIPLE_USARTS define with more relaible
3201           compatibility sfrs (for USART access)
3202
3203 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
3204
3205         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
3206           and the output asm file line is printed on two lines.
3207
3208 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3209
3210         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
3211           BGT, BLE, BHI, and BLS instructions
3212         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
3213           genCmpEq): removed
3214         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
3215           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
3216           fixes bug #1216342
3217         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
3218
3219 2005-06-15 Raphael Neider <rneider AT web.de>
3220
3221         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
3222         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
3223         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
3224           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
3225           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
3226
3227 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3228
3229         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
3230           Marcel Telka in bug #1215704
3231
3232 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
3233
3234         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
3235           located in shared memory bank.
3236
3237 2005-05-31 Raphael Neider <rneider AT web.de>
3238
3239         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
3240           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
3241           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
3242
3243 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
3244
3245         * device/lib/_strncpy.c: fixed the fix
3246
3247 2005-05-26 Raphael Neider <rneider AT web.de>
3248
3249         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
3250           initializers with \0, bug #1208187
3251         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
3252           intializers with \0, bug #1208187
3253
3254 2005-05-26 Raphael Neider <rneider AT web.de>
3255
3256         * src/pic16/glue.c (pic16_printIvalChar): fixed string
3257           initializers with \0, bug #1208187
3258         * src/pic16/main.c (_process_pragma): added sanity checks
3259           for stack position and size, emit warnings when appropriate
3260
3261 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
3262
3263         * device/lib/_strncpy.c: fixed not filling with \0
3264
3265 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3266
3267         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
3268           createFunction),
3269         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
3270           compound_statement),
3271         * src/SDCCsymt.h,
3272         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
3273
3274 2005-05-24 Raphael Neider <rneider AT web.de>
3275
3276         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
3277
3278 2005-05-24 Raphael Neider <rneider AT web.de>
3279
3280         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
3281           TRISE definitions, closes bug #1162453
3282
3283 2005-05-22 Raphael Neider <rneider AT web.de>
3284
3285         * src/pic16/main.c (_process_pragma): check for missing
3286           arguments to pragmas code and udata
3287         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
3288           consistency fixes to match other headers (thanks to Jim Paris)
3289         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
3290
3291 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
3292
3293         * src/SDCCicode.c (isOperandEqual): fixed missing ;
3294
3295 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
3296
3297         * support/regression/tests/bug1198642.c: new test
3298         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
3299         * src/SDCCcse.c (findPrevIc): added comment, please have a look
3300         * support/scripts/resource.h,
3301         * support/scripts/resource.rc,
3302         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
3303         * support/scripts/sdcc.ico: added 32x32 icon
3304
3305 2005-05-18 Raphael Neider <rneider AT web.de>
3306
3307         * device/lib/pic16/libdev/pic18f*.c,
3308         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
3309           keywords to "__sfr" and "__at (X)"
3310         * device/include/pic16/pic18fregs.h: added pic18f4520
3311         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
3312           #1203088 (MPLAB compatibility)
3313
3314 2005-05-17 Raphael Neider <rneider AT web.de>
3315
3316         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
3317         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
3318         * device/lib/pic16/pics.all: added new devices
3319         * src/pic16/device.c: added support for pic18f4520
3320
3321 2005-05-16 Raphael Neider <rneider AT web.de>
3322         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
3323         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
3324         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
3325           convenience function for bit access
3326
3327 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3328
3329         * device/lib/printf_large.c: fixed bug 1193299
3330         * support/regression/tests/bug1057979.c: added test %3.3s
3331
3332 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3333
3334         * device/include/mcs51/8051.h,
3335         * device/include/mcs51/8052.h: made parseable with lint
3336         * device/include/mcs51/lint.h: added include file for (sp)lint
3337         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
3338         * doc/cdbfileformat.lyx,
3339         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
3340
3341 2005-05-14 Raphael Neider <rneider AT web.de>
3342
3343         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
3344         * device/lib/pic16/libc/stdlib/itoa.c (new)
3345         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
3346         * device/lib/pic16/libio/Makefile: exclude subdir according to
3347           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
3348         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
3349         * src/pic16/gen.c (genFunction): prevent annoying warning
3350         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
3351           nameclashes on BeOS
3352         * support/cpp2/cppmain.c (cpp_output_string): new
3353         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
3354           fixes bug 1116802
3355
3356 2005-05-13 Borut Razem <borut.razem AT siol.net>
3357
3358         * src/SDCCmain.c (linkEdit): fixed bug 1195202
3359
3360 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3361
3362         * .version: changed to version 2.5.1; back to bleeding edge development
3363
3364 2005-05-11 Borut Razem <borut.razem AT siol.net>
3365
3366         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
3367           generate PDF version 1.3 documents
3368
3369 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3370
3371         * .version: changed to version 2.5.0
3372
3373 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3374
3375         * doc/sdccman.lyx: updated weblinks, index and smaller updates
3376
3377 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3378
3379         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3380         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3381         well as many smaller updates.
3382         * .version: changed to version 2.5.0-pre1
3383
3384 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3385
3386         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3387
3388 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3389
3390         * support/regression/tests/bug1185672.c: added
3391         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3392           bug 1185672
3393         * src/mcs51/gen.c (genCall): added comments, made it look safer
3394         * src/mcs51/gen.c (genEndFunction): simplified
3395
3396 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3397
3398         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3399
3400 2005-04-14 Borut Razem <borut.razem AT siol.net>
3401
3402         * fixed bug 1045046 - SIGSEGV with really simple code?:
3403           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3404           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3405
3406 2005-04-14 Borut Razem <borut.razem AT siol.net>
3407
3408         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3409           src/pic16/device.h: temporarily disabled experimental #inline pragma
3410           for 2.5.0 release
3411
3412 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3413
3414         * device/include/z80/stdio.h,
3415         * device/include/z80/string.h: removed these highly incomplete files so
3416           SDCC can use the default ones in device/include/
3417
3418 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3419
3420         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3421         gcc warning.
3422         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3423         fix sdcpp warnings.
3424
3425 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3426
3427         * device/include/malloc.h: removed redundant __reentrant prototypes
3428         * device/lib/_mullong.c: added working xstack variant in asm (C version
3429           doesn't pass regression tests)
3430         * device/lib/bpx.c: used __data and made bpx char for mcs51
3431         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3432           (createFunction): fixed bug with xstackPtr
3433         * src/SDCCcse.c: corrected comments
3434         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3435           (killDeadCode, eBBlockFromiCode): removed unused code
3436         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3437           corrected comments
3438         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3439           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3440           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3441           (genModOneByte): fixed warning in MSVC
3442         * src/mcs51/main.c (): added comments
3443         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3444
3445 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3446
3447         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3448
3449 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3450
3451         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3452
3453 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3454
3455         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3456         characters arrays of larger size than the declared one.
3457
3458 2005-04-10 Borut Razem <borut.razem AT siol.net>
3459
3460         * src/pic/gen.c (genInline),
3461           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3462           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3463           (findNextInstruction), (findPrevInstruction),
3464           (findInstructionUsingLabel),
3465           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3466         * src/pic/pcode.c (findLabel): added missing '\n'
3467         * src/src.dsp: added SDCCdwarf2.c to the project
3468
3469 2005-04-09 Borut Razem <borut.razem AT siol.net>
3470
3471         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3472
3473 2005-04-08 Raphael Neider <rneider AT web.de>
3474
3475         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3476           into the chain after a given one) and mergeDefmapSymbols (combine
3477           defmap entries for each symbol per pcode)
3478         * (createDefmap): have defmap entries merged in the end
3479         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3480           a symbol before replacing one access type's symbol, merge symbols in
3481           the end (replacement symbol might already have an entry)
3482         * (assignValnums): keep reference to written WREG intact
3483
3484 2005-04-08 Raphael Neider <rneider AT web.de>
3485
3486         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3487           Alpha)
3488
3489 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3490
3491         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3492         bytes
3493
3494 2005-04-07 Raphael Neider <rneider AT web.de>
3495
3496         * device/include/pic16/usart.h: added compatibility defines for
3497           devices with more than one USART
3498         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3499
3500 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3501
3502         * device/lib/Makefile.in: updated for port specific include
3503
3504 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3505
3506         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3507
3508 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3509
3510         * device/include/8051.h,
3511         * device/include/8052.h,
3512         * device/include/at89S8252.h,
3513         * device/include/at89c55.h,
3514         * device/include/at89x051.h,
3515         * device/include/at89x51.h,
3516         * device/include/at89x52.h,
3517         * device/include/mcs51reg.h,
3518         * device/include/reg51.h,
3519         * device/include/reg764.h,
3520         * device/include/regc515c.h,
3521         * device/include/sab80515.h: (re)moved these 12 files
3522         * device/include/mcs51/8051.h,
3523         * device/include/mcs51/8052.h,
3524         * device/include/mcs51/at89S8252.h,
3525         * device/include/mcs51/at89c55.h,
3526         * device/include/mcs51/at89x051.h,
3527         * device/include/mcs51/at89x51.h,
3528         * device/include/mcs51/at89x52.h,
3529         * device/include/mcs51/mcs51reg.h,
3530         * device/include/mcs51/reg51.h,
3531         * device/include/mcs51/reg764.h,
3532         * device/include/mcs51/regc515c.h,
3533         * device/include/mcs51/sab80515.h: and added them here
3534
3535 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3536
3537         * device/include/stdarg.h: changed SDCC specific keywords to double
3538           underlined form.
3539         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3540           mcs51 and ds390.
3541         * device/include/hc08/mc68hc908gp32.h,
3542         * device/include/hc08/mc68hc908jb8.h,
3543         * device/include/hc08/mc68hc908jkjl.h,
3544         * device/include/hc08/mc68hc908qy.h: fixed comments
3545         * device/include/mcs51/README: updated
3546         * device/include/mcs51/c8051f120.h: added PINRSF
3547         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3548         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3549           amidst code. Also inline is not supported.
3550
3551 2005-04-06 Raphael Neider <rneider AT web.de>
3552
3553         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3554         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3555           callers stack/frame pointers
3556
3557 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3558
3559         * device/include/pic16/usart.h: added, missing in previous commit,
3560         * device/include/pic16/adc.h: fixed typo,
3561         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3562         commit,
3563         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3564         <p18fxxx.inc>
3565         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3566         uninitialized because a bug appears with gplink
3567         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3568         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3569         complains for unrecognised option
3570
3571 2005-04-05 Raphael Neider <rneider AT web.de>
3572
3573         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3574           structs as well (using memcpy)
3575         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3576           on ISRs (GOTO has no label)
3577         * src/pic16/device.h: added OF_OPTIMIZE_DF
3578         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3579           new data flow analysis/optimization
3580         * src/pic16/pcode.c: added (prototypes for and implementation of)
3581           dataflow analysis functions, fixed pCodeInstructions' inCond and
3582           outCond values, made RCALL a branch instruction
3583         * (pic16_unlinkpCode): keep C line if possible
3584         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3585           C line moved if possible
3586         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3587         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3588           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3589         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3590           new flow)
3591         * (pic16_getJumptabpCode): NEW, needed in...
3592         * (LinkFlow): fixed handling of jumptables, calls and conditional
3593           branches
3594         * (pic16_InsertCommentAfter): NEW
3595         * (pic16_pCodeReplace): made verbose and flow preserving
3596         * (AnalyzeFlow): added call to data flow analysis
3597         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3598         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3599         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3600
3601 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3602
3603         * src/SDCCast.c (decorateType): fixed bug #1105626
3604
3605 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3606
3607         * device/include/asm/pic16/features.h,
3608         * pic18f*.h headers,
3609         * device/include/pic16/adc.h,
3610         * device/include/pic16/delay.h,
3611         * device/include/pic16/i2c.h,
3612         * device/include/pic16/malloc.h,
3613         * device/include/pic16/stdio.h,
3614         * device/include/pic16/stdlib.h,
3615         * device/include/pic16/string.h,
3616         * device/lib/pic16/libc/stdio/printf_tiny.c,
3617         * device/lib/pic16/libc/stdio/printf_small.c,
3618         * device/lib/pic16/libc/stdio/strmgpsim.c,
3619         * device/lib/pic16/libc/stdio/strmmssp.c,
3620         * device/lib/pic16/libc/stdio/strmusart.c,
3621         * device/lib/pic16/libc/stdio/vfprintf.c,
3622         * device/lib/pic16/libc/stdlib/ltoa.c,
3623         * device/lib/pic16/libc/stdlib/putchar.c,
3624         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3625         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3626         * device/lib/pic16/libc/stdlib/memchrram.c,
3627         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3628         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3629         * device/lib/pic16/libio/adc/adcbusy.c,
3630         * device/lib/pic16/libio/adc/adcread.c,
3631         * device/lib/pic16/libio/adc/adcsetch.c,
3632         * device/lib/pic16/libio/usart/ubaud.c,
3633         * device/lib/pic16/libio/usart/ubusy.c,
3634         * device/lib/pic16/libio/usart/udrdy.c,
3635         * device/lib/pic16/libio/usart/uopen.c,
3636         * device/lib/pic16/libio/usart/uputc.c,
3637         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3638         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3639         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3640         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3641         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3642         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3643         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3644         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3645         specific keywords to double underlined form,
3646         * device/lib/pic16/libc/Makefile.rules,
3647         * device/lib/pic16/libsdcc/Makefile.rules,
3648         * device/lib/pic16/libm/Makefile,
3649         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3650         to compile with C standard set in Makefile.common
3651         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3652         rand.c and crc.c in compilation process,
3653         * device/lib/pic16/libsdcc/int/divuint.c,
3654         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3655         `c' from signed to unsigned,
3656         * device/lib/pic16/startup/crt0.c,
3657         * device/lib/pic16/startup/crt0i.c,
3658         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3659         keywords to double underlined form, bug fixes in _do_cinit function
3660         which prevented the correct initialization of the .idata segment,
3661         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3662         core to enter a infinite loop
3663         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3664
3665 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3666
3667         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3668
3669 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3670
3671         * device/include/Makefile.in: add support for hc08 subdirectory
3672         * device/include/hc08/: new subdirectory
3673         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3674         Lucas Loizaga, thanks!
3675         * device/include/hc08/mc68hc908qy.h,
3676         * device/include/hc08/mc68hc908gp32.h,
3677         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3678         their own directory. Changed internal macro names to use the compiler
3679         reserved namespace. Changed SDCC specific keywords to double
3680         underlined form.
3681         * device/include/math.h,
3682         * device/include/malloc.h,
3683         * device/include/stdarg.h,
3684         * device/include/stdbool.h
3685         * device/include/string.h,
3686         * device/include/tinibios.h,
3687         * device/include/ds400rom.h,
3688         * device/include/8051.h,
3689         * device/include/8052.h,
3690         * device/include/80c51xa.h,
3691         * device/include/at89c55.h,
3692         * device/include/at89S8252.h,
3693         * device/include/at89x51.h,
3694         * device/include/at89x52.h,
3695         * device/include/ds80c390.h,
3696         * device/include/reg764.h,
3697         * device/include/regc515c.h,
3698         * device/include/sab80515.h,
3699         * device/include/mcs51/c8051f000.h,
3700         * device/include/mcs51/c8051f018.h,
3701         * device/include/mcs51/c8051f020.h,
3702         * device/include/mcs51/c8051f040.h,
3703         * device/include/mcs51/c8051f060.h,
3704         * device/include/mcs51/c8051f120.h,
3705         * device/include/mcs51/c8051f300.h,
3706         * device/include/mcs51/c8051f310.h,
3707         * device/include/mcs51/c8051f320.h,
3708         * device/include/mcs51/c8051f330.h,
3709         * device/include/mcs51/c8051f350.h,
3710         * device/include/z180.h: Changed SDCC specific keywords to double
3711         underlined form.
3712
3713 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3714
3715         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3716         18F4455,
3717         * (pic16_assignConfigWordValue): disable testing of configuration
3718         register value with config mask,
3719         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3720         function with port->fun_prefix,
3721         * (genFunction): when generating a naked interrupt function never
3722         create an absolute segment placed in interrupt vector address, place
3723         the actual interrupt function at IVA instead, when an interrupt
3724         function is generated with unspecified interrupt then do not create
3725         the absolute section,
3726         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3727         code for generating a call to generic pointer get/put function with
3728         a call to function pic16_callGenericPointer(),
3729         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3730         the call to the generic pointer get/put functions with prefixing the
3731         function name with port->fun_prefix,
3732         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3733         * src/pic16/main.c (_process_pragma): prefix function with
3734         port->fun_prefix,
3735         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3736         calling assembler, old 18Fxxxx macro is deprecated,
3737         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3738         PC_ASMDIR in while condition,
3739         * (findInstruction): add PC_ASMDIR in while condition,
3740         * (buildCallTree): prefix main with port->fun_prefix,
3741         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3742         identifier for variable with banked access in instructions BTFSS,
3743         BTFSC, BCF, BSF, BTG
3744         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3745         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3746         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3747         perform optimization when enviroment variable NO_REG_OPT is set,
3748         * (insideLRBlock): NEW, return 1 if register is inside an
3749         INF_LOCALREGS block,
3750         * (RemoveRegFromLRBlock): remove a register that is completely
3751         eliminated by register optimization, but it is still left in local
3752         register store/restore in/from stack block,
3753         * (Remove2pcodes): after removing register, check to see if it
3754         should be removed from local register store/restore in/from stack
3755         block,
3756         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3757         DUMMY_READ_VOLATILE,
3758
3759         * device/include/pic16/adc.h: minor prototype modifications and
3760         update,
3761         * device/include/pic16/malloc.h: added GPL notice various
3762         modifications,
3763         * device/include/pic16/stdint.h: NEW, standard header for ints
3764         * device/include/pic16/delay.h: NEW, header for delay functions,
3765         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3766         delay1mtcy,
3767         * device/include/pic16/signal.h: NEW, header providing helper macros
3768         for implementing signal handlers,
3769         * device/include/pic16/stdio.h: added prototypes for functions,
3770         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3771         prototypes for stdin and stdout, added macro PUTCHAR to
3772         automatically implement putchar function prototype,
3773         * device/include/pic16/usart.h: modified and updated USART library,
3774         * device/lib/pic16/libio/adc/,
3775         * device/lib/pic16/libio/i2c: some modifications to improve library
3776         performance,
3777         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3778         family of functions,
3779         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3780         family of functions and other sources,
3781         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3782         of the PIC18Fxx[28] devices,
3783         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3784         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3785         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3786         _do_cinit function, because the previous failed when local variables
3787         where not placed in the same memory bank,
3788         * device/lib/pic16/libsdcc/char/: various modifications to improve
3789         library performance,
3790         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3791         information on the new functions of the c library and more...
3792
3793 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3794
3795         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3796
3797 2005-03-26 Raphael Neider <rneider AT web.de>
3798
3799         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3800           if condition == CARRY)
3801         * (genCmp): adapted to new genSkipc semantics
3802         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3803           on rIfx (genCmp was broken)
3804
3805 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3806
3807         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3808         * src/z80/main.c (_keywords[]),
3809         * src/SDCCglobal.h (struct options),
3810         * src/SDCC.y,
3811         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3812         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3813         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3814         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3815         always available in leading double underscore form. The C99 support is
3816         mostly missing, but it's a start.
3817         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3818         reserved identifier "__data".
3819
3820 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3821
3822         * src/mcs51/peeph.def: fixed bug 1170013
3823
3824 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3825
3826         * device/include/mcs51reg.h: fixed bug 842007
3827
3828 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3829
3830         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3831         last time.
3832
3833 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3834
3835         * src/port.h (struct PORT),
3836         * src/avr/ralloc.c (avr_assignRegisters),
3837         * src/avr/main.c,
3838         * src/ds390/ralloc.c (ds390_assignRegisters),
3839         * src/ds390/main.c,
3840         * src/hc08/ralloc.c (hc08_assignRegisters),
3841         * src/hc08/main.c,
3842         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3843         * src/mcs51/main.c,
3844         * src/pic/ralloc.c (pic14_assignRegisters),
3845         * src/pic/main.c,
3846         * src/pic16/ralloc.c (pic16_assignRegisters),
3847         * src/pic16/main.c,
3848         * src/xa51/ralloc.c (xa51_assignRegisters),
3849         * src/xa51/main.c,
3850         * src/z80/ralloc.c (z80_assignRegisters),
3851         * src/z80/ralloc.h,
3852         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3853         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3854         * src/SDCCcse.h,
3855         * src/SDCCdflow.c (computeDataFlow),
3856         * src/SDCCdflow.h,
3857         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3858         * src/SDCCloop.h,
3859         * src/SDCCcflow.c (*),
3860         * src/SDCCcflow.h,
3861         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3862         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3863         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3864         immedDom() returning wrong block; probably fixes bug #1160833)
3865
3866 2005-03-20 Borut Razem <borut.razem AT siol.net>
3867
3868         * support/scripts/inc2h.pl: WIN32 port
3869
3870 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3871
3872         * device/lib/makefile.in: added abs.c and labs.c
3873
3874 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3875
3876         * device/include/stdint.h: added
3877         * device/lib/abs.c: added
3878         * device/lib/labs.c: added
3879         * device/include/stdlib.h: added abs() and labs() prototypes
3880         * device/lib/libsdcc.lib: added abs and labs
3881         * device/include/float.h,
3882         * device/lib/_fsmul.c,
3883         * device/lib/printf_fast.c,
3884         * device/lib/printf_tiny.c: updated comments
3885
3886 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3887
3888         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3889         bug #1164313
3890
3891 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3892
3893         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3894         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3895
3896 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3897
3898         * device/lib/printf_large.c: removed inline assembly for portability and
3899           readability. Use printf_fast if speed or size are more important.
3900         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3901         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3902
3903 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3904
3905         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3906         prevent compiler warning
3907
3908 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3909
3910         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3911         moved to level 0 and declared as static. Also they are explicit
3912         placed in access bank. This was necessery because some times they
3913         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3914         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3915         optimizations. Currently only compare to unsigned char is implemented,
3916         * src/pic16/gen.c: added fReturnIdx array,
3917         * (struct resolvedIfx) is moved to gen.h and made public,
3918         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3919         * (aopForSym): added an optimization to directly store in stack of
3920         the operand of a SEND iCode,
3921         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3922         but as registers instead (AOP_REG) using the fReturnIdx array,
3923         * (pic16_freeAsmop): remove the freed register from the
3924         _G.sregsAlloc field,
3925         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3926         a compare of 'WREG',
3927         * (pic16_popGetTempRegCond): changed function prototype, now
3928         function takes also a bitVector argument v which holds the current
3929         set of registers that are allocated for stack access by aopForSym,
3930         registers allocated in aopForSym for accessing stack symbols are not
3931         any more part of the functions usedRegs field,
3932         * (genCall): some times aopOp is called for a stack variable to be
3933         send, aopForSym might perform the push, if this is true make sure
3934         that genCall doesn't push the variable twice by testing _G.resDirect,
3935         * (genFunction): changed testing for unspecified interrupt number
3936         from 256 to INTNO_UNSPEC,
3937         * modified selection scheme of frame pointer generation. Previously
3938         if function did use local registers a frame pointer was generated,
3939         now a frame pointer is generated only if function has arguments
3940         (that need PLUSW2 register access), or has stack arguments, or the
3941         compiler is not instructed to omit the frame pointer,
3942         * (genEndFunction): before restoring local registers that were saved
3943         in the function preamble, also restore the registers that *might*
3944         have been allocated for stack access,
3945         * (genRet): removed some old comments,
3946         * (genCmp, the active (RN's) version): added a call to the
3947         pic16_genCmp_special function to perform the compare with a more
3948         robust and optimized way,
3949         * (genInline): a feature has been added in inline code generation,
3950         which allows a wildcard variable substitution when writing inline
3951         assembly. Code is incomplete and experimental therefore undocumented,
3952         * (genCast): changed order of aopOp for result and right to allow
3953         aopForSym to directly load the result if possible,
3954         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3955         perform an optimized compare on some selected special occasions,
3956         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3957         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3958         generate an IVT any more,
3959         * src/pic16/main.c (pic16_optionsTable): added command line option
3960         --optimize-cmp,
3961         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3962         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3963         macros,
3964         * src/pic16/NOTES: Raphael Neider added in list of active developers
3965         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3966         jumptable_end to prevent bug #,
3967         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3968         inCond and outCond fields,
3969         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3970         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3971         turn off register spilling,
3972         * (packRegsForOneUse): synced with other ports' versions although it
3973         is not used currently,
3974         * (pic16_packRegisters): added an optimization while reading
3975         structure bitfields, some registers may be saved (malloc code is
3976         decreased by 80 bytes)
3977
3978 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3979
3980         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3981         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3982         this can be optimized more?
3983
3984 2005-03-10 Raphael Neider <rneider AT web.de>
3985
3986         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3987           genNearPointerGet): (hopefully) fixed access to bitfields via
3988           pointers (p->bitN = x; and x = p->bitN; failed)
3989
3990 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3991
3992         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3993
3994 2005-03-09 Raphael Neider <rneider AT web.de>
3995
3996         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3997
3998 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3999
4000         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
4001         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
4002           (regTypeNum): set REG_BIT type if necessary
4003         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
4004         * support/regression/tests/critical.c: check bug 1144613
4005
4006 2005-03-02 Raphael Neider <rneider AT web.de>
4007
4008         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
4009
4010 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4011
4012         * src/avr/ralloc.c (serialRegAssign),
4013         * src/ds390/ralloc.c (serialRegAssign),
4014         * src/hc08/ralloc.c (serialRegAssign),
4015         * src/mcs51/ralloc.c (serialRegAssign),
4016         * src/pic/ralloc.c (serialRegAssign),
4017         * src/pic16/ralloc.c (serialRegAssign),
4018         * src/xa51/ralloc.c (serialRegAssign),
4019         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
4020
4021 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
4022
4023         * src/SDCCast.c (decorateType): fixed bug 1124787
4024
4025 2005-02-20 Hubert Sack <sack AT digiplan.de>
4026         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4027
4028         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
4029         patch #1121755
4030
4031 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4032
4033         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
4034         to keep the correct label reference count when adding/removing references
4035         to labels. A peephole file using this is appended to patch #1144962.
4036
4037 2005-02-14 Raphael Neider <rneider AT web.de>
4038
4039         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
4040         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
4041         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
4042           retrievals of result operand's value on assignment
4043
4044 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
4045
4046         * device/include/pic16/string.h: modified prototype for memccpy()
4047         to memccpy(void *, void *, char, size_t)
4048         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
4049         check whether to omit frame pointer or not,
4050         * (genInline): convert all occurences of "\n" to LF in inline
4051         assembler blocks, this helps formatting the inline text,
4052         * (pic16_loadFSR0): modified prototype,
4053         * (genNearPointerGet, genNearPointerSet): reorganization of code,
4054         removed some 8051 legacy code,
4055         * (genPackBits): enabled handling bitfields exceeding one byte in size,
4056         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
4057         before allocating temporary registers in functions,
4058
4059 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
4060
4061         * support/regression/tests/bitvars.c: corrected the "fix"
4062
4063 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
4064
4065         * support/regression/tests/bitvars.c,
4066         * support/regression/tests/bitwise.c,
4067         * support/regression/tests/rotate.c: "fixed" problems on Alpha
4068
4069 2005-02-10 Raphael Neider <rneider AT web.de>
4070
4071         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
4072           different size for Alpha
4073         * src/pic16/gen.c (genCmpEq) : improved compare with 0
4074
4075 2005-02-09 Raphael Neider <rneider AT web.de>
4076
4077         * src/SDCC.lex(doPragma) : save and restore warning options as well
4078           (also added new stack plus clone- and copyAndFreeSDCCERRG())
4079         * have #pragma less_pedantic set the errorlevel to WARNING
4080           (fixes #1117001)
4081         * (cloneOptimize) : fixed wrong malloc's size
4082         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
4083           facilitate correct handling of #pragma (save|restore)
4084
4085 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
4086
4087         * src/mcs51/gen.c: removed non-standard C nameless struct/union
4088
4089 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
4090
4091         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
4092
4093 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
4094
4095         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
4096
4097 2005-02-02 Raphael Neider <rneider AT web.de>
4098
4099         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
4100         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
4101         * (pic16_storeForReturn): fixed to allow returning function pointers
4102         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
4103         * device/include/pic16/{stddef.h,stdbool.h}: added
4104
4105 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
4106
4107         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
4108
4109 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
4110
4111         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
4112         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
4113          appeared to be required
4114
4115 2005-01-31 Borut Razem <borut.razem AT siol.net>
4116
4117         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
4118           include/mcs51 and include/z80 directories to the package
4119
4120 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4121
4122         * src/hc08/gen.c (genFunction): fixed bug #1112752
4123
4124 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4125
4126         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
4127
4128 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4129
4130         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
4131
4132 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
4133
4134         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
4135
4136 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
4137
4138         * device/include/c8051fxxx.h: removed these 6 files
4139         * device/include/mcs51/c8051fxxx.h: added these 11 new files
4140
4141 2005-01-26 Raphael Neider <rneider AT web.de>
4142
4143         * src/pic16/gen.c (genAssign): fixed assignment from longs
4144           in codespace (were cut to three bytes)
4145         * (genDummyRead): implemented (except for CODESPACE...),
4146           fixed bug #1108575
4147         * src/pic16/glue.c (emitStatistics): beautified
4148         * device/lib/pic16/libm/Makefile: added include path
4149
4150 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4151
4152         * src/z80/gen.c (aopPut): fixed bug #1103902
4153
4154 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4155
4156         * device/lib/expf.c: fixed bug #1095792
4157
4158 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
4159
4160         * device/lib/pic16/libm: added Math library sources
4161
4162 2005-01-24 Raphael Neider <rneider AT web.de>
4163
4164         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
4165           to enable upcast to pCodeOpReg2 (there is no type tag to
4166           differenciate the two and pic16_popGet2p cast into PCOR2)
4167         * src/pic16/main.c (_process_pragma): fixed another malloc bug
4168           (sizeof(sectNames) changed to sizeof(sectName))
4169           Both patches fix segfaults under MinGW.
4170
4171 2005-01-23 Raphael Neider <rneider AT web.de>
4172
4173         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
4174           Safe_[mc]?alloc()'ed variables
4175         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
4176           of (byte sized) temporaries (assign them to WREG for now)
4177         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
4178           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
4179           this might fix SIGSEGVs on MinGW...
4180         * src/SDCCopt.c (killDeadCode): restored original behaviour
4181           (volatile operands might get thrown away though)
4182
4183 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
4184
4185         * src/pic16/gen.c: fixed bug #1106975,
4186         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
4187         pointer update, INTCON is saved, global interrupts are disabled and
4188         restored after updateing TOS.
4189         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
4190         * added function attribute 'shadowregs' to take advantage of shadow
4191         registers,
4192         * added function attribute 'wparam' as an alternative to the wparam
4193         pragma,
4194         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
4195         user declares a non-ISR function as 'shadowregs',
4196         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
4197
4198 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
4199
4200         * .version: bumped version number to 2.4.8
4201         * device/lib/pic16/pics.all: list of PIC18F devices supported by
4202         pic16 port,
4203         * device/lib/pic16/libio/i2c/: I2C module support library,
4204         * device/include/pic16/i2c.h: I2C support library header,
4205         * device/lib/pic16/libc/stdio/: standard IO support sources,
4206         * (printf_small.c): printf_small() source, supports float print,
4207         * (printf_tiny.c): printf_tiny() source, does not support floats,
4208         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
4209         enable global optimizations for entire library source, other
4210         Makefiles in the source tree are also modified to reflect this,
4211         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
4212         function,
4213         * doc/sdccman.lyx: updated to reflect new changes,
4214         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
4215         sym->onStack if-case,
4216         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
4217         sbit, idata, _idata, xdata, _xdata,
4218         * added pragma library, to link an external library, (see doc),
4219         * removed command line options, --pomit-config-words, --pomit-ivt,
4220         --pleave-reset-vector,
4221         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
4222         when calling assembler to reflect memory model used, also define
4223         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
4224         reflect stack model used,
4225         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
4226         on stack return NULL,
4227
4228 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4229
4230         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
4231           of the operands is volatile. Fixes #1020220
4232
4233 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4234
4235         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
4236         * (OptimizeRegUsage): make sure that there is really no other flow where
4237           the first pCode is used
4238
4239 2005-01-22 Raphael Neider <rneider AT web.de>
4240
4241         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
4242           to fix #1106967 (pCode->seq are not set up correctly)
4243
4244 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4245
4246         * src/SDCCglue.c (glue): make sure code area is declared before the
4247         static initialization area.
4248
4249 2005-01-21 Raphael Neider <rneider AT web.de>
4250
4251         * device/lib/Makefile.in: fixed test for pic16 install dir
4252         * device/lib/pic16/*/Makefile*: modified compile flags to enable
4253           optimizations
4254         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
4255           added --optimize-goto compiler switch and pragma wparam documentation
4256         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
4257         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
4258           and PRODH closing bug #1071770 (peephole optimizer)
4259
4260 2005-01-19 Raphael Neider <rneider AT web.de>
4261
4262         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
4263           cmdLine buffers (used when calling sdcpp...) are large enough
4264           (MAX_PATH=256 truncates arguments leading to system halts when
4265           used in MinGW...)
4266         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
4267         * (genUminus): rewritten to for efficiency
4268         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
4269           used uninitialized in some cases)
4270         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
4271           copy the third byte from the int -- now assumes 0x80 (data memory)
4272         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
4273           operands (genAddLit expects the iCode's operands to swapped as
4274           well), fixed leftover bytes (crashed for short left operands)
4275         * (pic16_genMinusDec): performance improvements, removed false
4276           PIC14 emitSKPNCs
4277         * (pic16_genMinus): fixed to cope with differently sized operands
4278         * src/pic16/glue.c (pic16_glue): added new banksel optimization
4279           for --obanksel > 1
4280         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
4281         * src/pic16/graph.[ch]: implementation of directed graphs, used by
4282           new banksel optimization
4283         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
4284           analysis for temporary registers (segfaults...)
4285         * src/pic16/peeph.def: added rule
4286
4287 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
4288
4289         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
4290         which converts a float number to its ASCII representation
4291         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
4292         functions to convert the fractional and integer part of a float to ASCII,
4293         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
4294         realloc.c): added _MALLOC_SPEC to explicit place variables in data
4295         ram
4296         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
4297         _STATMEM macros,
4298         * device/include/pic16/adc.h: added GPL info,
4299         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
4300         a pCodeOp as tested operand,
4301         * (genNearPointerGet): optimized bit testing, does not use
4302         intermediate register for bit value, test directly instead with
4303         BTFSS, BTFSC, works only for single bits,
4304         * (genpic16Code): dump the name of the iCode in the asm,
4305         * src/pic16/ralloc.c (decodeOp): removed static declaration and
4306         renamed to pic16_decodeOp,
4307         * (serialRegAssign): do not allocate a temporary register for iCode
4308         sequences that test a single bit for 1/0
4309
4310 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
4311
4312         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
4313         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
4314         access stack and frame pointers. They are initially assigned to
4315         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
4316         accessing SFRs. Updated all occurences of modification of stack or
4317         frame pointer in gen.c and pcode.c,
4318         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
4319         assigning of a literal value to pointers,
4320         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
4321         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
4322         selected
4323
4324 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4325
4326         * doc/sdccman.lyx: update documentation about stack pragma, added
4327         some info for stack memory models
4328
4329 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4330
4331         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
4332
4333 2005-01-08 Raphael Neider <rneider AT web.de>
4334
4335         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
4336           udata sections to fix bug #1097823
4337
4338 2005-01-05 Raphael Neider <rneider AT web.de>
4339
4340         * src/pic16/gen.c (genGenericShift): added handling of differently
4341           sized left operand and result
4342
4343 2005-01-04 Raphael Neider <rneider AT web.de>
4344
4345         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
4346         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
4347           to hold the condition bit)
4348         * added new version of genCmp (old code available via #define)
4349         * added new version of genShiftLeft/genShiftRight in a generic
4350           way, now supports shifting by negative values
4351         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
4352           shiftCount (expected by genGenericShift)
4353         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
4354         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
4355           dump
4356         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
4357           is an invalid literal too...)
4358
4359 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
4360
4361         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
4362         from Raphael Neider,
4363         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
4364         for 8-bit literals. This fixes some literal operands which are sign
4365         extended to 16-bits ints when instruction needs only 8-bits.
4366
4367 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
4368
4369         * device/lib/logf.c: added mcs51 assembly version
4370         * device/lib/expf.c: added mcs51 assembly version
4371         * device/lib/_logexpf.c: new shared asm code for expf and logf
4372         * device/include/math.h: add defines for assembly math library
4373         * device/lib/Makefile.in: build new _logexpf.c
4374         * device/lib/libfloat.lib: use new _logexpf.c
4375
4376 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4377
4378         * src/pic/device.c
4379         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4380           device types which have less than 0x7f registers.
4381
4382 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4383
4384         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4385
4386 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4387
4388         * device/lib/printf_fast.c: only build on supported arch.
4389         * device/lib/printf_tiny.c: only build on supported arch.
4390         * device/lib/printf_fast_f.c: only build if asm float lib
4391         * device/lib/_fsget1arg.c: only build if asm float lib
4392         * device/lib/_fsget2args.c: only build if asm float lib
4393         * device/lib/_fsnormalize.c: only build if asm float lib
4394         * device/lib/_fsreturnval.c: only build if asm float lib
4395         * device/lib/_fsrshift.c: only build if asm float lib
4396         * device/lib/_fsswapargs.c: only build if asm float lib
4397         * device/include/stdio.h: don't provide print_fast,
4398           print_fast_f, print_tiny prototypes if --xstack used
4399
4400 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4401
4402         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4403         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4404           to the SOURCES
4405
4406 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4407
4408         * device/lib/printf_fast_f.c: same as printf_fast, but
4409           with floating point enabled
4410         * device/lib/printf_fast.c: minor tweaks
4411         * device/include/stdio.h: add printf_fast_f
4412
4413 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4414
4415         * src/SDCCmain.c: make --float-reent default for mcs51
4416         * device/lib/_fsadd.c: added mcs51 assembly version
4417         * device/lib/_fssub.c: added mcs51 assembly version
4418         * device/lib/_fsmul.c: added mcs51 assembly version
4419         * device/lib/_fsdiv.c: added mcs51 assembly version
4420         * device/lib/_fseq.c: added mcs51 assembly version
4421         * device/lib/_fsneq.c: added mcs51 assembly version
4422         * device/lib/_fsgt.c: added mcs51 assembly version
4423         * device/lib/_fslt.c: added mcs51 assembly version
4424         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4425         * device/lib/Makefile.in: add _fscmp to build
4426         * device/lib/libfloat.lib: add _fscmp to build
4427
4428 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4429
4430         * device/lib/_fs2slong.c: added mcs51 assembly version
4431         * device/lib/_fs2sint.c: added mcs51 assembly version
4432         * device/lib/_fs2schar.c: added mcs51 assembly version
4433         * device/lib/_fs2ulong.c: added mcs51 assembly version
4434         * device/lib/_fs2uint.c: added mcs51 assembly version
4435         * device/lib/_fs2uchar.c: added mcs51 assembly version
4436         * device/lib/_slong2fs.c: added mcs51 assembly version
4437         * device/lib/_sint2fs.c: added mcs51 assembly version
4438         * device/lib/_schar2fs.c: added mcs51 assembly version
4439         * device/lib/_ulong2fs.c: added mcs51 assembly version
4440         * device/lib/_uint2fs.c: added mcs51 assembly version
4441         * device/lib/_uchar2fs.c: added mcs51 assembly version
4442         * device/include/float.h: added #define to select asm vs c
4443
4444 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4445
4446         * device/lib/printf_fast.c: improvements to float output
4447         * device/include/float.h: add defines for assembly float library
4448         * device/lib/_fsget1arg.c: receive 1 float arg
4449         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4450         * device/lib/_fsnormalize.c: normalize a float
4451         * device/lib/_fsreturnval.c: return float, various helper routines
4452         * device/lib/_fsrshift.c: right shift a float's mantissa
4453         * device/lib/_fsswapargs.c: swap 2 floats
4454         * device/lib/Makefile.in: build these 6 new files for mcs51
4455         * device/lib/libfloat.lib: add these 6 files to the library
4456
4457 2004-12-26 Borut Razem <borut.razem AT siol.net>
4458
4459         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4460           built by gcc 3.4.2
4461
4462 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4463
4464         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4465           and fully reentrant and register bank neutral.
4466         * device/lib/printf_fast.c: added float (not enabled by default),
4467           added compact/slower integer (also not enabled by default),
4468           improved size/speed of fast integer code, other minor changes
4469         * device/include/stdio.h, device/lib/Makefile.in,
4470           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4471
4472 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4473
4474         * src/pic16/pcode.c: declaring variables other than at the start of a
4475           block is not supported in C by VC6.
4476
4477 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4478
4479         * applied a previous patch from Raphael Neider that wasn't included
4480         in the previous commits, which fixes infinite loops within jumptable
4481         improvements,
4482         * made some fixes that previous patches introduced
4483
4484 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4485
4486         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4487         that fixes an issue with AOP_PCODE asmop's offset,
4488         * (pic16_popCopyReg): update instance field too,
4489         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4490         function of pic port,
4491         * (genCmp, genAnd, genAssign),
4492         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4493
4494 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4495
4496         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4497         variables initial values to idata section,
4498         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4499         variables in some functions. This utilizes parmBytes field of iCode
4500         structure to hold the offset of the variable in stack. (might be
4501         able to use the stack field too?)
4502         * applied patch from Raphael Neider # ### , # ###
4503         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4504         variable initial values in idata section,
4505         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4506         for static variables with initial value
4507         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4508         applied fix in while loop from Raphael Neider.
4509
4510 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4511
4512         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4513         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4514         * src/ds390/ralloc.c (serialRegAssign): spill bits
4515         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4516         * support/Util/SDCCerr.c,
4517         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4518         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4519         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4520
4521 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4522
4523         * device/include/sdcc-lib.h: inserted LGPL, added includes
4524           asm/ds390/features.h and asm/mcs51/features.h
4525         * device/include/asm/default/features.h,
4526         * device/include/asm/gbz80/features.h,
4527         * device/include/asm/z80/features.h: added empty _AUTOMEM
4528           and _STATMEM
4529         * device/include/asm/ds390/features.h,
4530         * device/include/asm/mcs51/features.h: added files with defines for
4531           _AUTOMEM and _STATMEM indicating automatic and static storage class
4532         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4533         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4534         * src/SDCCicode.c (geniCodeCast),
4535         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4536         * src/SDCCloop.c (loopInduction): removed unused variable lr
4537         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4538           to convertToFcall to include char modulo (RFE 1065037), added check
4539           if left operand is unsigned and use abs of literal value
4540         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4541           as it doesn't work after conversion from peephole.def to peephole.rul
4542         * src/mcs51/gen.c (toBoolean): added check for size,
4543           (genModOneByte): optimized code for signed char modulo a literal
4544           power of 2 (thanks to Hubert Sack),
4545           (genRRC): removed unnecessary "clr c",
4546           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4547         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4548           jump optimization,
4549           swapped rules 256.c and 256.d,
4550           extended 256.d by using new multiple checks (thanks Erik),
4551           added rules 256.e and 256.f,
4552           updated rule 261.a and 261.b to new generated code
4553         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4554
4555 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4556
4557         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4558           induction related bugs, including first part of bug #1074377
4559
4560 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4561
4562         * applied patch from bug-report #1076292,
4563         * applied patches for genAnd and Goto-optimizations for Raphael
4564         Neider,
4565         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4566         dump a less iCode information,
4567         * src/pic16/device.h (pic16_options_t): added field debgen,
4568         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4569         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4570         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4571         puclic,
4572         * (various functions): added macros FENTRY and FENTRY2 to functions,
4573         to emit function prologue,
4574         * (various functions): fixed indentation,
4575         * (genNearPointerGet): fixed loading of FSR0,
4576         * (genPackBits): applied patch from Raphael Neider to fix updating
4577         of FSR0 and touching only the modified bits,
4578         * src/pic16/genarith.c (various functions): added macros FENTRY to
4579         emit function prologue in comments,
4580         * src/pic16/pcode.h: added functions debugf2, debugf3,
4581         * src/pic16/ralloc.c: partial fix for packForPush caused
4582         segmentation fault,
4583
4584 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4585
4586         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4587           <stsp AT users.sourceforge.net> with reversed byte order
4588         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4589
4590 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4591
4592         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4593           bug #1074377
4594         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4595         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4596
4597 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4598
4599         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4600
4601 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4602
4603         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4604           conditions,
4605           (setFromConditionArgs): friendly operand parser for peephole rules,
4606           (operandBaseName, operandsNotRelated): new peephole condition
4607           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4608           architecture specific register naming into account, handles n-way
4609           comparisons, and supports quoted literals
4610         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4611
4612 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4613
4614         * src/mcs51/peeph.def: fixed bug #1076940
4615
4616 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4617
4618         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4619
4620 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4621
4622         Adding support for replacing ljmps with sjmps in jumptables
4623         generated for switch statements. For now you need to set the
4624         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4625         Now 4 algorithms for mcs51 jumptable generation are used:
4626         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4627         addresses loaded pc-relative for up to 112 cases and stack-pushing
4628         target addresses loaded with offset from dptr for up to 256 cases.
4629
4630         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4631         * src/mcs51/main.c: adapted constants for switch table generation
4632         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4633
4634 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4635
4636         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4637         * support/regression/tests/bug1057979.c: added test for bug 1073386
4638
4639 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4640
4641         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4642         compilers
4643
4644 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4645
4646         * src/pic16/device.h,
4647         * src/pic16/genarith.c,
4648         * src/pic16/glue.c,
4649         * src/pic16/main.c,
4650         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4651
4652 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4653
4654         Large cummulative patch for pic16 port.
4655         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4656         to call when a stack overflow occurs,
4657         * (malloc.h): added CVS Id tag,
4658         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4659         variable,
4660         * added libc directory. The current version of LibC contains string
4661         functions, ctype functions and macros and some functions of the
4662         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4663         be extensively tested in the future. Standard disclaimer here.
4664         Library is not automatically build yet. But one can build it by
4665         invoking 'make' inside the libc directory.
4666         * added ADC library under libio. Preliminary version yet.
4667
4668         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4669         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4670         aopForRemat() now and not by pic16_aopOp(),
4671         * (pic16_popGetTempReg): removed warning messgae when allocating
4672         temporary registers, its a buggy feature and will be removed,
4673         * (pic16_popGet): set register instance field in AOP_CRY,
4674         * (pic16_outBitC): fixed for results in size greater than 1,
4675         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4676         * (pic16_storeForReturn): optimized return of 0,
4677         * (genCmp): experimental code for new genCmp which uses PIC18's
4678         special compare&skip instructions. Initial tests fail some times
4679         with variables grater than 1 byte in size, so new code is disabled,
4680         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4681         a single bit,
4682         * (genCast): began a fix to optimize the casting of a bit to another
4683         bit, now assigning a bitfield to another bitfield will fail, sorry,
4684         * src/pic16/main.c: disabled the use of lr-support feature,
4685         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4686         * added some function prototypes, added function _debugf prototype,
4687         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4688         bits with offset (case PO_GPR_BIT),
4689         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4690         command line,
4691         * (isBankInstruction): modified to return 0 for no banking instruction,
4692         and 1 for banking instruction,
4693         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4694         caused stop processing pCodes after a inline assembly block,
4695         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4696         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4697         registers when it shouldn't,
4698         * src/pic16/ralloc.c (allocReg): add preliminary support for
4699         supporting a limited set of temporary registers,
4700
4701 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4702
4703         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4704           genDataPointerSet): ensure assignments always copy in MSB to LSB
4705           order,
4706           (loadRegFromAop): recognize CLRH optimization,
4707           (genFunction): optimize RECEIVE iCodes in reentrant functions
4708
4709 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4710
4711         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4712           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4713           selected.
4714         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4715         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4716           contiguous with data
4717
4718 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4719
4720         * device/lib/_gptrget.c (_gptrget),
4721         * device/lib/_gptrgetc.c (_gptrgetc),
4722         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4723           instead of sjmp to ret
4724         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4725           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4726
4727 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4728
4729         * .version: bumped version to 2.4.7
4730         * device/lib/_gptrget.c (_gptrget): is now _naked
4731         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4732         * device/lib/_gptrput.c (_gptrput): is now _naked
4733         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4734           (createFunction): fixed xstack
4735         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4736         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4737           or bit either,
4738           (geniCodeCritical): store original interrupt state in an iTemp bit
4739           var unless stack-auto
4740         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4741         * src/SDCCmain.c (setIncludePath): added include/target to search path
4742         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4743         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4744           prototype,
4745           (processFuncArgs): put bit vars in bit area
4746         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4747           unsaveRBank): fixed xstack,
4748           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4749           (genFunction, genEndFunction): fixed xstack,
4750           (genAssign): optimization don't walk backwards through mem
4751         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4752         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4753         * support/regression/Makefile: also make library (for stack-auto) when
4754           making "all" and added "test-mcs51-xstack-auto"
4755         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4756         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4757         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4758         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4759         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4760           make-library by MAKE_LIBRARY
4761         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4762           regression tests for xstack
4763         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4764         * support/regression/tests/critical.c: test for critical on mcs51
4765
4766 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4767
4768         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4769           built version of sdcc instead of installed version
4770
4771 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4772
4773         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4774         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4775           vprintf.c now
4776         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4777         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4778           WARNING: remove device/lib/build/z80/printf.o by hand when
4779           updating from previous build!
4780         * device/lib/z80/printf.c: updated comment
4781         * support/regression/tests/bug1057979.c: test all ports now
4782         * support/regression/tests/bug1065458.c: file added
4783
4784 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4785
4786         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4787           *_start and *_end symbols for static functions
4788
4789 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4790
4791         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4792           and search crt0.o in all library paths,
4793           (setIncludePath): proper handling of --nostdinc,
4794           (setLibPath): proper handling of --nostdlib
4795         * support/regression/Makefile,
4796         * support/regression/ports/ds390/spec.mk,
4797         * support/regression/ports/gbz80/spec.mk,
4798         * support/regression/ports/hc08/spec.mk,
4799         * support/regression/ports/mcs51/spec.mk,
4800         * support/regression/ports/mcs51-large/spec.mk,
4801         * support/regression/ports/mcs51-stack-auto/spec.mk,
4802         * support/regression/ports/z80/spec.mk: use include and lib files from
4803           built version of sdcc instead of installed version
4804         * doc/sdccman.lyx: fixed typo in --nostdinc
4805
4806 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4807
4808         * src/pic/pcode.c,
4809         * src/pic/device.c,
4810         * src/pic/ralloc.c,
4811         * src/pic/gen.c : added support to generate code for struct bit fields.
4812
4813 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4814
4815         * as/xa51/xa_version.h,
4816         * device/include/errno.h,
4817         * device/include/regc515c.h,
4818         * device/lib/_itoa.c,
4819         * device/lib/_ltoa.c,
4820         * device/lib/ser_ir_cts_rts.c,
4821         * sim/ucsim/xa.src/glob.cc,
4822         * sim/ucsim/xa.src/inst_gen.cc,
4823         * sim/ucsim/xa.src/xa_bit.cc,
4824         * sim/ucsim/xa.src/xa_sfr.cc,
4825         * sim/ucsim/z80.src/inst_dd.cc,
4826         * sim/ucsim/z80.src/inst_fdcb.cc,
4827         * support/scripts/keil2sdcc.pl,
4828         * src/pic16/pic16.dsp,
4829         * src/pic16/pic16a.dsp: corrected cvs line endings
4830         * device/lib/printf_large.c: fixed bug 1057979
4831         * src/pic16/gen.c: fixed non-C standard code
4832         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4833         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4834         * support/regression/ports/mcs51/support.c: reload T1 asap
4835         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4836           pdata use and clear idata startup behaviour
4837         * support/regression/tests/bug1057979.c: added
4838
4839 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4840
4841         * device/examples/ds390/ow390/ad26.h,
4842         * device/examples/ds390/ow390/cnt1d.h,
4843         * device/examples/ds390/ow390/crcutil.c,
4844         * device/examples/ds390/ow390/ownet.h,
4845         * device/examples/ds390/ow390/owsesu.c,
4846         * device/examples/ds390/ow390/swt12.h,
4847         * device/examples/ds390/ow390/swtoper.c,
4848         * device/examples/ds390/ow390/temp10.h,
4849         * device/examples/ds390/ow390/thermodl.c,
4850         * device/examples/ds390/tinitalk/tinitalk.dsp,
4851         * device/examples/ds390/tinitalk/tinitalk.dsw,
4852         * device/examples/mcs51/clock/hw.h,
4853         * device/examples/mcs51/simple2/go.bat,
4854         * device/examples/serialcomm/windows/serial.h,
4855         * device/examples/xa51/dummy.c,
4856         * device/examples/xa51/hello.c,
4857         * device/include/80c51xa.h,
4858         * device/include/at89x051.h: corrected cvs line endings
4859
4860 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4861
4862         * src/pic16/main.c (options): added command line --gstack, to trace
4863         stack over/under flows,
4864         * added pragma 'wparam' to allow passing first byte of function
4865         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4866         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4867         call to __gstack_test function and sets up the symbol as extern,
4868         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4869         * popaop): added call to pic16_testStackOverflow,
4870         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4871         wparamList list,
4872         * (genCall, genPcall): now all parameters are passed via stack
4873         except in functions that are pass to wparam pragma in which WREG is
4874         used too,
4875         * (genPcall): REENTRANT flag is checked to see if variable prototype
4876         contains reentrant keyword, don't call a non-reentrant function, via
4877         a reentrant function pointer or vice versa, functions are never
4878         passed via WREG,
4879         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4880         D.Winkler,
4881         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4882         SIGSEGV when accessing a NULL register stucture,
4883         * (pic16_printGPointerType): modified to handle UPPER modifier for
4884         function initializers, changed prototype of function to simpler one,
4885         * (pic16_printIvalFuncPtr): check to see if function is already
4886         added in externs list,
4887         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4888         optimized a move from W to SFR with a move to the same register
4889         later after a CALL,
4890         * device/lib/pic16/debug: NEW directory, contains debug features
4891         which are enabled when linking with libdebug.lib, currently command
4892         line option --gstack enables stack pointer tracing for over/under
4893         flow, corresponding sources are in debug/gstack
4894
4895 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4896
4897         * doc/sdccman.lyx: updated SDCC version,
4898         * (PIC16 port): update list of command line options,
4899         * src/pic16/device.h (structure pic16_options_t): added field gstack
4900         to enable stack overflow tracing on push/pops,
4901         * src/pic16/device.c (statistics structure): added statistics
4902         structure,
4903         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4904         pic16_dump_int_registers): increase statistics counters for each
4905         * variable which is encountered
4906         * (pic16_dump_usection): emit each .udata variable to its own udata
4907         section,
4908         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4909         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4910         parameters via stack, otherwise use old scheme,
4911         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4912         assembler output file,
4913         * src/pic16/main.c: added command line options --gstack to enable
4914         push/pop tracing for stack overflow,
4915         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4916         instructions): added size of each instruction,
4917         * (pic16_countInstruction): estimate size of instructions in
4918         the_pFile list, inline assembly blocks are not counted,
4919         * (pic16_FixRegisterBanking): trace previous register usage, when
4920         banksel optimizations is greater than 0, don't emit a redudant
4921         banksel directive,
4922
4923 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4924
4925         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4926         * src/pic16/ralloc.c : applied same fix for pic16.
4927         * src/pic/gen.c : tidied it up a little.
4928
4929 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4930
4931         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4932         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4933
4934 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4935
4936         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4937
4938 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4939
4940         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4941         non-reentrant function __modsint in the interrupt function (thus
4942         corrupting math operations during serial I/O)
4943         * device/lib/ser_ir.c: as above, changed buffersize
4944         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4945         256.c,d for zeroing
4946         * doc/Makefile: added option -t for rsync
4947
4948 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4949
4950         * src/SDCCast.h (struct ast),
4951         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4952
4953 2004-10-20 Borut Razem <borut.razem AT siol.net>
4954
4955         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4956         package
4957
4958 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4959
4960         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4961         makefile targets,
4962         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4963         support functions to replace long sequences of MOVFF's from access
4964         bank registers to stack and vice versa,
4965         * src/pic16/device.h: added new field opt_flags, where optimization
4966         flags can be set to enable certain features,
4967         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4968         * pBlock, (genFunction, genEndFunction): surroung loop for
4969         saving/loading used registers in stack with PC_INFO pCodes,
4970         INF_LREGS. Code in between can then be optimized by pCode optimizer
4971         to support function calls,
4972         * (genDataPointerSet): fixed bug which loaded float fields in
4973         structures with corrupt data,
4974         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4975         in a standard way debug info on stderr. Feature used for developing
4976         and debugging only,
4977         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4978         obsolete chunks of code,
4979         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4980         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4981         * pic16/src/pcode.c (pic16_newpCodeInfo,
4982         * (pic16_newpCodeOpLocalRegs),
4983         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4984         feature,
4985         * (pic16_pCodeConstString): printing of the initial value of a
4986         symbol as a comment is inhibited since parsing was already done by
4987         copyStr and output is corrupt,
4988         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4989
4990 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4991
4992         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4993
4994 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4995
4996         * as/mcs51/lkarea.c: removed old K&R style,
4997           (lnksect): changed check on boundary error,
4998           (lnksect2): changed check on boundary error,
4999           (lnksect2): extend XSTK to end of page if size = 1
5000         * as/mcs51/lkmain.c: removed old K&R style,
5001           (Areas51): create l_IRAM symbol
5002         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
5003         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
5004           model-mcs51-stack-auto, added model-mcs51-xstack-auto
5005         * device/lib/_mullong.c: added version to be compiled with xstack
5006         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
5007         * device/lib/mcs51/crtxclear.asm: clear pdata as well
5008         * device/lib/mcs51/crtxstack.asm: fixed comment
5009         * src/SDCCglue.c: maxInterrupts defaults to 0,
5010           (emitMaps): added pdata,
5011           (createInterruptVect): (re)moved default,
5012           (glue): added pdata,
5013           (glue): moved __start__xstack to XSTK with default size 1
5014         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
5015           and options.float_rent when options.stackAuto is set,
5016           (linkEdit): only write XDATA_NAME if provided on command line
5017         * src/SDCCmem.h,
5018         * src/SDCCmem.c: added pdata
5019         * src/port.h: added pdata_name to PORT
5020         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
5021           (saveRegisters, unsaveRegisters): removed usage of B,
5022           (genMinus): fixed accumulator clash,
5023           (genJumpTab): added comment, this needs another look
5024         * src/mcs51/gen.c: added check for "B in use" paranoia,
5025           added pushB() and popB()
5026         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
5027           chance
5028         * src/avr/main.c,
5029         * src/ds390/main.c,
5030         * src/hc08/main.c,
5031         * src/mcs51/main.c,
5032         * src/pic/main.c,
5033         * src/pic16/main.c,
5034         * src/xa51/main.c,
5035         * src/z80/main.c: (reset_regparms) made void parameter explicit and
5036           added PSEG (PAG,XDATA) or NULL to port specifier
5037         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
5038         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
5039           (_mcs51_genInitStartup): removed __start__xstack equ,
5040           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
5041         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
5042         * src/z80/gen.c (_rleAppend): fixed warnings
5043         * support/regression/tests/zeropad.c: added pdata test
5044         * .version: bumped to 2.4.6
5045
5046 2004-10-17 Borut Razem <borut.razem AT siol.net>
5047
5048         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
5049         as a part of nightly build
5050
5051 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
5052
5053         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
5054         WREG holds the first byte function parameters,
5055         * (aopForSym): take special case for symbols which are in FARSPACE
5056         but in CODESPACE too,
5057         * (assignResultValue): modified to take into account _G.useWreg,
5058         * (genCall): don't use wreg for parameter passing when function is
5059         declared as reentrant, too, added optimization INCF to stack
5060         pointer when stack parameter count is 1,
5061         * (genFunction, genEndFunction): refurnished and fixed to not using
5062         wreg for passing parameters when function has varargs or is
5063         reentrant, fixed bug with symbol name compare for generating
5064         functions in absolute address,
5065         * (pic16_storeForReturn): refurnished,
5066         * (genCmp): began writing a new version of the function, not ready
5067         yet, therefore it is disabled,
5068         * (genAssign): do not read code memory when assigning a function to
5069         a pointer function,
5070         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
5071         array of characters, not pointer,
5072         * (pic16initialComments): in debug mode emit an .ident directive for
5073         the assembler,
5074         * (_process_pragma): emit a new warning type (internal to pic16)
5075         when setting stack to default length, emit a similar warning when
5076         placing a function at absolute address and address is not word aligned
5077         * (_pic16_parseOptions): added 'return TRUE' statement,
5078         * (_pic16_linkEdit): if compiling a source, then add the source's
5079         file object, first in the list of objects to link,
5080
5081 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
5082
5083         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
5084         * src/pic/main.c : removed VC warning.
5085         * src/pic/gen.c : changed comment.
5086
5087 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
5088
5089         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
5090         reference to a deprecated symbol _GPTRREG was causing failure to
5091         link. Thanks G. M. Gallant for the info.
5092
5093 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
5094
5095         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
5096         comments for Bugs item #954788.
5097
5098 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
5099
5100         * src/pic16/device.c (pic16_dump_gsection,
5101         * pic16_groupRegistersInSection): handle symbols declared to be in
5102         access bank differently,
5103         * src/pic16/gen.c (struct _G): added field resDirect,
5104         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
5105         send values read from stack directly to result and don't allocate
5106         temporary values,
5107         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
5108         same registers,
5109         * (pic16_sameRegsOfs): NEW,
5110         * (freeAsmop): if _G.resDirect is set then do not mark registers as
5111         free because they were not allocated from temporary pool,
5112         * pic16_popRegFromString): workaround to fix a problem with
5113         allocating variables twice or never,
5114         * (genGenPointerGet): using PRODL instead of FSR0H,
5115         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
5116         instead of FSR0H,
5117         * (genAssign): take advantage of the _G.resDirect flag,
5118         * (genCast): around line 11844, use mov2f instead of directly
5119         MOVFF'ing between operands to account for literal values,
5120         * src/pic16/genutils.c: some new debug functions for gpsim have been
5121         added,
5122         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
5123         float with integer part only,
5124         * src/pic16/main.c (_process_pragma): handle pragma udata access to
5125         place variables in access bank
5126         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
5127         updated sources to reflect recent changes in gen.c
5128
5129 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
5130
5131         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
5132         sources that searched for headers in installation path, now the
5133         device/include/pic16 is used,
5134         * src/pic16/glue.c (pic16glue),
5135         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
5136         .line directives if not in debug mode, this suppresses assembler's
5137         warnings for ignored directives
5138
5139 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
5140
5141         * src/port.h: made reset_regparms prototype void parameter explicit.
5142         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
5143         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
5144         * doc/sdccman.lyx: documented warning disabling and how to use
5145           printf_large to make it print floats.
5146         * device/include/stdbool.h: NEW
5147         * device/lib/_atof.c,
5148         * device/lib/_divuint.c,
5149         * device/lib/_divulong.c,
5150         * device/lib/expf.c,
5151         * device/lib/printf_large.c,
5152         * device/lib/sincosf.c,
5153         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
5154         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
5155           a completely reentrant lib.
5156
5157 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
5158
5159         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
5160         * device/include/pic16/stdio.h: fixed bug with colon
5161
5162 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
5163
5164         * device/include/pic16/stdio.h,
5165         * device/include/pic16/stdlib.h,
5166         * device/include/pic16/math.h: NEW
5167         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
5168         declared as _naked to reduce overhead
5169         * device/lib/Makefile.in (target port-specific-objects-pic16):
5170         changed * to *.* so to ignore the CVS directory,
5171         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
5172         stacked variables back in stack,
5173         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
5174         corruption
5175
5176 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
5177
5178         * .version: bumped version number to 2.4.5
5179         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
5180         * support/Util/SDCCerr.c (messages structure): added entry for
5181         W_POSSBUG2
5182
5183         Large cumulative patch for pic16 port and libraries.
5184         * device/include/pic16/sdcc-lib.h,
5185         * device/include/pic16/stdarg.h,
5186         * device/include/asm/pic16/features.h,
5187         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
5188         * device/include/pic16/float.h: changes reentrant keyword with
5189         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
5190         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
5191         updated target build-libraries to include objects from gptr,
5192         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
5193         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
5194         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
5195         all function headings,
5196         * src/SDCCmain.c: added global parameter userIncDirsSet,
5197         * (parseCmdLine): when option -I is encountered add directory to
5198         userIncDirsSet too,
5199         * src/version.awk: added space between control and long,
5200         * src/pic16/NOTES: added some notes for the port,
5201         * src/pic16/gen.c: added prototype for mov2fp function,
5202         * (fReturnpic16[]): properly named return value registers,
5203         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
5204         * (aopForSym): added code to handle symbols with onStack flag set,
5205         symbols onStack are allocated PTRSIZE bytes,
5206         * (aopFreeAsmop): handles special case where asmops are stack objects,
5207         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
5208         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
5209         added argument lock to trace flaws in allocating temporary registers
5210         when developing port,
5211         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
5212         * (pic16_popRegFromString): reenabled allocating a direct register
5213         from string,
5214         * (assignResultValue): various beautifications,
5215         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
5216         referenced function argument,
5217         * (genIpush): reenabled to allow stacked arguments, handles only
5218         ic->parmPush iCodes,
5219         * (genCall, genPcall): major changes to allow for variable argument
5220         functions, fixed a bug with falsely restoring stack pointer after
5221         returning from call,
5222         * (genFunction): pending code for critical function,
5223         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
5224         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
5225         * (genNearPointerGet): fixed bug with indirect reading, was always
5226         reading from INDF0
5227         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
5228         pointers,
5229         * (genAddrOf): rewrote code to take address of a stacked function parameter
5230         * (genCast): fixed casting to generic pointer type,
5231         * src/pic16/gen.h: added AOP_STA,
5232         * (struct asmop): added field stk,
5233         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
5234         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
5235         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
5236         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
5237         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
5238         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
5239         generic pointers,
5240         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
5241         and library paths,
5242         * (pic16_port structure): generic pointer size is set to 3,
5243         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
5244         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
5245         compiler warning,
5246         * src/pic16/ralloc.c (allocReg): prevent allocating register when
5247         operand is an iTemp,
5248
5249 2004-09-24 Martin Helmling <mh AT octo-soft.de>
5250
5251         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
5252         * debugger/mcs51/simi.c: addapt new syntax of s51
5253
5254 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
5255
5256         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
5257         * src/pic16/pcode.c: commented out some calls to free() in order to
5258         fix bug #989576,
5259
5260 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5261
5262         * src/SDCCicode.h,
5263         * src/SDCCicode.c (isiCodeInFunctionCall),
5264         * src/avr/ralloc.c (selectSpil),
5265         * src/pic/ralloc.c (selectSpil),
5266         * src/pic16/ralloc.c (selectSpil),
5267         * src/ds390/ralloc.c (selectSpil),
5268         * src/hc08/ralloc.c (selectSpil),
5269         * src/xa51/ralloc.c (selectSpil),
5270         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
5271         stack in the middle of a function call sequence (fixes bug #1020268)
5272         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
5273         costs associated with the minimum switch case.
5274
5275 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5276
5277         * src/SDCC.lex: fixed bug #1030549
5278
5279 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5280
5281         * src/SDCCcse.h (struct cseDef),
5282         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
5283         over a function call if the CSE is derived from a symbol whose
5284         address has been taken (fixes bug #1029883)
5285         * support/regression/tests/bug-1029883: a new regression test for
5286         this bug
5287
5288 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5289
5290         * src/hc08/gen.c (emitinline): fixed bug #1029778
5291         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
5292         to a cast object is no longer a syntax error ("fixes" bug #1030006,
5293         and starts toward RFE #905167)
5294
5295 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
5296
5297         * src/pic16/gen.c (mov2f): New function to move an operand to
5298         another without considering if it is a literal or a register,
5299         * (pic16_sameRegs): don't check if they are both AOP_REG,
5300         * (AccRsh): removed andmask=0 lines,
5301         * (genLeftShift): duplicated to be improved in future versions,
5302         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
5303         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
5304         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
5305         * (pic16initMnemonics): added initialization for POC_INFSNZW,
5306         * (insertBankSwitch): fixed inserting banksel directives algorithm
5307         for instructions that follow a skip instruction, this fixes a report
5308         for broken subtraction code generation,
5309         * src/pic16/ralloc.c (deassignLRs): do not free register if current
5310         iCode is a left op, just in case result and right share the same
5311         registers
5312
5313 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5314
5315         * src/hc08/main.c,
5316         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
5317         preservation of HX
5318         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
5319         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
5320         on 2004-09-12; it was buggy
5321
5322 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
5323
5324         * src/SDCCsymt.h: removed RESULT_CHECK
5325         * src/SDCCast.c,
5326         * src/SDCCglue.c,
5327         * src/SDCCval.c,
5328         * src/pic/glue.c,
5329         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
5330
5331 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
5332
5333         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
5334         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
5335         configuration values no more rejected by compiler, they are assigned
5336         to configuration registers with a warning message instead,
5337         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
5338         the for-loop so last conf register is emitted too,
5339         * (_pic16_initPaths): link library libsdcc.lib by default,
5340         * (_hasNativeMulFor): modified test for multiplication according to
5341         Raphael Neider's remarks. Integer multiplication is also done with
5342         support functions,
5343         * device/include/pic16/pic18fregs.h: corrected type error in while
5344         testing and including 18f6720 header file
5345
5346 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
5347
5348         * src/pic16/device.h (pic16_options): removed field use_crt,
5349         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
5350         until an optimization to handle single bits is added,
5351         * (pic16_loadFSR0): moved before genUnpackBits,
5352         * (genAnd): some white lines removed,
5353         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
5354         leave_reset flags in pic16_options when using crt modules,
5355
5356 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
5357
5358         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
5359           for bugs 898889 & 979599. Also used some safer print instructions.
5360
5361 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
5362
5363         * src/pic16/device.h (pic16_options_t): added field use_crt,
5364         crt_name, no_crt,
5365         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
5366         catch a probable future bug,
5367         * src/pic16/gen.c: aopIdx function commented out,
5368         * (genAssign): commented out old code which used aopIdx,
5369         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
5370         code, added if conditionals to take into account the --use-crt
5371         command line options,
5372         * src/pic16/main.c (pic16_optionsTable): added new command line
5373         options, --use-crt= and --no-crt,
5374         * (_pic16_linkEdit): now the proper crt object is added in the
5375         linker command line except than when --no-crt is specified,
5376         * src/pic16/pcode.c,
5377         * src/pic16/pcode.h: added some structures and functions for a new
5378         optimization scheme to compansate for instruction overhead between
5379         same iCodes, this scheme is currently under development and is not
5380         working in any way,
5381         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5382         to && operator,
5383         * device/lib/pic16/startup/crt0i.c,
5384         * device/lib/pic16/startup/crt0iz.c: added global char variable
5385         __uflags to force the generation of an idata section
5386
5387 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5388
5389         * doc/Makefile,
5390         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5391         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5392
5393 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5394
5395         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5396         Frieder) and clarified the default code optimization mode
5397
5398 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5399
5400         * src/SDCC.lex (doPragma, process_pragma),
5401         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5402         "opt_code_size", and "opt_code_balanced"
5403         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5404         regrouped options by category, added support for category headers
5405         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5406         and "--opt-code-size"
5407         * doc/sdccman.lyx: documented these new options and pragmas
5408         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5409         preference into account
5410
5411 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5412
5413         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5414           geniCodePreDec): Fixed bug 904237 by generating a warning
5415         * src/SDCCerr.h,
5416         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5417
5418 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5419
5420         * src/pic/device.c : When no max ram set validate full memory range.
5421         * src/pic/pcode.c,
5422         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5423
5424 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5425
5426         * device/lib/_gptrget.c,
5427         * device/lib/_gptrput.c: updated comment
5428         * device/lib/calloc.c,
5429         * device/lib/free.c,
5430         * device/lib/malloc.c,
5431         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5432         * src/SDCCcse.c (cseBBlock),
5433         * src/SDCCicode.c (printOperand, geniCodeArray),
5434         * src/SDCCicode.h (struct operand): fixed bug 868103
5435         * support/regression/tests/bug-868103.c: added
5436         * src/SDCCast.c (searchLitOp),
5437         * src/SDCCcse.h (struct cseDef),
5438         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5439         * src/SDCCicode.h (struct operand),
5440         * src/SDCCsymt.h (struct sym_link),
5441         * src/avr/gen.c (hasInc),
5442         * src/ds390/gen.c (hasInc),
5443         * src/hc08/gen.c (genPlusIncr, hasInc),
5444         * src/mcs51/gen.c (hasInc),
5445         * src/pic16/glue.c (pic16_printIvalChar),
5446         * src/pic16/ralloc.c (regWithIdx),
5447         * src/xa51/gen.c (hasInc) : removed warnings
5448         * src/SDCCast.c (createBlock): added comment ???
5449         * src/hc08/ralloc.c: updated comments
5450
5451 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5452
5453         * doc/sdccman.lyx: updated section on switch statements, added
5454         section about semaphore locking
5455         * doc/Makefile: added option -info for latex2html
5456         * device/lib/_gptrget.c,
5457         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5458
5459 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5460
5461         * src/pic/device.h,
5462         * src/pic/device.c,
5463         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5464          maxram is less than 0x100.
5465
5466 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5467
5468         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5469
5470 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5471
5472         * src/port.h,
5473         * src/mcs51/main.c,
5474         * src/ds390/main.c,
5475         * src/z80/main.c,
5476         * src/hc08/main.c,
5477         * src/pic/main.c,
5478         * src/pic16/main.c,
5479         * src/avr/main.c,
5480         * src/xa51/main.c
5481         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5482         a jump table is the best form for a switch statement, including
5483         automatic insertion of missing cases to make the case range
5484         continuous. Developed in collaboration with Frieder Ferlemann.
5485
5486 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5487
5488         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5489         accumulator result if it needs sign extension
5490
5491 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5492
5493         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5494
5495 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5496
5497         * device/lib/gbz80/printf.c,
5498         * device/lib/z80/printf.c: removed define for NULL
5499
5500 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5501
5502         * as/xa51/xa_link.c,
5503         * device/examples/ds390/ow390/ad26.c,
5504         * device/examples/ds390/ow390/cnt1d.c,
5505         * device/examples/ds390/ow390/counter.c,
5506         * device/examples/ds390/ow390/ds2480.h,
5507         * device/examples/ds390/ow390/ds2480ut.c,
5508         * device/examples/ds390/ow390/findtype.c,
5509         * device/examples/ds390/ow390/gethumd.c,
5510         * device/examples/ds390/ow390/owllu.c,
5511         * device/examples/ds390/ow390/ownetu.c,
5512         * device/examples/ds390/ow390/swt12.c,
5513         * device/examples/ds390/ow390/swtloop.c,
5514         * device/examples/ds390/ow390/temp.c,
5515         * device/examples/ds390/ow390/temp10.c,
5516         * device/examples/ds390/ow390/thermo21.c,
5517         * device/examples/ds390/ow390/tinilnk.c,
5518         * device/examples/ds390/ow390/tstfind.c,
5519         * device/examples/serialcomm/windows/serial.cpp,
5520         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5521         * device/include/reg51.h: fixed line endings for cvs
5522
5523 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5524
5525         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5526         packRegsForAccUse, packRegisters): new accumulator register
5527         packing algorithm
5528         * support/regression/ports/hc08/support.c (_putchar): suppress
5529         warning of unused variable
5530         * src/SDCCicode.c: added SWAP entry to codeTable
5531
5532 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5533
5534         * device/lib/sprintf.c: forgot to add this file before previous commit
5535
5536 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5537
5538         * src/pic16/gen.c (genPackBits): added operand right in function
5539         parameters, load result directly if p_type is POINTER (that is
5540         called by genNearPointerSet)
5541         * (genUnPackBits): added operand left in function parameters,
5542         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5543         FSR0 if accessing bitfields,
5544
5545 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5546
5547         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5548           _print_format; updated printf, sprintf, vsprintf
5549         * device/include/asm/default/features.h: corrected comment/define
5550         * device/lib/Makefile.in: added sprintf.c
5551         * device/lib/libsdcc.lib: added sprintf module
5552         * device/lib/printf_large.c,
5553         * device/lib/vprintf.c,
5554         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5555           into these 3 files
5556         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5557         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5558         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5559           hc08 test
5560         * support/regression/tests/zeropad.c: define idata as data for hc08
5561
5562 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5563
5564         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5565         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5566         labels are referenced at least once (even if a reference is not found)
5567         * src/hc08/gen.c (emitcode): set isComment flag for comments
5568         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5569         loads), rules 6a..6b (optimize jumps to return)
5570
5571 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5572
5573         * device/lib/acosf.c (acosf),
5574         * device/lib/asinf.c (asinf),
5575         * device/lib/atanf.c (atanf),
5576         * device/lib/ceilf.c (ceilf),
5577         * device/lib/cosf.c (cosf),
5578         * device/lib/coshf.c (coshf),
5579         * device/lib/cotf.c (cotf),
5580         * device/lib/fabsf.c (fabsf),
5581         * device/lib/floorf.c (floorf),
5582         * device/lib/log10f.c (log10f),
5583         * device/lib/logf.c (logf),
5584         * device/lib/sinf.c (sinf),
5585         * device/lib/sinhf.c (sinhf),
5586         * device/lib/sqrtf.c (sqrtf),
5587         * device/lib/tanf.c (tanf),
5588         * device/lib/tanhf.c (tanhf),
5589         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5590         replaced all instances of "reentrant" in the library functions
5591         defined in math.h with this macro.
5592         * support/regression/tests/float_trans.c: reenabled test for hc08
5593
5594 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5595
5596         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5597         erroneously deleted
5598
5599 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5600
5601         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5602         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5603         multi-byte volatile operands are used
5604         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5605         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5606         initialization to area GSINIT0 so that it would always precede
5607         any static initializers in GSINIT
5608         * support/regression/tests/zeropad.c: fixed idata define for hc08
5609         * support/regression/tests/bug-927659.c,
5610         * support/regression/tests/float_trans.c: disabled tests for hc08
5611         pending missing library routines
5612         * .version: increased version number to 2.4.4 - hc08 port now passes
5613         regression tests
5614
5615
5616 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5617
5618         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5619         * Makefile.common.in,
5620         * as/Makefile,
5621         * as/hc08/Makefile.in,
5622         * as/mcs51/Makefile.in,
5623         * as/z80/Makefile.in,
5624         * debugger/mcs51/Makefile.in,
5625         * device/include/Makefile.in,
5626         * device/lib/Makefile.in,
5627         * doc/Makefile,
5628         * link/Makefile,
5629         * link/z80/Makefile.in,
5630         * packihx/Makefile.in,
5631         * sim/ucsim/main_in.mk,
5632         * sim/ucsim/avr.src/Makefile.in,
5633         * sim/ucsim/doc/Makefile.in,
5634         * sim/ucsim/gui.src/serio.src/Makefile.in,
5635         * sim/ucsim/hc08.src/Makefile.in,
5636         * sim/ucsim/s51.src/Makefile.in,
5637         * sim/ucsim/xa.src/Makefile.in,
5638         * sim/ucsim/z80.src/Makefile.in,
5639         * src/Makefile.in,
5640         * support/cpp2/Makefile.in,
5641         * support/librarian/Makefile,
5642         * support/makebin/Makefile: added DESTDIR to the install path proposed
5643         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5644         * doc/sdccman.lyx: added DESTDIR documentation
5645
5646 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5647
5648         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5649         instruction for interrupt handlers, use fast returns when returning
5650         from high priority interrupts
5651
5652 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5653
5654         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5655         code generation
5656         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5657         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5658         bugs, ported much of Bernhard's code from mcs51
5659         * src/mcs51/gen.c (genSend),
5660         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5661         than one when calling a reentrant function
5662         * device/lib/_mullong.c: defined an alternate struct layout for big
5663         endian ports (hc08)
5664
5665 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5666
5667         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5668         test
5669
5670 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5671
5672         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5673         are sane and complete before asking the port its prefered parameter
5674         passing method (fixes bug #1017633)
5675         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5676         and _ret3
5677
5678 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5679
5680         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5681         problem in bitfields >= 8 bits.
5682
5683 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5684
5685         * src/SDCCsymt.c: undid changes that were not meant to be committed
5686
5687 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5688
5689         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5690
5691 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5692
5693         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5694           copied and wrong bit got inverted
5695
5696 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5697
5698         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5699         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5700         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5701         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5702         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5703         assignments to bitfields at known addresses
5704         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5705         reads from bitfields at known addresses
5706         * src/hc08/ralloc.c (packRegisters),
5707         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5708         genhc08Code): optimize pointer get values used as conditionals
5709         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5710         and branch
5711
5712 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5713
5714         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5715         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5716         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5717         as conditionals
5718
5719 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5720
5721         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5722
5723 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5724
5725         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5726         related problems
5727
5728 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5729
5730         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5731
5732 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5733
5734         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5735         mcs51 port
5736
5737 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5738
5739         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5740
5741 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5742
5743         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5744         cases use more compact code.
5745
5746 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5747
5748         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5749
5750 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5751
5752         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5753
5754 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5755
5756         * src/SDCCsymt.h,
5757         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5758         parameter of changePointer() from symbol* to sym_link*
5759         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5760         * src/SDCCsymt.c (compareType): void* type is castable to other
5761         pointers, but not necesarily an exact match.
5762         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5763         is no longer blindly treated as an exact match.
5764         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5765
5766 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5767
5768         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5769
5770 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5771
5772         * src/pic/gen.c,
5773         * src/pic/pcode.c,
5774         * src/pic/ralloc.h,
5775         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5776
5777 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5778
5779         * src/pic/device.c,
5780         * src/pic/device.h,
5781         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5782
5783 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5784
5785         * src/mcs51/gen.c (emitcode): fixed bug #992819
5786
5787 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5788
5789         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5790           there's no need to make it worse
5791
5792 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5793
5794         * src/mcs51/ralloc.c (deassignLR),
5795         * src/ds390/ralloc.c (deassignLR),
5796         * src/hc08/ralloc.c (deassignLR),
5797         * src/z80/ralloc.c (deassignLR),
5798         * src/pic/ralloc.c (deassignLR),
5799         * src/pic16/ralloc.c (deassignLR),
5800         * src/avr/ralloc.c (deassignLR),
5801         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5802         rlivePoint): fixed another part of bug #971834
5803
5804 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5805
5806         * src/z80/main.c: enabled "critical" keyword
5807         * src/z80/mappings.i,
5808         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5809         functions (fixes bug #979646)
5810         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5811
5812 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5813
5814         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5815           such as c:\mydir.
5816
5817 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5818
5819         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5820           doesn't disable too much optimizations
5821
5822 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5823
5824         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5825
5826 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5827
5828         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5829
5830 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5831
5832         * src/pic/gen.c tidied up tabs
5833         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5834         * src/pic/main.c tidied up tabs
5835         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5836         * src/pic/pcoderegs.c tidied up tabs
5837         * src/pic/ralloc.c tidied up tabs
5838
5839 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5840
5841         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5842         to S_FIXED for pic16 port and when symbol is not in level 0,
5843         allocate for S_REGISTER storage class and pic16 port, too,
5844         * src/pic16/device.h: prototype for checkSym,
5845         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5846         * (pic16_assignConfigWordValue): test the value and the mask to
5847         validate that the value is suitable for the configuration word,
5848         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5849         collect extern declared symbols, don't emit symbol twice, check
5850         first if symbol is in publics set first,
5851         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5852         * added command line '--fstack' which enables an experimental
5853         feature for stack access, too buggy to be used yet...
5854         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5855         * (pic16_allocDirReg): when register has storage class S_REGISTER
5856         allocate in pic16_dynAccessRegs,
5857         * device/include/pic16/pic18f????.h: modified configuration word
5858         naming convention, words started as CONFIG0H but should be CONFIG1H
5859
5860 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5861
5862         * device/include/mcs51reg.h: fixed bug 970993
5863
5864 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5865
5866         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5867         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5868         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5869         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5870         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5871         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5872           error/warning numbers,
5873           added function setWarningDisabled()
5874         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5875         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5876           _memcmp.c _memmove.c calloc.c realloc.c free.c
5877         * support/regression/tests/malloc.c: added tests for new functionality
5878         * support/regression/tests/zeropad.c: added tests for truncated initializers
5879           and initialized char arrays starting with '\x0'
5880         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5881
5882 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5883
5884         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5885
5886 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5887
5888         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5889         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5890         peephole 177.e. Thanks to anonymous
5891
5892 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5893
5894         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5895         function isn't used in the source but referenced as a
5896         variable initializer then declare it as extern in .asm file
5897
5898 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5899
5900         * .version: increased version number to 2.4.3
5901
5902         Adding version extension according to ChangeLog CVS revision
5903         * src/Makefile.in (target all): added dependency 'version.h'
5904         * (rule version.h): added rule to create version.h from ChangeLog,
5905         * (rule dep): added dependency version.h,
5906         * src/version.awk: AWK script to create version.h
5907         * src/SDCCdwarf2.c (dwWriteModule),
5908         * src/SDCCglue.c (initialComments),
5909         * src/SDCCmain.c (printVersionInfo): modified to write after
5910         version string the version extension number,
5911         * src/SDCCutil.c: included "version.h"
5912         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5913         number,
5914         * src/SDCCutil.h: added prototype for getBuildNumber
5915
5916         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5917         includeDirsSet, too,
5918         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5919         const char [] is found in function prototype...
5920
5921         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5922         moving to WREG with source is already in WREG,
5923         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5924         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5925         * (aopForSym): stack'ed symbols are partially supported, added
5926         if-clause to support symbols in FARSPACE,
5927         * (sameRegs): added test for AOP_ACC to see if registers are same,
5928         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5929         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5930         * (pic16_popRegFromString): will not allocate a new register if it
5931         doesn't find one by name, bug may have introduced...
5932         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5933         * (genIpush): revived to use pic16 port's stack,
5934         * (genAddrOf): added incomplete case for stack'ed operand,
5935         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5936         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5937         can handle multibyte operands,
5938         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5939         * (pic16initialComments): added message for MPLAB compatibility
5940         mode enabled,
5941         * src/pic16/main.h: prototype for pic16_mplab_comp,
5942         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5943         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5944         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5945         because of increased complexity of procedure,
5946         * (_process_pragma): stack pragma changed to format 'stack pos len',
5947         emit symbol '_stack_end' to conform with gplink,
5948         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5949         to search for register,
5950         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5951         PO_GPR_REGISTER,
5952         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5953         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5954         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5955         case for PO_GPR_REGISTER,
5956         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5957         dies, the new era is ahead !...
5958         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5959         pic16_dynInternalRegs,
5960         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5961         * (pic16_allocDirReg): minor optimizations and bug fixes,
5962         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5963
5964         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5965         load stack and frame pointer with address of 'stack_end' symbol
5966
5967 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5968
5969         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5970         without source code but only variable initializers
5971
5972 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5973
5974         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5975         external are not declared as extern to reduce overhead while linking
5976
5977 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5978
5979         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5980
5981 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5982
5983         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5984           Yee Keat for the patch
5985         * src/SDCCast.c (decorateType): fixed bug #979599
5986         * src/ds390/gen.h: removed local fReturnSizeDS390
5987         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5988         * src/ds390/gen.c (genAnd, genOr, genXor),
5989         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5990
5991 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5992
5993         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5994         add relFilesSet to $3, manipulate $2 to handle linking of object
5995         files without source files in command line,
5996         * device/include/pic16 (all headers): added ID location macros,
5997         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5998         entries for ID location bytes,
5999         * (pic16_assignIdByteValue): NEW,
6000         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
6001         added field dumpcalltree to pic16_options_t,
6002         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
6003         is used instead of pic16_Gstack_base_addr, check if (ifx) before
6004         emitting rFalseIfx label after check_carry label,
6005         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
6006         pic16_emitDIRegs), NEW
6007         * (pic16glue): dump .calltree file when option --calltree found,
6008         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
6009         * (_pic16_genAssemblerPreamble): emit ID locations after
6010         configuration registers,
6011         * (pic16_linkCmd): modifications of the link command,
6012         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
6013         * (pic16_pCodeInitRegisters): don't init stack registers,
6014         * (pic16_findPrevInstruction): fixed bug,
6015         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
6016         bug with immediate registers,
6017         * (buildCallTree): traces stack push and pop,
6018         * (pct2): dump also stack usage for each function,
6019         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
6020         * (pic16_allocDirReg): various modifications,
6021         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
6022         fixed to 1,
6023
6024 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
6025
6026         * src/pic16/pcode.c: removed buggy double colon
6027
6028 2004-07-01 Borut Razem <borut.razem AT siol.net>
6029
6030         * support/scripts/sdcc.nsi: added include/pic16 to setup
6031
6032 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
6033
6034         * device/lib/Makefile.in: fixed bug in target objects-pic16,
6035         * device/lib/pic16/Makefile: prefixed with dash (-) command under
6036         target 'clean',
6037         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
6038         specific command line arguments. Also added sample lkr script
6039         for placing a variable at a specific memory bank.
6040         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
6041         at a specific memory bank,
6042         * (pic16_dump_isection): fixed bug which caused string literals to
6043         be omitted when dumping idata section,
6044         * (pic16_groupRegistersInSection): added code to handle registers
6045         in specific memory banks,
6046         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
6047         public, all references are renamed too,
6048         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
6049         AOP_DPTR2,
6050         * (pic16_storeForReturn): added case to handle when dest is WREG,
6051         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
6052         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
6053         pic16_rel_udata, check to see if that register is marked as being
6054         a member of a specific memory bank,
6055         * (pic16_printIvalCharPtr): added code to add string literals either
6056         to code or the idata sections,
6057         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
6058         also accept the 'udata' pragma,
6059         * src/pic16/main.h: new structure types sectName and sectSym
6060         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
6061         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
6062         * (pic16_findPrevInstruction): fixed, it returned nothing,
6063         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
6064         instruction combinations,
6065         * (pic16_FixRegisterBanking): heavily reorganised,
6066         * (pic16_AnalyzeBanking): if generating banksel directives is
6067         disabled, then don't call FixRegisterBanking at all,
6068         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
6069         completely removed,
6070         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
6071
6072 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
6073
6074         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
6075         Phuah Yee Keat <yk.phuah AT nestac.com>
6076
6077 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6078
6079         * src/pic16/glue.c (pic16createInterruptVect): function now emits
6080         correctly the IVT even if it is relocated to some other location
6081
6082 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6083
6084         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
6085         * device/include/pic16/pic18f2220.h: NEW,
6086         * device/lib/pic16/libdev/pic18f2220.c: NEW,
6087         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
6088         * src/pic16/device.c (struct Pics16): added info for 18f2220,
6089         * src/pic16/device.h (struct pic16_options): added ivt_loc and
6090         nodefaultlibs, ivt_loc is the location of the interrupt vector
6091         table, and nodefaultlibs signs that default libraries should not be
6092         linked in link stage,
6093         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
6094         according to --ivt-loc argument,
6095         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
6096         when pragma stack is found,
6097
6098 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6099
6100         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
6101         256 (range check), 257 (do while), 258.a-f (bit banging
6102         f.e. on 3-wire SPI bus)
6103
6104 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6105
6106         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
6107         variables used exclusively within a loop
6108
6109 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
6110
6111         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
6112
6113 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6114
6115         * src/SDCClrange.c (computeClash): fixed bug #971834
6116
6117 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6118
6119         * src/mcs51/gen.c (genCmp): fixed bug #975903
6120         * src/hc08/gen.c (operandsEqu),
6121         * src/ds390/gen.c (operandsEqu),
6122         * src/z80/gen.c (operandsEqu),
6123         * src/pic/gen.c (operandsEqu),
6124         * src/pic16/gen.c (operandsEqu),
6125         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
6126         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
6127
6128 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6129
6130         * src/SDCCcse.c (cseBBlock): fixed bug #966963
6131
6132 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
6133
6134         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
6135         default case in switch statement,
6136         * glue.c (pic16_initPointer): expr is initialised via decoarteType
6137         to eliminate problem with initialisation of pointers, but problem
6138         still exists,
6139         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
6140         * (emitStaticSegment): removed various lines emitting debug info,
6141         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
6142         added processor registers for utilizing EEPROM,
6143         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
6144         configurable and set 8
6145
6146 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
6147
6148         * .version: increased version number to 2.4.2,
6149
6150         Cumulative patch for pic16 port
6151         * src/pic16/device.c: changed scheme to dump initial values for
6152         variables in idata segment, all print_idata* functions were removed,
6153         now the pic16_printIval* will be called,
6154         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
6155         * _pic16_printPointerType, pic16_printPointerType,
6156         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
6157         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
6158         NEW, similar to the respective functions in SDCCglue.c,
6159         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
6160         way, emitting hex bytes,
6161         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
6162
6163 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6164
6165         * src/avr/ralloc.c (serialRegAssign),
6166         * src/xa51/ralloc.c (serialRegAssign),
6167         * src/pic/ralloc.c (serialRegAssign),
6168         * src/pic16/ralloc.c (serialRegAssign),
6169         * src/hc08/ralloc.c (serialRegAssign),
6170         * src/z80/ralloc.c (serialRegAssign),
6171         * src/ds390/ralloc.c (serialRegAssign),
6172         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
6173
6174 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6175
6176         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
6177         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
6178
6179 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
6180
6181         Cumulative patch for pic16 port:
6182         * src/pic16/device.h (typedef PIC16_device) modified fields for
6183         defining microcontrollers,
6184         * src/pic16/device.c: added new info for all devices in Pics16 array,
6185         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
6186         to be optimised out by the pCode optimiser,
6187         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
6188         specially, bug reported by G.M. Gallant,
6189         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
6190         as force'd so that cannot be optimised out by pCode optimiser,
6191         * src/pic16/pcode.c,
6192         * src/pic16/pcodepeeph.c,
6193         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
6194         they are disabled by default, but can be enabled explicit with
6195         command argument --denable-peeps, for testing,
6196         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
6197         --pomit-ivt in COMPILE_FLAGS
6198
6199 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6200
6201         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
6202           compilation on MSVC
6203
6204 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6205
6206         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
6207
6208 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6209
6210         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
6211         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
6212
6213 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
6214
6215         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
6216         would only assign 0x300001 register.
6217
6218 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
6219
6220         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
6221         in COMPILE_FLAGS. Thanks to G. Gallant for report.
6222
6223 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6224
6225         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
6226         for ds80c400
6227         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
6228         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
6229         added peephole 254 (left shift), 255 (jump table)
6230
6231 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
6232
6233         * device/lib/Makefile.in: removed comment line with model-pic16,
6234         * (target port-specific-objects-pic16): the libraries and objects
6235         are copied to the build directory form the device/lib/pic16/bin
6236         directory
6237
6238         Cumulative patch concerning pic16 port:
6239         * library directory has been re-organized,
6240         * added support for PIC18F1220,
6241         * added headers and library sources for chips 18f1220,18f6520,
6242         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
6243
6244         * configuration registers setting has changed, now each supported
6245         device has a complete description of the registers it uses,
6246         * all initialisations are moved to idata sections, these section
6247         can be absolute or relocatable,
6248         * fixed initialisation of codespace variables,
6249         * fixed warning about PCLATU and gpsim,
6250         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
6251         * (genAssign): use table reads when assigning from variables in codespace,
6252         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
6253         char/int variables placed in codespace,
6254         * (pic16_emitConfigRegs): NEW, emits a list with configuration
6255         registers set in .asm file, no need for --pomit-config-words anymore,
6256         * (pic16glue): some 8051 legacy segments are commented out
6257         (to be removed completely),
6258         * added support for alternative assembler and linker with --asm=
6259         and --link= command line arguments,
6260         * peepholes are disabled automatically in the port, no need to
6261         specify on command line,
6262         * port supports natively char/int/long multiplication, but converts
6263         all divisions to support functions,
6264         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
6265         to the file set in variable $2,
6266         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
6267         strings in ASCII format and not in hex,
6268         * ralloc.c (serialRegAssign): added a triplet of conditional calls
6269         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
6270         allocate proper register if iCodes aren't temporary,
6271
6272 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
6273
6274         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
6275
6276 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
6277
6278         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
6279         is commented out
6280
6281 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6282
6283         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
6284         computed address is reused
6285         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
6286         multi-byte bitfields
6287
6288 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6289
6290         * src/z80/gen.c: (genArrayInit): must check for pointers too
6291
6292 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6293
6294         * support/regression/tests/zeropad.c: never meant to commit the
6295           nestedstruct test: removed, added check for GCC version
6296
6297 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
6298
6299         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
6300         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
6301         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
6302           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
6303           bugs 928906 and 954082 half-empty initializers
6304         * src/SDCCsymt.h,
6305         * src/SDCCsymt.c (getAllocSize): added for above fix
6306         * src/z80/gen.c (genArrayInit): fixed bug 741044
6307         * support/regression/tests/zeropad.c: added tests
6308
6309 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
6310
6311         * src/pic16/device.c (pic16_dump_section): corrected bug which
6312         caused some symbols of the libraries to be misplaced
6313
6314 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6315
6316         * src/pic16/glue.c,
6317         * src/pic16/ralloc.h,
6318         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
6319         to fix conflict with pic port
6320
6321 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6322
6323         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
6324         externs configuration variables,
6325         * src/pic16/ralloc.h,
6326         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
6327         prototype in header, commented out some debug messages
6328
6329 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
6330
6331         * src/pic16/glue.c,
6332         * src/pic16/main.c,
6333         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
6334         for gpasm COFF object generation. Thanks to D. Hawkins for
6335         his patch info
6336
6337 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6338
6339         * src/ds390/main.c,
6340         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
6341         Brock for spotting this)
6342         * src/ds390/gen.c (genEndFunction),
6343         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
6344         interrupt handler and critical. Disable push/pop optimizations when
6345         peephole optimizations disabled.
6346
6347 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6348
6349         Updated pic16 library sources and headers.
6350         * device/lib/pic16/pic18f*/ ,
6351         * device/include/pic16/*.h: modified to handle structured SFR
6352         definitions
6353
6354 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6355
6356         * src/port.h (PORT structure): added hook initPaths, now each
6357         port can declare its own default search paths,
6358         which can been seen with the --print-search-dirs option,
6359         see pic16 port for example,
6360         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
6361         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
6362         * (doPrintSearchDirs): NEW, replaces in a central manner the
6363         printing of search dirs which was split in set*Paths functions,
6364         * (main): added call to port->initPaths and doPrintSearchDirs,
6365         * src/avr/main.c,
6366         * src/ds390/main.c,
6367         * src/hc08/main.c,
6368         * src/izt/i186.c,
6369         * src/izt/tlcs900h.c,
6370         * src/mcs51/main.c,
6371         * src/pic/main.c,
6372         * src/pic16/main.c: modified port structures to reflect addition of
6373         initPaths hook,
6374
6375         * src/pic16/device.c (regCompare): registers are finally sorted by name,
6376         * (pic16_dump_section): for registers in same address reserve memory once,
6377         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
6378         to no_banksel,
6379         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6380         result is greater in size than right or left,
6381         * (pic16_genUMult8X8_8): there are some cases where the result can
6382         be 16 bits size, so handle these,
6383         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6384         * (pic16_outBitC): modified to emit pcodes,
6385         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6386         or not,
6387         * (genDivOneByte): implemented algorithm to divide 8-bits,
6388         * (genCmp): uncommented goto, but issues still exist,
6389         * (genAnd): fixed a bug with variables >8bits,
6390         * (genPackBits): optimization added that uses BCF/BSF to change a
6391         single bit,
6392         * (genAssign): fixed bug when assigning floating point literals,
6393         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6394         __sdcc_gsinit_startup label,
6395         * src/pic16/main.c (_pic16_init): removed search directory
6396         initialisations,
6397         * (_pic16_initPaths): NEW, used to initialise search directories,
6398         * (_hasNativeMulFor): support functions for all except char/int
6399         multiplication, and char division,
6400         * (PIC16_port struct): modified entry for native mul support,
6401         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6402         no_banksel option,
6403         * (buildCallTree): call to register_usage is ifdef'ed out,
6404
6405 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6406
6407         * device/include/string.h: applied Stas Sergeev's patch to make this
6408         header file compatible with the preprocessor -Wundef option
6409         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6410         failure (fixes bug #941458)
6411
6412 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6413
6414         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6415         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6416         that the variable, not the function, should be static
6417         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6418         to be consistent with non-literal case
6419
6420 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6421
6422         * src/SDCCast.c (isConformingBody): fixed bug #949967
6423         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6424         convilong): fixed bug #952086
6425
6426 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         * src/SDCCmem.c (allocVariables): fixed bug #955321
6429
6430 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6431
6432         * src/hc08/main.c (_hc08_genAssemblerEnd),
6433         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6434         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6435         completely eliminated the use of a temporary file
6436         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6437         when more than one file linked
6438         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6439
6440 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6441
6442         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6443         which fixes bug #543481
6444         * support/regression/tests/bug-751703.c: fixed comments left from a
6445         cut and paste error
6446         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6447         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6448         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6449         scopes
6450         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6451         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6452         are now changed to underscores in moduleName
6453
6454 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6455
6456         * as/mcs51/lkmem.c: better fix for bug #954173
6457
6458 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6459         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6460
6461         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6462         * device/include/c8051f000.h,
6463         * device/include/c8051f120.h,
6464         * device/include/c8051f300.h,
6465         * device/include/c8051f310.h,
6466         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6467         PWM16) and detab'ed
6468
6469 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6470
6471         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6472         and mailing lists, doc'ed --no-peep-comments, removed reference
6473         to knoppix (newest version has no LyX/LaTeX), other minor changes
6474         * src/SDCCglue.c (glue): save 2 bytes stack space with
6475         option --main-return. The ljmp could probably be avoided too
6476
6477 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6478
6479         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6480
6481 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6482
6483         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6484         * src/SDCCopt.c (isLocalWithoutDef),
6485         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6486         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6487         (credit to Maarten Brock for patch #949363, on which this is based)
6488         * support/regression/tests/bug-751703.c: some test cases of extern used
6489         within inner scopes.
6490
6491 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6492
6493         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6494         SPEC_STRUCT
6495         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6496         struct definitions
6497         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6498         dwWriteLabel): fix to create valid debugger symbols even when
6499         the module name has non-alphanumeric symbols in it
6500         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6501         when a variable's allocation has been optimized away
6502
6503
6504 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6505
6506         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6507         * src/hc08/main.c,
6508         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6509         * src/mcs51/main.c,
6510         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6511         * src/ds390/main.c,
6512         * src/z80/gen.c (z80_emitDebuggerSymbol),
6513         * src/z80/main.c,
6514         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6515         * src/pic/main.c,
6516         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6517         * src/pic16/main.c,
6518         * src/avr/gen.c (avr_emitDebuggerSymbol),
6519         * src/avr/main.c,
6520         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6521         * src/xa51/main.c,
6522         * src/SDCCdebug.c (emitDebuggerSymbol),
6523         * src/SDCCdebug.h,
6524         * src/port.h: added a debugger struct to the port struct. Added a
6525         callback for defining debugger symbols
6526
6527         * src/SDCCast.c (createLabel),
6528         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6529         with isitmp = 1
6530         * src/SDCCicode.h,
6531         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6532         iCode back to the ast for the function
6533
6534         * src/hc08/ralloc.c (hc08_assignRegisters),
6535         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6536         unneeded fields from the regs struct.
6537         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6538         pushReg() & pullReg() functions instead of emitcode()
6539
6540         * src/hc08/gen.c (genLabel, genhc08Code),
6541         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6542
6543         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6544         debugger hooks
6545
6546         * src/hc08/gen.c (genEndFunction, genhc08Code),
6547         * src/hc08/gen.h,
6548         * src/mcs51/gen.c (genEndFunction, gen51Code),
6549         * src/mcs51/gen.h,
6550         * src/ds390/gen.c (genEndFunction, gen390Code),
6551         * src/ds390/gen.h,
6552         * src/z80/gen.c (genEndFunction, genZ80Code),
6553         * src/z80/gen.h,
6554         * src/z80/z80.h,
6555         * src/pic/gen.c (genEndFunction, genpic14Code),
6556         * src/pic/gen.h,
6557         * src/pic16/gen.c (genEndFunction, genpic16Code),
6558         * src/pic16/gen.h,
6559         * src/avr/gen.c (genEndFunction, genAVRCode),
6560         * src/avr/gen.h,
6561         * src/xa51/gen.c (genEndFunction, genXA51Code),
6562         * src/xa51/gen.h,
6563         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6564         specific code to cdbFile.c and out of the backend code generators
6565
6566         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6567         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6568         starting address is now 0
6569
6570         * as/hc08/asm.h,
6571         * as/hc08/m08pst.c,
6572         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6573         assembler directive for DWARF support
6574         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6575
6576         * src/src.dsp,
6577         * src/Makefile.in,
6578         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6579
6580 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6581
6582         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6583         and inappropriate peephole optimization in jump tables
6584
6585 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6586
6587         * as/hc08/m08pst.c,
6588         * src/SDCCglue.c: sdccopt works for the hc08 port now
6589
6590 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6591
6592         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6593
6594 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6595
6596         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6597
6598 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6599
6600         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6601         rules
6602         * src/SDCCmain.c,
6603         * src/SDCCglobl.h,
6604         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6605         comments from the peephole optimizer replacement rules
6606         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6607         symbols
6608         * src/SDCCcse.c (updateSpillLocation),
6609         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6610         equivalents
6611         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6612         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6613         objects far pointers
6614
6615 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6616
6617         * src/SDCCsymt.h: a missing part of my last change
6618         * src/pic/ralloc.c (regTypeNum),
6619         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6620
6621 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6622
6623         * src/SDCCicode.h,
6624         * src/SDCCicode.c (aggrToPtrDclType),
6625         * src/SDCCptropt.h,
6626         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6627         ptrPseudoSymConvert),
6628         * src/pic/ralloc.c (regTypeNum),
6629         * src/pic16/ralloc.c (regTypeNum),
6630         * src/hc08/ralloc.c (regTypeNum),
6631         * src/ds390/ralloc.c (regTypeNum),
6632         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6633         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6634
6635 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6636
6637         * link/z80/lkmain.c (afile),
6638         * as/hc08/lkmain.c (afile),
6639         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6640         prevent a pointer problem when a filename has no directory and
6641         no extension specified.
6642
6643 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6644
6645         * link/z80/lkmain.c (afile): allow periods in directory names
6646         * link/z80/lkmain.c (afile),
6647         * as/mcs51/lkmain.c (afile),
6648         * as/hc08/lkmain.c (afile): allow linker script file to have an
6649         extension other than ".lnk"
6650         * link/z80/lklex.c (getfid),
6651         * link/z80/lkmain.c (parse),
6652         * as/mcs51/lklex.c (getfid),
6653         * as/mcs51/lkmain.c (parse),
6654         * as/hc08/lklex.c (getfid),
6655         * as/hc08/lkmain.c (parse): Support comments in the linker script
6656         file on lines by themselves and after filenames
6657
6658 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6659
6660         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6661
6662 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6663
6664         * src/z80/peeph-z80.def: removed some peephole rules that don't
6665         work with multibyte arithmetic (fixed bug #937126)
6666         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6667         to registers and not global variables
6668         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6669         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6670         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6671         checking for assignments not internally generated (fixed bug #931895)
6672         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6673         structure member (fixed bug #930072)
6674
6675 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6676
6677         * src/SDCCmain.c (linkEdit),
6678         * src/hc08/main.c (_hc08_parseOptions),
6679         * as/hc08/Makefile.in,
6680         * as/hc08/aslink.h,
6681         * as/hc08/asm.h,
6682         * as/hc08/m08pst.c,
6683         * as/hc08/lkrloc.c (relr, rele),
6684         * as/hc08/lkarea.c (lnkarea)
6685         * as/hc08/lkmain.c (afile, parse),
6686         * as/hc08/lkelf.c: support for ELF output
6687         * as/hc08/lks19.c (s19),
6688         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6689
6690 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6691
6692         * as/mcs51/lkihx.c: Fixed bug #899105.
6693
6694 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6695
6696         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6697         .dsp files from Unix to DOS.
6698
6699 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6700
6701         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6702         function pointers; we have been compliant for several months now.
6703         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6704         change that was accidently commented out
6705         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6706         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6707         bug #922319
6708
6709 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6710
6711         * src/hc08/gen.c: output of all of the internal debugging information
6712         is now controlled by the D() macro; it is disabled by default
6713
6714 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6715
6716         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6717         harder to keep the same registers during a CAST iCode
6718         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6719         long via int can be done in a single cast, if the signedness is
6720         correct.
6721         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6722         putchar() in tinibios.c in ds390's library
6723
6724 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6725
6726         * src/SDCCast.c (decorateType): fixed bug #898889,
6727         cast result of a literal complement too
6728         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6729         fixed check for bitfields
6730
6731 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6732
6733         * src/SDCCicode.c (geniCodeLogic): made it static,
6734         (geniCodeLogicAndOr): added in order to fix bug #905492,
6735         (ast2iCode): fixed bug #905492
6736         * support/regression/tests/bug-905492.c: added
6737         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6738         (processParms): fixed bug #927659: don't copy parms, this will clear
6739         decorated flag
6740         * support/regression/tests/bug-927659.c: added
6741
6742 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6743
6744         * src/SDCCast.c (addCast): don't cast float to char
6745         * device/lib/libsdcc.lib: added _memmove
6746
6747 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6748
6749         * device/lib/large/Makefile: fixed parallel execution by
6750         replacing `make` by `$(MAKE)`
6751
6752 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6753
6754         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6755         offsets (fixes bug #923936)
6756
6757 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6758
6759         * device/lib/small/Makefile: fixed parallel execution by
6760         replacing `make` by `$(MAKE)`
6761
6762 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6763
6764         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6765
6766 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6767
6768         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6769         * src/regression/Makefile: Regression test was not running.
6770
6771 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6772
6773         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6774         complement if possible
6775         * src/SDCCval.c (valComplement),
6776         * src/SDCCicode.c (operandOperation): fixed complement of literal
6777         * support/regression/tests/onebyte.c (testComplement): added
6778
6779 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6780
6781         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6782         return an optimized tree; actually replace actParm with the new tree
6783         * src/SDCCast.h: added some parantheses to remove side effects
6784         * support/regression/tests/bug-920866.c
6785
6786 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6787         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6788         Bit operands were not being handled properly in the pic14 port.
6789         (now src/regression/add.c passes again).
6790
6791 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6792
6793         * src/SDCC.y (labeled_statement): case and default no longer require
6794         a following statement (RFE #893037)
6795
6796 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6797
6798         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6799         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6800         disabled (fixes bug #916294)
6801         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6802         "mov a,acc"; patch provided by Lenny Story
6803         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6804
6805 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6806
6807         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6808         functions
6809         * src/ds390/gen.c (genFunction, genEndFunction),
6810         * src/ds390/ralloc.c (ds390_assignRegisters),
6811         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6812         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6813         pushed if there are parameters passed on the stack. Also, a cleaner
6814         way to decide if r0/r1 should be pushed/popped. (Together they fix
6815         bug #918693)
6816
6817 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6818
6819         * doc/sdccman.lyx,
6820         * device/lib/mcs51/crtpagesfr.asm,
6821         * device/lib/mcs51/crtxinit.asm,
6822         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6823         to avoid confusion with Si Lab's SFRPAGE register.
6824
6825 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6826
6827         * src/SDCCglue.c (emitMaps): allow public sfr variables
6828         * src/SDCCglue.c (initialComments): include compiler build date
6829         with compiler version and put the timestamp of the generated
6830         assembly file on a serperate line to be less confusing.
6831         * src/port.h: added genInitStartup hook
6832         * src/avr/main.c,
6833         * src/ds390/main.c,
6834         * src/hc08/main.c,
6835         * src/pic/main.c,
6836         * src/pic16/main.c,
6837         * src/xa51/main.c,
6838         * src/z80/main.c: genInitStartup initialize as NULL (default to
6839         historical behaviour)
6840         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6841         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6842         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6843         library instead of hard coding it into the compiler.
6844         * support/regression/ports/mcs51-stack-auto/spec.mk,
6845         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6846         * device/lib/mcs51/Makefile,
6847         * device/lib/small/Makefile,
6848         * device/lib/large/Makefile,
6849         * device/lib/mcs51/crtpagesfr.asm,
6850         * device/lib/mcs51/crtstart.asm,
6851         * device/lib/mcs51/crtxclear.asm,
6852         * device/lib/mcs51/crtxinit.asm,
6853         * device/lib/mcs51/crtclear.asm,
6854         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6855         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6856         and into user configurable files.
6857         * device/lib/clean.mk: clean mcs51 directory too
6858         * support/regression/tests/longlit.c: added static to T1 declaration
6859         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6860         accesses in the initialization code
6861
6862 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6863
6864         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6865         OSCTRIMVAL as noted in bug #916008
6866
6867 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6868
6869         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6870         in loops with multiple exits (reported as incorrect registers
6871         used by Martin Helmling in Sdcc-user list)
6872
6873 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6874
6875         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6876         made ds390 register extensions look less like error messages
6877
6878 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6879
6880         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6881         reported by Adam Wozniak in Sdcc-user list
6882
6883 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6884
6885         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6886         arithmetic optimizations, added debug output
6887
6888 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6889
6890         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6891         * sdcc.spec: updated and split sdcc into 3 rpms
6892         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6893         needed for literals of LEFT_OP and '+'
6894         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6895         introduced RESULT_TYPE_NOPROM
6896         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6897         left shift
6898         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6899         limited promotion to int only for '*'
6900         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6901
6902 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6903
6904         * src/pic16/gen.c (genSkip),
6905         (genc16bit2lit), (gencjneshort): commented out
6906         (is_LitOp): new helper function, checks operand type
6907         (genCmpEq): rewritten
6908
6909 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6910
6911         * support/regression/tests/bug-908454.c: added
6912
6913 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6914
6915         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6916         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6917         (geniCodeCast): cosmetic, don't preserve bit storage class
6918         (geniCodeLeftShift): added promotion
6919         (geniCodeLogic): fixed regression
6920         * src/SDCCsymt.c (computeTypeOr): accept bits too
6921         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6922
6923 2004-03-07  Borut Razem <borut.razem AT siol.net>
6924
6925         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6926
6927 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6928
6929         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6930         version of pic16_genPackRegisters which does not check if ic is a
6931         CAST operator,
6932         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6933         function cause string1.c regression test fails
6934
6935 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6936
6937         * sim/ucsim/configure.in,
6938         * sim/ucsim/configure,
6939         * sim/ucsim/doc/Makefile.in: use docdir
6940         * src/SDCC.y: fixed sbit atrributes
6941         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6942         * src/SDCCast.c (decorateType): |^& need special promotion handling
6943         * src/SDCCast.h,
6944         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6945         * src/SDCCsymt.h (computeType),
6946         * src/SDCCicode.c: computeType() needs op
6947         * src/SDCCsymt.c (checkTypeSanity),
6948         * doc/sddman.lyx: "plain" bitfields are unsigned
6949         * src/SDCCsymt.c (computeTypeOr): added
6950         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6951         |^& ops
6952         * src/SDCCval.c (val*): computeType() needs op
6953         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6954         * support/regression/tests/onebyte.c: added tests for |^&
6955
6956 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6957
6958         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6959         for writing icode into asm output.
6960
6961 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6962
6963         * src/pic16/device.c: added some debug lines enabled
6964         with macro DEBUG_CHECK,
6965         * src/pic16/genarith.c: more debug in genPlus,
6966         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6967         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6968         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6969         * (aopForSym): onStack symbols are re-placed in data memspace,
6970         and onStack flag is cleared,
6971         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6972         copy temporary pcodeop,
6973         * (genPcall): added warning for not updating PCLATU,
6974         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6975         always true for pic16 port,
6976         * (genMultOneWord): NEW, supports integer multiplication,
6977         * (genMult): modified to call genMultOneWord,
6978         * (ifxForOp): added warning when return NULL,
6979         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6980         flag is set before call to operandFromSymbol for implicit
6981         added structures,
6982         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6983         options.intlong_rent are set by default,
6984         * (_hasNativeMulFor): modified to allow port generation of integer
6985         multiplication,
6986         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6987         set regtype to REG_SFR for all registers, restricting seting the
6988         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6989
6990 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6991
6992         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6993         more than 500 times in the regression tests
6994
6995 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6996
6997         * support/Util/SDCCerr.h,
6998         * support/Util/SDCCerr.c,
6999         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7000         enumerator_list),
7001         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
7002         for symbol conflicts.
7003         * support/valdiags/tests/enum.c,
7004         * support/valdiags/tests/tentdecl.c,
7005         * support/valdiags/tests/struct.c: expect possible error messages
7006         referring to original symbol definitions.
7007         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
7008         * src/SDCCsymt.h,
7009         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
7010
7011 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
7012
7013         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
7014
7015 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
7016
7017         * src/pic16/ralloc.c (newReg): fixed bug #908929
7018
7019 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7020
7021         * src/ds390/gen.c: added missing #include "main.h"
7022
7023 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
7024
7025         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
7026         checking if symbol is already in set,
7027         * src/pic16/device.h: prototype for checkAddSym,
7028         * src/pic16/gen.c: (_G): added entry interruptvector,
7029         * (assignResultValue): removed some commented out lines,
7030         * (genFunction): check for ISR via sym->type, absolute section for
7031         interrupt code is created via a new pBlock, the goto instruction is
7032         placed now correctly at the interrupt vector position, changed all
7033         references from ivec to _G.interruptvector,
7034         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
7035         is the interrupt is a high priority one, same for return from ISR,
7036         * src/pic16/glue.c: changed all calls of addSetHead for publics and
7037         externs to calls of checkAddSym,
7038         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
7039         pic16_pcode_verbose flag is set,
7040         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
7041         * src/pic16/pcoderegs.c: message about how many registers are saved
7042         will only be emitted if pic16_pcode_verbose flag is set,
7043
7044 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7045
7046         * src/ds390/ralloc.h,
7047         * src/ds390/ralloc.c (ds390_regWithIdx),
7048         * src/ds390/gen.c (emitcode),
7049         * src/ds390/main.h,
7050         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
7051         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7052         ds390operandCompare, getRegsRead, getRegsWritten,
7053         initializeAsmLineNode): customized instruction size calculation for
7054         ds390, started basis for some register optimizations
7055         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
7056         corresponding assembly output
7057         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
7058         missing push/pop of r0/r1. Optimized push/pops
7059
7060 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7061
7062         * src/mcs51/main.c (instructionSize): fixed ACALL size
7063         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
7064
7065 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
7066
7067         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
7068         the sorting of rlist with NULL elements
7069         * (print_idataType, print_idata): NEW to create idata sections
7070         * src/pic16/device.h: idataSymSet new variable
7071         * src/pic16/gen.c (genFunction): fixed some bugs in string
7072         comparing, improved the absolute section creation for ISRs,
7073         added FSR0L/FSR0H in registers that are saved in an ISR,
7074         * (genInline): fixed the processing of inline snippets,
7075         now they undergo no process by the peephole optimizer
7076         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
7077         are placed in idataSymSet,
7078         * (pic16emitStaticSeg): extern symbols are added in externs,
7079         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
7080         switching when aboslute variables are placed in access bank memory
7081         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
7082         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
7083         commented out with #if,
7084         * (pic16_packRegisters): reintroduce the check for CAST because some
7085         symbols are not correctly handled,
7086         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
7087         pCodeInstruction instead of pCode,
7088         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
7089         pCodeAsmDir definition,
7090         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
7091         directive, then the argument directive is emitted without the leading
7092         tab, hack for inline labels which must be in the first column,
7093         * (compareLabel,pic16_findNextInstruction),
7094         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
7095         * (insertBankSwitch): modified for the new pCodeAsmDir,
7096
7097 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7098         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
7099
7100         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
7101         instance,
7102         * (pushSide): commented out with #if,
7103         * (assignResultValue): fixed some typos in saving
7104         registers,
7105         * (genPcall): FIXED and sync'ed with genCall,
7106         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
7107         * (genNearPointerGet): fixed to handle some more cases,
7108         implementation scheme via table reads,
7109         * (genConstPointerGet): modified to access code memory correct,
7110         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
7111         and improved to handle some cases
7112         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
7113         instead of "RETLW" for init data
7114         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
7115         not IN_DIRSPACE, work around to reduce bank switching when aboslute
7116         variables are placed in access bank memory (<0x80 and >=0xf80),
7117         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
7118         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
7119         TBLWT_POSTDEC,TBLWT_PREINC
7120         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
7121         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
7122         directives
7123         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
7124         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
7125         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
7126         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
7127
7128 2004-02-29  Borut Razem <borut.razem AT siol.net>
7129
7130         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
7131         support/Util/findme.h, support/Util/system.h: enhance binary relative
7132         search for lib and include by using findProgramPath()
7133
7134 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7135
7136         * src/SDCCpeeph.h,
7137         * src/SDCCpeeph.c (pcDistance),
7138         * src/port.h,
7139         * src/mcs51/ralloc.h,
7140         * src/mcs51/ralloc.c (mcs51_regWithIdx),
7141         * src/mcs51/main.h,
7142         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
7143         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7144         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
7145         size calculation port specific, started basis for some register
7146         optimizations
7147         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
7148         missing push/pop of r0/r1. Optimized push/pops
7149         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
7150         * device/lib/_modsint.c (_modsint),
7151         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
7152         and stack version so regression tests pass
7153
7154 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
7155
7156         * src/Makefile.in (dep): include SLIBOBJS in dependency check
7157         * src/SDCCast.c (decorateType): catch another small optimization
7158         with '?' operator
7159         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
7160         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
7161         modified to finally use computeType() all over SDCC,
7162         see Feature Request #877103
7163         * src/SDCCval.h: cosmetic
7164         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
7165         valCompare(); regression tested in muldiv.c
7166         * support/regression/tests/muldiv.c (testMod): mod sign follows
7167         dividend only
7168
7169 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
7170
7171         * src/SDCCast.c (decorateType): fixed bug #902362
7172         * doc/INSTALL.txt: fixed install instructions for win32
7173
7174 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
7175
7176         * device/include/Makefile.in (install): fixed by replacing spaces
7177         by tabs
7178         * doc/README.txt,
7179         * doc/INSTALL.txt: updated for release
7180         * doc/sdccman.lyx: added warning for --xstack being buggy
7181
7182 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
7183
7184         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
7185         to eliminate build warnings.
7186         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
7187
7188 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
7189            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7190
7191         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
7192         removed -penable-stack, added comment for stack pragma, added
7193         warning for not initializing the stack/frame registers, removed
7194         comment at interrupts section
7195
7196         Stack is made permanent, there is no ability to disable stack usage.
7197         * src/pic16/device.h,
7198         * src/pic16/device.c: removed all references to USE_STACK macro,
7199         * src/pic16/device.c (pic16_dump_section): when no elements in
7200         rlist, free rlist before return,
7201         * (pic16_dump_int_registers): NEW, internal registers are a new set
7202         of general purpose registers reused by each function,
7203         * (checkAddReg): returns 1 if registers is added to set,
7204         * (pic16_groupRegistersInSection): when a registers is of type
7205         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
7206         * src/pic16/device.h: memRange and Assigned Memory are deleted,
7207         SRCASECMP macro is moved here from device.c
7208         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
7209         PO_PCLATU, PO_PRODL, PO_PRODH,
7210         * (pic16_pCodeOpType, genMinus,
7211         changed compares to "a" register, with AOP_ACC,
7212         * (pic16_genPlus): fixed some bugs and indented properly,
7213         * (pic16_addSign): changed size to size+offset in the MOVWF
7214         instruction,
7215         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
7216         multiply 8-bit operand by literal, result is 8-bit,
7217         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
7218         multiply 2 8-bit operand, result is 8-bit,
7219         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
7220         genUMult8X*_16,
7221         * src/pic16/gen.c: changed accUse to contain WREG only,
7222         * (pic16_emitcomment): renamed to pic16_emitpcomment,
7223         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
7224         true, do not use immediate addressing any more unless sym is a
7225         pointer in codespace,
7226         * (aopForRemat): do not use immediate addressing when symbol not in
7227         codespace and when symbol's address is requested,
7228         * (aopOp): for-loop in if(sym->accUse) is modified for the new
7229         accUse size (= 1),
7230         * (aopGet): added case for AOP_ACC and don't return "accumulator
7231         bug" but WREG instead,
7232         * (popGetTempReg): pushes contents of temporary register in stack,
7233         * (popReleaseTempReg): pops contents of temporary register from
7234         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
7235         * (pic16_popGet): separated case AOP_ACC to return register WREG
7236         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
7237         or PO_IMMEDIATE and initializes their instance/offset appropriately,
7238         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
7239         the use of immediate pointers to certain cases only.
7240
7241         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
7242         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
7243         * (assignResultValue, genCall, genRet): modified to use the new
7244         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
7245         genPcall is still broken,
7246         * (genFunction): added code to create 'A' type pBlocks when
7247         interrupt functions are generated, code not extensively tested yet,
7248         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
7249         * (genEndFunction): modified so ISRs pop stored registers from stack,
7250         * (genMultOneByte): cleanup,
7251         * (AccRsh): added flag andmask, to and result with appropriate mask,
7252         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
7253         * (genDataPointerGet): fixed and reenabled its use,
7254         * (genNearDataPointerGet): bugs fixed,
7255         * (genDataPointerSet): bugs fixed,
7256         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
7257         pic16_DumpSymbol, pic16_DumpOp,
7258         * src/pic16/genutils.h: function prototypes for the above functions,
7259         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
7260         pointers,
7261         * (pic16emitRegularMap): many many many improvements, but needs a
7262         major cleanup,
7263         * src/pic16/main.c: enable_stack in pic16_options is removed,
7264         * (_pic16_parseOptions): removed command line options -penable-stack,
7265         * (_process_pragma): emit stack symbol only when stack pragma is
7266         processed,
7267         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
7268         redirected to FSR0L/FSR0H pair,
7269         * (pic16_get_op, pic16_get_op2): modifications and improvements,
7270         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7271         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
7272         for immediates,
7273         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
7274         * (dumpPicOptype): NEW,
7275         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
7276         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
7277         with movff instruction,
7278         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
7279         added pic16_int_regs, some packRegsFor* functions are commented out,
7280         because produce errors,
7281         * src/pic16/NOTES: minor modifications
7282
7283 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7284
7285         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
7286         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
7287         --pack-iram.
7288         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
7289         * as/mcs51/lkaomf51.c: fixed bug #895763
7290
7291 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
7292
7293         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
7294
7295 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7296
7297         * doc/sdccman.lyx: added details about the HC08 storage classes and
7298         interrupts, fixed the register usage info for z80 & gbz80
7299
7300 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
7301
7302         * doc/sdccman.lyx: added more pic16 port documentation
7303         * device/include/pic16/: added header pic18fregs.h
7304
7305 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
7306
7307         * doc/sdccman.lyx: added Vangelis' contribution
7308
7309 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7310
7311         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
7312         extend to the next CALL or PCALL, not just to the next CALL.
7313
7314 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
7315
7316         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
7317
7318 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7319
7320         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
7321         bug #895752 and a better fix for bug #716790
7322
7323 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7324
7325         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
7326
7327 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7328
7329         * doc/sdccman.lyx: minor changes, minor changed
7330
7331 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
7332
7333         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
7334         which can't handle SDCC_NEWONEBYTEOPS,
7335         (geniCodeMultiply): removed conversion from mult to shift for pic14
7336         and pic16
7337
7338 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7339
7340         * src/hc08/gen.h,
7341         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
7342         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
7343         thus fixing bug #895406
7344
7345 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
7346
7347         * device/lib/_modsint.c,
7348         * device/lib/_modslong.c: sign follows divisor only
7349         * src/hc08/gen.c (genMultOneByte): if result size is 1,
7350         signs or signedness can be ignored
7351         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
7352         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
7353         added optimization for IFX,
7354         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
7355         arguments;
7356         reenabled optimization for IFX, which was removed on 2004-01-11
7357         * src/SDCCast.h: added return type IFX
7358         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
7359         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
7360         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
7361         SDCC_OLDONEBYTEOPS selects the old behaviour
7362         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
7363         changed again and commented promotion rule
7364         * src/SDCCval.c (valDiv): promotion no longer necessary
7365         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
7366         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
7367         rewritten
7368         * support/regression/tests/onebyte.c: added
7369
7370 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
7371
7372         * gen.c (genInline): reverted to old code for assemnling inline
7373         code because of bug reported James Chadd
7374
7375 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
7376
7377         * ralloc.h: missing declarations from previous patch,
7378         seems that patch for ralloc.h was never applied, fixed
7379
7380 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7381            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7382
7383         * pcode.c,
7384         * pcode.h,
7385         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7386         indirect addressing. Marked FSR0 as deprecated
7387         * gen.c (pointerCode): commented out, not needed now
7388         (pic16_popGet2p): new MOVFF helper function
7389         (genGenPointerGet),
7390         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7391         (shiftRLong): removed duplicate debugging info
7392
7393 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7394
7395         * src/ds390/gen.c (genNearPointerGet),
7396         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7397         optimization with bits, but not bitfields.
7398         * src/ds390/ralloc.c (packRegisters),
7399         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7400
7401 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7402
7403         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7404
7405 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7406
7407         * src/SDCCsymt.h,
7408         * src/SDCCicode.c (operandFromSymbol),
7409         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7410         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7411         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7412         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7413         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7414         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7415         bug #892038
7416         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7417         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7418         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7419         * src/SDCCsymt.c (newSymbol),
7420         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7421         enumerator_list),
7422         * src/SDCCval.h,
7423         * src/SDCCval.c (newiList): fixed bug #885705
7424
7425 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7426
7427         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7428         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7429
7430 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7431
7432         * device/include/c8051f120.h,
7433         * device/include/c8051f300.h,
7434         * device/include/c8051f310.h: added/updated header files for Silicon
7435         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7436         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7437         in new section Submitting patches
7438
7439 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7440
7441         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7442         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7443         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7444         genGenPointerSet),
7445         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7446         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7447         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7448         genGenPointerSet),
7449         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7450         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7451         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7452         genGenPointerSet),
7453         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7454         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7455         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7456         genGenPointerSet): fixed bug #892400
7457         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7458         to eliminate build warnings.
7459         * src/SDCCast.c (processParms),
7460         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7461         fixed bug 751859
7462         * support/valdiag/valdiag.py: added GCC to the list of defines active
7463         when compiling with gcc
7464
7465 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7466
7467         * support/Util/SDCCerr.h,
7468         * support/Util/SDCCerr.c,
7469         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7470         with an incomplete type (fixed bug #883734)
7471         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7472
7473 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7474
7475         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7476
7477 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7478
7479         * src/SDCCast.c (decorateType),
7480         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7481         function pointer implementation
7482         * support/regression/tests/funptrs.c: added tests to verify both forms
7483         of function pointers work correctly. Added tests to verify parameters
7484         are passed in the correct order.
7485
7486 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7487
7488         * device.c (regCompare): registers are sorted by ascending
7489         address and increasing size,
7490         * main.c (_pic16_finaliseOptions): removed the declaration
7491         of compiler macro MCU. Now a macro of the format pic18fxxxx
7492         will be defined from the command line
7493
7494 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7495             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7496
7497         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7498         PCOP_RLCF was overwritten!
7499         * gen.c (genSkip): commented out calls to pic16_emitcode,
7500         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7501         * (genlshTwo),
7502         * (genRRC): added debugging info,
7503         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7504         overwritten while shifting,
7505         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7506         overwritten while shifting,
7507         * (AccLsh),
7508         * (AccRsh),
7509         * (shiftLLeftOrResult),
7510         * (shiftRLeftOrResult),
7511         * (shiftRLong),
7512         * (shiftLLong): Implemented with pic16_emitpcode
7513         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7514         * (genLeftShift): Fixed bug, operand for shift by variable always
7515         was "and"ed with 0x0f,
7516         * (genLeftShiftLiteral),
7517         * (genrshTwo),
7518         * (genRightShiftLiteral): added debugging info,
7519         * (genrshFour): added comment,
7520         * (genRightShift): determined signedness from operand "left"
7521         instead of "result"
7522
7523 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7524
7525         * src/SDCCicode.c (geniCodeParms),
7526         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7527         function pointers, fixed function pointer bugs #861242 and #861896
7528
7529 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7530
7531         * device/include/c8051f000.h,
7532         * device/include/c8051f120.h,
7533         * device/include/c8051f300.h: added header files for Silicon
7534         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7535
7536 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7537
7538         * src/SDCCast.c (processParams): added new type flow and restructured
7539         (gatherAutoInit): added new type flow
7540         (addCast): cosmetic changes
7541         (getLeftResultType): added new type flow for array indices, patch
7542         provided by Stas, see FR #877103
7543         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7544         array index patch by Stas
7545         * src/SDCCast.h: added prototype getResultTypeFromType()
7546         * src/SDCCval.h,
7547         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7548         * src/pic/glue.c (pic14emitStaticSeg),
7549         * src/pic16/glue.c (pic16emitStaticSeg),
7550         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7551         for initialization of symbols
7552         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7553         * support/Util/SDCCerr.h:
7554         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7555         * .version: bumped version number to 2.3.8
7556         * device/include/Makefile.in (install),
7557         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7558         avoid warnings
7559
7560 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7561
7562         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7563         Slade Rich fixed an optimization bug
7564         * src/pic/pcodepeep.c,
7565         * src/pic/pcoderegs.c
7566         * doc/Makefile (install): added test for directory
7567
7568 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7569
7570         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7571         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7572         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7573         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7574         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7575         * as/mcs51/asexpr.c (term),
7576         * as/hc08/asexpr.c (term): fixed bug #887146
7577
7578 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7579
7580         * src/z80/gen.c (genMult): handle single byte result product
7581         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7582         DUMMY_READ_VOLATILE (fixed bug #886367)
7583
7584 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7585
7586         * support/regression/tests/libmullong.c: fixed logic, on little endian
7587         hosts we ended without a mullong_wrapper()
7588
7589 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7590
7591         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7592         virus/worm forged address usage.
7593
7594 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7595
7596         Fixed promotion, it should be done on AST level:
7597         * src/SDCCast.c (addCast): added promotion to int
7598         (decorateType): updated call to upCast()
7599         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7600         usualUnaryConversions()
7601
7602 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7603
7604         * support/regression/tests/literalop.c (mulWrapper): Added a
7605         wrapper to remove integer overflow warnings.
7606
7607         * support/regression/tests/float_trans.c: Made work on host.
7608
7609         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7610         location of sz80.
7611
7612         * support/regression/generate-cases.py (main): Changed from inline
7613         to a main method.
7614
7615         * doc/Makefile (install): Changed to depth first to get rid of
7616         missing directory install warning.
7617
7618         * as/Makefile (install-doc): Made work on Mac.
7619
7620 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7621
7622         * src/SDCCast.c: added an additional type flow in decorateType() of
7623         opposite direction, see feature request #860006; it's enabled at runtime
7624         by setting the environment variable SDCC_NEWTYPEFLOW
7625         * src/SDCCast.h: changed prototype of decorateType()
7626         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7627         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7628         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7629         see feature request #877103
7630         * src/SDCCval.c: updated call of decorateType()
7631         (valBitwise): fixed bug #882876
7632         (valMinus): added promotion
7633         (valLogicAndOr): result is unsigned
7634         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7635         * src/SDCCsymt.c (computeType),
7636         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7637         must not cause an unsigned operation
7638         * src/pic/glue (pic14emitRegularMap),
7639         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7640
7641 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7642
7643         * src/pic/pcode.c (PCodeID): commented out left over debug code
7644
7645 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7646
7647         * support/valdiag/tests/overflow.c: added shift tests
7648         * src/pic/device.c,
7649         * src/pic/gen.c,
7650         * src/pic/gen.h,
7651         * src/pic/glue.c,
7652         * src/pic/main.c,
7653         * src/pic/pcode.c,
7654         * src/pic/pcode.h,
7655         * src/pic/pcodepeep.c,
7656         * src/pic/pcoderegs.c,
7657         * src/pic/ralloc.c,
7658         * src/pic/ralloc.h: applied patch from Slade Rich;
7659         added support for multiple code pages and multiple RAM banks on the
7660         PIC 14 port. The ASM files now no longer simply assume all the
7661         code / RAM are in the same page / bank. This means the linker can
7662         safely allocate code/RAM of separate ASM files to different pages/banks.
7663         * doc/sdccman.lyx: added Slade's tips
7664         * src/mcs51/peeph.def: fixed bug #880768
7665
7666 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7667
7668         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7669         * src/SDCCast.c (decorateType): fixed bug #880197
7670
7671 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7672
7673         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7674         getopt.h.
7675
7676         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7677         strtof is not part of C89 and isn't included with Mac OS X.
7678
7679 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7680
7681         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7682         shiftL2Left2Result): fixed bug #879326
7683         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7684         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7685         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7686         address fetch for clr instruction
7687         * device/lib/hc08/_mulint.c: created optimized assembly version
7688         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7689
7690 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7691
7692         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7693         proposed in FR #877103
7694
7695 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7696
7697         * src/SDCCval.c (cheapestVal): added missing checks
7698         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7699         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7700
7701 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7702
7703         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7704         equal operands
7705
7706 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7707
7708         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7709         loaded with the linker search paths (-L arguments) and the libraries
7710         to be linked with the current source (-l arguments). Changes
7711         currently will affect only the pic16 port.
7712         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7713         include path the port specific paths and port specific libraries,
7714         * gplink command now contains the $3 argument,
7715         * src/pic16/device.h,
7716         * src/pic16/device.c,: structure PIC_device is made public and
7717         renamed to PIC16_device, the same for variable Pics which is renamed
7718         to Pics16. Updated all references to them.
7719         * src/pic16/glue.c (pic16glue): corrected bug with code
7720         initialization which bypassed the variable initializations block.
7721
7722         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7723         COMPILE_FLAGS and added the --nostdinc option
7724
7725 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7726
7727         * device/include/mc68hc908jb8.h: Register defs for another member
7728         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7729
7730 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7731
7732         Documenting changes from previous commits.
7733         * configure.in (version 1.56),
7734         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7735         when generating output files to configure the pic16 library,
7736         but now I've commented it out, since gputils aren't installed in the
7737         SF compile farm, so library won't compile
7738
7739         * device/lib/Makefile.in (version 1.56): initially I've added in
7740         target 'all' the prerequestive 'model-pic16' so it compiled the
7741         pic16 library, but now I've commented it out for the same reasons
7742         above,
7743         * added targets 'model-pic16' and 'objects-pic16' to compile the
7744         library
7745         * added target 'port-specific-objects-pic16' to handle the
7746         generated libraries and copy them into the build/ directory
7747         * added target 'clean-intermediate-pic16' to clean intermediate
7748         files into pic16 directory
7749         * in target 'installdirs' added line to create directory pic16 in
7750         the installation path
7751
7752         * device/include/Makefile.in (version 1.11): in target 'install'
7753         added lines to copy all header files to installation path,
7754         * in target 'installdirs' added line create directory for pic16
7755         headers in the installation path
7756
7757 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7758
7759         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7760          a function call
7761
7762 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7763
7764         * configure,
7765         * device/lib/configure.in,
7766         * device/lib/configure: fixed for autoconf 2.57
7767
7768 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7769
7770         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7771         option so that it actually works. Made it specific to the z80, since
7772         the gbz80 doesn't have these kinds of I/O ports.
7773
7774 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7775
7776         * device/include/z180.h,
7777         * device/lib/_memcpy.c,
7778         * device/lib/_memmove.c,
7779         * device/lib/_mulint.c,
7780         * device/lib/ser_ir.c,
7781         * device/lib/ser_ir_cts_rts.c,
7782         * device/lib/_strcmp.c,
7783         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7784         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7785         portmode; added deprecation warning for bank= and protmode= forms.
7786         Also, guard against buffer overflow.
7787         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7788
7789 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7790
7791         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7792         changed interrupt vector table generation to only emit declared vectors.
7793         * device/include/Makefile.in: added missing backslash
7794         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7795
7796 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7797
7798         Mainly changes to support compilation of the device libraries
7799         * src/pic16/device.c: stack is allocated via symbol and not
7800         via literal number. The symbol is placed in the corresponding
7801         position of the data ram
7802         * (pic16_dump_section): relocatable and absolute uninitialized
7803         data are now emitted in sorted order to reduce section naming,
7804         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7805         weren't marked as being in the access bank,
7806
7807 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7808
7809         Added portion of GNU PIC Library under the directory
7810         device/include/pic16 and device/lib/pic16. These files
7811         contain the declarations of SFRs for the PIC18Fxx2 devices.
7812         The directory is initialized via configure from toplevel.
7813
7814 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7815
7816         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7817         the spilllocations to be compared correctly
7818
7819 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7820
7821         * src/SDCCast.c (decorateType): fixed bug introduced today
7822
7823 2004-01-12  Borut Razem <borut.razem AT siol.net>
7824
7825         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7826         doc/sdccman.lyx: upper case pragmas are deprecated
7827
7828 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7829
7830         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7831         in simpler and even better code
7832
7833 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7834
7835         * src/SDCCicode.c (operandOperation): fixed bug #874819
7836         * src/SDCCast.c (decorateType): fixed
7837         char foo (unsigned long ul) { return ul > 0; }
7838
7839 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7840
7841         * doc/sdccman.lyx: Moved and added some sections, small changes
7842         all over. Telling LaTeX to be less strict with word spacing
7843         to better keep the right margin. Changed some notes about
7844         maintainance of the ports in section 3.2.1 - is it OK like this?
7845
7846 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7847
7848         SDCC source changes:
7849         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7850         convilong): modified to inform the pic16 port that builtin functions
7851         are external
7852
7853         PIC16 PORT specific changes:
7854         * src/pic16/device.c pic16_dump_equates() added,
7855         processor registers declared internally by the port are emitted in
7856         the translation as equates,
7857         * src/pic16/gen.c: inline code is passed unprocessed to the
7858         translation,
7859         * (pic16_popGetLit2): fnuction modified to take second operand as
7860         pCodeOp pointer and not as literal,
7861         * (popRegFromIdx): prefixed with pic16_,
7862         * (pic16_popCombine2): modified to receive already allocated pCode
7863         operands,
7864         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7865         * (genFunction): initializes local stack frame and pushes on stack
7866         all the registers used by this function,
7867         * (genEndFunction): restores all registers from stack and restores
7868         stack frame,
7869         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7870         improvements,
7871         * (pic16glue): changed the program startup sequence,
7872         * added new dbName code 'A' for functions placed in absolute section
7873         * src/pic16/main.c: added function attribute _naked,
7874         * added pragma 'code' to place a fnuction at an absolute address,
7875         * added command line arguments --debug-ralloc and --pcode-verbose,
7876         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7877         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7878         * (pic16_newpCodeOpLit2): modified to take the second operand as
7879         pCodeOp pointer,
7880         * (pic16_printpBlock): modified to emit each function in a separate
7881         section,
7882         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7883         UPPER for immediate operands,
7884         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7885         instruction,
7886         * src/pic16/peeph.def: all peepholes with movff are commented out,
7887         because there is a problem in the pcode peep optimizer,
7888         * src/pic16/ralloc.c: the register allocator can now reuse local
7889         function symbols for another function. This saves register usage.
7890         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7891
7892         Added file src/pic16/NOTES with information about program writing on
7893         the current port version.
7894
7895 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7896
7897         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7898         and peephole 252 (array access)
7899
7900 2004-01-09  Borut Razem <borut.razem AT siol.net>
7901
7902         * src/SDCCmain.c : fixed #872250: -l command line defined library
7903           files are scanned before standard library files
7904
7905 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7906
7907         * src/SDCCast.c (decorateType): fixed bug #874046
7908
7909 2004-01-09  Borut Razem <borut.razem AT siol.net>
7910
7911         * support/scripts/sdcc.nsi: remove previous installation
7912
7913 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7914
7915         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7916         bytes for last interrupt vector (mcs51)
7917         * sdcc.spec: fixed typo
7918
7919 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7920
7921         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7922         gen51Code): more efficient parameter receive for --model-large
7923         ("bug" #845294)
7924
7925 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7926
7927         * src/ds390/main.c,
7928         * src/z80/main.c: added missed needLinkerScript flags (more than
7929         one port structure defined in these file)
7930         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7931         bug #795325
7932
7933 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7934
7935         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7936         * src/port.h: added flag needLinkerScript in port->linker
7937         structure to inform whether to create a .lnk file or not,
7938         * src/avr/main.c,
7939         * src/ds390/main.c,
7940         * src/hc08/main.c,
7941         * src/mcs51/main.c,
7942         * src/pic/main.c,
7943         * src/pic16/main.c,
7944         * src/xa51/main.c,
7945         * src/z80/main.c: changed appropriately to configure
7946         needLinkerScript flag
7947         * src/pic/gen.c,
7948         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7949         * src/pic/glue.c: added variable udata_section_name to
7950         override default uninitialized data segment definition for
7951         devices only with SHAREBANK memory (reported from Erik Epetrich)
7952         * (pic14emitOverlay): modified to emit a commented overlay segment
7953         directive when no overlay data exist
7954         * (picglue): modified to emit uninitialized data segment
7955         according to udata_section_name
7956         * src/pic/main.c (_pic14_parseOptions): added command line
7957         options --udata-section-name=[name] to override default
7958         udata definition name
7959         * modified _linkCmd and _asmCmd to include compiler passed
7960         arguments via -W option
7961         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7962         object file from '.rel' to '.o' in port->linker structure,
7963         changed size of fptr from 2 to 3 in port structure
7964
7965 2004-01-07  Borut Razem <borut.razem AT siol.net>
7966
7967         * support/scripts/sdcc.nsi: update PATH
7968         * support/scripts/sdcc.ico: craeted
7969
7970 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7971
7972         * device/include/Makefile.in: fix install
7973         * doc/Makefile: fix install
7974
7975 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7976
7977         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7978         in bug #860505
7979         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7980         how the function variable allocation summary is displayed; also
7981         include information about variables allocated to the overlay
7982         segment
7983
7984 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7985
7986         * as/mcs51/lkmain.c: Help about -Y option
7987         * as/mcs51/lkarea.c: Fixed gcc warnings
7988
7989 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7990
7991         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7992         fixed warning
7993         * support/valdiag/tests/overflow.c: added
7994         * src/SDCCast.c (decorateType),
7995         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7996         LEFT_OP (left shift)
7997
7998 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7999
8000         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
8001         (default behaviour).
8002
8003 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8004
8005         A python script to validate compiler diagnostic messages. It can be
8006         used to verify that sdcc complains about bad c source code and
8007         gives a good location of the error.
8008         * support/valdiag/Makefile,
8009         * support/valdiag/valdiag.py,
8010         * support/valdiag/tests/*
8011
8012 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8013
8014         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
8015         * src/SDCCsymt.c (newEnumType),
8016         * src/SDCCsymt.h
8017         * support/Util/SDCCerr.c,
8018         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
8019         enum related bugs.
8020         * support/regression/tests/enum.c: added test for enum values that
8021         require at least 2 bytes of storage.
8022
8023 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8024
8025         * src/common.h: added ifndef/define/endif macros
8026         around the header file.
8027         Bug reported from Jesus Calvino-Fraga
8028
8029 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8030
8031         * sdcc.spec: updated
8032         * device/include/Makefile.in: don't install CVS directories
8033         * device/lib/Makefile.in: added removal of CVS directories after install
8034         * doc/Makefile: fixed install, added local_icons
8035         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
8036         * src/mcs51/gen.c (genRightShift): fixed bug #870788
8037         * src/ds390/gen.c (genRightShift): fixed bug #870788
8038         * src/SDCCast.c (decorateType): fixed bug #870781
8039
8040 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8041
8042         PIC16 port related changes:
8043         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
8044         added variable stackPos,
8045
8046         * gen.c: genCall, assignResultValue: added support for
8047         pushing/retrieving function parameters to/from stack,
8048         genFunction,genEndFunction: setup stack frame for the
8049         generated function,
8050         genAddrOf: will be changed according to bug 863624
8051
8052         * added files genutils.c and genutils.h which contain gen*
8053         debugged and optimised functions extracted from gen.c
8054
8055         * glue.c: added variable 'externs' which holds extern symbols,
8056         pic16emitRegularMap: is modified to properly handle relocatable
8057          symbols under the new scheme,
8058         pic16createInterruptVect: is modified
8059         pic16printPublics: is modified to emit 'global' assembler directives,
8060         added pic16_printExterns to print extern symbols,
8061         pic16glue: initializes stack/frame pointer in the beginning of
8062         the assembly output. Temporary hack, will be corrected later,
8063         because gplink yet does not support stack and SDCC does not
8064         yet support a type of crt0.o object to create the final binary.
8065
8066         * Removed many lines that contain 8051 legacy code.
8067         * The code is finally placed under a 'code' directive.
8068         * Added port specific options.
8069
8070         * _process_pragma: simplified since now we do not need *special*
8071         include file to define SFR registers. But a separate header
8072         will be needed. This will be developed later.
8073         * _pic16_parseOptions: added, parses port specific options:
8074         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
8075         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
8076         --preplace-udata-with=
8077
8078         * _pic16_setDefaultOptions: modified to initialize section names,
8079         but hack is temporarly out of order since it needs improvement.
8080         * _pic16_genAssemblerPreamble: configuration words are emitted by
8081         their address instead of their name. This part is incomplete and
8082         supports only the 18Fxx2 devices. Other devices will emit an error
8083         during assembly since they do not contain the same set of config
8084         registers
8085         * _pic16_genIVT: is modified,
8086
8087         * pcode.c: added definitions for some hardware registers that are needed
8088         for stack support
8089         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
8090         All PCI entries are updated. Now LFSR is supported.
8091         * Removed pic16_pciTRIS is mentioned by mdubuc in source
8092         * added pic16_newpCodeOpLit2 to support instructions with
8093         two literal arguments
8094         * pic16_pCode2str: corrected code that emits assembler instructions
8095         with two literal operands and those that have an access bit modifier
8096         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
8097         this fixes a bug which caused some labels to be lost, when an
8098         assembler directive was added, i.e. banksel,
8099         * pic16_FixRegisterBanking: improved logic that causes the insertion
8100         of bank switching,
8101         * InlineFunction: functions that are called once, are not any more
8102         inlined. This can be a port option in the future,
8103
8104         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
8105
8106         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
8107         hold the corresponding uninitialized symbols,
8108         * pic16_allocProcessorRegister: registers have explicit marked the
8109         accessBank field,
8110         * pic16_allocInternalRegister: registers are explicit marked as
8111         not used,
8112         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
8113         processing list, so bit registers were lost,
8114         *
8115
8116         * ralloc.h: added field 'accessBank' and original symbol operand
8117         in register definition,
8118         * removed the field isMapped from register definition,
8119
8120         ** Several functions have been removed from various sources:
8121         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
8122         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
8123         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
8124         pic16_assignRelocatableRegisters
8125
8126         ** others have been introduced:
8127         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
8128         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
8129
8130 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
8131
8132         * support/scripts/inc2h.pl: changed definition of BIT_AT
8133         to emit 'sbit at' instead of 'bit at'. This was a request.
8134
8135         PIC16 port related preliminary changes:
8136         * gen.c: prefixed function popRegFromString with
8137         pic16_ and all references to it corrected
8138         * pcode.c: all pic16_pc_* hardware registers prefixed
8139         with underscore (_),
8140         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
8141         * ralloc.c: newReg(): when register is REG_SFR then
8142         set address to rIdx,
8143         pic16_allocProcessorRegister(): marks register wasUsed=0
8144         pic16_writeUsedRegs(): added a call to assign processor
8145         registers via pic16_assignFixedRegisters
8146
8147 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8148
8149         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
8150         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
8151         variables in unused register banks.  Also the SSEG is placed
8152         wherever there is enough space for it, and IDATA can be anywhere
8153         in internal RAM.  For now compile using -Wl-Y[stack_size].
8154         The mem file is different for this option as well, since it
8155         makes no sense of talking about DSEG lenght.
8156
8157 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
8158
8159         * src/SDCClrange.c: fixed bug 869095 that caused segfault
8160         in certain cases, e.g. when ROM assignment, patch provided
8161         from Albert den Haan.
8162
8163 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
8164
8165         Many signedness and type propagation fixes:
8166         * src/SDCCicode.c: made geniCodeCast() static
8167         replaced SPEC_ by IS_ (cosmetic)
8168         (operandOperation): fixed div and mod operation
8169         (usualBinaryConversions): added support for promotion of char
8170         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
8171         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
8172         (geniCodeAdd): an array index will stay unsigned, even if promoted
8173         from char to int
8174         (geniCodeArray): ditto
8175         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
8176         * src/SDCCsymt.c (computeType): added more support for char;
8177         promotion of char is selectable by promoteCharToInt, fixed signedness
8178         for all cases
8179         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8180         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8181         * src/SDCCval (val*): replaced signedness calculation by
8182         computeType()
8183         rearranged if-branches (cosmetic)
8184         (valShift): added warning W_SHIFT_CHANGED
8185         (valCompare): fixed problem with different types
8186         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
8187         * support/regression/tests/literalop.c: added many cases
8188         * support/regression/tests/ast_constant_folding.c: changed finally to
8189         'unsigned int'
8190         * .version: new year, new version: 2.3.7
8191         * src/SDCCmain.c (main): applied patch #866468
8192         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
8193         provided by Scott Bronson
8194         * doc/sdccman.lyx: updated documentation for sdcdb
8195         updated and added chapter tips
8196
8197 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8198
8199         * src/SDCCsymt.h: missing from yesterday's commits
8200
8201 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8202
8203         * src/SDCC.y (struct_or_union_specifier),
8204         * support/Util/SDCCerr.c,
8205         * support/Util/SDCCerr.h: verify that struct & union tags are used
8206         as declared.
8207
8208 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8209
8210         * src/SDCCglobl.h: missing from yesterday's commits
8211
8212 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8213
8214         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
8215         sft_attributes, struct_declaration, parameter_declaration,
8216         type_name, start_block, declaration_list),
8217         * src/SDCC.lex (check_type): support redefinition of typedef names
8218
8219 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8220
8221         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
8222         aligned xdata arrays. Erik helped me with the if clause.
8223
8224 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8225
8226         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
8227         warning
8228
8229 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8230
8231         * src/SDCCast.h,
8232         * src/SDCCast.c (newAst_),
8233         * src/SDCCicode.h,
8234         * src/SDCCicode.c (ast2iCode, newiCode),
8235         * src/SDCCglobl.h,
8236         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
8237         expr, statement, expression_statement, selection_statement,
8238         iteration_statement, expr_opt, jump_statement): foundation for tracking
8239         sequence points
8240         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
8241         point code too)
8242
8243 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8244
8245         * support/Util/SDCCerr.c,
8246         * src/SDCCast.h,
8247         * src/SDCCast.c (createCase, createDefault, decorateType),
8248         * src/SDCClabel.c (labelUnreach),
8249         * src/SDCC.y (labeled_statement, jump_statement): More improvements
8250         to error messages.
8251         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
8252         (with thanks to Stas Sergeev)
8253         * device/include/time.h,
8254         * device/lib/time.c (CheckTime): suppress unreachable code warning
8255
8256 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8257
8258         * src/SDCCast.c (createIvalCharPtr),
8259         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
8260         bug #753752)
8261         * support/regression/tests/nullstring.c: tests for these two bugs
8262
8263 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8264
8265         * support/Util/SDCCerr.h,
8266         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
8267         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
8268         about storage class and 'at' used inside struct or union
8269         * src/SDCCBBlock.c (iCodeFromeBBlock),
8270         * src/SDCCcse.c (ifxOptimize),
8271         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
8272         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
8273         printIval, emitStaticSeg, emitOverlay),
8274         * src/SDCClabel.c (deleteIfx),
8275         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
8276         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
8277         gatherAutoInit, processParms),
8278         * support/Util/SDCCerr.h,
8279         * support/Util/SDCCerr.c (werrorfl): Support for better error location
8280         reporting for post-parse errors.
8281
8282 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8283
8284         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
8285         implicit casts via union; they don't work on big endian systems
8286         (possible fix for bug #861138)
8287
8288 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8289
8290         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
8291         * src/mcs51/main.c: fixed the fix for bug #737001
8292
8293 2003-12-15  Borut Razem <borut.razem AT siol.net>
8294
8295         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
8296
8297 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8298
8299         * support/makebin/makebin.c: put output in binary mode
8300
8301 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8302
8303         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
8304         xdata and data memory on startup. Set the environment variable
8305         SDCC_NOGENRAMCLEAR to disable this.
8306         * src/mcs51/peephole.def,
8307         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
8308         (allows non-interrupt and interrupt code to safely compete for a resource
8309         without the non-interrupt code having to disable interrupts)
8310
8311 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8312
8313         * src/SDCCicode.c (geniCodeAdd),
8314         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
8315         with valFromType if type might be a pointer and host is big endian).
8316         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
8317         types, not just integer types.
8318         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
8319         multiply defined with mismatching "at" address.
8320
8321 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8322
8323         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
8324         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
8325         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
8326         with embedded nulls (fixed bug #753752)
8327
8328 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8329
8330         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
8331         Apparently this did not see much testing (endless loop)
8332
8333 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8334
8335         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
8336
8337 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8338
8339         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
8340         gracefully handle NULL memmap pointers
8341
8342 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8343
8344         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
8345         instead of deleting the iCode when an operand is volatile
8346         * src/z80/gen.c (genDummyRead),
8347         * src/mcs51/gen.c (genDummyRead),
8348         * src/ds390/gen.c (genDummyRead),
8349         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
8350         not just IC_RIGHT
8351         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
8352         * src/SDCC.y: fixed bug #850420
8353
8354 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8355
8356         Applied z80 i/o port patch from Peter Townson and fixed some operators
8357         to better handle operands in A register.
8358         * device/include/z180.h
8359         * src/SDCC.y
8360         * src/SDCCglue.c
8361         * src/z80/gen.c
8362         * src/z80/gen.h
8363         * src/z80/main.c
8364         * src/z80/peeph-z80.def
8365         * src/z80/peeph.def
8366         * src/z80/z80.h
8367
8368 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8369
8370         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
8371
8372 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8373
8374         * device/lib/hc08/_mullong.c: Removed extra #endif
8375
8376 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8377
8378         * sim/ucsim/hc08.src/inst.cc,
8379         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8380         carries from x to h
8381         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8382         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8383         * device/include/stdarg.h: fixed varargs for hc08
8384         * device/lib/Makefile.in,
8385         * device/lib/hc08/Makefile,
8386         * device/lib/hc08/_mulint.c,
8387         * device/lib/hc08/_mullong.c: fixed some endian problems
8388
8389 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8390
8391         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8392         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8393         * device/lib/_gptrget.c,
8394         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8395
8396 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8397
8398         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8399         * src/SDCCast.c (astErrors): fixed bug #846007
8400         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8401
8402 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8403
8404         * src/SDCCast.c (decorateType): disabled a transformation I added in
8405         revision 1.188 (access to fields of a structure at an absolute address);
8406         it breaks with bitfields, extern declarations, and gcse analysis.
8407         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8408         could be assigned through a pointer, so don't complain.
8409         * src/SDCCast.c (astErrors),
8410         * src/SDCCast.h,
8411         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8412
8413 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8414
8415         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8416         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8417         output of __config directives, since gpasm now supports them
8418         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8419         pre-processor macro, i.e. -DMCU=p18f452
8420         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8421         and modified to handle 'cast' icode similarly to '=' icode
8422         * src/pic16/device.h (typedef struct PIC_device): added field
8423         'extMIface' to indicate that chip has external memory interface
8424         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8425         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8426         18F8720
8427
8428 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8429
8430         * src/SDCC.y (pointer): fixed bug #846006
8431         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8432         * src/SDCCast.c (decorateType): fixed bug #846009
8433         * src/ds390/peeph.def,
8434         * src/ds390/gen.c (genAnd, genOr),
8435         * src/mcs51/peeph.def,
8436         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8437
8438 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8439
8440         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8441         * src/SDCCdflow.c
8442         * src/SDCCcse.c
8443         * src/SDCCcse.h
8444         * src/SDCCBBlock.h
8445         * src/SDCCBBlock.c
8446
8447 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8448
8449         fixed bug #845089
8450         * src/SDCCbitv.h,
8451         * src/SDCCbitv.c: added function to free a bitvector
8452         * src/SDCClrange.h,
8453         * src/SDCClrange.c: added function to recompute the liveranges
8454         * src/avr/ralloc.c,
8455         * src/ds390/ralloc.c,
8456         * src/hc08/ralloc.c,
8457         * src/mcs51/ralloc.c,
8458         * src/pic/ralloc.c,
8459         * src/pic16/ralloc.c,
8460         * src/xa51/ralloc.c,
8461         * src/z80/ralloc.c: recompute the liveranges after register packing
8462
8463 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8464
8465         * src/SDCCloop.c (newInduction): fixed bug #845630
8466
8467 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8468
8469         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8470         inadvertantly left behind from my 2003-11-12 change
8471
8472 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8473
8474         Updated headers I neglected to commit yesterday.
8475         * src/SDCClrange.h,
8476         * src/SDCCicode.h
8477
8478 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8479
8480         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8481         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8482         * src/SDCCopt.c (eBBlockFromiCode),
8483         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8484         the creation of the key hash table from the sequencing so it can be used
8485         earlier (for some GCSE bug fixes still pending)
8486
8487 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8488
8489         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8490         * support/regression/tests/addsub.c: testing genPlus shortcut
8491
8492 2003-11-15  Borut Razem <borut.razem AT siol.net>
8493
8494         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8495
8496 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8497
8498         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8499         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8500         ordering is immaterial.
8501         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8502
8503 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8504
8505         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8506         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8507         (SIGSEV) of bug #840381
8508         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8509         unlink new file before rename if new and old filenames are the same)
8510
8511 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8512
8513         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8514         uninitialized variables) for the mcs51. Set environment variable
8515         SDCC_GENRAMCLEAR to test.
8516         xdata initialization slightly shorter
8517
8518 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8519
8520         * src/SDCCsymt.h,
8521         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8522         #838241 & 780691 (basicly the same bug)
8523         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8524         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8525
8526 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8527
8528         * src/SDCCmain.c (linkEdit): "fix" #834252
8529
8530 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8531
8532         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8533         * src/SDCCast.h,
8534         * src/SDCC.y: fixed bug #819403
8535
8536 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8537
8538         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8539         the reentrant attribute.
8540         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8541         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8542         simulation
8543         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8544         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8545         erroneously reduced to a literal.
8546         * src/hc08/ralloc.c (packRegisters, rematStr),
8547         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8548         some cases
8549
8550 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8551
8552         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8553         * doc/sdccman.lyx: changed from 'article' to 'book'
8554         * doc/Makefile: readded test_suite_spec and cdbfileformat
8555
8556 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8557
8558         * device/include/stdlib.h: include malloc.h to comply with ANSI
8559         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8560
8561 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8562
8563         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8564         * doc/clean.mk: also remove *.out files
8565         * doc/sdccman.lyx: some additions, larger top/bottom margins
8566
8567 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8568
8569         * src/SDCC.y: fixed bug #837365
8570         * support/regression/tests/bitopcse.c
8571         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8572         a symbol (might be valop instead)
8573         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8574         * device/lib/clean.mk: added hc08 to the cleaning list
8575
8576 2003-11-04  Borut Razem <borut.razem AT siol.net>
8577
8578         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8579           made 2003-11-04
8580         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8581           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8582           malloc is declared in standard stdlib.h
8583
8584 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8585
8586         * device/lib/hc08/Makefile: need to clean .rel not .o files
8587         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8588
8589 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8590
8591         * src/port.h,
8592         * src/hc08/main.c,
8593         * src/mcs51/main.c,
8594         * src/ds390/main.c,
8595         * src/z80/main.c,
8596         * src/avr/main.c,
8597         * src/pic/main.c,
8598         * src/pic16/main.c,
8599         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8600         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8601         tests (which uses the port's oclsExpense function)
8602         * src/SDCC.y,
8603         * src/SDCCast.c,
8604         * src/SDCCicode.c,
8605         * src/hc08/gen.c,
8606         * src/ds390/gen.c,
8607         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8608
8609 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8610
8611         * src/SDCCcse.c (ifxOptimize),
8612         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8613         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8614         deleting the IFX iCode.
8615         * src/hc08/ralloc.c: reduced unneeded slocs
8616         * src/hc08/gen.c: fixed bug in asmopToBoolean
8617
8618 2003-11-04  Borut Razem <borut.razem AT siol.net>
8619
8620         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8621           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8622           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8623           transferred to configure
8624
8625 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8626
8627         Use headers defined in the C[++] standards:
8628         * sim/ucsim/gui.src/serio.src/fileio.cc
8629         * sim/ucsim/gui.src/serio.src/frontend.cc
8630         * sim/ucsim/gui.src/serio.src/main.cc
8631         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8632         * support/Util/NewAlloc.c
8633         * as/hc08/lklibr.c
8634         * as/mcs51/lklibr.c
8635         * as/z80/aslist.c
8636         * as/z80/assym.c
8637
8638 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8639
8640         * Added MSVC projects for hc08 assembler and linker:
8641         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8642         /as/hc08/link_hc08.dsp
8643
8644 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8645
8646         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8647
8648 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8649
8650         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8651
8652 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8653
8654         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8655
8656 2003-10-31  Borut Razem <borut.razem AT siol.net>
8657
8658         * support/cpp2/cpplib.h,
8659           support/cpp2/cpplib.c,
8660           support/cpp2/cpplex.c,
8661           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8662           to switch _asm block preprocessing on / off. Default is
8663           #pragma preproc_asm +
8664
8665 2003-10-31  Borut Razem <borut.razem AT siol.net>
8666
8667         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8668           when outputting comment blocks (when executed with -C option) and
8669           _asm (SDCPP specific) blocks
8670
8671 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8672
8673         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8674
8675 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8676
8677         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8678
8679 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8680
8681         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8682         * src/SDCCast.c (decorateType): fixed bug #832664
8683
8684 2003-10-31  Borut Razem <borut.razem AT siol.net>
8685
8686         * support/cpp2/cpplex.c: fixed for SDCPP:
8687           comments(when executed with -C option) and _asm blocks
8688           were included even if they where in skipped #if block.
8689           Applied solution from GCC cpp 3.3.2
8690
8691 2003-10-31  Borut Razem <borut.razem AT siol.net>
8692
8693         * src/SDCC.lex: sdcc now understands both formats:
8694           '# <line_number> <file_name>' and
8695           '#line <line_number> <file_name>'
8696         * support/cpp2/cppmain.c: sdcpp now generates the standard
8697           '# <line_number> <file_name>' instead of former
8698           '#line <line_number> <file_name>'
8699
8700 2003-10-30  Borut Razem <borut.razem AT siol.net>
8701
8702         * support/cpp2/cpphash.h,
8703         * support/cpp2/cpplib.h
8704         * support/cpp2/cpplex.c,
8705         * support/cpp2/cppmain.c,
8706         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8707
8708 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8709
8710         Fixed a number of problems revealed by bug #827883.
8711         * src/SDCCloop.c (loopInvariants): Spill location of the
8712         result operand should be recomputed if extracted from
8713         a loop. Also, don't extract assignments of an iTemp
8714         from a literal.
8715         * src/SDCCast.c (isConformingBody): loop reversal should
8716         not occur if the control variable is involved with a
8717         relational operator.
8718
8719 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8720
8721         * .version: bumped to 2.3.6 to reflect the big improvements
8722         made by Erik and Klaus. Thanks!
8723
8724 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8725
8726         Replaced the livrange code.
8727         * src/SDCClrange.c: added new LR code
8728         * src/SDCCloop.c,
8729         * src/SDCCBBlock.h: removed remainig parts from old LR code
8730         * src/ds390/ralloc.c,
8731         * src/ds390/gen.c: minor fixes to make it work with new code
8732
8733 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8734
8735         * as/hc08/asm.h,
8736         * as/hc08/lkrloc.c,
8737         * src/hc08/gen.c,
8738         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8739         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8740         (tweaked fix for bug #818696)
8741
8742 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8743
8744         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8745
8746 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8747
8748         * src/SDCCmain.c,
8749         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8750         * src/mcs51/gen.c (gencjneshort),
8751         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8752         more efficient (per Scott Bronson's suggestion)
8753
8754 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8755
8756         Extended the semantics of the critical keyword to include
8757         individual statements. See RFE #827755 and #799831
8758         * src/SDCC.y
8759         * src/SDCCicode.c
8760         * src/SDCCopt.c
8761         * src/SDCCast.c
8762         * support/Util/SDCCerr.c
8763         * support/Util/SDCCerr.h
8764         * src/mcs51/gen.c
8765         * src/ds390/gen.c
8766         * src/hc08/gen.c
8767
8768 2003-10-19  Borut Razem <borut.razem AT siol.net>
8769
8770         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8771
8772 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8773
8774         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8775         Fixed bug #818696
8776         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8777         and predecrement operand is displayed
8778
8779 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8780
8781         * src/SDCCval.c (valMinus): fixed bug #826041
8782
8783 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8784
8785         Some hc08 related updates that I missed earlier
8786         * sim/ucsim/stypes.h
8787         * support/regression/ports/hc08/spec.mk
8788
8789 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8790
8791         New target "hc08" for the Motorola 68hc08 family of micros
8792
8793         * configure
8794         * configure.in
8795         * Makefile
8796         * src/hc08/*
8797         * src/SDCCmain.c
8798         * src/port.h
8799         * sim/ucsim/hc08.src/*
8800         * sim/ucsim/configure.in
8801         * src/ucsim/configure
8802         * sim/ucsim/packages_in.mk
8803         * as/hc08/*
8804         * as/Makefile
8805         * device/include/mc68hc908qy.h
8806         * device/lib/hc08/*
8807         * device/lib/Makefile.in
8808         * support/regression/ports/hc08/*
8809         * support/regression/Makefile
8810
8811 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8812
8813         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8814         regression test
8815         * src/ds390/gen.c (genCast): fixed bug #821957
8816
8817 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8818
8819         * device/lib/logf.c: "fixed" overlay bug
8820         * support/regression/ports/host/spec.mk: added m library
8821         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8822         * support/regression/tests/float_trans: added (for Eric)
8823
8824 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8825
8826         * src/mcs51/gen.c (genCpl): fixed bug
8827         http://sf.net/mailarchive/message.php?msg_id=6263915
8828
8829 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8830
8831         * src/SDCCast.c (decorateType): added extended constant folding
8832         * src/SDCCsymt.c (computeType): cleanup
8833         * src/SDCCval.c (valShift): minor optimization
8834         * support/regression/tests/ast_constant_folding.c: added
8835
8836 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8837
8838         * src/SDCCmain.c: removed some unintended changes
8839
8840 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8841
8842         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8843         * src/z80/gen.c: fixed part of bug #817589
8844         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8845
8846 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8847
8848         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8849         * src/SDCCcflow.c
8850         * src/SDCCcse.c
8851         * src/SDCCdflow.c
8852         * src/SDCClabel.c
8853         * src/SDCClrange.c
8854         * src/SDCCmem.c
8855         * src/SDCCopt.c
8856         * src/SDCCpeeph.c
8857         * src/SDCCset.c
8858         * src/avr/ralloc.c
8859         * src/ds390/ralloc.c
8860         * src/izt/ralloc.c
8861         * src/mcs51/ralloc.c
8862         * src/pic/ralloc.c
8863         * src/pic16/ralloc.c
8864         * src/xa51/ralloc.c
8865         * src/z80/ralloc.c
8866         * src/z80/gen.c: removed unused label "release:"
8867
8868 2003-10-06  Borut Razem <borut.razem AT siol.net>
8869
8870         * src/SDCC.lex: removed definition of unused variables
8871           save_optimize and save_options
8872
8873 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8874
8875         * clean.mk: removed '=' in "-maxdepth=1"
8876         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8877         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8878
8879 2003-10-06  Borut Razem <borut.razem AT siol.net>
8880
8881         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8882           my_unput() replaced by unput()
8883
8884 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8885
8886         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8887         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8888         type-punned pointer will break strict-aliasing rules"
8889         Old LR behaviour is again default; Klaus' LR can be choosen by
8890         defining the environment variable LRKLAUS
8891         * src/SDCCBBlock.h
8892         * src/SDCCloop.c
8893         * src/SDCClrange.c
8894         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8895         * clean.mk: fixed removal of files in bin/CVS/
8896         * device/lib/clean.mk: fixed removal of directories small and large
8897         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8898         * src/SDCCicode.c,
8899         * src/SDCCval.c: removed superflous test for pedantic
8900
8901 2003-10-05  Borut Razem <borut.razem AT siol.net>
8902
8903         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8904           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8905           message "unmatched #pragma SAVE and #pragma RESTORE"
8906
8907 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8908
8909         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8910           assembly, critical functions, atomic, nojtbound)
8911
8912 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8913
8914         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8915         * src/SDCCBBlock.h
8916         * src/SDCCloop.c
8917         * src/SDCCloop.h
8918         * src/SDCClrange.c
8919
8920 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8921
8922         * src/z80/gen.h,
8923         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8924         * src/mcs51/gen.h
8925         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8926         * src/ds390/gen.h
8927         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8928         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8929         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8930
8931 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8932
8933         * src/z80/gen.c (genRet): fixed bug #524753
8934         * src/z80/gen.c (genCast): fixed internal error on cast from
8935         pointer to long
8936         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8937         fix for bug #477835 to the z80
8938         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8939         for tracking iCodes in the peephole optimizer for z80
8940
8941 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8942
8943         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8944         the other part of bug #814548
8945         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8946
8947 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8948
8949         * src/SDCCcse.c: fixed part of bug #814548
8950
8951 2003-09-28  Borut Razem <borut.razem AT siol.net>
8952
8953         * src/asm.c: rewrite of printILine() to use temporary file instead
8954           a pipe
8955         * src/xa51/main.c: commented out declaration of int rewinds
8956
8957 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8958
8959         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8960
8961 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8962
8963         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8964         * src/asm.c (printILine): Fixed bug #811015
8965
8966 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8967
8968         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8969         freeing.
8970
8971 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8972
8973         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8974         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8975         to correctly handle general case of AOP_PAIRPTR
8976         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8977
8978 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8979
8980         * src/mcs51/ralloc.c (fillGaps),
8981         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8982         register positioning bug)
8983
8984 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8985
8986         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8987
8988 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8989
8990         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8991         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8992         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8993         (ralloc doesn't intentionally do this now, but perhaps later)
8994         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8995         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8996         register positioning bugs (Fixed bug #762602 and #795325)
8997         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8998         (Fixed bug #808779)
8999         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
9000         lines that --i-code-in-asm generates
9001
9002 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9003
9004         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
9005         trying to fclose a FILE* that was already closed.
9006
9007 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9008
9009         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
9010         of const struct should be treated as if const themselves)
9011
9012 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
9013
9014         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
9015
9016 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9017
9018         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
9019         Unix (/n) and DOS (/r/n) line terminations.
9020
9021 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9022
9023         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
9024         bug #613775
9025
9026 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9027
9028         * src/mcs51/gen.c (genFunction, genEndFunction),
9029         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
9030         and restore of EA so that stack offsets to parameters are
9031         correct when using both critical and reentrant/stack-auto.
9032         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
9033         size (can be triggered in error if sloc is shared between
9034         different sized objects)
9035         * device/include/float.h: fixed macros to explicitly use
9036         unsigned long where needed
9037
9038 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
9039
9040         Feature req. 799831: added code to allow nesting of critical functions
9041         * src/mcs51/gen.c (genFunction, genEndFunction)
9042         * src/ds390/gen.c (genFunction, genEndFunction)
9043
9044 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9045
9046         * src/SDCCsymt.c (sclsFromPtr),
9047         * src/SDCCsymt.h,
9048         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
9049         support for standard C idiom of memory mapped variables; for
9050         example, *((xdata int*)0x1234) = 1 is now internally equivalent
9051         to xdata int at 0x1234 tempvar = 1.
9052         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
9053         provided by Akiya ISHIDA
9054
9055 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
9056
9057         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
9058         * src/SDCCval.c (constVal): added reduction from int to char
9059         * src/SDCCval.c (valMult, valDiv): fixed sign handling
9060         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
9061         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
9062         to ignore the sign
9063         * support/regression/tests/shifts.c: fixed
9064
9065 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9066
9067         * src/z80/gen.c (genXor): Fixed bug #805445
9068
9069 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9070
9071         Fixed bug #621531 (const & volatile confusion in the type chain).
9072         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
9073         refer to the const or volatile state of the pointer itself.
9074
9075         * src/SDCCast.c
9076         * src/SDCCglue.c
9077         * src/SDCCicode.c
9078         * src/SDCCsymt.c
9079         * src/SDCCval.c
9080         * src/SDCC.y
9081         * src/SDCCsymt.h
9082         * src/pic/gen.c
9083         * src/pic/ralloc.c
9084         * src/pic16/gen.c
9085         * src/pic16/ralloc.c
9086         * support/regression/tests/const.c
9087
9088 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9089
9090         When checking for duplicated modules, use absolute paths
9091         instead of relative paths.  Files changed:
9092
9093         * as/mcs51/lklib.c
9094         * link/z80/lklib.c
9095
9096 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9097
9098         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
9099
9100 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9101
9102         * device/include/string.h: added size_t typedef, changed
9103         prototypes to use size_t, eliminated separate reentrant and
9104         non-reentrant declarations, added _memmove declaration
9105         * device/lib/_memcpy.c: changed to use size_t instead of int,
9106         changed /4 to >>2 to avoid division library call
9107         * device/lib/_memcmp.c,
9108         * device/lib/_memset.c,
9109         * device/lib/_strncat.c,
9110         * device/lib/_strncpy.c,
9111         * device/lib/_strncmp.c: changed to use size_t instead of int
9112         * device/lib/_memmove.c: new file (fixed bug #772294)
9113         * device/lib/Makefile.in: added _memmove.c
9114         * device/lib/z80/asm_strings.s: fixed bug #772290
9115         * support/regression/tests/bitfields.c: attempt to fix host assertion
9116         failure on amd64-unknown-linux2.2
9117
9118 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9119
9120         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
9121         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
9122         * as/z80/asmain.c (main): fixed bug #801766
9123
9124 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
9125
9126         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
9127         compilers
9128
9129 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9130
9131         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
9132         reported in bug #800609
9133
9134 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
9135
9136         * Top header beautifications in src/pic16 directory:
9137           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
9138           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
9139           pcoderegs.h, ralloc.c, ralloc.h
9140         * main.c: added top header and GPL license notice
9141         * pcode.c: fixed the if-conditional warning
9142
9143 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
9144
9145         * device/lib/_mullong.c: replaced int by short for gcc
9146
9147 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9148
9149         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
9150         and JUMPTABLE iCodes properly now (worked by accident before)
9151         * src/mcs51/gen.c (leftRightUseAcc),
9152         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
9153         iCode properly now. Use getSize instead of nRegs since a & b
9154         aren't part of the nRegs tally.
9155
9156 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
9157
9158         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
9159         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
9160           before instructions that use the _STATUS register
9161
9162 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
9163
9164         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
9165         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
9166         fetching of the pointer
9167         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
9168         copied from genNearPointerSet()
9169         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
9170         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
9171         If they pop r0/r1 they must be called in the opposite order than aopOp().
9172         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
9173         (resp. --stack-auto), prepared for --xstack
9174
9175 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9176
9177         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
9178
9179 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9180
9181         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
9182         these ports have their own __sdcc_external_start()
9183
9184 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
9185
9186         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9187         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
9188         type for bits was changed. It resulted in bit variables becoming
9189         global, which is not permitted in PIC 14 assembly output.
9190
9191 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9192
9193         * doc/sdccman.lyx: various additions and updates. Rearranged sections
9194
9195 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9196
9197         Z80 and MCS51 linkers complaint if a public symbol is defined
9198         in more than one library module:
9199
9200         * as/mcs51/lklib.c
9201         * link/z80/lklib.c
9202         * as/mcs51/Makefile.in
9203
9204 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9205
9206         A few small changes that speed up the peephole optimizer.
9207
9208         * src/SDCCpeeph.c
9209
9210 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9211
9212         Try to make the peephole optimizer smarter by maintaining
9213         an association between the assembly source code and the
9214         iCodes that originated them. Put this information to use
9215         with a new peephole rule condition "notVolatile" so that
9216         the rules can be aggressive yet still safe.
9217
9218         * src/SDCCpeeph.c
9219         * src/SDCCpeeph.h
9220         * src/mcs51/gen.c
9221         * src/mcs51/peeph.def
9222
9223 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9224
9225         Fixed bug #741761
9226
9227         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
9228         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
9229         if the left or right operand symbols have the accuse flag set.
9230
9231 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9232
9233         Changed the type of the result of the ! (NOT) operator to char;
9234         previously it returned the same type as the source. This allows
9235         us to eliminate all the genFloatNot functions (all of its target
9236         implementations were very buggy) since !float can use the same
9237         code as !long now.
9238
9239         * src/SDCCicode.c (ast2iCode): ! returns char
9240         * src/mcs51/gen.c (genNot, genNotFloat),
9241         * src/ds390/gen.c (genNot, genNotFloat),
9242         * src/z80/gen.c (genNot, genNotFloat),
9243         * src/pic/gen.c (genNot, genNotFloat),
9244         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
9245
9246 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
9247
9248         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9249         1. Interrupt would not compile properly. Ensure PCLATH register is saved
9250            during interrupts. Ensure WSAVE is located at a shared bank address.
9251         2. Fixed page selection in some places
9252         3. Fixed BTFSS/C to where necessary use registers directly and not simply
9253            the registers name strings.
9254         4. Fixed "signed / unsigned compare" compiler warnings.
9255         5. The PIC port manages its own allocation of the general purpose
9256            registers, but makes no attempt to reuse them. As a result when
9257            compiling it soon runs out of general purpose registers. Some
9258            additional code was added to the files pcode.c and device.c to walk
9259            through the function call tree and rename the registers so that they
9260            get reused.
9261
9262         * src/pic/device.c
9263         * src/pic/gen.c
9264         * src/pic/glue.c
9265         * src/pic/pcode.c
9266         * src/pic/pcode.h
9267         * src/pic/ralloc.c
9268         * src/pic/ralloc.h
9269         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
9270         genPlus() & genMinus() when the result is the same as left or right
9271
9272 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9273
9274         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
9275
9276 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9277
9278         Made bitfield a distinct type from bit so that bitfields
9279         convert as per ANSI C and bits retain their traditional
9280         boolean style behaviour. Implemented bitfield support in
9281         the z80 port.
9282
9283         * src/SDCCsymt.h,
9284         * src/SDCCsymt.c,
9285         * src/SDCCast.c,
9286         * src/cdbFile.c,
9287         * src/mcs51/gen.c,
9288         * src/ds390/gen.c: bit v bitfield split
9289         * src/z80/gen.c: New support for bitfields
9290         * support/regression/tests/bitfields.c: reenabled z80,
9291         added more tests
9292
9293 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9294
9295         Rules 246.x, 247.x relate to bitfields, the others speed up
9296         access to xdata mapped I/O devices.
9297
9298         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
9299
9300 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9301
9302         Cleaned up genPackBits and genUnpackBits and added two helper
9303         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
9304         for literal assignments in genPackBits (thanks to Frieder for
9305         reminding me).
9306
9307         * src/mcs51/gen.c
9308         * src/ds390/gen.c
9309
9310 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9311
9312         Fixed bug #748310 (pointer to function type mishandled when the
9313         function name is omitted). Also fixed a SIGSEGV when a function
9314         attribute (reentrant, etc) is used on a non-function or on a
9315         function but misplaced before the parameter list.
9316
9317         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
9318         bug #748310
9319         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
9320         * support/Util/SDCCerr.h,
9321         * support/Util/SDCCerr.c: Added func attr misuse error msg
9322
9323 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9324
9325         Fixed bug #787649 by anonymous
9326         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
9327         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
9328
9329 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9330
9331         Fixed numerous bitfield problems.
9332
9333         * src/SDCC.y: More bitfield related error checking
9334         * src/SDCCsymt.h,
9335         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
9336         * support/Util/SDCCerr.h,
9337         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
9338         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9339         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9340         * support/regression/tests/bitfields.c: tests added
9341
9342 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9343
9344         Made the constant following the "interrupt" keyword optional. If
9345         omitted, the function will not automatically be given an entry
9346         in the interrupt vector table (similar to #pragma NOIV, but
9347         less syntacticly kludgy). The interrupt number is also now
9348         range checked. Also fixed a bug in the high order bit example
9349         in the manual.
9350
9351         * src/SDCC.y
9352         * src/SDCCmem.c
9353         * src/SDCCglue.c
9354         * src/SDCCsymt.h
9355         * support/Util/SDCCerr.c
9356         * support/Util/SDCCerr.h
9357         * doc/sdccman.lyx
9358
9359 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9360
9361         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
9362         * src/SDCCicode.c (operandOperation): rewritten some ops
9363         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
9364         * src/SDCCsymt.c (computeType): literals are handled the same way as any
9365         other type
9366         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
9367         be re-activated by defining REDUCE_LITERALS)
9368         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
9369         unsigned, but are signed by default
9370         * src/SDCCval.c (constVal): rearranged
9371         * src/SDCCval.c (valMod): preliminary fix
9372         * src/SDCCval.c (valCastLiteral): use TYPE_* types
9373         * support/regression/literalop.c: added, work in progress
9374
9375 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9376
9377         Generate warnings for useless declarations like "char data;"
9378         that don't do what new users expect.
9379
9380         * src/SDCC.y
9381         * support/Util/SDCCerr.h
9382         * support/Util/SDCCerr.c
9383
9384 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9385
9386         * src/SDCCval.c (valMult): fix overflow detection of negative int
9387
9388 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9389
9390         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9391
9392         Changes to support big endian targets:
9393
9394         * src/ports.h
9395         * src/SDCCglue.c
9396         * src/avr/main.c
9397         * src/ds390/main.c
9398         * src/izt/i186.c
9399         * src/mcs51/main.c
9400         * src/pic/main.c
9401         * src/pic16/main.c
9402         * src/xa51/main.c
9403         * src/z80/main.c
9404
9405 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9406
9407         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9408         * device/lib/time.c: fixed warning "integer overflow in expression"
9409
9410 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9411
9412         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9413         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9414         constants are unsigned; added recognition of "u" flag for unsigned
9415         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9416         * src/SDCCval.c (valDiv, valMod): fixed signdness
9417         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9418         signedness of modulo, left and right shift
9419         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9420         * support/Util/SDCCerr.h: added warning W_INT_OVL
9421         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9422         * src/SDCCast.c (ast_print): improved output of constants
9423
9424 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9425
9426         Fixed some warnings when building with MSVC:
9427
9428         * as/mcs51/asdata.c
9429         * as/z80/asdata.c
9430         * as/mcs51/asm.h
9431         * as/z80/asm.h
9432         * link/z80/aslink.h
9433         * link/z80/lkdata.c
9434         * link/z80/lkeval.c
9435         * link/z80/lkgb.c
9436         * link/z80/lkihx.c
9437         * link/z80/lks19.c
9438         * link/z80/lksym.c
9439         * support/cpp2/cpplib.c
9440         * src/ds390/gen.c
9441         * src/mcs51/gen.c
9442
9443 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9444
9445         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9446
9447 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9448
9449         * support/librarian/clean.mk: Do not remove Makefile.
9450         * support/librarian/Makefile: added.
9451
9452 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9453
9454         Added librarian to MSVC build:
9455         * all.dsp
9456         * sdcc.dsw
9457         * support/librarian/librarian.dsp
9458
9459         'configure' not needed for librarian, removed:
9460         * support/librarian/configure
9461         * support/librarian/configure.in
9462         * support/librarian/config_in.h
9463         * support/librarian/Makefile.in
9464
9465         Hopefully these ones built the librarian and the rest of sdcc properly:
9466         * Makefile
9467         * Makefile.common.in
9468
9469         Messed up 'configure', so revert to previous version:
9470         * configure
9471         * configure.in
9472
9473 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9474
9475         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9476         there, while the mantissa of a double is "only" 53 bits wide.
9477
9478 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9479
9480         Adding sdcclib to the build.  MSVC project coming soon.
9481         Files added/changed:
9482
9483         * support/librarian/clean.mk
9484         * support/librarian/configure
9485         * support/librarian/configure.in
9486         * support/librarian/config_in.h
9487         * support/librarian/Makefile.bcc
9488         * support/librarian/Makefile.in
9489         * support/librarian/sdcclib.c
9490         * Makefile.bcc
9491         * Makefile
9492         * Makefile.common.in
9493         * configure
9494         * configure.in
9495
9496 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9497
9498         Linker now complaints if linked modules have conflicting options, for
9499         example, one compiled using --model-large and another one compiled with
9500         --model-small.  The following files were modified:
9501
9502         * as/mcs51/asdata.c
9503         * as/mcs51/aslink.h
9504         * as/mcs51/asm.h
9505         * as/mcs51/asmain.c
9506         * as/mcs51/asout.c
9507         * as/mcs51/i51pst.c
9508         * as/mcs51/lkdata.c
9509         * as/mcs51/lklibr.c
9510         * as/mcs51/lkmain.c
9511         * as/z80/asdata.c
9512         * as/z80/asm.h
9513         * as/z80/asmain.c
9514         * as/z80/asout.c
9515         * as/z80/z80pst.c
9516         * link/z80/aslink.h
9517         * link/z80/lkdata.c
9518         * link/z80/lklibr.c
9519         * link/z80/lkmain.c
9520         * src/SDCCglue.c
9521
9522 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9523
9524         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9525         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9526
9527 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9528
9529         * src/z80/mappings.i: fix _mul[us][int,long] entries
9530
9531 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9532
9533         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9534
9535 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9536
9537         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9538         * support/regression/tests/bitopcse.c: added
9539         fixed warning:
9540         * src/avr/gen.c:
9541         * src/pic/gen.c:
9542         * src/pic16/gen.c:
9543         * src/z80/gen.c:
9544         * src/xa51/gen.c:
9545
9546 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9547
9548         added support for new library format to z80, gbz80 linkers:
9549         *link/z80/aslink.h
9550         *link/z80/lklex.c
9551         *link/z80/lklib.c
9552         *link/z80/lklist.c
9553
9554 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9555
9556         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9557         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9558
9559 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9560
9561         added DUMMY_READ_VOLATILE:
9562         * src/SDCC.y:
9563         * src/avr/gen.c:
9564         * src/xa51/gen.c:
9565         * src/z80/gen.c:
9566         * src/pic/gen.c:
9567         * src/pic16/gen.c:
9568         * src/mcs51/gen.c:
9569         * src/ds390/gen.c:
9570         * src/SDCCcse.c (algebraicOpts): many improvements
9571         * src/SDCCcse.h: removed algebraicOpts()
9572         * src/SDCCicode.c (picDummyRead): added
9573
9574 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9575
9576         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9577         "Insufficient space in data memory".
9578
9579 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9580
9581         * src/mcs51/gen.c: fixed bug #771358
9582         * src/z80/gen.c: fixed bug #759087
9583
9584 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9585
9586         * src/pic16/glue.c: minor cleanup by Vangelis
9587
9588 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9589
9590         * device/include/regc515c.h: fixed #758477
9591         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9592         * device/lib/_gptrput.c: saved a few bytes
9593         * my tab spacing is 8, yours too?)
9594         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9595         * device/lib/serial.c: process RX bytes earlier than TX bytes
9596         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9597
9598 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9599
9600         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9601
9602 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9603
9604     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9605
9606 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9607
9608         * device/lib/Makefile.in: bad fix, reverted to 1.43
9609
9610 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9611
9612         * device/lib/Makefile.in: added missing z80 object files
9613
9614 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9615
9616         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9617         pic16 progress by Vangelis:
9618         * src/SDCCglobl.h:
9619         * src/SDCCmain.c:
9620         * src/pic/Makefile:
9621         * src/pic:
9622         * pic/Makefile:
9623         * pic16/device.c:
9624         * pic16/device.h:
9625         * pic16/gen.c:
9626         * pic16/gen.h:
9627         * pic16/genarith.c:
9628         * pic16/glue.c:
9629         * pic16/main.c:
9630         * pic16/pcode.c:
9631         * pic16/pcode.h:
9632         * pic16/pcodepeep.c:
9633         * pic16/peeph.def:
9634
9635 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9636
9637     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9638
9639 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9640
9641     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9642     added gbz80 build to MSVC project.
9643     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9644     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9645     from 8051 stuff and setup so it links using a .lnk file.
9646
9647 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9648
9649     * support/librarian/sdcclib.c: sdcc librarian.
9650     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9651     with sdcclib.
9652
9653 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9654
9655     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9656
9657 2003-07-02  Borut Razem <borut.razem AT siol.net>
9658
9659         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9660         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9661         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9662         src/xa51/main.c, src/z80/main.c:
9663         virtualization of glue() function: each port has it's own glue function,
9664         which is accessed by do_glue function pointer in PORT.general structure
9665
9666 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9667
9668         * DS800C400 fun, improved ROM interface and tinibios.
9669
9670 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9671
9672         * More support for DS80C400. Now includes beginning of interface to ROM.
9673
9674 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9675
9676         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9677
9678 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9679
9680         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9681
9682 2003-06-19  Borut Razem <borut.razem AT siol.net>
9683
9684         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9685
9686 2003-06-19  Borut Razem <borut.razem AT siol.net>
9687
9688         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9689         fixed Z80 port - crt0.o: cannot open.
9690
9691 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9692
9693         * support/Util/MySystem.c (merge_command): revert bad fix
9694
9695 2003-06-18  Borut Razem <borut.razem AT siol.net>
9696
9697         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9698
9699 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9700
9701         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9702         option --use-stdout sends errors to stdout instead of stderr.
9703
9704 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9705
9706         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9707
9708 2003-06-15  Borut Razem <borut.razem AT siol.net>
9709
9710         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9711         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9712         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9713         fixed width array of pointers replaced with sets;
9714         multiple include and lib paths ared transferred to preprocessor and linker
9715         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9716         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9717         fixed width array of pointers
9718         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9719         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9720         fixupPath(), getPathDifference()
9721         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9722         fixed width array of pointers
9723
9724 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9725
9726         * src/pic16/ralloc.c: fix warnings
9727         * src/pic16/pcode.c: fix warning
9728
9729 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9730
9731          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9732         know all the details, but essentially this set of changes enable
9733         the pic16 port to generate movff instructions and generate assembler
9734         directives,
9735         * src/SDCCmain.c:
9736         * src/pic16/gen.c:
9737         * src/pic16/glue.c:
9738         * src/pic16/pcode.c:
9739         * src/pic16/device.c:
9740         * src/pic16/main.c:
9741         * src/pic16/pcode.h:
9742         * src/pic16/pcoderegs.c:
9743         * src/pic16/ralloc.c:
9744         * src/pic16/ralloc.h:
9745
9746 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9747
9748         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9749         added option --vc, so sdcc errors and warnings are compatible with
9750         Microsoft Visual Studio.
9751
9752 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9753
9754         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9755           device/lib/libfloat.lib: added atof function.
9756
9757 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9758
9759         * doc/sdccman.lyx: updated to Lyx 1.3
9760         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9761         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9762         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9763
9764 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9765
9766         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9767
9768 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9769
9770         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9771           additions to the "related tools/documentation" section
9772
9773 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9774
9775         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9776
9777 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9778
9779         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9780         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9781
9782 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9783
9784         * doc/sdccman.lyx: fix double dash and other minor things
9785         * doc/Makefile: fix double dash
9786
9787 2003-05-28  Karl Bongers(patches from Martin Helmling)
9788         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9789           condition and ignore commands.
9790
9791 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9792
9793         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9794           is in parts still quite out of date, I did changes as far as I felt makes sense
9795           for a non-native english speaker.
9796           Please feel free to add to the manual or to correct my changes.
9797         * doc/Makefile: undid touching the date of intermediate tex files.
9798
9799 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9800
9801         * doc/sdccman.lyx: Manual has an index now
9802
9803 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9804
9805         Finalize muluint/mulsint and mululong/mulslong merging:
9806         * device/lib/_mulint.c
9807         * device/lib/_mullong.c
9808         * device/lib/gbz80/mul.s
9809         * device/lib/gbz80/stubs.s
9810         * device/lib/z80/mul.s
9811         * device/lib/z80/stubs.s
9812         * src/SDCCsymt.c (initCSupport)
9813
9814 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9815
9816         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9817         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9818           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9819           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9820           instead of /Zm500.
9821
9822 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9823
9824         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9825           the regression tests I'm not brave enough to enable 245.b, 245.c
9826         * doc/sdccman.lyx: added latex preamble for hyperref package.
9827           Using pdflatex this will give you a hyperlinked pdf file with
9828           bookmarks. (prepend '%' before /usepackage if this breaks something)
9829
9830 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9831
9832          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9833
9834 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9835
9836         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9837
9838 2003-05-21    <johan AT balder>
9839
9840         * src/SDCCglue.c (printIval): fixed bug #739934
9841
9842 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9843
9844         Applied patch from bug 737905 (renamed yylineo to mylineno):
9845         * src/altlex.c
9846         * src/SDCCast.c
9847         * src/SDCglobl.h
9848         * src/SDCC.lex
9849         * src/SDCCsymt.c
9850         * src/SDCCval.c
9851         * src/pic16/pcode.c: Cleaned warnings
9852         * src/pic16/pcodeflow.c: Cleaned warnings
9853         * src/pic16/pcoderegs.c: Cleaned warnings
9854
9855 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9856
9857         * src/pic16/pcode.c: Cleaned warnings
9858         * src/pic16/pcodepeep.c: Cleaned warnings
9859         * src/pic16/ralloc.c: Cleaned warnings
9860
9861 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9862
9863         * doc/sdccman.lyx: fixed bug 739745
9864         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9865
9866 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9867
9868         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9869         it can be defined with CFLAGS when running configure
9870         * src/SDCCmain.c: fixed compiling + linking with object files
9871
9872 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9873
9874         * configure.in: configure for pic16 port,
9875             added --disable-pic16-port
9876         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9877         * src/SDCCmain.c: linkOptions is changed to set *,
9878             added if/endif conditional macros to remove options help
9879             messages from optionsTable when a port is not configured, added
9880             support for the PIc16 port in the ports table, when executing
9881             the compiler with no port specified on command line, a default
9882             port is selected with the new macro DEFAULT_PORT which is
9883             defined in port.h, in setDefaultOptions() linkOptions is removed
9884             from initialization assignment, since now it is a set,
9885             parseCmdLine uses setParseWithComma for linkOptions, in
9886             linkEdit() linkOptions are accessed with new function indexSet()
9887             which returns the i'th item of a set variable. See SDCCset.c, in
9888             linkEdit() when calling buildCmdLine(), added linkOptions as
9889             last argument. Now users can pass arguments to gplink via the
9890             -Wl option, main() uses pic16glue() to glue up pic16 programs
9891         * src/SDCCpeeph.c: various changes to support pic16
9892         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9893             return the i'th item of the set
9894         * src/SDCCset.h: added function prototype for indexSet()
9895         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9896         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9897         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9898             added macro DEFAULT_PORT
9899         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9900         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9901             generated
9902         * src/pic16/glue.c: commented out some error producing lines
9903         * src/pic16/main.c: __config directives are commented out to stop
9904             gpasm complaining and test the linkage with gplink, _linkCmd and
9905             _asmCmd changed to be more gplink and gpasm friendly
9906         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9907             produced an error when parsed, peep rule 12 is added to utilize
9908             movff, but it is commented out since the pCode does not support
9909             yet a command with 2 address arguments
9910
9911 2003-05-18    <johan AT balder>
9912
9913         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9914         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9915 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9916
9917         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9918   Added feature to script commands from file.
9919
9920 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9921
9922         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9923         * src/SDCCutil.c: include ctype.h for win32
9924
9925 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9926
9927         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9928
9929 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9930
9931         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9932   Fixed so you can set breakpoints prior to run, run does not stop
9933   on entry now.  Add tbreak.  Other enhancements and fixes for use
9934   with ddd.
9935
9936 2003-05-12  Borut Razem <borut.razem AT siol.net>
9937
9938         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9939
9940 2003-05-11  Borut Razem <borut.razem AT siol.net>
9941
9942         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9943         the path of bin directory, so that PATH is the only env. variable, which has to be set
9944         in case of standard installation.
9945         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9946         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9947         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9948
9949 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9950
9951         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9952         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9953         temp files are in the port dir; clean the gen/test directory when
9954         generating new test.c
9955         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9956         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9957         * support/regression/tests/zeropad.c: added
9958
9959 2003-05-09    <johan AT balder>
9960
9961         * src/SDCCglue.c: fixed bug #597940
9962
9963 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9964
9965         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9966   cache sfr, optimize next,step, fix off by one sourceline,
9967   support ddd list function.
9968         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9969
9970 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9971
9972         * support/regression/HTMLgen.py: added compare_s2f()
9973         * support/regression/Makefile: redo 1.27
9974         * support/regression/generate-cases.py: redo 1.5
9975
9976 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9977
9978         * support/regression/tests/float.c: workaround 33 bit hex constant
9979         * support/regression/tests/simplefloat.c: fix division for host
9980
9981 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9982
9983         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9984         that tame's the PIC's over-aggressive optimizer.
9985
9986 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9987
9988          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9989          support for MSVC.
9990
9991 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9992
9993         Initial support for DS80C400. "Hello world" runs on TINIm400
9994         (with polled I/O).
9995
9996 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9997
9998          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9999          * Some notes on ddd usage added in debugger/README
10000          Martin Helmling adding more features and fixes for ddd GUI debugger.
10001          Code added for nexti, stepi, up, down, and other adjustments.
10002
10003 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
10004
10005         * src/pic/pCodepeep.c non-wildcard asmops are now handled
10006         * src/pic/peeph.def Added two rules to optimize carry manipulation
10007         * src/pic/* removed debug printfs
10008
10009 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
10010
10011         * debugger/mcs51/cmd.c: added header newalloc.h
10012
10013 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
10014
10015         * as/Makefile: new EXEEXT
10016         * as/z80/Makefile: remove trailing slash of BUILDIR
10017         * as/z80/clean.mk: new EXEEXT
10018         * Makefile.common.in: add to CFLAGS (and others), don't replace it
10019         * support/cpp2/Makefile.in: new EXEEXT
10020         * src/pic/glue.c (pic14emitRegularMap): fixed warning
10021
10022 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
10023
10024         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
10025         EXEEXT was introduced to fix all related problems with targets
10026         "clean", "install" and "uninstall"; a couple of further flaws
10027         especially with "clean" have been fixed too
10028         * as/mcs51/Makefile.in
10029         * as/mcs51/clean.mk
10030         * as/z80/Makefile
10031         * Makefile
10032         * clean.mk
10033         * debugger/mcs51/Makefile.in
10034         * debugger/mcs51/clean.mk
10035         * link/z80/Makefile
10036         * link/z80/Makefile.in
10037         * link/z80/clean.mk
10038         * link/Makefile
10039         * packihx/Makefile.in
10040         * packihx/clean.mk
10041         * sim/ucsim/Makefile
10042         * sim/ucsim/clean.mk
10043         * sim/ucsim/avr.src/Makefile.in
10044         * sim/ucsim/avr.src/clean.mk
10045         * sim/ucsim/s51.src/Makefile.in
10046         * sim/ucsim/s51.src/clean.mk
10047         * sim/ucsim/xa.src/Makefile.in
10048         * sim/ucsim/xa.src/clean.mk
10049         * sim/ucsim/z80.src/Makefile.in
10050         * sim/ucsim/z80.src/clean.mk
10051         * sim/ucsim/main_in.mk
10052         * sim/ucsim/packages_in.mk
10053         * sim/ucsim/gui.src/Makefile.in
10054         * sim/ucsim/gui.src/serio.src/Makefile.in
10055         * sim/ucsim/gui.src/serio.src/clean.mk
10056         * src/Makefile.in
10057         * src/clean.mk
10058         * support/cpp2/Makefile.in
10059         * support/cpp2/clean.mk
10060         * support/makebin/Makefile
10061         * support/makebin/clean.mk
10062         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
10063         * doc/sdccman.lyx: --program-suffix no longer needed
10064
10065 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
10066
10067          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
10068          Martin Helmling added support for ddd GUI debugger.
10069          Code added to display assembly, set variables, and other commands
10070          to interface to ddd.
10071
10072 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
10073
10074         * as/Makefile: fix target clean
10075         * as/clean.mk: fix target clean
10076         * as/z80/clean.mk: fix target clean
10077
10078 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
10079
10080         * Makefile.common.in: added  AT EXEEXT AT
10081         * configure.in: removed all mingw32 stuff
10082         * configure: rebuilt from configure.in
10083         * doc/sdccman.lyx: updated section "installation"
10084         * support/scripts/sdcc_mingw32: adapted to configure
10085         * support/scripts/sdcc_cygwin_mingw32: added
10086
10087 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
10088
10089         * src/pic Added object file support for the PIC port
10090         * src/pic Applied patch from Craig Franklin (this started the object file support)
10091         * src/regression Updated the PIC regression tests for object files
10092
10093 2003-04-20  Borut Razem <borut.razem AT siol.net>
10094
10095         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
10096           lklex.c: In function `getfid':
10097           lklex.c:203: warning: array subscript has type `char'
10098         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
10099           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
10100         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
10101           stack handling macros
10102
10103 2003-04-19  Borut Razem <borut.razem AT siol.net>
10104
10105         * "handling space characters in file path" task:
10106         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
10107         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
10108         * support/Util/MySystem.h: make it self-sufficient
10109         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
10110           src/z80/main.c, sdcc/as/mcs51/lklex.c:
10111           handling space characters in file path
10112         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
10113           (it will be used by assemblers, which have their own includes, e.g. gpasm)
10114         * support/Util/MySystem.c: handling space characters in executable's path
10115
10116 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
10117
10118         * as/z80/Makefile: fix permanent rebuild of z80
10119         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
10120         * support/regression/tests/bitfields.c: added Johan's bitfields.c
10121
10122 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
10123
10124         * src/SDCCopt.c: add special case optimization to replace modulo by
10125           a power of two with a bitwise AND.
10126
10127 2003-04-18    <johan AT balder>
10128
10129         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
10130
10131 2003-04-17    <johan AT balder>
10132
10133         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
10134         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
10135
10136 2003-04-13  Borut Razem <borut.razem AT siol.net>
10137
10138         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
10139         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
10140           fixed mingw problem in adl_NORMALIZE_PATH
10141
10142 2003-04-12  Borut Razem <borut.razem AT siol.net>
10143
10144         * fixed "#pragma SAVE/RESTORE can not be nested":
10145         * src/SDCC.lex: reworked pragma handling functions
10146         * sdcc/src/SDCCglobl.h: reworked stack handling macros
10147         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
10148
10149 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10150
10151         * src/SDCCutil.c (pathEquivalent): defined but not used
10152         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
10153         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
10154         * configure: rebuilt from configure.in
10155         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10156         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10157         * device/include/Makefile.in: replace sdcc_datadir
10158         * device/lib/Makefile.in: replace sdcc_datadir
10159         * Makefile.common.in: add LDFLAGS from configure
10160         * packihx/Makefile.in: use LDFLAGS
10161         * src/Makefile.in: use LDFLAGS
10162         * support/cpp2/Makefile.in: add LDFLAGS from configure
10163         * support/makebin/Makefile: use LDFLAGS
10164         * .version: bumped version number to 2.3.5
10165
10166 2003-04-12  Borut Razem <borut.razem AT siol.net>
10167
10168         * completed "different paths" task:
10169         * src/SDCCmacro.c: fixed bug in handling quotes
10170         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
10171         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
10172
10173 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10174
10175         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
10176
10177 2003-04-11 kevin Vigor <kevin AT vigor.nu>
10178
10179         * ds390/gen.c ds390/peeph.def: fix bug 706781
10180
10181 2003-04-11  Borut Razem <borut.razem AT siol.net>
10182
10183         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
10184
10185 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
10186
10187         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
10188         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
10189          set - this bit used to not be set...).
10190         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
10191           bad code in PIC Port
10192         * src/regression/and2.c added to test bug 609268
10193         * src/regression/Makefile added and2.c to regression test
10194
10195
10196 2003-04-08    <johan AT CP255758-A>
10197
10198         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
10199         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
10200         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
10201
10202 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
10203
10204         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
10205         fix bug #487815
10206         * support/cpp2/Makefile.in: fix bug #487815
10207         * configure: rebuilt from configure.in
10208         * Makefile.common.in: docdir changed, new path suffixes
10209         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10210         * sdcc_vc_in.h: reflect changes from sdccconf.h
10211         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
10212         * src/SDCCutil.h: remove BINDIR hack
10213         * doc/sdccman.lyx: update new path hierarchy
10214
10215 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10216
10217         * src/SDCCpeeph.c: added okToRemoveSLOC test
10218
10219 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10220
10221         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
10222
10223 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10224
10225         * src/SDCCpeeph.c: added labelIsReturnOnly test
10226         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
10227
10228 2003-04-05    <johan AT balder>
10229
10230         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
10231         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
10232         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
10233         * src/SDCCast.c: fixed a warning
10234         * src/SDCCast.h: fixed a warning
10235         * src/SDCCicode.c (operandFromAst): fixed a warning
10236
10237 2003-04-04    <johan AT balder>
10238
10239         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
10240         * src/SDCCast.c (decorateType): fixed bug #715076
10241         * src/SDCC.y: fixed bug #702907
10242
10243 2003-04-03    <johan AT balder>
10244
10245         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
10246         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
10247         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
10248         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
10249         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
10250
10251 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
10252
10253         * _decdptr.c: fix return values
10254         * _gptrget.c: fix return values
10255         * _gptrgetc.c: fix return values
10256         * _gptrput.c: fix return values
10257         * _mulint.c: fix return values
10258         * as/z80/Makefile: fix 'make -j' problem
10259
10260 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
10261
10262         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
10263         * configure.in: big cleanup, updated to autoconf 2.5x
10264         * configure: rebuilt from configure.in
10265         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10266         * sdcc_vc_in.h: reflect changes from sdccconf.h
10267         * doc/Makefile: fixed a flaw in "make install"
10268
10269 2003-04-02    <johan AT balder>
10270
10271         * src/ds390/gen.c (genCmp): no comments
10272         * src/mcs51/gen.c (genCmp): no comments
10273         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
10274         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
10275
10276 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
10277
10278         * support/regression/generate-cases.py: place generated file in given sub directory
10279         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
10280         * support/regression/Makefile: improvements for 'make -j';
10281         side effect: it's simpler and faster now
10282
10283 2003-03-31  Borut Razem <borut.razem AT siol.net>
10284
10285         * src/z80/main.c: link-{port} and as-{port} defined without path
10286         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
10287
10288 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
10289
10290         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
10291
10292 2003-03-30  Borut Razem <borut.razem AT siol.net>
10293
10294         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
10295           changed type of list parameter to set
10296         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
10297         * src/port.h: changed type of do_assemble() parameter to set
10298         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
10299           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
10300           definition of "cppoutfilename" macro with NULL value in preProcess()
10301         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
10302         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
10303         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
10304           replaced with set *binPathSet
10305         * shash_add() deallocates the item, if allready exsists, before adding the new one
10306         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
10307
10308 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
10309
10310         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
10311           a nested for loop bug in the PIC port
10312         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
10313           for loops
10314
10315 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
10316
10317         * support/Util/dbuf.h: remove C++ stuff to make it portable
10318
10319 2003-03-28  Borut Razem <borut.razem AT siol.net>
10320
10321         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
10322           literal strings in stringLiteral()
10323         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
10324         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
10325           to the project
10326
10327 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
10328
10329         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
10330
10331 2003-03-26    <johan AT balder>
10332
10333         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
10334         * src/ds390/gen.c (saveRegisters): catched symbol abuse
10335         * src/SDCCast.c (decorateType): fixed " -v < 3"
10336
10337 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
10338
10339         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
10340         Added Lenny Story's debug infrastructure changes:
10341         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
10342         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
10343         * src/cdbFile.c: added
10344         * src/SDCCdebug.c: added
10345         * src/SDCCdebug.h: added
10346         * src/SDCCast.c (createFunction)
10347         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
10348         * src/SDCCmain.c (parseCmdLine, main)
10349         * src/SDCCmem.c (redoStackOffsets)
10350         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
10351         * src/SDCCsymt.h
10352         * src/common.h
10353         * src/avr/gen.c (genAVRCode)
10354         * src/ds390/gen.c (gen390Code)
10355         * src/mcs51/gen.c (gen51Code)
10356         * src/pic/gen.c (genpic14Code)
10357         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
10358         * src/xa51/gen.c (genXA51Code)
10359         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
10360
10361 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10362
10363         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
10364         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
10365
10366 2003-03-22    <johan AT balder>
10367
10368         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
10369
10370 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
10371
10372         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
10373         * doc/cdbfileformat.lyx: added, written by Lenny Story
10374         * doc/Makefile: added cdbfileformat.lyx
10375         * doc/clean.mk: added cdbfileformat.lyx
10376
10377 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
10378
10379         * src/mcs51/peeph.def: fix bug #705773
10380
10381 2003-03-20    <johan AT balder>
10382
10383         An sfr/sbit can have an "at #" AND an initializer
10384         * src/SDCCsymt.c (checkSClass):
10385         * src/SDCCmem.c (allocGlobal):
10386         * src/SDCCmem.c (allocLocal):
10387         * src/SDCCast.c (createBlock):
10388
10389 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10390
10391         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10392
10393 2003-03-16    <johan AT balder>
10394
10395         Undid the hackup of const and volatile, the problem is much bigger
10396         * src/SDCC.y:1.65
10397         * src/SDCCast.c:1.171
10398         * src/SDCCglue.c:1.138
10399         * src/SDCCicode.c:1.146
10400         * src/SDCCsymt.c:1.150
10401         * src/SDCCval.c:1.65
10402
10403 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10404
10405         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10406         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10407
10408 2003-03-13    <johan AT balder>
10409
10410         Hackup const and volatile modifiers in type chains a bit:
10411         * src/SDCC.y:1.63
10412         * src/SDCCast.c:1.169
10413         * src/SDCCglue.c:1.136
10414         * src/SDCCicode.c:1.143
10415         * src/SDCCsymt.c1.146
10416         * src/SDCCsymt.h1.59
10417         * src/SDCCval.c:1.63
10418
10419 2003-03-12    <johan AT balder>
10420
10421         * src/SDCCBBlock.h: more LRH debugging junk
10422         * src/SDCCcflow.h: more LRH debugging junk
10423         * src/SDCCloop.c: more LRH debugging junk
10424         * src/SDCC.y (struct_declaration): fixed bug #697590
10425         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10426         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10427         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10428
10429 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10430         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10431         test function names must now match exactly).
10432         * src/SDCCcse.c: added special case in findCheaperOp to allow
10433         extending a short integer. Makes less awful code for bug 700121 test case.
10434
10435 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10436
10437         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10438         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10439
10440 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10441
10442         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10443         actually called (operandsNotEqual() was called for all
10444         operandsNotEqualX tests).
10445
10446 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10447
10448         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10449         with shorter literals. Fixes bug 700121.
10450
10451 2003-03-11    <johan AT balder>
10452
10453         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10454
10455 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10456
10457         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10458         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10459
10460 2003-03-10  Borut Razem <borut.razem AT siol.net>
10461
10462         * src/SDCCmain.c: pipe preprocessor's output
10463         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10464         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10465         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10466         which closes all pipes in pipeSet set
10467         * src/SDCCset.c: free deleted item in function deleteSetItem()
10468         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10469         moved from z80 to src subproject
10470         * .version: increased version number to 2.3.4
10471
10472 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10473
10474         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10475         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10476         * support/regression/ports/xa51/spec.mk: fix typo
10477
10478 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10479
10480         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10481
10482 2003-03-09  Borut Razem <borut.razem AT siol.net>
10483
10484         * src/SDCCmain.c: pipe preprocessor's output
10485         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10486         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10487         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10488         which closes all pipes in pipeSet set
10489         * src/SDCCset.c: free deleted item in function deleteSetItem()
10490         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10491         moved from z80 to src subproject
10492
10493 2003-03-09  Borut Razem <borut.razem AT siol.net>
10494
10495         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10496         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10497         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10498         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10499         * src/SDCCglobl.h: unification of WIN32 native definitions
10500
10501 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10502
10503         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10504
10505 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10506
10507         * src/configure.in:   check for endianess (even while cross-compiling)
10508         * src/configure:      check for endianess (even while cross-compiling)
10509         * src/configure_in.h: check for endianess (even while cross-compiling)
10510         * src/avr/gen.c:        remove old endianess stuff
10511         * src/mcs51/gen.c:      remove old endianess stuff
10512         * src/ds390/gen.c:      remove old endianess stuff
10513         * src/pic/gen.c:        remove old endianess stuff
10514         * src/pic/genarith.c:   remove old endianess stuff
10515         * src/pic/glue.c:       fix endianess check
10516         * src/pic16/gen.c:      remove old endianess stuff
10517         * src/pic16/genarith.c: remove old endianess stuff
10518         * src/pic16/glue.c:     fix endianess check
10519         * src/xa51/gen.c:       remove old endianess stuff
10520         * src/z80/gen.c:        fix endianess check
10521         * src/SDCCglue.c:       fix endianess check
10522         * src/ds390/peeph.def: fix bug 700036
10523
10524 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10525
10526         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10527         * src/configure: find appropriate data-types on host for SDCC's int and long
10528         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10529         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10530         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10531
10532 2003-03-07    <johan AT balder>
10533
10534         Just a big NOOP:
10535                 some minor cleanups before the big shot
10536                 OP_DEFS and OP_USES now use Kevin's protection
10537                 new option --nolabelopt
10538
10539         * src/SDCCBBlock.c:
10540         * src/SDCCast.c,:
10541         * src/SDCCcflow.c:
10542         * src/SDCCcse.c:
10543         * src/SDCCicode.c:
10544         * src/SDCCicode.h:
10545         * src/SDCClabel.c:
10546         * src/SDCCloop.c:
10547         * src/SDCCmain.c:
10548         * src/ds390/ralloc.c:
10549         * src/mcs51/ralloc.c:
10550         * src/pic/ralloc.c:
10551         * src/xa51/ralloc.c:
10552         * src/z80/ralloc.c:
10553
10554 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10555
10556         * src/pic/pcode.c (get_op): fix 64 bit warnings
10557         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10558         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10559         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10560         * support/regression/tests/malloc.c: fix 64 bit warnings
10561
10562 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10563
10564         * src/mcs51/gen.c (genMinus): fixed bug 696436
10565
10566 2003-03-02  Borut Razem <borut.razem AT siol.net>
10567
10568         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10569
10570 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10571
10572         * configure.in: test for mkstemp
10573         * sdccconf_in.h: add HAVE_MKSTEMP
10574
10575 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10576
10577         * device/include/ctype.h: removed warning while using --stack-auto
10578         * device/include/malloc.h: removed warning while using --stack-auto
10579         * device/include/string.h: removed warning while using --stack-auto
10580
10581 2003-02-23  Borut Razem <borut.razem AT siol.net>
10582
10583         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10584         because NDEBUG is defined (see man assert)
10585         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10586
10587 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10588
10589         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10590         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10591
10592 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10593
10594         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10595         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10596
10597 2003-02-18    <johan AT balder>
10598
10599         * as/mcs51/asmain.c (asmbl): module can start with a digit
10600         * as/z80/asmain.c (asmbl): module can start with a digit
10601
10602 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10603
10604         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10605         * src/asm.c: fix pipe() for Mingw32
10606
10607 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10608
10609         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10610         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10611         make -V work again; --c1mode reads now from stdin
10612         * doc/sdccman.lyx: added --c1mode
10613         * support/Util/SDCCerr.c: new messages for c1 mode
10614         * support/Util/SDCCerr.h: new messages for c1 mode
10615         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10616
10617 2003-02-15    <johan AT balder>
10618
10619         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10620
10621 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10622
10623         * doc/sdccman.lyx: Environment variables, -o and other minor things
10624
10625 2003-02-14    <johan AT balder>
10626
10627         * src/xa51/main.c: before anyone really tries to use it :)
10628
10629         * Install doc's in share/sdcc/doc
10630         * removed some obsolete files
10631         * Do a proper make distclean and uninstall
10632         M Makefile.common.in
10633         R sdccbuild.sh
10634         M as/Makefile
10635         M device/include/Makefile.in
10636         M device/lib/Makefile.in
10637         M doc/sdccman.lyx
10638         M link/Makefile
10639         M sim/ucsim/doc/Makefile.in
10640         M src/clean.mk
10641         R src/avr/peeph.rul
10642         R src/xa51/peeph.rul
10643         M support/cpp2/Makefile.in
10644         M support/makebin/Makefile
10645
10646
10647 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10648
10649         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10650
10651 2003-02-10  Borut Razem <borut.razem AT siol.net>
10652
10653         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10654         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10655         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10656         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10657         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10658         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10659         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10660         src/z80/Makefile.bcc: Borland Makefile cleanup
10661         * as/z80/Makefile.bcc: Added Borland Makefile
10662         * support/cpp2/borland.h: Removed
10663
10664 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10665
10666         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10667         * src/SDCC.lex: new pragma NOIV
10668         * src/SDCCglobl.h: new pragma NOIV
10669         * src/SDCCmem.c: new pragma NOIV
10670
10671 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10672
10673         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10674
10675 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10676
10677         * src/SDCCmain.c: signal handling is switched off by --debug
10678         * doc/Makefile: small fix for install; use clean.mk again
10679         * doc/clean.mk: clean *.pdf and *.html too
10680
10681 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10682
10683         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10684         * device/lib/printfl.c: fix a ds390 bug by making it portable
10685         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10686         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10687         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10688         * debugger/mcs51/cmd.c: converted multi-line string literals
10689         * sim/ucsim/globals.cc: converted multi-line string literals
10690         * src/SDCCmain.c: introduced signal handler to remove temp files
10691         * doc/Makefile: small tweaks, implement clean
10692         * doc: removed generated files
10693
10694 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10695
10696         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10697         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10698         Address Record is not correctly generated for DS390."
10699
10700 2003-02-02  Borut Razem <borut.razem AT siol.net>
10701
10702         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10703         * as/mcs51/asm.h: fixed compilation with Borland C
10704         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10705         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10706         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10707         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10708         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10709         src/z80/Makefile.bcc: delete $(LIB) only if exist
10710         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10711
10712 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10713
10714         * device/include/malloc.h: introduced NULL
10715         * device/include/string.h: introduced NULL
10716         * device/include/stdlib.h: introduced NULL
10717         * device/lib/_memcpy.c: removed NULL
10718         * device/lib/_strcat.c: removed NULL
10719         * device/lib/_strchr.c: removed NULL
10720         * device/lib/_strcmp.c: removed NULL
10721         * device/lib/_strcpy.c: removed NULL
10722         * device/lib/_strcspn.c: removed NULL
10723         * device/lib/_strlen.c: removed NULL
10724         * device/lib/_strncat.c: removed NULL
10725         * device/lib/_strncmp.c: removed NULL
10726         * device/lib/_strncpy.c: removed NULL
10727         * device/lib/_strpbrk.c: removed NULL
10728         * device/lib/_strrchr.c: removed NULL
10729         * device/lib/_strspn.c: removed NULL
10730         * device/lib/_strstr.c: removed NULL
10731         * device/lib/_strtok.c: removed NULL
10732         * device/lib/malloc.c: removed NULL, include own header
10733
10734 2003-02-02    <johan AT balder>
10735
10736         * 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
10737         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10738         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10739         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10740         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10741         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10742
10743 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10744
10745         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10746         area 'DATA'"
10747
10748 2003-02-01    <johan AT balder>
10749
10750         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10751
10752 2003-01-31    <johan AT CP255758-A>
10753
10754         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10755
10756 2003-01-30    <johan AT balder>
10757
10758         * src/SDCCBBlock.c: automatic bug detection
10759         * src/SDCCicode.c: automatic bug detection
10760
10761 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10762
10763         * src/SDCCglobl.h:   now --xram-size 0 works
10764         * src/SDCCmain.c:    now --xram-size 0 works
10765
10766 2003-01-29    <johan AT balder>
10767
10768         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10769
10770 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10771
10772         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10773         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10774         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10775         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10776         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10777         * src/SDCCmain.c:    Added options --xram-size and --code-size
10778
10779 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10780
10781         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10782         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10783
10784 2003-01-27    <johan AT balder>
10785
10786         * src/SDCC.y: fixed bug #613764
10787
10788 2003-01-26    <johan AT balder>
10789
10790         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10791         * src/SDCCsymt.h: fixed bug #673374
10792         * src/SDCCglue.c: fixed bug #661910
10793         * src/SDCCast.c: fixed bug #458099 and 673374
10794
10795 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10796
10797         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10798         * as/mcs51/strcmpi.h: added
10799         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10800         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10801         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10802         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10803         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10804         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10805         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10806         * as/mcs51/Makefile.aslink: new module strcmpi
10807         * as/mcs51/Makefile.asx8051: new module strcmpi
10808         * as/mcs51/Makefil.bcc: new module strcmpi
10809         * as/mcs51/Makefile.in: new module strcmpi
10810         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10811
10812 2003-01-26    <johan AT balder>
10813
10814         * src/SDCCglue.c: reverted back to 1.124
10815         * src/SDCCast.c: reverted back to 1.156
10816         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10817
10818 2003-01-25    <johan AT balder>
10819
10820         * src/SDCCglue.c: A better fix for bug #661910
10821         * src/SDCCast.c: A better fix for bug #661910
10822         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10823
10824 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10825
10826         * src/Makefile.in: remove spawn.o
10827         * src/SDCCmain.c: remove spawn.h
10828         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10829         * src/spawn.c: removed
10830         * src/spawn.h: removed
10831         * support/regression/ports/ds390/spec.mk: link with -r
10832
10833 2003-01-24    <johan AT CP255758-A>
10834
10835         * src/ds390/gen.c (aopOp): fixed bug #667458
10836         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10837         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10838         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10839
10840 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10841
10842         * src/mcs51/peeph.def: better assembler identation by Frieder
10843         * src/mcs51/gen.c: better assembler identation by Frieder
10844
10845 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10846
10847         * as/z80/string.h: removed for gcc 3.2
10848         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10849         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10850
10851 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10852
10853         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10854         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10855         * support/regression/Makefile: separate temp files for ports
10856         * support/regression/generate-cases.py: separate temp files for ports
10857         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10858         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10859
10860 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10861
10862         * moved tinitalk to device/examples/ds390
10863
10864 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10865
10866         * as/mcs51/lkmem.c: rflag is for DS390
10867         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10868         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10869                          (linkEdit): move mem- and map-files the same way as ihx-files
10870         * src/z80/main.c (_setDefaultOptions): removed --generic
10871         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10872         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10873         * src/pic/glue.c (picglue): --c1mode works again
10874         * src/pic16/glue.c (pic16glue): --c1mode works again
10875         * src/asm.c (printCLine): fix #660034
10876
10877 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10878
10879         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10880         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10881         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10882         * as/mcs51/lkmem (summary): better fix for sp problem
10883         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10884         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10885         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10886                                               remove --stack-after-data
10887
10888 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10889
10890         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10891         * src/SDCCutil.c (join): ugly bug: missing '\0'
10892         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10893
10894 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10895
10896         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10897         * src/port.h: typo
10898         * src/pic/main.c (_asmCmd): gpasm supports -o
10899         * src/z80/main.c: more general macros
10900         * device/lib/Makefile.in: remove intermediate files
10901
10902 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10903
10904         * .version: Bumped version number to 2.3.3
10905         * src/SDCCBBlock.c: new option -o
10906         * src/SDCCglobl.h: new option -o
10907         * src/SDCCglue.c: new option -o
10908         * src/SDCCmain.c: new option -o
10909         * src/asm.c: new option -o
10910         * src/ds390/main.c: new option -o
10911         * src/pic/glue.c: new option -o
10912         * src/pic/pcode.c: new option -o
10913         * src/pic/ralloc.c: new option -o
10914         * src/pic16/glue.c: new option -o
10915         * src/pic16/pcode.c: new option -o
10916         * src/pic16/ralloc.c: new option -o
10917         * src/z80/main.c: new option -o
10918         * device/lib/Makefile.in: use -o
10919         * support/regression/ports/ds390/spec.mk: use -o
10920         * support/regression/ports/gbz80/spec.mk: use -o
10921         * support/regression/ports/mcs51/spec.mk: use -o
10922         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10923         * support/regression/ports/z80/spec.mk: use -o
10924         * support/regression/ports/ucz80/spec.mk: use -o
10925         * support/regression/ports/xa51/spec.mk: use -o
10926         * support/regression/fwk/lib/timeout.c: fix usage string
10927
10928 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10929         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10930
10931 2003-01-07    <johan AT balder>
10932
10933         * src/SDCCast.c (decorateType): fixed bug #600035
10934
10935 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10936         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10937         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10938         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10939         * src/pic/pcode.c: outcommented unused variable to remove warnings
10940         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10941
10942 2003-01-06    <karl AT turbobit.com>
10943         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10944    regression tests.
10945
10946 2003-01-06    <johan AT balder>
10947
10948         * src/SDCCicode.c: fixed array add
10949
10950 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10951         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10952         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10953
10954 2003-01-04    <johan AT balder>
10955
10956         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10957
10958 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10959         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10960
10961 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10962         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10963         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10964
10965 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10966         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10967
10968 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10969         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10970
10971 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10972         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10973
10974 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10975
10976     * in /sdcc/as/mcs51/ changed these files in order to create an
10977     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10978     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10979     following files to include the previous two files: aslink.dsp,
10980     Makefile.aslink, Makefile.bcc, and Makefile.in.
10981
10982     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
10983     .adb instead of .cdb
10984
10985 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10986
10987         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
10988         value from option --iram-size.
10989
10990 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10991
10992         * /sdcc/as/mcs51/lklist.c: added boundary check before using
10993         dram[] array.
10994
10995 2002-09-18    <wiml AT hhhh.org>
10996
10997         * SDCClrange.h: exposed setFromRange() and setToRange()
10998         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10999           packRegsForAccUse() (bug 542397)
11000         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
11001           multiple times and emitting the fetch operations more than once
11002           added aopGetUsesAcc() function to allow binary operators to
11003           fetch their operands in the correct order; made genMinus() emit
11004           compact code for X = LITERAL - Y
11005
11006 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11007         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
11008         sprintf() in line 1267.
11009
11010 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11011         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
11012         like ports.
11013
11014 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11015         Changes to aslink (All the changes are marked with 'JCF'):
11016
11017         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
11018         summary().
11019
11020         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
11021         area BSEG.  Also moves, if possible, the DATA area down into the internal
11022         ram so more space is available.
11023
11024         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
11025         sflag.
11026
11027         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
11028         not bytes.  Function summary() which creates a memory usage summary
11029         file with extension .mem.  Reports of overlaping stack and small stack
11030         size.  If the space for the stack is less than 16 bytes aslink trows a
11031         warning.
11032
11033         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
11034         the 8051.  Option 'y' for memory summary output file.
11035
11036         Changes to sdcc (All the changes are marked with 'JCF'):
11037
11038         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
11039
11040         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
11041         overlaying area for it (uses RegBankUsed[4]).
11042
11043         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
11044         bank zero as used by default.  By default aslink locates the stack
11045         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
11046         the creation of the .mem file.  Delegates the allocation of data area
11047         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
11048         the begining of the stack area to aslink.
11049
11050         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
11051         glue() in SDCCglue.c creates an area for it.
11052
11053 2002-09-03  Borut Razem <borut.razem AT siol.net>
11054         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
11055         sdcc/src/pic/glue.c:
11056         introduced atexit() handler for teporay files removal in case of
11057         errors, assertions, ...
11058
11059 2002-08-29  Borut Razem <borut.razem AT siol.net>
11060         * sdcc/support/cpp2/auto-host_vc_in.h:
11061         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
11062         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
11063         Maybe there is a similar problem with BORLANDC? It should be checked!
11064
11065         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
11066         corrected improper use of assert: the assignment to clr variable was done inside the assert.
11067         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
11068         was not executed, and the compiler (cl) launched a warning:
11069         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
11070
11071 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
11072         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
11073
11074 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
11075         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
11076
11077         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11078           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
11079           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
11080           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11081           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
11082           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
11083           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
11084         - added Release configuration in VS projects
11085         - review of compiler an linker options
11086         - VC .exe files are generated in bin_vc directory, not to interfere
11087           with binaries generated from other projects (cygwin, mingw, bcc ...)
11088
11089         * sdcc/src/yacc.dsp: added
11090
11091         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
11092         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
11093         and insert the version number definitions from .version
11094
11095         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
11096
11097         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
11098         added - genarate auto-host.h using auto-host_vc_in.h as template
11099
11100         * sdcc/sdcc_vc.h,
11101         removed from CVS, generated automatically
11102
11103 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
11104         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
11105
11106 2002-08-11  Borut Razem <borut.razem AT siol.net>
11107         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
11108
11109 2002-08-10  Borut Razem <borut.razem AT siol.net>
11110         * src/SDCCmain.c (main):
11111         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
11112         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
11113         The consequence was that some temporary files were not removed.
11114
11115         * src/SDCCglue.c:
11116         unification of code in functions tempfilename() and tempfile():
11117         function tempnam() is defined in Visual Studio 6.0 and .NET
11118
11119         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
11120
11121         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11122           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
11123         - removed compiler command line option /WX: Treats all warnings as errors
11124         - update a list of source files, included into the project
11125
11126         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11127           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
11128         changed project type to Generic Project so that can be correcly converted to VS.NET project
11129
11130         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
11131
11132         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
11133
11134         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
11135
11136         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
11137         added return 0 statements after assert() to make compiler happy
11138
11139         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
11140         added newline in the def file to keep MSC compiler satisfied
11141
11142         * sdcc/src/z80/gen.c:
11143         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
11144           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
11145         - solved MSC error in function aopDump()
11146
11147         * sdcc_vc.h: define PREFIX as "\\sdcc"
11148
11149 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
11150         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
11151
11152 2002-06-22  Scott Dattalo <scott AT dattalo.com>
11153         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
11154         - Rewrote the register banking algorithm.
11155         - Added pCode live-range analysis to registers (for now, only non-used and
11156         singly-used registers optimized away)
11157
11158         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
11159
11160         * 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.
11161
11162 2002-05-10  Scott Dattalo <scott AT dattalo.com>
11163         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
11164
11165 2002-04-22  Michael Hope  <michaelh AT vroom>
11166
11167         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
11168
11169         * configure.in (DD_COPT): Added include support required for gbdk.
11170
11171         * .version: Bumped version number just to increase it.
11172
11173         * src/SDCCmain.c: Added -nostdinc to the default options.
11174
11175 2002-04-15  Michael Hope  <michaelh AT vroom>
11176
11177         * device/lib/z80/printf.c (sprintf): Added.
11178
11179         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
11180
11181         * src/z80/peeph.def: Added transpose redundent load rule.
11182
11183         * src/z80/main.c: Added force callee saves for jaune.
11184
11185         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
11186
11187         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
11188
11189 2002-03-28  Johan Knol  <johan AT balder>
11190
11191         * src/SDCCval.c: fixed bug #532436
11192
11193 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11194         * /src/port.h:
11195         Added "char *Processor" field to the port structure.
11196
11197         * /src/SDCCmain.c:
11198         Added -p option. Allows port dependent processor to be specified.
11199
11200         * all ports:
11201         Initialized the new field char *Processor field to NULL in all ports
11202
11203         * /src/pic/*:
11204         Compiler generated registers for interrupt context saving
11205         were not getting allocated.
11206
11207 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
11208
11209         * /src/SDCCast.c:
11210         Fixed left shift. Will promote the left side of a left shift
11211         if a) left shifting more than size of operand or b) when assigned
11212         to something size > size of left side
11213
11214 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11215         * src/pic/*
11216         tons of changes. Register allocation has been
11217         rewritten. Added customization for the various PICs. Flow
11218         analysis is restructured. ...
11219
11220         * src/pic/device.h:
11221         Added
11222
11223         * src/pic/device.c:
11224         Added. device.c is a PIC port hack to accomodate variations
11225         in PIC devices.
11226
11227 2002-03-13  Michael Hope  <michaelh AT vroom>
11228
11229         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
11230
11231 2002-03-04  johanknol  <johanknol AT manik>
11232
11233         * /src/SDCCval.c: fixed
11234
11235         const unsigned char arr[][2] = { { 0, 1 } };
11236         t18.c:1: error: Initializer element is not constant
11237
11238 2002-03-04  bela  <bela AT manik>
11239
11240         * /device/include/mcs51reg.h:
11241         ds89c420 register definition update
11242
11243 2002-03-03    <johan AT FRIJA>
11244
11245         * support/Util/SDCCerr.c: did something, but don't no why anymore
11246
11247         * support/regression/tests/bug-524691.c: made it a little less shy
11248
11249         * src/SDCCast.c (decorateType): fixed bug #524697
11250
11251         * src/SDCCast.c: made some lineno improvements
11252
11253         * src/SDCCval.c (getNelements): changed warning to error
11254
11255         * src/SDCCglue.c (printIvalArray): changed warning to error
11256
11257         * src/SDCCicode.c: fixed a warning for mingw
11258
11259         * src/SDCCast.c (decorateType): fixed the << promotion for ops
11260
11261         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
11262
11263 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
11264
11265         * src/ds390/peeph.def:
11266         Added some more peephole rules
11267
11268         * src/ds390/gen.c: Various fixes & enhancements
11269
11270         * src/SDCClrange.c, src/SDCClrange.h:
11271         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
11272
11273         * src/ds390/ralloc.c:
11274         various fixes & enhancements (ds390) specific
11275
11276         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
11277         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
11278         from rallocs.
11279
11280         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
11281
11282 2002-03-02    <johan AT FRIJA>
11283
11284         * src/SDCCast.c (decorateType): fixed bug #524708
11285
11286         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
11287
11288         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
11289
11290 2002-03-01  Michael Hope  <michaelh AT vroom>
11291
11292         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
11293
11294         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
11295
11296 2002-03-01    <johan AT FRIJA>
11297
11298         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
11299
11300         * src/SDCCast.c (decorateType): fixed bug #524209
11301
11302         * src/SDCCval.c (valNot): fixed bug #524195
11303
11304 2002-02-26    <johan AT balder>
11305
11306         * src/xa51/gen.c: fixed a warning
11307
11308         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
11309
11310         * src/SDCCast.c (decorateType): fixed bug #522534
11311
11312 2002-02-23    <johan AT balder>
11313
11314         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
11315
11316 2002-02-22    <johan AT balder>
11317
11318         * src/SDCCast.c: fixed bug #514865
11319
11320         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
11321
11322 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
11323
11324         * sdcc/src/SDCCloop.c:
11325         Previous fix was not good. basic blocks that have "break" or "return" are
11326         not really partof a loop , but live ranges used in these blocks should
11327         be live thru the entire loop, so set partOfLoop but don't add them to
11328         loop region
11329
11330 2002-02-21    <johan AT FRIJA>
11331
11332         * src/SDCCcse.c: fixed bug #514308
11333
11334 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
11335
11336         * src/SDCCloop.c:
11337         Fixed BUG #519583. If a conditional block ended in a return/break
11338         statement inside a loop, it was not being considered part of the loop.
11339
11340         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
11341
11342 2002-02-10  Karl Bongers <karl AT turbobit.com>
11343
11344         * debugger/*:
11345         Fixed up SDCDB debugger somewhat.  Updated debugger/README
11346         with lots of comments and notes.
11347
11348         * device/examples/test2.c:
11349         Fix bug, "red" variable not being initialized(compiler complained).
11350
11351         * device/examples/Makefile, examples/test3.c:
11352         Add Makefile in device/examples folder, compiles test3.c
11353         for use as a multiple module SDCDB test case.
11354
11355         * sim/ucsim/cmd.src/cmdset.cc:
11356         Took out debug printfs in ucsim "next" command.
11357
11358         * sim/ucsim/xa.src:
11359         Karl and Johan start ucsim XA support.  Most dissassembly working,
11360         about 75% emulation done(plenty of work remaining).
11361
11362         * sim/ucsim/z80.src:
11363         Add Z80 support to ucsim, add test-ucz80 regression test,
11364         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
11365         Notice z80 compiler fails on examples/test3.c/crc code.
11366
11367 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
11368
11369         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
11370         Added support for --parms-in-bank1
11371
11372         * src/ds390/peeph.def:
11373         added a few more peephole optimzations
11374
11375         * src/ds390/main.c:
11376         1) added __builtin_inp & __builtin_outp used to read in data of given length
11377            from a memory mapped port
11378         2) added __builtin_memcmp
11379         3) added __builtin_swapw swap bytes of a short
11380
11381         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11382         1) handle multiple send & receives from register bank1
11383         2) ralloc can now allocate DPTR1 to some liveRanges
11384
11385         * src/SDCCsymt.c, src/SDCCsymt.h:
11386         changes to handle multiple sends & receives
11387
11388         * src/SDCCptropt.h:
11389         added some pointer arithmetic optimization
11390
11391         * src/SDCCptropt.c:
11392         added some pointer arithmetic optimizations but not stable yet so not
11393         called from anywhere (will get this working shortly)
11394
11395         * src/SDCCopt.c: fixed for multiple sends & receives
11396
11397         * src/SDCCmain.c:
11398         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11399         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11400            set preprocessor defines (depending on options)
11401
11402         * src/SDCCicode.c, src/SDCCicode.h:
11403         changes made to handle multiple sends & receives
11404
11405         * src/SDCCglobl.h:
11406         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11407
11408         * src/SDCCcse.c, src/SDCCcse.h:
11409         added function findbackward def (to be used in upcoming optimization)
11410
11411         * src/SDCCcflow.c, src/SDCCcflow.h:
11412         added function returnAtEnd - to determine if a basic block terminates with
11413         a RETURN iCode
11414
11415         * src/SDCCast.c, src/SDCCast.h:
11416         added option parms-in-bank1
11417
11418         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11419         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11420         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11421         adjusted for --parms-in-bank1 option
11422
11423         * device/include/string.h:
11424         donot redefine "reentrant" keyword
11425
11426         * device/include/ds80c390.h: Added some more SFRs
11427
11428 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11429
11430         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11431
11432 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11433
11434         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11435
11436 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11437
11438         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11439
11440 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11441
11442         * Added --xram-movc option
11443
11444 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11445
11446         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11447
11448 2002-01-11  Johan Knol
11449
11450         * Added math lib of Jesus Calvino-Fraga
11451
11452 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11453
11454         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11455         * support/regression/Makefile: new target test-mcs51-stack-auto
11456         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11457
11458 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11459
11460         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11461
11462 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11463
11464         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11465
11466 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11467
11468         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11469
11470         * src/SDCCglue.h: add definition for printIvalChar()
11471
11472 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11473
11474         * src/SDCCast.c: fix #498138 by Johan
11475
11476         * src/SDCCglue.c: fix #498138 by Johan
11477
11478 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11479
11480         * support/regression/Makefile: fix clean
11481
11482         * support/regression/ports/ds390/support.c: fix transmission of last character
11483
11484 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11485
11486         * /sdcc/src/ds390/gen.c:
11487         a) improved computing address of stack variable
11488         b) took out some #if 0 code
11489         c) improved parmBytes adjustment
11490         d) improved genPlusIncr & genMinusIncr
11491         e) genCmp could generate bad code (when left assigned to DPTR)
11492         f) Fixed bug in hasInc
11493
11494         * /sdcc/src/ds390/ralloc.c:
11495         a) packRegsForSupport could mess up live information (Fixed)
11496         b) packRegsDPTRuse could be incorrect for left & right shift
11497
11498         * /sdcc/src/mcs51/ralloc.c:
11499         packRegsForSupport could mess up the live information (Fixed)
11500
11501         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11502
11503         * /sdcc/src/SDCCast.c:
11504         can reverse a loop even if function call is present as long
11505         as the loop control variable is local & is not passed as parameter
11506
11507 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11508
11509         * /sdcc/ChangeLog: *** empty log message ***
11510
11511         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11512         More builtin function additions for TININative
11513
11514         * /sdcc/src/ds390/ralloc.c:
11515         Had broken the regression testsuite
11516
11517         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11518
11519         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11520         Added funcattr hasStackParms will be set for reentrant functions when there
11521         are paramteres on the stack, this helps in minimizing frame pointer generation
11522         typeFromStr can handle function pointers now
11523
11524         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11525         *** empty log message ***
11526
11527 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11528
11529         * /src/ds390/gen.c, /src/ds390/main.c:
11530         More builtin function additions for TININative
11531
11532         * /src/ds390/ralloc.c:
11533         Had broken the regression testsuite
11534
11535         * /src/SDCCast.c: Fixed a bug in dumptree
11536
11537         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11538         Added funcattr hasStackParms will be set for reentrant functions when there
11539         are paramteres on the stack, this helps in minimizing frame pointer generation
11540         typeFromStr can handle function pointers now
11541
11542         * /doc/builtins.txt, /doc/TININative.txt:
11543         *** empty log message ***
11544
11545
11546 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11547
11548         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11549         ALPHA version for -mTININative
11550
11551         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11552         updated to reflect changes in the port structure
11553
11554         * /src/port.h:
11555         added function do_assemble (similar to do_link) if non-null this function
11556         will be called to do assembly (-mTININative) requires a multi command
11557         assembly
11558         added function genAssemblerEnd will be called to generate assembler Epilogue
11559
11560         * /src/SDCCsymt.c:
11561         added _JavaNative to debug info printing
11562
11563         * /src/SDCCmain.c: added option --tini-libid
11564         added port->do_assemble function (-mTININative) has a multi command assemble
11565
11566         * /src/SDCCglue.c: Disabled "constExpr" check
11567         added port->genAssemblerEnd function
11568
11569         * /src/SDCCglobl.h: Added option --tini-libid value
11570
11571         * /src/SDCCast.h:
11572         tookout optimizeCompare from the header (has no external references)
11573
11574         * /src/SDCCast.c: made one more function "static"
11575
11576 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11577
11578         * src/z80/mappings.i: Added z80asm support.
11579
11580         * src/z80/main.c: Added z80asm support on --asm=z80asm
11581
11582         * src/z80/gen.c: Fixed asm portability issues.
11583
11584         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11585
11586         * src/SDCCglue.c (printExterns): Added global/extern split.
11587
11588 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11589
11590         * support/regression/Makefile: added test for mcs51 model large
11591
11592         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11593
11594         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11595
11596 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11597
11598         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11599
11600 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11601
11602         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11603
11604         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11605
11606 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11607
11608         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11609
11610         * support/regression/tests/simplefloat.c: Port to mcs51.
11611
11612 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11613         * support/regression/tests/bug-485362.c: Added.
11614
11615         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11616
11617         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11618
11619         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11620
11621         * src/z80/gen.c (aopDump): Added a dump function.
11622
11623 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11624         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11625
11626         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11627
11628         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11629
11630         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11631
11632         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11633
11634         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11635
11636         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11637
11638         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11639
11640         * support/regression/ports/ds390/support.c: Use tinibios.
11641
11642         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11643
11644 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11645
11646         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11647         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11648
11649         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11650
11651         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11652
11653 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11654
11655         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11656
11657         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11658         (packRegsForIYUse): Created and optimised.
11659
11660 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11661
11662         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11663 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11664
11665         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11666
11667         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11668
11669         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11670
11671 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11672
11673         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11674
11675         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11676
11677 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11678
11679         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11680
11681         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11682
11683         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11684
11685 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11686
11687         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11688         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11689         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11690
11691         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11692
11693         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11694         (genNotFloat): Added.
11695         (genUminusFloat): Added.
11696
11697         * device/lib/z80/Makefile: Added floating pt stubs.
11698
11699         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11700
11701         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11702
11703         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11704
11705 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11706
11707         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11708
11709         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11710
11711         * sdcc/support/regression/Makefile: Add port ds390.
11712
11713         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11714
11715         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11716
11717         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11718
11719         * sdcc/support/regression/ports/ds390/support.c: Added.
11720
11721         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11722
11723         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11724
11725         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11726
11727 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11728
11729         * device/include/malloc.h: Added z80 and gbz80 support.
11730
11731         * device/lib/gbz80/heap.s: Added.
11732
11733         * device/lib/z80/heap.s: Added.
11734
11735         * device/lib/malloc.c: Added z80 and gbz80 support.
11736
11737         * support/regression/tests/malloc.c (testMalloc): Added.
11738
11739         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11740
11741         * support/regression/tests/bug-478094.c: Added.
11742
11743         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11744
11745 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11746
11747         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11748
11749         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11750
11751         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11752
11753         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11754
11755         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11756
11757 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11758
11759         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11760
11761 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11762
11763         * support/regression/tests/bug-477927.c: Added.
11764
11765         * src/z80/peeph.def: Added minor rules.
11766
11767         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11768
11769         * src/z80/peeph.def: Added jump optimisation modification.
11770
11771 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11772
11773         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11774
11775 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11776
11777         * support/regression/tests/funptrs.c: Added.
11778
11779 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11780
11781         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11782
11783 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11784
11785         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11786
11787         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11788
11789         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11790         (movLeft2ResultLong): Created.
11791
11792         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11793         (joinPushes): Added.  Joins two char pushes into a word push.
11794
11795 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11796
11797         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11798
11799         * support/makebin/Makefile (install): Added creation of dest dir.
11800
11801 2001-10-24 Karl Bongers <karl AT turbobit.com>
11802
11803         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11804
11805 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11806
11807         * src/z80/ralloc.c: Turned off faulty pack for one use.
11808
11809         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11810
11811         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11812
11813 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11814
11815         * support/regression/Makefile: Improved clean
11816
11817         * support/regression/ports/gbz80/spec.mk: Added clean
11818
11819         * support/regression/ports/host/spec.mk: Added clean
11820
11821         * support/regression/ports/z80/spec.mk: Added clean
11822
11823         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11824
11825         * support/regression/ports/mcs51/timeout.c: little improvements
11826
11827 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11828
11829         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11830
11831         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11832
11833         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11834
11835 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11836
11837         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11838
11839         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11840
11841 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11842         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11843
11844         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11845
11846         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11847
11848         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11849
11850         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11851
11852         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11853
11854         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11855
11856         * support/regression/tests/longor.c: Added.
11857
11858 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11859
11860         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11861
11862         * as/mcs51/aslink.h: define PATH_MAX
11863
11864         * as/mcs51/asm.h: define PATH_MAX
11865
11866         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11867
11868         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11869
11870         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11871
11872         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11873
11874         * src/SDCCglobl.h: define PATH_MAX
11875
11876         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11877
11878         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11879
11880 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11881
11882         * src/z80/gen.c (gencjneshort): Fixed
11883
11884         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11885
11886 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11887
11888         * support/regression/tests/bug-469671.c: Added.
11889
11890         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11891
11892 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11893
11894         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11895
11896         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11897
11898 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11899
11900         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11901
11902         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11903
11904         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11905
11906         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11907
11908         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11909
11910         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11911
11912         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11913
11914 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11915
11916         * 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.
11917
11918         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11919
11920         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11921
11922 2001-10-07    <johan AT FRIJA>
11923
11924         * device/lib/gets.c (gets): fixed the return value.
11925
11926 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11927         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11928
11929         * 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.
11930
11931         * 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.
11932
11933         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11934
11935         * src/pic/gen.c: Removed Safe_strdup.
11936
11937         * configure.in: Added option to enable libgc support.
11938
11939         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11940         (bitVectUnion): Optimised.
11941         (bitVectIntersect): Optimised.
11942         (bitVectBitsInCommon): Optimised.
11943         (bitVectCplAnd): Optimised.
11944
11945         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11946
11947 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11948
11949         * src/SDCCmain.c: distinguish between assembler debug and plain options
11950
11951         * src/avr/main.c:   remove standard assembler options
11952
11953         * src/ds390/main.c: remove standard assembler options
11954
11955         * src/mcs51/main.c: remove standard assembler options
11956
11957         * src/port.h: removed "PENDING" comment
11958
11959 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11960
11961         * src/device/lib/_mulint.c  : new, with assember functions
11962
11963         * src/device/lib/_mullong.c : new, with assember functions
11964
11965         * src/device/lib/_divuint.c : with assember functions
11966
11967         * src/device/lib/_divsint.c : with assember functions
11968
11969         * src/device/lib/_divulong.c: with assember functions
11970
11971         * src/device/lib/_divslong.c: with assember functions
11972
11973         * src/device/lib/_moduint.c : with assember functions
11974
11975         * src/device/lib/_modsint.c : with assember functions
11976
11977         * src/device/lib/_modulong.c: with assember functions
11978
11979         * src/device/lib/_modslong.c: with assember functions
11980
11981         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11982
11983         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11984
11985         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11986                                       replaced _mululong.c and _mulslong.c by _mullong.c
11987
11988 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11989
11990         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11991
11992 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11993
11994         * src/SDCCglue.c: test, if win32api is available for MINGW
11995
11996 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11997
11998         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11999         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
12000         * support/regression/ports/gbz80/spec.mk: removed GENERIC
12001         * support/regression/ports/host/spec.mk: removed GENERIC
12002         * support/regression/ports/mcs51/spec.mk: removed GENERIC
12003         * support/regression/ports/z80/spec.mk: removed GENERIC
12004
12005 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
12006
12007         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
12008
12009         * support/regression/tests/bug-467035.c: Created.
12010
12011 2001-10-01    <johan AT FRIJA>
12012
12013         * src/SDCC.y: fixed bug #466586 part 1
12014
12015 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
12016
12017         * SDCCicode.c: z80 has no generic pointers
12018         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
12019
12020 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
12021
12022         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
12023
12024 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
12025
12026         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
12027
12028         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
12029
12030 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
12031
12032         * configure.in: Fixed up so that ucsim is only configured once.
12033
12034         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
12035
12036         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
12037         (getPathDifference): As above.
12038
12039         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
12040
12041         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
12042
12043 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
12044         * .version: Updated to 2.3.1
12045
12046         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
12047         Added copyright header.
12048
12049         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
12050         (assemble): Added support for macro based assembler commands.
12051         (linkEdit): Added support for macro based linker commands.
12052         (preProcess): Changed the pre-processor to use macros.
12053         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
12054         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
12055
12056         * device/lib/z80/crt0.s: Added module name for debugging.
12057
12058 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
12059
12060         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12061
12062         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
12063
12064         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
12065
12066         * src/Makefile.in: Added SDCCmacro and SDCCutil
12067
12068 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
12069
12070         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12071
12072 2001-09-16    <johan AT FRIJA>
12073
12074         * 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.
12075
12076 2001-09-15    <johan AT FRIJA>
12077
12078         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
12079         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
12080
12081 2001-09-11    <johan AT FRIJA>
12082
12083         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
12084
12085 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
12086
12087         * support/regression/tests/bug-460444.c: Added test case.
12088
12089         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
12090         (genCast): Added justification for all of the asserts.
12091
12092 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
12093
12094         * support/regression/support.c: _xdata replaced by xdata
12095
12096         * support/regression/spec.mk: removed _generic
12097
12098 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
12099
12100         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
12101
12102         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
12103         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
12104
12105         * src/z80/peeph.def: Added a rule to optimise shift then compare.
12106
12107         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
12108
12109         * support/regression/tests/bug-460010.c: Added test case.
12110
12111         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
12112
12113 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
12114
12115         * support/regression/Makefile: inter-port-clean adjusted for mcs51
12116
12117         * support/regression/testfwk.c: removed workaround for bug #436344
12118
12119         * support/regression/tests/bp.c: use less memory with mcs51
12120
12121         * support/regression/tests/bug-441448.c: use less memory
12122
12123         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
12124
12125         * support/regression/collate-results.py: typo
12126
12127 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
12128
12129         * support/regression/tests/fetchoverlap.c: Added new test case.
12130
12131         * support/regression/tests/bp.c: Added new test case.
12132
12133         * support/regression/tests/bug-448984.c: Added new test case.
12134
12135         * support/regression/tests/pow2shifts.c: Added new test case.
12136
12137         * src/z80/gen.c: Turned off the noise it normally generates for the release.
12138         (genlshTwo): Fixed right shift for count > 8.
12139
12140         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
12141
12142 2001-09-08    <johan AT FRIJA>
12143
12144         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
12145
12146 2001-09-07    <johan AT FRIJA>
12147
12148         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
12149
12150         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
12151
12152 2001-09-06    <johan AT FRIJA>
12153
12154         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
12155         * bernhard noted me at this: "() equals to (void)" (1.38)
12156
12157 2001-09-05    <johan AT FRIJA>
12158
12159         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
12160
12161 2001-09-04    <johan AT FRIJA>
12162
12163         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
12164
12165
12166 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
12167
12168         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
12169
12170 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
12171
12172         * link/z80/aslink.h: Fixed path for PATH_MAX
12173
12174 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
12175
12176         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
12177
12178         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
12179
12180         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
12181
12182         * 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.
12183
12184 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
12185
12186         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
12187         (genCmp): Fixed up genCmp for the GB with longs.
12188
12189         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
12190
12191         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
12192
12193         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
12194
12195         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
12196
12197 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
12198
12199         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
12200
12201 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
12202
12203         * 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.
12204
12205         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
12206
12207 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
12208
12209         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
12210
12211         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
12212
12213 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
12214
12215   * sim/ucsim/configure:    little improvement of Cygwin-detection
12216   * sim/ucsim/configure.in: little improvement of Cygwin-detection
12217   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
12218   * support/regression/tests/bug-221100.c: small changes for mcs51
12219   * support/regression/tests/bug-221168.c: small changes for mcs51
12220   * support/regression/tests/bug-227710.c: small changes for mcs51
12221   * support/regression/tests/staticinit.c: small changes for mcs51
12222   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
12223   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12224   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12225
12226 $Revision$