7b92897f1366756e32112ec8cf1705459e3f0430
[fw/sdcc] / ChangeLog
1 2006-08-30 Borut Razem <borut.razem AT siol.net>
2
3         * sim/ucsim/cmd.src/newcmdposix.cc, sim/ucsim/cmd.src/newcmdposixcl.h,
4           sim/ucsim/cmd.src/newcmdwin32.cc, sim/ucsim/cmd.src/newcmdwin32cl.h,
5           sim/ucsim/app.cc, sim/ucsim/appcl.h, sim/ucsim/configure,
6           sim/ucsim/configure.in, sim/ucsim/ddconfig_in.h, sim/ucsim/error.cc,
7           sim/ucsim/errorcl.h, sim/ucsim/option.cc, sim/ucsim/optioncl.h,
8           sim/ucsim/utils.cc, sim/ucsim/utils.h, sim/ucsim/cmd.src/Makefile.in,
9           sim/ucsim/avr.src/avr.cc, sim/ucsim/avr.src/avrcl.h,
10           sim/ucsim/cmd.src/bp.cc, sim/ucsim/cmd.src/bpcl.h,
11           sim/ucsim/cmd.src/cmdconf.cc, sim/ucsim/cmd.src/cmdgui.cc,
12           sim/ucsim/cmd.src/cmdmem.cc, sim/ucsim/cmd.src/cmdset.cc,
13           sim/ucsim/cmd.src/cmdsetcl.h, sim/ucsim/cmd.src/cmdstat.cc,
14           sim/ucsim/cmd.src/cmduc.cc, sim/ucsim/cmd.src/cmduccl.h,
15           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
16           sim/ucsim/cmd.src/command.cc, sim/ucsim/cmd.src/commandcl.h,
17           sim/ucsim/cmd.src/get.cc, sim/ucsim/cmd.src/getcl.h,
18           sim/ucsim/cmd.src/info.cc, sim/ucsim/cmd.src/newcmd.cc,
19           sim/ucsim/cmd.src/newcmdcl.h, sim/ucsim/cmd.src/set.cc,
20           sim/ucsim/cmd.src/show.cc, sim/ucsim/cmd.src/timer.cc,
21           sim/ucsim/hc08.src/hc08.cc, sim/ucsim/hc08.src/hc08cl.h,
22           sim/ucsim/s51.src/Makefile.in, sim/ucsim/s51.src/interrupt.cc,
23           sim/ucsim/s51.src/interruptcl.h, sim/ucsim/s51.src/pca.cc,
24           sim/ucsim/s51.src/pcacl.h, sim/ucsim/s51.src/port.cc,
25           sim/ucsim/s51.src/portcl.h, sim/ucsim/s51.src/serial.cc,
26           sim/ucsim/s51.src/serialcl.h, sim/ucsim/s51.src/timer0.cc,
27           sim/ucsim/s51.src/timer0cl.h, sim/ucsim/s51.src/timer1.cc,
28           sim/ucsim/s51.src/timer1cl.h, sim/ucsim/s51.src/timer2.cc,
29           sim/ucsim/s51.src/timer2cl.h, sim/ucsim/s51.src/uc390.cc,
30           sim/ucsim/s51.src/uc390cl.h, sim/ucsim/s51.src/uc390hw.cc,
31           sim/ucsim/s51.src/uc390hwcl.h, sim/ucsim/s51.src/uc51.cc,
32           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/wdt.cc,
33           sim/ucsim/s51.src/wdtcl.h, sim/ucsim/sim.src/hw.cc,
34           sim/ucsim/sim.src/hwcl.h, sim/ucsim/sim.src/mem.cc,
35           sim/ucsim/sim.src/memcl.h, sim/ucsim/sim.src/obsolete.cc,
36           sim/ucsim/sim.src/obsolete.h, sim/ucsim/sim.src/sim.cc,
37           sim/ucsim/sim.src/simcl.h, sim/ucsim/sim.src/stack.cc,
38           sim/ucsim/sim.src/stackcl.h, sim/ucsim/sim.src/test_mem_speed.cc,
39           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
40           sim/ucsim/xa.src/xa.cc, sim/ucsim/xa.src/xacl.h,
41           sim/ucsim/z80.src/z80.cc, sim/ucsim/z80.src/z80cl.h:
42           ucsim WIN32 native port
43
44 2006-08-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
45
46         * doc/sdccman.lyx: added note on dynamic memory heap initialization
47
48 2006-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
49
50         * src/mcs51/gen.c (genAnd, genOr, genXor): fixed bug 1546986
51         * src/ds390/gen.c (aopGetUsesAcc): handle AOP_DPTR2 and AOP_DPTRn too
52
53 2006-08-26 Maarten Brock <sourceforge.brock AT dse.nl>
54
55         * src/ds390/gen.c (genAnd, genOr, genXor): fixed bug 1546986
56         * support/regression/tests/bug1546986.c: new, added
57         * as/mcs51/.cvsignore,
58         * debugger/mcs51/.cvsignore,
59         * src/.cvsignore: deleted
60
61 2006-08-25 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
62
63         * device/include/mcs51/P89c51RD2.h: fixed bug 1546936 (error in sbit
64           definitions)
65
66 2006-08-20 Borut Razem <borut.razem AT siol.net>
67
68         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h:
69           removed cl_listen_console::match(), cl_console::match(),
70           restructured cl_commander::proc_input()
71
72 2006-08-16 Borut Razem <borut.razem AT siol.net>
73
74         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h,
75           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
76           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/uc.cc: code cleaning
77
78 2006-08-14 Borut Razem <borut.razem AT siol.net>
79
80         * support/regression/Makefile.in,
81           support/regression/ports/pic14/gpsim.cmd,
82           support/regression/ports/pic14/spec.mk,
83           support/regression/ports/pic14/support.c:
84           added pic14 regression test
85
86 2006-08-14 Maarten Brock <sourceforge.brock AT dse.nl>
87
88         * as/doc/asxhtm.html: documented changed ABS behaviour
89         * as/doc/README: fixed some typos
90
91 2006-08-13 Maarten Brock <sourceforge.brock AT dse.nl>
92
93         * support/regression/tests/float_trans.c: disabled test if __STDC_IEC_559__
94           not defined on host
95
96 2006-08-12 Borut Razem <borut.razem AT siol.net>
97
98         * support/regression/fwk/include/testfwk.h,
99           support/regression/fwk/lib/testfwk.c,
100           support/regression/generate-cases.py,
101           support/regression/Makefile.in:
102           regression test framework does not depend on function pointers and
103           variable arguments
104
105 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
106
107         * device/include/stddef.h: c temporary hack to fix bug 1518273
108
109 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
110
111         * device/include/mcs51/cc2510fx.h: added
112         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
113           to projects.
114
115 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
116
117         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
118         * as/z80/Makefile.in: added strcmpi.c
119         * as/z80/z80adr.c: added upper case registers and lower case conditionals
120         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
121
122 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
123
124         * device/lib/gbz80/asm_strings.s,
125         * device/lib/gbz80/crt0_rle.s,
126         * device/lib/gbz80/div.s,
127         * device/lib/gbz80/mul.s,
128         * device/lib/gbz80/shift.s,
129         * device/lib/z80/asm_strings.s,
130         * device/lib/z80/crt0_rle.s,
131         * device/lib/z80/div.s,
132         * device/lib/z80/mul.s,
133         * device/lib/z80/shift.s: changed to all lower case menmonics except the
134           flags which are all upper case
135
136 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
137
138         * as/z80/asm.h: made CASE_SENSITIVE 1
139         * link/z80/aslink.h: made CASE_SENSITIVE 1
140         * src/z80/gen.c (throughout): made all conditionals upper case
141         * support/regression/tests/bug1503067.c: new
142
143 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
144
145         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
146           (shiftIntoPair): added case 2 for PAIR_IY,
147           (setupToPreserveCarry): replaced parameters with iCode and check if
148            PAIR_DE is in use to fix bug 1399290,
149           (genPlus, genMinus): updated call to setupToPreserveCarry
150         * support/regression/tests/bug1399290.c: new
151
152 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
153
154         * device/lib/Makefile.in (Z80SOURCES): enabled float support
155         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
156         * src/ds390/gen.c (shiftRLong),
157         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
158         * src/mcs51/gen.c (sameReg): changed to sameByte,
159           (xch_a_aopGet): new,
160           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
161            shiftRLong): fixed bug 1533966
162         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
163           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
164         * support/regression/Makefile.in: disabled z80, enabled ucz80
165         * support/regression/tests/float_trans.c: enabled test for z80 and host
166         * support/regression/tests/shifts2.c: new, for testing bug 1533966
167
168 2006-08-01 Borut Razem <borut.razem AT siol.net>
169
170         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
171           comparison is always false due to limited range of data type
172           on PPC64 machine (openpower-linux1) where "char = unsigned char"
173
174 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
175
176         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
177         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
178         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
179         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
180
181 2006-07-31 Borut Razem <borut.razem AT siol.net>
182
183         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
184           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
185           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
186           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
187           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
188           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
189           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
190           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
191           enable ucsim mingw compilation. Serial port is disabled,
192           since it uses termios.h API, which is not available on native
193           WIN32
194
195 2006-07-31 Borut Razem <borut.razem AT siol.net>
196
197         * Small Device C Compiler 2.6.0 released
198         * support/scripts/sdcc.nsi: added FULL_DOC option
199         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
200
201 2006-07-28 Borut Razem <borut.razem AT siol.net>
202
203         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
204         * doc/INSTALL.txt: updated
205
206 2006-07-27 Borut Razem <borut.razem AT siol.net>
207
208         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
209           device/lib/pic/libdev/Makefile.in: fixed bug
210           [ 1438354 ] pic libsdcc: distclean doesn't work
211         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
212           device/lib/pic16/libio/Makefile.in: fixed bug
213           [ 1438344 ] pic16 lib: clean doesn't work properly
214         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
215
216 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
217
218         * device/lib/pic/libsdcc/fsdiv.c,
219         * device/lib/pic/libsdcc/fsmul.c,
220         * device/lib/pic16/libsdcc/float/fsdiv.c,
221         * device/lib/pic16/libsdcc/float/fsmul.c,
222         * device/lib/_fsdiv.c,
223         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
224         * support/regression/tests/bug1520966.c: added
225         * doc/knownbugs.html: removed [ 1520966 ] from the list
226
227 2006-07-25 Borut Razem <borut.razem AT siol.net>
228
229         * configure.in, configure, sdccconf_in.h: fixed bug
230           [ 1519095 ] regression test onebyte.c fails on ppc64 host
231         * doc/knownbugs.html: removed [ 1519095 ] from the list
232
233 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
234
235         * doc/knownbugs.html: added, contains list of known bugs at release
236         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
237
238 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
239
240         * device/include/mcs51/compiler.h: added SFRX for xdata based special
241           function registers and corrected defaults with additional warning
242         * device/lib/malloc.c: cosmetic changes
243         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
244         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
245           (fillGaps): and used it
246
247 2006-07-20 Raphael Neider <rneider AT web.de>
248
249         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
250           output unless SDCCPICDEBUG is set
251         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
252           output if SILENT is set
253
254 2006-07-11 Borut Razem <borut.razem AT siol.net>
255
256         * doc/README.txt: updated
257
258 2006-07-10 Borut Razem <borut.razem AT siol.net>
259
260         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
261           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
262           in WIN32 installation
263         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
264           release candidate 1
265
266 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
267
268         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
269         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
270
271 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
272
273         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
274
275 2006-07-06 Borut Razem <borut.razem AT siol.net>
276
277         * support/regression/tests/bitfields.c:
278           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
279         * support/regression/tests/constantRange.c:
280           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
281
282 2006-07-04 Borut Razem <borut.razem AT siol.net>
283
284         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
285           src/port.mk,
286           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
287           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
288           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
289           reverted changes from 2006-07-03
290         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
291         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
292           added CPPFLAGS, used by the host port
293
294 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
295
296         * support/regression/valdiag/tests/switch.c,
297         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
298         * support/regression/tests/libmullong.c: fixed for host
299         * support/regression/ports/host/spec.mk: disable all warnings for host,
300         SDCC runs with --less-pedantic too
301
302 2006-07-03 Borut Razem <borut.razem AT siol.net>
303
304         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
305           defined CPPFLAGS
306         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
307         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
308           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
309           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
310           include ../port.mk
311         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
312           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
313           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
314           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
315
316 2006-07-02 Raphael Neider <rneider AT web.de>
317
318         * src/pic16/devices.inc,
319         * device/include/pic16/pic18fregs.h,
320         * device/include/pic16/pic18f4550.h,
321         * device/lib/pic16/pics.all,
322         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
323
324 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
325
326         * as/hc08/lkaomf51.c (OutputName),
327         * as/mcs51/lkaomf51.c (OutputName),
328         * as/z80/asmain.c (asmbl),
329         * src/ds390/main.c (asmLineNodeFromLineNode),
330         * src/hc08/ralloc.c (hc08_assignRegisters),
331         * src/mcs51/main.c (asmLineNodeFromLineNode),
332         * src/xa51/ralloc.c (checkRegMask),
333         * src/xa51/gen.c (emitcode),
334         * src/z80/gen.c (_emit2),
335         * src/SDCCast.c (searchLitOp),
336         * src/SDCCglobl.h,
337         * support/packihx/packihx.c,
338         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
339         * src/ds390/gen.c (aopPutUsesAcc),
340         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
341         * support/regression/tests/libmullong.c (mullong_wrapper),
342         * src/SDCCsymt.c (powof2),
343         * src/SDCCast.c,
344         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
345         * src/SDCCsymt.h: added TYPE_TARGET_*
346         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
347         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
348         SDCCast because 1) header problems 2) this is the right place
349         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
350         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
351         prototype
352
353 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
354
355         * src/SDCCicode.h: removed buggy semicolon in unused macro
356         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
357         search for previous definiton of auto symbols too,
358         (findPrevUse): fixed logic of emitWarnings
359
360 2006-06-26 Raphael Neider <rneider AT web.de>
361
362         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
363           PCLATH and PCLATU on interrupts, potentially fixes #1505141
364
365 2006-06-25 Raphael Neider <rneider AT web.de>
366
367         * device/lib/pic/libm: NEW, added math library functions
368         * device/lib/pic/libsdcc: NEW; added float support functions
369         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
370         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
371           NEW, added math related headers
372         * device/include/asm/pic/features.h: NEW
373         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
374           (popGet): allow larger offsets for AOP_PCODE,
375           (genDataPointerSet): handle literals explicitly, more debug output,
376           (genAssign): fixed for float using aopLiteral ;-)
377         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
378           GOTO initialisation routine
379         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
380           flag on registers, fixes #1469043 (local variables do not work)
381         * src/pic/main.c (_pic14_do_link),
382         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
383           available
384
385 2006-06-25 Borut Razem <borut.razem AT siol.net>
386
387         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
388           characters printed (not including the trailing '\0' used to end
389           output to strings). Problem detected in regression test bug-927659.c.
390           NOTE: printf() family functions should return int instead
391           unsigned int!
392         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
393           specifier are printed as themselves
394         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
395           support flags, width and precision specifiers
396
397 2006-06-24 Borut Razem <borut.razem AT siol.net>
398
399         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
400           to the list of sdcc tagrets not supporting bit type
401         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
402           testfor pic16 due to bug:
403           [ 1511794 ] pic16: regression test bug-895992.c fails
404
405 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
406
407         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
408         * src/SDCCglue.c (initPointer), fixed bug 1496419
409         * support/regression/tests/bug1496419.c: new, added
410
411 2006-06-22 Borut Razem <borut.razem AT siol.net>
412
413         * support/regression/ports/pic16/support.c: use gpsim usart module from
414           libgpsim_modules library
415
416 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
417
418         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
419         IP0H to IPH0.
420
421 2006-06-19 Raphael Neider <rneider AT web.de>
422
423         * src/pic/glue.h,src/pic16/glue.h: added prototypes
424         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
425           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
426           (pic14printExterns,pic14printPublics,pic16printPublics,
427           pic16_printExterns): use new functions to emit symbols
428           (picglue,pic16glue): emit publics before emitting externs
429         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
430           locally defined functions to avoid bug #1443651
431         * support/regression/tests/bug-716242.c: removed pic16 workaround
432         * support/regression/ports/pic16/spec.mk: ignore errors during build
433
434 2006-06-19 Raphael Neider <rneider AT web.de>
435
436         * src/pic/glue.h: added pic14aopLiteral prototype
437         * src/pic/glue.c (pic14aopLiteral): return unsigned int
438         * src/pic/gen.c: removed stdint.h dependency
439           (aopGet): use Safe_strdup()
440           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
441           (genDataPointerSet): use pic14aopLiteral()
442         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
443           for pic16; thanks to Bernhard and Maarten
444
445 2006-06-18 Borut Razem <borut.razem AT siol.net>
446
447         * support/regression/tests/structflexarray.c: flexible array members
448           not supported by gcc < 3
449         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
450           GUI tool by default
451         * src/pic/gen.c: don't include [p]strdin.h on solaris
452         * support/Util/pstdint.h: addad svn attributes
453         * support/regression/tests/constantRange.c,
454           support/regression/tests/rotate.c: include inttypes.h instead
455           stdint.h on solaris, addad svn attributes
456
457 2006-06-18 Raphael Neider <rneider AT web.de>
458
459         * src/SDCCsymt.c (initCSupport): change return type of divschar to
460           int for PIC16
461         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
462           (pic16_genMinusBits): simplified sign-extension
463           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
464             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
465             adjusted to correctly handle mixed-signed operands, disabled
466             now unused multiplciation routines
467         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
468           (assignResultValue): added argument denoting the size of the result
469             as returned by the function (fixes upcasts in assigning from
470             function calls: char foo(); int i = foo();)
471           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
472             function result to assignResultValue
473           (genMult): disabled inlined multiplication code
474           (genDiv): augmented to also handle the modulus operator, fixed to
475             handle mixed-signed operands correctly
476           (genMod): simply call genDiv, disabled unused code
477           (genAssign): fixed missing (sign-)extension on result
478         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
479             valid char operands, allow signed operands for native code, added
480             division and modulo operator handling
481         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
482
483         As a consequence, onebyte.c (if split into two files) and muldiv.c
484         pass regression tests.
485
486 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
487
488         * doc/Makefile.in: two runs of makeindex seem needed to get
489         correct page references in the index of sdccman.pdf
490         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
491
492 2006-06-17 Borut Razem <borut.razem AT siol.net>
493
494         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
495
496 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
497
498         * doc/sdccman.lyx: updated, added (porting source code, debugging),
499         mentioned ec2drv and paulmon
500
501 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
502
503         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
504           consecutive abs areas
505           (find_empty_space, allocate_space): added map to handle codemap or
506            xdatamap,
507           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
508            absolute idata and xdata
509         * as/mcs51/lkmem.c (summary2): updated legend
510
511 2006-06-16 Raphael Neider <rneider AT web.de>
512
513         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
514
515 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
516
517         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
518           1208515
519         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
520
521 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
522
523         * src/port.h (struct PORT): added field gp_tags, to hold the tag
524         value of generic pointers,
525         * src/avr/main.c,
526           src/ds390/main.c,
527           src/hc08/main.c,
528           src/izt/i186.c,
529           src/izt/tlcs900h.c,
530           src/mcs51/main.c,
531           src/pic/main.c,
532           src/pic16/main.c,
533           src/xa51/main.c,
534           src/z80/main.c: PORT structure, added elements for gp_tags field,
535         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
536         fields in the PORT structure of each port,
537         * src/SDCCast.c (decorateType): allow processing of generic pointers
538         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
539         S_FIXED symbols
540
541 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
542
543         * link/z80/lkgb.c,
544         * link/z80/lkgg.c,
545         * src/pic16/gen.c,
546         * src/pic16/main.c,
547         * src/pic16/pcode.c,
548         * src/pic/main.c,
549         * src/pic/pcoderegs.c,
550         * src/SDCCicode.c,
551         * src/SDCCmain.c,
552         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
553           bug 1504689 on minGW
554
555 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
556
557         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
558
559 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
560
561         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
562
563 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
564
565         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
566           for optimization
567
568 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
569
570         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
571         to a char variable. Fixed bug #1504211
572         * device/include/pic16/adc.h,
573         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
574         and fixed bug #1364390
575
576 2006-06-10 Borut Razem <borut.razem AT siol.net>
577
578         * CVSROOT: removed the CVS left-over
579
580 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
581
582         * as/hc08/asmain.c (asexit),
583         * as/hc08/lkmain.c (lkexit),
584         * as/mcs51/asmain.c (asexit),
585         * as/mcs51/lkmain.c (lkexit),
586         * src/SDCCglue.c (DEFSETFUNC),
587         * src/SDCCmain.c (linkEdit, assemble),
588         * support/librarian/sdcclib.c (AddRel),
589           replaced unlink() by standard C remove()
590         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
591         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
592           gatherImplicitVariables): new, added to fix bug 608752,
593           (createFunction): added gatherImplicitVariables()
594         * src/SDCCast.h: added createRMW prototype
595         * src/SDCCsymt.h (struct symbol): added infertype
596         * support/regression/tests/bug608752.c: new, added
597
598 2006-06-10 Raphael Neider <rneider AT web.de>
599
600         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
601           multibyte dummy reads (fixes #1503234)
602
603 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
604
605         * device/include/mcs51/compiler.h: new, added header file to enable
606           creating common sfr definition header files for different compilers
607
608 2006-06-05 Raphael Neider <rneider AT web.de>
609
610         * src/pic16/{pcode.h,genarith.c}:
611           introduced pCodeOp combining any two pCodeOps (previously only
612           two register operands could be combined), removed pcop2 from
613           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
614         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
615         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
616           rewritten to use new PO_TWO_OPS
617         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
618         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
619           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
620           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
621           (pic16_get_op): embraced return arg to allow #define return(x),
622             added new case for combined opcodes
623           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
624           (pic16_pCode2str,pic16_getRegFrompCodeOp,
625            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
626
627 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
628
629         * src/SDCCval.c (checkConstantRange): added
630         * src/SDCCval.h: added checkConstantRange
631         * support/Util/SDCCerr.c,
632         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
633         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
634         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
635         * src/SDCCast.c (decorateType): added checkConstantRange,
636         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
637         can be emitted with the correct always true/false warning,
638         added optimization for double '!';
639         result of decorateType() must be assigned back to the tree, because
640         decorateType() can change the tree
641         * src/SDCCicode.c (geniCodeLogic),
642         (geniCodeAssign): replaced new checkConstantRange, added warnings,
643         (checkConstantRange): removed, it was only a fragment which never
644         emitted a warning
645         * src/SDCCsymt.c (computeType): fixed promotion for
646         "-1 < (unsigned bit) b"
647         * src/pic/ralloc.c (packRegsForAssign),
648         * src/pic16/ralloc.c (packRegsForAssign),
649         * src/hc08/ralloc.c (packRegsForAssign),
650         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
651         from mcs51
652         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
653         * support/regression/tests/constantRange.c: added
654         * support/valdiag/tests/constantRange.c: added
655         * support/valdiag/valdiag.py: added -DPORT_HOST=1
656
657 2006-06-02 Borut Razem <borut.razem AT siol.net>
658
659         * support/regression/ports/pic16/support.c: increase stack size
660           to 255 bytes
661         * support/regression/Makefile.in: sort tests by name so that the
662           resutlts can be compared on different machines / platforms
663
664 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
665
666         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
667         * src/ds390/gen.c (emitLabel): new, added,
668           (genDjnz): fixed stack overflow bug,
669           (throughout): cosmetic changes to sync with mcs51/gen.c,
670           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
671         * src/mcs51/gen.c (genEndFunction): small optimization,
672           (throughout): cosmetic changes to sync with ds390/gen.c
673
674 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
675
676         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
677           (_print_format): fixed printing pointers
678         * src/mcs51/gen.c (emitLabel, movb): new, added,
679           (genAssign): small optimization,
680           (genDjnz): fixed stack overflow bug,
681           (throughout): replaced sprintf with SNPRINTF,
682           replaced mcs51_regWithIdx with REG_WITH_INDEX,
683           replaced emitcode("mov", "b,...") with MOVB(...),
684           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
685           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
686         * src/mcs51/peeph.def: added rules 140 and 264
687         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
688           so they may get optimized into registers
689
690 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
691
692         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
693           immediately when encountered,
694           (printUsage): always use stderr even on windows
695
696 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
697
698         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
699         (processParms): fixed bug #1247551
700         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
701         parseCmdLine, main): print '--version' to stdout,
702         print 'help' to stdout if --help is given,
703         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
704         arguments are given; fixed --help
705
706 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
707
708         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
709         * support/regression/tests/bug-1493710.c: added
710
711 2006-05-27 Borut Razem <borut.razem AT siol.net>
712
713         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
714           static instead auto
715         * support/regression/ports/pic16/support.c: increase stack size
716           from default 64 bytes to 128 bytes
717         * support/regression/tests/staticinit.c,
718           support/regression/tests/float.c: regression tests fully enabled
719           for pic16 port by putting the initialized data arrays into the code
720           section
721         * support/regression/ports/pic16/spec.mk: don't link default libraries.
722           This was changed by mistake in the previous version.
723
724 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
725
726         * src/pic16/gen.c (genFunction, genEndFunction): some
727         beautifications, fixed bug with falsely restoring FSR2 in large
728         stack model, thanks to Beau E. Cox for reporting the bug
729
730 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
731
732         * debugger/mcs51/break.c,
733         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
734           use %p to print pointers, made address variables unsigned
735         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
736         * debugger/mcs51/symtab.c (parseSymbol): must return something
737         * src/mcs51/gen.c (aopForSym): small optimization,
738            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
739           (freeAsmop): added missing break,
740           (aopPut): removed parameter bvolatile, determine it inside the function,
741           (saveRegisters, unsaveRegisters): small optimization,
742           (genIpush): removed pointless check,
743           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
744           replaced sprintf with SNPRINTF,
745           replaced strcpy with strncpyz,
746           updated aopPut calls,
747           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
748         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
749
750 2006-05-24 Borut Razem <borut.razem AT siol.net>
751
752         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
753           modification of test for the pic16 port, put the array to the code
754           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
755
756 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
757
758         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
759         * support/Util/pstdint.h: added
760
761 2006-05-22 Borut Razem <borut.razem AT siol.net>
762
763         * src/regression/Makefile: removed bool2.c test, added -q linker option
764         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
765           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
766           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
767           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
768           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
769           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
770           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
771           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
772           define SUPPORT_BIT_TYPES 0, removed unused bit variables
773
774 2006-05-22 Raphael Neider <rneider AT web.de>
775
776         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
777           bug #1492360 (problematic due to generic pointers, see code)
778
779 2006-05-22 Borut Razem <borut.razem AT siol.net>
780
781         * support/regression/ports/pic16/specs.mk: removed stack size linker
782           directive
783         * support/regression/tests/array.c,
784           support/regression/tests/bitopcse.c,
785           support/regression/tests/bug-908454.c,
786           support/regression/tests/malloc.c: modified for pic16 regression test
787         * support/regression/tests/bitfields.c:
788           pic16 - excluded bitfileds of size > 8
789         * support/regression/tests/bp.c: pic16 - reduced data size
790         * support/regression/tests/bug-221100.c: pic16 - reduced data size
791         * support/regression/tests/bug-460010.c:
792           pic16 - used the absolute address the fits in memory
793         * support/regression/tests/bug-716242.c:
794           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
795         * support/regression/tests/float.c:
796           pic16 - excluded - data size too big
797         * support/regression/tests/onebyte.c:
798           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
799         * support/regression/tests/shifts.c:
800           pic16 - function names probably have to differ in first X characters
801           (gpasm limitation?)
802         * support/regression/tests/staticinit.c:
803           pic16 - excluded some tests due error: no target memory available for
804           section ".idata"
805
806 2006-05-22 Borut Razem <borut.razem AT siol.net>
807
808         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
809           second try. Thanks Stas Sergeev once more.
810
811 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
812
813         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
814           (genLeftShift, genRightShift): fixed bug 1491627
815         * src/hc08/peeph.def (rules 7, 8.x): added
816         * support/regression/tests/shifts.c (ShiftLeftByParam,
817           ShiftRightByParam, testShiftByParam): added to test variable shifting
818
819 2006-05-20 Raphael Neider <rneider AT web.de>
820
821         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
822         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
823           (allocReg): add only new registers to dynAllocRegs,
824           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
825             #1489055, #1445850, and probably #1483693
826
827 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
828
829         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
830         bug in for-loop that didn't emit the last of CONFIG and ID registers
831
832 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
833
834         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
835           with offset
836         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
837           1489016, 1434401 and 1490124
838         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
839           1489016, 1434401 and 1490124
840
841 2006-05-17 Borut Razem <borut.razem AT siol.net>
842
843         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
844           thanks Stas Sergeev
845
846 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
847
848         * device/include/mcs51/P89c51RD2.h,
849         * device/include/mcs51/P89LPC901.h,
850         * device/include/mcs51/P89LPC922.h,
851         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
852
853 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
854
855         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
856         to fix missing stack pragma in compiled binary object file,
857
858 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
859
860         * support/packihx/configure.in,
861         * support/packihx/configure: removed warning, autoconf >= 2.5x can
862         determine sizeof basic types even while cross compiling
863
864 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
865
866         * src/avr/gen.c (aopop),
867         * src/ds390/gen.c (aopOp),
868         * src/hc08/gen.c (aopOp),
869         * src/mcs51/gen.c (aopop),
870         * src/pic16/gen.c (pic16_aopOp),
871         * src/pic/gen.c (aopOp),
872         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
873         if size of operand is smaller than spill location
874
875 2006-05-12 Borut Razem <borut.razem AT siol.net>
876
877         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
878           have to have CR/LF line endings even if they are checked out on *nix
879           or on WIN32 in cygwin binmode
880
881 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
882
883         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
884         * device/include/ds80c390.h: added sfr16 definitions
885         * src/ds390/gen.c,
886         * src/ds390/gen.h,
887         * src/ds390/main.c,
888         * src/ds390/ralloc.c,
889         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
890           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
891           bit returning functions
892         * support/regression/tests/sfr16.c: enabled test on ds390
893
894 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
895
896         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
897         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
898
899 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
900
901         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
902         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
903           (cl_address_space constructor): removed expensive initialization,
904           (cl_address_space::get_cell): extended for late initialization,
905           (cl_address_space::*): use late initialization,
906           (cl_address_decoder::activate): removed expensive initialization,
907           This reduced regression test running time by 25%
908
909 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
910
911         * packihx/,
912         * configure.in,
913         * configure,
914         * sdcc.dsw,
915         * Makefile.bcc,
916         * Makefile.in,
917         * support/packihx/Makefile.in,
918         * support/packihx/clean.mk,
919         * support/packihx/Makefile.bcc,
920         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
921
922 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
923
924         * src/SDCCval.c (valNot): fix for regression test failure
925           of not.c on big endian hosts
926
927 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
928
929         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
930
931 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
932
933         * device/lib/mcs51/Makefile.in: changed string comparison operator
934           to = for POSIX compliance; == is bash extension
935
936 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
937
938         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
939           kosmonaut_pirx
940
941 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
942
943         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
944         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
945         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
946         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
947         bug report #1478657,
948
949 2006-05-05 Borut Razem <borut.razem AT siol.net>
950
951         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
952           making the html
953
954 2006-05-02 Borut Razem <borut.razem AT siol.net>
955
956         * doc/Makefile.in: removed *.ind dependency since there is no rule to
957           create *.ind, which made make to fail if invoked with -j 2
958
959 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
960
961         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
962           Hubert Sack for patch 1479782
963
964 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
965
966         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
967
968 2006-05-01 Raphael Neider <rneider AT web.de>
969
970         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
971           (create_pic): store only prefix-free device name,
972           (init_pic): check for device names with "16" prefix,
973           (list_valid_pics),
974         * src/pic/device.h (struct PIC_device),
975         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
976             stored device name,
977         * device/include/pic/pic12f{635,675,629,683}.h,
978         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
979         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
980         * device/include/pic/pic16f505.h,
981         * device/lib/pic/libdev/pic16f505.c: removed
982         * device/include/pic/pic14devices.txt: added support for pic12f
983             devices, removed unsupported non 16-bit devices
984             [above changes provided by patch from Zik Saleeba]
985         * src/pic/*, src/pic16/*, device/include/pic16/*,
986           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
987
988 2006-05-01 Borut Razem <borut.razem AT siol.net>
989
990         * configure.in, configure, doc/Makefile.in:
991           sync with nightly build makefile - latex, dvipdf and dvips
992           not needed any more
993
994 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
995
996         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
997         in the library source
998
999 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
1000
1001         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
1002
1003 2006-04-28 Raphael Neider <rneider AT web.de>
1004
1005         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
1006         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
1007           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
1008         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
1009
1010 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
1011
1012         * device/lib/pic/libdev/Makefile.in,
1013         * device/lib/hc08/Makefile.in,
1014         * device/lib/gbz80/Makefile.in,
1015         * device/lib/z80/Makefile.in,
1016         * device/lib/ds390/Makefile.in,
1017         * device/lib/ds400/Makefile.in: added srcdir to include search path,
1018         thanks to Borut for the bug report
1019         * configure.in,
1020         * configure: always create doc/Makefile independent from --enable-doc
1021         * Makefile.in: always install from directory doc independent from
1022         --enable-doc
1023         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
1024         removed
1025         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
1026         * doc/Makefile.in: install *.txt if present
1027         * device/include/Makefile.in (install): added installation of pic/*.inc
1028         and pic/*.txt files again, they were erroneously removed
1029
1030 2006-04-28 Raphael Neider <rneider AT web.de>
1031
1032         * src/pic/{gen.c,main.h,pcode.c},
1033         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
1034             concerning signedness with casts
1035
1036 2006-04-28 Raphael Neider <rneider AT web.de>
1037
1038         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
1039             definition of an interrupt handler,
1040         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
1041             interrupt handler stuff from picglue() to separate routine,
1042           (picglue): enabled definition of intr handlers in files w/o main()
1043
1044 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1045
1046         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
1047           compilation with MSVC 2005 Express Edition (VC8)
1048
1049 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
1050
1051         * device/lib/Makefile: fixed build of gbz80 lib
1052
1053 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1054
1055         * support/regression/tests/bug-460010.c,
1056         * support/regression/tests/bug-524691.c,
1057         * support/regression/tests/bug-716242.c: removed conditional defines
1058           that are already in testfwk.h
1059
1060 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1061
1062         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
1063           (AccAXRsh1): added, shift right by 1,
1064           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
1065            AccAXLrl1
1066         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
1067
1068 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
1069
1070         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
1071         remove cast to same type
1072         * src/SDCCast.c (decorateType): fix for RFE 1475742,
1073         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
1074         * as/z80/Makefile,
1075         * link/z80/Makefile: removed, they have moved to
1076         Makefile.in files
1077         * configure,
1078         * configure.in: replaced duplicate message about ucsim by missing sdcpp
1079         * install-sh: fix bug #1204398 by setting umask 0022
1080         * device/lib/Makefile: separate build of z80 and gbz80 lib
1081
1082 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
1083
1084         Enabled VPATH feature: changed nearly all Makefiles (149 files).
1085         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
1086
1087         One basic decision: e.g. src/clean.mk includes further files. In order
1088         to make this work there are two solutions:
1089         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
1090           run configure on them. This way they can use
1091           'include $(srcdir)/port-clean.mk'
1092         - always include clean.mk by the Makefile at the same level. To avoid
1093           that `make clean` tries to include and build Makefile.dep the
1094           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
1095           implemented, because now even `make uninstall` doesn't create
1096           Makefile.in. clean.mk could be eliminated by pasting it in
1097           Makefile.in.
1098
1099         * debugger/mcs51/Makefile.in: build own objects from library sources
1100         (SLIB, SDCC) in current directory
1101
1102         * configure, configure.in: renamed --disable-device-lib-build in
1103         --disable-device-lib; added --enable-doc, the required tools are
1104         searched by configure; added result message; the toolchain for the
1105         belonging ports are now only built, if the port is enabled.
1106
1107         * support/regression/*: all output is written in directory gen, because
1108         the fwk and ports directories don't livet in the build tree using vpath
1109
1110         * doc/sdccman.lyx: renamed --disable-device-lib-build to
1111         --disable-device-lib, added --enable-doc, added section VPATH
1112
1113         * sim/ucsim/configure.in,
1114         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
1115         z80 are enabled by default
1116
1117 2006-04-24 Raphael Neider <rneider AT web.de>
1118
1119         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
1120             to config word, "pic14_"-prefixed some extern functions
1121           (pic14_emitConfigWord): emit __config directive(s) if assignment to
1122             config word has been found
1123         * src/pic/device.h: added prototypes
1124         * src/pic/pcode.c: added "pic14_"-prefix where needed
1125         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
1126             fixup
1127         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
1128             words,
1129           (pic14emitRegularMap): ignore config words,
1130           (pic14createInterruptVect): moved generating __config directives away
1131           (picglue): have __config directives emitted
1132
1133 2006-04-24 Borut Razem <borut.razem AT siol.net>
1134
1135         * doc/Makefile: sync with nightly build makefile
1136
1137 2006-04-24 Raphael Neider <rneider AT web.de>
1138
1139         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
1140             registers that have not been assigned proper liveranges,
1141             fixes #1469504 and #1474602,
1142           (pCodeRegOptimizeRegUsage): fixed typo in comment
1143
1144 2006-04-24 Borut Razem <borut.razem AT siol.net>
1145
1146         * device/examples/main8051.c: deleted - it was removed from CVS
1147           24.mar.2000 and after that modified 18.feb.2001, so it reappered
1148           after the transition to Subversion
1149         * src/SDCCalloc.h: deleted - it was removed  from CVS
1150           3.feb.2001 and after that modified 18.feb.2001, so it reappered
1151           after the transition to Subversion
1152         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
1153           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
1154           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
1155           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
1156
1157 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
1158
1159         * as/asx8051.dsp: added mcs51/strcmpi.h
1160         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
1161         * as/hc08/aslink.h: updated lnksect prototype
1162         * as/hc08/asm.h,
1163         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
1164         * as/hc08/asmain.c,
1165         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
1166           (newdot): handle A_ABS
1167         * as/hc08/asout.c,
1168         * as/mcs51/asout.c (outarea): output address
1169         * as/hc08/lkaomf51.c,
1170         * as/mcs51/lkaomf51.c: disabled unused array UsageType
1171         * as/hc08/m08pst.c,
1172         * as/mcs51/i51pst.c,
1173         * as/z80/z80pst.c: "ABS" is not A_OVR
1174         * as/hc08/lkarea.c (newarea): read a_addr,
1175           (lnkarea): added codemap array, sort absolute areas to the front,
1176            combine all GSINITx/GSFINAL,
1177           (find_empty_space, allocate_space): new functions,
1178           (lnksect): return next address, handle absolute sections
1179         * as/mcs51/lkarea.c (newarea): read a_addr,
1180           lnksect2 prototype changed,
1181           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
1182           (find_empty_space, allocate_space): new, factored out of lnksect2,
1183           (lnksect2): return next address, handle absolute sections
1184         * as/hc08/lkhead.c,
1185         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
1186         * as/hc08/lklibr.c (addfile, fndsym),
1187         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
1188           index out of range and detect both '\' and '/'
1189         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
1190         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
1191           regression tests (ds390 cannot return bool yet)
1192         * doc/sdccman.lyx: changed version number, document changed --no-peep,
1193           document critical interrupts on z80, document changed SDCC define
1194         * src/asm.c (_asxxxx_mapping): fixed .org directive,
1195           (_a390_mapping): added .org directive
1196         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
1197           (genMultOneByte): fixed warnings
1198         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
1199           ones
1200         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
1201         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
1202           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
1203         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
1204         * src/pic16/main.c: removed newReg prototype
1205         * src/pic16/pcode.c,
1206         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
1207           warnings
1208         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
1209           ones
1210         * src/pic16/ralloc.c
1211         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
1212           to fix warnings
1213         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
1214           from short to PIC_OPTYPE
1215         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
1216         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
1217           optype from short to PIC_OPTYPE
1218         * src/port.h: made int_size unsigned to fix warnings
1219         * src/SDCC.y: fixed warning on MSVC
1220         * src/SDCCicode.c (getArraySizePtr): return unsigned int
1221         * src/SDCCopt.c (convertToFcall): fixed warnings
1222         * src/SDCCsymt.h: removed double prototype for genSymName
1223         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
1224           offset int to fix warnings
1225
1226 2006-04-22 Borut Razem <borut.razem AT siol.net>
1227
1228         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1229           references to CVS replaced with Subversion
1230
1231 2006-04-21 Borut Razem <borut.razem AT siol.net>
1232
1233         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1234           references to CVS replaced with Subversion
1235
1236 2006-04-19 Borut Razem <borut.razem AT siol.net>
1237
1238         * src/version.awk: adapted for svn
1239         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
1240           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
1241           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
1242           /binutils-avr/etc/*.vi, *.jin: removed all properties
1243           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
1244
1245 2006-04-19 Borut Razem <borut.razem AT siol.net>
1246
1247         * CVS to Subversion migration completed
1248
1249 2006-04-18 Borut Razem <borut.razem AT siol.net>
1250
1251         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
1252           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
1253
1254 2006-04-17 Borut Razem <borut.razem AT siol.net>
1255
1256         * device/include/Makefile.in: added pic/*.inc to the installation
1257
1258 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
1259
1260         * support/regression/collate-results.py: fixed output in case of
1261         a valdiag error
1262         * support/regression/generate-cases.py: fixed splitting of pathnames
1263         with dots
1264         * as/hc08/lklibr.c (addfile),
1265         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
1266
1267 2006-04-11 Raphael Neider <rneider AT web.de>
1268
1269         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
1270         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
1271         * src/pic16/pcode.c (assignValnums): fixed #1460578
1272
1273 2006-04-11 Raphael Neider <rneider AT web.de>
1274
1275         * device/lib/pic/libdev/*.c,
1276         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
1277           fixes #1468739, enables compilation in --std-c99 mode
1278         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
1279
1280 2006-04-11 Raphael Neider <rneider AT web.de>
1281
1282         * src/pic/device.c (find_device): removed debug output
1283           (list_valid_pics): enabled verbose listing of supported devices
1284         * device/include/stdbool.h: define bool as char for pic14/16 as well
1285
1286 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1287
1288         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
1289
1290 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1291
1292         * .version: bumped version to 2.5.6
1293         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
1294
1295 2006-04-06 Raphael Neider <rneider AT web.de>
1296
1297         * .version: bumped version to 2.5.6 (pic14 ABI changed)
1298         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
1299         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
1300           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
1301             pic14_constructAbsMap
1302           (pic14printPublics): declare absolute global symbols as global
1303           (pic14createInterruptVect),
1304         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
1305           (newReg): assume new registers unused, use correct name in
1306             hashtable (reg->name instead of name), more debugLog output
1307         * src/pic/device.h (PIC_device): added fields for verbose output
1308         * src/pic/device.c: moved device definition to pic14devices.txt,
1309             added routines for runtime parsing of pic14devices.txt,
1310             added support for second config word
1311         * src/pic/main.c (_process_pragma): removed #pragma maxram,
1312           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
1313           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
1314           (_pic14_parseOptions): moved pCodeInitRegisters here
1315           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
1316         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
1317           (pCodeInitRegisters): rewrapped comments, perpared new approach to
1318             handling the pseudo stack
1319         * device/lib/Makefile.in: ignore failures in objects-pic16,
1320         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
1321         * device/lib/pic/NEWS: document new dependency on picXXX.lib
1322         * device/lib/pic/Makefile.subdir,
1323         * device/lib/pic16/Makefile.subdir: improved clean rules
1324         * device/lib/pic/libdev/: NEW, pic14 device libraries
1325         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
1326         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
1327         * device/include/Makefile.in: create subdir and install pic14 headers
1328         * device/include/pic/p16f_common.inc: removed unused declarations
1329         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
1330             PICs from inc2h.pl v1.6,
1331             replaced BIT_AT macros with struct declarations
1332         * device/include/pic/pic14devices.txt: definition of supported devices,
1333             all above improvements contributed by Zik Saleeba, thanks
1334         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
1335         * support/scripts/sdcc.nsi: also install pic14 device libraries and
1336             headers
1337
1338 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1339
1340         * device/include/mcs51/c8051f410.h: added interrupt numbers,
1341         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
1342           thanks to Charles Olds
1343
1344 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1345
1346         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
1347
1348 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1349
1350         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
1351         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
1352         * support/regression/bug1464657.c: added, new test
1353
1354 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1355
1356         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
1357           version number
1358
1359 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1360
1361         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
1362           --no-peep and --peep-file <file> are used don't use default rules but
1363           do use the <file>
1364
1365 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1366
1367         * src/mcs51/gen.c (genCall): fixed bug 1457608
1368
1369 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1370
1371         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1372         changes seem to cause (trigger?) problems with the build system.
1373
1374 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1375
1376         * src/SDCCpeeph.c (operandsLiteral): new, added,
1377           (callFuncByName): inserted operandsLiteral
1378         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1379
1380 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1381
1382         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1383         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1384
1385 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1386
1387         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1388           implemented patch 1120823 Thanks to Willy De la Court (normal
1389           interrupts need an interrupt number now if they are made critical),
1390           and enabled nesting of critical functions though not for gbz80
1391           (genCritical, genEndCritical): added functions
1392           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1393         * src/z80/mappings.i: added "ei" to all mappings
1394
1395 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1396
1397         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1398         submitted by the Debian SDCC maintainer Aurelien Jarno:
1399         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1400         archive with gcc 4.1 on mips and wrote the patch"
1401
1402 2006-03-16 Raphael Neider <rneider AT web.de>
1403
1404         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1405           the left operand is shorter than the result (c* = lit-c* + int),
1406           fixes bug #1450796
1407         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1408           OP_SYMBOL
1409
1410 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1411
1412         * src/.version: increased version number to 2.5.5
1413         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1414         linking is done manually in pic16 port's _linkEdit,
1415         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1416         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1417         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1418         allocate asmop as AOP_ACC,
1419         (aopForRemat): added parameter 'bool result' in function declaration,
1420         (pic16_aopGet): return AOP_ACC when accessing WREG,
1421         (pic16_popGetTempReg): minor modification,
1422         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1423         'pic16_allocWithIdx',
1424         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1425         calling function in absolute addresses,
1426         (genAssign): take into account AOP_ACC asmop,
1427         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1428         * src/pic16/pcoderegs.c: some debug functions and lines added,
1429         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1430         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1431         register too,
1432         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1433         call to allocReg, not by manually allocating a new one,
1434         (pic16_assignRegisters): now before going through the register
1435         allocating functions mark all registers as free. This eliminates some
1436         side effects resulting from peephole parser done earlier in the backbone
1437
1438 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1439
1440         * src/SDCCicode.c (geniCodeLogic),
1441         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1442
1443 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1444
1445         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1446           (genSend): bugfix, do not allocate and free twice,
1447           (shiftRLong): handle partially overlapping aops
1448         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1449
1450 2006-03-08 Borut Razem <borut.razem AT siol.net>
1451
1452         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1453           for pic16
1454
1455 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1456
1457         * support/regression/tests/bug1409955.c: new, added
1458         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1459         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1460           (aopForSym, aopOp): increment asmop.allocated if reused,
1461           (freeAsmop): decrement asmop.allocated and check for zero instead of
1462           using asmop.freed,
1463           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1464           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1465            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1466            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1467            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1468            genSignedRightShift, genRightShift, genDataPointerGet,
1469            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1470            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1471             in reverse order from allocation,
1472           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1473             added swappedLR to keep track
1474         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1475           pdata & code for GCC, z80, gbz80 & hc08
1476         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1477
1478 2006-03-08 Raphael Neider <rneider AT web.de>
1479
1480         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1481
1482 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1483
1484         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1485         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1486         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1487
1488 2006-03-06 Borut Razem <borut.razem AT siol.net>
1489
1490         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1491           made the linker quiet
1492
1493 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1494
1495         * src/pic16/gen.c (genPcall): fixed bug #1443644
1496         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1497         which dumps before the function entry point a data byte which represents
1498         the number of the local variables used by the specified function, added
1499         'xinst' for initial support for Extended Instruction Support,
1500         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1501         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1502         port->fun_prefix anymore (may change later),
1503         (genFunction, genEndFunction): do not store/restore local registers for
1504         _main (this should take care the --main-return command line option in
1505         the future),
1506         (genOr): removed some legacy pic-port instructions,
1507         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1508         performing operations with SFR's causes data to be written more than
1509         once to each SFR. Perhaps SFRs should be handled in special cases...
1510         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1511         pcode.h
1512         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1513         into account for stack starting position,
1514         (struct OPTIONS pic16_optionsTable): added command line argument
1515         --extended or -y for Extended Instruction Support,
1516         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1517         (deassignLRs): *** perhaps the most important change, old 'for' code
1518         (commented out for reference), didn't account for some registers which
1519         were left marked 'not free' after a pointer operation. The change
1520         reduces register usage a lot in some cases
1521
1522 2006-03-04 Borut Razem <borut.razem AT siol.net>
1523
1524         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1525           _clean
1526         * support/regression/tests/bug-524697.c: decreased array size for
1527           mcs51 to fit into the internal RAM
1528         * support/regression/Makefile.in: a little bit more verbose
1529
1530 2006-03-03 Borut Razem <borut.razem AT siol.net>
1531
1532         * support/regression/fwk/lib/testfwk.c,
1533           support/regression/fwk/include/testfwk.h: introduced function
1534           _prints(), nonrecursive _printn(), call _initEmu() from main()
1535         * support/regression/ports/gbz80/support.asm,
1536           support/regression/ports/ucz80/support.asm,
1537           support/regression/ports/z80/support.asm,
1538           support/regression/ports/ds390/support.c,
1539           support/regression/ports/hc08/support.c,
1540           support/regression/ports/host/support.c,
1541           support/regression/ports/mcs51/support.c,
1542           support/regression/ports/xa51/support.c: added empty _initEmu()
1543           function
1544         * support/regression/ports/pic16/gpsim.cmd,
1545           support/regression/ports/pic16/spec.mk,
1546           support/regression/ports/pic16/support.c,
1547           support/regression/Makefile.in: added pic16 regression test
1548
1549 2006-03-01 Raphael Neider <rneider AT web.de>
1550
1551         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1552           genConstPointerGet): use safe way of generating MOVFF to cover
1553             literals as well as registers, fixes bug #1440527
1554         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1555             dereference
1556           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1557             more correctly, fixes bug #1232186
1558           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1559         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1560             gplink guess the correct processor in more cases, applied patch
1561             from Till Riedel attached to and fixing bug #1436552
1562
1563 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1564
1565         * support/regression/tests/array.c: added, contains check for #1434401
1566         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1567
1568 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1569
1570         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1571         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1572         * device/include/mcs51/c8051f326.h,
1573         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1574         * device/include/mcs51/c8051f000.h,
1575         * device/include/mcs51/c8051f018.h,
1576         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1577           PCON_IDLE,PCON_STOP and added sfr16 definitions
1578
1579 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1580
1581         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1582           genGetWord): fixed bug 1409955
1583
1584 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1585
1586         * device/include/hc08/mc68hc908gp32.h,
1587         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1588
1589 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1590
1591         * src/SDCCast.c (constExprValue): return NULL if not a value
1592         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1593         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1594         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1595
1596 2006-02-13 Borut Razem <borut.razem AT siol.net>
1597
1598         * src/regression/ptrarg.c: added, fails due to bug #1430967
1599         * src/regression/Makefile: ptrarg.c added, ...
1600
1601 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1602
1603         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1604         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1605
1606 2006-02-11 Borut Razem <borut.razem AT siol.net>
1607
1608         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1609           print "Processor: xxx" message to stdout only if --verbose
1610
1611 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1612
1613         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1614         * support/regression/tests/bug1426356.c: added
1615         * support/regression/tests/bitfields.c: removed 2 tests
1616
1617 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1618
1619         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1620         * device/include/mcs51/c8051f330.h,
1621         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1622           PCON_IDLE,PCON_STOP and added sfr16 definitions
1623         * device/lib/_divsint.c,
1624         * device/lib/_divuint.c,
1625         * device/lib/_divulong.c,
1626         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1627           register bank bug for small stackauto
1628
1629 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1630
1631         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1632
1633 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1634
1635         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1636         * all.dsp: corrected several bin paths
1637         * device/include/mcs51/c8051f120.h,
1638         * device/include/mcs51/c8051f300.h,
1639         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1640           to PCON_IDLE,PCON_STOP
1641         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1642         * device/lib/printf_large.c (output_float): fixed bug 1388703
1643         * support/regression/tests/bug1057979.c: added test for bug 1388703
1644
1645 2006-02-08 Raphael Neider <rneider AT web.de>
1646
1647         * src/pic/pcode.c (pciTRIS): fixed typo,
1648           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1649           (LinkFlow): fixed handling of flows that end in a call,
1650           (ReuseReg): perform safety check earlier
1651         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1652             to work with flows at the beginning of a pBlock,
1653             fixes #1426557 (Symbol not previously defined),
1654           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1655             usage information
1656           (RemoveUnusedRegisters): update register usage info
1657         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1658             created, reuse existing ones instead
1659         * src/pic/gen.c (genPcall): fixed #1424719
1660
1661 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1662
1663         * link/z80/lkmain.c,
1664         * link/z80/lklex.c,
1665         * link/z80/lkdata.c,
1666         * link/z80/aslink.h: fixed build on current cygwin:
1667         replaced getline() by lk_getline()
1668
1669 2006-02-01 Borut Razem <borut.razem AT siol.net>
1670
1671         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1672           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1673           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1674           src/regression/bool1.c, src/regression/bool2.c,
1675           src/regression/bool3.c, src/regression/call1.c,
1676           src/regression/compare.c, src/regression/compare10.c,
1677           src/regression/compare2.c, src/regression/compare3.c,
1678           src/regression/compare4.c, src/regression/compare5.c,
1679           src/regression/compare6.c, src/regression/compare7.c,
1680           src/regression/compare8.c, src/regression/compare9.c,
1681           src/regression/configword.c, src/regression/for.c,
1682           src/regression/inline.c, src/regression/mult1.c,
1683           src/regression/nestfor.c, src/regression/or1.c,
1684           src/regression/pointer1.c, src/regression/ptrfunc.c,
1685           src/regression/rotate1.c, src/regression/rotate2.c,
1686           src/regression/rotate3.c, src/regression/rotate4.c,
1687           src/regression/rotate5.c, src/regression/rotate6.c,
1688           src/regression/rotate7.c, src/regression/string1.c,
1689           src/regression/struct1.c, src/regression/sub.c,
1690           src/regression/sub2.c, src/regression/switch1.c,
1691           src/regression/while.c, src/regression/xor.c,
1692           src/regression/create_stc, src/regression/simulate,
1693           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1694           regression tests
1695         * src/regression/gpsim_assert.h: added
1696
1697 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1698
1699         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1700         ((void (code *) (void)) 0) ();
1701         * as/hc08/aslex.c,
1702         * as/hc08/aslink.h,
1703         * as/hc08/asm.h,
1704         * as/hc08/asmain.c,
1705         * as/hc08/lkdata.c,
1706         * as/hc08/lklex.c,
1707         * as/hc08/lkmain.c,
1708         * as/mcs51/aslex.c,
1709         * as/mcs51/aslink.h,
1710         * as/mcs51/asm.h,
1711         * as/mcs51/asmain.c,
1712         * as/mcs51/lkdata.c,
1713         * as/mcs51/lklex.c,
1714         * as/mcs51/lkmain.c,
1715         * as/z80/aslex.c,
1716         * as/z80/asm.h,
1717         * as/z80/asmain.c: fixed build on current cygwin:
1718         replaced getline() by as_getline()
1719
1720 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1721
1722         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1723         declarator in the symbol chain
1724         * src/SDCCsymt.h,
1725         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1726         parameter list for function pointers
1727         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1728         * support/regression/tests/bug-716242.c: added
1729
1730 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1731
1732         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1733         offset if possible
1734         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1735
1736 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1737
1738         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1739         inifinitely recurseable, added static
1740         * support/regression/tests/bug-1408066.c: added
1741
1742 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1743
1744         * src/SDCCicode.h,
1745         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1746         renamed, added possibility to create "postLoopLbl"-labels
1747         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1748         newiTempLoopHeaderLabel
1749         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1750         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1751         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1752         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1753         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1754         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1755         (basicInduction): fixed bug #136564, made static,
1756         (loopInduction): changed parameter of basicInduction, made static,
1757         (addPostLoopBlock): added
1758         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1759         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1760         findLoopEndSeq
1761         * support/regression/tests/bug-136564.c: added
1762         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1763         --std-sdcc99 to LIBSDCCFLAGS
1764
1765 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1766
1767         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1768         while loop
1769         * support/regression/tests/bug-1406131.c: added
1770
1771 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1772
1773         * src/SDCCast.c (decorateType): fix promotion of unary minus
1774         * src/SDCCsymt.c (computeType): beautified
1775         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1776         (valUnaryPM, valComplement): fix sign and promotion,
1777         (valNot): ANSI: result type is int (SDCC: unsigned char)
1778         * support/regression/tests/uminus.c: speedup by removing superflous
1779         test case 'int'
1780         * support/regression/tests/onebyte.c: added promotion and signedness
1781         tests for unary minus
1782         * support/regressions/tests/bug-477927.c: disable warning about
1783         uninitialized variables
1784         * support/regression/tests/not.c: added
1785
1786 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1787
1788         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1789         * src/mcs51/gen.c (gen51Code): show final register usage after
1790         fillGaps in asm with --i-code-in-asm
1791         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1792         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1793         incUsed, rliveClear, adjustIChain): made static,
1794         (setFromRange): excluded because it's unused,
1795         (findPrevUseSym, markWholeLoop): added,
1796         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1797         through all branches of predecessors enables sdcc to emit the warning
1798         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1799         (rlivePoint): made static, added parameter emitWarnings which is only
1800         true during the first run out of two,
1801         (findRecursiveSucc, findRecursivePred): removed,
1802         (computeLiveRanges): made static, added parameter emitWarnings,
1803         (dumpIcRlive): added for debugging only
1804         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1805         removed prototype of setFromRange()
1806         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1807         in call of computeLiveRanges()
1808         * support/regression/tests/bug-895992.c: added
1809         * support/regression/tests/bug-971834.c: added
1810         * support/valdiag/tests/bug-895992.c: added
1811         * support/valdiag/tests/bug-971834.c: added
1812
1813 2005-12-18 Raphael Neider <rneider AT web.de>
1814
1815         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1816           (genUnpackBits): improved code for direct operands,
1817           (genPackBits): improved code for literal assignment to bitfields
1818             and for direct destination operands (no FSR indirection),
1819             prevented redundant AND, fixes #1362800,
1820           (AccLsh): added parameter to disable masking of the result
1821         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1822           skip instructions with side-effects (like incfsz),
1823           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1824         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1825         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1826           fixes #1375263
1827
1828 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1829
1830         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1831         volatile variables as spill location
1832
1833 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1834
1835         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1836         replacing literals
1837         * support/regression/tests/bug-1376320.c: added
1838
1839 2005-12-08 Raphael Neider <rneider AT web.de>
1840
1841         * src/pic/device.c: renamed is_shared to pic14_is_shared
1842         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1843         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1844           (is_valid_identifier): added for above workaround
1845
1846 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1847
1848         * device/lib/Makefile.in: fixed to enable port-specific-objects
1849         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1850           char, thanks Hubert Sack
1851         * doc/sdccman.lyx: documented --xstack-loc,
1852           elaborated a bit more on interrupts and pitfalls,
1853           removed "setjmp/longjmp unsupported",
1854           documented some unsupported C99 features
1855         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1856         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1857           if, thanks Hubert Sack
1858         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1859         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1860           make make_library
1861         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1862           regression tests can report resource usage (rfe 700441)
1863         * support/regression/collate-results.py: report resource usage
1864         * support/regression/ports/ds390/spec.mk,
1865         * support/regression/ports/hc08/spec.mk,
1866         * support/regression/ports/mcs51/spec.mk,
1867         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1868         * support/regression/ports/ds390/uCsim.cmd,
1869         * support/regression/ports/hc08/uCsim.cmd,
1870         * support/regression/ports/mcs51/uCsim.cmd,
1871         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1872         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1873           library, use the default one
1874         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1875           building the library
1876
1877 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1878
1879         * config.dsp: added dependency on .version and configure_vc.awk
1880         * device/include/setjmp.h: updated for --stack-auto and --xstack
1881         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1882         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1883         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1884         * device/lib/libsdcc.lib: added _setjmp
1885         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1886           (decorateType): fixed bug 1372851,
1887           (optimizeGetHbit): fixed warning
1888         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1889           array initialisation
1890         * support/regression/tests/bug1057979.c: added test for bug 1358192
1891         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1892
1893 2005-12-03 Borut Razem <borut.razem AT siol.net>
1894
1895         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1896           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1897
1898 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1899
1900         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1901         createIval): implement symbol independant "flexible array member",
1902         (createIvalCharPtr): implemented flexible array initialisation with a
1903         string
1904         * src/SDCCsymt.c (copyStruct): removed,
1905         (getSize): fixed misleading comment,
1906         (getAllocSize): removed, the additional allocation size is now in
1907         sym->flexArrayLength,
1908         (checkStructFlexArray): new, syntax checks for flexible array members,
1909         (compStructSize): added syntax checks for "flexible array members"
1910         (copyStruct): removed,
1911         (copyLinkChain): removed inefficient fix for bug 770487
1912         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1913         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1914         symbol->flexArrayLength
1915         * src/SDCCerr.c,
1916         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1917         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1918         * support/regression/tests/structflexarray.c: added
1919         * support/valdiag/tests/structflexiblearray.c: added
1920
1921 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1922
1923         * src/SDCCast.c (decorateType): fixed bug 1368489
1924         * support/Util/SDCCerr.c,
1925         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1926
1927 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1928
1929         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1930           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1931
1932 2005-11-27 Borut Razem <borut.razem AT siol.net>
1933
1934         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1935           support/cpp2/mkdeps.h: added command line option
1936           -obj-ext=<extension> to SDCPP to define object file externion, used
1937           for generation of make dependencies (-M)
1938         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1939
1940 2005-11-26 Borut Razem <borut.razem AT siol.net>
1941
1942         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1943           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1944           added pic and pic16 libraries
1945
1946 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1947
1948         * device/include/float.h: Corrected typo in prototype of __fsgt
1949
1950 2005-11-25 Borut Razem <borut.razem AT siol.net>
1951
1952         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1953           added creation of model-mcs51-stack-auto libraries
1954
1955 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1956
1957         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1958         and fields-list too
1959         * src/SDCCast.c (createIvalArray): removed obsolete comment
1960
1961 2005-11-24 Borut Razem <borut.razem AT siol.net>
1962
1963         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1964           added missing device/lib/mcs51/crt*.asm sources
1965
1966 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1967
1968         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1969
1970 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1971
1972         * device/lib/_fs2schar.c,
1973         * device/lib/_fs2sint.c,
1974         * device/lib/_fs2slong.c: optimized inline asm
1975
1976 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1977
1978         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1979           Better handling of floats between -1.0 and 0.0.
1980
1981 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1982
1983         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1984           (the missing "if"s prohibited removal of redundant labels)
1985
1986 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1987
1988         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1989           Properly convert floats between -1.0 and 0.0 to long, int, and char
1990           types (max integer value of negative floats tends to zero).
1991         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1992           Removed changes made so to work properly with floats between
1993           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1994           and _fs2char.c
1995
1996 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1997
1998         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1999         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
2000         (genCast) cosmetic change
2001         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
2002         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
2003         from mcs51
2004         * support/regression/tests/bitfields (testSignedBitfields): added
2005
2006 2005-11-18 Borut Razem <borut.razem AT siol.net>
2007
2008         * sdcc/device/lib/Makefile.in: remove all unnecessary files
2009         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
2010           introduced SILENT option to make building of pic16 libraries less
2011
2012 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2013
2014         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2015           Now they work properly with floats between -1.0 and 0.0
2016         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
2017
2018 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2019
2020         * src/SDCCicode.c (printOperand): added missing else
2021
2022 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2023
2024         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
2025         reformatted for better readability
2026         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
2027         signed bitfields
2028
2029 2005-11-17 Borut Razem <borut.razem AT siol.net>
2030
2031         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
2032           introduced SILENT option to make building of pic16 libraries less
2033           verbose - used for nightly snapshot build
2034         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
2035           available on Win32 platforms.
2036         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
2037           medium, large, pic and pic16
2038
2039 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2040
2041         * device/lib/printf_large.c: Temporary patch for bug 1358192:
2042           printf("%f"...) sets fraction to zero.
2043
2044 2005-11-16 Raphael Neider <rneider AT web.de>
2045
2046         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
2047           fixes #1357221
2048         * src/pic/gen.c (genIfx): implemented for CARRY bit
2049         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
2050           to generic pointers, fixes #1357332,
2051           (pic16_movLit2f): NEW,
2052           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
2053
2054 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2055
2056         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
2057
2058 2005-11-11 Raphael Neider <rneider AT web.de>
2059
2060         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
2061         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
2062           compute pointer's type from operand,
2063           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
2064           improved single bit reads, fixes bug #1353379
2065
2066 2005-11-09 Borut Razem <borut.razem AT siol.net>
2067
2068         * support/scripts/sdcc.nsi: added lib/pic to the package
2069
2070 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
2071
2072         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
2073
2074 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2075
2076         * support/regression/tests/bug1348008.c: added
2077         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
2078         * support/regression/tests/bug1337835.c: updated comment
2079
2080 2005-11-06 Borut Razem <borut.razem AT siol.net>
2081
2082         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2083           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2084           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2085           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2086           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
2087           dynamic construction of cl_error_class and derivates - 2.nd try
2088
2089 2005-11-05 Borut Razem <borut.razem AT siol.net>
2090
2091         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
2092           bug, which caused Bus Errors on sparc solaris
2093
2094 2005-11-04 Borut Razem <borut.razem AT siol.net>
2095
2096         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2097           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2098           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2099           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2100           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
2101           and derivates to resolve the initialization problem on OSX
2102
2103 2005-11-02 Borut Razem <borut.razem AT siol.net>
2104
2105         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2106           corrected typo - #include <winsock2.h>
2107
2108 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
2109
2110         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
2111           (_asxxxx_mapping): added org directive for future enhancements
2112
2113 2005-11-01 Borut Razem <borut.razem AT siol.net>
2114
2115         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2116           enabled sockets on WIN32
2117         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
2118
2119 2005-10-31 Borut Razem <borut.razem AT siol.net>
2120
2121         * support/regression/generate-cases.py: escape backslashes in {testcase}:
2122           WIN32 backslash path delimiters should be escaped when used in C strings
2123         * support/regression/tests/bitfields.c: exclude failing assertions for
2124           __CYGWIN32__ and __MINGW32__ hosts
2125
2126 2005-10-30 Borut Razem <borut.razem AT siol.net>
2127
2128         * src/SDCCutil.c: corrected double comparison typo
2129
2130 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
2131
2132         * device/lib/medium/Makefile: added for new memory model medium
2133         * device/include/asm/mcs51/features.h: updated for medium/pdata
2134         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
2135           added Multiply & Accumulate sbit's and MAC0_PAGE define
2136         * device/include/mcs51/c8051f300.h: added sfr16 definitions
2137         * device/include/mcs51/c8051f310.h: added sfr16 definitions
2138         * device/lib/_mullong.c: update for medium model
2139         * device/lib/incl.mk: added medium model
2140         * doc/sdccman.lyx: documented medium model
2141         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
2142         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
2143         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
2144         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
2145           (allocParms): set SCLS and OCLS to pdata for medium model
2146         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
2147           for pdata,
2148           (powof2): return <0 if not power of 2
2149         * src/avr/gen.c (genBitWise): use updated powof2
2150         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
2151           (shiftR2Left2Result): small optimization in setup, save acc when storing,
2152           (shiftLLeftOrResult): use B if necessary
2153         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
2154         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
2155         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
2156         * support/regression/Makefile.in: added test-mcs51-medium
2157         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
2158
2159 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2160
2161         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
2162         specifier unsigned
2163         * device/lib/time.c (mktime): fixed bug 1334315
2164
2165 2005-10-28 Raphael Neider <rneider AT web.de>
2166
2167         * device/include/pic/p16f_common.inc: added common declarations
2168         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
2169
2170 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2171
2172         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
2173           (aopPutUsesAcc): added to predict accumulator use,
2174           (assignResultValue): save acc if necessary,
2175           (genMinusDec): store result if indirectly addressed,
2176           (genDivOneByte):  save acc if necessary,
2177           (movLeft2Result): bugfix if left already in acc,
2178           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
2179             attention to accumulator use (esp. pdata),
2180           (genReceive): receive pdata correctly
2181         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
2182         * src/SDCCicode.h: added isOperandInPagedSpace prototype
2183
2184 2005-10-27 Raphael Neider <rneider AT web.de>
2185
2186         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
2187
2188 2005-10-27 Raphael Neider <rneider AT web.de>
2189
2190         * .version: changed version to 2.5.4
2191         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
2192         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
2193           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
2194             arithmetics support routines
2195         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
2196         * device/lib/Makefile.in: also create installdir for pic
2197
2198         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
2199           pic14 port as well
2200         * src/pic/device.c (dump_sfr): rewritten to delegate register
2201           placement to the linker (use `extern sym' rather than sym EQU addr),
2202           (validAddress): fixed to check last specified address
2203         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
2204           (popGetLit): truncate literal value to 8 bit,
2205           (popGet): moved assert to more appropriate place
2206           (popGetExternal): create pCode operand from and mark the according
2207             symbol as being `extern'
2208           (popGetAddr): added sanity check on immediate's offset, provide
2209             GPOINTER tag on demand
2210           (aopPut): fixed for immediates,
2211           (mov2w_op): move operand's address or contents to WREG (depending on
2212             operand type), safer variant of mov2w,
2213           (movwf,call_libraryfunc): NEW, handy abbreviations,
2214           (get_argument_pcop,get_return_val_pcop,pass_argument,
2215           get_returnvalue): interface for accessing function parameters and
2216             return values,
2217           (assignResultValuei,genRet): use new parameter/return value interface
2218           (pic14_getDataSize): back to old version handling generic pointers,
2219           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
2220             provided implementation and/or fixed old one,
2221           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
2222             calls, removed legacy 8051 reference code
2223           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
2224           (loadSignToC): NEW, move the operands sign bit to CARRY,
2225           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
2226             genRightShiftSigned, accepts negative shift counts,
2227           (setup_fsr): load FSR and adjust IRP (indirect memory access),
2228           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
2229             generic pointers, __data pointers and __code pointers,
2230           (genUnpackBits,genPackBits): rewritten to work with generic pointers
2231             and signed bitfields, limit bitfields to 8 bit,
2232           (genDataPointerGet): fixed number of bytes read,
2233           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
2234           (genPointerGet,genPointerSet): fixed handling of __code pointers,
2235             pointers to constant data are no longer assumed to point to __code
2236             space, removed invalid pointer types,
2237           (bitpatternFromVal): retrieve the PICs representation of an integer
2238             or float literal,
2239           (genDataPointerSet): fixed assigning to po_immediate operands,
2240           (genGenPointerSet): implemented as library call,
2241           (genIfx): fixed incorrect condition,
2242           (genAddrOf): limit generic pointers' addresses to 2 bytes,
2243             provide GPOINTER tag according to destination's storage class,
2244           (genCast): added code to handle casting to generic pointers, added
2245             sign-/zero extension of the result
2246           (aop_isLitLike,op_isLitLike): fixed handling of immediates
2247         * src/pic/gen.h: added macros to access IRP bit in STATUS register
2248         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
2249           extend the result
2250         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
2251           address/register resides in the shared banks
2252           (emitSymbolToFile): improved to handle global and `pinned' symbols,
2253             put all variables into separate sections (have the linker arrange
2254             them)
2255           (picglue): put init code and interrupt handlers in separate sections
2256         * src/pic/main.c: added port specific options table, modified to PORT
2257           structure to make GPOINTERs 3 byte, added pic14_options
2258           (_pic14_do_link): private linking routine (update paths to libraries,
2259             add libsdcc.lib by default)
2260         * src/pic/main.h: declare pic14_options
2261         * src/pic/pcode.c: fixed instructions i/o relations,
2262           (RegCond): reverted to correct version,
2263           (newpCodeOpLit): truncate literals to 8 bit,
2264           (genericPrint): added debug output,
2265           (getRegFromInstruction): fixed for various operand types, simplified
2266           (BuildFlow): fixed broken handling of isntructions with labels
2267           (LinkFlow): start at last instruction in flow (skip trailing comments),
2268             pass the flow on to the next instruction after CALL
2269           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
2270           (insertPCodeInstruction): fixed inserting after a skip instruction,
2271           (DoBankSelect): fixed for labeled instructions
2272           (OptimizepBlock): honor --nopeep switch
2273           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
2274         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
2275         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
2276           (pCodeOptime2pCodes): allow disabling this optimization via
2277             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
2278             but is still buggy), started implementation of a dataflow based
2279             pCode optimization (CSE + dead code elimination)
2280           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
2281         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
2282           names are independant of the stack location and therefore portable across
2283           devices
2284
2285 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2286
2287         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
2288           (selectSpil): fixed bug 1337835 by not spilling bit variables
2289         * support/regression/tests/bug1337835.c: added test for this bug
2290         * src/mcs51/peeph.def: restart after rule 3.c,
2291           addded rules 263.x to optimize loading constants
2292
2293 2005-10-26 Raphael Neider <rneider AT web.de>
2294
2295         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
2296         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
2297           (genAssign): emit warning when casting literals to generic pointer
2298             type, also applies when taking the address of a fixed variable,
2299           (genCast): improved casting to generic pointers
2300         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
2301           extern variables, added verbose error message
2302         * device/include/pic16/{string.h,errno.h}: added #pragma library c
2303
2304 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
2305
2306         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
2307         carry must be complemented too
2308         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
2309         could be emitted by genMinus
2310         * src/SDCCval.c (constVal): fixed bug 1305065
2311
2312 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
2313
2314         * src/SDCCast.c (addCast): added promotion for bit variables
2315         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
2316         promotion casts + optimisation
2317         (optimizeGetWord): fix warning 'i' might be used uninitialized
2318         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
2319         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
2320
2321 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2322
2323         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
2324         all chars are promoted to int; promotion should be handled in SDCCast.c
2325
2326 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2327
2328         * device/lib/_strcmp.c: Fixed bug 1326457
2329
2330 2005-10-11 Raphael Neider <rneider AT web.de>
2331
2332         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
2333         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
2334
2335 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2336
2337         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
2338         * support/regression/tests/sfr16.c: added test for the sfr32 bug
2339
2340 2005-10-04 Raphael Neider <rneider AT web.de>
2341
2342         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
2343           device/lib/pic16/pics.all: added pic18f1320
2344         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
2345
2346 2005-09-30 Raphael Neider <rneider AT web.de>
2347
2348         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
2349         * src/pic16/devices.inc: NEW, provides device descriptions
2350         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
2351
2352 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
2353
2354         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
2355           GETHBIT
2356
2357 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
2358
2359         * doc/sdccman.lyx: updated Highest Order Bit documentation,
2360           documented Any Order Bit, Higher Order Byte and Higher Order Word
2361         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
2362         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2363           (optimizeGetAbit): new, to get any bit, not only the high bit,
2364           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2365           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2366           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2367           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2368             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2369             GETABIT, GETBYTE, GETWORD: decorate them,
2370           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2371           (ast_print): added GETABIT, GETBYTE, GETWORD
2372         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2373         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2374           (geniCodeBinary): new generic binary icode,
2375           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2376         * src/port.h: updated comment for PORT.hasExtBitOp
2377         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2378           (genGetByte): new, to get a single byte,
2379           (genGetWord): new, to get a word from a long,
2380           (gen51Code): added GETABIT, GETBYTE, GETWORD
2381         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2382
2383 2005-09-23 Raphael Neider <rneider AT web.de>
2384
2385         * configure.in, configure: have device/lib/pic configured
2386         * device/lib/Makefile.in: added model-pic14
2387         * device/lib/clean.mk: added pic/ to clean rule
2388         * device/lib/pic: added rudimentary pic14 library providing support
2389           functions for multiplication/division/generic pointer access
2390         * src/SDCCopt.c (convilong): mark support functions as extern
2391           for pic14 port as well
2392         * src/pic/gen.c (genMult): added assertions,
2393           (genpic14Code): emit warning on unhandled iCodes
2394         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2395         * src/pic/pcode.c (pCodeOpCopy),
2396         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2397           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2398           SFR_REGISTER}), made safe for future extensions
2399         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2400           instructions even if preceeded by SKIP instructions (also remove
2401           them); removed unused code
2402         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2403           prevents leaving parts of the structure uninitialized after copying
2404
2405 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2406
2407         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2408           ago by me
2409         * support/regression/tests/addsub.c: added test for the bug
2410
2411 2005-09-21 Raphael Neider <rneider AT web.de>
2412
2413         * device/include/pic16/pic18f1220.h,
2414           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2415         * device/lib/pic16/Makefile.rules: added missing opening paren
2416         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2417           are provided in genutils.c,
2418           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2419           operand/result sizes,
2420           (genCmp): assert on NULL pointers first, then check deref'ed values
2421         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2422           result size
2423
2424 2005-09-18 Raphael Neider <rneider AT web.de>
2425
2426         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2427           as these are now unused,
2428           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2429         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2430           local, avoids uninitialized pointer dereference on r->name
2431         * src/pic16/ralloc.c (newReg): fixed indentation
2432
2433 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2434
2435         * src/SDCCval.c (constVal): fixed bug 730366
2436         * support/Util/SDCCerr.c,
2437         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2438
2439 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2440
2441         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2442
2443 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2444
2445         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2446
2447 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2448
2449         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2450           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2451         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2452           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2453         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2454         * packihx/packihx.c (hexDigit): made c unsigned char
2455         * as/mcs51/lklibr.c (fndsym),
2456         * link/z80/lkgb.c (gb),
2457         * link/z80/lklibr.c (fndsym),
2458         * link/z80/lkrloc.c (relr),
2459         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2460         * src/SDCC.lex (checkCurrFile, process_pragma),
2461         * src/SDCCglue.c (spacesToUnderscores),
2462         * src/SDCCmain.c (setParseWithComma, processFile),
2463         * src/asm.c (tvsprintf, printCLine),
2464         * src/avr/gen.c (emitcode, aopPut),
2465         * src/ds390/gen.c (emitcode),
2466         * src/hc08/gen.c (emitcode, emitinline),
2467         * src/mcs51/gen.c (emitcode, genInline),
2468         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2469           tokenizeLineNode),
2470         * src/pic/ralloc.c (debugLog),
2471         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2472           tokenizeLineNode),
2473         * src/pic16/ralloc.c (debugLog),
2474         * src/z80/main.c (_process_pragma):
2475            made all ctype.h function calls safe
2476         * src/SDCCopt.c: include math.h for fabs
2477         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2478           and used them throughout the code to make ctype.h function calls safe
2479         * src/ds390/main.c (asmLineNodeFromLineNode),
2480         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2481         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2482            unsigned char*
2483         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2484           (newpCodeAsmDir): made ctype.h function calls safe
2485         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2486           pic16_emitcode):  made lbp unsigned char*
2487         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2488           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2489         * src/xa51/gen.c (emitcode),
2490         * src/z80/gen.c (_emit2): made lbp unsigned char*
2491         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2492            char*
2493
2494 2005-09-05 Raphael Neider <rneider AT web.de>
2495
2496         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2497           access bank splitpoint
2498
2499 2005-09-05 Raphael Neider <rneider AT web.de>
2500
2501         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2502
2503 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2504
2505         * .version: changed to version 2.5.3
2506         * doc/sdccman.lyx: changed version to 2.5.3,
2507           documented --codeseg and --constseg and pragma codeseg and constseg,
2508           documented bit parameters (reentrant) and bit returning
2509         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2510            currFunc->recvSize, but is this ok for all ports?
2511           (ast2iCode): result of ~ on unsigned char must be cast to int for
2512            bool to work
2513         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2514           function pointers in bit space
2515         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2516           (processFuncArgs): call port.reg_parm() with reentrancy info
2517         * src/port.h,
2518         * src/avr/main.c,
2519         * src/ds390/main.c,
2520         * src/hc08/main.c,
2521         * src/pic/main.c,
2522         * src/pic16/main.c,
2523         * src/xa51/main.c,
2524         * src/z80/main.c: port.reg_parm prototype extended with
2525           "bool reentrant" parameter
2526         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2527           options.stackAuto for allocating bit register parameters
2528         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2529           (genSend): set BitBankUsed if it is,
2530           (selectRegBank): factored out of genCall for use in genPcall,
2531           (genCall): removed redundant dtype assignmen, use selectRegBank,
2532           (genPcall): handle returning in Carry properly, save in F0 if needed,
2533           (genReceive): handle bit register parameters
2534         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2535           (mcs51_assignRegisters): enable bit registers for all reentrant
2536            functions and don't set BitBankUsed unconditionally
2537         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2538         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2539         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2540
2541 2005-08-27 Borut Razem <borut.razem AT siol.net>
2542
2543         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2544         ppc-osx (Darwin) does not support -u option. It seems that it is
2545         supported only on Linux - GNU cp
2546
2547 2005-08-25 Borut Razem <borut.razem AT siol.net>
2548
2549         * sim/ucsim/gui.src/serio.src/Makefile.in,
2550           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2551           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2552           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2553           install and strip, since the strip at /usr/ccs/bin should be used
2554           on solaris
2555
2556 2005-08-24 Borut Razem <borut.razem AT siol.net>
2557
2558         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2559
2560 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2561
2562         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2563         ffffffffu
2564
2565 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2566
2567         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2568         * as/mcs51/lkmain.c (link_main): fixed warning
2569         * device/include/stdbool.h: ds390 has no advanced bit support yet
2570         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2571         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2572         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2573           and updated their macros
2574         * src/SDCCval.c (constVal): updated comment for renamed b_long
2575
2576 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2577
2578         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2579         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2580           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2581           (oprio): set priority for '['
2582         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2583            and adb_24_bit
2584         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2585         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2586         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2587         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2588           added overlayable BIT_BANK area
2589         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2590           (summary2): explain 'T' in legenda
2591         * as/mcs51/lkrloc.c: replaced old K&R style,
2592           (relr): added R_BIT processing,
2593           (errmsg): added "Bit-addressable relocation error",
2594           (adb_bit): added for converting from byte- to bit-addressable space,
2595           (adb_24_bit): added for converting from byte- to bit-addressable space
2596         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2597            used in reentrant functions now even as return value
2598         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2599         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2600           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2601         * src/SDCCglobl.h: added indicator BitBankUsed
2602         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2603            the bit registers b0-b7
2604         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2605           (geniCodeCast): fixed bug 1263853,
2606           (geniCodeLogicAndOr): put result in bool or char,
2607           (geniCodeReceive): added parameter func for accessing the return type,
2608           (geniCodeFunctionBody): pass func to geniCodeReceive
2609         * src/SDCCmain.c: added indicator BitBankUsed
2610         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2611         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2612           (checkSClass): don't put automatic bool/bit on stack,
2613           (checkFunction): removed check on function cannot return bit
2614         * src/SDCCsymt.h: added newBoolLink prototype
2615         * src/mcs51/gen.c (rb1regs): added bit registers,
2616           (movc): created for assigning to carry,
2617           (pushReg, popReg): created for pushing registers,
2618           (sameRegs): check both AOP_REG and AOP_CRY types,
2619           (aopOp): handle bit registers,
2620           (aopPut): optimization no self-assign,
2621           (saveRegisters): push reg->base (bits) only once for bit registers,
2622            and use pushReg,
2623           (unsaveRegisters): pop reg->base only once and use popReg,
2624           (assignResultValue): added parameter func and return in carry for bits,
2625           (genIpush): optimization no reload in A if not changed,
2626           (genSend): bit parameters in reentrant functions are passed in bit
2627            registers by first assigning to bits in B, then save registers and
2628            copy B to bits,
2629           (genCall): handle returning in Carry properly, save it in F0 if needed,
2630           (genPcall): updated assignResultValue call, this is not safe yet for bit
2631            returning function !!!
2632           (genFunction): don't generate equ's for bit registers and use pushReg,
2633           (genEndFunction): take care of bit returning functions and use popReg,
2634           (genRet): return bit in Carry,
2635           (genIfx): optimize bit registers and other directly addressable bits,
2636           (genReceive): updated assignResultValue call
2637         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2638           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2639            registers when using stack-auto
2640         * src/mcs51/ralloc.c (_G): added allBitregs,
2641           (regs8051): added the bit registers,
2642           (createStackSpil): use macro IS_BIT,
2643           (getRegBit): added to allocate a bit register, else spill,
2644           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2645           (updateRegUsage): factored out to ease stepping while debugging,
2646           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2647            also allocate bit registers,
2648           (fillGaps): handle bit registers,
2649           (findAllBitregs): added to create bit vector with all bit registers,
2650           (mcs51_allBitregs): returns this bit vector,
2651           (mcs51_assignRegisters): when using stack-auto use bit registers for
2652            passing parameters and creating local variables
2653         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2654
2655 2005-08-22 Borut Razem <borut.razem AT siol.net>
2656
2657         * device/lib/Makefile.in: replaced find option -or with -o
2658           to make it run on solaris
2659
2660 2005-08-22 Raphael Neider <rneider AT web.de>
2661
2662         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2663           fixes #1265442 (crash on Solaris)
2664
2665 2005-08-20 Borut Razem <borut.razem AT siol.net>
2666
2667         * configure, configure.in: added tests for libsocket and libnsl libraries,
2668           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2669           from support/regression/Makefile.in
2670         * support/regression/Makefile.in: added
2671         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2672         * sim/ucsim/libtool: regenerated on sparc-solaris
2673         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2674           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2675           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2676           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2677           sparc-solaris, which doesn't use GNU ld linker
2678         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2679         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2680
2681 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2682
2683         * src/mcs51/peeph.def: updated comments
2684
2685 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2686
2687         * device/lib/_gptrget.c,
2688         * device/lib/_gptrput.c: slightly shorter
2689         * doc/sdccman.lyx: incremented version
2690         * src/mcs51/peeph.def: moved peephole comments to the line of first
2691           change to better keep line correlation, reanimated 186.e
2692         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2693
2694 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2695
2696         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2697           David Saxton with quotes around file name.
2698
2699 2005-08-15 Borut Razem <borut.razem AT siol.net>
2700
2701         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2702           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2703           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2704           make tests run on x86_64 platform
2705
2706 2005-08-13 Raphael Neider <rneider AT web.de>
2707
2708         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2709           as it might be executed DURING a build (parallel make is wonderful)
2710
2711 2005-08-13 Raphael Neider <rneider AT web.de>
2712
2713         * device/lib/Makefile.in (port-specific-objects-pic16):
2714           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2715         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2716           dependency
2717         * device/lib/pic16/Makefile.rules: build subdirs before creating
2718           the library, removed builddir rule, create $(builddir) early in
2719           recurse rule, use empty recurse rule for leaf directories
2720         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2721           mkdir errors (race condition), removed duplicate suffix "hex"
2722           from clean rules
2723         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2724         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2725           prevents mkdir -p from aborting on Alpha
2726
2727 2005-08-12 Raphael Neider <rneider AT web.de>
2728
2729         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2730           db-statements in order to allow for arrays of pointers in code
2731           sections to be placed without interspersed 0-padding, fixes
2732           bug #1256215
2733         * (emitStatistics): fixed division by zero for pic18f1220
2734         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2735           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2736         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2737         * (pic16_pCodeConstString): keep track of already emitted string
2738           literals to prevent "duplicate definitions of symbol _str_NR"
2739         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2740           debug message
2741         * device/lib/Makefile.in: ignore failing PIC16 library builds
2742         * device/lib/pic16/Makefile: do not build if gputils are missing
2743         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2744
2745 2005-08-10 Raphael Neider <rneider AT web.de>
2746
2747         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2748           my last commit)
2749
2750 2005-08-10 Raphael Neider <rneider AT web.de>
2751
2752         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2753           Rokas' patch to add the new fixed point type "__fixed16x16"
2754         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2755           functions for __fixed16x16 arithmetics
2756         * device/lib/pic16: reimplemented the build system to support
2757           a separate build directory, better handling of libio (create
2758           the library in a separate subdir for each architecture) and
2759           easier configuration (centralized in Makefile.common)
2760
2761 2005-08-07 Raphael Neider <rneider AT web.de>
2762
2763         * src/pic16/gen.c (genrshTwo): fixed sign extension
2764         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2765         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2766           added T0CONbits
2767         * device/include/pic16/pic18f4220.h: NEW, header for
2768           pic18f4220 and pic18f4320
2769         * device/include/pic16/pic18fregs.h: added new devices,
2770           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2771         * device/include/pic16/signal.h: resolved name clashes
2772           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2773           to also allow testing for interrupt enable bits, added
2774           comments on how to use the macros
2775         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2776         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2777           register definitions for the devices
2778         * device/lib/pic16/pics.all: added new devices
2779         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2780           allocated memory
2781         * device/lib/pic16/libc/stdlib/memfree: do not count
2782           the block header as free memory
2783         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2784           simplified and added missing end-of-blocklist-marker
2785           (reported by Peter Onion, fixes #1252814)
2786         * (_mergeHeapBlock): fixed loop condition
2787         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2788           len==0, restructured code
2789         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2790           up a bit, reduced bitfield accesses, prevent endless loops
2791           in case of heap corruption
2792         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2793           "unreferenced arguments/must return a value" warnings
2794         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2795           replaced BAUDREG with SPBRG
2796         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2797           device/lib/pic16/debug/gstack/gstack.c: replaced
2798           _naked, _asm, _endasm with __naked, __asm, __endasm
2799
2800 2005-08-05 Raphael Neider <rneider AT web.de>
2801
2802         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2803           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2804
2805 2005-08-05 Borut Razem <borut.razem AT siol.net>
2806
2807         * device/lib/Makefile.in: added missing ';'
2808         * configure: removed ^M characters
2809
2810 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2811
2812         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2813           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2814           License
2815
2816 2005-08-04 Borut Razem <borut.razem AT siol.net>
2817
2818         * configure.in: pic16 libraries build 2nd try - enable running
2819           configure in device/lib/pic16
2820         * configure: regenerated from configure.in
2821         * device/lib/Makefile.in: create $(PORT)/bin directory
2822
2823 2005-08-03 Raphael Neider <rneider AT web.de>
2824
2825         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2826           to get/set values via pointers
2827         * (genUnpackBits,genPackBits): changed detection of
2828           ptr->bitfield vs. sym.bitfield, fixed access via generic
2829           pointers, removed dead (wrong) code for multibyte bitfields
2830         * (genNearPointerGet, genGenPointerGet): removed useless code,
2831           fixed bitfield detection, fixes #1250594
2832         * (genNearPointerSet): removed useless code
2833         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2834           and introduced macro pic16_emitpcode that conditionally emits
2835           the origin of the following pCode (useful for debugging SDCC)
2836         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2837         * (createDefmap): fixed handling of LFSR for --optimize-df
2838
2839 2005-08-02 Borut Razem <borut.razem AT siol.net>
2840
2841         * device/lib/Makefile.in: pic16 libraries build enabled since
2842           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2843
2844 2005-08-02 Raphael Neider <rneider AT web.de>
2845
2846         * src/pic16/gen.c (genPackBits): removed deprecated warning
2847         * (genGenPointerSet): fixed bitfield detection
2848
2849 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2850
2851         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2852
2853 2005-07-31 Raphael Neider <rneider AT web.de>
2854
2855         * device/lib/pic16/libdev/pic18f458.c,
2856           device/include/pic16/pic18f458.h: added missing T0CONbits
2857
2858 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2859
2860         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2861
2862 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2863
2864         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2865
2866 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2867
2868         * device/include/mcs51/at89c51ed2.h: added.
2869
2870 2005-07-23 Raphael Neider <rneider AT web.de>
2871
2872         * src/pic/gen.h: added emitpcode macro for debugging
2873         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2874           and replace by macro adding debug information on demand
2875         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2876         * (gencjne): tried to fix; replaced with correct (slower) code
2877         * (gen{Unp,P}ackBits): fixed single bit access
2878         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2879         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2880           previous instruction
2881         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2882           register has to be handled with care (forbidding movement
2883           of assignments/uses, removing assignments completely, ...)
2884         * (pCodeOptime2pCodes): make use of regIsSpecial
2885         * added lots of debugging output (commented out)
2886         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2887           from being reused as result UNLESS it is known to work
2888
2889 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2890
2891         * support/Util/dbuf.h: include <stddef.h> for size_t
2892         * .version: changed to version 2.5.2
2893
2894 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2895
2896         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2897
2898 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2899
2900         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2901           (genModOneByte): removed needless psha/pula
2902
2903 2005-07-22 Raphael Neider <rneider AT web.de>
2904
2905         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2906           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2907         * src/pic/gen.c (resolveIfx): do not "invent" labels
2908         * (genSkipc): changed to positive logic
2909         * (genSkipCond): removed as no longer needed
2910         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2911           backport from PIC16
2912         * (genLeftShift): check operands are in different registers
2913         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2914           INCF does not update CARRY...
2915         * src/pic/main.c: fixed _linkCmd
2916         * src/pic/pcode.c (unlinkpCode): added inactive code
2917         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2918           alive (do not assign result and operand overlapping registers)
2919
2920 2005-07-22 Raphael Neider <rneider AT web.de>
2921
2922         * src/pic/device.c (dump_sfr): replaced register declaration with
2923           call to emitSymbolToFile() to avoid duplicate symbols
2924         * (assignRelocatableRegisters): do not declare external symbols
2925         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2926           right (take size of type, not etype)
2927         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2928         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2929         * (packRegsForAccUse): disabled assignment of WREG as
2930           the result reg to prevent occurence of just fixed #1235003,
2931           fixes #1242954
2932         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2933           symbols (avoids duplicate symbols in .asm file)
2934         * (pic14emitRegularMap): use emitSymbolToFile()
2935         * src/pic/gen.c (aopOp): fixed spillLocation handling
2936         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2937         * (genDataPointerSet): removed unneccessary variables/output
2938
2939 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2940
2941         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2942         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2943
2944 2005-07-21 Raphael Neider <rneider AT web.de>
2945
2946         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2947           architecture cannot handle them efficiently, fixes bug #1235003
2948         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2949           check for empty sets before using them (fixes bug #1232190)
2950
2951 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2952
2953         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2954           (lnksect2): generate warnings for memory overlap
2955         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2956           constseg to set the name of these segments so you can instruct the linker
2957           to place them in banks
2958         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2959         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2960           added code_seg and const_seg to options
2961         * src/SDCCglue.c (emitMaps): use options.const_seg,
2962           (createInterruptVect): put interrupt vectors in segment HOME,
2963           (glue): put HOME before static segment and put the main glue in HOME,
2964           (glue): use options.code_seg
2965         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2966         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2967           these segments so you can instruct the linker to place them in banks
2968           (linkEdit): use code_loc for HOME segment which should be the first
2969           segment in code memory now
2970         * src/SDCCmem.c: fixed more stuff like bug 1238386
2971         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2972           (changePointer): don't change function pointers to code pointers for
2973           banked functions,
2974           (compareType): added exceptional check for banked function pointers
2975         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2976         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2977           after static in code memory
2978         * src/mcs51/gen.c: added aopLiteralLong prototype,
2979           (aopForSym): use getSize for functions,
2980           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2981           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2982           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2983           the segment,
2984           (genPcall): use call for literal function pointers and generate banked
2985           calls over the one trampoline so there's only one place for the user to
2986           modify according to his/hers hardware,
2987           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2988           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2989         * src/mcs51/main.c: added keyword banked,
2990           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2991         * support/Util/SDCCerr.c,
2992         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2993           needed for passing the bank and address to the trampoline
2994         * device/lib/mcs51/crtbank.asm: added for bankswitching
2995         * device/lib/mcs51/Makefile: added crtbank
2996
2997 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2998
2999         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
3000           for fields at offset 0 of a struct or union as reported
3001           on 2005-07-07 in the developer mailing list.
3002
3003 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
3004
3005         * src/SDCCmem.c: fixed bug 1238386
3006
3007 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3008
3009         * src/mcs51/peeph.def: added labelrefcounting for peepholes
3010           (patch #1144962), added peephole 300, enabled 259.x
3011         * doc/sdccman.lyx: removed screenshot and provided link instead
3012
3013 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3014
3015         * doc/sdccman.lyx: added section about debugging with ddd
3016         * doc/figures/ddd_example.eps: screenshot of debugging session
3017
3018 2005-07-04 Raphael Neider <rneider AT web.de>
3019
3020         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
3021           like CODE pointers, fixes #1115683
3022         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
3023           call, fixes bugs #1232211, #1228110,
3024           fixed wrong casts to pCodeFlow from pCodeInstructions
3025
3026 2005-07-04 Raphael Neider <rneider AT web.de>
3027
3028         * src/pic/gen.c (popGet): changed assert to allow for
3029           bit operands
3030         * (popGetAddr): changed signature to provide
3031           an additional index, patched all call sites
3032         * (genCmpEq): handle literal-like operands correctly
3033         * (genAddrOf): added sanity checks on __code/__data pointers
3034         * (genAssign): added handling of symbols from __code section
3035         * (gencjne): do not generate code for comparisons whose result
3036           is neither stored nor used, fixes bug #1171114
3037         * (AccLsh, AccRsh): operate on operand instead of WREG
3038         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
3039           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
3040           by known count
3041         * rewrote complete shift-by-literal logic, commented unused
3042           functions out
3043         * (genConstPointerGet): get multiple bytes (if result size > 1),
3044           fixed handling of non-immediate addresses
3045         * (genPointerGet): handle CODE pointers like CONST pointers
3046         * (genpic14Code): insert C-SRC lines as Cource-pCodes
3047         * ({aop,op}_isLitLike): NEW, single place to decide whether an
3048           operand is to be treated as a literal or not
3049         * (mov2w,genPcall,genCmpEq),
3050           src/pic/genarith.c: use aop_isLitLike() to decide between
3051           literal/register contents
3052         * (addSign): added missing offset
3053         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
3054           only emit comment in debug-mode,
3055           use {aop,op}_isLitLike throughout the file
3056         * src/pic/glue.c: fix initializers for pointers (work in progress)
3057         * src/pic/pcode.c (get_op): honor index on _const symbols
3058         * ({reset,dump}pCodeStatistics): NEW, estimate code size
3059         * (dumppBlock): added pCode size estimation
3060         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
3061           check for IS_SYMOP before OP_SYMBOL'ing
3062         * fixed indentation, compacted switch-statements
3063         * (allocReg): find free register and allocate it instead of
3064           allocating new registers all the time
3065         * (deassignLRs): prevent POINTER_GET's from being assigned the same
3066           registers as its operands (necessary only for multibyte GETs)
3067
3068 2005-07-01 Raphael Neider <rneider AT web.de>
3069
3070         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
3071           debugging .asm-output macros FENTRY + FEXIT
3072         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
3073           way... I wonder...
3074         * (emitpComment): NEW, printf to pCode
3075         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
3076           offset handling
3077         * (popGetAddr): NEW, variant of popGet to access an immediates
3078           high(er) bytes instead of the n'th byte of memory they reference,
3079           replaced popGet with popGetAddr where neccessary
3080         * (genDataPointerGet): reactivated and fixed implementation
3081         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
3082           accesses
3083         * (genDataPointerSet): fixed multibyte assignments
3084         * (genpic14Code): fixed --i-code-in-asm handling
3085         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
3086         * (genPlus): fixed index-out-of-bounds error
3087         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
3088         * src/pic/ralloc.c: added debugging output macro FENTRY2
3089         * (spillThis): fixed indentation, enbraced for-body for clarity
3090         * (rematStr): commented out as now unused
3091         * (regTypeNum): commented out special spill case (overwrites
3092           arbitrary values)
3093         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
3094
3095 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
3096
3097         * doc/sdccman.lyx: documented sfr16/sfr32,
3098           added example for using storage class with function pointers
3099         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
3100
3101 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
3102
3103         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
3104         * device/lib/_itoa.c,
3105         * device/lib/_ltoa.c: optimized codesize
3106         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
3107           but don't know how to suppress the double warning.
3108         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
3109         * support/Util/SDCCerr.c,
3110         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
3111
3112 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
3113
3114         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
3115           fixed old K&R prototypes
3116         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
3117         * device/lib/_gptrget.c,
3118         * device/lib/_gptrgetc.c,
3119         * device/lib/_gptrput.c: changed versions for new memory indicator values,
3120           also new versions for small generic pointers and banked generic pointers
3121         * src/port.h: added const_name
3122         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
3123         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
3124         * src/SDCCcse.c (findPrevIc): check all associative operators
3125         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
3126         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
3127         * src/SDCCmem.c: updated comments,
3128           set far-space to 0 for pdata, results in optimized code
3129         * src/SDCCmem.h: added macro CONST_NAME
3130         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
3131           moving the info into the highest bits, see also gptrget/gptrput
3132         * src/src.dsp: added sdcc.ico to project files
3133         * src/avr/gen.c (genCast): fixed bug 0x%d
3134         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
3135         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
3136           relation between ptr_type and DCL_TYPE,
3137           (genCast): fixed bug 0x%d
3138         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
3139           (CODE)" for const_name
3140         * src/hc08/gen.c (genCast): fixed bug 0x%d
3141         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
3142           (hc08_port): added "CONST (CODE)" for const_name
3143         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
3144           (aopForRemat, adjustArithmeticResult): disconnected direct relation
3145           between ptr_type and DCL_TYPE,
3146           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
3147           operand* and took AOP() inside function so sfr-ness can be checked,
3148           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
3149           new prototype,
3150           (genFunction, genEndFunction): optimized stack setup,
3151           (genMinus): optimized for literals with ending zeroes (in bytes),
3152           (genCast): fixed bug 0x%d
3153         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
3154           (mcs51_port): added "CONST (CODE)" for const_name
3155         * src/mcs51/peeph.def: made rule 226 more generic
3156         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
3157         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
3158         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
3159         * src/z80/main.c (z80_port): added NULL for const_name,
3160           (gbz80_port): added NULL for const_name
3161         * support/regression/tests/bug663539.c,
3162         * support/regression/tests/sfr16.c: new tests
3163
3164 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3165
3166         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
3167
3168 2005-06-24 Raphael Neider <rneider AT web.de>
3169
3170         * device/lib/pic16/libdev/pic18f[68][567]20.c:
3171           corrected typos...
3172         * device/include/pic16/signal.h: added USBIF
3173           and SIG_USB
3174
3175 2005-06-24 Raphael Neider <rneider AT web.de>
3176
3177         * device/lib/pic16/libdev/pic18f2455.c,
3178           device/include/pic16/pic18f2455.h: NEW
3179         * device/include/pic16/pic18fregs.h,
3180           device/lib/pic16/pics.all,
3181           src/pic16/device.c: added 18f2455
3182         * device/lib/pic16/libdev/pic18f[68][567]20.c,
3183           device/include/pic16/{pic18f[68][567].h,usart.h}:
3184           replaced MULTIPLE_USARTS define with more relaible
3185           compatibility sfrs (for USART access)
3186
3187 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
3188
3189         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
3190           and the output asm file line is printed on two lines.
3191
3192 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3193
3194         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
3195           BGT, BLE, BHI, and BLS instructions
3196         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
3197           genCmpEq): removed
3198         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
3199           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
3200           fixes bug #1216342
3201         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
3202
3203 2005-06-15 Raphael Neider <rneider AT web.de>
3204
3205         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
3206         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
3207         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
3208           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
3209           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
3210
3211 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3212
3213         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
3214           Marcel Telka in bug #1215704
3215
3216 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
3217
3218         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
3219           located in shared memory bank.
3220
3221 2005-05-31 Raphael Neider <rneider AT web.de>
3222
3223         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
3224           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
3225           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
3226
3227 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
3228
3229         * device/lib/_strncpy.c: fixed the fix
3230
3231 2005-05-26 Raphael Neider <rneider AT web.de>
3232
3233         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
3234           initializers with \0, bug #1208187
3235         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
3236           intializers with \0, bug #1208187
3237
3238 2005-05-26 Raphael Neider <rneider AT web.de>
3239
3240         * src/pic16/glue.c (pic16_printIvalChar): fixed string
3241           initializers with \0, bug #1208187
3242         * src/pic16/main.c (_process_pragma): added sanity checks
3243           for stack position and size, emit warnings when appropriate
3244
3245 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
3246
3247         * device/lib/_strncpy.c: fixed not filling with \0
3248
3249 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3250
3251         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
3252           createFunction),
3253         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
3254           compound_statement),
3255         * src/SDCCsymt.h,
3256         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
3257
3258 2005-05-24 Raphael Neider <rneider AT web.de>
3259
3260         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
3261
3262 2005-05-24 Raphael Neider <rneider AT web.de>
3263
3264         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
3265           TRISE definitions, closes bug #1162453
3266
3267 2005-05-22 Raphael Neider <rneider AT web.de>
3268
3269         * src/pic16/main.c (_process_pragma): check for missing
3270           arguments to pragmas code and udata
3271         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
3272           consistency fixes to match other headers (thanks to Jim Paris)
3273         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
3274
3275 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
3276
3277         * src/SDCCicode.c (isOperandEqual): fixed missing ;
3278
3279 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
3280
3281         * support/regression/tests/bug1198642.c: new test
3282         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
3283         * src/SDCCcse.c (findPrevIc): added comment, please have a look
3284         * support/scripts/resource.h,
3285         * support/scripts/resource.rc,
3286         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
3287         * support/scripts/sdcc.ico: added 32x32 icon
3288
3289 2005-05-18 Raphael Neider <rneider AT web.de>
3290
3291         * device/lib/pic16/libdev/pic18f*.c,
3292         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
3293           keywords to "__sfr" and "__at (X)"
3294         * device/include/pic16/pic18fregs.h: added pic18f4520
3295         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
3296           #1203088 (MPLAB compatibility)
3297
3298 2005-05-17 Raphael Neider <rneider AT web.de>
3299
3300         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
3301         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
3302         * device/lib/pic16/pics.all: added new devices
3303         * src/pic16/device.c: added support for pic18f4520
3304
3305 2005-05-16 Raphael Neider <rneider AT web.de>
3306         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
3307         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
3308         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
3309           convenience function for bit access
3310
3311 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3312
3313         * device/lib/printf_large.c: fixed bug 1193299
3314         * support/regression/tests/bug1057979.c: added test %3.3s
3315
3316 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3317
3318         * device/include/mcs51/8051.h,
3319         * device/include/mcs51/8052.h: made parseable with lint
3320         * device/include/mcs51/lint.h: added include file for (sp)lint
3321         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
3322         * doc/cdbfileformat.lyx,
3323         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
3324
3325 2005-05-14 Raphael Neider <rneider AT web.de>
3326
3327         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
3328         * device/lib/pic16/libc/stdlib/itoa.c (new)
3329         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
3330         * device/lib/pic16/libio/Makefile: exclude subdir according to
3331           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
3332         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
3333         * src/pic16/gen.c (genFunction): prevent annoying warning
3334         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
3335           nameclashes on BeOS
3336         * support/cpp2/cppmain.c (cpp_output_string): new
3337         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
3338           fixes bug 1116802
3339
3340 2005-05-13 Borut Razem <borut.razem AT siol.net>
3341
3342         * src/SDCCmain.c (linkEdit): fixed bug 1195202
3343
3344 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3345
3346         * .version: changed to version 2.5.1; back to bleeding edge development
3347
3348 2005-05-11 Borut Razem <borut.razem AT siol.net>
3349
3350         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
3351           generate PDF version 1.3 documents
3352
3353 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3354
3355         * .version: changed to version 2.5.0
3356
3357 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3358
3359         * doc/sdccman.lyx: updated weblinks, index and smaller updates
3360
3361 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3362
3363         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3364         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3365         well as many smaller updates.
3366         * .version: changed to version 2.5.0-pre1
3367
3368 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3369
3370         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3371
3372 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3373
3374         * support/regression/tests/bug1185672.c: added
3375         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3376           bug 1185672
3377         * src/mcs51/gen.c (genCall): added comments, made it look safer
3378         * src/mcs51/gen.c (genEndFunction): simplified
3379
3380 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3381
3382         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3383
3384 2005-04-14 Borut Razem <borut.razem AT siol.net>
3385
3386         * fixed bug 1045046 - SIGSEGV with really simple code?:
3387           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3388           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3389
3390 2005-04-14 Borut Razem <borut.razem AT siol.net>
3391
3392         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3393           src/pic16/device.h: temporarily disabled experimental #inline pragma
3394           for 2.5.0 release
3395
3396 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3397
3398         * device/include/z80/stdio.h,
3399         * device/include/z80/string.h: removed these highly incomplete files so
3400           SDCC can use the default ones in device/include/
3401
3402 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3403
3404         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3405         gcc warning.
3406         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3407         fix sdcpp warnings.
3408
3409 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3410
3411         * device/include/malloc.h: removed redundant __reentrant prototypes
3412         * device/lib/_mullong.c: added working xstack variant in asm (C version
3413           doesn't pass regression tests)
3414         * device/lib/bpx.c: used __data and made bpx char for mcs51
3415         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3416           (createFunction): fixed bug with xstackPtr
3417         * src/SDCCcse.c: corrected comments
3418         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3419           (killDeadCode, eBBlockFromiCode): removed unused code
3420         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3421           corrected comments
3422         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3423           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3424           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3425           (genModOneByte): fixed warning in MSVC
3426         * src/mcs51/main.c (): added comments
3427         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3428
3429 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3430
3431         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3432
3433 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3434
3435         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3436
3437 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3438
3439         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3440         characters arrays of larger size than the declared one.
3441
3442 2005-04-10 Borut Razem <borut.razem AT siol.net>
3443
3444         * src/pic/gen.c (genInline),
3445           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3446           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3447           (findNextInstruction), (findPrevInstruction),
3448           (findInstructionUsingLabel),
3449           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3450         * src/pic/pcode.c (findLabel): added missing '\n'
3451         * src/src.dsp: added SDCCdwarf2.c to the project
3452
3453 2005-04-09 Borut Razem <borut.razem AT siol.net>
3454
3455         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3456
3457 2005-04-08 Raphael Neider <rneider AT web.de>
3458
3459         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3460           into the chain after a given one) and mergeDefmapSymbols (combine
3461           defmap entries for each symbol per pcode)
3462         * (createDefmap): have defmap entries merged in the end
3463         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3464           a symbol before replacing one access type's symbol, merge symbols in
3465           the end (replacement symbol might already have an entry)
3466         * (assignValnums): keep reference to written WREG intact
3467
3468 2005-04-08 Raphael Neider <rneider AT web.de>
3469
3470         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3471           Alpha)
3472
3473 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3474
3475         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3476         bytes
3477
3478 2005-04-07 Raphael Neider <rneider AT web.de>
3479
3480         * device/include/pic16/usart.h: added compatibility defines for
3481           devices with more than one USART
3482         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3483
3484 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3485
3486         * device/lib/Makefile.in: updated for port specific include
3487
3488 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3489
3490         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3491
3492 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3493
3494         * device/include/8051.h,
3495         * device/include/8052.h,
3496         * device/include/at89S8252.h,
3497         * device/include/at89c55.h,
3498         * device/include/at89x051.h,
3499         * device/include/at89x51.h,
3500         * device/include/at89x52.h,
3501         * device/include/mcs51reg.h,
3502         * device/include/reg51.h,
3503         * device/include/reg764.h,
3504         * device/include/regc515c.h,
3505         * device/include/sab80515.h: (re)moved these 12 files
3506         * device/include/mcs51/8051.h,
3507         * device/include/mcs51/8052.h,
3508         * device/include/mcs51/at89S8252.h,
3509         * device/include/mcs51/at89c55.h,
3510         * device/include/mcs51/at89x051.h,
3511         * device/include/mcs51/at89x51.h,
3512         * device/include/mcs51/at89x52.h,
3513         * device/include/mcs51/mcs51reg.h,
3514         * device/include/mcs51/reg51.h,
3515         * device/include/mcs51/reg764.h,
3516         * device/include/mcs51/regc515c.h,
3517         * device/include/mcs51/sab80515.h: and added them here
3518
3519 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3520
3521         * device/include/stdarg.h: changed SDCC specific keywords to double
3522           underlined form.
3523         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3524           mcs51 and ds390.
3525         * device/include/hc08/mc68hc908gp32.h,
3526         * device/include/hc08/mc68hc908jb8.h,
3527         * device/include/hc08/mc68hc908jkjl.h,
3528         * device/include/hc08/mc68hc908qy.h: fixed comments
3529         * device/include/mcs51/README: updated
3530         * device/include/mcs51/c8051f120.h: added PINRSF
3531         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3532         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3533           amidst code. Also inline is not supported.
3534
3535 2005-04-06 Raphael Neider <rneider AT web.de>
3536
3537         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3538         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3539           callers stack/frame pointers
3540
3541 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3542
3543         * device/include/pic16/usart.h: added, missing in previous commit,
3544         * device/include/pic16/adc.h: fixed typo,
3545         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3546         commit,
3547         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3548         <p18fxxx.inc>
3549         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3550         uninitialized because a bug appears with gplink
3551         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3552         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3553         complains for unrecognised option
3554
3555 2005-04-05 Raphael Neider <rneider AT web.de>
3556
3557         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3558           structs as well (using memcpy)
3559         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3560           on ISRs (GOTO has no label)
3561         * src/pic16/device.h: added OF_OPTIMIZE_DF
3562         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3563           new data flow analysis/optimization
3564         * src/pic16/pcode.c: added (prototypes for and implementation of)
3565           dataflow analysis functions, fixed pCodeInstructions' inCond and
3566           outCond values, made RCALL a branch instruction
3567         * (pic16_unlinkpCode): keep C line if possible
3568         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3569           C line moved if possible
3570         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3571         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3572           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3573         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3574           new flow)
3575         * (pic16_getJumptabpCode): NEW, needed in...
3576         * (LinkFlow): fixed handling of jumptables, calls and conditional
3577           branches
3578         * (pic16_InsertCommentAfter): NEW
3579         * (pic16_pCodeReplace): made verbose and flow preserving
3580         * (AnalyzeFlow): added call to data flow analysis
3581         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3582         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3583         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3584
3585 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3586
3587         * src/SDCCast.c (decorateType): fixed bug #1105626
3588
3589 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3590
3591         * device/include/asm/pic16/features.h,
3592         * pic18f*.h headers,
3593         * device/include/pic16/adc.h,
3594         * device/include/pic16/delay.h,
3595         * device/include/pic16/i2c.h,
3596         * device/include/pic16/malloc.h,
3597         * device/include/pic16/stdio.h,
3598         * device/include/pic16/stdlib.h,
3599         * device/include/pic16/string.h,
3600         * device/lib/pic16/libc/stdio/printf_tiny.c,
3601         * device/lib/pic16/libc/stdio/printf_small.c,
3602         * device/lib/pic16/libc/stdio/strmgpsim.c,
3603         * device/lib/pic16/libc/stdio/strmmssp.c,
3604         * device/lib/pic16/libc/stdio/strmusart.c,
3605         * device/lib/pic16/libc/stdio/vfprintf.c,
3606         * device/lib/pic16/libc/stdlib/ltoa.c,
3607         * device/lib/pic16/libc/stdlib/putchar.c,
3608         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3609         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3610         * device/lib/pic16/libc/stdlib/memchrram.c,
3611         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3612         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3613         * device/lib/pic16/libio/adc/adcbusy.c,
3614         * device/lib/pic16/libio/adc/adcread.c,
3615         * device/lib/pic16/libio/adc/adcsetch.c,
3616         * device/lib/pic16/libio/usart/ubaud.c,
3617         * device/lib/pic16/libio/usart/ubusy.c,
3618         * device/lib/pic16/libio/usart/udrdy.c,
3619         * device/lib/pic16/libio/usart/uopen.c,
3620         * device/lib/pic16/libio/usart/uputc.c,
3621         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3622         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3623         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3624         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3625         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3626         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3627         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3628         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3629         specific keywords to double underlined form,
3630         * device/lib/pic16/libc/Makefile.rules,
3631         * device/lib/pic16/libsdcc/Makefile.rules,
3632         * device/lib/pic16/libm/Makefile,
3633         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3634         to compile with C standard set in Makefile.common
3635         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3636         rand.c and crc.c in compilation process,
3637         * device/lib/pic16/libsdcc/int/divuint.c,
3638         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3639         `c' from signed to unsigned,
3640         * device/lib/pic16/startup/crt0.c,
3641         * device/lib/pic16/startup/crt0i.c,
3642         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3643         keywords to double underlined form, bug fixes in _do_cinit function
3644         which prevented the correct initialization of the .idata segment,
3645         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3646         core to enter a infinite loop
3647         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3648
3649 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3650
3651         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3652
3653 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3654
3655         * device/include/Makefile.in: add support for hc08 subdirectory
3656         * device/include/hc08/: new subdirectory
3657         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3658         Lucas Loizaga, thanks!
3659         * device/include/hc08/mc68hc908qy.h,
3660         * device/include/hc08/mc68hc908gp32.h,
3661         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3662         their own directory. Changed internal macro names to use the compiler
3663         reserved namespace. Changed SDCC specific keywords to double
3664         underlined form.
3665         * device/include/math.h,
3666         * device/include/malloc.h,
3667         * device/include/stdarg.h,
3668         * device/include/stdbool.h
3669         * device/include/string.h,
3670         * device/include/tinibios.h,
3671         * device/include/ds400rom.h,
3672         * device/include/8051.h,
3673         * device/include/8052.h,
3674         * device/include/80c51xa.h,
3675         * device/include/at89c55.h,
3676         * device/include/at89S8252.h,
3677         * device/include/at89x51.h,
3678         * device/include/at89x52.h,
3679         * device/include/ds80c390.h,
3680         * device/include/reg764.h,
3681         * device/include/regc515c.h,
3682         * device/include/sab80515.h,
3683         * device/include/mcs51/c8051f000.h,
3684         * device/include/mcs51/c8051f018.h,
3685         * device/include/mcs51/c8051f020.h,
3686         * device/include/mcs51/c8051f040.h,
3687         * device/include/mcs51/c8051f060.h,
3688         * device/include/mcs51/c8051f120.h,
3689         * device/include/mcs51/c8051f300.h,
3690         * device/include/mcs51/c8051f310.h,
3691         * device/include/mcs51/c8051f320.h,
3692         * device/include/mcs51/c8051f330.h,
3693         * device/include/mcs51/c8051f350.h,
3694         * device/include/z180.h: Changed SDCC specific keywords to double
3695         underlined form.
3696
3697 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3698
3699         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3700         18F4455,
3701         * (pic16_assignConfigWordValue): disable testing of configuration
3702         register value with config mask,
3703         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3704         function with port->fun_prefix,
3705         * (genFunction): when generating a naked interrupt function never
3706         create an absolute segment placed in interrupt vector address, place
3707         the actual interrupt function at IVA instead, when an interrupt
3708         function is generated with unspecified interrupt then do not create
3709         the absolute section,
3710         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3711         code for generating a call to generic pointer get/put function with
3712         a call to function pic16_callGenericPointer(),
3713         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3714         the call to the generic pointer get/put functions with prefixing the
3715         function name with port->fun_prefix,
3716         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3717         * src/pic16/main.c (_process_pragma): prefix function with
3718         port->fun_prefix,
3719         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3720         calling assembler, old 18Fxxxx macro is deprecated,
3721         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3722         PC_ASMDIR in while condition,
3723         * (findInstruction): add PC_ASMDIR in while condition,
3724         * (buildCallTree): prefix main with port->fun_prefix,
3725         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3726         identifier for variable with banked access in instructions BTFSS,
3727         BTFSC, BCF, BSF, BTG
3728         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3729         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3730         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3731         perform optimization when enviroment variable NO_REG_OPT is set,
3732         * (insideLRBlock): NEW, return 1 if register is inside an
3733         INF_LOCALREGS block,
3734         * (RemoveRegFromLRBlock): remove a register that is completely
3735         eliminated by register optimization, but it is still left in local
3736         register store/restore in/from stack block,
3737         * (Remove2pcodes): after removing register, check to see if it
3738         should be removed from local register store/restore in/from stack
3739         block,
3740         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3741         DUMMY_READ_VOLATILE,
3742
3743         * device/include/pic16/adc.h: minor prototype modifications and
3744         update,
3745         * device/include/pic16/malloc.h: added GPL notice various
3746         modifications,
3747         * device/include/pic16/stdint.h: NEW, standard header for ints
3748         * device/include/pic16/delay.h: NEW, header for delay functions,
3749         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3750         delay1mtcy,
3751         * device/include/pic16/signal.h: NEW, header providing helper macros
3752         for implementing signal handlers,
3753         * device/include/pic16/stdio.h: added prototypes for functions,
3754         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3755         prototypes for stdin and stdout, added macro PUTCHAR to
3756         automatically implement putchar function prototype,
3757         * device/include/pic16/usart.h: modified and updated USART library,
3758         * device/lib/pic16/libio/adc/,
3759         * device/lib/pic16/libio/i2c: some modifications to improve library
3760         performance,
3761         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3762         family of functions,
3763         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3764         family of functions and other sources,
3765         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3766         of the PIC18Fxx[28] devices,
3767         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3768         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3769         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3770         _do_cinit function, because the previous failed when local variables
3771         where not placed in the same memory bank,
3772         * device/lib/pic16/libsdcc/char/: various modifications to improve
3773         library performance,
3774         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3775         information on the new functions of the c library and more...
3776
3777 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3778
3779         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3780
3781 2005-03-26 Raphael Neider <rneider AT web.de>
3782
3783         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3784           if condition == CARRY)
3785         * (genCmp): adapted to new genSkipc semantics
3786         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3787           on rIfx (genCmp was broken)
3788
3789 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3790
3791         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3792         * src/z80/main.c (_keywords[]),
3793         * src/SDCCglobal.h (struct options),
3794         * src/SDCC.y,
3795         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3796         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3797         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3798         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3799         always available in leading double underscore form. The C99 support is
3800         mostly missing, but it's a start.
3801         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3802         reserved identifier "__data".
3803
3804 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3805
3806         * src/mcs51/peeph.def: fixed bug 1170013
3807
3808 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3809
3810         * device/include/mcs51reg.h: fixed bug 842007
3811
3812 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3813
3814         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3815         last time.
3816
3817 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3818
3819         * src/port.h (struct PORT),
3820         * src/avr/ralloc.c (avr_assignRegisters),
3821         * src/avr/main.c,
3822         * src/ds390/ralloc.c (ds390_assignRegisters),
3823         * src/ds390/main.c,
3824         * src/hc08/ralloc.c (hc08_assignRegisters),
3825         * src/hc08/main.c,
3826         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3827         * src/mcs51/main.c,
3828         * src/pic/ralloc.c (pic14_assignRegisters),
3829         * src/pic/main.c,
3830         * src/pic16/ralloc.c (pic16_assignRegisters),
3831         * src/pic16/main.c,
3832         * src/xa51/ralloc.c (xa51_assignRegisters),
3833         * src/xa51/main.c,
3834         * src/z80/ralloc.c (z80_assignRegisters),
3835         * src/z80/ralloc.h,
3836         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3837         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3838         * src/SDCCcse.h,
3839         * src/SDCCdflow.c (computeDataFlow),
3840         * src/SDCCdflow.h,
3841         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3842         * src/SDCCloop.h,
3843         * src/SDCCcflow.c (*),
3844         * src/SDCCcflow.h,
3845         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3846         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3847         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3848         immedDom() returning wrong block; probably fixes bug #1160833)
3849
3850 2005-03-20 Borut Razem <borut.razem AT siol.net>
3851
3852         * support/scripts/inc2h.pl: WIN32 port
3853
3854 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3855
3856         * device/lib/makefile.in: added abs.c and labs.c
3857
3858 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3859
3860         * device/include/stdint.h: added
3861         * device/lib/abs.c: added
3862         * device/lib/labs.c: added
3863         * device/include/stdlib.h: added abs() and labs() prototypes
3864         * device/lib/libsdcc.lib: added abs and labs
3865         * device/include/float.h,
3866         * device/lib/_fsmul.c,
3867         * device/lib/printf_fast.c,
3868         * device/lib/printf_tiny.c: updated comments
3869
3870 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3871
3872         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3873         bug #1164313
3874
3875 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3876
3877         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3878         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3879
3880 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3881
3882         * device/lib/printf_large.c: removed inline assembly for portability and
3883           readability. Use printf_fast if speed or size are more important.
3884         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3885         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3886
3887 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3888
3889         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3890         prevent compiler warning
3891
3892 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3893
3894         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3895         moved to level 0 and declared as static. Also they are explicit
3896         placed in access bank. This was necessery because some times they
3897         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3898         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3899         optimizations. Currently only compare to unsigned char is implemented,
3900         * src/pic16/gen.c: added fReturnIdx array,
3901         * (struct resolvedIfx) is moved to gen.h and made public,
3902         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3903         * (aopForSym): added an optimization to directly store in stack of
3904         the operand of a SEND iCode,
3905         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3906         but as registers instead (AOP_REG) using the fReturnIdx array,
3907         * (pic16_freeAsmop): remove the freed register from the
3908         _G.sregsAlloc field,
3909         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3910         a compare of 'WREG',
3911         * (pic16_popGetTempRegCond): changed function prototype, now
3912         function takes also a bitVector argument v which holds the current
3913         set of registers that are allocated for stack access by aopForSym,
3914         registers allocated in aopForSym for accessing stack symbols are not
3915         any more part of the functions usedRegs field,
3916         * (genCall): some times aopOp is called for a stack variable to be
3917         send, aopForSym might perform the push, if this is true make sure
3918         that genCall doesn't push the variable twice by testing _G.resDirect,
3919         * (genFunction): changed testing for unspecified interrupt number
3920         from 256 to INTNO_UNSPEC,
3921         * modified selection scheme of frame pointer generation. Previously
3922         if function did use local registers a frame pointer was generated,
3923         now a frame pointer is generated only if function has arguments
3924         (that need PLUSW2 register access), or has stack arguments, or the
3925         compiler is not instructed to omit the frame pointer,
3926         * (genEndFunction): before restoring local registers that were saved
3927         in the function preamble, also restore the registers that *might*
3928         have been allocated for stack access,
3929         * (genRet): removed some old comments,
3930         * (genCmp, the active (RN's) version): added a call to the
3931         pic16_genCmp_special function to perform the compare with a more
3932         robust and optimized way,
3933         * (genInline): a feature has been added in inline code generation,
3934         which allows a wildcard variable substitution when writing inline
3935         assembly. Code is incomplete and experimental therefore undocumented,
3936         * (genCast): changed order of aopOp for result and right to allow
3937         aopForSym to directly load the result if possible,
3938         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3939         perform an optimized compare on some selected special occasions,
3940         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3941         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3942         generate an IVT any more,
3943         * src/pic16/main.c (pic16_optionsTable): added command line option
3944         --optimize-cmp,
3945         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3946         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3947         macros,
3948         * src/pic16/NOTES: Raphael Neider added in list of active developers
3949         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3950         jumptable_end to prevent bug #,
3951         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3952         inCond and outCond fields,
3953         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3954         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3955         turn off register spilling,
3956         * (packRegsForOneUse): synced with other ports' versions although it
3957         is not used currently,
3958         * (pic16_packRegisters): added an optimization while reading
3959         structure bitfields, some registers may be saved (malloc code is
3960         decreased by 80 bytes)
3961
3962 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3963
3964         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3965         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3966         this can be optimized more?
3967
3968 2005-03-10 Raphael Neider <rneider AT web.de>
3969
3970         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3971           genNearPointerGet): (hopefully) fixed access to bitfields via
3972           pointers (p->bitN = x; and x = p->bitN; failed)
3973
3974 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3975
3976         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3977
3978 2005-03-09 Raphael Neider <rneider AT web.de>
3979
3980         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3981
3982 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3983
3984         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3985         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3986           (regTypeNum): set REG_BIT type if necessary
3987         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3988         * support/regression/tests/critical.c: check bug 1144613
3989
3990 2005-03-02 Raphael Neider <rneider AT web.de>
3991
3992         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3993
3994 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3995
3996         * src/avr/ralloc.c (serialRegAssign),
3997         * src/ds390/ralloc.c (serialRegAssign),
3998         * src/hc08/ralloc.c (serialRegAssign),
3999         * src/mcs51/ralloc.c (serialRegAssign),
4000         * src/pic/ralloc.c (serialRegAssign),
4001         * src/pic16/ralloc.c (serialRegAssign),
4002         * src/xa51/ralloc.c (serialRegAssign),
4003         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
4004
4005 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
4006
4007         * src/SDCCast.c (decorateType): fixed bug 1124787
4008
4009 2005-02-20 Hubert Sack <sack AT digiplan.de>
4010         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4011
4012         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
4013         patch #1121755
4014
4015 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4016
4017         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
4018         to keep the correct label reference count when adding/removing references
4019         to labels. A peephole file using this is appended to patch #1144962.
4020
4021 2005-02-14 Raphael Neider <rneider AT web.de>
4022
4023         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
4024         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
4025         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
4026           retrievals of result operand's value on assignment
4027
4028 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
4029
4030         * device/include/pic16/string.h: modified prototype for memccpy()
4031         to memccpy(void *, void *, char, size_t)
4032         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
4033         check whether to omit frame pointer or not,
4034         * (genInline): convert all occurences of "\n" to LF in inline
4035         assembler blocks, this helps formatting the inline text,
4036         * (pic16_loadFSR0): modified prototype,
4037         * (genNearPointerGet, genNearPointerSet): reorganization of code,
4038         removed some 8051 legacy code,
4039         * (genPackBits): enabled handling bitfields exceeding one byte in size,
4040         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
4041         before allocating temporary registers in functions,
4042
4043 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
4044
4045         * support/regression/tests/bitvars.c: corrected the "fix"
4046
4047 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
4048
4049         * support/regression/tests/bitvars.c,
4050         * support/regression/tests/bitwise.c,
4051         * support/regression/tests/rotate.c: "fixed" problems on Alpha
4052
4053 2005-02-10 Raphael Neider <rneider AT web.de>
4054
4055         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
4056           different size for Alpha
4057         * src/pic16/gen.c (genCmpEq) : improved compare with 0
4058
4059 2005-02-09 Raphael Neider <rneider AT web.de>
4060
4061         * src/SDCC.lex(doPragma) : save and restore warning options as well
4062           (also added new stack plus clone- and copyAndFreeSDCCERRG())
4063         * have #pragma less_pedantic set the errorlevel to WARNING
4064           (fixes #1117001)
4065         * (cloneOptimize) : fixed wrong malloc's size
4066         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
4067           facilitate correct handling of #pragma (save|restore)
4068
4069 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
4070
4071         * src/mcs51/gen.c: removed non-standard C nameless struct/union
4072
4073 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
4074
4075         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
4076
4077 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
4078
4079         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
4080
4081 2005-02-02 Raphael Neider <rneider AT web.de>
4082
4083         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
4084         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
4085         * (pic16_storeForReturn): fixed to allow returning function pointers
4086         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
4087         * device/include/pic16/{stddef.h,stdbool.h}: added
4088
4089 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
4090
4091         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
4092
4093 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
4094
4095         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
4096         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
4097          appeared to be required
4098
4099 2005-01-31 Borut Razem <borut.razem AT siol.net>
4100
4101         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
4102           include/mcs51 and include/z80 directories to the package
4103
4104 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4105
4106         * src/hc08/gen.c (genFunction): fixed bug #1112752
4107
4108 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4109
4110         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
4111
4112 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4113
4114         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
4115
4116 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
4117
4118         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
4119
4120 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
4121
4122         * device/include/c8051fxxx.h: removed these 6 files
4123         * device/include/mcs51/c8051fxxx.h: added these 11 new files
4124
4125 2005-01-26 Raphael Neider <rneider AT web.de>
4126
4127         * src/pic16/gen.c (genAssign): fixed assignment from longs
4128           in codespace (were cut to three bytes)
4129         * (genDummyRead): implemented (except for CODESPACE...),
4130           fixed bug #1108575
4131         * src/pic16/glue.c (emitStatistics): beautified
4132         * device/lib/pic16/libm/Makefile: added include path
4133
4134 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4135
4136         * src/z80/gen.c (aopPut): fixed bug #1103902
4137
4138 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4139
4140         * device/lib/expf.c: fixed bug #1095792
4141
4142 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
4143
4144         * device/lib/pic16/libm: added Math library sources
4145
4146 2005-01-24 Raphael Neider <rneider AT web.de>
4147
4148         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
4149           to enable upcast to pCodeOpReg2 (there is no type tag to
4150           differenciate the two and pic16_popGet2p cast into PCOR2)
4151         * src/pic16/main.c (_process_pragma): fixed another malloc bug
4152           (sizeof(sectNames) changed to sizeof(sectName))
4153           Both patches fix segfaults under MinGW.
4154
4155 2005-01-23 Raphael Neider <rneider AT web.de>
4156
4157         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
4158           Safe_[mc]?alloc()'ed variables
4159         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
4160           of (byte sized) temporaries (assign them to WREG for now)
4161         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
4162           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
4163           this might fix SIGSEGVs on MinGW...
4164         * src/SDCCopt.c (killDeadCode): restored original behaviour
4165           (volatile operands might get thrown away though)
4166
4167 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
4168
4169         * src/pic16/gen.c: fixed bug #1106975,
4170         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
4171         pointer update, INTCON is saved, global interrupts are disabled and
4172         restored after updateing TOS.
4173         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
4174         * added function attribute 'shadowregs' to take advantage of shadow
4175         registers,
4176         * added function attribute 'wparam' as an alternative to the wparam
4177         pragma,
4178         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
4179         user declares a non-ISR function as 'shadowregs',
4180         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
4181
4182 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
4183
4184         * .version: bumped version number to 2.4.8
4185         * device/lib/pic16/pics.all: list of PIC18F devices supported by
4186         pic16 port,
4187         * device/lib/pic16/libio/i2c/: I2C module support library,
4188         * device/include/pic16/i2c.h: I2C support library header,
4189         * device/lib/pic16/libc/stdio/: standard IO support sources,
4190         * (printf_small.c): printf_small() source, supports float print,
4191         * (printf_tiny.c): printf_tiny() source, does not support floats,
4192         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
4193         enable global optimizations for entire library source, other
4194         Makefiles in the source tree are also modified to reflect this,
4195         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
4196         function,
4197         * doc/sdccman.lyx: updated to reflect new changes,
4198         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
4199         sym->onStack if-case,
4200         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
4201         sbit, idata, _idata, xdata, _xdata,
4202         * added pragma library, to link an external library, (see doc),
4203         * removed command line options, --pomit-config-words, --pomit-ivt,
4204         --pleave-reset-vector,
4205         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
4206         when calling assembler to reflect memory model used, also define
4207         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
4208         reflect stack model used,
4209         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
4210         on stack return NULL,
4211
4212 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4213
4214         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
4215           of the operands is volatile. Fixes #1020220
4216
4217 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4218
4219         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
4220         * (OptimizeRegUsage): make sure that there is really no other flow where
4221           the first pCode is used
4222
4223 2005-01-22 Raphael Neider <rneider AT web.de>
4224
4225         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
4226           to fix #1106967 (pCode->seq are not set up correctly)
4227
4228 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4229
4230         * src/SDCCglue.c (glue): make sure code area is declared before the
4231         static initialization area.
4232
4233 2005-01-21 Raphael Neider <rneider AT web.de>
4234
4235         * device/lib/Makefile.in: fixed test for pic16 install dir
4236         * device/lib/pic16/*/Makefile*: modified compile flags to enable
4237           optimizations
4238         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
4239           added --optimize-goto compiler switch and pragma wparam documentation
4240         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
4241         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
4242           and PRODH closing bug #1071770 (peephole optimizer)
4243
4244 2005-01-19 Raphael Neider <rneider AT web.de>
4245
4246         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
4247           cmdLine buffers (used when calling sdcpp...) are large enough
4248           (MAX_PATH=256 truncates arguments leading to system halts when
4249           used in MinGW...)
4250         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
4251         * (genUminus): rewritten to for efficiency
4252         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
4253           used uninitialized in some cases)
4254         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
4255           copy the third byte from the int -- now assumes 0x80 (data memory)
4256         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
4257           operands (genAddLit expects the iCode's operands to swapped as
4258           well), fixed leftover bytes (crashed for short left operands)
4259         * (pic16_genMinusDec): performance improvements, removed false
4260           PIC14 emitSKPNCs
4261         * (pic16_genMinus): fixed to cope with differently sized operands
4262         * src/pic16/glue.c (pic16_glue): added new banksel optimization
4263           for --obanksel > 1
4264         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
4265         * src/pic16/graph.[ch]: implementation of directed graphs, used by
4266           new banksel optimization
4267         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
4268           analysis for temporary registers (segfaults...)
4269         * src/pic16/peeph.def: added rule
4270
4271 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
4272
4273         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
4274         which converts a float number to its ASCII representation
4275         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
4276         functions to convert the fractional and integer part of a float to ASCII,
4277         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
4278         realloc.c): added _MALLOC_SPEC to explicit place variables in data
4279         ram
4280         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
4281         _STATMEM macros,
4282         * device/include/pic16/adc.h: added GPL info,
4283         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
4284         a pCodeOp as tested operand,
4285         * (genNearPointerGet): optimized bit testing, does not use
4286         intermediate register for bit value, test directly instead with
4287         BTFSS, BTFSC, works only for single bits,
4288         * (genpic16Code): dump the name of the iCode in the asm,
4289         * src/pic16/ralloc.c (decodeOp): removed static declaration and
4290         renamed to pic16_decodeOp,
4291         * (serialRegAssign): do not allocate a temporary register for iCode
4292         sequences that test a single bit for 1/0
4293
4294 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
4295
4296         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
4297         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
4298         access stack and frame pointers. They are initially assigned to
4299         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
4300         accessing SFRs. Updated all occurences of modification of stack or
4301         frame pointer in gen.c and pcode.c,
4302         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
4303         assigning of a literal value to pointers,
4304         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
4305         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
4306         selected
4307
4308 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4309
4310         * doc/sdccman.lyx: update documentation about stack pragma, added
4311         some info for stack memory models
4312
4313 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4314
4315         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
4316
4317 2005-01-08 Raphael Neider <rneider AT web.de>
4318
4319         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
4320           udata sections to fix bug #1097823
4321
4322 2005-01-05 Raphael Neider <rneider AT web.de>
4323
4324         * src/pic16/gen.c (genGenericShift): added handling of differently
4325           sized left operand and result
4326
4327 2005-01-04 Raphael Neider <rneider AT web.de>
4328
4329         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
4330         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
4331           to hold the condition bit)
4332         * added new version of genCmp (old code available via #define)
4333         * added new version of genShiftLeft/genShiftRight in a generic
4334           way, now supports shifting by negative values
4335         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
4336           shiftCount (expected by genGenericShift)
4337         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
4338         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
4339           dump
4340         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
4341           is an invalid literal too...)
4342
4343 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
4344
4345         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
4346         from Raphael Neider,
4347         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
4348         for 8-bit literals. This fixes some literal operands which are sign
4349         extended to 16-bits ints when instruction needs only 8-bits.
4350
4351 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
4352
4353         * device/lib/logf.c: added mcs51 assembly version
4354         * device/lib/expf.c: added mcs51 assembly version
4355         * device/lib/_logexpf.c: new shared asm code for expf and logf
4356         * device/include/math.h: add defines for assembly math library
4357         * device/lib/Makefile.in: build new _logexpf.c
4358         * device/lib/libfloat.lib: use new _logexpf.c
4359
4360 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4361
4362         * src/pic/device.c
4363         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4364           device types which have less than 0x7f registers.
4365
4366 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4367
4368         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4369
4370 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4371
4372         * device/lib/printf_fast.c: only build on supported arch.
4373         * device/lib/printf_tiny.c: only build on supported arch.
4374         * device/lib/printf_fast_f.c: only build if asm float lib
4375         * device/lib/_fsget1arg.c: only build if asm float lib
4376         * device/lib/_fsget2args.c: only build if asm float lib
4377         * device/lib/_fsnormalize.c: only build if asm float lib
4378         * device/lib/_fsreturnval.c: only build if asm float lib
4379         * device/lib/_fsrshift.c: only build if asm float lib
4380         * device/lib/_fsswapargs.c: only build if asm float lib
4381         * device/include/stdio.h: don't provide print_fast,
4382           print_fast_f, print_tiny prototypes if --xstack used
4383
4384 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4385
4386         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4387         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4388           to the SOURCES
4389
4390 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4391
4392         * device/lib/printf_fast_f.c: same as printf_fast, but
4393           with floating point enabled
4394         * device/lib/printf_fast.c: minor tweaks
4395         * device/include/stdio.h: add printf_fast_f
4396
4397 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4398
4399         * src/SDCCmain.c: make --float-reent default for mcs51
4400         * device/lib/_fsadd.c: added mcs51 assembly version
4401         * device/lib/_fssub.c: added mcs51 assembly version
4402         * device/lib/_fsmul.c: added mcs51 assembly version
4403         * device/lib/_fsdiv.c: added mcs51 assembly version
4404         * device/lib/_fseq.c: added mcs51 assembly version
4405         * device/lib/_fsneq.c: added mcs51 assembly version
4406         * device/lib/_fsgt.c: added mcs51 assembly version
4407         * device/lib/_fslt.c: added mcs51 assembly version
4408         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4409         * device/lib/Makefile.in: add _fscmp to build
4410         * device/lib/libfloat.lib: add _fscmp to build
4411
4412 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4413
4414         * device/lib/_fs2slong.c: added mcs51 assembly version
4415         * device/lib/_fs2sint.c: added mcs51 assembly version
4416         * device/lib/_fs2schar.c: added mcs51 assembly version
4417         * device/lib/_fs2ulong.c: added mcs51 assembly version
4418         * device/lib/_fs2uint.c: added mcs51 assembly version
4419         * device/lib/_fs2uchar.c: added mcs51 assembly version
4420         * device/lib/_slong2fs.c: added mcs51 assembly version
4421         * device/lib/_sint2fs.c: added mcs51 assembly version
4422         * device/lib/_schar2fs.c: added mcs51 assembly version
4423         * device/lib/_ulong2fs.c: added mcs51 assembly version
4424         * device/lib/_uint2fs.c: added mcs51 assembly version
4425         * device/lib/_uchar2fs.c: added mcs51 assembly version
4426         * device/include/float.h: added #define to select asm vs c
4427
4428 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4429
4430         * device/lib/printf_fast.c: improvements to float output
4431         * device/include/float.h: add defines for assembly float library
4432         * device/lib/_fsget1arg.c: receive 1 float arg
4433         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4434         * device/lib/_fsnormalize.c: normalize a float
4435         * device/lib/_fsreturnval.c: return float, various helper routines
4436         * device/lib/_fsrshift.c: right shift a float's mantissa
4437         * device/lib/_fsswapargs.c: swap 2 floats
4438         * device/lib/Makefile.in: build these 6 new files for mcs51
4439         * device/lib/libfloat.lib: add these 6 files to the library
4440
4441 2004-12-26 Borut Razem <borut.razem AT siol.net>
4442
4443         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4444           built by gcc 3.4.2
4445
4446 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4447
4448         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4449           and fully reentrant and register bank neutral.
4450         * device/lib/printf_fast.c: added float (not enabled by default),
4451           added compact/slower integer (also not enabled by default),
4452           improved size/speed of fast integer code, other minor changes
4453         * device/include/stdio.h, device/lib/Makefile.in,
4454           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4455
4456 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4457
4458         * src/pic16/pcode.c: declaring variables other than at the start of a
4459           block is not supported in C by VC6.
4460
4461 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4462
4463         * applied a previous patch from Raphael Neider that wasn't included
4464         in the previous commits, which fixes infinite loops within jumptable
4465         improvements,
4466         * made some fixes that previous patches introduced
4467
4468 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4469
4470         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4471         that fixes an issue with AOP_PCODE asmop's offset,
4472         * (pic16_popCopyReg): update instance field too,
4473         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4474         function of pic port,
4475         * (genCmp, genAnd, genAssign),
4476         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4477
4478 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4479
4480         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4481         variables initial values to idata section,
4482         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4483         variables in some functions. This utilizes parmBytes field of iCode
4484         structure to hold the offset of the variable in stack. (might be
4485         able to use the stack field too?)
4486         * applied patch from Raphael Neider # ### , # ###
4487         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4488         variable initial values in idata section,
4489         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4490         for static variables with initial value
4491         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4492         applied fix in while loop from Raphael Neider.
4493
4494 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4495
4496         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4497         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4498         * src/ds390/ralloc.c (serialRegAssign): spill bits
4499         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4500         * support/Util/SDCCerr.c,
4501         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4502         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4503         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4504
4505 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4506
4507         * device/include/sdcc-lib.h: inserted LGPL, added includes
4508           asm/ds390/features.h and asm/mcs51/features.h
4509         * device/include/asm/default/features.h,
4510         * device/include/asm/gbz80/features.h,
4511         * device/include/asm/z80/features.h: added empty _AUTOMEM
4512           and _STATMEM
4513         * device/include/asm/ds390/features.h,
4514         * device/include/asm/mcs51/features.h: added files with defines for
4515           _AUTOMEM and _STATMEM indicating automatic and static storage class
4516         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4517         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4518         * src/SDCCicode.c (geniCodeCast),
4519         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4520         * src/SDCCloop.c (loopInduction): removed unused variable lr
4521         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4522           to convertToFcall to include char modulo (RFE 1065037), added check
4523           if left operand is unsigned and use abs of literal value
4524         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4525           as it doesn't work after conversion from peephole.def to peephole.rul
4526         * src/mcs51/gen.c (toBoolean): added check for size,
4527           (genModOneByte): optimized code for signed char modulo a literal
4528           power of 2 (thanks to Hubert Sack),
4529           (genRRC): removed unnecessary "clr c",
4530           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4531         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4532           jump optimization,
4533           swapped rules 256.c and 256.d,
4534           extended 256.d by using new multiple checks (thanks Erik),
4535           added rules 256.e and 256.f,
4536           updated rule 261.a and 261.b to new generated code
4537         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4538
4539 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4540
4541         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4542           induction related bugs, including first part of bug #1074377
4543
4544 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4545
4546         * applied patch from bug-report #1076292,
4547         * applied patches for genAnd and Goto-optimizations for Raphael
4548         Neider,
4549         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4550         dump a less iCode information,
4551         * src/pic16/device.h (pic16_options_t): added field debgen,
4552         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4553         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4554         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4555         puclic,
4556         * (various functions): added macros FENTRY and FENTRY2 to functions,
4557         to emit function prologue,
4558         * (various functions): fixed indentation,
4559         * (genNearPointerGet): fixed loading of FSR0,
4560         * (genPackBits): applied patch from Raphael Neider to fix updating
4561         of FSR0 and touching only the modified bits,
4562         * src/pic16/genarith.c (various functions): added macros FENTRY to
4563         emit function prologue in comments,
4564         * src/pic16/pcode.h: added functions debugf2, debugf3,
4565         * src/pic16/ralloc.c: partial fix for packForPush caused
4566         segmentation fault,
4567
4568 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4569
4570         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4571           <stsp AT users.sourceforge.net> with reversed byte order
4572         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4573
4574 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4575
4576         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4577           bug #1074377
4578         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4579         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4580
4581 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4582
4583         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4584
4585 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4586
4587         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4588           conditions,
4589           (setFromConditionArgs): friendly operand parser for peephole rules,
4590           (operandBaseName, operandsNotRelated): new peephole condition
4591           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4592           architecture specific register naming into account, handles n-way
4593           comparisons, and supports quoted literals
4594         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4595
4596 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4597
4598         * src/mcs51/peeph.def: fixed bug #1076940
4599
4600 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4601
4602         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4603
4604 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4605
4606         Adding support for replacing ljmps with sjmps in jumptables
4607         generated for switch statements. For now you need to set the
4608         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4609         Now 4 algorithms for mcs51 jumptable generation are used:
4610         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4611         addresses loaded pc-relative for up to 112 cases and stack-pushing
4612         target addresses loaded with offset from dptr for up to 256 cases.
4613
4614         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4615         * src/mcs51/main.c: adapted constants for switch table generation
4616         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4617
4618 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4619
4620         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4621         * support/regression/tests/bug1057979.c: added test for bug 1073386
4622
4623 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4624
4625         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4626         compilers
4627
4628 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4629
4630         * src/pic16/device.h,
4631         * src/pic16/genarith.c,
4632         * src/pic16/glue.c,
4633         * src/pic16/main.c,
4634         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4635
4636 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4637
4638         Large cummulative patch for pic16 port.
4639         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4640         to call when a stack overflow occurs,
4641         * (malloc.h): added CVS Id tag,
4642         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4643         variable,
4644         * added libc directory. The current version of LibC contains string
4645         functions, ctype functions and macros and some functions of the
4646         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4647         be extensively tested in the future. Standard disclaimer here.
4648         Library is not automatically build yet. But one can build it by
4649         invoking 'make' inside the libc directory.
4650         * added ADC library under libio. Preliminary version yet.
4651
4652         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4653         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4654         aopForRemat() now and not by pic16_aopOp(),
4655         * (pic16_popGetTempReg): removed warning messgae when allocating
4656         temporary registers, its a buggy feature and will be removed,
4657         * (pic16_popGet): set register instance field in AOP_CRY,
4658         * (pic16_outBitC): fixed for results in size greater than 1,
4659         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4660         * (pic16_storeForReturn): optimized return of 0,
4661         * (genCmp): experimental code for new genCmp which uses PIC18's
4662         special compare&skip instructions. Initial tests fail some times
4663         with variables grater than 1 byte in size, so new code is disabled,
4664         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4665         a single bit,
4666         * (genCast): began a fix to optimize the casting of a bit to another
4667         bit, now assigning a bitfield to another bitfield will fail, sorry,
4668         * src/pic16/main.c: disabled the use of lr-support feature,
4669         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4670         * added some function prototypes, added function _debugf prototype,
4671         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4672         bits with offset (case PO_GPR_BIT),
4673         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4674         command line,
4675         * (isBankInstruction): modified to return 0 for no banking instruction,
4676         and 1 for banking instruction,
4677         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4678         caused stop processing pCodes after a inline assembly block,
4679         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4680         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4681         registers when it shouldn't,
4682         * src/pic16/ralloc.c (allocReg): add preliminary support for
4683         supporting a limited set of temporary registers,
4684
4685 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4686
4687         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4688           genDataPointerSet): ensure assignments always copy in MSB to LSB
4689           order,
4690           (loadRegFromAop): recognize CLRH optimization,
4691           (genFunction): optimize RECEIVE iCodes in reentrant functions
4692
4693 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4694
4695         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4696           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4697           selected.
4698         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4699         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4700           contiguous with data
4701
4702 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4703
4704         * device/lib/_gptrget.c (_gptrget),
4705         * device/lib/_gptrgetc.c (_gptrgetc),
4706         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4707           instead of sjmp to ret
4708         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4709           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4710
4711 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4712
4713         * .version: bumped version to 2.4.7
4714         * device/lib/_gptrget.c (_gptrget): is now _naked
4715         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4716         * device/lib/_gptrput.c (_gptrput): is now _naked
4717         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4718           (createFunction): fixed xstack
4719         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4720         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4721           or bit either,
4722           (geniCodeCritical): store original interrupt state in an iTemp bit
4723           var unless stack-auto
4724         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4725         * src/SDCCmain.c (setIncludePath): added include/target to search path
4726         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4727         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4728           prototype,
4729           (processFuncArgs): put bit vars in bit area
4730         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4731           unsaveRBank): fixed xstack,
4732           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4733           (genFunction, genEndFunction): fixed xstack,
4734           (genAssign): optimization don't walk backwards through mem
4735         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4736         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4737         * support/regression/Makefile: also make library (for stack-auto) when
4738           making "all" and added "test-mcs51-xstack-auto"
4739         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4740         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4741         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4742         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4743         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4744           make-library by MAKE_LIBRARY
4745         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4746           regression tests for xstack
4747         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4748         * support/regression/tests/critical.c: test for critical on mcs51
4749
4750 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4751
4752         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4753           built version of sdcc instead of installed version
4754
4755 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4756
4757         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4758         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4759           vprintf.c now
4760         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4761         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4762           WARNING: remove device/lib/build/z80/printf.o by hand when
4763           updating from previous build!
4764         * device/lib/z80/printf.c: updated comment
4765         * support/regression/tests/bug1057979.c: test all ports now
4766         * support/regression/tests/bug1065458.c: file added
4767
4768 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4769
4770         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4771           *_start and *_end symbols for static functions
4772
4773 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4774
4775         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4776           and search crt0.o in all library paths,
4777           (setIncludePath): proper handling of --nostdinc,
4778           (setLibPath): proper handling of --nostdlib
4779         * support/regression/Makefile,
4780         * support/regression/ports/ds390/spec.mk,
4781         * support/regression/ports/gbz80/spec.mk,
4782         * support/regression/ports/hc08/spec.mk,
4783         * support/regression/ports/mcs51/spec.mk,
4784         * support/regression/ports/mcs51-large/spec.mk,
4785         * support/regression/ports/mcs51-stack-auto/spec.mk,
4786         * support/regression/ports/z80/spec.mk: use include and lib files from
4787           built version of sdcc instead of installed version
4788         * doc/sdccman.lyx: fixed typo in --nostdinc
4789
4790 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4791
4792         * src/pic/pcode.c,
4793         * src/pic/device.c,
4794         * src/pic/ralloc.c,
4795         * src/pic/gen.c : added support to generate code for struct bit fields.
4796
4797 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4798
4799         * as/xa51/xa_version.h,
4800         * device/include/errno.h,
4801         * device/include/regc515c.h,
4802         * device/lib/_itoa.c,
4803         * device/lib/_ltoa.c,
4804         * device/lib/ser_ir_cts_rts.c,
4805         * sim/ucsim/xa.src/glob.cc,
4806         * sim/ucsim/xa.src/inst_gen.cc,
4807         * sim/ucsim/xa.src/xa_bit.cc,
4808         * sim/ucsim/xa.src/xa_sfr.cc,
4809         * sim/ucsim/z80.src/inst_dd.cc,
4810         * sim/ucsim/z80.src/inst_fdcb.cc,
4811         * support/scripts/keil2sdcc.pl,
4812         * src/pic16/pic16.dsp,
4813         * src/pic16/pic16a.dsp: corrected cvs line endings
4814         * device/lib/printf_large.c: fixed bug 1057979
4815         * src/pic16/gen.c: fixed non-C standard code
4816         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4817         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4818         * support/regression/ports/mcs51/support.c: reload T1 asap
4819         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4820           pdata use and clear idata startup behaviour
4821         * support/regression/tests/bug1057979.c: added
4822
4823 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4824
4825         * device/examples/ds390/ow390/ad26.h,
4826         * device/examples/ds390/ow390/cnt1d.h,
4827         * device/examples/ds390/ow390/crcutil.c,
4828         * device/examples/ds390/ow390/ownet.h,
4829         * device/examples/ds390/ow390/owsesu.c,
4830         * device/examples/ds390/ow390/swt12.h,
4831         * device/examples/ds390/ow390/swtoper.c,
4832         * device/examples/ds390/ow390/temp10.h,
4833         * device/examples/ds390/ow390/thermodl.c,
4834         * device/examples/ds390/tinitalk/tinitalk.dsp,
4835         * device/examples/ds390/tinitalk/tinitalk.dsw,
4836         * device/examples/mcs51/clock/hw.h,
4837         * device/examples/mcs51/simple2/go.bat,
4838         * device/examples/serialcomm/windows/serial.h,
4839         * device/examples/xa51/dummy.c,
4840         * device/examples/xa51/hello.c,
4841         * device/include/80c51xa.h,
4842         * device/include/at89x051.h: corrected cvs line endings
4843
4844 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4845
4846         * src/pic16/main.c (options): added command line --gstack, to trace
4847         stack over/under flows,
4848         * added pragma 'wparam' to allow passing first byte of function
4849         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4850         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4851         call to __gstack_test function and sets up the symbol as extern,
4852         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4853         * popaop): added call to pic16_testStackOverflow,
4854         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4855         wparamList list,
4856         * (genCall, genPcall): now all parameters are passed via stack
4857         except in functions that are pass to wparam pragma in which WREG is
4858         used too,
4859         * (genPcall): REENTRANT flag is checked to see if variable prototype
4860         contains reentrant keyword, don't call a non-reentrant function, via
4861         a reentrant function pointer or vice versa, functions are never
4862         passed via WREG,
4863         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4864         D.Winkler,
4865         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4866         SIGSEGV when accessing a NULL register stucture,
4867         * (pic16_printGPointerType): modified to handle UPPER modifier for
4868         function initializers, changed prototype of function to simpler one,
4869         * (pic16_printIvalFuncPtr): check to see if function is already
4870         added in externs list,
4871         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4872         optimized a move from W to SFR with a move to the same register
4873         later after a CALL,
4874         * device/lib/pic16/debug: NEW directory, contains debug features
4875         which are enabled when linking with libdebug.lib, currently command
4876         line option --gstack enables stack pointer tracing for over/under
4877         flow, corresponding sources are in debug/gstack
4878
4879 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4880
4881         * doc/sdccman.lyx: updated SDCC version,
4882         * (PIC16 port): update list of command line options,
4883         * src/pic16/device.h (structure pic16_options_t): added field gstack
4884         to enable stack overflow tracing on push/pops,
4885         * src/pic16/device.c (statistics structure): added statistics
4886         structure,
4887         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4888         pic16_dump_int_registers): increase statistics counters for each
4889         * variable which is encountered
4890         * (pic16_dump_usection): emit each .udata variable to its own udata
4891         section,
4892         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4893         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4894         parameters via stack, otherwise use old scheme,
4895         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4896         assembler output file,
4897         * src/pic16/main.c: added command line options --gstack to enable
4898         push/pop tracing for stack overflow,
4899         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4900         instructions): added size of each instruction,
4901         * (pic16_countInstruction): estimate size of instructions in
4902         the_pFile list, inline assembly blocks are not counted,
4903         * (pic16_FixRegisterBanking): trace previous register usage, when
4904         banksel optimizations is greater than 0, don't emit a redudant
4905         banksel directive,
4906
4907 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4908
4909         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4910         * src/pic16/ralloc.c : applied same fix for pic16.
4911         * src/pic/gen.c : tidied it up a little.
4912
4913 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4914
4915         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4916         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4917
4918 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4919
4920         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4921
4922 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4923
4924         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4925         non-reentrant function __modsint in the interrupt function (thus
4926         corrupting math operations during serial I/O)
4927         * device/lib/ser_ir.c: as above, changed buffersize
4928         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4929         256.c,d for zeroing
4930         * doc/Makefile: added option -t for rsync
4931
4932 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4933
4934         * src/SDCCast.h (struct ast),
4935         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4936
4937 2004-10-20 Borut Razem <borut.razem AT siol.net>
4938
4939         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4940         package
4941
4942 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4943
4944         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4945         makefile targets,
4946         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4947         support functions to replace long sequences of MOVFF's from access
4948         bank registers to stack and vice versa,
4949         * src/pic16/device.h: added new field opt_flags, where optimization
4950         flags can be set to enable certain features,
4951         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4952         * pBlock, (genFunction, genEndFunction): surroung loop for
4953         saving/loading used registers in stack with PC_INFO pCodes,
4954         INF_LREGS. Code in between can then be optimized by pCode optimizer
4955         to support function calls,
4956         * (genDataPointerSet): fixed bug which loaded float fields in
4957         structures with corrupt data,
4958         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4959         in a standard way debug info on stderr. Feature used for developing
4960         and debugging only,
4961         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4962         obsolete chunks of code,
4963         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4964         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4965         * pic16/src/pcode.c (pic16_newpCodeInfo,
4966         * (pic16_newpCodeOpLocalRegs),
4967         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4968         feature,
4969         * (pic16_pCodeConstString): printing of the initial value of a
4970         symbol as a comment is inhibited since parsing was already done by
4971         copyStr and output is corrupt,
4972         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4973
4974 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4975
4976         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4977
4978 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4979
4980         * as/mcs51/lkarea.c: removed old K&R style,
4981           (lnksect): changed check on boundary error,
4982           (lnksect2): changed check on boundary error,
4983           (lnksect2): extend XSTK to end of page if size = 1
4984         * as/mcs51/lkmain.c: removed old K&R style,
4985           (Areas51): create l_IRAM symbol
4986         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4987         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4988           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4989         * device/lib/_mullong.c: added version to be compiled with xstack
4990         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4991         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4992         * device/lib/mcs51/crtxstack.asm: fixed comment
4993         * src/SDCCglue.c: maxInterrupts defaults to 0,
4994           (emitMaps): added pdata,
4995           (createInterruptVect): (re)moved default,
4996           (glue): added pdata,
4997           (glue): moved __start__xstack to XSTK with default size 1
4998         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4999           and options.float_rent when options.stackAuto is set,
5000           (linkEdit): only write XDATA_NAME if provided on command line
5001         * src/SDCCmem.h,
5002         * src/SDCCmem.c: added pdata
5003         * src/port.h: added pdata_name to PORT
5004         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
5005           (saveRegisters, unsaveRegisters): removed usage of B,
5006           (genMinus): fixed accumulator clash,
5007           (genJumpTab): added comment, this needs another look
5008         * src/mcs51/gen.c: added check for "B in use" paranoia,
5009           added pushB() and popB()
5010         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
5011           chance
5012         * src/avr/main.c,
5013         * src/ds390/main.c,
5014         * src/hc08/main.c,
5015         * src/mcs51/main.c,
5016         * src/pic/main.c,
5017         * src/pic16/main.c,
5018         * src/xa51/main.c,
5019         * src/z80/main.c: (reset_regparms) made void parameter explicit and
5020           added PSEG (PAG,XDATA) or NULL to port specifier
5021         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
5022         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
5023           (_mcs51_genInitStartup): removed __start__xstack equ,
5024           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
5025         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
5026         * src/z80/gen.c (_rleAppend): fixed warnings
5027         * support/regression/tests/zeropad.c: added pdata test
5028         * .version: bumped to 2.4.6
5029
5030 2004-10-17 Borut Razem <borut.razem AT siol.net>
5031
5032         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
5033         as a part of nightly build
5034
5035 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
5036
5037         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
5038         WREG holds the first byte function parameters,
5039         * (aopForSym): take special case for symbols which are in FARSPACE
5040         but in CODESPACE too,
5041         * (assignResultValue): modified to take into account _G.useWreg,
5042         * (genCall): don't use wreg for parameter passing when function is
5043         declared as reentrant, too, added optimization INCF to stack
5044         pointer when stack parameter count is 1,
5045         * (genFunction, genEndFunction): refurnished and fixed to not using
5046         wreg for passing parameters when function has varargs or is
5047         reentrant, fixed bug with symbol name compare for generating
5048         functions in absolute address,
5049         * (pic16_storeForReturn): refurnished,
5050         * (genCmp): began writing a new version of the function, not ready
5051         yet, therefore it is disabled,
5052         * (genAssign): do not read code memory when assigning a function to
5053         a pointer function,
5054         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
5055         array of characters, not pointer,
5056         * (pic16initialComments): in debug mode emit an .ident directive for
5057         the assembler,
5058         * (_process_pragma): emit a new warning type (internal to pic16)
5059         when setting stack to default length, emit a similar warning when
5060         placing a function at absolute address and address is not word aligned
5061         * (_pic16_parseOptions): added 'return TRUE' statement,
5062         * (_pic16_linkEdit): if compiling a source, then add the source's
5063         file object, first in the list of objects to link,
5064
5065 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
5066
5067         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
5068         * src/pic/main.c : removed VC warning.
5069         * src/pic/gen.c : changed comment.
5070
5071 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
5072
5073         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
5074         reference to a deprecated symbol _GPTRREG was causing failure to
5075         link. Thanks G. M. Gallant for the info.
5076
5077 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
5078
5079         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
5080         comments for Bugs item #954788.
5081
5082 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
5083
5084         * src/pic16/device.c (pic16_dump_gsection,
5085         * pic16_groupRegistersInSection): handle symbols declared to be in
5086         access bank differently,
5087         * src/pic16/gen.c (struct _G): added field resDirect,
5088         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
5089         send values read from stack directly to result and don't allocate
5090         temporary values,
5091         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
5092         same registers,
5093         * (pic16_sameRegsOfs): NEW,
5094         * (freeAsmop): if _G.resDirect is set then do not mark registers as
5095         free because they were not allocated from temporary pool,
5096         * pic16_popRegFromString): workaround to fix a problem with
5097         allocating variables twice or never,
5098         * (genGenPointerGet): using PRODL instead of FSR0H,
5099         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
5100         instead of FSR0H,
5101         * (genAssign): take advantage of the _G.resDirect flag,
5102         * (genCast): around line 11844, use mov2f instead of directly
5103         MOVFF'ing between operands to account for literal values,
5104         * src/pic16/genutils.c: some new debug functions for gpsim have been
5105         added,
5106         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
5107         float with integer part only,
5108         * src/pic16/main.c (_process_pragma): handle pragma udata access to
5109         place variables in access bank
5110         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
5111         updated sources to reflect recent changes in gen.c
5112
5113 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
5114
5115         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
5116         sources that searched for headers in installation path, now the
5117         device/include/pic16 is used,
5118         * src/pic16/glue.c (pic16glue),
5119         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
5120         .line directives if not in debug mode, this suppresses assembler's
5121         warnings for ignored directives
5122
5123 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
5124
5125         * src/port.h: made reset_regparms prototype void parameter explicit.
5126         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
5127         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
5128         * doc/sdccman.lyx: documented warning disabling and how to use
5129           printf_large to make it print floats.
5130         * device/include/stdbool.h: NEW
5131         * device/lib/_atof.c,
5132         * device/lib/_divuint.c,
5133         * device/lib/_divulong.c,
5134         * device/lib/expf.c,
5135         * device/lib/printf_large.c,
5136         * device/lib/sincosf.c,
5137         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
5138         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
5139           a completely reentrant lib.
5140
5141 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
5142
5143         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
5144         * device/include/pic16/stdio.h: fixed bug with colon
5145
5146 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
5147
5148         * device/include/pic16/stdio.h,
5149         * device/include/pic16/stdlib.h,
5150         * device/include/pic16/math.h: NEW
5151         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
5152         declared as _naked to reduce overhead
5153         * device/lib/Makefile.in (target port-specific-objects-pic16):
5154         changed * to *.* so to ignore the CVS directory,
5155         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
5156         stacked variables back in stack,
5157         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
5158         corruption
5159
5160 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
5161
5162         * .version: bumped version number to 2.4.5
5163         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
5164         * support/Util/SDCCerr.c (messages structure): added entry for
5165         W_POSSBUG2
5166
5167         Large cumulative patch for pic16 port and libraries.
5168         * device/include/pic16/sdcc-lib.h,
5169         * device/include/pic16/stdarg.h,
5170         * device/include/asm/pic16/features.h,
5171         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
5172         * device/include/pic16/float.h: changes reentrant keyword with
5173         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
5174         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
5175         updated target build-libraries to include objects from gptr,
5176         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
5177         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
5178         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
5179         all function headings,
5180         * src/SDCCmain.c: added global parameter userIncDirsSet,
5181         * (parseCmdLine): when option -I is encountered add directory to
5182         userIncDirsSet too,
5183         * src/version.awk: added space between control and long,
5184         * src/pic16/NOTES: added some notes for the port,
5185         * src/pic16/gen.c: added prototype for mov2fp function,
5186         * (fReturnpic16[]): properly named return value registers,
5187         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
5188         * (aopForSym): added code to handle symbols with onStack flag set,
5189         symbols onStack are allocated PTRSIZE bytes,
5190         * (aopFreeAsmop): handles special case where asmops are stack objects,
5191         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
5192         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
5193         added argument lock to trace flaws in allocating temporary registers
5194         when developing port,
5195         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
5196         * (pic16_popRegFromString): reenabled allocating a direct register
5197         from string,
5198         * (assignResultValue): various beautifications,
5199         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
5200         referenced function argument,
5201         * (genIpush): reenabled to allow stacked arguments, handles only
5202         ic->parmPush iCodes,
5203         * (genCall, genPcall): major changes to allow for variable argument
5204         functions, fixed a bug with falsely restoring stack pointer after
5205         returning from call,
5206         * (genFunction): pending code for critical function,
5207         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
5208         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
5209         * (genNearPointerGet): fixed bug with indirect reading, was always
5210         reading from INDF0
5211         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
5212         pointers,
5213         * (genAddrOf): rewrote code to take address of a stacked function parameter
5214         * (genCast): fixed casting to generic pointer type,
5215         * src/pic16/gen.h: added AOP_STA,
5216         * (struct asmop): added field stk,
5217         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
5218         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
5219         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
5220         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
5221         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
5222         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
5223         generic pointers,
5224         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
5225         and library paths,
5226         * (pic16_port structure): generic pointer size is set to 3,
5227         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
5228         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
5229         compiler warning,
5230         * src/pic16/ralloc.c (allocReg): prevent allocating register when
5231         operand is an iTemp,
5232
5233 2004-09-24 Martin Helmling <mh AT octo-soft.de>
5234
5235         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
5236         * debugger/mcs51/simi.c: addapt new syntax of s51
5237
5238 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
5239
5240         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
5241         * src/pic16/pcode.c: commented out some calls to free() in order to
5242         fix bug #989576,
5243
5244 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5245
5246         * src/SDCCicode.h,
5247         * src/SDCCicode.c (isiCodeInFunctionCall),
5248         * src/avr/ralloc.c (selectSpil),
5249         * src/pic/ralloc.c (selectSpil),
5250         * src/pic16/ralloc.c (selectSpil),
5251         * src/ds390/ralloc.c (selectSpil),
5252         * src/hc08/ralloc.c (selectSpil),
5253         * src/xa51/ralloc.c (selectSpil),
5254         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
5255         stack in the middle of a function call sequence (fixes bug #1020268)
5256         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
5257         costs associated with the minimum switch case.
5258
5259 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5260
5261         * src/SDCC.lex: fixed bug #1030549
5262
5263 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5264
5265         * src/SDCCcse.h (struct cseDef),
5266         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
5267         over a function call if the CSE is derived from a symbol whose
5268         address has been taken (fixes bug #1029883)
5269         * support/regression/tests/bug-1029883: a new regression test for
5270         this bug
5271
5272 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5273
5274         * src/hc08/gen.c (emitinline): fixed bug #1029778
5275         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
5276         to a cast object is no longer a syntax error ("fixes" bug #1030006,
5277         and starts toward RFE #905167)
5278
5279 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
5280
5281         * src/pic16/gen.c (mov2f): New function to move an operand to
5282         another without considering if it is a literal or a register,
5283         * (pic16_sameRegs): don't check if they are both AOP_REG,
5284         * (AccRsh): removed andmask=0 lines,
5285         * (genLeftShift): duplicated to be improved in future versions,
5286         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
5287         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
5288         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
5289         * (pic16initMnemonics): added initialization for POC_INFSNZW,
5290         * (insertBankSwitch): fixed inserting banksel directives algorithm
5291         for instructions that follow a skip instruction, this fixes a report
5292         for broken subtraction code generation,
5293         * src/pic16/ralloc.c (deassignLRs): do not free register if current
5294         iCode is a left op, just in case result and right share the same
5295         registers
5296
5297 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5298
5299         * src/hc08/main.c,
5300         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
5301         preservation of HX
5302         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
5303         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
5304         on 2004-09-12; it was buggy
5305
5306 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
5307
5308         * src/SDCCsymt.h: removed RESULT_CHECK
5309         * src/SDCCast.c,
5310         * src/SDCCglue.c,
5311         * src/SDCCval.c,
5312         * src/pic/glue.c,
5313         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
5314
5315 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
5316
5317         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
5318         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
5319         configuration values no more rejected by compiler, they are assigned
5320         to configuration registers with a warning message instead,
5321         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
5322         the for-loop so last conf register is emitted too,
5323         * (_pic16_initPaths): link library libsdcc.lib by default,
5324         * (_hasNativeMulFor): modified test for multiplication according to
5325         Raphael Neider's remarks. Integer multiplication is also done with
5326         support functions,
5327         * device/include/pic16/pic18fregs.h: corrected type error in while
5328         testing and including 18f6720 header file
5329
5330 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
5331
5332         * src/pic16/device.h (pic16_options): removed field use_crt,
5333         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
5334         until an optimization to handle single bits is added,
5335         * (pic16_loadFSR0): moved before genUnpackBits,
5336         * (genAnd): some white lines removed,
5337         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
5338         leave_reset flags in pic16_options when using crt modules,
5339
5340 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
5341
5342         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
5343           for bugs 898889 & 979599. Also used some safer print instructions.
5344
5345 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
5346
5347         * src/pic16/device.h (pic16_options_t): added field use_crt,
5348         crt_name, no_crt,
5349         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
5350         catch a probable future bug,
5351         * src/pic16/gen.c: aopIdx function commented out,
5352         * (genAssign): commented out old code which used aopIdx,
5353         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
5354         code, added if conditionals to take into account the --use-crt
5355         command line options,
5356         * src/pic16/main.c (pic16_optionsTable): added new command line
5357         options, --use-crt= and --no-crt,
5358         * (_pic16_linkEdit): now the proper crt object is added in the
5359         linker command line except than when --no-crt is specified,
5360         * src/pic16/pcode.c,
5361         * src/pic16/pcode.h: added some structures and functions for a new
5362         optimization scheme to compansate for instruction overhead between
5363         same iCodes, this scheme is currently under development and is not
5364         working in any way,
5365         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5366         to && operator,
5367         * device/lib/pic16/startup/crt0i.c,
5368         * device/lib/pic16/startup/crt0iz.c: added global char variable
5369         __uflags to force the generation of an idata section
5370
5371 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5372
5373         * doc/Makefile,
5374         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5375         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5376
5377 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5378
5379         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5380         Frieder) and clarified the default code optimization mode
5381
5382 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5383
5384         * src/SDCC.lex (doPragma, process_pragma),
5385         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5386         "opt_code_size", and "opt_code_balanced"
5387         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5388         regrouped options by category, added support for category headers
5389         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5390         and "--opt-code-size"
5391         * doc/sdccman.lyx: documented these new options and pragmas
5392         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5393         preference into account
5394
5395 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5396
5397         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5398           geniCodePreDec): Fixed bug 904237 by generating a warning
5399         * src/SDCCerr.h,
5400         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5401
5402 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5403
5404         * src/pic/device.c : When no max ram set validate full memory range.
5405         * src/pic/pcode.c,
5406         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5407
5408 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5409
5410         * device/lib/_gptrget.c,
5411         * device/lib/_gptrput.c: updated comment
5412         * device/lib/calloc.c,
5413         * device/lib/free.c,
5414         * device/lib/malloc.c,
5415         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5416         * src/SDCCcse.c (cseBBlock),
5417         * src/SDCCicode.c (printOperand, geniCodeArray),
5418         * src/SDCCicode.h (struct operand): fixed bug 868103
5419         * support/regression/tests/bug-868103.c: added
5420         * src/SDCCast.c (searchLitOp),
5421         * src/SDCCcse.h (struct cseDef),
5422         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5423         * src/SDCCicode.h (struct operand),
5424         * src/SDCCsymt.h (struct sym_link),
5425         * src/avr/gen.c (hasInc),
5426         * src/ds390/gen.c (hasInc),
5427         * src/hc08/gen.c (genPlusIncr, hasInc),
5428         * src/mcs51/gen.c (hasInc),
5429         * src/pic16/glue.c (pic16_printIvalChar),
5430         * src/pic16/ralloc.c (regWithIdx),
5431         * src/xa51/gen.c (hasInc) : removed warnings
5432         * src/SDCCast.c (createBlock): added comment ???
5433         * src/hc08/ralloc.c: updated comments
5434
5435 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5436
5437         * doc/sdccman.lyx: updated section on switch statements, added
5438         section about semaphore locking
5439         * doc/Makefile: added option -info for latex2html
5440         * device/lib/_gptrget.c,
5441         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5442
5443 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5444
5445         * src/pic/device.h,
5446         * src/pic/device.c,
5447         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5448          maxram is less than 0x100.
5449
5450 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5451
5452         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5453
5454 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5455
5456         * src/port.h,
5457         * src/mcs51/main.c,
5458         * src/ds390/main.c,
5459         * src/z80/main.c,
5460         * src/hc08/main.c,
5461         * src/pic/main.c,
5462         * src/pic16/main.c,
5463         * src/avr/main.c,
5464         * src/xa51/main.c
5465         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5466         a jump table is the best form for a switch statement, including
5467         automatic insertion of missing cases to make the case range
5468         continuous. Developed in collaboration with Frieder Ferlemann.
5469
5470 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5471
5472         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5473         accumulator result if it needs sign extension
5474
5475 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5476
5477         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5478
5479 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5480
5481         * device/lib/gbz80/printf.c,
5482         * device/lib/z80/printf.c: removed define for NULL
5483
5484 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5485
5486         * as/xa51/xa_link.c,
5487         * device/examples/ds390/ow390/ad26.c,
5488         * device/examples/ds390/ow390/cnt1d.c,
5489         * device/examples/ds390/ow390/counter.c,
5490         * device/examples/ds390/ow390/ds2480.h,
5491         * device/examples/ds390/ow390/ds2480ut.c,
5492         * device/examples/ds390/ow390/findtype.c,
5493         * device/examples/ds390/ow390/gethumd.c,
5494         * device/examples/ds390/ow390/owllu.c,
5495         * device/examples/ds390/ow390/ownetu.c,
5496         * device/examples/ds390/ow390/swt12.c,
5497         * device/examples/ds390/ow390/swtloop.c,
5498         * device/examples/ds390/ow390/temp.c,
5499         * device/examples/ds390/ow390/temp10.c,
5500         * device/examples/ds390/ow390/thermo21.c,
5501         * device/examples/ds390/ow390/tinilnk.c,
5502         * device/examples/ds390/ow390/tstfind.c,
5503         * device/examples/serialcomm/windows/serial.cpp,
5504         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5505         * device/include/reg51.h: fixed line endings for cvs
5506
5507 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5508
5509         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5510         packRegsForAccUse, packRegisters): new accumulator register
5511         packing algorithm
5512         * support/regression/ports/hc08/support.c (_putchar): suppress
5513         warning of unused variable
5514         * src/SDCCicode.c: added SWAP entry to codeTable
5515
5516 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5517
5518         * device/lib/sprintf.c: forgot to add this file before previous commit
5519
5520 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5521
5522         * src/pic16/gen.c (genPackBits): added operand right in function
5523         parameters, load result directly if p_type is POINTER (that is
5524         called by genNearPointerSet)
5525         * (genUnPackBits): added operand left in function parameters,
5526         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5527         FSR0 if accessing bitfields,
5528
5529 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5530
5531         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5532           _print_format; updated printf, sprintf, vsprintf
5533         * device/include/asm/default/features.h: corrected comment/define
5534         * device/lib/Makefile.in: added sprintf.c
5535         * device/lib/libsdcc.lib: added sprintf module
5536         * device/lib/printf_large.c,
5537         * device/lib/vprintf.c,
5538         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5539           into these 3 files
5540         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5541         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5542         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5543           hc08 test
5544         * support/regression/tests/zeropad.c: define idata as data for hc08
5545
5546 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5547
5548         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5549         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5550         labels are referenced at least once (even if a reference is not found)
5551         * src/hc08/gen.c (emitcode): set isComment flag for comments
5552         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5553         loads), rules 6a..6b (optimize jumps to return)
5554
5555 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5556
5557         * device/lib/acosf.c (acosf),
5558         * device/lib/asinf.c (asinf),
5559         * device/lib/atanf.c (atanf),
5560         * device/lib/ceilf.c (ceilf),
5561         * device/lib/cosf.c (cosf),
5562         * device/lib/coshf.c (coshf),
5563         * device/lib/cotf.c (cotf),
5564         * device/lib/fabsf.c (fabsf),
5565         * device/lib/floorf.c (floorf),
5566         * device/lib/log10f.c (log10f),
5567         * device/lib/logf.c (logf),
5568         * device/lib/sinf.c (sinf),
5569         * device/lib/sinhf.c (sinhf),
5570         * device/lib/sqrtf.c (sqrtf),
5571         * device/lib/tanf.c (tanf),
5572         * device/lib/tanhf.c (tanhf),
5573         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5574         replaced all instances of "reentrant" in the library functions
5575         defined in math.h with this macro.
5576         * support/regression/tests/float_trans.c: reenabled test for hc08
5577
5578 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5579
5580         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5581         erroneously deleted
5582
5583 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5584
5585         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5586         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5587         multi-byte volatile operands are used
5588         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5589         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5590         initialization to area GSINIT0 so that it would always precede
5591         any static initializers in GSINIT
5592         * support/regression/tests/zeropad.c: fixed idata define for hc08
5593         * support/regression/tests/bug-927659.c,
5594         * support/regression/tests/float_trans.c: disabled tests for hc08
5595         pending missing library routines
5596         * .version: increased version number to 2.4.4 - hc08 port now passes
5597         regression tests
5598
5599
5600 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5601
5602         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5603         * Makefile.common.in,
5604         * as/Makefile,
5605         * as/hc08/Makefile.in,
5606         * as/mcs51/Makefile.in,
5607         * as/z80/Makefile.in,
5608         * debugger/mcs51/Makefile.in,
5609         * device/include/Makefile.in,
5610         * device/lib/Makefile.in,
5611         * doc/Makefile,
5612         * link/Makefile,
5613         * link/z80/Makefile.in,
5614         * packihx/Makefile.in,
5615         * sim/ucsim/main_in.mk,
5616         * sim/ucsim/avr.src/Makefile.in,
5617         * sim/ucsim/doc/Makefile.in,
5618         * sim/ucsim/gui.src/serio.src/Makefile.in,
5619         * sim/ucsim/hc08.src/Makefile.in,
5620         * sim/ucsim/s51.src/Makefile.in,
5621         * sim/ucsim/xa.src/Makefile.in,
5622         * sim/ucsim/z80.src/Makefile.in,
5623         * src/Makefile.in,
5624         * support/cpp2/Makefile.in,
5625         * support/librarian/Makefile,
5626         * support/makebin/Makefile: added DESTDIR to the install path proposed
5627         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5628         * doc/sdccman.lyx: added DESTDIR documentation
5629
5630 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5631
5632         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5633         instruction for interrupt handlers, use fast returns when returning
5634         from high priority interrupts
5635
5636 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5637
5638         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5639         code generation
5640         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5641         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5642         bugs, ported much of Bernhard's code from mcs51
5643         * src/mcs51/gen.c (genSend),
5644         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5645         than one when calling a reentrant function
5646         * device/lib/_mullong.c: defined an alternate struct layout for big
5647         endian ports (hc08)
5648
5649 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5650
5651         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5652         test
5653
5654 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5655
5656         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5657         are sane and complete before asking the port its prefered parameter
5658         passing method (fixes bug #1017633)
5659         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5660         and _ret3
5661
5662 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5663
5664         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5665         problem in bitfields >= 8 bits.
5666
5667 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5668
5669         * src/SDCCsymt.c: undid changes that were not meant to be committed
5670
5671 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5672
5673         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5674
5675 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5676
5677         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5678           copied and wrong bit got inverted
5679
5680 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5681
5682         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5683         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5684         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5685         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5686         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5687         assignments to bitfields at known addresses
5688         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5689         reads from bitfields at known addresses
5690         * src/hc08/ralloc.c (packRegisters),
5691         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5692         genhc08Code): optimize pointer get values used as conditionals
5693         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5694         and branch
5695
5696 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5697
5698         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5699         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5700         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5701         as conditionals
5702
5703 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5704
5705         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5706
5707 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5708
5709         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5710         related problems
5711
5712 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5713
5714         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5715
5716 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5717
5718         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5719         mcs51 port
5720
5721 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5722
5723         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5724
5725 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5726
5727         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5728         cases use more compact code.
5729
5730 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5731
5732         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5733
5734 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5735
5736         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5737
5738 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5739
5740         * src/SDCCsymt.h,
5741         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5742         parameter of changePointer() from symbol* to sym_link*
5743         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5744         * src/SDCCsymt.c (compareType): void* type is castable to other
5745         pointers, but not necesarily an exact match.
5746         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5747         is no longer blindly treated as an exact match.
5748         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5749
5750 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5751
5752         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5753
5754 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5755
5756         * src/pic/gen.c,
5757         * src/pic/pcode.c,
5758         * src/pic/ralloc.h,
5759         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5760
5761 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5762
5763         * src/pic/device.c,
5764         * src/pic/device.h,
5765         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5766
5767 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5768
5769         * src/mcs51/gen.c (emitcode): fixed bug #992819
5770
5771 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5772
5773         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5774           there's no need to make it worse
5775
5776 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5777
5778         * src/mcs51/ralloc.c (deassignLR),
5779         * src/ds390/ralloc.c (deassignLR),
5780         * src/hc08/ralloc.c (deassignLR),
5781         * src/z80/ralloc.c (deassignLR),
5782         * src/pic/ralloc.c (deassignLR),
5783         * src/pic16/ralloc.c (deassignLR),
5784         * src/avr/ralloc.c (deassignLR),
5785         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5786         rlivePoint): fixed another part of bug #971834
5787
5788 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5789
5790         * src/z80/main.c: enabled "critical" keyword
5791         * src/z80/mappings.i,
5792         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5793         functions (fixes bug #979646)
5794         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5795
5796 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5797
5798         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5799           such as c:\mydir.
5800
5801 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5802
5803         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5804           doesn't disable too much optimizations
5805
5806 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5807
5808         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5809
5810 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5811
5812         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5813
5814 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5815
5816         * src/pic/gen.c tidied up tabs
5817         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5818         * src/pic/main.c tidied up tabs
5819         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5820         * src/pic/pcoderegs.c tidied up tabs
5821         * src/pic/ralloc.c tidied up tabs
5822
5823 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5824
5825         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5826         to S_FIXED for pic16 port and when symbol is not in level 0,
5827         allocate for S_REGISTER storage class and pic16 port, too,
5828         * src/pic16/device.h: prototype for checkSym,
5829         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5830         * (pic16_assignConfigWordValue): test the value and the mask to
5831         validate that the value is suitable for the configuration word,
5832         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5833         collect extern declared symbols, don't emit symbol twice, check
5834         first if symbol is in publics set first,
5835         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5836         * added command line '--fstack' which enables an experimental
5837         feature for stack access, too buggy to be used yet...
5838         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5839         * (pic16_allocDirReg): when register has storage class S_REGISTER
5840         allocate in pic16_dynAccessRegs,
5841         * device/include/pic16/pic18f????.h: modified configuration word
5842         naming convention, words started as CONFIG0H but should be CONFIG1H
5843
5844 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5845
5846         * device/include/mcs51reg.h: fixed bug 970993
5847
5848 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5849
5850         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5851         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5852         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5853         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5854         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5855         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5856           error/warning numbers,
5857           added function setWarningDisabled()
5858         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5859         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5860           _memcmp.c _memmove.c calloc.c realloc.c free.c
5861         * support/regression/tests/malloc.c: added tests for new functionality
5862         * support/regression/tests/zeropad.c: added tests for truncated initializers
5863           and initialized char arrays starting with '\x0'
5864         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5865
5866 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5867
5868         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5869
5870 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5871
5872         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5873         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5874         peephole 177.e. Thanks to anonymous
5875
5876 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5877
5878         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5879         function isn't used in the source but referenced as a
5880         variable initializer then declare it as extern in .asm file
5881
5882 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5883
5884         * .version: increased version number to 2.4.3
5885
5886         Adding version extension according to ChangeLog CVS revision
5887         * src/Makefile.in (target all): added dependency 'version.h'
5888         * (rule version.h): added rule to create version.h from ChangeLog,
5889         * (rule dep): added dependency version.h,
5890         * src/version.awk: AWK script to create version.h
5891         * src/SDCCdwarf2.c (dwWriteModule),
5892         * src/SDCCglue.c (initialComments),
5893         * src/SDCCmain.c (printVersionInfo): modified to write after
5894         version string the version extension number,
5895         * src/SDCCutil.c: included "version.h"
5896         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5897         number,
5898         * src/SDCCutil.h: added prototype for getBuildNumber
5899
5900         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5901         includeDirsSet, too,
5902         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5903         const char [] is found in function prototype...
5904
5905         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5906         moving to WREG with source is already in WREG,
5907         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5908         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5909         * (aopForSym): stack'ed symbols are partially supported, added
5910         if-clause to support symbols in FARSPACE,
5911         * (sameRegs): added test for AOP_ACC to see if registers are same,
5912         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5913         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5914         * (pic16_popRegFromString): will not allocate a new register if it
5915         doesn't find one by name, bug may have introduced...
5916         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5917         * (genIpush): revived to use pic16 port's stack,
5918         * (genAddrOf): added incomplete case for stack'ed operand,
5919         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5920         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5921         can handle multibyte operands,
5922         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5923         * (pic16initialComments): added message for MPLAB compatibility
5924         mode enabled,
5925         * src/pic16/main.h: prototype for pic16_mplab_comp,
5926         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5927         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5928         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5929         because of increased complexity of procedure,
5930         * (_process_pragma): stack pragma changed to format 'stack pos len',
5931         emit symbol '_stack_end' to conform with gplink,
5932         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5933         to search for register,
5934         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5935         PO_GPR_REGISTER,
5936         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5937         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5938         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5939         case for PO_GPR_REGISTER,
5940         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5941         dies, the new era is ahead !...
5942         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5943         pic16_dynInternalRegs,
5944         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5945         * (pic16_allocDirReg): minor optimizations and bug fixes,
5946         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5947
5948         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5949         load stack and frame pointer with address of 'stack_end' symbol
5950
5951 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5952
5953         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5954         without source code but only variable initializers
5955
5956 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5957
5958         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5959         external are not declared as extern to reduce overhead while linking
5960
5961 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5962
5963         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5964
5965 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5966
5967         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5968           Yee Keat for the patch
5969         * src/SDCCast.c (decorateType): fixed bug #979599
5970         * src/ds390/gen.h: removed local fReturnSizeDS390
5971         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5972         * src/ds390/gen.c (genAnd, genOr, genXor),
5973         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5974
5975 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5976
5977         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5978         add relFilesSet to $3, manipulate $2 to handle linking of object
5979         files without source files in command line,
5980         * device/include/pic16 (all headers): added ID location macros,
5981         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5982         entries for ID location bytes,
5983         * (pic16_assignIdByteValue): NEW,
5984         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5985         added field dumpcalltree to pic16_options_t,
5986         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5987         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5988         emitting rFalseIfx label after check_carry label,
5989         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5990         pic16_emitDIRegs), NEW
5991         * (pic16glue): dump .calltree file when option --calltree found,
5992         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5993         * (_pic16_genAssemblerPreamble): emit ID locations after
5994         configuration registers,
5995         * (pic16_linkCmd): modifications of the link command,
5996         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5997         * (pic16_pCodeInitRegisters): don't init stack registers,
5998         * (pic16_findPrevInstruction): fixed bug,
5999         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
6000         bug with immediate registers,
6001         * (buildCallTree): traces stack push and pop,
6002         * (pct2): dump also stack usage for each function,
6003         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
6004         * (pic16_allocDirReg): various modifications,
6005         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
6006         fixed to 1,
6007
6008 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
6009
6010         * src/pic16/pcode.c: removed buggy double colon
6011
6012 2004-07-01 Borut Razem <borut.razem AT siol.net>
6013
6014         * support/scripts/sdcc.nsi: added include/pic16 to setup
6015
6016 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
6017
6018         * device/lib/Makefile.in: fixed bug in target objects-pic16,
6019         * device/lib/pic16/Makefile: prefixed with dash (-) command under
6020         target 'clean',
6021         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
6022         specific command line arguments. Also added sample lkr script
6023         for placing a variable at a specific memory bank.
6024         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
6025         at a specific memory bank,
6026         * (pic16_dump_isection): fixed bug which caused string literals to
6027         be omitted when dumping idata section,
6028         * (pic16_groupRegistersInSection): added code to handle registers
6029         in specific memory banks,
6030         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
6031         public, all references are renamed too,
6032         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
6033         AOP_DPTR2,
6034         * (pic16_storeForReturn): added case to handle when dest is WREG,
6035         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
6036         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
6037         pic16_rel_udata, check to see if that register is marked as being
6038         a member of a specific memory bank,
6039         * (pic16_printIvalCharPtr): added code to add string literals either
6040         to code or the idata sections,
6041         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
6042         also accept the 'udata' pragma,
6043         * src/pic16/main.h: new structure types sectName and sectSym
6044         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
6045         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
6046         * (pic16_findPrevInstruction): fixed, it returned nothing,
6047         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
6048         instruction combinations,
6049         * (pic16_FixRegisterBanking): heavily reorganised,
6050         * (pic16_AnalyzeBanking): if generating banksel directives is
6051         disabled, then don't call FixRegisterBanking at all,
6052         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
6053         completely removed,
6054         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
6055
6056 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
6057
6058         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
6059         Phuah Yee Keat <yk.phuah AT nestac.com>
6060
6061 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6062
6063         * src/pic16/glue.c (pic16createInterruptVect): function now emits
6064         correctly the IVT even if it is relocated to some other location
6065
6066 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6067
6068         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
6069         * device/include/pic16/pic18f2220.h: NEW,
6070         * device/lib/pic16/libdev/pic18f2220.c: NEW,
6071         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
6072         * src/pic16/device.c (struct Pics16): added info for 18f2220,
6073         * src/pic16/device.h (struct pic16_options): added ivt_loc and
6074         nodefaultlibs, ivt_loc is the location of the interrupt vector
6075         table, and nodefaultlibs signs that default libraries should not be
6076         linked in link stage,
6077         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
6078         according to --ivt-loc argument,
6079         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
6080         when pragma stack is found,
6081
6082 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6083
6084         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
6085         256 (range check), 257 (do while), 258.a-f (bit banging
6086         f.e. on 3-wire SPI bus)
6087
6088 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6089
6090         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
6091         variables used exclusively within a loop
6092
6093 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
6094
6095         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
6096
6097 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6098
6099         * src/SDCClrange.c (computeClash): fixed bug #971834
6100
6101 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6102
6103         * src/mcs51/gen.c (genCmp): fixed bug #975903
6104         * src/hc08/gen.c (operandsEqu),
6105         * src/ds390/gen.c (operandsEqu),
6106         * src/z80/gen.c (operandsEqu),
6107         * src/pic/gen.c (operandsEqu),
6108         * src/pic16/gen.c (operandsEqu),
6109         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
6110         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
6111
6112 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6113
6114         * src/SDCCcse.c (cseBBlock): fixed bug #966963
6115
6116 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
6117
6118         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
6119         default case in switch statement,
6120         * glue.c (pic16_initPointer): expr is initialised via decoarteType
6121         to eliminate problem with initialisation of pointers, but problem
6122         still exists,
6123         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
6124         * (emitStaticSegment): removed various lines emitting debug info,
6125         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
6126         added processor registers for utilizing EEPROM,
6127         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
6128         configurable and set 8
6129
6130 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
6131
6132         * .version: increased version number to 2.4.2,
6133
6134         Cumulative patch for pic16 port
6135         * src/pic16/device.c: changed scheme to dump initial values for
6136         variables in idata segment, all print_idata* functions were removed,
6137         now the pic16_printIval* will be called,
6138         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
6139         * _pic16_printPointerType, pic16_printPointerType,
6140         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
6141         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
6142         NEW, similar to the respective functions in SDCCglue.c,
6143         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
6144         way, emitting hex bytes,
6145         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
6146
6147 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6148
6149         * src/avr/ralloc.c (serialRegAssign),
6150         * src/xa51/ralloc.c (serialRegAssign),
6151         * src/pic/ralloc.c (serialRegAssign),
6152         * src/pic16/ralloc.c (serialRegAssign),
6153         * src/hc08/ralloc.c (serialRegAssign),
6154         * src/z80/ralloc.c (serialRegAssign),
6155         * src/ds390/ralloc.c (serialRegAssign),
6156         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
6157
6158 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6159
6160         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
6161         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
6162
6163 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
6164
6165         Cumulative patch for pic16 port:
6166         * src/pic16/device.h (typedef PIC16_device) modified fields for
6167         defining microcontrollers,
6168         * src/pic16/device.c: added new info for all devices in Pics16 array,
6169         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
6170         to be optimised out by the pCode optimiser,
6171         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
6172         specially, bug reported by G.M. Gallant,
6173         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
6174         as force'd so that cannot be optimised out by pCode optimiser,
6175         * src/pic16/pcode.c,
6176         * src/pic16/pcodepeeph.c,
6177         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
6178         they are disabled by default, but can be enabled explicit with
6179         command argument --denable-peeps, for testing,
6180         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
6181         --pomit-ivt in COMPILE_FLAGS
6182
6183 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6184
6185         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
6186           compilation on MSVC
6187
6188 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6189
6190         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
6191
6192 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6193
6194         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
6195         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
6196
6197 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
6198
6199         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
6200         would only assign 0x300001 register.
6201
6202 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
6203
6204         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
6205         in COMPILE_FLAGS. Thanks to G. Gallant for report.
6206
6207 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6208
6209         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
6210         for ds80c400
6211         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
6212         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
6213         added peephole 254 (left shift), 255 (jump table)
6214
6215 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
6216
6217         * device/lib/Makefile.in: removed comment line with model-pic16,
6218         * (target port-specific-objects-pic16): the libraries and objects
6219         are copied to the build directory form the device/lib/pic16/bin
6220         directory
6221
6222         Cumulative patch concerning pic16 port:
6223         * library directory has been re-organized,
6224         * added support for PIC18F1220,
6225         * added headers and library sources for chips 18f1220,18f6520,
6226         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
6227
6228         * configuration registers setting has changed, now each supported
6229         device has a complete description of the registers it uses,
6230         * all initialisations are moved to idata sections, these section
6231         can be absolute or relocatable,
6232         * fixed initialisation of codespace variables,
6233         * fixed warning about PCLATU and gpsim,
6234         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
6235         * (genAssign): use table reads when assigning from variables in codespace,
6236         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
6237         char/int variables placed in codespace,
6238         * (pic16_emitConfigRegs): NEW, emits a list with configuration
6239         registers set in .asm file, no need for --pomit-config-words anymore,
6240         * (pic16glue): some 8051 legacy segments are commented out
6241         (to be removed completely),
6242         * added support for alternative assembler and linker with --asm=
6243         and --link= command line arguments,
6244         * peepholes are disabled automatically in the port, no need to
6245         specify on command line,
6246         * port supports natively char/int/long multiplication, but converts
6247         all divisions to support functions,
6248         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
6249         to the file set in variable $2,
6250         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
6251         strings in ASCII format and not in hex,
6252         * ralloc.c (serialRegAssign): added a triplet of conditional calls
6253         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
6254         allocate proper register if iCodes aren't temporary,
6255
6256 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
6257
6258         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
6259
6260 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
6261
6262         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
6263         is commented out
6264
6265 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6266
6267         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
6268         computed address is reused
6269         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
6270         multi-byte bitfields
6271
6272 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6273
6274         * src/z80/gen.c: (genArrayInit): must check for pointers too
6275
6276 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6277
6278         * support/regression/tests/zeropad.c: never meant to commit the
6279           nestedstruct test: removed, added check for GCC version
6280
6281 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
6282
6283         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
6284         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
6285         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
6286           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
6287           bugs 928906 and 954082 half-empty initializers
6288         * src/SDCCsymt.h,
6289         * src/SDCCsymt.c (getAllocSize): added for above fix
6290         * src/z80/gen.c (genArrayInit): fixed bug 741044
6291         * support/regression/tests/zeropad.c: added tests
6292
6293 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
6294
6295         * src/pic16/device.c (pic16_dump_section): corrected bug which
6296         caused some symbols of the libraries to be misplaced
6297
6298 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6299
6300         * src/pic16/glue.c,
6301         * src/pic16/ralloc.h,
6302         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
6303         to fix conflict with pic port
6304
6305 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6306
6307         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
6308         externs configuration variables,
6309         * src/pic16/ralloc.h,
6310         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
6311         prototype in header, commented out some debug messages
6312
6313 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
6314
6315         * src/pic16/glue.c,
6316         * src/pic16/main.c,
6317         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
6318         for gpasm COFF object generation. Thanks to D. Hawkins for
6319         his patch info
6320
6321 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6322
6323         * src/ds390/main.c,
6324         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
6325         Brock for spotting this)
6326         * src/ds390/gen.c (genEndFunction),
6327         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
6328         interrupt handler and critical. Disable push/pop optimizations when
6329         peephole optimizations disabled.
6330
6331 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6332
6333         Updated pic16 library sources and headers.
6334         * device/lib/pic16/pic18f*/ ,
6335         * device/include/pic16/*.h: modified to handle structured SFR
6336         definitions
6337
6338 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6339
6340         * src/port.h (PORT structure): added hook initPaths, now each
6341         port can declare its own default search paths,
6342         which can been seen with the --print-search-dirs option,
6343         see pic16 port for example,
6344         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
6345         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
6346         * (doPrintSearchDirs): NEW, replaces in a central manner the
6347         printing of search dirs which was split in set*Paths functions,
6348         * (main): added call to port->initPaths and doPrintSearchDirs,
6349         * src/avr/main.c,
6350         * src/ds390/main.c,
6351         * src/hc08/main.c,
6352         * src/izt/i186.c,
6353         * src/izt/tlcs900h.c,
6354         * src/mcs51/main.c,
6355         * src/pic/main.c,
6356         * src/pic16/main.c: modified port structures to reflect addition of
6357         initPaths hook,
6358
6359         * src/pic16/device.c (regCompare): registers are finally sorted by name,
6360         * (pic16_dump_section): for registers in same address reserve memory once,
6361         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
6362         to no_banksel,
6363         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6364         result is greater in size than right or left,
6365         * (pic16_genUMult8X8_8): there are some cases where the result can
6366         be 16 bits size, so handle these,
6367         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6368         * (pic16_outBitC): modified to emit pcodes,
6369         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6370         or not,
6371         * (genDivOneByte): implemented algorithm to divide 8-bits,
6372         * (genCmp): uncommented goto, but issues still exist,
6373         * (genAnd): fixed a bug with variables >8bits,
6374         * (genPackBits): optimization added that uses BCF/BSF to change a
6375         single bit,
6376         * (genAssign): fixed bug when assigning floating point literals,
6377         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6378         __sdcc_gsinit_startup label,
6379         * src/pic16/main.c (_pic16_init): removed search directory
6380         initialisations,
6381         * (_pic16_initPaths): NEW, used to initialise search directories,
6382         * (_hasNativeMulFor): support functions for all except char/int
6383         multiplication, and char division,
6384         * (PIC16_port struct): modified entry for native mul support,
6385         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6386         no_banksel option,
6387         * (buildCallTree): call to register_usage is ifdef'ed out,
6388
6389 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6390
6391         * device/include/string.h: applied Stas Sergeev's patch to make this
6392         header file compatible with the preprocessor -Wundef option
6393         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6394         failure (fixes bug #941458)
6395
6396 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6397
6398         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6399         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6400         that the variable, not the function, should be static
6401         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6402         to be consistent with non-literal case
6403
6404 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6405
6406         * src/SDCCast.c (isConformingBody): fixed bug #949967
6407         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6408         convilong): fixed bug #952086
6409
6410 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6411
6412         * src/SDCCmem.c (allocVariables): fixed bug #955321
6413
6414 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6415
6416         * src/hc08/main.c (_hc08_genAssemblerEnd),
6417         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6418         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6419         completely eliminated the use of a temporary file
6420         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6421         when more than one file linked
6422         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6423
6424 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6425
6426         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6427         which fixes bug #543481
6428         * support/regression/tests/bug-751703.c: fixed comments left from a
6429         cut and paste error
6430         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6431         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6432         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6433         scopes
6434         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6435         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6436         are now changed to underscores in moduleName
6437
6438 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6439
6440         * as/mcs51/lkmem.c: better fix for bug #954173
6441
6442 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6443         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6444
6445         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6446         * device/include/c8051f000.h,
6447         * device/include/c8051f120.h,
6448         * device/include/c8051f300.h,
6449         * device/include/c8051f310.h,
6450         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6451         PWM16) and detab'ed
6452
6453 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6454
6455         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6456         and mailing lists, doc'ed --no-peep-comments, removed reference
6457         to knoppix (newest version has no LyX/LaTeX), other minor changes
6458         * src/SDCCglue.c (glue): save 2 bytes stack space with
6459         option --main-return. The ljmp could probably be avoided too
6460
6461 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6462
6463         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6464
6465 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6466
6467         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6468         * src/SDCCopt.c (isLocalWithoutDef),
6469         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6470         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6471         (credit to Maarten Brock for patch #949363, on which this is based)
6472         * support/regression/tests/bug-751703.c: some test cases of extern used
6473         within inner scopes.
6474
6475 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6476
6477         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6478         SPEC_STRUCT
6479         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6480         struct definitions
6481         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6482         dwWriteLabel): fix to create valid debugger symbols even when
6483         the module name has non-alphanumeric symbols in it
6484         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6485         when a variable's allocation has been optimized away
6486
6487
6488 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6489
6490         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6491         * src/hc08/main.c,
6492         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6493         * src/mcs51/main.c,
6494         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6495         * src/ds390/main.c,
6496         * src/z80/gen.c (z80_emitDebuggerSymbol),
6497         * src/z80/main.c,
6498         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6499         * src/pic/main.c,
6500         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6501         * src/pic16/main.c,
6502         * src/avr/gen.c (avr_emitDebuggerSymbol),
6503         * src/avr/main.c,
6504         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6505         * src/xa51/main.c,
6506         * src/SDCCdebug.c (emitDebuggerSymbol),
6507         * src/SDCCdebug.h,
6508         * src/port.h: added a debugger struct to the port struct. Added a
6509         callback for defining debugger symbols
6510
6511         * src/SDCCast.c (createLabel),
6512         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6513         with isitmp = 1
6514         * src/SDCCicode.h,
6515         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6516         iCode back to the ast for the function
6517
6518         * src/hc08/ralloc.c (hc08_assignRegisters),
6519         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6520         unneeded fields from the regs struct.
6521         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6522         pushReg() & pullReg() functions instead of emitcode()
6523
6524         * src/hc08/gen.c (genLabel, genhc08Code),
6525         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6526
6527         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6528         debugger hooks
6529
6530         * src/hc08/gen.c (genEndFunction, genhc08Code),
6531         * src/hc08/gen.h,
6532         * src/mcs51/gen.c (genEndFunction, gen51Code),
6533         * src/mcs51/gen.h,
6534         * src/ds390/gen.c (genEndFunction, gen390Code),
6535         * src/ds390/gen.h,
6536         * src/z80/gen.c (genEndFunction, genZ80Code),
6537         * src/z80/gen.h,
6538         * src/z80/z80.h,
6539         * src/pic/gen.c (genEndFunction, genpic14Code),
6540         * src/pic/gen.h,
6541         * src/pic16/gen.c (genEndFunction, genpic16Code),
6542         * src/pic16/gen.h,
6543         * src/avr/gen.c (genEndFunction, genAVRCode),
6544         * src/avr/gen.h,
6545         * src/xa51/gen.c (genEndFunction, genXA51Code),
6546         * src/xa51/gen.h,
6547         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6548         specific code to cdbFile.c and out of the backend code generators
6549
6550         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6551         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6552         starting address is now 0
6553
6554         * as/hc08/asm.h,
6555         * as/hc08/m08pst.c,
6556         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6557         assembler directive for DWARF support
6558         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6559
6560         * src/src.dsp,
6561         * src/Makefile.in,
6562         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6563
6564 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6565
6566         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6567         and inappropriate peephole optimization in jump tables
6568
6569 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6570
6571         * as/hc08/m08pst.c,
6572         * src/SDCCglue.c: sdccopt works for the hc08 port now
6573
6574 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6575
6576         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6577
6578 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6579
6580         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6581
6582 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6583
6584         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6585         rules
6586         * src/SDCCmain.c,
6587         * src/SDCCglobl.h,
6588         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6589         comments from the peephole optimizer replacement rules
6590         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6591         symbols
6592         * src/SDCCcse.c (updateSpillLocation),
6593         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6594         equivalents
6595         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6596         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6597         objects far pointers
6598
6599 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6600
6601         * src/SDCCsymt.h: a missing part of my last change
6602         * src/pic/ralloc.c (regTypeNum),
6603         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6604
6605 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6606
6607         * src/SDCCicode.h,
6608         * src/SDCCicode.c (aggrToPtrDclType),
6609         * src/SDCCptropt.h,
6610         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6611         ptrPseudoSymConvert),
6612         * src/pic/ralloc.c (regTypeNum),
6613         * src/pic16/ralloc.c (regTypeNum),
6614         * src/hc08/ralloc.c (regTypeNum),
6615         * src/ds390/ralloc.c (regTypeNum),
6616         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6617         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6618
6619 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6620
6621         * link/z80/lkmain.c (afile),
6622         * as/hc08/lkmain.c (afile),
6623         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6624         prevent a pointer problem when a filename has no directory and
6625         no extension specified.
6626
6627 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6628
6629         * link/z80/lkmain.c (afile): allow periods in directory names
6630         * link/z80/lkmain.c (afile),
6631         * as/mcs51/lkmain.c (afile),
6632         * as/hc08/lkmain.c (afile): allow linker script file to have an
6633         extension other than ".lnk"
6634         * link/z80/lklex.c (getfid),
6635         * link/z80/lkmain.c (parse),
6636         * as/mcs51/lklex.c (getfid),
6637         * as/mcs51/lkmain.c (parse),
6638         * as/hc08/lklex.c (getfid),
6639         * as/hc08/lkmain.c (parse): Support comments in the linker script
6640         file on lines by themselves and after filenames
6641
6642 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6643
6644         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6645
6646 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6647
6648         * src/z80/peeph-z80.def: removed some peephole rules that don't
6649         work with multibyte arithmetic (fixed bug #937126)
6650         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6651         to registers and not global variables
6652         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6653         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6654         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6655         checking for assignments not internally generated (fixed bug #931895)
6656         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6657         structure member (fixed bug #930072)
6658
6659 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6660
6661         * src/SDCCmain.c (linkEdit),
6662         * src/hc08/main.c (_hc08_parseOptions),
6663         * as/hc08/Makefile.in,
6664         * as/hc08/aslink.h,
6665         * as/hc08/asm.h,
6666         * as/hc08/m08pst.c,
6667         * as/hc08/lkrloc.c (relr, rele),
6668         * as/hc08/lkarea.c (lnkarea)
6669         * as/hc08/lkmain.c (afile, parse),
6670         * as/hc08/lkelf.c: support for ELF output
6671         * as/hc08/lks19.c (s19),
6672         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6673
6674 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6675
6676         * as/mcs51/lkihx.c: Fixed bug #899105.
6677
6678 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6679
6680         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6681         .dsp files from Unix to DOS.
6682
6683 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6684
6685         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6686         function pointers; we have been compliant for several months now.
6687         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6688         change that was accidently commented out
6689         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6690         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6691         bug #922319
6692
6693 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6694
6695         * src/hc08/gen.c: output of all of the internal debugging information
6696         is now controlled by the D() macro; it is disabled by default
6697
6698 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6699
6700         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6701         harder to keep the same registers during a CAST iCode
6702         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6703         long via int can be done in a single cast, if the signedness is
6704         correct.
6705         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6706         putchar() in tinibios.c in ds390's library
6707
6708 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6709
6710         * src/SDCCast.c (decorateType): fixed bug #898889,
6711         cast result of a literal complement too
6712         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6713         fixed check for bitfields
6714
6715 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6716
6717         * src/SDCCicode.c (geniCodeLogic): made it static,
6718         (geniCodeLogicAndOr): added in order to fix bug #905492,
6719         (ast2iCode): fixed bug #905492
6720         * support/regression/tests/bug-905492.c: added
6721         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6722         (processParms): fixed bug #927659: don't copy parms, this will clear
6723         decorated flag
6724         * support/regression/tests/bug-927659.c: added
6725
6726 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6727
6728         * src/SDCCast.c (addCast): don't cast float to char
6729         * device/lib/libsdcc.lib: added _memmove
6730
6731 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6732
6733         * device/lib/large/Makefile: fixed parallel execution by
6734         replacing `make` by `$(MAKE)`
6735
6736 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6737
6738         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6739         offsets (fixes bug #923936)
6740
6741 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6742
6743         * device/lib/small/Makefile: fixed parallel execution by
6744         replacing `make` by `$(MAKE)`
6745
6746 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6747
6748         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6749
6750 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6751
6752         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6753         * src/regression/Makefile: Regression test was not running.
6754
6755 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6756
6757         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6758         complement if possible
6759         * src/SDCCval.c (valComplement),
6760         * src/SDCCicode.c (operandOperation): fixed complement of literal
6761         * support/regression/tests/onebyte.c (testComplement): added
6762
6763 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6764
6765         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6766         return an optimized tree; actually replace actParm with the new tree
6767         * src/SDCCast.h: added some parantheses to remove side effects
6768         * support/regression/tests/bug-920866.c
6769
6770 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6771         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6772         Bit operands were not being handled properly in the pic14 port.
6773         (now src/regression/add.c passes again).
6774
6775 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6776
6777         * src/SDCC.y (labeled_statement): case and default no longer require
6778         a following statement (RFE #893037)
6779
6780 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6781
6782         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6783         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6784         disabled (fixes bug #916294)
6785         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6786         "mov a,acc"; patch provided by Lenny Story
6787         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6788
6789 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6790
6791         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6792         functions
6793         * src/ds390/gen.c (genFunction, genEndFunction),
6794         * src/ds390/ralloc.c (ds390_assignRegisters),
6795         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6796         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6797         pushed if there are parameters passed on the stack. Also, a cleaner
6798         way to decide if r0/r1 should be pushed/popped. (Together they fix
6799         bug #918693)
6800
6801 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6802
6803         * doc/sdccman.lyx,
6804         * device/lib/mcs51/crtpagesfr.asm,
6805         * device/lib/mcs51/crtxinit.asm,
6806         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6807         to avoid confusion with Si Lab's SFRPAGE register.
6808
6809 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6810
6811         * src/SDCCglue.c (emitMaps): allow public sfr variables
6812         * src/SDCCglue.c (initialComments): include compiler build date
6813         with compiler version and put the timestamp of the generated
6814         assembly file on a serperate line to be less confusing.
6815         * src/port.h: added genInitStartup hook
6816         * src/avr/main.c,
6817         * src/ds390/main.c,
6818         * src/hc08/main.c,
6819         * src/pic/main.c,
6820         * src/pic16/main.c,
6821         * src/xa51/main.c,
6822         * src/z80/main.c: genInitStartup initialize as NULL (default to
6823         historical behaviour)
6824         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6825         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6826         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6827         library instead of hard coding it into the compiler.
6828         * support/regression/ports/mcs51-stack-auto/spec.mk,
6829         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6830         * device/lib/mcs51/Makefile,
6831         * device/lib/small/Makefile,
6832         * device/lib/large/Makefile,
6833         * device/lib/mcs51/crtpagesfr.asm,
6834         * device/lib/mcs51/crtstart.asm,
6835         * device/lib/mcs51/crtxclear.asm,
6836         * device/lib/mcs51/crtxinit.asm,
6837         * device/lib/mcs51/crtclear.asm,
6838         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6839         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6840         and into user configurable files.
6841         * device/lib/clean.mk: clean mcs51 directory too
6842         * support/regression/tests/longlit.c: added static to T1 declaration
6843         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6844         accesses in the initialization code
6845
6846 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6847
6848         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6849         OSCTRIMVAL as noted in bug #916008
6850
6851 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6852
6853         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6854         in loops with multiple exits (reported as incorrect registers
6855         used by Martin Helmling in Sdcc-user list)
6856
6857 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6858
6859         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6860         made ds390 register extensions look less like error messages
6861
6862 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6863
6864         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6865         reported by Adam Wozniak in Sdcc-user list
6866
6867 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6868
6869         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6870         arithmetic optimizations, added debug output
6871
6872 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6873
6874         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6875         * sdcc.spec: updated and split sdcc into 3 rpms
6876         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6877         needed for literals of LEFT_OP and '+'
6878         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6879         introduced RESULT_TYPE_NOPROM
6880         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6881         left shift
6882         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6883         limited promotion to int only for '*'
6884         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6885
6886 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6887
6888         * src/pic16/gen.c (genSkip),
6889         (genc16bit2lit), (gencjneshort): commented out
6890         (is_LitOp): new helper function, checks operand type
6891         (genCmpEq): rewritten
6892
6893 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6894
6895         * support/regression/tests/bug-908454.c: added
6896
6897 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6898
6899         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6900         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6901         (geniCodeCast): cosmetic, don't preserve bit storage class
6902         (geniCodeLeftShift): added promotion
6903         (geniCodeLogic): fixed regression
6904         * src/SDCCsymt.c (computeTypeOr): accept bits too
6905         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6906
6907 2004-03-07  Borut Razem <borut.razem AT siol.net>
6908
6909         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6910
6911 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6912
6913         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6914         version of pic16_genPackRegisters which does not check if ic is a
6915         CAST operator,
6916         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6917         function cause string1.c regression test fails
6918
6919 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6920
6921         * sim/ucsim/configure.in,
6922         * sim/ucsim/configure,
6923         * sim/ucsim/doc/Makefile.in: use docdir
6924         * src/SDCC.y: fixed sbit atrributes
6925         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6926         * src/SDCCast.c (decorateType): |^& need special promotion handling
6927         * src/SDCCast.h,
6928         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6929         * src/SDCCsymt.h (computeType),
6930         * src/SDCCicode.c: computeType() needs op
6931         * src/SDCCsymt.c (checkTypeSanity),
6932         * doc/sddman.lyx: "plain" bitfields are unsigned
6933         * src/SDCCsymt.c (computeTypeOr): added
6934         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6935         |^& ops
6936         * src/SDCCval.c (val*): computeType() needs op
6937         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6938         * support/regression/tests/onebyte.c: added tests for |^&
6939
6940 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6941
6942         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6943         for writing icode into asm output.
6944
6945 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6946
6947         * src/pic16/device.c: added some debug lines enabled
6948         with macro DEBUG_CHECK,
6949         * src/pic16/genarith.c: more debug in genPlus,
6950         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6951         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6952         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6953         * (aopForSym): onStack symbols are re-placed in data memspace,
6954         and onStack flag is cleared,
6955         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6956         copy temporary pcodeop,
6957         * (genPcall): added warning for not updating PCLATU,
6958         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6959         always true for pic16 port,
6960         * (genMultOneWord): NEW, supports integer multiplication,
6961         * (genMult): modified to call genMultOneWord,
6962         * (ifxForOp): added warning when return NULL,
6963         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6964         flag is set before call to operandFromSymbol for implicit
6965         added structures,
6966         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6967         options.intlong_rent are set by default,
6968         * (_hasNativeMulFor): modified to allow port generation of integer
6969         multiplication,
6970         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6971         set regtype to REG_SFR for all registers, restricting seting the
6972         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6973
6974 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6975
6976         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6977         more than 500 times in the regression tests
6978
6979 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6980
6981         * support/Util/SDCCerr.h,
6982         * support/Util/SDCCerr.c,
6983         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6984         enumerator_list),
6985         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6986         for symbol conflicts.
6987         * support/valdiags/tests/enum.c,
6988         * support/valdiags/tests/tentdecl.c,
6989         * support/valdiags/tests/struct.c: expect possible error messages
6990         referring to original symbol definitions.
6991         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6992         * src/SDCCsymt.h,
6993         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6994
6995 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6996
6997         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6998
6999 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
7000
7001         * src/pic16/ralloc.c (newReg): fixed bug #908929
7002
7003 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7004
7005         * src/ds390/gen.c: added missing #include "main.h"
7006
7007 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
7008
7009         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
7010         checking if symbol is already in set,
7011         * src/pic16/device.h: prototype for checkAddSym,
7012         * src/pic16/gen.c: (_G): added entry interruptvector,
7013         * (assignResultValue): removed some commented out lines,
7014         * (genFunction): check for ISR via sym->type, absolute section for
7015         interrupt code is created via a new pBlock, the goto instruction is
7016         placed now correctly at the interrupt vector position, changed all
7017         references from ivec to _G.interruptvector,
7018         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
7019         is the interrupt is a high priority one, same for return from ISR,
7020         * src/pic16/glue.c: changed all calls of addSetHead for publics and
7021         externs to calls of checkAddSym,
7022         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
7023         pic16_pcode_verbose flag is set,
7024         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
7025         * src/pic16/pcoderegs.c: message about how many registers are saved
7026         will only be emitted if pic16_pcode_verbose flag is set,
7027
7028 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7029
7030         * src/ds390/ralloc.h,
7031         * src/ds390/ralloc.c (ds390_regWithIdx),
7032         * src/ds390/gen.c (emitcode),
7033         * src/ds390/main.h,
7034         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
7035         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7036         ds390operandCompare, getRegsRead, getRegsWritten,
7037         initializeAsmLineNode): customized instruction size calculation for
7038         ds390, started basis for some register optimizations
7039         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
7040         corresponding assembly output
7041         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
7042         missing push/pop of r0/r1. Optimized push/pops
7043
7044 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7045
7046         * src/mcs51/main.c (instructionSize): fixed ACALL size
7047         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
7048
7049 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
7050
7051         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
7052         the sorting of rlist with NULL elements
7053         * (print_idataType, print_idata): NEW to create idata sections
7054         * src/pic16/device.h: idataSymSet new variable
7055         * src/pic16/gen.c (genFunction): fixed some bugs in string
7056         comparing, improved the absolute section creation for ISRs,
7057         added FSR0L/FSR0H in registers that are saved in an ISR,
7058         * (genInline): fixed the processing of inline snippets,
7059         now they undergo no process by the peephole optimizer
7060         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
7061         are placed in idataSymSet,
7062         * (pic16emitStaticSeg): extern symbols are added in externs,
7063         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
7064         switching when aboslute variables are placed in access bank memory
7065         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
7066         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
7067         commented out with #if,
7068         * (pic16_packRegisters): reintroduce the check for CAST because some
7069         symbols are not correctly handled,
7070         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
7071         pCodeInstruction instead of pCode,
7072         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
7073         pCodeAsmDir definition,
7074         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
7075         directive, then the argument directive is emitted without the leading
7076         tab, hack for inline labels which must be in the first column,
7077         * (compareLabel,pic16_findNextInstruction),
7078         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
7079         * (insertBankSwitch): modified for the new pCodeAsmDir,
7080
7081 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7082         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
7083
7084         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
7085         instance,
7086         * (pushSide): commented out with #if,
7087         * (assignResultValue): fixed some typos in saving
7088         registers,
7089         * (genPcall): FIXED and sync'ed with genCall,
7090         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
7091         * (genNearPointerGet): fixed to handle some more cases,
7092         implementation scheme via table reads,
7093         * (genConstPointerGet): modified to access code memory correct,
7094         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
7095         and improved to handle some cases
7096         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
7097         instead of "RETLW" for init data
7098         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
7099         not IN_DIRSPACE, work around to reduce bank switching when aboslute
7100         variables are placed in access bank memory (<0x80 and >=0xf80),
7101         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
7102         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
7103         TBLWT_POSTDEC,TBLWT_PREINC
7104         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
7105         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
7106         directives
7107         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
7108         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
7109         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
7110         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
7111
7112 2004-02-29  Borut Razem <borut.razem AT siol.net>
7113
7114         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
7115         support/Util/findme.h, support/Util/system.h: enhance binary relative
7116         search for lib and include by using findProgramPath()
7117
7118 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7119
7120         * src/SDCCpeeph.h,
7121         * src/SDCCpeeph.c (pcDistance),
7122         * src/port.h,
7123         * src/mcs51/ralloc.h,
7124         * src/mcs51/ralloc.c (mcs51_regWithIdx),
7125         * src/mcs51/main.h,
7126         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
7127         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7128         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
7129         size calculation port specific, started basis for some register
7130         optimizations
7131         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
7132         missing push/pop of r0/r1. Optimized push/pops
7133         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
7134         * device/lib/_modsint.c (_modsint),
7135         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
7136         and stack version so regression tests pass
7137
7138 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
7139
7140         * src/Makefile.in (dep): include SLIBOBJS in dependency check
7141         * src/SDCCast.c (decorateType): catch another small optimization
7142         with '?' operator
7143         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
7144         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
7145         modified to finally use computeType() all over SDCC,
7146         see Feature Request #877103
7147         * src/SDCCval.h: cosmetic
7148         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
7149         valCompare(); regression tested in muldiv.c
7150         * support/regression/tests/muldiv.c (testMod): mod sign follows
7151         dividend only
7152
7153 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
7154
7155         * src/SDCCast.c (decorateType): fixed bug #902362
7156         * doc/INSTALL.txt: fixed install instructions for win32
7157
7158 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
7159
7160         * device/include/Makefile.in (install): fixed by replacing spaces
7161         by tabs
7162         * doc/README.txt,
7163         * doc/INSTALL.txt: updated for release
7164         * doc/sdccman.lyx: added warning for --xstack being buggy
7165
7166 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
7167
7168         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
7169         to eliminate build warnings.
7170         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
7171
7172 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
7173            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7174
7175         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
7176         removed -penable-stack, added comment for stack pragma, added
7177         warning for not initializing the stack/frame registers, removed
7178         comment at interrupts section
7179
7180         Stack is made permanent, there is no ability to disable stack usage.
7181         * src/pic16/device.h,
7182         * src/pic16/device.c: removed all references to USE_STACK macro,
7183         * src/pic16/device.c (pic16_dump_section): when no elements in
7184         rlist, free rlist before return,
7185         * (pic16_dump_int_registers): NEW, internal registers are a new set
7186         of general purpose registers reused by each function,
7187         * (checkAddReg): returns 1 if registers is added to set,
7188         * (pic16_groupRegistersInSection): when a registers is of type
7189         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
7190         * src/pic16/device.h: memRange and Assigned Memory are deleted,
7191         SRCASECMP macro is moved here from device.c
7192         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
7193         PO_PCLATU, PO_PRODL, PO_PRODH,
7194         * (pic16_pCodeOpType, genMinus,
7195         changed compares to "a" register, with AOP_ACC,
7196         * (pic16_genPlus): fixed some bugs and indented properly,
7197         * (pic16_addSign): changed size to size+offset in the MOVWF
7198         instruction,
7199         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
7200         multiply 8-bit operand by literal, result is 8-bit,
7201         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
7202         multiply 2 8-bit operand, result is 8-bit,
7203         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
7204         genUMult8X*_16,
7205         * src/pic16/gen.c: changed accUse to contain WREG only,
7206         * (pic16_emitcomment): renamed to pic16_emitpcomment,
7207         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
7208         true, do not use immediate addressing any more unless sym is a
7209         pointer in codespace,
7210         * (aopForRemat): do not use immediate addressing when symbol not in
7211         codespace and when symbol's address is requested,
7212         * (aopOp): for-loop in if(sym->accUse) is modified for the new
7213         accUse size (= 1),
7214         * (aopGet): added case for AOP_ACC and don't return "accumulator
7215         bug" but WREG instead,
7216         * (popGetTempReg): pushes contents of temporary register in stack,
7217         * (popReleaseTempReg): pops contents of temporary register from
7218         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
7219         * (pic16_popGet): separated case AOP_ACC to return register WREG
7220         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
7221         or PO_IMMEDIATE and initializes their instance/offset appropriately,
7222         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
7223         the use of immediate pointers to certain cases only.
7224
7225         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
7226         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
7227         * (assignResultValue, genCall, genRet): modified to use the new
7228         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
7229         genPcall is still broken,
7230         * (genFunction): added code to create 'A' type pBlocks when
7231         interrupt functions are generated, code not extensively tested yet,
7232         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
7233         * (genEndFunction): modified so ISRs pop stored registers from stack,
7234         * (genMultOneByte): cleanup,
7235         * (AccRsh): added flag andmask, to and result with appropriate mask,
7236         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
7237         * (genDataPointerGet): fixed and reenabled its use,
7238         * (genNearDataPointerGet): bugs fixed,
7239         * (genDataPointerSet): bugs fixed,
7240         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
7241         pic16_DumpSymbol, pic16_DumpOp,
7242         * src/pic16/genutils.h: function prototypes for the above functions,
7243         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
7244         pointers,
7245         * (pic16emitRegularMap): many many many improvements, but needs a
7246         major cleanup,
7247         * src/pic16/main.c: enable_stack in pic16_options is removed,
7248         * (_pic16_parseOptions): removed command line options -penable-stack,
7249         * (_process_pragma): emit stack symbol only when stack pragma is
7250         processed,
7251         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
7252         redirected to FSR0L/FSR0H pair,
7253         * (pic16_get_op, pic16_get_op2): modifications and improvements,
7254         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7255         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
7256         for immediates,
7257         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
7258         * (dumpPicOptype): NEW,
7259         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
7260         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
7261         with movff instruction,
7262         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
7263         added pic16_int_regs, some packRegsFor* functions are commented out,
7264         because produce errors,
7265         * src/pic16/NOTES: minor modifications
7266
7267 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7268
7269         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
7270         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
7271         --pack-iram.
7272         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
7273         * as/mcs51/lkaomf51.c: fixed bug #895763
7274
7275 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
7276
7277         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
7278
7279 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7280
7281         * doc/sdccman.lyx: added details about the HC08 storage classes and
7282         interrupts, fixed the register usage info for z80 & gbz80
7283
7284 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
7285
7286         * doc/sdccman.lyx: added more pic16 port documentation
7287         * device/include/pic16/: added header pic18fregs.h
7288
7289 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
7290
7291         * doc/sdccman.lyx: added Vangelis' contribution
7292
7293 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7294
7295         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
7296         extend to the next CALL or PCALL, not just to the next CALL.
7297
7298 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
7299
7300         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
7301
7302 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7303
7304         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
7305         bug #895752 and a better fix for bug #716790
7306
7307 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7308
7309         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
7310
7311 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7312
7313         * doc/sdccman.lyx: minor changes, minor changed
7314
7315 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
7316
7317         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
7318         which can't handle SDCC_NEWONEBYTEOPS,
7319         (geniCodeMultiply): removed conversion from mult to shift for pic14
7320         and pic16
7321
7322 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7323
7324         * src/hc08/gen.h,
7325         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
7326         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
7327         thus fixing bug #895406
7328
7329 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
7330
7331         * device/lib/_modsint.c,
7332         * device/lib/_modslong.c: sign follows divisor only
7333         * src/hc08/gen.c (genMultOneByte): if result size is 1,
7334         signs or signedness can be ignored
7335         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
7336         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
7337         added optimization for IFX,
7338         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
7339         arguments;
7340         reenabled optimization for IFX, which was removed on 2004-01-11
7341         * src/SDCCast.h: added return type IFX
7342         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
7343         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
7344         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
7345         SDCC_OLDONEBYTEOPS selects the old behaviour
7346         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
7347         changed again and commented promotion rule
7348         * src/SDCCval.c (valDiv): promotion no longer necessary
7349         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
7350         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
7351         rewritten
7352         * support/regression/tests/onebyte.c: added
7353
7354 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
7355
7356         * gen.c (genInline): reverted to old code for assemnling inline
7357         code because of bug reported James Chadd
7358
7359 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
7360
7361         * ralloc.h: missing declarations from previous patch,
7362         seems that patch for ralloc.h was never applied, fixed
7363
7364 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7365            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7366
7367         * pcode.c,
7368         * pcode.h,
7369         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7370         indirect addressing. Marked FSR0 as deprecated
7371         * gen.c (pointerCode): commented out, not needed now
7372         (pic16_popGet2p): new MOVFF helper function
7373         (genGenPointerGet),
7374         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7375         (shiftRLong): removed duplicate debugging info
7376
7377 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7378
7379         * src/ds390/gen.c (genNearPointerGet),
7380         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7381         optimization with bits, but not bitfields.
7382         * src/ds390/ralloc.c (packRegisters),
7383         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7384
7385 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7386
7387         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7388
7389 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7390
7391         * src/SDCCsymt.h,
7392         * src/SDCCicode.c (operandFromSymbol),
7393         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7394         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7395         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7396         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7397         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7398         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7399         bug #892038
7400         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7401         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7402         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7403         * src/SDCCsymt.c (newSymbol),
7404         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7405         enumerator_list),
7406         * src/SDCCval.h,
7407         * src/SDCCval.c (newiList): fixed bug #885705
7408
7409 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7410
7411         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7412         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7413
7414 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7415
7416         * device/include/c8051f120.h,
7417         * device/include/c8051f300.h,
7418         * device/include/c8051f310.h: added/updated header files for Silicon
7419         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7420         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7421         in new section Submitting patches
7422
7423 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7424
7425         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7426         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7427         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7428         genGenPointerSet),
7429         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7430         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7431         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7432         genGenPointerSet),
7433         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7434         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7435         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7436         genGenPointerSet),
7437         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7438         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7439         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7440         genGenPointerSet): fixed bug #892400
7441         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7442         to eliminate build warnings.
7443         * src/SDCCast.c (processParms),
7444         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7445         fixed bug 751859
7446         * support/valdiag/valdiag.py: added GCC to the list of defines active
7447         when compiling with gcc
7448
7449 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7450
7451         * support/Util/SDCCerr.h,
7452         * support/Util/SDCCerr.c,
7453         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7454         with an incomplete type (fixed bug #883734)
7455         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7456
7457 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7458
7459         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7460
7461 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7462
7463         * src/SDCCast.c (decorateType),
7464         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7465         function pointer implementation
7466         * support/regression/tests/funptrs.c: added tests to verify both forms
7467         of function pointers work correctly. Added tests to verify parameters
7468         are passed in the correct order.
7469
7470 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7471
7472         * device.c (regCompare): registers are sorted by ascending
7473         address and increasing size,
7474         * main.c (_pic16_finaliseOptions): removed the declaration
7475         of compiler macro MCU. Now a macro of the format pic18fxxxx
7476         will be defined from the command line
7477
7478 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7479             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7480
7481         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7482         PCOP_RLCF was overwritten!
7483         * gen.c (genSkip): commented out calls to pic16_emitcode,
7484         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7485         * (genlshTwo),
7486         * (genRRC): added debugging info,
7487         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7488         overwritten while shifting,
7489         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7490         overwritten while shifting,
7491         * (AccLsh),
7492         * (AccRsh),
7493         * (shiftLLeftOrResult),
7494         * (shiftRLeftOrResult),
7495         * (shiftRLong),
7496         * (shiftLLong): Implemented with pic16_emitpcode
7497         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7498         * (genLeftShift): Fixed bug, operand for shift by variable always
7499         was "and"ed with 0x0f,
7500         * (genLeftShiftLiteral),
7501         * (genrshTwo),
7502         * (genRightShiftLiteral): added debugging info,
7503         * (genrshFour): added comment,
7504         * (genRightShift): determined signedness from operand "left"
7505         instead of "result"
7506
7507 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7508
7509         * src/SDCCicode.c (geniCodeParms),
7510         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7511         function pointers, fixed function pointer bugs #861242 and #861896
7512
7513 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7514
7515         * device/include/c8051f000.h,
7516         * device/include/c8051f120.h,
7517         * device/include/c8051f300.h: added header files for Silicon
7518         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7519
7520 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7521
7522         * src/SDCCast.c (processParams): added new type flow and restructured
7523         (gatherAutoInit): added new type flow
7524         (addCast): cosmetic changes
7525         (getLeftResultType): added new type flow for array indices, patch
7526         provided by Stas, see FR #877103
7527         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7528         array index patch by Stas
7529         * src/SDCCast.h: added prototype getResultTypeFromType()
7530         * src/SDCCval.h,
7531         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7532         * src/pic/glue.c (pic14emitStaticSeg),
7533         * src/pic16/glue.c (pic16emitStaticSeg),
7534         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7535         for initialization of symbols
7536         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7537         * support/Util/SDCCerr.h:
7538         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7539         * .version: bumped version number to 2.3.8
7540         * device/include/Makefile.in (install),
7541         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7542         avoid warnings
7543
7544 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7545
7546         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7547         Slade Rich fixed an optimization bug
7548         * src/pic/pcodepeep.c,
7549         * src/pic/pcoderegs.c
7550         * doc/Makefile (install): added test for directory
7551
7552 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7553
7554         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7555         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7556         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7557         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7558         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7559         * as/mcs51/asexpr.c (term),
7560         * as/hc08/asexpr.c (term): fixed bug #887146
7561
7562 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7563
7564         * src/z80/gen.c (genMult): handle single byte result product
7565         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7566         DUMMY_READ_VOLATILE (fixed bug #886367)
7567
7568 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7569
7570         * support/regression/tests/libmullong.c: fixed logic, on little endian
7571         hosts we ended without a mullong_wrapper()
7572
7573 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7574
7575         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7576         virus/worm forged address usage.
7577
7578 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7579
7580         Fixed promotion, it should be done on AST level:
7581         * src/SDCCast.c (addCast): added promotion to int
7582         (decorateType): updated call to upCast()
7583         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7584         usualUnaryConversions()
7585
7586 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7587
7588         * support/regression/tests/literalop.c (mulWrapper): Added a
7589         wrapper to remove integer overflow warnings.
7590
7591         * support/regression/tests/float_trans.c: Made work on host.
7592
7593         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7594         location of sz80.
7595
7596         * support/regression/generate-cases.py (main): Changed from inline
7597         to a main method.
7598
7599         * doc/Makefile (install): Changed to depth first to get rid of
7600         missing directory install warning.
7601
7602         * as/Makefile (install-doc): Made work on Mac.
7603
7604 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7605
7606         * src/SDCCast.c: added an additional type flow in decorateType() of
7607         opposite direction, see feature request #860006; it's enabled at runtime
7608         by setting the environment variable SDCC_NEWTYPEFLOW
7609         * src/SDCCast.h: changed prototype of decorateType()
7610         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7611         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7612         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7613         see feature request #877103
7614         * src/SDCCval.c: updated call of decorateType()
7615         (valBitwise): fixed bug #882876
7616         (valMinus): added promotion
7617         (valLogicAndOr): result is unsigned
7618         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7619         * src/SDCCsymt.c (computeType),
7620         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7621         must not cause an unsigned operation
7622         * src/pic/glue (pic14emitRegularMap),
7623         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7624
7625 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7626
7627         * src/pic/pcode.c (PCodeID): commented out left over debug code
7628
7629 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7630
7631         * support/valdiag/tests/overflow.c: added shift tests
7632         * src/pic/device.c,
7633         * src/pic/gen.c,
7634         * src/pic/gen.h,
7635         * src/pic/glue.c,
7636         * src/pic/main.c,
7637         * src/pic/pcode.c,
7638         * src/pic/pcode.h,
7639         * src/pic/pcodepeep.c,
7640         * src/pic/pcoderegs.c,
7641         * src/pic/ralloc.c,
7642         * src/pic/ralloc.h: applied patch from Slade Rich;
7643         added support for multiple code pages and multiple RAM banks on the
7644         PIC 14 port. The ASM files now no longer simply assume all the
7645         code / RAM are in the same page / bank. This means the linker can
7646         safely allocate code/RAM of separate ASM files to different pages/banks.
7647         * doc/sdccman.lyx: added Slade's tips
7648         * src/mcs51/peeph.def: fixed bug #880768
7649
7650 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7651
7652         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7653         * src/SDCCast.c (decorateType): fixed bug #880197
7654
7655 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7656
7657         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7658         getopt.h.
7659
7660         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7661         strtof is not part of C89 and isn't included with Mac OS X.
7662
7663 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7664
7665         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7666         shiftL2Left2Result): fixed bug #879326
7667         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7668         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7669         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7670         address fetch for clr instruction
7671         * device/lib/hc08/_mulint.c: created optimized assembly version
7672         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7673
7674 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7675
7676         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7677         proposed in FR #877103
7678
7679 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7680
7681         * src/SDCCval.c (cheapestVal): added missing checks
7682         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7683         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7684
7685 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7686
7687         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7688         equal operands
7689
7690 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7691
7692         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7693         loaded with the linker search paths (-L arguments) and the libraries
7694         to be linked with the current source (-l arguments). Changes
7695         currently will affect only the pic16 port.
7696         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7697         include path the port specific paths and port specific libraries,
7698         * gplink command now contains the $3 argument,
7699         * src/pic16/device.h,
7700         * src/pic16/device.c,: structure PIC_device is made public and
7701         renamed to PIC16_device, the same for variable Pics which is renamed
7702         to Pics16. Updated all references to them.
7703         * src/pic16/glue.c (pic16glue): corrected bug with code
7704         initialization which bypassed the variable initializations block.
7705
7706         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7707         COMPILE_FLAGS and added the --nostdinc option
7708
7709 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7710
7711         * device/include/mc68hc908jb8.h: Register defs for another member
7712         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7713
7714 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7715
7716         Documenting changes from previous commits.
7717         * configure.in (version 1.56),
7718         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7719         when generating output files to configure the pic16 library,
7720         but now I've commented it out, since gputils aren't installed in the
7721         SF compile farm, so library won't compile
7722
7723         * device/lib/Makefile.in (version 1.56): initially I've added in
7724         target 'all' the prerequestive 'model-pic16' so it compiled the
7725         pic16 library, but now I've commented it out for the same reasons
7726         above,
7727         * added targets 'model-pic16' and 'objects-pic16' to compile the
7728         library
7729         * added target 'port-specific-objects-pic16' to handle the
7730         generated libraries and copy them into the build/ directory
7731         * added target 'clean-intermediate-pic16' to clean intermediate
7732         files into pic16 directory
7733         * in target 'installdirs' added line to create directory pic16 in
7734         the installation path
7735
7736         * device/include/Makefile.in (version 1.11): in target 'install'
7737         added lines to copy all header files to installation path,
7738         * in target 'installdirs' added line create directory for pic16
7739         headers in the installation path
7740
7741 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7742
7743         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7744          a function call
7745
7746 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7747
7748         * configure,
7749         * device/lib/configure.in,
7750         * device/lib/configure: fixed for autoconf 2.57
7751
7752 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7753
7754         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7755         option so that it actually works. Made it specific to the z80, since
7756         the gbz80 doesn't have these kinds of I/O ports.
7757
7758 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7759
7760         * device/include/z180.h,
7761         * device/lib/_memcpy.c,
7762         * device/lib/_memmove.c,
7763         * device/lib/_mulint.c,
7764         * device/lib/ser_ir.c,
7765         * device/lib/ser_ir_cts_rts.c,
7766         * device/lib/_strcmp.c,
7767         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7768         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7769         portmode; added deprecation warning for bank= and protmode= forms.
7770         Also, guard against buffer overflow.
7771         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7772
7773 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7774
7775         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7776         changed interrupt vector table generation to only emit declared vectors.
7777         * device/include/Makefile.in: added missing backslash
7778         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7779
7780 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7781
7782         Mainly changes to support compilation of the device libraries
7783         * src/pic16/device.c: stack is allocated via symbol and not
7784         via literal number. The symbol is placed in the corresponding
7785         position of the data ram
7786         * (pic16_dump_section): relocatable and absolute uninitialized
7787         data are now emitted in sorted order to reduce section naming,
7788         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7789         weren't marked as being in the access bank,
7790
7791 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7792
7793         Added portion of GNU PIC Library under the directory
7794         device/include/pic16 and device/lib/pic16. These files
7795         contain the declarations of SFRs for the PIC18Fxx2 devices.
7796         The directory is initialized via configure from toplevel.
7797
7798 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7799
7800         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7801         the spilllocations to be compared correctly
7802
7803 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7804
7805         * src/SDCCast.c (decorateType): fixed bug introduced today
7806
7807 2004-01-12  Borut Razem <borut.razem AT siol.net>
7808
7809         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7810         doc/sdccman.lyx: upper case pragmas are deprecated
7811
7812 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7813
7814         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7815         in simpler and even better code
7816
7817 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7818
7819         * src/SDCCicode.c (operandOperation): fixed bug #874819
7820         * src/SDCCast.c (decorateType): fixed
7821         char foo (unsigned long ul) { return ul > 0; }
7822
7823 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7824
7825         * doc/sdccman.lyx: Moved and added some sections, small changes
7826         all over. Telling LaTeX to be less strict with word spacing
7827         to better keep the right margin. Changed some notes about
7828         maintainance of the ports in section 3.2.1 - is it OK like this?
7829
7830 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7831
7832         SDCC source changes:
7833         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7834         convilong): modified to inform the pic16 port that builtin functions
7835         are external
7836
7837         PIC16 PORT specific changes:
7838         * src/pic16/device.c pic16_dump_equates() added,
7839         processor registers declared internally by the port are emitted in
7840         the translation as equates,
7841         * src/pic16/gen.c: inline code is passed unprocessed to the
7842         translation,
7843         * (pic16_popGetLit2): fnuction modified to take second operand as
7844         pCodeOp pointer and not as literal,
7845         * (popRegFromIdx): prefixed with pic16_,
7846         * (pic16_popCombine2): modified to receive already allocated pCode
7847         operands,
7848         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7849         * (genFunction): initializes local stack frame and pushes on stack
7850         all the registers used by this function,
7851         * (genEndFunction): restores all registers from stack and restores
7852         stack frame,
7853         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7854         improvements,
7855         * (pic16glue): changed the program startup sequence,
7856         * added new dbName code 'A' for functions placed in absolute section
7857         * src/pic16/main.c: added function attribute _naked,
7858         * added pragma 'code' to place a fnuction at an absolute address,
7859         * added command line arguments --debug-ralloc and --pcode-verbose,
7860         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7861         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7862         * (pic16_newpCodeOpLit2): modified to take the second operand as
7863         pCodeOp pointer,
7864         * (pic16_printpBlock): modified to emit each function in a separate
7865         section,
7866         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7867         UPPER for immediate operands,
7868         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7869         instruction,
7870         * src/pic16/peeph.def: all peepholes with movff are commented out,
7871         because there is a problem in the pcode peep optimizer,
7872         * src/pic16/ralloc.c: the register allocator can now reuse local
7873         function symbols for another function. This saves register usage.
7874         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7875
7876         Added file src/pic16/NOTES with information about program writing on
7877         the current port version.
7878
7879 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7880
7881         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7882         and peephole 252 (array access)
7883
7884 2004-01-09  Borut Razem <borut.razem AT siol.net>
7885
7886         * src/SDCCmain.c : fixed #872250: -l command line defined library
7887           files are scanned before standard library files
7888
7889 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7890
7891         * src/SDCCast.c (decorateType): fixed bug #874046
7892
7893 2004-01-09  Borut Razem <borut.razem AT siol.net>
7894
7895         * support/scripts/sdcc.nsi: remove previous installation
7896
7897 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7898
7899         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7900         bytes for last interrupt vector (mcs51)
7901         * sdcc.spec: fixed typo
7902
7903 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7904
7905         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7906         gen51Code): more efficient parameter receive for --model-large
7907         ("bug" #845294)
7908
7909 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7910
7911         * src/ds390/main.c,
7912         * src/z80/main.c: added missed needLinkerScript flags (more than
7913         one port structure defined in these file)
7914         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7915         bug #795325
7916
7917 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7918
7919         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7920         * src/port.h: added flag needLinkerScript in port->linker
7921         structure to inform whether to create a .lnk file or not,
7922         * src/avr/main.c,
7923         * src/ds390/main.c,
7924         * src/hc08/main.c,
7925         * src/mcs51/main.c,
7926         * src/pic/main.c,
7927         * src/pic16/main.c,
7928         * src/xa51/main.c,
7929         * src/z80/main.c: changed appropriately to configure
7930         needLinkerScript flag
7931         * src/pic/gen.c,
7932         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7933         * src/pic/glue.c: added variable udata_section_name to
7934         override default uninitialized data segment definition for
7935         devices only with SHAREBANK memory (reported from Erik Epetrich)
7936         * (pic14emitOverlay): modified to emit a commented overlay segment
7937         directive when no overlay data exist
7938         * (picglue): modified to emit uninitialized data segment
7939         according to udata_section_name
7940         * src/pic/main.c (_pic14_parseOptions): added command line
7941         options --udata-section-name=[name] to override default
7942         udata definition name
7943         * modified _linkCmd and _asmCmd to include compiler passed
7944         arguments via -W option
7945         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7946         object file from '.rel' to '.o' in port->linker structure,
7947         changed size of fptr from 2 to 3 in port structure
7948
7949 2004-01-07  Borut Razem <borut.razem AT siol.net>
7950
7951         * support/scripts/sdcc.nsi: update PATH
7952         * support/scripts/sdcc.ico: craeted
7953
7954 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7955
7956         * device/include/Makefile.in: fix install
7957         * doc/Makefile: fix install
7958
7959 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7960
7961         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7962         in bug #860505
7963         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7964         how the function variable allocation summary is displayed; also
7965         include information about variables allocated to the overlay
7966         segment
7967
7968 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7969
7970         * as/mcs51/lkmain.c: Help about -Y option
7971         * as/mcs51/lkarea.c: Fixed gcc warnings
7972
7973 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7974
7975         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7976         fixed warning
7977         * support/valdiag/tests/overflow.c: added
7978         * src/SDCCast.c (decorateType),
7979         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7980         LEFT_OP (left shift)
7981
7982 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7983
7984         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7985         (default behaviour).
7986
7987 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7988
7989         A python script to validate compiler diagnostic messages. It can be
7990         used to verify that sdcc complains about bad c source code and
7991         gives a good location of the error.
7992         * support/valdiag/Makefile,
7993         * support/valdiag/valdiag.py,
7994         * support/valdiag/tests/*
7995
7996 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7997
7998         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7999         * src/SDCCsymt.c (newEnumType),
8000         * src/SDCCsymt.h
8001         * support/Util/SDCCerr.c,
8002         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
8003         enum related bugs.
8004         * support/regression/tests/enum.c: added test for enum values that
8005         require at least 2 bytes of storage.
8006
8007 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8008
8009         * src/common.h: added ifndef/define/endif macros
8010         around the header file.
8011         Bug reported from Jesus Calvino-Fraga
8012
8013 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8014
8015         * sdcc.spec: updated
8016         * device/include/Makefile.in: don't install CVS directories
8017         * device/lib/Makefile.in: added removal of CVS directories after install
8018         * doc/Makefile: fixed install, added local_icons
8019         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
8020         * src/mcs51/gen.c (genRightShift): fixed bug #870788
8021         * src/ds390/gen.c (genRightShift): fixed bug #870788
8022         * src/SDCCast.c (decorateType): fixed bug #870781
8023
8024 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8025
8026         PIC16 port related changes:
8027         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
8028         added variable stackPos,
8029
8030         * gen.c: genCall, assignResultValue: added support for
8031         pushing/retrieving function parameters to/from stack,
8032         genFunction,genEndFunction: setup stack frame for the
8033         generated function,
8034         genAddrOf: will be changed according to bug 863624
8035
8036         * added files genutils.c and genutils.h which contain gen*
8037         debugged and optimised functions extracted from gen.c
8038
8039         * glue.c: added variable 'externs' which holds extern symbols,
8040         pic16emitRegularMap: is modified to properly handle relocatable
8041          symbols under the new scheme,
8042         pic16createInterruptVect: is modified
8043         pic16printPublics: is modified to emit 'global' assembler directives,
8044         added pic16_printExterns to print extern symbols,
8045         pic16glue: initializes stack/frame pointer in the beginning of
8046         the assembly output. Temporary hack, will be corrected later,
8047         because gplink yet does not support stack and SDCC does not
8048         yet support a type of crt0.o object to create the final binary.
8049
8050         * Removed many lines that contain 8051 legacy code.
8051         * The code is finally placed under a 'code' directive.
8052         * Added port specific options.
8053
8054         * _process_pragma: simplified since now we do not need *special*
8055         include file to define SFR registers. But a separate header
8056         will be needed. This will be developed later.
8057         * _pic16_parseOptions: added, parses port specific options:
8058         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
8059         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
8060         --preplace-udata-with=
8061
8062         * _pic16_setDefaultOptions: modified to initialize section names,
8063         but hack is temporarly out of order since it needs improvement.
8064         * _pic16_genAssemblerPreamble: configuration words are emitted by
8065         their address instead of their name. This part is incomplete and
8066         supports only the 18Fxx2 devices. Other devices will emit an error
8067         during assembly since they do not contain the same set of config
8068         registers
8069         * _pic16_genIVT: is modified,
8070
8071         * pcode.c: added definitions for some hardware registers that are needed
8072         for stack support
8073         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
8074         All PCI entries are updated. Now LFSR is supported.
8075         * Removed pic16_pciTRIS is mentioned by mdubuc in source
8076         * added pic16_newpCodeOpLit2 to support instructions with
8077         two literal arguments
8078         * pic16_pCode2str: corrected code that emits assembler instructions
8079         with two literal operands and those that have an access bit modifier
8080         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
8081         this fixes a bug which caused some labels to be lost, when an
8082         assembler directive was added, i.e. banksel,
8083         * pic16_FixRegisterBanking: improved logic that causes the insertion
8084         of bank switching,
8085         * InlineFunction: functions that are called once, are not any more
8086         inlined. This can be a port option in the future,
8087
8088         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
8089
8090         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
8091         hold the corresponding uninitialized symbols,
8092         * pic16_allocProcessorRegister: registers have explicit marked the
8093         accessBank field,
8094         * pic16_allocInternalRegister: registers are explicit marked as
8095         not used,
8096         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
8097         processing list, so bit registers were lost,
8098         *
8099
8100         * ralloc.h: added field 'accessBank' and original symbol operand
8101         in register definition,
8102         * removed the field isMapped from register definition,
8103
8104         ** Several functions have been removed from various sources:
8105         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
8106         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
8107         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
8108         pic16_assignRelocatableRegisters
8109
8110         ** others have been introduced:
8111         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
8112         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
8113
8114 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
8115
8116         * support/scripts/inc2h.pl: changed definition of BIT_AT
8117         to emit 'sbit at' instead of 'bit at'. This was a request.
8118
8119         PIC16 port related preliminary changes:
8120         * gen.c: prefixed function popRegFromString with
8121         pic16_ and all references to it corrected
8122         * pcode.c: all pic16_pc_* hardware registers prefixed
8123         with underscore (_),
8124         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
8125         * ralloc.c: newReg(): when register is REG_SFR then
8126         set address to rIdx,
8127         pic16_allocProcessorRegister(): marks register wasUsed=0
8128         pic16_writeUsedRegs(): added a call to assign processor
8129         registers via pic16_assignFixedRegisters
8130
8131 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8132
8133         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
8134         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
8135         variables in unused register banks.  Also the SSEG is placed
8136         wherever there is enough space for it, and IDATA can be anywhere
8137         in internal RAM.  For now compile using -Wl-Y[stack_size].
8138         The mem file is different for this option as well, since it
8139         makes no sense of talking about DSEG lenght.
8140
8141 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
8142
8143         * src/SDCClrange.c: fixed bug 869095 that caused segfault
8144         in certain cases, e.g. when ROM assignment, patch provided
8145         from Albert den Haan.
8146
8147 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
8148
8149         Many signedness and type propagation fixes:
8150         * src/SDCCicode.c: made geniCodeCast() static
8151         replaced SPEC_ by IS_ (cosmetic)
8152         (operandOperation): fixed div and mod operation
8153         (usualBinaryConversions): added support for promotion of char
8154         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
8155         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
8156         (geniCodeAdd): an array index will stay unsigned, even if promoted
8157         from char to int
8158         (geniCodeArray): ditto
8159         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
8160         * src/SDCCsymt.c (computeType): added more support for char;
8161         promotion of char is selectable by promoteCharToInt, fixed signedness
8162         for all cases
8163         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8164         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8165         * src/SDCCval (val*): replaced signedness calculation by
8166         computeType()
8167         rearranged if-branches (cosmetic)
8168         (valShift): added warning W_SHIFT_CHANGED
8169         (valCompare): fixed problem with different types
8170         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
8171         * support/regression/tests/literalop.c: added many cases
8172         * support/regression/tests/ast_constant_folding.c: changed finally to
8173         'unsigned int'
8174         * .version: new year, new version: 2.3.7
8175         * src/SDCCmain.c (main): applied patch #866468
8176         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
8177         provided by Scott Bronson
8178         * doc/sdccman.lyx: updated documentation for sdcdb
8179         updated and added chapter tips
8180
8181 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8182
8183         * src/SDCCsymt.h: missing from yesterday's commits
8184
8185 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8186
8187         * src/SDCC.y (struct_or_union_specifier),
8188         * support/Util/SDCCerr.c,
8189         * support/Util/SDCCerr.h: verify that struct & union tags are used
8190         as declared.
8191
8192 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8193
8194         * src/SDCCglobl.h: missing from yesterday's commits
8195
8196 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8197
8198         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
8199         sft_attributes, struct_declaration, parameter_declaration,
8200         type_name, start_block, declaration_list),
8201         * src/SDCC.lex (check_type): support redefinition of typedef names
8202
8203 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8204
8205         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
8206         aligned xdata arrays. Erik helped me with the if clause.
8207
8208 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8209
8210         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
8211         warning
8212
8213 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8214
8215         * src/SDCCast.h,
8216         * src/SDCCast.c (newAst_),
8217         * src/SDCCicode.h,
8218         * src/SDCCicode.c (ast2iCode, newiCode),
8219         * src/SDCCglobl.h,
8220         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
8221         expr, statement, expression_statement, selection_statement,
8222         iteration_statement, expr_opt, jump_statement): foundation for tracking
8223         sequence points
8224         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
8225         point code too)
8226
8227 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8228
8229         * support/Util/SDCCerr.c,
8230         * src/SDCCast.h,
8231         * src/SDCCast.c (createCase, createDefault, decorateType),
8232         * src/SDCClabel.c (labelUnreach),
8233         * src/SDCC.y (labeled_statement, jump_statement): More improvements
8234         to error messages.
8235         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
8236         (with thanks to Stas Sergeev)
8237         * device/include/time.h,
8238         * device/lib/time.c (CheckTime): suppress unreachable code warning
8239
8240 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8241
8242         * src/SDCCast.c (createIvalCharPtr),
8243         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
8244         bug #753752)
8245         * support/regression/tests/nullstring.c: tests for these two bugs
8246
8247 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8248
8249         * support/Util/SDCCerr.h,
8250         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
8251         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
8252         about storage class and 'at' used inside struct or union
8253         * src/SDCCBBlock.c (iCodeFromeBBlock),
8254         * src/SDCCcse.c (ifxOptimize),
8255         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
8256         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
8257         printIval, emitStaticSeg, emitOverlay),
8258         * src/SDCClabel.c (deleteIfx),
8259         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
8260         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
8261         gatherAutoInit, processParms),
8262         * support/Util/SDCCerr.h,
8263         * support/Util/SDCCerr.c (werrorfl): Support for better error location
8264         reporting for post-parse errors.
8265
8266 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8267
8268         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
8269         implicit casts via union; they don't work on big endian systems
8270         (possible fix for bug #861138)
8271
8272 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8273
8274         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
8275         * src/mcs51/main.c: fixed the fix for bug #737001
8276
8277 2003-12-15  Borut Razem <borut.razem AT siol.net>
8278
8279         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
8280
8281 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8282
8283         * support/makebin/makebin.c: put output in binary mode
8284
8285 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8286
8287         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
8288         xdata and data memory on startup. Set the environment variable
8289         SDCC_NOGENRAMCLEAR to disable this.
8290         * src/mcs51/peephole.def,
8291         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
8292         (allows non-interrupt and interrupt code to safely compete for a resource
8293         without the non-interrupt code having to disable interrupts)
8294
8295 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8296
8297         * src/SDCCicode.c (geniCodeAdd),
8298         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
8299         with valFromType if type might be a pointer and host is big endian).
8300         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
8301         types, not just integer types.
8302         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
8303         multiply defined with mismatching "at" address.
8304
8305 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8306
8307         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
8308         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
8309         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
8310         with embedded nulls (fixed bug #753752)
8311
8312 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8313
8314         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
8315         Apparently this did not see much testing (endless loop)
8316
8317 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8318
8319         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
8320
8321 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8322
8323         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
8324         gracefully handle NULL memmap pointers
8325
8326 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8327
8328         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
8329         instead of deleting the iCode when an operand is volatile
8330         * src/z80/gen.c (genDummyRead),
8331         * src/mcs51/gen.c (genDummyRead),
8332         * src/ds390/gen.c (genDummyRead),
8333         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
8334         not just IC_RIGHT
8335         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
8336         * src/SDCC.y: fixed bug #850420
8337
8338 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8339
8340         Applied z80 i/o port patch from Peter Townson and fixed some operators
8341         to better handle operands in A register.
8342         * device/include/z180.h
8343         * src/SDCC.y
8344         * src/SDCCglue.c
8345         * src/z80/gen.c
8346         * src/z80/gen.h
8347         * src/z80/main.c
8348         * src/z80/peeph-z80.def
8349         * src/z80/peeph.def
8350         * src/z80/z80.h
8351
8352 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8353
8354         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
8355
8356 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8357
8358         * device/lib/hc08/_mullong.c: Removed extra #endif
8359
8360 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8361
8362         * sim/ucsim/hc08.src/inst.cc,
8363         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8364         carries from x to h
8365         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8366         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8367         * device/include/stdarg.h: fixed varargs for hc08
8368         * device/lib/Makefile.in,
8369         * device/lib/hc08/Makefile,
8370         * device/lib/hc08/_mulint.c,
8371         * device/lib/hc08/_mullong.c: fixed some endian problems
8372
8373 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8374
8375         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8376         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8377         * device/lib/_gptrget.c,
8378         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8379
8380 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8381
8382         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8383         * src/SDCCast.c (astErrors): fixed bug #846007
8384         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8385
8386 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8387
8388         * src/SDCCast.c (decorateType): disabled a transformation I added in
8389         revision 1.188 (access to fields of a structure at an absolute address);
8390         it breaks with bitfields, extern declarations, and gcse analysis.
8391         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8392         could be assigned through a pointer, so don't complain.
8393         * src/SDCCast.c (astErrors),
8394         * src/SDCCast.h,
8395         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8396
8397 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8398
8399         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8400         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8401         output of __config directives, since gpasm now supports them
8402         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8403         pre-processor macro, i.e. -DMCU=p18f452
8404         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8405         and modified to handle 'cast' icode similarly to '=' icode
8406         * src/pic16/device.h (typedef struct PIC_device): added field
8407         'extMIface' to indicate that chip has external memory interface
8408         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8409         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8410         18F8720
8411
8412 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8413
8414         * src/SDCC.y (pointer): fixed bug #846006
8415         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8416         * src/SDCCast.c (decorateType): fixed bug #846009
8417         * src/ds390/peeph.def,
8418         * src/ds390/gen.c (genAnd, genOr),
8419         * src/mcs51/peeph.def,
8420         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8421
8422 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8423
8424         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8425         * src/SDCCdflow.c
8426         * src/SDCCcse.c
8427         * src/SDCCcse.h
8428         * src/SDCCBBlock.h
8429         * src/SDCCBBlock.c
8430
8431 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8432
8433         fixed bug #845089
8434         * src/SDCCbitv.h,
8435         * src/SDCCbitv.c: added function to free a bitvector
8436         * src/SDCClrange.h,
8437         * src/SDCClrange.c: added function to recompute the liveranges
8438         * src/avr/ralloc.c,
8439         * src/ds390/ralloc.c,
8440         * src/hc08/ralloc.c,
8441         * src/mcs51/ralloc.c,
8442         * src/pic/ralloc.c,
8443         * src/pic16/ralloc.c,
8444         * src/xa51/ralloc.c,
8445         * src/z80/ralloc.c: recompute the liveranges after register packing
8446
8447 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8448
8449         * src/SDCCloop.c (newInduction): fixed bug #845630
8450
8451 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8452
8453         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8454         inadvertantly left behind from my 2003-11-12 change
8455
8456 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8457
8458         Updated headers I neglected to commit yesterday.
8459         * src/SDCClrange.h,
8460         * src/SDCCicode.h
8461
8462 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8463
8464         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8465         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8466         * src/SDCCopt.c (eBBlockFromiCode),
8467         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8468         the creation of the key hash table from the sequencing so it can be used
8469         earlier (for some GCSE bug fixes still pending)
8470
8471 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8472
8473         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8474         * support/regression/tests/addsub.c: testing genPlus shortcut
8475
8476 2003-11-15  Borut Razem <borut.razem AT siol.net>
8477
8478         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8479
8480 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8481
8482         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8483         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8484         ordering is immaterial.
8485         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8486
8487 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8488
8489         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8490         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8491         (SIGSEV) of bug #840381
8492         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8493         unlink new file before rename if new and old filenames are the same)
8494
8495 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8496
8497         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8498         uninitialized variables) for the mcs51. Set environment variable
8499         SDCC_GENRAMCLEAR to test.
8500         xdata initialization slightly shorter
8501
8502 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8503
8504         * src/SDCCsymt.h,
8505         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8506         #838241 & 780691 (basicly the same bug)
8507         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8508         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8509
8510 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8511
8512         * src/SDCCmain.c (linkEdit): "fix" #834252
8513
8514 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8515
8516         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8517         * src/SDCCast.h,
8518         * src/SDCC.y: fixed bug #819403
8519
8520 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8521
8522         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8523         the reentrant attribute.
8524         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8525         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8526         simulation
8527         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8528         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8529         erroneously reduced to a literal.
8530         * src/hc08/ralloc.c (packRegisters, rematStr),
8531         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8532         some cases
8533
8534 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8535
8536         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8537         * doc/sdccman.lyx: changed from 'article' to 'book'
8538         * doc/Makefile: readded test_suite_spec and cdbfileformat
8539
8540 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8541
8542         * device/include/stdlib.h: include malloc.h to comply with ANSI
8543         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8544
8545 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8546
8547         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8548         * doc/clean.mk: also remove *.out files
8549         * doc/sdccman.lyx: some additions, larger top/bottom margins
8550
8551 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8552
8553         * src/SDCC.y: fixed bug #837365
8554         * support/regression/tests/bitopcse.c
8555         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8556         a symbol (might be valop instead)
8557         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8558         * device/lib/clean.mk: added hc08 to the cleaning list
8559
8560 2003-11-04  Borut Razem <borut.razem AT siol.net>
8561
8562         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8563           made 2003-11-04
8564         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8565           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8566           malloc is declared in standard stdlib.h
8567
8568 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8569
8570         * device/lib/hc08/Makefile: need to clean .rel not .o files
8571         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8572
8573 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8574
8575         * src/port.h,
8576         * src/hc08/main.c,
8577         * src/mcs51/main.c,
8578         * src/ds390/main.c,
8579         * src/z80/main.c,
8580         * src/avr/main.c,
8581         * src/pic/main.c,
8582         * src/pic16/main.c,
8583         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8584         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8585         tests (which uses the port's oclsExpense function)
8586         * src/SDCC.y,
8587         * src/SDCCast.c,
8588         * src/SDCCicode.c,
8589         * src/hc08/gen.c,
8590         * src/ds390/gen.c,
8591         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8592
8593 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8594
8595         * src/SDCCcse.c (ifxOptimize),
8596         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8597         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8598         deleting the IFX iCode.
8599         * src/hc08/ralloc.c: reduced unneeded slocs
8600         * src/hc08/gen.c: fixed bug in asmopToBoolean
8601
8602 2003-11-04  Borut Razem <borut.razem AT siol.net>
8603
8604         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8605           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8606           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8607           transferred to configure
8608
8609 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8610
8611         Use headers defined in the C[++] standards:
8612         * sim/ucsim/gui.src/serio.src/fileio.cc
8613         * sim/ucsim/gui.src/serio.src/frontend.cc
8614         * sim/ucsim/gui.src/serio.src/main.cc
8615         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8616         * support/Util/NewAlloc.c
8617         * as/hc08/lklibr.c
8618         * as/mcs51/lklibr.c
8619         * as/z80/aslist.c
8620         * as/z80/assym.c
8621
8622 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8623
8624         * Added MSVC projects for hc08 assembler and linker:
8625         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8626         /as/hc08/link_hc08.dsp
8627
8628 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8629
8630         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8631
8632 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8633
8634         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8635
8636 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8637
8638         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8639
8640 2003-10-31  Borut Razem <borut.razem AT siol.net>
8641
8642         * support/cpp2/cpplib.h,
8643           support/cpp2/cpplib.c,
8644           support/cpp2/cpplex.c,
8645           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8646           to switch _asm block preprocessing on / off. Default is
8647           #pragma preproc_asm +
8648
8649 2003-10-31  Borut Razem <borut.razem AT siol.net>
8650
8651         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8652           when outputting comment blocks (when executed with -C option) and
8653           _asm (SDCPP specific) blocks
8654
8655 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8656
8657         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8658
8659 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8660
8661         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8662
8663 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8664
8665         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8666         * src/SDCCast.c (decorateType): fixed bug #832664
8667
8668 2003-10-31  Borut Razem <borut.razem AT siol.net>
8669
8670         * support/cpp2/cpplex.c: fixed for SDCPP:
8671           comments(when executed with -C option) and _asm blocks
8672           were included even if they where in skipped #if block.
8673           Applied solution from GCC cpp 3.3.2
8674
8675 2003-10-31  Borut Razem <borut.razem AT siol.net>
8676
8677         * src/SDCC.lex: sdcc now understands both formats:
8678           '# <line_number> <file_name>' and
8679           '#line <line_number> <file_name>'
8680         * support/cpp2/cppmain.c: sdcpp now generates the standard
8681           '# <line_number> <file_name>' instead of former
8682           '#line <line_number> <file_name>'
8683
8684 2003-10-30  Borut Razem <borut.razem AT siol.net>
8685
8686         * support/cpp2/cpphash.h,
8687         * support/cpp2/cpplib.h
8688         * support/cpp2/cpplex.c,
8689         * support/cpp2/cppmain.c,
8690         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8691
8692 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8693
8694         Fixed a number of problems revealed by bug #827883.
8695         * src/SDCCloop.c (loopInvariants): Spill location of the
8696         result operand should be recomputed if extracted from
8697         a loop. Also, don't extract assignments of an iTemp
8698         from a literal.
8699         * src/SDCCast.c (isConformingBody): loop reversal should
8700         not occur if the control variable is involved with a
8701         relational operator.
8702
8703 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8704
8705         * .version: bumped to 2.3.6 to reflect the big improvements
8706         made by Erik and Klaus. Thanks!
8707
8708 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8709
8710         Replaced the livrange code.
8711         * src/SDCClrange.c: added new LR code
8712         * src/SDCCloop.c,
8713         * src/SDCCBBlock.h: removed remainig parts from old LR code
8714         * src/ds390/ralloc.c,
8715         * src/ds390/gen.c: minor fixes to make it work with new code
8716
8717 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8718
8719         * as/hc08/asm.h,
8720         * as/hc08/lkrloc.c,
8721         * src/hc08/gen.c,
8722         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8723         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8724         (tweaked fix for bug #818696)
8725
8726 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8727
8728         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8729
8730 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8731
8732         * src/SDCCmain.c,
8733         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8734         * src/mcs51/gen.c (gencjneshort),
8735         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8736         more efficient (per Scott Bronson's suggestion)
8737
8738 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8739
8740         Extended the semantics of the critical keyword to include
8741         individual statements. See RFE #827755 and #799831
8742         * src/SDCC.y
8743         * src/SDCCicode.c
8744         * src/SDCCopt.c
8745         * src/SDCCast.c
8746         * support/Util/SDCCerr.c
8747         * support/Util/SDCCerr.h
8748         * src/mcs51/gen.c
8749         * src/ds390/gen.c
8750         * src/hc08/gen.c
8751
8752 2003-10-19  Borut Razem <borut.razem AT siol.net>
8753
8754         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8755
8756 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8757
8758         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8759         Fixed bug #818696
8760         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8761         and predecrement operand is displayed
8762
8763 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8764
8765         * src/SDCCval.c (valMinus): fixed bug #826041
8766
8767 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8768
8769         Some hc08 related updates that I missed earlier
8770         * sim/ucsim/stypes.h
8771         * support/regression/ports/hc08/spec.mk
8772
8773 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8774
8775         New target "hc08" for the Motorola 68hc08 family of micros
8776
8777         * configure
8778         * configure.in
8779         * Makefile
8780         * src/hc08/*
8781         * src/SDCCmain.c
8782         * src/port.h
8783         * sim/ucsim/hc08.src/*
8784         * sim/ucsim/configure.in
8785         * src/ucsim/configure
8786         * sim/ucsim/packages_in.mk
8787         * as/hc08/*
8788         * as/Makefile
8789         * device/include/mc68hc908qy.h
8790         * device/lib/hc08/*
8791         * device/lib/Makefile.in
8792         * support/regression/ports/hc08/*
8793         * support/regression/Makefile
8794
8795 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8796
8797         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8798         regression test
8799         * src/ds390/gen.c (genCast): fixed bug #821957
8800
8801 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8802
8803         * device/lib/logf.c: "fixed" overlay bug
8804         * support/regression/ports/host/spec.mk: added m library
8805         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8806         * support/regression/tests/float_trans: added (for Eric)
8807
8808 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8809
8810         * src/mcs51/gen.c (genCpl): fixed bug
8811         http://sf.net/mailarchive/message.php?msg_id=6263915
8812
8813 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8814
8815         * src/SDCCast.c (decorateType): added extended constant folding
8816         * src/SDCCsymt.c (computeType): cleanup
8817         * src/SDCCval.c (valShift): minor optimization
8818         * support/regression/tests/ast_constant_folding.c: added
8819
8820 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8821
8822         * src/SDCCmain.c: removed some unintended changes
8823
8824 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8825
8826         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8827         * src/z80/gen.c: fixed part of bug #817589
8828         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8829
8830 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8831
8832         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8833         * src/SDCCcflow.c
8834         * src/SDCCcse.c
8835         * src/SDCCdflow.c
8836         * src/SDCClabel.c
8837         * src/SDCClrange.c
8838         * src/SDCCmem.c
8839         * src/SDCCopt.c
8840         * src/SDCCpeeph.c
8841         * src/SDCCset.c
8842         * src/avr/ralloc.c
8843         * src/ds390/ralloc.c
8844         * src/izt/ralloc.c
8845         * src/mcs51/ralloc.c
8846         * src/pic/ralloc.c
8847         * src/pic16/ralloc.c
8848         * src/xa51/ralloc.c
8849         * src/z80/ralloc.c
8850         * src/z80/gen.c: removed unused label "release:"
8851
8852 2003-10-06  Borut Razem <borut.razem AT siol.net>
8853
8854         * src/SDCC.lex: removed definition of unused variables
8855           save_optimize and save_options
8856
8857 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8858
8859         * clean.mk: removed '=' in "-maxdepth=1"
8860         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8861         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8862
8863 2003-10-06  Borut Razem <borut.razem AT siol.net>
8864
8865         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8866           my_unput() replaced by unput()
8867
8868 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8869
8870         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8871         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8872         type-punned pointer will break strict-aliasing rules"
8873         Old LR behaviour is again default; Klaus' LR can be choosen by
8874         defining the environment variable LRKLAUS
8875         * src/SDCCBBlock.h
8876         * src/SDCCloop.c
8877         * src/SDCClrange.c
8878         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8879         * clean.mk: fixed removal of files in bin/CVS/
8880         * device/lib/clean.mk: fixed removal of directories small and large
8881         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8882         * src/SDCCicode.c,
8883         * src/SDCCval.c: removed superflous test for pedantic
8884
8885 2003-10-05  Borut Razem <borut.razem AT siol.net>
8886
8887         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8888           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8889           message "unmatched #pragma SAVE and #pragma RESTORE"
8890
8891 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8892
8893         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8894           assembly, critical functions, atomic, nojtbound)
8895
8896 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8897
8898         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8899         * src/SDCCBBlock.h
8900         * src/SDCCloop.c
8901         * src/SDCCloop.h
8902         * src/SDCClrange.c
8903
8904 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8905
8906         * src/z80/gen.h,
8907         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8908         * src/mcs51/gen.h
8909         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8910         * src/ds390/gen.h
8911         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8912         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8913         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8914
8915 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8916
8917         * src/z80/gen.c (genRet): fixed bug #524753
8918         * src/z80/gen.c (genCast): fixed internal error on cast from
8919         pointer to long
8920         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8921         fix for bug #477835 to the z80
8922         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8923         for tracking iCodes in the peephole optimizer for z80
8924
8925 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8926
8927         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8928         the other part of bug #814548
8929         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8930
8931 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8932
8933         * src/SDCCcse.c: fixed part of bug #814548
8934
8935 2003-09-28  Borut Razem <borut.razem AT siol.net>
8936
8937         * src/asm.c: rewrite of printILine() to use temporary file instead
8938           a pipe
8939         * src/xa51/main.c: commented out declaration of int rewinds
8940
8941 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8942
8943         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8944
8945 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8946
8947         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8948         * src/asm.c (printILine): Fixed bug #811015
8949
8950 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8951
8952         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8953         freeing.
8954
8955 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8956
8957         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8958         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8959         to correctly handle general case of AOP_PAIRPTR
8960         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8961
8962 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8963
8964         * src/mcs51/ralloc.c (fillGaps),
8965         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8966         register positioning bug)
8967
8968 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8969
8970         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8971
8972 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8973
8974         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8975         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8976         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8977         (ralloc doesn't intentionally do this now, but perhaps later)
8978         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8979         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8980         register positioning bugs (Fixed bug #762602 and #795325)
8981         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8982         (Fixed bug #808779)
8983         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8984         lines that --i-code-in-asm generates
8985
8986 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8987
8988         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8989         trying to fclose a FILE* that was already closed.
8990
8991 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8992
8993         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8994         of const struct should be treated as if const themselves)
8995
8996 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8997
8998         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8999
9000 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9001
9002         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
9003         Unix (/n) and DOS (/r/n) line terminations.
9004
9005 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9006
9007         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
9008         bug #613775
9009
9010 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9011
9012         * src/mcs51/gen.c (genFunction, genEndFunction),
9013         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
9014         and restore of EA so that stack offsets to parameters are
9015         correct when using both critical and reentrant/stack-auto.
9016         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
9017         size (can be triggered in error if sloc is shared between
9018         different sized objects)
9019         * device/include/float.h: fixed macros to explicitly use
9020         unsigned long where needed
9021
9022 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
9023
9024         Feature req. 799831: added code to allow nesting of critical functions
9025         * src/mcs51/gen.c (genFunction, genEndFunction)
9026         * src/ds390/gen.c (genFunction, genEndFunction)
9027
9028 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9029
9030         * src/SDCCsymt.c (sclsFromPtr),
9031         * src/SDCCsymt.h,
9032         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
9033         support for standard C idiom of memory mapped variables; for
9034         example, *((xdata int*)0x1234) = 1 is now internally equivalent
9035         to xdata int at 0x1234 tempvar = 1.
9036         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
9037         provided by Akiya ISHIDA
9038
9039 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
9040
9041         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
9042         * src/SDCCval.c (constVal): added reduction from int to char
9043         * src/SDCCval.c (valMult, valDiv): fixed sign handling
9044         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
9045         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
9046         to ignore the sign
9047         * support/regression/tests/shifts.c: fixed
9048
9049 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9050
9051         * src/z80/gen.c (genXor): Fixed bug #805445
9052
9053 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9054
9055         Fixed bug #621531 (const & volatile confusion in the type chain).
9056         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
9057         refer to the const or volatile state of the pointer itself.
9058
9059         * src/SDCCast.c
9060         * src/SDCCglue.c
9061         * src/SDCCicode.c
9062         * src/SDCCsymt.c
9063         * src/SDCCval.c
9064         * src/SDCC.y
9065         * src/SDCCsymt.h
9066         * src/pic/gen.c
9067         * src/pic/ralloc.c
9068         * src/pic16/gen.c
9069         * src/pic16/ralloc.c
9070         * support/regression/tests/const.c
9071
9072 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9073
9074         When checking for duplicated modules, use absolute paths
9075         instead of relative paths.  Files changed:
9076
9077         * as/mcs51/lklib.c
9078         * link/z80/lklib.c
9079
9080 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9081
9082         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
9083
9084 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9085
9086         * device/include/string.h: added size_t typedef, changed
9087         prototypes to use size_t, eliminated separate reentrant and
9088         non-reentrant declarations, added _memmove declaration
9089         * device/lib/_memcpy.c: changed to use size_t instead of int,
9090         changed /4 to >>2 to avoid division library call
9091         * device/lib/_memcmp.c,
9092         * device/lib/_memset.c,
9093         * device/lib/_strncat.c,
9094         * device/lib/_strncpy.c,
9095         * device/lib/_strncmp.c: changed to use size_t instead of int
9096         * device/lib/_memmove.c: new file (fixed bug #772294)
9097         * device/lib/Makefile.in: added _memmove.c
9098         * device/lib/z80/asm_strings.s: fixed bug #772290
9099         * support/regression/tests/bitfields.c: attempt to fix host assertion
9100         failure on amd64-unknown-linux2.2
9101
9102 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9103
9104         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
9105         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
9106         * as/z80/asmain.c (main): fixed bug #801766
9107
9108 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
9109
9110         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
9111         compilers
9112
9113 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9114
9115         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
9116         reported in bug #800609
9117
9118 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
9119
9120         * Top header beautifications in src/pic16 directory:
9121           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
9122           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
9123           pcoderegs.h, ralloc.c, ralloc.h
9124         * main.c: added top header and GPL license notice
9125         * pcode.c: fixed the if-conditional warning
9126
9127 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
9128
9129         * device/lib/_mullong.c: replaced int by short for gcc
9130
9131 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9132
9133         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
9134         and JUMPTABLE iCodes properly now (worked by accident before)
9135         * src/mcs51/gen.c (leftRightUseAcc),
9136         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
9137         iCode properly now. Use getSize instead of nRegs since a & b
9138         aren't part of the nRegs tally.
9139
9140 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
9141
9142         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
9143         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
9144           before instructions that use the _STATUS register
9145
9146 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
9147
9148         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
9149         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
9150         fetching of the pointer
9151         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
9152         copied from genNearPointerSet()
9153         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
9154         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
9155         If they pop r0/r1 they must be called in the opposite order than aopOp().
9156         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
9157         (resp. --stack-auto), prepared for --xstack
9158
9159 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9160
9161         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
9162
9163 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9164
9165         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
9166         these ports have their own __sdcc_external_start()
9167
9168 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
9169
9170         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9171         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
9172         type for bits was changed. It resulted in bit variables becoming
9173         global, which is not permitted in PIC 14 assembly output.
9174
9175 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9176
9177         * doc/sdccman.lyx: various additions and updates. Rearranged sections
9178
9179 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9180
9181         Z80 and MCS51 linkers complaint if a public symbol is defined
9182         in more than one library module:
9183
9184         * as/mcs51/lklib.c
9185         * link/z80/lklib.c
9186         * as/mcs51/Makefile.in
9187
9188 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9189
9190         A few small changes that speed up the peephole optimizer.
9191
9192         * src/SDCCpeeph.c
9193
9194 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9195
9196         Try to make the peephole optimizer smarter by maintaining
9197         an association between the assembly source code and the
9198         iCodes that originated them. Put this information to use
9199         with a new peephole rule condition "notVolatile" so that
9200         the rules can be aggressive yet still safe.
9201
9202         * src/SDCCpeeph.c
9203         * src/SDCCpeeph.h
9204         * src/mcs51/gen.c
9205         * src/mcs51/peeph.def
9206
9207 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9208
9209         Fixed bug #741761
9210
9211         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
9212         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
9213         if the left or right operand symbols have the accuse flag set.
9214
9215 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9216
9217         Changed the type of the result of the ! (NOT) operator to char;
9218         previously it returned the same type as the source. This allows
9219         us to eliminate all the genFloatNot functions (all of its target
9220         implementations were very buggy) since !float can use the same
9221         code as !long now.
9222
9223         * src/SDCCicode.c (ast2iCode): ! returns char
9224         * src/mcs51/gen.c (genNot, genNotFloat),
9225         * src/ds390/gen.c (genNot, genNotFloat),
9226         * src/z80/gen.c (genNot, genNotFloat),
9227         * src/pic/gen.c (genNot, genNotFloat),
9228         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
9229
9230 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
9231
9232         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9233         1. Interrupt would not compile properly. Ensure PCLATH register is saved
9234            during interrupts. Ensure WSAVE is located at a shared bank address.
9235         2. Fixed page selection in some places
9236         3. Fixed BTFSS/C to where necessary use registers directly and not simply
9237            the registers name strings.
9238         4. Fixed "signed / unsigned compare" compiler warnings.
9239         5. The PIC port manages its own allocation of the general purpose
9240            registers, but makes no attempt to reuse them. As a result when
9241            compiling it soon runs out of general purpose registers. Some
9242            additional code was added to the files pcode.c and device.c to walk
9243            through the function call tree and rename the registers so that they
9244            get reused.
9245
9246         * src/pic/device.c
9247         * src/pic/gen.c
9248         * src/pic/glue.c
9249         * src/pic/pcode.c
9250         * src/pic/pcode.h
9251         * src/pic/ralloc.c
9252         * src/pic/ralloc.h
9253         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
9254         genPlus() & genMinus() when the result is the same as left or right
9255
9256 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9257
9258         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
9259
9260 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9261
9262         Made bitfield a distinct type from bit so that bitfields
9263         convert as per ANSI C and bits retain their traditional
9264         boolean style behaviour. Implemented bitfield support in
9265         the z80 port.
9266
9267         * src/SDCCsymt.h,
9268         * src/SDCCsymt.c,
9269         * src/SDCCast.c,
9270         * src/cdbFile.c,
9271         * src/mcs51/gen.c,
9272         * src/ds390/gen.c: bit v bitfield split
9273         * src/z80/gen.c: New support for bitfields
9274         * support/regression/tests/bitfields.c: reenabled z80,
9275         added more tests
9276
9277 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9278
9279         Rules 246.x, 247.x relate to bitfields, the others speed up
9280         access to xdata mapped I/O devices.
9281
9282         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
9283
9284 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9285
9286         Cleaned up genPackBits and genUnpackBits and added two helper
9287         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
9288         for literal assignments in genPackBits (thanks to Frieder for
9289         reminding me).
9290
9291         * src/mcs51/gen.c
9292         * src/ds390/gen.c
9293
9294 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9295
9296         Fixed bug #748310 (pointer to function type mishandled when the
9297         function name is omitted). Also fixed a SIGSEGV when a function
9298         attribute (reentrant, etc) is used on a non-function or on a
9299         function but misplaced before the parameter list.
9300
9301         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
9302         bug #748310
9303         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
9304         * support/Util/SDCCerr.h,
9305         * support/Util/SDCCerr.c: Added func attr misuse error msg
9306
9307 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9308
9309         Fixed bug #787649 by anonymous
9310         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
9311         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
9312
9313 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9314
9315         Fixed numerous bitfield problems.
9316
9317         * src/SDCC.y: More bitfield related error checking
9318         * src/SDCCsymt.h,
9319         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
9320         * support/Util/SDCCerr.h,
9321         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
9322         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9323         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9324         * support/regression/tests/bitfields.c: tests added
9325
9326 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9327
9328         Made the constant following the "interrupt" keyword optional. If
9329         omitted, the function will not automatically be given an entry
9330         in the interrupt vector table (similar to #pragma NOIV, but
9331         less syntacticly kludgy). The interrupt number is also now
9332         range checked. Also fixed a bug in the high order bit example
9333         in the manual.
9334
9335         * src/SDCC.y
9336         * src/SDCCmem.c
9337         * src/SDCCglue.c
9338         * src/SDCCsymt.h
9339         * support/Util/SDCCerr.c
9340         * support/Util/SDCCerr.h
9341         * doc/sdccman.lyx
9342
9343 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9344
9345         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
9346         * src/SDCCicode.c (operandOperation): rewritten some ops
9347         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
9348         * src/SDCCsymt.c (computeType): literals are handled the same way as any
9349         other type
9350         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
9351         be re-activated by defining REDUCE_LITERALS)
9352         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
9353         unsigned, but are signed by default
9354         * src/SDCCval.c (constVal): rearranged
9355         * src/SDCCval.c (valMod): preliminary fix
9356         * src/SDCCval.c (valCastLiteral): use TYPE_* types
9357         * support/regression/literalop.c: added, work in progress
9358
9359 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9360
9361         Generate warnings for useless declarations like "char data;"
9362         that don't do what new users expect.
9363
9364         * src/SDCC.y
9365         * support/Util/SDCCerr.h
9366         * support/Util/SDCCerr.c
9367
9368 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9369
9370         * src/SDCCval.c (valMult): fix overflow detection of negative int
9371
9372 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9373
9374         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9375
9376         Changes to support big endian targets:
9377
9378         * src/ports.h
9379         * src/SDCCglue.c
9380         * src/avr/main.c
9381         * src/ds390/main.c
9382         * src/izt/i186.c
9383         * src/mcs51/main.c
9384         * src/pic/main.c
9385         * src/pic16/main.c
9386         * src/xa51/main.c
9387         * src/z80/main.c
9388
9389 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9390
9391         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9392         * device/lib/time.c: fixed warning "integer overflow in expression"
9393
9394 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9395
9396         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9397         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9398         constants are unsigned; added recognition of "u" flag for unsigned
9399         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9400         * src/SDCCval.c (valDiv, valMod): fixed signdness
9401         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9402         signedness of modulo, left and right shift
9403         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9404         * support/Util/SDCCerr.h: added warning W_INT_OVL
9405         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9406         * src/SDCCast.c (ast_print): improved output of constants
9407
9408 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9409
9410         Fixed some warnings when building with MSVC:
9411
9412         * as/mcs51/asdata.c
9413         * as/z80/asdata.c
9414         * as/mcs51/asm.h
9415         * as/z80/asm.h
9416         * link/z80/aslink.h
9417         * link/z80/lkdata.c
9418         * link/z80/lkeval.c
9419         * link/z80/lkgb.c
9420         * link/z80/lkihx.c
9421         * link/z80/lks19.c
9422         * link/z80/lksym.c
9423         * support/cpp2/cpplib.c
9424         * src/ds390/gen.c
9425         * src/mcs51/gen.c
9426
9427 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9428
9429         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9430
9431 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9432
9433         * support/librarian/clean.mk: Do not remove Makefile.
9434         * support/librarian/Makefile: added.
9435
9436 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9437
9438         Added librarian to MSVC build:
9439         * all.dsp
9440         * sdcc.dsw
9441         * support/librarian/librarian.dsp
9442
9443         'configure' not needed for librarian, removed:
9444         * support/librarian/configure
9445         * support/librarian/configure.in
9446         * support/librarian/config_in.h
9447         * support/librarian/Makefile.in
9448
9449         Hopefully these ones built the librarian and the rest of sdcc properly:
9450         * Makefile
9451         * Makefile.common.in
9452
9453         Messed up 'configure', so revert to previous version:
9454         * configure
9455         * configure.in
9456
9457 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9458
9459         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9460         there, while the mantissa of a double is "only" 53 bits wide.
9461
9462 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9463
9464         Adding sdcclib to the build.  MSVC project coming soon.
9465         Files added/changed:
9466
9467         * support/librarian/clean.mk
9468         * support/librarian/configure
9469         * support/librarian/configure.in
9470         * support/librarian/config_in.h
9471         * support/librarian/Makefile.bcc
9472         * support/librarian/Makefile.in
9473         * support/librarian/sdcclib.c
9474         * Makefile.bcc
9475         * Makefile
9476         * Makefile.common.in
9477         * configure
9478         * configure.in
9479
9480 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9481
9482         Linker now complaints if linked modules have conflicting options, for
9483         example, one compiled using --model-large and another one compiled with
9484         --model-small.  The following files were modified:
9485
9486         * as/mcs51/asdata.c
9487         * as/mcs51/aslink.h
9488         * as/mcs51/asm.h
9489         * as/mcs51/asmain.c
9490         * as/mcs51/asout.c
9491         * as/mcs51/i51pst.c
9492         * as/mcs51/lkdata.c
9493         * as/mcs51/lklibr.c
9494         * as/mcs51/lkmain.c
9495         * as/z80/asdata.c
9496         * as/z80/asm.h
9497         * as/z80/asmain.c
9498         * as/z80/asout.c
9499         * as/z80/z80pst.c
9500         * link/z80/aslink.h
9501         * link/z80/lkdata.c
9502         * link/z80/lklibr.c
9503         * link/z80/lkmain.c
9504         * src/SDCCglue.c
9505
9506 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9507
9508         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9509         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9510
9511 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9512
9513         * src/z80/mappings.i: fix _mul[us][int,long] entries
9514
9515 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9516
9517         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9518
9519 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9520
9521         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9522         * support/regression/tests/bitopcse.c: added
9523         fixed warning:
9524         * src/avr/gen.c:
9525         * src/pic/gen.c:
9526         * src/pic16/gen.c:
9527         * src/z80/gen.c:
9528         * src/xa51/gen.c:
9529
9530 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9531
9532         added support for new library format to z80, gbz80 linkers:
9533         *link/z80/aslink.h
9534         *link/z80/lklex.c
9535         *link/z80/lklib.c
9536         *link/z80/lklist.c
9537
9538 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9539
9540         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9541         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9542
9543 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9544
9545         added DUMMY_READ_VOLATILE:
9546         * src/SDCC.y:
9547         * src/avr/gen.c:
9548         * src/xa51/gen.c:
9549         * src/z80/gen.c:
9550         * src/pic/gen.c:
9551         * src/pic16/gen.c:
9552         * src/mcs51/gen.c:
9553         * src/ds390/gen.c:
9554         * src/SDCCcse.c (algebraicOpts): many improvements
9555         * src/SDCCcse.h: removed algebraicOpts()
9556         * src/SDCCicode.c (picDummyRead): added
9557
9558 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9559
9560         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9561         "Insufficient space in data memory".
9562
9563 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9564
9565         * src/mcs51/gen.c: fixed bug #771358
9566         * src/z80/gen.c: fixed bug #759087
9567
9568 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9569
9570         * src/pic16/glue.c: minor cleanup by Vangelis
9571
9572 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9573
9574         * device/include/regc515c.h: fixed #758477
9575         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9576         * device/lib/_gptrput.c: saved a few bytes
9577         * my tab spacing is 8, yours too?)
9578         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9579         * device/lib/serial.c: process RX bytes earlier than TX bytes
9580         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9581
9582 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9583
9584         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9585
9586 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9587
9588     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9589
9590 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9591
9592         * device/lib/Makefile.in: bad fix, reverted to 1.43
9593
9594 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9595
9596         * device/lib/Makefile.in: added missing z80 object files
9597
9598 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9599
9600         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9601         pic16 progress by Vangelis:
9602         * src/SDCCglobl.h:
9603         * src/SDCCmain.c:
9604         * src/pic/Makefile:
9605         * src/pic:
9606         * pic/Makefile:
9607         * pic16/device.c:
9608         * pic16/device.h:
9609         * pic16/gen.c:
9610         * pic16/gen.h:
9611         * pic16/genarith.c:
9612         * pic16/glue.c:
9613         * pic16/main.c:
9614         * pic16/pcode.c:
9615         * pic16/pcode.h:
9616         * pic16/pcodepeep.c:
9617         * pic16/peeph.def:
9618
9619 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9620
9621     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9622
9623 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9624
9625     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9626     added gbz80 build to MSVC project.
9627     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9628     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9629     from 8051 stuff and setup so it links using a .lnk file.
9630
9631 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9632
9633     * support/librarian/sdcclib.c: sdcc librarian.
9634     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9635     with sdcclib.
9636
9637 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9638
9639     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9640
9641 2003-07-02  Borut Razem <borut.razem AT siol.net>
9642
9643         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9644         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9645         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9646         src/xa51/main.c, src/z80/main.c:
9647         virtualization of glue() function: each port has it's own glue function,
9648         which is accessed by do_glue function pointer in PORT.general structure
9649
9650 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9651
9652         * DS800C400 fun, improved ROM interface and tinibios.
9653
9654 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9655
9656         * More support for DS80C400. Now includes beginning of interface to ROM.
9657
9658 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9659
9660         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9661
9662 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9663
9664         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9665
9666 2003-06-19  Borut Razem <borut.razem AT siol.net>
9667
9668         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9669
9670 2003-06-19  Borut Razem <borut.razem AT siol.net>
9671
9672         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9673         fixed Z80 port - crt0.o: cannot open.
9674
9675 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9676
9677         * support/Util/MySystem.c (merge_command): revert bad fix
9678
9679 2003-06-18  Borut Razem <borut.razem AT siol.net>
9680
9681         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9682
9683 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9684
9685         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9686         option --use-stdout sends errors to stdout instead of stderr.
9687
9688 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9689
9690         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9691
9692 2003-06-15  Borut Razem <borut.razem AT siol.net>
9693
9694         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9695         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9696         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9697         fixed width array of pointers replaced with sets;
9698         multiple include and lib paths ared transferred to preprocessor and linker
9699         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9700         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9701         fixed width array of pointers
9702         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9703         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9704         fixupPath(), getPathDifference()
9705         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9706         fixed width array of pointers
9707
9708 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9709
9710         * src/pic16/ralloc.c: fix warnings
9711         * src/pic16/pcode.c: fix warning
9712
9713 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9714
9715          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9716         know all the details, but essentially this set of changes enable
9717         the pic16 port to generate movff instructions and generate assembler
9718         directives,
9719         * src/SDCCmain.c:
9720         * src/pic16/gen.c:
9721         * src/pic16/glue.c:
9722         * src/pic16/pcode.c:
9723         * src/pic16/device.c:
9724         * src/pic16/main.c:
9725         * src/pic16/pcode.h:
9726         * src/pic16/pcoderegs.c:
9727         * src/pic16/ralloc.c:
9728         * src/pic16/ralloc.h:
9729
9730 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9731
9732         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9733         added option --vc, so sdcc errors and warnings are compatible with
9734         Microsoft Visual Studio.
9735
9736 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9737
9738         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9739           device/lib/libfloat.lib: added atof function.
9740
9741 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9742
9743         * doc/sdccman.lyx: updated to Lyx 1.3
9744         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9745         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9746         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9747
9748 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9749
9750         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9751
9752 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9753
9754         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9755           additions to the "related tools/documentation" section
9756
9757 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9758
9759         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9760
9761 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9762
9763         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9764         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9765
9766 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9767
9768         * doc/sdccman.lyx: fix double dash and other minor things
9769         * doc/Makefile: fix double dash
9770
9771 2003-05-28  Karl Bongers(patches from Martin Helmling)
9772         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9773           condition and ignore commands.
9774
9775 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9776
9777         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9778           is in parts still quite out of date, I did changes as far as I felt makes sense
9779           for a non-native english speaker.
9780           Please feel free to add to the manual or to correct my changes.
9781         * doc/Makefile: undid touching the date of intermediate tex files.
9782
9783 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9784
9785         * doc/sdccman.lyx: Manual has an index now
9786
9787 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9788
9789         Finalize muluint/mulsint and mululong/mulslong merging:
9790         * device/lib/_mulint.c
9791         * device/lib/_mullong.c
9792         * device/lib/gbz80/mul.s
9793         * device/lib/gbz80/stubs.s
9794         * device/lib/z80/mul.s
9795         * device/lib/z80/stubs.s
9796         * src/SDCCsymt.c (initCSupport)
9797
9798 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9799
9800         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9801         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9802           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9803           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9804           instead of /Zm500.
9805
9806 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9807
9808         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9809           the regression tests I'm not brave enough to enable 245.b, 245.c
9810         * doc/sdccman.lyx: added latex preamble for hyperref package.
9811           Using pdflatex this will give you a hyperlinked pdf file with
9812           bookmarks. (prepend '%' before /usepackage if this breaks something)
9813
9814 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9815
9816          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9817
9818 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9819
9820         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9821
9822 2003-05-21    <johan AT balder>
9823
9824         * src/SDCCglue.c (printIval): fixed bug #739934
9825
9826 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9827
9828         Applied patch from bug 737905 (renamed yylineo to mylineno):
9829         * src/altlex.c
9830         * src/SDCCast.c
9831         * src/SDCglobl.h
9832         * src/SDCC.lex
9833         * src/SDCCsymt.c
9834         * src/SDCCval.c
9835         * src/pic16/pcode.c: Cleaned warnings
9836         * src/pic16/pcodeflow.c: Cleaned warnings
9837         * src/pic16/pcoderegs.c: Cleaned warnings
9838
9839 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9840
9841         * src/pic16/pcode.c: Cleaned warnings
9842         * src/pic16/pcodepeep.c: Cleaned warnings
9843         * src/pic16/ralloc.c: Cleaned warnings
9844
9845 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9846
9847         * doc/sdccman.lyx: fixed bug 739745
9848         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9849
9850 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9851
9852         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9853         it can be defined with CFLAGS when running configure
9854         * src/SDCCmain.c: fixed compiling + linking with object files
9855
9856 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9857
9858         * configure.in: configure for pic16 port,
9859             added --disable-pic16-port
9860         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9861         * src/SDCCmain.c: linkOptions is changed to set *,
9862             added if/endif conditional macros to remove options help
9863             messages from optionsTable when a port is not configured, added
9864             support for the PIc16 port in the ports table, when executing
9865             the compiler with no port specified on command line, a default
9866             port is selected with the new macro DEFAULT_PORT which is
9867             defined in port.h, in setDefaultOptions() linkOptions is removed
9868             from initialization assignment, since now it is a set,
9869             parseCmdLine uses setParseWithComma for linkOptions, in
9870             linkEdit() linkOptions are accessed with new function indexSet()
9871             which returns the i'th item of a set variable. See SDCCset.c, in
9872             linkEdit() when calling buildCmdLine(), added linkOptions as
9873             last argument. Now users can pass arguments to gplink via the
9874             -Wl option, main() uses pic16glue() to glue up pic16 programs
9875         * src/SDCCpeeph.c: various changes to support pic16
9876         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9877             return the i'th item of the set
9878         * src/SDCCset.h: added function prototype for indexSet()
9879         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9880         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9881         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9882             added macro DEFAULT_PORT
9883         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9884         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9885             generated
9886         * src/pic16/glue.c: commented out some error producing lines
9887         * src/pic16/main.c: __config directives are commented out to stop
9888             gpasm complaining and test the linkage with gplink, _linkCmd and
9889             _asmCmd changed to be more gplink and gpasm friendly
9890         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9891             produced an error when parsed, peep rule 12 is added to utilize
9892             movff, but it is commented out since the pCode does not support
9893             yet a command with 2 address arguments
9894
9895 2003-05-18    <johan AT balder>
9896
9897         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9898         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9899 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9900
9901         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9902   Added feature to script commands from file.
9903
9904 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9905
9906         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9907         * src/SDCCutil.c: include ctype.h for win32
9908
9909 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9910
9911         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9912
9913 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9914
9915         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9916   Fixed so you can set breakpoints prior to run, run does not stop
9917   on entry now.  Add tbreak.  Other enhancements and fixes for use
9918   with ddd.
9919
9920 2003-05-12  Borut Razem <borut.razem AT siol.net>
9921
9922         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9923
9924 2003-05-11  Borut Razem <borut.razem AT siol.net>
9925
9926         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9927         the path of bin directory, so that PATH is the only env. variable, which has to be set
9928         in case of standard installation.
9929         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9930         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9931         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9932
9933 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9934
9935         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9936         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9937         temp files are in the port dir; clean the gen/test directory when
9938         generating new test.c
9939         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9940         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9941         * support/regression/tests/zeropad.c: added
9942
9943 2003-05-09    <johan AT balder>
9944
9945         * src/SDCCglue.c: fixed bug #597940
9946
9947 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9948
9949         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9950   cache sfr, optimize next,step, fix off by one sourceline,
9951   support ddd list function.
9952         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9953
9954 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9955
9956         * support/regression/HTMLgen.py: added compare_s2f()
9957         * support/regression/Makefile: redo 1.27
9958         * support/regression/generate-cases.py: redo 1.5
9959
9960 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9961
9962         * support/regression/tests/float.c: workaround 33 bit hex constant
9963         * support/regression/tests/simplefloat.c: fix division for host
9964
9965 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9966
9967         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9968         that tame's the PIC's over-aggressive optimizer.
9969
9970 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9971
9972          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9973          support for MSVC.
9974
9975 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9976
9977         Initial support for DS80C400. "Hello world" runs on TINIm400
9978         (with polled I/O).
9979
9980 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9981
9982          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9983          * Some notes on ddd usage added in debugger/README
9984          Martin Helmling adding more features and fixes for ddd GUI debugger.
9985          Code added for nexti, stepi, up, down, and other adjustments.
9986
9987 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9988
9989         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9990         * src/pic/peeph.def Added two rules to optimize carry manipulation
9991         * src/pic/* removed debug printfs
9992
9993 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9994
9995         * debugger/mcs51/cmd.c: added header newalloc.h
9996
9997 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9998
9999         * as/Makefile: new EXEEXT
10000         * as/z80/Makefile: remove trailing slash of BUILDIR
10001         * as/z80/clean.mk: new EXEEXT
10002         * Makefile.common.in: add to CFLAGS (and others), don't replace it
10003         * support/cpp2/Makefile.in: new EXEEXT
10004         * src/pic/glue.c (pic14emitRegularMap): fixed warning
10005
10006 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
10007
10008         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
10009         EXEEXT was introduced to fix all related problems with targets
10010         "clean", "install" and "uninstall"; a couple of further flaws
10011         especially with "clean" have been fixed too
10012         * as/mcs51/Makefile.in
10013         * as/mcs51/clean.mk
10014         * as/z80/Makefile
10015         * Makefile
10016         * clean.mk
10017         * debugger/mcs51/Makefile.in
10018         * debugger/mcs51/clean.mk
10019         * link/z80/Makefile
10020         * link/z80/Makefile.in
10021         * link/z80/clean.mk
10022         * link/Makefile
10023         * packihx/Makefile.in
10024         * packihx/clean.mk
10025         * sim/ucsim/Makefile
10026         * sim/ucsim/clean.mk
10027         * sim/ucsim/avr.src/Makefile.in
10028         * sim/ucsim/avr.src/clean.mk
10029         * sim/ucsim/s51.src/Makefile.in
10030         * sim/ucsim/s51.src/clean.mk
10031         * sim/ucsim/xa.src/Makefile.in
10032         * sim/ucsim/xa.src/clean.mk
10033         * sim/ucsim/z80.src/Makefile.in
10034         * sim/ucsim/z80.src/clean.mk
10035         * sim/ucsim/main_in.mk
10036         * sim/ucsim/packages_in.mk
10037         * sim/ucsim/gui.src/Makefile.in
10038         * sim/ucsim/gui.src/serio.src/Makefile.in
10039         * sim/ucsim/gui.src/serio.src/clean.mk
10040         * src/Makefile.in
10041         * src/clean.mk
10042         * support/cpp2/Makefile.in
10043         * support/cpp2/clean.mk
10044         * support/makebin/Makefile
10045         * support/makebin/clean.mk
10046         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
10047         * doc/sdccman.lyx: --program-suffix no longer needed
10048
10049 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
10050
10051          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
10052          Martin Helmling added support for ddd GUI debugger.
10053          Code added to display assembly, set variables, and other commands
10054          to interface to ddd.
10055
10056 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
10057
10058         * as/Makefile: fix target clean
10059         * as/clean.mk: fix target clean
10060         * as/z80/clean.mk: fix target clean
10061
10062 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
10063
10064         * Makefile.common.in: added  AT EXEEXT AT
10065         * configure.in: removed all mingw32 stuff
10066         * configure: rebuilt from configure.in
10067         * doc/sdccman.lyx: updated section "installation"
10068         * support/scripts/sdcc_mingw32: adapted to configure
10069         * support/scripts/sdcc_cygwin_mingw32: added
10070
10071 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
10072
10073         * src/pic Added object file support for the PIC port
10074         * src/pic Applied patch from Craig Franklin (this started the object file support)
10075         * src/regression Updated the PIC regression tests for object files
10076
10077 2003-04-20  Borut Razem <borut.razem AT siol.net>
10078
10079         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
10080           lklex.c: In function `getfid':
10081           lklex.c:203: warning: array subscript has type `char'
10082         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
10083           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
10084         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
10085           stack handling macros
10086
10087 2003-04-19  Borut Razem <borut.razem AT siol.net>
10088
10089         * "handling space characters in file path" task:
10090         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
10091         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
10092         * support/Util/MySystem.h: make it self-sufficient
10093         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
10094           src/z80/main.c, sdcc/as/mcs51/lklex.c:
10095           handling space characters in file path
10096         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
10097           (it will be used by assemblers, which have their own includes, e.g. gpasm)
10098         * support/Util/MySystem.c: handling space characters in executable's path
10099
10100 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
10101
10102         * as/z80/Makefile: fix permanent rebuild of z80
10103         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
10104         * support/regression/tests/bitfields.c: added Johan's bitfields.c
10105
10106 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
10107
10108         * src/SDCCopt.c: add special case optimization to replace modulo by
10109           a power of two with a bitwise AND.
10110
10111 2003-04-18    <johan AT balder>
10112
10113         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
10114
10115 2003-04-17    <johan AT balder>
10116
10117         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
10118         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
10119
10120 2003-04-13  Borut Razem <borut.razem AT siol.net>
10121
10122         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
10123         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
10124           fixed mingw problem in adl_NORMALIZE_PATH
10125
10126 2003-04-12  Borut Razem <borut.razem AT siol.net>
10127
10128         * fixed "#pragma SAVE/RESTORE can not be nested":
10129         * src/SDCC.lex: reworked pragma handling functions
10130         * sdcc/src/SDCCglobl.h: reworked stack handling macros
10131         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
10132
10133 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10134
10135         * src/SDCCutil.c (pathEquivalent): defined but not used
10136         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
10137         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
10138         * configure: rebuilt from configure.in
10139         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10140         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10141         * device/include/Makefile.in: replace sdcc_datadir
10142         * device/lib/Makefile.in: replace sdcc_datadir
10143         * Makefile.common.in: add LDFLAGS from configure
10144         * packihx/Makefile.in: use LDFLAGS
10145         * src/Makefile.in: use LDFLAGS
10146         * support/cpp2/Makefile.in: add LDFLAGS from configure
10147         * support/makebin/Makefile: use LDFLAGS
10148         * .version: bumped version number to 2.3.5
10149
10150 2003-04-12  Borut Razem <borut.razem AT siol.net>
10151
10152         * completed "different paths" task:
10153         * src/SDCCmacro.c: fixed bug in handling quotes
10154         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
10155         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
10156
10157 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10158
10159         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
10160
10161 2003-04-11 kevin Vigor <kevin AT vigor.nu>
10162
10163         * ds390/gen.c ds390/peeph.def: fix bug 706781
10164
10165 2003-04-11  Borut Razem <borut.razem AT siol.net>
10166
10167         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
10168
10169 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
10170
10171         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
10172         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
10173          set - this bit used to not be set...).
10174         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
10175           bad code in PIC Port
10176         * src/regression/and2.c added to test bug 609268
10177         * src/regression/Makefile added and2.c to regression test
10178
10179
10180 2003-04-08    <johan AT CP255758-A>
10181
10182         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
10183         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
10184         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
10185
10186 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
10187
10188         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
10189         fix bug #487815
10190         * support/cpp2/Makefile.in: fix bug #487815
10191         * configure: rebuilt from configure.in
10192         * Makefile.common.in: docdir changed, new path suffixes
10193         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10194         * sdcc_vc_in.h: reflect changes from sdccconf.h
10195         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
10196         * src/SDCCutil.h: remove BINDIR hack
10197         * doc/sdccman.lyx: update new path hierarchy
10198
10199 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10200
10201         * src/SDCCpeeph.c: added okToRemoveSLOC test
10202
10203 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10204
10205         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
10206
10207 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10208
10209         * src/SDCCpeeph.c: added labelIsReturnOnly test
10210         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
10211
10212 2003-04-05    <johan AT balder>
10213
10214         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
10215         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
10216         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
10217         * src/SDCCast.c: fixed a warning
10218         * src/SDCCast.h: fixed a warning
10219         * src/SDCCicode.c (operandFromAst): fixed a warning
10220
10221 2003-04-04    <johan AT balder>
10222
10223         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
10224         * src/SDCCast.c (decorateType): fixed bug #715076
10225         * src/SDCC.y: fixed bug #702907
10226
10227 2003-04-03    <johan AT balder>
10228
10229         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
10230         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
10231         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
10232         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
10233         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
10234
10235 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
10236
10237         * _decdptr.c: fix return values
10238         * _gptrget.c: fix return values
10239         * _gptrgetc.c: fix return values
10240         * _gptrput.c: fix return values
10241         * _mulint.c: fix return values
10242         * as/z80/Makefile: fix 'make -j' problem
10243
10244 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
10245
10246         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
10247         * configure.in: big cleanup, updated to autoconf 2.5x
10248         * configure: rebuilt from configure.in
10249         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10250         * sdcc_vc_in.h: reflect changes from sdccconf.h
10251         * doc/Makefile: fixed a flaw in "make install"
10252
10253 2003-04-02    <johan AT balder>
10254
10255         * src/ds390/gen.c (genCmp): no comments
10256         * src/mcs51/gen.c (genCmp): no comments
10257         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
10258         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
10259
10260 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
10261
10262         * support/regression/generate-cases.py: place generated file in given sub directory
10263         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
10264         * support/regression/Makefile: improvements for 'make -j';
10265         side effect: it's simpler and faster now
10266
10267 2003-03-31  Borut Razem <borut.razem AT siol.net>
10268
10269         * src/z80/main.c: link-{port} and as-{port} defined without path
10270         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
10271
10272 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
10273
10274         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
10275
10276 2003-03-30  Borut Razem <borut.razem AT siol.net>
10277
10278         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
10279           changed type of list parameter to set
10280         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
10281         * src/port.h: changed type of do_assemble() parameter to set
10282         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
10283           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
10284           definition of "cppoutfilename" macro with NULL value in preProcess()
10285         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
10286         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
10287         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
10288           replaced with set *binPathSet
10289         * shash_add() deallocates the item, if allready exsists, before adding the new one
10290         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
10291
10292 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
10293
10294         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
10295           a nested for loop bug in the PIC port
10296         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
10297           for loops
10298
10299 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
10300
10301         * support/Util/dbuf.h: remove C++ stuff to make it portable
10302
10303 2003-03-28  Borut Razem <borut.razem AT siol.net>
10304
10305         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
10306           literal strings in stringLiteral()
10307         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
10308         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
10309           to the project
10310
10311 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
10312
10313         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
10314
10315 2003-03-26    <johan AT balder>
10316
10317         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
10318         * src/ds390/gen.c (saveRegisters): catched symbol abuse
10319         * src/SDCCast.c (decorateType): fixed " -v < 3"
10320
10321 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
10322
10323         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
10324         Added Lenny Story's debug infrastructure changes:
10325         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
10326         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
10327         * src/cdbFile.c: added
10328         * src/SDCCdebug.c: added
10329         * src/SDCCdebug.h: added
10330         * src/SDCCast.c (createFunction)
10331         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
10332         * src/SDCCmain.c (parseCmdLine, main)
10333         * src/SDCCmem.c (redoStackOffsets)
10334         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
10335         * src/SDCCsymt.h
10336         * src/common.h
10337         * src/avr/gen.c (genAVRCode)
10338         * src/ds390/gen.c (gen390Code)
10339         * src/mcs51/gen.c (gen51Code)
10340         * src/pic/gen.c (genpic14Code)
10341         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
10342         * src/xa51/gen.c (genXA51Code)
10343         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
10344
10345 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10346
10347         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
10348         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
10349
10350 2003-03-22    <johan AT balder>
10351
10352         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
10353
10354 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
10355
10356         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
10357         * doc/cdbfileformat.lyx: added, written by Lenny Story
10358         * doc/Makefile: added cdbfileformat.lyx
10359         * doc/clean.mk: added cdbfileformat.lyx
10360
10361 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
10362
10363         * src/mcs51/peeph.def: fix bug #705773
10364
10365 2003-03-20    <johan AT balder>
10366
10367         An sfr/sbit can have an "at #" AND an initializer
10368         * src/SDCCsymt.c (checkSClass):
10369         * src/SDCCmem.c (allocGlobal):
10370         * src/SDCCmem.c (allocLocal):
10371         * src/SDCCast.c (createBlock):
10372
10373 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10374
10375         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10376
10377 2003-03-16    <johan AT balder>
10378
10379         Undid the hackup of const and volatile, the problem is much bigger
10380         * src/SDCC.y:1.65
10381         * src/SDCCast.c:1.171
10382         * src/SDCCglue.c:1.138
10383         * src/SDCCicode.c:1.146
10384         * src/SDCCsymt.c:1.150
10385         * src/SDCCval.c:1.65
10386
10387 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10388
10389         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10390         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10391
10392 2003-03-13    <johan AT balder>
10393
10394         Hackup const and volatile modifiers in type chains a bit:
10395         * src/SDCC.y:1.63
10396         * src/SDCCast.c:1.169
10397         * src/SDCCglue.c:1.136
10398         * src/SDCCicode.c:1.143
10399         * src/SDCCsymt.c1.146
10400         * src/SDCCsymt.h1.59
10401         * src/SDCCval.c:1.63
10402
10403 2003-03-12    <johan AT balder>
10404
10405         * src/SDCCBBlock.h: more LRH debugging junk
10406         * src/SDCCcflow.h: more LRH debugging junk
10407         * src/SDCCloop.c: more LRH debugging junk
10408         * src/SDCC.y (struct_declaration): fixed bug #697590
10409         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10410         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10411         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10412
10413 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10414         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10415         test function names must now match exactly).
10416         * src/SDCCcse.c: added special case in findCheaperOp to allow
10417         extending a short integer. Makes less awful code for bug 700121 test case.
10418
10419 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10420
10421         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10422         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10423
10424 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10425
10426         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10427         actually called (operandsNotEqual() was called for all
10428         operandsNotEqualX tests).
10429
10430 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10431
10432         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10433         with shorter literals. Fixes bug 700121.
10434
10435 2003-03-11    <johan AT balder>
10436
10437         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10438
10439 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10440
10441         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10442         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10443
10444 2003-03-10  Borut Razem <borut.razem AT siol.net>
10445
10446         * src/SDCCmain.c: pipe preprocessor's output
10447         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10448         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10449         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10450         which closes all pipes in pipeSet set
10451         * src/SDCCset.c: free deleted item in function deleteSetItem()
10452         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10453         moved from z80 to src subproject
10454         * .version: increased version number to 2.3.4
10455
10456 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10457
10458         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10459         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10460         * support/regression/ports/xa51/spec.mk: fix typo
10461
10462 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10463
10464         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10465
10466 2003-03-09  Borut Razem <borut.razem AT siol.net>
10467
10468         * src/SDCCmain.c: pipe preprocessor's output
10469         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10470         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10471         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10472         which closes all pipes in pipeSet set
10473         * src/SDCCset.c: free deleted item in function deleteSetItem()
10474         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10475         moved from z80 to src subproject
10476
10477 2003-03-09  Borut Razem <borut.razem AT siol.net>
10478
10479         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10480         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10481         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10482         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10483         * src/SDCCglobl.h: unification of WIN32 native definitions
10484
10485 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10486
10487         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10488
10489 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10490
10491         * src/configure.in:   check for endianess (even while cross-compiling)
10492         * src/configure:      check for endianess (even while cross-compiling)
10493         * src/configure_in.h: check for endianess (even while cross-compiling)
10494         * src/avr/gen.c:        remove old endianess stuff
10495         * src/mcs51/gen.c:      remove old endianess stuff
10496         * src/ds390/gen.c:      remove old endianess stuff
10497         * src/pic/gen.c:        remove old endianess stuff
10498         * src/pic/genarith.c:   remove old endianess stuff
10499         * src/pic/glue.c:       fix endianess check
10500         * src/pic16/gen.c:      remove old endianess stuff
10501         * src/pic16/genarith.c: remove old endianess stuff
10502         * src/pic16/glue.c:     fix endianess check
10503         * src/xa51/gen.c:       remove old endianess stuff
10504         * src/z80/gen.c:        fix endianess check
10505         * src/SDCCglue.c:       fix endianess check
10506         * src/ds390/peeph.def: fix bug 700036
10507
10508 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10509
10510         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10511         * src/configure: find appropriate data-types on host for SDCC's int and long
10512         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10513         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10514         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10515
10516 2003-03-07    <johan AT balder>
10517
10518         Just a big NOOP:
10519                 some minor cleanups before the big shot
10520                 OP_DEFS and OP_USES now use Kevin's protection
10521                 new option --nolabelopt
10522
10523         * src/SDCCBBlock.c:
10524         * src/SDCCast.c,:
10525         * src/SDCCcflow.c:
10526         * src/SDCCcse.c:
10527         * src/SDCCicode.c:
10528         * src/SDCCicode.h:
10529         * src/SDCClabel.c:
10530         * src/SDCCloop.c:
10531         * src/SDCCmain.c:
10532         * src/ds390/ralloc.c:
10533         * src/mcs51/ralloc.c:
10534         * src/pic/ralloc.c:
10535         * src/xa51/ralloc.c:
10536         * src/z80/ralloc.c:
10537
10538 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10539
10540         * src/pic/pcode.c (get_op): fix 64 bit warnings
10541         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10542         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10543         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10544         * support/regression/tests/malloc.c: fix 64 bit warnings
10545
10546 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10547
10548         * src/mcs51/gen.c (genMinus): fixed bug 696436
10549
10550 2003-03-02  Borut Razem <borut.razem AT siol.net>
10551
10552         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10553
10554 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10555
10556         * configure.in: test for mkstemp
10557         * sdccconf_in.h: add HAVE_MKSTEMP
10558
10559 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10560
10561         * device/include/ctype.h: removed warning while using --stack-auto
10562         * device/include/malloc.h: removed warning while using --stack-auto
10563         * device/include/string.h: removed warning while using --stack-auto
10564
10565 2003-02-23  Borut Razem <borut.razem AT siol.net>
10566
10567         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10568         because NDEBUG is defined (see man assert)
10569         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10570
10571 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10572
10573         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10574         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10575
10576 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10577
10578         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10579         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10580
10581 2003-02-18    <johan AT balder>
10582
10583         * as/mcs51/asmain.c (asmbl): module can start with a digit
10584         * as/z80/asmain.c (asmbl): module can start with a digit
10585
10586 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10587
10588         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10589         * src/asm.c: fix pipe() for Mingw32
10590
10591 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10592
10593         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10594         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10595         make -V work again; --c1mode reads now from stdin
10596         * doc/sdccman.lyx: added --c1mode
10597         * support/Util/SDCCerr.c: new messages for c1 mode
10598         * support/Util/SDCCerr.h: new messages for c1 mode
10599         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10600
10601 2003-02-15    <johan AT balder>
10602
10603         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10604
10605 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10606
10607         * doc/sdccman.lyx: Environment variables, -o and other minor things
10608
10609 2003-02-14    <johan AT balder>
10610
10611         * src/xa51/main.c: before anyone really tries to use it :)
10612
10613         * Install doc's in share/sdcc/doc
10614         * removed some obsolete files
10615         * Do a proper make distclean and uninstall
10616         M Makefile.common.in
10617         R sdccbuild.sh
10618         M as/Makefile
10619         M device/include/Makefile.in
10620         M device/lib/Makefile.in
10621         M doc/sdccman.lyx
10622         M link/Makefile
10623         M sim/ucsim/doc/Makefile.in
10624         M src/clean.mk
10625         R src/avr/peeph.rul
10626         R src/xa51/peeph.rul
10627         M support/cpp2/Makefile.in
10628         M support/makebin/Makefile
10629
10630
10631 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10632
10633         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10634
10635 2003-02-10  Borut Razem <borut.razem AT siol.net>
10636
10637         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10638         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10639         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10640         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10641         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10642         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10643         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10644         src/z80/Makefile.bcc: Borland Makefile cleanup
10645         * as/z80/Makefile.bcc: Added Borland Makefile
10646         * support/cpp2/borland.h: Removed
10647
10648 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10649
10650         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10651         * src/SDCC.lex: new pragma NOIV
10652         * src/SDCCglobl.h: new pragma NOIV
10653         * src/SDCCmem.c: new pragma NOIV
10654
10655 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10656
10657         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10658
10659 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10660
10661         * src/SDCCmain.c: signal handling is switched off by --debug
10662         * doc/Makefile: small fix for install; use clean.mk again
10663         * doc/clean.mk: clean *.pdf and *.html too
10664
10665 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10666
10667         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10668         * device/lib/printfl.c: fix a ds390 bug by making it portable
10669         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10670         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10671         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10672         * debugger/mcs51/cmd.c: converted multi-line string literals
10673         * sim/ucsim/globals.cc: converted multi-line string literals
10674         * src/SDCCmain.c: introduced signal handler to remove temp files
10675         * doc/Makefile: small tweaks, implement clean
10676         * doc: removed generated files
10677
10678 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10679
10680         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10681         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10682         Address Record is not correctly generated for DS390."
10683
10684 2003-02-02  Borut Razem <borut.razem AT siol.net>
10685
10686         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10687         * as/mcs51/asm.h: fixed compilation with Borland C
10688         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10689         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10690         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10691         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10692         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10693         src/z80/Makefile.bcc: delete $(LIB) only if exist
10694         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10695
10696 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10697
10698         * device/include/malloc.h: introduced NULL
10699         * device/include/string.h: introduced NULL
10700         * device/include/stdlib.h: introduced NULL
10701         * device/lib/_memcpy.c: removed NULL
10702         * device/lib/_strcat.c: removed NULL
10703         * device/lib/_strchr.c: removed NULL
10704         * device/lib/_strcmp.c: removed NULL
10705         * device/lib/_strcpy.c: removed NULL
10706         * device/lib/_strcspn.c: removed NULL
10707         * device/lib/_strlen.c: removed NULL
10708         * device/lib/_strncat.c: removed NULL
10709         * device/lib/_strncmp.c: removed NULL
10710         * device/lib/_strncpy.c: removed NULL
10711         * device/lib/_strpbrk.c: removed NULL
10712         * device/lib/_strrchr.c: removed NULL
10713         * device/lib/_strspn.c: removed NULL
10714         * device/lib/_strstr.c: removed NULL
10715         * device/lib/_strtok.c: removed NULL
10716         * device/lib/malloc.c: removed NULL, include own header
10717
10718 2003-02-02    <johan AT balder>
10719
10720         * 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
10721         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10722         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10723         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10724         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10725         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10726
10727 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10728
10729         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10730         area 'DATA'"
10731
10732 2003-02-01    <johan AT balder>
10733
10734         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10735
10736 2003-01-31    <johan AT CP255758-A>
10737
10738         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10739
10740 2003-01-30    <johan AT balder>
10741
10742         * src/SDCCBBlock.c: automatic bug detection
10743         * src/SDCCicode.c: automatic bug detection
10744
10745 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10746
10747         * src/SDCCglobl.h:   now --xram-size 0 works
10748         * src/SDCCmain.c:    now --xram-size 0 works
10749
10750 2003-01-29    <johan AT balder>
10751
10752         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10753
10754 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10755
10756         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10757         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10758         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10759         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10760         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10761         * src/SDCCmain.c:    Added options --xram-size and --code-size
10762
10763 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10764
10765         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10766         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10767
10768 2003-01-27    <johan AT balder>
10769
10770         * src/SDCC.y: fixed bug #613764
10771
10772 2003-01-26    <johan AT balder>
10773
10774         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10775         * src/SDCCsymt.h: fixed bug #673374
10776         * src/SDCCglue.c: fixed bug #661910
10777         * src/SDCCast.c: fixed bug #458099 and 673374
10778
10779 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10780
10781         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10782         * as/mcs51/strcmpi.h: added
10783         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10784         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10785         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10786         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10787         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10788         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10789         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10790         * as/mcs51/Makefile.aslink: new module strcmpi
10791         * as/mcs51/Makefile.asx8051: new module strcmpi
10792         * as/mcs51/Makefil.bcc: new module strcmpi
10793         * as/mcs51/Makefile.in: new module strcmpi
10794         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10795
10796 2003-01-26    <johan AT balder>
10797
10798         * src/SDCCglue.c: reverted back to 1.124
10799         * src/SDCCast.c: reverted back to 1.156
10800         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10801
10802 2003-01-25    <johan AT balder>
10803
10804         * src/SDCCglue.c: A better fix for bug #661910
10805         * src/SDCCast.c: A better fix for bug #661910
10806         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10807
10808 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10809
10810         * src/Makefile.in: remove spawn.o
10811         * src/SDCCmain.c: remove spawn.h
10812         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10813         * src/spawn.c: removed
10814         * src/spawn.h: removed
10815         * support/regression/ports/ds390/spec.mk: link with -r
10816
10817 2003-01-24    <johan AT CP255758-A>
10818
10819         * src/ds390/gen.c (aopOp): fixed bug #667458
10820         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10821         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10822         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10823
10824 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10825
10826         * src/mcs51/peeph.def: better assembler identation by Frieder
10827         * src/mcs51/gen.c: better assembler identation by Frieder
10828
10829 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10830
10831         * as/z80/string.h: removed for gcc 3.2
10832         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10833         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10834
10835 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10836
10837         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10838         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10839         * support/regression/Makefile: separate temp files for ports
10840         * support/regression/generate-cases.py: separate temp files for ports
10841         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10842         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10843
10844 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10845
10846         * moved tinitalk to device/examples/ds390
10847
10848 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10849
10850         * as/mcs51/lkmem.c: rflag is for DS390
10851         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10852         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10853                          (linkEdit): move mem- and map-files the same way as ihx-files
10854         * src/z80/main.c (_setDefaultOptions): removed --generic
10855         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10856         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10857         * src/pic/glue.c (picglue): --c1mode works again
10858         * src/pic16/glue.c (pic16glue): --c1mode works again
10859         * src/asm.c (printCLine): fix #660034
10860
10861 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10862
10863         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10864         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10865         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10866         * as/mcs51/lkmem (summary): better fix for sp problem
10867         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10868         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10869         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10870                                               remove --stack-after-data
10871
10872 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10873
10874         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10875         * src/SDCCutil.c (join): ugly bug: missing '\0'
10876         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10877
10878 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10879
10880         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10881         * src/port.h: typo
10882         * src/pic/main.c (_asmCmd): gpasm supports -o
10883         * src/z80/main.c: more general macros
10884         * device/lib/Makefile.in: remove intermediate files
10885
10886 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10887
10888         * .version: Bumped version number to 2.3.3
10889         * src/SDCCBBlock.c: new option -o
10890         * src/SDCCglobl.h: new option -o
10891         * src/SDCCglue.c: new option -o
10892         * src/SDCCmain.c: new option -o
10893         * src/asm.c: new option -o
10894         * src/ds390/main.c: new option -o
10895         * src/pic/glue.c: new option -o
10896         * src/pic/pcode.c: new option -o
10897         * src/pic/ralloc.c: new option -o
10898         * src/pic16/glue.c: new option -o
10899         * src/pic16/pcode.c: new option -o
10900         * src/pic16/ralloc.c: new option -o
10901         * src/z80/main.c: new option -o
10902         * device/lib/Makefile.in: use -o
10903         * support/regression/ports/ds390/spec.mk: use -o
10904         * support/regression/ports/gbz80/spec.mk: use -o
10905         * support/regression/ports/mcs51/spec.mk: use -o
10906         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10907         * support/regression/ports/z80/spec.mk: use -o
10908         * support/regression/ports/ucz80/spec.mk: use -o
10909         * support/regression/ports/xa51/spec.mk: use -o
10910         * support/regression/fwk/lib/timeout.c: fix usage string
10911
10912 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10913         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10914
10915 2003-01-07    <johan AT balder>
10916
10917         * src/SDCCast.c (decorateType): fixed bug #600035
10918
10919 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10920         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10921         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10922         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10923         * src/pic/pcode.c: outcommented unused variable to remove warnings
10924         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10925
10926 2003-01-06    <karl AT turbobit.com>
10927         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10928    regression tests.
10929
10930 2003-01-06    <johan AT balder>
10931
10932         * src/SDCCicode.c: fixed array add
10933
10934 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10935         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10936         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10937
10938 2003-01-04    <johan AT balder>
10939
10940         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10941
10942 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10943         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10944
10945 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10946         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10947         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10948
10949 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10950         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10951
10952 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10953         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10954
10955 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10956         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10957
10958 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10959
10960     * in /sdcc/as/mcs51/ changed these files in order to create an
10961     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10962     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10963     following files to include the previous two files: aslink.dsp,
10964     Makefile.aslink, Makefile.bcc, and Makefile.in.
10965
10966     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
10967     .adb instead of .cdb
10968
10969 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10970
10971         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
10972         value from option --iram-size.
10973
10974 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10975
10976         * /sdcc/as/mcs51/lklist.c: added boundary check before using
10977         dram[] array.
10978
10979 2002-09-18    <wiml AT hhhh.org>
10980
10981         * SDCClrange.h: exposed setFromRange() and setToRange()
10982         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10983           packRegsForAccUse() (bug 542397)
10984         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10985           multiple times and emitting the fetch operations more than once
10986           added aopGetUsesAcc() function to allow binary operators to
10987           fetch their operands in the correct order; made genMinus() emit
10988           compact code for X = LITERAL - Y
10989
10990 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10991         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
10992         sprintf() in line 1267.
10993
10994 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10995         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10996         like ports.
10997
10998 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10999         Changes to aslink (All the changes are marked with 'JCF'):
11000
11001         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
11002         summary().
11003
11004         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
11005         area BSEG.  Also moves, if possible, the DATA area down into the internal
11006         ram so more space is available.
11007
11008         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
11009         sflag.
11010
11011         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
11012         not bytes.  Function summary() which creates a memory usage summary
11013         file with extension .mem.  Reports of overlaping stack and small stack
11014         size.  If the space for the stack is less than 16 bytes aslink trows a
11015         warning.
11016
11017         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
11018         the 8051.  Option 'y' for memory summary output file.
11019
11020         Changes to sdcc (All the changes are marked with 'JCF'):
11021
11022         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
11023
11024         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
11025         overlaying area for it (uses RegBankUsed[4]).
11026
11027         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
11028         bank zero as used by default.  By default aslink locates the stack
11029         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
11030         the creation of the .mem file.  Delegates the allocation of data area
11031         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
11032         the begining of the stack area to aslink.
11033
11034         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
11035         glue() in SDCCglue.c creates an area for it.
11036
11037 2002-09-03  Borut Razem <borut.razem AT siol.net>
11038         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
11039         sdcc/src/pic/glue.c:
11040         introduced atexit() handler for teporay files removal in case of
11041         errors, assertions, ...
11042
11043 2002-08-29  Borut Razem <borut.razem AT siol.net>
11044         * sdcc/support/cpp2/auto-host_vc_in.h:
11045         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
11046         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
11047         Maybe there is a similar problem with BORLANDC? It should be checked!
11048
11049         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
11050         corrected improper use of assert: the assignment to clr variable was done inside the assert.
11051         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
11052         was not executed, and the compiler (cl) launched a warning:
11053         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
11054
11055 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
11056         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
11057
11058 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
11059         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
11060
11061         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11062           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
11063           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
11064           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11065           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
11066           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
11067           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
11068         - added Release configuration in VS projects
11069         - review of compiler an linker options
11070         - VC .exe files are generated in bin_vc directory, not to interfere
11071           with binaries generated from other projects (cygwin, mingw, bcc ...)
11072
11073         * sdcc/src/yacc.dsp: added
11074
11075         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
11076         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
11077         and insert the version number definitions from .version
11078
11079         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
11080
11081         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
11082         added - genarate auto-host.h using auto-host_vc_in.h as template
11083
11084         * sdcc/sdcc_vc.h,
11085         removed from CVS, generated automatically
11086
11087 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
11088         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
11089
11090 2002-08-11  Borut Razem <borut.razem AT siol.net>
11091         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
11092
11093 2002-08-10  Borut Razem <borut.razem AT siol.net>
11094         * src/SDCCmain.c (main):
11095         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
11096         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
11097         The consequence was that some temporary files were not removed.
11098
11099         * src/SDCCglue.c:
11100         unification of code in functions tempfilename() and tempfile():
11101         function tempnam() is defined in Visual Studio 6.0 and .NET
11102
11103         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
11104
11105         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11106           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
11107         - removed compiler command line option /WX: Treats all warnings as errors
11108         - update a list of source files, included into the project
11109
11110         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11111           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
11112         changed project type to Generic Project so that can be correcly converted to VS.NET project
11113
11114         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
11115
11116         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
11117
11118         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
11119
11120         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
11121         added return 0 statements after assert() to make compiler happy
11122
11123         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
11124         added newline in the def file to keep MSC compiler satisfied
11125
11126         * sdcc/src/z80/gen.c:
11127         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
11128           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
11129         - solved MSC error in function aopDump()
11130
11131         * sdcc_vc.h: define PREFIX as "\\sdcc"
11132
11133 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
11134         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
11135
11136 2002-06-22  Scott Dattalo <scott AT dattalo.com>
11137         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
11138         - Rewrote the register banking algorithm.
11139         - Added pCode live-range analysis to registers (for now, only non-used and
11140         singly-used registers optimized away)
11141
11142         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
11143
11144         * 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.
11145
11146 2002-05-10  Scott Dattalo <scott AT dattalo.com>
11147         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
11148
11149 2002-04-22  Michael Hope  <michaelh AT vroom>
11150
11151         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
11152
11153         * configure.in (DD_COPT): Added include support required for gbdk.
11154
11155         * .version: Bumped version number just to increase it.
11156
11157         * src/SDCCmain.c: Added -nostdinc to the default options.
11158
11159 2002-04-15  Michael Hope  <michaelh AT vroom>
11160
11161         * device/lib/z80/printf.c (sprintf): Added.
11162
11163         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
11164
11165         * src/z80/peeph.def: Added transpose redundent load rule.
11166
11167         * src/z80/main.c: Added force callee saves for jaune.
11168
11169         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
11170
11171         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
11172
11173 2002-03-28  Johan Knol  <johan AT balder>
11174
11175         * src/SDCCval.c: fixed bug #532436
11176
11177 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11178         * /src/port.h:
11179         Added "char *Processor" field to the port structure.
11180
11181         * /src/SDCCmain.c:
11182         Added -p option. Allows port dependent processor to be specified.
11183
11184         * all ports:
11185         Initialized the new field char *Processor field to NULL in all ports
11186
11187         * /src/pic/*:
11188         Compiler generated registers for interrupt context saving
11189         were not getting allocated.
11190
11191 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
11192
11193         * /src/SDCCast.c:
11194         Fixed left shift. Will promote the left side of a left shift
11195         if a) left shifting more than size of operand or b) when assigned
11196         to something size > size of left side
11197
11198 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11199         * src/pic/*
11200         tons of changes. Register allocation has been
11201         rewritten. Added customization for the various PICs. Flow
11202         analysis is restructured. ...
11203
11204         * src/pic/device.h:
11205         Added
11206
11207         * src/pic/device.c:
11208         Added. device.c is a PIC port hack to accomodate variations
11209         in PIC devices.
11210
11211 2002-03-13  Michael Hope  <michaelh AT vroom>
11212
11213         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
11214
11215 2002-03-04  johanknol  <johanknol AT manik>
11216
11217         * /src/SDCCval.c: fixed
11218
11219         const unsigned char arr[][2] = { { 0, 1 } };
11220         t18.c:1: error: Initializer element is not constant
11221
11222 2002-03-04  bela  <bela AT manik>
11223
11224         * /device/include/mcs51reg.h:
11225         ds89c420 register definition update
11226
11227 2002-03-03    <johan AT FRIJA>
11228
11229         * support/Util/SDCCerr.c: did something, but don't no why anymore
11230
11231         * support/regression/tests/bug-524691.c: made it a little less shy
11232
11233         * src/SDCCast.c (decorateType): fixed bug #524697
11234
11235         * src/SDCCast.c: made some lineno improvements
11236
11237         * src/SDCCval.c (getNelements): changed warning to error
11238
11239         * src/SDCCglue.c (printIvalArray): changed warning to error
11240
11241         * src/SDCCicode.c: fixed a warning for mingw
11242
11243         * src/SDCCast.c (decorateType): fixed the << promotion for ops
11244
11245         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
11246
11247 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
11248
11249         * src/ds390/peeph.def:
11250         Added some more peephole rules
11251
11252         * src/ds390/gen.c: Various fixes & enhancements
11253
11254         * src/SDCClrange.c, src/SDCClrange.h:
11255         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
11256
11257         * src/ds390/ralloc.c:
11258         various fixes & enhancements (ds390) specific
11259
11260         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
11261         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
11262         from rallocs.
11263
11264         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
11265
11266 2002-03-02    <johan AT FRIJA>
11267
11268         * src/SDCCast.c (decorateType): fixed bug #524708
11269
11270         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
11271
11272         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
11273
11274 2002-03-01  Michael Hope  <michaelh AT vroom>
11275
11276         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
11277
11278         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
11279
11280 2002-03-01    <johan AT FRIJA>
11281
11282         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
11283
11284         * src/SDCCast.c (decorateType): fixed bug #524209
11285
11286         * src/SDCCval.c (valNot): fixed bug #524195
11287
11288 2002-02-26    <johan AT balder>
11289
11290         * src/xa51/gen.c: fixed a warning
11291
11292         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
11293
11294         * src/SDCCast.c (decorateType): fixed bug #522534
11295
11296 2002-02-23    <johan AT balder>
11297
11298         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
11299
11300 2002-02-22    <johan AT balder>
11301
11302         * src/SDCCast.c: fixed bug #514865
11303
11304         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
11305
11306 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
11307
11308         * sdcc/src/SDCCloop.c:
11309         Previous fix was not good. basic blocks that have "break" or "return" are
11310         not really partof a loop , but live ranges used in these blocks should
11311         be live thru the entire loop, so set partOfLoop but don't add them to
11312         loop region
11313
11314 2002-02-21    <johan AT FRIJA>
11315
11316         * src/SDCCcse.c: fixed bug #514308
11317
11318 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
11319
11320         * src/SDCCloop.c:
11321         Fixed BUG #519583. If a conditional block ended in a return/break
11322         statement inside a loop, it was not being considered part of the loop.
11323
11324         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
11325
11326 2002-02-10  Karl Bongers <karl AT turbobit.com>
11327
11328         * debugger/*:
11329         Fixed up SDCDB debugger somewhat.  Updated debugger/README
11330         with lots of comments and notes.
11331
11332         * device/examples/test2.c:
11333         Fix bug, "red" variable not being initialized(compiler complained).
11334
11335         * device/examples/Makefile, examples/test3.c:
11336         Add Makefile in device/examples folder, compiles test3.c
11337         for use as a multiple module SDCDB test case.
11338
11339         * sim/ucsim/cmd.src/cmdset.cc:
11340         Took out debug printfs in ucsim "next" command.
11341
11342         * sim/ucsim/xa.src:
11343         Karl and Johan start ucsim XA support.  Most dissassembly working,
11344         about 75% emulation done(plenty of work remaining).
11345
11346         * sim/ucsim/z80.src:
11347         Add Z80 support to ucsim, add test-ucz80 regression test,
11348         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
11349         Notice z80 compiler fails on examples/test3.c/crc code.
11350
11351 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
11352
11353         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
11354         Added support for --parms-in-bank1
11355
11356         * src/ds390/peeph.def:
11357         added a few more peephole optimzations
11358
11359         * src/ds390/main.c:
11360         1) added __builtin_inp & __builtin_outp used to read in data of given length
11361            from a memory mapped port
11362         2) added __builtin_memcmp
11363         3) added __builtin_swapw swap bytes of a short
11364
11365         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11366         1) handle multiple send & receives from register bank1
11367         2) ralloc can now allocate DPTR1 to some liveRanges
11368
11369         * src/SDCCsymt.c, src/SDCCsymt.h:
11370         changes to handle multiple sends & receives
11371
11372         * src/SDCCptropt.h:
11373         added some pointer arithmetic optimization
11374
11375         * src/SDCCptropt.c:
11376         added some pointer arithmetic optimizations but not stable yet so not
11377         called from anywhere (will get this working shortly)
11378
11379         * src/SDCCopt.c: fixed for multiple sends & receives
11380
11381         * src/SDCCmain.c:
11382         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11383         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11384            set preprocessor defines (depending on options)
11385
11386         * src/SDCCicode.c, src/SDCCicode.h:
11387         changes made to handle multiple sends & receives
11388
11389         * src/SDCCglobl.h:
11390         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11391
11392         * src/SDCCcse.c, src/SDCCcse.h:
11393         added function findbackward def (to be used in upcoming optimization)
11394
11395         * src/SDCCcflow.c, src/SDCCcflow.h:
11396         added function returnAtEnd - to determine if a basic block terminates with
11397         a RETURN iCode
11398
11399         * src/SDCCast.c, src/SDCCast.h:
11400         added option parms-in-bank1
11401
11402         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11403         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11404         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11405         adjusted for --parms-in-bank1 option
11406
11407         * device/include/string.h:
11408         donot redefine "reentrant" keyword
11409
11410         * device/include/ds80c390.h: Added some more SFRs
11411
11412 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11413
11414         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11415
11416 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11417
11418         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11419
11420 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11421
11422         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11423
11424 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11425
11426         * Added --xram-movc option
11427
11428 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11429
11430         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11431
11432 2002-01-11  Johan Knol
11433
11434         * Added math lib of Jesus Calvino-Fraga
11435
11436 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11437
11438         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11439         * support/regression/Makefile: new target test-mcs51-stack-auto
11440         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11441
11442 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11443
11444         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11445
11446 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11447
11448         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11449
11450 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11451
11452         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11453
11454         * src/SDCCglue.h: add definition for printIvalChar()
11455
11456 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11457
11458         * src/SDCCast.c: fix #498138 by Johan
11459
11460         * src/SDCCglue.c: fix #498138 by Johan
11461
11462 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11463
11464         * support/regression/Makefile: fix clean
11465
11466         * support/regression/ports/ds390/support.c: fix transmission of last character
11467
11468 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11469
11470         * /sdcc/src/ds390/gen.c:
11471         a) improved computing address of stack variable
11472         b) took out some #if 0 code
11473         c) improved parmBytes adjustment
11474         d) improved genPlusIncr & genMinusIncr
11475         e) genCmp could generate bad code (when left assigned to DPTR)
11476         f) Fixed bug in hasInc
11477
11478         * /sdcc/src/ds390/ralloc.c:
11479         a) packRegsForSupport could mess up live information (Fixed)
11480         b) packRegsDPTRuse could be incorrect for left & right shift
11481
11482         * /sdcc/src/mcs51/ralloc.c:
11483         packRegsForSupport could mess up the live information (Fixed)
11484
11485         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11486
11487         * /sdcc/src/SDCCast.c:
11488         can reverse a loop even if function call is present as long
11489         as the loop control variable is local & is not passed as parameter
11490
11491 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11492
11493         * /sdcc/ChangeLog: *** empty log message ***
11494
11495         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11496         More builtin function additions for TININative
11497
11498         * /sdcc/src/ds390/ralloc.c:
11499         Had broken the regression testsuite
11500
11501         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11502
11503         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11504         Added funcattr hasStackParms will be set for reentrant functions when there
11505         are paramteres on the stack, this helps in minimizing frame pointer generation
11506         typeFromStr can handle function pointers now
11507
11508         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11509         *** empty log message ***
11510
11511 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11512
11513         * /src/ds390/gen.c, /src/ds390/main.c:
11514         More builtin function additions for TININative
11515
11516         * /src/ds390/ralloc.c:
11517         Had broken the regression testsuite
11518
11519         * /src/SDCCast.c: Fixed a bug in dumptree
11520
11521         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11522         Added funcattr hasStackParms will be set for reentrant functions when there
11523         are paramteres on the stack, this helps in minimizing frame pointer generation
11524         typeFromStr can handle function pointers now
11525
11526         * /doc/builtins.txt, /doc/TININative.txt:
11527         *** empty log message ***
11528
11529
11530 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11531
11532         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11533         ALPHA version for -mTININative
11534
11535         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11536         updated to reflect changes in the port structure
11537
11538         * /src/port.h:
11539         added function do_assemble (similar to do_link) if non-null this function
11540         will be called to do assembly (-mTININative) requires a multi command
11541         assembly
11542         added function genAssemblerEnd will be called to generate assembler Epilogue
11543
11544         * /src/SDCCsymt.c:
11545         added _JavaNative to debug info printing
11546
11547         * /src/SDCCmain.c: added option --tini-libid
11548         added port->do_assemble function (-mTININative) has a multi command assemble
11549
11550         * /src/SDCCglue.c: Disabled "constExpr" check
11551         added port->genAssemblerEnd function
11552
11553         * /src/SDCCglobl.h: Added option --tini-libid value
11554
11555         * /src/SDCCast.h:
11556         tookout optimizeCompare from the header (has no external references)
11557
11558         * /src/SDCCast.c: made one more function "static"
11559
11560 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11561
11562         * src/z80/mappings.i: Added z80asm support.
11563
11564         * src/z80/main.c: Added z80asm support on --asm=z80asm
11565
11566         * src/z80/gen.c: Fixed asm portability issues.
11567
11568         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11569
11570         * src/SDCCglue.c (printExterns): Added global/extern split.
11571
11572 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11573
11574         * support/regression/Makefile: added test for mcs51 model large
11575
11576         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11577
11578         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11579
11580 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11581
11582         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11583
11584 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11585
11586         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11587
11588         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11589
11590 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11591
11592         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11593
11594         * support/regression/tests/simplefloat.c: Port to mcs51.
11595
11596 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11597         * support/regression/tests/bug-485362.c: Added.
11598
11599         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11600
11601         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11602
11603         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11604
11605         * src/z80/gen.c (aopDump): Added a dump function.
11606
11607 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11608         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11609
11610         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11611
11612         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11613
11614         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11615
11616         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11617
11618         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11619
11620         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11621
11622         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11623
11624         * support/regression/ports/ds390/support.c: Use tinibios.
11625
11626         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11627
11628 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11629
11630         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11631         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11632
11633         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11634
11635         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11636
11637 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11638
11639         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11640
11641         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11642         (packRegsForIYUse): Created and optimised.
11643
11644 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11645
11646         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11647 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11648
11649         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11650
11651         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11652
11653         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11654
11655 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11656
11657         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11658
11659         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11660
11661 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11662
11663         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11664
11665         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11666
11667         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11668
11669 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11670
11671         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11672         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11673         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11674
11675         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11676
11677         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11678         (genNotFloat): Added.
11679         (genUminusFloat): Added.
11680
11681         * device/lib/z80/Makefile: Added floating pt stubs.
11682
11683         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11684
11685         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11686
11687         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11688
11689 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11690
11691         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11692
11693         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11694
11695         * sdcc/support/regression/Makefile: Add port ds390.
11696
11697         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11698
11699         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11700
11701         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11702
11703         * sdcc/support/regression/ports/ds390/support.c: Added.
11704
11705         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11706
11707         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11708
11709         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11710
11711 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11712
11713         * device/include/malloc.h: Added z80 and gbz80 support.
11714
11715         * device/lib/gbz80/heap.s: Added.
11716
11717         * device/lib/z80/heap.s: Added.
11718
11719         * device/lib/malloc.c: Added z80 and gbz80 support.
11720
11721         * support/regression/tests/malloc.c (testMalloc): Added.
11722
11723         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11724
11725         * support/regression/tests/bug-478094.c: Added.
11726
11727         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11728
11729 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11730
11731         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11732
11733         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11734
11735         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11736
11737         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11738
11739         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11740
11741 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11742
11743         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11744
11745 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11746
11747         * support/regression/tests/bug-477927.c: Added.
11748
11749         * src/z80/peeph.def: Added minor rules.
11750
11751         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11752
11753         * src/z80/peeph.def: Added jump optimisation modification.
11754
11755 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11756
11757         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11758
11759 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11760
11761         * support/regression/tests/funptrs.c: Added.
11762
11763 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11764
11765         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11766
11767 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11768
11769         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11770
11771         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11772
11773         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11774         (movLeft2ResultLong): Created.
11775
11776         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11777         (joinPushes): Added.  Joins two char pushes into a word push.
11778
11779 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11780
11781         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11782
11783         * support/makebin/Makefile (install): Added creation of dest dir.
11784
11785 2001-10-24 Karl Bongers <karl AT turbobit.com>
11786
11787         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11788
11789 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11790
11791         * src/z80/ralloc.c: Turned off faulty pack for one use.
11792
11793         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11794
11795         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11796
11797 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11798
11799         * support/regression/Makefile: Improved clean
11800
11801         * support/regression/ports/gbz80/spec.mk: Added clean
11802
11803         * support/regression/ports/host/spec.mk: Added clean
11804
11805         * support/regression/ports/z80/spec.mk: Added clean
11806
11807         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11808
11809         * support/regression/ports/mcs51/timeout.c: little improvements
11810
11811 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11812
11813         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11814
11815         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11816
11817         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11818
11819 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11820
11821         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11822
11823         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11824
11825 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11826         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11827
11828         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11829
11830         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11831
11832         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11833
11834         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11835
11836         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11837
11838         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11839
11840         * support/regression/tests/longor.c: Added.
11841
11842 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11843
11844         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11845
11846         * as/mcs51/aslink.h: define PATH_MAX
11847
11848         * as/mcs51/asm.h: define PATH_MAX
11849
11850         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11851
11852         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11853
11854         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11855
11856         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11857
11858         * src/SDCCglobl.h: define PATH_MAX
11859
11860         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11861
11862         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11863
11864 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11865
11866         * src/z80/gen.c (gencjneshort): Fixed
11867
11868         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11869
11870 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11871
11872         * support/regression/tests/bug-469671.c: Added.
11873
11874         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11875
11876 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11877
11878         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11879
11880         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11881
11882 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11883
11884         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11885
11886         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11887
11888         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11889
11890         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11891
11892         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11893
11894         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11895
11896         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11897
11898 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11899
11900         * 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.
11901
11902         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11903
11904         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11905
11906 2001-10-07    <johan AT FRIJA>
11907
11908         * device/lib/gets.c (gets): fixed the return value.
11909
11910 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11911         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11912
11913         * 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.
11914
11915         * 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.
11916
11917         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11918
11919         * src/pic/gen.c: Removed Safe_strdup.
11920
11921         * configure.in: Added option to enable libgc support.
11922
11923         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11924         (bitVectUnion): Optimised.
11925         (bitVectIntersect): Optimised.
11926         (bitVectBitsInCommon): Optimised.
11927         (bitVectCplAnd): Optimised.
11928
11929         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11930
11931 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11932
11933         * src/SDCCmain.c: distinguish between assembler debug and plain options
11934
11935         * src/avr/main.c:   remove standard assembler options
11936
11937         * src/ds390/main.c: remove standard assembler options
11938
11939         * src/mcs51/main.c: remove standard assembler options
11940
11941         * src/port.h: removed "PENDING" comment
11942
11943 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11944
11945         * src/device/lib/_mulint.c  : new, with assember functions
11946
11947         * src/device/lib/_mullong.c : new, with assember functions
11948
11949         * src/device/lib/_divuint.c : with assember functions
11950
11951         * src/device/lib/_divsint.c : with assember functions
11952
11953         * src/device/lib/_divulong.c: with assember functions
11954
11955         * src/device/lib/_divslong.c: with assember functions
11956
11957         * src/device/lib/_moduint.c : with assember functions
11958
11959         * src/device/lib/_modsint.c : with assember functions
11960
11961         * src/device/lib/_modulong.c: with assember functions
11962
11963         * src/device/lib/_modslong.c: with assember functions
11964
11965         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11966
11967         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11968
11969         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11970                                       replaced _mululong.c and _mulslong.c by _mullong.c
11971
11972 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11973
11974         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11975
11976 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11977
11978         * src/SDCCglue.c: test, if win32api is available for MINGW
11979
11980 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11981
11982         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11983         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11984         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11985         * support/regression/ports/host/spec.mk: removed GENERIC
11986         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11987         * support/regression/ports/z80/spec.mk: removed GENERIC
11988
11989 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11990
11991         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11992
11993         * support/regression/tests/bug-467035.c: Created.
11994
11995 2001-10-01    <johan AT FRIJA>
11996
11997         * src/SDCC.y: fixed bug #466586 part 1
11998
11999 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
12000
12001         * SDCCicode.c: z80 has no generic pointers
12002         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
12003
12004 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
12005
12006         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
12007
12008 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
12009
12010         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
12011
12012         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
12013
12014 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
12015
12016         * configure.in: Fixed up so that ucsim is only configured once.
12017
12018         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
12019
12020         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
12021         (getPathDifference): As above.
12022
12023         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
12024
12025         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
12026
12027 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
12028         * .version: Updated to 2.3.1
12029
12030         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
12031         Added copyright header.
12032
12033         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
12034         (assemble): Added support for macro based assembler commands.
12035         (linkEdit): Added support for macro based linker commands.
12036         (preProcess): Changed the pre-processor to use macros.
12037         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
12038         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
12039
12040         * device/lib/z80/crt0.s: Added module name for debugging.
12041
12042 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
12043
12044         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12045
12046         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
12047
12048         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
12049
12050         * src/Makefile.in: Added SDCCmacro and SDCCutil
12051
12052 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
12053
12054         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12055
12056 2001-09-16    <johan AT FRIJA>
12057
12058         * 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.
12059
12060 2001-09-15    <johan AT FRIJA>
12061
12062         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
12063         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
12064
12065 2001-09-11    <johan AT FRIJA>
12066
12067         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
12068
12069 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
12070
12071         * support/regression/tests/bug-460444.c: Added test case.
12072
12073         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
12074         (genCast): Added justification for all of the asserts.
12075
12076 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
12077
12078         * support/regression/support.c: _xdata replaced by xdata
12079
12080         * support/regression/spec.mk: removed _generic
12081
12082 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
12083
12084         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
12085
12086         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
12087         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
12088
12089         * src/z80/peeph.def: Added a rule to optimise shift then compare.
12090
12091         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
12092
12093         * support/regression/tests/bug-460010.c: Added test case.
12094
12095         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
12096
12097 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
12098
12099         * support/regression/Makefile: inter-port-clean adjusted for mcs51
12100
12101         * support/regression/testfwk.c: removed workaround for bug #436344
12102
12103         * support/regression/tests/bp.c: use less memory with mcs51
12104
12105         * support/regression/tests/bug-441448.c: use less memory
12106
12107         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
12108
12109         * support/regression/collate-results.py: typo
12110
12111 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
12112
12113         * support/regression/tests/fetchoverlap.c: Added new test case.
12114
12115         * support/regression/tests/bp.c: Added new test case.
12116
12117         * support/regression/tests/bug-448984.c: Added new test case.
12118
12119         * support/regression/tests/pow2shifts.c: Added new test case.
12120
12121         * src/z80/gen.c: Turned off the noise it normally generates for the release.
12122         (genlshTwo): Fixed right shift for count > 8.
12123
12124         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
12125
12126 2001-09-08    <johan AT FRIJA>
12127
12128         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
12129
12130 2001-09-07    <johan AT FRIJA>
12131
12132         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
12133
12134         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
12135
12136 2001-09-06    <johan AT FRIJA>
12137
12138         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
12139         * bernhard noted me at this: "() equals to (void)" (1.38)
12140
12141 2001-09-05    <johan AT FRIJA>
12142
12143         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
12144
12145 2001-09-04    <johan AT FRIJA>
12146
12147         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
12148
12149
12150 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
12151
12152         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
12153
12154 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
12155
12156         * link/z80/aslink.h: Fixed path for PATH_MAX
12157
12158 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
12159
12160         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
12161
12162         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
12163
12164         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
12165
12166         * 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.
12167
12168 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
12169
12170         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
12171         (genCmp): Fixed up genCmp for the GB with longs.
12172
12173         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
12174
12175         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
12176
12177         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
12178
12179         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
12180
12181 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
12182
12183         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
12184
12185 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
12186
12187         * 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.
12188
12189         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
12190
12191 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
12192
12193         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
12194
12195         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
12196
12197 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
12198
12199   * sim/ucsim/configure:    little improvement of Cygwin-detection
12200   * sim/ucsim/configure.in: little improvement of Cygwin-detection
12201   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
12202   * support/regression/tests/bug-221100.c: small changes for mcs51
12203   * support/regression/tests/bug-221168.c: small changes for mcs51
12204   * support/regression/tests/bug-227710.c: small changes for mcs51
12205   * support/regression/tests/staticinit.c: small changes for mcs51
12206   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
12207   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12208   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12209
12210 $Revision$