* support/valdiag/valdiag.py: added -DPORT_HOST=1
[fw/sdcc] / ChangeLog
1 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
2
3         * src/SDCCval.c (checkConstantRange): added
4         * src/SDCCval.h: added checkConstantRange
5         * support/Util/SDCCerr.c,
6         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
7         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
8         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
9         * src/SDCCast.c (decorateType): added checkConstantRange,
10         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
11         can be emitted with the correct always true/false warning,
12         added optimization for double '!';
13         result of decorateType() must be assigned back to the tree, because
14         decorateType() can change the tree
15         * src/SDCCicode.c (geniCodeLogic),
16         (geniCodeAssign): replaced new checkConstantRange, added warnings,
17         (checkConstantRange): removed, it was only a fragment which never
18         emitted a warning
19         * src/SDCCsymt.c (computeType): fixed promotion for
20         "-1 < (unsigned bit) b"
21         * src/pic/ralloc.c (packRegsForAssign),
22         * src/pic16/ralloc.c (packRegsForAssign),
23         * src/hc08/ralloc.c (packRegsForAssign),
24         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
25         from mcs51
26         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
27         * support/regression/tests/constantRange.c: added
28         * support/valdiag/tests/constantRange.c: added
29         * support/valdiag/valdiag.py: added -DPORT_HOST=1
30
31 2006-06-02 Borut Razem <borut.razem AT siol.net>
32
33         * support/regression/ports/pic16/support.c: increase stack size
34           to 255 bytes
35         * support/regression/Makefile.in: sort tests by name so that the
36           resutlts can be compared on different machines / platforms
37
38 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
39
40         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
41         * src/ds390/gen.c (emitLabel): new, added,
42           (genDjnz): fixed stack overflow bug,
43           (throughout): cosmetic changes to sync with mcs51/gen.c,
44           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
45         * src/mcs51/gen.c (genEndFunction): small optimization,
46           (throughout): cosmetic changes to sync with ds390/gen.c
47
48 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
49
50         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
51           (_print_format): fixed printing pointers
52         * src/mcs51/gen.c (emitLabel, movb): new, added,
53           (genAssign): small optimization,
54           (genDjnz): fixed stack overflow bug,
55           (throughout): replaced sprintf with SNPRINTF,
56           replaced mcs51_regWithIdx with REG_WITH_INDEX,
57           replaced emitcode("mov", "b,...") with MOVB(...),
58           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
59           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
60         * src/mcs51/peeph.def: added rules 140 and 264
61         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
62           so they may get optimized into registers
63
64 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
65
66         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
67           immediately when encountered,
68           (printUsage): always use stderr even on windows
69
70 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
71
72         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
73         (processParms): fixed bug #1247551
74         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
75         parseCmdLine, main): print '--version' to stdout,
76         print 'help' to stdout if --help is given,
77         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
78         arguments are given; fixed --help
79
80 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
81
82         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
83         * support/regression/tests/bug-1493710.c: added
84
85 2006-05-27 Borut Razem <borut.razem AT siol.net>
86
87         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
88           static instead auto
89         * support/regression/ports/pic16/support.c: increase stack size
90           from default 64 bytes to 128 bytes
91         * support/regression/tests/staticinit.c,
92           support/regression/tests/float.c: regression tests fully enabled
93           for pic16 port by putting the initialized data arrays into the code
94           section
95         * support/regression/ports/pic16/spec.mk: don't link default libraries.
96           This was changed by mistake in the previous version.
97
98 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
99
100         * src/pic16/gen.c (genFunction, genEndFunction): some
101         beautifications, fixed bug with falsely restoring FSR2 in large
102         stack model, thanks to Beau E. Cox for reporting the bug
103
104 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
105
106         * debugger/mcs51/break.c,
107         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
108           use %p to print pointers, made address variables unsigned
109         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
110         * debugger/mcs51/symtab.c (parseSymbol): must return something
111         * src/mcs51/gen.c (aopForSym): small optimization,
112            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
113           (freeAsmop): added missing break,
114           (aopPut): removed parameter bvolatile, determine it inside the function,
115           (saveRegisters, unsaveRegisters): small optimization,
116           (genIpush): removed pointless check,
117           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
118           replaced sprintf with SNPRINTF,
119           replaced strcpy with strncpyz,
120           updated aopPut calls,
121           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
122         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
123
124 2006-05-24 Borut Razem <borut.razem AT siol.net>
125
126         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
127           modification of test for the pic16 port, put the array to the code
128           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
129
130 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
131
132         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
133         * support/Util/pstdint.h: added
134
135 2006-05-22 Borut Razem <borut.razem AT siol.net>
136
137         * src/regression/Makefile: removed bool2.c test, added -q linker option
138         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
139           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
140           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
141           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
142           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
143           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
144           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
145           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
146           define SUPPORT_BIT_TYPES 0, removed unused bit variables
147
148 2006-05-22 Raphael Neider <rneider AT web.de>
149
150         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
151           bug #1492360 (problematic due to generic pointers, see code)
152
153 2006-05-22 Borut Razem <borut.razem AT siol.net>
154
155         * support/regression/ports/pic16/specs.mk: removed stack size linker
156           directive
157         * support/regression/tests/array.c,
158           support/regression/tests/bitopcse.c,
159           support/regression/tests/bug-908454.c,
160           support/regression/tests/malloc.c: modified for pic16 regression test
161         * support/regression/tests/bitfields.c:
162           pic16 - excluded bitfileds of size > 8
163         * support/regression/tests/bp.c: pic16 - reduced data size
164         * support/regression/tests/bug-221100.c: pic16 - reduced data size
165         * support/regression/tests/bug-460010.c:
166           pic16 - used the absolute address the fits in memory
167         * support/regression/tests/bug-716242.c:
168           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
169         * support/regression/tests/float.c:
170           pic16 - excluded - data size too big
171         * support/regression/tests/onebyte.c:
172           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
173         * support/regression/tests/shifts.c:
174           pic16 - function names probably have to differ in first X characters
175           (gpasm limitation?)
176         * support/regression/tests/staticinit.c:
177           pic16 - excluded some tests due error: no target memory available for
178           section ".idata"
179
180 2006-05-22 Borut Razem <borut.razem AT siol.net>
181
182         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
183           second try. Thanks Stas Sergeev once more.
184
185 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
186
187         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
188           (genLeftShift, genRightShift): fixed bug 1491627
189         * src/hc08/peeph.def (rules 7, 8.x): added
190         * support/regression/tests/shifts.c (ShiftLeftByParam,
191           ShiftRightByParam, testShiftByParam): added to test variable shifting
192
193 2006-05-20 Raphael Neider <rneider AT web.de>
194
195         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
196         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
197           (allocReg): add only new registers to dynAllocRegs,
198           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
199             #1489055, #1445850, and probably #1483693
200
201 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
202
203         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
204         bug in for-loop that didn't emit the last of CONFIG and ID registers
205
206 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
207
208         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
209           with offset
210         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
211           1489016, 1434401 and 1490124
212         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
213           1489016, 1434401 and 1490124
214
215 2006-05-17 Borut Razem <borut.razem AT siol.net>
216
217         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
218           thanks Stas Sergeev
219
220 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
221
222         * device/include/mcs51/P89c51RD2.h,
223         * device/include/mcs51/P89LPC901.h,
224         * device/include/mcs51/P89LPC922.h,
225         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
226
227 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
228
229         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
230         to fix missing stack pragma in compiled binary object file,
231
232 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
233
234         * support/packihx/configure.in,
235         * support/packihx/configure: removed warning, autoconf >= 2.5x can
236         determine sizeof basic types even while cross compiling
237
238 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
239
240         * src/avr/gen.c (aopop),
241         * src/ds390/gen.c (aopOp),
242         * src/hc08/gen.c (aopOp),
243         * src/mcs51/gen.c (aopop),
244         * src/pic16/gen.c (pic16_aopOp),
245         * src/pic/gen.c (aopOp),
246         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
247         if size of operand is smaller than spill location
248
249 2006-05-12 Borut Razem <borut.razem AT siol.net>
250
251         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
252           have to have CR/LF line endings even if they are checked out on *nix
253           or on WIN32 in cygwin binmode
254
255 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
256
257         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
258         * device/include/ds80c390.h: added sfr16 definitions
259         * src/ds390/gen.c,
260         * src/ds390/gen.h,
261         * src/ds390/main.c,
262         * src/ds390/ralloc.c,
263         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
264           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
265           bit returning functions
266         * support/regression/tests/sfr16.c: enabled test on ds390
267
268 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
269
270         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
271         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
272
273 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
274
275         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
276         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
277           (cl_address_space constructor): removed expensive initialization,
278           (cl_address_space::get_cell): extended for late initialization,
279           (cl_address_space::*): use late initialization,
280           (cl_address_decoder::activate): removed expensive initialization,
281           This reduced regression test running time by 25%
282
283 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
284
285         * packihx/,
286         * configure.in,
287         * configure,
288         * sdcc.dsw,
289         * Makefile.bcc,
290         * Makefile.in,
291         * support/packihx/Makefile.in,
292         * support/packihx/clean.mk,
293         * support/packihx/Makefile.bcc,
294         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
295
296 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
297
298         * src/SDCCval.c (valNot): fix for regression test failure
299           of not.c on big endian hosts
300
301 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
302
303         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
304
305 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
306
307         * device/lib/mcs51/Makefile.in: changed string comparison operator
308           to = for POSIX compliance; == is bash extension
309
310 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
311
312         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
313           kosmonaut_pirx
314
315 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
316
317         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
318         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
319         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
320         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
321         bug report #1478657,
322
323 2006-05-05 Borut Razem <borut.razem AT siol.net>
324
325         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
326           making the html
327
328 2006-05-02 Borut Razem <borut.razem AT siol.net>
329
330         * doc/Makefile.in: removed *.ind dependency since there is no rule to
331           create *.ind, which made make to fail if invoked with -j 2
332
333 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
334
335         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
336           Hubert Sack for patch 1479782
337
338 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
339
340         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
341
342 2006-05-01 Raphael Neider <rneider AT web.de>
343
344         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
345           (create_pic): store only prefix-free device name,
346           (init_pic): check for device names with "16" prefix,
347           (list_valid_pics),
348         * src/pic/device.h (struct PIC_device),
349         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
350             stored device name,
351         * device/include/pic/pic12f{635,675,629,683}.h,
352         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
353         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
354         * device/include/pic/pic16f505.h,
355         * device/lib/pic/libdev/pic16f505.c: removed
356         * device/include/pic/pic14devices.txt: added support for pic12f
357             devices, removed unsupported non 16-bit devices
358             [above changes provided by patch from Zik Saleeba]
359         * src/pic/*, src/pic16/*, device/include/pic16/*,
360           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
361
362 2006-05-01 Borut Razem <borut.razem AT siol.net>
363
364         * configure.in, configure, doc/Makefile.in:
365           sync with nightly build makefile - latex, dvipdf and dvips
366           not needed any more
367
368 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
369
370         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
371         in the library source
372
373 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
374
375         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
376
377 2006-04-28 Raphael Neider <rneider AT web.de>
378
379         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
380         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
381           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
382         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
383
384 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
385
386         * device/lib/pic/libdev/Makefile.in,
387         * device/lib/hc08/Makefile.in,
388         * device/lib/gbz80/Makefile.in,
389         * device/lib/z80/Makefile.in,
390         * device/lib/ds390/Makefile.in,
391         * device/lib/ds400/Makefile.in: added srcdir to include search path,
392         thanks to Borut for the bug report
393         * configure.in,
394         * configure: always create doc/Makefile independent from --enable-doc
395         * Makefile.in: always install from directory doc independent from
396         --enable-doc
397         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
398         removed
399         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
400         * doc/Makefile.in: install *.txt if present
401         * device/include/Makefile.in (install): added installation of pic/*.inc
402         and pic/*.txt files again, they were erroneously removed
403
404 2006-04-28 Raphael Neider <rneider AT web.de>
405
406         * src/pic/{gen.c,main.h,pcode.c},
407         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
408             concerning signedness with casts
409
410 2006-04-28 Raphael Neider <rneider AT web.de>
411
412         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
413             definition of an interrupt handler,
414         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
415             interrupt handler stuff from picglue() to separate routine,
416           (picglue): enabled definition of intr handlers in files w/o main()
417
418 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
419
420         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
421           compilation with MSVC 2005 Express Edition (VC8)
422
423 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
424
425         * device/lib/Makefile: fixed build of gbz80 lib
426
427 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
428
429         * support/regression/tests/bug-460010.c,
430         * support/regression/tests/bug-524691.c,
431         * support/regression/tests/bug-716242.c: removed conditional defines
432           that are already in testfwk.h
433
434 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
435
436         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
437           (AccAXRsh1): added, shift right by 1,
438           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
439            AccAXLrl1
440         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
441
442 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
443
444         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
445         remove cast to same type
446         * src/SDCCast.c (decorateType): fix for RFE 1475742,
447         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
448         * as/z80/Makefile,
449         * link/z80/Makefile: removed, they have moved to
450         Makefile.in files
451         * configure,
452         * configure.in: replaced duplicate message about ucsim by missing sdcpp
453         * install-sh: fix bug #1204398 by setting umask 0022
454         * device/lib/Makefile: separate build of z80 and gbz80 lib
455
456 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
457
458         Enabled VPATH feature: changed nearly all Makefiles (149 files).
459         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
460
461         One basic decision: e.g. src/clean.mk includes further files. In order
462         to make this work there are two solutions:
463         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
464           run configure on them. This way they can use
465           'include $(srcdir)/port-clean.mk'
466         - always include clean.mk by the Makefile at the same level. To avoid
467           that `make clean` tries to include and build Makefile.dep the
468           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
469           implemented, because now even `make uninstall` doesn't create
470           Makefile.in. clean.mk could be eliminated by pasting it in
471           Makefile.in.
472
473         * debugger/mcs51/Makefile.in: build own objects from library sources
474         (SLIB, SDCC) in current directory
475
476         * configure, configure.in: renamed --disable-device-lib-build in
477         --disable-device-lib; added --enable-doc, the required tools are
478         searched by configure; added result message; the toolchain for the
479         belonging ports are now only built, if the port is enabled.
480
481         * support/regression/*: all output is written in directory gen, because
482         the fwk and ports directories don't livet in the build tree using vpath
483
484         * doc/sdccman.lyx: renamed --disable-device-lib-build to
485         --disable-device-lib, added --enable-doc, added section VPATH
486
487         * sim/ucsim/configure.in,
488         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
489         z80 are enabled by default
490
491 2006-04-24 Raphael Neider <rneider AT web.de>
492
493         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
494             to config word, "pic14_"-prefixed some extern functions
495           (pic14_emitConfigWord): emit __config directive(s) if assignment to
496             config word has been found
497         * src/pic/device.h: added prototypes
498         * src/pic/pcode.c: added "pic14_"-prefix where needed
499         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
500             fixup
501         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
502             words,
503           (pic14emitRegularMap): ignore config words,
504           (pic14createInterruptVect): moved generating __config directives away
505           (picglue): have __config directives emitted
506
507 2006-04-24 Borut Razem <borut.razem AT siol.net>
508
509         * doc/Makefile: sync with nightly build makefile
510
511 2006-04-24 Raphael Neider <rneider AT web.de>
512
513         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
514             registers that have not been assigned proper liveranges,
515             fixes #1469504 and #1474602,
516           (pCodeRegOptimizeRegUsage): fixed typo in comment
517
518 2006-04-24 Borut Razem <borut.razem AT siol.net>
519
520         * device/examples/main8051.c: deleted - it was removed from CVS
521           24.mar.2000 and after that modified 18.feb.2001, so it reappered
522           after the transition to Subversion
523         * src/SDCCalloc.h: deleted - it was removed  from CVS
524           3.feb.2001 and after that modified 18.feb.2001, so it reappered
525           after the transition to Subversion
526         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
527           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
528           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
529           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
530
531 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
532
533         * as/asx8051.dsp: added mcs51/strcmpi.h
534         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
535         * as/hc08/aslink.h: updated lnksect prototype
536         * as/hc08/asm.h,
537         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
538         * as/hc08/asmain.c,
539         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
540           (newdot): handle A_ABS
541         * as/hc08/asout.c,
542         * as/mcs51/asout.c (outarea): output address
543         * as/hc08/lkaomf51.c,
544         * as/mcs51/lkaomf51.c: disabled unused array UsageType
545         * as/hc08/m08pst.c,
546         * as/mcs51/i51pst.c,
547         * as/z80/z80pst.c: "ABS" is not A_OVR
548         * as/hc08/lkarea.c (newarea): read a_addr,
549           (lnkarea): added codemap array, sort absolute areas to the front,
550            combine all GSINITx/GSFINAL,
551           (find_empty_space, allocate_space): new functions,
552           (lnksect): return next address, handle absolute sections
553         * as/mcs51/lkarea.c (newarea): read a_addr,
554           lnksect2 prototype changed,
555           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
556           (find_empty_space, allocate_space): new, factored out of lnksect2,
557           (lnksect2): return next address, handle absolute sections
558         * as/hc08/lkhead.c,
559         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
560         * as/hc08/lklibr.c (addfile, fndsym),
561         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
562           index out of range and detect both '\' and '/'
563         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
564         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
565           regression tests (ds390 cannot return bool yet)
566         * doc/sdccman.lyx: changed version number, document changed --no-peep,
567           document critical interrupts on z80, document changed SDCC define
568         * src/asm.c (_asxxxx_mapping): fixed .org directive,
569           (_a390_mapping): added .org directive
570         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
571           (genMultOneByte): fixed warnings
572         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
573           ones
574         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
575         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
576           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
577         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
578         * src/pic16/main.c: removed newReg prototype
579         * src/pic16/pcode.c,
580         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
581           warnings
582         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
583           ones
584         * src/pic16/ralloc.c
585         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
586           to fix warnings
587         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
588           from short to PIC_OPTYPE
589         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
590         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
591           optype from short to PIC_OPTYPE
592         * src/port.h: made int_size unsigned to fix warnings
593         * src/SDCC.y: fixed warning on MSVC
594         * src/SDCCicode.c (getArraySizePtr): return unsigned int
595         * src/SDCCopt.c (convertToFcall): fixed warnings
596         * src/SDCCsymt.h: removed double prototype for genSymName
597         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
598           offset int to fix warnings
599
600 2006-04-22 Borut Razem <borut.razem AT siol.net>
601
602         * doc/sdccman.lyx, */Makefile, */Makefile.in:
603           references to CVS replaced with Subversion
604
605 2006-04-21 Borut Razem <borut.razem AT siol.net>
606
607         * doc/sdccman.lyx, */Makefile, */Makefile.in:
608           references to CVS replaced with Subversion
609
610 2006-04-19 Borut Razem <borut.razem AT siol.net>
611
612         * src/version.awk: adapted for svn
613         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
614           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
615           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
616           /binutils-avr/etc/*.vi, *.jin: removed all properties
617           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
618
619 2006-04-19 Borut Razem <borut.razem AT siol.net>
620
621         * CVS to Subversion migration completed
622
623 2006-04-18 Borut Razem <borut.razem AT siol.net>
624
625         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
626           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
627
628 2006-04-17 Borut Razem <borut.razem AT siol.net>
629
630         * device/include/Makefile.in: added pic/*.inc to the installation
631
632 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
633
634         * support/regression/collate-results.py: fixed output in case of
635         a valdiag error
636         * support/regression/generate-cases.py: fixed splitting of pathnames
637         with dots
638         * as/hc08/lklibr.c (addfile),
639         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
640
641 2006-04-11 Raphael Neider <rneider AT web.de>
642
643         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
644         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
645         * src/pic16/pcode.c (assignValnums): fixed #1460578
646
647 2006-04-11 Raphael Neider <rneider AT web.de>
648
649         * device/lib/pic/libdev/*.c,
650         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
651           fixes #1468739, enables compilation in --std-c99 mode
652         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
653
654 2006-04-11 Raphael Neider <rneider AT web.de>
655
656         * src/pic/device.c (find_device): removed debug output
657           (list_valid_pics): enabled verbose listing of supported devices
658         * device/include/stdbool.h: define bool as char for pic14/16 as well
659
660 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
661
662         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
663
664 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
665
666         * .version: bumped version to 2.5.6
667         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
668
669 2006-04-06 Raphael Neider <rneider AT web.de>
670
671         * .version: bumped version to 2.5.6 (pic14 ABI changed)
672         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
673         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
674           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
675             pic14_constructAbsMap
676           (pic14printPublics): declare absolute global symbols as global
677           (pic14createInterruptVect),
678         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
679           (newReg): assume new registers unused, use correct name in
680             hashtable (reg->name instead of name), more debugLog output
681         * src/pic/device.h (PIC_device): added fields for verbose output
682         * src/pic/device.c: moved device definition to pic14devices.txt,
683             added routines for runtime parsing of pic14devices.txt,
684             added support for second config word
685         * src/pic/main.c (_process_pragma): removed #pragma maxram,
686           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
687           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
688           (_pic14_parseOptions): moved pCodeInitRegisters here
689           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
690         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
691           (pCodeInitRegisters): rewrapped comments, perpared new approach to
692             handling the pseudo stack
693         * device/lib/Makefile.in: ignore failures in objects-pic16,
694         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
695         * device/lib/pic/NEWS: document new dependency on picXXX.lib
696         * device/lib/pic/Makefile.subdir,
697         * device/lib/pic16/Makefile.subdir: improved clean rules
698         * device/lib/pic/libdev/: NEW, pic14 device libraries
699         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
700         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
701         * device/include/Makefile.in: create subdir and install pic14 headers
702         * device/include/pic/p16f_common.inc: removed unused declarations
703         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
704             PICs from inc2h.pl v1.6,
705             replaced BIT_AT macros with struct declarations
706         * device/include/pic/pic14devices.txt: definition of supported devices,
707             all above improvements contributed by Zik Saleeba, thanks
708         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
709         * support/scripts/sdcc.nsi: also install pic14 device libraries and
710             headers
711
712 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
713
714         * device/include/mcs51/c8051f410.h: added interrupt numbers,
715         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
716           thanks to Charles Olds
717
718 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
719
720         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
721
722 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
723
724         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
725         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
726         * support/regression/bug1464657.c: added, new test
727
728 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
729
730         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
731           version number
732
733 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
734
735         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
736           --no-peep and --peep-file <file> are used don't use default rules but
737           do use the <file>
738
739 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
740
741         * src/mcs51/gen.c (genCall): fixed bug 1457608
742
743 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
744
745         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
746         changes seem to cause (trigger?) problems with the build system.
747
748 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
749
750         * src/SDCCpeeph.c (operandsLiteral): new, added,
751           (callFuncByName): inserted operandsLiteral
752         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
753
754 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
755
756         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
757         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
758
759 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
760
761         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
762           implemented patch 1120823 Thanks to Willy De la Court (normal
763           interrupts need an interrupt number now if they are made critical),
764           and enabled nesting of critical functions though not for gbz80
765           (genCritical, genEndCritical): added functions
766           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
767         * src/z80/mappings.i: added "ei" to all mappings
768
769 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
770
771         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
772         submitted by the Debian SDCC maintainer Aurelien Jarno:
773         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
774         archive with gcc 4.1 on mips and wrote the patch"
775
776 2006-03-16 Raphael Neider <rneider AT web.de>
777
778         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
779           the left operand is shorter than the result (c* = lit-c* + int),
780           fixes bug #1450796
781         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
782           OP_SYMBOL
783
784 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
785
786         * src/.version: increased version number to 2.5.5
787         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
788         linking is done manually in pic16 port's _linkEdit,
789         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
790         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
791         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
792         allocate asmop as AOP_ACC,
793         (aopForRemat): added parameter 'bool result' in function declaration,
794         (pic16_aopGet): return AOP_ACC when accessing WREG,
795         (pic16_popGetTempReg): minor modification,
796         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
797         'pic16_allocWithIdx',
798         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
799         calling function in absolute addresses,
800         (genAssign): take into account AOP_ACC asmop,
801         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
802         * src/pic16/pcoderegs.c: some debug functions and lines added,
803         * src/pic16/ralloc.c (decodeRegType): added but commented out,
804         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
805         register too,
806         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
807         call to allocReg, not by manually allocating a new one,
808         (pic16_assignRegisters): now before going through the register
809         allocating functions mark all registers as free. This eliminates some
810         side effects resulting from peephole parser done earlier in the backbone
811
812 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
813
814         * src/SDCCicode.c (geniCodeLogic),
815         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
816
817 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
818
819         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
820           (genSend): bugfix, do not allocate and free twice,
821           (shiftRLong): handle partially overlapping aops
822         * support/regression/tests/bitopcse.c: fixed warning redefined idata
823
824 2006-03-08 Borut Razem <borut.razem AT siol.net>
825
826         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
827           for pic16
828
829 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
830
831         * support/regression/tests/bug1409955.c: new, added
832         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
833         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
834           (aopForSym, aopOp): increment asmop.allocated if reused,
835           (freeAsmop): decrement asmop.allocated and check for zero instead of
836           using asmop.freed,
837           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
838           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
839            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
840            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
841            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
842            genSignedRightShift, genRightShift, genDataPointerGet,
843            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
844            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
845             in reverse order from allocation,
846           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
847             added swappedLR to keep track
848         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
849           pdata & code for GCC, z80, gbz80 & hc08
850         * support/regression/tests/zeropad.c: moved defines to testfwk.h
851
852 2006-03-08 Raphael Neider <rneider AT web.de>
853
854         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
855
856 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
857
858         * device/include/mcs51/c8051f410.h: new SiLabs mcu
859         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
860         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
861
862 2006-03-06 Borut Razem <borut.razem AT siol.net>
863
864         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
865           made the linker quiet
866
867 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
868
869         * src/pic16/gen.c (genPcall): fixed bug #1443644
870         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
871         which dumps before the function entry point a data byte which represents
872         the number of the local variables used by the specified function, added
873         'xinst' for initial support for Extended Instruction Support,
874         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
875         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
876         port->fun_prefix anymore (may change later),
877         (genFunction, genEndFunction): do not store/restore local registers for
878         _main (this should take care the --main-return command line option in
879         the future),
880         (genOr): removed some legacy pic-port instructions,
881         * src/pic16/genarith.c (genAddLit): re-enabled old code because
882         performing operations with SFR's causes data to be written more than
883         once to each SFR. Perhaps SFRs should be handled in special cases...
884         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
885         pcode.h
886         * src/pic16/main.c (_process_pragma): stack bound checking did not take
887         into account for stack starting position,
888         (struct OPTIONS pic16_optionsTable): added command line argument
889         --extended or -y for Extended Instruction Support,
890         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
891         (deassignLRs): *** perhaps the most important change, old 'for' code
892         (commented out for reference), didn't account for some registers which
893         were left marked 'not free' after a pointer operation. The change
894         reduces register usage a lot in some cases
895
896 2006-03-04 Borut Razem <borut.razem AT siol.net>
897
898         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
899           _clean
900         * support/regression/tests/bug-524697.c: decreased array size for
901           mcs51 to fit into the internal RAM
902         * support/regression/Makefile.in: a little bit more verbose
903
904 2006-03-03 Borut Razem <borut.razem AT siol.net>
905
906         * support/regression/fwk/lib/testfwk.c,
907           support/regression/fwk/include/testfwk.h: introduced function
908           _prints(), nonrecursive _printn(), call _initEmu() from main()
909         * support/regression/ports/gbz80/support.asm,
910           support/regression/ports/ucz80/support.asm,
911           support/regression/ports/z80/support.asm,
912           support/regression/ports/ds390/support.c,
913           support/regression/ports/hc08/support.c,
914           support/regression/ports/host/support.c,
915           support/regression/ports/mcs51/support.c,
916           support/regression/ports/xa51/support.c: added empty _initEmu()
917           function
918         * support/regression/ports/pic16/gpsim.cmd,
919           support/regression/ports/pic16/spec.mk,
920           support/regression/ports/pic16/support.c,
921           support/regression/Makefile.in: added pic16 regression test
922
923 2006-03-01 Raphael Neider <rneider AT web.de>
924
925         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
926           genConstPointerGet): use safe way of generating MOVFF to cover
927             literals as well as registers, fixes bug #1440527
928         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
929             dereference
930           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
931             more correctly, fixes bug #1232186
932           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
933         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
934             gplink guess the correct processor in more cases, applied patch
935             from Till Riedel attached to and fixing bug #1436552
936
937 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
938
939         * support/regression/tests/array.c: added, contains check for #1434401
940         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
941
942 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
943
944         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
945         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
946         * device/include/mcs51/c8051f326.h,
947         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
948         * device/include/mcs51/c8051f000.h,
949         * device/include/mcs51/c8051f018.h,
950         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
951           PCON_IDLE,PCON_STOP and added sfr16 definitions
952
953 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
954
955         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
956           genGetWord): fixed bug 1409955
957
958 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
959
960         * device/include/hc08/mc68hc908gp32.h,
961         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
962
963 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
964
965         * src/SDCCast.c (constExprValue): return NULL if not a value
966         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
967         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
968         * support/regression/tests/bitfields.c: enabled signed bitfield for all
969
970 2006-02-13 Borut Razem <borut.razem AT siol.net>
971
972         * src/regression/ptrarg.c: added, fails due to bug #1430967
973         * src/regression/Makefile: ptrarg.c added, ...
974
975 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
976
977         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
978         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
979
980 2006-02-11 Borut Razem <borut.razem AT siol.net>
981
982         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
983           print "Processor: xxx" message to stdout only if --verbose
984
985 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
986
987         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
988         * support/regression/tests/bug1426356.c: added
989         * support/regression/tests/bitfields.c: removed 2 tests
990
991 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
992
993         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
994         * device/include/mcs51/c8051f330.h,
995         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
996           PCON_IDLE,PCON_STOP and added sfr16 definitions
997         * device/lib/_divsint.c,
998         * device/lib/_divuint.c,
999         * device/lib/_divulong.c,
1000         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1001           register bank bug for small stackauto
1002
1003 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1004
1005         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1006
1007 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1008
1009         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1010         * all.dsp: corrected several bin paths
1011         * device/include/mcs51/c8051f120.h,
1012         * device/include/mcs51/c8051f300.h,
1013         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1014           to PCON_IDLE,PCON_STOP
1015         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1016         * device/lib/printf_large.c (output_float): fixed bug 1388703
1017         * support/regression/tests/bug1057979.c: added test for bug 1388703
1018
1019 2006-02-08 Raphael Neider <rneider AT web.de>
1020
1021         * src/pic/pcode.c (pciTRIS): fixed typo,
1022           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1023           (LinkFlow): fixed handling of flows that end in a call,
1024           (ReuseReg): perform safety check earlier
1025         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1026             to work with flows at the beginning of a pBlock,
1027             fixes #1426557 (Symbol not previously defined),
1028           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1029             usage information
1030           (RemoveUnusedRegisters): update register usage info
1031         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1032             created, reuse existing ones instead
1033         * src/pic/gen.c (genPcall): fixed #1424719
1034
1035 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1036
1037         * link/z80/lkmain.c,
1038         * link/z80/lklex.c,
1039         * link/z80/lkdata.c,
1040         * link/z80/aslink.h: fixed build on current cygwin:
1041         replaced getline() by lk_getline()
1042
1043 2006-02-01 Borut Razem <borut.razem AT siol.net>
1044
1045         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1046           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1047           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1048           src/regression/bool1.c, src/regression/bool2.c,
1049           src/regression/bool3.c, src/regression/call1.c,
1050           src/regression/compare.c, src/regression/compare10.c,
1051           src/regression/compare2.c, src/regression/compare3.c,
1052           src/regression/compare4.c, src/regression/compare5.c,
1053           src/regression/compare6.c, src/regression/compare7.c,
1054           src/regression/compare8.c, src/regression/compare9.c,
1055           src/regression/configword.c, src/regression/for.c,
1056           src/regression/inline.c, src/regression/mult1.c,
1057           src/regression/nestfor.c, src/regression/or1.c,
1058           src/regression/pointer1.c, src/regression/ptrfunc.c,
1059           src/regression/rotate1.c, src/regression/rotate2.c,
1060           src/regression/rotate3.c, src/regression/rotate4.c,
1061           src/regression/rotate5.c, src/regression/rotate6.c,
1062           src/regression/rotate7.c, src/regression/string1.c,
1063           src/regression/struct1.c, src/regression/sub.c,
1064           src/regression/sub2.c, src/regression/switch1.c,
1065           src/regression/while.c, src/regression/xor.c,
1066           src/regression/create_stc, src/regression/simulate,
1067           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1068           regression tests
1069         * src/regression/gpsim_assert.h: added
1070
1071 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1072
1073         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1074         ((void (code *) (void)) 0) ();
1075         * as/hc08/aslex.c,
1076         * as/hc08/aslink.h,
1077         * as/hc08/asm.h,
1078         * as/hc08/asmain.c,
1079         * as/hc08/lkdata.c,
1080         * as/hc08/lklex.c,
1081         * as/hc08/lkmain.c,
1082         * as/mcs51/aslex.c,
1083         * as/mcs51/aslink.h,
1084         * as/mcs51/asm.h,
1085         * as/mcs51/asmain.c,
1086         * as/mcs51/lkdata.c,
1087         * as/mcs51/lklex.c,
1088         * as/mcs51/lkmain.c,
1089         * as/z80/aslex.c,
1090         * as/z80/asm.h,
1091         * as/z80/asmain.c: fixed build on current cygwin:
1092         replaced getline() by as_getline()
1093
1094 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1095
1096         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1097         declarator in the symbol chain
1098         * src/SDCCsymt.h,
1099         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1100         parameter list for function pointers
1101         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1102         * support/regression/tests/bug-716242.c: added
1103
1104 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1105
1106         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1107         offset if possible
1108         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1109
1110 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1111
1112         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1113         inifinitely recurseable, added static
1114         * support/regression/tests/bug-1408066.c: added
1115
1116 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1117
1118         * src/SDCCicode.h,
1119         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1120         renamed, added possibility to create "postLoopLbl"-labels
1121         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1122         newiTempLoopHeaderLabel
1123         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1124         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1125         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1126         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1127         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1128         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1129         (basicInduction): fixed bug #136564, made static,
1130         (loopInduction): changed parameter of basicInduction, made static,
1131         (addPostLoopBlock): added
1132         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1133         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1134         findLoopEndSeq
1135         * support/regression/tests/bug-136564.c: added
1136         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1137         --std-sdcc99 to LIBSDCCFLAGS
1138
1139 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1140
1141         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1142         while loop
1143         * support/regression/tests/bug-1406131.c: added
1144
1145 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1146
1147         * src/SDCCast.c (decorateType): fix promotion of unary minus
1148         * src/SDCCsymt.c (computeType): beautified
1149         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1150         (valUnaryPM, valComplement): fix sign and promotion,
1151         (valNot): ANSI: result type is int (SDCC: unsigned char)
1152         * support/regression/tests/uminus.c: speedup by removing superflous
1153         test case 'int'
1154         * support/regression/tests/onebyte.c: added promotion and signedness
1155         tests for unary minus
1156         * support/regressions/tests/bug-477927.c: disable warning about
1157         uninitialized variables
1158         * support/regression/tests/not.c: added
1159
1160 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1161
1162         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1163         * src/mcs51/gen.c (gen51Code): show final register usage after
1164         fillGaps in asm with --i-code-in-asm
1165         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1166         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1167         incUsed, rliveClear, adjustIChain): made static,
1168         (setFromRange): excluded because it's unused,
1169         (findPrevUseSym, markWholeLoop): added,
1170         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1171         through all branches of predecessors enables sdcc to emit the warning
1172         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1173         (rlivePoint): made static, added parameter emitWarnings which is only
1174         true during the first run out of two,
1175         (findRecursiveSucc, findRecursivePred): removed,
1176         (computeLiveRanges): made static, added parameter emitWarnings,
1177         (dumpIcRlive): added for debugging only
1178         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1179         removed prototype of setFromRange()
1180         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1181         in call of computeLiveRanges()
1182         * support/regression/tests/bug-895992.c: added
1183         * support/regression/tests/bug-971834.c: added
1184         * support/valdiag/tests/bug-895992.c: added
1185         * support/valdiag/tests/bug-971834.c: added
1186
1187 2005-12-18 Raphael Neider <rneider AT web.de>
1188
1189         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1190           (genUnpackBits): improved code for direct operands,
1191           (genPackBits): improved code for literal assignment to bitfields
1192             and for direct destination operands (no FSR indirection),
1193             prevented redundant AND, fixes #1362800,
1194           (AccLsh): added parameter to disable masking of the result
1195         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1196           skip instructions with side-effects (like incfsz),
1197           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1198         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1199         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1200           fixes #1375263
1201
1202 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1203
1204         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1205         volatile variables as spill location
1206
1207 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1208
1209         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1210         replacing literals
1211         * support/regression/tests/bug-1376320.c: added
1212
1213 2005-12-08 Raphael Neider <rneider AT web.de>
1214
1215         * src/pic/device.c: renamed is_shared to pic14_is_shared
1216         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1217         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1218           (is_valid_identifier): added for above workaround
1219
1220 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1221
1222         * device/lib/Makefile.in: fixed to enable port-specific-objects
1223         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1224           char, thanks Hubert Sack
1225         * doc/sdccman.lyx: documented --xstack-loc,
1226           elaborated a bit more on interrupts and pitfalls,
1227           removed "setjmp/longjmp unsupported",
1228           documented some unsupported C99 features
1229         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1230         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1231           if, thanks Hubert Sack
1232         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1233         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1234           make make_library
1235         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1236           regression tests can report resource usage (rfe 700441)
1237         * support/regression/collate-results.py: report resource usage
1238         * support/regression/ports/ds390/spec.mk,
1239         * support/regression/ports/hc08/spec.mk,
1240         * support/regression/ports/mcs51/spec.mk,
1241         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1242         * support/regression/ports/ds390/uCsim.cmd,
1243         * support/regression/ports/hc08/uCsim.cmd,
1244         * support/regression/ports/mcs51/uCsim.cmd,
1245         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1246         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1247           library, use the default one
1248         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1249           building the library
1250
1251 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1252
1253         * config.dsp: added dependency on .version and configure_vc.awk
1254         * device/include/setjmp.h: updated for --stack-auto and --xstack
1255         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1256         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1257         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1258         * device/lib/libsdcc.lib: added _setjmp
1259         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1260           (decorateType): fixed bug 1372851,
1261           (optimizeGetHbit): fixed warning
1262         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1263           array initialisation
1264         * support/regression/tests/bug1057979.c: added test for bug 1358192
1265         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1266
1267 2005-12-03 Borut Razem <borut.razem AT siol.net>
1268
1269         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1270           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1271
1272 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1273
1274         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1275         createIval): implement symbol independant "flexible array member",
1276         (createIvalCharPtr): implemented flexible array initialisation with a
1277         string
1278         * src/SDCCsymt.c (copyStruct): removed,
1279         (getSize): fixed misleading comment,
1280         (getAllocSize): removed, the additional allocation size is now in
1281         sym->flexArrayLength,
1282         (checkStructFlexArray): new, syntax checks for flexible array members,
1283         (compStructSize): added syntax checks for "flexible array members"
1284         (copyStruct): removed,
1285         (copyLinkChain): removed inefficient fix for bug 770487
1286         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1287         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1288         symbol->flexArrayLength
1289         * src/SDCCerr.c,
1290         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1291         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1292         * support/regression/tests/structflexarray.c: added
1293         * support/valdiag/tests/structflexiblearray.c: added
1294
1295 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1296
1297         * src/SDCCast.c (decorateType): fixed bug 1368489
1298         * support/Util/SDCCerr.c,
1299         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1300
1301 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1302
1303         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1304           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1305
1306 2005-11-27 Borut Razem <borut.razem AT siol.net>
1307
1308         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1309           support/cpp2/mkdeps.h: added command line option
1310           -obj-ext=<extension> to SDCPP to define object file externion, used
1311           for generation of make dependencies (-M)
1312         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1313
1314 2005-11-26 Borut Razem <borut.razem AT siol.net>
1315
1316         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1317           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1318           added pic and pic16 libraries
1319
1320 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1321
1322         * device/include/float.h: Corrected typo in prototype of __fsgt
1323
1324 2005-11-25 Borut Razem <borut.razem AT siol.net>
1325
1326         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1327           added creation of model-mcs51-stack-auto libraries
1328
1329 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1330
1331         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1332         and fields-list too
1333         * src/SDCCast.c (createIvalArray): removed obsolete comment
1334
1335 2005-11-24 Borut Razem <borut.razem AT siol.net>
1336
1337         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1338           added missing device/lib/mcs51/crt*.asm sources
1339
1340 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1341
1342         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1343
1344 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1345
1346         * device/lib/_fs2schar.c,
1347         * device/lib/_fs2sint.c,
1348         * device/lib/_fs2slong.c: optimized inline asm
1349
1350 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1351
1352         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1353           Better handling of floats between -1.0 and 0.0.
1354
1355 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1356
1357         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1358           (the missing "if"s prohibited removal of redundant labels)
1359
1360 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1361
1362         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1363           Properly convert floats between -1.0 and 0.0 to long, int, and char
1364           types (max integer value of negative floats tends to zero).
1365         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1366           Removed changes made so to work properly with floats between
1367           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1368           and _fs2char.c
1369
1370 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1371
1372         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1373         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1374         (genCast) cosmetic change
1375         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1376         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1377         from mcs51
1378         * support/regression/tests/bitfields (testSignedBitfields): added
1379
1380 2005-11-18 Borut Razem <borut.razem AT siol.net>
1381
1382         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1383         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1384           introduced SILENT option to make building of pic16 libraries less
1385
1386 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1387
1388         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1389           Now they work properly with floats between -1.0 and 0.0
1390         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1391
1392 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1393
1394         * src/SDCCicode.c (printOperand): added missing else
1395
1396 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1397
1398         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1399         reformatted for better readability
1400         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1401         signed bitfields
1402
1403 2005-11-17 Borut Razem <borut.razem AT siol.net>
1404
1405         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1406           introduced SILENT option to make building of pic16 libraries less
1407           verbose - used for nightly snapshot build
1408         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1409           available on Win32 platforms.
1410         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1411           medium, large, pic and pic16
1412
1413 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1414
1415         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1416           printf("%f"...) sets fraction to zero.
1417
1418 2005-11-16 Raphael Neider <rneider AT web.de>
1419
1420         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1421           fixes #1357221
1422         * src/pic/gen.c (genIfx): implemented for CARRY bit
1423         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1424           to generic pointers, fixes #1357332,
1425           (pic16_movLit2f): NEW,
1426           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1427
1428 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1429
1430         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1431
1432 2005-11-11 Raphael Neider <rneider AT web.de>
1433
1434         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1435         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1436           compute pointer's type from operand,
1437           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1438           improved single bit reads, fixes bug #1353379
1439
1440 2005-11-09 Borut Razem <borut.razem AT siol.net>
1441
1442         * support/scripts/sdcc.nsi: added lib/pic to the package
1443
1444 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1445
1446         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1447
1448 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1449
1450         * support/regression/tests/bug1348008.c: added
1451         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1452         * support/regression/tests/bug1337835.c: updated comment
1453
1454 2005-11-06 Borut Razem <borut.razem AT siol.net>
1455
1456         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1457           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1458           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1459           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1460           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1461           dynamic construction of cl_error_class and derivates - 2.nd try
1462
1463 2005-11-05 Borut Razem <borut.razem AT siol.net>
1464
1465         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1466           bug, which caused Bus Errors on sparc solaris
1467
1468 2005-11-04 Borut Razem <borut.razem AT siol.net>
1469
1470         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1471           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1472           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1473           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1474           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1475           and derivates to resolve the initialization problem on OSX
1476
1477 2005-11-02 Borut Razem <borut.razem AT siol.net>
1478
1479         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1480           corrected typo - #include <winsock2.h>
1481
1482 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1483
1484         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1485           (_asxxxx_mapping): added org directive for future enhancements
1486
1487 2005-11-01 Borut Razem <borut.razem AT siol.net>
1488
1489         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1490           enabled sockets on WIN32
1491         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1492
1493 2005-10-31 Borut Razem <borut.razem AT siol.net>
1494
1495         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1496           WIN32 backslash path delimiters should be escaped when used in C strings
1497         * support/regression/tests/bitfields.c: exclude failing assertions for
1498           __CYGWIN32__ and __MINGW32__ hosts
1499
1500 2005-10-30 Borut Razem <borut.razem AT siol.net>
1501
1502         * src/SDCCutil.c: corrected double comparison typo
1503
1504 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1505
1506         * device/lib/medium/Makefile: added for new memory model medium
1507         * device/include/asm/mcs51/features.h: updated for medium/pdata
1508         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1509           added Multiply & Accumulate sbit's and MAC0_PAGE define
1510         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1511         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1512         * device/lib/_mullong.c: update for medium model
1513         * device/lib/incl.mk: added medium model
1514         * doc/sdccman.lyx: documented medium model
1515         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1516         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1517         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1518         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1519           (allocParms): set SCLS and OCLS to pdata for medium model
1520         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1521           for pdata,
1522           (powof2): return <0 if not power of 2
1523         * src/avr/gen.c (genBitWise): use updated powof2
1524         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1525           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1526           (shiftLLeftOrResult): use B if necessary
1527         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1528         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1529         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1530         * support/regression/Makefile.in: added test-mcs51-medium
1531         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1532
1533 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1534
1535         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1536         specifier unsigned
1537         * device/lib/time.c (mktime): fixed bug 1334315
1538
1539 2005-10-28 Raphael Neider <rneider AT web.de>
1540
1541         * device/include/pic/p16f_common.inc: added common declarations
1542         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1543
1544 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1545
1546         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1547           (aopPutUsesAcc): added to predict accumulator use,
1548           (assignResultValue): save acc if necessary,
1549           (genMinusDec): store result if indirectly addressed,
1550           (genDivOneByte):  save acc if necessary,
1551           (movLeft2Result): bugfix if left already in acc,
1552           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1553             attention to accumulator use (esp. pdata),
1554           (genReceive): receive pdata correctly
1555         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1556         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1557
1558 2005-10-27 Raphael Neider <rneider AT web.de>
1559
1560         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1561
1562 2005-10-27 Raphael Neider <rneider AT web.de>
1563
1564         * .version: changed version to 2.5.4
1565         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1566         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1567           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1568             arithmetics support routines
1569         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1570         * device/lib/Makefile.in: also create installdir for pic
1571
1572         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1573           pic14 port as well
1574         * src/pic/device.c (dump_sfr): rewritten to delegate register
1575           placement to the linker (use `extern sym' rather than sym EQU addr),
1576           (validAddress): fixed to check last specified address
1577         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1578           (popGetLit): truncate literal value to 8 bit,
1579           (popGet): moved assert to more appropriate place
1580           (popGetExternal): create pCode operand from and mark the according
1581             symbol as being `extern'
1582           (popGetAddr): added sanity check on immediate's offset, provide
1583             GPOINTER tag on demand
1584           (aopPut): fixed for immediates,
1585           (mov2w_op): move operand's address or contents to WREG (depending on
1586             operand type), safer variant of mov2w,
1587           (movwf,call_libraryfunc): NEW, handy abbreviations,
1588           (get_argument_pcop,get_return_val_pcop,pass_argument,
1589           get_returnvalue): interface for accessing function parameters and
1590             return values,
1591           (assignResultValuei,genRet): use new parameter/return value interface
1592           (pic14_getDataSize): back to old version handling generic pointers,
1593           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1594             provided implementation and/or fixed old one,
1595           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1596             calls, removed legacy 8051 reference code
1597           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1598           (loadSignToC): NEW, move the operands sign bit to CARRY,
1599           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1600             genRightShiftSigned, accepts negative shift counts,
1601           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1602           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1603             generic pointers, __data pointers and __code pointers,
1604           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1605             and signed bitfields, limit bitfields to 8 bit,
1606           (genDataPointerGet): fixed number of bytes read,
1607           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1608           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1609             pointers to constant data are no longer assumed to point to __code
1610             space, removed invalid pointer types,
1611           (bitpatternFromVal): retrieve the PICs representation of an integer
1612             or float literal,
1613           (genDataPointerSet): fixed assigning to po_immediate operands,
1614           (genGenPointerSet): implemented as library call,
1615           (genIfx): fixed incorrect condition,
1616           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1617             provide GPOINTER tag according to destination's storage class,
1618           (genCast): added code to handle casting to generic pointers, added
1619             sign-/zero extension of the result
1620           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1621         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1622         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1623           extend the result
1624         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1625           address/register resides in the shared banks
1626           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1627             put all variables into separate sections (have the linker arrange
1628             them)
1629           (picglue): put init code and interrupt handlers in separate sections
1630         * src/pic/main.c: added port specific options table, modified to PORT
1631           structure to make GPOINTERs 3 byte, added pic14_options
1632           (_pic14_do_link): private linking routine (update paths to libraries,
1633             add libsdcc.lib by default)
1634         * src/pic/main.h: declare pic14_options
1635         * src/pic/pcode.c: fixed instructions i/o relations,
1636           (RegCond): reverted to correct version,
1637           (newpCodeOpLit): truncate literals to 8 bit,
1638           (genericPrint): added debug output,
1639           (getRegFromInstruction): fixed for various operand types, simplified
1640           (BuildFlow): fixed broken handling of isntructions with labels
1641           (LinkFlow): start at last instruction in flow (skip trailing comments),
1642             pass the flow on to the next instruction after CALL
1643           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1644           (insertPCodeInstruction): fixed inserting after a skip instruction,
1645           (DoBankSelect): fixed for labeled instructions
1646           (OptimizepBlock): honor --nopeep switch
1647           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1648         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1649         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1650           (pCodeOptime2pCodes): allow disabling this optimization via
1651             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1652             but is still buggy), started implementation of a dataflow based
1653             pCode optimization (CSE + dead code elimination)
1654           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1655         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1656           names are independant of the stack location and therefore portable across
1657           devices
1658
1659 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1660
1661         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1662           (selectSpil): fixed bug 1337835 by not spilling bit variables
1663         * support/regression/tests/bug1337835.c: added test for this bug
1664         * src/mcs51/peeph.def: restart after rule 3.c,
1665           addded rules 263.x to optimize loading constants
1666
1667 2005-10-26 Raphael Neider <rneider AT web.de>
1668
1669         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1670         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1671           (genAssign): emit warning when casting literals to generic pointer
1672             type, also applies when taking the address of a fixed variable,
1673           (genCast): improved casting to generic pointers
1674         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1675           extern variables, added verbose error message
1676         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1677
1678 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1679
1680         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1681         carry must be complemented too
1682         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1683         could be emitted by genMinus
1684         * src/SDCCval.c (constVal): fixed bug 1305065
1685
1686 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1687
1688         * src/SDCCast.c (addCast): added promotion for bit variables
1689         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1690         promotion casts + optimisation
1691         (optimizeGetWord): fix warning 'i' might be used uninitialized
1692         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1693         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1694
1695 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1696
1697         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1698         all chars are promoted to int; promotion should be handled in SDCCast.c
1699
1700 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1701
1702         * device/lib/_strcmp.c: Fixed bug 1326457
1703
1704 2005-10-11 Raphael Neider <rneider AT web.de>
1705
1706         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1707         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1708
1709 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1710
1711         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1712         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1713
1714 2005-10-04 Raphael Neider <rneider AT web.de>
1715
1716         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1717           device/lib/pic16/pics.all: added pic18f1320
1718         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1719
1720 2005-09-30 Raphael Neider <rneider AT web.de>
1721
1722         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1723         * src/pic16/devices.inc: NEW, provides device descriptions
1724         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1725
1726 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1727
1728         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1729           GETHBIT
1730
1731 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1732
1733         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1734           documented Any Order Bit, Higher Order Byte and Higher Order Word
1735         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1736         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1737           (optimizeGetAbit): new, to get any bit, not only the high bit,
1738           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1739           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1740           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1741           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1742             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1743             GETABIT, GETBYTE, GETWORD: decorate them,
1744           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1745           (ast_print): added GETABIT, GETBYTE, GETWORD
1746         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1747         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1748           (geniCodeBinary): new generic binary icode,
1749           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1750         * src/port.h: updated comment for PORT.hasExtBitOp
1751         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1752           (genGetByte): new, to get a single byte,
1753           (genGetWord): new, to get a word from a long,
1754           (gen51Code): added GETABIT, GETBYTE, GETWORD
1755         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1756
1757 2005-09-23 Raphael Neider <rneider AT web.de>
1758
1759         * configure.in, configure: have device/lib/pic configured
1760         * device/lib/Makefile.in: added model-pic14
1761         * device/lib/clean.mk: added pic/ to clean rule
1762         * device/lib/pic: added rudimentary pic14 library providing support
1763           functions for multiplication/division/generic pointer access
1764         * src/SDCCopt.c (convilong): mark support functions as extern
1765           for pic14 port as well
1766         * src/pic/gen.c (genMult): added assertions,
1767           (genpic14Code): emit warning on unhandled iCodes
1768         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1769         * src/pic/pcode.c (pCodeOpCopy),
1770         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1771           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1772           SFR_REGISTER}), made safe for future extensions
1773         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1774           instructions even if preceeded by SKIP instructions (also remove
1775           them); removed unused code
1776         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1777           prevents leaving parts of the structure uninitialized after copying
1778
1779 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1780
1781         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1782           ago by me
1783         * support/regression/tests/addsub.c: added test for the bug
1784
1785 2005-09-21 Raphael Neider <rneider AT web.de>
1786
1787         * device/include/pic16/pic18f1220.h,
1788           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1789         * device/lib/pic16/Makefile.rules: added missing opening paren
1790         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1791           are provided in genutils.c,
1792           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1793           operand/result sizes,
1794           (genCmp): assert on NULL pointers first, then check deref'ed values
1795         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1796           result size
1797
1798 2005-09-18 Raphael Neider <rneider AT web.de>
1799
1800         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1801           as these are now unused,
1802           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1803         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1804           local, avoids uninitialized pointer dereference on r->name
1805         * src/pic16/ralloc.c (newReg): fixed indentation
1806
1807 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1808
1809         * src/SDCCval.c (constVal): fixed bug 730366
1810         * support/Util/SDCCerr.c,
1811         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1812
1813 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1814
1815         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1816
1817 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1818
1819         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1820
1821 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1822
1823         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1824           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1825         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1826           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1827         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1828         * packihx/packihx.c (hexDigit): made c unsigned char
1829         * as/mcs51/lklibr.c (fndsym),
1830         * link/z80/lkgb.c (gb),
1831         * link/z80/lklibr.c (fndsym),
1832         * link/z80/lkrloc.c (relr),
1833         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1834         * src/SDCC.lex (checkCurrFile, process_pragma),
1835         * src/SDCCglue.c (spacesToUnderscores),
1836         * src/SDCCmain.c (setParseWithComma, processFile),
1837         * src/asm.c (tvsprintf, printCLine),
1838         * src/avr/gen.c (emitcode, aopPut),
1839         * src/ds390/gen.c (emitcode),
1840         * src/hc08/gen.c (emitcode, emitinline),
1841         * src/mcs51/gen.c (emitcode, genInline),
1842         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1843           tokenizeLineNode),
1844         * src/pic/ralloc.c (debugLog),
1845         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1846           tokenizeLineNode),
1847         * src/pic16/ralloc.c (debugLog),
1848         * src/z80/main.c (_process_pragma):
1849            made all ctype.h function calls safe
1850         * src/SDCCopt.c: include math.h for fabs
1851         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1852           and used them throughout the code to make ctype.h function calls safe
1853         * src/ds390/main.c (asmLineNodeFromLineNode),
1854         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1855         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1856            unsigned char*
1857         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1858           (newpCodeAsmDir): made ctype.h function calls safe
1859         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1860           pic16_emitcode):  made lbp unsigned char*
1861         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1862           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1863         * src/xa51/gen.c (emitcode),
1864         * src/z80/gen.c (_emit2): made lbp unsigned char*
1865         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1866            char*
1867
1868 2005-09-05 Raphael Neider <rneider AT web.de>
1869
1870         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1871           access bank splitpoint
1872
1873 2005-09-05 Raphael Neider <rneider AT web.de>
1874
1875         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1876
1877 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1878
1879         * .version: changed to version 2.5.3
1880         * doc/sdccman.lyx: changed version to 2.5.3,
1881           documented --codeseg and --constseg and pragma codeseg and constseg,
1882           documented bit parameters (reentrant) and bit returning
1883         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1884            currFunc->recvSize, but is this ok for all ports?
1885           (ast2iCode): result of ~ on unsigned char must be cast to int for
1886            bool to work
1887         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1888           function pointers in bit space
1889         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1890           (processFuncArgs): call port.reg_parm() with reentrancy info
1891         * src/port.h,
1892         * src/avr/main.c,
1893         * src/ds390/main.c,
1894         * src/hc08/main.c,
1895         * src/pic/main.c,
1896         * src/pic16/main.c,
1897         * src/xa51/main.c,
1898         * src/z80/main.c: port.reg_parm prototype extended with
1899           "bool reentrant" parameter
1900         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1901           options.stackAuto for allocating bit register parameters
1902         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1903           (genSend): set BitBankUsed if it is,
1904           (selectRegBank): factored out of genCall for use in genPcall,
1905           (genCall): removed redundant dtype assignmen, use selectRegBank,
1906           (genPcall): handle returning in Carry properly, save in F0 if needed,
1907           (genReceive): handle bit register parameters
1908         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1909           (mcs51_assignRegisters): enable bit registers for all reentrant
1910            functions and don't set BitBankUsed unconditionally
1911         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1912         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1913         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1914
1915 2005-08-27 Borut Razem <borut.razem AT siol.net>
1916
1917         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1918         ppc-osx (Darwin) does not support -u option. It seems that it is
1919         supported only on Linux - GNU cp
1920
1921 2005-08-25 Borut Razem <borut.razem AT siol.net>
1922
1923         * sim/ucsim/gui.src/serio.src/Makefile.in,
1924           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1925           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1926           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1927           install and strip, since the strip at /usr/ccs/bin should be used
1928           on solaris
1929
1930 2005-08-24 Borut Razem <borut.razem AT siol.net>
1931
1932         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1933
1934 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1935
1936         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1937         ffffffffu
1938
1939 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1940
1941         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1942         * as/mcs51/lkmain.c (link_main): fixed warning
1943         * device/include/stdbool.h: ds390 has no advanced bit support yet
1944         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1945         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1946         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1947           and updated their macros
1948         * src/SDCCval.c (constVal): updated comment for renamed b_long
1949
1950 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1951
1952         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1953         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1954           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1955           (oprio): set priority for '['
1956         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1957            and adb_24_bit
1958         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1959         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1960         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1961         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1962           added overlayable BIT_BANK area
1963         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1964           (summary2): explain 'T' in legenda
1965         * as/mcs51/lkrloc.c: replaced old K&R style,
1966           (relr): added R_BIT processing,
1967           (errmsg): added "Bit-addressable relocation error",
1968           (adb_bit): added for converting from byte- to bit-addressable space,
1969           (adb_24_bit): added for converting from byte- to bit-addressable space
1970         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1971            used in reentrant functions now even as return value
1972         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1973         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1974           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1975         * src/SDCCglobl.h: added indicator BitBankUsed
1976         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1977            the bit registers b0-b7
1978         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1979           (geniCodeCast): fixed bug 1263853,
1980           (geniCodeLogicAndOr): put result in bool or char,
1981           (geniCodeReceive): added parameter func for accessing the return type,
1982           (geniCodeFunctionBody): pass func to geniCodeReceive
1983         * src/SDCCmain.c: added indicator BitBankUsed
1984         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1985         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1986           (checkSClass): don't put automatic bool/bit on stack,
1987           (checkFunction): removed check on function cannot return bit
1988         * src/SDCCsymt.h: added newBoolLink prototype
1989         * src/mcs51/gen.c (rb1regs): added bit registers,
1990           (movc): created for assigning to carry,
1991           (pushReg, popReg): created for pushing registers,
1992           (sameRegs): check both AOP_REG and AOP_CRY types,
1993           (aopOp): handle bit registers,
1994           (aopPut): optimization no self-assign,
1995           (saveRegisters): push reg->base (bits) only once for bit registers,
1996            and use pushReg,
1997           (unsaveRegisters): pop reg->base only once and use popReg,
1998           (assignResultValue): added parameter func and return in carry for bits,
1999           (genIpush): optimization no reload in A if not changed,
2000           (genSend): bit parameters in reentrant functions are passed in bit
2001            registers by first assigning to bits in B, then save registers and
2002            copy B to bits,
2003           (genCall): handle returning in Carry properly, save it in F0 if needed,
2004           (genPcall): updated assignResultValue call, this is not safe yet for bit
2005            returning function !!!
2006           (genFunction): don't generate equ's for bit registers and use pushReg,
2007           (genEndFunction): take care of bit returning functions and use popReg,
2008           (genRet): return bit in Carry,
2009           (genIfx): optimize bit registers and other directly addressable bits,
2010           (genReceive): updated assignResultValue call
2011         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2012           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2013            registers when using stack-auto
2014         * src/mcs51/ralloc.c (_G): added allBitregs,
2015           (regs8051): added the bit registers,
2016           (createStackSpil): use macro IS_BIT,
2017           (getRegBit): added to allocate a bit register, else spill,
2018           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2019           (updateRegUsage): factored out to ease stepping while debugging,
2020           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2021            also allocate bit registers,
2022           (fillGaps): handle bit registers,
2023           (findAllBitregs): added to create bit vector with all bit registers,
2024           (mcs51_allBitregs): returns this bit vector,
2025           (mcs51_assignRegisters): when using stack-auto use bit registers for
2026            passing parameters and creating local variables
2027         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2028
2029 2005-08-22 Borut Razem <borut.razem AT siol.net>
2030
2031         * device/lib/Makefile.in: replaced find option -or with -o
2032           to make it run on solaris
2033
2034 2005-08-22 Raphael Neider <rneider AT web.de>
2035
2036         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2037           fixes #1265442 (crash on Solaris)
2038
2039 2005-08-20 Borut Razem <borut.razem AT siol.net>
2040
2041         * configure, configure.in: added tests for libsocket and libnsl libraries,
2042           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2043           from support/regression/Makefile.in
2044         * support/regression/Makefile.in: added
2045         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2046         * sim/ucsim/libtool: regenerated on sparc-solaris
2047         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2048           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2049           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2050           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2051           sparc-solaris, which doesn't use GNU ld linker
2052         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2053         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2054
2055 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2056
2057         * src/mcs51/peeph.def: updated comments
2058
2059 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2060
2061         * device/lib/_gptrget.c,
2062         * device/lib/_gptrput.c: slightly shorter
2063         * doc/sdccman.lyx: incremented version
2064         * src/mcs51/peeph.def: moved peephole comments to the line of first
2065           change to better keep line correlation, reanimated 186.e
2066         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2067
2068 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2069
2070         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2071           David Saxton with quotes around file name.
2072
2073 2005-08-15 Borut Razem <borut.razem AT siol.net>
2074
2075         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2076           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2077           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2078           make tests run on x86_64 platform
2079
2080 2005-08-13 Raphael Neider <rneider AT web.de>
2081
2082         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2083           as it might be executed DURING a build (parallel make is wonderful)
2084
2085 2005-08-13 Raphael Neider <rneider AT web.de>
2086
2087         * device/lib/Makefile.in (port-specific-objects-pic16):
2088           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2089         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2090           dependency
2091         * device/lib/pic16/Makefile.rules: build subdirs before creating
2092           the library, removed builddir rule, create $(builddir) early in
2093           recurse rule, use empty recurse rule for leaf directories
2094         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2095           mkdir errors (race condition), removed duplicate suffix "hex"
2096           from clean rules
2097         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2098         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2099           prevents mkdir -p from aborting on Alpha
2100
2101 2005-08-12 Raphael Neider <rneider AT web.de>
2102
2103         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2104           db-statements in order to allow for arrays of pointers in code
2105           sections to be placed without interspersed 0-padding, fixes
2106           bug #1256215
2107         * (emitStatistics): fixed division by zero for pic18f1220
2108         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2109           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2110         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2111         * (pic16_pCodeConstString): keep track of already emitted string
2112           literals to prevent "duplicate definitions of symbol _str_NR"
2113         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2114           debug message
2115         * device/lib/Makefile.in: ignore failing PIC16 library builds
2116         * device/lib/pic16/Makefile: do not build if gputils are missing
2117         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2118
2119 2005-08-10 Raphael Neider <rneider AT web.de>
2120
2121         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2122           my last commit)
2123
2124 2005-08-10 Raphael Neider <rneider AT web.de>
2125
2126         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2127           Rokas' patch to add the new fixed point type "__fixed16x16"
2128         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2129           functions for __fixed16x16 arithmetics
2130         * device/lib/pic16: reimplemented the build system to support
2131           a separate build directory, better handling of libio (create
2132           the library in a separate subdir for each architecture) and
2133           easier configuration (centralized in Makefile.common)
2134
2135 2005-08-07 Raphael Neider <rneider AT web.de>
2136
2137         * src/pic16/gen.c (genrshTwo): fixed sign extension
2138         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2139         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2140           added T0CONbits
2141         * device/include/pic16/pic18f4220.h: NEW, header for
2142           pic18f4220 and pic18f4320
2143         * device/include/pic16/pic18fregs.h: added new devices,
2144           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2145         * device/include/pic16/signal.h: resolved name clashes
2146           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2147           to also allow testing for interrupt enable bits, added
2148           comments on how to use the macros
2149         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2150         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2151           register definitions for the devices
2152         * device/lib/pic16/pics.all: added new devices
2153         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2154           allocated memory
2155         * device/lib/pic16/libc/stdlib/memfree: do not count
2156           the block header as free memory
2157         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2158           simplified and added missing end-of-blocklist-marker
2159           (reported by Peter Onion, fixes #1252814)
2160         * (_mergeHeapBlock): fixed loop condition
2161         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2162           len==0, restructured code
2163         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2164           up a bit, reduced bitfield accesses, prevent endless loops
2165           in case of heap corruption
2166         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2167           "unreferenced arguments/must return a value" warnings
2168         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2169           replaced BAUDREG with SPBRG
2170         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2171           device/lib/pic16/debug/gstack/gstack.c: replaced
2172           _naked, _asm, _endasm with __naked, __asm, __endasm
2173
2174 2005-08-05 Raphael Neider <rneider AT web.de>
2175
2176         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2177           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2178
2179 2005-08-05 Borut Razem <borut.razem AT siol.net>
2180
2181         * device/lib/Makefile.in: added missing ';'
2182         * configure: removed ^M characters
2183
2184 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2185
2186         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2187           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2188           License
2189
2190 2005-08-04 Borut Razem <borut.razem AT siol.net>
2191
2192         * configure.in: pic16 libraries build 2nd try - enable running
2193           configure in device/lib/pic16
2194         * configure: regenerated from configure.in
2195         * device/lib/Makefile.in: create $(PORT)/bin directory
2196
2197 2005-08-03 Raphael Neider <rneider AT web.de>
2198
2199         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2200           to get/set values via pointers
2201         * (genUnpackBits,genPackBits): changed detection of
2202           ptr->bitfield vs. sym.bitfield, fixed access via generic
2203           pointers, removed dead (wrong) code for multibyte bitfields
2204         * (genNearPointerGet, genGenPointerGet): removed useless code,
2205           fixed bitfield detection, fixes #1250594
2206         * (genNearPointerSet): removed useless code
2207         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2208           and introduced macro pic16_emitpcode that conditionally emits
2209           the origin of the following pCode (useful for debugging SDCC)
2210         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2211         * (createDefmap): fixed handling of LFSR for --optimize-df
2212
2213 2005-08-02 Borut Razem <borut.razem AT siol.net>
2214
2215         * device/lib/Makefile.in: pic16 libraries build enabled since
2216           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2217
2218 2005-08-02 Raphael Neider <rneider AT web.de>
2219
2220         * src/pic16/gen.c (genPackBits): removed deprecated warning
2221         * (genGenPointerSet): fixed bitfield detection
2222
2223 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2224
2225         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2226
2227 2005-07-31 Raphael Neider <rneider AT web.de>
2228
2229         * device/lib/pic16/libdev/pic18f458.c,
2230           device/include/pic16/pic18f458.h: added missing T0CONbits
2231
2232 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2233
2234         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2235
2236 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2237
2238         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2239
2240 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2241
2242         * device/include/mcs51/at89c51ed2.h: added.
2243
2244 2005-07-23 Raphael Neider <rneider AT web.de>
2245
2246         * src/pic/gen.h: added emitpcode macro for debugging
2247         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2248           and replace by macro adding debug information on demand
2249         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2250         * (gencjne): tried to fix; replaced with correct (slower) code
2251         * (gen{Unp,P}ackBits): fixed single bit access
2252         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2253         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2254           previous instruction
2255         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2256           register has to be handled with care (forbidding movement
2257           of assignments/uses, removing assignments completely, ...)
2258         * (pCodeOptime2pCodes): make use of regIsSpecial
2259         * added lots of debugging output (commented out)
2260         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2261           from being reused as result UNLESS it is known to work
2262
2263 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2264
2265         * support/Util/dbuf.h: include <stddef.h> for size_t
2266         * .version: changed to version 2.5.2
2267
2268 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2269
2270         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2271
2272 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2273
2274         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2275           (genModOneByte): removed needless psha/pula
2276
2277 2005-07-22 Raphael Neider <rneider AT web.de>
2278
2279         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2280           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2281         * src/pic/gen.c (resolveIfx): do not "invent" labels
2282         * (genSkipc): changed to positive logic
2283         * (genSkipCond): removed as no longer needed
2284         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2285           backport from PIC16
2286         * (genLeftShift): check operands are in different registers
2287         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2288           INCF does not update CARRY...
2289         * src/pic/main.c: fixed _linkCmd
2290         * src/pic/pcode.c (unlinkpCode): added inactive code
2291         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2292           alive (do not assign result and operand overlapping registers)
2293
2294 2005-07-22 Raphael Neider <rneider AT web.de>
2295
2296         * src/pic/device.c (dump_sfr): replaced register declaration with
2297           call to emitSymbolToFile() to avoid duplicate symbols
2298         * (assignRelocatableRegisters): do not declare external symbols
2299         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2300           right (take size of type, not etype)
2301         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2302         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2303         * (packRegsForAccUse): disabled assignment of WREG as
2304           the result reg to prevent occurence of just fixed #1235003,
2305           fixes #1242954
2306         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2307           symbols (avoids duplicate symbols in .asm file)
2308         * (pic14emitRegularMap): use emitSymbolToFile()
2309         * src/pic/gen.c (aopOp): fixed spillLocation handling
2310         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2311         * (genDataPointerSet): removed unneccessary variables/output
2312
2313 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2314
2315         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2316         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2317
2318 2005-07-21 Raphael Neider <rneider AT web.de>
2319
2320         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2321           architecture cannot handle them efficiently, fixes bug #1235003
2322         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2323           check for empty sets before using them (fixes bug #1232190)
2324
2325 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2326
2327         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2328           (lnksect2): generate warnings for memory overlap
2329         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2330           constseg to set the name of these segments so you can instruct the linker
2331           to place them in banks
2332         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2333         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2334           added code_seg and const_seg to options
2335         * src/SDCCglue.c (emitMaps): use options.const_seg,
2336           (createInterruptVect): put interrupt vectors in segment HOME,
2337           (glue): put HOME before static segment and put the main glue in HOME,
2338           (glue): use options.code_seg
2339         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2340         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2341           these segments so you can instruct the linker to place them in banks
2342           (linkEdit): use code_loc for HOME segment which should be the first
2343           segment in code memory now
2344         * src/SDCCmem.c: fixed more stuff like bug 1238386
2345         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2346           (changePointer): don't change function pointers to code pointers for
2347           banked functions,
2348           (compareType): added exceptional check for banked function pointers
2349         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2350         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2351           after static in code memory
2352         * src/mcs51/gen.c: added aopLiteralLong prototype,
2353           (aopForSym): use getSize for functions,
2354           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2355           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2356           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2357           the segment,
2358           (genPcall): use call for literal function pointers and generate banked
2359           calls over the one trampoline so there's only one place for the user to
2360           modify according to his/hers hardware,
2361           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2362           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2363         * src/mcs51/main.c: added keyword banked,
2364           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2365         * support/Util/SDCCerr.c,
2366         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2367           needed for passing the bank and address to the trampoline
2368         * device/lib/mcs51/crtbank.asm: added for bankswitching
2369         * device/lib/mcs51/Makefile: added crtbank
2370
2371 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2372
2373         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2374           for fields at offset 0 of a struct or union as reported
2375           on 2005-07-07 in the developer mailing list.
2376
2377 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2378
2379         * src/SDCCmem.c: fixed bug 1238386
2380
2381 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2382
2383         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2384           (patch #1144962), added peephole 300, enabled 259.x
2385         * doc/sdccman.lyx: removed screenshot and provided link instead
2386
2387 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2388
2389         * doc/sdccman.lyx: added section about debugging with ddd
2390         * doc/figures/ddd_example.eps: screenshot of debugging session
2391
2392 2005-07-04 Raphael Neider <rneider AT web.de>
2393
2394         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2395           like CODE pointers, fixes #1115683
2396         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2397           call, fixes bugs #1232211, #1228110,
2398           fixed wrong casts to pCodeFlow from pCodeInstructions
2399
2400 2005-07-04 Raphael Neider <rneider AT web.de>
2401
2402         * src/pic/gen.c (popGet): changed assert to allow for
2403           bit operands
2404         * (popGetAddr): changed signature to provide
2405           an additional index, patched all call sites
2406         * (genCmpEq): handle literal-like operands correctly
2407         * (genAddrOf): added sanity checks on __code/__data pointers
2408         * (genAssign): added handling of symbols from __code section
2409         * (gencjne): do not generate code for comparisons whose result
2410           is neither stored nor used, fixes bug #1171114
2411         * (AccLsh, AccRsh): operate on operand instead of WREG
2412         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2413           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2414           by known count
2415         * rewrote complete shift-by-literal logic, commented unused
2416           functions out
2417         * (genConstPointerGet): get multiple bytes (if result size > 1),
2418           fixed handling of non-immediate addresses
2419         * (genPointerGet): handle CODE pointers like CONST pointers
2420         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2421         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2422           operand is to be treated as a literal or not
2423         * (mov2w,genPcall,genCmpEq),
2424           src/pic/genarith.c: use aop_isLitLike() to decide between
2425           literal/register contents
2426         * (addSign): added missing offset
2427         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2428           only emit comment in debug-mode,
2429           use {aop,op}_isLitLike throughout the file
2430         * src/pic/glue.c: fix initializers for pointers (work in progress)
2431         * src/pic/pcode.c (get_op): honor index on _const symbols
2432         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2433         * (dumppBlock): added pCode size estimation
2434         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2435           check for IS_SYMOP before OP_SYMBOL'ing
2436         * fixed indentation, compacted switch-statements
2437         * (allocReg): find free register and allocate it instead of
2438           allocating new registers all the time
2439         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2440           registers as its operands (necessary only for multibyte GETs)
2441
2442 2005-07-01 Raphael Neider <rneider AT web.de>
2443
2444         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2445           debugging .asm-output macros FENTRY + FEXIT
2446         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2447           way... I wonder...
2448         * (emitpComment): NEW, printf to pCode
2449         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2450           offset handling
2451         * (popGetAddr): NEW, variant of popGet to access an immediates
2452           high(er) bytes instead of the n'th byte of memory they reference,
2453           replaced popGet with popGetAddr where neccessary
2454         * (genDataPointerGet): reactivated and fixed implementation
2455         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2456           accesses
2457         * (genDataPointerSet): fixed multibyte assignments
2458         * (genpic14Code): fixed --i-code-in-asm handling
2459         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2460         * (genPlus): fixed index-out-of-bounds error
2461         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2462         * src/pic/ralloc.c: added debugging output macro FENTRY2
2463         * (spillThis): fixed indentation, enbraced for-body for clarity
2464         * (rematStr): commented out as now unused
2465         * (regTypeNum): commented out special spill case (overwrites
2466           arbitrary values)
2467         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2468
2469 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2470
2471         * doc/sdccman.lyx: documented sfr16/sfr32,
2472           added example for using storage class with function pointers
2473         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2474
2475 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2476
2477         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2478         * device/lib/_itoa.c,
2479         * device/lib/_ltoa.c: optimized codesize
2480         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2481           but don't know how to suppress the double warning.
2482         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2483         * support/Util/SDCCerr.c,
2484         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2485
2486 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2487
2488         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2489           fixed old K&R prototypes
2490         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2491         * device/lib/_gptrget.c,
2492         * device/lib/_gptrgetc.c,
2493         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2494           also new versions for small generic pointers and banked generic pointers
2495         * src/port.h: added const_name
2496         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2497         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2498         * src/SDCCcse.c (findPrevIc): check all associative operators
2499         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2500         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2501         * src/SDCCmem.c: updated comments,
2502           set far-space to 0 for pdata, results in optimized code
2503         * src/SDCCmem.h: added macro CONST_NAME
2504         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2505           moving the info into the highest bits, see also gptrget/gptrput
2506         * src/src.dsp: added sdcc.ico to project files
2507         * src/avr/gen.c (genCast): fixed bug 0x%d
2508         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2509         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2510           relation between ptr_type and DCL_TYPE,
2511           (genCast): fixed bug 0x%d
2512         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2513           (CODE)" for const_name
2514         * src/hc08/gen.c (genCast): fixed bug 0x%d
2515         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2516           (hc08_port): added "CONST (CODE)" for const_name
2517         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2518           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2519           between ptr_type and DCL_TYPE,
2520           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2521           operand* and took AOP() inside function so sfr-ness can be checked,
2522           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2523           new prototype,
2524           (genFunction, genEndFunction): optimized stack setup,
2525           (genMinus): optimized for literals with ending zeroes (in bytes),
2526           (genCast): fixed bug 0x%d
2527         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2528           (mcs51_port): added "CONST (CODE)" for const_name
2529         * src/mcs51/peeph.def: made rule 226 more generic
2530         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2531         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2532         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2533         * src/z80/main.c (z80_port): added NULL for const_name,
2534           (gbz80_port): added NULL for const_name
2535         * support/regression/tests/bug663539.c,
2536         * support/regression/tests/sfr16.c: new tests
2537
2538 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2539
2540         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2541
2542 2005-06-24 Raphael Neider <rneider AT web.de>
2543
2544         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2545           corrected typos...
2546         * device/include/pic16/signal.h: added USBIF
2547           and SIG_USB
2548
2549 2005-06-24 Raphael Neider <rneider AT web.de>
2550
2551         * device/lib/pic16/libdev/pic18f2455.c,
2552           device/include/pic16/pic18f2455.h: NEW
2553         * device/include/pic16/pic18fregs.h,
2554           device/lib/pic16/pics.all,
2555           src/pic16/device.c: added 18f2455
2556         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2557           device/include/pic16/{pic18f[68][567].h,usart.h}:
2558           replaced MULTIPLE_USARTS define with more relaible
2559           compatibility sfrs (for USART access)
2560
2561 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2562
2563         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2564           and the output asm file line is printed on two lines.
2565
2566 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2567
2568         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2569           BGT, BLE, BHI, and BLS instructions
2570         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2571           genCmpEq): removed
2572         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2573           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2574           fixes bug #1216342
2575         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2576
2577 2005-06-15 Raphael Neider <rneider AT web.de>
2578
2579         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2580         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2581         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2582           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2583           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2584
2585 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2586
2587         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2588           Marcel Telka in bug #1215704
2589
2590 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2591
2592         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2593           located in shared memory bank.
2594
2595 2005-05-31 Raphael Neider <rneider AT web.de>
2596
2597         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2598           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2599           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2600
2601 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2602
2603         * device/lib/_strncpy.c: fixed the fix
2604
2605 2005-05-26 Raphael Neider <rneider AT web.de>
2606
2607         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2608           initializers with \0, bug #1208187
2609         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2610           intializers with \0, bug #1208187
2611
2612 2005-05-26 Raphael Neider <rneider AT web.de>
2613
2614         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2615           initializers with \0, bug #1208187
2616         * src/pic16/main.c (_process_pragma): added sanity checks
2617           for stack position and size, emit warnings when appropriate
2618
2619 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2620
2621         * device/lib/_strncpy.c: fixed not filling with \0
2622
2623 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2624
2625         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2626           createFunction),
2627         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2628           compound_statement),
2629         * src/SDCCsymt.h,
2630         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2631
2632 2005-05-24 Raphael Neider <rneider AT web.de>
2633
2634         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2635
2636 2005-05-24 Raphael Neider <rneider AT web.de>
2637
2638         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2639           TRISE definitions, closes bug #1162453
2640
2641 2005-05-22 Raphael Neider <rneider AT web.de>
2642
2643         * src/pic16/main.c (_process_pragma): check for missing
2644           arguments to pragmas code and udata
2645         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2646           consistency fixes to match other headers (thanks to Jim Paris)
2647         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2648
2649 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2650
2651         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2652
2653 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2654
2655         * support/regression/tests/bug1198642.c: new test
2656         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2657         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2658         * support/scripts/resource.h,
2659         * support/scripts/resource.rc,
2660         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2661         * support/scripts/sdcc.ico: added 32x32 icon
2662
2663 2005-05-18 Raphael Neider <rneider AT web.de>
2664
2665         * device/lib/pic16/libdev/pic18f*.c,
2666         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2667           keywords to "__sfr" and "__at (X)"
2668         * device/include/pic16/pic18fregs.h: added pic18f4520
2669         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2670           #1203088 (MPLAB compatibility)
2671
2672 2005-05-17 Raphael Neider <rneider AT web.de>
2673
2674         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2675         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2676         * device/lib/pic16/pics.all: added new devices
2677         * src/pic16/device.c: added support for pic18f4520
2678
2679 2005-05-16 Raphael Neider <rneider AT web.de>
2680         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2681         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2682         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2683           convenience function for bit access
2684
2685 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2686
2687         * device/lib/printf_large.c: fixed bug 1193299
2688         * support/regression/tests/bug1057979.c: added test %3.3s
2689
2690 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2691
2692         * device/include/mcs51/8051.h,
2693         * device/include/mcs51/8052.h: made parseable with lint
2694         * device/include/mcs51/lint.h: added include file for (sp)lint
2695         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2696         * doc/cdbfileformat.lyx,
2697         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2698
2699 2005-05-14 Raphael Neider <rneider AT web.de>
2700
2701         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2702         * device/lib/pic16/libc/stdlib/itoa.c (new)
2703         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2704         * device/lib/pic16/libio/Makefile: exclude subdir according to
2705           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2706         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2707         * src/pic16/gen.c (genFunction): prevent annoying warning
2708         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2709           nameclashes on BeOS
2710         * support/cpp2/cppmain.c (cpp_output_string): new
2711         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2712           fixes bug 1116802
2713
2714 2005-05-13 Borut Razem <borut.razem AT siol.net>
2715
2716         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2717
2718 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2719
2720         * .version: changed to version 2.5.1; back to bleeding edge development
2721
2722 2005-05-11 Borut Razem <borut.razem AT siol.net>
2723
2724         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2725           generate PDF version 1.3 documents
2726
2727 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2728
2729         * .version: changed to version 2.5.0
2730
2731 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2732
2733         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2734
2735 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2736
2737         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2738         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2739         well as many smaller updates.
2740         * .version: changed to version 2.5.0-pre1
2741
2742 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2743
2744         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2745
2746 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2747
2748         * support/regression/tests/bug1185672.c: added
2749         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2750           bug 1185672
2751         * src/mcs51/gen.c (genCall): added comments, made it look safer
2752         * src/mcs51/gen.c (genEndFunction): simplified
2753
2754 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2755
2756         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2757
2758 2005-04-14 Borut Razem <borut.razem AT siol.net>
2759
2760         * fixed bug 1045046 - SIGSEGV with really simple code?:
2761           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2762           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2763
2764 2005-04-14 Borut Razem <borut.razem AT siol.net>
2765
2766         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2767           src/pic16/device.h: temporarily disabled experimental #inline pragma
2768           for 2.5.0 release
2769
2770 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2771
2772         * device/include/z80/stdio.h,
2773         * device/include/z80/string.h: removed these highly incomplete files so
2774           SDCC can use the default ones in device/include/
2775
2776 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2777
2778         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2779         gcc warning.
2780         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2781         fix sdcpp warnings.
2782
2783 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2784
2785         * device/include/malloc.h: removed redundant __reentrant prototypes
2786         * device/lib/_mullong.c: added working xstack variant in asm (C version
2787           doesn't pass regression tests)
2788         * device/lib/bpx.c: used __data and made bpx char for mcs51
2789         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2790           (createFunction): fixed bug with xstackPtr
2791         * src/SDCCcse.c: corrected comments
2792         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2793           (killDeadCode, eBBlockFromiCode): removed unused code
2794         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2795           corrected comments
2796         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2797           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2798           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2799           (genModOneByte): fixed warning in MSVC
2800         * src/mcs51/main.c (): added comments
2801         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2802
2803 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2804
2805         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2806
2807 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2808
2809         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2810
2811 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2812
2813         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2814         characters arrays of larger size than the declared one.
2815
2816 2005-04-10 Borut Razem <borut.razem AT siol.net>
2817
2818         * src/pic/gen.c (genInline),
2819           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2820           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2821           (findNextInstruction), (findPrevInstruction),
2822           (findInstructionUsingLabel),
2823           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2824         * src/pic/pcode.c (findLabel): added missing '\n'
2825         * src/src.dsp: added SDCCdwarf2.c to the project
2826
2827 2005-04-09 Borut Razem <borut.razem AT siol.net>
2828
2829         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2830
2831 2005-04-08 Raphael Neider <rneider AT web.de>
2832
2833         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2834           into the chain after a given one) and mergeDefmapSymbols (combine
2835           defmap entries for each symbol per pcode)
2836         * (createDefmap): have defmap entries merged in the end
2837         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2838           a symbol before replacing one access type's symbol, merge symbols in
2839           the end (replacement symbol might already have an entry)
2840         * (assignValnums): keep reference to written WREG intact
2841
2842 2005-04-08 Raphael Neider <rneider AT web.de>
2843
2844         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2845           Alpha)
2846
2847 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2848
2849         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2850         bytes
2851
2852 2005-04-07 Raphael Neider <rneider AT web.de>
2853
2854         * device/include/pic16/usart.h: added compatibility defines for
2855           devices with more than one USART
2856         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2857
2858 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2859
2860         * device/lib/Makefile.in: updated for port specific include
2861
2862 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2863
2864         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2865
2866 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2867
2868         * device/include/8051.h,
2869         * device/include/8052.h,
2870         * device/include/at89S8252.h,
2871         * device/include/at89c55.h,
2872         * device/include/at89x051.h,
2873         * device/include/at89x51.h,
2874         * device/include/at89x52.h,
2875         * device/include/mcs51reg.h,
2876         * device/include/reg51.h,
2877         * device/include/reg764.h,
2878         * device/include/regc515c.h,
2879         * device/include/sab80515.h: (re)moved these 12 files
2880         * device/include/mcs51/8051.h,
2881         * device/include/mcs51/8052.h,
2882         * device/include/mcs51/at89S8252.h,
2883         * device/include/mcs51/at89c55.h,
2884         * device/include/mcs51/at89x051.h,
2885         * device/include/mcs51/at89x51.h,
2886         * device/include/mcs51/at89x52.h,
2887         * device/include/mcs51/mcs51reg.h,
2888         * device/include/mcs51/reg51.h,
2889         * device/include/mcs51/reg764.h,
2890         * device/include/mcs51/regc515c.h,
2891         * device/include/mcs51/sab80515.h: and added them here
2892
2893 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2894
2895         * device/include/stdarg.h: changed SDCC specific keywords to double
2896           underlined form.
2897         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2898           mcs51 and ds390.
2899         * device/include/hc08/mc68hc908gp32.h,
2900         * device/include/hc08/mc68hc908jb8.h,
2901         * device/include/hc08/mc68hc908jkjl.h,
2902         * device/include/hc08/mc68hc908qy.h: fixed comments
2903         * device/include/mcs51/README: updated
2904         * device/include/mcs51/c8051f120.h: added PINRSF
2905         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2906         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2907           amidst code. Also inline is not supported.
2908
2909 2005-04-06 Raphael Neider <rneider AT web.de>
2910
2911         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2912         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2913           callers stack/frame pointers
2914
2915 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2916
2917         * device/include/pic16/usart.h: added, missing in previous commit,
2918         * device/include/pic16/adc.h: fixed typo,
2919         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2920         commit,
2921         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2922         <p18fxxx.inc>
2923         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2924         uninitialized because a bug appears with gplink
2925         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2926         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2927         complains for unrecognised option
2928
2929 2005-04-05 Raphael Neider <rneider AT web.de>
2930
2931         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2932           structs as well (using memcpy)
2933         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2934           on ISRs (GOTO has no label)
2935         * src/pic16/device.h: added OF_OPTIMIZE_DF
2936         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2937           new data flow analysis/optimization
2938         * src/pic16/pcode.c: added (prototypes for and implementation of)
2939           dataflow analysis functions, fixed pCodeInstructions' inCond and
2940           outCond values, made RCALL a branch instruction
2941         * (pic16_unlinkpCode): keep C line if possible
2942         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2943           C line moved if possible
2944         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2945         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2946           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2947         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2948           new flow)
2949         * (pic16_getJumptabpCode): NEW, needed in...
2950         * (LinkFlow): fixed handling of jumptables, calls and conditional
2951           branches
2952         * (pic16_InsertCommentAfter): NEW
2953         * (pic16_pCodeReplace): made verbose and flow preserving
2954         * (AnalyzeFlow): added call to data flow analysis
2955         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2956         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2957         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2958
2959 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2960
2961         * src/SDCCast.c (decorateType): fixed bug #1105626
2962
2963 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2964
2965         * device/include/asm/pic16/features.h,
2966         * pic18f*.h headers,
2967         * device/include/pic16/adc.h,
2968         * device/include/pic16/delay.h,
2969         * device/include/pic16/i2c.h,
2970         * device/include/pic16/malloc.h,
2971         * device/include/pic16/stdio.h,
2972         * device/include/pic16/stdlib.h,
2973         * device/include/pic16/string.h,
2974         * device/lib/pic16/libc/stdio/printf_tiny.c,
2975         * device/lib/pic16/libc/stdio/printf_small.c,
2976         * device/lib/pic16/libc/stdio/strmgpsim.c,
2977         * device/lib/pic16/libc/stdio/strmmssp.c,
2978         * device/lib/pic16/libc/stdio/strmusart.c,
2979         * device/lib/pic16/libc/stdio/vfprintf.c,
2980         * device/lib/pic16/libc/stdlib/ltoa.c,
2981         * device/lib/pic16/libc/stdlib/putchar.c,
2982         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2983         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2984         * device/lib/pic16/libc/stdlib/memchrram.c,
2985         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2986         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2987         * device/lib/pic16/libio/adc/adcbusy.c,
2988         * device/lib/pic16/libio/adc/adcread.c,
2989         * device/lib/pic16/libio/adc/adcsetch.c,
2990         * device/lib/pic16/libio/usart/ubaud.c,
2991         * device/lib/pic16/libio/usart/ubusy.c,
2992         * device/lib/pic16/libio/usart/udrdy.c,
2993         * device/lib/pic16/libio/usart/uopen.c,
2994         * device/lib/pic16/libio/usart/uputc.c,
2995         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2996         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2997         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2998         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2999         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3000         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3001         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3002         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3003         specific keywords to double underlined form,
3004         * device/lib/pic16/libc/Makefile.rules,
3005         * device/lib/pic16/libsdcc/Makefile.rules,
3006         * device/lib/pic16/libm/Makefile,
3007         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3008         to compile with C standard set in Makefile.common
3009         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3010         rand.c and crc.c in compilation process,
3011         * device/lib/pic16/libsdcc/int/divuint.c,
3012         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3013         `c' from signed to unsigned,
3014         * device/lib/pic16/startup/crt0.c,
3015         * device/lib/pic16/startup/crt0i.c,
3016         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3017         keywords to double underlined form, bug fixes in _do_cinit function
3018         which prevented the correct initialization of the .idata segment,
3019         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3020         core to enter a infinite loop
3021         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3022
3023 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3024
3025         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3026
3027 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3028
3029         * device/include/Makefile.in: add support for hc08 subdirectory
3030         * device/include/hc08/: new subdirectory
3031         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3032         Lucas Loizaga, thanks!
3033         * device/include/hc08/mc68hc908qy.h,
3034         * device/include/hc08/mc68hc908gp32.h,
3035         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3036         their own directory. Changed internal macro names to use the compiler
3037         reserved namespace. Changed SDCC specific keywords to double
3038         underlined form.
3039         * device/include/math.h,
3040         * device/include/malloc.h,
3041         * device/include/stdarg.h,
3042         * device/include/stdbool.h
3043         * device/include/string.h,
3044         * device/include/tinibios.h,
3045         * device/include/ds400rom.h,
3046         * device/include/8051.h,
3047         * device/include/8052.h,
3048         * device/include/80c51xa.h,
3049         * device/include/at89c55.h,
3050         * device/include/at89S8252.h,
3051         * device/include/at89x51.h,
3052         * device/include/at89x52.h,
3053         * device/include/ds80c390.h,
3054         * device/include/reg764.h,
3055         * device/include/regc515c.h,
3056         * device/include/sab80515.h,
3057         * device/include/mcs51/c8051f000.h,
3058         * device/include/mcs51/c8051f018.h,
3059         * device/include/mcs51/c8051f020.h,
3060         * device/include/mcs51/c8051f040.h,
3061         * device/include/mcs51/c8051f060.h,
3062         * device/include/mcs51/c8051f120.h,
3063         * device/include/mcs51/c8051f300.h,
3064         * device/include/mcs51/c8051f310.h,
3065         * device/include/mcs51/c8051f320.h,
3066         * device/include/mcs51/c8051f330.h,
3067         * device/include/mcs51/c8051f350.h,
3068         * device/include/z180.h: Changed SDCC specific keywords to double
3069         underlined form.
3070
3071 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3072
3073         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3074         18F4455,
3075         * (pic16_assignConfigWordValue): disable testing of configuration
3076         register value with config mask,
3077         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3078         function with port->fun_prefix,
3079         * (genFunction): when generating a naked interrupt function never
3080         create an absolute segment placed in interrupt vector address, place
3081         the actual interrupt function at IVA instead, when an interrupt
3082         function is generated with unspecified interrupt then do not create
3083         the absolute section,
3084         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3085         code for generating a call to generic pointer get/put function with
3086         a call to function pic16_callGenericPointer(),
3087         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3088         the call to the generic pointer get/put functions with prefixing the
3089         function name with port->fun_prefix,
3090         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3091         * src/pic16/main.c (_process_pragma): prefix function with
3092         port->fun_prefix,
3093         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3094         calling assembler, old 18Fxxxx macro is deprecated,
3095         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3096         PC_ASMDIR in while condition,
3097         * (findInstruction): add PC_ASMDIR in while condition,
3098         * (buildCallTree): prefix main with port->fun_prefix,
3099         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3100         identifier for variable with banked access in instructions BTFSS,
3101         BTFSC, BCF, BSF, BTG
3102         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3103         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3104         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3105         perform optimization when enviroment variable NO_REG_OPT is set,
3106         * (insideLRBlock): NEW, return 1 if register is inside an
3107         INF_LOCALREGS block,
3108         * (RemoveRegFromLRBlock): remove a register that is completely
3109         eliminated by register optimization, but it is still left in local
3110         register store/restore in/from stack block,
3111         * (Remove2pcodes): after removing register, check to see if it
3112         should be removed from local register store/restore in/from stack
3113         block,
3114         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3115         DUMMY_READ_VOLATILE,
3116
3117         * device/include/pic16/adc.h: minor prototype modifications and
3118         update,
3119         * device/include/pic16/malloc.h: added GPL notice various
3120         modifications,
3121         * device/include/pic16/stdint.h: NEW, standard header for ints
3122         * device/include/pic16/delay.h: NEW, header for delay functions,
3123         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3124         delay1mtcy,
3125         * device/include/pic16/signal.h: NEW, header providing helper macros
3126         for implementing signal handlers,
3127         * device/include/pic16/stdio.h: added prototypes for functions,
3128         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3129         prototypes for stdin and stdout, added macro PUTCHAR to
3130         automatically implement putchar function prototype,
3131         * device/include/pic16/usart.h: modified and updated USART library,
3132         * device/lib/pic16/libio/adc/,
3133         * device/lib/pic16/libio/i2c: some modifications to improve library
3134         performance,
3135         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3136         family of functions,
3137         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3138         family of functions and other sources,
3139         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3140         of the PIC18Fxx[28] devices,
3141         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3142         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3143         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3144         _do_cinit function, because the previous failed when local variables
3145         where not placed in the same memory bank,
3146         * device/lib/pic16/libsdcc/char/: various modifications to improve
3147         library performance,
3148         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3149         information on the new functions of the c library and more...
3150
3151 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3152
3153         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3154
3155 2005-03-26 Raphael Neider <rneider AT web.de>
3156
3157         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3158           if condition == CARRY)
3159         * (genCmp): adapted to new genSkipc semantics
3160         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3161           on rIfx (genCmp was broken)
3162
3163 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3164
3165         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3166         * src/z80/main.c (_keywords[]),
3167         * src/SDCCglobal.h (struct options),
3168         * src/SDCC.y,
3169         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3170         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3171         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3172         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3173         always available in leading double underscore form. The C99 support is
3174         mostly missing, but it's a start.
3175         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3176         reserved identifier "__data".
3177
3178 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3179
3180         * src/mcs51/peeph.def: fixed bug 1170013
3181
3182 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3183
3184         * device/include/mcs51reg.h: fixed bug 842007
3185
3186 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3187
3188         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3189         last time.
3190
3191 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3192
3193         * src/port.h (struct PORT),
3194         * src/avr/ralloc.c (avr_assignRegisters),
3195         * src/avr/main.c,
3196         * src/ds390/ralloc.c (ds390_assignRegisters),
3197         * src/ds390/main.c,
3198         * src/hc08/ralloc.c (hc08_assignRegisters),
3199         * src/hc08/main.c,
3200         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3201         * src/mcs51/main.c,
3202         * src/pic/ralloc.c (pic14_assignRegisters),
3203         * src/pic/main.c,
3204         * src/pic16/ralloc.c (pic16_assignRegisters),
3205         * src/pic16/main.c,
3206         * src/xa51/ralloc.c (xa51_assignRegisters),
3207         * src/xa51/main.c,
3208         * src/z80/ralloc.c (z80_assignRegisters),
3209         * src/z80/ralloc.h,
3210         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3211         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3212         * src/SDCCcse.h,
3213         * src/SDCCdflow.c (computeDataFlow),
3214         * src/SDCCdflow.h,
3215         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3216         * src/SDCCloop.h,
3217         * src/SDCCcflow.c (*),
3218         * src/SDCCcflow.h,
3219         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3220         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3221         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3222         immedDom() returning wrong block; probably fixes bug #1160833)
3223
3224 2005-03-20 Borut Razem <borut.razem AT siol.net>
3225
3226         * support/scripts/inc2h.pl: WIN32 port
3227
3228 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3229
3230         * device/lib/makefile.in: added abs.c and labs.c
3231
3232 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3233
3234         * device/include/stdint.h: added
3235         * device/lib/abs.c: added
3236         * device/lib/labs.c: added
3237         * device/include/stdlib.h: added abs() and labs() prototypes
3238         * device/lib/libsdcc.lib: added abs and labs
3239         * device/include/float.h,
3240         * device/lib/_fsmul.c,
3241         * device/lib/printf_fast.c,
3242         * device/lib/printf_tiny.c: updated comments
3243
3244 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3245
3246         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3247         bug #1164313
3248
3249 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3250
3251         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3252         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3253
3254 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3255
3256         * device/lib/printf_large.c: removed inline assembly for portability and
3257           readability. Use printf_fast if speed or size are more important.
3258         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3259         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3260
3261 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3262
3263         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3264         prevent compiler warning
3265
3266 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3267
3268         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3269         moved to level 0 and declared as static. Also they are explicit
3270         placed in access bank. This was necessery because some times they
3271         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3272         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3273         optimizations. Currently only compare to unsigned char is implemented,
3274         * src/pic16/gen.c: added fReturnIdx array,
3275         * (struct resolvedIfx) is moved to gen.h and made public,
3276         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3277         * (aopForSym): added an optimization to directly store in stack of
3278         the operand of a SEND iCode,
3279         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3280         but as registers instead (AOP_REG) using the fReturnIdx array,
3281         * (pic16_freeAsmop): remove the freed register from the
3282         _G.sregsAlloc field,
3283         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3284         a compare of 'WREG',
3285         * (pic16_popGetTempRegCond): changed function prototype, now
3286         function takes also a bitVector argument v which holds the current
3287         set of registers that are allocated for stack access by aopForSym,
3288         registers allocated in aopForSym for accessing stack symbols are not
3289         any more part of the functions usedRegs field,
3290         * (genCall): some times aopOp is called for a stack variable to be
3291         send, aopForSym might perform the push, if this is true make sure
3292         that genCall doesn't push the variable twice by testing _G.resDirect,
3293         * (genFunction): changed testing for unspecified interrupt number
3294         from 256 to INTNO_UNSPEC,
3295         * modified selection scheme of frame pointer generation. Previously
3296         if function did use local registers a frame pointer was generated,
3297         now a frame pointer is generated only if function has arguments
3298         (that need PLUSW2 register access), or has stack arguments, or the
3299         compiler is not instructed to omit the frame pointer,
3300         * (genEndFunction): before restoring local registers that were saved
3301         in the function preamble, also restore the registers that *might*
3302         have been allocated for stack access,
3303         * (genRet): removed some old comments,
3304         * (genCmp, the active (RN's) version): added a call to the
3305         pic16_genCmp_special function to perform the compare with a more
3306         robust and optimized way,
3307         * (genInline): a feature has been added in inline code generation,
3308         which allows a wildcard variable substitution when writing inline
3309         assembly. Code is incomplete and experimental therefore undocumented,
3310         * (genCast): changed order of aopOp for result and right to allow
3311         aopForSym to directly load the result if possible,
3312         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3313         perform an optimized compare on some selected special occasions,
3314         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3315         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3316         generate an IVT any more,
3317         * src/pic16/main.c (pic16_optionsTable): added command line option
3318         --optimize-cmp,
3319         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3320         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3321         macros,
3322         * src/pic16/NOTES: Raphael Neider added in list of active developers
3323         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3324         jumptable_end to prevent bug #,
3325         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3326         inCond and outCond fields,
3327         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3328         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3329         turn off register spilling,
3330         * (packRegsForOneUse): synced with other ports' versions although it
3331         is not used currently,
3332         * (pic16_packRegisters): added an optimization while reading
3333         structure bitfields, some registers may be saved (malloc code is
3334         decreased by 80 bytes)
3335
3336 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3337
3338         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3339         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3340         this can be optimized more?
3341
3342 2005-03-10 Raphael Neider <rneider AT web.de>
3343
3344         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3345           genNearPointerGet): (hopefully) fixed access to bitfields via
3346           pointers (p->bitN = x; and x = p->bitN; failed)
3347
3348 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3349
3350         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3351
3352 2005-03-09 Raphael Neider <rneider AT web.de>
3353
3354         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3355
3356 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3357
3358         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3359         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3360           (regTypeNum): set REG_BIT type if necessary
3361         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3362         * support/regression/tests/critical.c: check bug 1144613
3363
3364 2005-03-02 Raphael Neider <rneider AT web.de>
3365
3366         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3367
3368 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3369
3370         * src/avr/ralloc.c (serialRegAssign),
3371         * src/ds390/ralloc.c (serialRegAssign),
3372         * src/hc08/ralloc.c (serialRegAssign),
3373         * src/mcs51/ralloc.c (serialRegAssign),
3374         * src/pic/ralloc.c (serialRegAssign),
3375         * src/pic16/ralloc.c (serialRegAssign),
3376         * src/xa51/ralloc.c (serialRegAssign),
3377         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3378
3379 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3380
3381         * src/SDCCast.c (decorateType): fixed bug 1124787
3382
3383 2005-02-20 Hubert Sack <sack AT digiplan.de>
3384         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3385
3386         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3387         patch #1121755
3388
3389 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3390
3391         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3392         to keep the correct label reference count when adding/removing references
3393         to labels. A peephole file using this is appended to patch #1144962.
3394
3395 2005-02-14 Raphael Neider <rneider AT web.de>
3396
3397         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3398         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3399         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3400           retrievals of result operand's value on assignment
3401
3402 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3403
3404         * device/include/pic16/string.h: modified prototype for memccpy()
3405         to memccpy(void *, void *, char, size_t)
3406         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3407         check whether to omit frame pointer or not,
3408         * (genInline): convert all occurences of "\n" to LF in inline
3409         assembler blocks, this helps formatting the inline text,
3410         * (pic16_loadFSR0): modified prototype,
3411         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3412         removed some 8051 legacy code,
3413         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3414         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3415         before allocating temporary registers in functions,
3416
3417 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3418
3419         * support/regression/tests/bitvars.c: corrected the "fix"
3420
3421 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3422
3423         * support/regression/tests/bitvars.c,
3424         * support/regression/tests/bitwise.c,
3425         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3426
3427 2005-02-10 Raphael Neider <rneider AT web.de>
3428
3429         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3430           different size for Alpha
3431         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3432
3433 2005-02-09 Raphael Neider <rneider AT web.de>
3434
3435         * src/SDCC.lex(doPragma) : save and restore warning options as well
3436           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3437         * have #pragma less_pedantic set the errorlevel to WARNING
3438           (fixes #1117001)
3439         * (cloneOptimize) : fixed wrong malloc's size
3440         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3441           facilitate correct handling of #pragma (save|restore)
3442
3443 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3444
3445         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3446
3447 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3448
3449         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3450
3451 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3452
3453         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3454
3455 2005-02-02 Raphael Neider <rneider AT web.de>
3456
3457         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3458         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3459         * (pic16_storeForReturn): fixed to allow returning function pointers
3460         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3461         * device/include/pic16/{stddef.h,stdbool.h}: added
3462
3463 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3464
3465         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3466
3467 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3468
3469         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3470         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3471          appeared to be required
3472
3473 2005-01-31 Borut Razem <borut.razem AT siol.net>
3474
3475         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3476           include/mcs51 and include/z80 directories to the package
3477
3478 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3479
3480         * src/hc08/gen.c (genFunction): fixed bug #1112752
3481
3482 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3483
3484         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3485
3486 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3487
3488         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3489
3490 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3491
3492         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3493
3494 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3495
3496         * device/include/c8051fxxx.h: removed these 6 files
3497         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3498
3499 2005-01-26 Raphael Neider <rneider AT web.de>
3500
3501         * src/pic16/gen.c (genAssign): fixed assignment from longs
3502           in codespace (were cut to three bytes)
3503         * (genDummyRead): implemented (except for CODESPACE...),
3504           fixed bug #1108575
3505         * src/pic16/glue.c (emitStatistics): beautified
3506         * device/lib/pic16/libm/Makefile: added include path
3507
3508 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3509
3510         * src/z80/gen.c (aopPut): fixed bug #1103902
3511
3512 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3513
3514         * device/lib/expf.c: fixed bug #1095792
3515
3516 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3517
3518         * device/lib/pic16/libm: added Math library sources
3519
3520 2005-01-24 Raphael Neider <rneider AT web.de>
3521
3522         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3523           to enable upcast to pCodeOpReg2 (there is no type tag to
3524           differenciate the two and pic16_popGet2p cast into PCOR2)
3525         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3526           (sizeof(sectNames) changed to sizeof(sectName))
3527           Both patches fix segfaults under MinGW.
3528
3529 2005-01-23 Raphael Neider <rneider AT web.de>
3530
3531         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3532           Safe_[mc]?alloc()'ed variables
3533         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3534           of (byte sized) temporaries (assign them to WREG for now)
3535         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3536           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3537           this might fix SIGSEGVs on MinGW...
3538         * src/SDCCopt.c (killDeadCode): restored original behaviour
3539           (volatile operands might get thrown away though)
3540
3541 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3542
3543         * src/pic16/gen.c: fixed bug #1106975,
3544         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3545         pointer update, INTCON is saved, global interrupts are disabled and
3546         restored after updateing TOS.
3547         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3548         * added function attribute 'shadowregs' to take advantage of shadow
3549         registers,
3550         * added function attribute 'wparam' as an alternative to the wparam
3551         pragma,
3552         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3553         user declares a non-ISR function as 'shadowregs',
3554         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3555
3556 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3557
3558         * .version: bumped version number to 2.4.8
3559         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3560         pic16 port,
3561         * device/lib/pic16/libio/i2c/: I2C module support library,
3562         * device/include/pic16/i2c.h: I2C support library header,
3563         * device/lib/pic16/libc/stdio/: standard IO support sources,
3564         * (printf_small.c): printf_small() source, supports float print,
3565         * (printf_tiny.c): printf_tiny() source, does not support floats,
3566         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3567         enable global optimizations for entire library source, other
3568         Makefiles in the source tree are also modified to reflect this,
3569         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3570         function,
3571         * doc/sdccman.lyx: updated to reflect new changes,
3572         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3573         sym->onStack if-case,
3574         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3575         sbit, idata, _idata, xdata, _xdata,
3576         * added pragma library, to link an external library, (see doc),
3577         * removed command line options, --pomit-config-words, --pomit-ivt,
3578         --pleave-reset-vector,
3579         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3580         when calling assembler to reflect memory model used, also define
3581         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3582         reflect stack model used,
3583         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3584         on stack return NULL,
3585
3586 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3587
3588         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3589           of the operands is volatile. Fixes #1020220
3590
3591 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3592
3593         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3594         * (OptimizeRegUsage): make sure that there is really no other flow where
3595           the first pCode is used
3596
3597 2005-01-22 Raphael Neider <rneider AT web.de>
3598
3599         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3600           to fix #1106967 (pCode->seq are not set up correctly)
3601
3602 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3603
3604         * src/SDCCglue.c (glue): make sure code area is declared before the
3605         static initialization area.
3606
3607 2005-01-21 Raphael Neider <rneider AT web.de>
3608
3609         * device/lib/Makefile.in: fixed test for pic16 install dir
3610         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3611           optimizations
3612         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3613           added --optimize-goto compiler switch and pragma wparam documentation
3614         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3615         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3616           and PRODH closing bug #1071770 (peephole optimizer)
3617
3618 2005-01-19 Raphael Neider <rneider AT web.de>
3619
3620         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3621           cmdLine buffers (used when calling sdcpp...) are large enough
3622           (MAX_PATH=256 truncates arguments leading to system halts when
3623           used in MinGW...)
3624         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3625         * (genUminus): rewritten to for efficiency
3626         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3627           used uninitialized in some cases)
3628         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3629           copy the third byte from the int -- now assumes 0x80 (data memory)
3630         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3631           operands (genAddLit expects the iCode's operands to swapped as
3632           well), fixed leftover bytes (crashed for short left operands)
3633         * (pic16_genMinusDec): performance improvements, removed false
3634           PIC14 emitSKPNCs
3635         * (pic16_genMinus): fixed to cope with differently sized operands
3636         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3637           for --obanksel > 1
3638         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3639         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3640           new banksel optimization
3641         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3642           analysis for temporary registers (segfaults...)
3643         * src/pic16/peeph.def: added rule
3644
3645 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3646
3647         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3648         which converts a float number to its ASCII representation
3649         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3650         functions to convert the fractional and integer part of a float to ASCII,
3651         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3652         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3653         ram
3654         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3655         _STATMEM macros,
3656         * device/include/pic16/adc.h: added GPL info,
3657         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3658         a pCodeOp as tested operand,
3659         * (genNearPointerGet): optimized bit testing, does not use
3660         intermediate register for bit value, test directly instead with
3661         BTFSS, BTFSC, works only for single bits,
3662         * (genpic16Code): dump the name of the iCode in the asm,
3663         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3664         renamed to pic16_decodeOp,
3665         * (serialRegAssign): do not allocate a temporary register for iCode
3666         sequences that test a single bit for 1/0
3667
3668 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3669
3670         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3671         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3672         access stack and frame pointers. They are initially assigned to
3673         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3674         accessing SFRs. Updated all occurences of modification of stack or
3675         frame pointer in gen.c and pcode.c,
3676         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3677         assigning of a literal value to pointers,
3678         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3679         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3680         selected
3681
3682 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3683
3684         * doc/sdccman.lyx: update documentation about stack pragma, added
3685         some info for stack memory models
3686
3687 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3688
3689         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3690
3691 2005-01-08 Raphael Neider <rneider AT web.de>
3692
3693         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3694           udata sections to fix bug #1097823
3695
3696 2005-01-05 Raphael Neider <rneider AT web.de>
3697
3698         * src/pic16/gen.c (genGenericShift): added handling of differently
3699           sized left operand and result
3700
3701 2005-01-04 Raphael Neider <rneider AT web.de>
3702
3703         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3704         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3705           to hold the condition bit)
3706         * added new version of genCmp (old code available via #define)
3707         * added new version of genShiftLeft/genShiftRight in a generic
3708           way, now supports shifting by negative values
3709         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3710           shiftCount (expected by genGenericShift)
3711         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3712         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3713           dump
3714         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3715           is an invalid literal too...)
3716
3717 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3718
3719         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3720         from Raphael Neider,
3721         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3722         for 8-bit literals. This fixes some literal operands which are sign
3723         extended to 16-bits ints when instruction needs only 8-bits.
3724
3725 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3726
3727         * device/lib/logf.c: added mcs51 assembly version
3728         * device/lib/expf.c: added mcs51 assembly version
3729         * device/lib/_logexpf.c: new shared asm code for expf and logf
3730         * device/include/math.h: add defines for assembly math library
3731         * device/lib/Makefile.in: build new _logexpf.c
3732         * device/lib/libfloat.lib: use new _logexpf.c
3733
3734 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3735
3736         * src/pic/device.c
3737         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3738           device types which have less than 0x7f registers.
3739
3740 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3741
3742         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3743
3744 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3745
3746         * device/lib/printf_fast.c: only build on supported arch.
3747         * device/lib/printf_tiny.c: only build on supported arch.
3748         * device/lib/printf_fast_f.c: only build if asm float lib
3749         * device/lib/_fsget1arg.c: only build if asm float lib
3750         * device/lib/_fsget2args.c: only build if asm float lib
3751         * device/lib/_fsnormalize.c: only build if asm float lib
3752         * device/lib/_fsreturnval.c: only build if asm float lib
3753         * device/lib/_fsrshift.c: only build if asm float lib
3754         * device/lib/_fsswapargs.c: only build if asm float lib
3755         * device/include/stdio.h: don't provide print_fast,
3756           print_fast_f, print_tiny prototypes if --xstack used
3757
3758 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3759
3760         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3761         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3762           to the SOURCES
3763
3764 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3765
3766         * device/lib/printf_fast_f.c: same as printf_fast, but
3767           with floating point enabled
3768         * device/lib/printf_fast.c: minor tweaks
3769         * device/include/stdio.h: add printf_fast_f
3770
3771 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3772
3773         * src/SDCCmain.c: make --float-reent default for mcs51
3774         * device/lib/_fsadd.c: added mcs51 assembly version
3775         * device/lib/_fssub.c: added mcs51 assembly version
3776         * device/lib/_fsmul.c: added mcs51 assembly version
3777         * device/lib/_fsdiv.c: added mcs51 assembly version
3778         * device/lib/_fseq.c: added mcs51 assembly version
3779         * device/lib/_fsneq.c: added mcs51 assembly version
3780         * device/lib/_fsgt.c: added mcs51 assembly version
3781         * device/lib/_fslt.c: added mcs51 assembly version
3782         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3783         * device/lib/Makefile.in: add _fscmp to build
3784         * device/lib/libfloat.lib: add _fscmp to build
3785
3786 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3787
3788         * device/lib/_fs2slong.c: added mcs51 assembly version
3789         * device/lib/_fs2sint.c: added mcs51 assembly version
3790         * device/lib/_fs2schar.c: added mcs51 assembly version
3791         * device/lib/_fs2ulong.c: added mcs51 assembly version
3792         * device/lib/_fs2uint.c: added mcs51 assembly version
3793         * device/lib/_fs2uchar.c: added mcs51 assembly version
3794         * device/lib/_slong2fs.c: added mcs51 assembly version
3795         * device/lib/_sint2fs.c: added mcs51 assembly version
3796         * device/lib/_schar2fs.c: added mcs51 assembly version
3797         * device/lib/_ulong2fs.c: added mcs51 assembly version
3798         * device/lib/_uint2fs.c: added mcs51 assembly version
3799         * device/lib/_uchar2fs.c: added mcs51 assembly version
3800         * device/include/float.h: added #define to select asm vs c
3801
3802 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3803
3804         * device/lib/printf_fast.c: improvements to float output
3805         * device/include/float.h: add defines for assembly float library
3806         * device/lib/_fsget1arg.c: receive 1 float arg
3807         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3808         * device/lib/_fsnormalize.c: normalize a float
3809         * device/lib/_fsreturnval.c: return float, various helper routines
3810         * device/lib/_fsrshift.c: right shift a float's mantissa
3811         * device/lib/_fsswapargs.c: swap 2 floats
3812         * device/lib/Makefile.in: build these 6 new files for mcs51
3813         * device/lib/libfloat.lib: add these 6 files to the library
3814
3815 2004-12-26 Borut Razem <borut.razem AT siol.net>
3816
3817         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3818           built by gcc 3.4.2
3819
3820 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3821
3822         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3823           and fully reentrant and register bank neutral.
3824         * device/lib/printf_fast.c: added float (not enabled by default),
3825           added compact/slower integer (also not enabled by default),
3826           improved size/speed of fast integer code, other minor changes
3827         * device/include/stdio.h, device/lib/Makefile.in,
3828           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3829
3830 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3831
3832         * src/pic16/pcode.c: declaring variables other than at the start of a
3833           block is not supported in C by VC6.
3834
3835 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3836
3837         * applied a previous patch from Raphael Neider that wasn't included
3838         in the previous commits, which fixes infinite loops within jumptable
3839         improvements,
3840         * made some fixes that previous patches introduced
3841
3842 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3843
3844         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3845         that fixes an issue with AOP_PCODE asmop's offset,
3846         * (pic16_popCopyReg): update instance field too,
3847         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3848         function of pic port,
3849         * (genCmp, genAnd, genAssign),
3850         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3851
3852 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3853
3854         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3855         variables initial values to idata section,
3856         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3857         variables in some functions. This utilizes parmBytes field of iCode
3858         structure to hold the offset of the variable in stack. (might be
3859         able to use the stack field too?)
3860         * applied patch from Raphael Neider # ### , # ###
3861         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3862         variable initial values in idata section,
3863         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3864         for static variables with initial value
3865         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3866         applied fix in while loop from Raphael Neider.
3867
3868 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3869
3870         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3871         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3872         * src/ds390/ralloc.c (serialRegAssign): spill bits
3873         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3874         * support/Util/SDCCerr.c,
3875         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3876         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3877         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3878
3879 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3880
3881         * device/include/sdcc-lib.h: inserted LGPL, added includes
3882           asm/ds390/features.h and asm/mcs51/features.h
3883         * device/include/asm/default/features.h,
3884         * device/include/asm/gbz80/features.h,
3885         * device/include/asm/z80/features.h: added empty _AUTOMEM
3886           and _STATMEM
3887         * device/include/asm/ds390/features.h,
3888         * device/include/asm/mcs51/features.h: added files with defines for
3889           _AUTOMEM and _STATMEM indicating automatic and static storage class
3890         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3891         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3892         * src/SDCCicode.c (geniCodeCast),
3893         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3894         * src/SDCCloop.c (loopInduction): removed unused variable lr
3895         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3896           to convertToFcall to include char modulo (RFE 1065037), added check
3897           if left operand is unsigned and use abs of literal value
3898         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3899           as it doesn't work after conversion from peephole.def to peephole.rul
3900         * src/mcs51/gen.c (toBoolean): added check for size,
3901           (genModOneByte): optimized code for signed char modulo a literal
3902           power of 2 (thanks to Hubert Sack),
3903           (genRRC): removed unnecessary "clr c",
3904           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3905         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3906           jump optimization,
3907           swapped rules 256.c and 256.d,
3908           extended 256.d by using new multiple checks (thanks Erik),
3909           added rules 256.e and 256.f,
3910           updated rule 261.a and 261.b to new generated code
3911         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3912
3913 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3914
3915         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3916           induction related bugs, including first part of bug #1074377
3917
3918 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3919
3920         * applied patch from bug-report #1076292,
3921         * applied patches for genAnd and Goto-optimizations for Raphael
3922         Neider,
3923         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3924         dump a less iCode information,
3925         * src/pic16/device.h (pic16_options_t): added field debgen,
3926         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3927         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3928         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3929         puclic,
3930         * (various functions): added macros FENTRY and FENTRY2 to functions,
3931         to emit function prologue,
3932         * (various functions): fixed indentation,
3933         * (genNearPointerGet): fixed loading of FSR0,
3934         * (genPackBits): applied patch from Raphael Neider to fix updating
3935         of FSR0 and touching only the modified bits,
3936         * src/pic16/genarith.c (various functions): added macros FENTRY to
3937         emit function prologue in comments,
3938         * src/pic16/pcode.h: added functions debugf2, debugf3,
3939         * src/pic16/ralloc.c: partial fix for packForPush caused
3940         segmentation fault,
3941
3942 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3943
3944         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3945           <stsp AT users.sourceforge.net> with reversed byte order
3946         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3947
3948 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3949
3950         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3951           bug #1074377
3952         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3953         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3954
3955 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3956
3957         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3958
3959 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3960
3961         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3962           conditions,
3963           (setFromConditionArgs): friendly operand parser for peephole rules,
3964           (operandBaseName, operandsNotRelated): new peephole condition
3965           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3966           architecture specific register naming into account, handles n-way
3967           comparisons, and supports quoted literals
3968         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3969
3970 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3971
3972         * src/mcs51/peeph.def: fixed bug #1076940
3973
3974 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3975
3976         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3977
3978 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3979
3980         Adding support for replacing ljmps with sjmps in jumptables
3981         generated for switch statements. For now you need to set the
3982         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3983         Now 4 algorithms for mcs51 jumptable generation are used:
3984         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3985         addresses loaded pc-relative for up to 112 cases and stack-pushing
3986         target addresses loaded with offset from dptr for up to 256 cases.
3987
3988         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3989         * src/mcs51/main.c: adapted constants for switch table generation
3990         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3991
3992 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3993
3994         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3995         * support/regression/tests/bug1057979.c: added test for bug 1073386
3996
3997 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3998
3999         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4000         compilers
4001
4002 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4003
4004         * src/pic16/device.h,
4005         * src/pic16/genarith.c,
4006         * src/pic16/glue.c,
4007         * src/pic16/main.c,
4008         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4009
4010 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4011
4012         Large cummulative patch for pic16 port.
4013         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4014         to call when a stack overflow occurs,
4015         * (malloc.h): added CVS Id tag,
4016         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4017         variable,
4018         * added libc directory. The current version of LibC contains string
4019         functions, ctype functions and macros and some functions of the
4020         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4021         be extensively tested in the future. Standard disclaimer here.
4022         Library is not automatically build yet. But one can build it by
4023         invoking 'make' inside the libc directory.
4024         * added ADC library under libio. Preliminary version yet.
4025
4026         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4027         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4028         aopForRemat() now and not by pic16_aopOp(),
4029         * (pic16_popGetTempReg): removed warning messgae when allocating
4030         temporary registers, its a buggy feature and will be removed,
4031         * (pic16_popGet): set register instance field in AOP_CRY,
4032         * (pic16_outBitC): fixed for results in size greater than 1,
4033         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4034         * (pic16_storeForReturn): optimized return of 0,
4035         * (genCmp): experimental code for new genCmp which uses PIC18's
4036         special compare&skip instructions. Initial tests fail some times
4037         with variables grater than 1 byte in size, so new code is disabled,
4038         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4039         a single bit,
4040         * (genCast): began a fix to optimize the casting of a bit to another
4041         bit, now assigning a bitfield to another bitfield will fail, sorry,
4042         * src/pic16/main.c: disabled the use of lr-support feature,
4043         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4044         * added some function prototypes, added function _debugf prototype,
4045         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4046         bits with offset (case PO_GPR_BIT),
4047         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4048         command line,
4049         * (isBankInstruction): modified to return 0 for no banking instruction,
4050         and 1 for banking instruction,
4051         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4052         caused stop processing pCodes after a inline assembly block,
4053         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4054         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4055         registers when it shouldn't,
4056         * src/pic16/ralloc.c (allocReg): add preliminary support for
4057         supporting a limited set of temporary registers,
4058
4059 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4060
4061         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4062           genDataPointerSet): ensure assignments always copy in MSB to LSB
4063           order,
4064           (loadRegFromAop): recognize CLRH optimization,
4065           (genFunction): optimize RECEIVE iCodes in reentrant functions
4066
4067 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4068
4069         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4070           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4071           selected.
4072         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4073         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4074           contiguous with data
4075
4076 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4077
4078         * device/lib/_gptrget.c (_gptrget),
4079         * device/lib/_gptrgetc.c (_gptrgetc),
4080         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4081           instead of sjmp to ret
4082         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4083           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4084
4085 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4086
4087         * .version: bumped version to 2.4.7
4088         * device/lib/_gptrget.c (_gptrget): is now _naked
4089         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4090         * device/lib/_gptrput.c (_gptrput): is now _naked
4091         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4092           (createFunction): fixed xstack
4093         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4094         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4095           or bit either,
4096           (geniCodeCritical): store original interrupt state in an iTemp bit
4097           var unless stack-auto
4098         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4099         * src/SDCCmain.c (setIncludePath): added include/target to search path
4100         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4101         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4102           prototype,
4103           (processFuncArgs): put bit vars in bit area
4104         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4105           unsaveRBank): fixed xstack,
4106           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4107           (genFunction, genEndFunction): fixed xstack,
4108           (genAssign): optimization don't walk backwards through mem
4109         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4110         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4111         * support/regression/Makefile: also make library (for stack-auto) when
4112           making "all" and added "test-mcs51-xstack-auto"
4113         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4114         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4115         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4116         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4117         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4118           make-library by MAKE_LIBRARY
4119         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4120           regression tests for xstack
4121         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4122         * support/regression/tests/critical.c: test for critical on mcs51
4123
4124 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4125
4126         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4127           built version of sdcc instead of installed version
4128
4129 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4130
4131         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4132         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4133           vprintf.c now
4134         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4135         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4136           WARNING: remove device/lib/build/z80/printf.o by hand when
4137           updating from previous build!
4138         * device/lib/z80/printf.c: updated comment
4139         * support/regression/tests/bug1057979.c: test all ports now
4140         * support/regression/tests/bug1065458.c: file added
4141
4142 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4143
4144         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4145           *_start and *_end symbols for static functions
4146
4147 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4148
4149         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4150           and search crt0.o in all library paths,
4151           (setIncludePath): proper handling of --nostdinc,
4152           (setLibPath): proper handling of --nostdlib
4153         * support/regression/Makefile,
4154         * support/regression/ports/ds390/spec.mk,
4155         * support/regression/ports/gbz80/spec.mk,
4156         * support/regression/ports/hc08/spec.mk,
4157         * support/regression/ports/mcs51/spec.mk,
4158         * support/regression/ports/mcs51-large/spec.mk,
4159         * support/regression/ports/mcs51-stack-auto/spec.mk,
4160         * support/regression/ports/z80/spec.mk: use include and lib files from
4161           built version of sdcc instead of installed version
4162         * doc/sdccman.lyx: fixed typo in --nostdinc
4163
4164 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4165
4166         * src/pic/pcode.c,
4167         * src/pic/device.c,
4168         * src/pic/ralloc.c,
4169         * src/pic/gen.c : added support to generate code for struct bit fields.
4170
4171 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4172
4173         * as/xa51/xa_version.h,
4174         * device/include/errno.h,
4175         * device/include/regc515c.h,
4176         * device/lib/_itoa.c,
4177         * device/lib/_ltoa.c,
4178         * device/lib/ser_ir_cts_rts.c,
4179         * sim/ucsim/xa.src/glob.cc,
4180         * sim/ucsim/xa.src/inst_gen.cc,
4181         * sim/ucsim/xa.src/xa_bit.cc,
4182         * sim/ucsim/xa.src/xa_sfr.cc,
4183         * sim/ucsim/z80.src/inst_dd.cc,
4184         * sim/ucsim/z80.src/inst_fdcb.cc,
4185         * support/scripts/keil2sdcc.pl,
4186         * src/pic16/pic16.dsp,
4187         * src/pic16/pic16a.dsp: corrected cvs line endings
4188         * device/lib/printf_large.c: fixed bug 1057979
4189         * src/pic16/gen.c: fixed non-C standard code
4190         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4191         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4192         * support/regression/ports/mcs51/support.c: reload T1 asap
4193         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4194           pdata use and clear idata startup behaviour
4195         * support/regression/tests/bug1057979.c: added
4196
4197 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4198
4199         * device/examples/ds390/ow390/ad26.h,
4200         * device/examples/ds390/ow390/cnt1d.h,
4201         * device/examples/ds390/ow390/crcutil.c,
4202         * device/examples/ds390/ow390/ownet.h,
4203         * device/examples/ds390/ow390/owsesu.c,
4204         * device/examples/ds390/ow390/swt12.h,
4205         * device/examples/ds390/ow390/swtoper.c,
4206         * device/examples/ds390/ow390/temp10.h,
4207         * device/examples/ds390/ow390/thermodl.c,
4208         * device/examples/ds390/tinitalk/tinitalk.dsp,
4209         * device/examples/ds390/tinitalk/tinitalk.dsw,
4210         * device/examples/mcs51/clock/hw.h,
4211         * device/examples/mcs51/simple2/go.bat,
4212         * device/examples/serialcomm/windows/serial.h,
4213         * device/examples/xa51/dummy.c,
4214         * device/examples/xa51/hello.c,
4215         * device/include/80c51xa.h,
4216         * device/include/at89x051.h: corrected cvs line endings
4217
4218 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4219
4220         * src/pic16/main.c (options): added command line --gstack, to trace
4221         stack over/under flows,
4222         * added pragma 'wparam' to allow passing first byte of function
4223         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4224         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4225         call to __gstack_test function and sets up the symbol as extern,
4226         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4227         * popaop): added call to pic16_testStackOverflow,
4228         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4229         wparamList list,
4230         * (genCall, genPcall): now all parameters are passed via stack
4231         except in functions that are pass to wparam pragma in which WREG is
4232         used too,
4233         * (genPcall): REENTRANT flag is checked to see if variable prototype
4234         contains reentrant keyword, don't call a non-reentrant function, via
4235         a reentrant function pointer or vice versa, functions are never
4236         passed via WREG,
4237         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4238         D.Winkler,
4239         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4240         SIGSEGV when accessing a NULL register stucture,
4241         * (pic16_printGPointerType): modified to handle UPPER modifier for
4242         function initializers, changed prototype of function to simpler one,
4243         * (pic16_printIvalFuncPtr): check to see if function is already
4244         added in externs list,
4245         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4246         optimized a move from W to SFR with a move to the same register
4247         later after a CALL,
4248         * device/lib/pic16/debug: NEW directory, contains debug features
4249         which are enabled when linking with libdebug.lib, currently command
4250         line option --gstack enables stack pointer tracing for over/under
4251         flow, corresponding sources are in debug/gstack
4252
4253 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4254
4255         * doc/sdccman.lyx: updated SDCC version,
4256         * (PIC16 port): update list of command line options,
4257         * src/pic16/device.h (structure pic16_options_t): added field gstack
4258         to enable stack overflow tracing on push/pops,
4259         * src/pic16/device.c (statistics structure): added statistics
4260         structure,
4261         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4262         pic16_dump_int_registers): increase statistics counters for each
4263         * variable which is encountered
4264         * (pic16_dump_usection): emit each .udata variable to its own udata
4265         section,
4266         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4267         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4268         parameters via stack, otherwise use old scheme,
4269         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4270         assembler output file,
4271         * src/pic16/main.c: added command line options --gstack to enable
4272         push/pop tracing for stack overflow,
4273         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4274         instructions): added size of each instruction,
4275         * (pic16_countInstruction): estimate size of instructions in
4276         the_pFile list, inline assembly blocks are not counted,
4277         * (pic16_FixRegisterBanking): trace previous register usage, when
4278         banksel optimizations is greater than 0, don't emit a redudant
4279         banksel directive,
4280
4281 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4282
4283         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4284         * src/pic16/ralloc.c : applied same fix for pic16.
4285         * src/pic/gen.c : tidied it up a little.
4286
4287 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4288
4289         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4290         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4291
4292 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4293
4294         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4295
4296 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4297
4298         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4299         non-reentrant function __modsint in the interrupt function (thus
4300         corrupting math operations during serial I/O)
4301         * device/lib/ser_ir.c: as above, changed buffersize
4302         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4303         256.c,d for zeroing
4304         * doc/Makefile: added option -t for rsync
4305
4306 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4307
4308         * src/SDCCast.h (struct ast),
4309         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4310
4311 2004-10-20 Borut Razem <borut.razem AT siol.net>
4312
4313         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4314         package
4315
4316 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4317
4318         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4319         makefile targets,
4320         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4321         support functions to replace long sequences of MOVFF's from access
4322         bank registers to stack and vice versa,
4323         * src/pic16/device.h: added new field opt_flags, where optimization
4324         flags can be set to enable certain features,
4325         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4326         * pBlock, (genFunction, genEndFunction): surroung loop for
4327         saving/loading used registers in stack with PC_INFO pCodes,
4328         INF_LREGS. Code in between can then be optimized by pCode optimizer
4329         to support function calls,
4330         * (genDataPointerSet): fixed bug which loaded float fields in
4331         structures with corrupt data,
4332         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4333         in a standard way debug info on stderr. Feature used for developing
4334         and debugging only,
4335         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4336         obsolete chunks of code,
4337         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4338         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4339         * pic16/src/pcode.c (pic16_newpCodeInfo,
4340         * (pic16_newpCodeOpLocalRegs),
4341         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4342         feature,
4343         * (pic16_pCodeConstString): printing of the initial value of a
4344         symbol as a comment is inhibited since parsing was already done by
4345         copyStr and output is corrupt,
4346         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4347
4348 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4349
4350         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4351
4352 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4353
4354         * as/mcs51/lkarea.c: removed old K&R style,
4355           (lnksect): changed check on boundary error,
4356           (lnksect2): changed check on boundary error,
4357           (lnksect2): extend XSTK to end of page if size = 1
4358         * as/mcs51/lkmain.c: removed old K&R style,
4359           (Areas51): create l_IRAM symbol
4360         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4361         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4362           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4363         * device/lib/_mullong.c: added version to be compiled with xstack
4364         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4365         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4366         * device/lib/mcs51/crtxstack.asm: fixed comment
4367         * src/SDCCglue.c: maxInterrupts defaults to 0,
4368           (emitMaps): added pdata,
4369           (createInterruptVect): (re)moved default,
4370           (glue): added pdata,
4371           (glue): moved __start__xstack to XSTK with default size 1
4372         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4373           and options.float_rent when options.stackAuto is set,
4374           (linkEdit): only write XDATA_NAME if provided on command line
4375         * src/SDCCmem.h,
4376         * src/SDCCmem.c: added pdata
4377         * src/port.h: added pdata_name to PORT
4378         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4379           (saveRegisters, unsaveRegisters): removed usage of B,
4380           (genMinus): fixed accumulator clash,
4381           (genJumpTab): added comment, this needs another look
4382         * src/mcs51/gen.c: added check for "B in use" paranoia,
4383           added pushB() and popB()
4384         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4385           chance
4386         * src/avr/main.c,
4387         * src/ds390/main.c,
4388         * src/hc08/main.c,
4389         * src/mcs51/main.c,
4390         * src/pic/main.c,
4391         * src/pic16/main.c,
4392         * src/xa51/main.c,
4393         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4394           added PSEG (PAG,XDATA) or NULL to port specifier
4395         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4396         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4397           (_mcs51_genInitStartup): removed __start__xstack equ,
4398           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4399         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4400         * src/z80/gen.c (_rleAppend): fixed warnings
4401         * support/regression/tests/zeropad.c: added pdata test
4402         * .version: bumped to 2.4.6
4403
4404 2004-10-17 Borut Razem <borut.razem AT siol.net>
4405
4406         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4407         as a part of nightly build
4408
4409 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4410
4411         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4412         WREG holds the first byte function parameters,
4413         * (aopForSym): take special case for symbols which are in FARSPACE
4414         but in CODESPACE too,
4415         * (assignResultValue): modified to take into account _G.useWreg,
4416         * (genCall): don't use wreg for parameter passing when function is
4417         declared as reentrant, too, added optimization INCF to stack
4418         pointer when stack parameter count is 1,
4419         * (genFunction, genEndFunction): refurnished and fixed to not using
4420         wreg for passing parameters when function has varargs or is
4421         reentrant, fixed bug with symbol name compare for generating
4422         functions in absolute address,
4423         * (pic16_storeForReturn): refurnished,
4424         * (genCmp): began writing a new version of the function, not ready
4425         yet, therefore it is disabled,
4426         * (genAssign): do not read code memory when assigning a function to
4427         a pointer function,
4428         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4429         array of characters, not pointer,
4430         * (pic16initialComments): in debug mode emit an .ident directive for
4431         the assembler,
4432         * (_process_pragma): emit a new warning type (internal to pic16)
4433         when setting stack to default length, emit a similar warning when
4434         placing a function at absolute address and address is not word aligned
4435         * (_pic16_parseOptions): added 'return TRUE' statement,
4436         * (_pic16_linkEdit): if compiling a source, then add the source's
4437         file object, first in the list of objects to link,
4438
4439 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4440
4441         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4442         * src/pic/main.c : removed VC warning.
4443         * src/pic/gen.c : changed comment.
4444
4445 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4446
4447         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4448         reference to a deprecated symbol _GPTRREG was causing failure to
4449         link. Thanks G. M. Gallant for the info.
4450
4451 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4452
4453         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4454         comments for Bugs item #954788.
4455
4456 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4457
4458         * src/pic16/device.c (pic16_dump_gsection,
4459         * pic16_groupRegistersInSection): handle symbols declared to be in
4460         access bank differently,
4461         * src/pic16/gen.c (struct _G): added field resDirect,
4462         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4463         send values read from stack directly to result and don't allocate
4464         temporary values,
4465         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4466         same registers,
4467         * (pic16_sameRegsOfs): NEW,
4468         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4469         free because they were not allocated from temporary pool,
4470         * pic16_popRegFromString): workaround to fix a problem with
4471         allocating variables twice or never,
4472         * (genGenPointerGet): using PRODL instead of FSR0H,
4473         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4474         instead of FSR0H,
4475         * (genAssign): take advantage of the _G.resDirect flag,
4476         * (genCast): around line 11844, use mov2f instead of directly
4477         MOVFF'ing between operands to account for literal values,
4478         * src/pic16/genutils.c: some new debug functions for gpsim have been
4479         added,
4480         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4481         float with integer part only,
4482         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4483         place variables in access bank
4484         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4485         updated sources to reflect recent changes in gen.c
4486
4487 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4488
4489         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4490         sources that searched for headers in installation path, now the
4491         device/include/pic16 is used,
4492         * src/pic16/glue.c (pic16glue),
4493         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4494         .line directives if not in debug mode, this suppresses assembler's
4495         warnings for ignored directives
4496
4497 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4498
4499         * src/port.h: made reset_regparms prototype void parameter explicit.
4500         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4501         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4502         * doc/sdccman.lyx: documented warning disabling and how to use
4503           printf_large to make it print floats.
4504         * device/include/stdbool.h: NEW
4505         * device/lib/_atof.c,
4506         * device/lib/_divuint.c,
4507         * device/lib/_divulong.c,
4508         * device/lib/expf.c,
4509         * device/lib/printf_large.c,
4510         * device/lib/sincosf.c,
4511         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4512         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4513           a completely reentrant lib.
4514
4515 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4516
4517         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4518         * device/include/pic16/stdio.h: fixed bug with colon
4519
4520 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4521
4522         * device/include/pic16/stdio.h,
4523         * device/include/pic16/stdlib.h,
4524         * device/include/pic16/math.h: NEW
4525         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4526         declared as _naked to reduce overhead
4527         * device/lib/Makefile.in (target port-specific-objects-pic16):
4528         changed * to *.* so to ignore the CVS directory,
4529         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4530         stacked variables back in stack,
4531         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4532         corruption
4533
4534 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4535
4536         * .version: bumped version number to 2.4.5
4537         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4538         * support/Util/SDCCerr.c (messages structure): added entry for
4539         W_POSSBUG2
4540
4541         Large cumulative patch for pic16 port and libraries.
4542         * device/include/pic16/sdcc-lib.h,
4543         * device/include/pic16/stdarg.h,
4544         * device/include/asm/pic16/features.h,
4545         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4546         * device/include/pic16/float.h: changes reentrant keyword with
4547         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4548         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4549         updated target build-libraries to include objects from gptr,
4550         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4551         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4552         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4553         all function headings,
4554         * src/SDCCmain.c: added global parameter userIncDirsSet,
4555         * (parseCmdLine): when option -I is encountered add directory to
4556         userIncDirsSet too,
4557         * src/version.awk: added space between control and long,
4558         * src/pic16/NOTES: added some notes for the port,
4559         * src/pic16/gen.c: added prototype for mov2fp function,
4560         * (fReturnpic16[]): properly named return value registers,
4561         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4562         * (aopForSym): added code to handle symbols with onStack flag set,
4563         symbols onStack are allocated PTRSIZE bytes,
4564         * (aopFreeAsmop): handles special case where asmops are stack objects,
4565         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4566         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4567         added argument lock to trace flaws in allocating temporary registers
4568         when developing port,
4569         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4570         * (pic16_popRegFromString): reenabled allocating a direct register
4571         from string,
4572         * (assignResultValue): various beautifications,
4573         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4574         referenced function argument,
4575         * (genIpush): reenabled to allow stacked arguments, handles only
4576         ic->parmPush iCodes,
4577         * (genCall, genPcall): major changes to allow for variable argument
4578         functions, fixed a bug with falsely restoring stack pointer after
4579         returning from call,
4580         * (genFunction): pending code for critical function,
4581         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4582         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4583         * (genNearPointerGet): fixed bug with indirect reading, was always
4584         reading from INDF0
4585         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4586         pointers,
4587         * (genAddrOf): rewrote code to take address of a stacked function parameter
4588         * (genCast): fixed casting to generic pointer type,
4589         * src/pic16/gen.h: added AOP_STA,
4590         * (struct asmop): added field stk,
4591         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4592         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4593         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4594         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4595         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4596         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4597         generic pointers,
4598         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4599         and library paths,
4600         * (pic16_port structure): generic pointer size is set to 3,
4601         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4602         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4603         compiler warning,
4604         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4605         operand is an iTemp,
4606
4607 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4608
4609         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4610         * debugger/mcs51/simi.c: addapt new syntax of s51
4611
4612 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4613
4614         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4615         * src/pic16/pcode.c: commented out some calls to free() in order to
4616         fix bug #989576,
4617
4618 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4619
4620         * src/SDCCicode.h,
4621         * src/SDCCicode.c (isiCodeInFunctionCall),
4622         * src/avr/ralloc.c (selectSpil),
4623         * src/pic/ralloc.c (selectSpil),
4624         * src/pic16/ralloc.c (selectSpil),
4625         * src/ds390/ralloc.c (selectSpil),
4626         * src/hc08/ralloc.c (selectSpil),
4627         * src/xa51/ralloc.c (selectSpil),
4628         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4629         stack in the middle of a function call sequence (fixes bug #1020268)
4630         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4631         costs associated with the minimum switch case.
4632
4633 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4634
4635         * src/SDCC.lex: fixed bug #1030549
4636
4637 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4638
4639         * src/SDCCcse.h (struct cseDef),
4640         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4641         over a function call if the CSE is derived from a symbol whose
4642         address has been taken (fixes bug #1029883)
4643         * support/regression/tests/bug-1029883: a new regression test for
4644         this bug
4645
4646 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4647
4648         * src/hc08/gen.c (emitinline): fixed bug #1029778
4649         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4650         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4651         and starts toward RFE #905167)
4652
4653 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4654
4655         * src/pic16/gen.c (mov2f): New function to move an operand to
4656         another without considering if it is a literal or a register,
4657         * (pic16_sameRegs): don't check if they are both AOP_REG,
4658         * (AccRsh): removed andmask=0 lines,
4659         * (genLeftShift): duplicated to be improved in future versions,
4660         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4661         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4662         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4663         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4664         * (insertBankSwitch): fixed inserting banksel directives algorithm
4665         for instructions that follow a skip instruction, this fixes a report
4666         for broken subtraction code generation,
4667         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4668         iCode is a left op, just in case result and right share the same
4669         registers
4670
4671 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4672
4673         * src/hc08/main.c,
4674         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4675         preservation of HX
4676         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4677         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4678         on 2004-09-12; it was buggy
4679
4680 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4681
4682         * src/SDCCsymt.h: removed RESULT_CHECK
4683         * src/SDCCast.c,
4684         * src/SDCCglue.c,
4685         * src/SDCCval.c,
4686         * src/pic/glue.c,
4687         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4688
4689 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4690
4691         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4692         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4693         configuration values no more rejected by compiler, they are assigned
4694         to configuration registers with a warning message instead,
4695         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4696         the for-loop so last conf register is emitted too,
4697         * (_pic16_initPaths): link library libsdcc.lib by default,
4698         * (_hasNativeMulFor): modified test for multiplication according to
4699         Raphael Neider's remarks. Integer multiplication is also done with
4700         support functions,
4701         * device/include/pic16/pic18fregs.h: corrected type error in while
4702         testing and including 18f6720 header file
4703
4704 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4705
4706         * src/pic16/device.h (pic16_options): removed field use_crt,
4707         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4708         until an optimization to handle single bits is added,
4709         * (pic16_loadFSR0): moved before genUnpackBits,
4710         * (genAnd): some white lines removed,
4711         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4712         leave_reset flags in pic16_options when using crt modules,
4713
4714 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4715
4716         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4717           for bugs 898889 & 979599. Also used some safer print instructions.
4718
4719 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4720
4721         * src/pic16/device.h (pic16_options_t): added field use_crt,
4722         crt_name, no_crt,
4723         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4724         catch a probable future bug,
4725         * src/pic16/gen.c: aopIdx function commented out,
4726         * (genAssign): commented out old code which used aopIdx,
4727         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4728         code, added if conditionals to take into account the --use-crt
4729         command line options,
4730         * src/pic16/main.c (pic16_optionsTable): added new command line
4731         options, --use-crt= and --no-crt,
4732         * (_pic16_linkEdit): now the proper crt object is added in the
4733         linker command line except than when --no-crt is specified,
4734         * src/pic16/pcode.c,
4735         * src/pic16/pcode.h: added some structures and functions for a new
4736         optimization scheme to compansate for instruction overhead between
4737         same iCodes, this scheme is currently under development and is not
4738         working in any way,
4739         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4740         to && operator,
4741         * device/lib/pic16/startup/crt0i.c,
4742         * device/lib/pic16/startup/crt0iz.c: added global char variable
4743         __uflags to force the generation of an idata section
4744
4745 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4746
4747         * doc/Makefile,
4748         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4749         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4750
4751 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4752
4753         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4754         Frieder) and clarified the default code optimization mode
4755
4756 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4757
4758         * src/SDCC.lex (doPragma, process_pragma),
4759         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4760         "opt_code_size", and "opt_code_balanced"
4761         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4762         regrouped options by category, added support for category headers
4763         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4764         and "--opt-code-size"
4765         * doc/sdccman.lyx: documented these new options and pragmas
4766         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4767         preference into account
4768
4769 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4770
4771         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4772           geniCodePreDec): Fixed bug 904237 by generating a warning
4773         * src/SDCCerr.h,
4774         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4775
4776 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4777
4778         * src/pic/device.c : When no max ram set validate full memory range.
4779         * src/pic/pcode.c,
4780         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4781
4782 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4783
4784         * device/lib/_gptrget.c,
4785         * device/lib/_gptrput.c: updated comment
4786         * device/lib/calloc.c,
4787         * device/lib/free.c,
4788         * device/lib/malloc.c,
4789         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4790         * src/SDCCcse.c (cseBBlock),
4791         * src/SDCCicode.c (printOperand, geniCodeArray),
4792         * src/SDCCicode.h (struct operand): fixed bug 868103
4793         * support/regression/tests/bug-868103.c: added
4794         * src/SDCCast.c (searchLitOp),
4795         * src/SDCCcse.h (struct cseDef),
4796         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4797         * src/SDCCicode.h (struct operand),
4798         * src/SDCCsymt.h (struct sym_link),
4799         * src/avr/gen.c (hasInc),
4800         * src/ds390/gen.c (hasInc),
4801         * src/hc08/gen.c (genPlusIncr, hasInc),
4802         * src/mcs51/gen.c (hasInc),
4803         * src/pic16/glue.c (pic16_printIvalChar),
4804         * src/pic16/ralloc.c (regWithIdx),
4805         * src/xa51/gen.c (hasInc) : removed warnings
4806         * src/SDCCast.c (createBlock): added comment ???
4807         * src/hc08/ralloc.c: updated comments
4808
4809 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4810
4811         * doc/sdccman.lyx: updated section on switch statements, added
4812         section about semaphore locking
4813         * doc/Makefile: added option -info for latex2html
4814         * device/lib/_gptrget.c,
4815         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4816
4817 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4818
4819         * src/pic/device.h,
4820         * src/pic/device.c,
4821         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4822          maxram is less than 0x100.
4823
4824 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4825
4826         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4827
4828 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4829
4830         * src/port.h,
4831         * src/mcs51/main.c,
4832         * src/ds390/main.c,
4833         * src/z80/main.c,
4834         * src/hc08/main.c,
4835         * src/pic/main.c,
4836         * src/pic16/main.c,
4837         * src/avr/main.c,
4838         * src/xa51/main.c
4839         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4840         a jump table is the best form for a switch statement, including
4841         automatic insertion of missing cases to make the case range
4842         continuous. Developed in collaboration with Frieder Ferlemann.
4843
4844 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4845
4846         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4847         accumulator result if it needs sign extension
4848
4849 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4850
4851         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4852
4853 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4854
4855         * device/lib/gbz80/printf.c,
4856         * device/lib/z80/printf.c: removed define for NULL
4857
4858 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4859
4860         * as/xa51/xa_link.c,
4861         * device/examples/ds390/ow390/ad26.c,
4862         * device/examples/ds390/ow390/cnt1d.c,
4863         * device/examples/ds390/ow390/counter.c,
4864         * device/examples/ds390/ow390/ds2480.h,
4865         * device/examples/ds390/ow390/ds2480ut.c,
4866         * device/examples/ds390/ow390/findtype.c,
4867         * device/examples/ds390/ow390/gethumd.c,
4868         * device/examples/ds390/ow390/owllu.c,
4869         * device/examples/ds390/ow390/ownetu.c,
4870         * device/examples/ds390/ow390/swt12.c,
4871         * device/examples/ds390/ow390/swtloop.c,
4872         * device/examples/ds390/ow390/temp.c,
4873         * device/examples/ds390/ow390/temp10.c,
4874         * device/examples/ds390/ow390/thermo21.c,
4875         * device/examples/ds390/ow390/tinilnk.c,
4876         * device/examples/ds390/ow390/tstfind.c,
4877         * device/examples/serialcomm/windows/serial.cpp,
4878         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4879         * device/include/reg51.h: fixed line endings for cvs
4880
4881 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4882
4883         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4884         packRegsForAccUse, packRegisters): new accumulator register
4885         packing algorithm
4886         * support/regression/ports/hc08/support.c (_putchar): suppress
4887         warning of unused variable
4888         * src/SDCCicode.c: added SWAP entry to codeTable
4889
4890 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4891
4892         * device/lib/sprintf.c: forgot to add this file before previous commit
4893
4894 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4895
4896         * src/pic16/gen.c (genPackBits): added operand right in function
4897         parameters, load result directly if p_type is POINTER (that is
4898         called by genNearPointerSet)
4899         * (genUnPackBits): added operand left in function parameters,
4900         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4901         FSR0 if accessing bitfields,
4902
4903 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4904
4905         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4906           _print_format; updated printf, sprintf, vsprintf
4907         * device/include/asm/default/features.h: corrected comment/define
4908         * device/lib/Makefile.in: added sprintf.c
4909         * device/lib/libsdcc.lib: added sprintf module
4910         * device/lib/printf_large.c,
4911         * device/lib/vprintf.c,
4912         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4913           into these 3 files
4914         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4915         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4916         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4917           hc08 test
4918         * support/regression/tests/zeropad.c: define idata as data for hc08
4919
4920 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4921
4922         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4923         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4924         labels are referenced at least once (even if a reference is not found)
4925         * src/hc08/gen.c (emitcode): set isComment flag for comments
4926         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4927         loads), rules 6a..6b (optimize jumps to return)
4928
4929 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4930
4931         * device/lib/acosf.c (acosf),
4932         * device/lib/asinf.c (asinf),
4933         * device/lib/atanf.c (atanf),
4934         * device/lib/ceilf.c (ceilf),
4935         * device/lib/cosf.c (cosf),
4936         * device/lib/coshf.c (coshf),
4937         * device/lib/cotf.c (cotf),
4938         * device/lib/fabsf.c (fabsf),
4939         * device/lib/floorf.c (floorf),
4940         * device/lib/log10f.c (log10f),
4941         * device/lib/logf.c (logf),
4942         * device/lib/sinf.c (sinf),
4943         * device/lib/sinhf.c (sinhf),
4944         * device/lib/sqrtf.c (sqrtf),
4945         * device/lib/tanf.c (tanf),
4946         * device/lib/tanhf.c (tanhf),
4947         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4948         replaced all instances of "reentrant" in the library functions
4949         defined in math.h with this macro.
4950         * support/regression/tests/float_trans.c: reenabled test for hc08
4951
4952 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4953
4954         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4955         erroneously deleted
4956
4957 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4958
4959         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4960         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4961         multi-byte volatile operands are used
4962         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4963         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4964         initialization to area GSINIT0 so that it would always precede
4965         any static initializers in GSINIT
4966         * support/regression/tests/zeropad.c: fixed idata define for hc08
4967         * support/regression/tests/bug-927659.c,
4968         * support/regression/tests/float_trans.c: disabled tests for hc08
4969         pending missing library routines
4970         * .version: increased version number to 2.4.4 - hc08 port now passes
4971         regression tests
4972
4973
4974 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4975
4976         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4977         * Makefile.common.in,
4978         * as/Makefile,
4979         * as/hc08/Makefile.in,
4980         * as/mcs51/Makefile.in,
4981         * as/z80/Makefile.in,
4982         * debugger/mcs51/Makefile.in,
4983         * device/include/Makefile.in,
4984         * device/lib/Makefile.in,
4985         * doc/Makefile,
4986         * link/Makefile,
4987         * link/z80/Makefile.in,
4988         * packihx/Makefile.in,
4989         * sim/ucsim/main_in.mk,
4990         * sim/ucsim/avr.src/Makefile.in,
4991         * sim/ucsim/doc/Makefile.in,
4992         * sim/ucsim/gui.src/serio.src/Makefile.in,
4993         * sim/ucsim/hc08.src/Makefile.in,
4994         * sim/ucsim/s51.src/Makefile.in,
4995         * sim/ucsim/xa.src/Makefile.in,
4996         * sim/ucsim/z80.src/Makefile.in,
4997         * src/Makefile.in,
4998         * support/cpp2/Makefile.in,
4999         * support/librarian/Makefile,
5000         * support/makebin/Makefile: added DESTDIR to the install path proposed
5001         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5002         * doc/sdccman.lyx: added DESTDIR documentation
5003
5004 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5005
5006         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5007         instruction for interrupt handlers, use fast returns when returning
5008         from high priority interrupts
5009
5010 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5011
5012         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5013         code generation
5014         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5015         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5016         bugs, ported much of Bernhard's code from mcs51
5017         * src/mcs51/gen.c (genSend),
5018         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5019         than one when calling a reentrant function
5020         * device/lib/_mullong.c: defined an alternate struct layout for big
5021         endian ports (hc08)
5022
5023 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5024
5025         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5026         test
5027
5028 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5029
5030         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5031         are sane and complete before asking the port its prefered parameter
5032         passing method (fixes bug #1017633)
5033         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5034         and _ret3
5035
5036 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5037
5038         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5039         problem in bitfields >= 8 bits.
5040
5041 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5042
5043         * src/SDCCsymt.c: undid changes that were not meant to be committed
5044
5045 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5046
5047         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5048
5049 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5050
5051         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5052           copied and wrong bit got inverted
5053
5054 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5055
5056         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5057         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5058         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5059         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5060         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5061         assignments to bitfields at known addresses
5062         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5063         reads from bitfields at known addresses
5064         * src/hc08/ralloc.c (packRegisters),
5065         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5066         genhc08Code): optimize pointer get values used as conditionals
5067         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5068         and branch
5069
5070 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5071
5072         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5073         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5074         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5075         as conditionals
5076
5077 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5078
5079         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5080
5081 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5082
5083         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5084         related problems
5085
5086 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5087
5088         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5089
5090 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5091
5092         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5093         mcs51 port
5094
5095 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5096
5097         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5098
5099 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5100
5101         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5102         cases use more compact code.
5103
5104 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5105
5106         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5107
5108 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5109
5110         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5111
5112 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5113
5114         * src/SDCCsymt.h,
5115         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5116         parameter of changePointer() from symbol* to sym_link*
5117         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5118         * src/SDCCsymt.c (compareType): void* type is castable to other
5119         pointers, but not necesarily an exact match.
5120         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5121         is no longer blindly treated as an exact match.
5122         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5123
5124 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5125
5126         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5127
5128 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5129
5130         * src/pic/gen.c,
5131         * src/pic/pcode.c,
5132         * src/pic/ralloc.h,
5133         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5134
5135 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5136
5137         * src/pic/device.c,
5138         * src/pic/device.h,
5139         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5140
5141 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5142
5143         * src/mcs51/gen.c (emitcode): fixed bug #992819
5144
5145 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5146
5147         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5148           there's no need to make it worse
5149
5150 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5151
5152         * src/mcs51/ralloc.c (deassignLR),
5153         * src/ds390/ralloc.c (deassignLR),
5154         * src/hc08/ralloc.c (deassignLR),
5155         * src/z80/ralloc.c (deassignLR),
5156         * src/pic/ralloc.c (deassignLR),
5157         * src/pic16/ralloc.c (deassignLR),
5158         * src/avr/ralloc.c (deassignLR),
5159         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5160         rlivePoint): fixed another part of bug #971834
5161
5162 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5163
5164         * src/z80/main.c: enabled "critical" keyword
5165         * src/z80/mappings.i,
5166         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5167         functions (fixes bug #979646)
5168         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5169
5170 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5171
5172         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5173           such as c:\mydir.
5174
5175 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5176
5177         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5178           doesn't disable too much optimizations
5179
5180 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5181
5182         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5183
5184 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5185
5186         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5187
5188 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5189
5190         * src/pic/gen.c tidied up tabs
5191         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5192         * src/pic/main.c tidied up tabs
5193         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5194         * src/pic/pcoderegs.c tidied up tabs
5195         * src/pic/ralloc.c tidied up tabs
5196
5197 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5198
5199         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5200         to S_FIXED for pic16 port and when symbol is not in level 0,
5201         allocate for S_REGISTER storage class and pic16 port, too,
5202         * src/pic16/device.h: prototype for checkSym,
5203         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5204         * (pic16_assignConfigWordValue): test the value and the mask to
5205         validate that the value is suitable for the configuration word,
5206         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5207         collect extern declared symbols, don't emit symbol twice, check
5208         first if symbol is in publics set first,
5209         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5210         * added command line '--fstack' which enables an experimental
5211         feature for stack access, too buggy to be used yet...
5212         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5213         * (pic16_allocDirReg): when register has storage class S_REGISTER
5214         allocate in pic16_dynAccessRegs,
5215         * device/include/pic16/pic18f????.h: modified configuration word
5216         naming convention, words started as CONFIG0H but should be CONFIG1H
5217
5218 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5219
5220         * device/include/mcs51reg.h: fixed bug 970993
5221
5222 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5223
5224         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5225         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5226         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5227         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5228         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5229         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5230           error/warning numbers,
5231           added function setWarningDisabled()
5232         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5233         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5234           _memcmp.c _memmove.c calloc.c realloc.c free.c
5235         * support/regression/tests/malloc.c: added tests for new functionality
5236         * support/regression/tests/zeropad.c: added tests for truncated initializers
5237           and initialized char arrays starting with '\x0'
5238         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5239
5240 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5241
5242         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5243
5244 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5245
5246         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5247         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5248         peephole 177.e. Thanks to anonymous
5249
5250 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5251
5252         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5253         function isn't used in the source but referenced as a
5254         variable initializer then declare it as extern in .asm file
5255
5256 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5257
5258         * .version: increased version number to 2.4.3
5259
5260         Adding version extension according to ChangeLog CVS revision
5261         * src/Makefile.in (target all): added dependency 'version.h'
5262         * (rule version.h): added rule to create version.h from ChangeLog,
5263         * (rule dep): added dependency version.h,
5264         * src/version.awk: AWK script to create version.h
5265         * src/SDCCdwarf2.c (dwWriteModule),
5266         * src/SDCCglue.c (initialComments),
5267         * src/SDCCmain.c (printVersionInfo): modified to write after
5268         version string the version extension number,
5269         * src/SDCCutil.c: included "version.h"
5270         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5271         number,
5272         * src/SDCCutil.h: added prototype for getBuildNumber
5273
5274         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5275         includeDirsSet, too,
5276         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5277         const char [] is found in function prototype...
5278
5279         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5280         moving to WREG with source is already in WREG,
5281         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5282         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5283         * (aopForSym): stack'ed symbols are partially supported, added
5284         if-clause to support symbols in FARSPACE,
5285         * (sameRegs): added test for AOP_ACC to see if registers are same,
5286         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5287         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5288         * (pic16_popRegFromString): will not allocate a new register if it
5289         doesn't find one by name, bug may have introduced...
5290         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5291         * (genIpush): revived to use pic16 port's stack,
5292         * (genAddrOf): added incomplete case for stack'ed operand,
5293         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5294         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5295         can handle multibyte operands,
5296         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5297         * (pic16initialComments): added message for MPLAB compatibility
5298         mode enabled,
5299         * src/pic16/main.h: prototype for pic16_mplab_comp,
5300         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5301         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5302         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5303         because of increased complexity of procedure,
5304         * (_process_pragma): stack pragma changed to format 'stack pos len',
5305         emit symbol '_stack_end' to conform with gplink,
5306         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5307         to search for register,
5308         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5309         PO_GPR_REGISTER,
5310         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5311         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5312         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5313         case for PO_GPR_REGISTER,
5314         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5315         dies, the new era is ahead !...
5316         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5317         pic16_dynInternalRegs,
5318         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5319         * (pic16_allocDirReg): minor optimizations and bug fixes,
5320         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5321
5322         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5323         load stack and frame pointer with address of 'stack_end' symbol
5324
5325 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5326
5327         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5328         without source code but only variable initializers
5329
5330 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5331
5332         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5333         external are not declared as extern to reduce overhead while linking
5334
5335 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5336
5337         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5338
5339 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5340
5341         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5342           Yee Keat for the patch
5343         * src/SDCCast.c (decorateType): fixed bug #979599
5344         * src/ds390/gen.h: removed local fReturnSizeDS390
5345         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5346         * src/ds390/gen.c (genAnd, genOr, genXor),
5347         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5348
5349 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5350
5351         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5352         add relFilesSet to $3, manipulate $2 to handle linking of object
5353         files without source files in command line,
5354         * device/include/pic16 (all headers): added ID location macros,
5355         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5356         entries for ID location bytes,
5357         * (pic16_assignIdByteValue): NEW,
5358         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5359         added field dumpcalltree to pic16_options_t,
5360         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5361         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5362         emitting rFalseIfx label after check_carry label,
5363         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5364         pic16_emitDIRegs), NEW
5365         * (pic16glue): dump .calltree file when option --calltree found,
5366         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5367         * (_pic16_genAssemblerPreamble): emit ID locations after
5368         configuration registers,
5369         * (pic16_linkCmd): modifications of the link command,
5370         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5371         * (pic16_pCodeInitRegisters): don't init stack registers,
5372         * (pic16_findPrevInstruction): fixed bug,
5373         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5374         bug with immediate registers,
5375         * (buildCallTree): traces stack push and pop,
5376         * (pct2): dump also stack usage for each function,
5377         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5378         * (pic16_allocDirReg): various modifications,
5379         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5380         fixed to 1,
5381
5382 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5383
5384         * src/pic16/pcode.c: removed buggy double colon
5385
5386 2004-07-01 Borut Razem <borut.razem AT siol.net>
5387
5388         * support/scripts/sdcc.nsi: added include/pic16 to setup
5389
5390 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5391
5392         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5393         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5394         target 'clean',
5395         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5396         specific command line arguments. Also added sample lkr script
5397         for placing a variable at a specific memory bank.
5398         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5399         at a specific memory bank,
5400         * (pic16_dump_isection): fixed bug which caused string literals to
5401         be omitted when dumping idata section,
5402         * (pic16_groupRegistersInSection): added code to handle registers
5403         in specific memory banks,
5404         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5405         public, all references are renamed too,
5406         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5407         AOP_DPTR2,
5408         * (pic16_storeForReturn): added case to handle when dest is WREG,
5409         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5410         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5411         pic16_rel_udata, check to see if that register is marked as being
5412         a member of a specific memory bank,
5413         * (pic16_printIvalCharPtr): added code to add string literals either
5414         to code or the idata sections,
5415         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5416         also accept the 'udata' pragma,
5417         * src/pic16/main.h: new structure types sectName and sectSym
5418         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5419         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5420         * (pic16_findPrevInstruction): fixed, it returned nothing,
5421         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5422         instruction combinations,
5423         * (pic16_FixRegisterBanking): heavily reorganised,
5424         * (pic16_AnalyzeBanking): if generating banksel directives is
5425         disabled, then don't call FixRegisterBanking at all,
5426         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5427         completely removed,
5428         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5429
5430 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5431
5432         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5433         Phuah Yee Keat <yk.phuah AT nestac.com>
5434
5435 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5436
5437         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5438         correctly the IVT even if it is relocated to some other location
5439
5440 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5441
5442         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5443         * device/include/pic16/pic18f2220.h: NEW,
5444         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5445         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5446         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5447         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5448         nodefaultlibs, ivt_loc is the location of the interrupt vector
5449         table, and nodefaultlibs signs that default libraries should not be
5450         linked in link stage,
5451         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5452         according to --ivt-loc argument,
5453         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5454         when pragma stack is found,
5455
5456 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5457
5458         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5459         256 (range check), 257 (do while), 258.a-f (bit banging
5460         f.e. on 3-wire SPI bus)
5461
5462 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5463
5464         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5465         variables used exclusively within a loop
5466
5467 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5468
5469         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5470
5471 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5472
5473         * src/SDCClrange.c (computeClash): fixed bug #971834
5474
5475 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5476
5477         * src/mcs51/gen.c (genCmp): fixed bug #975903
5478         * src/hc08/gen.c (operandsEqu),
5479         * src/ds390/gen.c (operandsEqu),
5480         * src/z80/gen.c (operandsEqu),
5481         * src/pic/gen.c (operandsEqu),
5482         * src/pic16/gen.c (operandsEqu),
5483         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5484         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5485
5486 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5487
5488         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5489
5490 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5491
5492         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5493         default case in switch statement,
5494         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5495         to eliminate problem with initialisation of pointers, but problem
5496         still exists,
5497         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5498         * (emitStaticSegment): removed various lines emitting debug info,
5499         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5500         added processor registers for utilizing EEPROM,
5501         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5502         configurable and set 8
5503
5504 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5505
5506         * .version: increased version number to 2.4.2,
5507
5508         Cumulative patch for pic16 port
5509         * src/pic16/device.c: changed scheme to dump initial values for
5510         variables in idata segment, all print_idata* functions were removed,
5511         now the pic16_printIval* will be called,
5512         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5513         * _pic16_printPointerType, pic16_printPointerType,
5514         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5515         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5516         NEW, similar to the respective functions in SDCCglue.c,
5517         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5518         way, emitting hex bytes,
5519         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5520
5521 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5522
5523         * src/avr/ralloc.c (serialRegAssign),
5524         * src/xa51/ralloc.c (serialRegAssign),
5525         * src/pic/ralloc.c (serialRegAssign),
5526         * src/pic16/ralloc.c (serialRegAssign),
5527         * src/hc08/ralloc.c (serialRegAssign),
5528         * src/z80/ralloc.c (serialRegAssign),
5529         * src/ds390/ralloc.c (serialRegAssign),
5530         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5531
5532 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5533
5534         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5535         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5536
5537 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5538
5539         Cumulative patch for pic16 port:
5540         * src/pic16/device.h (typedef PIC16_device) modified fields for
5541         defining microcontrollers,
5542         * src/pic16/device.c: added new info for all devices in Pics16 array,
5543         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5544         to be optimised out by the pCode optimiser,
5545         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5546         specially, bug reported by G.M. Gallant,
5547         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5548         as force'd so that cannot be optimised out by pCode optimiser,
5549         * src/pic16/pcode.c,
5550         * src/pic16/pcodepeeph.c,
5551         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5552         they are disabled by default, but can be enabled explicit with
5553         command argument --denable-peeps, for testing,
5554         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5555         --pomit-ivt in COMPILE_FLAGS
5556
5557 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5558
5559         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5560           compilation on MSVC
5561
5562 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5563
5564         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5565
5566 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5567
5568         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5569         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5570
5571 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5572
5573         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5574         would only assign 0x300001 register.
5575
5576 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5577
5578         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5579         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5580
5581 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5582
5583         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5584         for ds80c400
5585         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5586         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5587         added peephole 254 (left shift), 255 (jump table)
5588
5589 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5590
5591         * device/lib/Makefile.in: removed comment line with model-pic16,
5592         * (target port-specific-objects-pic16): the libraries and objects
5593         are copied to the build directory form the device/lib/pic16/bin
5594         directory
5595
5596         Cumulative patch concerning pic16 port:
5597         * library directory has been re-organized,
5598         * added support for PIC18F1220,
5599         * added headers and library sources for chips 18f1220,18f6520,
5600         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5601
5602         * configuration registers setting has changed, now each supported
5603         device has a complete description of the registers it uses,
5604         * all initialisations are moved to idata sections, these section
5605         can be absolute or relocatable,
5606         * fixed initialisation of codespace variables,
5607         * fixed warning about PCLATU and gpsim,
5608         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5609         * (genAssign): use table reads when assigning from variables in codespace,
5610         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5611         char/int variables placed in codespace,
5612         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5613         registers set in .asm file, no need for --pomit-config-words anymore,
5614         * (pic16glue): some 8051 legacy segments are commented out
5615         (to be removed completely),
5616         * added support for alternative assembler and linker with --asm=
5617         and --link= command line arguments,
5618         * peepholes are disabled automatically in the port, no need to
5619         specify on command line,
5620         * port supports natively char/int/long multiplication, but converts
5621         all divisions to support functions,
5622         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5623         to the file set in variable $2,
5624         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5625         strings in ASCII format and not in hex,
5626         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5627         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5628         allocate proper register if iCodes aren't temporary,
5629
5630 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5631
5632         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5633
5634 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5635
5636         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5637         is commented out
5638
5639 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5640
5641         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5642         computed address is reused
5643         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5644         multi-byte bitfields
5645
5646 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5647
5648         * src/z80/gen.c: (genArrayInit): must check for pointers too
5649
5650 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5651
5652         * support/regression/tests/zeropad.c: never meant to commit the
5653           nestedstruct test: removed, added check for GCC version
5654
5655 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5656
5657         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5658         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5659         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5660           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5661           bugs 928906 and 954082 half-empty initializers
5662         * src/SDCCsymt.h,
5663         * src/SDCCsymt.c (getAllocSize): added for above fix
5664         * src/z80/gen.c (genArrayInit): fixed bug 741044
5665         * support/regression/tests/zeropad.c: added tests
5666
5667 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5668
5669         * src/pic16/device.c (pic16_dump_section): corrected bug which
5670         caused some symbols of the libraries to be misplaced
5671
5672 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5673
5674         * src/pic16/glue.c,
5675         * src/pic16/ralloc.h,
5676         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5677         to fix conflict with pic port
5678
5679 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5680
5681         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5682         externs configuration variables,
5683         * src/pic16/ralloc.h,
5684         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5685         prototype in header, commented out some debug messages
5686
5687 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5688
5689         * src/pic16/glue.c,
5690         * src/pic16/main.c,
5691         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5692         for gpasm COFF object generation. Thanks to D. Hawkins for
5693         his patch info
5694
5695 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5696
5697         * src/ds390/main.c,
5698         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5699         Brock for spotting this)
5700         * src/ds390/gen.c (genEndFunction),
5701         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5702         interrupt handler and critical. Disable push/pop optimizations when
5703         peephole optimizations disabled.
5704
5705 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5706
5707         Updated pic16 library sources and headers.
5708         * device/lib/pic16/pic18f*/ ,
5709         * device/include/pic16/*.h: modified to handle structured SFR
5710         definitions
5711
5712 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5713
5714         * src/port.h (PORT structure): added hook initPaths, now each
5715         port can declare its own default search paths,
5716         which can been seen with the --print-search-dirs option,
5717         see pic16 port for example,
5718         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5719         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5720         * (doPrintSearchDirs): NEW, replaces in a central manner the
5721         printing of search dirs which was split in set*Paths functions,
5722         * (main): added call to port->initPaths and doPrintSearchDirs,
5723         * src/avr/main.c,
5724         * src/ds390/main.c,
5725         * src/hc08/main.c,
5726         * src/izt/i186.c,
5727         * src/izt/tlcs900h.c,
5728         * src/mcs51/main.c,
5729         * src/pic/main.c,
5730         * src/pic16/main.c: modified port structures to reflect addition of
5731         initPaths hook,
5732
5733         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5734         * (pic16_dump_section): for registers in same address reserve memory once,
5735         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5736         to no_banksel,
5737         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5738         result is greater in size than right or left,
5739         * (pic16_genUMult8X8_8): there are some cases where the result can
5740         be 16 bits size, so handle these,
5741         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5742         * (pic16_outBitC): modified to emit pcodes,
5743         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5744         or not,
5745         * (genDivOneByte): implemented algorithm to divide 8-bits,
5746         * (genCmp): uncommented goto, but issues still exist,
5747         * (genAnd): fixed a bug with variables >8bits,
5748         * (genPackBits): optimization added that uses BCF/BSF to change a
5749         single bit,
5750         * (genAssign): fixed bug when assigning floating point literals,
5751         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5752         __sdcc_gsinit_startup label,
5753         * src/pic16/main.c (_pic16_init): removed search directory
5754         initialisations,
5755         * (_pic16_initPaths): NEW, used to initialise search directories,
5756         * (_hasNativeMulFor): support functions for all except char/int
5757         multiplication, and char division,
5758         * (PIC16_port struct): modified entry for native mul support,
5759         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5760         no_banksel option,
5761         * (buildCallTree): call to register_usage is ifdef'ed out,
5762
5763 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5764
5765         * device/include/string.h: applied Stas Sergeev's patch to make this
5766         header file compatible with the preprocessor -Wundef option
5767         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5768         failure (fixes bug #941458)
5769
5770 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5771
5772         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5773         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5774         that the variable, not the function, should be static
5775         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5776         to be consistent with non-literal case
5777
5778 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5779
5780         * src/SDCCast.c (isConformingBody): fixed bug #949967
5781         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5782         convilong): fixed bug #952086
5783
5784 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5785
5786         * src/SDCCmem.c (allocVariables): fixed bug #955321
5787
5788 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5789
5790         * src/hc08/main.c (_hc08_genAssemblerEnd),
5791         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5792         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5793         completely eliminated the use of a temporary file
5794         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5795         when more than one file linked
5796         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5797
5798 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5799
5800         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5801         which fixes bug #543481
5802         * support/regression/tests/bug-751703.c: fixed comments left from a
5803         cut and paste error
5804         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5805         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5806         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5807         scopes
5808         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5809         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5810         are now changed to underscores in moduleName
5811
5812 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5813
5814         * as/mcs51/lkmem.c: better fix for bug #954173
5815
5816 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5817         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5818
5819         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5820         * device/include/c8051f000.h,
5821         * device/include/c8051f120.h,
5822         * device/include/c8051f300.h,
5823         * device/include/c8051f310.h,
5824         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5825         PWM16) and detab'ed
5826
5827 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5828
5829         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5830         and mailing lists, doc'ed --no-peep-comments, removed reference
5831         to knoppix (newest version has no LyX/LaTeX), other minor changes
5832         * src/SDCCglue.c (glue): save 2 bytes stack space with
5833         option --main-return. The ljmp could probably be avoided too
5834
5835 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5836
5837         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5838
5839 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5840
5841         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5842         * src/SDCCopt.c (isLocalWithoutDef),
5843         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5844         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5845         (credit to Maarten Brock for patch #949363, on which this is based)
5846         * support/regression/tests/bug-751703.c: some test cases of extern used
5847         within inner scopes.
5848
5849 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5850
5851         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5852         SPEC_STRUCT
5853         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5854         struct definitions
5855         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5856         dwWriteLabel): fix to create valid debugger symbols even when
5857         the module name has non-alphanumeric symbols in it
5858         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5859         when a variable's allocation has been optimized away
5860
5861
5862 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5863
5864         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5865         * src/hc08/main.c,
5866         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5867         * src/mcs51/main.c,
5868         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5869         * src/ds390/main.c,
5870         * src/z80/gen.c (z80_emitDebuggerSymbol),
5871         * src/z80/main.c,
5872         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5873         * src/pic/main.c,
5874         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5875         * src/pic16/main.c,
5876         * src/avr/gen.c (avr_emitDebuggerSymbol),
5877         * src/avr/main.c,
5878         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5879         * src/xa51/main.c,
5880         * src/SDCCdebug.c (emitDebuggerSymbol),
5881         * src/SDCCdebug.h,
5882         * src/port.h: added a debugger struct to the port struct. Added a
5883         callback for defining debugger symbols
5884
5885         * src/SDCCast.c (createLabel),
5886         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5887         with isitmp = 1
5888         * src/SDCCicode.h,
5889         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5890         iCode back to the ast for the function
5891
5892         * src/hc08/ralloc.c (hc08_assignRegisters),
5893         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5894         unneeded fields from the regs struct.
5895         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5896         pushReg() & pullReg() functions instead of emitcode()
5897
5898         * src/hc08/gen.c (genLabel, genhc08Code),
5899         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5900
5901         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5902         debugger hooks
5903
5904         * src/hc08/gen.c (genEndFunction, genhc08Code),
5905         * src/hc08/gen.h,
5906         * src/mcs51/gen.c (genEndFunction, gen51Code),
5907         * src/mcs51/gen.h,
5908         * src/ds390/gen.c (genEndFunction, gen390Code),
5909         * src/ds390/gen.h,
5910         * src/z80/gen.c (genEndFunction, genZ80Code),
5911         * src/z80/gen.h,
5912         * src/z80/z80.h,
5913         * src/pic/gen.c (genEndFunction, genpic14Code),
5914         * src/pic/gen.h,
5915         * src/pic16/gen.c (genEndFunction, genpic16Code),
5916         * src/pic16/gen.h,
5917         * src/avr/gen.c (genEndFunction, genAVRCode),
5918         * src/avr/gen.h,
5919         * src/xa51/gen.c (genEndFunction, genXA51Code),
5920         * src/xa51/gen.h,
5921         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5922         specific code to cdbFile.c and out of the backend code generators
5923
5924         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5925         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5926         starting address is now 0
5927
5928         * as/hc08/asm.h,
5929         * as/hc08/m08pst.c,
5930         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5931         assembler directive for DWARF support
5932         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5933
5934         * src/src.dsp,
5935         * src/Makefile.in,
5936         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5937
5938 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5939
5940         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5941         and inappropriate peephole optimization in jump tables
5942
5943 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5944
5945         * as/hc08/m08pst.c,
5946         * src/SDCCglue.c: sdccopt works for the hc08 port now
5947
5948 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5949
5950         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5951
5952 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5953
5954         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5955
5956 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5957
5958         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5959         rules
5960         * src/SDCCmain.c,
5961         * src/SDCCglobl.h,
5962         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5963         comments from the peephole optimizer replacement rules
5964         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5965         symbols
5966         * src/SDCCcse.c (updateSpillLocation),
5967         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5968         equivalents
5969         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5970         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5971         objects far pointers
5972
5973 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5974
5975         * src/SDCCsymt.h: a missing part of my last change
5976         * src/pic/ralloc.c (regTypeNum),
5977         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5978
5979 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5980
5981         * src/SDCCicode.h,
5982         * src/SDCCicode.c (aggrToPtrDclType),
5983         * src/SDCCptropt.h,
5984         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5985         ptrPseudoSymConvert),
5986         * src/pic/ralloc.c (regTypeNum),
5987         * src/pic16/ralloc.c (regTypeNum),
5988         * src/hc08/ralloc.c (regTypeNum),
5989         * src/ds390/ralloc.c (regTypeNum),
5990         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5991         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5992
5993 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5994
5995         * link/z80/lkmain.c (afile),
5996         * as/hc08/lkmain.c (afile),
5997         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5998         prevent a pointer problem when a filename has no directory and
5999         no extension specified.
6000
6001 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6002
6003         * link/z80/lkmain.c (afile): allow periods in directory names
6004         * link/z80/lkmain.c (afile),
6005         * as/mcs51/lkmain.c (afile),
6006         * as/hc08/lkmain.c (afile): allow linker script file to have an
6007         extension other than ".lnk"
6008         * link/z80/lklex.c (getfid),
6009         * link/z80/lkmain.c (parse),
6010         * as/mcs51/lklex.c (getfid),
6011         * as/mcs51/lkmain.c (parse),
6012         * as/hc08/lklex.c (getfid),
6013         * as/hc08/lkmain.c (parse): Support comments in the linker script
6014         file on lines by themselves and after filenames
6015
6016 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6017
6018         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6019
6020 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6021
6022         * src/z80/peeph-z80.def: removed some peephole rules that don't
6023         work with multibyte arithmetic (fixed bug #937126)
6024         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6025         to registers and not global variables
6026         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6027         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6028         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6029         checking for assignments not internally generated (fixed bug #931895)
6030         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6031         structure member (fixed bug #930072)
6032
6033 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/SDCCmain.c (linkEdit),
6036         * src/hc08/main.c (_hc08_parseOptions),
6037         * as/hc08/Makefile.in,
6038         * as/hc08/aslink.h,
6039         * as/hc08/asm.h,
6040         * as/hc08/m08pst.c,
6041         * as/hc08/lkrloc.c (relr, rele),
6042         * as/hc08/lkarea.c (lnkarea)
6043         * as/hc08/lkmain.c (afile, parse),
6044         * as/hc08/lkelf.c: support for ELF output
6045         * as/hc08/lks19.c (s19),
6046         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6047
6048 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6049
6050         * as/mcs51/lkihx.c: Fixed bug #899105.
6051
6052 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6053
6054         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6055         .dsp files from Unix to DOS.
6056
6057 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6058
6059         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6060         function pointers; we have been compliant for several months now.
6061         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6062         change that was accidently commented out
6063         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6064         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6065         bug #922319
6066
6067 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6068
6069         * src/hc08/gen.c: output of all of the internal debugging information
6070         is now controlled by the D() macro; it is disabled by default
6071
6072 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6073
6074         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6075         harder to keep the same registers during a CAST iCode
6076         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6077         long via int can be done in a single cast, if the signedness is
6078         correct.
6079         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6080         putchar() in tinibios.c in ds390's library
6081
6082 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6083
6084         * src/SDCCast.c (decorateType): fixed bug #898889,
6085         cast result of a literal complement too
6086         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6087         fixed check for bitfields
6088
6089 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6090
6091         * src/SDCCicode.c (geniCodeLogic): made it static,
6092         (geniCodeLogicAndOr): added in order to fix bug #905492,
6093         (ast2iCode): fixed bug #905492
6094         * support/regression/tests/bug-905492.c: added
6095         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6096         (processParms): fixed bug #927659: don't copy parms, this will clear
6097         decorated flag
6098         * support/regression/tests/bug-927659.c: added
6099
6100 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6101
6102         * src/SDCCast.c (addCast): don't cast float to char
6103         * device/lib/libsdcc.lib: added _memmove
6104
6105 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6106
6107         * device/lib/large/Makefile: fixed parallel execution by
6108         replacing `make` by `$(MAKE)`
6109
6110 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6111
6112         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6113         offsets (fixes bug #923936)
6114
6115 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6116
6117         * device/lib/small/Makefile: fixed parallel execution by
6118         replacing `make` by `$(MAKE)`
6119
6120 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6121
6122         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6123
6124 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6125
6126         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6127         * src/regression/Makefile: Regression test was not running.
6128
6129 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6130
6131         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6132         complement if possible
6133         * src/SDCCval.c (valComplement),
6134         * src/SDCCicode.c (operandOperation): fixed complement of literal
6135         * support/regression/tests/onebyte.c (testComplement): added
6136
6137 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6138
6139         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6140         return an optimized tree; actually replace actParm with the new tree
6141         * src/SDCCast.h: added some parantheses to remove side effects
6142         * support/regression/tests/bug-920866.c
6143
6144 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6145         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6146         Bit operands were not being handled properly in the pic14 port.
6147         (now src/regression/add.c passes again).
6148
6149 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6150
6151         * src/SDCC.y (labeled_statement): case and default no longer require
6152         a following statement (RFE #893037)
6153
6154 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6155
6156         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6157         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6158         disabled (fixes bug #916294)
6159         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6160         "mov a,acc"; patch provided by Lenny Story
6161         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6162
6163 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6164
6165         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6166         functions
6167         * src/ds390/gen.c (genFunction, genEndFunction),
6168         * src/ds390/ralloc.c (ds390_assignRegisters),
6169         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6170         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6171         pushed if there are parameters passed on the stack. Also, a cleaner
6172         way to decide if r0/r1 should be pushed/popped. (Together they fix
6173         bug #918693)
6174
6175 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6176
6177         * doc/sdccman.lyx,
6178         * device/lib/mcs51/crtpagesfr.asm,
6179         * device/lib/mcs51/crtxinit.asm,
6180         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6181         to avoid confusion with Si Lab's SFRPAGE register.
6182
6183 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6184
6185         * src/SDCCglue.c (emitMaps): allow public sfr variables
6186         * src/SDCCglue.c (initialComments): include compiler build date
6187         with compiler version and put the timestamp of the generated
6188         assembly file on a serperate line to be less confusing.
6189         * src/port.h: added genInitStartup hook
6190         * src/avr/main.c,
6191         * src/ds390/main.c,
6192         * src/hc08/main.c,
6193         * src/pic/main.c,
6194         * src/pic16/main.c,
6195         * src/xa51/main.c,
6196         * src/z80/main.c: genInitStartup initialize as NULL (default to
6197         historical behaviour)
6198         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6199         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6200         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6201         library instead of hard coding it into the compiler.
6202         * support/regression/ports/mcs51-stack-auto/spec.mk,
6203         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6204         * device/lib/mcs51/Makefile,
6205         * device/lib/small/Makefile,
6206         * device/lib/large/Makefile,
6207         * device/lib/mcs51/crtpagesfr.asm,
6208         * device/lib/mcs51/crtstart.asm,
6209         * device/lib/mcs51/crtxclear.asm,
6210         * device/lib/mcs51/crtxinit.asm,
6211         * device/lib/mcs51/crtclear.asm,
6212         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6213         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6214         and into user configurable files.
6215         * device/lib/clean.mk: clean mcs51 directory too
6216         * support/regression/tests/longlit.c: added static to T1 declaration
6217         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6218         accesses in the initialization code
6219
6220 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6221
6222         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6223         OSCTRIMVAL as noted in bug #916008
6224
6225 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6226
6227         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6228         in loops with multiple exits (reported as incorrect registers
6229         used by Martin Helmling in Sdcc-user list)
6230
6231 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6232
6233         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6234         made ds390 register extensions look less like error messages
6235
6236 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6237
6238         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6239         reported by Adam Wozniak in Sdcc-user list
6240
6241 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6242
6243         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6244         arithmetic optimizations, added debug output
6245
6246 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6247
6248         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6249         * sdcc.spec: updated and split sdcc into 3 rpms
6250         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6251         needed for literals of LEFT_OP and '+'
6252         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6253         introduced RESULT_TYPE_NOPROM
6254         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6255         left shift
6256         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6257         limited promotion to int only for '*'
6258         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6259
6260 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6261
6262         * src/pic16/gen.c (genSkip),
6263         (genc16bit2lit), (gencjneshort): commented out
6264         (is_LitOp): new helper function, checks operand type
6265         (genCmpEq): rewritten
6266
6267 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6268
6269         * support/regression/tests/bug-908454.c: added
6270
6271 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6272
6273         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6274         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6275         (geniCodeCast): cosmetic, don't preserve bit storage class
6276         (geniCodeLeftShift): added promotion
6277         (geniCodeLogic): fixed regression
6278         * src/SDCCsymt.c (computeTypeOr): accept bits too
6279         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6280
6281 2004-03-07  Borut Razem <borut.razem AT siol.net>
6282
6283         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6284
6285 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6286
6287         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6288         version of pic16_genPackRegisters which does not check if ic is a
6289         CAST operator,
6290         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6291         function cause string1.c regression test fails
6292
6293 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6294
6295         * sim/ucsim/configure.in,
6296         * sim/ucsim/configure,
6297         * sim/ucsim/doc/Makefile.in: use docdir
6298         * src/SDCC.y: fixed sbit atrributes
6299         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6300         * src/SDCCast.c (decorateType): |^& need special promotion handling
6301         * src/SDCCast.h,
6302         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6303         * src/SDCCsymt.h (computeType),
6304         * src/SDCCicode.c: computeType() needs op
6305         * src/SDCCsymt.c (checkTypeSanity),
6306         * doc/sddman.lyx: "plain" bitfields are unsigned
6307         * src/SDCCsymt.c (computeTypeOr): added
6308         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6309         |^& ops
6310         * src/SDCCval.c (val*): computeType() needs op
6311         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6312         * support/regression/tests/onebyte.c: added tests for |^&
6313
6314 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6315
6316         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6317         for writing icode into asm output.
6318
6319 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6320
6321         * src/pic16/device.c: added some debug lines enabled
6322         with macro DEBUG_CHECK,
6323         * src/pic16/genarith.c: more debug in genPlus,
6324         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6325         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6326         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6327         * (aopForSym): onStack symbols are re-placed in data memspace,
6328         and onStack flag is cleared,
6329         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6330         copy temporary pcodeop,
6331         * (genPcall): added warning for not updating PCLATU,
6332         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6333         always true for pic16 port,
6334         * (genMultOneWord): NEW, supports integer multiplication,
6335         * (genMult): modified to call genMultOneWord,
6336         * (ifxForOp): added warning when return NULL,
6337         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6338         flag is set before call to operandFromSymbol for implicit
6339         added structures,
6340         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6341         options.intlong_rent are set by default,
6342         * (_hasNativeMulFor): modified to allow port generation of integer
6343         multiplication,
6344         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6345         set regtype to REG_SFR for all registers, restricting seting the
6346         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6347
6348 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6349
6350         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6351         more than 500 times in the regression tests
6352
6353 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6354
6355         * support/Util/SDCCerr.h,
6356         * support/Util/SDCCerr.c,
6357         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6358         enumerator_list),
6359         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6360         for symbol conflicts.
6361         * support/valdiags/tests/enum.c,
6362         * support/valdiags/tests/tentdecl.c,
6363         * support/valdiags/tests/struct.c: expect possible error messages
6364         referring to original symbol definitions.
6365         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6366         * src/SDCCsymt.h,
6367         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6368
6369 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6370
6371         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6372
6373 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6374
6375         * src/pic16/ralloc.c (newReg): fixed bug #908929
6376
6377 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6378
6379         * src/ds390/gen.c: added missing #include "main.h"
6380
6381 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6382
6383         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6384         checking if symbol is already in set,
6385         * src/pic16/device.h: prototype for checkAddSym,
6386         * src/pic16/gen.c: (_G): added entry interruptvector,
6387         * (assignResultValue): removed some commented out lines,
6388         * (genFunction): check for ISR via sym->type, absolute section for
6389         interrupt code is created via a new pBlock, the goto instruction is
6390         placed now correctly at the interrupt vector position, changed all
6391         references from ivec to _G.interruptvector,
6392         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6393         is the interrupt is a high priority one, same for return from ISR,
6394         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6395         externs to calls of checkAddSym,
6396         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6397         pic16_pcode_verbose flag is set,
6398         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6399         * src/pic16/pcoderegs.c: message about how many registers are saved
6400         will only be emitted if pic16_pcode_verbose flag is set,
6401
6402 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6403
6404         * src/ds390/ralloc.h,
6405         * src/ds390/ralloc.c (ds390_regWithIdx),
6406         * src/ds390/gen.c (emitcode),
6407         * src/ds390/main.h,
6408         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6409         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6410         ds390operandCompare, getRegsRead, getRegsWritten,
6411         initializeAsmLineNode): customized instruction size calculation for
6412         ds390, started basis for some register optimizations
6413         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6414         corresponding assembly output
6415         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6416         missing push/pop of r0/r1. Optimized push/pops
6417
6418 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6419
6420         * src/mcs51/main.c (instructionSize): fixed ACALL size
6421         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6422
6423 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6424
6425         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6426         the sorting of rlist with NULL elements
6427         * (print_idataType, print_idata): NEW to create idata sections
6428         * src/pic16/device.h: idataSymSet new variable
6429         * src/pic16/gen.c (genFunction): fixed some bugs in string
6430         comparing, improved the absolute section creation for ISRs,
6431         added FSR0L/FSR0H in registers that are saved in an ISR,
6432         * (genInline): fixed the processing of inline snippets,
6433         now they undergo no process by the peephole optimizer
6434         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6435         are placed in idataSymSet,
6436         * (pic16emitStaticSeg): extern symbols are added in externs,
6437         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6438         switching when aboslute variables are placed in access bank memory
6439         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6440         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6441         commented out with #if,
6442         * (pic16_packRegisters): reintroduce the check for CAST because some
6443         symbols are not correctly handled,
6444         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6445         pCodeInstruction instead of pCode,
6446         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6447         pCodeAsmDir definition,
6448         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6449         directive, then the argument directive is emitted without the leading
6450         tab, hack for inline labels which must be in the first column,
6451         * (compareLabel,pic16_findNextInstruction),
6452         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6453         * (insertBankSwitch): modified for the new pCodeAsmDir,
6454
6455 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6456         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6457
6458         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6459         instance,
6460         * (pushSide): commented out with #if,
6461         * (assignResultValue): fixed some typos in saving
6462         registers,
6463         * (genPcall): FIXED and sync'ed with genCall,
6464         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6465         * (genNearPointerGet): fixed to handle some more cases,
6466         implementation scheme via table reads,
6467         * (genConstPointerGet): modified to access code memory correct,
6468         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6469         and improved to handle some cases
6470         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6471         instead of "RETLW" for init data
6472         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6473         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6474         variables are placed in access bank memory (<0x80 and >=0xf80),
6475         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6476         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6477         TBLWT_POSTDEC,TBLWT_PREINC
6478         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6479         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6480         directives
6481         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6482         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6483         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6484         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6485
6486 2004-02-29  Borut Razem <borut.razem AT siol.net>
6487
6488         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6489         support/Util/findme.h, support/Util/system.h: enhance binary relative
6490         search for lib and include by using findProgramPath()
6491
6492 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6493
6494         * src/SDCCpeeph.h,
6495         * src/SDCCpeeph.c (pcDistance),
6496         * src/port.h,
6497         * src/mcs51/ralloc.h,
6498         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6499         * src/mcs51/main.h,
6500         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6501         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6502         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6503         size calculation port specific, started basis for some register
6504         optimizations
6505         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6506         missing push/pop of r0/r1. Optimized push/pops
6507         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6508         * device/lib/_modsint.c (_modsint),
6509         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6510         and stack version so regression tests pass
6511
6512 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6513
6514         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6515         * src/SDCCast.c (decorateType): catch another small optimization
6516         with '?' operator
6517         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6518         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6519         modified to finally use computeType() all over SDCC,
6520         see Feature Request #877103
6521         * src/SDCCval.h: cosmetic
6522         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6523         valCompare(); regression tested in muldiv.c
6524         * support/regression/tests/muldiv.c (testMod): mod sign follows
6525         dividend only
6526
6527 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6528
6529         * src/SDCCast.c (decorateType): fixed bug #902362
6530         * doc/INSTALL.txt: fixed install instructions for win32
6531
6532 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6533
6534         * device/include/Makefile.in (install): fixed by replacing spaces
6535         by tabs
6536         * doc/README.txt,
6537         * doc/INSTALL.txt: updated for release
6538         * doc/sdccman.lyx: added warning for --xstack being buggy
6539
6540 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6541
6542         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6543         to eliminate build warnings.
6544         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6545
6546 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6547            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6548
6549         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6550         removed -penable-stack, added comment for stack pragma, added
6551         warning for not initializing the stack/frame registers, removed
6552         comment at interrupts section
6553
6554         Stack is made permanent, there is no ability to disable stack usage.
6555         * src/pic16/device.h,
6556         * src/pic16/device.c: removed all references to USE_STACK macro,
6557         * src/pic16/device.c (pic16_dump_section): when no elements in
6558         rlist, free rlist before return,
6559         * (pic16_dump_int_registers): NEW, internal registers are a new set
6560         of general purpose registers reused by each function,
6561         * (checkAddReg): returns 1 if registers is added to set,
6562         * (pic16_groupRegistersInSection): when a registers is of type
6563         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6564         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6565         SRCASECMP macro is moved here from device.c
6566         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6567         PO_PCLATU, PO_PRODL, PO_PRODH,
6568         * (pic16_pCodeOpType, genMinus,
6569         changed compares to "a" register, with AOP_ACC,
6570         * (pic16_genPlus): fixed some bugs and indented properly,
6571         * (pic16_addSign): changed size to size+offset in the MOVWF
6572         instruction,
6573         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6574         multiply 8-bit operand by literal, result is 8-bit,
6575         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6576         multiply 2 8-bit operand, result is 8-bit,
6577         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6578         genUMult8X*_16,
6579         * src/pic16/gen.c: changed accUse to contain WREG only,
6580         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6581         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6582         true, do not use immediate addressing any more unless sym is a
6583         pointer in codespace,
6584         * (aopForRemat): do not use immediate addressing when symbol not in
6585         codespace and when symbol's address is requested,
6586         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6587         accUse size (= 1),
6588         * (aopGet): added case for AOP_ACC and don't return "accumulator
6589         bug" but WREG instead,
6590         * (popGetTempReg): pushes contents of temporary register in stack,
6591         * (popReleaseTempReg): pops contents of temporary register from
6592         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6593         * (pic16_popGet): separated case AOP_ACC to return register WREG
6594         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6595         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6596         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6597         the use of immediate pointers to certain cases only.
6598
6599         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6600         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6601         * (assignResultValue, genCall, genRet): modified to use the new
6602         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6603         genPcall is still broken,
6604         * (genFunction): added code to create 'A' type pBlocks when
6605         interrupt functions are generated, code not extensively tested yet,
6606         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6607         * (genEndFunction): modified so ISRs pop stored registers from stack,
6608         * (genMultOneByte): cleanup,
6609         * (AccRsh): added flag andmask, to and result with appropriate mask,
6610         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6611         * (genDataPointerGet): fixed and reenabled its use,
6612         * (genNearDataPointerGet): bugs fixed,
6613         * (genDataPointerSet): bugs fixed,
6614         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6615         pic16_DumpSymbol, pic16_DumpOp,
6616         * src/pic16/genutils.h: function prototypes for the above functions,
6617         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6618         pointers,
6619         * (pic16emitRegularMap): many many many improvements, but needs a
6620         major cleanup,
6621         * src/pic16/main.c: enable_stack in pic16_options is removed,
6622         * (_pic16_parseOptions): removed command line options -penable-stack,
6623         * (_process_pragma): emit stack symbol only when stack pragma is
6624         processed,
6625         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6626         redirected to FSR0L/FSR0H pair,
6627         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6628         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6629         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6630         for immediates,
6631         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6632         * (dumpPicOptype): NEW,
6633         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6634         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6635         with movff instruction,
6636         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6637         added pic16_int_regs, some packRegsFor* functions are commented out,
6638         because produce errors,
6639         * src/pic16/NOTES: minor modifications
6640
6641 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6642
6643         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6644         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6645         --pack-iram.
6646         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6647         * as/mcs51/lkaomf51.c: fixed bug #895763
6648
6649 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6650
6651         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6652
6653 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6654
6655         * doc/sdccman.lyx: added details about the HC08 storage classes and
6656         interrupts, fixed the register usage info for z80 & gbz80
6657
6658 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6659
6660         * doc/sdccman.lyx: added more pic16 port documentation
6661         * device/include/pic16/: added header pic18fregs.h
6662
6663 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6664
6665         * doc/sdccman.lyx: added Vangelis' contribution
6666
6667 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6668
6669         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6670         extend to the next CALL or PCALL, not just to the next CALL.
6671
6672 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6673
6674         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6675
6676 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6677
6678         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6679         bug #895752 and a better fix for bug #716790
6680
6681 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6682
6683         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6684
6685 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6686
6687         * doc/sdccman.lyx: minor changes, minor changed
6688
6689 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6690
6691         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6692         which can't handle SDCC_NEWONEBYTEOPS,
6693         (geniCodeMultiply): removed conversion from mult to shift for pic14
6694         and pic16
6695
6696 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6697
6698         * src/hc08/gen.h,
6699         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6700         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6701         thus fixing bug #895406
6702
6703 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6704
6705         * device/lib/_modsint.c,
6706         * device/lib/_modslong.c: sign follows divisor only
6707         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6708         signs or signedness can be ignored
6709         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6710         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6711         added optimization for IFX,
6712         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6713         arguments;
6714         reenabled optimization for IFX, which was removed on 2004-01-11
6715         * src/SDCCast.h: added return type IFX
6716         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6717         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6718         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6719         SDCC_OLDONEBYTEOPS selects the old behaviour
6720         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6721         changed again and commented promotion rule
6722         * src/SDCCval.c (valDiv): promotion no longer necessary
6723         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6724         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6725         rewritten
6726         * support/regression/tests/onebyte.c: added
6727
6728 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6729
6730         * gen.c (genInline): reverted to old code for assemnling inline
6731         code because of bug reported James Chadd
6732
6733 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6734
6735         * ralloc.h: missing declarations from previous patch,
6736         seems that patch for ralloc.h was never applied, fixed
6737
6738 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6739            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6740
6741         * pcode.c,
6742         * pcode.h,
6743         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6744         indirect addressing. Marked FSR0 as deprecated
6745         * gen.c (pointerCode): commented out, not needed now
6746         (pic16_popGet2p): new MOVFF helper function
6747         (genGenPointerGet),
6748         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6749         (shiftRLong): removed duplicate debugging info
6750
6751 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6752
6753         * src/ds390/gen.c (genNearPointerGet),
6754         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6755         optimization with bits, but not bitfields.
6756         * src/ds390/ralloc.c (packRegisters),
6757         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6758
6759 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6760
6761         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6762
6763 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6764
6765         * src/SDCCsymt.h,
6766         * src/SDCCicode.c (operandFromSymbol),
6767         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6768         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6769         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6770         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6771         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6772         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6773         bug #892038
6774         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6775         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6776         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6777         * src/SDCCsymt.c (newSymbol),
6778         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6779         enumerator_list),
6780         * src/SDCCval.h,
6781         * src/SDCCval.c (newiList): fixed bug #885705
6782
6783 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6784
6785         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6786         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6787
6788 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6789
6790         * device/include/c8051f120.h,
6791         * device/include/c8051f300.h,
6792         * device/include/c8051f310.h: added/updated header files for Silicon
6793         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6794         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6795         in new section Submitting patches
6796
6797 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6798
6799         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6800         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6801         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6802         genGenPointerSet),
6803         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6804         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6805         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6806         genGenPointerSet),
6807         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6808         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6809         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6810         genGenPointerSet),
6811         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6812         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6813         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6814         genGenPointerSet): fixed bug #892400
6815         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6816         to eliminate build warnings.
6817         * src/SDCCast.c (processParms),
6818         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6819         fixed bug 751859
6820         * support/valdiag/valdiag.py: added GCC to the list of defines active
6821         when compiling with gcc
6822
6823 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6824
6825         * support/Util/SDCCerr.h,
6826         * support/Util/SDCCerr.c,
6827         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6828         with an incomplete type (fixed bug #883734)
6829         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6830
6831 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6832
6833         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6834
6835 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6836
6837         * src/SDCCast.c (decorateType),
6838         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6839         function pointer implementation
6840         * support/regression/tests/funptrs.c: added tests to verify both forms
6841         of function pointers work correctly. Added tests to verify parameters
6842         are passed in the correct order.
6843
6844 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6845
6846         * device.c (regCompare): registers are sorted by ascending
6847         address and increasing size,
6848         * main.c (_pic16_finaliseOptions): removed the declaration
6849         of compiler macro MCU. Now a macro of the format pic18fxxxx
6850         will be defined from the command line
6851
6852 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6853             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6854
6855         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6856         PCOP_RLCF was overwritten!
6857         * gen.c (genSkip): commented out calls to pic16_emitcode,
6858         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6859         * (genlshTwo),
6860         * (genRRC): added debugging info,
6861         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6862         overwritten while shifting,
6863         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6864         overwritten while shifting,
6865         * (AccLsh),
6866         * (AccRsh),
6867         * (shiftLLeftOrResult),
6868         * (shiftRLeftOrResult),
6869         * (shiftRLong),
6870         * (shiftLLong): Implemented with pic16_emitpcode
6871         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6872         * (genLeftShift): Fixed bug, operand for shift by variable always
6873         was "and"ed with 0x0f,
6874         * (genLeftShiftLiteral),
6875         * (genrshTwo),
6876         * (genRightShiftLiteral): added debugging info,
6877         * (genrshFour): added comment,
6878         * (genRightShift): determined signedness from operand "left"
6879         instead of "result"
6880
6881 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6882
6883         * src/SDCCicode.c (geniCodeParms),
6884         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6885         function pointers, fixed function pointer bugs #861242 and #861896
6886
6887 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6888
6889         * device/include/c8051f000.h,
6890         * device/include/c8051f120.h,
6891         * device/include/c8051f300.h: added header files for Silicon
6892         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6893
6894 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6895
6896         * src/SDCCast.c (processParams): added new type flow and restructured
6897         (gatherAutoInit): added new type flow
6898         (addCast): cosmetic changes
6899         (getLeftResultType): added new type flow for array indices, patch
6900         provided by Stas, see FR #877103
6901         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6902         array index patch by Stas
6903         * src/SDCCast.h: added prototype getResultTypeFromType()
6904         * src/SDCCval.h,
6905         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6906         * src/pic/glue.c (pic14emitStaticSeg),
6907         * src/pic16/glue.c (pic16emitStaticSeg),
6908         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6909         for initialization of symbols
6910         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6911         * support/Util/SDCCerr.h:
6912         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6913         * .version: bumped version number to 2.3.8
6914         * device/include/Makefile.in (install),
6915         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6916         avoid warnings
6917
6918 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6919
6920         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6921         Slade Rich fixed an optimization bug
6922         * src/pic/pcodepeep.c,
6923         * src/pic/pcoderegs.c
6924         * doc/Makefile (install): added test for directory
6925
6926 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6927
6928         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6929         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6930         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6931         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6932         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6933         * as/mcs51/asexpr.c (term),
6934         * as/hc08/asexpr.c (term): fixed bug #887146
6935
6936 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6937
6938         * src/z80/gen.c (genMult): handle single byte result product
6939         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6940         DUMMY_READ_VOLATILE (fixed bug #886367)
6941
6942 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6943
6944         * support/regression/tests/libmullong.c: fixed logic, on little endian
6945         hosts we ended without a mullong_wrapper()
6946
6947 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6948
6949         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6950         virus/worm forged address usage.
6951
6952 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6953
6954         Fixed promotion, it should be done on AST level:
6955         * src/SDCCast.c (addCast): added promotion to int
6956         (decorateType): updated call to upCast()
6957         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6958         usualUnaryConversions()
6959
6960 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6961
6962         * support/regression/tests/literalop.c (mulWrapper): Added a
6963         wrapper to remove integer overflow warnings.
6964
6965         * support/regression/tests/float_trans.c: Made work on host.
6966
6967         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6968         location of sz80.
6969
6970         * support/regression/generate-cases.py (main): Changed from inline
6971         to a main method.
6972
6973         * doc/Makefile (install): Changed to depth first to get rid of
6974         missing directory install warning.
6975
6976         * as/Makefile (install-doc): Made work on Mac.
6977
6978 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6979
6980         * src/SDCCast.c: added an additional type flow in decorateType() of
6981         opposite direction, see feature request #860006; it's enabled at runtime
6982         by setting the environment variable SDCC_NEWTYPEFLOW
6983         * src/SDCCast.h: changed prototype of decorateType()
6984         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6985         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6986         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6987         see feature request #877103
6988         * src/SDCCval.c: updated call of decorateType()
6989         (valBitwise): fixed bug #882876
6990         (valMinus): added promotion
6991         (valLogicAndOr): result is unsigned
6992         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6993         * src/SDCCsymt.c (computeType),
6994         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6995         must not cause an unsigned operation
6996         * src/pic/glue (pic14emitRegularMap),
6997         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6998
6999 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7000
7001         * src/pic/pcode.c (PCodeID): commented out left over debug code
7002
7003 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7004
7005         * support/valdiag/tests/overflow.c: added shift tests
7006         * src/pic/device.c,
7007         * src/pic/gen.c,
7008         * src/pic/gen.h,
7009         * src/pic/glue.c,
7010         * src/pic/main.c,
7011         * src/pic/pcode.c,
7012         * src/pic/pcode.h,
7013         * src/pic/pcodepeep.c,
7014         * src/pic/pcoderegs.c,
7015         * src/pic/ralloc.c,
7016         * src/pic/ralloc.h: applied patch from Slade Rich;
7017         added support for multiple code pages and multiple RAM banks on the
7018         PIC 14 port. The ASM files now no longer simply assume all the
7019         code / RAM are in the same page / bank. This means the linker can
7020         safely allocate code/RAM of separate ASM files to different pages/banks.
7021         * doc/sdccman.lyx: added Slade's tips
7022         * src/mcs51/peeph.def: fixed bug #880768
7023
7024 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7025
7026         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7027         * src/SDCCast.c (decorateType): fixed bug #880197
7028
7029 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7030
7031         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7032         getopt.h.
7033
7034         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7035         strtof is not part of C89 and isn't included with Mac OS X.
7036
7037 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7038
7039         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7040         shiftL2Left2Result): fixed bug #879326
7041         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7042         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7043         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7044         address fetch for clr instruction
7045         * device/lib/hc08/_mulint.c: created optimized assembly version
7046         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7047
7048 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7049
7050         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7051         proposed in FR #877103
7052
7053 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7054
7055         * src/SDCCval.c (cheapestVal): added missing checks
7056         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7057         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7058
7059 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7060
7061         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7062         equal operands
7063
7064 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7065
7066         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7067         loaded with the linker search paths (-L arguments) and the libraries
7068         to be linked with the current source (-l arguments). Changes
7069         currently will affect only the pic16 port.
7070         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7071         include path the port specific paths and port specific libraries,
7072         * gplink command now contains the $3 argument,
7073         * src/pic16/device.h,
7074         * src/pic16/device.c,: structure PIC_device is made public and
7075         renamed to PIC16_device, the same for variable Pics which is renamed
7076         to Pics16. Updated all references to them.
7077         * src/pic16/glue.c (pic16glue): corrected bug with code
7078         initialization which bypassed the variable initializations block.
7079
7080         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7081         COMPILE_FLAGS and added the --nostdinc option
7082
7083 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7084
7085         * device/include/mc68hc908jb8.h: Register defs for another member
7086         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7087
7088 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7089
7090         Documenting changes from previous commits.
7091         * configure.in (version 1.56),
7092         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7093         when generating output files to configure the pic16 library,
7094         but now I've commented it out, since gputils aren't installed in the
7095         SF compile farm, so library won't compile
7096
7097         * device/lib/Makefile.in (version 1.56): initially I've added in
7098         target 'all' the prerequestive 'model-pic16' so it compiled the
7099         pic16 library, but now I've commented it out for the same reasons
7100         above,
7101         * added targets 'model-pic16' and 'objects-pic16' to compile the
7102         library
7103         * added target 'port-specific-objects-pic16' to handle the
7104         generated libraries and copy them into the build/ directory
7105         * added target 'clean-intermediate-pic16' to clean intermediate
7106         files into pic16 directory
7107         * in target 'installdirs' added line to create directory pic16 in
7108         the installation path
7109
7110         * device/include/Makefile.in (version 1.11): in target 'install'
7111         added lines to copy all header files to installation path,
7112         * in target 'installdirs' added line create directory for pic16
7113         headers in the installation path
7114
7115 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7116
7117         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7118          a function call
7119
7120 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7121
7122         * configure,
7123         * device/lib/configure.in,
7124         * device/lib/configure: fixed for autoconf 2.57
7125
7126 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7127
7128         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7129         option so that it actually works. Made it specific to the z80, since
7130         the gbz80 doesn't have these kinds of I/O ports.
7131
7132 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7133
7134         * device/include/z180.h,
7135         * device/lib/_memcpy.c,
7136         * device/lib/_memmove.c,
7137         * device/lib/_mulint.c,
7138         * device/lib/ser_ir.c,
7139         * device/lib/ser_ir_cts_rts.c,
7140         * device/lib/_strcmp.c,
7141         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7142         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7143         portmode; added deprecation warning for bank= and protmode= forms.
7144         Also, guard against buffer overflow.
7145         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7146
7147 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7148
7149         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7150         changed interrupt vector table generation to only emit declared vectors.
7151         * device/include/Makefile.in: added missing backslash
7152         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7153
7154 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7155
7156         Mainly changes to support compilation of the device libraries
7157         * src/pic16/device.c: stack is allocated via symbol and not
7158         via literal number. The symbol is placed in the corresponding
7159         position of the data ram
7160         * (pic16_dump_section): relocatable and absolute uninitialized
7161         data are now emitted in sorted order to reduce section naming,
7162         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7163         weren't marked as being in the access bank,
7164
7165 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7166
7167         Added portion of GNU PIC Library under the directory
7168         device/include/pic16 and device/lib/pic16. These files
7169         contain the declarations of SFRs for the PIC18Fxx2 devices.
7170         The directory is initialized via configure from toplevel.
7171
7172 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7173
7174         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7175         the spilllocations to be compared correctly
7176
7177 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7178
7179         * src/SDCCast.c (decorateType): fixed bug introduced today
7180
7181 2004-01-12  Borut Razem <borut.razem AT siol.net>
7182
7183         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7184         doc/sdccman.lyx: upper case pragmas are deprecated
7185
7186 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7187
7188         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7189         in simpler and even better code
7190
7191 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7192
7193         * src/SDCCicode.c (operandOperation): fixed bug #874819
7194         * src/SDCCast.c (decorateType): fixed
7195         char foo (unsigned long ul) { return ul > 0; }
7196
7197 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7198
7199         * doc/sdccman.lyx: Moved and added some sections, small changes
7200         all over. Telling LaTeX to be less strict with word spacing
7201         to better keep the right margin. Changed some notes about
7202         maintainance of the ports in section 3.2.1 - is it OK like this?
7203
7204 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7205
7206         SDCC source changes:
7207         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7208         convilong): modified to inform the pic16 port that builtin functions
7209         are external
7210
7211         PIC16 PORT specific changes:
7212         * src/pic16/device.c pic16_dump_equates() added,
7213         processor registers declared internally by the port are emitted in
7214         the translation as equates,
7215         * src/pic16/gen.c: inline code is passed unprocessed to the
7216         translation,
7217         * (pic16_popGetLit2): fnuction modified to take second operand as
7218         pCodeOp pointer and not as literal,
7219         * (popRegFromIdx): prefixed with pic16_,
7220         * (pic16_popCombine2): modified to receive already allocated pCode
7221         operands,
7222         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7223         * (genFunction): initializes local stack frame and pushes on stack
7224         all the registers used by this function,
7225         * (genEndFunction): restores all registers from stack and restores
7226         stack frame,
7227         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7228         improvements,
7229         * (pic16glue): changed the program startup sequence,
7230         * added new dbName code 'A' for functions placed in absolute section
7231         * src/pic16/main.c: added function attribute _naked,
7232         * added pragma 'code' to place a fnuction at an absolute address,
7233         * added command line arguments --debug-ralloc and --pcode-verbose,
7234         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7235         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7236         * (pic16_newpCodeOpLit2): modified to take the second operand as
7237         pCodeOp pointer,
7238         * (pic16_printpBlock): modified to emit each function in a separate
7239         section,
7240         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7241         UPPER for immediate operands,
7242         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7243         instruction,
7244         * src/pic16/peeph.def: all peepholes with movff are commented out,
7245         because there is a problem in the pcode peep optimizer,
7246         * src/pic16/ralloc.c: the register allocator can now reuse local
7247         function symbols for another function. This saves register usage.
7248         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7249
7250         Added file src/pic16/NOTES with information about program writing on
7251         the current port version.
7252
7253 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7254
7255         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7256         and peephole 252 (array access)
7257
7258 2004-01-09  Borut Razem <borut.razem AT siol.net>
7259
7260         * src/SDCCmain.c : fixed #872250: -l command line defined library
7261           files are scanned before standard library files
7262
7263 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7264
7265         * src/SDCCast.c (decorateType): fixed bug #874046
7266
7267 2004-01-09  Borut Razem <borut.razem AT siol.net>
7268
7269         * support/scripts/sdcc.nsi: remove previous installation
7270
7271 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7272
7273         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7274         bytes for last interrupt vector (mcs51)
7275         * sdcc.spec: fixed typo
7276
7277 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7278
7279         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7280         gen51Code): more efficient parameter receive for --model-large
7281         ("bug" #845294)
7282
7283 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7284
7285         * src/ds390/main.c,
7286         * src/z80/main.c: added missed needLinkerScript flags (more than
7287         one port structure defined in these file)
7288         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7289         bug #795325
7290
7291 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7292
7293         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7294         * src/port.h: added flag needLinkerScript in port->linker
7295         structure to inform whether to create a .lnk file or not,
7296         * src/avr/main.c,
7297         * src/ds390/main.c,
7298         * src/hc08/main.c,
7299         * src/mcs51/main.c,
7300         * src/pic/main.c,
7301         * src/pic16/main.c,
7302         * src/xa51/main.c,
7303         * src/z80/main.c: changed appropriately to configure
7304         needLinkerScript flag
7305         * src/pic/gen.c,
7306         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7307         * src/pic/glue.c: added variable udata_section_name to
7308         override default uninitialized data segment definition for
7309         devices only with SHAREBANK memory (reported from Erik Epetrich)
7310         * (pic14emitOverlay): modified to emit a commented overlay segment
7311         directive when no overlay data exist
7312         * (picglue): modified to emit uninitialized data segment
7313         according to udata_section_name
7314         * src/pic/main.c (_pic14_parseOptions): added command line
7315         options --udata-section-name=[name] to override default
7316         udata definition name
7317         * modified _linkCmd and _asmCmd to include compiler passed
7318         arguments via -W option
7319         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7320         object file from '.rel' to '.o' in port->linker structure,
7321         changed size of fptr from 2 to 3 in port structure
7322
7323 2004-01-07  Borut Razem <borut.razem AT siol.net>
7324
7325         * support/scripts/sdcc.nsi: update PATH
7326         * support/scripts/sdcc.ico: craeted
7327
7328 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7329
7330         * device/include/Makefile.in: fix install
7331         * doc/Makefile: fix install
7332
7333 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7334
7335         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7336         in bug #860505
7337         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7338         how the function variable allocation summary is displayed; also
7339         include information about variables allocated to the overlay
7340         segment
7341
7342 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7343
7344         * as/mcs51/lkmain.c: Help about -Y option
7345         * as/mcs51/lkarea.c: Fixed gcc warnings
7346
7347 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7348
7349         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7350         fixed warning
7351         * support/valdiag/tests/overflow.c: added
7352         * src/SDCCast.c (decorateType),
7353         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7354         LEFT_OP (left shift)
7355
7356 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7357
7358         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7359         (default behaviour).
7360
7361 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7362
7363         A python script to validate compiler diagnostic messages. It can be
7364         used to verify that sdcc complains about bad c source code and
7365         gives a good location of the error.
7366         * support/valdiag/Makefile,
7367         * support/valdiag/valdiag.py,
7368         * support/valdiag/tests/*
7369
7370 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7371
7372         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7373         * src/SDCCsymt.c (newEnumType),
7374         * src/SDCCsymt.h
7375         * support/Util/SDCCerr.c,
7376         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7377         enum related bugs.
7378         * support/regression/tests/enum.c: added test for enum values that
7379         require at least 2 bytes of storage.
7380
7381 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7382
7383         * src/common.h: added ifndef/define/endif macros
7384         around the header file.
7385         Bug reported from Jesus Calvino-Fraga
7386
7387 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7388
7389         * sdcc.spec: updated
7390         * device/include/Makefile.in: don't install CVS directories
7391         * device/lib/Makefile.in: added removal of CVS directories after install
7392         * doc/Makefile: fixed install, added local_icons
7393         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7394         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7395         * src/ds390/gen.c (genRightShift): fixed bug #870788
7396         * src/SDCCast.c (decorateType): fixed bug #870781
7397
7398 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7399
7400         PIC16 port related changes:
7401         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7402         added variable stackPos,
7403
7404         * gen.c: genCall, assignResultValue: added support for
7405         pushing/retrieving function parameters to/from stack,
7406         genFunction,genEndFunction: setup stack frame for the
7407         generated function,
7408         genAddrOf: will be changed according to bug 863624
7409
7410         * added files genutils.c and genutils.h which contain gen*
7411         debugged and optimised functions extracted from gen.c
7412
7413         * glue.c: added variable 'externs' which holds extern symbols,
7414         pic16emitRegularMap: is modified to properly handle relocatable
7415          symbols under the new scheme,
7416         pic16createInterruptVect: is modified
7417         pic16printPublics: is modified to emit 'global' assembler directives,
7418         added pic16_printExterns to print extern symbols,
7419         pic16glue: initializes stack/frame pointer in the beginning of
7420         the assembly output. Temporary hack, will be corrected later,
7421         because gplink yet does not support stack and SDCC does not
7422         yet support a type of crt0.o object to create the final binary.
7423
7424         * Removed many lines that contain 8051 legacy code.
7425         * The code is finally placed under a 'code' directive.
7426         * Added port specific options.
7427
7428         * _process_pragma: simplified since now we do not need *special*
7429         include file to define SFR registers. But a separate header
7430         will be needed. This will be developed later.
7431         * _pic16_parseOptions: added, parses port specific options:
7432         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7433         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7434         --preplace-udata-with=
7435
7436         * _pic16_setDefaultOptions: modified to initialize section names,
7437         but hack is temporarly out of order since it needs improvement.
7438         * _pic16_genAssemblerPreamble: configuration words are emitted by
7439         their address instead of their name. This part is incomplete and
7440         supports only the 18Fxx2 devices. Other devices will emit an error
7441         during assembly since they do not contain the same set of config
7442         registers
7443         * _pic16_genIVT: is modified,
7444
7445         * pcode.c: added definitions for some hardware registers that are needed
7446         for stack support
7447         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7448         All PCI entries are updated. Now LFSR is supported.
7449         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7450         * added pic16_newpCodeOpLit2 to support instructions with
7451         two literal arguments
7452         * pic16_pCode2str: corrected code that emits assembler instructions
7453         with two literal operands and those that have an access bit modifier
7454         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7455         this fixes a bug which caused some labels to be lost, when an
7456         assembler directive was added, i.e. banksel,
7457         * pic16_FixRegisterBanking: improved logic that causes the insertion
7458         of bank switching,
7459         * InlineFunction: functions that are called once, are not any more
7460         inlined. This can be a port option in the future,
7461
7462         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7463
7464         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7465         hold the corresponding uninitialized symbols,
7466         * pic16_allocProcessorRegister: registers have explicit marked the
7467         accessBank field,
7468         * pic16_allocInternalRegister: registers are explicit marked as
7469         not used,
7470         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7471         processing list, so bit registers were lost,
7472         *
7473
7474         * ralloc.h: added field 'accessBank' and original symbol operand
7475         in register definition,
7476         * removed the field isMapped from register definition,
7477
7478         ** Several functions have been removed from various sources:
7479         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7480         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7481         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7482         pic16_assignRelocatableRegisters
7483
7484         ** others have been introduced:
7485         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7486         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7487
7488 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7489
7490         * support/scripts/inc2h.pl: changed definition of BIT_AT
7491         to emit 'sbit at' instead of 'bit at'. This was a request.
7492
7493         PIC16 port related preliminary changes:
7494         * gen.c: prefixed function popRegFromString with
7495         pic16_ and all references to it corrected
7496         * pcode.c: all pic16_pc_* hardware registers prefixed
7497         with underscore (_),
7498         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7499         * ralloc.c: newReg(): when register is REG_SFR then
7500         set address to rIdx,
7501         pic16_allocProcessorRegister(): marks register wasUsed=0
7502         pic16_writeUsedRegs(): added a call to assign processor
7503         registers via pic16_assignFixedRegisters
7504
7505 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7506
7507         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7508         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7509         variables in unused register banks.  Also the SSEG is placed
7510         wherever there is enough space for it, and IDATA can be anywhere
7511         in internal RAM.  For now compile using -Wl-Y[stack_size].
7512         The mem file is different for this option as well, since it
7513         makes no sense of talking about DSEG lenght.
7514
7515 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7516
7517         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7518         in certain cases, e.g. when ROM assignment, patch provided
7519         from Albert den Haan.
7520
7521 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7522
7523         Many signedness and type propagation fixes:
7524         * src/SDCCicode.c: made geniCodeCast() static
7525         replaced SPEC_ by IS_ (cosmetic)
7526         (operandOperation): fixed div and mod operation
7527         (usualBinaryConversions): added support for promotion of char
7528         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7529         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7530         (geniCodeAdd): an array index will stay unsigned, even if promoted
7531         from char to int
7532         (geniCodeArray): ditto
7533         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7534         * src/SDCCsymt.c (computeType): added more support for char;
7535         promotion of char is selectable by promoteCharToInt, fixed signedness
7536         for all cases
7537         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7538         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7539         * src/SDCCval (val*): replaced signedness calculation by
7540         computeType()
7541         rearranged if-branches (cosmetic)
7542         (valShift): added warning W_SHIFT_CHANGED
7543         (valCompare): fixed problem with different types
7544         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7545         * support/regression/tests/literalop.c: added many cases
7546         * support/regression/tests/ast_constant_folding.c: changed finally to
7547         'unsigned int'
7548         * .version: new year, new version: 2.3.7
7549         * src/SDCCmain.c (main): applied patch #866468
7550         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7551         provided by Scott Bronson
7552         * doc/sdccman.lyx: updated documentation for sdcdb
7553         updated and added chapter tips
7554
7555 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7556
7557         * src/SDCCsymt.h: missing from yesterday's commits
7558
7559 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7560
7561         * src/SDCC.y (struct_or_union_specifier),
7562         * support/Util/SDCCerr.c,
7563         * support/Util/SDCCerr.h: verify that struct & union tags are used
7564         as declared.
7565
7566 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7567
7568         * src/SDCCglobl.h: missing from yesterday's commits
7569
7570 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7571
7572         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7573         sft_attributes, struct_declaration, parameter_declaration,
7574         type_name, start_block, declaration_list),
7575         * src/SDCC.lex (check_type): support redefinition of typedef names
7576
7577 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7578
7579         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7580         aligned xdata arrays. Erik helped me with the if clause.
7581
7582 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7583
7584         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7585         warning
7586
7587 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7588
7589         * src/SDCCast.h,
7590         * src/SDCCast.c (newAst_),
7591         * src/SDCCicode.h,
7592         * src/SDCCicode.c (ast2iCode, newiCode),
7593         * src/SDCCglobl.h,
7594         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7595         expr, statement, expression_statement, selection_statement,
7596         iteration_statement, expr_opt, jump_statement): foundation for tracking
7597         sequence points
7598         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7599         point code too)
7600
7601 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7602
7603         * support/Util/SDCCerr.c,
7604         * src/SDCCast.h,
7605         * src/SDCCast.c (createCase, createDefault, decorateType),
7606         * src/SDCClabel.c (labelUnreach),
7607         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7608         to error messages.
7609         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7610         (with thanks to Stas Sergeev)
7611         * device/include/time.h,
7612         * device/lib/time.c (CheckTime): suppress unreachable code warning
7613
7614 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7615
7616         * src/SDCCast.c (createIvalCharPtr),
7617         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7618         bug #753752)
7619         * support/regression/tests/nullstring.c: tests for these two bugs
7620
7621 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7622
7623         * support/Util/SDCCerr.h,
7624         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7625         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7626         about storage class and 'at' used inside struct or union
7627         * src/SDCCBBlock.c (iCodeFromeBBlock),
7628         * src/SDCCcse.c (ifxOptimize),
7629         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7630         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7631         printIval, emitStaticSeg, emitOverlay),
7632         * src/SDCClabel.c (deleteIfx),
7633         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7634         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7635         gatherAutoInit, processParms),
7636         * support/Util/SDCCerr.h,
7637         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7638         reporting for post-parse errors.
7639
7640 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7641
7642         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7643         implicit casts via union; they don't work on big endian systems
7644         (possible fix for bug #861138)
7645
7646 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7647
7648         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7649         * src/mcs51/main.c: fixed the fix for bug #737001
7650
7651 2003-12-15  Borut Razem <borut.razem AT siol.net>
7652
7653         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7654
7655 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7656
7657         * support/makebin/makebin.c: put output in binary mode
7658
7659 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7660
7661         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7662         xdata and data memory on startup. Set the environment variable
7663         SDCC_NOGENRAMCLEAR to disable this.
7664         * src/mcs51/peephole.def,
7665         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7666         (allows non-interrupt and interrupt code to safely compete for a resource
7667         without the non-interrupt code having to disable interrupts)
7668
7669 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7670
7671         * src/SDCCicode.c (geniCodeAdd),
7672         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7673         with valFromType if type might be a pointer and host is big endian).
7674         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7675         types, not just integer types.
7676         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7677         multiply defined with mismatching "at" address.
7678
7679 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7680
7681         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7682         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7683         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7684         with embedded nulls (fixed bug #753752)
7685
7686 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7687
7688         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7689         Apparently this did not see much testing (endless loop)
7690
7691 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7692
7693         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7694
7695 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7696
7697         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7698         gracefully handle NULL memmap pointers
7699
7700 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7701
7702         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7703         instead of deleting the iCode when an operand is volatile
7704         * src/z80/gen.c (genDummyRead),
7705         * src/mcs51/gen.c (genDummyRead),
7706         * src/ds390/gen.c (genDummyRead),
7707         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7708         not just IC_RIGHT
7709         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7710         * src/SDCC.y: fixed bug #850420
7711
7712 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7713
7714         Applied z80 i/o port patch from Peter Townson and fixed some operators
7715         to better handle operands in A register.
7716         * device/include/z180.h
7717         * src/SDCC.y
7718         * src/SDCCglue.c
7719         * src/z80/gen.c
7720         * src/z80/gen.h
7721         * src/z80/main.c
7722         * src/z80/peeph-z80.def
7723         * src/z80/peeph.def
7724         * src/z80/z80.h
7725
7726 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7727
7728         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7729
7730 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7731
7732         * device/lib/hc08/_mullong.c: Removed extra #endif
7733
7734 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7735
7736         * sim/ucsim/hc08.src/inst.cc,
7737         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7738         carries from x to h
7739         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7740         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7741         * device/include/stdarg.h: fixed varargs for hc08
7742         * device/lib/Makefile.in,
7743         * device/lib/hc08/Makefile,
7744         * device/lib/hc08/_mulint.c,
7745         * device/lib/hc08/_mullong.c: fixed some endian problems
7746
7747 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7748
7749         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7750         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7751         * device/lib/_gptrget.c,
7752         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7753
7754 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7755
7756         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7757         * src/SDCCast.c (astErrors): fixed bug #846007
7758         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7759
7760 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7761
7762         * src/SDCCast.c (decorateType): disabled a transformation I added in
7763         revision 1.188 (access to fields of a structure at an absolute address);
7764         it breaks with bitfields, extern declarations, and gcse analysis.
7765         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7766         could be assigned through a pointer, so don't complain.
7767         * src/SDCCast.c (astErrors),
7768         * src/SDCCast.h,
7769         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7770
7771 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7772
7773         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7774         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7775         output of __config directives, since gpasm now supports them
7776         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7777         pre-processor macro, i.e. -DMCU=p18f452
7778         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7779         and modified to handle 'cast' icode similarly to '=' icode
7780         * src/pic16/device.h (typedef struct PIC_device): added field
7781         'extMIface' to indicate that chip has external memory interface
7782         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7783         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7784         18F8720
7785
7786 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7787
7788         * src/SDCC.y (pointer): fixed bug #846006
7789         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7790         * src/SDCCast.c (decorateType): fixed bug #846009
7791         * src/ds390/peeph.def,
7792         * src/ds390/gen.c (genAnd, genOr),
7793         * src/mcs51/peeph.def,
7794         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7795
7796 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7797
7798         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7799         * src/SDCCdflow.c
7800         * src/SDCCcse.c
7801         * src/SDCCcse.h
7802         * src/SDCCBBlock.h
7803         * src/SDCCBBlock.c
7804
7805 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7806
7807         fixed bug #845089
7808         * src/SDCCbitv.h,
7809         * src/SDCCbitv.c: added function to free a bitvector
7810         * src/SDCClrange.h,
7811         * src/SDCClrange.c: added function to recompute the liveranges
7812         * src/avr/ralloc.c,
7813         * src/ds390/ralloc.c,
7814         * src/hc08/ralloc.c,
7815         * src/mcs51/ralloc.c,
7816         * src/pic/ralloc.c,
7817         * src/pic16/ralloc.c,
7818         * src/xa51/ralloc.c,
7819         * src/z80/ralloc.c: recompute the liveranges after register packing
7820
7821 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7822
7823         * src/SDCCloop.c (newInduction): fixed bug #845630
7824
7825 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7826
7827         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7828         inadvertantly left behind from my 2003-11-12 change
7829
7830 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7831
7832         Updated headers I neglected to commit yesterday.
7833         * src/SDCClrange.h,
7834         * src/SDCCicode.h
7835
7836 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7837
7838         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7839         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7840         * src/SDCCopt.c (eBBlockFromiCode),
7841         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7842         the creation of the key hash table from the sequencing so it can be used
7843         earlier (for some GCSE bug fixes still pending)
7844
7845 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7846
7847         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7848         * support/regression/tests/addsub.c: testing genPlus shortcut
7849
7850 2003-11-15  Borut Razem <borut.razem AT siol.net>
7851
7852         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7853
7854 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7855
7856         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7857         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7858         ordering is immaterial.
7859         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7860
7861 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7862
7863         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7864         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7865         (SIGSEV) of bug #840381
7866         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7867         unlink new file before rename if new and old filenames are the same)
7868
7869 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7870
7871         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7872         uninitialized variables) for the mcs51. Set environment variable
7873         SDCC_GENRAMCLEAR to test.
7874         xdata initialization slightly shorter
7875
7876 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7877
7878         * src/SDCCsymt.h,
7879         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7880         #838241 & 780691 (basicly the same bug)
7881         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7882         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7883
7884 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7885
7886         * src/SDCCmain.c (linkEdit): "fix" #834252
7887
7888 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7889
7890         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7891         * src/SDCCast.h,
7892         * src/SDCC.y: fixed bug #819403
7893
7894 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7895
7896         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7897         the reentrant attribute.
7898         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7899         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7900         simulation
7901         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7902         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7903         erroneously reduced to a literal.
7904         * src/hc08/ralloc.c (packRegisters, rematStr),
7905         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7906         some cases
7907
7908 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7909
7910         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7911         * doc/sdccman.lyx: changed from 'article' to 'book'
7912         * doc/Makefile: readded test_suite_spec and cdbfileformat
7913
7914 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7915
7916         * device/include/stdlib.h: include malloc.h to comply with ANSI
7917         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7918
7919 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7920
7921         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7922         * doc/clean.mk: also remove *.out files
7923         * doc/sdccman.lyx: some additions, larger top/bottom margins
7924
7925 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7926
7927         * src/SDCC.y: fixed bug #837365
7928         * support/regression/tests/bitopcse.c
7929         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7930         a symbol (might be valop instead)
7931         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7932         * device/lib/clean.mk: added hc08 to the cleaning list
7933
7934 2003-11-04  Borut Razem <borut.razem AT siol.net>
7935
7936         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7937           made 2003-11-04
7938         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7939           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7940           malloc is declared in standard stdlib.h
7941
7942 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7943
7944         * device/lib/hc08/Makefile: need to clean .rel not .o files
7945         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7946
7947 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7948
7949         * src/port.h,
7950         * src/hc08/main.c,
7951         * src/mcs51/main.c,
7952         * src/ds390/main.c,
7953         * src/z80/main.c,
7954         * src/avr/main.c,
7955         * src/pic/main.c,
7956         * src/pic16/main.c,
7957         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7958         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7959         tests (which uses the port's oclsExpense function)
7960         * src/SDCC.y,
7961         * src/SDCCast.c,
7962         * src/SDCCicode.c,
7963         * src/hc08/gen.c,
7964         * src/ds390/gen.c,
7965         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7966
7967 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7968
7969         * src/SDCCcse.c (ifxOptimize),
7970         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7971         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7972         deleting the IFX iCode.
7973         * src/hc08/ralloc.c: reduced unneeded slocs
7974         * src/hc08/gen.c: fixed bug in asmopToBoolean
7975
7976 2003-11-04  Borut Razem <borut.razem AT siol.net>
7977
7978         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7979           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7980           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7981           transferred to configure
7982
7983 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7984
7985         Use headers defined in the C[++] standards:
7986         * sim/ucsim/gui.src/serio.src/fileio.cc
7987         * sim/ucsim/gui.src/serio.src/frontend.cc
7988         * sim/ucsim/gui.src/serio.src/main.cc
7989         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7990         * support/Util/NewAlloc.c
7991         * as/hc08/lklibr.c
7992         * as/mcs51/lklibr.c
7993         * as/z80/aslist.c
7994         * as/z80/assym.c
7995
7996 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7997
7998         * Added MSVC projects for hc08 assembler and linker:
7999         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8000         /as/hc08/link_hc08.dsp
8001
8002 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8003
8004         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8005
8006 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8007
8008         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8009
8010 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8011
8012         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8013
8014 2003-10-31  Borut Razem <borut.razem AT siol.net>
8015
8016         * support/cpp2/cpplib.h,
8017           support/cpp2/cpplib.c,
8018           support/cpp2/cpplex.c,
8019           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8020           to switch _asm block preprocessing on / off. Default is
8021           #pragma preproc_asm +
8022
8023 2003-10-31  Borut Razem <borut.razem AT siol.net>
8024
8025         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8026           when outputting comment blocks (when executed with -C option) and
8027           _asm (SDCPP specific) blocks
8028
8029 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8030
8031         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8032
8033 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8034
8035         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8036
8037 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8038
8039         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8040         * src/SDCCast.c (decorateType): fixed bug #832664
8041
8042 2003-10-31  Borut Razem <borut.razem AT siol.net>
8043
8044         * support\cpp2\cpplex.c: fixed for SDCPP:
8045           comments(when executed with -C option) and _asm blocks
8046           were included even if they where in skipped #if block.
8047           Applied solution from GCC cpp 3.3.2
8048
8049 2003-10-31  Borut Razem <borut.razem AT siol.net>
8050
8051         * src/SDCC.lex: sdcc now understands both formats:
8052           '# <line_number> <file_name>' and
8053           '#line <line_number> <file_name>'
8054         * support/cpp2/cppmain.c: sdcpp now generates the standard
8055           '# <line_number> <file_name>' instead of former
8056           '#line <line_number> <file_name>'
8057
8058 2003-10-30  Borut Razem <borut.razem AT siol.net>
8059
8060         * support/cpp2/cpphash.h,
8061         * support/cpp2/cpplib.h
8062         * support/cpp2/cpplex.c,
8063         * support/cpp2/cppmain.c,
8064         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8065
8066 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8067
8068         Fixed a number of problems revealed by bug #827883.
8069         * src/SDCCloop.c (loopInvariants): Spill location of the
8070         result operand should be recomputed if extracted from
8071         a loop. Also, don't extract assignments of an iTemp
8072         from a literal.
8073         * src/SDCCast.c (isConformingBody): loop reversal should
8074         not occur if the control variable is involved with a
8075         relational operator.
8076
8077 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8078
8079         * .version: bumped to 2.3.6 to reflect the big improvements
8080         made by Erik and Klaus. Thanks!
8081
8082 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8083
8084         Replaced the livrange code.
8085         * src/SDCClrange.c: added new LR code
8086         * src/SDCCloop.c,
8087         * src/SDCCBBlock.h: removed remainig parts from old LR code
8088         * src/ds390/ralloc.c,
8089         * src/ds390/gen.c: minor fixes to make it work with new code
8090
8091 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8092
8093         * as/hc08/asm.h,
8094         * as/hc08/lkrloc.c,
8095         * src/hc08/gen.c,
8096         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8097         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8098         (tweaked fix for bug #818696)
8099
8100 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8101
8102         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8103
8104 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8105
8106         * src/SDCCmain.c,
8107         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8108         * src/mcs51/gen.c (gencjneshort),
8109         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8110         more efficient (per Scott Bronson's suggestion)
8111
8112 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8113
8114         Extended the semantics of the critical keyword to include
8115         individual statements. See RFE #827755 and #799831
8116         * src/SDCC.y
8117         * src/SDCCicode.c
8118         * src/SDCCopt.c
8119         * src/SDCCast.c
8120         * support/Util/SDCCerr.c
8121         * support/Util/SDCCerr.h
8122         * src/mcs51/gen.c
8123         * src/ds390/gen.c
8124         * src/hc08/gen.c
8125
8126 2003-10-19  Borut Razem <borut.razem AT siol.net>
8127
8128         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8129
8130 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8131
8132         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8133         Fixed bug #818696
8134         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8135         and predecrement operand is displayed
8136
8137 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8138
8139         * src/SDCCval.c (valMinus): fixed bug #826041
8140
8141 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8142
8143         Some hc08 related updates that I missed earlier
8144         * sim/ucsim/stypes.h
8145         * support/regression/ports/hc08/spec.mk
8146
8147 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8148
8149         New target "hc08" for the Motorola 68hc08 family of micros
8150
8151         * configure
8152         * configure.in
8153         * Makefile
8154         * src/hc08/*
8155         * src/SDCCmain.c
8156         * src/port.h
8157         * sim/ucsim/hc08.src/*
8158         * sim/ucsim/configure.in
8159         * src/ucsim/configure
8160         * sim/ucsim/packages_in.mk
8161         * as/hc08/*
8162         * as/Makefile
8163         * device/include/mc68hc908qy.h
8164         * device/lib/hc08/*
8165         * device/lib/Makefile.in
8166         * support/regression/ports/hc08/*
8167         * support/regression/Makefile
8168
8169 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8170
8171         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8172         regression test
8173         * src/ds390/gen.c (genCast): fixed bug #821957
8174
8175 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8176
8177         * device/lib/logf.c: "fixed" overlay bug
8178         * support/regression/ports/host/spec.mk: added m library
8179         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8180         * support/regression/tests/float_trans: added (for Eric)
8181
8182 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8183
8184         * src/mcs51/gen.c (genCpl): fixed bug
8185         http://sf.net/mailarchive/message.php?msg_id=6263915
8186
8187 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8188
8189         * src/SDCCast.c (decorateType): added extended constant folding
8190         * src/SDCCsymt.c (computeType): cleanup
8191         * src/SDCCval.c (valShift): minor optimization
8192         * support/regression/tests/ast_constant_folding.c: added
8193
8194 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8195
8196         * src/SDCCmain.c: removed some unintended changes
8197
8198 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8199
8200         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8201         * src/z80/gen.c: fixed part of bug #817589
8202         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8203
8204 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8205
8206         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8207         * src/SDCCcflow.c
8208         * src/SDCCcse.c
8209         * src/SDCCdflow.c
8210         * src/SDCClabel.c
8211         * src/SDCClrange.c
8212         * src/SDCCmem.c
8213         * src/SDCCopt.c
8214         * src/SDCCpeeph.c
8215         * src/SDCCset.c
8216         * src/avr/ralloc.c
8217         * src/ds390/ralloc.c
8218         * src/izt/ralloc.c
8219         * src/mcs51/ralloc.c
8220         * src/pic/ralloc.c
8221         * src/pic16/ralloc.c
8222         * src/xa51/ralloc.c
8223         * src/z80/ralloc.c
8224         * src/z80/gen.c: removed unused label "release:"
8225
8226 2003-10-06  Borut Razem <borut.razem AT siol.net>
8227
8228         * src/SDCC.lex: removed definition of unused variables
8229           save_optimize and save_options
8230
8231 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8232
8233         * clean.mk: removed '=' in "-maxdepth=1"
8234         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8235         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8236
8237 2003-10-06  Borut Razem <borut.razem AT siol.net>
8238
8239         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8240           my_unput() replaced by unput()
8241
8242 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8243
8244         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8245         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8246         type-punned pointer will break strict-aliasing rules"
8247         Old LR behaviour is again default; Klaus' LR can be choosen by
8248         defining the environment variable LRKLAUS
8249         * src/SDCCBBlock.h
8250         * src/SDCCloop.c
8251         * src/SDCClrange.c
8252         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8253         * clean.mk: fixed removal of files in bin/CVS/
8254         * device/lib/clean.mk: fixed removal of directories small and large
8255         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8256         * src/SDCCicode.c,
8257         * src/SDCCval.c: removed superflous test for pedantic
8258
8259 2003-10-05  Borut Razem <borut.razem AT siol.net>
8260
8261         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8262           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8263           message "unmatched #pragma SAVE and #pragma RESTORE"
8264
8265 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8266
8267         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8268           assembly, critical functions, atomic, nojtbound)
8269
8270 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8271
8272         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8273         * src/SDCCBBlock.h
8274         * src/SDCCloop.c
8275         * src/SDCCloop.h
8276         * src/SDCClrange.c
8277
8278 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8279
8280         * src/z80/gen.h,
8281         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8282         * src/mcs51/gen.h
8283         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8284         * src/ds390/gen.h
8285         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8286         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8287         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8288
8289 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8290
8291         * src/z80/gen.c (genRet): fixed bug #524753
8292         * src/z80/gen.c (genCast): fixed internal error on cast from
8293         pointer to long
8294         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8295         fix for bug #477835 to the z80
8296         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8297         for tracking iCodes in the peephole optimizer for z80
8298
8299 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8300
8301         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8302         the other part of bug #814548
8303         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8304
8305 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8306
8307         * src/SDCCcse.c: fixed part of bug #814548
8308
8309 2003-09-28  Borut Razem <borut.razem AT siol.net>
8310
8311         * src/asm.c: rewrite of printILine() to use temporary file instead
8312           a pipe
8313         * src/xa51/main.c: commented out declaration of int rewinds
8314
8315 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8316
8317         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8318
8319 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8320
8321         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8322         * src/asm.c (printILine): Fixed bug #811015
8323
8324 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8325
8326         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8327         freeing.
8328
8329 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8330
8331         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8332         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8333         to correctly handle general case of AOP_PAIRPTR
8334         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8335
8336 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8337
8338         * src/mcs51/ralloc.c (fillGaps),
8339         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8340         register positioning bug)
8341
8342 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8343
8344         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8345
8346 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8347
8348         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8349         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8350         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8351         (ralloc doesn't intentionally do this now, but perhaps later)
8352         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8353         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8354         register positioning bugs (Fixed bug #762602 and #795325)
8355         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8356         (Fixed bug #808779)
8357         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8358         lines that --i-code-in-asm generates
8359
8360 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8361
8362         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8363         trying to fclose a FILE* that was already closed.
8364
8365 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8366
8367         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8368         of const struct should be treated as if const themselves)
8369
8370 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8371
8372         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8373
8374 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8375
8376         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8377         Unix (/n) and DOS (/r/n) line terminations.
8378
8379 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8380
8381         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8382         bug #613775
8383
8384 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8385
8386         * src/mcs51/gen.c (genFunction, genEndFunction),
8387         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8388         and restore of EA so that stack offsets to parameters are
8389         correct when using both critical and reentrant/stack-auto.
8390         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8391         size (can be triggered in error if sloc is shared between
8392         different sized objects)
8393         * device/include/float.h: fixed macros to explicitly use
8394         unsigned long where needed
8395
8396 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8397
8398         Feature req. 799831: added code to allow nesting of critical functions
8399         * src/mcs51/gen.c (genFunction, genEndFunction)
8400         * src/ds390/gen.c (genFunction, genEndFunction)
8401
8402 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8403
8404         * src/SDCCsymt.c (sclsFromPtr),
8405         * src/SDCCsymt.h,
8406         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8407         support for standard C idiom of memory mapped variables; for
8408         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8409         to xdata int at 0x1234 tempvar = 1.
8410         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8411         provided by Akiya ISHIDA
8412
8413 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8414
8415         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8416         * src/SDCCval.c (constVal): added reduction from int to char
8417         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8418         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8419         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8420         to ignore the sign
8421         * support/regression/tests/shifts.c: fixed
8422
8423 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8424
8425         * src/z80/gen.c (genXor): Fixed bug #805445
8426
8427 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8428
8429         Fixed bug #621531 (const & volatile confusion in the type chain).
8430         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8431         refer to the const or volatile state of the pointer itself.
8432
8433         * src/SDCCast.c
8434         * src/SDCCglue.c
8435         * src/SDCCicode.c
8436         * src/SDCCsymt.c
8437         * src/SDCCval.c
8438         * src/SDCC.y
8439         * src/SDCCsymt.h
8440         * src/pic/gen.c
8441         * src/pic/ralloc.c
8442         * src/pic16/gen.c
8443         * src/pic16/ralloc.c
8444         * support/regression/tests/const.c
8445
8446 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8447
8448         When checking for duplicated modules, use absolute paths
8449         instead of relative paths.  Files changed:
8450
8451         * as/mcs51/lklib.c
8452         * link/z80/lklib.c
8453
8454 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8455
8456         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8457
8458 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8459
8460         * device/include/string.h: added size_t typedef, changed
8461         prototypes to use size_t, eliminated separate reentrant and
8462         non-reentrant declarations, added _memmove declaration
8463         * device/lib/_memcpy.c: changed to use size_t instead of int,
8464         changed /4 to >>2 to avoid division library call
8465         * device/lib/_memcmp.c,
8466         * device/lib/_memset.c,
8467         * device/lib/_strncat.c,
8468         * device/lib/_strncpy.c,
8469         * device/lib/_strncmp.c: changed to use size_t instead of int
8470         * device/lib/_memmove.c: new file (fixed bug #772294)
8471         * device/lib/Makefile.in: added _memmove.c
8472         * device/lib/z80/asm_strings.s: fixed bug #772290
8473         * support/regression/tests/bitfields.c: attempt to fix host assertion
8474         failure on amd64-unknown-linux2.2
8475
8476 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8477
8478         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8479         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8480         * as/z80/asmain.c (main): fixed bug #801766
8481
8482 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8483
8484         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8485         compilers
8486
8487 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8488
8489         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8490         reported in bug #800609
8491
8492 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8493
8494         * Top header beautifications in src/pic16 directory:
8495           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8496           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8497           pcoderegs.h, ralloc.c, ralloc.h
8498         * main.c: added top header and GPL license notice
8499         * pcode.c: fixed the if-conditional warning
8500
8501 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8502
8503         * device/lib/_mullong.c: replaced int by short for gcc
8504
8505 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8506
8507         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8508         and JUMPTABLE iCodes properly now (worked by accident before)
8509         * src/mcs51/gen.c (leftRightUseAcc),
8510         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8511         iCode properly now. Use getSize instead of nRegs since a & b
8512         aren't part of the nRegs tally.
8513
8514 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8515
8516         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8517         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8518           before instructions that use the _STATUS register
8519
8520 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8521
8522         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8523         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8524         fetching of the pointer
8525         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8526         copied from genNearPointerSet()
8527         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8528         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8529         If they pop r0/r1 they must be called in the opposite order than aopOp().
8530         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8531         (resp. --stack-auto), prepared for --xstack
8532
8533 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8534
8535         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8536
8537 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8538
8539         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8540         these ports have their own __sdcc_external_start()
8541
8542 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8543
8544         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8545         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8546         type for bits was changed. It resulted in bit variables becoming
8547         global, which is not permitted in PIC 14 assembly output.
8548
8549 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8550
8551         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8552
8553 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8554
8555         Z80 and MCS51 linkers complaint if a public symbol is defined
8556         in more than one library module:
8557
8558         * as/mcs51/lklib.c
8559         * link/z80/lklib.c
8560         * as/mcs51/Makefile.in
8561
8562 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8563
8564         A few small changes that speed up the peephole optimizer.
8565
8566         * src/SDCCpeeph.c
8567
8568 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8569
8570         Try to make the peephole optimizer smarter by maintaining
8571         an association between the assembly source code and the
8572         iCodes that originated them. Put this information to use
8573         with a new peephole rule condition "notVolatile" so that
8574         the rules can be aggressive yet still safe.
8575
8576         * src/SDCCpeeph.c
8577         * src/SDCCpeeph.h
8578         * src/mcs51/gen.c
8579         * src/mcs51/peeph.def
8580
8581 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8582
8583         Fixed bug #741761
8584
8585         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8586         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8587         if the left or right operand symbols have the accuse flag set.
8588
8589 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8590
8591         Changed the type of the result of the ! (NOT) operator to char;
8592         previously it returned the same type as the source. This allows
8593         us to eliminate all the genFloatNot functions (all of its target
8594         implementations were very buggy) since !float can use the same
8595         code as !long now.
8596
8597         * src/SDCCicode.c (ast2iCode): ! returns char
8598         * src/mcs51/gen.c (genNot, genNotFloat),
8599         * src/ds390/gen.c (genNot, genNotFloat),
8600         * src/z80/gen.c (genNot, genNotFloat),
8601         * src/pic/gen.c (genNot, genNotFloat),
8602         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8603
8604 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8605
8606         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8607         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8608            during interrupts. Ensure WSAVE is located at a shared bank address.
8609         2. Fixed page selection in some places
8610         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8611            the registers name strings.
8612         4. Fixed "signed / unsigned compare" compiler warnings.
8613         5. The PIC port manages its own allocation of the general purpose
8614            registers, but makes no attempt to reuse them. As a result when
8615            compiling it soon runs out of general purpose registers. Some
8616            additional code was added to the files pcode.c and device.c to walk
8617            through the function call tree and rename the registers so that they
8618            get reused.
8619
8620         * src/pic/device.c
8621         * src/pic/gen.c
8622         * src/pic/glue.c
8623         * src/pic/pcode.c
8624         * src/pic/pcode.h
8625         * src/pic/ralloc.c
8626         * src/pic/ralloc.h
8627         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8628         genPlus() & genMinus() when the result is the same as left or right
8629
8630 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8631
8632         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8633
8634 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8635
8636         Made bitfield a distinct type from bit so that bitfields
8637         convert as per ANSI C and bits retain their traditional
8638         boolean style behaviour. Implemented bitfield support in
8639         the z80 port.
8640
8641         * src/SDCCsymt.h,
8642         * src/SDCCsymt.c,
8643         * src/SDCCast.c,
8644         * src/cdbFile.c,
8645         * src/mcs51/gen.c,
8646         * src/ds390/gen.c: bit v bitfield split
8647         * src/z80/gen.c: New support for bitfields
8648         * support/regression/tests/bitfields.c: reenabled z80,
8649         added more tests
8650
8651 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8652
8653         Rules 246.x, 247.x relate to bitfields, the others speed up
8654         access to xdata mapped I/O devices.
8655
8656         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8657
8658 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8659
8660         Cleaned up genPackBits and genUnpackBits and added two helper
8661         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8662         for literal assignments in genPackBits (thanks to Frieder for
8663         reminding me).
8664
8665         * src/mcs51/gen.c
8666         * src/ds390/gen.c
8667
8668 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8669
8670         Fixed bug #748310 (pointer to function type mishandled when the
8671         function name is omitted). Also fixed a SIGSEGV when a function
8672         attribute (reentrant, etc) is used on a non-function or on a
8673         function but misplaced before the parameter list.
8674
8675         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8676         bug #748310
8677         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8678         * support/Util/SDCCerr.h,
8679         * support/Util/SDCCerr.c: Added func attr misuse error msg
8680
8681 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8682
8683         Fixed bug #787649 by anonymous
8684         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8685         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8686
8687 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8688
8689         Fixed numerous bitfield problems.
8690
8691         * src/SDCC.y: More bitfield related error checking
8692         * src/SDCCsymt.h,
8693         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8694         * support/Util/SDCCerr.h,
8695         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8696         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8697         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8698         * support/regression/tests/bitfields.c: tests added
8699
8700 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8701
8702         Made the constant following the "interrupt" keyword optional. If
8703         omitted, the function will not automatically be given an entry
8704         in the interrupt vector table (similar to #pragma NOIV, but
8705         less syntacticly kludgy). The interrupt number is also now
8706         range checked. Also fixed a bug in the high order bit example
8707         in the manual.
8708
8709         * src/SDCC.y
8710         * src/SDCCmem.c
8711         * src/SDCCglue.c
8712         * src/SDCCsymt.h
8713         * support/Util/SDCCerr.c
8714         * support/Util/SDCCerr.h
8715         * doc/sdccman.lyx
8716
8717 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8718
8719         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8720         * src/SDCCicode.c (operandOperation): rewritten some ops
8721         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8722         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8723         other type
8724         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8725         be re-activated by defining REDUCE_LITERALS)
8726         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8727         unsigned, but are signed by default
8728         * src/SDCCval.c (constVal): rearranged
8729         * src/SDCCval.c (valMod): preliminary fix
8730         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8731         * support/regression/literalop.c: added, work in progress
8732
8733 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8734
8735         Generate warnings for useless declarations like "char data;"
8736         that don't do what new users expect.
8737
8738         * src/SDCC.y
8739         * support/Util/SDCCerr.h
8740         * support/Util/SDCCerr.c
8741
8742 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8743
8744         * src/SDCCval.c (valMult): fix overflow detection of negative int
8745
8746 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8747
8748         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8749
8750         Changes to support big endian targets:
8751
8752         * src/ports.h
8753         * src/SDCCglue.c
8754         * src/avr/main.c
8755         * src/ds390/main.c
8756         * src/izt/i186.c
8757         * src/mcs51/main.c
8758         * src/pic/main.c
8759         * src/pic16/main.c
8760         * src/xa51/main.c
8761         * src/z80/main.c
8762
8763 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8764
8765         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8766         * device/lib/time.c: fixed warning "integer overflow in expression"
8767
8768 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8769
8770         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8771         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8772         constants are unsigned; added recognition of "u" flag for unsigned
8773         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8774         * src/SDCCval.c (valDiv, valMod): fixed signdness
8775         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8776         signedness of modulo, left and right shift
8777         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8778         * support/Util/SDCCerr.h: added warning W_INT_OVL
8779         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8780         * src/SDCCast.c (ast_print): improved output of constants
8781
8782 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8783
8784         Fixed some warnings when building with MSVC:
8785
8786         * as\mcs51\asdata.c
8787         * as\z80\asdata.c
8788         * as\mcs51\asm.h
8789         * as\z80\asm.h
8790         * link\z80\aslink.h
8791         * link\z80\lkdata.c
8792         * link\z80\lkeval.c
8793         * link\z80\lkgb.c
8794         * link\z80\lkihx.c
8795         * link\z80\lks19.c
8796         * link\z80\lksym.c
8797         * support\cpp2\cpplib.c
8798         * src\ds390\gen.c
8799         * src\mcs51\gen.c
8800
8801 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8802
8803         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8804
8805 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8806
8807         * support\librarian\clean.mk: Do not remove Makefile.
8808         * support\librarian\Makefile: added.
8809
8810 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8811
8812         Added librarian to MSVC build:
8813         * all.dsp
8814         * sdcc.dsw
8815         * support\librarian\librarian.dsp
8816
8817         'configure' not needed for librarian, removed:
8818         * support\librarian\configure
8819         * support\librarian\configure.in
8820         * support\librarian\config_in.h
8821         * support\librarian\Makefile.in
8822
8823         Hopefully these ones built the librarian and the rest of sdcc properly:
8824         * Makefile
8825         * Makefile.common.in
8826
8827         Messed up 'configure', so revert to previous version:
8828         * configure
8829         * configure.in
8830
8831 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8832
8833         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8834         there, while the mantissa of a double is "only" 53 bits wide.
8835
8836 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8837
8838         Adding sdcclib to the build.  MSVC project coming soon.
8839         Files added/changed:
8840
8841         * support\librarian\clean.mk
8842         * support\librarian\configure
8843         * support\librarian\configure.in
8844         * support\librarian\config_in.h
8845         * support\librarian\Makefile.bcc
8846         * support\librarian\Makefile.in
8847         * support\librarian\sdcclib.c
8848         * Makefile.bcc
8849         * Makefile
8850         * Makefile.common.in
8851         * configure
8852         * configure.in
8853
8854 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8855
8856         Linker now complaints if linked modules have conflicting options, for
8857         example, one compiled using --model-large and another one compiled with
8858         --model-small.  The following files were modified:
8859
8860         * as\mcs51\asdata.c
8861         * as\mcs51\aslink.h
8862         * as\mcs51\asm.h
8863         * as\mcs51\asmain.c
8864         * as\mcs51\asout.c
8865         * as\mcs51\i51pst.c
8866         * as\mcs51\lkdata.c
8867         * as\mcs51\lklibr.c
8868         * as\mcs51\lkmain.c
8869         * as\z80\asdata.c
8870         * as\z80\asm.h
8871         * as\z80\asmain.c
8872         * as\z80\asout.c
8873         * as\z80\z80pst.c
8874         * link\z80\aslink.h
8875         * link\z80\lkdata.c
8876         * link\z80\lklibr.c
8877         * link\z80\lkmain.c
8878         * src\SDCCglue.c
8879
8880 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8881
8882         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8883         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8884
8885 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8886
8887         * src/z80/mappings.i: fix _mul[us][int,long] entries
8888
8889 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8890
8891         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8892
8893 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8894
8895         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8896         * support/regression/tests/bitopcse.c: added
8897         fixed warning:
8898         * src/avr/gen.c:
8899         * src/pic/gen.c:
8900         * src/pic16/gen.c:
8901         * src/z80/gen.c:
8902         * src/xa51/gen.c:
8903
8904 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8905
8906         added support for new library format to z80, gbz80 linkers:
8907         *link/z80/aslink.h
8908         *link/z80/lklex.c
8909         *link/z80/lklib.c
8910         *link/z80/lklist.c
8911
8912 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8913
8914         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8915         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8916
8917 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8918
8919         added DUMMY_READ_VOLATILE:
8920         * src/SDCC.y:
8921         * src/avr/gen.c:
8922         * src/xa51/gen.c:
8923         * src/z80/gen.c:
8924         * src/pic/gen.c:
8925         * src/pic16/gen.c:
8926         * src/mcs51/gen.c:
8927         * src/ds390/gen.c:
8928         * src/SDCCcse.c (algebraicOpts): many improvements
8929         * src/SDCCcse.h: removed algebraicOpts()
8930         * src/SDCCicode.c (picDummyRead): added
8931
8932 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8933
8934         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8935         "Insufficient space in data memory".
8936
8937 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8938
8939         * src/mcs51/gen.c: fixed bug #771358
8940         * src/z80/gen.c: fixed bug #759087
8941
8942 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8943
8944         * src/pic16/glue.c: minor cleanup by Vangelis
8945
8946 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8947
8948         * device/include/regc515c.h: fixed #758477
8949         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8950         * device/lib/_gptrput.c: saved a few bytes
8951         * my tab spacing is 8, yours too?)
8952         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8953         * device/lib/serial.c: process RX bytes earlier than TX bytes
8954         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8955
8956 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8957
8958         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8959
8960 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8961
8962     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8963
8964 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8965
8966         * device/lib/Makefile.in: bad fix, reverted to 1.43
8967
8968 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8969
8970         * device/lib/Makefile.in: added missing z80 object files
8971
8972 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8973
8974         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8975         pic16 progress by Vangelis:
8976         * src/SDCCglobl.h:
8977         * src/SDCCmain.c:
8978         * src/pic/Makefile:
8979         * src/pic:
8980         * pic/Makefile:
8981         * pic16/device.c:
8982         * pic16/device.h:
8983         * pic16/gen.c:
8984         * pic16/gen.h:
8985         * pic16/genarith.c:
8986         * pic16/glue.c:
8987         * pic16/main.c:
8988         * pic16/pcode.c:
8989         * pic16/pcode.h:
8990         * pic16/pcodepeep.c:
8991         * pic16/peeph.def:
8992
8993 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8994
8995     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8996
8997 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8998
8999     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9000     added gbz80 build to MSVC project.
9001     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9002     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9003     from 8051 stuff and setup so it links using a .lnk file.
9004
9005 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9006
9007     * support/librarian/sdcclib.c: sdcc librarian.
9008     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9009     with sdcclib.
9010
9011 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9012
9013     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9014
9015 2003-07-02  Borut Razem <borut.razem AT siol.net>
9016
9017         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9018         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9019         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9020         src/xa51/main.c, src/z80/main.c:
9021         virtualization of glue() function: each port has it's own glue function,
9022         which is accessed by do_glue function pointer in PORT.general structure
9023
9024 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9025
9026         * DS800C400 fun, improved ROM interface and tinibios.
9027
9028 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9029
9030         * More support for DS80C400. Now includes beginning of interface to ROM.
9031
9032 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9033
9034         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9035
9036 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9037
9038         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9039
9040 2003-06-19  Borut Razem <borut.razem AT siol.net>
9041
9042         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9043
9044 2003-06-19  Borut Razem <borut.razem AT siol.net>
9045
9046         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9047         fixed Z80 port - crt0.o: cannot open.
9048
9049 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9050
9051         * support/Util/MySystem.c (merge_command): revert bad fix
9052
9053 2003-06-18  Borut Razem <borut.razem AT siol.net>
9054
9055         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9056
9057 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9058
9059         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9060         option --use-stdout sends errors to stdout instead of stderr.
9061
9062 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9063
9064         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9065
9066 2003-06-15  Borut Razem <borut.razem AT siol.net>
9067
9068         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9069         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9070         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9071         fixed width array of pointers replaced with sets;
9072         multiple include and lib paths ared transferred to preprocessor and linker
9073         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9074         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9075         fixed width array of pointers
9076         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9077         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9078         fixupPath(), getPathDifference()
9079         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9080         fixed width array of pointers
9081
9082 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9083
9084         * src/pic16/ralloc.c: fix warnings
9085         * src/pic16/pcode.c: fix warning
9086
9087 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9088
9089          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9090         know all the details, but essentially this set of changes enable
9091         the pic16 port to generate movff instructions and generate assembler
9092         directives,
9093         * src/SDCCmain.c:
9094         * src/pic16/gen.c:
9095         * src/pic16/glue.c:
9096         * src/pic16/pcode.c:
9097         * src/pic16/device.c:
9098         * src/pic16/main.c:
9099         * src/pic16/pcode.h:
9100         * src/pic16/pcoderegs.c:
9101         * src/pic16/ralloc.c:
9102         * src/pic16/ralloc.h:
9103
9104 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9105
9106         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9107         added option --vc, so sdcc errors and warnings are compatible with
9108         Microsoft Visual Studio.
9109
9110 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9111
9112         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9113           device/lib/libfloat.lib: added atof function.
9114
9115 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9116
9117         * doc/sdccman.lyx: updated to Lyx 1.3
9118         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9119         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9120         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9121
9122 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9123
9124         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9125
9126 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9127
9128         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9129           additions to the "related tools/documentation" section
9130
9131 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9132
9133         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9134
9135 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9136
9137         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9138         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9139
9140 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9141
9142         * doc/sdccman.lyx: fix double dash and other minor things
9143         * doc/Makefile: fix double dash
9144
9145 2003-05-28  Karl Bongers(patches from Martin Helmling)
9146         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9147           condition and ignore commands.
9148
9149 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9150
9151         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9152           is in parts still quite out of date, I did changes as far as I felt makes sense
9153           for a non-native english speaker.
9154           Please feel free to add to the manual or to correct my changes.
9155         * doc/Makefile: undid touching the date of intermediate tex files.
9156
9157 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9158
9159         * doc/sdccman.lyx: Manual has an index now
9160
9161 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9162
9163         Finalize muluint/mulsint and mululong/mulslong merging:
9164         * device/lib/_mulint.c
9165         * device/lib/_mullong.c
9166         * device/lib/gbz80/mul.s
9167         * device/lib/gbz80/stubs.s
9168         * device/lib/z80/mul.s
9169         * device/lib/z80/stubs.s
9170         * src/SDCCsymt.c (initCSupport)
9171
9172 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9173
9174         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9175         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9176           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9177           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9178           instead of /Zm500.
9179
9180 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9181
9182         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9183           the regression tests I'm not brave enough to enable 245.b, 245.c
9184         * doc/sdccman.lyx: added latex preamble for hyperref package.
9185           Using pdflatex this will give you a hyperlinked pdf file with
9186           bookmarks. (prepend '%' before /usepackage if this breaks something)
9187
9188 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9189
9190          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9191
9192 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9193
9194         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9195
9196 2003-05-21    <johan AT balder>
9197
9198         * src/SDCCglue.c (printIval): fixed bug #739934
9199
9200 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9201
9202         Applied patch from bug 737905 (renamed yylineo to mylineno):
9203         * src/altlex.c
9204         * src/SDCCast.c
9205         * src/SDCglobl.h
9206         * src/SDCC.lex
9207         * src/SDCCsymt.c
9208         * src/SDCCval.c
9209         * src/pic16/pcode.c: Cleaned warnings
9210         * src/pic16/pcodeflow.c: Cleaned warnings
9211         * src/pic16/pcoderegs.c: Cleaned warnings
9212
9213 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9214
9215         * src/pic16/pcode.c: Cleaned warnings
9216         * src/pic16/pcodepeep.c: Cleaned warnings
9217         * src/pic16/ralloc.c: Cleaned warnings
9218
9219 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9220
9221         * doc/sdccman.lyx: fixed bug 739745
9222         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9223
9224 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9225
9226         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9227         it can be defined with CFLAGS when running configure
9228         * src/SDCCmain.c: fixed compiling + linking with object files
9229
9230 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9231
9232         * configure.in: configure for pic16 port,
9233             added --disable-pic16-port
9234         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9235         * src/SDCCmain.c: linkOptions is changed to set *,
9236             added if/endif conditional macros to remove options help
9237             messages from optionsTable when a port is not configured, added
9238             support for the PIc16 port in the ports table, when executing
9239             the compiler with no port specified on command line, a default
9240             port is selected with the new macro DEFAULT_PORT which is
9241             defined in port.h, in setDefaultOptions() linkOptions is removed
9242             from initialization assignment, since now it is a set,
9243             parseCmdLine uses setParseWithComma for linkOptions, in
9244             linkEdit() linkOptions are accessed with new function indexSet()
9245             which returns the i'th item of a set variable. See SDCCset.c, in
9246             linkEdit() when calling buildCmdLine(), added linkOptions as
9247             last argument. Now users can pass arguments to gplink via the
9248             -Wl option, main() uses pic16glue() to glue up pic16 programs
9249         * src/SDCCpeeph.c: various changes to support pic16
9250         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9251             return the i'th item of the set
9252         * src/SDCCset.h: added function prototype for indexSet()
9253         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9254         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9255         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9256             added macro DEFAULT_PORT
9257         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9258         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9259             generated
9260         * src/pic16/glue.c: commented out some error producing lines
9261         * src/pic16/main.c: __config directives are commented out to stop
9262             gpasm complaining and test the linkage with gplink, _linkCmd and
9263             _asmCmd changed to be more gplink and gpasm friendly
9264         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9265             produced an error when parsed, peep rule 12 is added to utilize
9266             movff, but it is commented out since the pCode does not support
9267             yet a command with 2 address arguments
9268
9269 2003-05-18    <johan AT balder>
9270
9271         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9272         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9273 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9274
9275         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9276   Added feature to script commands from file.
9277
9278 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9279
9280         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9281         * src/SDCCutil.c: include ctype.h for win32
9282
9283 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9284
9285         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9286
9287 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9288
9289         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9290   Fixed so you can set breakpoints prior to run, run does not stop
9291   on entry now.  Add tbreak.  Other enhancements and fixes for use
9292   with ddd.
9293
9294 2003-05-12  Borut Razem <borut.razem AT siol.net>
9295
9296         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9297
9298 2003-05-11  Borut Razem <borut.razem AT siol.net>
9299
9300         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9301         the path of bin directory, so that PATH is the only env. variable, which has to be set
9302         in case of standard installation.
9303         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9304         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9305         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9306
9307 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9308
9309         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9310         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9311         temp files are in the port dir; clean the gen/test directory when
9312         generating new test.c
9313         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9314         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9315         * support/regression/tests/zeropad.c: added
9316
9317 2003-05-09    <johan AT balder>
9318
9319         * src/SDCCglue.c: fixed bug #597940
9320
9321 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9322
9323         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9324   cache sfr, optimize next,step, fix off by one sourceline,
9325   support ddd list function.
9326         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9327
9328 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9329
9330         * support/regression/HTMLgen.py: added compare_s2f()
9331         * support/regression/Makefile: redo 1.27
9332         * support/regression/generate-cases.py: redo 1.5
9333
9334 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9335
9336         * support/regression/tests/float.c: workaround 33 bit hex constant
9337         * support/regression/tests/simplefloat.c: fix division for host
9338
9339 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9340
9341         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9342         that tame's the PIC's over-aggressive optimizer.
9343
9344 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9345
9346          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9347          support for MSVC.
9348
9349 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9350
9351         Initial support for DS80C400. "Hello world" runs on TINIm400
9352         (with polled I/O).
9353
9354 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9355
9356          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9357          * Some notes on ddd usage added in debugger/README
9358          Martin Helmling adding more features and fixes for ddd GUI debugger.
9359          Code added for nexti, stepi, up, down, and other adjustments.
9360
9361 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9362
9363         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9364         * src/pic/peeph.def Added two rules to optimize carry manipulation
9365         * src/pic/* removed debug printfs
9366
9367 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9368
9369         * debugger/mcs51/cmd.c: added header newalloc.h
9370
9371 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9372
9373         * as/Makefile: new EXEEXT
9374         * as/z80/Makefile: remove trailing slash of BUILDIR
9375         * as/z80/clean.mk: new EXEEXT
9376         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9377         * support/cpp2/Makefile.in: new EXEEXT
9378         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9379
9380 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9381
9382         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9383         EXEEXT was introduced to fix all related problems with targets
9384         "clean", "install" and "uninstall"; a couple of further flaws
9385         especially with "clean" have been fixed too
9386         * as/mcs51/Makefile.in
9387         * as/mcs51/clean.mk
9388         * as/z80/Makefile
9389         * Makefile
9390         * clean.mk
9391         * debugger/mcs51/Makefile.in
9392         * debugger/mcs51/clean.mk
9393         * link/z80/Makefile
9394         * link/z80/Makefile.in
9395         * link/z80/clean.mk
9396         * link/Makefile
9397         * packihx/Makefile.in
9398         * packihx/clean.mk
9399         * sim/ucsim/Makefile
9400         * sim/ucsim/clean.mk
9401         * sim/ucsim/avr.src/Makefile.in
9402         * sim/ucsim/avr.src/clean.mk
9403         * sim/ucsim/s51.src/Makefile.in
9404         * sim/ucsim/s51.src/clean.mk
9405         * sim/ucsim/xa.src/Makefile.in
9406         * sim/ucsim/xa.src/clean.mk
9407         * sim/ucsim/z80.src/Makefile.in
9408         * sim/ucsim/z80.src/clean.mk
9409         * sim/ucsim/main_in.mk
9410         * sim/ucsim/packages_in.mk
9411         * sim/ucsim/gui.src/Makefile.in
9412         * sim/ucsim/gui.src/serio.src/Makefile.in
9413         * sim/ucsim/gui.src/serio.src/clean.mk
9414         * src/Makefile.in
9415         * src/clean.mk
9416         * support/cpp2/Makefile.in
9417         * support/cpp2/clean.mk
9418         * support/makebin/Makefile
9419         * support/makebin/clean.mk
9420         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9421         * doc/sdccman.lyx: --program-suffix no longer needed
9422
9423 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9424
9425          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9426          Martin Helmling added support for ddd GUI debugger.
9427          Code added to display assembly, set variables, and other commands
9428          to interface to ddd.
9429
9430 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9431
9432         * as/Makefile: fix target clean
9433         * as/clean.mk: fix target clean
9434         * as/z80/clean.mk: fix target clean
9435
9436 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9437
9438         * Makefile.common.in: added  AT EXEEXT AT
9439         * configure.in: removed all mingw32 stuff
9440         * configure: rebuilt from configure.in
9441         * doc/sdccman.lyx: updated section "installation"
9442         * support/scripts/sdcc_mingw32: adapted to configure
9443         * support/scripts/sdcc_cygwin_mingw32: added
9444
9445 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9446
9447         * src/pic Added object file support for the PIC port
9448         * src/pic Applied patch from Craig Franklin (this started the object file support)
9449         * src/regression Updated the PIC regression tests for object files
9450
9451 2003-04-20  Borut Razem <borut.razem AT siol.net>
9452
9453         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9454           lklex.c: In function `getfid':
9455           lklex.c:203: warning: array subscript has type `char'
9456         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9457           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9458         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9459           stack handling macros
9460
9461 2003-04-19  Borut Razem <borut.razem AT siol.net>
9462
9463         * "handling space characters in file path" task:
9464         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9465         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9466         * support/Util/MySystem.h: make it self-sufficient
9467         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9468           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9469           handling space characters in file path
9470         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9471           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9472         * support/Util/MySystem.c: handling space characters in executable's path
9473
9474 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9475
9476         * as/z80/Makefile: fix permanent rebuild of z80
9477         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9478         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9479
9480 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9481
9482         * src/SDCCopt.c: add special case optimization to replace modulo by
9483           a power of two with a bitwise AND.
9484
9485 2003-04-18    <johan AT balder>
9486
9487         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9488
9489 2003-04-17    <johan AT balder>
9490
9491         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9492         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9493
9494 2003-04-13  Borut Razem <borut.razem AT siol.net>
9495
9496         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9497         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9498           fixed mingw problem in adl_NORMALIZE_PATH
9499
9500 2003-04-12  Borut Razem <borut.razem AT siol.net>
9501
9502         * fixed "#pragma SAVE/RESTORE can not be nested":
9503         * src/SDCC.lex: reworked pragma handling functions
9504         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9505         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9506
9507 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9508
9509         * src/SDCCutil.c (pathEquivalent): defined but not used
9510         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9511         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9512         * configure: rebuilt from configure.in
9513         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9514         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9515         * device/include/Makefile.in: replace sdcc_datadir
9516         * device/lib/Makefile.in: replace sdcc_datadir
9517         * Makefile.common.in: add LDFLAGS from configure
9518         * packihx/Makefile.in: use LDFLAGS
9519         * src/Makefile.in: use LDFLAGS
9520         * support/cpp2/Makefile.in: add LDFLAGS from configure
9521         * support/makebin/Makefile: use LDFLAGS
9522         * .version: bumped version number to 2.3.5
9523
9524 2003-04-12  Borut Razem <borut.razem AT siol.net>
9525
9526         * completed "different paths" task:
9527         * src/SDCCmacro.c: fixed bug in handling quotes
9528         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9529         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9530
9531 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9532
9533         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9534
9535 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9536
9537         * ds390/gen.c ds390/peeph.def: fix bug 706781
9538
9539 2003-04-11  Borut Razem <borut.razem AT siol.net>
9540
9541         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9542
9543 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9544
9545         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9546         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9547          set - this bit used to not be set...).
9548         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9549           bad code in PIC Port
9550         * src/regression/and2.c added to test bug 609268
9551         * src/regression/Makefile added and2.c to regression test
9552
9553
9554 2003-04-08    <johan AT CP255758-A>
9555
9556         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9557         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9558         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9559
9560 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9561
9562         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9563         fix bug #487815
9564         * support/cpp2/Makefile.in: fix bug #487815
9565         * configure: rebuilt from configure.in
9566         * Makefile.common.in: docdir changed, new path suffixes
9567         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9568         * sdcc_vc_in.h: reflect changes from sdccconf.h
9569         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9570         * src/SDCCutil.h: remove BINDIR hack
9571         * doc/sdccman.lyx: update new path hierarchy
9572
9573 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9574
9575         * src/SDCCpeeph.c: added okToRemoveSLOC test
9576
9577 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9578
9579         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9580
9581 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9582
9583         * src/SDCCpeeph.c: added labelIsReturnOnly test
9584         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9585
9586 2003-04-05    <johan AT balder>
9587
9588         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9589         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9590         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9591         * src/SDCCast.c: fixed a warning
9592         * src/SDCCast.h: fixed a warning
9593         * src/SDCCicode.c (operandFromAst): fixed a warning
9594
9595 2003-04-04    <johan AT balder>
9596
9597         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9598         * src/SDCCast.c (decorateType): fixed bug #715076
9599         * src/SDCC.y: fixed bug #702907
9600
9601 2003-04-03    <johan AT balder>
9602
9603         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9604         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9605         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9606         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9607         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9608
9609 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9610
9611         * _decdptr.c: fix return values
9612         * _gptrget.c: fix return values
9613         * _gptrgetc.c: fix return values
9614         * _gptrput.c: fix return values
9615         * _mulint.c: fix return values
9616         * as/z80/Makefile: fix 'make -j' problem
9617
9618 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9619
9620         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9621         * configure.in: big cleanup, updated to autoconf 2.5x
9622         * configure: rebuilt from configure.in
9623         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9624         * sdcc_vc_in.h: reflect changes from sdccconf.h
9625         * doc/Makefile: fixed a flaw in "make install"
9626
9627 2003-04-02    <johan AT balder>
9628
9629         * src/ds390/gen.c (genCmp): no comments
9630         * src/mcs51/gen.c (genCmp): no comments
9631         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9632         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9633
9634 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9635
9636         * support/regression/generate-cases.py: place generated file in given sub directory
9637         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9638         * support/regression/Makefile: improvements for 'make -j';
9639         side effect: it's simpler and faster now
9640
9641 2003-03-31  Borut Razem <borut.razem AT siol.net>
9642
9643         * src/z80/main.c: link-{port} and as-{port} defined without path
9644         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9645
9646 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9647
9648         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9649
9650 2003-03-30  Borut Razem <borut.razem AT siol.net>
9651
9652         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9653           changed type of list parameter to set
9654         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9655         * src/port.h: changed type of do_assemble() parameter to set
9656         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9657           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9658           definition of "cppoutfilename" macro with NULL value in preProcess()
9659         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9660         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9661         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9662           replaced with set *binPathSet
9663         * shash_add() deallocates the item, if allready exsists, before adding the new one
9664         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9665
9666 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9667
9668         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9669           a nested for loop bug in the PIC port
9670         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9671           for loops
9672
9673 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9674
9675         * support/Util/dbuf.h: remove C++ stuff to make it portable
9676
9677 2003-03-28  Borut Razem <borut.razem AT siol.net>
9678
9679         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9680           literal strings in stringLiteral()
9681         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9682         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9683           to the project
9684
9685 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9686
9687         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9688
9689 2003-03-26    <johan AT balder>
9690
9691         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9692         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9693         * src/SDCCast.c (decorateType): fixed " -v < 3"
9694
9695 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9696
9697         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9698         Added Lenny Story's debug infrastructure changes:
9699         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9700         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9701         * src/cdbFile.c: added
9702         * src/SDCCdebug.c: added
9703         * src/SDCCdebug.h: added
9704         * src/SDCCast.c (createFunction)
9705         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9706         * src/SDCCmain.c (parseCmdLine, main)
9707         * src/SDCCmem.c (redoStackOffsets)
9708         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9709         * src/SDCCsymt.h
9710         * src/common.h
9711         * src/avr/gen.c (genAVRCode)
9712         * src/ds390/gen.c (gen390Code)
9713         * src/mcs51/gen.c (gen51Code)
9714         * src/pic/gen.c (genpic14Code)
9715         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9716         * src/xa51/gen.c (genXA51Code)
9717         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9718
9719 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9720
9721         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9722         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9723
9724 2003-03-22    <johan AT balder>
9725
9726         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9727
9728 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9729
9730         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9731         * doc/cdbfileformat.lyx: added, written by Lenny Story
9732         * doc/Makefile: added cdbfileformat.lyx
9733         * doc/clean.mk: added cdbfileformat.lyx
9734
9735 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9736
9737         * src/mcs51/peeph.def: fix bug #705773
9738
9739 2003-03-20    <johan AT balder>
9740
9741         An sfr/sbit can have an "at #" AND an initializer
9742         * src/SDCCsymt.c (checkSClass):
9743         * src/SDCCmem.c (allocGlobal):
9744         * src/SDCCmem.c (allocLocal):
9745         * src/SDCCast.c (createBlock):
9746
9747 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9748
9749         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9750
9751 2003-03-16    <johan AT balder>
9752
9753         Undid the hackup of const and volatile, the problem is much bigger
9754         * src/SDCC.y:1.65
9755         * src/SDCCast.c:1.171
9756         * src/SDCCglue.c:1.138
9757         * src/SDCCicode.c:1.146
9758         * src/SDCCsymt.c:1.150
9759         * src/SDCCval.c:1.65
9760
9761 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9762
9763         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9764         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9765
9766 2003-03-13    <johan AT balder>
9767
9768         Hackup const and volatile modifiers in type chains a bit:
9769         * src/SDCC.y:1.63
9770         * src/SDCCast.c:1.169
9771         * src/SDCCglue.c:1.136
9772         * src/SDCCicode.c:1.143
9773         * src/SDCCsymt.c1.146
9774         * src/SDCCsymt.h1.59
9775         * src/SDCCval.c:1.63
9776
9777 2003-03-12    <johan AT balder>
9778
9779         * src/SDCCBBlock.h: more LRH debugging junk
9780         * src/SDCCcflow.h: more LRH debugging junk
9781         * src/SDCCloop.c: more LRH debugging junk
9782         * src/SDCC.y (struct_declaration): fixed bug #697590
9783         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9784         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9785         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9786
9787 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9788         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9789         test function names must now match exactly).
9790         * src/SDCCcse.c: added special case in findCheaperOp to allow
9791         extending a short integer. Makes less awful code for bug 700121 test case.
9792
9793 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9794
9795         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9796         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9797
9798 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9799
9800         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9801         actually called (operandsNotEqual() was called for all
9802         operandsNotEqualX tests).
9803
9804 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9805
9806         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9807         with shorter literals. Fixes bug 700121.
9808
9809 2003-03-11    <johan AT balder>
9810
9811         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9812
9813 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9814
9815         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9816         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9817
9818 2003-03-10  Borut Razem <borut.razem AT siol.net>
9819
9820         * src/SDCCmain.c: pipe preprocessor's output
9821         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9822         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9823         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9824         which closes all pipes in pipeSet set
9825         * src/SDCCset.c: free deleted item in function deleteSetItem()
9826         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9827         moved from z80 to src subproject
9828         * .version: increased version number to 2.3.4
9829
9830 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9831
9832         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9833         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9834         * support/regression/ports/xa51/spec.mk: fix typo
9835
9836 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9837
9838         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9839
9840 2003-03-09  Borut Razem <borut.razem AT siol.net>
9841
9842         * src/SDCCmain.c: pipe preprocessor's output
9843         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9844         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9845         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9846         which closes all pipes in pipeSet set
9847         * src/SDCCset.c: free deleted item in function deleteSetItem()
9848         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9849         moved from z80 to src subproject
9850
9851 2003-03-09  Borut Razem <borut.razem AT siol.net>
9852
9853         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9854         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9855         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9856         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9857         * src/SDCCglobl.h: unification of WIN32 native definitions
9858
9859 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9860
9861         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9862
9863 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9864
9865         * src/configure.in:   check for endianess (even while cross-compiling)
9866         * src/configure:      check for endianess (even while cross-compiling)
9867         * src/configure_in.h: check for endianess (even while cross-compiling)
9868         * src/avr/gen.c:        remove old endianess stuff
9869         * src/mcs51/gen.c:      remove old endianess stuff
9870         * src/ds390/gen.c:      remove old endianess stuff
9871         * src/pic/gen.c:        remove old endianess stuff
9872         * src/pic/genarith.c:   remove old endianess stuff
9873         * src/pic/glue.c:       fix endianess check
9874         * src/pic16/gen.c:      remove old endianess stuff
9875         * src/pic16/genarith.c: remove old endianess stuff
9876         * src/pic16/glue.c:     fix endianess check
9877         * src/xa51/gen.c:       remove old endianess stuff
9878         * src/z80/gen.c:        fix endianess check
9879         * src/SDCCglue.c:       fix endianess check
9880         * src/ds390/peeph.def: fix bug 700036
9881
9882 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9883
9884         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9885         * src/configure: find appropriate data-types on host for SDCC's int and long
9886         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9887         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9888         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9889
9890 2003-03-07    <johan AT balder>
9891
9892         Just a big NOOP:
9893                 some minor cleanups before the big shot
9894                 OP_DEFS and OP_USES now use Kevin's protection
9895                 new option --nolabelopt
9896
9897         * src/SDCCBBlock.c:
9898         * src/SDCCast.c,:
9899         * src/SDCCcflow.c:
9900         * src/SDCCcse.c:
9901         * src/SDCCicode.c:
9902         * src/SDCCicode.h:
9903         * src/SDCClabel.c:
9904         * src/SDCCloop.c:
9905         * src/SDCCmain.c:
9906         * src/ds390/ralloc.c:
9907         * src/mcs51/ralloc.c:
9908         * src/pic/ralloc.c:
9909         * src/xa51/ralloc.c:
9910         * src/z80/ralloc.c:
9911
9912 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9913
9914         * src/pic/pcode.c (get_op): fix 64 bit warnings
9915         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9916         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9917         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9918         * support/regression/tests/malloc.c: fix 64 bit warnings
9919
9920 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9921
9922         * src/mcs51/gen.c (genMinus): fixed bug 696436
9923
9924 2003-03-02  Borut Razem <borut.razem AT siol.net>
9925
9926         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9927
9928 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9929
9930         * configure.in: test for mkstemp
9931         * sdccconf_in.h: add HAVE_MKSTEMP
9932
9933 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9934
9935         * device/include/ctype.h: removed warning while using --stack-auto
9936         * device/include/malloc.h: removed warning while using --stack-auto
9937         * device/include/string.h: removed warning while using --stack-auto
9938
9939 2003-02-23  Borut Razem <borut.razem AT siol.net>
9940
9941         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9942         because NDEBUG is defined (see man assert)
9943         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9944
9945 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9946
9947         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9948         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9949
9950 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9951
9952         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9953         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9954
9955 2003-02-18    <johan AT balder>
9956
9957         * as/mcs51/asmain.c (asmbl): module can start with a digit
9958         * as/z80/asmain.c (asmbl): module can start with a digit
9959
9960 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9961
9962         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9963         * src/asm.c: fix pipe() for Mingw32
9964
9965 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9966
9967         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9968         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9969         make -V work again; --c1mode reads now from stdin
9970         * doc/sdccman.lyx: added --c1mode
9971         * support/Util/SDCCerr.c: new messages for c1 mode
9972         * support/Util/SDCCerr.h: new messages for c1 mode
9973         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9974
9975 2003-02-15    <johan AT balder>
9976
9977         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9978
9979 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9980
9981         * doc/sdccman.lyx: Environment variables, -o and other minor things
9982
9983 2003-02-14    <johan AT balder>
9984
9985         * src/xa51/main.c: before anyone really tries to use it :)
9986
9987         * Install doc's in share/sdcc/doc
9988         * removed some obsolete files
9989         * Do a proper make distclean and uninstall
9990         M Makefile.common.in
9991         R sdccbuild.sh
9992         M as/Makefile
9993         M device/include/Makefile.in
9994         M device/lib/Makefile.in
9995         M doc/sdccman.lyx
9996         M link/Makefile
9997         M sim/ucsim/doc/Makefile.in
9998         M src/clean.mk
9999         R src/avr/peeph.rul
10000         R src/xa51/peeph.rul
10001         M support/cpp2/Makefile.in
10002         M support/makebin/Makefile
10003
10004
10005 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10006
10007         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10008
10009 2003-02-10  Borut Razem <borut.razem AT siol.net>
10010
10011         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10012         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10013         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10014         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10015         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10016         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10017         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10018         src/z80/Makefile.bcc: Borland Makefile cleanup
10019         * as/z80/Makefile.bcc: Added Borland Makefile
10020         * support/cpp2/borland.h: Removed
10021
10022 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10023
10024         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10025         * src/SDCC.lex: new pragma NOIV
10026         * src/SDCCglobl.h: new pragma NOIV
10027         * src/SDCCmem.c: new pragma NOIV
10028
10029 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10030
10031         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10032
10033 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10034
10035         * src/SDCCmain.c: signal handling is switched off by --debug
10036         * doc/Makefile: small fix for install; use clean.mk again
10037         * doc/clean.mk: clean *.pdf and *.html too
10038
10039 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10040
10041         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10042         * device/lib/printfl.c: fix a ds390 bug by making it portable
10043         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10044         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10045         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10046         * debugger/mcs51/cmd.c: converted multi-line string literals
10047         * sim/ucsim/globals.cc: converted multi-line string literals
10048         * src/SDCCmain.c: introduced signal handler to remove temp files
10049         * doc/Makefile: small tweaks, implement clean
10050         * doc: removed generated files
10051
10052 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10053
10054         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10055         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10056         Address Record is not correctly generated for DS390."
10057
10058 2003-02-02  Borut Razem <borut.razem AT siol.net>
10059
10060         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10061         * as/mcs51/asm.h: fixed compilation with Borland C
10062         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10063         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10064         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10065         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10066         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10067         src/z80/Makefile.bcc: delete $(LIB) only if exist
10068         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10069
10070 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10071
10072         * device/include/malloc.h: introduced NULL
10073         * device/include/string.h: introduced NULL
10074         * device/include/stdlib.h: introduced NULL
10075         * device/lib/_memcpy.c: removed NULL
10076         * device/lib/_strcat.c: removed NULL
10077         * device/lib/_strchr.c: removed NULL
10078         * device/lib/_strcmp.c: removed NULL
10079         * device/lib/_strcpy.c: removed NULL
10080         * device/lib/_strcspn.c: removed NULL
10081         * device/lib/_strlen.c: removed NULL
10082         * device/lib/_strncat.c: removed NULL
10083         * device/lib/_strncmp.c: removed NULL
10084         * device/lib/_strncpy.c: removed NULL
10085         * device/lib/_strpbrk.c: removed NULL
10086         * device/lib/_strrchr.c: removed NULL
10087         * device/lib/_strspn.c: removed NULL
10088         * device/lib/_strstr.c: removed NULL
10089         * device/lib/_strtok.c: removed NULL
10090         * device/lib/malloc.c: removed NULL, include own header
10091
10092 2003-02-02    <johan AT balder>
10093
10094         * 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
10095         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10096         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10097         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10098         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10099         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10100
10101 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10102
10103         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10104         area 'DATA'"
10105
10106 2003-02-01    <johan AT balder>
10107
10108         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10109
10110 2003-01-31    <johan AT CP255758-A>
10111
10112         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10113
10114 2003-01-30    <johan AT balder>
10115
10116         * src/SDCCBBlock.c: automatic bug detection
10117         * src/SDCCicode.c: automatic bug detection
10118
10119 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10120
10121         * src/SDCCglobl.h:   now --xram-size 0 works
10122         * src/SDCCmain.c:    now --xram-size 0 works
10123
10124 2003-01-29    <johan AT balder>
10125
10126         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10127
10128 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10129
10130         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10131         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10132         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10133         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10134         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10135         * src/SDCCmain.c:    Added options --xram-size and --code-size
10136
10137 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10138
10139         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10140         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10141
10142 2003-01-27    <johan AT balder>
10143
10144         * src/SDCC.y: fixed bug #613764
10145
10146 2003-01-26    <johan AT balder>
10147
10148         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10149         * src/SDCCsymt.h: fixed bug #673374
10150         * src/SDCCglue.c: fixed bug #661910
10151         * src/SDCCast.c: fixed bug #458099 and 673374
10152
10153 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10154
10155         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10156         * as/mcs51/strcmpi.h: added
10157         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10158         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10159         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10160         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10161         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10162         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10163         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10164         * as/mcs51/Makefile.aslink: new module strcmpi
10165         * as/mcs51/Makefile.asx8051: new module strcmpi
10166         * as/mcs51/Makefil.bcc: new module strcmpi
10167         * as/mcs51/Makefile.in: new module strcmpi
10168         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10169
10170 2003-01-26    <johan AT balder>
10171
10172         * src/SDCCglue.c: reverted back to 1.124
10173         * src/SDCCast.c: reverted back to 1.156
10174         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10175
10176 2003-01-25    <johan AT balder>
10177
10178         * src/SDCCglue.c: A better fix for bug #661910
10179         * src/SDCCast.c: A better fix for bug #661910
10180         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10181
10182 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10183
10184         * src/Makefile.in: remove spawn.o
10185         * src/SDCCmain.c: remove spawn.h
10186         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10187         * src/spawn.c: removed
10188         * src/spawn.h: removed
10189         * support/regression/ports/ds390/spec.mk: link with -r
10190
10191 2003-01-24    <johan AT CP255758-A>
10192
10193         * src/ds390/gen.c (aopOp): fixed bug #667458
10194         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10195         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10196         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10197
10198 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10199
10200         * src/mcs51/peeph.def: better assembler identation by Frieder
10201         * src/mcs51/gen.c: better assembler identation by Frieder
10202
10203 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10204
10205         * as/z80/string.h: removed for gcc 3.2
10206         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10207         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10208
10209 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10210
10211         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10212         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10213         * support/regression/Makefile: separate temp files for ports
10214         * support/regression/generate-cases.py: separate temp files for ports
10215         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10216         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10217
10218 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10219
10220         * moved tinitalk to device/examples/ds390
10221
10222 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10223
10224         * as/mcs51/lkmem.c: rflag is for DS390
10225         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10226         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10227                          (linkEdit): move mem- and map-files the same way as ihx-files
10228         * src/z80/main.c (_setDefaultOptions): removed --generic
10229         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10230         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10231         * src/pic/glue.c (picglue): --c1mode works again
10232         * src/pic16/glue.c (pic16glue): --c1mode works again
10233         * src/asm.c (printCLine): fix #660034
10234
10235 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10236
10237         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10238         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10239         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10240         * as/mcs51/lkmem (summary): better fix for sp problem
10241         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10242         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10243         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10244                                               remove --stack-after-data
10245
10246 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10247
10248         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10249         * src/SDCCutil.c (join): ugly bug: missing '\0'
10250         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10251
10252 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10253
10254         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10255         * src/port.h: typo
10256         * src/pic/main.c (_asmCmd): gpasm supports -o
10257         * src/z80/main.c: more general macros
10258         * device/lib/Makefile.in: remove intermediate files
10259
10260 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10261
10262         * .version: Bumped version number to 2.3.3
10263         * src/SDCCBBlock.c: new option -o
10264         * src/SDCCglobl.h: new option -o
10265         * src/SDCCglue.c: new option -o
10266         * src/SDCCmain.c: new option -o
10267         * src/asm.c: new option -o
10268         * src/ds390/main.c: new option -o
10269         * src/pic/glue.c: new option -o
10270         * src/pic/pcode.c: new option -o
10271         * src/pic/ralloc.c: new option -o
10272         * src/pic16/glue.c: new option -o
10273         * src/pic16/pcode.c: new option -o
10274         * src/pic16/ralloc.c: new option -o
10275         * src/z80/main.c: new option -o
10276         * device/lib/Makefile.in: use -o
10277         * support/regression/ports/ds390/spec.mk: use -o
10278         * support/regression/ports/gbz80/spec.mk: use -o
10279         * support/regression/ports/mcs51/spec.mk: use -o
10280         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10281         * support/regression/ports/z80/spec.mk: use -o
10282         * support/regression/ports/ucz80/spec.mk: use -o
10283         * support/regression/ports/xa51/spec.mk: use -o
10284         * support/regression/fwk/lib/timeout.c: fix usage string
10285
10286 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10287         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10288
10289 2003-01-07    <johan AT balder>
10290
10291         * src/SDCCast.c (decorateType): fixed bug #600035
10292
10293 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10294         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10295         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10296         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10297         * src/pic/pcode.c: outcommented unused variable to remove warnings
10298         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10299
10300 2003-01-06    <karl AT turbobit.com>
10301         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10302    regression tests.
10303
10304 2003-01-06    <johan AT balder>
10305
10306         * src/SDCCicode.c: fixed array add
10307
10308 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10309         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10310         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10311
10312 2003-01-04    <johan AT balder>
10313
10314         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10315
10316 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10317         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10318
10319 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10320         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10321         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10322
10323 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10324         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10325
10326 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10327         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10328
10329 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10330         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10331
10332 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10333
10334     * in \sdcc\as\mcs51\ changed these files in order to create an
10335     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10336     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10337     following files to include the previous two files: aslink.dsp,
10338     Makefile.aslink, Makefile.bcc, and Makefile.in.
10339
10340     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10341     .adb instead of .cdb
10342
10343 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10344
10345         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10346         value from option --iram-size.
10347
10348 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10349
10350         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10351         dram[] array.
10352
10353 2002-09-18    <wiml AT hhhh.org>
10354
10355         * SDCClrange.h: exposed setFromRange() and setToRange()
10356         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10357           packRegsForAccUse() (bug 542397)
10358         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10359           multiple times and emitting the fetch operations more than once
10360           added aopGetUsesAcc() function to allow binary operators to
10361           fetch their operands in the correct order; made genMinus() emit
10362           compact code for X = LITERAL - Y
10363
10364 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10365         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10366         sprintf() in line 1267.
10367
10368 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10369         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10370         like ports.
10371
10372 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10373         Changes to aslink (All the changes are marked with 'JCF'):
10374
10375         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10376         summary().
10377
10378         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10379         area BSEG.  Also moves, if possible, the DATA area down into the internal
10380         ram so more space is available.
10381
10382         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10383         sflag.
10384
10385         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10386         not bytes.  Function summary() which creates a memory usage summary
10387         file with extension .mem.  Reports of overlaping stack and small stack
10388         size.  If the space for the stack is less than 16 bytes aslink trows a
10389         warning.
10390
10391         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10392         the 8051.  Option 'y' for memory summary output file.
10393
10394         Changes to sdcc (All the changes are marked with 'JCF'):
10395
10396         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10397
10398         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10399         overlaying area for it (uses RegBankUsed[4]).
10400
10401         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10402         bank zero as used by default.  By default aslink locates the stack
10403         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10404         the creation of the .mem file.  Delegates the allocation of data area
10405         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10406         the begining of the stack area to aslink.
10407
10408         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10409         glue() in SDCCglue.c creates an area for it.
10410
10411 2002-09-03  Borut Razem <borut.razem AT siol.net>
10412         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10413         sdcc/src/pic/glue.c:
10414         introduced atexit() handler for teporay files removal in case of
10415         errors, assertions, ...
10416
10417 2002-08-29  Borut Razem <borut.razem AT siol.net>
10418         * sdcc/support/cpp2/auto-host_vc_in.h:
10419         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10420         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10421         Maybe there is a similar problem with BORLANDC? It should be checked!
10422
10423         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10424         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10425         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10426         was not executed, and the compiler (cl) launched a warning:
10427         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10428
10429 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10430         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10431
10432 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10433         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10434
10435         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10436           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10437           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10438           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10439           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10440           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10441           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10442         - added Release configuration in VS projects
10443         - review of compiler an linker options
10444         - VC .exe files are generated in bin_vc directory, not to interfere
10445           with binaries generated from other projects (cygwin, mingw, bcc ...)
10446
10447         * sdcc/src/yacc.dsp: added
10448
10449         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10450         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10451         and insert the version number definitions from .version
10452
10453         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10454
10455         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10456         added - genarate auto-host.h using auto-host_vc_in.h as template
10457
10458         * sdcc/sdcc_vc.h,
10459         removed from CVS, generated automatically
10460
10461 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10462         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10463
10464 2002-08-11  Borut Razem <borut.razem AT siol.net>
10465         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10466
10467 2002-08-10  Borut Razem <borut.razem AT siol.net>
10468         * src/SDCCmain.c (main):
10469         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10470         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10471         The consequence was that some temporary files were not removed.
10472
10473         * src/SDCCglue.c:
10474         unification of code in functions tempfilename() and tempfile():
10475         function tempnam() is defined in Visual Studio 6.0 and .NET
10476
10477         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10478
10479         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10480           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10481         - removed compiler command line option /WX: Treats all warnings as errors
10482         - update a list of source files, included into the project
10483
10484         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10485           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10486         changed project type to Generic Project so that can be correcly converted to VS.NET project
10487
10488         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10489
10490         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10491
10492         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10493
10494         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10495         added return 0 statements after assert() to make compiler happy
10496
10497         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10498         added newline in the def file to keep MSC compiler satisfied
10499
10500         * sdcc/src/z80/gen.c:
10501         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10502           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10503         - solved MSC error in function aopDump()
10504
10505         * sdcc_vc.h: define PREFIX as "\\sdcc"
10506
10507 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10508         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10509
10510 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10511         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10512         - Rewrote the register banking algorithm.
10513         - Added pCode live-range analysis to registers (for now, only non-used and
10514         singly-used registers optimized away)
10515
10516         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10517
10518         * 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.
10519
10520 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10521         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10522
10523 2002-04-22  Michael Hope  <michaelh AT vroom>
10524
10525         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10526
10527         * configure.in (DD_COPT): Added include support required for gbdk.
10528
10529         * .version: Bumped version number just to increase it.
10530
10531         * src/SDCCmain.c: Added -nostdinc to the default options.
10532
10533 2002-04-15  Michael Hope  <michaelh AT vroom>
10534
10535         * device/lib/z80/printf.c (sprintf): Added.
10536
10537         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10538
10539         * src/z80/peeph.def: Added transpose redundent load rule.
10540
10541         * src/z80/main.c: Added force callee saves for jaune.
10542
10543         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10544
10545         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10546
10547 2002-03-28  Johan Knol  <johan AT balder>
10548
10549         * src/SDCCval.c: fixed bug #532436
10550
10551 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10552         * /src/port.h:
10553         Added "char *Processor" field to the port structure.
10554
10555         * /src/SDCCmain.c:
10556         Added -p option. Allows port dependent processor to be specified.
10557
10558         * all ports:
10559         Initialized the new field char *Processor field to NULL in all ports
10560
10561         * /src/pic/*:
10562         Compiler generated registers for interrupt context saving
10563         were not getting allocated.
10564
10565 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10566
10567         * /src/SDCCast.c:
10568         Fixed left shift. Will promote the left side of a left shift
10569         if a) left shifting more than size of operand or b) when assigned
10570         to something size > size of left side
10571
10572 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10573         * src/pic/*
10574         tons of changes. Register allocation has been
10575         rewritten. Added customization for the various PICs. Flow
10576         analysis is restructured. ...
10577
10578         * src/pic/device.h:
10579         Added
10580
10581         * src/pic/device.c:
10582         Added. device.c is a PIC port hack to accomodate variations
10583         in PIC devices.
10584
10585 2002-03-13  Michael Hope  <michaelh AT vroom>
10586
10587         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10588
10589 2002-03-04  johanknol  <johanknol AT manik>
10590
10591         * /src/SDCCval.c: fixed
10592
10593         const unsigned char arr[][2] = { { 0, 1 } };
10594         t18.c:1: error: Initializer element is not constant
10595
10596 2002-03-04  bela  <bela AT manik>
10597
10598         * /device/include/mcs51reg.h:
10599         ds89c420 register definition update
10600
10601 2002-03-03    <johan AT FRIJA>
10602
10603         * support/Util/SDCCerr.c: did something, but don't no why anymore
10604
10605         * support/regression/tests/bug-524691.c: made it a little less shy
10606
10607         * src/SDCCast.c (decorateType): fixed bug #524697
10608
10609         * src/SDCCast.c: made some lineno improvements
10610
10611         * src/SDCCval.c (getNelements): changed warning to error
10612
10613         * src/SDCCglue.c (printIvalArray): changed warning to error
10614
10615         * src/SDCCicode.c: fixed a warning for mingw
10616
10617         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10618
10619         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10620
10621 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10622
10623         * src/ds390/peeph.def:
10624         Added some more peephole rules
10625
10626         * src/ds390/gen.c: Various fixes & enhancements
10627
10628         * src/SDCClrange.c, src/SDCClrange.h:
10629         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10630
10631         * src/ds390/ralloc.c:
10632         various fixes & enhancements (ds390) specific
10633
10634         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10635         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10636         from rallocs.
10637
10638         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10639
10640 2002-03-02    <johan AT FRIJA>
10641
10642         * src/SDCCast.c (decorateType): fixed bug #524708
10643
10644         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10645
10646         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10647
10648 2002-03-01  Michael Hope  <michaelh AT vroom>
10649
10650         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10651
10652         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10653
10654 2002-03-01    <johan AT FRIJA>
10655
10656         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10657
10658         * src/SDCCast.c (decorateType): fixed bug #524209
10659
10660         * src/SDCCval.c (valNot): fixed bug #524195
10661
10662 2002-02-26    <johan AT balder>
10663
10664         * src/xa51/gen.c: fixed a warning
10665
10666         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10667
10668         * src/SDCCast.c (decorateType): fixed bug #522534
10669
10670 2002-02-23    <johan AT balder>
10671
10672         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10673
10674 2002-02-22    <johan AT balder>
10675
10676         * src/SDCCast.c: fixed bug #514865
10677
10678         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10679
10680 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10681
10682         * sdcc/src/SDCCloop.c:
10683         Previous fix was not good. basic blocks that have "break" or "return" are
10684         not really partof a loop , but live ranges used in these blocks should
10685         be live thru the entire loop, so set partOfLoop but don't add them to
10686         loop region
10687
10688 2002-02-21    <johan AT FRIJA>
10689
10690         * src/SDCCcse.c: fixed bug #514308
10691
10692 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10693
10694         * src/SDCCloop.c:
10695         Fixed BUG #519583. If a conditional block ended in a return/break
10696         statement inside a loop, it was not being considered part of the loop.
10697
10698         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10699
10700 2002-02-10  Karl Bongers <karl AT turbobit.com>
10701
10702         * debugger/*:
10703         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10704         with lots of comments and notes.
10705
10706         * device/examples/test2.c:
10707         Fix bug, "red" variable not being initialized(compiler complained).
10708
10709         * device/examples/Makefile, examples/test3.c:
10710         Add Makefile in device/examples folder, compiles test3.c
10711         for use as a multiple module SDCDB test case.
10712
10713         * sim/ucsim/cmd.src/cmdset.cc:
10714         Took out debug printfs in ucsim "next" command.
10715
10716         * sim/ucsim/xa.src:
10717         Karl and Johan start ucsim XA support.  Most dissassembly working,
10718         about 75% emulation done(plenty of work remaining).
10719
10720         * sim/ucsim/z80.src:
10721         Add Z80 support to ucsim, add test-ucz80 regression test,
10722         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10723         Notice z80 compiler fails on examples/test3.c/crc code.
10724
10725 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10726
10727         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10728         Added support for --parms-in-bank1
10729
10730         * src/ds390/peeph.def:
10731         added a few more peephole optimzations
10732
10733         * src/ds390/main.c:
10734         1) added __builtin_inp & __builtin_outp used to read in data of given length
10735            from a memory mapped port
10736         2) added __builtin_memcmp
10737         3) added __builtin_swapw swap bytes of a short
10738
10739         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10740         1) handle multiple send & receives from register bank1
10741         2) ralloc can now allocate DPTR1 to some liveRanges
10742
10743         * src/SDCCsymt.c, src/SDCCsymt.h:
10744         changes to handle multiple sends & receives
10745
10746         * src/SDCCptropt.h:
10747         added some pointer arithmetic optimization
10748
10749         * src/SDCCptropt.c:
10750         added some pointer arithmetic optimizations but not stable yet so not
10751         called from anywhere (will get this working shortly)
10752
10753         * src/SDCCopt.c: fixed for multiple sends & receives
10754
10755         * src/SDCCmain.c:
10756         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10757         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10758            set preprocessor defines (depending on options)
10759
10760         * src/SDCCicode.c, src/SDCCicode.h:
10761         changes made to handle multiple sends & receives
10762
10763         * src/SDCCglobl.h:
10764         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10765
10766         * src/SDCCcse.c, src/SDCCcse.h:
10767         added function findbackward def (to be used in upcoming optimization)
10768
10769         * src/SDCCcflow.c, src/SDCCcflow.h:
10770         added function returnAtEnd - to determine if a basic block terminates with
10771         a RETURN iCode
10772
10773         * src/SDCCast.c, src/SDCCast.h:
10774         added option parms-in-bank1
10775
10776         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10777         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10778         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10779         adjusted for --parms-in-bank1 option
10780
10781         * device/include/string.h:
10782         donot redefine "reentrant" keyword
10783
10784         * device/include/ds80c390.h: Added some more SFRs
10785
10786 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10787
10788         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10789
10790 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10791
10792         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10793
10794 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10795
10796         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10797
10798 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10799
10800         * Added --xram-movc option
10801
10802 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10803
10804         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10805
10806 2002-01-11  Johan Knol
10807
10808         * Added math lib of Jesus Calvino-Fraga
10809
10810 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10811
10812         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10813         * support/regression/Makefile: new target test-mcs51-stack-auto
10814         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10815
10816 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10817
10818         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10819
10820 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10821
10822         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10823
10824 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10825
10826         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10827
10828         * src/SDCCglue.h: add definition for printIvalChar()
10829
10830 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10831
10832         * src/SDCCast.c: fix #498138 by Johan
10833
10834         * src/SDCCglue.c: fix #498138 by Johan
10835
10836 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10837
10838         * support/regression/Makefile: fix clean
10839
10840         * support/regression/ports/ds390/support.c: fix transmission of last character
10841
10842 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10843
10844         * /sdcc/src/ds390/gen.c:
10845         a) improved computing address of stack variable
10846         b) took out some #if 0 code
10847         c) improved parmBytes adjustment
10848         d) improved genPlusIncr & genMinusIncr
10849         e) genCmp could generate bad code (when left assigned to DPTR)
10850         f) Fixed bug in hasInc
10851
10852         * /sdcc/src/ds390/ralloc.c:
10853         a) packRegsForSupport could mess up live information (Fixed)
10854         b) packRegsDPTRuse could be incorrect for left & right shift
10855
10856         * /sdcc/src/mcs51/ralloc.c:
10857         packRegsForSupport could mess up the live information (Fixed)
10858
10859         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10860
10861         * /sdcc/src/SDCCast.c:
10862         can reverse a loop even if function call is present as long
10863         as the loop control variable is local & is not passed as parameter
10864
10865 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10866
10867         * /sdcc/ChangeLog: *** empty log message ***
10868
10869         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10870         More builtin function additions for TININative
10871
10872         * /sdcc/src/ds390/ralloc.c:
10873         Had broken the regression testsuite
10874
10875         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10876
10877         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10878         Added funcattr hasStackParms will be set for reentrant functions when there
10879         are paramteres on the stack, this helps in minimizing frame pointer generation
10880         typeFromStr can handle function pointers now
10881
10882         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10883         *** empty log message ***
10884
10885 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10886
10887         * /src/ds390/gen.c, /src/ds390/main.c:
10888         More builtin function additions for TININative
10889
10890         * /src/ds390/ralloc.c:
10891         Had broken the regression testsuite
10892
10893         * /src/SDCCast.c: Fixed a bug in dumptree
10894
10895         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10896         Added funcattr hasStackParms will be set for reentrant functions when there
10897         are paramteres on the stack, this helps in minimizing frame pointer generation
10898         typeFromStr can handle function pointers now
10899
10900         * /doc/builtins.txt, /doc/TININative.txt:
10901         *** empty log message ***
10902
10903
10904 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10905
10906         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10907         ALPHA version for -mTININative
10908
10909         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10910         updated to reflect changes in the port structure
10911
10912         * /src/port.h:
10913         added function do_assemble (similar to do_link) if non-null this function
10914         will be called to do assembly (-mTININative) requires a multi command
10915         assembly
10916         added function genAssemblerEnd will be called to generate assembler Epilogue
10917
10918         * /src/SDCCsymt.c:
10919         added _JavaNative to debug info printing
10920
10921         * /src/SDCCmain.c: added option --tini-libid
10922         added port->do_assemble function (-mTININative) has a multi command assemble
10923
10924         * /src/SDCCglue.c: Disabled "constExpr" check
10925         added port->genAssemblerEnd function
10926
10927         * /src/SDCCglobl.h: Added option --tini-libid value
10928
10929         * /src/SDCCast.h:
10930         tookout optimizeCompare from the header (has no external references)
10931
10932         * /src/SDCCast.c: made one more function "static"
10933
10934 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10935
10936         * src/z80/mappings.i: Added z80asm support.
10937
10938         * src/z80/main.c: Added z80asm support on --asm=z80asm
10939
10940         * src/z80/gen.c: Fixed asm portability issues.
10941
10942         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10943
10944         * src/SDCCglue.c (printExterns): Added global/extern split.
10945
10946 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10947
10948         * support/regression/Makefile: added test for mcs51 model large
10949
10950         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10951
10952         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10953
10954 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10955
10956         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10957
10958 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10959
10960         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10961
10962         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10963
10964 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10965
10966         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10967
10968         * support/regression/tests/simplefloat.c: Port to mcs51.
10969
10970 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10971         * support/regression/tests/bug-485362.c: Added.
10972
10973         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10974
10975         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10976
10977         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10978
10979         * src/z80/gen.c (aopDump): Added a dump function.
10980
10981 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10982         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10983
10984         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10985
10986         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10987
10988         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10989
10990         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10991
10992         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10993
10994         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10995
10996         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10997
10998         * support/regression/ports/ds390/support.c: Use tinibios.
10999
11000         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11001
11002 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11003
11004         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11005         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11006
11007         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11008
11009         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11010
11011 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11012
11013         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11014
11015         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11016         (packRegsForIYUse): Created and optimised.
11017
11018 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11019
11020         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11021 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11022
11023         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11024
11025         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11026
11027         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11028
11029 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11030
11031         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11032
11033         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11034
11035 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11036
11037         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11038
11039         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11040
11041         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11042
11043 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11044
11045         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11046         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11047         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11048
11049         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11050
11051         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11052         (genNotFloat): Added.
11053         (genUminusFloat): Added.
11054
11055         * device/lib/z80/Makefile: Added floating pt stubs.
11056
11057         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11058
11059         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11060
11061         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11062
11063 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11064
11065         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11066
11067         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11068
11069         * sdcc/support/regression/Makefile: Add port ds390.
11070
11071         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11072
11073         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11074
11075         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11076
11077         * sdcc/support/regression/ports/ds390/support.c: Added.
11078
11079         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11080
11081         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11082
11083         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11084
11085 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11086
11087         * device/include/malloc.h: Added z80 and gbz80 support.
11088
11089         * device/lib/gbz80/heap.s: Added.
11090
11091         * device/lib/z80/heap.s: Added.
11092
11093         * device/lib/malloc.c: Added z80 and gbz80 support.
11094
11095         * support/regression/tests/malloc.c (testMalloc): Added.
11096
11097         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11098
11099         * support/regression/tests/bug-478094.c: Added.
11100
11101         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11102
11103 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11104
11105         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11106
11107         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11108
11109         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11110
11111         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11112
11113         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11114
11115 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11116
11117         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11118
11119 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11120
11121         * support/regression/tests/bug-477927.c: Added.
11122
11123         * src/z80/peeph.def: Added minor rules.
11124
11125         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11126
11127         * src/z80/peeph.def: Added jump optimisation modification.
11128
11129 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11130
11131         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11132
11133 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11134
11135         * support/regression/tests/funptrs.c: Added.
11136
11137 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11138
11139         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11140
11141 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11142
11143         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11144
11145         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11146
11147         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11148         (movLeft2ResultLong): Created.
11149
11150         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11151         (joinPushes): Added.  Joins two char pushes into a word push.
11152
11153 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11154
11155         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11156
11157         * support/makebin/Makefile (install): Added creation of dest dir.
11158
11159 2001-10-24 Karl Bongers <karl AT turbobit.com>
11160
11161         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11162
11163 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11164
11165         * src/z80/ralloc.c: Turned off faulty pack for one use.
11166
11167         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11168
11169         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11170
11171 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11172
11173         * support/regression/Makefile: Improved clean
11174
11175         * support/regression/ports/gbz80/spec.mk: Added clean
11176
11177         * support/regression/ports/host/spec.mk: Added clean
11178
11179         * support/regression/ports/z80/spec.mk: Added clean
11180
11181         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11182
11183         * support/regression/ports/mcs51/timeout.c: little improvements
11184
11185 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11186
11187         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11188
11189         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11190
11191         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11192
11193 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11194
11195         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11196
11197         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11198
11199 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11200         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11201
11202         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11203
11204         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11205
11206         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11207
11208         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11209
11210         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11211
11212         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11213
11214         * support/regression/tests/longor.c: Added.
11215
11216 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11217
11218         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11219
11220         * as/mcs51/aslink.h: define PATH_MAX
11221
11222         * as/mcs51/asm.h: define PATH_MAX
11223
11224         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11225
11226         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11227
11228         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11229
11230         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11231
11232         * src/SDCCglobl.h: define PATH_MAX
11233
11234         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11235
11236         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11237
11238 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11239
11240         * src/z80/gen.c (gencjneshort): Fixed
11241
11242         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11243
11244 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11245
11246         * support/regression/tests/bug-469671.c: Added.
11247
11248         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11249
11250 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11251
11252         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11253
11254         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11255
11256 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11257
11258         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11259
11260         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11261
11262         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11263
11264         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11265
11266         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11267
11268         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11269
11270         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11271
11272 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11273
11274         * 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.
11275
11276         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11277
11278         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11279
11280 2001-10-07    <johan AT FRIJA>
11281
11282         * device/lib/gets.c (gets): fixed the return value.
11283
11284 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11285         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11286
11287         * 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.
11288
11289         * 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.
11290
11291         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11292
11293         * src/pic/gen.c: Removed Safe_strdup.
11294
11295         * configure.in: Added option to enable libgc support.
11296
11297         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11298         (bitVectUnion): Optimised.
11299         (bitVectIntersect): Optimised.
11300         (bitVectBitsInCommon): Optimised.
11301         (bitVectCplAnd): Optimised.
11302
11303         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11304
11305 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11306
11307         * src/SDCCmain.c: distinguish between assembler debug and plain options
11308
11309         * src/avr/main.c:   remove standard assembler options
11310
11311         * src/ds390/main.c: remove standard assembler options
11312
11313         * src/mcs51/main.c: remove standard assembler options
11314
11315         * src/port.h: removed "PENDING" comment
11316
11317 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11318
11319         * src/device/lib/_mulint.c  : new, with assember functions
11320
11321         * src/device/lib/_mullong.c : new, with assember functions
11322
11323         * src/device/lib/_divuint.c : with assember functions
11324
11325         * src/device/lib/_divsint.c : with assember functions
11326
11327         * src/device/lib/_divulong.c: with assember functions
11328
11329         * src/device/lib/_divslong.c: with assember functions
11330
11331         * src/device/lib/_moduint.c : with assember functions
11332
11333         * src/device/lib/_modsint.c : with assember functions
11334
11335         * src/device/lib/_modulong.c: with assember functions
11336
11337         * src/device/lib/_modslong.c: with assember functions
11338
11339         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11340
11341         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11342
11343         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11344                                       replaced _mululong.c and _mulslong.c by _mullong.c
11345
11346 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11347
11348         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11349
11350 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11351
11352         * src/SDCCglue.c: test, if win32api is available for MINGW
11353
11354 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11355
11356         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11357         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11358         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11359         * support/regression/ports/host/spec.mk: removed GENERIC
11360         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11361         * support/regression/ports/z80/spec.mk: removed GENERIC
11362
11363 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11364
11365         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11366
11367         * support/regression/tests/bug-467035.c: Created.
11368
11369 2001-10-01    <johan AT FRIJA>
11370
11371         * src/SDCC.y: fixed bug #466586 part 1
11372
11373 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11374
11375         * SDCCicode.c: z80 has no generic pointers
11376         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11377
11378 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11379
11380         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11381
11382 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11383
11384         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11385
11386         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11387
11388 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11389
11390         * configure.in: Fixed up so that ucsim is only configured once.
11391
11392         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11393
11394         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11395         (getPathDifference): As above.
11396
11397         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11398
11399         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11400
11401 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11402         * .version: Updated to 2.3.1
11403
11404         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11405         Added copyright header.
11406
11407         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11408         (assemble): Added support for macro based assembler commands.
11409         (linkEdit): Added support for macro based linker commands.
11410         (preProcess): Changed the pre-processor to use macros.
11411         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11412         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11413
11414         * device/lib/z80/crt0.s: Added module name for debugging.
11415
11416 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11417
11418         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11419
11420         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11421
11422         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11423
11424         * src/Makefile.in: Added SDCCmacro and SDCCutil
11425
11426 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11427
11428         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11429
11430 2001-09-16    <johan AT FRIJA>
11431
11432         * 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.
11433
11434 2001-09-15    <johan AT FRIJA>
11435
11436         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11437         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11438
11439 2001-09-11    <johan AT FRIJA>
11440
11441         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11442
11443 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11444
11445         * support/regression/tests/bug-460444.c: Added test case.
11446
11447         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11448         (genCast): Added justification for all of the asserts.
11449
11450 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11451
11452         * support/regression/support.c: _xdata replaced by xdata
11453
11454         * support/regression/spec.mk: removed _generic
11455
11456 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11457
11458         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11459
11460         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11461         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11462
11463         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11464
11465         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11466
11467         * support/regression/tests/bug-460010.c: Added test case.
11468
11469         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11470
11471 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11472
11473         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11474
11475         * support/regression/testfwk.c: removed workaround for bug #436344
11476
11477         * support/regression/tests/bp.c: use less memory with mcs51
11478
11479         * support/regression/tests/bug-441448.c: use less memory
11480
11481         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11482
11483         * support/regression/collate-results.py: typo
11484
11485 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11486
11487         * support/regression/tests/fetchoverlap.c: Added new test case.
11488
11489         * support/regression/tests/bp.c: Added new test case.
11490
11491         * support/regression/tests/bug-448984.c: Added new test case.
11492
11493         * support/regression/tests/pow2shifts.c: Added new test case.
11494
11495         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11496         (genlshTwo): Fixed right shift for count > 8.
11497
11498         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11499
11500 2001-09-08    <johan AT FRIJA>
11501
11502         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11503
11504 2001-09-07    <johan AT FRIJA>
11505
11506         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11507
11508         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11509
11510 2001-09-06    <johan AT FRIJA>
11511
11512         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11513         * bernhard noted me at this: "() equals to (void)" (1.38)
11514
11515 2001-09-05    <johan AT FRIJA>
11516
11517         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11518
11519 2001-09-04    <johan AT FRIJA>
11520
11521         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11522
11523
11524 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11525
11526         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11527
11528 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11529
11530         * link/z80/aslink.h: Fixed path for PATH_MAX
11531
11532 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11533
11534         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11535
11536         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11537
11538         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11539
11540         * 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.
11541
11542 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11543
11544         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11545         (genCmp): Fixed up genCmp for the GB with longs.
11546
11547         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11548
11549         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11550
11551         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11552
11553         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11554
11555 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11556
11557         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11558
11559 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11560
11561         * 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.
11562
11563         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11564
11565 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11566
11567         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11568
11569         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11570
11571 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11572
11573   * sim/ucsim/configure:    little improvement of Cygwin-detection
11574   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11575   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11576   * support/regression/tests/bug-221100.c: small changes for mcs51
11577   * support/regression/tests/bug-221168.c: small changes for mcs51
11578   * support/regression/tests/bug-227710.c: small changes for mcs51
11579   * support/regression/tests/staticinit.c: small changes for mcs51
11580   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11581   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11582   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11583
11584 $Revision$