* src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
[fw/sdcc] / ChangeLog
1 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
2
3         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
4           with offset
5         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
6           1489016, 1434401 and 1490124
7         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
8           1489016, 1434401 and 1490124
9
10 2006-05-17 Borut Razem <borut.razem AT siol.net>
11
12         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
13           thanks Stas Sergeev
14
15 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
16
17         * device/include/mcs51/P89c51RD2.h,
18         * device/include/mcs51/P89LPC901.h,
19         * device/include/mcs51/P89LPC922.h,
20         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
21
22 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
23
24         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
25         to fix missing stack pragma in compiled binary object file,
26
27 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
28
29         * support/packihx/configure.in,
30         * support/packihx/configure: removed warning, autoconf >= 2.5x can
31         determine sizeof basic types even while cross compiling
32
33 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
34
35         * src/avr/gen.c (aopop),
36         * src/ds390/gen.c (aopOp),
37         * src/hc08/gen.c (aopOp),
38         * src/mcs51/gen.c (aopop),
39         * src/pic16/gen.c (pic16_aopOp),
40         * src/pic/gen.c (aopOp),
41         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
42         if size of operand is smaller than spill location
43
44 2006-05-12 Borut Razem <borut.razem AT siol.net>
45
46         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
47           have to have CR/LF line endings even if they are checked out on *nix
48           or on WIN32 in cygwin binmode
49
50 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
51
52         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
53         * device/include/ds80c390.h: added sfr16 definitions
54         * src/ds390/gen.c,
55         * src/ds390/gen.h,
56         * src/ds390/main.c,
57         * src/ds390/ralloc.c,
58         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
59           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
60           bit returning functions
61         * support/regression/tests/sfr16.c: enabled test on ds390
62
63 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
64
65         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
66         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
67
68 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
69
70         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
71         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
72           (cl_address_space constructor): removed expensive initialization,
73           (cl_address_space::get_cell): extended for late initialization,
74           (cl_address_space::*): use late initialization,
75           (cl_address_decoder::activate): removed expensive initialization,
76           This reduced regression test running time by 25%
77
78 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
79
80         * packihx/,
81         * configure.in,
82         * configure,
83         * sdcc.dsw,
84         * Makefile.bcc,
85         * Makefile.in,
86         * support/packihx/Makefile.in,
87         * support/packihx/clean.mk,
88         * support/packihx/Makefile.bcc,
89         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
90
91 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
92
93         * src/SDCCval.c (valNot): fix for regression test failure
94           of not.c on big endian hosts
95
96 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
97
98         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
99
100 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
101
102         * device/lib/mcs51/Makefile.in: changed string comparison operator
103           to = for POSIX compliance; == is bash extension
104
105 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
106
107         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
108           kosmonaut_pirx
109
110 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
111
112         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
113         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
114         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
115         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
116         bug report #1478657,
117
118 2006-05-05 Borut Razem <borut.razem AT siol.net>
119
120         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
121           making the html
122
123 2006-05-02 Borut Razem <borut.razem AT siol.net>
124
125         * doc/Makefile.in: removed *.ind dependency since there is no rule to
126           create *.ind, which made make to fail if invoked with -j 2
127
128 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
129
130         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
131           Hubert Sack for patch 1479782
132
133 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
134
135         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
136
137 2006-05-01 Raphael Neider <rneider AT web.de>
138
139         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
140           (create_pic): store only prefix-free device name,
141           (init_pic): check for device names with "16" prefix,
142           (list_valid_pics),
143         * src/pic/device.h (struct PIC_device),
144         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
145             stored device name,
146         * device/include/pic/pic12f{635,675,629,683}.h,
147         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
148         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
149         * device/include/pic/pic16f505.h,
150         * device/lib/pic/libdev/pic16f505.c: removed
151         * device/include/pic/pic14devices.txt: added support for pic12f
152             devices, removed unsupported non 16-bit devices
153             [above changes provided by patch from Zik Saleeba]
154         * src/pic/*, src/pic16/*, device/include/pic16/*,
155           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
156
157 2006-05-01 Borut Razem <borut.razem AT siol.net>
158
159         * configure.in, configure, doc/Makefile.in:
160           sync with nightly build makefile - latex, dvipdf and dvips
161           not needed any more
162
163 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
164
165         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
166         in the library source
167
168 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
169
170         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
171
172 2006-04-28 Raphael Neider <rneider AT web.de>
173
174         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
175         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
176           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
177         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
178
179 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
180
181         * device/lib/pic/libdev/Makefile.in,
182         * device/lib/hc08/Makefile.in,
183         * device/lib/gbz80/Makefile.in,
184         * device/lib/z80/Makefile.in,
185         * device/lib/ds390/Makefile.in,
186         * device/lib/ds400/Makefile.in: added srcdir to include search path,
187         thanks to Borut for the bug report
188         * configure.in,
189         * configure: always create doc/Makefile independent from --enable-doc
190         * Makefile.in: always install from directory doc independent from
191         --enable-doc
192         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
193         removed
194         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
195         * doc/Makefile.in: install *.txt if present
196         * device/include/Makefile.in (install): added installation of pic/*.inc
197         and pic/*.txt files again, they were erroneously removed
198
199 2006-04-28 Raphael Neider <rneider AT web.de>
200
201         * src/pic/{gen.c,main.h,pcode.c},
202         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
203             concerning signedness with casts
204
205 2006-04-28 Raphael Neider <rneider AT web.de>
206
207         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
208             definition of an interrupt handler,
209         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
210             interrupt handler stuff from picglue() to separate routine,
211           (picglue): enabled definition of intr handlers in files w/o main()
212
213 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
214
215         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
216           compilation with MSVC 2005 Express Edition (VC8)
217
218 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
219
220         * device/lib/Makefile: fixed build of gbz80 lib
221
222 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
223
224         * support/regression/tests/bug-460010.c,
225         * support/regression/tests/bug-524691.c,
226         * support/regression/tests/bug-716242.c: removed conditional defines
227           that are already in testfwk.h
228
229 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
230
231         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
232           (AccAXRsh1): added, shift right by 1,
233           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
234            AccAXLrl1
235         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
236
237 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
238
239         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
240         remove cast to same type
241         * src/SDCCast.c (decorateType): fix for RFE 1475742,
242         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
243         * as/z80/Makefile,
244         * link/z80/Makefile: removed, they have moved to
245         Makefile.in files
246         * configure,
247         * configure.in: replaced duplicate message about ucsim by missing sdcpp
248         * install-sh: fix bug #1204398 by setting umask 0022
249         * device/lib/Makefile: separate build of z80 and gbz80 lib
250
251 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
252
253         Enabled VPATH feature: changed nearly all Makefiles (149 files).
254         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
255
256         One basic decision: e.g. src/clean.mk includes further files. In order
257         to make this work there are two solutions:
258         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
259           run configure on them. This way they can use
260           'include $(srcdir)/port-clean.mk'
261         - always include clean.mk by the Makefile at the same level. To avoid
262           that `make clean` tries to include and build Makefile.dep the
263           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
264           implemented, because now even `make uninstall` doesn't create
265           Makefile.in. clean.mk could be eliminated by pasting it in
266           Makefile.in.
267
268         * debugger/mcs51/Makefile.in: build own objects from library sources
269         (SLIB, SDCC) in current directory
270
271         * configure, configure.in: renamed --disable-device-lib-build in
272         --disable-device-lib; added --enable-doc, the required tools are
273         searched by configure; added result message; the toolchain for the
274         belonging ports are now only built, if the port is enabled.
275
276         * support/regression/*: all output is written in directory gen, because
277         the fwk and ports directories don't livet in the build tree using vpath
278
279         * doc/sdccman.lyx: renamed --disable-device-lib-build to
280         --disable-device-lib, added --enable-doc, added section VPATH
281
282         * sim/ucsim/configure.in,
283         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
284         z80 are enabled by default
285
286 2006-04-24 Raphael Neider <rneider AT web.de>
287
288         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
289             to config word, "pic14_"-prefixed some extern functions
290           (pic14_emitConfigWord): emit __config directive(s) if assignment to
291             config word has been found
292         * src/pic/device.h: added prototypes
293         * src/pic/pcode.c: added "pic14_"-prefix where needed
294         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
295             fixup
296         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
297             words,
298           (pic14emitRegularMap): ignore config words,
299           (pic14createInterruptVect): moved generating __config directives away
300           (picglue): have __config directives emitted
301
302 2006-04-24 Borut Razem <borut.razem AT siol.net>
303
304         * doc/Makefile: sync with nightly build makefile
305
306 2006-04-24 Raphael Neider <rneider AT web.de>
307
308         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
309             registers that have not been assigned proper liveranges,
310             fixes #1469504 and #1474602,
311           (pCodeRegOptimizeRegUsage): fixed typo in comment
312
313 2006-04-24 Borut Razem <borut.razem AT siol.net>
314
315         * device/examples/main8051.c: deleted - it was removed from CVS
316           24.mar.2000 and after that modified 18.feb.2001, so it reappered
317           after the transition to Subversion
318         * src/SDCCalloc.h: deleted - it was removed  from CVS
319           3.feb.2001 and after that modified 18.feb.2001, so it reappered
320           after the transition to Subversion
321         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
322           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
323           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
324           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
325
326 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
327
328         * as/asx8051.dsp: added mcs51/strcmpi.h
329         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
330         * as/hc08/aslink.h: updated lnksect prototype
331         * as/hc08/asm.h,
332         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
333         * as/hc08/asmain.c,
334         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
335           (newdot): handle A_ABS
336         * as/hc08/asout.c,
337         * as/mcs51/asout.c (outarea): output address
338         * as/hc08/lkaomf51.c,
339         * as/mcs51/lkaomf51.c: disabled unused array UsageType
340         * as/hc08/m08pst.c,
341         * as/mcs51/i51pst.c,
342         * as/z80/z80pst.c: "ABS" is not A_OVR
343         * as/hc08/lkarea.c (newarea): read a_addr,
344           (lnkarea): added codemap array, sort absolute areas to the front,
345            combine all GSINITx/GSFINAL,
346           (find_empty_space, allocate_space): new functions,
347           (lnksect): return next address, handle absolute sections
348         * as/mcs51/lkarea.c (newarea): read a_addr,
349           lnksect2 prototype changed,
350           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
351           (find_empty_space, allocate_space): new, factored out of lnksect2,
352           (lnksect2): return next address, handle absolute sections
353         * as/hc08/lkhead.c,
354         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
355         * as/hc08/lklibr.c (addfile, fndsym),
356         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
357           index out of range and detect both '\' and '/'
358         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
359         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
360           regression tests (ds390 cannot return bool yet)
361         * doc/sdccman.lyx: changed version number, document changed --no-peep,
362           document critical interrupts on z80, document changed SDCC define
363         * src/asm.c (_asxxxx_mapping): fixed .org directive,
364           (_a390_mapping): added .org directive
365         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
366           (genMultOneByte): fixed warnings
367         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
368           ones
369         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
370         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
371           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
372         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
373         * src/pic16/main.c: removed newReg prototype
374         * src/pic16/pcode.c,
375         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
376           warnings
377         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
378           ones
379         * src/pic16/ralloc.c
380         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
381           to fix warnings
382         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
383           from short to PIC_OPTYPE
384         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
385         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
386           optype from short to PIC_OPTYPE
387         * src/port.h: made int_size unsigned to fix warnings
388         * src/SDCC.y: fixed warning on MSVC
389         * src/SDCCicode.c (getArraySizePtr): return unsigned int
390         * src/SDCCopt.c (convertToFcall): fixed warnings
391         * src/SDCCsymt.h: removed double prototype for genSymName
392         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
393           offset int to fix warnings
394
395 2006-04-22 Borut Razem <borut.razem AT siol.net>
396
397         * doc/sdccman.lyx, */Makefile, */Makefile.in:
398           references to CVS replaced with Subversion
399
400 2006-04-21 Borut Razem <borut.razem AT siol.net>
401
402         * doc/sdccman.lyx, */Makefile, */Makefile.in:
403           references to CVS replaced with Subversion
404
405 2006-04-19 Borut Razem <borut.razem AT siol.net>
406
407         * src/version.awk: adapted for svn
408         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
409           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
410           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
411           /binutils-avr/etc/*.vi, *.jin: removed all properties
412           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
413
414 2006-04-19 Borut Razem <borut.razem AT siol.net>
415
416         * CVS to Subversion migration completed
417
418 2006-04-18 Borut Razem <borut.razem AT siol.net>
419
420         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
421           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
422
423 2006-04-17 Borut Razem <borut.razem AT siol.net>
424
425         * device/include/Makefile.in: added pic/*.inc to the installation
426
427 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
428
429         * support/regression/collate-results.py: fixed output in case of
430         a valdiag error
431         * support/regression/generate-cases.py: fixed splitting of pathnames
432         with dots
433         * as/hc08/lklibr.c (addfile),
434         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
435
436 2006-04-11 Raphael Neider <rneider AT web.de>
437
438         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
439         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
440         * src/pic16/pcode.c (assignValnums): fixed #1460578
441
442 2006-04-11 Raphael Neider <rneider AT web.de>
443
444         * device/lib/pic/libdev/*.c,
445         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
446           fixes #1468739, enables compilation in --std-c99 mode
447         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
448
449 2006-04-11 Raphael Neider <rneider AT web.de>
450
451         * src/pic/device.c (find_device): removed debug output
452           (list_valid_pics): enabled verbose listing of supported devices
453         * device/include/stdbool.h: define bool as char for pic14/16 as well
454
455 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
456
457         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
458
459 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
460
461         * .version: bumped version to 2.5.6
462         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
463
464 2006-04-06 Raphael Neider <rneider AT web.de>
465
466         * .version: bumped version to 2.5.6 (pic14 ABI changed)
467         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
468         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
469           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
470             pic14_constructAbsMap
471           (pic14printPublics): declare absolute global symbols as global
472           (pic14createInterruptVect),
473         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
474           (newReg): assume new registers unused, use correct name in
475             hashtable (reg->name instead of name), more debugLog output
476         * src/pic/device.h (PIC_device): added fields for verbose output
477         * src/pic/device.c: moved device definition to pic14devices.txt,
478             added routines for runtime parsing of pic14devices.txt,
479             added support for second config word
480         * src/pic/main.c (_process_pragma): removed #pragma maxram,
481           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
482           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
483           (_pic14_parseOptions): moved pCodeInitRegisters here
484           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
485         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
486           (pCodeInitRegisters): rewrapped comments, perpared new approach to
487             handling the pseudo stack
488         * device/lib/Makefile.in: ignore failures in objects-pic16,
489         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
490         * device/lib/pic/NEWS: document new dependency on picXXX.lib
491         * device/lib/pic/Makefile.subdir,
492         * device/lib/pic16/Makefile.subdir: improved clean rules
493         * device/lib/pic/libdev/: NEW, pic14 device libraries
494         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
495         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
496         * device/include/Makefile.in: create subdir and install pic14 headers
497         * device/include/pic/p16f_common.inc: removed unused declarations
498         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
499             PICs from inc2h.pl v1.6,
500             replaced BIT_AT macros with struct declarations
501         * device/include/pic/pic14devices.txt: definition of supported devices,
502             all above improvements contributed by Zik Saleeba, thanks
503         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
504         * support/scripts/sdcc.nsi: also install pic14 device libraries and
505             headers
506
507 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
508
509         * device/include/mcs51/c8051f410.h: added interrupt numbers,
510         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
511           thanks to Charles Olds
512
513 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
514
515         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
516
517 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
518
519         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
520         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
521         * support/regression/bug1464657.c: added, new test
522
523 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
524
525         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
526           version number
527
528 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
529
530         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
531           --no-peep and --peep-file <file> are used don't use default rules but
532           do use the <file>
533
534 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
535
536         * src/mcs51/gen.c (genCall): fixed bug 1457608
537
538 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
539
540         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
541         changes seem to cause (trigger?) problems with the build system.
542
543 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
544
545         * src/SDCCpeeph.c (operandsLiteral): new, added,
546           (callFuncByName): inserted operandsLiteral
547         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
548
549 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
550
551         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
552         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
553
554 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
555
556         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
557           implemented patch 1120823 Thanks to Willy De la Court (normal
558           interrupts need an interrupt number now if they are made critical),
559           and enabled nesting of critical functions though not for gbz80
560           (genCritical, genEndCritical): added functions
561           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
562         * src/z80/mappings.i: added "ei" to all mappings
563
564 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
565
566         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
567         submitted by the Debian SDCC maintainer Aurelien Jarno:
568         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
569         archive with gcc 4.1 on mips and wrote the patch"
570
571 2006-03-16 Raphael Neider <rneider AT web.de>
572
573         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
574           the left operand is shorter than the result (c* = lit-c* + int),
575           fixes bug #1450796
576         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
577           OP_SYMBOL
578
579 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
580
581         * src/.version: increased version number to 2.5.5
582         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
583         linking is done manually in pic16 port's _linkEdit,
584         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
585         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
586         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
587         allocate asmop as AOP_ACC,
588         (aopForRemat): added parameter 'bool result' in function declaration,
589         (pic16_aopGet): return AOP_ACC when accessing WREG,
590         (pic16_popGetTempReg): minor modification,
591         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
592         'pic16_allocWithIdx',
593         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
594         calling function in absolute addresses,
595         (genAssign): take into account AOP_ACC asmop,
596         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
597         * src/pic16/pcoderegs.c: some debug functions and lines added,
598         * src/pic16/ralloc.c (decodeRegType): added but commented out,
599         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
600         register too,
601         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
602         call to allocReg, not by manually allocating a new one,
603         (pic16_assignRegisters): now before going through the register
604         allocating functions mark all registers as free. This eliminates some
605         side effects resulting from peephole parser done earlier in the backbone
606
607 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
608
609         * src/SDCCicode.c (geniCodeLogic),
610         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
611
612 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
613
614         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
615           (genSend): bugfix, do not allocate and free twice,
616           (shiftRLong): handle partially overlapping aops
617         * support/regression/tests/bitopcse.c: fixed warning redefined idata
618
619 2006-03-08 Borut Razem <borut.razem AT siol.net>
620
621         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
622           for pic16
623
624 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
625
626         * support/regression/tests/bug1409955.c: new, added
627         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
628         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
629           (aopForSym, aopOp): increment asmop.allocated if reused,
630           (freeAsmop): decrement asmop.allocated and check for zero instead of
631           using asmop.freed,
632           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
633           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
634            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
635            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
636            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
637            genSignedRightShift, genRightShift, genDataPointerGet,
638            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
639            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
640             in reverse order from allocation,
641           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
642             added swappedLR to keep track
643         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
644           pdata & code for GCC, z80, gbz80 & hc08
645         * support/regression/tests/zeropad.c: moved defines to testfwk.h
646
647 2006-03-08 Raphael Neider <rneider AT web.de>
648
649         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
650
651 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
652
653         * device/include/mcs51/c8051f410.h: new SiLabs mcu
654         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
655         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
656
657 2006-03-06 Borut Razem <borut.razem AT siol.net>
658
659         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
660           made the linker quiet
661
662 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
663
664         * src/pic16/gen.c (genPcall): fixed bug #1443644
665         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
666         which dumps before the function entry point a data byte which represents
667         the number of the local variables used by the specified function, added
668         'xinst' for initial support for Extended Instruction Support,
669         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
670         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
671         port->fun_prefix anymore (may change later),
672         (genFunction, genEndFunction): do not store/restore local registers for
673         _main (this should take care the --main-return command line option in
674         the future),
675         (genOr): removed some legacy pic-port instructions,
676         * src/pic16/genarith.c (genAddLit): re-enabled old code because
677         performing operations with SFR's causes data to be written more than
678         once to each SFR. Perhaps SFRs should be handled in special cases...
679         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
680         pcode.h
681         * src/pic16/main.c (_process_pragma): stack bound checking did not take
682         into account for stack starting position,
683         (struct OPTIONS pic16_optionsTable): added command line argument
684         --extended or -y for Extended Instruction Support,
685         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
686         (deassignLRs): *** perhaps the most important change, old 'for' code
687         (commented out for reference), didn't account for some registers which
688         were left marked 'not free' after a pointer operation. The change
689         reduces register usage a lot in some cases
690
691 2006-03-04 Borut Razem <borut.razem AT siol.net>
692
693         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
694           _clean
695         * support/regression/tests/bug-524697.c: decreased array size for
696           mcs51 to fit into the internal RAM
697         * support/regression/Makefile.in: a little bit more verbose
698
699 2006-03-03 Borut Razem <borut.razem AT siol.net>
700
701         * support/regression/fwk/lib/testfwk.c,
702           support/regression/fwk/include/testfwk.h: introduced function
703           _prints(), nonrecursive _printn(), call _initEmu() from main()
704         * support/regression/ports/gbz80/support.asm,
705           support/regression/ports/ucz80/support.asm,
706           support/regression/ports/z80/support.asm,
707           support/regression/ports/ds390/support.c,
708           support/regression/ports/hc08/support.c,
709           support/regression/ports/host/support.c,
710           support/regression/ports/mcs51/support.c,
711           support/regression/ports/xa51/support.c: added empty _initEmu()
712           function
713         * support/regression/ports/pic16/gpsim.cmd,
714           support/regression/ports/pic16/spec.mk,
715           support/regression/ports/pic16/support.c,
716           support/regression/Makefile.in: added pic16 regression test
717
718 2006-03-01 Raphael Neider <rneider AT web.de>
719
720         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
721           genConstPointerGet): use safe way of generating MOVFF to cover
722             literals as well as registers, fixes bug #1440527
723         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
724             dereference
725           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
726             more correctly, fixes bug #1232186
727           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
728         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
729             gplink guess the correct processor in more cases, applied patch
730             from Till Riedel attached to and fixing bug #1436552
731
732 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
733
734         * support/regression/tests/array.c: added, contains check for #1434401
735         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
736
737 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
738
739         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
740         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
741         * device/include/mcs51/c8051f326.h,
742         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
743         * device/include/mcs51/c8051f000.h,
744         * device/include/mcs51/c8051f018.h,
745         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
746           PCON_IDLE,PCON_STOP and added sfr16 definitions
747
748 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
749
750         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
751           genGetWord): fixed bug 1409955
752
753 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
754
755         * device/include/hc08/mc68hc908gp32.h,
756         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
757
758 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
759
760         * src/SDCCast.c (constExprValue): return NULL if not a value
761         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
762         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
763         * support/regression/tests/bitfields.c: enabled signed bitfield for all
764
765 2006-02-13 Borut Razem <borut.razem AT siol.net>
766
767         * src/regression/ptrarg.c: added, fails due to bug #1430967
768         * src/regression/Makefile: ptrarg.c added, ...
769
770 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
771
772         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
773         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
774
775 2006-02-11 Borut Razem <borut.razem AT siol.net>
776
777         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
778           print "Processor: xxx" message to stdout only if --verbose
779
780 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
781
782         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
783         * support/regression/tests/bug1426356.c: added
784         * support/regression/tests/bitfields.c: removed 2 tests
785
786 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
787
788         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
789         * device/include/mcs51/c8051f330.h,
790         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
791           PCON_IDLE,PCON_STOP and added sfr16 definitions
792         * device/lib/_divsint.c,
793         * device/lib/_divuint.c,
794         * device/lib/_divulong.c,
795         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
796           register bank bug for small stackauto
797
798 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
799
800         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
801
802 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
803
804         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
805         * all.dsp: corrected several bin paths
806         * device/include/mcs51/c8051f120.h,
807         * device/include/mcs51/c8051f300.h,
808         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
809           to PCON_IDLE,PCON_STOP
810         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
811         * device/lib/printf_large.c (output_float): fixed bug 1388703
812         * support/regression/tests/bug1057979.c: added test for bug 1388703
813
814 2006-02-08 Raphael Neider <rneider AT web.de>
815
816         * src/pic/pcode.c (pciTRIS): fixed typo,
817           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
818           (LinkFlow): fixed handling of flows that end in a call,
819           (ReuseReg): perform safety check earlier
820         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
821             to work with flows at the beginning of a pBlock,
822             fixes #1426557 (Symbol not previously defined),
823           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
824             usage information
825           (RemoveUnusedRegisters): update register usage info
826         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
827             created, reuse existing ones instead
828         * src/pic/gen.c (genPcall): fixed #1424719
829
830 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
831
832         * link/z80/lkmain.c,
833         * link/z80/lklex.c,
834         * link/z80/lkdata.c,
835         * link/z80/aslink.h: fixed build on current cygwin:
836         replaced getline() by lk_getline()
837
838 2006-02-01 Borut Razem <borut.razem AT siol.net>
839
840         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
841           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
842           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
843           src/regression/bool1.c, src/regression/bool2.c,
844           src/regression/bool3.c, src/regression/call1.c,
845           src/regression/compare.c, src/regression/compare10.c,
846           src/regression/compare2.c, src/regression/compare3.c,
847           src/regression/compare4.c, src/regression/compare5.c,
848           src/regression/compare6.c, src/regression/compare7.c,
849           src/regression/compare8.c, src/regression/compare9.c,
850           src/regression/configword.c, src/regression/for.c,
851           src/regression/inline.c, src/regression/mult1.c,
852           src/regression/nestfor.c, src/regression/or1.c,
853           src/regression/pointer1.c, src/regression/ptrfunc.c,
854           src/regression/rotate1.c, src/regression/rotate2.c,
855           src/regression/rotate3.c, src/regression/rotate4.c,
856           src/regression/rotate5.c, src/regression/rotate6.c,
857           src/regression/rotate7.c, src/regression/string1.c,
858           src/regression/struct1.c, src/regression/sub.c,
859           src/regression/sub2.c, src/regression/switch1.c,
860           src/regression/while.c, src/regression/xor.c,
861           src/regression/create_stc, src/regression/simulate,
862           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
863           regression tests
864         * src/regression/gpsim_assert.h: added
865
866 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
867
868         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
869         ((void (code *) (void)) 0) ();
870         * as/hc08/aslex.c,
871         * as/hc08/aslink.h,
872         * as/hc08/asm.h,
873         * as/hc08/asmain.c,
874         * as/hc08/lkdata.c,
875         * as/hc08/lklex.c,
876         * as/hc08/lkmain.c,
877         * as/mcs51/aslex.c,
878         * as/mcs51/aslink.h,
879         * as/mcs51/asm.h,
880         * as/mcs51/asmain.c,
881         * as/mcs51/lkdata.c,
882         * as/mcs51/lklex.c,
883         * as/mcs51/lkmain.c,
884         * as/z80/aslex.c,
885         * as/z80/asm.h,
886         * as/z80/asmain.c: fixed build on current cygwin:
887         replaced getline() by as_getline()
888
889 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
890
891         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
892         declarator in the symbol chain
893         * src/SDCCsymt.h,
894         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
895         parameter list for function pointers
896         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
897         * support/regression/tests/bug-716242.c: added
898
899 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
900
901         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
902         offset if possible
903         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
904
905 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
906
907         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
908         inifinitely recurseable, added static
909         * support/regression/tests/bug-1408066.c: added
910
911 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
912
913         * src/SDCCicode.h,
914         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
915         renamed, added possibility to create "postLoopLbl"-labels
916         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
917         newiTempLoopHeaderLabel
918         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
919         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
920         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
921         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
922         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
923         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
924         (basicInduction): fixed bug #136564, made static,
925         (loopInduction): changed parameter of basicInduction, made static,
926         (addPostLoopBlock): added
927         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
928         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
929         findLoopEndSeq
930         * support/regression/tests/bug-136564.c: added
931         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
932         --std-sdcc99 to LIBSDCCFLAGS
933
934 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
935
936         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
937         while loop
938         * support/regression/tests/bug-1406131.c: added
939
940 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
941
942         * src/SDCCast.c (decorateType): fix promotion of unary minus
943         * src/SDCCsymt.c (computeType): beautified
944         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
945         (valUnaryPM, valComplement): fix sign and promotion,
946         (valNot): ANSI: result type is int (SDCC: unsigned char)
947         * support/regression/tests/uminus.c: speedup by removing superflous
948         test case 'int'
949         * support/regression/tests/onebyte.c: added promotion and signedness
950         tests for unary minus
951         * support/regressions/tests/bug-477927.c: disable warning about
952         uninitialized variables
953         * support/regression/tests/not.c: added
954
955 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
956
957         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
958         * src/mcs51/gen.c (gen51Code): show final register usage after
959         fillGaps in asm with --i-code-in-asm
960         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
961         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
962         incUsed, rliveClear, adjustIChain): made static,
963         (setFromRange): excluded because it's unused,
964         (findPrevUseSym, markWholeLoop): added,
965         (findPrevUse): rewritten; fixes bug 895992; now a complete search
966         through all branches of predecessors enables sdcc to emit the warning
967         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
968         (rlivePoint): made static, added parameter emitWarnings which is only
969         true during the first run out of two,
970         (findRecursiveSucc, findRecursivePred): removed,
971         (computeLiveRanges): made static, added parameter emitWarnings,
972         (dumpIcRlive): added for debugging only
973         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
974         removed prototype of setFromRange()
975         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
976         in call of computeLiveRanges()
977         * support/regression/tests/bug-895992.c: added
978         * support/regression/tests/bug-971834.c: added
979         * support/valdiag/tests/bug-895992.c: added
980         * support/valdiag/tests/bug-971834.c: added
981
982 2005-12-18 Raphael Neider <rneider AT web.de>
983
984         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
985           (genUnpackBits): improved code for direct operands,
986           (genPackBits): improved code for literal assignment to bitfields
987             and for direct destination operands (no FSR indirection),
988             prevented redundant AND, fixes #1362800,
989           (AccLsh): added parameter to disable masking of the result
990         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
991           skip instructions with side-effects (like incfsz),
992           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
993         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
994         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
995           fixes #1375263
996
997 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
998
999         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1000         volatile variables as spill location
1001
1002 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1003
1004         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1005         replacing literals
1006         * support/regression/tests/bug-1376320.c: added
1007
1008 2005-12-08 Raphael Neider <rneider AT web.de>
1009
1010         * src/pic/device.c: renamed is_shared to pic14_is_shared
1011         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1012         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1013           (is_valid_identifier): added for above workaround
1014
1015 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1016
1017         * device/lib/Makefile.in: fixed to enable port-specific-objects
1018         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1019           char, thanks Hubert Sack
1020         * doc/sdccman.lyx: documented --xstack-loc,
1021           elaborated a bit more on interrupts and pitfalls,
1022           removed "setjmp/longjmp unsupported",
1023           documented some unsupported C99 features
1024         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1025         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1026           if, thanks Hubert Sack
1027         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1028         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1029           make make_library
1030         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1031           regression tests can report resource usage (rfe 700441)
1032         * support/regression/collate-results.py: report resource usage
1033         * support/regression/ports/ds390/spec.mk,
1034         * support/regression/ports/hc08/spec.mk,
1035         * support/regression/ports/mcs51/spec.mk,
1036         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1037         * support/regression/ports/ds390/uCsim.cmd,
1038         * support/regression/ports/hc08/uCsim.cmd,
1039         * support/regression/ports/mcs51/uCsim.cmd,
1040         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1041         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1042           library, use the default one
1043         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1044           building the library
1045
1046 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1047
1048         * config.dsp: added dependency on .version and configure_vc.awk
1049         * device/include/setjmp.h: updated for --stack-auto and --xstack
1050         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1051         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1052         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1053         * device/lib/libsdcc.lib: added _setjmp
1054         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1055           (decorateType): fixed bug 1372851,
1056           (optimizeGetHbit): fixed warning
1057         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1058           array initialisation
1059         * support/regression/tests/bug1057979.c: added test for bug 1358192
1060         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1061
1062 2005-12-03 Borut Razem <borut.razem AT siol.net>
1063
1064         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1065           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1066
1067 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1068
1069         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1070         createIval): implement symbol independant "flexible array member",
1071         (createIvalCharPtr): implemented flexible array initialisation with a
1072         string
1073         * src/SDCCsymt.c (copyStruct): removed,
1074         (getSize): fixed misleading comment,
1075         (getAllocSize): removed, the additional allocation size is now in
1076         sym->flexArrayLength,
1077         (checkStructFlexArray): new, syntax checks for flexible array members,
1078         (compStructSize): added syntax checks for "flexible array members"
1079         (copyStruct): removed,
1080         (copyLinkChain): removed inefficient fix for bug 770487
1081         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1082         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1083         symbol->flexArrayLength
1084         * src/SDCCerr.c,
1085         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1086         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1087         * support/regression/tests/structflexarray.c: added
1088         * support/valdiag/tests/structflexiblearray.c: added
1089
1090 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1091
1092         * src/SDCCast.c (decorateType): fixed bug 1368489
1093         * support/Util/SDCCerr.c,
1094         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1095
1096 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1097
1098         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1099           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1100
1101 2005-11-27 Borut Razem <borut.razem AT siol.net>
1102
1103         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1104           support/cpp2/mkdeps.h: added command line option
1105           -obj-ext=<extension> to SDCPP to define object file externion, used
1106           for generation of make dependencies (-M)
1107         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1108
1109 2005-11-26 Borut Razem <borut.razem AT siol.net>
1110
1111         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1112           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1113           added pic and pic16 libraries
1114
1115 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1116
1117         * device/include/float.h: Corrected typo in prototype of __fsgt
1118
1119 2005-11-25 Borut Razem <borut.razem AT siol.net>
1120
1121         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1122           added creation of model-mcs51-stack-auto libraries
1123
1124 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1125
1126         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1127         and fields-list too
1128         * src/SDCCast.c (createIvalArray): removed obsolete comment
1129
1130 2005-11-24 Borut Razem <borut.razem AT siol.net>
1131
1132         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1133           added missing device/lib/mcs51/crt*.asm sources
1134
1135 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1136
1137         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1138
1139 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1140
1141         * device/lib/_fs2schar.c,
1142         * device/lib/_fs2sint.c,
1143         * device/lib/_fs2slong.c: optimized inline asm
1144
1145 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1146
1147         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1148           Better handling of floats between -1.0 and 0.0.
1149
1150 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1151
1152         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1153           (the missing "if"s prohibited removal of redundant labels)
1154
1155 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1156
1157         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1158           Properly convert floats between -1.0 and 0.0 to long, int, and char
1159           types (max integer value of negative floats tends to zero).
1160         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1161           Removed changes made so to work properly with floats between
1162           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1163           and _fs2char.c
1164
1165 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1166
1167         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1168         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1169         (genCast) cosmetic change
1170         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1171         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1172         from mcs51
1173         * support/regression/tests/bitfields (testSignedBitfields): added
1174
1175 2005-11-18 Borut Razem <borut.razem AT siol.net>
1176
1177         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1178         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1179           introduced SILENT option to make building of pic16 libraries less
1180
1181 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1182
1183         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1184           Now they work properly with floats between -1.0 and 0.0
1185         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1186
1187 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1188
1189         * src/SDCCicode.c (printOperand): added missing else
1190
1191 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1192
1193         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1194         reformatted for better readability
1195         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1196         signed bitfields
1197
1198 2005-11-17 Borut Razem <borut.razem AT siol.net>
1199
1200         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1201           introduced SILENT option to make building of pic16 libraries less
1202           verbose - used for nightly snapshot build
1203         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1204           available on Win32 platforms.
1205         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1206           medium, large, pic and pic16
1207
1208 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1209
1210         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1211           printf("%f"...) sets fraction to zero.
1212
1213 2005-11-16 Raphael Neider <rneider AT web.de>
1214
1215         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1216           fixes #1357221
1217         * src/pic/gen.c (genIfx): implemented for CARRY bit
1218         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1219           to generic pointers, fixes #1357332,
1220           (pic16_movLit2f): NEW,
1221           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1222
1223 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1224
1225         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1226
1227 2005-11-11 Raphael Neider <rneider AT web.de>
1228
1229         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1230         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1231           compute pointer's type from operand,
1232           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1233           improved single bit reads, fixes bug #1353379
1234
1235 2005-11-09 Borut Razem <borut.razem AT siol.net>
1236
1237         * support/scripts/sdcc.nsi: added lib/pic to the package
1238
1239 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1240
1241         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1242
1243 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1244
1245         * support/regression/tests/bug1348008.c: added
1246         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1247         * support/regression/tests/bug1337835.c: updated comment
1248
1249 2005-11-06 Borut Razem <borut.razem AT siol.net>
1250
1251         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1252           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1253           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1254           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1255           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1256           dynamic construction of cl_error_class and derivates - 2.nd try
1257
1258 2005-11-05 Borut Razem <borut.razem AT siol.net>
1259
1260         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1261           bug, which caused Bus Errors on sparc solaris
1262
1263 2005-11-04 Borut Razem <borut.razem AT siol.net>
1264
1265         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1266           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1267           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1268           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1269           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1270           and derivates to resolve the initialization problem on OSX
1271
1272 2005-11-02 Borut Razem <borut.razem AT siol.net>
1273
1274         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1275           corrected typo - #include <winsock2.h>
1276
1277 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1278
1279         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1280           (_asxxxx_mapping): added org directive for future enhancements
1281
1282 2005-11-01 Borut Razem <borut.razem AT siol.net>
1283
1284         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1285           enabled sockets on WIN32
1286         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1287
1288 2005-10-31 Borut Razem <borut.razem AT siol.net>
1289
1290         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1291           WIN32 backslash path delimiters should be escaped when used in C strings
1292         * support/regression/tests/bitfields.c: exclude failing assertions for
1293           __CYGWIN32__ and __MINGW32__ hosts
1294
1295 2005-10-30 Borut Razem <borut.razem AT siol.net>
1296
1297         * src/SDCCutil.c: corrected double comparison typo
1298
1299 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1300
1301         * device/lib/medium/Makefile: added for new memory model medium
1302         * device/include/asm/mcs51/features.h: updated for medium/pdata
1303         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1304           added Multiply & Accumulate sbit's and MAC0_PAGE define
1305         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1306         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1307         * device/lib/_mullong.c: update for medium model
1308         * device/lib/incl.mk: added medium model
1309         * doc/sdccman.lyx: documented medium model
1310         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1311         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1312         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1313         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1314           (allocParms): set SCLS and OCLS to pdata for medium model
1315         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1316           for pdata,
1317           (powof2): return <0 if not power of 2
1318         * src/avr/gen.c (genBitWise): use updated powof2
1319         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1320           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1321           (shiftLLeftOrResult): use B if necessary
1322         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1323         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1324         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1325         * support/regression/Makefile.in: added test-mcs51-medium
1326         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1327
1328 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1329
1330         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1331         specifier unsigned
1332         * device/lib/time.c (mktime): fixed bug 1334315
1333
1334 2005-10-28 Raphael Neider <rneider AT web.de>
1335
1336         * device/include/pic/p16f_common.inc: added common declarations
1337         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1338
1339 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1340
1341         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1342           (aopPutUsesAcc): added to predict accumulator use,
1343           (assignResultValue): save acc if necessary,
1344           (genMinusDec): store result if indirectly addressed,
1345           (genDivOneByte):  save acc if necessary,
1346           (movLeft2Result): bugfix if left already in acc,
1347           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1348             attention to accumulator use (esp. pdata),
1349           (genReceive): receive pdata correctly
1350         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1351         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1352
1353 2005-10-27 Raphael Neider <rneider AT web.de>
1354
1355         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1356
1357 2005-10-27 Raphael Neider <rneider AT web.de>
1358
1359         * .version: changed version to 2.5.4
1360         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1361         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1362           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1363             arithmetics support routines
1364         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1365         * device/lib/Makefile.in: also create installdir for pic
1366
1367         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1368           pic14 port as well
1369         * src/pic/device.c (dump_sfr): rewritten to delegate register
1370           placement to the linker (use `extern sym' rather than sym EQU addr),
1371           (validAddress): fixed to check last specified address
1372         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1373           (popGetLit): truncate literal value to 8 bit,
1374           (popGet): moved assert to more appropriate place
1375           (popGetExternal): create pCode operand from and mark the according
1376             symbol as being `extern'
1377           (popGetAddr): added sanity check on immediate's offset, provide
1378             GPOINTER tag on demand
1379           (aopPut): fixed for immediates,
1380           (mov2w_op): move operand's address or contents to WREG (depending on
1381             operand type), safer variant of mov2w,
1382           (movwf,call_libraryfunc): NEW, handy abbreviations,
1383           (get_argument_pcop,get_return_val_pcop,pass_argument,
1384           get_returnvalue): interface for accessing function parameters and
1385             return values,
1386           (assignResultValuei,genRet): use new parameter/return value interface
1387           (pic14_getDataSize): back to old version handling generic pointers,
1388           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1389             provided implementation and/or fixed old one,
1390           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1391             calls, removed legacy 8051 reference code
1392           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1393           (loadSignToC): NEW, move the operands sign bit to CARRY,
1394           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1395             genRightShiftSigned, accepts negative shift counts,
1396           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1397           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1398             generic pointers, __data pointers and __code pointers,
1399           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1400             and signed bitfields, limit bitfields to 8 bit,
1401           (genDataPointerGet): fixed number of bytes read,
1402           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1403           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1404             pointers to constant data are no longer assumed to point to __code
1405             space, removed invalid pointer types,
1406           (bitpatternFromVal): retrieve the PICs representation of an integer
1407             or float literal,
1408           (genDataPointerSet): fixed assigning to po_immediate operands,
1409           (genGenPointerSet): implemented as library call,
1410           (genIfx): fixed incorrect condition,
1411           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1412             provide GPOINTER tag according to destination's storage class,
1413           (genCast): added code to handle casting to generic pointers, added
1414             sign-/zero extension of the result
1415           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1416         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1417         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1418           extend the result
1419         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1420           address/register resides in the shared banks
1421           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1422             put all variables into separate sections (have the linker arrange
1423             them)
1424           (picglue): put init code and interrupt handlers in separate sections
1425         * src/pic/main.c: added port specific options table, modified to PORT
1426           structure to make GPOINTERs 3 byte, added pic14_options
1427           (_pic14_do_link): private linking routine (update paths to libraries,
1428             add libsdcc.lib by default)
1429         * src/pic/main.h: declare pic14_options
1430         * src/pic/pcode.c: fixed instructions i/o relations,
1431           (RegCond): reverted to correct version,
1432           (newpCodeOpLit): truncate literals to 8 bit,
1433           (genericPrint): added debug output,
1434           (getRegFromInstruction): fixed for various operand types, simplified
1435           (BuildFlow): fixed broken handling of isntructions with labels
1436           (LinkFlow): start at last instruction in flow (skip trailing comments),
1437             pass the flow on to the next instruction after CALL
1438           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1439           (insertPCodeInstruction): fixed inserting after a skip instruction,
1440           (DoBankSelect): fixed for labeled instructions
1441           (OptimizepBlock): honor --nopeep switch
1442           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1443         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1444         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1445           (pCodeOptime2pCodes): allow disabling this optimization via
1446             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1447             but is still buggy), started implementation of a dataflow based
1448             pCode optimization (CSE + dead code elimination)
1449           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1450         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1451           names are independant of the stack location and therefore portable across
1452           devices
1453
1454 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1455
1456         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1457           (selectSpil): fixed bug 1337835 by not spilling bit variables
1458         * support/regression/tests/bug1337835.c: added test for this bug
1459         * src/mcs51/peeph.def: restart after rule 3.c,
1460           addded rules 263.x to optimize loading constants
1461
1462 2005-10-26 Raphael Neider <rneider AT web.de>
1463
1464         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1465         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1466           (genAssign): emit warning when casting literals to generic pointer
1467             type, also applies when taking the address of a fixed variable,
1468           (genCast): improved casting to generic pointers
1469         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1470           extern variables, added verbose error message
1471         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1472
1473 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1474
1475         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1476         carry must be complemented too
1477         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1478         could be emitted by genMinus
1479         * src/SDCCval.c (constVal): fixed bug 1305065
1480
1481 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1482
1483         * src/SDCCast.c (addCast): added promotion for bit variables
1484         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1485         promotion casts + optimisation
1486         (optimizeGetWord): fix warning 'i' might be used uninitialized
1487         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1488         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1489
1490 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1491
1492         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1493         all chars are promoted to int; promotion should be handled in SDCCast.c
1494
1495 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1496
1497         * device/lib/_strcmp.c: Fixed bug 1326457
1498
1499 2005-10-11 Raphael Neider <rneider AT web.de>
1500
1501         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1502         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1503
1504 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1505
1506         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1507         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1508
1509 2005-10-04 Raphael Neider <rneider AT web.de>
1510
1511         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1512           device/lib/pic16/pics.all: added pic18f1320
1513         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1514
1515 2005-09-30 Raphael Neider <rneider AT web.de>
1516
1517         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1518         * src/pic16/devices.inc: NEW, provides device descriptions
1519         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1520
1521 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1522
1523         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1524           GETHBIT
1525
1526 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1527
1528         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1529           documented Any Order Bit, Higher Order Byte and Higher Order Word
1530         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1531         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1532           (optimizeGetAbit): new, to get any bit, not only the high bit,
1533           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1534           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1535           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1536           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1537             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1538             GETABIT, GETBYTE, GETWORD: decorate them,
1539           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1540           (ast_print): added GETABIT, GETBYTE, GETWORD
1541         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1542         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1543           (geniCodeBinary): new generic binary icode,
1544           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1545         * src/port.h: updated comment for PORT.hasExtBitOp
1546         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1547           (genGetByte): new, to get a single byte,
1548           (genGetWord): new, to get a word from a long,
1549           (gen51Code): added GETABIT, GETBYTE, GETWORD
1550         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1551
1552 2005-09-23 Raphael Neider <rneider AT web.de>
1553
1554         * configure.in, configure: have device/lib/pic configured
1555         * device/lib/Makefile.in: added model-pic14
1556         * device/lib/clean.mk: added pic/ to clean rule
1557         * device/lib/pic: added rudimentary pic14 library providing support
1558           functions for multiplication/division/generic pointer access
1559         * src/SDCCopt.c (convilong): mark support functions as extern
1560           for pic14 port as well
1561         * src/pic/gen.c (genMult): added assertions,
1562           (genpic14Code): emit warning on unhandled iCodes
1563         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1564         * src/pic/pcode.c (pCodeOpCopy),
1565         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1566           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1567           SFR_REGISTER}), made safe for future extensions
1568         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1569           instructions even if preceeded by SKIP instructions (also remove
1570           them); removed unused code
1571         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1572           prevents leaving parts of the structure uninitialized after copying
1573
1574 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1575
1576         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1577           ago by me
1578         * support/regression/tests/addsub.c: added test for the bug
1579
1580 2005-09-21 Raphael Neider <rneider AT web.de>
1581
1582         * device/include/pic16/pic18f1220.h,
1583           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1584         * device/lib/pic16/Makefile.rules: added missing opening paren
1585         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1586           are provided in genutils.c,
1587           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1588           operand/result sizes,
1589           (genCmp): assert on NULL pointers first, then check deref'ed values
1590         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1591           result size
1592
1593 2005-09-18 Raphael Neider <rneider AT web.de>
1594
1595         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1596           as these are now unused,
1597           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1598         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1599           local, avoids uninitialized pointer dereference on r->name
1600         * src/pic16/ralloc.c (newReg): fixed indentation
1601
1602 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1603
1604         * src/SDCCval.c (constVal): fixed bug 730366
1605         * support/Util/SDCCerr.c,
1606         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1607
1608 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1609
1610         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1611
1612 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1613
1614         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1615
1616 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1617
1618         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1619           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1620         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1621           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1622         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1623         * packihx/packihx.c (hexDigit): made c unsigned char
1624         * as/mcs51/lklibr.c (fndsym),
1625         * link/z80/lkgb.c (gb),
1626         * link/z80/lklibr.c (fndsym),
1627         * link/z80/lkrloc.c (relr),
1628         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1629         * src/SDCC.lex (checkCurrFile, process_pragma),
1630         * src/SDCCglue.c (spacesToUnderscores),
1631         * src/SDCCmain.c (setParseWithComma, processFile),
1632         * src/asm.c (tvsprintf, printCLine),
1633         * src/avr/gen.c (emitcode, aopPut),
1634         * src/ds390/gen.c (emitcode),
1635         * src/hc08/gen.c (emitcode, emitinline),
1636         * src/mcs51/gen.c (emitcode, genInline),
1637         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1638           tokenizeLineNode),
1639         * src/pic/ralloc.c (debugLog),
1640         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1641           tokenizeLineNode),
1642         * src/pic16/ralloc.c (debugLog),
1643         * src/z80/main.c (_process_pragma):
1644            made all ctype.h function calls safe
1645         * src/SDCCopt.c: include math.h for fabs
1646         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1647           and used them throughout the code to make ctype.h function calls safe
1648         * src/ds390/main.c (asmLineNodeFromLineNode),
1649         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1650         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1651            unsigned char*
1652         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1653           (newpCodeAsmDir): made ctype.h function calls safe
1654         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1655           pic16_emitcode):  made lbp unsigned char*
1656         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1657           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1658         * src/xa51/gen.c (emitcode),
1659         * src/z80/gen.c (_emit2): made lbp unsigned char*
1660         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1661            char*
1662
1663 2005-09-05 Raphael Neider <rneider AT web.de>
1664
1665         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1666           access bank splitpoint
1667
1668 2005-09-05 Raphael Neider <rneider AT web.de>
1669
1670         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1671
1672 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1673
1674         * .version: changed to version 2.5.3
1675         * doc/sdccman.lyx: changed version to 2.5.3,
1676           documented --codeseg and --constseg and pragma codeseg and constseg,
1677           documented bit parameters (reentrant) and bit returning
1678         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1679            currFunc->recvSize, but is this ok for all ports?
1680           (ast2iCode): result of ~ on unsigned char must be cast to int for
1681            bool to work
1682         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1683           function pointers in bit space
1684         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1685           (processFuncArgs): call port.reg_parm() with reentrancy info
1686         * src/port.h,
1687         * src/avr/main.c,
1688         * src/ds390/main.c,
1689         * src/hc08/main.c,
1690         * src/pic/main.c,
1691         * src/pic16/main.c,
1692         * src/xa51/main.c,
1693         * src/z80/main.c: port.reg_parm prototype extended with
1694           "bool reentrant" parameter
1695         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1696           options.stackAuto for allocating bit register parameters
1697         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1698           (genSend): set BitBankUsed if it is,
1699           (selectRegBank): factored out of genCall for use in genPcall,
1700           (genCall): removed redundant dtype assignmen, use selectRegBank,
1701           (genPcall): handle returning in Carry properly, save in F0 if needed,
1702           (genReceive): handle bit register parameters
1703         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1704           (mcs51_assignRegisters): enable bit registers for all reentrant
1705            functions and don't set BitBankUsed unconditionally
1706         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1707         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1708         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1709
1710 2005-08-27 Borut Razem <borut.razem AT siol.net>
1711
1712         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1713         ppc-osx (Darwin) does not support -u option. It seems that it is
1714         supported only on Linux - GNU cp
1715
1716 2005-08-25 Borut Razem <borut.razem AT siol.net>
1717
1718         * sim/ucsim/gui.src/serio.src/Makefile.in,
1719           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1720           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1721           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1722           install and strip, since the strip at /usr/ccs/bin should be used
1723           on solaris
1724
1725 2005-08-24 Borut Razem <borut.razem AT siol.net>
1726
1727         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1728
1729 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1730
1731         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1732         ffffffffu
1733
1734 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1735
1736         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1737         * as/mcs51/lkmain.c (link_main): fixed warning
1738         * device/include/stdbool.h: ds390 has no advanced bit support yet
1739         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1740         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1741         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1742           and updated their macros
1743         * src/SDCCval.c (constVal): updated comment for renamed b_long
1744
1745 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1746
1747         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1748         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1749           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1750           (oprio): set priority for '['
1751         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1752            and adb_24_bit
1753         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1754         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1755         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1756         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1757           added overlayable BIT_BANK area
1758         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1759           (summary2): explain 'T' in legenda
1760         * as/mcs51/lkrloc.c: replaced old K&R style,
1761           (relr): added R_BIT processing,
1762           (errmsg): added "Bit-addressable relocation error",
1763           (adb_bit): added for converting from byte- to bit-addressable space,
1764           (adb_24_bit): added for converting from byte- to bit-addressable space
1765         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1766            used in reentrant functions now even as return value
1767         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1768         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1769           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1770         * src/SDCCglobl.h: added indicator BitBankUsed
1771         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1772            the bit registers b0-b7
1773         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1774           (geniCodeCast): fixed bug 1263853,
1775           (geniCodeLogicAndOr): put result in bool or char,
1776           (geniCodeReceive): added parameter func for accessing the return type,
1777           (geniCodeFunctionBody): pass func to geniCodeReceive
1778         * src/SDCCmain.c: added indicator BitBankUsed
1779         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1780         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1781           (checkSClass): don't put automatic bool/bit on stack,
1782           (checkFunction): removed check on function cannot return bit
1783         * src/SDCCsymt.h: added newBoolLink prototype
1784         * src/mcs51/gen.c (rb1regs): added bit registers,
1785           (movc): created for assigning to carry,
1786           (pushReg, popReg): created for pushing registers,
1787           (sameRegs): check both AOP_REG and AOP_CRY types,
1788           (aopOp): handle bit registers,
1789           (aopPut): optimization no self-assign,
1790           (saveRegisters): push reg->base (bits) only once for bit registers,
1791            and use pushReg,
1792           (unsaveRegisters): pop reg->base only once and use popReg,
1793           (assignResultValue): added parameter func and return in carry for bits,
1794           (genIpush): optimization no reload in A if not changed,
1795           (genSend): bit parameters in reentrant functions are passed in bit
1796            registers by first assigning to bits in B, then save registers and
1797            copy B to bits,
1798           (genCall): handle returning in Carry properly, save it in F0 if needed,
1799           (genPcall): updated assignResultValue call, this is not safe yet for bit
1800            returning function !!!
1801           (genFunction): don't generate equ's for bit registers and use pushReg,
1802           (genEndFunction): take care of bit returning functions and use popReg,
1803           (genRet): return bit in Carry,
1804           (genIfx): optimize bit registers and other directly addressable bits,
1805           (genReceive): updated assignResultValue call
1806         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1807           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1808            registers when using stack-auto
1809         * src/mcs51/ralloc.c (_G): added allBitregs,
1810           (regs8051): added the bit registers,
1811           (createStackSpil): use macro IS_BIT,
1812           (getRegBit): added to allocate a bit register, else spill,
1813           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1814           (updateRegUsage): factored out to ease stepping while debugging,
1815           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1816            also allocate bit registers,
1817           (fillGaps): handle bit registers,
1818           (findAllBitregs): added to create bit vector with all bit registers,
1819           (mcs51_allBitregs): returns this bit vector,
1820           (mcs51_assignRegisters): when using stack-auto use bit registers for
1821            passing parameters and creating local variables
1822         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1823
1824 2005-08-22 Borut Razem <borut.razem AT siol.net>
1825
1826         * device/lib/Makefile.in: replaced find option -or with -o
1827           to make it run on solaris
1828
1829 2005-08-22 Raphael Neider <rneider AT web.de>
1830
1831         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1832           fixes #1265442 (crash on Solaris)
1833
1834 2005-08-20 Borut Razem <borut.razem AT siol.net>
1835
1836         * configure, configure.in: added tests for libsocket and libnsl libraries,
1837           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1838           from support/regression/Makefile.in
1839         * support/regression/Makefile.in: added
1840         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1841         * sim/ucsim/libtool: regenerated on sparc-solaris
1842         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1843           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1844           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1845           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1846           sparc-solaris, which doesn't use GNU ld linker
1847         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1848         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1849
1850 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1851
1852         * src/mcs51/peeph.def: updated comments
1853
1854 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1855
1856         * device/lib/_gptrget.c,
1857         * device/lib/_gptrput.c: slightly shorter
1858         * doc/sdccman.lyx: incremented version
1859         * src/mcs51/peeph.def: moved peephole comments to the line of first
1860           change to better keep line correlation, reanimated 186.e
1861         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1862
1863 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1864
1865         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1866           David Saxton with quotes around file name.
1867
1868 2005-08-15 Borut Razem <borut.razem AT siol.net>
1869
1870         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1871           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1872           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1873           make tests run on x86_64 platform
1874
1875 2005-08-13 Raphael Neider <rneider AT web.de>
1876
1877         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1878           as it might be executed DURING a build (parallel make is wonderful)
1879
1880 2005-08-13 Raphael Neider <rneider AT web.de>
1881
1882         * device/lib/Makefile.in (port-specific-objects-pic16):
1883           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1884         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1885           dependency
1886         * device/lib/pic16/Makefile.rules: build subdirs before creating
1887           the library, removed builddir rule, create $(builddir) early in
1888           recurse rule, use empty recurse rule for leaf directories
1889         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1890           mkdir errors (race condition), removed duplicate suffix "hex"
1891           from clean rules
1892         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1893         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1894           prevents mkdir -p from aborting on Alpha
1895
1896 2005-08-12 Raphael Neider <rneider AT web.de>
1897
1898         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1899           db-statements in order to allow for arrays of pointers in code
1900           sections to be placed without interspersed 0-padding, fixes
1901           bug #1256215
1902         * (emitStatistics): fixed division by zero for pic18f1220
1903         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1904           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1905         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1906         * (pic16_pCodeConstString): keep track of already emitted string
1907           literals to prevent "duplicate definitions of symbol _str_NR"
1908         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1909           debug message
1910         * device/lib/Makefile.in: ignore failing PIC16 library builds
1911         * device/lib/pic16/Makefile: do not build if gputils are missing
1912         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1913
1914 2005-08-10 Raphael Neider <rneider AT web.de>
1915
1916         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1917           my last commit)
1918
1919 2005-08-10 Raphael Neider <rneider AT web.de>
1920
1921         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1922           Rokas' patch to add the new fixed point type "__fixed16x16"
1923         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1924           functions for __fixed16x16 arithmetics
1925         * device/lib/pic16: reimplemented the build system to support
1926           a separate build directory, better handling of libio (create
1927           the library in a separate subdir for each architecture) and
1928           easier configuration (centralized in Makefile.common)
1929
1930 2005-08-07 Raphael Neider <rneider AT web.de>
1931
1932         * src/pic16/gen.c (genrshTwo): fixed sign extension
1933         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1934         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1935           added T0CONbits
1936         * device/include/pic16/pic18f4220.h: NEW, header for
1937           pic18f4220 and pic18f4320
1938         * device/include/pic16/pic18fregs.h: added new devices,
1939           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1940         * device/include/pic16/signal.h: resolved name clashes
1941           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1942           to also allow testing for interrupt enable bits, added
1943           comments on how to use the macros
1944         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1945         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1946           register definitions for the devices
1947         * device/lib/pic16/pics.all: added new devices
1948         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1949           allocated memory
1950         * device/lib/pic16/libc/stdlib/memfree: do not count
1951           the block header as free memory
1952         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1953           simplified and added missing end-of-blocklist-marker
1954           (reported by Peter Onion, fixes #1252814)
1955         * (_mergeHeapBlock): fixed loop condition
1956         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1957           len==0, restructured code
1958         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1959           up a bit, reduced bitfield accesses, prevent endless loops
1960           in case of heap corruption
1961         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1962           "unreferenced arguments/must return a value" warnings
1963         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1964           replaced BAUDREG with SPBRG
1965         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1966           device/lib/pic16/debug/gstack/gstack.c: replaced
1967           _naked, _asm, _endasm with __naked, __asm, __endasm
1968
1969 2005-08-05 Raphael Neider <rneider AT web.de>
1970
1971         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1972           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1973
1974 2005-08-05 Borut Razem <borut.razem AT siol.net>
1975
1976         * device/lib/Makefile.in: added missing ';'
1977         * configure: removed ^M characters
1978
1979 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1980
1981         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1982           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1983           License
1984
1985 2005-08-04 Borut Razem <borut.razem AT siol.net>
1986
1987         * configure.in: pic16 libraries build 2nd try - enable running
1988           configure in device/lib/pic16
1989         * configure: regenerated from configure.in
1990         * device/lib/Makefile.in: create $(PORT)/bin directory
1991
1992 2005-08-03 Raphael Neider <rneider AT web.de>
1993
1994         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1995           to get/set values via pointers
1996         * (genUnpackBits,genPackBits): changed detection of
1997           ptr->bitfield vs. sym.bitfield, fixed access via generic
1998           pointers, removed dead (wrong) code for multibyte bitfields
1999         * (genNearPointerGet, genGenPointerGet): removed useless code,
2000           fixed bitfield detection, fixes #1250594
2001         * (genNearPointerSet): removed useless code
2002         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2003           and introduced macro pic16_emitpcode that conditionally emits
2004           the origin of the following pCode (useful for debugging SDCC)
2005         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2006         * (createDefmap): fixed handling of LFSR for --optimize-df
2007
2008 2005-08-02 Borut Razem <borut.razem AT siol.net>
2009
2010         * device/lib/Makefile.in: pic16 libraries build enabled since
2011           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2012
2013 2005-08-02 Raphael Neider <rneider AT web.de>
2014
2015         * src/pic16/gen.c (genPackBits): removed deprecated warning
2016         * (genGenPointerSet): fixed bitfield detection
2017
2018 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2019
2020         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2021
2022 2005-07-31 Raphael Neider <rneider AT web.de>
2023
2024         * device/lib/pic16/libdev/pic18f458.c,
2025           device/include/pic16/pic18f458.h: added missing T0CONbits
2026
2027 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2028
2029         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2030
2031 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2032
2033         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2034
2035 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2036
2037         * device/include/mcs51/at89c51ed2.h: added.
2038
2039 2005-07-23 Raphael Neider <rneider AT web.de>
2040
2041         * src/pic/gen.h: added emitpcode macro for debugging
2042         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2043           and replace by macro adding debug information on demand
2044         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2045         * (gencjne): tried to fix; replaced with correct (slower) code
2046         * (gen{Unp,P}ackBits): fixed single bit access
2047         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2048         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2049           previous instruction
2050         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2051           register has to be handled with care (forbidding movement
2052           of assignments/uses, removing assignments completely, ...)
2053         * (pCodeOptime2pCodes): make use of regIsSpecial
2054         * added lots of debugging output (commented out)
2055         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2056           from being reused as result UNLESS it is known to work
2057
2058 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2059
2060         * support/Util/dbuf.h: include <stddef.h> for size_t
2061         * .version: changed to version 2.5.2
2062
2063 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2064
2065         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2066
2067 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2068
2069         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2070           (genModOneByte): removed needless psha/pula
2071
2072 2005-07-22 Raphael Neider <rneider AT web.de>
2073
2074         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2075           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2076         * src/pic/gen.c (resolveIfx): do not "invent" labels
2077         * (genSkipc): changed to positive logic
2078         * (genSkipCond): removed as no longer needed
2079         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2080           backport from PIC16
2081         * (genLeftShift): check operands are in different registers
2082         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2083           INCF does not update CARRY...
2084         * src/pic/main.c: fixed _linkCmd
2085         * src/pic/pcode.c (unlinkpCode): added inactive code
2086         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2087           alive (do not assign result and operand overlapping registers)
2088
2089 2005-07-22 Raphael Neider <rneider AT web.de>
2090
2091         * src/pic/device.c (dump_sfr): replaced register declaration with
2092           call to emitSymbolToFile() to avoid duplicate symbols
2093         * (assignRelocatableRegisters): do not declare external symbols
2094         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2095           right (take size of type, not etype)
2096         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2097         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2098         * (packRegsForAccUse): disabled assignment of WREG as
2099           the result reg to prevent occurence of just fixed #1235003,
2100           fixes #1242954
2101         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2102           symbols (avoids duplicate symbols in .asm file)
2103         * (pic14emitRegularMap): use emitSymbolToFile()
2104         * src/pic/gen.c (aopOp): fixed spillLocation handling
2105         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2106         * (genDataPointerSet): removed unneccessary variables/output
2107
2108 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2109
2110         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2111         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2112
2113 2005-07-21 Raphael Neider <rneider AT web.de>
2114
2115         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2116           architecture cannot handle them efficiently, fixes bug #1235003
2117         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2118           check for empty sets before using them (fixes bug #1232190)
2119
2120 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2121
2122         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2123           (lnksect2): generate warnings for memory overlap
2124         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2125           constseg to set the name of these segments so you can instruct the linker
2126           to place them in banks
2127         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2128         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2129           added code_seg and const_seg to options
2130         * src/SDCCglue.c (emitMaps): use options.const_seg,
2131           (createInterruptVect): put interrupt vectors in segment HOME,
2132           (glue): put HOME before static segment and put the main glue in HOME,
2133           (glue): use options.code_seg
2134         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2135         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2136           these segments so you can instruct the linker to place them in banks
2137           (linkEdit): use code_loc for HOME segment which should be the first
2138           segment in code memory now
2139         * src/SDCCmem.c: fixed more stuff like bug 1238386
2140         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2141           (changePointer): don't change function pointers to code pointers for
2142           banked functions,
2143           (compareType): added exceptional check for banked function pointers
2144         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2145         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2146           after static in code memory
2147         * src/mcs51/gen.c: added aopLiteralLong prototype,
2148           (aopForSym): use getSize for functions,
2149           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2150           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2151           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2152           the segment,
2153           (genPcall): use call for literal function pointers and generate banked
2154           calls over the one trampoline so there's only one place for the user to
2155           modify according to his/hers hardware,
2156           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2157           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2158         * src/mcs51/main.c: added keyword banked,
2159           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2160         * support/Util/SDCCerr.c,
2161         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2162           needed for passing the bank and address to the trampoline
2163         * device/lib/mcs51/crtbank.asm: added for bankswitching
2164         * device/lib/mcs51/Makefile: added crtbank
2165
2166 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2167
2168         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2169           for fields at offset 0 of a struct or union as reported
2170           on 2005-07-07 in the developer mailing list.
2171
2172 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2173
2174         * src/SDCCmem.c: fixed bug 1238386
2175
2176 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2177
2178         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2179           (patch #1144962), added peephole 300, enabled 259.x
2180         * doc/sdccman.lyx: removed screenshot and provided link instead
2181
2182 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2183
2184         * doc/sdccman.lyx: added section about debugging with ddd
2185         * doc/figures/ddd_example.eps: screenshot of debugging session
2186
2187 2005-07-04 Raphael Neider <rneider AT web.de>
2188
2189         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2190           like CODE pointers, fixes #1115683
2191         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2192           call, fixes bugs #1232211, #1228110,
2193           fixed wrong casts to pCodeFlow from pCodeInstructions
2194
2195 2005-07-04 Raphael Neider <rneider AT web.de>
2196
2197         * src/pic/gen.c (popGet): changed assert to allow for
2198           bit operands
2199         * (popGetAddr): changed signature to provide
2200           an additional index, patched all call sites
2201         * (genCmpEq): handle literal-like operands correctly
2202         * (genAddrOf): added sanity checks on __code/__data pointers
2203         * (genAssign): added handling of symbols from __code section
2204         * (gencjne): do not generate code for comparisons whose result
2205           is neither stored nor used, fixes bug #1171114
2206         * (AccLsh, AccRsh): operate on operand instead of WREG
2207         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2208           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2209           by known count
2210         * rewrote complete shift-by-literal logic, commented unused
2211           functions out
2212         * (genConstPointerGet): get multiple bytes (if result size > 1),
2213           fixed handling of non-immediate addresses
2214         * (genPointerGet): handle CODE pointers like CONST pointers
2215         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2216         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2217           operand is to be treated as a literal or not
2218         * (mov2w,genPcall,genCmpEq),
2219           src/pic/genarith.c: use aop_isLitLike() to decide between
2220           literal/register contents
2221         * (addSign): added missing offset
2222         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2223           only emit comment in debug-mode,
2224           use {aop,op}_isLitLike throughout the file
2225         * src/pic/glue.c: fix initializers for pointers (work in progress)
2226         * src/pic/pcode.c (get_op): honor index on _const symbols
2227         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2228         * (dumppBlock): added pCode size estimation
2229         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2230           check for IS_SYMOP before OP_SYMBOL'ing
2231         * fixed indentation, compacted switch-statements
2232         * (allocReg): find free register and allocate it instead of
2233           allocating new registers all the time
2234         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2235           registers as its operands (necessary only for multibyte GETs)
2236
2237 2005-07-01 Raphael Neider <rneider AT web.de>
2238
2239         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2240           debugging .asm-output macros FENTRY + FEXIT
2241         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2242           way... I wonder...
2243         * (emitpComment): NEW, printf to pCode
2244         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2245           offset handling
2246         * (popGetAddr): NEW, variant of popGet to access an immediates
2247           high(er) bytes instead of the n'th byte of memory they reference,
2248           replaced popGet with popGetAddr where neccessary
2249         * (genDataPointerGet): reactivated and fixed implementation
2250         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2251           accesses
2252         * (genDataPointerSet): fixed multibyte assignments
2253         * (genpic14Code): fixed --i-code-in-asm handling
2254         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2255         * (genPlus): fixed index-out-of-bounds error
2256         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2257         * src/pic/ralloc.c: added debugging output macro FENTRY2
2258         * (spillThis): fixed indentation, enbraced for-body for clarity
2259         * (rematStr): commented out as now unused
2260         * (regTypeNum): commented out special spill case (overwrites
2261           arbitrary values)
2262         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2263
2264 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2265
2266         * doc/sdccman.lyx: documented sfr16/sfr32,
2267           added example for using storage class with function pointers
2268         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2269
2270 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2271
2272         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2273         * device/lib/_itoa.c,
2274         * device/lib/_ltoa.c: optimized codesize
2275         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2276           but don't know how to suppress the double warning.
2277         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2278         * support/Util/SDCCerr.c,
2279         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2280
2281 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2282
2283         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2284           fixed old K&R prototypes
2285         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2286         * device/lib/_gptrget.c,
2287         * device/lib/_gptrgetc.c,
2288         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2289           also new versions for small generic pointers and banked generic pointers
2290         * src/port.h: added const_name
2291         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2292         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2293         * src/SDCCcse.c (findPrevIc): check all associative operators
2294         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2295         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2296         * src/SDCCmem.c: updated comments,
2297           set far-space to 0 for pdata, results in optimized code
2298         * src/SDCCmem.h: added macro CONST_NAME
2299         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2300           moving the info into the highest bits, see also gptrget/gptrput
2301         * src/src.dsp: added sdcc.ico to project files
2302         * src/avr/gen.c (genCast): fixed bug 0x%d
2303         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2304         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2305           relation between ptr_type and DCL_TYPE,
2306           (genCast): fixed bug 0x%d
2307         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2308           (CODE)" for const_name
2309         * src/hc08/gen.c (genCast): fixed bug 0x%d
2310         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2311           (hc08_port): added "CONST (CODE)" for const_name
2312         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2313           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2314           between ptr_type and DCL_TYPE,
2315           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2316           operand* and took AOP() inside function so sfr-ness can be checked,
2317           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2318           new prototype,
2319           (genFunction, genEndFunction): optimized stack setup,
2320           (genMinus): optimized for literals with ending zeroes (in bytes),
2321           (genCast): fixed bug 0x%d
2322         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2323           (mcs51_port): added "CONST (CODE)" for const_name
2324         * src/mcs51/peeph.def: made rule 226 more generic
2325         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2326         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2327         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2328         * src/z80/main.c (z80_port): added NULL for const_name,
2329           (gbz80_port): added NULL for const_name
2330         * support/regression/tests/bug663539.c,
2331         * support/regression/tests/sfr16.c: new tests
2332
2333 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2334
2335         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2336
2337 2005-06-24 Raphael Neider <rneider AT web.de>
2338
2339         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2340           corrected typos...
2341         * device/include/pic16/signal.h: added USBIF
2342           and SIG_USB
2343
2344 2005-06-24 Raphael Neider <rneider AT web.de>
2345
2346         * device/lib/pic16/libdev/pic18f2455.c,
2347           device/include/pic16/pic18f2455.h: NEW
2348         * device/include/pic16/pic18fregs.h,
2349           device/lib/pic16/pics.all,
2350           src/pic16/device.c: added 18f2455
2351         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2352           device/include/pic16/{pic18f[68][567].h,usart.h}:
2353           replaced MULTIPLE_USARTS define with more relaible
2354           compatibility sfrs (for USART access)
2355
2356 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2357
2358         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2359           and the output asm file line is printed on two lines.
2360
2361 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2362
2363         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2364           BGT, BLE, BHI, and BLS instructions
2365         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2366           genCmpEq): removed
2367         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2368           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2369           fixes bug #1216342
2370         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2371
2372 2005-06-15 Raphael Neider <rneider AT web.de>
2373
2374         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2375         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2376         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2377           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2378           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2379
2380 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2381
2382         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2383           Marcel Telka in bug #1215704
2384
2385 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2386
2387         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2388           located in shared memory bank.
2389
2390 2005-05-31 Raphael Neider <rneider AT web.de>
2391
2392         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2393           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2394           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2395
2396 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2397
2398         * device/lib/_strncpy.c: fixed the fix
2399
2400 2005-05-26 Raphael Neider <rneider AT web.de>
2401
2402         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2403           initializers with \0, bug #1208187
2404         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2405           intializers with \0, bug #1208187
2406
2407 2005-05-26 Raphael Neider <rneider AT web.de>
2408
2409         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2410           initializers with \0, bug #1208187
2411         * src/pic16/main.c (_process_pragma): added sanity checks
2412           for stack position and size, emit warnings when appropriate
2413
2414 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2415
2416         * device/lib/_strncpy.c: fixed not filling with \0
2417
2418 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2419
2420         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2421           createFunction),
2422         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2423           compound_statement),
2424         * src/SDCCsymt.h,
2425         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2426
2427 2005-05-24 Raphael Neider <rneider AT web.de>
2428
2429         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2430
2431 2005-05-24 Raphael Neider <rneider AT web.de>
2432
2433         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2434           TRISE definitions, closes bug #1162453
2435
2436 2005-05-22 Raphael Neider <rneider AT web.de>
2437
2438         * src/pic16/main.c (_process_pragma): check for missing
2439           arguments to pragmas code and udata
2440         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2441           consistency fixes to match other headers (thanks to Jim Paris)
2442         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2443
2444 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2445
2446         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2447
2448 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2449
2450         * support/regression/tests/bug1198642.c: new test
2451         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2452         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2453         * support/scripts/resource.h,
2454         * support/scripts/resource.rc,
2455         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2456         * support/scripts/sdcc.ico: added 32x32 icon
2457
2458 2005-05-18 Raphael Neider <rneider AT web.de>
2459
2460         * device/lib/pic16/libdev/pic18f*.c,
2461         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2462           keywords to "__sfr" and "__at (X)"
2463         * device/include/pic16/pic18fregs.h: added pic18f4520
2464         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2465           #1203088 (MPLAB compatibility)
2466
2467 2005-05-17 Raphael Neider <rneider AT web.de>
2468
2469         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2470         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2471         * device/lib/pic16/pics.all: added new devices
2472         * src/pic16/device.c: added support for pic18f4520
2473
2474 2005-05-16 Raphael Neider <rneider AT web.de>
2475         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2476         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2477         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2478           convenience function for bit access
2479
2480 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2481
2482         * device/lib/printf_large.c: fixed bug 1193299
2483         * support/regression/tests/bug1057979.c: added test %3.3s
2484
2485 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2486
2487         * device/include/mcs51/8051.h,
2488         * device/include/mcs51/8052.h: made parseable with lint
2489         * device/include/mcs51/lint.h: added include file for (sp)lint
2490         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2491         * doc/cdbfileformat.lyx,
2492         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2493
2494 2005-05-14 Raphael Neider <rneider AT web.de>
2495
2496         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2497         * device/lib/pic16/libc/stdlib/itoa.c (new)
2498         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2499         * device/lib/pic16/libio/Makefile: exclude subdir according to
2500           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2501         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2502         * src/pic16/gen.c (genFunction): prevent annoying warning
2503         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2504           nameclashes on BeOS
2505         * support/cpp2/cppmain.c (cpp_output_string): new
2506         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2507           fixes bug 1116802
2508
2509 2005-05-13 Borut Razem <borut.razem AT siol.net>
2510
2511         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2512
2513 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2514
2515         * .version: changed to version 2.5.1; back to bleeding edge development
2516
2517 2005-05-11 Borut Razem <borut.razem AT siol.net>
2518
2519         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2520           generate PDF version 1.3 documents
2521
2522 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2523
2524         * .version: changed to version 2.5.0
2525
2526 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2527
2528         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2529
2530 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2531
2532         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2533         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2534         well as many smaller updates.
2535         * .version: changed to version 2.5.0-pre1
2536
2537 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2538
2539         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2540
2541 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2542
2543         * support/regression/tests/bug1185672.c: added
2544         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2545           bug 1185672
2546         * src/mcs51/gen.c (genCall): added comments, made it look safer
2547         * src/mcs51/gen.c (genEndFunction): simplified
2548
2549 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2550
2551         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2552
2553 2005-04-14 Borut Razem <borut.razem AT siol.net>
2554
2555         * fixed bug 1045046 - SIGSEGV with really simple code?:
2556           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2557           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2558
2559 2005-04-14 Borut Razem <borut.razem AT siol.net>
2560
2561         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2562           src/pic16/device.h: temporarily disabled experimental #inline pragma
2563           for 2.5.0 release
2564
2565 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2566
2567         * device/include/z80/stdio.h,
2568         * device/include/z80/string.h: removed these highly incomplete files so
2569           SDCC can use the default ones in device/include/
2570
2571 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2572
2573         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2574         gcc warning.
2575         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2576         fix sdcpp warnings.
2577
2578 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2579
2580         * device/include/malloc.h: removed redundant __reentrant prototypes
2581         * device/lib/_mullong.c: added working xstack variant in asm (C version
2582           doesn't pass regression tests)
2583         * device/lib/bpx.c: used __data and made bpx char for mcs51
2584         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2585           (createFunction): fixed bug with xstackPtr
2586         * src/SDCCcse.c: corrected comments
2587         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2588           (killDeadCode, eBBlockFromiCode): removed unused code
2589         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2590           corrected comments
2591         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2592           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2593           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2594           (genModOneByte): fixed warning in MSVC
2595         * src/mcs51/main.c (): added comments
2596         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2597
2598 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2599
2600         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2601
2602 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2603
2604         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2605
2606 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2607
2608         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2609         characters arrays of larger size than the declared one.
2610
2611 2005-04-10 Borut Razem <borut.razem AT siol.net>
2612
2613         * src/pic/gen.c (genInline),
2614           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2615           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2616           (findNextInstruction), (findPrevInstruction),
2617           (findInstructionUsingLabel),
2618           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2619         * src/pic/pcode.c (findLabel): added missing '\n'
2620         * src/src.dsp: added SDCCdwarf2.c to the project
2621
2622 2005-04-09 Borut Razem <borut.razem AT siol.net>
2623
2624         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2625
2626 2005-04-08 Raphael Neider <rneider AT web.de>
2627
2628         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2629           into the chain after a given one) and mergeDefmapSymbols (combine
2630           defmap entries for each symbol per pcode)
2631         * (createDefmap): have defmap entries merged in the end
2632         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2633           a symbol before replacing one access type's symbol, merge symbols in
2634           the end (replacement symbol might already have an entry)
2635         * (assignValnums): keep reference to written WREG intact
2636
2637 2005-04-08 Raphael Neider <rneider AT web.de>
2638
2639         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2640           Alpha)
2641
2642 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2643
2644         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2645         bytes
2646
2647 2005-04-07 Raphael Neider <rneider AT web.de>
2648
2649         * device/include/pic16/usart.h: added compatibility defines for
2650           devices with more than one USART
2651         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2652
2653 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2654
2655         * device/lib/Makefile.in: updated for port specific include
2656
2657 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2658
2659         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2660
2661 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2662
2663         * device/include/8051.h,
2664         * device/include/8052.h,
2665         * device/include/at89S8252.h,
2666         * device/include/at89c55.h,
2667         * device/include/at89x051.h,
2668         * device/include/at89x51.h,
2669         * device/include/at89x52.h,
2670         * device/include/mcs51reg.h,
2671         * device/include/reg51.h,
2672         * device/include/reg764.h,
2673         * device/include/regc515c.h,
2674         * device/include/sab80515.h: (re)moved these 12 files
2675         * device/include/mcs51/8051.h,
2676         * device/include/mcs51/8052.h,
2677         * device/include/mcs51/at89S8252.h,
2678         * device/include/mcs51/at89c55.h,
2679         * device/include/mcs51/at89x051.h,
2680         * device/include/mcs51/at89x51.h,
2681         * device/include/mcs51/at89x52.h,
2682         * device/include/mcs51/mcs51reg.h,
2683         * device/include/mcs51/reg51.h,
2684         * device/include/mcs51/reg764.h,
2685         * device/include/mcs51/regc515c.h,
2686         * device/include/mcs51/sab80515.h: and added them here
2687
2688 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2689
2690         * device/include/stdarg.h: changed SDCC specific keywords to double
2691           underlined form.
2692         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2693           mcs51 and ds390.
2694         * device/include/hc08/mc68hc908gp32.h,
2695         * device/include/hc08/mc68hc908jb8.h,
2696         * device/include/hc08/mc68hc908jkjl.h,
2697         * device/include/hc08/mc68hc908qy.h: fixed comments
2698         * device/include/mcs51/README: updated
2699         * device/include/mcs51/c8051f120.h: added PINRSF
2700         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2701         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2702           amidst code. Also inline is not supported.
2703
2704 2005-04-06 Raphael Neider <rneider AT web.de>
2705
2706         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2707         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2708           callers stack/frame pointers
2709
2710 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2711
2712         * device/include/pic16/usart.h: added, missing in previous commit,
2713         * device/include/pic16/adc.h: fixed typo,
2714         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2715         commit,
2716         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2717         <p18fxxx.inc>
2718         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2719         uninitialized because a bug appears with gplink
2720         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2721         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2722         complains for unrecognised option
2723
2724 2005-04-05 Raphael Neider <rneider AT web.de>
2725
2726         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2727           structs as well (using memcpy)
2728         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2729           on ISRs (GOTO has no label)
2730         * src/pic16/device.h: added OF_OPTIMIZE_DF
2731         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2732           new data flow analysis/optimization
2733         * src/pic16/pcode.c: added (prototypes for and implementation of)
2734           dataflow analysis functions, fixed pCodeInstructions' inCond and
2735           outCond values, made RCALL a branch instruction
2736         * (pic16_unlinkpCode): keep C line if possible
2737         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2738           C line moved if possible
2739         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2740         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2741           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2742         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2743           new flow)
2744         * (pic16_getJumptabpCode): NEW, needed in...
2745         * (LinkFlow): fixed handling of jumptables, calls and conditional
2746           branches
2747         * (pic16_InsertCommentAfter): NEW
2748         * (pic16_pCodeReplace): made verbose and flow preserving
2749         * (AnalyzeFlow): added call to data flow analysis
2750         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2751         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2752         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2753
2754 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2755
2756         * src/SDCCast.c (decorateType): fixed bug #1105626
2757
2758 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2759
2760         * device/include/asm/pic16/features.h,
2761         * pic18f*.h headers,
2762         * device/include/pic16/adc.h,
2763         * device/include/pic16/delay.h,
2764         * device/include/pic16/i2c.h,
2765         * device/include/pic16/malloc.h,
2766         * device/include/pic16/stdio.h,
2767         * device/include/pic16/stdlib.h,
2768         * device/include/pic16/string.h,
2769         * device/lib/pic16/libc/stdio/printf_tiny.c,
2770         * device/lib/pic16/libc/stdio/printf_small.c,
2771         * device/lib/pic16/libc/stdio/strmgpsim.c,
2772         * device/lib/pic16/libc/stdio/strmmssp.c,
2773         * device/lib/pic16/libc/stdio/strmusart.c,
2774         * device/lib/pic16/libc/stdio/vfprintf.c,
2775         * device/lib/pic16/libc/stdlib/ltoa.c,
2776         * device/lib/pic16/libc/stdlib/putchar.c,
2777         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2778         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2779         * device/lib/pic16/libc/stdlib/memchrram.c,
2780         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2781         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2782         * device/lib/pic16/libio/adc/adcbusy.c,
2783         * device/lib/pic16/libio/adc/adcread.c,
2784         * device/lib/pic16/libio/adc/adcsetch.c,
2785         * device/lib/pic16/libio/usart/ubaud.c,
2786         * device/lib/pic16/libio/usart/ubusy.c,
2787         * device/lib/pic16/libio/usart/udrdy.c,
2788         * device/lib/pic16/libio/usart/uopen.c,
2789         * device/lib/pic16/libio/usart/uputc.c,
2790         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2791         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2792         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2793         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2794         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2795         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2796         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2797         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2798         specific keywords to double underlined form,
2799         * device/lib/pic16/libc/Makefile.rules,
2800         * device/lib/pic16/libsdcc/Makefile.rules,
2801         * device/lib/pic16/libm/Makefile,
2802         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2803         to compile with C standard set in Makefile.common
2804         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2805         rand.c and crc.c in compilation process,
2806         * device/lib/pic16/libsdcc/int/divuint.c,
2807         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2808         `c' from signed to unsigned,
2809         * device/lib/pic16/startup/crt0.c,
2810         * device/lib/pic16/startup/crt0i.c,
2811         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2812         keywords to double underlined form, bug fixes in _do_cinit function
2813         which prevented the correct initialization of the .idata segment,
2814         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2815         core to enter a infinite loop
2816         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2817
2818 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2819
2820         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2821
2822 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2823
2824         * device/include/Makefile.in: add support for hc08 subdirectory
2825         * device/include/hc08/: new subdirectory
2826         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2827         Lucas Loizaga, thanks!
2828         * device/include/hc08/mc68hc908qy.h,
2829         * device/include/hc08/mc68hc908gp32.h,
2830         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2831         their own directory. Changed internal macro names to use the compiler
2832         reserved namespace. Changed SDCC specific keywords to double
2833         underlined form.
2834         * device/include/math.h,
2835         * device/include/malloc.h,
2836         * device/include/stdarg.h,
2837         * device/include/stdbool.h
2838         * device/include/string.h,
2839         * device/include/tinibios.h,
2840         * device/include/ds400rom.h,
2841         * device/include/8051.h,
2842         * device/include/8052.h,
2843         * device/include/80c51xa.h,
2844         * device/include/at89c55.h,
2845         * device/include/at89S8252.h,
2846         * device/include/at89x51.h,
2847         * device/include/at89x52.h,
2848         * device/include/ds80c390.h,
2849         * device/include/reg764.h,
2850         * device/include/regc515c.h,
2851         * device/include/sab80515.h,
2852         * device/include/mcs51/c8051f000.h,
2853         * device/include/mcs51/c8051f018.h,
2854         * device/include/mcs51/c8051f020.h,
2855         * device/include/mcs51/c8051f040.h,
2856         * device/include/mcs51/c8051f060.h,
2857         * device/include/mcs51/c8051f120.h,
2858         * device/include/mcs51/c8051f300.h,
2859         * device/include/mcs51/c8051f310.h,
2860         * device/include/mcs51/c8051f320.h,
2861         * device/include/mcs51/c8051f330.h,
2862         * device/include/mcs51/c8051f350.h,
2863         * device/include/z180.h: Changed SDCC specific keywords to double
2864         underlined form.
2865
2866 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2867
2868         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2869         18F4455,
2870         * (pic16_assignConfigWordValue): disable testing of configuration
2871         register value with config mask,
2872         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2873         function with port->fun_prefix,
2874         * (genFunction): when generating a naked interrupt function never
2875         create an absolute segment placed in interrupt vector address, place
2876         the actual interrupt function at IVA instead, when an interrupt
2877         function is generated with unspecified interrupt then do not create
2878         the absolute section,
2879         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2880         code for generating a call to generic pointer get/put function with
2881         a call to function pic16_callGenericPointer(),
2882         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2883         the call to the generic pointer get/put functions with prefixing the
2884         function name with port->fun_prefix,
2885         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2886         * src/pic16/main.c (_process_pragma): prefix function with
2887         port->fun_prefix,
2888         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2889         calling assembler, old 18Fxxxx macro is deprecated,
2890         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2891         PC_ASMDIR in while condition,
2892         * (findInstruction): add PC_ASMDIR in while condition,
2893         * (buildCallTree): prefix main with port->fun_prefix,
2894         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2895         identifier for variable with banked access in instructions BTFSS,
2896         BTFSC, BCF, BSF, BTG
2897         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2898         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2899         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2900         perform optimization when enviroment variable NO_REG_OPT is set,
2901         * (insideLRBlock): NEW, return 1 if register is inside an
2902         INF_LOCALREGS block,
2903         * (RemoveRegFromLRBlock): remove a register that is completely
2904         eliminated by register optimization, but it is still left in local
2905         register store/restore in/from stack block,
2906         * (Remove2pcodes): after removing register, check to see if it
2907         should be removed from local register store/restore in/from stack
2908         block,
2909         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2910         DUMMY_READ_VOLATILE,
2911
2912         * device/include/pic16/adc.h: minor prototype modifications and
2913         update,
2914         * device/include/pic16/malloc.h: added GPL notice various
2915         modifications,
2916         * device/include/pic16/stdint.h: NEW, standard header for ints
2917         * device/include/pic16/delay.h: NEW, header for delay functions,
2918         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2919         delay1mtcy,
2920         * device/include/pic16/signal.h: NEW, header providing helper macros
2921         for implementing signal handlers,
2922         * device/include/pic16/stdio.h: added prototypes for functions,
2923         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2924         prototypes for stdin and stdout, added macro PUTCHAR to
2925         automatically implement putchar function prototype,
2926         * device/include/pic16/usart.h: modified and updated USART library,
2927         * device/lib/pic16/libio/adc/,
2928         * device/lib/pic16/libio/i2c: some modifications to improve library
2929         performance,
2930         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2931         family of functions,
2932         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2933         family of functions and other sources,
2934         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2935         of the PIC18Fxx[28] devices,
2936         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2937         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2938         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2939         _do_cinit function, because the previous failed when local variables
2940         where not placed in the same memory bank,
2941         * device/lib/pic16/libsdcc/char/: various modifications to improve
2942         library performance,
2943         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2944         information on the new functions of the c library and more...
2945
2946 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2947
2948         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2949
2950 2005-03-26 Raphael Neider <rneider AT web.de>
2951
2952         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2953           if condition == CARRY)
2954         * (genCmp): adapted to new genSkipc semantics
2955         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2956           on rIfx (genCmp was broken)
2957
2958 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2959
2960         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2961         * src/z80/main.c (_keywords[]),
2962         * src/SDCCglobal.h (struct options),
2963         * src/SDCC.y,
2964         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2965         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2966         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2967         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2968         always available in leading double underscore form. The C99 support is
2969         mostly missing, but it's a start.
2970         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2971         reserved identifier "__data".
2972
2973 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2974
2975         * src/mcs51/peeph.def: fixed bug 1170013
2976
2977 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2978
2979         * device/include/mcs51reg.h: fixed bug 842007
2980
2981 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2982
2983         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2984         last time.
2985
2986 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2987
2988         * src/port.h (struct PORT),
2989         * src/avr/ralloc.c (avr_assignRegisters),
2990         * src/avr/main.c,
2991         * src/ds390/ralloc.c (ds390_assignRegisters),
2992         * src/ds390/main.c,
2993         * src/hc08/ralloc.c (hc08_assignRegisters),
2994         * src/hc08/main.c,
2995         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2996         * src/mcs51/main.c,
2997         * src/pic/ralloc.c (pic14_assignRegisters),
2998         * src/pic/main.c,
2999         * src/pic16/ralloc.c (pic16_assignRegisters),
3000         * src/pic16/main.c,
3001         * src/xa51/ralloc.c (xa51_assignRegisters),
3002         * src/xa51/main.c,
3003         * src/z80/ralloc.c (z80_assignRegisters),
3004         * src/z80/ralloc.h,
3005         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3006         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3007         * src/SDCCcse.h,
3008         * src/SDCCdflow.c (computeDataFlow),
3009         * src/SDCCdflow.h,
3010         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3011         * src/SDCCloop.h,
3012         * src/SDCCcflow.c (*),
3013         * src/SDCCcflow.h,
3014         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3015         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3016         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3017         immedDom() returning wrong block; probably fixes bug #1160833)
3018
3019 2005-03-20 Borut Razem <borut.razem AT siol.net>
3020
3021         * support/scripts/inc2h.pl: WIN32 port
3022
3023 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3024
3025         * device/lib/makefile.in: added abs.c and labs.c
3026
3027 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3028
3029         * device/include/stdint.h: added
3030         * device/lib/abs.c: added
3031         * device/lib/labs.c: added
3032         * device/include/stdlib.h: added abs() and labs() prototypes
3033         * device/lib/libsdcc.lib: added abs and labs
3034         * device/include/float.h,
3035         * device/lib/_fsmul.c,
3036         * device/lib/printf_fast.c,
3037         * device/lib/printf_tiny.c: updated comments
3038
3039 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3040
3041         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3042         bug #1164313
3043
3044 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3045
3046         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3047         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3048
3049 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3050
3051         * device/lib/printf_large.c: removed inline assembly for portability and
3052           readability. Use printf_fast if speed or size are more important.
3053         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3054         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3055
3056 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3057
3058         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3059         prevent compiler warning
3060
3061 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3062
3063         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3064         moved to level 0 and declared as static. Also they are explicit
3065         placed in access bank. This was necessery because some times they
3066         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3067         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3068         optimizations. Currently only compare to unsigned char is implemented,
3069         * src/pic16/gen.c: added fReturnIdx array,
3070         * (struct resolvedIfx) is moved to gen.h and made public,
3071         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3072         * (aopForSym): added an optimization to directly store in stack of
3073         the operand of a SEND iCode,
3074         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3075         but as registers instead (AOP_REG) using the fReturnIdx array,
3076         * (pic16_freeAsmop): remove the freed register from the
3077         _G.sregsAlloc field,
3078         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3079         a compare of 'WREG',
3080         * (pic16_popGetTempRegCond): changed function prototype, now
3081         function takes also a bitVector argument v which holds the current
3082         set of registers that are allocated for stack access by aopForSym,
3083         registers allocated in aopForSym for accessing stack symbols are not
3084         any more part of the functions usedRegs field,
3085         * (genCall): some times aopOp is called for a stack variable to be
3086         send, aopForSym might perform the push, if this is true make sure
3087         that genCall doesn't push the variable twice by testing _G.resDirect,
3088         * (genFunction): changed testing for unspecified interrupt number
3089         from 256 to INTNO_UNSPEC,
3090         * modified selection scheme of frame pointer generation. Previously
3091         if function did use local registers a frame pointer was generated,
3092         now a frame pointer is generated only if function has arguments
3093         (that need PLUSW2 register access), or has stack arguments, or the
3094         compiler is not instructed to omit the frame pointer,
3095         * (genEndFunction): before restoring local registers that were saved
3096         in the function preamble, also restore the registers that *might*
3097         have been allocated for stack access,
3098         * (genRet): removed some old comments,
3099         * (genCmp, the active (RN's) version): added a call to the
3100         pic16_genCmp_special function to perform the compare with a more
3101         robust and optimized way,
3102         * (genInline): a feature has been added in inline code generation,
3103         which allows a wildcard variable substitution when writing inline
3104         assembly. Code is incomplete and experimental therefore undocumented,
3105         * (genCast): changed order of aopOp for result and right to allow
3106         aopForSym to directly load the result if possible,
3107         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3108         perform an optimized compare on some selected special occasions,
3109         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3110         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3111         generate an IVT any more,
3112         * src/pic16/main.c (pic16_optionsTable): added command line option
3113         --optimize-cmp,
3114         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3115         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3116         macros,
3117         * src/pic16/NOTES: Raphael Neider added in list of active developers
3118         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3119         jumptable_end to prevent bug #,
3120         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3121         inCond and outCond fields,
3122         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3123         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3124         turn off register spilling,
3125         * (packRegsForOneUse): synced with other ports' versions although it
3126         is not used currently,
3127         * (pic16_packRegisters): added an optimization while reading
3128         structure bitfields, some registers may be saved (malloc code is
3129         decreased by 80 bytes)
3130
3131 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3132
3133         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3134         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3135         this can be optimized more?
3136
3137 2005-03-10 Raphael Neider <rneider AT web.de>
3138
3139         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3140           genNearPointerGet): (hopefully) fixed access to bitfields via
3141           pointers (p->bitN = x; and x = p->bitN; failed)
3142
3143 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3144
3145         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3146
3147 2005-03-09 Raphael Neider <rneider AT web.de>
3148
3149         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3150
3151 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3152
3153         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3154         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3155           (regTypeNum): set REG_BIT type if necessary
3156         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3157         * support/regression/tests/critical.c: check bug 1144613
3158
3159 2005-03-02 Raphael Neider <rneider AT web.de>
3160
3161         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3162
3163 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3164
3165         * src/avr/ralloc.c (serialRegAssign),
3166         * src/ds390/ralloc.c (serialRegAssign),
3167         * src/hc08/ralloc.c (serialRegAssign),
3168         * src/mcs51/ralloc.c (serialRegAssign),
3169         * src/pic/ralloc.c (serialRegAssign),
3170         * src/pic16/ralloc.c (serialRegAssign),
3171         * src/xa51/ralloc.c (serialRegAssign),
3172         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3173
3174 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3175
3176         * src/SDCCast.c (decorateType): fixed bug 1124787
3177
3178 2005-02-20 Hubert Sack <sack AT digiplan.de>
3179         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3180
3181         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3182         patch #1121755
3183
3184 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3185
3186         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3187         to keep the correct label reference count when adding/removing references
3188         to labels. A peephole file using this is appended to patch #1144962.
3189
3190 2005-02-14 Raphael Neider <rneider AT web.de>
3191
3192         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3193         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3194         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3195           retrievals of result operand's value on assignment
3196
3197 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3198
3199         * device/include/pic16/string.h: modified prototype for memccpy()
3200         to memccpy(void *, void *, char, size_t)
3201         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3202         check whether to omit frame pointer or not,
3203         * (genInline): convert all occurences of "\n" to LF in inline
3204         assembler blocks, this helps formatting the inline text,
3205         * (pic16_loadFSR0): modified prototype,
3206         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3207         removed some 8051 legacy code,
3208         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3209         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3210         before allocating temporary registers in functions,
3211
3212 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3213
3214         * support/regression/tests/bitvars.c: corrected the "fix"
3215
3216 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3217
3218         * support/regression/tests/bitvars.c,
3219         * support/regression/tests/bitwise.c,
3220         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3221
3222 2005-02-10 Raphael Neider <rneider AT web.de>
3223
3224         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3225           different size for Alpha
3226         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3227
3228 2005-02-09 Raphael Neider <rneider AT web.de>
3229
3230         * src/SDCC.lex(doPragma) : save and restore warning options as well
3231           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3232         * have #pragma less_pedantic set the errorlevel to WARNING
3233           (fixes #1117001)
3234         * (cloneOptimize) : fixed wrong malloc's size
3235         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3236           facilitate correct handling of #pragma (save|restore)
3237
3238 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3239
3240         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3241
3242 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3243
3244         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3245
3246 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3247
3248         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3249
3250 2005-02-02 Raphael Neider <rneider AT web.de>
3251
3252         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3253         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3254         * (pic16_storeForReturn): fixed to allow returning function pointers
3255         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3256         * device/include/pic16/{stddef.h,stdbool.h}: added
3257
3258 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3259
3260         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3261
3262 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3263
3264         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3265         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3266          appeared to be required
3267
3268 2005-01-31 Borut Razem <borut.razem AT siol.net>
3269
3270         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3271           include/mcs51 and include/z80 directories to the package
3272
3273 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3274
3275         * src/hc08/gen.c (genFunction): fixed bug #1112752
3276
3277 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3278
3279         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3280
3281 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3282
3283         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3284
3285 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3286
3287         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3288
3289 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3290
3291         * device/include/c8051fxxx.h: removed these 6 files
3292         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3293
3294 2005-01-26 Raphael Neider <rneider AT web.de>
3295
3296         * src/pic16/gen.c (genAssign): fixed assignment from longs
3297           in codespace (were cut to three bytes)
3298         * (genDummyRead): implemented (except for CODESPACE...),
3299           fixed bug #1108575
3300         * src/pic16/glue.c (emitStatistics): beautified
3301         * device/lib/pic16/libm/Makefile: added include path
3302
3303 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3304
3305         * src/z80/gen.c (aopPut): fixed bug #1103902
3306
3307 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3308
3309         * device/lib/expf.c: fixed bug #1095792
3310
3311 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3312
3313         * device/lib/pic16/libm: added Math library sources
3314
3315 2005-01-24 Raphael Neider <rneider AT web.de>
3316
3317         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3318           to enable upcast to pCodeOpReg2 (there is no type tag to
3319           differenciate the two and pic16_popGet2p cast into PCOR2)
3320         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3321           (sizeof(sectNames) changed to sizeof(sectName))
3322           Both patches fix segfaults under MinGW.
3323
3324 2005-01-23 Raphael Neider <rneider AT web.de>
3325
3326         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3327           Safe_[mc]?alloc()'ed variables
3328         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3329           of (byte sized) temporaries (assign them to WREG for now)
3330         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3331           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3332           this might fix SIGSEGVs on MinGW...
3333         * src/SDCCopt.c (killDeadCode): restored original behaviour
3334           (volatile operands might get thrown away though)
3335
3336 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3337
3338         * src/pic16/gen.c: fixed bug #1106975,
3339         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3340         pointer update, INTCON is saved, global interrupts are disabled and
3341         restored after updateing TOS.
3342         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3343         * added function attribute 'shadowregs' to take advantage of shadow
3344         registers,
3345         * added function attribute 'wparam' as an alternative to the wparam
3346         pragma,
3347         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3348         user declares a non-ISR function as 'shadowregs',
3349         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3350
3351 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3352
3353         * .version: bumped version number to 2.4.8
3354         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3355         pic16 port,
3356         * device/lib/pic16/libio/i2c/: I2C module support library,
3357         * device/include/pic16/i2c.h: I2C support library header,
3358         * device/lib/pic16/libc/stdio/: standard IO support sources,
3359         * (printf_small.c): printf_small() source, supports float print,
3360         * (printf_tiny.c): printf_tiny() source, does not support floats,
3361         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3362         enable global optimizations for entire library source, other
3363         Makefiles in the source tree are also modified to reflect this,
3364         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3365         function,
3366         * doc/sdccman.lyx: updated to reflect new changes,
3367         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3368         sym->onStack if-case,
3369         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3370         sbit, idata, _idata, xdata, _xdata,
3371         * added pragma library, to link an external library, (see doc),
3372         * removed command line options, --pomit-config-words, --pomit-ivt,
3373         --pleave-reset-vector,
3374         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3375         when calling assembler to reflect memory model used, also define
3376         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3377         reflect stack model used,
3378         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3379         on stack return NULL,
3380
3381 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3382
3383         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3384           of the operands is volatile. Fixes #1020220
3385
3386 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3387
3388         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3389         * (OptimizeRegUsage): make sure that there is really no other flow where
3390           the first pCode is used
3391
3392 2005-01-22 Raphael Neider <rneider AT web.de>
3393
3394         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3395           to fix #1106967 (pCode->seq are not set up correctly)
3396
3397 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3398
3399         * src/SDCCglue.c (glue): make sure code area is declared before the
3400         static initialization area.
3401
3402 2005-01-21 Raphael Neider <rneider AT web.de>
3403
3404         * device/lib/Makefile.in: fixed test for pic16 install dir
3405         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3406           optimizations
3407         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3408           added --optimize-goto compiler switch and pragma wparam documentation
3409         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3410         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3411           and PRODH closing bug #1071770 (peephole optimizer)
3412
3413 2005-01-19 Raphael Neider <rneider AT web.de>
3414
3415         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3416           cmdLine buffers (used when calling sdcpp...) are large enough
3417           (MAX_PATH=256 truncates arguments leading to system halts when
3418           used in MinGW...)
3419         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3420         * (genUminus): rewritten to for efficiency
3421         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3422           used uninitialized in some cases)
3423         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3424           copy the third byte from the int -- now assumes 0x80 (data memory)
3425         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3426           operands (genAddLit expects the iCode's operands to swapped as
3427           well), fixed leftover bytes (crashed for short left operands)
3428         * (pic16_genMinusDec): performance improvements, removed false
3429           PIC14 emitSKPNCs
3430         * (pic16_genMinus): fixed to cope with differently sized operands
3431         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3432           for --obanksel > 1
3433         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3434         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3435           new banksel optimization
3436         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3437           analysis for temporary registers (segfaults...)
3438         * src/pic16/peeph.def: added rule
3439
3440 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3441
3442         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3443         which converts a float number to its ASCII representation
3444         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3445         functions to convert the fractional and integer part of a float to ASCII,
3446         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3447         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3448         ram
3449         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3450         _STATMEM macros,
3451         * device/include/pic16/adc.h: added GPL info,
3452         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3453         a pCodeOp as tested operand,
3454         * (genNearPointerGet): optimized bit testing, does not use
3455         intermediate register for bit value, test directly instead with
3456         BTFSS, BTFSC, works only for single bits,
3457         * (genpic16Code): dump the name of the iCode in the asm,
3458         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3459         renamed to pic16_decodeOp,
3460         * (serialRegAssign): do not allocate a temporary register for iCode
3461         sequences that test a single bit for 1/0
3462
3463 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3464
3465         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3466         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3467         access stack and frame pointers. They are initially assigned to
3468         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3469         accessing SFRs. Updated all occurences of modification of stack or
3470         frame pointer in gen.c and pcode.c,
3471         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3472         assigning of a literal value to pointers,
3473         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3474         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3475         selected
3476
3477 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3478
3479         * doc/sdccman.lyx: update documentation about stack pragma, added
3480         some info for stack memory models
3481
3482 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3483
3484         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3485
3486 2005-01-08 Raphael Neider <rneider AT web.de>
3487
3488         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3489           udata sections to fix bug #1097823
3490
3491 2005-01-05 Raphael Neider <rneider AT web.de>
3492
3493         * src/pic16/gen.c (genGenericShift): added handling of differently
3494           sized left operand and result
3495
3496 2005-01-04 Raphael Neider <rneider AT web.de>
3497
3498         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3499         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3500           to hold the condition bit)
3501         * added new version of genCmp (old code available via #define)
3502         * added new version of genShiftLeft/genShiftRight in a generic
3503           way, now supports shifting by negative values
3504         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3505           shiftCount (expected by genGenericShift)
3506         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3507         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3508           dump
3509         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3510           is an invalid literal too...)
3511
3512 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3513
3514         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3515         from Raphael Neider,
3516         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3517         for 8-bit literals. This fixes some literal operands which are sign
3518         extended to 16-bits ints when instruction needs only 8-bits.
3519
3520 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3521
3522         * device/lib/logf.c: added mcs51 assembly version
3523         * device/lib/expf.c: added mcs51 assembly version
3524         * device/lib/_logexpf.c: new shared asm code for expf and logf
3525         * device/include/math.h: add defines for assembly math library
3526         * device/lib/Makefile.in: build new _logexpf.c
3527         * device/lib/libfloat.lib: use new _logexpf.c
3528
3529 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3530
3531         * src/pic/device.c
3532         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3533           device types which have less than 0x7f registers.
3534
3535 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3536
3537         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3538
3539 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3540
3541         * device/lib/printf_fast.c: only build on supported arch.
3542         * device/lib/printf_tiny.c: only build on supported arch.
3543         * device/lib/printf_fast_f.c: only build if asm float lib
3544         * device/lib/_fsget1arg.c: only build if asm float lib
3545         * device/lib/_fsget2args.c: only build if asm float lib
3546         * device/lib/_fsnormalize.c: only build if asm float lib
3547         * device/lib/_fsreturnval.c: only build if asm float lib
3548         * device/lib/_fsrshift.c: only build if asm float lib
3549         * device/lib/_fsswapargs.c: only build if asm float lib
3550         * device/include/stdio.h: don't provide print_fast,
3551           print_fast_f, print_tiny prototypes if --xstack used
3552
3553 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3554
3555         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3556         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3557           to the SOURCES
3558
3559 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3560
3561         * device/lib/printf_fast_f.c: same as printf_fast, but
3562           with floating point enabled
3563         * device/lib/printf_fast.c: minor tweaks
3564         * device/include/stdio.h: add printf_fast_f
3565
3566 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3567
3568         * src/SDCCmain.c: make --float-reent default for mcs51
3569         * device/lib/_fsadd.c: added mcs51 assembly version
3570         * device/lib/_fssub.c: added mcs51 assembly version
3571         * device/lib/_fsmul.c: added mcs51 assembly version
3572         * device/lib/_fsdiv.c: added mcs51 assembly version
3573         * device/lib/_fseq.c: added mcs51 assembly version
3574         * device/lib/_fsneq.c: added mcs51 assembly version
3575         * device/lib/_fsgt.c: added mcs51 assembly version
3576         * device/lib/_fslt.c: added mcs51 assembly version
3577         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3578         * device/lib/Makefile.in: add _fscmp to build
3579         * device/lib/libfloat.lib: add _fscmp to build
3580
3581 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3582
3583         * device/lib/_fs2slong.c: added mcs51 assembly version
3584         * device/lib/_fs2sint.c: added mcs51 assembly version
3585         * device/lib/_fs2schar.c: added mcs51 assembly version
3586         * device/lib/_fs2ulong.c: added mcs51 assembly version
3587         * device/lib/_fs2uint.c: added mcs51 assembly version
3588         * device/lib/_fs2uchar.c: added mcs51 assembly version
3589         * device/lib/_slong2fs.c: added mcs51 assembly version
3590         * device/lib/_sint2fs.c: added mcs51 assembly version
3591         * device/lib/_schar2fs.c: added mcs51 assembly version
3592         * device/lib/_ulong2fs.c: added mcs51 assembly version
3593         * device/lib/_uint2fs.c: added mcs51 assembly version
3594         * device/lib/_uchar2fs.c: added mcs51 assembly version
3595         * device/include/float.h: added #define to select asm vs c
3596
3597 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3598
3599         * device/lib/printf_fast.c: improvements to float output
3600         * device/include/float.h: add defines for assembly float library
3601         * device/lib/_fsget1arg.c: receive 1 float arg
3602         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3603         * device/lib/_fsnormalize.c: normalize a float
3604         * device/lib/_fsreturnval.c: return float, various helper routines
3605         * device/lib/_fsrshift.c: right shift a float's mantissa
3606         * device/lib/_fsswapargs.c: swap 2 floats
3607         * device/lib/Makefile.in: build these 6 new files for mcs51
3608         * device/lib/libfloat.lib: add these 6 files to the library
3609
3610 2004-12-26 Borut Razem <borut.razem AT siol.net>
3611
3612         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3613           built by gcc 3.4.2
3614
3615 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3616
3617         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3618           and fully reentrant and register bank neutral.
3619         * device/lib/printf_fast.c: added float (not enabled by default),
3620           added compact/slower integer (also not enabled by default),
3621           improved size/speed of fast integer code, other minor changes
3622         * device/include/stdio.h, device/lib/Makefile.in,
3623           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3624
3625 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3626
3627         * src/pic16/pcode.c: declaring variables other than at the start of a
3628           block is not supported in C by VC6.
3629
3630 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3631
3632         * applied a previous patch from Raphael Neider that wasn't included
3633         in the previous commits, which fixes infinite loops within jumptable
3634         improvements,
3635         * made some fixes that previous patches introduced
3636
3637 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3638
3639         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3640         that fixes an issue with AOP_PCODE asmop's offset,
3641         * (pic16_popCopyReg): update instance field too,
3642         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3643         function of pic port,
3644         * (genCmp, genAnd, genAssign),
3645         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3646
3647 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3648
3649         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3650         variables initial values to idata section,
3651         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3652         variables in some functions. This utilizes parmBytes field of iCode
3653         structure to hold the offset of the variable in stack. (might be
3654         able to use the stack field too?)
3655         * applied patch from Raphael Neider # ### , # ###
3656         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3657         variable initial values in idata section,
3658         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3659         for static variables with initial value
3660         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3661         applied fix in while loop from Raphael Neider.
3662
3663 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3664
3665         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3666         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3667         * src/ds390/ralloc.c (serialRegAssign): spill bits
3668         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3669         * support/Util/SDCCerr.c,
3670         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3671         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3672         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3673
3674 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3675
3676         * device/include/sdcc-lib.h: inserted LGPL, added includes
3677           asm/ds390/features.h and asm/mcs51/features.h
3678         * device/include/asm/default/features.h,
3679         * device/include/asm/gbz80/features.h,
3680         * device/include/asm/z80/features.h: added empty _AUTOMEM
3681           and _STATMEM
3682         * device/include/asm/ds390/features.h,
3683         * device/include/asm/mcs51/features.h: added files with defines for
3684           _AUTOMEM and _STATMEM indicating automatic and static storage class
3685         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3686         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3687         * src/SDCCicode.c (geniCodeCast),
3688         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3689         * src/SDCCloop.c (loopInduction): removed unused variable lr
3690         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3691           to convertToFcall to include char modulo (RFE 1065037), added check
3692           if left operand is unsigned and use abs of literal value
3693         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3694           as it doesn't work after conversion from peephole.def to peephole.rul
3695         * src/mcs51/gen.c (toBoolean): added check for size,
3696           (genModOneByte): optimized code for signed char modulo a literal
3697           power of 2 (thanks to Hubert Sack),
3698           (genRRC): removed unnecessary "clr c",
3699           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3700         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3701           jump optimization,
3702           swapped rules 256.c and 256.d,
3703           extended 256.d by using new multiple checks (thanks Erik),
3704           added rules 256.e and 256.f,
3705           updated rule 261.a and 261.b to new generated code
3706         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3707
3708 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3709
3710         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3711           induction related bugs, including first part of bug #1074377
3712
3713 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3714
3715         * applied patch from bug-report #1076292,
3716         * applied patches for genAnd and Goto-optimizations for Raphael
3717         Neider,
3718         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3719         dump a less iCode information,
3720         * src/pic16/device.h (pic16_options_t): added field debgen,
3721         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3722         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3723         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3724         puclic,
3725         * (various functions): added macros FENTRY and FENTRY2 to functions,
3726         to emit function prologue,
3727         * (various functions): fixed indentation,
3728         * (genNearPointerGet): fixed loading of FSR0,
3729         * (genPackBits): applied patch from Raphael Neider to fix updating
3730         of FSR0 and touching only the modified bits,
3731         * src/pic16/genarith.c (various functions): added macros FENTRY to
3732         emit function prologue in comments,
3733         * src/pic16/pcode.h: added functions debugf2, debugf3,
3734         * src/pic16/ralloc.c: partial fix for packForPush caused
3735         segmentation fault,
3736
3737 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3738
3739         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3740           <stsp AT users.sourceforge.net> with reversed byte order
3741         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3742
3743 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3744
3745         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3746           bug #1074377
3747         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3748         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3749
3750 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3751
3752         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3753
3754 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3755
3756         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3757           conditions,
3758           (setFromConditionArgs): friendly operand parser for peephole rules,
3759           (operandBaseName, operandsNotRelated): new peephole condition
3760           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3761           architecture specific register naming into account, handles n-way
3762           comparisons, and supports quoted literals
3763         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3764
3765 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3766
3767         * src/mcs51/peeph.def: fixed bug #1076940
3768
3769 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3770
3771         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3772
3773 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3774
3775         Adding support for replacing ljmps with sjmps in jumptables
3776         generated for switch statements. For now you need to set the
3777         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3778         Now 4 algorithms for mcs51 jumptable generation are used:
3779         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3780         addresses loaded pc-relative for up to 112 cases and stack-pushing
3781         target addresses loaded with offset from dptr for up to 256 cases.
3782
3783         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3784         * src/mcs51/main.c: adapted constants for switch table generation
3785         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3786
3787 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3788
3789         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3790         * support/regression/tests/bug1057979.c: added test for bug 1073386
3791
3792 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3793
3794         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3795         compilers
3796
3797 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3798
3799         * src/pic16/device.h,
3800         * src/pic16/genarith.c,
3801         * src/pic16/glue.c,
3802         * src/pic16/main.c,
3803         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3804
3805 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3806
3807         Large cummulative patch for pic16 port.
3808         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3809         to call when a stack overflow occurs,
3810         * (malloc.h): added CVS Id tag,
3811         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3812         variable,
3813         * added libc directory. The current version of LibC contains string
3814         functions, ctype functions and macros and some functions of the
3815         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3816         be extensively tested in the future. Standard disclaimer here.
3817         Library is not automatically build yet. But one can build it by
3818         invoking 'make' inside the libc directory.
3819         * added ADC library under libio. Preliminary version yet.
3820
3821         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3822         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3823         aopForRemat() now and not by pic16_aopOp(),
3824         * (pic16_popGetTempReg): removed warning messgae when allocating
3825         temporary registers, its a buggy feature and will be removed,
3826         * (pic16_popGet): set register instance field in AOP_CRY,
3827         * (pic16_outBitC): fixed for results in size greater than 1,
3828         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3829         * (pic16_storeForReturn): optimized return of 0,
3830         * (genCmp): experimental code for new genCmp which uses PIC18's
3831         special compare&skip instructions. Initial tests fail some times
3832         with variables grater than 1 byte in size, so new code is disabled,
3833         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3834         a single bit,
3835         * (genCast): began a fix to optimize the casting of a bit to another
3836         bit, now assigning a bitfield to another bitfield will fail, sorry,
3837         * src/pic16/main.c: disabled the use of lr-support feature,
3838         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3839         * added some function prototypes, added function _debugf prototype,
3840         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3841         bits with offset (case PO_GPR_BIT),
3842         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3843         command line,
3844         * (isBankInstruction): modified to return 0 for no banking instruction,
3845         and 1 for banking instruction,
3846         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3847         caused stop processing pCodes after a inline assembly block,
3848         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3849         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3850         registers when it shouldn't,
3851         * src/pic16/ralloc.c (allocReg): add preliminary support for
3852         supporting a limited set of temporary registers,
3853
3854 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3855
3856         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3857           genDataPointerSet): ensure assignments always copy in MSB to LSB
3858           order,
3859           (loadRegFromAop): recognize CLRH optimization,
3860           (genFunction): optimize RECEIVE iCodes in reentrant functions
3861
3862 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3863
3864         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3865           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3866           selected.
3867         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3868         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3869           contiguous with data
3870
3871 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3872
3873         * device/lib/_gptrget.c (_gptrget),
3874         * device/lib/_gptrgetc.c (_gptrgetc),
3875         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3876           instead of sjmp to ret
3877         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3878           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3879
3880 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3881
3882         * .version: bumped version to 2.4.7
3883         * device/lib/_gptrget.c (_gptrget): is now _naked
3884         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3885         * device/lib/_gptrput.c (_gptrput): is now _naked
3886         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3887           (createFunction): fixed xstack
3888         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3889         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3890           or bit either,
3891           (geniCodeCritical): store original interrupt state in an iTemp bit
3892           var unless stack-auto
3893         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3894         * src/SDCCmain.c (setIncludePath): added include/target to search path
3895         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3896         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3897           prototype,
3898           (processFuncArgs): put bit vars in bit area
3899         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3900           unsaveRBank): fixed xstack,
3901           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3902           (genFunction, genEndFunction): fixed xstack,
3903           (genAssign): optimization don't walk backwards through mem
3904         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3905         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3906         * support/regression/Makefile: also make library (for stack-auto) when
3907           making "all" and added "test-mcs51-xstack-auto"
3908         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3909         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3910         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3911         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3912         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3913           make-library by MAKE_LIBRARY
3914         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3915           regression tests for xstack
3916         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3917         * support/regression/tests/critical.c: test for critical on mcs51
3918
3919 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3920
3921         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3922           built version of sdcc instead of installed version
3923
3924 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3925
3926         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3927         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3928           vprintf.c now
3929         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3930         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3931           WARNING: remove device/lib/build/z80/printf.o by hand when
3932           updating from previous build!
3933         * device/lib/z80/printf.c: updated comment
3934         * support/regression/tests/bug1057979.c: test all ports now
3935         * support/regression/tests/bug1065458.c: file added
3936
3937 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3938
3939         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3940           *_start and *_end symbols for static functions
3941
3942 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3943
3944         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3945           and search crt0.o in all library paths,
3946           (setIncludePath): proper handling of --nostdinc,
3947           (setLibPath): proper handling of --nostdlib
3948         * support/regression/Makefile,
3949         * support/regression/ports/ds390/spec.mk,
3950         * support/regression/ports/gbz80/spec.mk,
3951         * support/regression/ports/hc08/spec.mk,
3952         * support/regression/ports/mcs51/spec.mk,
3953         * support/regression/ports/mcs51-large/spec.mk,
3954         * support/regression/ports/mcs51-stack-auto/spec.mk,
3955         * support/regression/ports/z80/spec.mk: use include and lib files from
3956           built version of sdcc instead of installed version
3957         * doc/sdccman.lyx: fixed typo in --nostdinc
3958
3959 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3960
3961         * src/pic/pcode.c,
3962         * src/pic/device.c,
3963         * src/pic/ralloc.c,
3964         * src/pic/gen.c : added support to generate code for struct bit fields.
3965
3966 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3967
3968         * as/xa51/xa_version.h,
3969         * device/include/errno.h,
3970         * device/include/regc515c.h,
3971         * device/lib/_itoa.c,
3972         * device/lib/_ltoa.c,
3973         * device/lib/ser_ir_cts_rts.c,
3974         * sim/ucsim/xa.src/glob.cc,
3975         * sim/ucsim/xa.src/inst_gen.cc,
3976         * sim/ucsim/xa.src/xa_bit.cc,
3977         * sim/ucsim/xa.src/xa_sfr.cc,
3978         * sim/ucsim/z80.src/inst_dd.cc,
3979         * sim/ucsim/z80.src/inst_fdcb.cc,
3980         * support/scripts/keil2sdcc.pl,
3981         * src/pic16/pic16.dsp,
3982         * src/pic16/pic16a.dsp: corrected cvs line endings
3983         * device/lib/printf_large.c: fixed bug 1057979
3984         * src/pic16/gen.c: fixed non-C standard code
3985         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3986         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3987         * support/regression/ports/mcs51/support.c: reload T1 asap
3988         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3989           pdata use and clear idata startup behaviour
3990         * support/regression/tests/bug1057979.c: added
3991
3992 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3993
3994         * device/examples/ds390/ow390/ad26.h,
3995         * device/examples/ds390/ow390/cnt1d.h,
3996         * device/examples/ds390/ow390/crcutil.c,
3997         * device/examples/ds390/ow390/ownet.h,
3998         * device/examples/ds390/ow390/owsesu.c,
3999         * device/examples/ds390/ow390/swt12.h,
4000         * device/examples/ds390/ow390/swtoper.c,
4001         * device/examples/ds390/ow390/temp10.h,
4002         * device/examples/ds390/ow390/thermodl.c,
4003         * device/examples/ds390/tinitalk/tinitalk.dsp,
4004         * device/examples/ds390/tinitalk/tinitalk.dsw,
4005         * device/examples/mcs51/clock/hw.h,
4006         * device/examples/mcs51/simple2/go.bat,
4007         * device/examples/serialcomm/windows/serial.h,
4008         * device/examples/xa51/dummy.c,
4009         * device/examples/xa51/hello.c,
4010         * device/include/80c51xa.h,
4011         * device/include/at89x051.h: corrected cvs line endings
4012
4013 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4014
4015         * src/pic16/main.c (options): added command line --gstack, to trace
4016         stack over/under flows,
4017         * added pragma 'wparam' to allow passing first byte of function
4018         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4019         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4020         call to __gstack_test function and sets up the symbol as extern,
4021         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4022         * popaop): added call to pic16_testStackOverflow,
4023         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4024         wparamList list,
4025         * (genCall, genPcall): now all parameters are passed via stack
4026         except in functions that are pass to wparam pragma in which WREG is
4027         used too,
4028         * (genPcall): REENTRANT flag is checked to see if variable prototype
4029         contains reentrant keyword, don't call a non-reentrant function, via
4030         a reentrant function pointer or vice versa, functions are never
4031         passed via WREG,
4032         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4033         D.Winkler,
4034         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4035         SIGSEGV when accessing a NULL register stucture,
4036         * (pic16_printGPointerType): modified to handle UPPER modifier for
4037         function initializers, changed prototype of function to simpler one,
4038         * (pic16_printIvalFuncPtr): check to see if function is already
4039         added in externs list,
4040         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4041         optimized a move from W to SFR with a move to the same register
4042         later after a CALL,
4043         * device/lib/pic16/debug: NEW directory, contains debug features
4044         which are enabled when linking with libdebug.lib, currently command
4045         line option --gstack enables stack pointer tracing for over/under
4046         flow, corresponding sources are in debug/gstack
4047
4048 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4049
4050         * doc/sdccman.lyx: updated SDCC version,
4051         * (PIC16 port): update list of command line options,
4052         * src/pic16/device.h (structure pic16_options_t): added field gstack
4053         to enable stack overflow tracing on push/pops,
4054         * src/pic16/device.c (statistics structure): added statistics
4055         structure,
4056         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4057         pic16_dump_int_registers): increase statistics counters for each
4058         * variable which is encountered
4059         * (pic16_dump_usection): emit each .udata variable to its own udata
4060         section,
4061         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4062         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4063         parameters via stack, otherwise use old scheme,
4064         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4065         assembler output file,
4066         * src/pic16/main.c: added command line options --gstack to enable
4067         push/pop tracing for stack overflow,
4068         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4069         instructions): added size of each instruction,
4070         * (pic16_countInstruction): estimate size of instructions in
4071         the_pFile list, inline assembly blocks are not counted,
4072         * (pic16_FixRegisterBanking): trace previous register usage, when
4073         banksel optimizations is greater than 0, don't emit a redudant
4074         banksel directive,
4075
4076 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4077
4078         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4079         * src/pic16/ralloc.c : applied same fix for pic16.
4080         * src/pic/gen.c : tidied it up a little.
4081
4082 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4083
4084         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4085         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4086
4087 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4088
4089         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4090
4091 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4092
4093         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4094         non-reentrant function __modsint in the interrupt function (thus
4095         corrupting math operations during serial I/O)
4096         * device/lib/ser_ir.c: as above, changed buffersize
4097         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4098         256.c,d for zeroing
4099         * doc/Makefile: added option -t for rsync
4100
4101 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4102
4103         * src/SDCCast.h (struct ast),
4104         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4105
4106 2004-10-20 Borut Razem <borut.razem AT siol.net>
4107
4108         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4109         package
4110
4111 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4112
4113         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4114         makefile targets,
4115         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4116         support functions to replace long sequences of MOVFF's from access
4117         bank registers to stack and vice versa,
4118         * src/pic16/device.h: added new field opt_flags, where optimization
4119         flags can be set to enable certain features,
4120         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4121         * pBlock, (genFunction, genEndFunction): surroung loop for
4122         saving/loading used registers in stack with PC_INFO pCodes,
4123         INF_LREGS. Code in between can then be optimized by pCode optimizer
4124         to support function calls,
4125         * (genDataPointerSet): fixed bug which loaded float fields in
4126         structures with corrupt data,
4127         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4128         in a standard way debug info on stderr. Feature used for developing
4129         and debugging only,
4130         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4131         obsolete chunks of code,
4132         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4133         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4134         * pic16/src/pcode.c (pic16_newpCodeInfo,
4135         * (pic16_newpCodeOpLocalRegs),
4136         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4137         feature,
4138         * (pic16_pCodeConstString): printing of the initial value of a
4139         symbol as a comment is inhibited since parsing was already done by
4140         copyStr and output is corrupt,
4141         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4142
4143 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4144
4145         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4146
4147 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4148
4149         * as/mcs51/lkarea.c: removed old K&R style,
4150           (lnksect): changed check on boundary error,
4151           (lnksect2): changed check on boundary error,
4152           (lnksect2): extend XSTK to end of page if size = 1
4153         * as/mcs51/lkmain.c: removed old K&R style,
4154           (Areas51): create l_IRAM symbol
4155         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4156         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4157           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4158         * device/lib/_mullong.c: added version to be compiled with xstack
4159         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4160         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4161         * device/lib/mcs51/crtxstack.asm: fixed comment
4162         * src/SDCCglue.c: maxInterrupts defaults to 0,
4163           (emitMaps): added pdata,
4164           (createInterruptVect): (re)moved default,
4165           (glue): added pdata,
4166           (glue): moved __start__xstack to XSTK with default size 1
4167         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4168           and options.float_rent when options.stackAuto is set,
4169           (linkEdit): only write XDATA_NAME if provided on command line
4170         * src/SDCCmem.h,
4171         * src/SDCCmem.c: added pdata
4172         * src/port.h: added pdata_name to PORT
4173         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4174           (saveRegisters, unsaveRegisters): removed usage of B,
4175           (genMinus): fixed accumulator clash,
4176           (genJumpTab): added comment, this needs another look
4177         * src/mcs51/gen.c: added check for "B in use" paranoia,
4178           added pushB() and popB()
4179         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4180           chance
4181         * src/avr/main.c,
4182         * src/ds390/main.c,
4183         * src/hc08/main.c,
4184         * src/mcs51/main.c,
4185         * src/pic/main.c,
4186         * src/pic16/main.c,
4187         * src/xa51/main.c,
4188         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4189           added PSEG (PAG,XDATA) or NULL to port specifier
4190         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4191         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4192           (_mcs51_genInitStartup): removed __start__xstack equ,
4193           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4194         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4195         * src/z80/gen.c (_rleAppend): fixed warnings
4196         * support/regression/tests/zeropad.c: added pdata test
4197         * .version: bumped to 2.4.6
4198
4199 2004-10-17 Borut Razem <borut.razem AT siol.net>
4200
4201         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4202         as a part of nightly build
4203
4204 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4205
4206         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4207         WREG holds the first byte function parameters,
4208         * (aopForSym): take special case for symbols which are in FARSPACE
4209         but in CODESPACE too,
4210         * (assignResultValue): modified to take into account _G.useWreg,
4211         * (genCall): don't use wreg for parameter passing when function is
4212         declared as reentrant, too, added optimization INCF to stack
4213         pointer when stack parameter count is 1,
4214         * (genFunction, genEndFunction): refurnished and fixed to not using
4215         wreg for passing parameters when function has varargs or is
4216         reentrant, fixed bug with symbol name compare for generating
4217         functions in absolute address,
4218         * (pic16_storeForReturn): refurnished,
4219         * (genCmp): began writing a new version of the function, not ready
4220         yet, therefore it is disabled,
4221         * (genAssign): do not read code memory when assigning a function to
4222         a pointer function,
4223         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4224         array of characters, not pointer,
4225         * (pic16initialComments): in debug mode emit an .ident directive for
4226         the assembler,
4227         * (_process_pragma): emit a new warning type (internal to pic16)
4228         when setting stack to default length, emit a similar warning when
4229         placing a function at absolute address and address is not word aligned
4230         * (_pic16_parseOptions): added 'return TRUE' statement,
4231         * (_pic16_linkEdit): if compiling a source, then add the source's
4232         file object, first in the list of objects to link,
4233
4234 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4235
4236         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4237         * src/pic/main.c : removed VC warning.
4238         * src/pic/gen.c : changed comment.
4239
4240 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4241
4242         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4243         reference to a deprecated symbol _GPTRREG was causing failure to
4244         link. Thanks G. M. Gallant for the info.
4245
4246 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4247
4248         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4249         comments for Bugs item #954788.
4250
4251 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4252
4253         * src/pic16/device.c (pic16_dump_gsection,
4254         * pic16_groupRegistersInSection): handle symbols declared to be in
4255         access bank differently,
4256         * src/pic16/gen.c (struct _G): added field resDirect,
4257         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4258         send values read from stack directly to result and don't allocate
4259         temporary values,
4260         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4261         same registers,
4262         * (pic16_sameRegsOfs): NEW,
4263         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4264         free because they were not allocated from temporary pool,
4265         * pic16_popRegFromString): workaround to fix a problem with
4266         allocating variables twice or never,
4267         * (genGenPointerGet): using PRODL instead of FSR0H,
4268         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4269         instead of FSR0H,
4270         * (genAssign): take advantage of the _G.resDirect flag,
4271         * (genCast): around line 11844, use mov2f instead of directly
4272         MOVFF'ing between operands to account for literal values,
4273         * src/pic16/genutils.c: some new debug functions for gpsim have been
4274         added,
4275         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4276         float with integer part only,
4277         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4278         place variables in access bank
4279         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4280         updated sources to reflect recent changes in gen.c
4281
4282 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4283
4284         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4285         sources that searched for headers in installation path, now the
4286         device/include/pic16 is used,
4287         * src/pic16/glue.c (pic16glue),
4288         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4289         .line directives if not in debug mode, this suppresses assembler's
4290         warnings for ignored directives
4291
4292 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4293
4294         * src/port.h: made reset_regparms prototype void parameter explicit.
4295         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4296         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4297         * doc/sdccman.lyx: documented warning disabling and how to use
4298           printf_large to make it print floats.
4299         * device/include/stdbool.h: NEW
4300         * device/lib/_atof.c,
4301         * device/lib/_divuint.c,
4302         * device/lib/_divulong.c,
4303         * device/lib/expf.c,
4304         * device/lib/printf_large.c,
4305         * device/lib/sincosf.c,
4306         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4307         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4308           a completely reentrant lib.
4309
4310 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4311
4312         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4313         * device/include/pic16/stdio.h: fixed bug with colon
4314
4315 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4316
4317         * device/include/pic16/stdio.h,
4318         * device/include/pic16/stdlib.h,
4319         * device/include/pic16/math.h: NEW
4320         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4321         declared as _naked to reduce overhead
4322         * device/lib/Makefile.in (target port-specific-objects-pic16):
4323         changed * to *.* so to ignore the CVS directory,
4324         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4325         stacked variables back in stack,
4326         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4327         corruption
4328
4329 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4330
4331         * .version: bumped version number to 2.4.5
4332         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4333         * support/Util/SDCCerr.c (messages structure): added entry for
4334         W_POSSBUG2
4335
4336         Large cumulative patch for pic16 port and libraries.
4337         * device/include/pic16/sdcc-lib.h,
4338         * device/include/pic16/stdarg.h,
4339         * device/include/asm/pic16/features.h,
4340         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4341         * device/include/pic16/float.h: changes reentrant keyword with
4342         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4343         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4344         updated target build-libraries to include objects from gptr,
4345         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4346         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4347         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4348         all function headings,
4349         * src/SDCCmain.c: added global parameter userIncDirsSet,
4350         * (parseCmdLine): when option -I is encountered add directory to
4351         userIncDirsSet too,
4352         * src/version.awk: added space between control and long,
4353         * src/pic16/NOTES: added some notes for the port,
4354         * src/pic16/gen.c: added prototype for mov2fp function,
4355         * (fReturnpic16[]): properly named return value registers,
4356         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4357         * (aopForSym): added code to handle symbols with onStack flag set,
4358         symbols onStack are allocated PTRSIZE bytes,
4359         * (aopFreeAsmop): handles special case where asmops are stack objects,
4360         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4361         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4362         added argument lock to trace flaws in allocating temporary registers
4363         when developing port,
4364         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4365         * (pic16_popRegFromString): reenabled allocating a direct register
4366         from string,
4367         * (assignResultValue): various beautifications,
4368         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4369         referenced function argument,
4370         * (genIpush): reenabled to allow stacked arguments, handles only
4371         ic->parmPush iCodes,
4372         * (genCall, genPcall): major changes to allow for variable argument
4373         functions, fixed a bug with falsely restoring stack pointer after
4374         returning from call,
4375         * (genFunction): pending code for critical function,
4376         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4377         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4378         * (genNearPointerGet): fixed bug with indirect reading, was always
4379         reading from INDF0
4380         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4381         pointers,
4382         * (genAddrOf): rewrote code to take address of a stacked function parameter
4383         * (genCast): fixed casting to generic pointer type,
4384         * src/pic16/gen.h: added AOP_STA,
4385         * (struct asmop): added field stk,
4386         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4387         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4388         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4389         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4390         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4391         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4392         generic pointers,
4393         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4394         and library paths,
4395         * (pic16_port structure): generic pointer size is set to 3,
4396         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4397         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4398         compiler warning,
4399         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4400         operand is an iTemp,
4401
4402 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4403
4404         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4405         * debugger/mcs51/simi.c: addapt new syntax of s51
4406
4407 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4408
4409         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4410         * src/pic16/pcode.c: commented out some calls to free() in order to
4411         fix bug #989576,
4412
4413 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4414
4415         * src/SDCCicode.h,
4416         * src/SDCCicode.c (isiCodeInFunctionCall),
4417         * src/avr/ralloc.c (selectSpil),
4418         * src/pic/ralloc.c (selectSpil),
4419         * src/pic16/ralloc.c (selectSpil),
4420         * src/ds390/ralloc.c (selectSpil),
4421         * src/hc08/ralloc.c (selectSpil),
4422         * src/xa51/ralloc.c (selectSpil),
4423         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4424         stack in the middle of a function call sequence (fixes bug #1020268)
4425         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4426         costs associated with the minimum switch case.
4427
4428 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4429
4430         * src/SDCC.lex: fixed bug #1030549
4431
4432 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4433
4434         * src/SDCCcse.h (struct cseDef),
4435         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4436         over a function call if the CSE is derived from a symbol whose
4437         address has been taken (fixes bug #1029883)
4438         * support/regression/tests/bug-1029883: a new regression test for
4439         this bug
4440
4441 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4442
4443         * src/hc08/gen.c (emitinline): fixed bug #1029778
4444         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4445         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4446         and starts toward RFE #905167)
4447
4448 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4449
4450         * src/pic16/gen.c (mov2f): New function to move an operand to
4451         another without considering if it is a literal or a register,
4452         * (pic16_sameRegs): don't check if they are both AOP_REG,
4453         * (AccRsh): removed andmask=0 lines,
4454         * (genLeftShift): duplicated to be improved in future versions,
4455         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4456         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4457         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4458         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4459         * (insertBankSwitch): fixed inserting banksel directives algorithm
4460         for instructions that follow a skip instruction, this fixes a report
4461         for broken subtraction code generation,
4462         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4463         iCode is a left op, just in case result and right share the same
4464         registers
4465
4466 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4467
4468         * src/hc08/main.c,
4469         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4470         preservation of HX
4471         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4472         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4473         on 2004-09-12; it was buggy
4474
4475 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4476
4477         * src/SDCCsymt.h: removed RESULT_CHECK
4478         * src/SDCCast.c,
4479         * src/SDCCglue.c,
4480         * src/SDCCval.c,
4481         * src/pic/glue.c,
4482         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4483
4484 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4485
4486         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4487         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4488         configuration values no more rejected by compiler, they are assigned
4489         to configuration registers with a warning message instead,
4490         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4491         the for-loop so last conf register is emitted too,
4492         * (_pic16_initPaths): link library libsdcc.lib by default,
4493         * (_hasNativeMulFor): modified test for multiplication according to
4494         Raphael Neider's remarks. Integer multiplication is also done with
4495         support functions,
4496         * device/include/pic16/pic18fregs.h: corrected type error in while
4497         testing and including 18f6720 header file
4498
4499 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4500
4501         * src/pic16/device.h (pic16_options): removed field use_crt,
4502         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4503         until an optimization to handle single bits is added,
4504         * (pic16_loadFSR0): moved before genUnpackBits,
4505         * (genAnd): some white lines removed,
4506         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4507         leave_reset flags in pic16_options when using crt modules,
4508
4509 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4510
4511         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4512           for bugs 898889 & 979599. Also used some safer print instructions.
4513
4514 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4515
4516         * src/pic16/device.h (pic16_options_t): added field use_crt,
4517         crt_name, no_crt,
4518         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4519         catch a probable future bug,
4520         * src/pic16/gen.c: aopIdx function commented out,
4521         * (genAssign): commented out old code which used aopIdx,
4522         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4523         code, added if conditionals to take into account the --use-crt
4524         command line options,
4525         * src/pic16/main.c (pic16_optionsTable): added new command line
4526         options, --use-crt= and --no-crt,
4527         * (_pic16_linkEdit): now the proper crt object is added in the
4528         linker command line except than when --no-crt is specified,
4529         * src/pic16/pcode.c,
4530         * src/pic16/pcode.h: added some structures and functions for a new
4531         optimization scheme to compansate for instruction overhead between
4532         same iCodes, this scheme is currently under development and is not
4533         working in any way,
4534         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4535         to && operator,
4536         * device/lib/pic16/startup/crt0i.c,
4537         * device/lib/pic16/startup/crt0iz.c: added global char variable
4538         __uflags to force the generation of an idata section
4539
4540 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4541
4542         * doc/Makefile,
4543         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4544         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4545
4546 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4547
4548         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4549         Frieder) and clarified the default code optimization mode
4550
4551 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4552
4553         * src/SDCC.lex (doPragma, process_pragma),
4554         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4555         "opt_code_size", and "opt_code_balanced"
4556         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4557         regrouped options by category, added support for category headers
4558         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4559         and "--opt-code-size"
4560         * doc/sdccman.lyx: documented these new options and pragmas
4561         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4562         preference into account
4563
4564 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4565
4566         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4567           geniCodePreDec): Fixed bug 904237 by generating a warning
4568         * src/SDCCerr.h,
4569         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4570
4571 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4572
4573         * src/pic/device.c : When no max ram set validate full memory range.
4574         * src/pic/pcode.c,
4575         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4576
4577 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4578
4579         * device/lib/_gptrget.c,
4580         * device/lib/_gptrput.c: updated comment
4581         * device/lib/calloc.c,
4582         * device/lib/free.c,
4583         * device/lib/malloc.c,
4584         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4585         * src/SDCCcse.c (cseBBlock),
4586         * src/SDCCicode.c (printOperand, geniCodeArray),
4587         * src/SDCCicode.h (struct operand): fixed bug 868103
4588         * support/regression/tests/bug-868103.c: added
4589         * src/SDCCast.c (searchLitOp),
4590         * src/SDCCcse.h (struct cseDef),
4591         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4592         * src/SDCCicode.h (struct operand),
4593         * src/SDCCsymt.h (struct sym_link),
4594         * src/avr/gen.c (hasInc),
4595         * src/ds390/gen.c (hasInc),
4596         * src/hc08/gen.c (genPlusIncr, hasInc),
4597         * src/mcs51/gen.c (hasInc),
4598         * src/pic16/glue.c (pic16_printIvalChar),
4599         * src/pic16/ralloc.c (regWithIdx),
4600         * src/xa51/gen.c (hasInc) : removed warnings
4601         * src/SDCCast.c (createBlock): added comment ???
4602         * src/hc08/ralloc.c: updated comments
4603
4604 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4605
4606         * doc/sdccman.lyx: updated section on switch statements, added
4607         section about semaphore locking
4608         * doc/Makefile: added option -info for latex2html
4609         * device/lib/_gptrget.c,
4610         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4611
4612 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4613
4614         * src/pic/device.h,
4615         * src/pic/device.c,
4616         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4617          maxram is less than 0x100.
4618
4619 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4620
4621         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4622
4623 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4624
4625         * src/port.h,
4626         * src/mcs51/main.c,
4627         * src/ds390/main.c,
4628         * src/z80/main.c,
4629         * src/hc08/main.c,
4630         * src/pic/main.c,
4631         * src/pic16/main.c,
4632         * src/avr/main.c,
4633         * src/xa51/main.c
4634         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4635         a jump table is the best form for a switch statement, including
4636         automatic insertion of missing cases to make the case range
4637         continuous. Developed in collaboration with Frieder Ferlemann.
4638
4639 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4640
4641         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4642         accumulator result if it needs sign extension
4643
4644 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4645
4646         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4647
4648 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4649
4650         * device/lib/gbz80/printf.c,
4651         * device/lib/z80/printf.c: removed define for NULL
4652
4653 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4654
4655         * as/xa51/xa_link.c,
4656         * device/examples/ds390/ow390/ad26.c,
4657         * device/examples/ds390/ow390/cnt1d.c,
4658         * device/examples/ds390/ow390/counter.c,
4659         * device/examples/ds390/ow390/ds2480.h,
4660         * device/examples/ds390/ow390/ds2480ut.c,
4661         * device/examples/ds390/ow390/findtype.c,
4662         * device/examples/ds390/ow390/gethumd.c,
4663         * device/examples/ds390/ow390/owllu.c,
4664         * device/examples/ds390/ow390/ownetu.c,
4665         * device/examples/ds390/ow390/swt12.c,
4666         * device/examples/ds390/ow390/swtloop.c,
4667         * device/examples/ds390/ow390/temp.c,
4668         * device/examples/ds390/ow390/temp10.c,
4669         * device/examples/ds390/ow390/thermo21.c,
4670         * device/examples/ds390/ow390/tinilnk.c,
4671         * device/examples/ds390/ow390/tstfind.c,
4672         * device/examples/serialcomm/windows/serial.cpp,
4673         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4674         * device/include/reg51.h: fixed line endings for cvs
4675
4676 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4677
4678         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4679         packRegsForAccUse, packRegisters): new accumulator register
4680         packing algorithm
4681         * support/regression/ports/hc08/support.c (_putchar): suppress
4682         warning of unused variable
4683         * src/SDCCicode.c: added SWAP entry to codeTable
4684
4685 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4686
4687         * device/lib/sprintf.c: forgot to add this file before previous commit
4688
4689 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4690
4691         * src/pic16/gen.c (genPackBits): added operand right in function
4692         parameters, load result directly if p_type is POINTER (that is
4693         called by genNearPointerSet)
4694         * (genUnPackBits): added operand left in function parameters,
4695         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4696         FSR0 if accessing bitfields,
4697
4698 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4699
4700         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4701           _print_format; updated printf, sprintf, vsprintf
4702         * device/include/asm/default/features.h: corrected comment/define
4703         * device/lib/Makefile.in: added sprintf.c
4704         * device/lib/libsdcc.lib: added sprintf module
4705         * device/lib/printf_large.c,
4706         * device/lib/vprintf.c,
4707         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4708           into these 3 files
4709         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4710         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4711         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4712           hc08 test
4713         * support/regression/tests/zeropad.c: define idata as data for hc08
4714
4715 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4716
4717         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4718         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4719         labels are referenced at least once (even if a reference is not found)
4720         * src/hc08/gen.c (emitcode): set isComment flag for comments
4721         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4722         loads), rules 6a..6b (optimize jumps to return)
4723
4724 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4725
4726         * device/lib/acosf.c (acosf),
4727         * device/lib/asinf.c (asinf),
4728         * device/lib/atanf.c (atanf),
4729         * device/lib/ceilf.c (ceilf),
4730         * device/lib/cosf.c (cosf),
4731         * device/lib/coshf.c (coshf),
4732         * device/lib/cotf.c (cotf),
4733         * device/lib/fabsf.c (fabsf),
4734         * device/lib/floorf.c (floorf),
4735         * device/lib/log10f.c (log10f),
4736         * device/lib/logf.c (logf),
4737         * device/lib/sinf.c (sinf),
4738         * device/lib/sinhf.c (sinhf),
4739         * device/lib/sqrtf.c (sqrtf),
4740         * device/lib/tanf.c (tanf),
4741         * device/lib/tanhf.c (tanhf),
4742         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4743         replaced all instances of "reentrant" in the library functions
4744         defined in math.h with this macro.
4745         * support/regression/tests/float_trans.c: reenabled test for hc08
4746
4747 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4748
4749         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4750         erroneously deleted
4751
4752 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4753
4754         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4755         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4756         multi-byte volatile operands are used
4757         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4758         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4759         initialization to area GSINIT0 so that it would always precede
4760         any static initializers in GSINIT
4761         * support/regression/tests/zeropad.c: fixed idata define for hc08
4762         * support/regression/tests/bug-927659.c,
4763         * support/regression/tests/float_trans.c: disabled tests for hc08
4764         pending missing library routines
4765         * .version: increased version number to 2.4.4 - hc08 port now passes
4766         regression tests
4767
4768
4769 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4770
4771         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4772         * Makefile.common.in,
4773         * as/Makefile,
4774         * as/hc08/Makefile.in,
4775         * as/mcs51/Makefile.in,
4776         * as/z80/Makefile.in,
4777         * debugger/mcs51/Makefile.in,
4778         * device/include/Makefile.in,
4779         * device/lib/Makefile.in,
4780         * doc/Makefile,
4781         * link/Makefile,
4782         * link/z80/Makefile.in,
4783         * packihx/Makefile.in,
4784         * sim/ucsim/main_in.mk,
4785         * sim/ucsim/avr.src/Makefile.in,
4786         * sim/ucsim/doc/Makefile.in,
4787         * sim/ucsim/gui.src/serio.src/Makefile.in,
4788         * sim/ucsim/hc08.src/Makefile.in,
4789         * sim/ucsim/s51.src/Makefile.in,
4790         * sim/ucsim/xa.src/Makefile.in,
4791         * sim/ucsim/z80.src/Makefile.in,
4792         * src/Makefile.in,
4793         * support/cpp2/Makefile.in,
4794         * support/librarian/Makefile,
4795         * support/makebin/Makefile: added DESTDIR to the install path proposed
4796         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4797         * doc/sdccman.lyx: added DESTDIR documentation
4798
4799 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4800
4801         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4802         instruction for interrupt handlers, use fast returns when returning
4803         from high priority interrupts
4804
4805 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4806
4807         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4808         code generation
4809         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4810         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4811         bugs, ported much of Bernhard's code from mcs51
4812         * src/mcs51/gen.c (genSend),
4813         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4814         than one when calling a reentrant function
4815         * device/lib/_mullong.c: defined an alternate struct layout for big
4816         endian ports (hc08)
4817
4818 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4819
4820         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4821         test
4822
4823 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4824
4825         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4826         are sane and complete before asking the port its prefered parameter
4827         passing method (fixes bug #1017633)
4828         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4829         and _ret3
4830
4831 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4832
4833         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4834         problem in bitfields >= 8 bits.
4835
4836 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4837
4838         * src/SDCCsymt.c: undid changes that were not meant to be committed
4839
4840 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4841
4842         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4843
4844 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4845
4846         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4847           copied and wrong bit got inverted
4848
4849 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4850
4851         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4852         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4853         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4854         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4855         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4856         assignments to bitfields at known addresses
4857         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4858         reads from bitfields at known addresses
4859         * src/hc08/ralloc.c (packRegisters),
4860         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4861         genhc08Code): optimize pointer get values used as conditionals
4862         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4863         and branch
4864
4865 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4866
4867         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4868         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4869         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4870         as conditionals
4871
4872 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4873
4874         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4875
4876 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4877
4878         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4879         related problems
4880
4881 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4882
4883         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4884
4885 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4886
4887         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4888         mcs51 port
4889
4890 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4891
4892         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4893
4894 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4895
4896         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4897         cases use more compact code.
4898
4899 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4900
4901         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4902
4903 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4904
4905         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4906
4907 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4908
4909         * src/SDCCsymt.h,
4910         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4911         parameter of changePointer() from symbol* to sym_link*
4912         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4913         * src/SDCCsymt.c (compareType): void* type is castable to other
4914         pointers, but not necesarily an exact match.
4915         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4916         is no longer blindly treated as an exact match.
4917         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4918
4919 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4920
4921         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4922
4923 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4924
4925         * src/pic/gen.c,
4926         * src/pic/pcode.c,
4927         * src/pic/ralloc.h,
4928         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4929
4930 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4931
4932         * src/pic/device.c,
4933         * src/pic/device.h,
4934         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4935
4936 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4937
4938         * src/mcs51/gen.c (emitcode): fixed bug #992819
4939
4940 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4941
4942         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4943           there's no need to make it worse
4944
4945 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4946
4947         * src/mcs51/ralloc.c (deassignLR),
4948         * src/ds390/ralloc.c (deassignLR),
4949         * src/hc08/ralloc.c (deassignLR),
4950         * src/z80/ralloc.c (deassignLR),
4951         * src/pic/ralloc.c (deassignLR),
4952         * src/pic16/ralloc.c (deassignLR),
4953         * src/avr/ralloc.c (deassignLR),
4954         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4955         rlivePoint): fixed another part of bug #971834
4956
4957 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4958
4959         * src/z80/main.c: enabled "critical" keyword
4960         * src/z80/mappings.i,
4961         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4962         functions (fixes bug #979646)
4963         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4964
4965 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4966
4967         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4968           such as c:\mydir.
4969
4970 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4971
4972         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4973           doesn't disable too much optimizations
4974
4975 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4976
4977         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4978
4979 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4980
4981         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4982
4983 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4984
4985         * src/pic/gen.c tidied up tabs
4986         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4987         * src/pic/main.c tidied up tabs
4988         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4989         * src/pic/pcoderegs.c tidied up tabs
4990         * src/pic/ralloc.c tidied up tabs
4991
4992 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4993
4994         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4995         to S_FIXED for pic16 port and when symbol is not in level 0,
4996         allocate for S_REGISTER storage class and pic16 port, too,
4997         * src/pic16/device.h: prototype for checkSym,
4998         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4999         * (pic16_assignConfigWordValue): test the value and the mask to
5000         validate that the value is suitable for the configuration word,
5001         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5002         collect extern declared symbols, don't emit symbol twice, check
5003         first if symbol is in publics set first,
5004         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5005         * added command line '--fstack' which enables an experimental
5006         feature for stack access, too buggy to be used yet...
5007         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5008         * (pic16_allocDirReg): when register has storage class S_REGISTER
5009         allocate in pic16_dynAccessRegs,
5010         * device/include/pic16/pic18f????.h: modified configuration word
5011         naming convention, words started as CONFIG0H but should be CONFIG1H
5012
5013 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5014
5015         * device/include/mcs51reg.h: fixed bug 970993
5016
5017 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5018
5019         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5020         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5021         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5022         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5023         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5024         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5025           error/warning numbers,
5026           added function setWarningDisabled()
5027         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5028         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5029           _memcmp.c _memmove.c calloc.c realloc.c free.c
5030         * support/regression/tests/malloc.c: added tests for new functionality
5031         * support/regression/tests/zeropad.c: added tests for truncated initializers
5032           and initialized char arrays starting with '\x0'
5033         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5034
5035 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5036
5037         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5038
5039 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5040
5041         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5042         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5043         peephole 177.e. Thanks to anonymous
5044
5045 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5046
5047         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5048         function isn't used in the source but referenced as a
5049         variable initializer then declare it as extern in .asm file
5050
5051 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5052
5053         * .version: increased version number to 2.4.3
5054
5055         Adding version extension according to ChangeLog CVS revision
5056         * src/Makefile.in (target all): added dependency 'version.h'
5057         * (rule version.h): added rule to create version.h from ChangeLog,
5058         * (rule dep): added dependency version.h,
5059         * src/version.awk: AWK script to create version.h
5060         * src/SDCCdwarf2.c (dwWriteModule),
5061         * src/SDCCglue.c (initialComments),
5062         * src/SDCCmain.c (printVersionInfo): modified to write after
5063         version string the version extension number,
5064         * src/SDCCutil.c: included "version.h"
5065         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5066         number,
5067         * src/SDCCutil.h: added prototype for getBuildNumber
5068
5069         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5070         includeDirsSet, too,
5071         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5072         const char [] is found in function prototype...
5073
5074         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5075         moving to WREG with source is already in WREG,
5076         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5077         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5078         * (aopForSym): stack'ed symbols are partially supported, added
5079         if-clause to support symbols in FARSPACE,
5080         * (sameRegs): added test for AOP_ACC to see if registers are same,
5081         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5082         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5083         * (pic16_popRegFromString): will not allocate a new register if it
5084         doesn't find one by name, bug may have introduced...
5085         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5086         * (genIpush): revived to use pic16 port's stack,
5087         * (genAddrOf): added incomplete case for stack'ed operand,
5088         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5089         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5090         can handle multibyte operands,
5091         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5092         * (pic16initialComments): added message for MPLAB compatibility
5093         mode enabled,
5094         * src/pic16/main.h: prototype for pic16_mplab_comp,
5095         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5096         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5097         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5098         because of increased complexity of procedure,
5099         * (_process_pragma): stack pragma changed to format 'stack pos len',
5100         emit symbol '_stack_end' to conform with gplink,
5101         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5102         to search for register,
5103         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5104         PO_GPR_REGISTER,
5105         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5106         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5107         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5108         case for PO_GPR_REGISTER,
5109         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5110         dies, the new era is ahead !...
5111         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5112         pic16_dynInternalRegs,
5113         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5114         * (pic16_allocDirReg): minor optimizations and bug fixes,
5115         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5116
5117         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5118         load stack and frame pointer with address of 'stack_end' symbol
5119
5120 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5121
5122         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5123         without source code but only variable initializers
5124
5125 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5126
5127         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5128         external are not declared as extern to reduce overhead while linking
5129
5130 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5131
5132         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5133
5134 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5135
5136         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5137           Yee Keat for the patch
5138         * src/SDCCast.c (decorateType): fixed bug #979599
5139         * src/ds390/gen.h: removed local fReturnSizeDS390
5140         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5141         * src/ds390/gen.c (genAnd, genOr, genXor),
5142         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5143
5144 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5145
5146         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5147         add relFilesSet to $3, manipulate $2 to handle linking of object
5148         files without source files in command line,
5149         * device/include/pic16 (all headers): added ID location macros,
5150         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5151         entries for ID location bytes,
5152         * (pic16_assignIdByteValue): NEW,
5153         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5154         added field dumpcalltree to pic16_options_t,
5155         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5156         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5157         emitting rFalseIfx label after check_carry label,
5158         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5159         pic16_emitDIRegs), NEW
5160         * (pic16glue): dump .calltree file when option --calltree found,
5161         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5162         * (_pic16_genAssemblerPreamble): emit ID locations after
5163         configuration registers,
5164         * (pic16_linkCmd): modifications of the link command,
5165         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5166         * (pic16_pCodeInitRegisters): don't init stack registers,
5167         * (pic16_findPrevInstruction): fixed bug,
5168         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5169         bug with immediate registers,
5170         * (buildCallTree): traces stack push and pop,
5171         * (pct2): dump also stack usage for each function,
5172         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5173         * (pic16_allocDirReg): various modifications,
5174         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5175         fixed to 1,
5176
5177 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5178
5179         * src/pic16/pcode.c: removed buggy double colon
5180
5181 2004-07-01 Borut Razem <borut.razem AT siol.net>
5182
5183         * support/scripts/sdcc.nsi: added include/pic16 to setup
5184
5185 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5186
5187         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5188         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5189         target 'clean',
5190         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5191         specific command line arguments. Also added sample lkr script
5192         for placing a variable at a specific memory bank.
5193         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5194         at a specific memory bank,
5195         * (pic16_dump_isection): fixed bug which caused string literals to
5196         be omitted when dumping idata section,
5197         * (pic16_groupRegistersInSection): added code to handle registers
5198         in specific memory banks,
5199         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5200         public, all references are renamed too,
5201         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5202         AOP_DPTR2,
5203         * (pic16_storeForReturn): added case to handle when dest is WREG,
5204         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5205         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5206         pic16_rel_udata, check to see if that register is marked as being
5207         a member of a specific memory bank,
5208         * (pic16_printIvalCharPtr): added code to add string literals either
5209         to code or the idata sections,
5210         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5211         also accept the 'udata' pragma,
5212         * src/pic16/main.h: new structure types sectName and sectSym
5213         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5214         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5215         * (pic16_findPrevInstruction): fixed, it returned nothing,
5216         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5217         instruction combinations,
5218         * (pic16_FixRegisterBanking): heavily reorganised,
5219         * (pic16_AnalyzeBanking): if generating banksel directives is
5220         disabled, then don't call FixRegisterBanking at all,
5221         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5222         completely removed,
5223         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5224
5225 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5226
5227         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5228         Phuah Yee Keat <yk.phuah AT nestac.com>
5229
5230 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5231
5232         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5233         correctly the IVT even if it is relocated to some other location
5234
5235 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5236
5237         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5238         * device/include/pic16/pic18f2220.h: NEW,
5239         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5240         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5241         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5242         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5243         nodefaultlibs, ivt_loc is the location of the interrupt vector
5244         table, and nodefaultlibs signs that default libraries should not be
5245         linked in link stage,
5246         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5247         according to --ivt-loc argument,
5248         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5249         when pragma stack is found,
5250
5251 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5252
5253         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5254         256 (range check), 257 (do while), 258.a-f (bit banging
5255         f.e. on 3-wire SPI bus)
5256
5257 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5258
5259         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5260         variables used exclusively within a loop
5261
5262 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5263
5264         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5265
5266 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5267
5268         * src/SDCClrange.c (computeClash): fixed bug #971834
5269
5270 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5271
5272         * src/mcs51/gen.c (genCmp): fixed bug #975903
5273         * src/hc08/gen.c (operandsEqu),
5274         * src/ds390/gen.c (operandsEqu),
5275         * src/z80/gen.c (operandsEqu),
5276         * src/pic/gen.c (operandsEqu),
5277         * src/pic16/gen.c (operandsEqu),
5278         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5279         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5280
5281 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5282
5283         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5284
5285 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5286
5287         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5288         default case in switch statement,
5289         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5290         to eliminate problem with initialisation of pointers, but problem
5291         still exists,
5292         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5293         * (emitStaticSegment): removed various lines emitting debug info,
5294         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5295         added processor registers for utilizing EEPROM,
5296         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5297         configurable and set 8
5298
5299 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5300
5301         * .version: increased version number to 2.4.2,
5302
5303         Cumulative patch for pic16 port
5304         * src/pic16/device.c: changed scheme to dump initial values for
5305         variables in idata segment, all print_idata* functions were removed,
5306         now the pic16_printIval* will be called,
5307         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5308         * _pic16_printPointerType, pic16_printPointerType,
5309         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5310         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5311         NEW, similar to the respective functions in SDCCglue.c,
5312         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5313         way, emitting hex bytes,
5314         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5315
5316 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5317
5318         * src/avr/ralloc.c (serialRegAssign),
5319         * src/xa51/ralloc.c (serialRegAssign),
5320         * src/pic/ralloc.c (serialRegAssign),
5321         * src/pic16/ralloc.c (serialRegAssign),
5322         * src/hc08/ralloc.c (serialRegAssign),
5323         * src/z80/ralloc.c (serialRegAssign),
5324         * src/ds390/ralloc.c (serialRegAssign),
5325         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5326
5327 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5328
5329         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5330         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5331
5332 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5333
5334         Cumulative patch for pic16 port:
5335         * src/pic16/device.h (typedef PIC16_device) modified fields for
5336         defining microcontrollers,
5337         * src/pic16/device.c: added new info for all devices in Pics16 array,
5338         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5339         to be optimised out by the pCode optimiser,
5340         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5341         specially, bug reported by G.M. Gallant,
5342         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5343         as force'd so that cannot be optimised out by pCode optimiser,
5344         * src/pic16/pcode.c,
5345         * src/pic16/pcodepeeph.c,
5346         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5347         they are disabled by default, but can be enabled explicit with
5348         command argument --denable-peeps, for testing,
5349         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5350         --pomit-ivt in COMPILE_FLAGS
5351
5352 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5353
5354         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5355           compilation on MSVC
5356
5357 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5358
5359         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5360
5361 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5362
5363         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5364         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5365
5366 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5367
5368         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5369         would only assign 0x300001 register.
5370
5371 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5372
5373         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5374         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5375
5376 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5377
5378         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5379         for ds80c400
5380         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5381         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5382         added peephole 254 (left shift), 255 (jump table)
5383
5384 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5385
5386         * device/lib/Makefile.in: removed comment line with model-pic16,
5387         * (target port-specific-objects-pic16): the libraries and objects
5388         are copied to the build directory form the device/lib/pic16/bin
5389         directory
5390
5391         Cumulative patch concerning pic16 port:
5392         * library directory has been re-organized,
5393         * added support for PIC18F1220,
5394         * added headers and library sources for chips 18f1220,18f6520,
5395         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5396
5397         * configuration registers setting has changed, now each supported
5398         device has a complete description of the registers it uses,
5399         * all initialisations are moved to idata sections, these section
5400         can be absolute or relocatable,
5401         * fixed initialisation of codespace variables,
5402         * fixed warning about PCLATU and gpsim,
5403         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5404         * (genAssign): use table reads when assigning from variables in codespace,
5405         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5406         char/int variables placed in codespace,
5407         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5408         registers set in .asm file, no need for --pomit-config-words anymore,
5409         * (pic16glue): some 8051 legacy segments are commented out
5410         (to be removed completely),
5411         * added support for alternative assembler and linker with --asm=
5412         and --link= command line arguments,
5413         * peepholes are disabled automatically in the port, no need to
5414         specify on command line,
5415         * port supports natively char/int/long multiplication, but converts
5416         all divisions to support functions,
5417         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5418         to the file set in variable $2,
5419         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5420         strings in ASCII format and not in hex,
5421         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5422         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5423         allocate proper register if iCodes aren't temporary,
5424
5425 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5426
5427         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5428
5429 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5430
5431         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5432         is commented out
5433
5434 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5435
5436         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5437         computed address is reused
5438         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5439         multi-byte bitfields
5440
5441 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5442
5443         * src/z80/gen.c: (genArrayInit): must check for pointers too
5444
5445 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5446
5447         * support/regression/tests/zeropad.c: never meant to commit the
5448           nestedstruct test: removed, added check for GCC version
5449
5450 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5451
5452         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5453         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5454         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5455           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5456           bugs 928906 and 954082 half-empty initializers
5457         * src/SDCCsymt.h,
5458         * src/SDCCsymt.c (getAllocSize): added for above fix
5459         * src/z80/gen.c (genArrayInit): fixed bug 741044
5460         * support/regression/tests/zeropad.c: added tests
5461
5462 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5463
5464         * src/pic16/device.c (pic16_dump_section): corrected bug which
5465         caused some symbols of the libraries to be misplaced
5466
5467 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5468
5469         * src/pic16/glue.c,
5470         * src/pic16/ralloc.h,
5471         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5472         to fix conflict with pic port
5473
5474 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5475
5476         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5477         externs configuration variables,
5478         * src/pic16/ralloc.h,
5479         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5480         prototype in header, commented out some debug messages
5481
5482 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5483
5484         * src/pic16/glue.c,
5485         * src/pic16/main.c,
5486         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5487         for gpasm COFF object generation. Thanks to D. Hawkins for
5488         his patch info
5489
5490 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5491
5492         * src/ds390/main.c,
5493         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5494         Brock for spotting this)
5495         * src/ds390/gen.c (genEndFunction),
5496         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5497         interrupt handler and critical. Disable push/pop optimizations when
5498         peephole optimizations disabled.
5499
5500 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5501
5502         Updated pic16 library sources and headers.
5503         * device/lib/pic16/pic18f*/ ,
5504         * device/include/pic16/*.h: modified to handle structured SFR
5505         definitions
5506
5507 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5508
5509         * src/port.h (PORT structure): added hook initPaths, now each
5510         port can declare its own default search paths,
5511         which can been seen with the --print-search-dirs option,
5512         see pic16 port for example,
5513         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5514         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5515         * (doPrintSearchDirs): NEW, replaces in a central manner the
5516         printing of search dirs which was split in set*Paths functions,
5517         * (main): added call to port->initPaths and doPrintSearchDirs,
5518         * src/avr/main.c,
5519         * src/ds390/main.c,
5520         * src/hc08/main.c,
5521         * src/izt/i186.c,
5522         * src/izt/tlcs900h.c,
5523         * src/mcs51/main.c,
5524         * src/pic/main.c,
5525         * src/pic16/main.c: modified port structures to reflect addition of
5526         initPaths hook,
5527
5528         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5529         * (pic16_dump_section): for registers in same address reserve memory once,
5530         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5531         to no_banksel,
5532         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5533         result is greater in size than right or left,
5534         * (pic16_genUMult8X8_8): there are some cases where the result can
5535         be 16 bits size, so handle these,
5536         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5537         * (pic16_outBitC): modified to emit pcodes,
5538         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5539         or not,
5540         * (genDivOneByte): implemented algorithm to divide 8-bits,
5541         * (genCmp): uncommented goto, but issues still exist,
5542         * (genAnd): fixed a bug with variables >8bits,
5543         * (genPackBits): optimization added that uses BCF/BSF to change a
5544         single bit,
5545         * (genAssign): fixed bug when assigning floating point literals,
5546         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5547         __sdcc_gsinit_startup label,
5548         * src/pic16/main.c (_pic16_init): removed search directory
5549         initialisations,
5550         * (_pic16_initPaths): NEW, used to initialise search directories,
5551         * (_hasNativeMulFor): support functions for all except char/int
5552         multiplication, and char division,
5553         * (PIC16_port struct): modified entry for native mul support,
5554         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5555         no_banksel option,
5556         * (buildCallTree): call to register_usage is ifdef'ed out,
5557
5558 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5559
5560         * device/include/string.h: applied Stas Sergeev's patch to make this
5561         header file compatible with the preprocessor -Wundef option
5562         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5563         failure (fixes bug #941458)
5564
5565 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5566
5567         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5568         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5569         that the variable, not the function, should be static
5570         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5571         to be consistent with non-literal case
5572
5573 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5574
5575         * src/SDCCast.c (isConformingBody): fixed bug #949967
5576         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5577         convilong): fixed bug #952086
5578
5579 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5580
5581         * src/SDCCmem.c (allocVariables): fixed bug #955321
5582
5583 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5584
5585         * src/hc08/main.c (_hc08_genAssemblerEnd),
5586         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5587         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5588         completely eliminated the use of a temporary file
5589         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5590         when more than one file linked
5591         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5592
5593 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5594
5595         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5596         which fixes bug #543481
5597         * support/regression/tests/bug-751703.c: fixed comments left from a
5598         cut and paste error
5599         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5600         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5601         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5602         scopes
5603         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5604         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5605         are now changed to underscores in moduleName
5606
5607 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5608
5609         * as/mcs51/lkmem.c: better fix for bug #954173
5610
5611 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5612         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5613
5614         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5615         * device/include/c8051f000.h,
5616         * device/include/c8051f120.h,
5617         * device/include/c8051f300.h,
5618         * device/include/c8051f310.h,
5619         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5620         PWM16) and detab'ed
5621
5622 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5623
5624         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5625         and mailing lists, doc'ed --no-peep-comments, removed reference
5626         to knoppix (newest version has no LyX/LaTeX), other minor changes
5627         * src/SDCCglue.c (glue): save 2 bytes stack space with
5628         option --main-return. The ljmp could probably be avoided too
5629
5630 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5631
5632         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5633
5634 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5635
5636         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5637         * src/SDCCopt.c (isLocalWithoutDef),
5638         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5639         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5640         (credit to Maarten Brock for patch #949363, on which this is based)
5641         * support/regression/tests/bug-751703.c: some test cases of extern used
5642         within inner scopes.
5643
5644 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5645
5646         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5647         SPEC_STRUCT
5648         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5649         struct definitions
5650         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5651         dwWriteLabel): fix to create valid debugger symbols even when
5652         the module name has non-alphanumeric symbols in it
5653         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5654         when a variable's allocation has been optimized away
5655
5656
5657 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5658
5659         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5660         * src/hc08/main.c,
5661         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5662         * src/mcs51/main.c,
5663         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5664         * src/ds390/main.c,
5665         * src/z80/gen.c (z80_emitDebuggerSymbol),
5666         * src/z80/main.c,
5667         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5668         * src/pic/main.c,
5669         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5670         * src/pic16/main.c,
5671         * src/avr/gen.c (avr_emitDebuggerSymbol),
5672         * src/avr/main.c,
5673         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5674         * src/xa51/main.c,
5675         * src/SDCCdebug.c (emitDebuggerSymbol),
5676         * src/SDCCdebug.h,
5677         * src/port.h: added a debugger struct to the port struct. Added a
5678         callback for defining debugger symbols
5679
5680         * src/SDCCast.c (createLabel),
5681         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5682         with isitmp = 1
5683         * src/SDCCicode.h,
5684         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5685         iCode back to the ast for the function
5686
5687         * src/hc08/ralloc.c (hc08_assignRegisters),
5688         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5689         unneeded fields from the regs struct.
5690         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5691         pushReg() & pullReg() functions instead of emitcode()
5692
5693         * src/hc08/gen.c (genLabel, genhc08Code),
5694         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5695
5696         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5697         debugger hooks
5698
5699         * src/hc08/gen.c (genEndFunction, genhc08Code),
5700         * src/hc08/gen.h,
5701         * src/mcs51/gen.c (genEndFunction, gen51Code),
5702         * src/mcs51/gen.h,
5703         * src/ds390/gen.c (genEndFunction, gen390Code),
5704         * src/ds390/gen.h,
5705         * src/z80/gen.c (genEndFunction, genZ80Code),
5706         * src/z80/gen.h,
5707         * src/z80/z80.h,
5708         * src/pic/gen.c (genEndFunction, genpic14Code),
5709         * src/pic/gen.h,
5710         * src/pic16/gen.c (genEndFunction, genpic16Code),
5711         * src/pic16/gen.h,
5712         * src/avr/gen.c (genEndFunction, genAVRCode),
5713         * src/avr/gen.h,
5714         * src/xa51/gen.c (genEndFunction, genXA51Code),
5715         * src/xa51/gen.h,
5716         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5717         specific code to cdbFile.c and out of the backend code generators
5718
5719         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5720         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5721         starting address is now 0
5722
5723         * as/hc08/asm.h,
5724         * as/hc08/m08pst.c,
5725         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5726         assembler directive for DWARF support
5727         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5728
5729         * src/src.dsp,
5730         * src/Makefile.in,
5731         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5732
5733 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5734
5735         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5736         and inappropriate peephole optimization in jump tables
5737
5738 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5739
5740         * as/hc08/m08pst.c,
5741         * src/SDCCglue.c: sdccopt works for the hc08 port now
5742
5743 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5744
5745         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5746
5747 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5748
5749         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5750
5751 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5752
5753         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5754         rules
5755         * src/SDCCmain.c,
5756         * src/SDCCglobl.h,
5757         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5758         comments from the peephole optimizer replacement rules
5759         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5760         symbols
5761         * src/SDCCcse.c (updateSpillLocation),
5762         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5763         equivalents
5764         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5765         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5766         objects far pointers
5767
5768 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5769
5770         * src/SDCCsymt.h: a missing part of my last change
5771         * src/pic/ralloc.c (regTypeNum),
5772         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5773
5774 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5775
5776         * src/SDCCicode.h,
5777         * src/SDCCicode.c (aggrToPtrDclType),
5778         * src/SDCCptropt.h,
5779         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5780         ptrPseudoSymConvert),
5781         * src/pic/ralloc.c (regTypeNum),
5782         * src/pic16/ralloc.c (regTypeNum),
5783         * src/hc08/ralloc.c (regTypeNum),
5784         * src/ds390/ralloc.c (regTypeNum),
5785         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5786         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5787
5788 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5789
5790         * link/z80/lkmain.c (afile),
5791         * as/hc08/lkmain.c (afile),
5792         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5793         prevent a pointer problem when a filename has no directory and
5794         no extension specified.
5795
5796 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5797
5798         * link/z80/lkmain.c (afile): allow periods in directory names
5799         * link/z80/lkmain.c (afile),
5800         * as/mcs51/lkmain.c (afile),
5801         * as/hc08/lkmain.c (afile): allow linker script file to have an
5802         extension other than ".lnk"
5803         * link/z80/lklex.c (getfid),
5804         * link/z80/lkmain.c (parse),
5805         * as/mcs51/lklex.c (getfid),
5806         * as/mcs51/lkmain.c (parse),
5807         * as/hc08/lklex.c (getfid),
5808         * as/hc08/lkmain.c (parse): Support comments in the linker script
5809         file on lines by themselves and after filenames
5810
5811 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5812
5813         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5814
5815 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5816
5817         * src/z80/peeph-z80.def: removed some peephole rules that don't
5818         work with multibyte arithmetic (fixed bug #937126)
5819         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5820         to registers and not global variables
5821         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5822         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5823         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5824         checking for assignments not internally generated (fixed bug #931895)
5825         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5826         structure member (fixed bug #930072)
5827
5828 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5829
5830         * src/SDCCmain.c (linkEdit),
5831         * src/hc08/main.c (_hc08_parseOptions),
5832         * as/hc08/Makefile.in,
5833         * as/hc08/aslink.h,
5834         * as/hc08/asm.h,
5835         * as/hc08/m08pst.c,
5836         * as/hc08/lkrloc.c (relr, rele),
5837         * as/hc08/lkarea.c (lnkarea)
5838         * as/hc08/lkmain.c (afile, parse),
5839         * as/hc08/lkelf.c: support for ELF output
5840         * as/hc08/lks19.c (s19),
5841         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5842
5843 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5844
5845         * as/mcs51/lkihx.c: Fixed bug #899105.
5846
5847 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5848
5849         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5850         .dsp files from Unix to DOS.
5851
5852 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5853
5854         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5855         function pointers; we have been compliant for several months now.
5856         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5857         change that was accidently commented out
5858         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5859         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5860         bug #922319
5861
5862 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5863
5864         * src/hc08/gen.c: output of all of the internal debugging information
5865         is now controlled by the D() macro; it is disabled by default
5866
5867 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5868
5869         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5870         harder to keep the same registers during a CAST iCode
5871         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5872         long via int can be done in a single cast, if the signedness is
5873         correct.
5874         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5875         putchar() in tinibios.c in ds390's library
5876
5877 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5878
5879         * src/SDCCast.c (decorateType): fixed bug #898889,
5880         cast result of a literal complement too
5881         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5882         fixed check for bitfields
5883
5884 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5885
5886         * src/SDCCicode.c (geniCodeLogic): made it static,
5887         (geniCodeLogicAndOr): added in order to fix bug #905492,
5888         (ast2iCode): fixed bug #905492
5889         * support/regression/tests/bug-905492.c: added
5890         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5891         (processParms): fixed bug #927659: don't copy parms, this will clear
5892         decorated flag
5893         * support/regression/tests/bug-927659.c: added
5894
5895 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5896
5897         * src/SDCCast.c (addCast): don't cast float to char
5898         * device/lib/libsdcc.lib: added _memmove
5899
5900 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5901
5902         * device/lib/large/Makefile: fixed parallel execution by
5903         replacing `make` by `$(MAKE)`
5904
5905 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5906
5907         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5908         offsets (fixes bug #923936)
5909
5910 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5911
5912         * device/lib/small/Makefile: fixed parallel execution by
5913         replacing `make` by `$(MAKE)`
5914
5915 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5916
5917         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5918
5919 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5920
5921         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5922         * src/regression/Makefile: Regression test was not running.
5923
5924 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5925
5926         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5927         complement if possible
5928         * src/SDCCval.c (valComplement),
5929         * src/SDCCicode.c (operandOperation): fixed complement of literal
5930         * support/regression/tests/onebyte.c (testComplement): added
5931
5932 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5933
5934         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5935         return an optimized tree; actually replace actParm with the new tree
5936         * src/SDCCast.h: added some parantheses to remove side effects
5937         * support/regression/tests/bug-920866.c
5938
5939 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5940         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5941         Bit operands were not being handled properly in the pic14 port.
5942         (now src/regression/add.c passes again).
5943
5944 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5945
5946         * src/SDCC.y (labeled_statement): case and default no longer require
5947         a following statement (RFE #893037)
5948
5949 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5950
5951         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5952         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5953         disabled (fixes bug #916294)
5954         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5955         "mov a,acc"; patch provided by Lenny Story
5956         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5957
5958 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5959
5960         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5961         functions
5962         * src/ds390/gen.c (genFunction, genEndFunction),
5963         * src/ds390/ralloc.c (ds390_assignRegisters),
5964         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5965         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5966         pushed if there are parameters passed on the stack. Also, a cleaner
5967         way to decide if r0/r1 should be pushed/popped. (Together they fix
5968         bug #918693)
5969
5970 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5971
5972         * doc/sdccman.lyx,
5973         * device/lib/mcs51/crtpagesfr.asm,
5974         * device/lib/mcs51/crtxinit.asm,
5975         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5976         to avoid confusion with Si Lab's SFRPAGE register.
5977
5978 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5979
5980         * src/SDCCglue.c (emitMaps): allow public sfr variables
5981         * src/SDCCglue.c (initialComments): include compiler build date
5982         with compiler version and put the timestamp of the generated
5983         assembly file on a serperate line to be less confusing.
5984         * src/port.h: added genInitStartup hook
5985         * src/avr/main.c,
5986         * src/ds390/main.c,
5987         * src/hc08/main.c,
5988         * src/pic/main.c,
5989         * src/pic16/main.c,
5990         * src/xa51/main.c,
5991         * src/z80/main.c: genInitStartup initialize as NULL (default to
5992         historical behaviour)
5993         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5994         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5995         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5996         library instead of hard coding it into the compiler.
5997         * support/regression/ports/mcs51-stack-auto/spec.mk,
5998         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5999         * device/lib/mcs51/Makefile,
6000         * device/lib/small/Makefile,
6001         * device/lib/large/Makefile,
6002         * device/lib/mcs51/crtpagesfr.asm,
6003         * device/lib/mcs51/crtstart.asm,
6004         * device/lib/mcs51/crtxclear.asm,
6005         * device/lib/mcs51/crtxinit.asm,
6006         * device/lib/mcs51/crtclear.asm,
6007         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6008         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6009         and into user configurable files.
6010         * device/lib/clean.mk: clean mcs51 directory too
6011         * support/regression/tests/longlit.c: added static to T1 declaration
6012         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6013         accesses in the initialization code
6014
6015 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6016
6017         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6018         OSCTRIMVAL as noted in bug #916008
6019
6020 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6021
6022         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6023         in loops with multiple exits (reported as incorrect registers
6024         used by Martin Helmling in Sdcc-user list)
6025
6026 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6027
6028         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6029         made ds390 register extensions look less like error messages
6030
6031 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6032
6033         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6034         reported by Adam Wozniak in Sdcc-user list
6035
6036 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6037
6038         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6039         arithmetic optimizations, added debug output
6040
6041 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6042
6043         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6044         * sdcc.spec: updated and split sdcc into 3 rpms
6045         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6046         needed for literals of LEFT_OP and '+'
6047         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6048         introduced RESULT_TYPE_NOPROM
6049         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6050         left shift
6051         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6052         limited promotion to int only for '*'
6053         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6054
6055 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6056
6057         * src/pic16/gen.c (genSkip),
6058         (genc16bit2lit), (gencjneshort): commented out
6059         (is_LitOp): new helper function, checks operand type
6060         (genCmpEq): rewritten
6061
6062 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6063
6064         * support/regression/tests/bug-908454.c: added
6065
6066 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6067
6068         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6069         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6070         (geniCodeCast): cosmetic, don't preserve bit storage class
6071         (geniCodeLeftShift): added promotion
6072         (geniCodeLogic): fixed regression
6073         * src/SDCCsymt.c (computeTypeOr): accept bits too
6074         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6075
6076 2004-03-07  Borut Razem <borut.razem AT siol.net>
6077
6078         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6079
6080 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6081
6082         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6083         version of pic16_genPackRegisters which does not check if ic is a
6084         CAST operator,
6085         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6086         function cause string1.c regression test fails
6087
6088 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6089
6090         * sim/ucsim/configure.in,
6091         * sim/ucsim/configure,
6092         * sim/ucsim/doc/Makefile.in: use docdir
6093         * src/SDCC.y: fixed sbit atrributes
6094         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6095         * src/SDCCast.c (decorateType): |^& need special promotion handling
6096         * src/SDCCast.h,
6097         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6098         * src/SDCCsymt.h (computeType),
6099         * src/SDCCicode.c: computeType() needs op
6100         * src/SDCCsymt.c (checkTypeSanity),
6101         * doc/sddman.lyx: "plain" bitfields are unsigned
6102         * src/SDCCsymt.c (computeTypeOr): added
6103         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6104         |^& ops
6105         * src/SDCCval.c (val*): computeType() needs op
6106         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6107         * support/regression/tests/onebyte.c: added tests for |^&
6108
6109 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6110
6111         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6112         for writing icode into asm output.
6113
6114 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6115
6116         * src/pic16/device.c: added some debug lines enabled
6117         with macro DEBUG_CHECK,
6118         * src/pic16/genarith.c: more debug in genPlus,
6119         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6120         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6121         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6122         * (aopForSym): onStack symbols are re-placed in data memspace,
6123         and onStack flag is cleared,
6124         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6125         copy temporary pcodeop,
6126         * (genPcall): added warning for not updating PCLATU,
6127         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6128         always true for pic16 port,
6129         * (genMultOneWord): NEW, supports integer multiplication,
6130         * (genMult): modified to call genMultOneWord,
6131         * (ifxForOp): added warning when return NULL,
6132         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6133         flag is set before call to operandFromSymbol for implicit
6134         added structures,
6135         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6136         options.intlong_rent are set by default,
6137         * (_hasNativeMulFor): modified to allow port generation of integer
6138         multiplication,
6139         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6140         set regtype to REG_SFR for all registers, restricting seting the
6141         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6142
6143 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6144
6145         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6146         more than 500 times in the regression tests
6147
6148 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6149
6150         * support/Util/SDCCerr.h,
6151         * support/Util/SDCCerr.c,
6152         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6153         enumerator_list),
6154         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6155         for symbol conflicts.
6156         * support/valdiags/tests/enum.c,
6157         * support/valdiags/tests/tentdecl.c,
6158         * support/valdiags/tests/struct.c: expect possible error messages
6159         referring to original symbol definitions.
6160         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6161         * src/SDCCsymt.h,
6162         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6163
6164 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6165
6166         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6167
6168 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6169
6170         * src/pic16/ralloc.c (newReg): fixed bug #908929
6171
6172 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6173
6174         * src/ds390/gen.c: added missing #include "main.h"
6175
6176 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6177
6178         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6179         checking if symbol is already in set,
6180         * src/pic16/device.h: prototype for checkAddSym,
6181         * src/pic16/gen.c: (_G): added entry interruptvector,
6182         * (assignResultValue): removed some commented out lines,
6183         * (genFunction): check for ISR via sym->type, absolute section for
6184         interrupt code is created via a new pBlock, the goto instruction is
6185         placed now correctly at the interrupt vector position, changed all
6186         references from ivec to _G.interruptvector,
6187         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6188         is the interrupt is a high priority one, same for return from ISR,
6189         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6190         externs to calls of checkAddSym,
6191         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6192         pic16_pcode_verbose flag is set,
6193         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6194         * src/pic16/pcoderegs.c: message about how many registers are saved
6195         will only be emitted if pic16_pcode_verbose flag is set,
6196
6197 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6198
6199         * src/ds390/ralloc.h,
6200         * src/ds390/ralloc.c (ds390_regWithIdx),
6201         * src/ds390/gen.c (emitcode),
6202         * src/ds390/main.h,
6203         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6204         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6205         ds390operandCompare, getRegsRead, getRegsWritten,
6206         initializeAsmLineNode): customized instruction size calculation for
6207         ds390, started basis for some register optimizations
6208         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6209         corresponding assembly output
6210         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6211         missing push/pop of r0/r1. Optimized push/pops
6212
6213 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6214
6215         * src/mcs51/main.c (instructionSize): fixed ACALL size
6216         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6217
6218 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6219
6220         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6221         the sorting of rlist with NULL elements
6222         * (print_idataType, print_idata): NEW to create idata sections
6223         * src/pic16/device.h: idataSymSet new variable
6224         * src/pic16/gen.c (genFunction): fixed some bugs in string
6225         comparing, improved the absolute section creation for ISRs,
6226         added FSR0L/FSR0H in registers that are saved in an ISR,
6227         * (genInline): fixed the processing of inline snippets,
6228         now they undergo no process by the peephole optimizer
6229         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6230         are placed in idataSymSet,
6231         * (pic16emitStaticSeg): extern symbols are added in externs,
6232         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6233         switching when aboslute variables are placed in access bank memory
6234         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6235         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6236         commented out with #if,
6237         * (pic16_packRegisters): reintroduce the check for CAST because some
6238         symbols are not correctly handled,
6239         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6240         pCodeInstruction instead of pCode,
6241         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6242         pCodeAsmDir definition,
6243         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6244         directive, then the argument directive is emitted without the leading
6245         tab, hack for inline labels which must be in the first column,
6246         * (compareLabel,pic16_findNextInstruction),
6247         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6248         * (insertBankSwitch): modified for the new pCodeAsmDir,
6249
6250 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6251         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6252
6253         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6254         instance,
6255         * (pushSide): commented out with #if,
6256         * (assignResultValue): fixed some typos in saving
6257         registers,
6258         * (genPcall): FIXED and sync'ed with genCall,
6259         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6260         * (genNearPointerGet): fixed to handle some more cases,
6261         implementation scheme via table reads,
6262         * (genConstPointerGet): modified to access code memory correct,
6263         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6264         and improved to handle some cases
6265         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6266         instead of "RETLW" for init data
6267         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6268         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6269         variables are placed in access bank memory (<0x80 and >=0xf80),
6270         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6271         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6272         TBLWT_POSTDEC,TBLWT_PREINC
6273         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6274         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6275         directives
6276         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6277         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6278         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6279         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6280
6281 2004-02-29  Borut Razem <borut.razem AT siol.net>
6282
6283         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6284         support/Util/findme.h, support/Util/system.h: enhance binary relative
6285         search for lib and include by using findProgramPath()
6286
6287 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6288
6289         * src/SDCCpeeph.h,
6290         * src/SDCCpeeph.c (pcDistance),
6291         * src/port.h,
6292         * src/mcs51/ralloc.h,
6293         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6294         * src/mcs51/main.h,
6295         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6296         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6297         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6298         size calculation port specific, started basis for some register
6299         optimizations
6300         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6301         missing push/pop of r0/r1. Optimized push/pops
6302         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6303         * device/lib/_modsint.c (_modsint),
6304         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6305         and stack version so regression tests pass
6306
6307 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6308
6309         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6310         * src/SDCCast.c (decorateType): catch another small optimization
6311         with '?' operator
6312         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6313         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6314         modified to finally use computeType() all over SDCC,
6315         see Feature Request #877103
6316         * src/SDCCval.h: cosmetic
6317         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6318         valCompare(); regression tested in muldiv.c
6319         * support/regression/tests/muldiv.c (testMod): mod sign follows
6320         dividend only
6321
6322 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6323
6324         * src/SDCCast.c (decorateType): fixed bug #902362
6325         * doc/INSTALL.txt: fixed install instructions for win32
6326
6327 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6328
6329         * device/include/Makefile.in (install): fixed by replacing spaces
6330         by tabs
6331         * doc/README.txt,
6332         * doc/INSTALL.txt: updated for release
6333         * doc/sdccman.lyx: added warning for --xstack being buggy
6334
6335 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6336
6337         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6338         to eliminate build warnings.
6339         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6340
6341 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6342            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6343
6344         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6345         removed -penable-stack, added comment for stack pragma, added
6346         warning for not initializing the stack/frame registers, removed
6347         comment at interrupts section
6348
6349         Stack is made permanent, there is no ability to disable stack usage.
6350         * src/pic16/device.h,
6351         * src/pic16/device.c: removed all references to USE_STACK macro,
6352         * src/pic16/device.c (pic16_dump_section): when no elements in
6353         rlist, free rlist before return,
6354         * (pic16_dump_int_registers): NEW, internal registers are a new set
6355         of general purpose registers reused by each function,
6356         * (checkAddReg): returns 1 if registers is added to set,
6357         * (pic16_groupRegistersInSection): when a registers is of type
6358         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6359         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6360         SRCASECMP macro is moved here from device.c
6361         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6362         PO_PCLATU, PO_PRODL, PO_PRODH,
6363         * (pic16_pCodeOpType, genMinus,
6364         changed compares to "a" register, with AOP_ACC,
6365         * (pic16_genPlus): fixed some bugs and indented properly,
6366         * (pic16_addSign): changed size to size+offset in the MOVWF
6367         instruction,
6368         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6369         multiply 8-bit operand by literal, result is 8-bit,
6370         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6371         multiply 2 8-bit operand, result is 8-bit,
6372         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6373         genUMult8X*_16,
6374         * src/pic16/gen.c: changed accUse to contain WREG only,
6375         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6376         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6377         true, do not use immediate addressing any more unless sym is a
6378         pointer in codespace,
6379         * (aopForRemat): do not use immediate addressing when symbol not in
6380         codespace and when symbol's address is requested,
6381         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6382         accUse size (= 1),
6383         * (aopGet): added case for AOP_ACC and don't return "accumulator
6384         bug" but WREG instead,
6385         * (popGetTempReg): pushes contents of temporary register in stack,
6386         * (popReleaseTempReg): pops contents of temporary register from
6387         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6388         * (pic16_popGet): separated case AOP_ACC to return register WREG
6389         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6390         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6391         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6392         the use of immediate pointers to certain cases only.
6393
6394         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6395         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6396         * (assignResultValue, genCall, genRet): modified to use the new
6397         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6398         genPcall is still broken,
6399         * (genFunction): added code to create 'A' type pBlocks when
6400         interrupt functions are generated, code not extensively tested yet,
6401         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6402         * (genEndFunction): modified so ISRs pop stored registers from stack,
6403         * (genMultOneByte): cleanup,
6404         * (AccRsh): added flag andmask, to and result with appropriate mask,
6405         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6406         * (genDataPointerGet): fixed and reenabled its use,
6407         * (genNearDataPointerGet): bugs fixed,
6408         * (genDataPointerSet): bugs fixed,
6409         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6410         pic16_DumpSymbol, pic16_DumpOp,
6411         * src/pic16/genutils.h: function prototypes for the above functions,
6412         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6413         pointers,
6414         * (pic16emitRegularMap): many many many improvements, but needs a
6415         major cleanup,
6416         * src/pic16/main.c: enable_stack in pic16_options is removed,
6417         * (_pic16_parseOptions): removed command line options -penable-stack,
6418         * (_process_pragma): emit stack symbol only when stack pragma is
6419         processed,
6420         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6421         redirected to FSR0L/FSR0H pair,
6422         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6423         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6424         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6425         for immediates,
6426         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6427         * (dumpPicOptype): NEW,
6428         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6429         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6430         with movff instruction,
6431         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6432         added pic16_int_regs, some packRegsFor* functions are commented out,
6433         because produce errors,
6434         * src/pic16/NOTES: minor modifications
6435
6436 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6437
6438         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6439         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6440         --pack-iram.
6441         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6442         * as/mcs51/lkaomf51.c: fixed bug #895763
6443
6444 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6445
6446         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6447
6448 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6449
6450         * doc/sdccman.lyx: added details about the HC08 storage classes and
6451         interrupts, fixed the register usage info for z80 & gbz80
6452
6453 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6454
6455         * doc/sdccman.lyx: added more pic16 port documentation
6456         * device/include/pic16/: added header pic18fregs.h
6457
6458 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6459
6460         * doc/sdccman.lyx: added Vangelis' contribution
6461
6462 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6463
6464         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6465         extend to the next CALL or PCALL, not just to the next CALL.
6466
6467 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6468
6469         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6470
6471 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6472
6473         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6474         bug #895752 and a better fix for bug #716790
6475
6476 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6477
6478         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6479
6480 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6481
6482         * doc/sdccman.lyx: minor changes, minor changed
6483
6484 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6485
6486         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6487         which can't handle SDCC_NEWONEBYTEOPS,
6488         (geniCodeMultiply): removed conversion from mult to shift for pic14
6489         and pic16
6490
6491 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6492
6493         * src/hc08/gen.h,
6494         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6495         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6496         thus fixing bug #895406
6497
6498 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6499
6500         * device/lib/_modsint.c,
6501         * device/lib/_modslong.c: sign follows divisor only
6502         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6503         signs or signedness can be ignored
6504         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6505         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6506         added optimization for IFX,
6507         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6508         arguments;
6509         reenabled optimization for IFX, which was removed on 2004-01-11
6510         * src/SDCCast.h: added return type IFX
6511         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6512         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6513         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6514         SDCC_OLDONEBYTEOPS selects the old behaviour
6515         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6516         changed again and commented promotion rule
6517         * src/SDCCval.c (valDiv): promotion no longer necessary
6518         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6519         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6520         rewritten
6521         * support/regression/tests/onebyte.c: added
6522
6523 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6524
6525         * gen.c (genInline): reverted to old code for assemnling inline
6526         code because of bug reported James Chadd
6527
6528 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6529
6530         * ralloc.h: missing declarations from previous patch,
6531         seems that patch for ralloc.h was never applied, fixed
6532
6533 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6534            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6535
6536         * pcode.c,
6537         * pcode.h,
6538         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6539         indirect addressing. Marked FSR0 as deprecated
6540         * gen.c (pointerCode): commented out, not needed now
6541         (pic16_popGet2p): new MOVFF helper function
6542         (genGenPointerGet),
6543         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6544         (shiftRLong): removed duplicate debugging info
6545
6546 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6547
6548         * src/ds390/gen.c (genNearPointerGet),
6549         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6550         optimization with bits, but not bitfields.
6551         * src/ds390/ralloc.c (packRegisters),
6552         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6553
6554 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6555
6556         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6557
6558 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6559
6560         * src/SDCCsymt.h,
6561         * src/SDCCicode.c (operandFromSymbol),
6562         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6563         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6564         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6565         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6566         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6567         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6568         bug #892038
6569         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6570         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6571         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6572         * src/SDCCsymt.c (newSymbol),
6573         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6574         enumerator_list),
6575         * src/SDCCval.h,
6576         * src/SDCCval.c (newiList): fixed bug #885705
6577
6578 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6579
6580         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6581         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6582
6583 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6584
6585         * device/include/c8051f120.h,
6586         * device/include/c8051f300.h,
6587         * device/include/c8051f310.h: added/updated header files for Silicon
6588         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6589         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6590         in new section Submitting patches
6591
6592 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6593
6594         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6595         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6596         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6597         genGenPointerSet),
6598         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6599         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6600         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6601         genGenPointerSet),
6602         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6603         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6604         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6605         genGenPointerSet),
6606         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6607         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6608         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6609         genGenPointerSet): fixed bug #892400
6610         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6611         to eliminate build warnings.
6612         * src/SDCCast.c (processParms),
6613         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6614         fixed bug 751859
6615         * support/valdiag/valdiag.py: added GCC to the list of defines active
6616         when compiling with gcc
6617
6618 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6619
6620         * support/Util/SDCCerr.h,
6621         * support/Util/SDCCerr.c,
6622         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6623         with an incomplete type (fixed bug #883734)
6624         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6625
6626 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6627
6628         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6629
6630 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6631
6632         * src/SDCCast.c (decorateType),
6633         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6634         function pointer implementation
6635         * support/regression/tests/funptrs.c: added tests to verify both forms
6636         of function pointers work correctly. Added tests to verify parameters
6637         are passed in the correct order.
6638
6639 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6640
6641         * device.c (regCompare): registers are sorted by ascending
6642         address and increasing size,
6643         * main.c (_pic16_finaliseOptions): removed the declaration
6644         of compiler macro MCU. Now a macro of the format pic18fxxxx
6645         will be defined from the command line
6646
6647 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6648             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6649
6650         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6651         PCOP_RLCF was overwritten!
6652         * gen.c (genSkip): commented out calls to pic16_emitcode,
6653         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6654         * (genlshTwo),
6655         * (genRRC): added debugging info,
6656         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6657         overwritten while shifting,
6658         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6659         overwritten while shifting,
6660         * (AccLsh),
6661         * (AccRsh),
6662         * (shiftLLeftOrResult),
6663         * (shiftRLeftOrResult),
6664         * (shiftRLong),
6665         * (shiftLLong): Implemented with pic16_emitpcode
6666         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6667         * (genLeftShift): Fixed bug, operand for shift by variable always
6668         was "and"ed with 0x0f,
6669         * (genLeftShiftLiteral),
6670         * (genrshTwo),
6671         * (genRightShiftLiteral): added debugging info,
6672         * (genrshFour): added comment,
6673         * (genRightShift): determined signedness from operand "left"
6674         instead of "result"
6675
6676 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6677
6678         * src/SDCCicode.c (geniCodeParms),
6679         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6680         function pointers, fixed function pointer bugs #861242 and #861896
6681
6682 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6683
6684         * device/include/c8051f000.h,
6685         * device/include/c8051f120.h,
6686         * device/include/c8051f300.h: added header files for Silicon
6687         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6688
6689 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6690
6691         * src/SDCCast.c (processParams): added new type flow and restructured
6692         (gatherAutoInit): added new type flow
6693         (addCast): cosmetic changes
6694         (getLeftResultType): added new type flow for array indices, patch
6695         provided by Stas, see FR #877103
6696         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6697         array index patch by Stas
6698         * src/SDCCast.h: added prototype getResultTypeFromType()
6699         * src/SDCCval.h,
6700         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6701         * src/pic/glue.c (pic14emitStaticSeg),
6702         * src/pic16/glue.c (pic16emitStaticSeg),
6703         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6704         for initialization of symbols
6705         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6706         * support/Util/SDCCerr.h:
6707         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6708         * .version: bumped version number to 2.3.8
6709         * device/include/Makefile.in (install),
6710         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6711         avoid warnings
6712
6713 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6714
6715         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6716         Slade Rich fixed an optimization bug
6717         * src/pic/pcodepeep.c,
6718         * src/pic/pcoderegs.c
6719         * doc/Makefile (install): added test for directory
6720
6721 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6722
6723         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6724         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6725         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6726         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6727         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6728         * as/mcs51/asexpr.c (term),
6729         * as/hc08/asexpr.c (term): fixed bug #887146
6730
6731 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6732
6733         * src/z80/gen.c (genMult): handle single byte result product
6734         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6735         DUMMY_READ_VOLATILE (fixed bug #886367)
6736
6737 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6738
6739         * support/regression/tests/libmullong.c: fixed logic, on little endian
6740         hosts we ended without a mullong_wrapper()
6741
6742 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6743
6744         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6745         virus/worm forged address usage.
6746
6747 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6748
6749         Fixed promotion, it should be done on AST level:
6750         * src/SDCCast.c (addCast): added promotion to int
6751         (decorateType): updated call to upCast()
6752         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6753         usualUnaryConversions()
6754
6755 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6756
6757         * support/regression/tests/literalop.c (mulWrapper): Added a
6758         wrapper to remove integer overflow warnings.
6759
6760         * support/regression/tests/float_trans.c: Made work on host.
6761
6762         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6763         location of sz80.
6764
6765         * support/regression/generate-cases.py (main): Changed from inline
6766         to a main method.
6767
6768         * doc/Makefile (install): Changed to depth first to get rid of
6769         missing directory install warning.
6770
6771         * as/Makefile (install-doc): Made work on Mac.
6772
6773 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6774
6775         * src/SDCCast.c: added an additional type flow in decorateType() of
6776         opposite direction, see feature request #860006; it's enabled at runtime
6777         by setting the environment variable SDCC_NEWTYPEFLOW
6778         * src/SDCCast.h: changed prototype of decorateType()
6779         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6780         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6781         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6782         see feature request #877103
6783         * src/SDCCval.c: updated call of decorateType()
6784         (valBitwise): fixed bug #882876
6785         (valMinus): added promotion
6786         (valLogicAndOr): result is unsigned
6787         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6788         * src/SDCCsymt.c (computeType),
6789         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6790         must not cause an unsigned operation
6791         * src/pic/glue (pic14emitRegularMap),
6792         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6793
6794 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6795
6796         * src/pic/pcode.c (PCodeID): commented out left over debug code
6797
6798 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6799
6800         * support/valdiag/tests/overflow.c: added shift tests
6801         * src/pic/device.c,
6802         * src/pic/gen.c,
6803         * src/pic/gen.h,
6804         * src/pic/glue.c,
6805         * src/pic/main.c,
6806         * src/pic/pcode.c,
6807         * src/pic/pcode.h,
6808         * src/pic/pcodepeep.c,
6809         * src/pic/pcoderegs.c,
6810         * src/pic/ralloc.c,
6811         * src/pic/ralloc.h: applied patch from Slade Rich;
6812         added support for multiple code pages and multiple RAM banks on the
6813         PIC 14 port. The ASM files now no longer simply assume all the
6814         code / RAM are in the same page / bank. This means the linker can
6815         safely allocate code/RAM of separate ASM files to different pages/banks.
6816         * doc/sdccman.lyx: added Slade's tips
6817         * src/mcs51/peeph.def: fixed bug #880768
6818
6819 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6820
6821         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6822         * src/SDCCast.c (decorateType): fixed bug #880197
6823
6824 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6825
6826         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6827         getopt.h.
6828
6829         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6830         strtof is not part of C89 and isn't included with Mac OS X.
6831
6832 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6833
6834         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6835         shiftL2Left2Result): fixed bug #879326
6836         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6837         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6838         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6839         address fetch for clr instruction
6840         * device/lib/hc08/_mulint.c: created optimized assembly version
6841         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6842
6843 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6844
6845         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6846         proposed in FR #877103
6847
6848 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6849
6850         * src/SDCCval.c (cheapestVal): added missing checks
6851         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6852         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6853
6854 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6855
6856         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6857         equal operands
6858
6859 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6860
6861         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6862         loaded with the linker search paths (-L arguments) and the libraries
6863         to be linked with the current source (-l arguments). Changes
6864         currently will affect only the pic16 port.
6865         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6866         include path the port specific paths and port specific libraries,
6867         * gplink command now contains the $3 argument,
6868         * src/pic16/device.h,
6869         * src/pic16/device.c,: structure PIC_device is made public and
6870         renamed to PIC16_device, the same for variable Pics which is renamed
6871         to Pics16. Updated all references to them.
6872         * src/pic16/glue.c (pic16glue): corrected bug with code
6873         initialization which bypassed the variable initializations block.
6874
6875         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6876         COMPILE_FLAGS and added the --nostdinc option
6877
6878 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6879
6880         * device/include/mc68hc908jb8.h: Register defs for another member
6881         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6882
6883 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6884
6885         Documenting changes from previous commits.
6886         * configure.in (version 1.56),
6887         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6888         when generating output files to configure the pic16 library,
6889         but now I've commented it out, since gputils aren't installed in the
6890         SF compile farm, so library won't compile
6891
6892         * device/lib/Makefile.in (version 1.56): initially I've added in
6893         target 'all' the prerequestive 'model-pic16' so it compiled the
6894         pic16 library, but now I've commented it out for the same reasons
6895         above,
6896         * added targets 'model-pic16' and 'objects-pic16' to compile the
6897         library
6898         * added target 'port-specific-objects-pic16' to handle the
6899         generated libraries and copy them into the build/ directory
6900         * added target 'clean-intermediate-pic16' to clean intermediate
6901         files into pic16 directory
6902         * in target 'installdirs' added line to create directory pic16 in
6903         the installation path
6904
6905         * device/include/Makefile.in (version 1.11): in target 'install'
6906         added lines to copy all header files to installation path,
6907         * in target 'installdirs' added line create directory for pic16
6908         headers in the installation path
6909
6910 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6911
6912         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6913          a function call
6914
6915 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6916
6917         * configure,
6918         * device/lib/configure.in,
6919         * device/lib/configure: fixed for autoconf 2.57
6920
6921 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6922
6923         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6924         option so that it actually works. Made it specific to the z80, since
6925         the gbz80 doesn't have these kinds of I/O ports.
6926
6927 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6928
6929         * device/include/z180.h,
6930         * device/lib/_memcpy.c,
6931         * device/lib/_memmove.c,
6932         * device/lib/_mulint.c,
6933         * device/lib/ser_ir.c,
6934         * device/lib/ser_ir_cts_rts.c,
6935         * device/lib/_strcmp.c,
6936         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6937         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6938         portmode; added deprecation warning for bank= and protmode= forms.
6939         Also, guard against buffer overflow.
6940         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6941
6942 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6943
6944         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6945         changed interrupt vector table generation to only emit declared vectors.
6946         * device/include/Makefile.in: added missing backslash
6947         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6948
6949 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6950
6951         Mainly changes to support compilation of the device libraries
6952         * src/pic16/device.c: stack is allocated via symbol and not
6953         via literal number. The symbol is placed in the corresponding
6954         position of the data ram
6955         * (pic16_dump_section): relocatable and absolute uninitialized
6956         data are now emitted in sorted order to reduce section naming,
6957         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6958         weren't marked as being in the access bank,
6959
6960 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6961
6962         Added portion of GNU PIC Library under the directory
6963         device/include/pic16 and device/lib/pic16. These files
6964         contain the declarations of SFRs for the PIC18Fxx2 devices.
6965         The directory is initialized via configure from toplevel.
6966
6967 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6968
6969         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6970         the spilllocations to be compared correctly
6971
6972 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6973
6974         * src/SDCCast.c (decorateType): fixed bug introduced today
6975
6976 2004-01-12  Borut Razem <borut.razem AT siol.net>
6977
6978         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6979         doc/sdccman.lyx: upper case pragmas are deprecated
6980
6981 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6982
6983         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6984         in simpler and even better code
6985
6986 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6987
6988         * src/SDCCicode.c (operandOperation): fixed bug #874819
6989         * src/SDCCast.c (decorateType): fixed
6990         char foo (unsigned long ul) { return ul > 0; }
6991
6992 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6993
6994         * doc/sdccman.lyx: Moved and added some sections, small changes
6995         all over. Telling LaTeX to be less strict with word spacing
6996         to better keep the right margin. Changed some notes about
6997         maintainance of the ports in section 3.2.1 - is it OK like this?
6998
6999 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7000
7001         SDCC source changes:
7002         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7003         convilong): modified to inform the pic16 port that builtin functions
7004         are external
7005
7006         PIC16 PORT specific changes:
7007         * src/pic16/device.c pic16_dump_equates() added,
7008         processor registers declared internally by the port are emitted in
7009         the translation as equates,
7010         * src/pic16/gen.c: inline code is passed unprocessed to the
7011         translation,
7012         * (pic16_popGetLit2): fnuction modified to take second operand as
7013         pCodeOp pointer and not as literal,
7014         * (popRegFromIdx): prefixed with pic16_,
7015         * (pic16_popCombine2): modified to receive already allocated pCode
7016         operands,
7017         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7018         * (genFunction): initializes local stack frame and pushes on stack
7019         all the registers used by this function,
7020         * (genEndFunction): restores all registers from stack and restores
7021         stack frame,
7022         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7023         improvements,
7024         * (pic16glue): changed the program startup sequence,
7025         * added new dbName code 'A' for functions placed in absolute section
7026         * src/pic16/main.c: added function attribute _naked,
7027         * added pragma 'code' to place a fnuction at an absolute address,
7028         * added command line arguments --debug-ralloc and --pcode-verbose,
7029         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7030         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7031         * (pic16_newpCodeOpLit2): modified to take the second operand as
7032         pCodeOp pointer,
7033         * (pic16_printpBlock): modified to emit each function in a separate
7034         section,
7035         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7036         UPPER for immediate operands,
7037         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7038         instruction,
7039         * src/pic16/peeph.def: all peepholes with movff are commented out,
7040         because there is a problem in the pcode peep optimizer,
7041         * src/pic16/ralloc.c: the register allocator can now reuse local
7042         function symbols for another function. This saves register usage.
7043         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7044
7045         Added file src/pic16/NOTES with information about program writing on
7046         the current port version.
7047
7048 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7049
7050         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7051         and peephole 252 (array access)
7052
7053 2004-01-09  Borut Razem <borut.razem AT siol.net>
7054
7055         * src/SDCCmain.c : fixed #872250: -l command line defined library
7056           files are scanned before standard library files
7057
7058 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7059
7060         * src/SDCCast.c (decorateType): fixed bug #874046
7061
7062 2004-01-09  Borut Razem <borut.razem AT siol.net>
7063
7064         * support/scripts/sdcc.nsi: remove previous installation
7065
7066 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7067
7068         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7069         bytes for last interrupt vector (mcs51)
7070         * sdcc.spec: fixed typo
7071
7072 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7073
7074         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7075         gen51Code): more efficient parameter receive for --model-large
7076         ("bug" #845294)
7077
7078 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7079
7080         * src/ds390/main.c,
7081         * src/z80/main.c: added missed needLinkerScript flags (more than
7082         one port structure defined in these file)
7083         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7084         bug #795325
7085
7086 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7087
7088         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7089         * src/port.h: added flag needLinkerScript in port->linker
7090         structure to inform whether to create a .lnk file or not,
7091         * src/avr/main.c,
7092         * src/ds390/main.c,
7093         * src/hc08/main.c,
7094         * src/mcs51/main.c,
7095         * src/pic/main.c,
7096         * src/pic16/main.c,
7097         * src/xa51/main.c,
7098         * src/z80/main.c: changed appropriately to configure
7099         needLinkerScript flag
7100         * src/pic/gen.c,
7101         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7102         * src/pic/glue.c: added variable udata_section_name to
7103         override default uninitialized data segment definition for
7104         devices only with SHAREBANK memory (reported from Erik Epetrich)
7105         * (pic14emitOverlay): modified to emit a commented overlay segment
7106         directive when no overlay data exist
7107         * (picglue): modified to emit uninitialized data segment
7108         according to udata_section_name
7109         * src/pic/main.c (_pic14_parseOptions): added command line
7110         options --udata-section-name=[name] to override default
7111         udata definition name
7112         * modified _linkCmd and _asmCmd to include compiler passed
7113         arguments via -W option
7114         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7115         object file from '.rel' to '.o' in port->linker structure,
7116         changed size of fptr from 2 to 3 in port structure
7117
7118 2004-01-07  Borut Razem <borut.razem AT siol.net>
7119
7120         * support/scripts/sdcc.nsi: update PATH
7121         * support/scripts/sdcc.ico: craeted
7122
7123 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7124
7125         * device/include/Makefile.in: fix install
7126         * doc/Makefile: fix install
7127
7128 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7129
7130         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7131         in bug #860505
7132         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7133         how the function variable allocation summary is displayed; also
7134         include information about variables allocated to the overlay
7135         segment
7136
7137 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7138
7139         * as/mcs51/lkmain.c: Help about -Y option
7140         * as/mcs51/lkarea.c: Fixed gcc warnings
7141
7142 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7143
7144         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7145         fixed warning
7146         * support/valdiag/tests/overflow.c: added
7147         * src/SDCCast.c (decorateType),
7148         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7149         LEFT_OP (left shift)
7150
7151 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7152
7153         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7154         (default behaviour).
7155
7156 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7157
7158         A python script to validate compiler diagnostic messages. It can be
7159         used to verify that sdcc complains about bad c source code and
7160         gives a good location of the error.
7161         * support/valdiag/Makefile,
7162         * support/valdiag/valdiag.py,
7163         * support/valdiag/tests/*
7164
7165 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7166
7167         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7168         * src/SDCCsymt.c (newEnumType),
7169         * src/SDCCsymt.h
7170         * support/Util/SDCCerr.c,
7171         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7172         enum related bugs.
7173         * support/regression/tests/enum.c: added test for enum values that
7174         require at least 2 bytes of storage.
7175
7176 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7177
7178         * src/common.h: added ifndef/define/endif macros
7179         around the header file.
7180         Bug reported from Jesus Calvino-Fraga
7181
7182 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7183
7184         * sdcc.spec: updated
7185         * device/include/Makefile.in: don't install CVS directories
7186         * device/lib/Makefile.in: added removal of CVS directories after install
7187         * doc/Makefile: fixed install, added local_icons
7188         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7189         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7190         * src/ds390/gen.c (genRightShift): fixed bug #870788
7191         * src/SDCCast.c (decorateType): fixed bug #870781
7192
7193 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7194
7195         PIC16 port related changes:
7196         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7197         added variable stackPos,
7198
7199         * gen.c: genCall, assignResultValue: added support for
7200         pushing/retrieving function parameters to/from stack,
7201         genFunction,genEndFunction: setup stack frame for the
7202         generated function,
7203         genAddrOf: will be changed according to bug 863624
7204
7205         * added files genutils.c and genutils.h which contain gen*
7206         debugged and optimised functions extracted from gen.c
7207
7208         * glue.c: added variable 'externs' which holds extern symbols,
7209         pic16emitRegularMap: is modified to properly handle relocatable
7210          symbols under the new scheme,
7211         pic16createInterruptVect: is modified
7212         pic16printPublics: is modified to emit 'global' assembler directives,
7213         added pic16_printExterns to print extern symbols,
7214         pic16glue: initializes stack/frame pointer in the beginning of
7215         the assembly output. Temporary hack, will be corrected later,
7216         because gplink yet does not support stack and SDCC does not
7217         yet support a type of crt0.o object to create the final binary.
7218
7219         * Removed many lines that contain 8051 legacy code.
7220         * The code is finally placed under a 'code' directive.
7221         * Added port specific options.
7222
7223         * _process_pragma: simplified since now we do not need *special*
7224         include file to define SFR registers. But a separate header
7225         will be needed. This will be developed later.
7226         * _pic16_parseOptions: added, parses port specific options:
7227         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7228         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7229         --preplace-udata-with=
7230
7231         * _pic16_setDefaultOptions: modified to initialize section names,
7232         but hack is temporarly out of order since it needs improvement.
7233         * _pic16_genAssemblerPreamble: configuration words are emitted by
7234         their address instead of their name. This part is incomplete and
7235         supports only the 18Fxx2 devices. Other devices will emit an error
7236         during assembly since they do not contain the same set of config
7237         registers
7238         * _pic16_genIVT: is modified,
7239
7240         * pcode.c: added definitions for some hardware registers that are needed
7241         for stack support
7242         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7243         All PCI entries are updated. Now LFSR is supported.
7244         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7245         * added pic16_newpCodeOpLit2 to support instructions with
7246         two literal arguments
7247         * pic16_pCode2str: corrected code that emits assembler instructions
7248         with two literal operands and those that have an access bit modifier
7249         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7250         this fixes a bug which caused some labels to be lost, when an
7251         assembler directive was added, i.e. banksel,
7252         * pic16_FixRegisterBanking: improved logic that causes the insertion
7253         of bank switching,
7254         * InlineFunction: functions that are called once, are not any more
7255         inlined. This can be a port option in the future,
7256
7257         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7258
7259         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7260         hold the corresponding uninitialized symbols,
7261         * pic16_allocProcessorRegister: registers have explicit marked the
7262         accessBank field,
7263         * pic16_allocInternalRegister: registers are explicit marked as
7264         not used,
7265         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7266         processing list, so bit registers were lost,
7267         *
7268
7269         * ralloc.h: added field 'accessBank' and original symbol operand
7270         in register definition,
7271         * removed the field isMapped from register definition,
7272
7273         ** Several functions have been removed from various sources:
7274         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7275         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7276         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7277         pic16_assignRelocatableRegisters
7278
7279         ** others have been introduced:
7280         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7281         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7282
7283 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7284
7285         * support/scripts/inc2h.pl: changed definition of BIT_AT
7286         to emit 'sbit at' instead of 'bit at'. This was a request.
7287
7288         PIC16 port related preliminary changes:
7289         * gen.c: prefixed function popRegFromString with
7290         pic16_ and all references to it corrected
7291         * pcode.c: all pic16_pc_* hardware registers prefixed
7292         with underscore (_),
7293         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7294         * ralloc.c: newReg(): when register is REG_SFR then
7295         set address to rIdx,
7296         pic16_allocProcessorRegister(): marks register wasUsed=0
7297         pic16_writeUsedRegs(): added a call to assign processor
7298         registers via pic16_assignFixedRegisters
7299
7300 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7301
7302         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7303         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7304         variables in unused register banks.  Also the SSEG is placed
7305         wherever there is enough space for it, and IDATA can be anywhere
7306         in internal RAM.  For now compile using -Wl-Y[stack_size].
7307         The mem file is different for this option as well, since it
7308         makes no sense of talking about DSEG lenght.
7309
7310 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7311
7312         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7313         in certain cases, e.g. when ROM assignment, patch provided
7314         from Albert den Haan.
7315
7316 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7317
7318         Many signedness and type propagation fixes:
7319         * src/SDCCicode.c: made geniCodeCast() static
7320         replaced SPEC_ by IS_ (cosmetic)
7321         (operandOperation): fixed div and mod operation
7322         (usualBinaryConversions): added support for promotion of char
7323         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7324         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7325         (geniCodeAdd): an array index will stay unsigned, even if promoted
7326         from char to int
7327         (geniCodeArray): ditto
7328         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7329         * src/SDCCsymt.c (computeType): added more support for char;
7330         promotion of char is selectable by promoteCharToInt, fixed signedness
7331         for all cases
7332         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7333         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7334         * src/SDCCval (val*): replaced signedness calculation by
7335         computeType()
7336         rearranged if-branches (cosmetic)
7337         (valShift): added warning W_SHIFT_CHANGED
7338         (valCompare): fixed problem with different types
7339         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7340         * support/regression/tests/literalop.c: added many cases
7341         * support/regression/tests/ast_constant_folding.c: changed finally to
7342         'unsigned int'
7343         * .version: new year, new version: 2.3.7
7344         * src/SDCCmain.c (main): applied patch #866468
7345         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7346         provided by Scott Bronson
7347         * doc/sdccman.lyx: updated documentation for sdcdb
7348         updated and added chapter tips
7349
7350 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7351
7352         * src/SDCCsymt.h: missing from yesterday's commits
7353
7354 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7355
7356         * src/SDCC.y (struct_or_union_specifier),
7357         * support/Util/SDCCerr.c,
7358         * support/Util/SDCCerr.h: verify that struct & union tags are used
7359         as declared.
7360
7361 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7362
7363         * src/SDCCglobl.h: missing from yesterday's commits
7364
7365 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7366
7367         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7368         sft_attributes, struct_declaration, parameter_declaration,
7369         type_name, start_block, declaration_list),
7370         * src/SDCC.lex (check_type): support redefinition of typedef names
7371
7372 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7373
7374         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7375         aligned xdata arrays. Erik helped me with the if clause.
7376
7377 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7378
7379         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7380         warning
7381
7382 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7383
7384         * src/SDCCast.h,
7385         * src/SDCCast.c (newAst_),
7386         * src/SDCCicode.h,
7387         * src/SDCCicode.c (ast2iCode, newiCode),
7388         * src/SDCCglobl.h,
7389         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7390         expr, statement, expression_statement, selection_statement,
7391         iteration_statement, expr_opt, jump_statement): foundation for tracking
7392         sequence points
7393         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7394         point code too)
7395
7396 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7397
7398         * support/Util/SDCCerr.c,
7399         * src/SDCCast.h,
7400         * src/SDCCast.c (createCase, createDefault, decorateType),
7401         * src/SDCClabel.c (labelUnreach),
7402         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7403         to error messages.
7404         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7405         (with thanks to Stas Sergeev)
7406         * device/include/time.h,
7407         * device/lib/time.c (CheckTime): suppress unreachable code warning
7408
7409 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7410
7411         * src/SDCCast.c (createIvalCharPtr),
7412         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7413         bug #753752)
7414         * support/regression/tests/nullstring.c: tests for these two bugs
7415
7416 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7417
7418         * support/Util/SDCCerr.h,
7419         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7420         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7421         about storage class and 'at' used inside struct or union
7422         * src/SDCCBBlock.c (iCodeFromeBBlock),
7423         * src/SDCCcse.c (ifxOptimize),
7424         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7425         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7426         printIval, emitStaticSeg, emitOverlay),
7427         * src/SDCClabel.c (deleteIfx),
7428         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7429         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7430         gatherAutoInit, processParms),
7431         * support/Util/SDCCerr.h,
7432         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7433         reporting for post-parse errors.
7434
7435 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7436
7437         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7438         implicit casts via union; they don't work on big endian systems
7439         (possible fix for bug #861138)
7440
7441 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7442
7443         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7444         * src/mcs51/main.c: fixed the fix for bug #737001
7445
7446 2003-12-15  Borut Razem <borut.razem AT siol.net>
7447
7448         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7449
7450 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7451
7452         * support/makebin/makebin.c: put output in binary mode
7453
7454 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7455
7456         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7457         xdata and data memory on startup. Set the environment variable
7458         SDCC_NOGENRAMCLEAR to disable this.
7459         * src/mcs51/peephole.def,
7460         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7461         (allows non-interrupt and interrupt code to safely compete for a resource
7462         without the non-interrupt code having to disable interrupts)
7463
7464 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7465
7466         * src/SDCCicode.c (geniCodeAdd),
7467         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7468         with valFromType if type might be a pointer and host is big endian).
7469         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7470         types, not just integer types.
7471         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7472         multiply defined with mismatching "at" address.
7473
7474 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7475
7476         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7477         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7478         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7479         with embedded nulls (fixed bug #753752)
7480
7481 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7482
7483         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7484         Apparently this did not see much testing (endless loop)
7485
7486 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7487
7488         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7489
7490 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7491
7492         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7493         gracefully handle NULL memmap pointers
7494
7495 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7496
7497         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7498         instead of deleting the iCode when an operand is volatile
7499         * src/z80/gen.c (genDummyRead),
7500         * src/mcs51/gen.c (genDummyRead),
7501         * src/ds390/gen.c (genDummyRead),
7502         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7503         not just IC_RIGHT
7504         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7505         * src/SDCC.y: fixed bug #850420
7506
7507 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7508
7509         Applied z80 i/o port patch from Peter Townson and fixed some operators
7510         to better handle operands in A register.
7511         * device/include/z180.h
7512         * src/SDCC.y
7513         * src/SDCCglue.c
7514         * src/z80/gen.c
7515         * src/z80/gen.h
7516         * src/z80/main.c
7517         * src/z80/peeph-z80.def
7518         * src/z80/peeph.def
7519         * src/z80/z80.h
7520
7521 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7522
7523         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7524
7525 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7526
7527         * device/lib/hc08/_mullong.c: Removed extra #endif
7528
7529 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7530
7531         * sim/ucsim/hc08.src/inst.cc,
7532         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7533         carries from x to h
7534         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7535         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7536         * device/include/stdarg.h: fixed varargs for hc08
7537         * device/lib/Makefile.in,
7538         * device/lib/hc08/Makefile,
7539         * device/lib/hc08/_mulint.c,
7540         * device/lib/hc08/_mullong.c: fixed some endian problems
7541
7542 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7543
7544         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7545         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7546         * device/lib/_gptrget.c,
7547         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7548
7549 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7550
7551         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7552         * src/SDCCast.c (astErrors): fixed bug #846007
7553         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7554
7555 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7556
7557         * src/SDCCast.c (decorateType): disabled a transformation I added in
7558         revision 1.188 (access to fields of a structure at an absolute address);
7559         it breaks with bitfields, extern declarations, and gcse analysis.
7560         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7561         could be assigned through a pointer, so don't complain.
7562         * src/SDCCast.c (astErrors),
7563         * src/SDCCast.h,
7564         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7565
7566 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7567
7568         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7569         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7570         output of __config directives, since gpasm now supports them
7571         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7572         pre-processor macro, i.e. -DMCU=p18f452
7573         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7574         and modified to handle 'cast' icode similarly to '=' icode
7575         * src/pic16/device.h (typedef struct PIC_device): added field
7576         'extMIface' to indicate that chip has external memory interface
7577         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7578         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7579         18F8720
7580
7581 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7582
7583         * src/SDCC.y (pointer): fixed bug #846006
7584         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7585         * src/SDCCast.c (decorateType): fixed bug #846009
7586         * src/ds390/peeph.def,
7587         * src/ds390/gen.c (genAnd, genOr),
7588         * src/mcs51/peeph.def,
7589         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7590
7591 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7592
7593         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7594         * src/SDCCdflow.c
7595         * src/SDCCcse.c
7596         * src/SDCCcse.h
7597         * src/SDCCBBlock.h
7598         * src/SDCCBBlock.c
7599
7600 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7601
7602         fixed bug #845089
7603         * src/SDCCbitv.h,
7604         * src/SDCCbitv.c: added function to free a bitvector
7605         * src/SDCClrange.h,
7606         * src/SDCClrange.c: added function to recompute the liveranges
7607         * src/avr/ralloc.c,
7608         * src/ds390/ralloc.c,
7609         * src/hc08/ralloc.c,
7610         * src/mcs51/ralloc.c,
7611         * src/pic/ralloc.c,
7612         * src/pic16/ralloc.c,
7613         * src/xa51/ralloc.c,
7614         * src/z80/ralloc.c: recompute the liveranges after register packing
7615
7616 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7617
7618         * src/SDCCloop.c (newInduction): fixed bug #845630
7619
7620 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7621
7622         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7623         inadvertantly left behind from my 2003-11-12 change
7624
7625 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7626
7627         Updated headers I neglected to commit yesterday.
7628         * src/SDCClrange.h,
7629         * src/SDCCicode.h
7630
7631 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7632
7633         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7634         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7635         * src/SDCCopt.c (eBBlockFromiCode),
7636         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7637         the creation of the key hash table from the sequencing so it can be used
7638         earlier (for some GCSE bug fixes still pending)
7639
7640 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7641
7642         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7643         * support/regression/tests/addsub.c: testing genPlus shortcut
7644
7645 2003-11-15  Borut Razem <borut.razem AT siol.net>
7646
7647         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7648
7649 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7650
7651         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7652         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7653         ordering is immaterial.
7654         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7655
7656 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7657
7658         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7659         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7660         (SIGSEV) of bug #840381
7661         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7662         unlink new file before rename if new and old filenames are the same)
7663
7664 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7665
7666         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7667         uninitialized variables) for the mcs51. Set environment variable
7668         SDCC_GENRAMCLEAR to test.
7669         xdata initialization slightly shorter
7670
7671 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7672
7673         * src/SDCCsymt.h,
7674         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7675         #838241 & 780691 (basicly the same bug)
7676         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7677         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7678
7679 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7680
7681         * src/SDCCmain.c (linkEdit): "fix" #834252
7682
7683 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7684
7685         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7686         * src/SDCCast.h,
7687         * src/SDCC.y: fixed bug #819403
7688
7689 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7690
7691         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7692         the reentrant attribute.
7693         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7694         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7695         simulation
7696         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7697         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7698         erroneously reduced to a literal.
7699         * src/hc08/ralloc.c (packRegisters, rematStr),
7700         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7701         some cases
7702
7703 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7704
7705         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7706         * doc/sdccman.lyx: changed from 'article' to 'book'
7707         * doc/Makefile: readded test_suite_spec and cdbfileformat
7708
7709 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7710
7711         * device/include/stdlib.h: include malloc.h to comply with ANSI
7712         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7713
7714 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7715
7716         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7717         * doc/clean.mk: also remove *.out files
7718         * doc/sdccman.lyx: some additions, larger top/bottom margins
7719
7720 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7721
7722         * src/SDCC.y: fixed bug #837365
7723         * support/regression/tests/bitopcse.c
7724         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7725         a symbol (might be valop instead)
7726         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7727         * device/lib/clean.mk: added hc08 to the cleaning list
7728
7729 2003-11-04  Borut Razem <borut.razem AT siol.net>
7730
7731         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7732           made 2003-11-04
7733         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7734           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7735           malloc is declared in standard stdlib.h
7736
7737 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7738
7739         * device/lib/hc08/Makefile: need to clean .rel not .o files
7740         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7741
7742 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7743
7744         * src/port.h,
7745         * src/hc08/main.c,
7746         * src/mcs51/main.c,
7747         * src/ds390/main.c,
7748         * src/z80/main.c,
7749         * src/avr/main.c,
7750         * src/pic/main.c,
7751         * src/pic16/main.c,
7752         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7753         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7754         tests (which uses the port's oclsExpense function)
7755         * src/SDCC.y,
7756         * src/SDCCast.c,
7757         * src/SDCCicode.c,
7758         * src/hc08/gen.c,
7759         * src/ds390/gen.c,
7760         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7761
7762 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7763
7764         * src/SDCCcse.c (ifxOptimize),
7765         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7766         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7767         deleting the IFX iCode.
7768         * src/hc08/ralloc.c: reduced unneeded slocs
7769         * src/hc08/gen.c: fixed bug in asmopToBoolean
7770
7771 2003-11-04  Borut Razem <borut.razem AT siol.net>
7772
7773         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7774           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7775           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7776           transferred to configure
7777
7778 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7779
7780         Use headers defined in the C[++] standards:
7781         * sim/ucsim/gui.src/serio.src/fileio.cc
7782         * sim/ucsim/gui.src/serio.src/frontend.cc
7783         * sim/ucsim/gui.src/serio.src/main.cc
7784         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7785         * support/Util/NewAlloc.c
7786         * as/hc08/lklibr.c
7787         * as/mcs51/lklibr.c
7788         * as/z80/aslist.c
7789         * as/z80/assym.c
7790
7791 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7792
7793         * Added MSVC projects for hc08 assembler and linker:
7794         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7795         /as/hc08/link_hc08.dsp
7796
7797 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7798
7799         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7800
7801 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7802
7803         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7804
7805 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7806
7807         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7808
7809 2003-10-31  Borut Razem <borut.razem AT siol.net>
7810
7811         * support/cpp2/cpplib.h,
7812           support/cpp2/cpplib.c,
7813           support/cpp2/cpplex.c,
7814           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7815           to switch _asm block preprocessing on / off. Default is
7816           #pragma preproc_asm +
7817
7818 2003-10-31  Borut Razem <borut.razem AT siol.net>
7819
7820         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7821           when outputting comment blocks (when executed with -C option) and
7822           _asm (SDCPP specific) blocks
7823
7824 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7825
7826         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7827
7828 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7829
7830         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7831
7832 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7833
7834         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7835         * src/SDCCast.c (decorateType): fixed bug #832664
7836
7837 2003-10-31  Borut Razem <borut.razem AT siol.net>
7838
7839         * support\cpp2\cpplex.c: fixed for SDCPP:
7840           comments(when executed with -C option) and _asm blocks
7841           were included even if they where in skipped #if block.
7842           Applied solution from GCC cpp 3.3.2
7843
7844 2003-10-31  Borut Razem <borut.razem AT siol.net>
7845
7846         * src/SDCC.lex: sdcc now understands both formats:
7847           '# <line_number> <file_name>' and
7848           '#line <line_number> <file_name>'
7849         * support/cpp2/cppmain.c: sdcpp now generates the standard
7850           '# <line_number> <file_name>' instead of former
7851           '#line <line_number> <file_name>'
7852
7853 2003-10-30  Borut Razem <borut.razem AT siol.net>
7854
7855         * support/cpp2/cpphash.h,
7856         * support/cpp2/cpplib.h
7857         * support/cpp2/cpplex.c,
7858         * support/cpp2/cppmain.c,
7859         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7860
7861 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7862
7863         Fixed a number of problems revealed by bug #827883.
7864         * src/SDCCloop.c (loopInvariants): Spill location of the
7865         result operand should be recomputed if extracted from
7866         a loop. Also, don't extract assignments of an iTemp
7867         from a literal.
7868         * src/SDCCast.c (isConformingBody): loop reversal should
7869         not occur if the control variable is involved with a
7870         relational operator.
7871
7872 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7873
7874         * .version: bumped to 2.3.6 to reflect the big improvements
7875         made by Erik and Klaus. Thanks!
7876
7877 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7878
7879         Replaced the livrange code.
7880         * src/SDCClrange.c: added new LR code
7881         * src/SDCCloop.c,
7882         * src/SDCCBBlock.h: removed remainig parts from old LR code
7883         * src/ds390/ralloc.c,
7884         * src/ds390/gen.c: minor fixes to make it work with new code
7885
7886 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7887
7888         * as/hc08/asm.h,
7889         * as/hc08/lkrloc.c,
7890         * src/hc08/gen.c,
7891         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7892         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7893         (tweaked fix for bug #818696)
7894
7895 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7896
7897         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7898
7899 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7900
7901         * src/SDCCmain.c,
7902         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7903         * src/mcs51/gen.c (gencjneshort),
7904         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7905         more efficient (per Scott Bronson's suggestion)
7906
7907 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7908
7909         Extended the semantics of the critical keyword to include
7910         individual statements. See RFE #827755 and #799831
7911         * src/SDCC.y
7912         * src/SDCCicode.c
7913         * src/SDCCopt.c
7914         * src/SDCCast.c
7915         * support/Util/SDCCerr.c
7916         * support/Util/SDCCerr.h
7917         * src/mcs51/gen.c
7918         * src/ds390/gen.c
7919         * src/hc08/gen.c
7920
7921 2003-10-19  Borut Razem <borut.razem AT siol.net>
7922
7923         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7924
7925 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7926
7927         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7928         Fixed bug #818696
7929         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7930         and predecrement operand is displayed
7931
7932 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7933
7934         * src/SDCCval.c (valMinus): fixed bug #826041
7935
7936 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7937
7938         Some hc08 related updates that I missed earlier
7939         * sim/ucsim/stypes.h
7940         * support/regression/ports/hc08/spec.mk
7941
7942 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7943
7944         New target "hc08" for the Motorola 68hc08 family of micros
7945
7946         * configure
7947         * configure.in
7948         * Makefile
7949         * src/hc08/*
7950         * src/SDCCmain.c
7951         * src/port.h
7952         * sim/ucsim/hc08.src/*
7953         * sim/ucsim/configure.in
7954         * src/ucsim/configure
7955         * sim/ucsim/packages_in.mk
7956         * as/hc08/*
7957         * as/Makefile
7958         * device/include/mc68hc908qy.h
7959         * device/lib/hc08/*
7960         * device/lib/Makefile.in
7961         * support/regression/ports/hc08/*
7962         * support/regression/Makefile
7963
7964 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7965
7966         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7967         regression test
7968         * src/ds390/gen.c (genCast): fixed bug #821957
7969
7970 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7971
7972         * device/lib/logf.c: "fixed" overlay bug
7973         * support/regression/ports/host/spec.mk: added m library
7974         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7975         * support/regression/tests/float_trans: added (for Eric)
7976
7977 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7978
7979         * src/mcs51/gen.c (genCpl): fixed bug
7980         http://sf.net/mailarchive/message.php?msg_id=6263915
7981
7982 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7983
7984         * src/SDCCast.c (decorateType): added extended constant folding
7985         * src/SDCCsymt.c (computeType): cleanup
7986         * src/SDCCval.c (valShift): minor optimization
7987         * support/regression/tests/ast_constant_folding.c: added
7988
7989 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7990
7991         * src/SDCCmain.c: removed some unintended changes
7992
7993 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7994
7995         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7996         * src/z80/gen.c: fixed part of bug #817589
7997         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7998
7999 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8000
8001         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8002         * src/SDCCcflow.c
8003         * src/SDCCcse.c
8004         * src/SDCCdflow.c
8005         * src/SDCClabel.c
8006         * src/SDCClrange.c
8007         * src/SDCCmem.c
8008         * src/SDCCopt.c
8009         * src/SDCCpeeph.c
8010         * src/SDCCset.c
8011         * src/avr/ralloc.c
8012         * src/ds390/ralloc.c
8013         * src/izt/ralloc.c
8014         * src/mcs51/ralloc.c
8015         * src/pic/ralloc.c
8016         * src/pic16/ralloc.c
8017         * src/xa51/ralloc.c
8018         * src/z80/ralloc.c
8019         * src/z80/gen.c: removed unused label "release:"
8020
8021 2003-10-06  Borut Razem <borut.razem AT siol.net>
8022
8023         * src/SDCC.lex: removed definition of unused variables
8024           save_optimize and save_options
8025
8026 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8027
8028         * clean.mk: removed '=' in "-maxdepth=1"
8029         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8030         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8031
8032 2003-10-06  Borut Razem <borut.razem AT siol.net>
8033
8034         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8035           my_unput() replaced by unput()
8036
8037 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8038
8039         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8040         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8041         type-punned pointer will break strict-aliasing rules"
8042         Old LR behaviour is again default; Klaus' LR can be choosen by
8043         defining the environment variable LRKLAUS
8044         * src/SDCCBBlock.h
8045         * src/SDCCloop.c
8046         * src/SDCClrange.c
8047         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8048         * clean.mk: fixed removal of files in bin/CVS/
8049         * device/lib/clean.mk: fixed removal of directories small and large
8050         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8051         * src/SDCCicode.c,
8052         * src/SDCCval.c: removed superflous test for pedantic
8053
8054 2003-10-05  Borut Razem <borut.razem AT siol.net>
8055
8056         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8057           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8058           message "unmatched #pragma SAVE and #pragma RESTORE"
8059
8060 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8061
8062         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8063           assembly, critical functions, atomic, nojtbound)
8064
8065 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8066
8067         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8068         * src/SDCCBBlock.h
8069         * src/SDCCloop.c
8070         * src/SDCCloop.h
8071         * src/SDCClrange.c
8072
8073 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8074
8075         * src/z80/gen.h,
8076         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8077         * src/mcs51/gen.h
8078         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8079         * src/ds390/gen.h
8080         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8081         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8082         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8083
8084 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8085
8086         * src/z80/gen.c (genRet): fixed bug #524753
8087         * src/z80/gen.c (genCast): fixed internal error on cast from
8088         pointer to long
8089         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8090         fix for bug #477835 to the z80
8091         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8092         for tracking iCodes in the peephole optimizer for z80
8093
8094 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8095
8096         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8097         the other part of bug #814548
8098         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8099
8100 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8101
8102         * src/SDCCcse.c: fixed part of bug #814548
8103
8104 2003-09-28  Borut Razem <borut.razem AT siol.net>
8105
8106         * src/asm.c: rewrite of printILine() to use temporary file instead
8107           a pipe
8108         * src/xa51/main.c: commented out declaration of int rewinds
8109
8110 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8111
8112         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8113
8114 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8115
8116         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8117         * src/asm.c (printILine): Fixed bug #811015
8118
8119 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8120
8121         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8122         freeing.
8123
8124 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8125
8126         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8127         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8128         to correctly handle general case of AOP_PAIRPTR
8129         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8130
8131 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8132
8133         * src/mcs51/ralloc.c (fillGaps),
8134         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8135         register positioning bug)
8136
8137 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8138
8139         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8140
8141 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8142
8143         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8144         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8145         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8146         (ralloc doesn't intentionally do this now, but perhaps later)
8147         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8148         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8149         register positioning bugs (Fixed bug #762602 and #795325)
8150         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8151         (Fixed bug #808779)
8152         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8153         lines that --i-code-in-asm generates
8154
8155 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8156
8157         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8158         trying to fclose a FILE* that was already closed.
8159
8160 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8161
8162         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8163         of const struct should be treated as if const themselves)
8164
8165 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8166
8167         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8168
8169 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8170
8171         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8172         Unix (/n) and DOS (/r/n) line terminations.
8173
8174 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8175
8176         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8177         bug #613775
8178
8179 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8180
8181         * src/mcs51/gen.c (genFunction, genEndFunction),
8182         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8183         and restore of EA so that stack offsets to parameters are
8184         correct when using both critical and reentrant/stack-auto.
8185         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8186         size (can be triggered in error if sloc is shared between
8187         different sized objects)
8188         * device/include/float.h: fixed macros to explicitly use
8189         unsigned long where needed
8190
8191 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8192
8193         Feature req. 799831: added code to allow nesting of critical functions
8194         * src/mcs51/gen.c (genFunction, genEndFunction)
8195         * src/ds390/gen.c (genFunction, genEndFunction)
8196
8197 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8198
8199         * src/SDCCsymt.c (sclsFromPtr),
8200         * src/SDCCsymt.h,
8201         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8202         support for standard C idiom of memory mapped variables; for
8203         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8204         to xdata int at 0x1234 tempvar = 1.
8205         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8206         provided by Akiya ISHIDA
8207
8208 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8209
8210         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8211         * src/SDCCval.c (constVal): added reduction from int to char
8212         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8213         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8214         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8215         to ignore the sign
8216         * support/regression/tests/shifts.c: fixed
8217
8218 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8219
8220         * src/z80/gen.c (genXor): Fixed bug #805445
8221
8222 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8223
8224         Fixed bug #621531 (const & volatile confusion in the type chain).
8225         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8226         refer to the const or volatile state of the pointer itself.
8227
8228         * src/SDCCast.c
8229         * src/SDCCglue.c
8230         * src/SDCCicode.c
8231         * src/SDCCsymt.c
8232         * src/SDCCval.c
8233         * src/SDCC.y
8234         * src/SDCCsymt.h
8235         * src/pic/gen.c
8236         * src/pic/ralloc.c
8237         * src/pic16/gen.c
8238         * src/pic16/ralloc.c
8239         * support/regression/tests/const.c
8240
8241 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8242
8243         When checking for duplicated modules, use absolute paths
8244         instead of relative paths.  Files changed:
8245
8246         * as/mcs51/lklib.c
8247         * link/z80/lklib.c
8248
8249 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8250
8251         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8252
8253 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8254
8255         * device/include/string.h: added size_t typedef, changed
8256         prototypes to use size_t, eliminated separate reentrant and
8257         non-reentrant declarations, added _memmove declaration
8258         * device/lib/_memcpy.c: changed to use size_t instead of int,
8259         changed /4 to >>2 to avoid division library call
8260         * device/lib/_memcmp.c,
8261         * device/lib/_memset.c,
8262         * device/lib/_strncat.c,
8263         * device/lib/_strncpy.c,
8264         * device/lib/_strncmp.c: changed to use size_t instead of int
8265         * device/lib/_memmove.c: new file (fixed bug #772294)
8266         * device/lib/Makefile.in: added _memmove.c
8267         * device/lib/z80/asm_strings.s: fixed bug #772290
8268         * support/regression/tests/bitfields.c: attempt to fix host assertion
8269         failure on amd64-unknown-linux2.2
8270
8271 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8272
8273         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8274         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8275         * as/z80/asmain.c (main): fixed bug #801766
8276
8277 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8278
8279         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8280         compilers
8281
8282 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8283
8284         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8285         reported in bug #800609
8286
8287 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8288
8289         * Top header beautifications in src/pic16 directory:
8290           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8291           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8292           pcoderegs.h, ralloc.c, ralloc.h
8293         * main.c: added top header and GPL license notice
8294         * pcode.c: fixed the if-conditional warning
8295
8296 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8297
8298         * device/lib/_mullong.c: replaced int by short for gcc
8299
8300 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8301
8302         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8303         and JUMPTABLE iCodes properly now (worked by accident before)
8304         * src/mcs51/gen.c (leftRightUseAcc),
8305         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8306         iCode properly now. Use getSize instead of nRegs since a & b
8307         aren't part of the nRegs tally.
8308
8309 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8310
8311         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8312         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8313           before instructions that use the _STATUS register
8314
8315 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8316
8317         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8318         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8319         fetching of the pointer
8320         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8321         copied from genNearPointerSet()
8322         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8323         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8324         If they pop r0/r1 they must be called in the opposite order than aopOp().
8325         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8326         (resp. --stack-auto), prepared for --xstack
8327
8328 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8329
8330         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8331
8332 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8333
8334         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8335         these ports have their own __sdcc_external_start()
8336
8337 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8338
8339         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8340         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8341         type for bits was changed. It resulted in bit variables becoming
8342         global, which is not permitted in PIC 14 assembly output.
8343
8344 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8345
8346         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8347
8348 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8349
8350         Z80 and MCS51 linkers complaint if a public symbol is defined
8351         in more than one library module:
8352
8353         * as/mcs51/lklib.c
8354         * link/z80/lklib.c
8355         * as/mcs51/Makefile.in
8356
8357 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8358
8359         A few small changes that speed up the peephole optimizer.
8360
8361         * src/SDCCpeeph.c
8362
8363 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8364
8365         Try to make the peephole optimizer smarter by maintaining
8366         an association between the assembly source code and the
8367         iCodes that originated them. Put this information to use
8368         with a new peephole rule condition "notVolatile" so that
8369         the rules can be aggressive yet still safe.
8370
8371         * src/SDCCpeeph.c
8372         * src/SDCCpeeph.h
8373         * src/mcs51/gen.c
8374         * src/mcs51/peeph.def
8375
8376 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8377
8378         Fixed bug #741761
8379
8380         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8381         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8382         if the left or right operand symbols have the accuse flag set.
8383
8384 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8385
8386         Changed the type of the result of the ! (NOT) operator to char;
8387         previously it returned the same type as the source. This allows
8388         us to eliminate all the genFloatNot functions (all of its target
8389         implementations were very buggy) since !float can use the same
8390         code as !long now.
8391
8392         * src/SDCCicode.c (ast2iCode): ! returns char
8393         * src/mcs51/gen.c (genNot, genNotFloat),
8394         * src/ds390/gen.c (genNot, genNotFloat),
8395         * src/z80/gen.c (genNot, genNotFloat),
8396         * src/pic/gen.c (genNot, genNotFloat),
8397         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8398
8399 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8400
8401         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8402         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8403            during interrupts. Ensure WSAVE is located at a shared bank address.
8404         2. Fixed page selection in some places
8405         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8406            the registers name strings.
8407         4. Fixed "signed / unsigned compare" compiler warnings.
8408         5. The PIC port manages its own allocation of the general purpose
8409            registers, but makes no attempt to reuse them. As a result when
8410            compiling it soon runs out of general purpose registers. Some
8411            additional code was added to the files pcode.c and device.c to walk
8412            through the function call tree and rename the registers so that they
8413            get reused.
8414
8415         * src/pic/device.c
8416         * src/pic/gen.c
8417         * src/pic/glue.c
8418         * src/pic/pcode.c
8419         * src/pic/pcode.h
8420         * src/pic/ralloc.c
8421         * src/pic/ralloc.h
8422         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8423         genPlus() & genMinus() when the result is the same as left or right
8424
8425 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8426
8427         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8428
8429 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8430
8431         Made bitfield a distinct type from bit so that bitfields
8432         convert as per ANSI C and bits retain their traditional
8433         boolean style behaviour. Implemented bitfield support in
8434         the z80 port.
8435
8436         * src/SDCCsymt.h,
8437         * src/SDCCsymt.c,
8438         * src/SDCCast.c,
8439         * src/cdbFile.c,
8440         * src/mcs51/gen.c,
8441         * src/ds390/gen.c: bit v bitfield split
8442         * src/z80/gen.c: New support for bitfields
8443         * support/regression/tests/bitfields.c: reenabled z80,
8444         added more tests
8445
8446 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8447
8448         Rules 246.x, 247.x relate to bitfields, the others speed up
8449         access to xdata mapped I/O devices.
8450
8451         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8452
8453 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8454
8455         Cleaned up genPackBits and genUnpackBits and added two helper
8456         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8457         for literal assignments in genPackBits (thanks to Frieder for
8458         reminding me).
8459
8460         * src/mcs51/gen.c
8461         * src/ds390/gen.c
8462
8463 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8464
8465         Fixed bug #748310 (pointer to function type mishandled when the
8466         function name is omitted). Also fixed a SIGSEGV when a function
8467         attribute (reentrant, etc) is used on a non-function or on a
8468         function but misplaced before the parameter list.
8469
8470         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8471         bug #748310
8472         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8473         * support/Util/SDCCerr.h,
8474         * support/Util/SDCCerr.c: Added func attr misuse error msg
8475
8476 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8477
8478         Fixed bug #787649 by anonymous
8479         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8480         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8481
8482 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8483
8484         Fixed numerous bitfield problems.
8485
8486         * src/SDCC.y: More bitfield related error checking
8487         * src/SDCCsymt.h,
8488         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8489         * support/Util/SDCCerr.h,
8490         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8491         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8492         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8493         * support/regression/tests/bitfields.c: tests added
8494
8495 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8496
8497         Made the constant following the "interrupt" keyword optional. If
8498         omitted, the function will not automatically be given an entry
8499         in the interrupt vector table (similar to #pragma NOIV, but
8500         less syntacticly kludgy). The interrupt number is also now
8501         range checked. Also fixed a bug in the high order bit example
8502         in the manual.
8503
8504         * src/SDCC.y
8505         * src/SDCCmem.c
8506         * src/SDCCglue.c
8507         * src/SDCCsymt.h
8508         * support/Util/SDCCerr.c
8509         * support/Util/SDCCerr.h
8510         * doc/sdccman.lyx
8511
8512 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8513
8514         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8515         * src/SDCCicode.c (operandOperation): rewritten some ops
8516         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8517         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8518         other type
8519         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8520         be re-activated by defining REDUCE_LITERALS)
8521         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8522         unsigned, but are signed by default
8523         * src/SDCCval.c (constVal): rearranged
8524         * src/SDCCval.c (valMod): preliminary fix
8525         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8526         * support/regression/literalop.c: added, work in progress
8527
8528 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8529
8530         Generate warnings for useless declarations like "char data;"
8531         that don't do what new users expect.
8532
8533         * src/SDCC.y
8534         * support/Util/SDCCerr.h
8535         * support/Util/SDCCerr.c
8536
8537 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8538
8539         * src/SDCCval.c (valMult): fix overflow detection of negative int
8540
8541 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8542
8543         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8544
8545         Changes to support big endian targets:
8546
8547         * src/ports.h
8548         * src/SDCCglue.c
8549         * src/avr/main.c
8550         * src/ds390/main.c
8551         * src/izt/i186.c
8552         * src/mcs51/main.c
8553         * src/pic/main.c
8554         * src/pic16/main.c
8555         * src/xa51/main.c
8556         * src/z80/main.c
8557
8558 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8559
8560         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8561         * device/lib/time.c: fixed warning "integer overflow in expression"
8562
8563 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8564
8565         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8566         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8567         constants are unsigned; added recognition of "u" flag for unsigned
8568         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8569         * src/SDCCval.c (valDiv, valMod): fixed signdness
8570         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8571         signedness of modulo, left and right shift
8572         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8573         * support/Util/SDCCerr.h: added warning W_INT_OVL
8574         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8575         * src/SDCCast.c (ast_print): improved output of constants
8576
8577 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8578
8579         Fixed some warnings when building with MSVC:
8580
8581         * as\mcs51\asdata.c
8582         * as\z80\asdata.c
8583         * as\mcs51\asm.h
8584         * as\z80\asm.h
8585         * link\z80\aslink.h
8586         * link\z80\lkdata.c
8587         * link\z80\lkeval.c
8588         * link\z80\lkgb.c
8589         * link\z80\lkihx.c
8590         * link\z80\lks19.c
8591         * link\z80\lksym.c
8592         * support\cpp2\cpplib.c
8593         * src\ds390\gen.c
8594         * src\mcs51\gen.c
8595
8596 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8597
8598         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8599
8600 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8601
8602         * support\librarian\clean.mk: Do not remove Makefile.
8603         * support\librarian\Makefile: added.
8604
8605 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8606
8607         Added librarian to MSVC build:
8608         * all.dsp
8609         * sdcc.dsw
8610         * support\librarian\librarian.dsp
8611
8612         'configure' not needed for librarian, removed:
8613         * support\librarian\configure
8614         * support\librarian\configure.in
8615         * support\librarian\config_in.h
8616         * support\librarian\Makefile.in
8617
8618         Hopefully these ones built the librarian and the rest of sdcc properly:
8619         * Makefile
8620         * Makefile.common.in
8621
8622         Messed up 'configure', so revert to previous version:
8623         * configure
8624         * configure.in
8625
8626 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8627
8628         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8629         there, while the mantissa of a double is "only" 53 bits wide.
8630
8631 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8632
8633         Adding sdcclib to the build.  MSVC project coming soon.
8634         Files added/changed:
8635
8636         * support\librarian\clean.mk
8637         * support\librarian\configure
8638         * support\librarian\configure.in
8639         * support\librarian\config_in.h
8640         * support\librarian\Makefile.bcc
8641         * support\librarian\Makefile.in
8642         * support\librarian\sdcclib.c
8643         * Makefile.bcc
8644         * Makefile
8645         * Makefile.common.in
8646         * configure
8647         * configure.in
8648
8649 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8650
8651         Linker now complaints if linked modules have conflicting options, for
8652         example, one compiled using --model-large and another one compiled with
8653         --model-small.  The following files were modified:
8654
8655         * as\mcs51\asdata.c
8656         * as\mcs51\aslink.h
8657         * as\mcs51\asm.h
8658         * as\mcs51\asmain.c
8659         * as\mcs51\asout.c
8660         * as\mcs51\i51pst.c
8661         * as\mcs51\lkdata.c
8662         * as\mcs51\lklibr.c
8663         * as\mcs51\lkmain.c
8664         * as\z80\asdata.c
8665         * as\z80\asm.h
8666         * as\z80\asmain.c
8667         * as\z80\asout.c
8668         * as\z80\z80pst.c
8669         * link\z80\aslink.h
8670         * link\z80\lkdata.c
8671         * link\z80\lklibr.c
8672         * link\z80\lkmain.c
8673         * src\SDCCglue.c
8674
8675 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8676
8677         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8678         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8679
8680 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8681
8682         * src/z80/mappings.i: fix _mul[us][int,long] entries
8683
8684 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8685
8686         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8687
8688 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8689
8690         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8691         * support/regression/tests/bitopcse.c: added
8692         fixed warning:
8693         * src/avr/gen.c:
8694         * src/pic/gen.c:
8695         * src/pic16/gen.c:
8696         * src/z80/gen.c:
8697         * src/xa51/gen.c:
8698
8699 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8700
8701         added support for new library format to z80, gbz80 linkers:
8702         *link/z80/aslink.h
8703         *link/z80/lklex.c
8704         *link/z80/lklib.c
8705         *link/z80/lklist.c
8706
8707 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8708
8709         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8710         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8711
8712 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8713
8714         added DUMMY_READ_VOLATILE:
8715         * src/SDCC.y:
8716         * src/avr/gen.c:
8717         * src/xa51/gen.c:
8718         * src/z80/gen.c:
8719         * src/pic/gen.c:
8720         * src/pic16/gen.c:
8721         * src/mcs51/gen.c:
8722         * src/ds390/gen.c:
8723         * src/SDCCcse.c (algebraicOpts): many improvements
8724         * src/SDCCcse.h: removed algebraicOpts()
8725         * src/SDCCicode.c (picDummyRead): added
8726
8727 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8728
8729         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8730         "Insufficient space in data memory".
8731
8732 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8733
8734         * src/mcs51/gen.c: fixed bug #771358
8735         * src/z80/gen.c: fixed bug #759087
8736
8737 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8738
8739         * src/pic16/glue.c: minor cleanup by Vangelis
8740
8741 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8742
8743         * device/include/regc515c.h: fixed #758477
8744         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8745         * device/lib/_gptrput.c: saved a few bytes
8746         * my tab spacing is 8, yours too?)
8747         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8748         * device/lib/serial.c: process RX bytes earlier than TX bytes
8749         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8750
8751 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8752
8753         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8754
8755 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8756
8757     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8758
8759 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8760
8761         * device/lib/Makefile.in: bad fix, reverted to 1.43
8762
8763 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8764
8765         * device/lib/Makefile.in: added missing z80 object files
8766
8767 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8768
8769         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8770         pic16 progress by Vangelis:
8771         * src/SDCCglobl.h:
8772         * src/SDCCmain.c:
8773         * src/pic/Makefile:
8774         * src/pic:
8775         * pic/Makefile:
8776         * pic16/device.c:
8777         * pic16/device.h:
8778         * pic16/gen.c:
8779         * pic16/gen.h:
8780         * pic16/genarith.c:
8781         * pic16/glue.c:
8782         * pic16/main.c:
8783         * pic16/pcode.c:
8784         * pic16/pcode.h:
8785         * pic16/pcodepeep.c:
8786         * pic16/peeph.def:
8787
8788 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8789
8790     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8791
8792 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8793
8794     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8795     added gbz80 build to MSVC project.
8796     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8797     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8798     from 8051 stuff and setup so it links using a .lnk file.
8799
8800 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8801
8802     * support/librarian/sdcclib.c: sdcc librarian.
8803     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8804     with sdcclib.
8805
8806 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8807
8808     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8809
8810 2003-07-02  Borut Razem <borut.razem AT siol.net>
8811
8812         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8813         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8814         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8815         src/xa51/main.c, src/z80/main.c:
8816         virtualization of glue() function: each port has it's own glue function,
8817         which is accessed by do_glue function pointer in PORT.general structure
8818
8819 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8820
8821         * DS800C400 fun, improved ROM interface and tinibios.
8822
8823 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8824
8825         * More support for DS80C400. Now includes beginning of interface to ROM.
8826
8827 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8828
8829         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8830
8831 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8832
8833         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8834
8835 2003-06-19  Borut Razem <borut.razem AT siol.net>
8836
8837         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8838
8839 2003-06-19  Borut Razem <borut.razem AT siol.net>
8840
8841         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8842         fixed Z80 port - crt0.o: cannot open.
8843
8844 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8845
8846         * support/Util/MySystem.c (merge_command): revert bad fix
8847
8848 2003-06-18  Borut Razem <borut.razem AT siol.net>
8849
8850         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8851
8852 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8853
8854         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8855         option --use-stdout sends errors to stdout instead of stderr.
8856
8857 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8858
8859         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8860
8861 2003-06-15  Borut Razem <borut.razem AT siol.net>
8862
8863         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8864         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8865         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8866         fixed width array of pointers replaced with sets;
8867         multiple include and lib paths ared transferred to preprocessor and linker
8868         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8869         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8870         fixed width array of pointers
8871         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8872         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8873         fixupPath(), getPathDifference()
8874         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8875         fixed width array of pointers
8876
8877 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8878
8879         * src/pic16/ralloc.c: fix warnings
8880         * src/pic16/pcode.c: fix warning
8881
8882 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8883
8884          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8885         know all the details, but essentially this set of changes enable
8886         the pic16 port to generate movff instructions and generate assembler
8887         directives,
8888         * src/SDCCmain.c:
8889         * src/pic16/gen.c:
8890         * src/pic16/glue.c:
8891         * src/pic16/pcode.c:
8892         * src/pic16/device.c:
8893         * src/pic16/main.c:
8894         * src/pic16/pcode.h:
8895         * src/pic16/pcoderegs.c:
8896         * src/pic16/ralloc.c:
8897         * src/pic16/ralloc.h:
8898
8899 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8900
8901         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8902         added option --vc, so sdcc errors and warnings are compatible with
8903         Microsoft Visual Studio.
8904
8905 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8906
8907         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8908           device/lib/libfloat.lib: added atof function.
8909
8910 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8911
8912         * doc/sdccman.lyx: updated to Lyx 1.3
8913         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8914         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8915         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8916
8917 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8918
8919         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8920
8921 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8922
8923         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8924           additions to the "related tools/documentation" section
8925
8926 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8927
8928         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8929
8930 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8931
8932         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8933         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8934
8935 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8936
8937         * doc/sdccman.lyx: fix double dash and other minor things
8938         * doc/Makefile: fix double dash
8939
8940 2003-05-28  Karl Bongers(patches from Martin Helmling)
8941         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8942           condition and ignore commands.
8943
8944 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8945
8946         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8947           is in parts still quite out of date, I did changes as far as I felt makes sense
8948           for a non-native english speaker.
8949           Please feel free to add to the manual or to correct my changes.
8950         * doc/Makefile: undid touching the date of intermediate tex files.
8951
8952 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8953
8954         * doc/sdccman.lyx: Manual has an index now
8955
8956 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8957
8958         Finalize muluint/mulsint and mululong/mulslong merging:
8959         * device/lib/_mulint.c
8960         * device/lib/_mullong.c
8961         * device/lib/gbz80/mul.s
8962         * device/lib/gbz80/stubs.s
8963         * device/lib/z80/mul.s
8964         * device/lib/z80/stubs.s
8965         * src/SDCCsymt.c (initCSupport)
8966
8967 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8968
8969         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8970         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8971           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8972           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8973           instead of /Zm500.
8974
8975 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8976
8977         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8978           the regression tests I'm not brave enough to enable 245.b, 245.c
8979         * doc/sdccman.lyx: added latex preamble for hyperref package.
8980           Using pdflatex this will give you a hyperlinked pdf file with
8981           bookmarks. (prepend '%' before /usepackage if this breaks something)
8982
8983 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8984
8985          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8986
8987 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8988
8989         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8990
8991 2003-05-21    <johan AT balder>
8992
8993         * src/SDCCglue.c (printIval): fixed bug #739934
8994
8995 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8996
8997         Applied patch from bug 737905 (renamed yylineo to mylineno):
8998         * src/altlex.c
8999         * src/SDCCast.c
9000         * src/SDCglobl.h
9001         * src/SDCC.lex
9002         * src/SDCCsymt.c
9003         * src/SDCCval.c
9004         * src/pic16/pcode.c: Cleaned warnings
9005         * src/pic16/pcodeflow.c: Cleaned warnings
9006         * src/pic16/pcoderegs.c: Cleaned warnings
9007
9008 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9009
9010         * src/pic16/pcode.c: Cleaned warnings
9011         * src/pic16/pcodepeep.c: Cleaned warnings
9012         * src/pic16/ralloc.c: Cleaned warnings
9013
9014 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9015
9016         * doc/sdccman.lyx: fixed bug 739745
9017         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9018
9019 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9020
9021         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9022         it can be defined with CFLAGS when running configure
9023         * src/SDCCmain.c: fixed compiling + linking with object files
9024
9025 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9026
9027         * configure.in: configure for pic16 port,
9028             added --disable-pic16-port
9029         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9030         * src/SDCCmain.c: linkOptions is changed to set *,
9031             added if/endif conditional macros to remove options help
9032             messages from optionsTable when a port is not configured, added
9033             support for the PIc16 port in the ports table, when executing
9034             the compiler with no port specified on command line, a default
9035             port is selected with the new macro DEFAULT_PORT which is
9036             defined in port.h, in setDefaultOptions() linkOptions is removed
9037             from initialization assignment, since now it is a set,
9038             parseCmdLine uses setParseWithComma for linkOptions, in
9039             linkEdit() linkOptions are accessed with new function indexSet()
9040             which returns the i'th item of a set variable. See SDCCset.c, in
9041             linkEdit() when calling buildCmdLine(), added linkOptions as
9042             last argument. Now users can pass arguments to gplink via the
9043             -Wl option, main() uses pic16glue() to glue up pic16 programs
9044         * src/SDCCpeeph.c: various changes to support pic16
9045         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9046             return the i'th item of the set
9047         * src/SDCCset.h: added function prototype for indexSet()
9048         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9049         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9050         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9051             added macro DEFAULT_PORT
9052         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9053         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9054             generated
9055         * src/pic16/glue.c: commented out some error producing lines
9056         * src/pic16/main.c: __config directives are commented out to stop
9057             gpasm complaining and test the linkage with gplink, _linkCmd and
9058             _asmCmd changed to be more gplink and gpasm friendly
9059         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9060             produced an error when parsed, peep rule 12 is added to utilize
9061             movff, but it is commented out since the pCode does not support
9062             yet a command with 2 address arguments
9063
9064 2003-05-18    <johan AT balder>
9065
9066         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9067         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9068 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9069
9070         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9071   Added feature to script commands from file.
9072
9073 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9074
9075         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9076         * src/SDCCutil.c: include ctype.h for win32
9077
9078 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9079
9080         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9081
9082 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9083
9084         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9085   Fixed so you can set breakpoints prior to run, run does not stop
9086   on entry now.  Add tbreak.  Other enhancements and fixes for use
9087   with ddd.
9088
9089 2003-05-12  Borut Razem <borut.razem AT siol.net>
9090
9091         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9092
9093 2003-05-11  Borut Razem <borut.razem AT siol.net>
9094
9095         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9096         the path of bin directory, so that PATH is the only env. variable, which has to be set
9097         in case of standard installation.
9098         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9099         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9100         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9101
9102 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9103
9104         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9105         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9106         temp files are in the port dir; clean the gen/test directory when
9107         generating new test.c
9108         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9109         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9110         * support/regression/tests/zeropad.c: added
9111
9112 2003-05-09    <johan AT balder>
9113
9114         * src/SDCCglue.c: fixed bug #597940
9115
9116 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9117
9118         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9119   cache sfr, optimize next,step, fix off by one sourceline,
9120   support ddd list function.
9121         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9122
9123 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9124
9125         * support/regression/HTMLgen.py: added compare_s2f()
9126         * support/regression/Makefile: redo 1.27
9127         * support/regression/generate-cases.py: redo 1.5
9128
9129 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9130
9131         * support/regression/tests/float.c: workaround 33 bit hex constant
9132         * support/regression/tests/simplefloat.c: fix division for host
9133
9134 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9135
9136         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9137         that tame's the PIC's over-aggressive optimizer.
9138
9139 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9140
9141          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9142          support for MSVC.
9143
9144 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9145
9146         Initial support for DS80C400. "Hello world" runs on TINIm400
9147         (with polled I/O).
9148
9149 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9150
9151          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9152          * Some notes on ddd usage added in debugger/README
9153          Martin Helmling adding more features and fixes for ddd GUI debugger.
9154          Code added for nexti, stepi, up, down, and other adjustments.
9155
9156 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9157
9158         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9159         * src/pic/peeph.def Added two rules to optimize carry manipulation
9160         * src/pic/* removed debug printfs
9161
9162 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9163
9164         * debugger/mcs51/cmd.c: added header newalloc.h
9165
9166 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9167
9168         * as/Makefile: new EXEEXT
9169         * as/z80/Makefile: remove trailing slash of BUILDIR
9170         * as/z80/clean.mk: new EXEEXT
9171         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9172         * support/cpp2/Makefile.in: new EXEEXT
9173         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9174
9175 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9176
9177         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9178         EXEEXT was introduced to fix all related problems with targets
9179         "clean", "install" and "uninstall"; a couple of further flaws
9180         especially with "clean" have been fixed too
9181         * as/mcs51/Makefile.in
9182         * as/mcs51/clean.mk
9183         * as/z80/Makefile
9184         * Makefile
9185         * clean.mk
9186         * debugger/mcs51/Makefile.in
9187         * debugger/mcs51/clean.mk
9188         * link/z80/Makefile
9189         * link/z80/Makefile.in
9190         * link/z80/clean.mk
9191         * link/Makefile
9192         * packihx/Makefile.in
9193         * packihx/clean.mk
9194         * sim/ucsim/Makefile
9195         * sim/ucsim/clean.mk
9196         * sim/ucsim/avr.src/Makefile.in
9197         * sim/ucsim/avr.src/clean.mk
9198         * sim/ucsim/s51.src/Makefile.in
9199         * sim/ucsim/s51.src/clean.mk
9200         * sim/ucsim/xa.src/Makefile.in
9201         * sim/ucsim/xa.src/clean.mk
9202         * sim/ucsim/z80.src/Makefile.in
9203         * sim/ucsim/z80.src/clean.mk
9204         * sim/ucsim/main_in.mk
9205         * sim/ucsim/packages_in.mk
9206         * sim/ucsim/gui.src/Makefile.in
9207         * sim/ucsim/gui.src/serio.src/Makefile.in
9208         * sim/ucsim/gui.src/serio.src/clean.mk
9209         * src/Makefile.in
9210         * src/clean.mk
9211         * support/cpp2/Makefile.in
9212         * support/cpp2/clean.mk
9213         * support/makebin/Makefile
9214         * support/makebin/clean.mk
9215         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9216         * doc/sdccman.lyx: --program-suffix no longer needed
9217
9218 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9219
9220          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9221          Martin Helmling added support for ddd GUI debugger.
9222          Code added to display assembly, set variables, and other commands
9223          to interface to ddd.
9224
9225 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9226
9227         * as/Makefile: fix target clean
9228         * as/clean.mk: fix target clean
9229         * as/z80/clean.mk: fix target clean
9230
9231 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9232
9233         * Makefile.common.in: added  AT EXEEXT AT
9234         * configure.in: removed all mingw32 stuff
9235         * configure: rebuilt from configure.in
9236         * doc/sdccman.lyx: updated section "installation"
9237         * support/scripts/sdcc_mingw32: adapted to configure
9238         * support/scripts/sdcc_cygwin_mingw32: added
9239
9240 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9241
9242         * src/pic Added object file support for the PIC port
9243         * src/pic Applied patch from Craig Franklin (this started the object file support)
9244         * src/regression Updated the PIC regression tests for object files
9245
9246 2003-04-20  Borut Razem <borut.razem AT siol.net>
9247
9248         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9249           lklex.c: In function `getfid':
9250           lklex.c:203: warning: array subscript has type `char'
9251         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9252           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9253         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9254           stack handling macros
9255
9256 2003-04-19  Borut Razem <borut.razem AT siol.net>
9257
9258         * "handling space characters in file path" task:
9259         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9260         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9261         * support/Util/MySystem.h: make it self-sufficient
9262         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9263           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9264           handling space characters in file path
9265         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9266           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9267         * support/Util/MySystem.c: handling space characters in executable's path
9268
9269 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9270
9271         * as/z80/Makefile: fix permanent rebuild of z80
9272         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9273         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9274
9275 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9276
9277         * src/SDCCopt.c: add special case optimization to replace modulo by
9278           a power of two with a bitwise AND.
9279
9280 2003-04-18    <johan AT balder>
9281
9282         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9283
9284 2003-04-17    <johan AT balder>
9285
9286         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9287         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9288
9289 2003-04-13  Borut Razem <borut.razem AT siol.net>
9290
9291         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9292         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9293           fixed mingw problem in adl_NORMALIZE_PATH
9294
9295 2003-04-12  Borut Razem <borut.razem AT siol.net>
9296
9297         * fixed "#pragma SAVE/RESTORE can not be nested":
9298         * src/SDCC.lex: reworked pragma handling functions
9299         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9300         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9301
9302 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9303
9304         * src/SDCCutil.c (pathEquivalent): defined but not used
9305         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9306         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9307         * configure: rebuilt from configure.in
9308         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9309         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9310         * device/include/Makefile.in: replace sdcc_datadir
9311         * device/lib/Makefile.in: replace sdcc_datadir
9312         * Makefile.common.in: add LDFLAGS from configure
9313         * packihx/Makefile.in: use LDFLAGS
9314         * src/Makefile.in: use LDFLAGS
9315         * support/cpp2/Makefile.in: add LDFLAGS from configure
9316         * support/makebin/Makefile: use LDFLAGS
9317         * .version: bumped version number to 2.3.5
9318
9319 2003-04-12  Borut Razem <borut.razem AT siol.net>
9320
9321         * completed "different paths" task:
9322         * src/SDCCmacro.c: fixed bug in handling quotes
9323         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9324         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9325
9326 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9327
9328         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9329
9330 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9331
9332         * ds390/gen.c ds390/peeph.def: fix bug 706781
9333
9334 2003-04-11  Borut Razem <borut.razem AT siol.net>
9335
9336         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9337
9338 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9339
9340         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9341         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9342          set - this bit used to not be set...).
9343         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9344           bad code in PIC Port
9345         * src/regression/and2.c added to test bug 609268
9346         * src/regression/Makefile added and2.c to regression test
9347
9348
9349 2003-04-08    <johan AT CP255758-A>
9350
9351         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9352         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9353         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9354
9355 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9356
9357         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9358         fix bug #487815
9359         * support/cpp2/Makefile.in: fix bug #487815
9360         * configure: rebuilt from configure.in
9361         * Makefile.common.in: docdir changed, new path suffixes
9362         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9363         * sdcc_vc_in.h: reflect changes from sdccconf.h
9364         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9365         * src/SDCCutil.h: remove BINDIR hack
9366         * doc/sdccman.lyx: update new path hierarchy
9367
9368 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9369
9370         * src/SDCCpeeph.c: added okToRemoveSLOC test
9371
9372 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9373
9374         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9375
9376 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9377
9378         * src/SDCCpeeph.c: added labelIsReturnOnly test
9379         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9380
9381 2003-04-05    <johan AT balder>
9382
9383         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9384         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9385         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9386         * src/SDCCast.c: fixed a warning
9387         * src/SDCCast.h: fixed a warning
9388         * src/SDCCicode.c (operandFromAst): fixed a warning
9389
9390 2003-04-04    <johan AT balder>
9391
9392         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9393         * src/SDCCast.c (decorateType): fixed bug #715076
9394         * src/SDCC.y: fixed bug #702907
9395
9396 2003-04-03    <johan AT balder>
9397
9398         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9399         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9400         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9401         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9402         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9403
9404 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9405
9406         * _decdptr.c: fix return values
9407         * _gptrget.c: fix return values
9408         * _gptrgetc.c: fix return values
9409         * _gptrput.c: fix return values
9410         * _mulint.c: fix return values
9411         * as/z80/Makefile: fix 'make -j' problem
9412
9413 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9414
9415         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9416         * configure.in: big cleanup, updated to autoconf 2.5x
9417         * configure: rebuilt from configure.in
9418         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9419         * sdcc_vc_in.h: reflect changes from sdccconf.h
9420         * doc/Makefile: fixed a flaw in "make install"
9421
9422 2003-04-02    <johan AT balder>
9423
9424         * src/ds390/gen.c (genCmp): no comments
9425         * src/mcs51/gen.c (genCmp): no comments
9426         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9427         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9428
9429 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9430
9431         * support/regression/generate-cases.py: place generated file in given sub directory
9432         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9433         * support/regression/Makefile: improvements for 'make -j';
9434         side effect: it's simpler and faster now
9435
9436 2003-03-31  Borut Razem <borut.razem AT siol.net>
9437
9438         * src/z80/main.c: link-{port} and as-{port} defined without path
9439         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9440
9441 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9442
9443         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9444
9445 2003-03-30  Borut Razem <borut.razem AT siol.net>
9446
9447         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9448           changed type of list parameter to set
9449         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9450         * src/port.h: changed type of do_assemble() parameter to set
9451         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9452           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9453           definition of "cppoutfilename" macro with NULL value in preProcess()
9454         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9455         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9456         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9457           replaced with set *binPathSet
9458         * shash_add() deallocates the item, if allready exsists, before adding the new one
9459         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9460
9461 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9462
9463         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9464           a nested for loop bug in the PIC port
9465         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9466           for loops
9467
9468 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9469
9470         * support/Util/dbuf.h: remove C++ stuff to make it portable
9471
9472 2003-03-28  Borut Razem <borut.razem AT siol.net>
9473
9474         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9475           literal strings in stringLiteral()
9476         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9477         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9478           to the project
9479
9480 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9481
9482         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9483
9484 2003-03-26    <johan AT balder>
9485
9486         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9487         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9488         * src/SDCCast.c (decorateType): fixed " -v < 3"
9489
9490 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9491
9492         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9493         Added Lenny Story's debug infrastructure changes:
9494         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9495         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9496         * src/cdbFile.c: added
9497         * src/SDCCdebug.c: added
9498         * src/SDCCdebug.h: added
9499         * src/SDCCast.c (createFunction)
9500         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9501         * src/SDCCmain.c (parseCmdLine, main)
9502         * src/SDCCmem.c (redoStackOffsets)
9503         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9504         * src/SDCCsymt.h
9505         * src/common.h
9506         * src/avr/gen.c (genAVRCode)
9507         * src/ds390/gen.c (gen390Code)
9508         * src/mcs51/gen.c (gen51Code)
9509         * src/pic/gen.c (genpic14Code)
9510         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9511         * src/xa51/gen.c (genXA51Code)
9512         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9513
9514 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9515
9516         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9517         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9518
9519 2003-03-22    <johan AT balder>
9520
9521         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9522
9523 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9524
9525         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9526         * doc/cdbfileformat.lyx: added, written by Lenny Story
9527         * doc/Makefile: added cdbfileformat.lyx
9528         * doc/clean.mk: added cdbfileformat.lyx
9529
9530 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9531
9532         * src/mcs51/peeph.def: fix bug #705773
9533
9534 2003-03-20    <johan AT balder>
9535
9536         An sfr/sbit can have an "at #" AND an initializer
9537         * src/SDCCsymt.c (checkSClass):
9538         * src/SDCCmem.c (allocGlobal):
9539         * src/SDCCmem.c (allocLocal):
9540         * src/SDCCast.c (createBlock):
9541
9542 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9543
9544         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9545
9546 2003-03-16    <johan AT balder>
9547
9548         Undid the hackup of const and volatile, the problem is much bigger
9549         * src/SDCC.y:1.65
9550         * src/SDCCast.c:1.171
9551         * src/SDCCglue.c:1.138
9552         * src/SDCCicode.c:1.146
9553         * src/SDCCsymt.c:1.150
9554         * src/SDCCval.c:1.65
9555
9556 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9557
9558         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9559         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9560
9561 2003-03-13    <johan AT balder>
9562
9563         Hackup const and volatile modifiers in type chains a bit:
9564         * src/SDCC.y:1.63
9565         * src/SDCCast.c:1.169
9566         * src/SDCCglue.c:1.136
9567         * src/SDCCicode.c:1.143
9568         * src/SDCCsymt.c1.146
9569         * src/SDCCsymt.h1.59
9570         * src/SDCCval.c:1.63
9571
9572 2003-03-12    <johan AT balder>
9573
9574         * src/SDCCBBlock.h: more LRH debugging junk
9575         * src/SDCCcflow.h: more LRH debugging junk
9576         * src/SDCCloop.c: more LRH debugging junk
9577         * src/SDCC.y (struct_declaration): fixed bug #697590
9578         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9579         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9580         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9581
9582 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9583         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9584         test function names must now match exactly).
9585         * src/SDCCcse.c: added special case in findCheaperOp to allow
9586         extending a short integer. Makes less awful code for bug 700121 test case.
9587
9588 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9589
9590         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9591         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9592
9593 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9594
9595         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9596         actually called (operandsNotEqual() was called for all
9597         operandsNotEqualX tests).
9598
9599 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9600
9601         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9602         with shorter literals. Fixes bug 700121.
9603
9604 2003-03-11    <johan AT balder>
9605
9606         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9607
9608 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9609
9610         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9611         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9612
9613 2003-03-10  Borut Razem <borut.razem AT siol.net>
9614
9615         * src/SDCCmain.c: pipe preprocessor's output
9616         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9617         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9618         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9619         which closes all pipes in pipeSet set
9620         * src/SDCCset.c: free deleted item in function deleteSetItem()
9621         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9622         moved from z80 to src subproject
9623         * .version: increased version number to 2.3.4
9624
9625 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9626
9627         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9628         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9629         * support/regression/ports/xa51/spec.mk: fix typo
9630
9631 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9632
9633         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9634
9635 2003-03-09  Borut Razem <borut.razem AT siol.net>
9636
9637         * src/SDCCmain.c: pipe preprocessor's output
9638         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9639         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9640         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9641         which closes all pipes in pipeSet set
9642         * src/SDCCset.c: free deleted item in function deleteSetItem()
9643         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9644         moved from z80 to src subproject
9645
9646 2003-03-09  Borut Razem <borut.razem AT siol.net>
9647
9648         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9649         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9650         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9651         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9652         * src/SDCCglobl.h: unification of WIN32 native definitions
9653
9654 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9655
9656         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9657
9658 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9659
9660         * src/configure.in:   check for endianess (even while cross-compiling)
9661         * src/configure:      check for endianess (even while cross-compiling)
9662         * src/configure_in.h: check for endianess (even while cross-compiling)
9663         * src/avr/gen.c:        remove old endianess stuff
9664         * src/mcs51/gen.c:      remove old endianess stuff
9665         * src/ds390/gen.c:      remove old endianess stuff
9666         * src/pic/gen.c:        remove old endianess stuff
9667         * src/pic/genarith.c:   remove old endianess stuff
9668         * src/pic/glue.c:       fix endianess check
9669         * src/pic16/gen.c:      remove old endianess stuff
9670         * src/pic16/genarith.c: remove old endianess stuff
9671         * src/pic16/glue.c:     fix endianess check
9672         * src/xa51/gen.c:       remove old endianess stuff
9673         * src/z80/gen.c:        fix endianess check
9674         * src/SDCCglue.c:       fix endianess check
9675         * src/ds390/peeph.def: fix bug 700036
9676
9677 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9678
9679         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9680         * src/configure: find appropriate data-types on host for SDCC's int and long
9681         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9682         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9683         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9684
9685 2003-03-07    <johan AT balder>
9686
9687         Just a big NOOP:
9688                 some minor cleanups before the big shot
9689                 OP_DEFS and OP_USES now use Kevin's protection
9690                 new option --nolabelopt
9691
9692         * src/SDCCBBlock.c:
9693         * src/SDCCast.c,:
9694         * src/SDCCcflow.c:
9695         * src/SDCCcse.c:
9696         * src/SDCCicode.c:
9697         * src/SDCCicode.h:
9698         * src/SDCClabel.c:
9699         * src/SDCCloop.c:
9700         * src/SDCCmain.c:
9701         * src/ds390/ralloc.c:
9702         * src/mcs51/ralloc.c:
9703         * src/pic/ralloc.c:
9704         * src/xa51/ralloc.c:
9705         * src/z80/ralloc.c:
9706
9707 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9708
9709         * src/pic/pcode.c (get_op): fix 64 bit warnings
9710         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9711         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9712         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9713         * support/regression/tests/malloc.c: fix 64 bit warnings
9714
9715 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9716
9717         * src/mcs51/gen.c (genMinus): fixed bug 696436
9718
9719 2003-03-02  Borut Razem <borut.razem AT siol.net>
9720
9721         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9722
9723 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9724
9725         * configure.in: test for mkstemp
9726         * sdccconf_in.h: add HAVE_MKSTEMP
9727
9728 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9729
9730         * device/include/ctype.h: removed warning while using --stack-auto
9731         * device/include/malloc.h: removed warning while using --stack-auto
9732         * device/include/string.h: removed warning while using --stack-auto
9733
9734 2003-02-23  Borut Razem <borut.razem AT siol.net>
9735
9736         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9737         because NDEBUG is defined (see man assert)
9738         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9739
9740 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9741
9742         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9743         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9744
9745 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9746
9747         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9748         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9749
9750 2003-02-18    <johan AT balder>
9751
9752         * as/mcs51/asmain.c (asmbl): module can start with a digit
9753         * as/z80/asmain.c (asmbl): module can start with a digit
9754
9755 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9756
9757         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9758         * src/asm.c: fix pipe() for Mingw32
9759
9760 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9761
9762         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9763         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9764         make -V work again; --c1mode reads now from stdin
9765         * doc/sdccman.lyx: added --c1mode
9766         * support/Util/SDCCerr.c: new messages for c1 mode
9767         * support/Util/SDCCerr.h: new messages for c1 mode
9768         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9769
9770 2003-02-15    <johan AT balder>
9771
9772         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9773
9774 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9775
9776         * doc/sdccman.lyx: Environment variables, -o and other minor things
9777
9778 2003-02-14    <johan AT balder>
9779
9780         * src/xa51/main.c: before anyone really tries to use it :)
9781
9782         * Install doc's in share/sdcc/doc
9783         * removed some obsolete files
9784         * Do a proper make distclean and uninstall
9785         M Makefile.common.in
9786         R sdccbuild.sh
9787         M as/Makefile
9788         M device/include/Makefile.in
9789         M device/lib/Makefile.in
9790         M doc/sdccman.lyx
9791         M link/Makefile
9792         M sim/ucsim/doc/Makefile.in
9793         M src/clean.mk
9794         R src/avr/peeph.rul
9795         R src/xa51/peeph.rul
9796         M support/cpp2/Makefile.in
9797         M support/makebin/Makefile
9798
9799
9800 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9801
9802         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9803
9804 2003-02-10  Borut Razem <borut.razem AT siol.net>
9805
9806         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9807         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9808         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9809         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9810         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9811         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9812         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9813         src/z80/Makefile.bcc: Borland Makefile cleanup
9814         * as/z80/Makefile.bcc: Added Borland Makefile
9815         * support/cpp2/borland.h: Removed
9816
9817 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9818
9819         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9820         * src/SDCC.lex: new pragma NOIV
9821         * src/SDCCglobl.h: new pragma NOIV
9822         * src/SDCCmem.c: new pragma NOIV
9823
9824 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9825
9826         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9827
9828 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9829
9830         * src/SDCCmain.c: signal handling is switched off by --debug
9831         * doc/Makefile: small fix for install; use clean.mk again
9832         * doc/clean.mk: clean *.pdf and *.html too
9833
9834 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9835
9836         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9837         * device/lib/printfl.c: fix a ds390 bug by making it portable
9838         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9839         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9840         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9841         * debugger/mcs51/cmd.c: converted multi-line string literals
9842         * sim/ucsim/globals.cc: converted multi-line string literals
9843         * src/SDCCmain.c: introduced signal handler to remove temp files
9844         * doc/Makefile: small tweaks, implement clean
9845         * doc: removed generated files
9846
9847 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9848
9849         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9850         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9851         Address Record is not correctly generated for DS390."
9852
9853 2003-02-02  Borut Razem <borut.razem AT siol.net>
9854
9855         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9856         * as/mcs51/asm.h: fixed compilation with Borland C
9857         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9858         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9859         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9860         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9861         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9862         src/z80/Makefile.bcc: delete $(LIB) only if exist
9863         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9864
9865 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9866
9867         * device/include/malloc.h: introduced NULL
9868         * device/include/string.h: introduced NULL
9869         * device/include/stdlib.h: introduced NULL
9870         * device/lib/_memcpy.c: removed NULL
9871         * device/lib/_strcat.c: removed NULL
9872         * device/lib/_strchr.c: removed NULL
9873         * device/lib/_strcmp.c: removed NULL
9874         * device/lib/_strcpy.c: removed NULL
9875         * device/lib/_strcspn.c: removed NULL
9876         * device/lib/_strlen.c: removed NULL
9877         * device/lib/_strncat.c: removed NULL
9878         * device/lib/_strncmp.c: removed NULL
9879         * device/lib/_strncpy.c: removed NULL
9880         * device/lib/_strpbrk.c: removed NULL
9881         * device/lib/_strrchr.c: removed NULL
9882         * device/lib/_strspn.c: removed NULL
9883         * device/lib/_strstr.c: removed NULL
9884         * device/lib/_strtok.c: removed NULL
9885         * device/lib/malloc.c: removed NULL, include own header
9886
9887 2003-02-02    <johan AT balder>
9888
9889         * 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
9890         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9891         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9892         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9893         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9894         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9895
9896 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9897
9898         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9899         area 'DATA'"
9900
9901 2003-02-01    <johan AT balder>
9902
9903         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9904
9905 2003-01-31    <johan AT CP255758-A>
9906
9907         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9908
9909 2003-01-30    <johan AT balder>
9910
9911         * src/SDCCBBlock.c: automatic bug detection
9912         * src/SDCCicode.c: automatic bug detection
9913
9914 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9915
9916         * src/SDCCglobl.h:   now --xram-size 0 works
9917         * src/SDCCmain.c:    now --xram-size 0 works
9918
9919 2003-01-29    <johan AT balder>
9920
9921         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9922
9923 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9924
9925         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9926         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9927         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9928         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9929         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9930         * src/SDCCmain.c:    Added options --xram-size and --code-size
9931
9932 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9933
9934         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9935         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9936
9937 2003-01-27    <johan AT balder>
9938
9939         * src/SDCC.y: fixed bug #613764
9940
9941 2003-01-26    <johan AT balder>
9942
9943         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9944         * src/SDCCsymt.h: fixed bug #673374
9945         * src/SDCCglue.c: fixed bug #661910
9946         * src/SDCCast.c: fixed bug #458099 and 673374
9947
9948 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9949
9950         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9951         * as/mcs51/strcmpi.h: added
9952         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9953         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9954         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9955         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9956         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9957         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9958         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9959         * as/mcs51/Makefile.aslink: new module strcmpi
9960         * as/mcs51/Makefile.asx8051: new module strcmpi
9961         * as/mcs51/Makefil.bcc: new module strcmpi
9962         * as/mcs51/Makefile.in: new module strcmpi
9963         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9964
9965 2003-01-26    <johan AT balder>
9966
9967         * src/SDCCglue.c: reverted back to 1.124
9968         * src/SDCCast.c: reverted back to 1.156
9969         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9970
9971 2003-01-25    <johan AT balder>
9972
9973         * src/SDCCglue.c: A better fix for bug #661910
9974         * src/SDCCast.c: A better fix for bug #661910
9975         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9976
9977 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9978
9979         * src/Makefile.in: remove spawn.o
9980         * src/SDCCmain.c: remove spawn.h
9981         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9982         * src/spawn.c: removed
9983         * src/spawn.h: removed
9984         * support/regression/ports/ds390/spec.mk: link with -r
9985
9986 2003-01-24    <johan AT CP255758-A>
9987
9988         * src/ds390/gen.c (aopOp): fixed bug #667458
9989         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9990         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9991         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9992
9993 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9994
9995         * src/mcs51/peeph.def: better assembler identation by Frieder
9996         * src/mcs51/gen.c: better assembler identation by Frieder
9997
9998 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9999
10000         * as/z80/string.h: removed for gcc 3.2
10001         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10002         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10003
10004 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10005
10006         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10007         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10008         * support/regression/Makefile: separate temp files for ports
10009         * support/regression/generate-cases.py: separate temp files for ports
10010         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10011         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10012
10013 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10014
10015         * moved tinitalk to device/examples/ds390
10016
10017 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10018
10019         * as/mcs51/lkmem.c: rflag is for DS390
10020         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10021         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10022                          (linkEdit): move mem- and map-files the same way as ihx-files
10023         * src/z80/main.c (_setDefaultOptions): removed --generic
10024         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10025         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10026         * src/pic/glue.c (picglue): --c1mode works again
10027         * src/pic16/glue.c (pic16glue): --c1mode works again
10028         * src/asm.c (printCLine): fix #660034
10029
10030 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10031
10032         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10033         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10034         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10035         * as/mcs51/lkmem (summary): better fix for sp problem
10036         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10037         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10038         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10039                                               remove --stack-after-data
10040
10041 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10042
10043         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10044         * src/SDCCutil.c (join): ugly bug: missing '\0'
10045         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10046
10047 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10048
10049         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10050         * src/port.h: typo
10051         * src/pic/main.c (_asmCmd): gpasm supports -o
10052         * src/z80/main.c: more general macros
10053         * device/lib/Makefile.in: remove intermediate files
10054
10055 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10056
10057         * .version: Bumped version number to 2.3.3
10058         * src/SDCCBBlock.c: new option -o
10059         * src/SDCCglobl.h: new option -o
10060         * src/SDCCglue.c: new option -o
10061         * src/SDCCmain.c: new option -o
10062         * src/asm.c: new option -o
10063         * src/ds390/main.c: new option -o
10064         * src/pic/glue.c: new option -o
10065         * src/pic/pcode.c: new option -o
10066         * src/pic/ralloc.c: new option -o
10067         * src/pic16/glue.c: new option -o
10068         * src/pic16/pcode.c: new option -o
10069         * src/pic16/ralloc.c: new option -o
10070         * src/z80/main.c: new option -o
10071         * device/lib/Makefile.in: use -o
10072         * support/regression/ports/ds390/spec.mk: use -o
10073         * support/regression/ports/gbz80/spec.mk: use -o
10074         * support/regression/ports/mcs51/spec.mk: use -o
10075         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10076         * support/regression/ports/z80/spec.mk: use -o
10077         * support/regression/ports/ucz80/spec.mk: use -o
10078         * support/regression/ports/xa51/spec.mk: use -o
10079         * support/regression/fwk/lib/timeout.c: fix usage string
10080
10081 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10082         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10083
10084 2003-01-07    <johan AT balder>
10085
10086         * src/SDCCast.c (decorateType): fixed bug #600035
10087
10088 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10089         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10090         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10091         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10092         * src/pic/pcode.c: outcommented unused variable to remove warnings
10093         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10094
10095 2003-01-06    <karl AT turbobit.com>
10096         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10097    regression tests.
10098
10099 2003-01-06    <johan AT balder>
10100
10101         * src/SDCCicode.c: fixed array add
10102
10103 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10104         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10105         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10106
10107 2003-01-04    <johan AT balder>
10108
10109         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10110
10111 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10112         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10113
10114 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10115         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10116         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10117
10118 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10119         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10120
10121 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10122         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10123
10124 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10125         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10126
10127 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10128
10129     * in \sdcc\as\mcs51\ changed these files in order to create an
10130     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10131     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10132     following files to include the previous two files: aslink.dsp,
10133     Makefile.aslink, Makefile.bcc, and Makefile.in.
10134
10135     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10136     .adb instead of .cdb
10137
10138 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10139
10140         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10141         value from option --iram-size.
10142
10143 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10144
10145         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10146         dram[] array.
10147
10148 2002-09-18    <wiml AT hhhh.org>
10149
10150         * SDCClrange.h: exposed setFromRange() and setToRange()
10151         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10152           packRegsForAccUse() (bug 542397)
10153         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10154           multiple times and emitting the fetch operations more than once
10155           added aopGetUsesAcc() function to allow binary operators to
10156           fetch their operands in the correct order; made genMinus() emit
10157           compact code for X = LITERAL - Y
10158
10159 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10160         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10161         sprintf() in line 1267.
10162
10163 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10164         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10165         like ports.
10166
10167 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10168         Changes to aslink (All the changes are marked with 'JCF'):
10169
10170         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10171         summary().
10172
10173         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10174         area BSEG.  Also moves, if possible, the DATA area down into the internal
10175         ram so more space is available.
10176
10177         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10178         sflag.
10179
10180         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10181         not bytes.  Function summary() which creates a memory usage summary
10182         file with extension .mem.  Reports of overlaping stack and small stack
10183         size.  If the space for the stack is less than 16 bytes aslink trows a
10184         warning.
10185
10186         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10187         the 8051.  Option 'y' for memory summary output file.
10188
10189         Changes to sdcc (All the changes are marked with 'JCF'):
10190
10191         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10192
10193         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10194         overlaying area for it (uses RegBankUsed[4]).
10195
10196         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10197         bank zero as used by default.  By default aslink locates the stack
10198         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10199         the creation of the .mem file.  Delegates the allocation of data area
10200         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10201         the begining of the stack area to aslink.
10202
10203         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10204         glue() in SDCCglue.c creates an area for it.
10205
10206 2002-09-03  Borut Razem <borut.razem AT siol.net>
10207         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10208         sdcc/src/pic/glue.c:
10209         introduced atexit() handler for teporay files removal in case of
10210         errors, assertions, ...
10211
10212 2002-08-29  Borut Razem <borut.razem AT siol.net>
10213         * sdcc/support/cpp2/auto-host_vc_in.h:
10214         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10215         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10216         Maybe there is a similar problem with BORLANDC? It should be checked!
10217
10218         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10219         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10220         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10221         was not executed, and the compiler (cl) launched a warning:
10222         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10223
10224 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10225         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10226
10227 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10228         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10229
10230         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10231           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10232           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10233           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10234           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10235           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10236           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10237         - added Release configuration in VS projects
10238         - review of compiler an linker options
10239         - VC .exe files are generated in bin_vc directory, not to interfere
10240           with binaries generated from other projects (cygwin, mingw, bcc ...)
10241
10242         * sdcc/src/yacc.dsp: added
10243
10244         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10245         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10246         and insert the version number definitions from .version
10247
10248         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10249
10250         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10251         added - genarate auto-host.h using auto-host_vc_in.h as template
10252
10253         * sdcc/sdcc_vc.h,
10254         removed from CVS, generated automatically
10255
10256 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10257         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10258
10259 2002-08-11  Borut Razem <borut.razem AT siol.net>
10260         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10261
10262 2002-08-10  Borut Razem <borut.razem AT siol.net>
10263         * src/SDCCmain.c (main):
10264         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10265         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10266         The consequence was that some temporary files were not removed.
10267
10268         * src/SDCCglue.c:
10269         unification of code in functions tempfilename() and tempfile():
10270         function tempnam() is defined in Visual Studio 6.0 and .NET
10271
10272         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10273
10274         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10275           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10276         - removed compiler command line option /WX: Treats all warnings as errors
10277         - update a list of source files, included into the project
10278
10279         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10280           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10281         changed project type to Generic Project so that can be correcly converted to VS.NET project
10282
10283         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10284
10285         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10286
10287         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10288
10289         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10290         added return 0 statements after assert() to make compiler happy
10291
10292         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10293         added newline in the def file to keep MSC compiler satisfied
10294
10295         * sdcc/src/z80/gen.c:
10296         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10297           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10298         - solved MSC error in function aopDump()
10299
10300         * sdcc_vc.h: define PREFIX as "\\sdcc"
10301
10302 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10303         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10304
10305 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10306         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10307         - Rewrote the register banking algorithm.
10308         - Added pCode live-range analysis to registers (for now, only non-used and
10309         singly-used registers optimized away)
10310
10311         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10312
10313         * 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.
10314
10315 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10316         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10317
10318 2002-04-22  Michael Hope  <michaelh AT vroom>
10319
10320         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10321
10322         * configure.in (DD_COPT): Added include support required for gbdk.
10323
10324         * .version: Bumped version number just to increase it.
10325
10326         * src/SDCCmain.c: Added -nostdinc to the default options.
10327
10328 2002-04-15  Michael Hope  <michaelh AT vroom>
10329
10330         * device/lib/z80/printf.c (sprintf): Added.
10331
10332         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10333
10334         * src/z80/peeph.def: Added transpose redundent load rule.
10335
10336         * src/z80/main.c: Added force callee saves for jaune.
10337
10338         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10339
10340         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10341
10342 2002-03-28  Johan Knol  <johan AT balder>
10343
10344         * src/SDCCval.c: fixed bug #532436
10345
10346 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10347         * /src/port.h:
10348         Added "char *Processor" field to the port structure.
10349
10350         * /src/SDCCmain.c:
10351         Added -p option. Allows port dependent processor to be specified.
10352
10353         * all ports:
10354         Initialized the new field char *Processor field to NULL in all ports
10355
10356         * /src/pic/*:
10357         Compiler generated registers for interrupt context saving
10358         were not getting allocated.
10359
10360 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10361
10362         * /src/SDCCast.c:
10363         Fixed left shift. Will promote the left side of a left shift
10364         if a) left shifting more than size of operand or b) when assigned
10365         to something size > size of left side
10366
10367 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10368         * src/pic/*
10369         tons of changes. Register allocation has been
10370         rewritten. Added customization for the various PICs. Flow
10371         analysis is restructured. ...
10372
10373         * src/pic/device.h:
10374         Added
10375
10376         * src/pic/device.c:
10377         Added. device.c is a PIC port hack to accomodate variations
10378         in PIC devices.
10379
10380 2002-03-13  Michael Hope  <michaelh AT vroom>
10381
10382         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10383
10384 2002-03-04  johanknol  <johanknol AT manik>
10385
10386         * /src/SDCCval.c: fixed
10387
10388         const unsigned char arr[][2] = { { 0, 1 } };
10389         t18.c:1: error: Initializer element is not constant
10390
10391 2002-03-04  bela  <bela AT manik>
10392
10393         * /device/include/mcs51reg.h:
10394         ds89c420 register definition update
10395
10396 2002-03-03    <johan AT FRIJA>
10397
10398         * support/Util/SDCCerr.c: did something, but don't no why anymore
10399
10400         * support/regression/tests/bug-524691.c: made it a little less shy
10401
10402         * src/SDCCast.c (decorateType): fixed bug #524697
10403
10404         * src/SDCCast.c: made some lineno improvements
10405
10406         * src/SDCCval.c (getNelements): changed warning to error
10407
10408         * src/SDCCglue.c (printIvalArray): changed warning to error
10409
10410         * src/SDCCicode.c: fixed a warning for mingw
10411
10412         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10413
10414         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10415
10416 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10417
10418         * src/ds390/peeph.def:
10419         Added some more peephole rules
10420
10421         * src/ds390/gen.c: Various fixes & enhancements
10422
10423         * src/SDCClrange.c, src/SDCClrange.h:
10424         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10425
10426         * src/ds390/ralloc.c:
10427         various fixes & enhancements (ds390) specific
10428
10429         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10430         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10431         from rallocs.
10432
10433         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10434
10435 2002-03-02    <johan AT FRIJA>
10436
10437         * src/SDCCast.c (decorateType): fixed bug #524708
10438
10439         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10440
10441         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10442
10443 2002-03-01  Michael Hope  <michaelh AT vroom>
10444
10445         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10446
10447         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10448
10449 2002-03-01    <johan AT FRIJA>
10450
10451         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10452
10453         * src/SDCCast.c (decorateType): fixed bug #524209
10454
10455         * src/SDCCval.c (valNot): fixed bug #524195
10456
10457 2002-02-26    <johan AT balder>
10458
10459         * src/xa51/gen.c: fixed a warning
10460
10461         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10462
10463         * src/SDCCast.c (decorateType): fixed bug #522534
10464
10465 2002-02-23    <johan AT balder>
10466
10467         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10468
10469 2002-02-22    <johan AT balder>
10470
10471         * src/SDCCast.c: fixed bug #514865
10472
10473         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10474
10475 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10476
10477         * sdcc/src/SDCCloop.c:
10478         Previous fix was not good. basic blocks that have "break" or "return" are
10479         not really partof a loop , but live ranges used in these blocks should
10480         be live thru the entire loop, so set partOfLoop but don't add them to
10481         loop region
10482
10483 2002-02-21    <johan AT FRIJA>
10484
10485         * src/SDCCcse.c: fixed bug #514308
10486
10487 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10488
10489         * src/SDCCloop.c:
10490         Fixed BUG #519583. If a conditional block ended in a return/break
10491         statement inside a loop, it was not being considered part of the loop.
10492
10493         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10494
10495 2002-02-10  Karl Bongers <karl AT turbobit.com>
10496
10497         * debugger/*:
10498         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10499         with lots of comments and notes.
10500
10501         * device/examples/test2.c:
10502         Fix bug, "red" variable not being initialized(compiler complained).
10503
10504         * device/examples/Makefile, examples/test3.c:
10505         Add Makefile in device/examples folder, compiles test3.c
10506         for use as a multiple module SDCDB test case.
10507
10508         * sim/ucsim/cmd.src/cmdset.cc:
10509         Took out debug printfs in ucsim "next" command.
10510
10511         * sim/ucsim/xa.src:
10512         Karl and Johan start ucsim XA support.  Most dissassembly working,
10513         about 75% emulation done(plenty of work remaining).
10514
10515         * sim/ucsim/z80.src:
10516         Add Z80 support to ucsim, add test-ucz80 regression test,
10517         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10518         Notice z80 compiler fails on examples/test3.c/crc code.
10519
10520 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10521
10522         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10523         Added support for --parms-in-bank1
10524
10525         * src/ds390/peeph.def:
10526         added a few more peephole optimzations
10527
10528         * src/ds390/main.c:
10529         1) added __builtin_inp & __builtin_outp used to read in data of given length
10530            from a memory mapped port
10531         2) added __builtin_memcmp
10532         3) added __builtin_swapw swap bytes of a short
10533
10534         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10535         1) handle multiple send & receives from register bank1
10536         2) ralloc can now allocate DPTR1 to some liveRanges
10537
10538         * src/SDCCsymt.c, src/SDCCsymt.h:
10539         changes to handle multiple sends & receives
10540
10541         * src/SDCCptropt.h:
10542         added some pointer arithmetic optimization
10543
10544         * src/SDCCptropt.c:
10545         added some pointer arithmetic optimizations but not stable yet so not
10546         called from anywhere (will get this working shortly)
10547
10548         * src/SDCCopt.c: fixed for multiple sends & receives
10549
10550         * src/SDCCmain.c:
10551         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10552         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10553            set preprocessor defines (depending on options)
10554
10555         * src/SDCCicode.c, src/SDCCicode.h:
10556         changes made to handle multiple sends & receives
10557
10558         * src/SDCCglobl.h:
10559         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10560
10561         * src/SDCCcse.c, src/SDCCcse.h:
10562         added function findbackward def (to be used in upcoming optimization)
10563
10564         * src/SDCCcflow.c, src/SDCCcflow.h:
10565         added function returnAtEnd - to determine if a basic block terminates with
10566         a RETURN iCode
10567
10568         * src/SDCCast.c, src/SDCCast.h:
10569         added option parms-in-bank1
10570
10571         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10572         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10573         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10574         adjusted for --parms-in-bank1 option
10575
10576         * device/include/string.h:
10577         donot redefine "reentrant" keyword
10578
10579         * device/include/ds80c390.h: Added some more SFRs
10580
10581 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10582
10583         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10584
10585 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10586
10587         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10588
10589 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10590
10591         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10592
10593 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10594
10595         * Added --xram-movc option
10596
10597 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10598
10599         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10600
10601 2002-01-11  Johan Knol
10602
10603         * Added math lib of Jesus Calvino-Fraga
10604
10605 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10606
10607         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10608         * support/regression/Makefile: new target test-mcs51-stack-auto
10609         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10610
10611 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10612
10613         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10614
10615 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10616
10617         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10618
10619 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10620
10621         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10622
10623         * src/SDCCglue.h: add definition for printIvalChar()
10624
10625 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10626
10627         * src/SDCCast.c: fix #498138 by Johan
10628
10629         * src/SDCCglue.c: fix #498138 by Johan
10630
10631 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10632
10633         * support/regression/Makefile: fix clean
10634
10635         * support/regression/ports/ds390/support.c: fix transmission of last character
10636
10637 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10638
10639         * /sdcc/src/ds390/gen.c:
10640         a) improved computing address of stack variable
10641         b) took out some #if 0 code
10642         c) improved parmBytes adjustment
10643         d) improved genPlusIncr & genMinusIncr
10644         e) genCmp could generate bad code (when left assigned to DPTR)
10645         f) Fixed bug in hasInc
10646
10647         * /sdcc/src/ds390/ralloc.c:
10648         a) packRegsForSupport could mess up live information (Fixed)
10649         b) packRegsDPTRuse could be incorrect for left & right shift
10650
10651         * /sdcc/src/mcs51/ralloc.c:
10652         packRegsForSupport could mess up the live information (Fixed)
10653
10654         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10655
10656         * /sdcc/src/SDCCast.c:
10657         can reverse a loop even if function call is present as long
10658         as the loop control variable is local & is not passed as parameter
10659
10660 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10661
10662         * /sdcc/ChangeLog: *** empty log message ***
10663
10664         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10665         More builtin function additions for TININative
10666
10667         * /sdcc/src/ds390/ralloc.c:
10668         Had broken the regression testsuite
10669
10670         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10671
10672         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10673         Added funcattr hasStackParms will be set for reentrant functions when there
10674         are paramteres on the stack, this helps in minimizing frame pointer generation
10675         typeFromStr can handle function pointers now
10676
10677         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10678         *** empty log message ***
10679
10680 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10681
10682         * /src/ds390/gen.c, /src/ds390/main.c:
10683         More builtin function additions for TININative
10684
10685         * /src/ds390/ralloc.c:
10686         Had broken the regression testsuite
10687
10688         * /src/SDCCast.c: Fixed a bug in dumptree
10689
10690         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10691         Added funcattr hasStackParms will be set for reentrant functions when there
10692         are paramteres on the stack, this helps in minimizing frame pointer generation
10693         typeFromStr can handle function pointers now
10694
10695         * /doc/builtins.txt, /doc/TININative.txt:
10696         *** empty log message ***
10697
10698
10699 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10700
10701         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10702         ALPHA version for -mTININative
10703
10704         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10705         updated to reflect changes in the port structure
10706
10707         * /src/port.h:
10708         added function do_assemble (similar to do_link) if non-null this function
10709         will be called to do assembly (-mTININative) requires a multi command
10710         assembly
10711         added function genAssemblerEnd will be called to generate assembler Epilogue
10712
10713         * /src/SDCCsymt.c:
10714         added _JavaNative to debug info printing
10715
10716         * /src/SDCCmain.c: added option --tini-libid
10717         added port->do_assemble function (-mTININative) has a multi command assemble
10718
10719         * /src/SDCCglue.c: Disabled "constExpr" check
10720         added port->genAssemblerEnd function
10721
10722         * /src/SDCCglobl.h: Added option --tini-libid value
10723
10724         * /src/SDCCast.h:
10725         tookout optimizeCompare from the header (has no external references)
10726
10727         * /src/SDCCast.c: made one more function "static"
10728
10729 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10730
10731         * src/z80/mappings.i: Added z80asm support.
10732
10733         * src/z80/main.c: Added z80asm support on --asm=z80asm
10734
10735         * src/z80/gen.c: Fixed asm portability issues.
10736
10737         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10738
10739         * src/SDCCglue.c (printExterns): Added global/extern split.
10740
10741 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10742
10743         * support/regression/Makefile: added test for mcs51 model large
10744
10745         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10746
10747         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10748
10749 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10750
10751         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10752
10753 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10754
10755         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10756
10757         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10758
10759 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10760
10761         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10762
10763         * support/regression/tests/simplefloat.c: Port to mcs51.
10764
10765 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10766         * support/regression/tests/bug-485362.c: Added.
10767
10768         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10769
10770         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10771
10772         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10773
10774         * src/z80/gen.c (aopDump): Added a dump function.
10775
10776 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10777         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10778
10779         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10780
10781         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10782
10783         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10784
10785         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10786
10787         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10788
10789         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10790
10791         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10792
10793         * support/regression/ports/ds390/support.c: Use tinibios.
10794
10795         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10796
10797 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10798
10799         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10800         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10801
10802         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10803
10804         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10805
10806 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10807
10808         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10809
10810         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10811         (packRegsForIYUse): Created and optimised.
10812
10813 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10814
10815         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10816 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10817
10818         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10819
10820         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10821
10822         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10823
10824 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10825
10826         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10827
10828         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10829
10830 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10831
10832         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10833
10834         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10835
10836         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10837
10838 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10839
10840         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10841         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10842         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10843
10844         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10845
10846         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10847         (genNotFloat): Added.
10848         (genUminusFloat): Added.
10849
10850         * device/lib/z80/Makefile: Added floating pt stubs.
10851
10852         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10853
10854         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10855
10856         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10857
10858 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10859
10860         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10861
10862         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10863
10864         * sdcc/support/regression/Makefile: Add port ds390.
10865
10866         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10867
10868         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10869
10870         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10871
10872         * sdcc/support/regression/ports/ds390/support.c: Added.
10873
10874         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10875
10876         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10877
10878         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10879
10880 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10881
10882         * device/include/malloc.h: Added z80 and gbz80 support.
10883
10884         * device/lib/gbz80/heap.s: Added.
10885
10886         * device/lib/z80/heap.s: Added.
10887
10888         * device/lib/malloc.c: Added z80 and gbz80 support.
10889
10890         * support/regression/tests/malloc.c (testMalloc): Added.
10891
10892         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10893
10894         * support/regression/tests/bug-478094.c: Added.
10895
10896         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10897
10898 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10899
10900         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10901
10902         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10903
10904         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10905
10906         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10907
10908         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10909
10910 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10911
10912         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10913
10914 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10915
10916         * support/regression/tests/bug-477927.c: Added.
10917
10918         * src/z80/peeph.def: Added minor rules.
10919
10920         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10921
10922         * src/z80/peeph.def: Added jump optimisation modification.
10923
10924 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10925
10926         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10927
10928 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10929
10930         * support/regression/tests/funptrs.c: Added.
10931
10932 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10933
10934         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10935
10936 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10937
10938         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10939
10940         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10941
10942         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10943         (movLeft2ResultLong): Created.
10944
10945         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10946         (joinPushes): Added.  Joins two char pushes into a word push.
10947
10948 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10949
10950         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10951
10952         * support/makebin/Makefile (install): Added creation of dest dir.
10953
10954 2001-10-24 Karl Bongers <karl AT turbobit.com>
10955
10956         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10957
10958 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10959
10960         * src/z80/ralloc.c: Turned off faulty pack for one use.
10961
10962         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10963
10964         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10965
10966 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10967
10968         * support/regression/Makefile: Improved clean
10969
10970         * support/regression/ports/gbz80/spec.mk: Added clean
10971
10972         * support/regression/ports/host/spec.mk: Added clean
10973
10974         * support/regression/ports/z80/spec.mk: Added clean
10975
10976         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10977
10978         * support/regression/ports/mcs51/timeout.c: little improvements
10979
10980 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10981
10982         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10983
10984         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10985
10986         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10987
10988 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10989
10990         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10991
10992         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10993
10994 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10995         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10996
10997         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10998
10999         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11000
11001         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11002
11003         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11004
11005         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11006
11007         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11008
11009         * support/regression/tests/longor.c: Added.
11010
11011 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11012
11013         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11014
11015         * as/mcs51/aslink.h: define PATH_MAX
11016
11017         * as/mcs51/asm.h: define PATH_MAX
11018
11019         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11020
11021         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11022
11023         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11024
11025         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11026
11027         * src/SDCCglobl.h: define PATH_MAX
11028
11029         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11030
11031         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11032
11033 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11034
11035         * src/z80/gen.c (gencjneshort): Fixed
11036
11037         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11038
11039 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11040
11041         * support/regression/tests/bug-469671.c: Added.
11042
11043         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11044
11045 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11046
11047         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11048
11049         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11050
11051 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11052
11053         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11054
11055         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11056
11057         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11058
11059         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11060
11061         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11062
11063         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11064
11065         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11066
11067 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11068
11069         * 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.
11070
11071         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11072
11073         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11074
11075 2001-10-07    <johan AT FRIJA>
11076
11077         * device/lib/gets.c (gets): fixed the return value.
11078
11079 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11080         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11081
11082         * 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.
11083
11084         * 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.
11085
11086         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11087
11088         * src/pic/gen.c: Removed Safe_strdup.
11089
11090         * configure.in: Added option to enable libgc support.
11091
11092         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11093         (bitVectUnion): Optimised.
11094         (bitVectIntersect): Optimised.
11095         (bitVectBitsInCommon): Optimised.
11096         (bitVectCplAnd): Optimised.
11097
11098         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11099
11100 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11101
11102         * src/SDCCmain.c: distinguish between assembler debug and plain options
11103
11104         * src/avr/main.c:   remove standard assembler options
11105
11106         * src/ds390/main.c: remove standard assembler options
11107
11108         * src/mcs51/main.c: remove standard assembler options
11109
11110         * src/port.h: removed "PENDING" comment
11111
11112 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11113
11114         * src/device/lib/_mulint.c  : new, with assember functions
11115
11116         * src/device/lib/_mullong.c : new, with assember functions
11117
11118         * src/device/lib/_divuint.c : with assember functions
11119
11120         * src/device/lib/_divsint.c : with assember functions
11121
11122         * src/device/lib/_divulong.c: with assember functions
11123
11124         * src/device/lib/_divslong.c: with assember functions
11125
11126         * src/device/lib/_moduint.c : with assember functions
11127
11128         * src/device/lib/_modsint.c : with assember functions
11129
11130         * src/device/lib/_modulong.c: with assember functions
11131
11132         * src/device/lib/_modslong.c: with assember functions
11133
11134         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11135
11136         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11137
11138         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11139                                       replaced _mululong.c and _mulslong.c by _mullong.c
11140
11141 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11142
11143         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11144
11145 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11146
11147         * src/SDCCglue.c: test, if win32api is available for MINGW
11148
11149 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11150
11151         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11152         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11153         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11154         * support/regression/ports/host/spec.mk: removed GENERIC
11155         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11156         * support/regression/ports/z80/spec.mk: removed GENERIC
11157
11158 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11159
11160         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11161
11162         * support/regression/tests/bug-467035.c: Created.
11163
11164 2001-10-01    <johan AT FRIJA>
11165
11166         * src/SDCC.y: fixed bug #466586 part 1
11167
11168 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11169
11170         * SDCCicode.c: z80 has no generic pointers
11171         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11172
11173 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11174
11175         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11176
11177 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11178
11179         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11180
11181         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11182
11183 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11184
11185         * configure.in: Fixed up so that ucsim is only configured once.
11186
11187         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11188
11189         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11190         (getPathDifference): As above.
11191
11192         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11193
11194         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11195
11196 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11197         * .version: Updated to 2.3.1
11198
11199         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11200         Added copyright header.
11201
11202         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11203         (assemble): Added support for macro based assembler commands.
11204         (linkEdit): Added support for macro based linker commands.
11205         (preProcess): Changed the pre-processor to use macros.
11206         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11207         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11208
11209         * device/lib/z80/crt0.s: Added module name for debugging.
11210
11211 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11212
11213         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11214
11215         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11216
11217         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11218
11219         * src/Makefile.in: Added SDCCmacro and SDCCutil
11220
11221 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11222
11223         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11224
11225 2001-09-16    <johan AT FRIJA>
11226
11227         * 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.
11228
11229 2001-09-15    <johan AT FRIJA>
11230
11231         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11232         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11233
11234 2001-09-11    <johan AT FRIJA>
11235
11236         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11237
11238 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11239
11240         * support/regression/tests/bug-460444.c: Added test case.
11241
11242         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11243         (genCast): Added justification for all of the asserts.
11244
11245 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11246
11247         * support/regression/support.c: _xdata replaced by xdata
11248
11249         * support/regression/spec.mk: removed _generic
11250
11251 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11252
11253         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11254
11255         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11256         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11257
11258         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11259
11260         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11261
11262         * support/regression/tests/bug-460010.c: Added test case.
11263
11264         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11265
11266 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11267
11268         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11269
11270         * support/regression/testfwk.c: removed workaround for bug #436344
11271
11272         * support/regression/tests/bp.c: use less memory with mcs51
11273
11274         * support/regression/tests/bug-441448.c: use less memory
11275
11276         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11277
11278         * support/regression/collate-results.py: typo
11279
11280 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11281
11282         * support/regression/tests/fetchoverlap.c: Added new test case.
11283
11284         * support/regression/tests/bp.c: Added new test case.
11285
11286         * support/regression/tests/bug-448984.c: Added new test case.
11287
11288         * support/regression/tests/pow2shifts.c: Added new test case.
11289
11290         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11291         (genlshTwo): Fixed right shift for count > 8.
11292
11293         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11294
11295 2001-09-08    <johan AT FRIJA>
11296
11297         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11298
11299 2001-09-07    <johan AT FRIJA>
11300
11301         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11302
11303         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11304
11305 2001-09-06    <johan AT FRIJA>
11306
11307         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11308         * bernhard noted me at this: "() equals to (void)" (1.38)
11309
11310 2001-09-05    <johan AT FRIJA>
11311
11312         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11313
11314 2001-09-04    <johan AT FRIJA>
11315
11316         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11317
11318
11319 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11320
11321         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11322
11323 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11324
11325         * link/z80/aslink.h: Fixed path for PATH_MAX
11326
11327 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11328
11329         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11330
11331         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11332
11333         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11334
11335         * 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.
11336
11337 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11338
11339         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11340         (genCmp): Fixed up genCmp for the GB with longs.
11341
11342         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11343
11344         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11345
11346         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11347
11348         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11349
11350 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11351
11352         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11353
11354 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11355
11356         * 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.
11357
11358         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11359
11360 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11361
11362         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11363
11364         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11365
11366 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11367
11368   * sim/ucsim/configure:    little improvement of Cygwin-detection
11369   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11370   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11371   * support/regression/tests/bug-221100.c: small changes for mcs51
11372   * support/regression/tests/bug-221168.c: small changes for mcs51
11373   * support/regression/tests/bug-227710.c: small changes for mcs51
11374   * support/regression/tests/staticinit.c: small changes for mcs51
11375   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11376   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11377   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11378
11379 $Revision$