7491832e12858777aa82a9561450f72a2251d71a
[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
30 2006-06-02 Borut Razem <borut.razem AT siol.net>
31
32         * support/regression/ports/pic16/support.c: increase stack size
33           to 255 bytes
34         * support/regression/Makefile.in: sort tests by name so that the
35           resutlts can be compared on different machines / platforms
36
37 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
38
39         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
40         * src/ds390/gen.c (emitLabel): new, added,
41           (genDjnz): fixed stack overflow bug,
42           (throughout): cosmetic changes to sync with mcs51/gen.c,
43           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
44         * src/mcs51/gen.c (genEndFunction): small optimization,
45           (throughout): cosmetic changes to sync with ds390/gen.c
46
47 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
48
49         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
50           (_print_format): fixed printing pointers
51         * src/mcs51/gen.c (emitLabel, movb): new, added,
52           (genAssign): small optimization,
53           (genDjnz): fixed stack overflow bug,
54           (throughout): replaced sprintf with SNPRINTF,
55           replaced mcs51_regWithIdx with REG_WITH_INDEX,
56           replaced emitcode("mov", "b,...") with MOVB(...),
57           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
58           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
59         * src/mcs51/peeph.def: added rules 140 and 264
60         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
61           so they may get optimized into registers
62
63 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
64
65         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
66           immediately when encountered,
67           (printUsage): always use stderr even on windows
68
69 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
70
71         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
72         (processParms): fixed bug #1247551
73         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
74         parseCmdLine, main): print '--version' to stdout,
75         print 'help' to stdout if --help is given,
76         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
77         arguments are given; fixed --help
78
79 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
80
81         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
82         * support/regression/tests/bug-1493710.c: added
83
84 2006-05-27 Borut Razem <borut.razem AT siol.net>
85
86         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
87           static instead auto
88         * support/regression/ports/pic16/support.c: increase stack size
89           from default 64 bytes to 128 bytes
90         * support/regression/tests/staticinit.c,
91           support/regression/tests/float.c: regression tests fully enabled
92           for pic16 port by putting the initialized data arrays into the code
93           section
94         * support/regression/ports/pic16/spec.mk: don't link default libraries.
95           This was changed by mistake in the previous version.
96
97 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
98
99         * src/pic16/gen.c (genFunction, genEndFunction): some
100         beautifications, fixed bug with falsely restoring FSR2 in large
101         stack model, thanks to Beau E. Cox for reporting the bug
102
103 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
104
105         * debugger/mcs51/break.c,
106         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
107           use %p to print pointers, made address variables unsigned
108         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
109         * debugger/mcs51/symtab.c (parseSymbol): must return something
110         * src/mcs51/gen.c (aopForSym): small optimization,
111            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
112           (freeAsmop): added missing break,
113           (aopPut): removed parameter bvolatile, determine it inside the function,
114           (saveRegisters, unsaveRegisters): small optimization,
115           (genIpush): removed pointless check,
116           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
117           replaced sprintf with SNPRINTF,
118           replaced strcpy with strncpyz,
119           updated aopPut calls,
120           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
121         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
122
123 2006-05-24 Borut Razem <borut.razem AT siol.net>
124
125         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
126           modification of test for the pic16 port, put the array to the code
127           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
128
129 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
130
131         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
132         * support/Util/pstdint.h: added
133
134 2006-05-22 Borut Razem <borut.razem AT siol.net>
135
136         * src/regression/Makefile: removed bool2.c test, added -q linker option
137         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
138           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
139           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
140           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
141           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
142           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
143           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
144           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
145           define SUPPORT_BIT_TYPES 0, removed unused bit variables
146
147 2006-05-22 Raphael Neider <rneider AT web.de>
148
149         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
150           bug #1492360 (problematic due to generic pointers, see code)
151
152 2006-05-22 Borut Razem <borut.razem AT siol.net>
153
154         * support/regression/ports/pic16/specs.mk: removed stack size linker
155           directive
156         * support/regression/tests/array.c,
157           support/regression/tests/bitopcse.c,
158           support/regression/tests/bug-908454.c,
159           support/regression/tests/malloc.c: modified for pic16 regression test
160         * support/regression/tests/bitfields.c:
161           pic16 - excluded bitfileds of size > 8
162         * support/regression/tests/bp.c: pic16 - reduced data size
163         * support/regression/tests/bug-221100.c: pic16 - reduced data size
164         * support/regression/tests/bug-460010.c:
165           pic16 - used the absolute address the fits in memory
166         * support/regression/tests/bug-716242.c:
167           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
168         * support/regression/tests/float.c:
169           pic16 - excluded - data size too big
170         * support/regression/tests/onebyte.c:
171           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
172         * support/regression/tests/shifts.c:
173           pic16 - function names probably have to differ in first X characters
174           (gpasm limitation?)
175         * support/regression/tests/staticinit.c:
176           pic16 - excluded some tests due error: no target memory available for
177           section ".idata"
178
179 2006-05-22 Borut Razem <borut.razem AT siol.net>
180
181         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
182           second try. Thanks Stas Sergeev once more.
183
184 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
185
186         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
187           (genLeftShift, genRightShift): fixed bug 1491627
188         * src/hc08/peeph.def (rules 7, 8.x): added
189         * support/regression/tests/shifts.c (ShiftLeftByParam,
190           ShiftRightByParam, testShiftByParam): added to test variable shifting
191
192 2006-05-20 Raphael Neider <rneider AT web.de>
193
194         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
195         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
196           (allocReg): add only new registers to dynAllocRegs,
197           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
198             #1489055, #1445850, and probably #1483693
199
200 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
201
202         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
203         bug in for-loop that didn't emit the last of CONFIG and ID registers
204
205 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
206
207         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
208           with offset
209         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
210           1489016, 1434401 and 1490124
211         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
212           1489016, 1434401 and 1490124
213
214 2006-05-17 Borut Razem <borut.razem AT siol.net>
215
216         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
217           thanks Stas Sergeev
218
219 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
220
221         * device/include/mcs51/P89c51RD2.h,
222         * device/include/mcs51/P89LPC901.h,
223         * device/include/mcs51/P89LPC922.h,
224         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
225
226 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
227
228         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
229         to fix missing stack pragma in compiled binary object file,
230
231 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
232
233         * support/packihx/configure.in,
234         * support/packihx/configure: removed warning, autoconf >= 2.5x can
235         determine sizeof basic types even while cross compiling
236
237 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
238
239         * src/avr/gen.c (aopop),
240         * src/ds390/gen.c (aopOp),
241         * src/hc08/gen.c (aopOp),
242         * src/mcs51/gen.c (aopop),
243         * src/pic16/gen.c (pic16_aopOp),
244         * src/pic/gen.c (aopOp),
245         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
246         if size of operand is smaller than spill location
247
248 2006-05-12 Borut Razem <borut.razem AT siol.net>
249
250         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
251           have to have CR/LF line endings even if they are checked out on *nix
252           or on WIN32 in cygwin binmode
253
254 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
255
256         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
257         * device/include/ds80c390.h: added sfr16 definitions
258         * src/ds390/gen.c,
259         * src/ds390/gen.h,
260         * src/ds390/main.c,
261         * src/ds390/ralloc.c,
262         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
263           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
264           bit returning functions
265         * support/regression/tests/sfr16.c: enabled test on ds390
266
267 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
268
269         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
270         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
271
272 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
273
274         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
275         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
276           (cl_address_space constructor): removed expensive initialization,
277           (cl_address_space::get_cell): extended for late initialization,
278           (cl_address_space::*): use late initialization,
279           (cl_address_decoder::activate): removed expensive initialization,
280           This reduced regression test running time by 25%
281
282 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
283
284         * packihx/,
285         * configure.in,
286         * configure,
287         * sdcc.dsw,
288         * Makefile.bcc,
289         * Makefile.in,
290         * support/packihx/Makefile.in,
291         * support/packihx/clean.mk,
292         * support/packihx/Makefile.bcc,
293         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
294
295 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
296
297         * src/SDCCval.c (valNot): fix for regression test failure
298           of not.c on big endian hosts
299
300 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
301
302         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
303
304 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
305
306         * device/lib/mcs51/Makefile.in: changed string comparison operator
307           to = for POSIX compliance; == is bash extension
308
309 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
310
311         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
312           kosmonaut_pirx
313
314 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
315
316         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
317         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
318         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
319         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
320         bug report #1478657,
321
322 2006-05-05 Borut Razem <borut.razem AT siol.net>
323
324         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
325           making the html
326
327 2006-05-02 Borut Razem <borut.razem AT siol.net>
328
329         * doc/Makefile.in: removed *.ind dependency since there is no rule to
330           create *.ind, which made make to fail if invoked with -j 2
331
332 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
333
334         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
335           Hubert Sack for patch 1479782
336
337 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
338
339         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
340
341 2006-05-01 Raphael Neider <rneider AT web.de>
342
343         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
344           (create_pic): store only prefix-free device name,
345           (init_pic): check for device names with "16" prefix,
346           (list_valid_pics),
347         * src/pic/device.h (struct PIC_device),
348         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
349             stored device name,
350         * device/include/pic/pic12f{635,675,629,683}.h,
351         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
352         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
353         * device/include/pic/pic16f505.h,
354         * device/lib/pic/libdev/pic16f505.c: removed
355         * device/include/pic/pic14devices.txt: added support for pic12f
356             devices, removed unsupported non 16-bit devices
357             [above changes provided by patch from Zik Saleeba]
358         * src/pic/*, src/pic16/*, device/include/pic16/*,
359           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
360
361 2006-05-01 Borut Razem <borut.razem AT siol.net>
362
363         * configure.in, configure, doc/Makefile.in:
364           sync with nightly build makefile - latex, dvipdf and dvips
365           not needed any more
366
367 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
368
369         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
370         in the library source
371
372 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
373
374         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
375
376 2006-04-28 Raphael Neider <rneider AT web.de>
377
378         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
379         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
380           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
381         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
382
383 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
384
385         * device/lib/pic/libdev/Makefile.in,
386         * device/lib/hc08/Makefile.in,
387         * device/lib/gbz80/Makefile.in,
388         * device/lib/z80/Makefile.in,
389         * device/lib/ds390/Makefile.in,
390         * device/lib/ds400/Makefile.in: added srcdir to include search path,
391         thanks to Borut for the bug report
392         * configure.in,
393         * configure: always create doc/Makefile independent from --enable-doc
394         * Makefile.in: always install from directory doc independent from
395         --enable-doc
396         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
397         removed
398         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
399         * doc/Makefile.in: install *.txt if present
400         * device/include/Makefile.in (install): added installation of pic/*.inc
401         and pic/*.txt files again, they were erroneously removed
402
403 2006-04-28 Raphael Neider <rneider AT web.de>
404
405         * src/pic/{gen.c,main.h,pcode.c},
406         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
407             concerning signedness with casts
408
409 2006-04-28 Raphael Neider <rneider AT web.de>
410
411         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
412             definition of an interrupt handler,
413         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
414             interrupt handler stuff from picglue() to separate routine,
415           (picglue): enabled definition of intr handlers in files w/o main()
416
417 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
418
419         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
420           compilation with MSVC 2005 Express Edition (VC8)
421
422 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
423
424         * device/lib/Makefile: fixed build of gbz80 lib
425
426 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
427
428         * support/regression/tests/bug-460010.c,
429         * support/regression/tests/bug-524691.c,
430         * support/regression/tests/bug-716242.c: removed conditional defines
431           that are already in testfwk.h
432
433 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
434
435         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
436           (AccAXRsh1): added, shift right by 1,
437           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
438            AccAXLrl1
439         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
440
441 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
442
443         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
444         remove cast to same type
445         * src/SDCCast.c (decorateType): fix for RFE 1475742,
446         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
447         * as/z80/Makefile,
448         * link/z80/Makefile: removed, they have moved to
449         Makefile.in files
450         * configure,
451         * configure.in: replaced duplicate message about ucsim by missing sdcpp
452         * install-sh: fix bug #1204398 by setting umask 0022
453         * device/lib/Makefile: separate build of z80 and gbz80 lib
454
455 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
456
457         Enabled VPATH feature: changed nearly all Makefiles (149 files).
458         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
459
460         One basic decision: e.g. src/clean.mk includes further files. In order
461         to make this work there are two solutions:
462         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
463           run configure on them. This way they can use
464           'include $(srcdir)/port-clean.mk'
465         - always include clean.mk by the Makefile at the same level. To avoid
466           that `make clean` tries to include and build Makefile.dep the
467           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
468           implemented, because now even `make uninstall` doesn't create
469           Makefile.in. clean.mk could be eliminated by pasting it in
470           Makefile.in.
471
472         * debugger/mcs51/Makefile.in: build own objects from library sources
473         (SLIB, SDCC) in current directory
474
475         * configure, configure.in: renamed --disable-device-lib-build in
476         --disable-device-lib; added --enable-doc, the required tools are
477         searched by configure; added result message; the toolchain for the
478         belonging ports are now only built, if the port is enabled.
479
480         * support/regression/*: all output is written in directory gen, because
481         the fwk and ports directories don't livet in the build tree using vpath
482
483         * doc/sdccman.lyx: renamed --disable-device-lib-build to
484         --disable-device-lib, added --enable-doc, added section VPATH
485
486         * sim/ucsim/configure.in,
487         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
488         z80 are enabled by default
489
490 2006-04-24 Raphael Neider <rneider AT web.de>
491
492         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
493             to config word, "pic14_"-prefixed some extern functions
494           (pic14_emitConfigWord): emit __config directive(s) if assignment to
495             config word has been found
496         * src/pic/device.h: added prototypes
497         * src/pic/pcode.c: added "pic14_"-prefix where needed
498         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
499             fixup
500         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
501             words,
502           (pic14emitRegularMap): ignore config words,
503           (pic14createInterruptVect): moved generating __config directives away
504           (picglue): have __config directives emitted
505
506 2006-04-24 Borut Razem <borut.razem AT siol.net>
507
508         * doc/Makefile: sync with nightly build makefile
509
510 2006-04-24 Raphael Neider <rneider AT web.de>
511
512         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
513             registers that have not been assigned proper liveranges,
514             fixes #1469504 and #1474602,
515           (pCodeRegOptimizeRegUsage): fixed typo in comment
516
517 2006-04-24 Borut Razem <borut.razem AT siol.net>
518
519         * device/examples/main8051.c: deleted - it was removed from CVS
520           24.mar.2000 and after that modified 18.feb.2001, so it reappered
521           after the transition to Subversion
522         * src/SDCCalloc.h: deleted - it was removed  from CVS
523           3.feb.2001 and after that modified 18.feb.2001, so it reappered
524           after the transition to Subversion
525         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
526           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
527           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
528           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
529
530 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
531
532         * as/asx8051.dsp: added mcs51/strcmpi.h
533         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
534         * as/hc08/aslink.h: updated lnksect prototype
535         * as/hc08/asm.h,
536         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
537         * as/hc08/asmain.c,
538         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
539           (newdot): handle A_ABS
540         * as/hc08/asout.c,
541         * as/mcs51/asout.c (outarea): output address
542         * as/hc08/lkaomf51.c,
543         * as/mcs51/lkaomf51.c: disabled unused array UsageType
544         * as/hc08/m08pst.c,
545         * as/mcs51/i51pst.c,
546         * as/z80/z80pst.c: "ABS" is not A_OVR
547         * as/hc08/lkarea.c (newarea): read a_addr,
548           (lnkarea): added codemap array, sort absolute areas to the front,
549            combine all GSINITx/GSFINAL,
550           (find_empty_space, allocate_space): new functions,
551           (lnksect): return next address, handle absolute sections
552         * as/mcs51/lkarea.c (newarea): read a_addr,
553           lnksect2 prototype changed,
554           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
555           (find_empty_space, allocate_space): new, factored out of lnksect2,
556           (lnksect2): return next address, handle absolute sections
557         * as/hc08/lkhead.c,
558         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
559         * as/hc08/lklibr.c (addfile, fndsym),
560         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
561           index out of range and detect both '\' and '/'
562         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
563         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
564           regression tests (ds390 cannot return bool yet)
565         * doc/sdccman.lyx: changed version number, document changed --no-peep,
566           document critical interrupts on z80, document changed SDCC define
567         * src/asm.c (_asxxxx_mapping): fixed .org directive,
568           (_a390_mapping): added .org directive
569         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
570           (genMultOneByte): fixed warnings
571         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
572           ones
573         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
574         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
575           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
576         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
577         * src/pic16/main.c: removed newReg prototype
578         * src/pic16/pcode.c,
579         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
580           warnings
581         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
582           ones
583         * src/pic16/ralloc.c
584         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
585           to fix warnings
586         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
587           from short to PIC_OPTYPE
588         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
589         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
590           optype from short to PIC_OPTYPE
591         * src/port.h: made int_size unsigned to fix warnings
592         * src/SDCC.y: fixed warning on MSVC
593         * src/SDCCicode.c (getArraySizePtr): return unsigned int
594         * src/SDCCopt.c (convertToFcall): fixed warnings
595         * src/SDCCsymt.h: removed double prototype for genSymName
596         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
597           offset int to fix warnings
598
599 2006-04-22 Borut Razem <borut.razem AT siol.net>
600
601         * doc/sdccman.lyx, */Makefile, */Makefile.in:
602           references to CVS replaced with Subversion
603
604 2006-04-21 Borut Razem <borut.razem AT siol.net>
605
606         * doc/sdccman.lyx, */Makefile, */Makefile.in:
607           references to CVS replaced with Subversion
608
609 2006-04-19 Borut Razem <borut.razem AT siol.net>
610
611         * src/version.awk: adapted for svn
612         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
613           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
614           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
615           /binutils-avr/etc/*.vi, *.jin: removed all properties
616           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
617
618 2006-04-19 Borut Razem <borut.razem AT siol.net>
619
620         * CVS to Subversion migration completed
621
622 2006-04-18 Borut Razem <borut.razem AT siol.net>
623
624         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
625           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
626
627 2006-04-17 Borut Razem <borut.razem AT siol.net>
628
629         * device/include/Makefile.in: added pic/*.inc to the installation
630
631 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
632
633         * support/regression/collate-results.py: fixed output in case of
634         a valdiag error
635         * support/regression/generate-cases.py: fixed splitting of pathnames
636         with dots
637         * as/hc08/lklibr.c (addfile),
638         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
639
640 2006-04-11 Raphael Neider <rneider AT web.de>
641
642         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
643         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
644         * src/pic16/pcode.c (assignValnums): fixed #1460578
645
646 2006-04-11 Raphael Neider <rneider AT web.de>
647
648         * device/lib/pic/libdev/*.c,
649         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
650           fixes #1468739, enables compilation in --std-c99 mode
651         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
652
653 2006-04-11 Raphael Neider <rneider AT web.de>
654
655         * src/pic/device.c (find_device): removed debug output
656           (list_valid_pics): enabled verbose listing of supported devices
657         * device/include/stdbool.h: define bool as char for pic14/16 as well
658
659 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
660
661         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
662
663 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
664
665         * .version: bumped version to 2.5.6
666         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
667
668 2006-04-06 Raphael Neider <rneider AT web.de>
669
670         * .version: bumped version to 2.5.6 (pic14 ABI changed)
671         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
672         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
673           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
674             pic14_constructAbsMap
675           (pic14printPublics): declare absolute global symbols as global
676           (pic14createInterruptVect),
677         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
678           (newReg): assume new registers unused, use correct name in
679             hashtable (reg->name instead of name), more debugLog output
680         * src/pic/device.h (PIC_device): added fields for verbose output
681         * src/pic/device.c: moved device definition to pic14devices.txt,
682             added routines for runtime parsing of pic14devices.txt,
683             added support for second config word
684         * src/pic/main.c (_process_pragma): removed #pragma maxram,
685           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
686           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
687           (_pic14_parseOptions): moved pCodeInitRegisters here
688           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
689         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
690           (pCodeInitRegisters): rewrapped comments, perpared new approach to
691             handling the pseudo stack
692         * device/lib/Makefile.in: ignore failures in objects-pic16,
693         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
694         * device/lib/pic/NEWS: document new dependency on picXXX.lib
695         * device/lib/pic/Makefile.subdir,
696         * device/lib/pic16/Makefile.subdir: improved clean rules
697         * device/lib/pic/libdev/: NEW, pic14 device libraries
698         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
699         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
700         * device/include/Makefile.in: create subdir and install pic14 headers
701         * device/include/pic/p16f_common.inc: removed unused declarations
702         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
703             PICs from inc2h.pl v1.6,
704             replaced BIT_AT macros with struct declarations
705         * device/include/pic/pic14devices.txt: definition of supported devices,
706             all above improvements contributed by Zik Saleeba, thanks
707         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
708         * support/scripts/sdcc.nsi: also install pic14 device libraries and
709             headers
710
711 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
712
713         * device/include/mcs51/c8051f410.h: added interrupt numbers,
714         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
715           thanks to Charles Olds
716
717 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
718
719         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
720
721 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
722
723         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
724         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
725         * support/regression/bug1464657.c: added, new test
726
727 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
728
729         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
730           version number
731
732 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
733
734         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
735           --no-peep and --peep-file <file> are used don't use default rules but
736           do use the <file>
737
738 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
739
740         * src/mcs51/gen.c (genCall): fixed bug 1457608
741
742 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
743
744         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
745         changes seem to cause (trigger?) problems with the build system.
746
747 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
748
749         * src/SDCCpeeph.c (operandsLiteral): new, added,
750           (callFuncByName): inserted operandsLiteral
751         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
752
753 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
754
755         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
756         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
757
758 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
759
760         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
761           implemented patch 1120823 Thanks to Willy De la Court (normal
762           interrupts need an interrupt number now if they are made critical),
763           and enabled nesting of critical functions though not for gbz80
764           (genCritical, genEndCritical): added functions
765           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
766         * src/z80/mappings.i: added "ei" to all mappings
767
768 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
769
770         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
771         submitted by the Debian SDCC maintainer Aurelien Jarno:
772         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
773         archive with gcc 4.1 on mips and wrote the patch"
774
775 2006-03-16 Raphael Neider <rneider AT web.de>
776
777         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
778           the left operand is shorter than the result (c* = lit-c* + int),
779           fixes bug #1450796
780         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
781           OP_SYMBOL
782
783 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
784
785         * src/.version: increased version number to 2.5.5
786         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
787         linking is done manually in pic16 port's _linkEdit,
788         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
789         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
790         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
791         allocate asmop as AOP_ACC,
792         (aopForRemat): added parameter 'bool result' in function declaration,
793         (pic16_aopGet): return AOP_ACC when accessing WREG,
794         (pic16_popGetTempReg): minor modification,
795         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
796         'pic16_allocWithIdx',
797         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
798         calling function in absolute addresses,
799         (genAssign): take into account AOP_ACC asmop,
800         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
801         * src/pic16/pcoderegs.c: some debug functions and lines added,
802         * src/pic16/ralloc.c (decodeRegType): added but commented out,
803         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
804         register too,
805         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
806         call to allocReg, not by manually allocating a new one,
807         (pic16_assignRegisters): now before going through the register
808         allocating functions mark all registers as free. This eliminates some
809         side effects resulting from peephole parser done earlier in the backbone
810
811 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
812
813         * src/SDCCicode.c (geniCodeLogic),
814         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
815
816 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
817
818         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
819           (genSend): bugfix, do not allocate and free twice,
820           (shiftRLong): handle partially overlapping aops
821         * support/regression/tests/bitopcse.c: fixed warning redefined idata
822
823 2006-03-08 Borut Razem <borut.razem AT siol.net>
824
825         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
826           for pic16
827
828 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
829
830         * support/regression/tests/bug1409955.c: new, added
831         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
832         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
833           (aopForSym, aopOp): increment asmop.allocated if reused,
834           (freeAsmop): decrement asmop.allocated and check for zero instead of
835           using asmop.freed,
836           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
837           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
838            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
839            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
840            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
841            genSignedRightShift, genRightShift, genDataPointerGet,
842            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
843            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
844             in reverse order from allocation,
845           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
846             added swappedLR to keep track
847         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
848           pdata & code for GCC, z80, gbz80 & hc08
849         * support/regression/tests/zeropad.c: moved defines to testfwk.h
850
851 2006-03-08 Raphael Neider <rneider AT web.de>
852
853         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
854
855 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
856
857         * device/include/mcs51/c8051f410.h: new SiLabs mcu
858         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
859         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
860
861 2006-03-06 Borut Razem <borut.razem AT siol.net>
862
863         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
864           made the linker quiet
865
866 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
867
868         * src/pic16/gen.c (genPcall): fixed bug #1443644
869         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
870         which dumps before the function entry point a data byte which represents
871         the number of the local variables used by the specified function, added
872         'xinst' for initial support for Extended Instruction Support,
873         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
874         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
875         port->fun_prefix anymore (may change later),
876         (genFunction, genEndFunction): do not store/restore local registers for
877         _main (this should take care the --main-return command line option in
878         the future),
879         (genOr): removed some legacy pic-port instructions,
880         * src/pic16/genarith.c (genAddLit): re-enabled old code because
881         performing operations with SFR's causes data to be written more than
882         once to each SFR. Perhaps SFRs should be handled in special cases...
883         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
884         pcode.h
885         * src/pic16/main.c (_process_pragma): stack bound checking did not take
886         into account for stack starting position,
887         (struct OPTIONS pic16_optionsTable): added command line argument
888         --extended or -y for Extended Instruction Support,
889         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
890         (deassignLRs): *** perhaps the most important change, old 'for' code
891         (commented out for reference), didn't account for some registers which
892         were left marked 'not free' after a pointer operation. The change
893         reduces register usage a lot in some cases
894
895 2006-03-04 Borut Razem <borut.razem AT siol.net>
896
897         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
898           _clean
899         * support/regression/tests/bug-524697.c: decreased array size for
900           mcs51 to fit into the internal RAM
901         * support/regression/Makefile.in: a little bit more verbose
902
903 2006-03-03 Borut Razem <borut.razem AT siol.net>
904
905         * support/regression/fwk/lib/testfwk.c,
906           support/regression/fwk/include/testfwk.h: introduced function
907           _prints(), nonrecursive _printn(), call _initEmu() from main()
908         * support/regression/ports/gbz80/support.asm,
909           support/regression/ports/ucz80/support.asm,
910           support/regression/ports/z80/support.asm,
911           support/regression/ports/ds390/support.c,
912           support/regression/ports/hc08/support.c,
913           support/regression/ports/host/support.c,
914           support/regression/ports/mcs51/support.c,
915           support/regression/ports/xa51/support.c: added empty _initEmu()
916           function
917         * support/regression/ports/pic16/gpsim.cmd,
918           support/regression/ports/pic16/spec.mk,
919           support/regression/ports/pic16/support.c,
920           support/regression/Makefile.in: added pic16 regression test
921
922 2006-03-01 Raphael Neider <rneider AT web.de>
923
924         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
925           genConstPointerGet): use safe way of generating MOVFF to cover
926             literals as well as registers, fixes bug #1440527
927         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
928             dereference
929           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
930             more correctly, fixes bug #1232186
931           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
932         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
933             gplink guess the correct processor in more cases, applied patch
934             from Till Riedel attached to and fixing bug #1436552
935
936 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
937
938         * support/regression/tests/array.c: added, contains check for #1434401
939         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
940
941 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
942
943         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
944         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
945         * device/include/mcs51/c8051f326.h,
946         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
947         * device/include/mcs51/c8051f000.h,
948         * device/include/mcs51/c8051f018.h,
949         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
950           PCON_IDLE,PCON_STOP and added sfr16 definitions
951
952 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
953
954         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
955           genGetWord): fixed bug 1409955
956
957 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
958
959         * device/include/hc08/mc68hc908gp32.h,
960         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
961
962 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
963
964         * src/SDCCast.c (constExprValue): return NULL if not a value
965         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
966         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
967         * support/regression/tests/bitfields.c: enabled signed bitfield for all
968
969 2006-02-13 Borut Razem <borut.razem AT siol.net>
970
971         * src/regression/ptrarg.c: added, fails due to bug #1430967
972         * src/regression/Makefile: ptrarg.c added, ...
973
974 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
975
976         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
977         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
978
979 2006-02-11 Borut Razem <borut.razem AT siol.net>
980
981         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
982           print "Processor: xxx" message to stdout only if --verbose
983
984 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
985
986         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
987         * support/regression/tests/bug1426356.c: added
988         * support/regression/tests/bitfields.c: removed 2 tests
989
990 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
991
992         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
993         * device/include/mcs51/c8051f330.h,
994         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
995           PCON_IDLE,PCON_STOP and added sfr16 definitions
996         * device/lib/_divsint.c,
997         * device/lib/_divuint.c,
998         * device/lib/_divulong.c,
999         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1000           register bank bug for small stackauto
1001
1002 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1003
1004         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1005
1006 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1007
1008         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1009         * all.dsp: corrected several bin paths
1010         * device/include/mcs51/c8051f120.h,
1011         * device/include/mcs51/c8051f300.h,
1012         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1013           to PCON_IDLE,PCON_STOP
1014         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1015         * device/lib/printf_large.c (output_float): fixed bug 1388703
1016         * support/regression/tests/bug1057979.c: added test for bug 1388703
1017
1018 2006-02-08 Raphael Neider <rneider AT web.de>
1019
1020         * src/pic/pcode.c (pciTRIS): fixed typo,
1021           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1022           (LinkFlow): fixed handling of flows that end in a call,
1023           (ReuseReg): perform safety check earlier
1024         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1025             to work with flows at the beginning of a pBlock,
1026             fixes #1426557 (Symbol not previously defined),
1027           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1028             usage information
1029           (RemoveUnusedRegisters): update register usage info
1030         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1031             created, reuse existing ones instead
1032         * src/pic/gen.c (genPcall): fixed #1424719
1033
1034 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1035
1036         * link/z80/lkmain.c,
1037         * link/z80/lklex.c,
1038         * link/z80/lkdata.c,
1039         * link/z80/aslink.h: fixed build on current cygwin:
1040         replaced getline() by lk_getline()
1041
1042 2006-02-01 Borut Razem <borut.razem AT siol.net>
1043
1044         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1045           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1046           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1047           src/regression/bool1.c, src/regression/bool2.c,
1048           src/regression/bool3.c, src/regression/call1.c,
1049           src/regression/compare.c, src/regression/compare10.c,
1050           src/regression/compare2.c, src/regression/compare3.c,
1051           src/regression/compare4.c, src/regression/compare5.c,
1052           src/regression/compare6.c, src/regression/compare7.c,
1053           src/regression/compare8.c, src/regression/compare9.c,
1054           src/regression/configword.c, src/regression/for.c,
1055           src/regression/inline.c, src/regression/mult1.c,
1056           src/regression/nestfor.c, src/regression/or1.c,
1057           src/regression/pointer1.c, src/regression/ptrfunc.c,
1058           src/regression/rotate1.c, src/regression/rotate2.c,
1059           src/regression/rotate3.c, src/regression/rotate4.c,
1060           src/regression/rotate5.c, src/regression/rotate6.c,
1061           src/regression/rotate7.c, src/regression/string1.c,
1062           src/regression/struct1.c, src/regression/sub.c,
1063           src/regression/sub2.c, src/regression/switch1.c,
1064           src/regression/while.c, src/regression/xor.c,
1065           src/regression/create_stc, src/regression/simulate,
1066           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1067           regression tests
1068         * src/regression/gpsim_assert.h: added
1069
1070 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1071
1072         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1073         ((void (code *) (void)) 0) ();
1074         * as/hc08/aslex.c,
1075         * as/hc08/aslink.h,
1076         * as/hc08/asm.h,
1077         * as/hc08/asmain.c,
1078         * as/hc08/lkdata.c,
1079         * as/hc08/lklex.c,
1080         * as/hc08/lkmain.c,
1081         * as/mcs51/aslex.c,
1082         * as/mcs51/aslink.h,
1083         * as/mcs51/asm.h,
1084         * as/mcs51/asmain.c,
1085         * as/mcs51/lkdata.c,
1086         * as/mcs51/lklex.c,
1087         * as/mcs51/lkmain.c,
1088         * as/z80/aslex.c,
1089         * as/z80/asm.h,
1090         * as/z80/asmain.c: fixed build on current cygwin:
1091         replaced getline() by as_getline()
1092
1093 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1094
1095         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1096         declarator in the symbol chain
1097         * src/SDCCsymt.h,
1098         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1099         parameter list for function pointers
1100         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1101         * support/regression/tests/bug-716242.c: added
1102
1103 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1104
1105         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1106         offset if possible
1107         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1108
1109 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1110
1111         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1112         inifinitely recurseable, added static
1113         * support/regression/tests/bug-1408066.c: added
1114
1115 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1116
1117         * src/SDCCicode.h,
1118         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1119         renamed, added possibility to create "postLoopLbl"-labels
1120         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1121         newiTempLoopHeaderLabel
1122         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1123         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1124         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1125         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1126         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1127         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1128         (basicInduction): fixed bug #136564, made static,
1129         (loopInduction): changed parameter of basicInduction, made static,
1130         (addPostLoopBlock): added
1131         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1132         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1133         findLoopEndSeq
1134         * support/regression/tests/bug-136564.c: added
1135         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1136         --std-sdcc99 to LIBSDCCFLAGS
1137
1138 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1139
1140         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1141         while loop
1142         * support/regression/tests/bug-1406131.c: added
1143
1144 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1145
1146         * src/SDCCast.c (decorateType): fix promotion of unary minus
1147         * src/SDCCsymt.c (computeType): beautified
1148         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1149         (valUnaryPM, valComplement): fix sign and promotion,
1150         (valNot): ANSI: result type is int (SDCC: unsigned char)
1151         * support/regression/tests/uminus.c: speedup by removing superflous
1152         test case 'int'
1153         * support/regression/tests/onebyte.c: added promotion and signedness
1154         tests for unary minus
1155         * support/regressions/tests/bug-477927.c: disable warning about
1156         uninitialized variables
1157         * support/regression/tests/not.c: added
1158
1159 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1160
1161         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1162         * src/mcs51/gen.c (gen51Code): show final register usage after
1163         fillGaps in asm with --i-code-in-asm
1164         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1165         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1166         incUsed, rliveClear, adjustIChain): made static,
1167         (setFromRange): excluded because it's unused,
1168         (findPrevUseSym, markWholeLoop): added,
1169         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1170         through all branches of predecessors enables sdcc to emit the warning
1171         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1172         (rlivePoint): made static, added parameter emitWarnings which is only
1173         true during the first run out of two,
1174         (findRecursiveSucc, findRecursivePred): removed,
1175         (computeLiveRanges): made static, added parameter emitWarnings,
1176         (dumpIcRlive): added for debugging only
1177         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1178         removed prototype of setFromRange()
1179         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1180         in call of computeLiveRanges()
1181         * support/regression/tests/bug-895992.c: added
1182         * support/regression/tests/bug-971834.c: added
1183         * support/valdiag/tests/bug-895992.c: added
1184         * support/valdiag/tests/bug-971834.c: added
1185
1186 2005-12-18 Raphael Neider <rneider AT web.de>
1187
1188         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1189           (genUnpackBits): improved code for direct operands,
1190           (genPackBits): improved code for literal assignment to bitfields
1191             and for direct destination operands (no FSR indirection),
1192             prevented redundant AND, fixes #1362800,
1193           (AccLsh): added parameter to disable masking of the result
1194         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1195           skip instructions with side-effects (like incfsz),
1196           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1197         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1198         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1199           fixes #1375263
1200
1201 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1202
1203         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1204         volatile variables as spill location
1205
1206 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1207
1208         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1209         replacing literals
1210         * support/regression/tests/bug-1376320.c: added
1211
1212 2005-12-08 Raphael Neider <rneider AT web.de>
1213
1214         * src/pic/device.c: renamed is_shared to pic14_is_shared
1215         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1216         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1217           (is_valid_identifier): added for above workaround
1218
1219 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1220
1221         * device/lib/Makefile.in: fixed to enable port-specific-objects
1222         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1223           char, thanks Hubert Sack
1224         * doc/sdccman.lyx: documented --xstack-loc,
1225           elaborated a bit more on interrupts and pitfalls,
1226           removed "setjmp/longjmp unsupported",
1227           documented some unsupported C99 features
1228         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1229         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1230           if, thanks Hubert Sack
1231         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1232         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1233           make make_library
1234         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1235           regression tests can report resource usage (rfe 700441)
1236         * support/regression/collate-results.py: report resource usage
1237         * support/regression/ports/ds390/spec.mk,
1238         * support/regression/ports/hc08/spec.mk,
1239         * support/regression/ports/mcs51/spec.mk,
1240         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1241         * support/regression/ports/ds390/uCsim.cmd,
1242         * support/regression/ports/hc08/uCsim.cmd,
1243         * support/regression/ports/mcs51/uCsim.cmd,
1244         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1245         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1246           library, use the default one
1247         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1248           building the library
1249
1250 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1251
1252         * config.dsp: added dependency on .version and configure_vc.awk
1253         * device/include/setjmp.h: updated for --stack-auto and --xstack
1254         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1255         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1256         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1257         * device/lib/libsdcc.lib: added _setjmp
1258         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1259           (decorateType): fixed bug 1372851,
1260           (optimizeGetHbit): fixed warning
1261         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1262           array initialisation
1263         * support/regression/tests/bug1057979.c: added test for bug 1358192
1264         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1265
1266 2005-12-03 Borut Razem <borut.razem AT siol.net>
1267
1268         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1269           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1270
1271 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1272
1273         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1274         createIval): implement symbol independant "flexible array member",
1275         (createIvalCharPtr): implemented flexible array initialisation with a
1276         string
1277         * src/SDCCsymt.c (copyStruct): removed,
1278         (getSize): fixed misleading comment,
1279         (getAllocSize): removed, the additional allocation size is now in
1280         sym->flexArrayLength,
1281         (checkStructFlexArray): new, syntax checks for flexible array members,
1282         (compStructSize): added syntax checks for "flexible array members"
1283         (copyStruct): removed,
1284         (copyLinkChain): removed inefficient fix for bug 770487
1285         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1286         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1287         symbol->flexArrayLength
1288         * src/SDCCerr.c,
1289         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1290         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1291         * support/regression/tests/structflexarray.c: added
1292         * support/valdiag/tests/structflexiblearray.c: added
1293
1294 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1295
1296         * src/SDCCast.c (decorateType): fixed bug 1368489
1297         * support/Util/SDCCerr.c,
1298         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1299
1300 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1301
1302         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1303           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1304
1305 2005-11-27 Borut Razem <borut.razem AT siol.net>
1306
1307         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1308           support/cpp2/mkdeps.h: added command line option
1309           -obj-ext=<extension> to SDCPP to define object file externion, used
1310           for generation of make dependencies (-M)
1311         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1312
1313 2005-11-26 Borut Razem <borut.razem AT siol.net>
1314
1315         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1316           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1317           added pic and pic16 libraries
1318
1319 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1320
1321         * device/include/float.h: Corrected typo in prototype of __fsgt
1322
1323 2005-11-25 Borut Razem <borut.razem AT siol.net>
1324
1325         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1326           added creation of model-mcs51-stack-auto libraries
1327
1328 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1329
1330         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1331         and fields-list too
1332         * src/SDCCast.c (createIvalArray): removed obsolete comment
1333
1334 2005-11-24 Borut Razem <borut.razem AT siol.net>
1335
1336         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1337           added missing device/lib/mcs51/crt*.asm sources
1338
1339 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1340
1341         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1342
1343 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1344
1345         * device/lib/_fs2schar.c,
1346         * device/lib/_fs2sint.c,
1347         * device/lib/_fs2slong.c: optimized inline asm
1348
1349 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1350
1351         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1352           Better handling of floats between -1.0 and 0.0.
1353
1354 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1355
1356         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1357           (the missing "if"s prohibited removal of redundant labels)
1358
1359 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1360
1361         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1362           Properly convert floats between -1.0 and 0.0 to long, int, and char
1363           types (max integer value of negative floats tends to zero).
1364         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1365           Removed changes made so to work properly with floats between
1366           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1367           and _fs2char.c
1368
1369 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1370
1371         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1372         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1373         (genCast) cosmetic change
1374         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1375         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1376         from mcs51
1377         * support/regression/tests/bitfields (testSignedBitfields): added
1378
1379 2005-11-18 Borut Razem <borut.razem AT siol.net>
1380
1381         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1382         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1383           introduced SILENT option to make building of pic16 libraries less
1384
1385 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1386
1387         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1388           Now they work properly with floats between -1.0 and 0.0
1389         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1390
1391 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1392
1393         * src/SDCCicode.c (printOperand): added missing else
1394
1395 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1396
1397         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1398         reformatted for better readability
1399         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1400         signed bitfields
1401
1402 2005-11-17 Borut Razem <borut.razem AT siol.net>
1403
1404         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1405           introduced SILENT option to make building of pic16 libraries less
1406           verbose - used for nightly snapshot build
1407         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1408           available on Win32 platforms.
1409         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1410           medium, large, pic and pic16
1411
1412 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1413
1414         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1415           printf("%f"...) sets fraction to zero.
1416
1417 2005-11-16 Raphael Neider <rneider AT web.de>
1418
1419         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1420           fixes #1357221
1421         * src/pic/gen.c (genIfx): implemented for CARRY bit
1422         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1423           to generic pointers, fixes #1357332,
1424           (pic16_movLit2f): NEW,
1425           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1426
1427 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1428
1429         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1430
1431 2005-11-11 Raphael Neider <rneider AT web.de>
1432
1433         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1434         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1435           compute pointer's type from operand,
1436           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1437           improved single bit reads, fixes bug #1353379
1438
1439 2005-11-09 Borut Razem <borut.razem AT siol.net>
1440
1441         * support/scripts/sdcc.nsi: added lib/pic to the package
1442
1443 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1444
1445         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1446
1447 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1448
1449         * support/regression/tests/bug1348008.c: added
1450         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1451         * support/regression/tests/bug1337835.c: updated comment
1452
1453 2005-11-06 Borut Razem <borut.razem AT siol.net>
1454
1455         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1456           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1457           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1458           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1459           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1460           dynamic construction of cl_error_class and derivates - 2.nd try
1461
1462 2005-11-05 Borut Razem <borut.razem AT siol.net>
1463
1464         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1465           bug, which caused Bus Errors on sparc solaris
1466
1467 2005-11-04 Borut Razem <borut.razem AT siol.net>
1468
1469         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1470           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1471           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1472           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1473           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1474           and derivates to resolve the initialization problem on OSX
1475
1476 2005-11-02 Borut Razem <borut.razem AT siol.net>
1477
1478         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1479           corrected typo - #include <winsock2.h>
1480
1481 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1482
1483         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1484           (_asxxxx_mapping): added org directive for future enhancements
1485
1486 2005-11-01 Borut Razem <borut.razem AT siol.net>
1487
1488         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1489           enabled sockets on WIN32
1490         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1491
1492 2005-10-31 Borut Razem <borut.razem AT siol.net>
1493
1494         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1495           WIN32 backslash path delimiters should be escaped when used in C strings
1496         * support/regression/tests/bitfields.c: exclude failing assertions for
1497           __CYGWIN32__ and __MINGW32__ hosts
1498
1499 2005-10-30 Borut Razem <borut.razem AT siol.net>
1500
1501         * src/SDCCutil.c: corrected double comparison typo
1502
1503 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1504
1505         * device/lib/medium/Makefile: added for new memory model medium
1506         * device/include/asm/mcs51/features.h: updated for medium/pdata
1507         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1508           added Multiply & Accumulate sbit's and MAC0_PAGE define
1509         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1510         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1511         * device/lib/_mullong.c: update for medium model
1512         * device/lib/incl.mk: added medium model
1513         * doc/sdccman.lyx: documented medium model
1514         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1515         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1516         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1517         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1518           (allocParms): set SCLS and OCLS to pdata for medium model
1519         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1520           for pdata,
1521           (powof2): return <0 if not power of 2
1522         * src/avr/gen.c (genBitWise): use updated powof2
1523         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1524           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1525           (shiftLLeftOrResult): use B if necessary
1526         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1527         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1528         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1529         * support/regression/Makefile.in: added test-mcs51-medium
1530         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1531
1532 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1533
1534         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1535         specifier unsigned
1536         * device/lib/time.c (mktime): fixed bug 1334315
1537
1538 2005-10-28 Raphael Neider <rneider AT web.de>
1539
1540         * device/include/pic/p16f_common.inc: added common declarations
1541         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1542
1543 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1544
1545         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1546           (aopPutUsesAcc): added to predict accumulator use,
1547           (assignResultValue): save acc if necessary,
1548           (genMinusDec): store result if indirectly addressed,
1549           (genDivOneByte):  save acc if necessary,
1550           (movLeft2Result): bugfix if left already in acc,
1551           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1552             attention to accumulator use (esp. pdata),
1553           (genReceive): receive pdata correctly
1554         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1555         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1556
1557 2005-10-27 Raphael Neider <rneider AT web.de>
1558
1559         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1560
1561 2005-10-27 Raphael Neider <rneider AT web.de>
1562
1563         * .version: changed version to 2.5.4
1564         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1565         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1566           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1567             arithmetics support routines
1568         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1569         * device/lib/Makefile.in: also create installdir for pic
1570
1571         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1572           pic14 port as well
1573         * src/pic/device.c (dump_sfr): rewritten to delegate register
1574           placement to the linker (use `extern sym' rather than sym EQU addr),
1575           (validAddress): fixed to check last specified address
1576         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1577           (popGetLit): truncate literal value to 8 bit,
1578           (popGet): moved assert to more appropriate place
1579           (popGetExternal): create pCode operand from and mark the according
1580             symbol as being `extern'
1581           (popGetAddr): added sanity check on immediate's offset, provide
1582             GPOINTER tag on demand
1583           (aopPut): fixed for immediates,
1584           (mov2w_op): move operand's address or contents to WREG (depending on
1585             operand type), safer variant of mov2w,
1586           (movwf,call_libraryfunc): NEW, handy abbreviations,
1587           (get_argument_pcop,get_return_val_pcop,pass_argument,
1588           get_returnvalue): interface for accessing function parameters and
1589             return values,
1590           (assignResultValuei,genRet): use new parameter/return value interface
1591           (pic14_getDataSize): back to old version handling generic pointers,
1592           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1593             provided implementation and/or fixed old one,
1594           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1595             calls, removed legacy 8051 reference code
1596           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1597           (loadSignToC): NEW, move the operands sign bit to CARRY,
1598           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1599             genRightShiftSigned, accepts negative shift counts,
1600           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1601           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1602             generic pointers, __data pointers and __code pointers,
1603           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1604             and signed bitfields, limit bitfields to 8 bit,
1605           (genDataPointerGet): fixed number of bytes read,
1606           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1607           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1608             pointers to constant data are no longer assumed to point to __code
1609             space, removed invalid pointer types,
1610           (bitpatternFromVal): retrieve the PICs representation of an integer
1611             or float literal,
1612           (genDataPointerSet): fixed assigning to po_immediate operands,
1613           (genGenPointerSet): implemented as library call,
1614           (genIfx): fixed incorrect condition,
1615           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1616             provide GPOINTER tag according to destination's storage class,
1617           (genCast): added code to handle casting to generic pointers, added
1618             sign-/zero extension of the result
1619           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1620         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1621         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1622           extend the result
1623         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1624           address/register resides in the shared banks
1625           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1626             put all variables into separate sections (have the linker arrange
1627             them)
1628           (picglue): put init code and interrupt handlers in separate sections
1629         * src/pic/main.c: added port specific options table, modified to PORT
1630           structure to make GPOINTERs 3 byte, added pic14_options
1631           (_pic14_do_link): private linking routine (update paths to libraries,
1632             add libsdcc.lib by default)
1633         * src/pic/main.h: declare pic14_options
1634         * src/pic/pcode.c: fixed instructions i/o relations,
1635           (RegCond): reverted to correct version,
1636           (newpCodeOpLit): truncate literals to 8 bit,
1637           (genericPrint): added debug output,
1638           (getRegFromInstruction): fixed for various operand types, simplified
1639           (BuildFlow): fixed broken handling of isntructions with labels
1640           (LinkFlow): start at last instruction in flow (skip trailing comments),
1641             pass the flow on to the next instruction after CALL
1642           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1643           (insertPCodeInstruction): fixed inserting after a skip instruction,
1644           (DoBankSelect): fixed for labeled instructions
1645           (OptimizepBlock): honor --nopeep switch
1646           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1647         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1648         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1649           (pCodeOptime2pCodes): allow disabling this optimization via
1650             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1651             but is still buggy), started implementation of a dataflow based
1652             pCode optimization (CSE + dead code elimination)
1653           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1654         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1655           names are independant of the stack location and therefore portable across
1656           devices
1657
1658 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1659
1660         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1661           (selectSpil): fixed bug 1337835 by not spilling bit variables
1662         * support/regression/tests/bug1337835.c: added test for this bug
1663         * src/mcs51/peeph.def: restart after rule 3.c,
1664           addded rules 263.x to optimize loading constants
1665
1666 2005-10-26 Raphael Neider <rneider AT web.de>
1667
1668         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1669         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1670           (genAssign): emit warning when casting literals to generic pointer
1671             type, also applies when taking the address of a fixed variable,
1672           (genCast): improved casting to generic pointers
1673         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1674           extern variables, added verbose error message
1675         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1676
1677 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1678
1679         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1680         carry must be complemented too
1681         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1682         could be emitted by genMinus
1683         * src/SDCCval.c (constVal): fixed bug 1305065
1684
1685 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1686
1687         * src/SDCCast.c (addCast): added promotion for bit variables
1688         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1689         promotion casts + optimisation
1690         (optimizeGetWord): fix warning 'i' might be used uninitialized
1691         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1692         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1693
1694 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1695
1696         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1697         all chars are promoted to int; promotion should be handled in SDCCast.c
1698
1699 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1700
1701         * device/lib/_strcmp.c: Fixed bug 1326457
1702
1703 2005-10-11 Raphael Neider <rneider AT web.de>
1704
1705         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1706         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1707
1708 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1709
1710         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1711         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1712
1713 2005-10-04 Raphael Neider <rneider AT web.de>
1714
1715         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1716           device/lib/pic16/pics.all: added pic18f1320
1717         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1718
1719 2005-09-30 Raphael Neider <rneider AT web.de>
1720
1721         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1722         * src/pic16/devices.inc: NEW, provides device descriptions
1723         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1724
1725 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1726
1727         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1728           GETHBIT
1729
1730 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1731
1732         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1733           documented Any Order Bit, Higher Order Byte and Higher Order Word
1734         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1735         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1736           (optimizeGetAbit): new, to get any bit, not only the high bit,
1737           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1738           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1739           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1740           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1741             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1742             GETABIT, GETBYTE, GETWORD: decorate them,
1743           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1744           (ast_print): added GETABIT, GETBYTE, GETWORD
1745         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1746         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1747           (geniCodeBinary): new generic binary icode,
1748           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1749         * src/port.h: updated comment for PORT.hasExtBitOp
1750         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1751           (genGetByte): new, to get a single byte,
1752           (genGetWord): new, to get a word from a long,
1753           (gen51Code): added GETABIT, GETBYTE, GETWORD
1754         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1755
1756 2005-09-23 Raphael Neider <rneider AT web.de>
1757
1758         * configure.in, configure: have device/lib/pic configured
1759         * device/lib/Makefile.in: added model-pic14
1760         * device/lib/clean.mk: added pic/ to clean rule
1761         * device/lib/pic: added rudimentary pic14 library providing support
1762           functions for multiplication/division/generic pointer access
1763         * src/SDCCopt.c (convilong): mark support functions as extern
1764           for pic14 port as well
1765         * src/pic/gen.c (genMult): added assertions,
1766           (genpic14Code): emit warning on unhandled iCodes
1767         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1768         * src/pic/pcode.c (pCodeOpCopy),
1769         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1770           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1771           SFR_REGISTER}), made safe for future extensions
1772         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1773           instructions even if preceeded by SKIP instructions (also remove
1774           them); removed unused code
1775         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1776           prevents leaving parts of the structure uninitialized after copying
1777
1778 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1779
1780         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1781           ago by me
1782         * support/regression/tests/addsub.c: added test for the bug
1783
1784 2005-09-21 Raphael Neider <rneider AT web.de>
1785
1786         * device/include/pic16/pic18f1220.h,
1787           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1788         * device/lib/pic16/Makefile.rules: added missing opening paren
1789         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1790           are provided in genutils.c,
1791           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1792           operand/result sizes,
1793           (genCmp): assert on NULL pointers first, then check deref'ed values
1794         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1795           result size
1796
1797 2005-09-18 Raphael Neider <rneider AT web.de>
1798
1799         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1800           as these are now unused,
1801           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1802         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1803           local, avoids uninitialized pointer dereference on r->name
1804         * src/pic16/ralloc.c (newReg): fixed indentation
1805
1806 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1807
1808         * src/SDCCval.c (constVal): fixed bug 730366
1809         * support/Util/SDCCerr.c,
1810         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1811
1812 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1813
1814         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1815
1816 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1817
1818         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1819
1820 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1821
1822         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1823           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1824         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1825           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1826         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1827         * packihx/packihx.c (hexDigit): made c unsigned char
1828         * as/mcs51/lklibr.c (fndsym),
1829         * link/z80/lkgb.c (gb),
1830         * link/z80/lklibr.c (fndsym),
1831         * link/z80/lkrloc.c (relr),
1832         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1833         * src/SDCC.lex (checkCurrFile, process_pragma),
1834         * src/SDCCglue.c (spacesToUnderscores),
1835         * src/SDCCmain.c (setParseWithComma, processFile),
1836         * src/asm.c (tvsprintf, printCLine),
1837         * src/avr/gen.c (emitcode, aopPut),
1838         * src/ds390/gen.c (emitcode),
1839         * src/hc08/gen.c (emitcode, emitinline),
1840         * src/mcs51/gen.c (emitcode, genInline),
1841         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1842           tokenizeLineNode),
1843         * src/pic/ralloc.c (debugLog),
1844         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1845           tokenizeLineNode),
1846         * src/pic16/ralloc.c (debugLog),
1847         * src/z80/main.c (_process_pragma):
1848            made all ctype.h function calls safe
1849         * src/SDCCopt.c: include math.h for fabs
1850         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1851           and used them throughout the code to make ctype.h function calls safe
1852         * src/ds390/main.c (asmLineNodeFromLineNode),
1853         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1854         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1855            unsigned char*
1856         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1857           (newpCodeAsmDir): made ctype.h function calls safe
1858         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1859           pic16_emitcode):  made lbp unsigned char*
1860         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1861           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1862         * src/xa51/gen.c (emitcode),
1863         * src/z80/gen.c (_emit2): made lbp unsigned char*
1864         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1865            char*
1866
1867 2005-09-05 Raphael Neider <rneider AT web.de>
1868
1869         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1870           access bank splitpoint
1871
1872 2005-09-05 Raphael Neider <rneider AT web.de>
1873
1874         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1875
1876 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1877
1878         * .version: changed to version 2.5.3
1879         * doc/sdccman.lyx: changed version to 2.5.3,
1880           documented --codeseg and --constseg and pragma codeseg and constseg,
1881           documented bit parameters (reentrant) and bit returning
1882         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1883            currFunc->recvSize, but is this ok for all ports?
1884           (ast2iCode): result of ~ on unsigned char must be cast to int for
1885            bool to work
1886         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1887           function pointers in bit space
1888         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1889           (processFuncArgs): call port.reg_parm() with reentrancy info
1890         * src/port.h,
1891         * src/avr/main.c,
1892         * src/ds390/main.c,
1893         * src/hc08/main.c,
1894         * src/pic/main.c,
1895         * src/pic16/main.c,
1896         * src/xa51/main.c,
1897         * src/z80/main.c: port.reg_parm prototype extended with
1898           "bool reentrant" parameter
1899         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1900           options.stackAuto for allocating bit register parameters
1901         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1902           (genSend): set BitBankUsed if it is,
1903           (selectRegBank): factored out of genCall for use in genPcall,
1904           (genCall): removed redundant dtype assignmen, use selectRegBank,
1905           (genPcall): handle returning in Carry properly, save in F0 if needed,
1906           (genReceive): handle bit register parameters
1907         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1908           (mcs51_assignRegisters): enable bit registers for all reentrant
1909            functions and don't set BitBankUsed unconditionally
1910         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1911         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1912         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1913
1914 2005-08-27 Borut Razem <borut.razem AT siol.net>
1915
1916         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1917         ppc-osx (Darwin) does not support -u option. It seems that it is
1918         supported only on Linux - GNU cp
1919
1920 2005-08-25 Borut Razem <borut.razem AT siol.net>
1921
1922         * sim/ucsim/gui.src/serio.src/Makefile.in,
1923           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1924           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1925           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1926           install and strip, since the strip at /usr/ccs/bin should be used
1927           on solaris
1928
1929 2005-08-24 Borut Razem <borut.razem AT siol.net>
1930
1931         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1932
1933 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1934
1935         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1936         ffffffffu
1937
1938 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1939
1940         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1941         * as/mcs51/lkmain.c (link_main): fixed warning
1942         * device/include/stdbool.h: ds390 has no advanced bit support yet
1943         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1944         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1945         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1946           and updated their macros
1947         * src/SDCCval.c (constVal): updated comment for renamed b_long
1948
1949 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1950
1951         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1952         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1953           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1954           (oprio): set priority for '['
1955         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1956            and adb_24_bit
1957         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1958         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1959         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1960         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1961           added overlayable BIT_BANK area
1962         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1963           (summary2): explain 'T' in legenda
1964         * as/mcs51/lkrloc.c: replaced old K&R style,
1965           (relr): added R_BIT processing,
1966           (errmsg): added "Bit-addressable relocation error",
1967           (adb_bit): added for converting from byte- to bit-addressable space,
1968           (adb_24_bit): added for converting from byte- to bit-addressable space
1969         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1970            used in reentrant functions now even as return value
1971         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1972         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1973           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1974         * src/SDCCglobl.h: added indicator BitBankUsed
1975         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1976            the bit registers b0-b7
1977         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1978           (geniCodeCast): fixed bug 1263853,
1979           (geniCodeLogicAndOr): put result in bool or char,
1980           (geniCodeReceive): added parameter func for accessing the return type,
1981           (geniCodeFunctionBody): pass func to geniCodeReceive
1982         * src/SDCCmain.c: added indicator BitBankUsed
1983         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1984         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1985           (checkSClass): don't put automatic bool/bit on stack,
1986           (checkFunction): removed check on function cannot return bit
1987         * src/SDCCsymt.h: added newBoolLink prototype
1988         * src/mcs51/gen.c (rb1regs): added bit registers,
1989           (movc): created for assigning to carry,
1990           (pushReg, popReg): created for pushing registers,
1991           (sameRegs): check both AOP_REG and AOP_CRY types,
1992           (aopOp): handle bit registers,
1993           (aopPut): optimization no self-assign,
1994           (saveRegisters): push reg->base (bits) only once for bit registers,
1995            and use pushReg,
1996           (unsaveRegisters): pop reg->base only once and use popReg,
1997           (assignResultValue): added parameter func and return in carry for bits,
1998           (genIpush): optimization no reload in A if not changed,
1999           (genSend): bit parameters in reentrant functions are passed in bit
2000            registers by first assigning to bits in B, then save registers and
2001            copy B to bits,
2002           (genCall): handle returning in Carry properly, save it in F0 if needed,
2003           (genPcall): updated assignResultValue call, this is not safe yet for bit
2004            returning function !!!
2005           (genFunction): don't generate equ's for bit registers and use pushReg,
2006           (genEndFunction): take care of bit returning functions and use popReg,
2007           (genRet): return bit in Carry,
2008           (genIfx): optimize bit registers and other directly addressable bits,
2009           (genReceive): updated assignResultValue call
2010         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2011           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2012            registers when using stack-auto
2013         * src/mcs51/ralloc.c (_G): added allBitregs,
2014           (regs8051): added the bit registers,
2015           (createStackSpil): use macro IS_BIT,
2016           (getRegBit): added to allocate a bit register, else spill,
2017           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2018           (updateRegUsage): factored out to ease stepping while debugging,
2019           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2020            also allocate bit registers,
2021           (fillGaps): handle bit registers,
2022           (findAllBitregs): added to create bit vector with all bit registers,
2023           (mcs51_allBitregs): returns this bit vector,
2024           (mcs51_assignRegisters): when using stack-auto use bit registers for
2025            passing parameters and creating local variables
2026         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2027
2028 2005-08-22 Borut Razem <borut.razem AT siol.net>
2029
2030         * device/lib/Makefile.in: replaced find option -or with -o
2031           to make it run on solaris
2032
2033 2005-08-22 Raphael Neider <rneider AT web.de>
2034
2035         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2036           fixes #1265442 (crash on Solaris)
2037
2038 2005-08-20 Borut Razem <borut.razem AT siol.net>
2039
2040         * configure, configure.in: added tests for libsocket and libnsl libraries,
2041           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2042           from support/regression/Makefile.in
2043         * support/regression/Makefile.in: added
2044         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2045         * sim/ucsim/libtool: regenerated on sparc-solaris
2046         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2047           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2048           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2049           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2050           sparc-solaris, which doesn't use GNU ld linker
2051         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2052         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2053
2054 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2055
2056         * src/mcs51/peeph.def: updated comments
2057
2058 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2059
2060         * device/lib/_gptrget.c,
2061         * device/lib/_gptrput.c: slightly shorter
2062         * doc/sdccman.lyx: incremented version
2063         * src/mcs51/peeph.def: moved peephole comments to the line of first
2064           change to better keep line correlation, reanimated 186.e
2065         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2066
2067 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2068
2069         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2070           David Saxton with quotes around file name.
2071
2072 2005-08-15 Borut Razem <borut.razem AT siol.net>
2073
2074         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2075           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2076           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2077           make tests run on x86_64 platform
2078
2079 2005-08-13 Raphael Neider <rneider AT web.de>
2080
2081         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2082           as it might be executed DURING a build (parallel make is wonderful)
2083
2084 2005-08-13 Raphael Neider <rneider AT web.de>
2085
2086         * device/lib/Makefile.in (port-specific-objects-pic16):
2087           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2088         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2089           dependency
2090         * device/lib/pic16/Makefile.rules: build subdirs before creating
2091           the library, removed builddir rule, create $(builddir) early in
2092           recurse rule, use empty recurse rule for leaf directories
2093         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2094           mkdir errors (race condition), removed duplicate suffix "hex"
2095           from clean rules
2096         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2097         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2098           prevents mkdir -p from aborting on Alpha
2099
2100 2005-08-12 Raphael Neider <rneider AT web.de>
2101
2102         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2103           db-statements in order to allow for arrays of pointers in code
2104           sections to be placed without interspersed 0-padding, fixes
2105           bug #1256215
2106         * (emitStatistics): fixed division by zero for pic18f1220
2107         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2108           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2109         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2110         * (pic16_pCodeConstString): keep track of already emitted string
2111           literals to prevent "duplicate definitions of symbol _str_NR"
2112         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2113           debug message
2114         * device/lib/Makefile.in: ignore failing PIC16 library builds
2115         * device/lib/pic16/Makefile: do not build if gputils are missing
2116         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2117
2118 2005-08-10 Raphael Neider <rneider AT web.de>
2119
2120         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2121           my last commit)
2122
2123 2005-08-10 Raphael Neider <rneider AT web.de>
2124
2125         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2126           Rokas' patch to add the new fixed point type "__fixed16x16"
2127         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2128           functions for __fixed16x16 arithmetics
2129         * device/lib/pic16: reimplemented the build system to support
2130           a separate build directory, better handling of libio (create
2131           the library in a separate subdir for each architecture) and
2132           easier configuration (centralized in Makefile.common)
2133
2134 2005-08-07 Raphael Neider <rneider AT web.de>
2135
2136         * src/pic16/gen.c (genrshTwo): fixed sign extension
2137         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2138         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2139           added T0CONbits
2140         * device/include/pic16/pic18f4220.h: NEW, header for
2141           pic18f4220 and pic18f4320
2142         * device/include/pic16/pic18fregs.h: added new devices,
2143           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2144         * device/include/pic16/signal.h: resolved name clashes
2145           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2146           to also allow testing for interrupt enable bits, added
2147           comments on how to use the macros
2148         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2149         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2150           register definitions for the devices
2151         * device/lib/pic16/pics.all: added new devices
2152         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2153           allocated memory
2154         * device/lib/pic16/libc/stdlib/memfree: do not count
2155           the block header as free memory
2156         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2157           simplified and added missing end-of-blocklist-marker
2158           (reported by Peter Onion, fixes #1252814)
2159         * (_mergeHeapBlock): fixed loop condition
2160         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2161           len==0, restructured code
2162         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2163           up a bit, reduced bitfield accesses, prevent endless loops
2164           in case of heap corruption
2165         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2166           "unreferenced arguments/must return a value" warnings
2167         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2168           replaced BAUDREG with SPBRG
2169         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2170           device/lib/pic16/debug/gstack/gstack.c: replaced
2171           _naked, _asm, _endasm with __naked, __asm, __endasm
2172
2173 2005-08-05 Raphael Neider <rneider AT web.de>
2174
2175         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2176           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2177
2178 2005-08-05 Borut Razem <borut.razem AT siol.net>
2179
2180         * device/lib/Makefile.in: added missing ';'
2181         * configure: removed ^M characters
2182
2183 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2184
2185         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2186           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2187           License
2188
2189 2005-08-04 Borut Razem <borut.razem AT siol.net>
2190
2191         * configure.in: pic16 libraries build 2nd try - enable running
2192           configure in device/lib/pic16
2193         * configure: regenerated from configure.in
2194         * device/lib/Makefile.in: create $(PORT)/bin directory
2195
2196 2005-08-03 Raphael Neider <rneider AT web.de>
2197
2198         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2199           to get/set values via pointers
2200         * (genUnpackBits,genPackBits): changed detection of
2201           ptr->bitfield vs. sym.bitfield, fixed access via generic
2202           pointers, removed dead (wrong) code for multibyte bitfields
2203         * (genNearPointerGet, genGenPointerGet): removed useless code,
2204           fixed bitfield detection, fixes #1250594
2205         * (genNearPointerSet): removed useless code
2206         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2207           and introduced macro pic16_emitpcode that conditionally emits
2208           the origin of the following pCode (useful for debugging SDCC)
2209         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2210         * (createDefmap): fixed handling of LFSR for --optimize-df
2211
2212 2005-08-02 Borut Razem <borut.razem AT siol.net>
2213
2214         * device/lib/Makefile.in: pic16 libraries build enabled since
2215           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2216
2217 2005-08-02 Raphael Neider <rneider AT web.de>
2218
2219         * src/pic16/gen.c (genPackBits): removed deprecated warning
2220         * (genGenPointerSet): fixed bitfield detection
2221
2222 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2223
2224         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2225
2226 2005-07-31 Raphael Neider <rneider AT web.de>
2227
2228         * device/lib/pic16/libdev/pic18f458.c,
2229           device/include/pic16/pic18f458.h: added missing T0CONbits
2230
2231 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2232
2233         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2234
2235 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2236
2237         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2238
2239 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2240
2241         * device/include/mcs51/at89c51ed2.h: added.
2242
2243 2005-07-23 Raphael Neider <rneider AT web.de>
2244
2245         * src/pic/gen.h: added emitpcode macro for debugging
2246         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2247           and replace by macro adding debug information on demand
2248         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2249         * (gencjne): tried to fix; replaced with correct (slower) code
2250         * (gen{Unp,P}ackBits): fixed single bit access
2251         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2252         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2253           previous instruction
2254         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2255           register has to be handled with care (forbidding movement
2256           of assignments/uses, removing assignments completely, ...)
2257         * (pCodeOptime2pCodes): make use of regIsSpecial
2258         * added lots of debugging output (commented out)
2259         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2260           from being reused as result UNLESS it is known to work
2261
2262 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2263
2264         * support/Util/dbuf.h: include <stddef.h> for size_t
2265         * .version: changed to version 2.5.2
2266
2267 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2268
2269         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2270
2271 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2272
2273         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2274           (genModOneByte): removed needless psha/pula
2275
2276 2005-07-22 Raphael Neider <rneider AT web.de>
2277
2278         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2279           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2280         * src/pic/gen.c (resolveIfx): do not "invent" labels
2281         * (genSkipc): changed to positive logic
2282         * (genSkipCond): removed as no longer needed
2283         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2284           backport from PIC16
2285         * (genLeftShift): check operands are in different registers
2286         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2287           INCF does not update CARRY...
2288         * src/pic/main.c: fixed _linkCmd
2289         * src/pic/pcode.c (unlinkpCode): added inactive code
2290         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2291           alive (do not assign result and operand overlapping registers)
2292
2293 2005-07-22 Raphael Neider <rneider AT web.de>
2294
2295         * src/pic/device.c (dump_sfr): replaced register declaration with
2296           call to emitSymbolToFile() to avoid duplicate symbols
2297         * (assignRelocatableRegisters): do not declare external symbols
2298         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2299           right (take size of type, not etype)
2300         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2301         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2302         * (packRegsForAccUse): disabled assignment of WREG as
2303           the result reg to prevent occurence of just fixed #1235003,
2304           fixes #1242954
2305         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2306           symbols (avoids duplicate symbols in .asm file)
2307         * (pic14emitRegularMap): use emitSymbolToFile()
2308         * src/pic/gen.c (aopOp): fixed spillLocation handling
2309         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2310         * (genDataPointerSet): removed unneccessary variables/output
2311
2312 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2313
2314         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2315         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2316
2317 2005-07-21 Raphael Neider <rneider AT web.de>
2318
2319         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2320           architecture cannot handle them efficiently, fixes bug #1235003
2321         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2322           check for empty sets before using them (fixes bug #1232190)
2323
2324 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2325
2326         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2327           (lnksect2): generate warnings for memory overlap
2328         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2329           constseg to set the name of these segments so you can instruct the linker
2330           to place them in banks
2331         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2332         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2333           added code_seg and const_seg to options
2334         * src/SDCCglue.c (emitMaps): use options.const_seg,
2335           (createInterruptVect): put interrupt vectors in segment HOME,
2336           (glue): put HOME before static segment and put the main glue in HOME,
2337           (glue): use options.code_seg
2338         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2339         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2340           these segments so you can instruct the linker to place them in banks
2341           (linkEdit): use code_loc for HOME segment which should be the first
2342           segment in code memory now
2343         * src/SDCCmem.c: fixed more stuff like bug 1238386
2344         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2345           (changePointer): don't change function pointers to code pointers for
2346           banked functions,
2347           (compareType): added exceptional check for banked function pointers
2348         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2349         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2350           after static in code memory
2351         * src/mcs51/gen.c: added aopLiteralLong prototype,
2352           (aopForSym): use getSize for functions,
2353           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2354           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2355           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2356           the segment,
2357           (genPcall): use call for literal function pointers and generate banked
2358           calls over the one trampoline so there's only one place for the user to
2359           modify according to his/hers hardware,
2360           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2361           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2362         * src/mcs51/main.c: added keyword banked,
2363           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2364         * support/Util/SDCCerr.c,
2365         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2366           needed for passing the bank and address to the trampoline
2367         * device/lib/mcs51/crtbank.asm: added for bankswitching
2368         * device/lib/mcs51/Makefile: added crtbank
2369
2370 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2371
2372         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2373           for fields at offset 0 of a struct or union as reported
2374           on 2005-07-07 in the developer mailing list.
2375
2376 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2377
2378         * src/SDCCmem.c: fixed bug 1238386
2379
2380 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2381
2382         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2383           (patch #1144962), added peephole 300, enabled 259.x
2384         * doc/sdccman.lyx: removed screenshot and provided link instead
2385
2386 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2387
2388         * doc/sdccman.lyx: added section about debugging with ddd
2389         * doc/figures/ddd_example.eps: screenshot of debugging session
2390
2391 2005-07-04 Raphael Neider <rneider AT web.de>
2392
2393         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2394           like CODE pointers, fixes #1115683
2395         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2396           call, fixes bugs #1232211, #1228110,
2397           fixed wrong casts to pCodeFlow from pCodeInstructions
2398
2399 2005-07-04 Raphael Neider <rneider AT web.de>
2400
2401         * src/pic/gen.c (popGet): changed assert to allow for
2402           bit operands
2403         * (popGetAddr): changed signature to provide
2404           an additional index, patched all call sites
2405         * (genCmpEq): handle literal-like operands correctly
2406         * (genAddrOf): added sanity checks on __code/__data pointers
2407         * (genAssign): added handling of symbols from __code section
2408         * (gencjne): do not generate code for comparisons whose result
2409           is neither stored nor used, fixes bug #1171114
2410         * (AccLsh, AccRsh): operate on operand instead of WREG
2411         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2412           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2413           by known count
2414         * rewrote complete shift-by-literal logic, commented unused
2415           functions out
2416         * (genConstPointerGet): get multiple bytes (if result size > 1),
2417           fixed handling of non-immediate addresses
2418         * (genPointerGet): handle CODE pointers like CONST pointers
2419         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2420         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2421           operand is to be treated as a literal or not
2422         * (mov2w,genPcall,genCmpEq),
2423           src/pic/genarith.c: use aop_isLitLike() to decide between
2424           literal/register contents
2425         * (addSign): added missing offset
2426         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2427           only emit comment in debug-mode,
2428           use {aop,op}_isLitLike throughout the file
2429         * src/pic/glue.c: fix initializers for pointers (work in progress)
2430         * src/pic/pcode.c (get_op): honor index on _const symbols
2431         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2432         * (dumppBlock): added pCode size estimation
2433         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2434           check for IS_SYMOP before OP_SYMBOL'ing
2435         * fixed indentation, compacted switch-statements
2436         * (allocReg): find free register and allocate it instead of
2437           allocating new registers all the time
2438         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2439           registers as its operands (necessary only for multibyte GETs)
2440
2441 2005-07-01 Raphael Neider <rneider AT web.de>
2442
2443         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2444           debugging .asm-output macros FENTRY + FEXIT
2445         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2446           way... I wonder...
2447         * (emitpComment): NEW, printf to pCode
2448         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2449           offset handling
2450         * (popGetAddr): NEW, variant of popGet to access an immediates
2451           high(er) bytes instead of the n'th byte of memory they reference,
2452           replaced popGet with popGetAddr where neccessary
2453         * (genDataPointerGet): reactivated and fixed implementation
2454         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2455           accesses
2456         * (genDataPointerSet): fixed multibyte assignments
2457         * (genpic14Code): fixed --i-code-in-asm handling
2458         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2459         * (genPlus): fixed index-out-of-bounds error
2460         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2461         * src/pic/ralloc.c: added debugging output macro FENTRY2
2462         * (spillThis): fixed indentation, enbraced for-body for clarity
2463         * (rematStr): commented out as now unused
2464         * (regTypeNum): commented out special spill case (overwrites
2465           arbitrary values)
2466         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2467
2468 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2469
2470         * doc/sdccman.lyx: documented sfr16/sfr32,
2471           added example for using storage class with function pointers
2472         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2473
2474 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2475
2476         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2477         * device/lib/_itoa.c,
2478         * device/lib/_ltoa.c: optimized codesize
2479         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2480           but don't know how to suppress the double warning.
2481         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2482         * support/Util/SDCCerr.c,
2483         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2484
2485 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2486
2487         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2488           fixed old K&R prototypes
2489         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2490         * device/lib/_gptrget.c,
2491         * device/lib/_gptrgetc.c,
2492         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2493           also new versions for small generic pointers and banked generic pointers
2494         * src/port.h: added const_name
2495         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2496         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2497         * src/SDCCcse.c (findPrevIc): check all associative operators
2498         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2499         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2500         * src/SDCCmem.c: updated comments,
2501           set far-space to 0 for pdata, results in optimized code
2502         * src/SDCCmem.h: added macro CONST_NAME
2503         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2504           moving the info into the highest bits, see also gptrget/gptrput
2505         * src/src.dsp: added sdcc.ico to project files
2506         * src/avr/gen.c (genCast): fixed bug 0x%d
2507         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2508         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2509           relation between ptr_type and DCL_TYPE,
2510           (genCast): fixed bug 0x%d
2511         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2512           (CODE)" for const_name
2513         * src/hc08/gen.c (genCast): fixed bug 0x%d
2514         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2515           (hc08_port): added "CONST (CODE)" for const_name
2516         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2517           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2518           between ptr_type and DCL_TYPE,
2519           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2520           operand* and took AOP() inside function so sfr-ness can be checked,
2521           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2522           new prototype,
2523           (genFunction, genEndFunction): optimized stack setup,
2524           (genMinus): optimized for literals with ending zeroes (in bytes),
2525           (genCast): fixed bug 0x%d
2526         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2527           (mcs51_port): added "CONST (CODE)" for const_name
2528         * src/mcs51/peeph.def: made rule 226 more generic
2529         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2530         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2531         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2532         * src/z80/main.c (z80_port): added NULL for const_name,
2533           (gbz80_port): added NULL for const_name
2534         * support/regression/tests/bug663539.c,
2535         * support/regression/tests/sfr16.c: new tests
2536
2537 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2538
2539         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2540
2541 2005-06-24 Raphael Neider <rneider AT web.de>
2542
2543         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2544           corrected typos...
2545         * device/include/pic16/signal.h: added USBIF
2546           and SIG_USB
2547
2548 2005-06-24 Raphael Neider <rneider AT web.de>
2549
2550         * device/lib/pic16/libdev/pic18f2455.c,
2551           device/include/pic16/pic18f2455.h: NEW
2552         * device/include/pic16/pic18fregs.h,
2553           device/lib/pic16/pics.all,
2554           src/pic16/device.c: added 18f2455
2555         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2556           device/include/pic16/{pic18f[68][567].h,usart.h}:
2557           replaced MULTIPLE_USARTS define with more relaible
2558           compatibility sfrs (for USART access)
2559
2560 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2561
2562         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2563           and the output asm file line is printed on two lines.
2564
2565 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2566
2567         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2568           BGT, BLE, BHI, and BLS instructions
2569         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2570           genCmpEq): removed
2571         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2572           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2573           fixes bug #1216342
2574         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2575
2576 2005-06-15 Raphael Neider <rneider AT web.de>
2577
2578         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2579         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2580         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2581           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2582           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2583
2584 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2585
2586         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2587           Marcel Telka in bug #1215704
2588
2589 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2590
2591         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2592           located in shared memory bank.
2593
2594 2005-05-31 Raphael Neider <rneider AT web.de>
2595
2596         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2597           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2598           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2599
2600 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2601
2602         * device/lib/_strncpy.c: fixed the fix
2603
2604 2005-05-26 Raphael Neider <rneider AT web.de>
2605
2606         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2607           initializers with \0, bug #1208187
2608         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2609           intializers with \0, bug #1208187
2610
2611 2005-05-26 Raphael Neider <rneider AT web.de>
2612
2613         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2614           initializers with \0, bug #1208187
2615         * src/pic16/main.c (_process_pragma): added sanity checks
2616           for stack position and size, emit warnings when appropriate
2617
2618 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2619
2620         * device/lib/_strncpy.c: fixed not filling with \0
2621
2622 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2623
2624         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2625           createFunction),
2626         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2627           compound_statement),
2628         * src/SDCCsymt.h,
2629         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2630
2631 2005-05-24 Raphael Neider <rneider AT web.de>
2632
2633         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2634
2635 2005-05-24 Raphael Neider <rneider AT web.de>
2636
2637         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2638           TRISE definitions, closes bug #1162453
2639
2640 2005-05-22 Raphael Neider <rneider AT web.de>
2641
2642         * src/pic16/main.c (_process_pragma): check for missing
2643           arguments to pragmas code and udata
2644         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2645           consistency fixes to match other headers (thanks to Jim Paris)
2646         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2647
2648 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2649
2650         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2651
2652 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2653
2654         * support/regression/tests/bug1198642.c: new test
2655         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2656         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2657         * support/scripts/resource.h,
2658         * support/scripts/resource.rc,
2659         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2660         * support/scripts/sdcc.ico: added 32x32 icon
2661
2662 2005-05-18 Raphael Neider <rneider AT web.de>
2663
2664         * device/lib/pic16/libdev/pic18f*.c,
2665         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2666           keywords to "__sfr" and "__at (X)"
2667         * device/include/pic16/pic18fregs.h: added pic18f4520
2668         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2669           #1203088 (MPLAB compatibility)
2670
2671 2005-05-17 Raphael Neider <rneider AT web.de>
2672
2673         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2674         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2675         * device/lib/pic16/pics.all: added new devices
2676         * src/pic16/device.c: added support for pic18f4520
2677
2678 2005-05-16 Raphael Neider <rneider AT web.de>
2679         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2680         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2681         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2682           convenience function for bit access
2683
2684 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2685
2686         * device/lib/printf_large.c: fixed bug 1193299
2687         * support/regression/tests/bug1057979.c: added test %3.3s
2688
2689 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2690
2691         * device/include/mcs51/8051.h,
2692         * device/include/mcs51/8052.h: made parseable with lint
2693         * device/include/mcs51/lint.h: added include file for (sp)lint
2694         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2695         * doc/cdbfileformat.lyx,
2696         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2697
2698 2005-05-14 Raphael Neider <rneider AT web.de>
2699
2700         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2701         * device/lib/pic16/libc/stdlib/itoa.c (new)
2702         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2703         * device/lib/pic16/libio/Makefile: exclude subdir according to
2704           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2705         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2706         * src/pic16/gen.c (genFunction): prevent annoying warning
2707         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2708           nameclashes on BeOS
2709         * support/cpp2/cppmain.c (cpp_output_string): new
2710         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2711           fixes bug 1116802
2712
2713 2005-05-13 Borut Razem <borut.razem AT siol.net>
2714
2715         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2716
2717 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2718
2719         * .version: changed to version 2.5.1; back to bleeding edge development
2720
2721 2005-05-11 Borut Razem <borut.razem AT siol.net>
2722
2723         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2724           generate PDF version 1.3 documents
2725
2726 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2727
2728         * .version: changed to version 2.5.0
2729
2730 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2731
2732         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2733
2734 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2735
2736         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2737         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2738         well as many smaller updates.
2739         * .version: changed to version 2.5.0-pre1
2740
2741 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2742
2743         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2744
2745 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2746
2747         * support/regression/tests/bug1185672.c: added
2748         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2749           bug 1185672
2750         * src/mcs51/gen.c (genCall): added comments, made it look safer
2751         * src/mcs51/gen.c (genEndFunction): simplified
2752
2753 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2754
2755         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2756
2757 2005-04-14 Borut Razem <borut.razem AT siol.net>
2758
2759         * fixed bug 1045046 - SIGSEGV with really simple code?:
2760           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2761           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2762
2763 2005-04-14 Borut Razem <borut.razem AT siol.net>
2764
2765         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2766           src/pic16/device.h: temporarily disabled experimental #inline pragma
2767           for 2.5.0 release
2768
2769 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2770
2771         * device/include/z80/stdio.h,
2772         * device/include/z80/string.h: removed these highly incomplete files so
2773           SDCC can use the default ones in device/include/
2774
2775 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2776
2777         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2778         gcc warning.
2779         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2780         fix sdcpp warnings.
2781
2782 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2783
2784         * device/include/malloc.h: removed redundant __reentrant prototypes
2785         * device/lib/_mullong.c: added working xstack variant in asm (C version
2786           doesn't pass regression tests)
2787         * device/lib/bpx.c: used __data and made bpx char for mcs51
2788         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2789           (createFunction): fixed bug with xstackPtr
2790         * src/SDCCcse.c: corrected comments
2791         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2792           (killDeadCode, eBBlockFromiCode): removed unused code
2793         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2794           corrected comments
2795         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2796           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2797           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2798           (genModOneByte): fixed warning in MSVC
2799         * src/mcs51/main.c (): added comments
2800         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2801
2802 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2803
2804         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2805
2806 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2807
2808         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2809
2810 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2811
2812         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2813         characters arrays of larger size than the declared one.
2814
2815 2005-04-10 Borut Razem <borut.razem AT siol.net>
2816
2817         * src/pic/gen.c (genInline),
2818           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2819           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2820           (findNextInstruction), (findPrevInstruction),
2821           (findInstructionUsingLabel),
2822           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2823         * src/pic/pcode.c (findLabel): added missing '\n'
2824         * src/src.dsp: added SDCCdwarf2.c to the project
2825
2826 2005-04-09 Borut Razem <borut.razem AT siol.net>
2827
2828         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2829
2830 2005-04-08 Raphael Neider <rneider AT web.de>
2831
2832         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2833           into the chain after a given one) and mergeDefmapSymbols (combine
2834           defmap entries for each symbol per pcode)
2835         * (createDefmap): have defmap entries merged in the end
2836         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2837           a symbol before replacing one access type's symbol, merge symbols in
2838           the end (replacement symbol might already have an entry)
2839         * (assignValnums): keep reference to written WREG intact
2840
2841 2005-04-08 Raphael Neider <rneider AT web.de>
2842
2843         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2844           Alpha)
2845
2846 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2847
2848         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2849         bytes
2850
2851 2005-04-07 Raphael Neider <rneider AT web.de>
2852
2853         * device/include/pic16/usart.h: added compatibility defines for
2854           devices with more than one USART
2855         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2856
2857 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2858
2859         * device/lib/Makefile.in: updated for port specific include
2860
2861 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2862
2863         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2864
2865 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2866
2867         * device/include/8051.h,
2868         * device/include/8052.h,
2869         * device/include/at89S8252.h,
2870         * device/include/at89c55.h,
2871         * device/include/at89x051.h,
2872         * device/include/at89x51.h,
2873         * device/include/at89x52.h,
2874         * device/include/mcs51reg.h,
2875         * device/include/reg51.h,
2876         * device/include/reg764.h,
2877         * device/include/regc515c.h,
2878         * device/include/sab80515.h: (re)moved these 12 files
2879         * device/include/mcs51/8051.h,
2880         * device/include/mcs51/8052.h,
2881         * device/include/mcs51/at89S8252.h,
2882         * device/include/mcs51/at89c55.h,
2883         * device/include/mcs51/at89x051.h,
2884         * device/include/mcs51/at89x51.h,
2885         * device/include/mcs51/at89x52.h,
2886         * device/include/mcs51/mcs51reg.h,
2887         * device/include/mcs51/reg51.h,
2888         * device/include/mcs51/reg764.h,
2889         * device/include/mcs51/regc515c.h,
2890         * device/include/mcs51/sab80515.h: and added them here
2891
2892 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2893
2894         * device/include/stdarg.h: changed SDCC specific keywords to double
2895           underlined form.
2896         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2897           mcs51 and ds390.
2898         * device/include/hc08/mc68hc908gp32.h,
2899         * device/include/hc08/mc68hc908jb8.h,
2900         * device/include/hc08/mc68hc908jkjl.h,
2901         * device/include/hc08/mc68hc908qy.h: fixed comments
2902         * device/include/mcs51/README: updated
2903         * device/include/mcs51/c8051f120.h: added PINRSF
2904         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2905         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2906           amidst code. Also inline is not supported.
2907
2908 2005-04-06 Raphael Neider <rneider AT web.de>
2909
2910         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2911         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2912           callers stack/frame pointers
2913
2914 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2915
2916         * device/include/pic16/usart.h: added, missing in previous commit,
2917         * device/include/pic16/adc.h: fixed typo,
2918         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2919         commit,
2920         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2921         <p18fxxx.inc>
2922         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2923         uninitialized because a bug appears with gplink
2924         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2925         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2926         complains for unrecognised option
2927
2928 2005-04-05 Raphael Neider <rneider AT web.de>
2929
2930         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2931           structs as well (using memcpy)
2932         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2933           on ISRs (GOTO has no label)
2934         * src/pic16/device.h: added OF_OPTIMIZE_DF
2935         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2936           new data flow analysis/optimization
2937         * src/pic16/pcode.c: added (prototypes for and implementation of)
2938           dataflow analysis functions, fixed pCodeInstructions' inCond and
2939           outCond values, made RCALL a branch instruction
2940         * (pic16_unlinkpCode): keep C line if possible
2941         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2942           C line moved if possible
2943         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2944         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2945           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2946         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2947           new flow)
2948         * (pic16_getJumptabpCode): NEW, needed in...
2949         * (LinkFlow): fixed handling of jumptables, calls and conditional
2950           branches
2951         * (pic16_InsertCommentAfter): NEW
2952         * (pic16_pCodeReplace): made verbose and flow preserving
2953         * (AnalyzeFlow): added call to data flow analysis
2954         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2955         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2956         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2957
2958 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2959
2960         * src/SDCCast.c (decorateType): fixed bug #1105626
2961
2962 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2963
2964         * device/include/asm/pic16/features.h,
2965         * pic18f*.h headers,
2966         * device/include/pic16/adc.h,
2967         * device/include/pic16/delay.h,
2968         * device/include/pic16/i2c.h,
2969         * device/include/pic16/malloc.h,
2970         * device/include/pic16/stdio.h,
2971         * device/include/pic16/stdlib.h,
2972         * device/include/pic16/string.h,
2973         * device/lib/pic16/libc/stdio/printf_tiny.c,
2974         * device/lib/pic16/libc/stdio/printf_small.c,
2975         * device/lib/pic16/libc/stdio/strmgpsim.c,
2976         * device/lib/pic16/libc/stdio/strmmssp.c,
2977         * device/lib/pic16/libc/stdio/strmusart.c,
2978         * device/lib/pic16/libc/stdio/vfprintf.c,
2979         * device/lib/pic16/libc/stdlib/ltoa.c,
2980         * device/lib/pic16/libc/stdlib/putchar.c,
2981         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2982         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2983         * device/lib/pic16/libc/stdlib/memchrram.c,
2984         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2985         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2986         * device/lib/pic16/libio/adc/adcbusy.c,
2987         * device/lib/pic16/libio/adc/adcread.c,
2988         * device/lib/pic16/libio/adc/adcsetch.c,
2989         * device/lib/pic16/libio/usart/ubaud.c,
2990         * device/lib/pic16/libio/usart/ubusy.c,
2991         * device/lib/pic16/libio/usart/udrdy.c,
2992         * device/lib/pic16/libio/usart/uopen.c,
2993         * device/lib/pic16/libio/usart/uputc.c,
2994         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2995         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2996         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2997         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2998         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2999         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3000         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3001         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3002         specific keywords to double underlined form,
3003         * device/lib/pic16/libc/Makefile.rules,
3004         * device/lib/pic16/libsdcc/Makefile.rules,
3005         * device/lib/pic16/libm/Makefile,
3006         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3007         to compile with C standard set in Makefile.common
3008         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3009         rand.c and crc.c in compilation process,
3010         * device/lib/pic16/libsdcc/int/divuint.c,
3011         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3012         `c' from signed to unsigned,
3013         * device/lib/pic16/startup/crt0.c,
3014         * device/lib/pic16/startup/crt0i.c,
3015         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3016         keywords to double underlined form, bug fixes in _do_cinit function
3017         which prevented the correct initialization of the .idata segment,
3018         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3019         core to enter a infinite loop
3020         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3021
3022 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3023
3024         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3025
3026 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3027
3028         * device/include/Makefile.in: add support for hc08 subdirectory
3029         * device/include/hc08/: new subdirectory
3030         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3031         Lucas Loizaga, thanks!
3032         * device/include/hc08/mc68hc908qy.h,
3033         * device/include/hc08/mc68hc908gp32.h,
3034         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3035         their own directory. Changed internal macro names to use the compiler
3036         reserved namespace. Changed SDCC specific keywords to double
3037         underlined form.
3038         * device/include/math.h,
3039         * device/include/malloc.h,
3040         * device/include/stdarg.h,
3041         * device/include/stdbool.h
3042         * device/include/string.h,
3043         * device/include/tinibios.h,
3044         * device/include/ds400rom.h,
3045         * device/include/8051.h,
3046         * device/include/8052.h,
3047         * device/include/80c51xa.h,
3048         * device/include/at89c55.h,
3049         * device/include/at89S8252.h,
3050         * device/include/at89x51.h,
3051         * device/include/at89x52.h,
3052         * device/include/ds80c390.h,
3053         * device/include/reg764.h,
3054         * device/include/regc515c.h,
3055         * device/include/sab80515.h,
3056         * device/include/mcs51/c8051f000.h,
3057         * device/include/mcs51/c8051f018.h,
3058         * device/include/mcs51/c8051f020.h,
3059         * device/include/mcs51/c8051f040.h,
3060         * device/include/mcs51/c8051f060.h,
3061         * device/include/mcs51/c8051f120.h,
3062         * device/include/mcs51/c8051f300.h,
3063         * device/include/mcs51/c8051f310.h,
3064         * device/include/mcs51/c8051f320.h,
3065         * device/include/mcs51/c8051f330.h,
3066         * device/include/mcs51/c8051f350.h,
3067         * device/include/z180.h: Changed SDCC specific keywords to double
3068         underlined form.
3069
3070 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3071
3072         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3073         18F4455,
3074         * (pic16_assignConfigWordValue): disable testing of configuration
3075         register value with config mask,
3076         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3077         function with port->fun_prefix,
3078         * (genFunction): when generating a naked interrupt function never
3079         create an absolute segment placed in interrupt vector address, place
3080         the actual interrupt function at IVA instead, when an interrupt
3081         function is generated with unspecified interrupt then do not create
3082         the absolute section,
3083         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3084         code for generating a call to generic pointer get/put function with
3085         a call to function pic16_callGenericPointer(),
3086         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3087         the call to the generic pointer get/put functions with prefixing the
3088         function name with port->fun_prefix,
3089         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3090         * src/pic16/main.c (_process_pragma): prefix function with
3091         port->fun_prefix,
3092         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3093         calling assembler, old 18Fxxxx macro is deprecated,
3094         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3095         PC_ASMDIR in while condition,
3096         * (findInstruction): add PC_ASMDIR in while condition,
3097         * (buildCallTree): prefix main with port->fun_prefix,
3098         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3099         identifier for variable with banked access in instructions BTFSS,
3100         BTFSC, BCF, BSF, BTG
3101         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3102         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3103         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3104         perform optimization when enviroment variable NO_REG_OPT is set,
3105         * (insideLRBlock): NEW, return 1 if register is inside an
3106         INF_LOCALREGS block,
3107         * (RemoveRegFromLRBlock): remove a register that is completely
3108         eliminated by register optimization, but it is still left in local
3109         register store/restore in/from stack block,
3110         * (Remove2pcodes): after removing register, check to see if it
3111         should be removed from local register store/restore in/from stack
3112         block,
3113         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3114         DUMMY_READ_VOLATILE,
3115
3116         * device/include/pic16/adc.h: minor prototype modifications and
3117         update,
3118         * device/include/pic16/malloc.h: added GPL notice various
3119         modifications,
3120         * device/include/pic16/stdint.h: NEW, standard header for ints
3121         * device/include/pic16/delay.h: NEW, header for delay functions,
3122         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3123         delay1mtcy,
3124         * device/include/pic16/signal.h: NEW, header providing helper macros
3125         for implementing signal handlers,
3126         * device/include/pic16/stdio.h: added prototypes for functions,
3127         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3128         prototypes for stdin and stdout, added macro PUTCHAR to
3129         automatically implement putchar function prototype,
3130         * device/include/pic16/usart.h: modified and updated USART library,
3131         * device/lib/pic16/libio/adc/,
3132         * device/lib/pic16/libio/i2c: some modifications to improve library
3133         performance,
3134         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3135         family of functions,
3136         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3137         family of functions and other sources,
3138         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3139         of the PIC18Fxx[28] devices,
3140         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3141         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3142         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3143         _do_cinit function, because the previous failed when local variables
3144         where not placed in the same memory bank,
3145         * device/lib/pic16/libsdcc/char/: various modifications to improve
3146         library performance,
3147         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3148         information on the new functions of the c library and more...
3149
3150 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3151
3152         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3153
3154 2005-03-26 Raphael Neider <rneider AT web.de>
3155
3156         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3157           if condition == CARRY)
3158         * (genCmp): adapted to new genSkipc semantics
3159         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3160           on rIfx (genCmp was broken)
3161
3162 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3163
3164         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3165         * src/z80/main.c (_keywords[]),
3166         * src/SDCCglobal.h (struct options),
3167         * src/SDCC.y,
3168         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3169         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3170         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3171         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3172         always available in leading double underscore form. The C99 support is
3173         mostly missing, but it's a start.
3174         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3175         reserved identifier "__data".
3176
3177 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3178
3179         * src/mcs51/peeph.def: fixed bug 1170013
3180
3181 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3182
3183         * device/include/mcs51reg.h: fixed bug 842007
3184
3185 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3186
3187         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3188         last time.
3189
3190 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3191
3192         * src/port.h (struct PORT),
3193         * src/avr/ralloc.c (avr_assignRegisters),
3194         * src/avr/main.c,
3195         * src/ds390/ralloc.c (ds390_assignRegisters),
3196         * src/ds390/main.c,
3197         * src/hc08/ralloc.c (hc08_assignRegisters),
3198         * src/hc08/main.c,
3199         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3200         * src/mcs51/main.c,
3201         * src/pic/ralloc.c (pic14_assignRegisters),
3202         * src/pic/main.c,
3203         * src/pic16/ralloc.c (pic16_assignRegisters),
3204         * src/pic16/main.c,
3205         * src/xa51/ralloc.c (xa51_assignRegisters),
3206         * src/xa51/main.c,
3207         * src/z80/ralloc.c (z80_assignRegisters),
3208         * src/z80/ralloc.h,
3209         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3210         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3211         * src/SDCCcse.h,
3212         * src/SDCCdflow.c (computeDataFlow),
3213         * src/SDCCdflow.h,
3214         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3215         * src/SDCCloop.h,
3216         * src/SDCCcflow.c (*),
3217         * src/SDCCcflow.h,
3218         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3219         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3220         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3221         immedDom() returning wrong block; probably fixes bug #1160833)
3222
3223 2005-03-20 Borut Razem <borut.razem AT siol.net>
3224
3225         * support/scripts/inc2h.pl: WIN32 port
3226
3227 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3228
3229         * device/lib/makefile.in: added abs.c and labs.c
3230
3231 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3232
3233         * device/include/stdint.h: added
3234         * device/lib/abs.c: added
3235         * device/lib/labs.c: added
3236         * device/include/stdlib.h: added abs() and labs() prototypes
3237         * device/lib/libsdcc.lib: added abs and labs
3238         * device/include/float.h,
3239         * device/lib/_fsmul.c,
3240         * device/lib/printf_fast.c,
3241         * device/lib/printf_tiny.c: updated comments
3242
3243 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3244
3245         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3246         bug #1164313
3247
3248 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3249
3250         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3251         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3252
3253 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3254
3255         * device/lib/printf_large.c: removed inline assembly for portability and
3256           readability. Use printf_fast if speed or size are more important.
3257         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3258         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3259
3260 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3261
3262         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3263         prevent compiler warning
3264
3265 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3266
3267         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3268         moved to level 0 and declared as static. Also they are explicit
3269         placed in access bank. This was necessery because some times they
3270         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3271         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3272         optimizations. Currently only compare to unsigned char is implemented,
3273         * src/pic16/gen.c: added fReturnIdx array,
3274         * (struct resolvedIfx) is moved to gen.h and made public,
3275         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3276         * (aopForSym): added an optimization to directly store in stack of
3277         the operand of a SEND iCode,
3278         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3279         but as registers instead (AOP_REG) using the fReturnIdx array,
3280         * (pic16_freeAsmop): remove the freed register from the
3281         _G.sregsAlloc field,
3282         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3283         a compare of 'WREG',
3284         * (pic16_popGetTempRegCond): changed function prototype, now
3285         function takes also a bitVector argument v which holds the current
3286         set of registers that are allocated for stack access by aopForSym,
3287         registers allocated in aopForSym for accessing stack symbols are not
3288         any more part of the functions usedRegs field,
3289         * (genCall): some times aopOp is called for a stack variable to be
3290         send, aopForSym might perform the push, if this is true make sure
3291         that genCall doesn't push the variable twice by testing _G.resDirect,
3292         * (genFunction): changed testing for unspecified interrupt number
3293         from 256 to INTNO_UNSPEC,
3294         * modified selection scheme of frame pointer generation. Previously
3295         if function did use local registers a frame pointer was generated,
3296         now a frame pointer is generated only if function has arguments
3297         (that need PLUSW2 register access), or has stack arguments, or the
3298         compiler is not instructed to omit the frame pointer,
3299         * (genEndFunction): before restoring local registers that were saved
3300         in the function preamble, also restore the registers that *might*
3301         have been allocated for stack access,
3302         * (genRet): removed some old comments,
3303         * (genCmp, the active (RN's) version): added a call to the
3304         pic16_genCmp_special function to perform the compare with a more
3305         robust and optimized way,
3306         * (genInline): a feature has been added in inline code generation,
3307         which allows a wildcard variable substitution when writing inline
3308         assembly. Code is incomplete and experimental therefore undocumented,
3309         * (genCast): changed order of aopOp for result and right to allow
3310         aopForSym to directly load the result if possible,
3311         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3312         perform an optimized compare on some selected special occasions,
3313         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3314         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3315         generate an IVT any more,
3316         * src/pic16/main.c (pic16_optionsTable): added command line option
3317         --optimize-cmp,
3318         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3319         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3320         macros,
3321         * src/pic16/NOTES: Raphael Neider added in list of active developers
3322         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3323         jumptable_end to prevent bug #,
3324         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3325         inCond and outCond fields,
3326         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3327         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3328         turn off register spilling,
3329         * (packRegsForOneUse): synced with other ports' versions although it
3330         is not used currently,
3331         * (pic16_packRegisters): added an optimization while reading
3332         structure bitfields, some registers may be saved (malloc code is
3333         decreased by 80 bytes)
3334
3335 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3336
3337         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3338         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3339         this can be optimized more?
3340
3341 2005-03-10 Raphael Neider <rneider AT web.de>
3342
3343         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3344           genNearPointerGet): (hopefully) fixed access to bitfields via
3345           pointers (p->bitN = x; and x = p->bitN; failed)
3346
3347 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3348
3349         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3350
3351 2005-03-09 Raphael Neider <rneider AT web.de>
3352
3353         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3354
3355 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3356
3357         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3358         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3359           (regTypeNum): set REG_BIT type if necessary
3360         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3361         * support/regression/tests/critical.c: check bug 1144613
3362
3363 2005-03-02 Raphael Neider <rneider AT web.de>
3364
3365         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3366
3367 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3368
3369         * src/avr/ralloc.c (serialRegAssign),
3370         * src/ds390/ralloc.c (serialRegAssign),
3371         * src/hc08/ralloc.c (serialRegAssign),
3372         * src/mcs51/ralloc.c (serialRegAssign),
3373         * src/pic/ralloc.c (serialRegAssign),
3374         * src/pic16/ralloc.c (serialRegAssign),
3375         * src/xa51/ralloc.c (serialRegAssign),
3376         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3377
3378 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3379
3380         * src/SDCCast.c (decorateType): fixed bug 1124787
3381
3382 2005-02-20 Hubert Sack <sack AT digiplan.de>
3383         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3384
3385         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3386         patch #1121755
3387
3388 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3389
3390         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3391         to keep the correct label reference count when adding/removing references
3392         to labels. A peephole file using this is appended to patch #1144962.
3393
3394 2005-02-14 Raphael Neider <rneider AT web.de>
3395
3396         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3397         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3398         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3399           retrievals of result operand's value on assignment
3400
3401 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3402
3403         * device/include/pic16/string.h: modified prototype for memccpy()
3404         to memccpy(void *, void *, char, size_t)
3405         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3406         check whether to omit frame pointer or not,
3407         * (genInline): convert all occurences of "\n" to LF in inline
3408         assembler blocks, this helps formatting the inline text,
3409         * (pic16_loadFSR0): modified prototype,
3410         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3411         removed some 8051 legacy code,
3412         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3413         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3414         before allocating temporary registers in functions,
3415
3416 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3417
3418         * support/regression/tests/bitvars.c: corrected the "fix"
3419
3420 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3421
3422         * support/regression/tests/bitvars.c,
3423         * support/regression/tests/bitwise.c,
3424         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3425
3426 2005-02-10 Raphael Neider <rneider AT web.de>
3427
3428         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3429           different size for Alpha
3430         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3431
3432 2005-02-09 Raphael Neider <rneider AT web.de>
3433
3434         * src/SDCC.lex(doPragma) : save and restore warning options as well
3435           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3436         * have #pragma less_pedantic set the errorlevel to WARNING
3437           (fixes #1117001)
3438         * (cloneOptimize) : fixed wrong malloc's size
3439         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3440           facilitate correct handling of #pragma (save|restore)
3441
3442 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3443
3444         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3445
3446 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3447
3448         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3449
3450 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3451
3452         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3453
3454 2005-02-02 Raphael Neider <rneider AT web.de>
3455
3456         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3457         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3458         * (pic16_storeForReturn): fixed to allow returning function pointers
3459         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3460         * device/include/pic16/{stddef.h,stdbool.h}: added
3461
3462 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3463
3464         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3465
3466 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3467
3468         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3469         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3470          appeared to be required
3471
3472 2005-01-31 Borut Razem <borut.razem AT siol.net>
3473
3474         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3475           include/mcs51 and include/z80 directories to the package
3476
3477 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3478
3479         * src/hc08/gen.c (genFunction): fixed bug #1112752
3480
3481 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3482
3483         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3484
3485 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3486
3487         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3488
3489 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3490
3491         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3492
3493 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3494
3495         * device/include/c8051fxxx.h: removed these 6 files
3496         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3497
3498 2005-01-26 Raphael Neider <rneider AT web.de>
3499
3500         * src/pic16/gen.c (genAssign): fixed assignment from longs
3501           in codespace (were cut to three bytes)
3502         * (genDummyRead): implemented (except for CODESPACE...),
3503           fixed bug #1108575
3504         * src/pic16/glue.c (emitStatistics): beautified
3505         * device/lib/pic16/libm/Makefile: added include path
3506
3507 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3508
3509         * src/z80/gen.c (aopPut): fixed bug #1103902
3510
3511 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3512
3513         * device/lib/expf.c: fixed bug #1095792
3514
3515 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3516
3517         * device/lib/pic16/libm: added Math library sources
3518
3519 2005-01-24 Raphael Neider <rneider AT web.de>
3520
3521         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3522           to enable upcast to pCodeOpReg2 (there is no type tag to
3523           differenciate the two and pic16_popGet2p cast into PCOR2)
3524         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3525           (sizeof(sectNames) changed to sizeof(sectName))
3526           Both patches fix segfaults under MinGW.
3527
3528 2005-01-23 Raphael Neider <rneider AT web.de>
3529
3530         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3531           Safe_[mc]?alloc()'ed variables
3532         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3533           of (byte sized) temporaries (assign them to WREG for now)
3534         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3535           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3536           this might fix SIGSEGVs on MinGW...
3537         * src/SDCCopt.c (killDeadCode): restored original behaviour
3538           (volatile operands might get thrown away though)
3539
3540 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3541
3542         * src/pic16/gen.c: fixed bug #1106975,
3543         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3544         pointer update, INTCON is saved, global interrupts are disabled and
3545         restored after updateing TOS.
3546         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3547         * added function attribute 'shadowregs' to take advantage of shadow
3548         registers,
3549         * added function attribute 'wparam' as an alternative to the wparam
3550         pragma,
3551         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3552         user declares a non-ISR function as 'shadowregs',
3553         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3554
3555 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3556
3557         * .version: bumped version number to 2.4.8
3558         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3559         pic16 port,
3560         * device/lib/pic16/libio/i2c/: I2C module support library,
3561         * device/include/pic16/i2c.h: I2C support library header,
3562         * device/lib/pic16/libc/stdio/: standard IO support sources,
3563         * (printf_small.c): printf_small() source, supports float print,
3564         * (printf_tiny.c): printf_tiny() source, does not support floats,
3565         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3566         enable global optimizations for entire library source, other
3567         Makefiles in the source tree are also modified to reflect this,
3568         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3569         function,
3570         * doc/sdccman.lyx: updated to reflect new changes,
3571         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3572         sym->onStack if-case,
3573         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3574         sbit, idata, _idata, xdata, _xdata,
3575         * added pragma library, to link an external library, (see doc),
3576         * removed command line options, --pomit-config-words, --pomit-ivt,
3577         --pleave-reset-vector,
3578         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3579         when calling assembler to reflect memory model used, also define
3580         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3581         reflect stack model used,
3582         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3583         on stack return NULL,
3584
3585 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3586
3587         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3588           of the operands is volatile. Fixes #1020220
3589
3590 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3591
3592         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3593         * (OptimizeRegUsage): make sure that there is really no other flow where
3594           the first pCode is used
3595
3596 2005-01-22 Raphael Neider <rneider AT web.de>
3597
3598         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3599           to fix #1106967 (pCode->seq are not set up correctly)
3600
3601 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3602
3603         * src/SDCCglue.c (glue): make sure code area is declared before the
3604         static initialization area.
3605
3606 2005-01-21 Raphael Neider <rneider AT web.de>
3607
3608         * device/lib/Makefile.in: fixed test for pic16 install dir
3609         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3610           optimizations
3611         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3612           added --optimize-goto compiler switch and pragma wparam documentation
3613         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3614         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3615           and PRODH closing bug #1071770 (peephole optimizer)
3616
3617 2005-01-19 Raphael Neider <rneider AT web.de>
3618
3619         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3620           cmdLine buffers (used when calling sdcpp...) are large enough
3621           (MAX_PATH=256 truncates arguments leading to system halts when
3622           used in MinGW...)
3623         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3624         * (genUminus): rewritten to for efficiency
3625         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3626           used uninitialized in some cases)
3627         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3628           copy the third byte from the int -- now assumes 0x80 (data memory)
3629         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3630           operands (genAddLit expects the iCode's operands to swapped as
3631           well), fixed leftover bytes (crashed for short left operands)
3632         * (pic16_genMinusDec): performance improvements, removed false
3633           PIC14 emitSKPNCs
3634         * (pic16_genMinus): fixed to cope with differently sized operands
3635         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3636           for --obanksel > 1
3637         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3638         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3639           new banksel optimization
3640         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3641           analysis for temporary registers (segfaults...)
3642         * src/pic16/peeph.def: added rule
3643
3644 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3645
3646         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3647         which converts a float number to its ASCII representation
3648         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3649         functions to convert the fractional and integer part of a float to ASCII,
3650         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3651         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3652         ram
3653         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3654         _STATMEM macros,
3655         * device/include/pic16/adc.h: added GPL info,
3656         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3657         a pCodeOp as tested operand,
3658         * (genNearPointerGet): optimized bit testing, does not use
3659         intermediate register for bit value, test directly instead with
3660         BTFSS, BTFSC, works only for single bits,
3661         * (genpic16Code): dump the name of the iCode in the asm,
3662         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3663         renamed to pic16_decodeOp,
3664         * (serialRegAssign): do not allocate a temporary register for iCode
3665         sequences that test a single bit for 1/0
3666
3667 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3668
3669         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3670         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3671         access stack and frame pointers. They are initially assigned to
3672         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3673         accessing SFRs. Updated all occurences of modification of stack or
3674         frame pointer in gen.c and pcode.c,
3675         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3676         assigning of a literal value to pointers,
3677         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3678         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3679         selected
3680
3681 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3682
3683         * doc/sdccman.lyx: update documentation about stack pragma, added
3684         some info for stack memory models
3685
3686 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3687
3688         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3689
3690 2005-01-08 Raphael Neider <rneider AT web.de>
3691
3692         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3693           udata sections to fix bug #1097823
3694
3695 2005-01-05 Raphael Neider <rneider AT web.de>
3696
3697         * src/pic16/gen.c (genGenericShift): added handling of differently
3698           sized left operand and result
3699
3700 2005-01-04 Raphael Neider <rneider AT web.de>
3701
3702         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3703         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3704           to hold the condition bit)
3705         * added new version of genCmp (old code available via #define)
3706         * added new version of genShiftLeft/genShiftRight in a generic
3707           way, now supports shifting by negative values
3708         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3709           shiftCount (expected by genGenericShift)
3710         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3711         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3712           dump
3713         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3714           is an invalid literal too...)
3715
3716 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3717
3718         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3719         from Raphael Neider,
3720         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3721         for 8-bit literals. This fixes some literal operands which are sign
3722         extended to 16-bits ints when instruction needs only 8-bits.
3723
3724 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3725
3726         * device/lib/logf.c: added mcs51 assembly version
3727         * device/lib/expf.c: added mcs51 assembly version
3728         * device/lib/_logexpf.c: new shared asm code for expf and logf
3729         * device/include/math.h: add defines for assembly math library
3730         * device/lib/Makefile.in: build new _logexpf.c
3731         * device/lib/libfloat.lib: use new _logexpf.c
3732
3733 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3734
3735         * src/pic/device.c
3736         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3737           device types which have less than 0x7f registers.
3738
3739 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3740
3741         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3742
3743 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3744
3745         * device/lib/printf_fast.c: only build on supported arch.
3746         * device/lib/printf_tiny.c: only build on supported arch.
3747         * device/lib/printf_fast_f.c: only build if asm float lib
3748         * device/lib/_fsget1arg.c: only build if asm float lib
3749         * device/lib/_fsget2args.c: only build if asm float lib
3750         * device/lib/_fsnormalize.c: only build if asm float lib
3751         * device/lib/_fsreturnval.c: only build if asm float lib
3752         * device/lib/_fsrshift.c: only build if asm float lib
3753         * device/lib/_fsswapargs.c: only build if asm float lib
3754         * device/include/stdio.h: don't provide print_fast,
3755           print_fast_f, print_tiny prototypes if --xstack used
3756
3757 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3758
3759         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3760         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3761           to the SOURCES
3762
3763 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3764
3765         * device/lib/printf_fast_f.c: same as printf_fast, but
3766           with floating point enabled
3767         * device/lib/printf_fast.c: minor tweaks
3768         * device/include/stdio.h: add printf_fast_f
3769
3770 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3771
3772         * src/SDCCmain.c: make --float-reent default for mcs51
3773         * device/lib/_fsadd.c: added mcs51 assembly version
3774         * device/lib/_fssub.c: added mcs51 assembly version
3775         * device/lib/_fsmul.c: added mcs51 assembly version
3776         * device/lib/_fsdiv.c: added mcs51 assembly version
3777         * device/lib/_fseq.c: added mcs51 assembly version
3778         * device/lib/_fsneq.c: added mcs51 assembly version
3779         * device/lib/_fsgt.c: added mcs51 assembly version
3780         * device/lib/_fslt.c: added mcs51 assembly version
3781         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3782         * device/lib/Makefile.in: add _fscmp to build
3783         * device/lib/libfloat.lib: add _fscmp to build
3784
3785 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3786
3787         * device/lib/_fs2slong.c: added mcs51 assembly version
3788         * device/lib/_fs2sint.c: added mcs51 assembly version
3789         * device/lib/_fs2schar.c: added mcs51 assembly version
3790         * device/lib/_fs2ulong.c: added mcs51 assembly version
3791         * device/lib/_fs2uint.c: added mcs51 assembly version
3792         * device/lib/_fs2uchar.c: added mcs51 assembly version
3793         * device/lib/_slong2fs.c: added mcs51 assembly version
3794         * device/lib/_sint2fs.c: added mcs51 assembly version
3795         * device/lib/_schar2fs.c: added mcs51 assembly version
3796         * device/lib/_ulong2fs.c: added mcs51 assembly version
3797         * device/lib/_uint2fs.c: added mcs51 assembly version
3798         * device/lib/_uchar2fs.c: added mcs51 assembly version
3799         * device/include/float.h: added #define to select asm vs c
3800
3801 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3802
3803         * device/lib/printf_fast.c: improvements to float output
3804         * device/include/float.h: add defines for assembly float library
3805         * device/lib/_fsget1arg.c: receive 1 float arg
3806         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3807         * device/lib/_fsnormalize.c: normalize a float
3808         * device/lib/_fsreturnval.c: return float, various helper routines
3809         * device/lib/_fsrshift.c: right shift a float's mantissa
3810         * device/lib/_fsswapargs.c: swap 2 floats
3811         * device/lib/Makefile.in: build these 6 new files for mcs51
3812         * device/lib/libfloat.lib: add these 6 files to the library
3813
3814 2004-12-26 Borut Razem <borut.razem AT siol.net>
3815
3816         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3817           built by gcc 3.4.2
3818
3819 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3820
3821         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3822           and fully reentrant and register bank neutral.
3823         * device/lib/printf_fast.c: added float (not enabled by default),
3824           added compact/slower integer (also not enabled by default),
3825           improved size/speed of fast integer code, other minor changes
3826         * device/include/stdio.h, device/lib/Makefile.in,
3827           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3828
3829 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3830
3831         * src/pic16/pcode.c: declaring variables other than at the start of a
3832           block is not supported in C by VC6.
3833
3834 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3835
3836         * applied a previous patch from Raphael Neider that wasn't included
3837         in the previous commits, which fixes infinite loops within jumptable
3838         improvements,
3839         * made some fixes that previous patches introduced
3840
3841 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3842
3843         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3844         that fixes an issue with AOP_PCODE asmop's offset,
3845         * (pic16_popCopyReg): update instance field too,
3846         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3847         function of pic port,
3848         * (genCmp, genAnd, genAssign),
3849         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3850
3851 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3852
3853         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3854         variables initial values to idata section,
3855         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3856         variables in some functions. This utilizes parmBytes field of iCode
3857         structure to hold the offset of the variable in stack. (might be
3858         able to use the stack field too?)
3859         * applied patch from Raphael Neider # ### , # ###
3860         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3861         variable initial values in idata section,
3862         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3863         for static variables with initial value
3864         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3865         applied fix in while loop from Raphael Neider.
3866
3867 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3868
3869         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3870         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3871         * src/ds390/ralloc.c (serialRegAssign): spill bits
3872         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3873         * support/Util/SDCCerr.c,
3874         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3875         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3876         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3877
3878 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3879
3880         * device/include/sdcc-lib.h: inserted LGPL, added includes
3881           asm/ds390/features.h and asm/mcs51/features.h
3882         * device/include/asm/default/features.h,
3883         * device/include/asm/gbz80/features.h,
3884         * device/include/asm/z80/features.h: added empty _AUTOMEM
3885           and _STATMEM
3886         * device/include/asm/ds390/features.h,
3887         * device/include/asm/mcs51/features.h: added files with defines for
3888           _AUTOMEM and _STATMEM indicating automatic and static storage class
3889         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3890         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3891         * src/SDCCicode.c (geniCodeCast),
3892         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3893         * src/SDCCloop.c (loopInduction): removed unused variable lr
3894         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3895           to convertToFcall to include char modulo (RFE 1065037), added check
3896           if left operand is unsigned and use abs of literal value
3897         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3898           as it doesn't work after conversion from peephole.def to peephole.rul
3899         * src/mcs51/gen.c (toBoolean): added check for size,
3900           (genModOneByte): optimized code for signed char modulo a literal
3901           power of 2 (thanks to Hubert Sack),
3902           (genRRC): removed unnecessary "clr c",
3903           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3904         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3905           jump optimization,
3906           swapped rules 256.c and 256.d,
3907           extended 256.d by using new multiple checks (thanks Erik),
3908           added rules 256.e and 256.f,
3909           updated rule 261.a and 261.b to new generated code
3910         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3911
3912 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3913
3914         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3915           induction related bugs, including first part of bug #1074377
3916
3917 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3918
3919         * applied patch from bug-report #1076292,
3920         * applied patches for genAnd and Goto-optimizations for Raphael
3921         Neider,
3922         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3923         dump a less iCode information,
3924         * src/pic16/device.h (pic16_options_t): added field debgen,
3925         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3926         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3927         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3928         puclic,
3929         * (various functions): added macros FENTRY and FENTRY2 to functions,
3930         to emit function prologue,
3931         * (various functions): fixed indentation,
3932         * (genNearPointerGet): fixed loading of FSR0,
3933         * (genPackBits): applied patch from Raphael Neider to fix updating
3934         of FSR0 and touching only the modified bits,
3935         * src/pic16/genarith.c (various functions): added macros FENTRY to
3936         emit function prologue in comments,
3937         * src/pic16/pcode.h: added functions debugf2, debugf3,
3938         * src/pic16/ralloc.c: partial fix for packForPush caused
3939         segmentation fault,
3940
3941 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3942
3943         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3944           <stsp AT users.sourceforge.net> with reversed byte order
3945         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3946
3947 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3948
3949         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3950           bug #1074377
3951         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3952         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3953
3954 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3955
3956         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3957
3958 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3959
3960         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3961           conditions,
3962           (setFromConditionArgs): friendly operand parser for peephole rules,
3963           (operandBaseName, operandsNotRelated): new peephole condition
3964           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3965           architecture specific register naming into account, handles n-way
3966           comparisons, and supports quoted literals
3967         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3968
3969 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3970
3971         * src/mcs51/peeph.def: fixed bug #1076940
3972
3973 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3974
3975         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3976
3977 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3978
3979         Adding support for replacing ljmps with sjmps in jumptables
3980         generated for switch statements. For now you need to set the
3981         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3982         Now 4 algorithms for mcs51 jumptable generation are used:
3983         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3984         addresses loaded pc-relative for up to 112 cases and stack-pushing
3985         target addresses loaded with offset from dptr for up to 256 cases.
3986
3987         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3988         * src/mcs51/main.c: adapted constants for switch table generation
3989         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3990
3991 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3992
3993         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3994         * support/regression/tests/bug1057979.c: added test for bug 1073386
3995
3996 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3997
3998         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3999         compilers
4000
4001 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4002
4003         * src/pic16/device.h,
4004         * src/pic16/genarith.c,
4005         * src/pic16/glue.c,
4006         * src/pic16/main.c,
4007         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4008
4009 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4010
4011         Large cummulative patch for pic16 port.
4012         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4013         to call when a stack overflow occurs,
4014         * (malloc.h): added CVS Id tag,
4015         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4016         variable,
4017         * added libc directory. The current version of LibC contains string
4018         functions, ctype functions and macros and some functions of the
4019         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4020         be extensively tested in the future. Standard disclaimer here.
4021         Library is not automatically build yet. But one can build it by
4022         invoking 'make' inside the libc directory.
4023         * added ADC library under libio. Preliminary version yet.
4024
4025         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4026         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4027         aopForRemat() now and not by pic16_aopOp(),
4028         * (pic16_popGetTempReg): removed warning messgae when allocating
4029         temporary registers, its a buggy feature and will be removed,
4030         * (pic16_popGet): set register instance field in AOP_CRY,
4031         * (pic16_outBitC): fixed for results in size greater than 1,
4032         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4033         * (pic16_storeForReturn): optimized return of 0,
4034         * (genCmp): experimental code for new genCmp which uses PIC18's
4035         special compare&skip instructions. Initial tests fail some times
4036         with variables grater than 1 byte in size, so new code is disabled,
4037         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4038         a single bit,
4039         * (genCast): began a fix to optimize the casting of a bit to another
4040         bit, now assigning a bitfield to another bitfield will fail, sorry,
4041         * src/pic16/main.c: disabled the use of lr-support feature,
4042         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4043         * added some function prototypes, added function _debugf prototype,
4044         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4045         bits with offset (case PO_GPR_BIT),
4046         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4047         command line,
4048         * (isBankInstruction): modified to return 0 for no banking instruction,
4049         and 1 for banking instruction,
4050         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4051         caused stop processing pCodes after a inline assembly block,
4052         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4053         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4054         registers when it shouldn't,
4055         * src/pic16/ralloc.c (allocReg): add preliminary support for
4056         supporting a limited set of temporary registers,
4057
4058 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4059
4060         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4061           genDataPointerSet): ensure assignments always copy in MSB to LSB
4062           order,
4063           (loadRegFromAop): recognize CLRH optimization,
4064           (genFunction): optimize RECEIVE iCodes in reentrant functions
4065
4066 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4067
4068         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4069           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4070           selected.
4071         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4072         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4073           contiguous with data
4074
4075 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4076
4077         * device/lib/_gptrget.c (_gptrget),
4078         * device/lib/_gptrgetc.c (_gptrgetc),
4079         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4080           instead of sjmp to ret
4081         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4082           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4083
4084 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4085
4086         * .version: bumped version to 2.4.7
4087         * device/lib/_gptrget.c (_gptrget): is now _naked
4088         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4089         * device/lib/_gptrput.c (_gptrput): is now _naked
4090         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4091           (createFunction): fixed xstack
4092         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4093         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4094           or bit either,
4095           (geniCodeCritical): store original interrupt state in an iTemp bit
4096           var unless stack-auto
4097         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4098         * src/SDCCmain.c (setIncludePath): added include/target to search path
4099         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4100         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4101           prototype,
4102           (processFuncArgs): put bit vars in bit area
4103         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4104           unsaveRBank): fixed xstack,
4105           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4106           (genFunction, genEndFunction): fixed xstack,
4107           (genAssign): optimization don't walk backwards through mem
4108         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4109         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4110         * support/regression/Makefile: also make library (for stack-auto) when
4111           making "all" and added "test-mcs51-xstack-auto"
4112         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4113         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4114         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4115         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4116         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4117           make-library by MAKE_LIBRARY
4118         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4119           regression tests for xstack
4120         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4121         * support/regression/tests/critical.c: test for critical on mcs51
4122
4123 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4124
4125         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4126           built version of sdcc instead of installed version
4127
4128 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4129
4130         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4131         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4132           vprintf.c now
4133         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4134         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4135           WARNING: remove device/lib/build/z80/printf.o by hand when
4136           updating from previous build!
4137         * device/lib/z80/printf.c: updated comment
4138         * support/regression/tests/bug1057979.c: test all ports now
4139         * support/regression/tests/bug1065458.c: file added
4140
4141 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4142
4143         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4144           *_start and *_end symbols for static functions
4145
4146 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4147
4148         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4149           and search crt0.o in all library paths,
4150           (setIncludePath): proper handling of --nostdinc,
4151           (setLibPath): proper handling of --nostdlib
4152         * support/regression/Makefile,
4153         * support/regression/ports/ds390/spec.mk,
4154         * support/regression/ports/gbz80/spec.mk,
4155         * support/regression/ports/hc08/spec.mk,
4156         * support/regression/ports/mcs51/spec.mk,
4157         * support/regression/ports/mcs51-large/spec.mk,
4158         * support/regression/ports/mcs51-stack-auto/spec.mk,
4159         * support/regression/ports/z80/spec.mk: use include and lib files from
4160           built version of sdcc instead of installed version
4161         * doc/sdccman.lyx: fixed typo in --nostdinc
4162
4163 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4164
4165         * src/pic/pcode.c,
4166         * src/pic/device.c,
4167         * src/pic/ralloc.c,
4168         * src/pic/gen.c : added support to generate code for struct bit fields.
4169
4170 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4171
4172         * as/xa51/xa_version.h,
4173         * device/include/errno.h,
4174         * device/include/regc515c.h,
4175         * device/lib/_itoa.c,
4176         * device/lib/_ltoa.c,
4177         * device/lib/ser_ir_cts_rts.c,
4178         * sim/ucsim/xa.src/glob.cc,
4179         * sim/ucsim/xa.src/inst_gen.cc,
4180         * sim/ucsim/xa.src/xa_bit.cc,
4181         * sim/ucsim/xa.src/xa_sfr.cc,
4182         * sim/ucsim/z80.src/inst_dd.cc,
4183         * sim/ucsim/z80.src/inst_fdcb.cc,
4184         * support/scripts/keil2sdcc.pl,
4185         * src/pic16/pic16.dsp,
4186         * src/pic16/pic16a.dsp: corrected cvs line endings
4187         * device/lib/printf_large.c: fixed bug 1057979
4188         * src/pic16/gen.c: fixed non-C standard code
4189         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4190         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4191         * support/regression/ports/mcs51/support.c: reload T1 asap
4192         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4193           pdata use and clear idata startup behaviour
4194         * support/regression/tests/bug1057979.c: added
4195
4196 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4197
4198         * device/examples/ds390/ow390/ad26.h,
4199         * device/examples/ds390/ow390/cnt1d.h,
4200         * device/examples/ds390/ow390/crcutil.c,
4201         * device/examples/ds390/ow390/ownet.h,
4202         * device/examples/ds390/ow390/owsesu.c,
4203         * device/examples/ds390/ow390/swt12.h,
4204         * device/examples/ds390/ow390/swtoper.c,
4205         * device/examples/ds390/ow390/temp10.h,
4206         * device/examples/ds390/ow390/thermodl.c,
4207         * device/examples/ds390/tinitalk/tinitalk.dsp,
4208         * device/examples/ds390/tinitalk/tinitalk.dsw,
4209         * device/examples/mcs51/clock/hw.h,
4210         * device/examples/mcs51/simple2/go.bat,
4211         * device/examples/serialcomm/windows/serial.h,
4212         * device/examples/xa51/dummy.c,
4213         * device/examples/xa51/hello.c,
4214         * device/include/80c51xa.h,
4215         * device/include/at89x051.h: corrected cvs line endings
4216
4217 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4218
4219         * src/pic16/main.c (options): added command line --gstack, to trace
4220         stack over/under flows,
4221         * added pragma 'wparam' to allow passing first byte of function
4222         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4223         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4224         call to __gstack_test function and sets up the symbol as extern,
4225         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4226         * popaop): added call to pic16_testStackOverflow,
4227         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4228         wparamList list,
4229         * (genCall, genPcall): now all parameters are passed via stack
4230         except in functions that are pass to wparam pragma in which WREG is
4231         used too,
4232         * (genPcall): REENTRANT flag is checked to see if variable prototype
4233         contains reentrant keyword, don't call a non-reentrant function, via
4234         a reentrant function pointer or vice versa, functions are never
4235         passed via WREG,
4236         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4237         D.Winkler,
4238         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4239         SIGSEGV when accessing a NULL register stucture,
4240         * (pic16_printGPointerType): modified to handle UPPER modifier for
4241         function initializers, changed prototype of function to simpler one,
4242         * (pic16_printIvalFuncPtr): check to see if function is already
4243         added in externs list,
4244         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4245         optimized a move from W to SFR with a move to the same register
4246         later after a CALL,
4247         * device/lib/pic16/debug: NEW directory, contains debug features
4248         which are enabled when linking with libdebug.lib, currently command
4249         line option --gstack enables stack pointer tracing for over/under
4250         flow, corresponding sources are in debug/gstack
4251
4252 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4253
4254         * doc/sdccman.lyx: updated SDCC version,
4255         * (PIC16 port): update list of command line options,
4256         * src/pic16/device.h (structure pic16_options_t): added field gstack
4257         to enable stack overflow tracing on push/pops,
4258         * src/pic16/device.c (statistics structure): added statistics
4259         structure,
4260         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4261         pic16_dump_int_registers): increase statistics counters for each
4262         * variable which is encountered
4263         * (pic16_dump_usection): emit each .udata variable to its own udata
4264         section,
4265         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4266         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4267         parameters via stack, otherwise use old scheme,
4268         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4269         assembler output file,
4270         * src/pic16/main.c: added command line options --gstack to enable
4271         push/pop tracing for stack overflow,
4272         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4273         instructions): added size of each instruction,
4274         * (pic16_countInstruction): estimate size of instructions in
4275         the_pFile list, inline assembly blocks are not counted,
4276         * (pic16_FixRegisterBanking): trace previous register usage, when
4277         banksel optimizations is greater than 0, don't emit a redudant
4278         banksel directive,
4279
4280 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4281
4282         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4283         * src/pic16/ralloc.c : applied same fix for pic16.
4284         * src/pic/gen.c : tidied it up a little.
4285
4286 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4287
4288         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4289         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4290
4291 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4292
4293         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4294
4295 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4296
4297         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4298         non-reentrant function __modsint in the interrupt function (thus
4299         corrupting math operations during serial I/O)
4300         * device/lib/ser_ir.c: as above, changed buffersize
4301         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4302         256.c,d for zeroing
4303         * doc/Makefile: added option -t for rsync
4304
4305 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4306
4307         * src/SDCCast.h (struct ast),
4308         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4309
4310 2004-10-20 Borut Razem <borut.razem AT siol.net>
4311
4312         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4313         package
4314
4315 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4316
4317         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4318         makefile targets,
4319         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4320         support functions to replace long sequences of MOVFF's from access
4321         bank registers to stack and vice versa,
4322         * src/pic16/device.h: added new field opt_flags, where optimization
4323         flags can be set to enable certain features,
4324         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4325         * pBlock, (genFunction, genEndFunction): surroung loop for
4326         saving/loading used registers in stack with PC_INFO pCodes,
4327         INF_LREGS. Code in between can then be optimized by pCode optimizer
4328         to support function calls,
4329         * (genDataPointerSet): fixed bug which loaded float fields in
4330         structures with corrupt data,
4331         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4332         in a standard way debug info on stderr. Feature used for developing
4333         and debugging only,
4334         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4335         obsolete chunks of code,
4336         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4337         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4338         * pic16/src/pcode.c (pic16_newpCodeInfo,
4339         * (pic16_newpCodeOpLocalRegs),
4340         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4341         feature,
4342         * (pic16_pCodeConstString): printing of the initial value of a
4343         symbol as a comment is inhibited since parsing was already done by
4344         copyStr and output is corrupt,
4345         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4346
4347 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4348
4349         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4350
4351 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4352
4353         * as/mcs51/lkarea.c: removed old K&R style,
4354           (lnksect): changed check on boundary error,
4355           (lnksect2): changed check on boundary error,
4356           (lnksect2): extend XSTK to end of page if size = 1
4357         * as/mcs51/lkmain.c: removed old K&R style,
4358           (Areas51): create l_IRAM symbol
4359         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4360         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4361           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4362         * device/lib/_mullong.c: added version to be compiled with xstack
4363         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4364         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4365         * device/lib/mcs51/crtxstack.asm: fixed comment
4366         * src/SDCCglue.c: maxInterrupts defaults to 0,
4367           (emitMaps): added pdata,
4368           (createInterruptVect): (re)moved default,
4369           (glue): added pdata,
4370           (glue): moved __start__xstack to XSTK with default size 1
4371         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4372           and options.float_rent when options.stackAuto is set,
4373           (linkEdit): only write XDATA_NAME if provided on command line
4374         * src/SDCCmem.h,
4375         * src/SDCCmem.c: added pdata
4376         * src/port.h: added pdata_name to PORT
4377         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4378           (saveRegisters, unsaveRegisters): removed usage of B,
4379           (genMinus): fixed accumulator clash,
4380           (genJumpTab): added comment, this needs another look
4381         * src/mcs51/gen.c: added check for "B in use" paranoia,
4382           added pushB() and popB()
4383         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4384           chance
4385         * src/avr/main.c,
4386         * src/ds390/main.c,
4387         * src/hc08/main.c,
4388         * src/mcs51/main.c,
4389         * src/pic/main.c,
4390         * src/pic16/main.c,
4391         * src/xa51/main.c,
4392         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4393           added PSEG (PAG,XDATA) or NULL to port specifier
4394         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4395         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4396           (_mcs51_genInitStartup): removed __start__xstack equ,
4397           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4398         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4399         * src/z80/gen.c (_rleAppend): fixed warnings
4400         * support/regression/tests/zeropad.c: added pdata test
4401         * .version: bumped to 2.4.6
4402
4403 2004-10-17 Borut Razem <borut.razem AT siol.net>
4404
4405         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4406         as a part of nightly build
4407
4408 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4409
4410         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4411         WREG holds the first byte function parameters,
4412         * (aopForSym): take special case for symbols which are in FARSPACE
4413         but in CODESPACE too,
4414         * (assignResultValue): modified to take into account _G.useWreg,
4415         * (genCall): don't use wreg for parameter passing when function is
4416         declared as reentrant, too, added optimization INCF to stack
4417         pointer when stack parameter count is 1,
4418         * (genFunction, genEndFunction): refurnished and fixed to not using
4419         wreg for passing parameters when function has varargs or is
4420         reentrant, fixed bug with symbol name compare for generating
4421         functions in absolute address,
4422         * (pic16_storeForReturn): refurnished,
4423         * (genCmp): began writing a new version of the function, not ready
4424         yet, therefore it is disabled,
4425         * (genAssign): do not read code memory when assigning a function to
4426         a pointer function,
4427         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4428         array of characters, not pointer,
4429         * (pic16initialComments): in debug mode emit an .ident directive for
4430         the assembler,
4431         * (_process_pragma): emit a new warning type (internal to pic16)
4432         when setting stack to default length, emit a similar warning when
4433         placing a function at absolute address and address is not word aligned
4434         * (_pic16_parseOptions): added 'return TRUE' statement,
4435         * (_pic16_linkEdit): if compiling a source, then add the source's
4436         file object, first in the list of objects to link,
4437
4438 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4439
4440         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4441         * src/pic/main.c : removed VC warning.
4442         * src/pic/gen.c : changed comment.
4443
4444 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4445
4446         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4447         reference to a deprecated symbol _GPTRREG was causing failure to
4448         link. Thanks G. M. Gallant for the info.
4449
4450 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4451
4452         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4453         comments for Bugs item #954788.
4454
4455 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4456
4457         * src/pic16/device.c (pic16_dump_gsection,
4458         * pic16_groupRegistersInSection): handle symbols declared to be in
4459         access bank differently,
4460         * src/pic16/gen.c (struct _G): added field resDirect,
4461         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4462         send values read from stack directly to result and don't allocate
4463         temporary values,
4464         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4465         same registers,
4466         * (pic16_sameRegsOfs): NEW,
4467         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4468         free because they were not allocated from temporary pool,
4469         * pic16_popRegFromString): workaround to fix a problem with
4470         allocating variables twice or never,
4471         * (genGenPointerGet): using PRODL instead of FSR0H,
4472         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4473         instead of FSR0H,
4474         * (genAssign): take advantage of the _G.resDirect flag,
4475         * (genCast): around line 11844, use mov2f instead of directly
4476         MOVFF'ing between operands to account for literal values,
4477         * src/pic16/genutils.c: some new debug functions for gpsim have been
4478         added,
4479         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4480         float with integer part only,
4481         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4482         place variables in access bank
4483         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4484         updated sources to reflect recent changes in gen.c
4485
4486 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4487
4488         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4489         sources that searched for headers in installation path, now the
4490         device/include/pic16 is used,
4491         * src/pic16/glue.c (pic16glue),
4492         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4493         .line directives if not in debug mode, this suppresses assembler's
4494         warnings for ignored directives
4495
4496 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4497
4498         * src/port.h: made reset_regparms prototype void parameter explicit.
4499         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4500         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4501         * doc/sdccman.lyx: documented warning disabling and how to use
4502           printf_large to make it print floats.
4503         * device/include/stdbool.h: NEW
4504         * device/lib/_atof.c,
4505         * device/lib/_divuint.c,
4506         * device/lib/_divulong.c,
4507         * device/lib/expf.c,
4508         * device/lib/printf_large.c,
4509         * device/lib/sincosf.c,
4510         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4511         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4512           a completely reentrant lib.
4513
4514 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4515
4516         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4517         * device/include/pic16/stdio.h: fixed bug with colon
4518
4519 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4520
4521         * device/include/pic16/stdio.h,
4522         * device/include/pic16/stdlib.h,
4523         * device/include/pic16/math.h: NEW
4524         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4525         declared as _naked to reduce overhead
4526         * device/lib/Makefile.in (target port-specific-objects-pic16):
4527         changed * to *.* so to ignore the CVS directory,
4528         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4529         stacked variables back in stack,
4530         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4531         corruption
4532
4533 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4534
4535         * .version: bumped version number to 2.4.5
4536         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4537         * support/Util/SDCCerr.c (messages structure): added entry for
4538         W_POSSBUG2
4539
4540         Large cumulative patch for pic16 port and libraries.
4541         * device/include/pic16/sdcc-lib.h,
4542         * device/include/pic16/stdarg.h,
4543         * device/include/asm/pic16/features.h,
4544         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4545         * device/include/pic16/float.h: changes reentrant keyword with
4546         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4547         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4548         updated target build-libraries to include objects from gptr,
4549         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4550         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4551         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4552         all function headings,
4553         * src/SDCCmain.c: added global parameter userIncDirsSet,
4554         * (parseCmdLine): when option -I is encountered add directory to
4555         userIncDirsSet too,
4556         * src/version.awk: added space between control and long,
4557         * src/pic16/NOTES: added some notes for the port,
4558         * src/pic16/gen.c: added prototype for mov2fp function,
4559         * (fReturnpic16[]): properly named return value registers,
4560         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4561         * (aopForSym): added code to handle symbols with onStack flag set,
4562         symbols onStack are allocated PTRSIZE bytes,
4563         * (aopFreeAsmop): handles special case where asmops are stack objects,
4564         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4565         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4566         added argument lock to trace flaws in allocating temporary registers
4567         when developing port,
4568         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4569         * (pic16_popRegFromString): reenabled allocating a direct register
4570         from string,
4571         * (assignResultValue): various beautifications,
4572         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4573         referenced function argument,
4574         * (genIpush): reenabled to allow stacked arguments, handles only
4575         ic->parmPush iCodes,
4576         * (genCall, genPcall): major changes to allow for variable argument
4577         functions, fixed a bug with falsely restoring stack pointer after
4578         returning from call,
4579         * (genFunction): pending code for critical function,
4580         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4581         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4582         * (genNearPointerGet): fixed bug with indirect reading, was always
4583         reading from INDF0
4584         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4585         pointers,
4586         * (genAddrOf): rewrote code to take address of a stacked function parameter
4587         * (genCast): fixed casting to generic pointer type,
4588         * src/pic16/gen.h: added AOP_STA,
4589         * (struct asmop): added field stk,
4590         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4591         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4592         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4593         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4594         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4595         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4596         generic pointers,
4597         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4598         and library paths,
4599         * (pic16_port structure): generic pointer size is set to 3,
4600         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4601         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4602         compiler warning,
4603         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4604         operand is an iTemp,
4605
4606 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4607
4608         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4609         * debugger/mcs51/simi.c: addapt new syntax of s51
4610
4611 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4612
4613         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4614         * src/pic16/pcode.c: commented out some calls to free() in order to
4615         fix bug #989576,
4616
4617 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4618
4619         * src/SDCCicode.h,
4620         * src/SDCCicode.c (isiCodeInFunctionCall),
4621         * src/avr/ralloc.c (selectSpil),
4622         * src/pic/ralloc.c (selectSpil),
4623         * src/pic16/ralloc.c (selectSpil),
4624         * src/ds390/ralloc.c (selectSpil),
4625         * src/hc08/ralloc.c (selectSpil),
4626         * src/xa51/ralloc.c (selectSpil),
4627         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4628         stack in the middle of a function call sequence (fixes bug #1020268)
4629         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4630         costs associated with the minimum switch case.
4631
4632 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4633
4634         * src/SDCC.lex: fixed bug #1030549
4635
4636 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4637
4638         * src/SDCCcse.h (struct cseDef),
4639         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4640         over a function call if the CSE is derived from a symbol whose
4641         address has been taken (fixes bug #1029883)
4642         * support/regression/tests/bug-1029883: a new regression test for
4643         this bug
4644
4645 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4646
4647         * src/hc08/gen.c (emitinline): fixed bug #1029778
4648         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4649         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4650         and starts toward RFE #905167)
4651
4652 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4653
4654         * src/pic16/gen.c (mov2f): New function to move an operand to
4655         another without considering if it is a literal or a register,
4656         * (pic16_sameRegs): don't check if they are both AOP_REG,
4657         * (AccRsh): removed andmask=0 lines,
4658         * (genLeftShift): duplicated to be improved in future versions,
4659         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4660         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4661         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4662         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4663         * (insertBankSwitch): fixed inserting banksel directives algorithm
4664         for instructions that follow a skip instruction, this fixes a report
4665         for broken subtraction code generation,
4666         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4667         iCode is a left op, just in case result and right share the same
4668         registers
4669
4670 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4671
4672         * src/hc08/main.c,
4673         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4674         preservation of HX
4675         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4676         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4677         on 2004-09-12; it was buggy
4678
4679 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4680
4681         * src/SDCCsymt.h: removed RESULT_CHECK
4682         * src/SDCCast.c,
4683         * src/SDCCglue.c,
4684         * src/SDCCval.c,
4685         * src/pic/glue.c,
4686         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4687
4688 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4689
4690         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4691         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4692         configuration values no more rejected by compiler, they are assigned
4693         to configuration registers with a warning message instead,
4694         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4695         the for-loop so last conf register is emitted too,
4696         * (_pic16_initPaths): link library libsdcc.lib by default,
4697         * (_hasNativeMulFor): modified test for multiplication according to
4698         Raphael Neider's remarks. Integer multiplication is also done with
4699         support functions,
4700         * device/include/pic16/pic18fregs.h: corrected type error in while
4701         testing and including 18f6720 header file
4702
4703 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4704
4705         * src/pic16/device.h (pic16_options): removed field use_crt,
4706         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4707         until an optimization to handle single bits is added,
4708         * (pic16_loadFSR0): moved before genUnpackBits,
4709         * (genAnd): some white lines removed,
4710         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4711         leave_reset flags in pic16_options when using crt modules,
4712
4713 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4714
4715         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4716           for bugs 898889 & 979599. Also used some safer print instructions.
4717
4718 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4719
4720         * src/pic16/device.h (pic16_options_t): added field use_crt,
4721         crt_name, no_crt,
4722         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4723         catch a probable future bug,
4724         * src/pic16/gen.c: aopIdx function commented out,
4725         * (genAssign): commented out old code which used aopIdx,
4726         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4727         code, added if conditionals to take into account the --use-crt
4728         command line options,
4729         * src/pic16/main.c (pic16_optionsTable): added new command line
4730         options, --use-crt= and --no-crt,
4731         * (_pic16_linkEdit): now the proper crt object is added in the
4732         linker command line except than when --no-crt is specified,
4733         * src/pic16/pcode.c,
4734         * src/pic16/pcode.h: added some structures and functions for a new
4735         optimization scheme to compansate for instruction overhead between
4736         same iCodes, this scheme is currently under development and is not
4737         working in any way,
4738         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4739         to && operator,
4740         * device/lib/pic16/startup/crt0i.c,
4741         * device/lib/pic16/startup/crt0iz.c: added global char variable
4742         __uflags to force the generation of an idata section
4743
4744 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4745
4746         * doc/Makefile,
4747         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4748         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4749
4750 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4751
4752         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4753         Frieder) and clarified the default code optimization mode
4754
4755 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4756
4757         * src/SDCC.lex (doPragma, process_pragma),
4758         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4759         "opt_code_size", and "opt_code_balanced"
4760         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4761         regrouped options by category, added support for category headers
4762         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4763         and "--opt-code-size"
4764         * doc/sdccman.lyx: documented these new options and pragmas
4765         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4766         preference into account
4767
4768 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4769
4770         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4771           geniCodePreDec): Fixed bug 904237 by generating a warning
4772         * src/SDCCerr.h,
4773         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4774
4775 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4776
4777         * src/pic/device.c : When no max ram set validate full memory range.
4778         * src/pic/pcode.c,
4779         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4780
4781 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4782
4783         * device/lib/_gptrget.c,
4784         * device/lib/_gptrput.c: updated comment
4785         * device/lib/calloc.c,
4786         * device/lib/free.c,
4787         * device/lib/malloc.c,
4788         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4789         * src/SDCCcse.c (cseBBlock),
4790         * src/SDCCicode.c (printOperand, geniCodeArray),
4791         * src/SDCCicode.h (struct operand): fixed bug 868103
4792         * support/regression/tests/bug-868103.c: added
4793         * src/SDCCast.c (searchLitOp),
4794         * src/SDCCcse.h (struct cseDef),
4795         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4796         * src/SDCCicode.h (struct operand),
4797         * src/SDCCsymt.h (struct sym_link),
4798         * src/avr/gen.c (hasInc),
4799         * src/ds390/gen.c (hasInc),
4800         * src/hc08/gen.c (genPlusIncr, hasInc),
4801         * src/mcs51/gen.c (hasInc),
4802         * src/pic16/glue.c (pic16_printIvalChar),
4803         * src/pic16/ralloc.c (regWithIdx),
4804         * src/xa51/gen.c (hasInc) : removed warnings
4805         * src/SDCCast.c (createBlock): added comment ???
4806         * src/hc08/ralloc.c: updated comments
4807
4808 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4809
4810         * doc/sdccman.lyx: updated section on switch statements, added
4811         section about semaphore locking
4812         * doc/Makefile: added option -info for latex2html
4813         * device/lib/_gptrget.c,
4814         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4815
4816 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4817
4818         * src/pic/device.h,
4819         * src/pic/device.c,
4820         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4821          maxram is less than 0x100.
4822
4823 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4824
4825         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4826
4827 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4828
4829         * src/port.h,
4830         * src/mcs51/main.c,
4831         * src/ds390/main.c,
4832         * src/z80/main.c,
4833         * src/hc08/main.c,
4834         * src/pic/main.c,
4835         * src/pic16/main.c,
4836         * src/avr/main.c,
4837         * src/xa51/main.c
4838         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4839         a jump table is the best form for a switch statement, including
4840         automatic insertion of missing cases to make the case range
4841         continuous. Developed in collaboration with Frieder Ferlemann.
4842
4843 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4844
4845         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4846         accumulator result if it needs sign extension
4847
4848 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4849
4850         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4851
4852 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4853
4854         * device/lib/gbz80/printf.c,
4855         * device/lib/z80/printf.c: removed define for NULL
4856
4857 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4858
4859         * as/xa51/xa_link.c,
4860         * device/examples/ds390/ow390/ad26.c,
4861         * device/examples/ds390/ow390/cnt1d.c,
4862         * device/examples/ds390/ow390/counter.c,
4863         * device/examples/ds390/ow390/ds2480.h,
4864         * device/examples/ds390/ow390/ds2480ut.c,
4865         * device/examples/ds390/ow390/findtype.c,
4866         * device/examples/ds390/ow390/gethumd.c,
4867         * device/examples/ds390/ow390/owllu.c,
4868         * device/examples/ds390/ow390/ownetu.c,
4869         * device/examples/ds390/ow390/swt12.c,
4870         * device/examples/ds390/ow390/swtloop.c,
4871         * device/examples/ds390/ow390/temp.c,
4872         * device/examples/ds390/ow390/temp10.c,
4873         * device/examples/ds390/ow390/thermo21.c,
4874         * device/examples/ds390/ow390/tinilnk.c,
4875         * device/examples/ds390/ow390/tstfind.c,
4876         * device/examples/serialcomm/windows/serial.cpp,
4877         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4878         * device/include/reg51.h: fixed line endings for cvs
4879
4880 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4881
4882         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4883         packRegsForAccUse, packRegisters): new accumulator register
4884         packing algorithm
4885         * support/regression/ports/hc08/support.c (_putchar): suppress
4886         warning of unused variable
4887         * src/SDCCicode.c: added SWAP entry to codeTable
4888
4889 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4890
4891         * device/lib/sprintf.c: forgot to add this file before previous commit
4892
4893 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4894
4895         * src/pic16/gen.c (genPackBits): added operand right in function
4896         parameters, load result directly if p_type is POINTER (that is
4897         called by genNearPointerSet)
4898         * (genUnPackBits): added operand left in function parameters,
4899         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4900         FSR0 if accessing bitfields,
4901
4902 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4903
4904         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4905           _print_format; updated printf, sprintf, vsprintf
4906         * device/include/asm/default/features.h: corrected comment/define
4907         * device/lib/Makefile.in: added sprintf.c
4908         * device/lib/libsdcc.lib: added sprintf module
4909         * device/lib/printf_large.c,
4910         * device/lib/vprintf.c,
4911         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4912           into these 3 files
4913         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4914         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4915         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4916           hc08 test
4917         * support/regression/tests/zeropad.c: define idata as data for hc08
4918
4919 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4920
4921         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4922         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4923         labels are referenced at least once (even if a reference is not found)
4924         * src/hc08/gen.c (emitcode): set isComment flag for comments
4925         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4926         loads), rules 6a..6b (optimize jumps to return)
4927
4928 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4929
4930         * device/lib/acosf.c (acosf),
4931         * device/lib/asinf.c (asinf),
4932         * device/lib/atanf.c (atanf),
4933         * device/lib/ceilf.c (ceilf),
4934         * device/lib/cosf.c (cosf),
4935         * device/lib/coshf.c (coshf),
4936         * device/lib/cotf.c (cotf),
4937         * device/lib/fabsf.c (fabsf),
4938         * device/lib/floorf.c (floorf),
4939         * device/lib/log10f.c (log10f),
4940         * device/lib/logf.c (logf),
4941         * device/lib/sinf.c (sinf),
4942         * device/lib/sinhf.c (sinhf),
4943         * device/lib/sqrtf.c (sqrtf),
4944         * device/lib/tanf.c (tanf),
4945         * device/lib/tanhf.c (tanhf),
4946         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4947         replaced all instances of "reentrant" in the library functions
4948         defined in math.h with this macro.
4949         * support/regression/tests/float_trans.c: reenabled test for hc08
4950
4951 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4952
4953         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4954         erroneously deleted
4955
4956 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4957
4958         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4959         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4960         multi-byte volatile operands are used
4961         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4962         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4963         initialization to area GSINIT0 so that it would always precede
4964         any static initializers in GSINIT
4965         * support/regression/tests/zeropad.c: fixed idata define for hc08
4966         * support/regression/tests/bug-927659.c,
4967         * support/regression/tests/float_trans.c: disabled tests for hc08
4968         pending missing library routines
4969         * .version: increased version number to 2.4.4 - hc08 port now passes
4970         regression tests
4971
4972
4973 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4974
4975         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4976         * Makefile.common.in,
4977         * as/Makefile,
4978         * as/hc08/Makefile.in,
4979         * as/mcs51/Makefile.in,
4980         * as/z80/Makefile.in,
4981         * debugger/mcs51/Makefile.in,
4982         * device/include/Makefile.in,
4983         * device/lib/Makefile.in,
4984         * doc/Makefile,
4985         * link/Makefile,
4986         * link/z80/Makefile.in,
4987         * packihx/Makefile.in,
4988         * sim/ucsim/main_in.mk,
4989         * sim/ucsim/avr.src/Makefile.in,
4990         * sim/ucsim/doc/Makefile.in,
4991         * sim/ucsim/gui.src/serio.src/Makefile.in,
4992         * sim/ucsim/hc08.src/Makefile.in,
4993         * sim/ucsim/s51.src/Makefile.in,
4994         * sim/ucsim/xa.src/Makefile.in,
4995         * sim/ucsim/z80.src/Makefile.in,
4996         * src/Makefile.in,
4997         * support/cpp2/Makefile.in,
4998         * support/librarian/Makefile,
4999         * support/makebin/Makefile: added DESTDIR to the install path proposed
5000         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5001         * doc/sdccman.lyx: added DESTDIR documentation
5002
5003 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5004
5005         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5006         instruction for interrupt handlers, use fast returns when returning
5007         from high priority interrupts
5008
5009 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5010
5011         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5012         code generation
5013         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5014         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5015         bugs, ported much of Bernhard's code from mcs51
5016         * src/mcs51/gen.c (genSend),
5017         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5018         than one when calling a reentrant function
5019         * device/lib/_mullong.c: defined an alternate struct layout for big
5020         endian ports (hc08)
5021
5022 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5023
5024         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5025         test
5026
5027 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5028
5029         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5030         are sane and complete before asking the port its prefered parameter
5031         passing method (fixes bug #1017633)
5032         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5033         and _ret3
5034
5035 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5036
5037         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5038         problem in bitfields >= 8 bits.
5039
5040 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5041
5042         * src/SDCCsymt.c: undid changes that were not meant to be committed
5043
5044 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5045
5046         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5047
5048 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5049
5050         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5051           copied and wrong bit got inverted
5052
5053 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5054
5055         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5056         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5057         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5058         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5059         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5060         assignments to bitfields at known addresses
5061         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5062         reads from bitfields at known addresses
5063         * src/hc08/ralloc.c (packRegisters),
5064         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5065         genhc08Code): optimize pointer get values used as conditionals
5066         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5067         and branch
5068
5069 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5070
5071         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5072         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5073         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5074         as conditionals
5075
5076 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5077
5078         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5079
5080 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5081
5082         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5083         related problems
5084
5085 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5086
5087         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5088
5089 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5090
5091         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5092         mcs51 port
5093
5094 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5095
5096         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5097
5098 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5099
5100         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5101         cases use more compact code.
5102
5103 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5104
5105         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5106
5107 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5108
5109         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5110
5111 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5112
5113         * src/SDCCsymt.h,
5114         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5115         parameter of changePointer() from symbol* to sym_link*
5116         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5117         * src/SDCCsymt.c (compareType): void* type is castable to other
5118         pointers, but not necesarily an exact match.
5119         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5120         is no longer blindly treated as an exact match.
5121         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5122
5123 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5124
5125         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5126
5127 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5128
5129         * src/pic/gen.c,
5130         * src/pic/pcode.c,
5131         * src/pic/ralloc.h,
5132         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5133
5134 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5135
5136         * src/pic/device.c,
5137         * src/pic/device.h,
5138         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5139
5140 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5141
5142         * src/mcs51/gen.c (emitcode): fixed bug #992819
5143
5144 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5145
5146         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5147           there's no need to make it worse
5148
5149 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5150
5151         * src/mcs51/ralloc.c (deassignLR),
5152         * src/ds390/ralloc.c (deassignLR),
5153         * src/hc08/ralloc.c (deassignLR),
5154         * src/z80/ralloc.c (deassignLR),
5155         * src/pic/ralloc.c (deassignLR),
5156         * src/pic16/ralloc.c (deassignLR),
5157         * src/avr/ralloc.c (deassignLR),
5158         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5159         rlivePoint): fixed another part of bug #971834
5160
5161 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5162
5163         * src/z80/main.c: enabled "critical" keyword
5164         * src/z80/mappings.i,
5165         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5166         functions (fixes bug #979646)
5167         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5168
5169 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5170
5171         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5172           such as c:\mydir.
5173
5174 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5175
5176         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5177           doesn't disable too much optimizations
5178
5179 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5180
5181         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5182
5183 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5184
5185         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5186
5187 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5188
5189         * src/pic/gen.c tidied up tabs
5190         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5191         * src/pic/main.c tidied up tabs
5192         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5193         * src/pic/pcoderegs.c tidied up tabs
5194         * src/pic/ralloc.c tidied up tabs
5195
5196 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5197
5198         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5199         to S_FIXED for pic16 port and when symbol is not in level 0,
5200         allocate for S_REGISTER storage class and pic16 port, too,
5201         * src/pic16/device.h: prototype for checkSym,
5202         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5203         * (pic16_assignConfigWordValue): test the value and the mask to
5204         validate that the value is suitable for the configuration word,
5205         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5206         collect extern declared symbols, don't emit symbol twice, check
5207         first if symbol is in publics set first,
5208         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5209         * added command line '--fstack' which enables an experimental
5210         feature for stack access, too buggy to be used yet...
5211         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5212         * (pic16_allocDirReg): when register has storage class S_REGISTER
5213         allocate in pic16_dynAccessRegs,
5214         * device/include/pic16/pic18f????.h: modified configuration word
5215         naming convention, words started as CONFIG0H but should be CONFIG1H
5216
5217 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5218
5219         * device/include/mcs51reg.h: fixed bug 970993
5220
5221 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5222
5223         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5224         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5225         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5226         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5227         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5228         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5229           error/warning numbers,
5230           added function setWarningDisabled()
5231         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5232         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5233           _memcmp.c _memmove.c calloc.c realloc.c free.c
5234         * support/regression/tests/malloc.c: added tests for new functionality
5235         * support/regression/tests/zeropad.c: added tests for truncated initializers
5236           and initialized char arrays starting with '\x0'
5237         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5238
5239 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5240
5241         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5242
5243 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5244
5245         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5246         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5247         peephole 177.e. Thanks to anonymous
5248
5249 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5250
5251         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5252         function isn't used in the source but referenced as a
5253         variable initializer then declare it as extern in .asm file
5254
5255 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5256
5257         * .version: increased version number to 2.4.3
5258
5259         Adding version extension according to ChangeLog CVS revision
5260         * src/Makefile.in (target all): added dependency 'version.h'
5261         * (rule version.h): added rule to create version.h from ChangeLog,
5262         * (rule dep): added dependency version.h,
5263         * src/version.awk: AWK script to create version.h
5264         * src/SDCCdwarf2.c (dwWriteModule),
5265         * src/SDCCglue.c (initialComments),
5266         * src/SDCCmain.c (printVersionInfo): modified to write after
5267         version string the version extension number,
5268         * src/SDCCutil.c: included "version.h"
5269         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5270         number,
5271         * src/SDCCutil.h: added prototype for getBuildNumber
5272
5273         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5274         includeDirsSet, too,
5275         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5276         const char [] is found in function prototype...
5277
5278         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5279         moving to WREG with source is already in WREG,
5280         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5281         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5282         * (aopForSym): stack'ed symbols are partially supported, added
5283         if-clause to support symbols in FARSPACE,
5284         * (sameRegs): added test for AOP_ACC to see if registers are same,
5285         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5286         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5287         * (pic16_popRegFromString): will not allocate a new register if it
5288         doesn't find one by name, bug may have introduced...
5289         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5290         * (genIpush): revived to use pic16 port's stack,
5291         * (genAddrOf): added incomplete case for stack'ed operand,
5292         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5293         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5294         can handle multibyte operands,
5295         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5296         * (pic16initialComments): added message for MPLAB compatibility
5297         mode enabled,
5298         * src/pic16/main.h: prototype for pic16_mplab_comp,
5299         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5300         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5301         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5302         because of increased complexity of procedure,
5303         * (_process_pragma): stack pragma changed to format 'stack pos len',
5304         emit symbol '_stack_end' to conform with gplink,
5305         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5306         to search for register,
5307         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5308         PO_GPR_REGISTER,
5309         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5310         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5311         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5312         case for PO_GPR_REGISTER,
5313         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5314         dies, the new era is ahead !...
5315         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5316         pic16_dynInternalRegs,
5317         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5318         * (pic16_allocDirReg): minor optimizations and bug fixes,
5319         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5320
5321         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5322         load stack and frame pointer with address of 'stack_end' symbol
5323
5324 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5325
5326         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5327         without source code but only variable initializers
5328
5329 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5330
5331         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5332         external are not declared as extern to reduce overhead while linking
5333
5334 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5335
5336         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5337
5338 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5339
5340         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5341           Yee Keat for the patch
5342         * src/SDCCast.c (decorateType): fixed bug #979599
5343         * src/ds390/gen.h: removed local fReturnSizeDS390
5344         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5345         * src/ds390/gen.c (genAnd, genOr, genXor),
5346         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5347
5348 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5349
5350         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5351         add relFilesSet to $3, manipulate $2 to handle linking of object
5352         files without source files in command line,
5353         * device/include/pic16 (all headers): added ID location macros,
5354         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5355         entries for ID location bytes,
5356         * (pic16_assignIdByteValue): NEW,
5357         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5358         added field dumpcalltree to pic16_options_t,
5359         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5360         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5361         emitting rFalseIfx label after check_carry label,
5362         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5363         pic16_emitDIRegs), NEW
5364         * (pic16glue): dump .calltree file when option --calltree found,
5365         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5366         * (_pic16_genAssemblerPreamble): emit ID locations after
5367         configuration registers,
5368         * (pic16_linkCmd): modifications of the link command,
5369         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5370         * (pic16_pCodeInitRegisters): don't init stack registers,
5371         * (pic16_findPrevInstruction): fixed bug,
5372         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5373         bug with immediate registers,
5374         * (buildCallTree): traces stack push and pop,
5375         * (pct2): dump also stack usage for each function,
5376         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5377         * (pic16_allocDirReg): various modifications,
5378         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5379         fixed to 1,
5380
5381 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5382
5383         * src/pic16/pcode.c: removed buggy double colon
5384
5385 2004-07-01 Borut Razem <borut.razem AT siol.net>
5386
5387         * support/scripts/sdcc.nsi: added include/pic16 to setup
5388
5389 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5390
5391         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5392         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5393         target 'clean',
5394         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5395         specific command line arguments. Also added sample lkr script
5396         for placing a variable at a specific memory bank.
5397         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5398         at a specific memory bank,
5399         * (pic16_dump_isection): fixed bug which caused string literals to
5400         be omitted when dumping idata section,
5401         * (pic16_groupRegistersInSection): added code to handle registers
5402         in specific memory banks,
5403         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5404         public, all references are renamed too,
5405         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5406         AOP_DPTR2,
5407         * (pic16_storeForReturn): added case to handle when dest is WREG,
5408         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5409         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5410         pic16_rel_udata, check to see if that register is marked as being
5411         a member of a specific memory bank,
5412         * (pic16_printIvalCharPtr): added code to add string literals either
5413         to code or the idata sections,
5414         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5415         also accept the 'udata' pragma,
5416         * src/pic16/main.h: new structure types sectName and sectSym
5417         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5418         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5419         * (pic16_findPrevInstruction): fixed, it returned nothing,
5420         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5421         instruction combinations,
5422         * (pic16_FixRegisterBanking): heavily reorganised,
5423         * (pic16_AnalyzeBanking): if generating banksel directives is
5424         disabled, then don't call FixRegisterBanking at all,
5425         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5426         completely removed,
5427         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5428
5429 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5430
5431         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5432         Phuah Yee Keat <yk.phuah AT nestac.com>
5433
5434 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5435
5436         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5437         correctly the IVT even if it is relocated to some other location
5438
5439 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5440
5441         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5442         * device/include/pic16/pic18f2220.h: NEW,
5443         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5444         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5445         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5446         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5447         nodefaultlibs, ivt_loc is the location of the interrupt vector
5448         table, and nodefaultlibs signs that default libraries should not be
5449         linked in link stage,
5450         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5451         according to --ivt-loc argument,
5452         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5453         when pragma stack is found,
5454
5455 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5456
5457         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5458         256 (range check), 257 (do while), 258.a-f (bit banging
5459         f.e. on 3-wire SPI bus)
5460
5461 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5462
5463         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5464         variables used exclusively within a loop
5465
5466 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5467
5468         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5469
5470 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5471
5472         * src/SDCClrange.c (computeClash): fixed bug #971834
5473
5474 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5475
5476         * src/mcs51/gen.c (genCmp): fixed bug #975903
5477         * src/hc08/gen.c (operandsEqu),
5478         * src/ds390/gen.c (operandsEqu),
5479         * src/z80/gen.c (operandsEqu),
5480         * src/pic/gen.c (operandsEqu),
5481         * src/pic16/gen.c (operandsEqu),
5482         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5483         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5484
5485 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5486
5487         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5488
5489 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5490
5491         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5492         default case in switch statement,
5493         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5494         to eliminate problem with initialisation of pointers, but problem
5495         still exists,
5496         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5497         * (emitStaticSegment): removed various lines emitting debug info,
5498         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5499         added processor registers for utilizing EEPROM,
5500         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5501         configurable and set 8
5502
5503 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5504
5505         * .version: increased version number to 2.4.2,
5506
5507         Cumulative patch for pic16 port
5508         * src/pic16/device.c: changed scheme to dump initial values for
5509         variables in idata segment, all print_idata* functions were removed,
5510         now the pic16_printIval* will be called,
5511         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5512         * _pic16_printPointerType, pic16_printPointerType,
5513         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5514         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5515         NEW, similar to the respective functions in SDCCglue.c,
5516         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5517         way, emitting hex bytes,
5518         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5519
5520 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5521
5522         * src/avr/ralloc.c (serialRegAssign),
5523         * src/xa51/ralloc.c (serialRegAssign),
5524         * src/pic/ralloc.c (serialRegAssign),
5525         * src/pic16/ralloc.c (serialRegAssign),
5526         * src/hc08/ralloc.c (serialRegAssign),
5527         * src/z80/ralloc.c (serialRegAssign),
5528         * src/ds390/ralloc.c (serialRegAssign),
5529         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5530
5531 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5532
5533         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5534         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5535
5536 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5537
5538         Cumulative patch for pic16 port:
5539         * src/pic16/device.h (typedef PIC16_device) modified fields for
5540         defining microcontrollers,
5541         * src/pic16/device.c: added new info for all devices in Pics16 array,
5542         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5543         to be optimised out by the pCode optimiser,
5544         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5545         specially, bug reported by G.M. Gallant,
5546         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5547         as force'd so that cannot be optimised out by pCode optimiser,
5548         * src/pic16/pcode.c,
5549         * src/pic16/pcodepeeph.c,
5550         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5551         they are disabled by default, but can be enabled explicit with
5552         command argument --denable-peeps, for testing,
5553         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5554         --pomit-ivt in COMPILE_FLAGS
5555
5556 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5557
5558         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5559           compilation on MSVC
5560
5561 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5562
5563         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5564
5565 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5566
5567         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5568         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5569
5570 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5571
5572         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5573         would only assign 0x300001 register.
5574
5575 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5576
5577         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5578         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5579
5580 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5581
5582         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5583         for ds80c400
5584         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5585         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5586         added peephole 254 (left shift), 255 (jump table)
5587
5588 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5589
5590         * device/lib/Makefile.in: removed comment line with model-pic16,
5591         * (target port-specific-objects-pic16): the libraries and objects
5592         are copied to the build directory form the device/lib/pic16/bin
5593         directory
5594
5595         Cumulative patch concerning pic16 port:
5596         * library directory has been re-organized,
5597         * added support for PIC18F1220,
5598         * added headers and library sources for chips 18f1220,18f6520,
5599         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5600
5601         * configuration registers setting has changed, now each supported
5602         device has a complete description of the registers it uses,
5603         * all initialisations are moved to idata sections, these section
5604         can be absolute or relocatable,
5605         * fixed initialisation of codespace variables,
5606         * fixed warning about PCLATU and gpsim,
5607         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5608         * (genAssign): use table reads when assigning from variables in codespace,
5609         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5610         char/int variables placed in codespace,
5611         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5612         registers set in .asm file, no need for --pomit-config-words anymore,
5613         * (pic16glue): some 8051 legacy segments are commented out
5614         (to be removed completely),
5615         * added support for alternative assembler and linker with --asm=
5616         and --link= command line arguments,
5617         * peepholes are disabled automatically in the port, no need to
5618         specify on command line,
5619         * port supports natively char/int/long multiplication, but converts
5620         all divisions to support functions,
5621         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5622         to the file set in variable $2,
5623         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5624         strings in ASCII format and not in hex,
5625         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5626         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5627         allocate proper register if iCodes aren't temporary,
5628
5629 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5630
5631         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5632
5633 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5634
5635         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5636         is commented out
5637
5638 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5639
5640         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5641         computed address is reused
5642         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5643         multi-byte bitfields
5644
5645 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5646
5647         * src/z80/gen.c: (genArrayInit): must check for pointers too
5648
5649 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5650
5651         * support/regression/tests/zeropad.c: never meant to commit the
5652           nestedstruct test: removed, added check for GCC version
5653
5654 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5655
5656         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5657         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5658         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5659           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5660           bugs 928906 and 954082 half-empty initializers
5661         * src/SDCCsymt.h,
5662         * src/SDCCsymt.c (getAllocSize): added for above fix
5663         * src/z80/gen.c (genArrayInit): fixed bug 741044
5664         * support/regression/tests/zeropad.c: added tests
5665
5666 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5667
5668         * src/pic16/device.c (pic16_dump_section): corrected bug which
5669         caused some symbols of the libraries to be misplaced
5670
5671 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5672
5673         * src/pic16/glue.c,
5674         * src/pic16/ralloc.h,
5675         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5676         to fix conflict with pic port
5677
5678 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5679
5680         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5681         externs configuration variables,
5682         * src/pic16/ralloc.h,
5683         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5684         prototype in header, commented out some debug messages
5685
5686 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5687
5688         * src/pic16/glue.c,
5689         * src/pic16/main.c,
5690         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5691         for gpasm COFF object generation. Thanks to D. Hawkins for
5692         his patch info
5693
5694 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5695
5696         * src/ds390/main.c,
5697         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5698         Brock for spotting this)
5699         * src/ds390/gen.c (genEndFunction),
5700         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5701         interrupt handler and critical. Disable push/pop optimizations when
5702         peephole optimizations disabled.
5703
5704 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5705
5706         Updated pic16 library sources and headers.
5707         * device/lib/pic16/pic18f*/ ,
5708         * device/include/pic16/*.h: modified to handle structured SFR
5709         definitions
5710
5711 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5712
5713         * src/port.h (PORT structure): added hook initPaths, now each
5714         port can declare its own default search paths,
5715         which can been seen with the --print-search-dirs option,
5716         see pic16 port for example,
5717         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5718         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5719         * (doPrintSearchDirs): NEW, replaces in a central manner the
5720         printing of search dirs which was split in set*Paths functions,
5721         * (main): added call to port->initPaths and doPrintSearchDirs,
5722         * src/avr/main.c,
5723         * src/ds390/main.c,
5724         * src/hc08/main.c,
5725         * src/izt/i186.c,
5726         * src/izt/tlcs900h.c,
5727         * src/mcs51/main.c,
5728         * src/pic/main.c,
5729         * src/pic16/main.c: modified port structures to reflect addition of
5730         initPaths hook,
5731
5732         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5733         * (pic16_dump_section): for registers in same address reserve memory once,
5734         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5735         to no_banksel,
5736         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5737         result is greater in size than right or left,
5738         * (pic16_genUMult8X8_8): there are some cases where the result can
5739         be 16 bits size, so handle these,
5740         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5741         * (pic16_outBitC): modified to emit pcodes,
5742         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5743         or not,
5744         * (genDivOneByte): implemented algorithm to divide 8-bits,
5745         * (genCmp): uncommented goto, but issues still exist,
5746         * (genAnd): fixed a bug with variables >8bits,
5747         * (genPackBits): optimization added that uses BCF/BSF to change a
5748         single bit,
5749         * (genAssign): fixed bug when assigning floating point literals,
5750         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5751         __sdcc_gsinit_startup label,
5752         * src/pic16/main.c (_pic16_init): removed search directory
5753         initialisations,
5754         * (_pic16_initPaths): NEW, used to initialise search directories,
5755         * (_hasNativeMulFor): support functions for all except char/int
5756         multiplication, and char division,
5757         * (PIC16_port struct): modified entry for native mul support,
5758         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5759         no_banksel option,
5760         * (buildCallTree): call to register_usage is ifdef'ed out,
5761
5762 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5763
5764         * device/include/string.h: applied Stas Sergeev's patch to make this
5765         header file compatible with the preprocessor -Wundef option
5766         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5767         failure (fixes bug #941458)
5768
5769 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5770
5771         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5772         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5773         that the variable, not the function, should be static
5774         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5775         to be consistent with non-literal case
5776
5777 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5778
5779         * src/SDCCast.c (isConformingBody): fixed bug #949967
5780         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5781         convilong): fixed bug #952086
5782
5783 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5784
5785         * src/SDCCmem.c (allocVariables): fixed bug #955321
5786
5787 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5788
5789         * src/hc08/main.c (_hc08_genAssemblerEnd),
5790         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5791         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5792         completely eliminated the use of a temporary file
5793         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5794         when more than one file linked
5795         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5796
5797 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5798
5799         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5800         which fixes bug #543481
5801         * support/regression/tests/bug-751703.c: fixed comments left from a
5802         cut and paste error
5803         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5804         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5805         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5806         scopes
5807         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5808         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5809         are now changed to underscores in moduleName
5810
5811 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5812
5813         * as/mcs51/lkmem.c: better fix for bug #954173
5814
5815 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5816         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5817
5818         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5819         * device/include/c8051f000.h,
5820         * device/include/c8051f120.h,
5821         * device/include/c8051f300.h,
5822         * device/include/c8051f310.h,
5823         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5824         PWM16) and detab'ed
5825
5826 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5827
5828         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5829         and mailing lists, doc'ed --no-peep-comments, removed reference
5830         to knoppix (newest version has no LyX/LaTeX), other minor changes
5831         * src/SDCCglue.c (glue): save 2 bytes stack space with
5832         option --main-return. The ljmp could probably be avoided too
5833
5834 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5835
5836         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5837
5838 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5839
5840         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5841         * src/SDCCopt.c (isLocalWithoutDef),
5842         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5843         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5844         (credit to Maarten Brock for patch #949363, on which this is based)
5845         * support/regression/tests/bug-751703.c: some test cases of extern used
5846         within inner scopes.
5847
5848 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5849
5850         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5851         SPEC_STRUCT
5852         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5853         struct definitions
5854         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5855         dwWriteLabel): fix to create valid debugger symbols even when
5856         the module name has non-alphanumeric symbols in it
5857         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5858         when a variable's allocation has been optimized away
5859
5860
5861 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5862
5863         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5864         * src/hc08/main.c,
5865         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5866         * src/mcs51/main.c,
5867         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5868         * src/ds390/main.c,
5869         * src/z80/gen.c (z80_emitDebuggerSymbol),
5870         * src/z80/main.c,
5871         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5872         * src/pic/main.c,
5873         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5874         * src/pic16/main.c,
5875         * src/avr/gen.c (avr_emitDebuggerSymbol),
5876         * src/avr/main.c,
5877         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5878         * src/xa51/main.c,
5879         * src/SDCCdebug.c (emitDebuggerSymbol),
5880         * src/SDCCdebug.h,
5881         * src/port.h: added a debugger struct to the port struct. Added a
5882         callback for defining debugger symbols
5883
5884         * src/SDCCast.c (createLabel),
5885         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5886         with isitmp = 1
5887         * src/SDCCicode.h,
5888         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5889         iCode back to the ast for the function
5890
5891         * src/hc08/ralloc.c (hc08_assignRegisters),
5892         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5893         unneeded fields from the regs struct.
5894         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5895         pushReg() & pullReg() functions instead of emitcode()
5896
5897         * src/hc08/gen.c (genLabel, genhc08Code),
5898         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5899
5900         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5901         debugger hooks
5902
5903         * src/hc08/gen.c (genEndFunction, genhc08Code),
5904         * src/hc08/gen.h,
5905         * src/mcs51/gen.c (genEndFunction, gen51Code),
5906         * src/mcs51/gen.h,
5907         * src/ds390/gen.c (genEndFunction, gen390Code),
5908         * src/ds390/gen.h,
5909         * src/z80/gen.c (genEndFunction, genZ80Code),
5910         * src/z80/gen.h,
5911         * src/z80/z80.h,
5912         * src/pic/gen.c (genEndFunction, genpic14Code),
5913         * src/pic/gen.h,
5914         * src/pic16/gen.c (genEndFunction, genpic16Code),
5915         * src/pic16/gen.h,
5916         * src/avr/gen.c (genEndFunction, genAVRCode),
5917         * src/avr/gen.h,
5918         * src/xa51/gen.c (genEndFunction, genXA51Code),
5919         * src/xa51/gen.h,
5920         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5921         specific code to cdbFile.c and out of the backend code generators
5922
5923         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5924         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5925         starting address is now 0
5926
5927         * as/hc08/asm.h,
5928         * as/hc08/m08pst.c,
5929         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5930         assembler directive for DWARF support
5931         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5932
5933         * src/src.dsp,
5934         * src/Makefile.in,
5935         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5936
5937 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5938
5939         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5940         and inappropriate peephole optimization in jump tables
5941
5942 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5943
5944         * as/hc08/m08pst.c,
5945         * src/SDCCglue.c: sdccopt works for the hc08 port now
5946
5947 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5948
5949         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5950
5951 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5952
5953         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5954
5955 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5956
5957         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5958         rules
5959         * src/SDCCmain.c,
5960         * src/SDCCglobl.h,
5961         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5962         comments from the peephole optimizer replacement rules
5963         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5964         symbols
5965         * src/SDCCcse.c (updateSpillLocation),
5966         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5967         equivalents
5968         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5969         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5970         objects far pointers
5971
5972 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5973
5974         * src/SDCCsymt.h: a missing part of my last change
5975         * src/pic/ralloc.c (regTypeNum),
5976         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5977
5978 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5979
5980         * src/SDCCicode.h,
5981         * src/SDCCicode.c (aggrToPtrDclType),
5982         * src/SDCCptropt.h,
5983         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5984         ptrPseudoSymConvert),
5985         * src/pic/ralloc.c (regTypeNum),
5986         * src/pic16/ralloc.c (regTypeNum),
5987         * src/hc08/ralloc.c (regTypeNum),
5988         * src/ds390/ralloc.c (regTypeNum),
5989         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5990         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5991
5992 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5993
5994         * link/z80/lkmain.c (afile),
5995         * as/hc08/lkmain.c (afile),
5996         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5997         prevent a pointer problem when a filename has no directory and
5998         no extension specified.
5999
6000 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6001
6002         * link/z80/lkmain.c (afile): allow periods in directory names
6003         * link/z80/lkmain.c (afile),
6004         * as/mcs51/lkmain.c (afile),
6005         * as/hc08/lkmain.c (afile): allow linker script file to have an
6006         extension other than ".lnk"
6007         * link/z80/lklex.c (getfid),
6008         * link/z80/lkmain.c (parse),
6009         * as/mcs51/lklex.c (getfid),
6010         * as/mcs51/lkmain.c (parse),
6011         * as/hc08/lklex.c (getfid),
6012         * as/hc08/lkmain.c (parse): Support comments in the linker script
6013         file on lines by themselves and after filenames
6014
6015 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6016
6017         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6018
6019 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6020
6021         * src/z80/peeph-z80.def: removed some peephole rules that don't
6022         work with multibyte arithmetic (fixed bug #937126)
6023         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6024         to registers and not global variables
6025         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6026         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6027         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6028         checking for assignments not internally generated (fixed bug #931895)
6029         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6030         structure member (fixed bug #930072)
6031
6032 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6033
6034         * src/SDCCmain.c (linkEdit),
6035         * src/hc08/main.c (_hc08_parseOptions),
6036         * as/hc08/Makefile.in,
6037         * as/hc08/aslink.h,
6038         * as/hc08/asm.h,
6039         * as/hc08/m08pst.c,
6040         * as/hc08/lkrloc.c (relr, rele),
6041         * as/hc08/lkarea.c (lnkarea)
6042         * as/hc08/lkmain.c (afile, parse),
6043         * as/hc08/lkelf.c: support for ELF output
6044         * as/hc08/lks19.c (s19),
6045         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6046
6047 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6048
6049         * as/mcs51/lkihx.c: Fixed bug #899105.
6050
6051 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6052
6053         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6054         .dsp files from Unix to DOS.
6055
6056 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6057
6058         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6059         function pointers; we have been compliant for several months now.
6060         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6061         change that was accidently commented out
6062         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6063         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6064         bug #922319
6065
6066 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6067
6068         * src/hc08/gen.c: output of all of the internal debugging information
6069         is now controlled by the D() macro; it is disabled by default
6070
6071 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6072
6073         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6074         harder to keep the same registers during a CAST iCode
6075         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6076         long via int can be done in a single cast, if the signedness is
6077         correct.
6078         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6079         putchar() in tinibios.c in ds390's library
6080
6081 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6082
6083         * src/SDCCast.c (decorateType): fixed bug #898889,
6084         cast result of a literal complement too
6085         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6086         fixed check for bitfields
6087
6088 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6089
6090         * src/SDCCicode.c (geniCodeLogic): made it static,
6091         (geniCodeLogicAndOr): added in order to fix bug #905492,
6092         (ast2iCode): fixed bug #905492
6093         * support/regression/tests/bug-905492.c: added
6094         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6095         (processParms): fixed bug #927659: don't copy parms, this will clear
6096         decorated flag
6097         * support/regression/tests/bug-927659.c: added
6098
6099 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6100
6101         * src/SDCCast.c (addCast): don't cast float to char
6102         * device/lib/libsdcc.lib: added _memmove
6103
6104 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6105
6106         * device/lib/large/Makefile: fixed parallel execution by
6107         replacing `make` by `$(MAKE)`
6108
6109 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6110
6111         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6112         offsets (fixes bug #923936)
6113
6114 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6115
6116         * device/lib/small/Makefile: fixed parallel execution by
6117         replacing `make` by `$(MAKE)`
6118
6119 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6120
6121         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6122
6123 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6124
6125         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6126         * src/regression/Makefile: Regression test was not running.
6127
6128 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6129
6130         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6131         complement if possible
6132         * src/SDCCval.c (valComplement),
6133         * src/SDCCicode.c (operandOperation): fixed complement of literal
6134         * support/regression/tests/onebyte.c (testComplement): added
6135
6136 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6137
6138         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6139         return an optimized tree; actually replace actParm with the new tree
6140         * src/SDCCast.h: added some parantheses to remove side effects
6141         * support/regression/tests/bug-920866.c
6142
6143 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6144         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6145         Bit operands were not being handled properly in the pic14 port.
6146         (now src/regression/add.c passes again).
6147
6148 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6149
6150         * src/SDCC.y (labeled_statement): case and default no longer require
6151         a following statement (RFE #893037)
6152
6153 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6154
6155         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6156         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6157         disabled (fixes bug #916294)
6158         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6159         "mov a,acc"; patch provided by Lenny Story
6160         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6161
6162 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6163
6164         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6165         functions
6166         * src/ds390/gen.c (genFunction, genEndFunction),
6167         * src/ds390/ralloc.c (ds390_assignRegisters),
6168         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6169         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6170         pushed if there are parameters passed on the stack. Also, a cleaner
6171         way to decide if r0/r1 should be pushed/popped. (Together they fix
6172         bug #918693)
6173
6174 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6175
6176         * doc/sdccman.lyx,
6177         * device/lib/mcs51/crtpagesfr.asm,
6178         * device/lib/mcs51/crtxinit.asm,
6179         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6180         to avoid confusion with Si Lab's SFRPAGE register.
6181
6182 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6183
6184         * src/SDCCglue.c (emitMaps): allow public sfr variables
6185         * src/SDCCglue.c (initialComments): include compiler build date
6186         with compiler version and put the timestamp of the generated
6187         assembly file on a serperate line to be less confusing.
6188         * src/port.h: added genInitStartup hook
6189         * src/avr/main.c,
6190         * src/ds390/main.c,
6191         * src/hc08/main.c,
6192         * src/pic/main.c,
6193         * src/pic16/main.c,
6194         * src/xa51/main.c,
6195         * src/z80/main.c: genInitStartup initialize as NULL (default to
6196         historical behaviour)
6197         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6198         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6199         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6200         library instead of hard coding it into the compiler.
6201         * support/regression/ports/mcs51-stack-auto/spec.mk,
6202         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6203         * device/lib/mcs51/Makefile,
6204         * device/lib/small/Makefile,
6205         * device/lib/large/Makefile,
6206         * device/lib/mcs51/crtpagesfr.asm,
6207         * device/lib/mcs51/crtstart.asm,
6208         * device/lib/mcs51/crtxclear.asm,
6209         * device/lib/mcs51/crtxinit.asm,
6210         * device/lib/mcs51/crtclear.asm,
6211         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6212         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6213         and into user configurable files.
6214         * device/lib/clean.mk: clean mcs51 directory too
6215         * support/regression/tests/longlit.c: added static to T1 declaration
6216         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6217         accesses in the initialization code
6218
6219 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6220
6221         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6222         OSCTRIMVAL as noted in bug #916008
6223
6224 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6225
6226         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6227         in loops with multiple exits (reported as incorrect registers
6228         used by Martin Helmling in Sdcc-user list)
6229
6230 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6231
6232         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6233         made ds390 register extensions look less like error messages
6234
6235 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6236
6237         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6238         reported by Adam Wozniak in Sdcc-user list
6239
6240 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6241
6242         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6243         arithmetic optimizations, added debug output
6244
6245 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6246
6247         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6248         * sdcc.spec: updated and split sdcc into 3 rpms
6249         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6250         needed for literals of LEFT_OP and '+'
6251         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6252         introduced RESULT_TYPE_NOPROM
6253         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6254         left shift
6255         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6256         limited promotion to int only for '*'
6257         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6258
6259 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6260
6261         * src/pic16/gen.c (genSkip),
6262         (genc16bit2lit), (gencjneshort): commented out
6263         (is_LitOp): new helper function, checks operand type
6264         (genCmpEq): rewritten
6265
6266 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6267
6268         * support/regression/tests/bug-908454.c: added
6269
6270 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6271
6272         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6273         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6274         (geniCodeCast): cosmetic, don't preserve bit storage class
6275         (geniCodeLeftShift): added promotion
6276         (geniCodeLogic): fixed regression
6277         * src/SDCCsymt.c (computeTypeOr): accept bits too
6278         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6279
6280 2004-03-07  Borut Razem <borut.razem AT siol.net>
6281
6282         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6283
6284 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6285
6286         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6287         version of pic16_genPackRegisters which does not check if ic is a
6288         CAST operator,
6289         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6290         function cause string1.c regression test fails
6291
6292 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6293
6294         * sim/ucsim/configure.in,
6295         * sim/ucsim/configure,
6296         * sim/ucsim/doc/Makefile.in: use docdir
6297         * src/SDCC.y: fixed sbit atrributes
6298         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6299         * src/SDCCast.c (decorateType): |^& need special promotion handling
6300         * src/SDCCast.h,
6301         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6302         * src/SDCCsymt.h (computeType),
6303         * src/SDCCicode.c: computeType() needs op
6304         * src/SDCCsymt.c (checkTypeSanity),
6305         * doc/sddman.lyx: "plain" bitfields are unsigned
6306         * src/SDCCsymt.c (computeTypeOr): added
6307         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6308         |^& ops
6309         * src/SDCCval.c (val*): computeType() needs op
6310         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6311         * support/regression/tests/onebyte.c: added tests for |^&
6312
6313 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6314
6315         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6316         for writing icode into asm output.
6317
6318 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6319
6320         * src/pic16/device.c: added some debug lines enabled
6321         with macro DEBUG_CHECK,
6322         * src/pic16/genarith.c: more debug in genPlus,
6323         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6324         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6325         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6326         * (aopForSym): onStack symbols are re-placed in data memspace,
6327         and onStack flag is cleared,
6328         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6329         copy temporary pcodeop,
6330         * (genPcall): added warning for not updating PCLATU,
6331         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6332         always true for pic16 port,
6333         * (genMultOneWord): NEW, supports integer multiplication,
6334         * (genMult): modified to call genMultOneWord,
6335         * (ifxForOp): added warning when return NULL,
6336         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6337         flag is set before call to operandFromSymbol for implicit
6338         added structures,
6339         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6340         options.intlong_rent are set by default,
6341         * (_hasNativeMulFor): modified to allow port generation of integer
6342         multiplication,
6343         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6344         set regtype to REG_SFR for all registers, restricting seting the
6345         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6346
6347 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6348
6349         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6350         more than 500 times in the regression tests
6351
6352 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6353
6354         * support/Util/SDCCerr.h,
6355         * support/Util/SDCCerr.c,
6356         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6357         enumerator_list),
6358         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6359         for symbol conflicts.
6360         * support/valdiags/tests/enum.c,
6361         * support/valdiags/tests/tentdecl.c,
6362         * support/valdiags/tests/struct.c: expect possible error messages
6363         referring to original symbol definitions.
6364         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6365         * src/SDCCsymt.h,
6366         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6367
6368 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6369
6370         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6371
6372 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6373
6374         * src/pic16/ralloc.c (newReg): fixed bug #908929
6375
6376 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6377
6378         * src/ds390/gen.c: added missing #include "main.h"
6379
6380 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6381
6382         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6383         checking if symbol is already in set,
6384         * src/pic16/device.h: prototype for checkAddSym,
6385         * src/pic16/gen.c: (_G): added entry interruptvector,
6386         * (assignResultValue): removed some commented out lines,
6387         * (genFunction): check for ISR via sym->type, absolute section for
6388         interrupt code is created via a new pBlock, the goto instruction is
6389         placed now correctly at the interrupt vector position, changed all
6390         references from ivec to _G.interruptvector,
6391         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6392         is the interrupt is a high priority one, same for return from ISR,
6393         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6394         externs to calls of checkAddSym,
6395         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6396         pic16_pcode_verbose flag is set,
6397         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6398         * src/pic16/pcoderegs.c: message about how many registers are saved
6399         will only be emitted if pic16_pcode_verbose flag is set,
6400
6401 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6402
6403         * src/ds390/ralloc.h,
6404         * src/ds390/ralloc.c (ds390_regWithIdx),
6405         * src/ds390/gen.c (emitcode),
6406         * src/ds390/main.h,
6407         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6408         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6409         ds390operandCompare, getRegsRead, getRegsWritten,
6410         initializeAsmLineNode): customized instruction size calculation for
6411         ds390, started basis for some register optimizations
6412         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6413         corresponding assembly output
6414         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6415         missing push/pop of r0/r1. Optimized push/pops
6416
6417 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6418
6419         * src/mcs51/main.c (instructionSize): fixed ACALL size
6420         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6421
6422 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6423
6424         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6425         the sorting of rlist with NULL elements
6426         * (print_idataType, print_idata): NEW to create idata sections
6427         * src/pic16/device.h: idataSymSet new variable
6428         * src/pic16/gen.c (genFunction): fixed some bugs in string
6429         comparing, improved the absolute section creation for ISRs,
6430         added FSR0L/FSR0H in registers that are saved in an ISR,
6431         * (genInline): fixed the processing of inline snippets,
6432         now they undergo no process by the peephole optimizer
6433         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6434         are placed in idataSymSet,
6435         * (pic16emitStaticSeg): extern symbols are added in externs,
6436         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6437         switching when aboslute variables are placed in access bank memory
6438         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6439         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6440         commented out with #if,
6441         * (pic16_packRegisters): reintroduce the check for CAST because some
6442         symbols are not correctly handled,
6443         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6444         pCodeInstruction instead of pCode,
6445         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6446         pCodeAsmDir definition,
6447         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6448         directive, then the argument directive is emitted without the leading
6449         tab, hack for inline labels which must be in the first column,
6450         * (compareLabel,pic16_findNextInstruction),
6451         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6452         * (insertBankSwitch): modified for the new pCodeAsmDir,
6453
6454 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6455         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6456
6457         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6458         instance,
6459         * (pushSide): commented out with #if,
6460         * (assignResultValue): fixed some typos in saving
6461         registers,
6462         * (genPcall): FIXED and sync'ed with genCall,
6463         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6464         * (genNearPointerGet): fixed to handle some more cases,
6465         implementation scheme via table reads,
6466         * (genConstPointerGet): modified to access code memory correct,
6467         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6468         and improved to handle some cases
6469         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6470         instead of "RETLW" for init data
6471         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6472         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6473         variables are placed in access bank memory (<0x80 and >=0xf80),
6474         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6475         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6476         TBLWT_POSTDEC,TBLWT_PREINC
6477         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6478         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6479         directives
6480         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6481         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6482         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6483         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6484
6485 2004-02-29  Borut Razem <borut.razem AT siol.net>
6486
6487         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6488         support/Util/findme.h, support/Util/system.h: enhance binary relative
6489         search for lib and include by using findProgramPath()
6490
6491 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6492
6493         * src/SDCCpeeph.h,
6494         * src/SDCCpeeph.c (pcDistance),
6495         * src/port.h,
6496         * src/mcs51/ralloc.h,
6497         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6498         * src/mcs51/main.h,
6499         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6500         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6501         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6502         size calculation port specific, started basis for some register
6503         optimizations
6504         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6505         missing push/pop of r0/r1. Optimized push/pops
6506         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6507         * device/lib/_modsint.c (_modsint),
6508         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6509         and stack version so regression tests pass
6510
6511 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6512
6513         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6514         * src/SDCCast.c (decorateType): catch another small optimization
6515         with '?' operator
6516         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6517         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6518         modified to finally use computeType() all over SDCC,
6519         see Feature Request #877103
6520         * src/SDCCval.h: cosmetic
6521         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6522         valCompare(); regression tested in muldiv.c
6523         * support/regression/tests/muldiv.c (testMod): mod sign follows
6524         dividend only
6525
6526 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6527
6528         * src/SDCCast.c (decorateType): fixed bug #902362
6529         * doc/INSTALL.txt: fixed install instructions for win32
6530
6531 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6532
6533         * device/include/Makefile.in (install): fixed by replacing spaces
6534         by tabs
6535         * doc/README.txt,
6536         * doc/INSTALL.txt: updated for release
6537         * doc/sdccman.lyx: added warning for --xstack being buggy
6538
6539 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6540
6541         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6542         to eliminate build warnings.
6543         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6544
6545 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6546            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6547
6548         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6549         removed -penable-stack, added comment for stack pragma, added
6550         warning for not initializing the stack/frame registers, removed
6551         comment at interrupts section
6552
6553         Stack is made permanent, there is no ability to disable stack usage.
6554         * src/pic16/device.h,
6555         * src/pic16/device.c: removed all references to USE_STACK macro,
6556         * src/pic16/device.c (pic16_dump_section): when no elements in
6557         rlist, free rlist before return,
6558         * (pic16_dump_int_registers): NEW, internal registers are a new set
6559         of general purpose registers reused by each function,
6560         * (checkAddReg): returns 1 if registers is added to set,
6561         * (pic16_groupRegistersInSection): when a registers is of type
6562         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6563         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6564         SRCASECMP macro is moved here from device.c
6565         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6566         PO_PCLATU, PO_PRODL, PO_PRODH,
6567         * (pic16_pCodeOpType, genMinus,
6568         changed compares to "a" register, with AOP_ACC,
6569         * (pic16_genPlus): fixed some bugs and indented properly,
6570         * (pic16_addSign): changed size to size+offset in the MOVWF
6571         instruction,
6572         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6573         multiply 8-bit operand by literal, result is 8-bit,
6574         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6575         multiply 2 8-bit operand, result is 8-bit,
6576         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6577         genUMult8X*_16,
6578         * src/pic16/gen.c: changed accUse to contain WREG only,
6579         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6580         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6581         true, do not use immediate addressing any more unless sym is a
6582         pointer in codespace,
6583         * (aopForRemat): do not use immediate addressing when symbol not in
6584         codespace and when symbol's address is requested,
6585         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6586         accUse size (= 1),
6587         * (aopGet): added case for AOP_ACC and don't return "accumulator
6588         bug" but WREG instead,
6589         * (popGetTempReg): pushes contents of temporary register in stack,
6590         * (popReleaseTempReg): pops contents of temporary register from
6591         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6592         * (pic16_popGet): separated case AOP_ACC to return register WREG
6593         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6594         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6595         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6596         the use of immediate pointers to certain cases only.
6597
6598         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6599         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6600         * (assignResultValue, genCall, genRet): modified to use the new
6601         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6602         genPcall is still broken,
6603         * (genFunction): added code to create 'A' type pBlocks when
6604         interrupt functions are generated, code not extensively tested yet,
6605         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6606         * (genEndFunction): modified so ISRs pop stored registers from stack,
6607         * (genMultOneByte): cleanup,
6608         * (AccRsh): added flag andmask, to and result with appropriate mask,
6609         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6610         * (genDataPointerGet): fixed and reenabled its use,
6611         * (genNearDataPointerGet): bugs fixed,
6612         * (genDataPointerSet): bugs fixed,
6613         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6614         pic16_DumpSymbol, pic16_DumpOp,
6615         * src/pic16/genutils.h: function prototypes for the above functions,
6616         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6617         pointers,
6618         * (pic16emitRegularMap): many many many improvements, but needs a
6619         major cleanup,
6620         * src/pic16/main.c: enable_stack in pic16_options is removed,
6621         * (_pic16_parseOptions): removed command line options -penable-stack,
6622         * (_process_pragma): emit stack symbol only when stack pragma is
6623         processed,
6624         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6625         redirected to FSR0L/FSR0H pair,
6626         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6627         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6628         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6629         for immediates,
6630         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6631         * (dumpPicOptype): NEW,
6632         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6633         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6634         with movff instruction,
6635         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6636         added pic16_int_regs, some packRegsFor* functions are commented out,
6637         because produce errors,
6638         * src/pic16/NOTES: minor modifications
6639
6640 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6641
6642         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6643         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6644         --pack-iram.
6645         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6646         * as/mcs51/lkaomf51.c: fixed bug #895763
6647
6648 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6649
6650         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6651
6652 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6653
6654         * doc/sdccman.lyx: added details about the HC08 storage classes and
6655         interrupts, fixed the register usage info for z80 & gbz80
6656
6657 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6658
6659         * doc/sdccman.lyx: added more pic16 port documentation
6660         * device/include/pic16/: added header pic18fregs.h
6661
6662 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6663
6664         * doc/sdccman.lyx: added Vangelis' contribution
6665
6666 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6667
6668         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6669         extend to the next CALL or PCALL, not just to the next CALL.
6670
6671 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6672
6673         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6674
6675 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6676
6677         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6678         bug #895752 and a better fix for bug #716790
6679
6680 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6681
6682         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6683
6684 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6685
6686         * doc/sdccman.lyx: minor changes, minor changed
6687
6688 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6689
6690         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6691         which can't handle SDCC_NEWONEBYTEOPS,
6692         (geniCodeMultiply): removed conversion from mult to shift for pic14
6693         and pic16
6694
6695 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6696
6697         * src/hc08/gen.h,
6698         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6699         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6700         thus fixing bug #895406
6701
6702 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6703
6704         * device/lib/_modsint.c,
6705         * device/lib/_modslong.c: sign follows divisor only
6706         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6707         signs or signedness can be ignored
6708         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6709         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6710         added optimization for IFX,
6711         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6712         arguments;
6713         reenabled optimization for IFX, which was removed on 2004-01-11
6714         * src/SDCCast.h: added return type IFX
6715         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6716         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6717         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6718         SDCC_OLDONEBYTEOPS selects the old behaviour
6719         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6720         changed again and commented promotion rule
6721         * src/SDCCval.c (valDiv): promotion no longer necessary
6722         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6723         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6724         rewritten
6725         * support/regression/tests/onebyte.c: added
6726
6727 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6728
6729         * gen.c (genInline): reverted to old code for assemnling inline
6730         code because of bug reported James Chadd
6731
6732 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6733
6734         * ralloc.h: missing declarations from previous patch,
6735         seems that patch for ralloc.h was never applied, fixed
6736
6737 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6738            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6739
6740         * pcode.c,
6741         * pcode.h,
6742         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6743         indirect addressing. Marked FSR0 as deprecated
6744         * gen.c (pointerCode): commented out, not needed now
6745         (pic16_popGet2p): new MOVFF helper function
6746         (genGenPointerGet),
6747         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6748         (shiftRLong): removed duplicate debugging info
6749
6750 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6751
6752         * src/ds390/gen.c (genNearPointerGet),
6753         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6754         optimization with bits, but not bitfields.
6755         * src/ds390/ralloc.c (packRegisters),
6756         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6757
6758 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6759
6760         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6761
6762 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6763
6764         * src/SDCCsymt.h,
6765         * src/SDCCicode.c (operandFromSymbol),
6766         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6767         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6768         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6769         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6770         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6771         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6772         bug #892038
6773         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6774         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6775         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6776         * src/SDCCsymt.c (newSymbol),
6777         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6778         enumerator_list),
6779         * src/SDCCval.h,
6780         * src/SDCCval.c (newiList): fixed bug #885705
6781
6782 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6783
6784         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6785         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6786
6787 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6788
6789         * device/include/c8051f120.h,
6790         * device/include/c8051f300.h,
6791         * device/include/c8051f310.h: added/updated header files for Silicon
6792         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6793         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6794         in new section Submitting patches
6795
6796 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6797
6798         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6799         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6800         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6801         genGenPointerSet),
6802         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6803         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6804         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6805         genGenPointerSet),
6806         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6807         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6808         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6809         genGenPointerSet),
6810         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6811         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6812         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6813         genGenPointerSet): fixed bug #892400
6814         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6815         to eliminate build warnings.
6816         * src/SDCCast.c (processParms),
6817         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6818         fixed bug 751859
6819         * support/valdiag/valdiag.py: added GCC to the list of defines active
6820         when compiling with gcc
6821
6822 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6823
6824         * support/Util/SDCCerr.h,
6825         * support/Util/SDCCerr.c,
6826         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6827         with an incomplete type (fixed bug #883734)
6828         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6829
6830 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6831
6832         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6833
6834 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6835
6836         * src/SDCCast.c (decorateType),
6837         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6838         function pointer implementation
6839         * support/regression/tests/funptrs.c: added tests to verify both forms
6840         of function pointers work correctly. Added tests to verify parameters
6841         are passed in the correct order.
6842
6843 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6844
6845         * device.c (regCompare): registers are sorted by ascending
6846         address and increasing size,
6847         * main.c (_pic16_finaliseOptions): removed the declaration
6848         of compiler macro MCU. Now a macro of the format pic18fxxxx
6849         will be defined from the command line
6850
6851 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6852             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6853
6854         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6855         PCOP_RLCF was overwritten!
6856         * gen.c (genSkip): commented out calls to pic16_emitcode,
6857         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6858         * (genlshTwo),
6859         * (genRRC): added debugging info,
6860         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6861         overwritten while shifting,
6862         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6863         overwritten while shifting,
6864         * (AccLsh),
6865         * (AccRsh),
6866         * (shiftLLeftOrResult),
6867         * (shiftRLeftOrResult),
6868         * (shiftRLong),
6869         * (shiftLLong): Implemented with pic16_emitpcode
6870         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6871         * (genLeftShift): Fixed bug, operand for shift by variable always
6872         was "and"ed with 0x0f,
6873         * (genLeftShiftLiteral),
6874         * (genrshTwo),
6875         * (genRightShiftLiteral): added debugging info,
6876         * (genrshFour): added comment,
6877         * (genRightShift): determined signedness from operand "left"
6878         instead of "result"
6879
6880 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6881
6882         * src/SDCCicode.c (geniCodeParms),
6883         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6884         function pointers, fixed function pointer bugs #861242 and #861896
6885
6886 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6887
6888         * device/include/c8051f000.h,
6889         * device/include/c8051f120.h,
6890         * device/include/c8051f300.h: added header files for Silicon
6891         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6892
6893 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6894
6895         * src/SDCCast.c (processParams): added new type flow and restructured
6896         (gatherAutoInit): added new type flow
6897         (addCast): cosmetic changes
6898         (getLeftResultType): added new type flow for array indices, patch
6899         provided by Stas, see FR #877103
6900         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6901         array index patch by Stas
6902         * src/SDCCast.h: added prototype getResultTypeFromType()
6903         * src/SDCCval.h,
6904         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6905         * src/pic/glue.c (pic14emitStaticSeg),
6906         * src/pic16/glue.c (pic16emitStaticSeg),
6907         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6908         for initialization of symbols
6909         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6910         * support/Util/SDCCerr.h:
6911         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6912         * .version: bumped version number to 2.3.8
6913         * device/include/Makefile.in (install),
6914         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6915         avoid warnings
6916
6917 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6918
6919         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6920         Slade Rich fixed an optimization bug
6921         * src/pic/pcodepeep.c,
6922         * src/pic/pcoderegs.c
6923         * doc/Makefile (install): added test for directory
6924
6925 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6926
6927         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6928         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6929         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6930         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6931         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6932         * as/mcs51/asexpr.c (term),
6933         * as/hc08/asexpr.c (term): fixed bug #887146
6934
6935 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6936
6937         * src/z80/gen.c (genMult): handle single byte result product
6938         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6939         DUMMY_READ_VOLATILE (fixed bug #886367)
6940
6941 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6942
6943         * support/regression/tests/libmullong.c: fixed logic, on little endian
6944         hosts we ended without a mullong_wrapper()
6945
6946 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6947
6948         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6949         virus/worm forged address usage.
6950
6951 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6952
6953         Fixed promotion, it should be done on AST level:
6954         * src/SDCCast.c (addCast): added promotion to int
6955         (decorateType): updated call to upCast()
6956         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6957         usualUnaryConversions()
6958
6959 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6960
6961         * support/regression/tests/literalop.c (mulWrapper): Added a
6962         wrapper to remove integer overflow warnings.
6963
6964         * support/regression/tests/float_trans.c: Made work on host.
6965
6966         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6967         location of sz80.
6968
6969         * support/regression/generate-cases.py (main): Changed from inline
6970         to a main method.
6971
6972         * doc/Makefile (install): Changed to depth first to get rid of
6973         missing directory install warning.
6974
6975         * as/Makefile (install-doc): Made work on Mac.
6976
6977 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6978
6979         * src/SDCCast.c: added an additional type flow in decorateType() of
6980         opposite direction, see feature request #860006; it's enabled at runtime
6981         by setting the environment variable SDCC_NEWTYPEFLOW
6982         * src/SDCCast.h: changed prototype of decorateType()
6983         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6984         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6985         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6986         see feature request #877103
6987         * src/SDCCval.c: updated call of decorateType()
6988         (valBitwise): fixed bug #882876
6989         (valMinus): added promotion
6990         (valLogicAndOr): result is unsigned
6991         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6992         * src/SDCCsymt.c (computeType),
6993         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6994         must not cause an unsigned operation
6995         * src/pic/glue (pic14emitRegularMap),
6996         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6997
6998 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6999
7000         * src/pic/pcode.c (PCodeID): commented out left over debug code
7001
7002 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7003
7004         * support/valdiag/tests/overflow.c: added shift tests
7005         * src/pic/device.c,
7006         * src/pic/gen.c,
7007         * src/pic/gen.h,
7008         * src/pic/glue.c,
7009         * src/pic/main.c,
7010         * src/pic/pcode.c,
7011         * src/pic/pcode.h,
7012         * src/pic/pcodepeep.c,
7013         * src/pic/pcoderegs.c,
7014         * src/pic/ralloc.c,
7015         * src/pic/ralloc.h: applied patch from Slade Rich;
7016         added support for multiple code pages and multiple RAM banks on the
7017         PIC 14 port. The ASM files now no longer simply assume all the
7018         code / RAM are in the same page / bank. This means the linker can
7019         safely allocate code/RAM of separate ASM files to different pages/banks.
7020         * doc/sdccman.lyx: added Slade's tips
7021         * src/mcs51/peeph.def: fixed bug #880768
7022
7023 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7024
7025         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7026         * src/SDCCast.c (decorateType): fixed bug #880197
7027
7028 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7029
7030         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7031         getopt.h.
7032
7033         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7034         strtof is not part of C89 and isn't included with Mac OS X.
7035
7036 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7037
7038         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7039         shiftL2Left2Result): fixed bug #879326
7040         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7041         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7042         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7043         address fetch for clr instruction
7044         * device/lib/hc08/_mulint.c: created optimized assembly version
7045         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7046
7047 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7048
7049         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7050         proposed in FR #877103
7051
7052 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7053
7054         * src/SDCCval.c (cheapestVal): added missing checks
7055         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7056         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7057
7058 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7059
7060         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7061         equal operands
7062
7063 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7064
7065         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7066         loaded with the linker search paths (-L arguments) and the libraries
7067         to be linked with the current source (-l arguments). Changes
7068         currently will affect only the pic16 port.
7069         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7070         include path the port specific paths and port specific libraries,
7071         * gplink command now contains the $3 argument,
7072         * src/pic16/device.h,
7073         * src/pic16/device.c,: structure PIC_device is made public and
7074         renamed to PIC16_device, the same for variable Pics which is renamed
7075         to Pics16. Updated all references to them.
7076         * src/pic16/glue.c (pic16glue): corrected bug with code
7077         initialization which bypassed the variable initializations block.
7078
7079         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7080         COMPILE_FLAGS and added the --nostdinc option
7081
7082 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7083
7084         * device/include/mc68hc908jb8.h: Register defs for another member
7085         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7086
7087 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7088
7089         Documenting changes from previous commits.
7090         * configure.in (version 1.56),
7091         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7092         when generating output files to configure the pic16 library,
7093         but now I've commented it out, since gputils aren't installed in the
7094         SF compile farm, so library won't compile
7095
7096         * device/lib/Makefile.in (version 1.56): initially I've added in
7097         target 'all' the prerequestive 'model-pic16' so it compiled the
7098         pic16 library, but now I've commented it out for the same reasons
7099         above,
7100         * added targets 'model-pic16' and 'objects-pic16' to compile the
7101         library
7102         * added target 'port-specific-objects-pic16' to handle the
7103         generated libraries and copy them into the build/ directory
7104         * added target 'clean-intermediate-pic16' to clean intermediate
7105         files into pic16 directory
7106         * in target 'installdirs' added line to create directory pic16 in
7107         the installation path
7108
7109         * device/include/Makefile.in (version 1.11): in target 'install'
7110         added lines to copy all header files to installation path,
7111         * in target 'installdirs' added line create directory for pic16
7112         headers in the installation path
7113
7114 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7115
7116         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7117          a function call
7118
7119 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7120
7121         * configure,
7122         * device/lib/configure.in,
7123         * device/lib/configure: fixed for autoconf 2.57
7124
7125 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7126
7127         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7128         option so that it actually works. Made it specific to the z80, since
7129         the gbz80 doesn't have these kinds of I/O ports.
7130
7131 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7132
7133         * device/include/z180.h,
7134         * device/lib/_memcpy.c,
7135         * device/lib/_memmove.c,
7136         * device/lib/_mulint.c,
7137         * device/lib/ser_ir.c,
7138         * device/lib/ser_ir_cts_rts.c,
7139         * device/lib/_strcmp.c,
7140         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7141         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7142         portmode; added deprecation warning for bank= and protmode= forms.
7143         Also, guard against buffer overflow.
7144         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7145
7146 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7147
7148         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7149         changed interrupt vector table generation to only emit declared vectors.
7150         * device/include/Makefile.in: added missing backslash
7151         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7152
7153 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7154
7155         Mainly changes to support compilation of the device libraries
7156         * src/pic16/device.c: stack is allocated via symbol and not
7157         via literal number. The symbol is placed in the corresponding
7158         position of the data ram
7159         * (pic16_dump_section): relocatable and absolute uninitialized
7160         data are now emitted in sorted order to reduce section naming,
7161         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7162         weren't marked as being in the access bank,
7163
7164 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7165
7166         Added portion of GNU PIC Library under the directory
7167         device/include/pic16 and device/lib/pic16. These files
7168         contain the declarations of SFRs for the PIC18Fxx2 devices.
7169         The directory is initialized via configure from toplevel.
7170
7171 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7172
7173         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7174         the spilllocations to be compared correctly
7175
7176 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7177
7178         * src/SDCCast.c (decorateType): fixed bug introduced today
7179
7180 2004-01-12  Borut Razem <borut.razem AT siol.net>
7181
7182         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7183         doc/sdccman.lyx: upper case pragmas are deprecated
7184
7185 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7186
7187         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7188         in simpler and even better code
7189
7190 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7191
7192         * src/SDCCicode.c (operandOperation): fixed bug #874819
7193         * src/SDCCast.c (decorateType): fixed
7194         char foo (unsigned long ul) { return ul > 0; }
7195
7196 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7197
7198         * doc/sdccman.lyx: Moved and added some sections, small changes
7199         all over. Telling LaTeX to be less strict with word spacing
7200         to better keep the right margin. Changed some notes about
7201         maintainance of the ports in section 3.2.1 - is it OK like this?
7202
7203 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7204
7205         SDCC source changes:
7206         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7207         convilong): modified to inform the pic16 port that builtin functions
7208         are external
7209
7210         PIC16 PORT specific changes:
7211         * src/pic16/device.c pic16_dump_equates() added,
7212         processor registers declared internally by the port are emitted in
7213         the translation as equates,
7214         * src/pic16/gen.c: inline code is passed unprocessed to the
7215         translation,
7216         * (pic16_popGetLit2): fnuction modified to take second operand as
7217         pCodeOp pointer and not as literal,
7218         * (popRegFromIdx): prefixed with pic16_,
7219         * (pic16_popCombine2): modified to receive already allocated pCode
7220         operands,
7221         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7222         * (genFunction): initializes local stack frame and pushes on stack
7223         all the registers used by this function,
7224         * (genEndFunction): restores all registers from stack and restores
7225         stack frame,
7226         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7227         improvements,
7228         * (pic16glue): changed the program startup sequence,
7229         * added new dbName code 'A' for functions placed in absolute section
7230         * src/pic16/main.c: added function attribute _naked,
7231         * added pragma 'code' to place a fnuction at an absolute address,
7232         * added command line arguments --debug-ralloc and --pcode-verbose,
7233         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7234         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7235         * (pic16_newpCodeOpLit2): modified to take the second operand as
7236         pCodeOp pointer,
7237         * (pic16_printpBlock): modified to emit each function in a separate
7238         section,
7239         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7240         UPPER for immediate operands,
7241         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7242         instruction,
7243         * src/pic16/peeph.def: all peepholes with movff are commented out,
7244         because there is a problem in the pcode peep optimizer,
7245         * src/pic16/ralloc.c: the register allocator can now reuse local
7246         function symbols for another function. This saves register usage.
7247         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7248
7249         Added file src/pic16/NOTES with information about program writing on
7250         the current port version.
7251
7252 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7253
7254         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7255         and peephole 252 (array access)
7256
7257 2004-01-09  Borut Razem <borut.razem AT siol.net>
7258
7259         * src/SDCCmain.c : fixed #872250: -l command line defined library
7260           files are scanned before standard library files
7261
7262 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7263
7264         * src/SDCCast.c (decorateType): fixed bug #874046
7265
7266 2004-01-09  Borut Razem <borut.razem AT siol.net>
7267
7268         * support/scripts/sdcc.nsi: remove previous installation
7269
7270 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7271
7272         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7273         bytes for last interrupt vector (mcs51)
7274         * sdcc.spec: fixed typo
7275
7276 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7277
7278         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7279         gen51Code): more efficient parameter receive for --model-large
7280         ("bug" #845294)
7281
7282 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7283
7284         * src/ds390/main.c,
7285         * src/z80/main.c: added missed needLinkerScript flags (more than
7286         one port structure defined in these file)
7287         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7288         bug #795325
7289
7290 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7291
7292         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7293         * src/port.h: added flag needLinkerScript in port->linker
7294         structure to inform whether to create a .lnk file or not,
7295         * src/avr/main.c,
7296         * src/ds390/main.c,
7297         * src/hc08/main.c,
7298         * src/mcs51/main.c,
7299         * src/pic/main.c,
7300         * src/pic16/main.c,
7301         * src/xa51/main.c,
7302         * src/z80/main.c: changed appropriately to configure
7303         needLinkerScript flag
7304         * src/pic/gen.c,
7305         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7306         * src/pic/glue.c: added variable udata_section_name to
7307         override default uninitialized data segment definition for
7308         devices only with SHAREBANK memory (reported from Erik Epetrich)
7309         * (pic14emitOverlay): modified to emit a commented overlay segment
7310         directive when no overlay data exist
7311         * (picglue): modified to emit uninitialized data segment
7312         according to udata_section_name
7313         * src/pic/main.c (_pic14_parseOptions): added command line
7314         options --udata-section-name=[name] to override default
7315         udata definition name
7316         * modified _linkCmd and _asmCmd to include compiler passed
7317         arguments via -W option
7318         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7319         object file from '.rel' to '.o' in port->linker structure,
7320         changed size of fptr from 2 to 3 in port structure
7321
7322 2004-01-07  Borut Razem <borut.razem AT siol.net>
7323
7324         * support/scripts/sdcc.nsi: update PATH
7325         * support/scripts/sdcc.ico: craeted
7326
7327 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7328
7329         * device/include/Makefile.in: fix install
7330         * doc/Makefile: fix install
7331
7332 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7333
7334         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7335         in bug #860505
7336         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7337         how the function variable allocation summary is displayed; also
7338         include information about variables allocated to the overlay
7339         segment
7340
7341 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7342
7343         * as/mcs51/lkmain.c: Help about -Y option
7344         * as/mcs51/lkarea.c: Fixed gcc warnings
7345
7346 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7347
7348         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7349         fixed warning
7350         * support/valdiag/tests/overflow.c: added
7351         * src/SDCCast.c (decorateType),
7352         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7353         LEFT_OP (left shift)
7354
7355 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7356
7357         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7358         (default behaviour).
7359
7360 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7361
7362         A python script to validate compiler diagnostic messages. It can be
7363         used to verify that sdcc complains about bad c source code and
7364         gives a good location of the error.
7365         * support/valdiag/Makefile,
7366         * support/valdiag/valdiag.py,
7367         * support/valdiag/tests/*
7368
7369 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7370
7371         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7372         * src/SDCCsymt.c (newEnumType),
7373         * src/SDCCsymt.h
7374         * support/Util/SDCCerr.c,
7375         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7376         enum related bugs.
7377         * support/regression/tests/enum.c: added test for enum values that
7378         require at least 2 bytes of storage.
7379
7380 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7381
7382         * src/common.h: added ifndef/define/endif macros
7383         around the header file.
7384         Bug reported from Jesus Calvino-Fraga
7385
7386 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7387
7388         * sdcc.spec: updated
7389         * device/include/Makefile.in: don't install CVS directories
7390         * device/lib/Makefile.in: added removal of CVS directories after install
7391         * doc/Makefile: fixed install, added local_icons
7392         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7393         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7394         * src/ds390/gen.c (genRightShift): fixed bug #870788
7395         * src/SDCCast.c (decorateType): fixed bug #870781
7396
7397 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7398
7399         PIC16 port related changes:
7400         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7401         added variable stackPos,
7402
7403         * gen.c: genCall, assignResultValue: added support for
7404         pushing/retrieving function parameters to/from stack,
7405         genFunction,genEndFunction: setup stack frame for the
7406         generated function,
7407         genAddrOf: will be changed according to bug 863624
7408
7409         * added files genutils.c and genutils.h which contain gen*
7410         debugged and optimised functions extracted from gen.c
7411
7412         * glue.c: added variable 'externs' which holds extern symbols,
7413         pic16emitRegularMap: is modified to properly handle relocatable
7414          symbols under the new scheme,
7415         pic16createInterruptVect: is modified
7416         pic16printPublics: is modified to emit 'global' assembler directives,
7417         added pic16_printExterns to print extern symbols,
7418         pic16glue: initializes stack/frame pointer in the beginning of
7419         the assembly output. Temporary hack, will be corrected later,
7420         because gplink yet does not support stack and SDCC does not
7421         yet support a type of crt0.o object to create the final binary.
7422
7423         * Removed many lines that contain 8051 legacy code.
7424         * The code is finally placed under a 'code' directive.
7425         * Added port specific options.
7426
7427         * _process_pragma: simplified since now we do not need *special*
7428         include file to define SFR registers. But a separate header
7429         will be needed. This will be developed later.
7430         * _pic16_parseOptions: added, parses port specific options:
7431         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7432         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7433         --preplace-udata-with=
7434
7435         * _pic16_setDefaultOptions: modified to initialize section names,
7436         but hack is temporarly out of order since it needs improvement.
7437         * _pic16_genAssemblerPreamble: configuration words are emitted by
7438         their address instead of their name. This part is incomplete and
7439         supports only the 18Fxx2 devices. Other devices will emit an error
7440         during assembly since they do not contain the same set of config
7441         registers
7442         * _pic16_genIVT: is modified,
7443
7444         * pcode.c: added definitions for some hardware registers that are needed
7445         for stack support
7446         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7447         All PCI entries are updated. Now LFSR is supported.
7448         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7449         * added pic16_newpCodeOpLit2 to support instructions with
7450         two literal arguments
7451         * pic16_pCode2str: corrected code that emits assembler instructions
7452         with two literal operands and those that have an access bit modifier
7453         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7454         this fixes a bug which caused some labels to be lost, when an
7455         assembler directive was added, i.e. banksel,
7456         * pic16_FixRegisterBanking: improved logic that causes the insertion
7457         of bank switching,
7458         * InlineFunction: functions that are called once, are not any more
7459         inlined. This can be a port option in the future,
7460
7461         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7462
7463         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7464         hold the corresponding uninitialized symbols,
7465         * pic16_allocProcessorRegister: registers have explicit marked the
7466         accessBank field,
7467         * pic16_allocInternalRegister: registers are explicit marked as
7468         not used,
7469         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7470         processing list, so bit registers were lost,
7471         *
7472
7473         * ralloc.h: added field 'accessBank' and original symbol operand
7474         in register definition,
7475         * removed the field isMapped from register definition,
7476
7477         ** Several functions have been removed from various sources:
7478         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7479         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7480         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7481         pic16_assignRelocatableRegisters
7482
7483         ** others have been introduced:
7484         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7485         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7486
7487 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7488
7489         * support/scripts/inc2h.pl: changed definition of BIT_AT
7490         to emit 'sbit at' instead of 'bit at'. This was a request.
7491
7492         PIC16 port related preliminary changes:
7493         * gen.c: prefixed function popRegFromString with
7494         pic16_ and all references to it corrected
7495         * pcode.c: all pic16_pc_* hardware registers prefixed
7496         with underscore (_),
7497         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7498         * ralloc.c: newReg(): when register is REG_SFR then
7499         set address to rIdx,
7500         pic16_allocProcessorRegister(): marks register wasUsed=0
7501         pic16_writeUsedRegs(): added a call to assign processor
7502         registers via pic16_assignFixedRegisters
7503
7504 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7505
7506         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7507         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7508         variables in unused register banks.  Also the SSEG is placed
7509         wherever there is enough space for it, and IDATA can be anywhere
7510         in internal RAM.  For now compile using -Wl-Y[stack_size].
7511         The mem file is different for this option as well, since it
7512         makes no sense of talking about DSEG lenght.
7513
7514 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7515
7516         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7517         in certain cases, e.g. when ROM assignment, patch provided
7518         from Albert den Haan.
7519
7520 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7521
7522         Many signedness and type propagation fixes:
7523         * src/SDCCicode.c: made geniCodeCast() static
7524         replaced SPEC_ by IS_ (cosmetic)
7525         (operandOperation): fixed div and mod operation
7526         (usualBinaryConversions): added support for promotion of char
7527         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7528         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7529         (geniCodeAdd): an array index will stay unsigned, even if promoted
7530         from char to int
7531         (geniCodeArray): ditto
7532         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7533         * src/SDCCsymt.c (computeType): added more support for char;
7534         promotion of char is selectable by promoteCharToInt, fixed signedness
7535         for all cases
7536         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7537         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7538         * src/SDCCval (val*): replaced signedness calculation by
7539         computeType()
7540         rearranged if-branches (cosmetic)
7541         (valShift): added warning W_SHIFT_CHANGED
7542         (valCompare): fixed problem with different types
7543         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7544         * support/regression/tests/literalop.c: added many cases
7545         * support/regression/tests/ast_constant_folding.c: changed finally to
7546         'unsigned int'
7547         * .version: new year, new version: 2.3.7
7548         * src/SDCCmain.c (main): applied patch #866468
7549         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7550         provided by Scott Bronson
7551         * doc/sdccman.lyx: updated documentation for sdcdb
7552         updated and added chapter tips
7553
7554 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7555
7556         * src/SDCCsymt.h: missing from yesterday's commits
7557
7558 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7559
7560         * src/SDCC.y (struct_or_union_specifier),
7561         * support/Util/SDCCerr.c,
7562         * support/Util/SDCCerr.h: verify that struct & union tags are used
7563         as declared.
7564
7565 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7566
7567         * src/SDCCglobl.h: missing from yesterday's commits
7568
7569 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7570
7571         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7572         sft_attributes, struct_declaration, parameter_declaration,
7573         type_name, start_block, declaration_list),
7574         * src/SDCC.lex (check_type): support redefinition of typedef names
7575
7576 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7577
7578         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7579         aligned xdata arrays. Erik helped me with the if clause.
7580
7581 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7582
7583         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7584         warning
7585
7586 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7587
7588         * src/SDCCast.h,
7589         * src/SDCCast.c (newAst_),
7590         * src/SDCCicode.h,
7591         * src/SDCCicode.c (ast2iCode, newiCode),
7592         * src/SDCCglobl.h,
7593         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7594         expr, statement, expression_statement, selection_statement,
7595         iteration_statement, expr_opt, jump_statement): foundation for tracking
7596         sequence points
7597         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7598         point code too)
7599
7600 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7601
7602         * support/Util/SDCCerr.c,
7603         * src/SDCCast.h,
7604         * src/SDCCast.c (createCase, createDefault, decorateType),
7605         * src/SDCClabel.c (labelUnreach),
7606         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7607         to error messages.
7608         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7609         (with thanks to Stas Sergeev)
7610         * device/include/time.h,
7611         * device/lib/time.c (CheckTime): suppress unreachable code warning
7612
7613 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7614
7615         * src/SDCCast.c (createIvalCharPtr),
7616         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7617         bug #753752)
7618         * support/regression/tests/nullstring.c: tests for these two bugs
7619
7620 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7621
7622         * support/Util/SDCCerr.h,
7623         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7624         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7625         about storage class and 'at' used inside struct or union
7626         * src/SDCCBBlock.c (iCodeFromeBBlock),
7627         * src/SDCCcse.c (ifxOptimize),
7628         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7629         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7630         printIval, emitStaticSeg, emitOverlay),
7631         * src/SDCClabel.c (deleteIfx),
7632         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7633         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7634         gatherAutoInit, processParms),
7635         * support/Util/SDCCerr.h,
7636         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7637         reporting for post-parse errors.
7638
7639 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7640
7641         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7642         implicit casts via union; they don't work on big endian systems
7643         (possible fix for bug #861138)
7644
7645 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7646
7647         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7648         * src/mcs51/main.c: fixed the fix for bug #737001
7649
7650 2003-12-15  Borut Razem <borut.razem AT siol.net>
7651
7652         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7653
7654 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7655
7656         * support/makebin/makebin.c: put output in binary mode
7657
7658 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7659
7660         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7661         xdata and data memory on startup. Set the environment variable
7662         SDCC_NOGENRAMCLEAR to disable this.
7663         * src/mcs51/peephole.def,
7664         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7665         (allows non-interrupt and interrupt code to safely compete for a resource
7666         without the non-interrupt code having to disable interrupts)
7667
7668 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7669
7670         * src/SDCCicode.c (geniCodeAdd),
7671         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7672         with valFromType if type might be a pointer and host is big endian).
7673         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7674         types, not just integer types.
7675         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7676         multiply defined with mismatching "at" address.
7677
7678 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7679
7680         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7681         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7682         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7683         with embedded nulls (fixed bug #753752)
7684
7685 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7686
7687         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7688         Apparently this did not see much testing (endless loop)
7689
7690 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7691
7692         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7693
7694 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7695
7696         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7697         gracefully handle NULL memmap pointers
7698
7699 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7700
7701         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7702         instead of deleting the iCode when an operand is volatile
7703         * src/z80/gen.c (genDummyRead),
7704         * src/mcs51/gen.c (genDummyRead),
7705         * src/ds390/gen.c (genDummyRead),
7706         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7707         not just IC_RIGHT
7708         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7709         * src/SDCC.y: fixed bug #850420
7710
7711 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7712
7713         Applied z80 i/o port patch from Peter Townson and fixed some operators
7714         to better handle operands in A register.
7715         * device/include/z180.h
7716         * src/SDCC.y
7717         * src/SDCCglue.c
7718         * src/z80/gen.c
7719         * src/z80/gen.h
7720         * src/z80/main.c
7721         * src/z80/peeph-z80.def
7722         * src/z80/peeph.def
7723         * src/z80/z80.h
7724
7725 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7726
7727         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7728
7729 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7730
7731         * device/lib/hc08/_mullong.c: Removed extra #endif
7732
7733 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7734
7735         * sim/ucsim/hc08.src/inst.cc,
7736         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7737         carries from x to h
7738         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7739         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7740         * device/include/stdarg.h: fixed varargs for hc08
7741         * device/lib/Makefile.in,
7742         * device/lib/hc08/Makefile,
7743         * device/lib/hc08/_mulint.c,
7744         * device/lib/hc08/_mullong.c: fixed some endian problems
7745
7746 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7747
7748         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7749         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7750         * device/lib/_gptrget.c,
7751         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7752
7753 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7754
7755         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7756         * src/SDCCast.c (astErrors): fixed bug #846007
7757         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7758
7759 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7760
7761         * src/SDCCast.c (decorateType): disabled a transformation I added in
7762         revision 1.188 (access to fields of a structure at an absolute address);
7763         it breaks with bitfields, extern declarations, and gcse analysis.
7764         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7765         could be assigned through a pointer, so don't complain.
7766         * src/SDCCast.c (astErrors),
7767         * src/SDCCast.h,
7768         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7769
7770 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7771
7772         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7773         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7774         output of __config directives, since gpasm now supports them
7775         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7776         pre-processor macro, i.e. -DMCU=p18f452
7777         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7778         and modified to handle 'cast' icode similarly to '=' icode
7779         * src/pic16/device.h (typedef struct PIC_device): added field
7780         'extMIface' to indicate that chip has external memory interface
7781         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7782         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7783         18F8720
7784
7785 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7786
7787         * src/SDCC.y (pointer): fixed bug #846006
7788         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7789         * src/SDCCast.c (decorateType): fixed bug #846009
7790         * src/ds390/peeph.def,
7791         * src/ds390/gen.c (genAnd, genOr),
7792         * src/mcs51/peeph.def,
7793         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7794
7795 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7796
7797         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7798         * src/SDCCdflow.c
7799         * src/SDCCcse.c
7800         * src/SDCCcse.h
7801         * src/SDCCBBlock.h
7802         * src/SDCCBBlock.c
7803
7804 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7805
7806         fixed bug #845089
7807         * src/SDCCbitv.h,
7808         * src/SDCCbitv.c: added function to free a bitvector
7809         * src/SDCClrange.h,
7810         * src/SDCClrange.c: added function to recompute the liveranges
7811         * src/avr/ralloc.c,
7812         * src/ds390/ralloc.c,
7813         * src/hc08/ralloc.c,
7814         * src/mcs51/ralloc.c,
7815         * src/pic/ralloc.c,
7816         * src/pic16/ralloc.c,
7817         * src/xa51/ralloc.c,
7818         * src/z80/ralloc.c: recompute the liveranges after register packing
7819
7820 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7821
7822         * src/SDCCloop.c (newInduction): fixed bug #845630
7823
7824 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7825
7826         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7827         inadvertantly left behind from my 2003-11-12 change
7828
7829 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7830
7831         Updated headers I neglected to commit yesterday.
7832         * src/SDCClrange.h,
7833         * src/SDCCicode.h
7834
7835 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7836
7837         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7838         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7839         * src/SDCCopt.c (eBBlockFromiCode),
7840         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7841         the creation of the key hash table from the sequencing so it can be used
7842         earlier (for some GCSE bug fixes still pending)
7843
7844 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7845
7846         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7847         * support/regression/tests/addsub.c: testing genPlus shortcut
7848
7849 2003-11-15  Borut Razem <borut.razem AT siol.net>
7850
7851         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7852
7853 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7854
7855         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7856         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7857         ordering is immaterial.
7858         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7859
7860 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7861
7862         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7863         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7864         (SIGSEV) of bug #840381
7865         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7866         unlink new file before rename if new and old filenames are the same)
7867
7868 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7869
7870         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7871         uninitialized variables) for the mcs51. Set environment variable
7872         SDCC_GENRAMCLEAR to test.
7873         xdata initialization slightly shorter
7874
7875 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7876
7877         * src/SDCCsymt.h,
7878         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7879         #838241 & 780691 (basicly the same bug)
7880         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7881         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7882
7883 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7884
7885         * src/SDCCmain.c (linkEdit): "fix" #834252
7886
7887 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7888
7889         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7890         * src/SDCCast.h,
7891         * src/SDCC.y: fixed bug #819403
7892
7893 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7894
7895         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7896         the reentrant attribute.
7897         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7898         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7899         simulation
7900         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7901         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7902         erroneously reduced to a literal.
7903         * src/hc08/ralloc.c (packRegisters, rematStr),
7904         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7905         some cases
7906
7907 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7908
7909         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7910         * doc/sdccman.lyx: changed from 'article' to 'book'
7911         * doc/Makefile: readded test_suite_spec and cdbfileformat
7912
7913 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7914
7915         * device/include/stdlib.h: include malloc.h to comply with ANSI
7916         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7917
7918 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7919
7920         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7921         * doc/clean.mk: also remove *.out files
7922         * doc/sdccman.lyx: some additions, larger top/bottom margins
7923
7924 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7925
7926         * src/SDCC.y: fixed bug #837365
7927         * support/regression/tests/bitopcse.c
7928         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7929         a symbol (might be valop instead)
7930         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7931         * device/lib/clean.mk: added hc08 to the cleaning list
7932
7933 2003-11-04  Borut Razem <borut.razem AT siol.net>
7934
7935         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7936           made 2003-11-04
7937         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7938           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7939           malloc is declared in standard stdlib.h
7940
7941 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7942
7943         * device/lib/hc08/Makefile: need to clean .rel not .o files
7944         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7945
7946 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7947
7948         * src/port.h,
7949         * src/hc08/main.c,
7950         * src/mcs51/main.c,
7951         * src/ds390/main.c,
7952         * src/z80/main.c,
7953         * src/avr/main.c,
7954         * src/pic/main.c,
7955         * src/pic16/main.c,
7956         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7957         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7958         tests (which uses the port's oclsExpense function)
7959         * src/SDCC.y,
7960         * src/SDCCast.c,
7961         * src/SDCCicode.c,
7962         * src/hc08/gen.c,
7963         * src/ds390/gen.c,
7964         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7965
7966 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7967
7968         * src/SDCCcse.c (ifxOptimize),
7969         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7970         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7971         deleting the IFX iCode.
7972         * src/hc08/ralloc.c: reduced unneeded slocs
7973         * src/hc08/gen.c: fixed bug in asmopToBoolean
7974
7975 2003-11-04  Borut Razem <borut.razem AT siol.net>
7976
7977         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7978           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7979           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7980           transferred to configure
7981
7982 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7983
7984         Use headers defined in the C[++] standards:
7985         * sim/ucsim/gui.src/serio.src/fileio.cc
7986         * sim/ucsim/gui.src/serio.src/frontend.cc
7987         * sim/ucsim/gui.src/serio.src/main.cc
7988         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7989         * support/Util/NewAlloc.c
7990         * as/hc08/lklibr.c
7991         * as/mcs51/lklibr.c
7992         * as/z80/aslist.c
7993         * as/z80/assym.c
7994
7995 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7996
7997         * Added MSVC projects for hc08 assembler and linker:
7998         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7999         /as/hc08/link_hc08.dsp
8000
8001 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8002
8003         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8004
8005 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8006
8007         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8008
8009 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8010
8011         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8012
8013 2003-10-31  Borut Razem <borut.razem AT siol.net>
8014
8015         * support/cpp2/cpplib.h,
8016           support/cpp2/cpplib.c,
8017           support/cpp2/cpplex.c,
8018           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8019           to switch _asm block preprocessing on / off. Default is
8020           #pragma preproc_asm +
8021
8022 2003-10-31  Borut Razem <borut.razem AT siol.net>
8023
8024         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8025           when outputting comment blocks (when executed with -C option) and
8026           _asm (SDCPP specific) blocks
8027
8028 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8029
8030         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8031
8032 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8033
8034         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8035
8036 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8037
8038         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8039         * src/SDCCast.c (decorateType): fixed bug #832664
8040
8041 2003-10-31  Borut Razem <borut.razem AT siol.net>
8042
8043         * support\cpp2\cpplex.c: fixed for SDCPP:
8044           comments(when executed with -C option) and _asm blocks
8045           were included even if they where in skipped #if block.
8046           Applied solution from GCC cpp 3.3.2
8047
8048 2003-10-31  Borut Razem <borut.razem AT siol.net>
8049
8050         * src/SDCC.lex: sdcc now understands both formats:
8051           '# <line_number> <file_name>' and
8052           '#line <line_number> <file_name>'
8053         * support/cpp2/cppmain.c: sdcpp now generates the standard
8054           '# <line_number> <file_name>' instead of former
8055           '#line <line_number> <file_name>'
8056
8057 2003-10-30  Borut Razem <borut.razem AT siol.net>
8058
8059         * support/cpp2/cpphash.h,
8060         * support/cpp2/cpplib.h
8061         * support/cpp2/cpplex.c,
8062         * support/cpp2/cppmain.c,
8063         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8064
8065 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8066
8067         Fixed a number of problems revealed by bug #827883.
8068         * src/SDCCloop.c (loopInvariants): Spill location of the
8069         result operand should be recomputed if extracted from
8070         a loop. Also, don't extract assignments of an iTemp
8071         from a literal.
8072         * src/SDCCast.c (isConformingBody): loop reversal should
8073         not occur if the control variable is involved with a
8074         relational operator.
8075
8076 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8077
8078         * .version: bumped to 2.3.6 to reflect the big improvements
8079         made by Erik and Klaus. Thanks!
8080
8081 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8082
8083         Replaced the livrange code.
8084         * src/SDCClrange.c: added new LR code
8085         * src/SDCCloop.c,
8086         * src/SDCCBBlock.h: removed remainig parts from old LR code
8087         * src/ds390/ralloc.c,
8088         * src/ds390/gen.c: minor fixes to make it work with new code
8089
8090 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8091
8092         * as/hc08/asm.h,
8093         * as/hc08/lkrloc.c,
8094         * src/hc08/gen.c,
8095         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8096         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8097         (tweaked fix for bug #818696)
8098
8099 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8100
8101         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8102
8103 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8104
8105         * src/SDCCmain.c,
8106         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8107         * src/mcs51/gen.c (gencjneshort),
8108         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8109         more efficient (per Scott Bronson's suggestion)
8110
8111 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8112
8113         Extended the semantics of the critical keyword to include
8114         individual statements. See RFE #827755 and #799831
8115         * src/SDCC.y
8116         * src/SDCCicode.c
8117         * src/SDCCopt.c
8118         * src/SDCCast.c
8119         * support/Util/SDCCerr.c
8120         * support/Util/SDCCerr.h
8121         * src/mcs51/gen.c
8122         * src/ds390/gen.c
8123         * src/hc08/gen.c
8124
8125 2003-10-19  Borut Razem <borut.razem AT siol.net>
8126
8127         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8128
8129 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8130
8131         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8132         Fixed bug #818696
8133         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8134         and predecrement operand is displayed
8135
8136 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8137
8138         * src/SDCCval.c (valMinus): fixed bug #826041
8139
8140 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8141
8142         Some hc08 related updates that I missed earlier
8143         * sim/ucsim/stypes.h
8144         * support/regression/ports/hc08/spec.mk
8145
8146 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8147
8148         New target "hc08" for the Motorola 68hc08 family of micros
8149
8150         * configure
8151         * configure.in
8152         * Makefile
8153         * src/hc08/*
8154         * src/SDCCmain.c
8155         * src/port.h
8156         * sim/ucsim/hc08.src/*
8157         * sim/ucsim/configure.in
8158         * src/ucsim/configure
8159         * sim/ucsim/packages_in.mk
8160         * as/hc08/*
8161         * as/Makefile
8162         * device/include/mc68hc908qy.h
8163         * device/lib/hc08/*
8164         * device/lib/Makefile.in
8165         * support/regression/ports/hc08/*
8166         * support/regression/Makefile
8167
8168 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8169
8170         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8171         regression test
8172         * src/ds390/gen.c (genCast): fixed bug #821957
8173
8174 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8175
8176         * device/lib/logf.c: "fixed" overlay bug
8177         * support/regression/ports/host/spec.mk: added m library
8178         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8179         * support/regression/tests/float_trans: added (for Eric)
8180
8181 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8182
8183         * src/mcs51/gen.c (genCpl): fixed bug
8184         http://sf.net/mailarchive/message.php?msg_id=6263915
8185
8186 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8187
8188         * src/SDCCast.c (decorateType): added extended constant folding
8189         * src/SDCCsymt.c (computeType): cleanup
8190         * src/SDCCval.c (valShift): minor optimization
8191         * support/regression/tests/ast_constant_folding.c: added
8192
8193 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8194
8195         * src/SDCCmain.c: removed some unintended changes
8196
8197 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8198
8199         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8200         * src/z80/gen.c: fixed part of bug #817589
8201         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8202
8203 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8204
8205         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8206         * src/SDCCcflow.c
8207         * src/SDCCcse.c
8208         * src/SDCCdflow.c
8209         * src/SDCClabel.c
8210         * src/SDCClrange.c
8211         * src/SDCCmem.c
8212         * src/SDCCopt.c
8213         * src/SDCCpeeph.c
8214         * src/SDCCset.c
8215         * src/avr/ralloc.c
8216         * src/ds390/ralloc.c
8217         * src/izt/ralloc.c
8218         * src/mcs51/ralloc.c
8219         * src/pic/ralloc.c
8220         * src/pic16/ralloc.c
8221         * src/xa51/ralloc.c
8222         * src/z80/ralloc.c
8223         * src/z80/gen.c: removed unused label "release:"
8224
8225 2003-10-06  Borut Razem <borut.razem AT siol.net>
8226
8227         * src/SDCC.lex: removed definition of unused variables
8228           save_optimize and save_options
8229
8230 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8231
8232         * clean.mk: removed '=' in "-maxdepth=1"
8233         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8234         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8235
8236 2003-10-06  Borut Razem <borut.razem AT siol.net>
8237
8238         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8239           my_unput() replaced by unput()
8240
8241 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8242
8243         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8244         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8245         type-punned pointer will break strict-aliasing rules"
8246         Old LR behaviour is again default; Klaus' LR can be choosen by
8247         defining the environment variable LRKLAUS
8248         * src/SDCCBBlock.h
8249         * src/SDCCloop.c
8250         * src/SDCClrange.c
8251         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8252         * clean.mk: fixed removal of files in bin/CVS/
8253         * device/lib/clean.mk: fixed removal of directories small and large
8254         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8255         * src/SDCCicode.c,
8256         * src/SDCCval.c: removed superflous test for pedantic
8257
8258 2003-10-05  Borut Razem <borut.razem AT siol.net>
8259
8260         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8261           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8262           message "unmatched #pragma SAVE and #pragma RESTORE"
8263
8264 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8265
8266         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8267           assembly, critical functions, atomic, nojtbound)
8268
8269 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8270
8271         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8272         * src/SDCCBBlock.h
8273         * src/SDCCloop.c
8274         * src/SDCCloop.h
8275         * src/SDCClrange.c
8276
8277 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8278
8279         * src/z80/gen.h,
8280         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8281         * src/mcs51/gen.h
8282         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8283         * src/ds390/gen.h
8284         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8285         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8286         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8287
8288 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8289
8290         * src/z80/gen.c (genRet): fixed bug #524753
8291         * src/z80/gen.c (genCast): fixed internal error on cast from
8292         pointer to long
8293         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8294         fix for bug #477835 to the z80
8295         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8296         for tracking iCodes in the peephole optimizer for z80
8297
8298 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8299
8300         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8301         the other part of bug #814548
8302         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8303
8304 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8305
8306         * src/SDCCcse.c: fixed part of bug #814548
8307
8308 2003-09-28  Borut Razem <borut.razem AT siol.net>
8309
8310         * src/asm.c: rewrite of printILine() to use temporary file instead
8311           a pipe
8312         * src/xa51/main.c: commented out declaration of int rewinds
8313
8314 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8315
8316         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8317
8318 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8319
8320         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8321         * src/asm.c (printILine): Fixed bug #811015
8322
8323 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8324
8325         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8326         freeing.
8327
8328 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8329
8330         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8331         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8332         to correctly handle general case of AOP_PAIRPTR
8333         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8334
8335 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8336
8337         * src/mcs51/ralloc.c (fillGaps),
8338         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8339         register positioning bug)
8340
8341 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8342
8343         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8344
8345 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8346
8347         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8348         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8349         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8350         (ralloc doesn't intentionally do this now, but perhaps later)
8351         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8352         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8353         register positioning bugs (Fixed bug #762602 and #795325)
8354         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8355         (Fixed bug #808779)
8356         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8357         lines that --i-code-in-asm generates
8358
8359 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8360
8361         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8362         trying to fclose a FILE* that was already closed.
8363
8364 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8365
8366         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8367         of const struct should be treated as if const themselves)
8368
8369 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8370
8371         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8372
8373 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8374
8375         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8376         Unix (/n) and DOS (/r/n) line terminations.
8377
8378 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8379
8380         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8381         bug #613775
8382
8383 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8384
8385         * src/mcs51/gen.c (genFunction, genEndFunction),
8386         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8387         and restore of EA so that stack offsets to parameters are
8388         correct when using both critical and reentrant/stack-auto.
8389         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8390         size (can be triggered in error if sloc is shared between
8391         different sized objects)
8392         * device/include/float.h: fixed macros to explicitly use
8393         unsigned long where needed
8394
8395 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8396
8397         Feature req. 799831: added code to allow nesting of critical functions
8398         * src/mcs51/gen.c (genFunction, genEndFunction)
8399         * src/ds390/gen.c (genFunction, genEndFunction)
8400
8401 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8402
8403         * src/SDCCsymt.c (sclsFromPtr),
8404         * src/SDCCsymt.h,
8405         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8406         support for standard C idiom of memory mapped variables; for
8407         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8408         to xdata int at 0x1234 tempvar = 1.
8409         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8410         provided by Akiya ISHIDA
8411
8412 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8413
8414         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8415         * src/SDCCval.c (constVal): added reduction from int to char
8416         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8417         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8418         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8419         to ignore the sign
8420         * support/regression/tests/shifts.c: fixed
8421
8422 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8423
8424         * src/z80/gen.c (genXor): Fixed bug #805445
8425
8426 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8427
8428         Fixed bug #621531 (const & volatile confusion in the type chain).
8429         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8430         refer to the const or volatile state of the pointer itself.
8431
8432         * src/SDCCast.c
8433         * src/SDCCglue.c
8434         * src/SDCCicode.c
8435         * src/SDCCsymt.c
8436         * src/SDCCval.c
8437         * src/SDCC.y
8438         * src/SDCCsymt.h
8439         * src/pic/gen.c
8440         * src/pic/ralloc.c
8441         * src/pic16/gen.c
8442         * src/pic16/ralloc.c
8443         * support/regression/tests/const.c
8444
8445 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8446
8447         When checking for duplicated modules, use absolute paths
8448         instead of relative paths.  Files changed:
8449
8450         * as/mcs51/lklib.c
8451         * link/z80/lklib.c
8452
8453 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8454
8455         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8456
8457 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8458
8459         * device/include/string.h: added size_t typedef, changed
8460         prototypes to use size_t, eliminated separate reentrant and
8461         non-reentrant declarations, added _memmove declaration
8462         * device/lib/_memcpy.c: changed to use size_t instead of int,
8463         changed /4 to >>2 to avoid division library call
8464         * device/lib/_memcmp.c,
8465         * device/lib/_memset.c,
8466         * device/lib/_strncat.c,
8467         * device/lib/_strncpy.c,
8468         * device/lib/_strncmp.c: changed to use size_t instead of int
8469         * device/lib/_memmove.c: new file (fixed bug #772294)
8470         * device/lib/Makefile.in: added _memmove.c
8471         * device/lib/z80/asm_strings.s: fixed bug #772290
8472         * support/regression/tests/bitfields.c: attempt to fix host assertion
8473         failure on amd64-unknown-linux2.2
8474
8475 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8476
8477         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8478         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8479         * as/z80/asmain.c (main): fixed bug #801766
8480
8481 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8482
8483         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8484         compilers
8485
8486 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8487
8488         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8489         reported in bug #800609
8490
8491 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8492
8493         * Top header beautifications in src/pic16 directory:
8494           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8495           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8496           pcoderegs.h, ralloc.c, ralloc.h
8497         * main.c: added top header and GPL license notice
8498         * pcode.c: fixed the if-conditional warning
8499
8500 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8501
8502         * device/lib/_mullong.c: replaced int by short for gcc
8503
8504 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8505
8506         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8507         and JUMPTABLE iCodes properly now (worked by accident before)
8508         * src/mcs51/gen.c (leftRightUseAcc),
8509         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8510         iCode properly now. Use getSize instead of nRegs since a & b
8511         aren't part of the nRegs tally.
8512
8513 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8514
8515         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8516         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8517           before instructions that use the _STATUS register
8518
8519 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8520
8521         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8522         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8523         fetching of the pointer
8524         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8525         copied from genNearPointerSet()
8526         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8527         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8528         If they pop r0/r1 they must be called in the opposite order than aopOp().
8529         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8530         (resp. --stack-auto), prepared for --xstack
8531
8532 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8533
8534         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8535
8536 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8537
8538         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8539         these ports have their own __sdcc_external_start()
8540
8541 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8542
8543         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8544         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8545         type for bits was changed. It resulted in bit variables becoming
8546         global, which is not permitted in PIC 14 assembly output.
8547
8548 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8549
8550         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8551
8552 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8553
8554         Z80 and MCS51 linkers complaint if a public symbol is defined
8555         in more than one library module:
8556
8557         * as/mcs51/lklib.c
8558         * link/z80/lklib.c
8559         * as/mcs51/Makefile.in
8560
8561 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8562
8563         A few small changes that speed up the peephole optimizer.
8564
8565         * src/SDCCpeeph.c
8566
8567 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8568
8569         Try to make the peephole optimizer smarter by maintaining
8570         an association between the assembly source code and the
8571         iCodes that originated them. Put this information to use
8572         with a new peephole rule condition "notVolatile" so that
8573         the rules can be aggressive yet still safe.
8574
8575         * src/SDCCpeeph.c
8576         * src/SDCCpeeph.h
8577         * src/mcs51/gen.c
8578         * src/mcs51/peeph.def
8579
8580 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8581
8582         Fixed bug #741761
8583
8584         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8585         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8586         if the left or right operand symbols have the accuse flag set.
8587
8588 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8589
8590         Changed the type of the result of the ! (NOT) operator to char;
8591         previously it returned the same type as the source. This allows
8592         us to eliminate all the genFloatNot functions (all of its target
8593         implementations were very buggy) since !float can use the same
8594         code as !long now.
8595
8596         * src/SDCCicode.c (ast2iCode): ! returns char
8597         * src/mcs51/gen.c (genNot, genNotFloat),
8598         * src/ds390/gen.c (genNot, genNotFloat),
8599         * src/z80/gen.c (genNot, genNotFloat),
8600         * src/pic/gen.c (genNot, genNotFloat),
8601         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8602
8603 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8604
8605         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8606         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8607            during interrupts. Ensure WSAVE is located at a shared bank address.
8608         2. Fixed page selection in some places
8609         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8610            the registers name strings.
8611         4. Fixed "signed / unsigned compare" compiler warnings.
8612         5. The PIC port manages its own allocation of the general purpose
8613            registers, but makes no attempt to reuse them. As a result when
8614            compiling it soon runs out of general purpose registers. Some
8615            additional code was added to the files pcode.c and device.c to walk
8616            through the function call tree and rename the registers so that they
8617            get reused.
8618
8619         * src/pic/device.c
8620         * src/pic/gen.c
8621         * src/pic/glue.c
8622         * src/pic/pcode.c
8623         * src/pic/pcode.h
8624         * src/pic/ralloc.c
8625         * src/pic/ralloc.h
8626         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8627         genPlus() & genMinus() when the result is the same as left or right
8628
8629 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8630
8631         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8632
8633 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8634
8635         Made bitfield a distinct type from bit so that bitfields
8636         convert as per ANSI C and bits retain their traditional
8637         boolean style behaviour. Implemented bitfield support in
8638         the z80 port.
8639
8640         * src/SDCCsymt.h,
8641         * src/SDCCsymt.c,
8642         * src/SDCCast.c,
8643         * src/cdbFile.c,
8644         * src/mcs51/gen.c,
8645         * src/ds390/gen.c: bit v bitfield split
8646         * src/z80/gen.c: New support for bitfields
8647         * support/regression/tests/bitfields.c: reenabled z80,
8648         added more tests
8649
8650 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8651
8652         Rules 246.x, 247.x relate to bitfields, the others speed up
8653         access to xdata mapped I/O devices.
8654
8655         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8656
8657 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8658
8659         Cleaned up genPackBits and genUnpackBits and added two helper
8660         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8661         for literal assignments in genPackBits (thanks to Frieder for
8662         reminding me).
8663
8664         * src/mcs51/gen.c
8665         * src/ds390/gen.c
8666
8667 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8668
8669         Fixed bug #748310 (pointer to function type mishandled when the
8670         function name is omitted). Also fixed a SIGSEGV when a function
8671         attribute (reentrant, etc) is used on a non-function or on a
8672         function but misplaced before the parameter list.
8673
8674         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8675         bug #748310
8676         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8677         * support/Util/SDCCerr.h,
8678         * support/Util/SDCCerr.c: Added func attr misuse error msg
8679
8680 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8681
8682         Fixed bug #787649 by anonymous
8683         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8684         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8685
8686 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8687
8688         Fixed numerous bitfield problems.
8689
8690         * src/SDCC.y: More bitfield related error checking
8691         * src/SDCCsymt.h,
8692         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8693         * support/Util/SDCCerr.h,
8694         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8695         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8696         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8697         * support/regression/tests/bitfields.c: tests added
8698
8699 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8700
8701         Made the constant following the "interrupt" keyword optional. If
8702         omitted, the function will not automatically be given an entry
8703         in the interrupt vector table (similar to #pragma NOIV, but
8704         less syntacticly kludgy). The interrupt number is also now
8705         range checked. Also fixed a bug in the high order bit example
8706         in the manual.
8707
8708         * src/SDCC.y
8709         * src/SDCCmem.c
8710         * src/SDCCglue.c
8711         * src/SDCCsymt.h
8712         * support/Util/SDCCerr.c
8713         * support/Util/SDCCerr.h
8714         * doc/sdccman.lyx
8715
8716 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8717
8718         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8719         * src/SDCCicode.c (operandOperation): rewritten some ops
8720         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8721         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8722         other type
8723         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8724         be re-activated by defining REDUCE_LITERALS)
8725         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8726         unsigned, but are signed by default
8727         * src/SDCCval.c (constVal): rearranged
8728         * src/SDCCval.c (valMod): preliminary fix
8729         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8730         * support/regression/literalop.c: added, work in progress
8731
8732 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8733
8734         Generate warnings for useless declarations like "char data;"
8735         that don't do what new users expect.
8736
8737         * src/SDCC.y
8738         * support/Util/SDCCerr.h
8739         * support/Util/SDCCerr.c
8740
8741 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8742
8743         * src/SDCCval.c (valMult): fix overflow detection of negative int
8744
8745 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8746
8747         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8748
8749         Changes to support big endian targets:
8750
8751         * src/ports.h
8752         * src/SDCCglue.c
8753         * src/avr/main.c
8754         * src/ds390/main.c
8755         * src/izt/i186.c
8756         * src/mcs51/main.c
8757         * src/pic/main.c
8758         * src/pic16/main.c
8759         * src/xa51/main.c
8760         * src/z80/main.c
8761
8762 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8763
8764         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8765         * device/lib/time.c: fixed warning "integer overflow in expression"
8766
8767 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8768
8769         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8770         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8771         constants are unsigned; added recognition of "u" flag for unsigned
8772         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8773         * src/SDCCval.c (valDiv, valMod): fixed signdness
8774         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8775         signedness of modulo, left and right shift
8776         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8777         * support/Util/SDCCerr.h: added warning W_INT_OVL
8778         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8779         * src/SDCCast.c (ast_print): improved output of constants
8780
8781 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8782
8783         Fixed some warnings when building with MSVC:
8784
8785         * as\mcs51\asdata.c
8786         * as\z80\asdata.c
8787         * as\mcs51\asm.h
8788         * as\z80\asm.h
8789         * link\z80\aslink.h
8790         * link\z80\lkdata.c
8791         * link\z80\lkeval.c
8792         * link\z80\lkgb.c
8793         * link\z80\lkihx.c
8794         * link\z80\lks19.c
8795         * link\z80\lksym.c
8796         * support\cpp2\cpplib.c
8797         * src\ds390\gen.c
8798         * src\mcs51\gen.c
8799
8800 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8801
8802         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8803
8804 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8805
8806         * support\librarian\clean.mk: Do not remove Makefile.
8807         * support\librarian\Makefile: added.
8808
8809 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8810
8811         Added librarian to MSVC build:
8812         * all.dsp
8813         * sdcc.dsw
8814         * support\librarian\librarian.dsp
8815
8816         'configure' not needed for librarian, removed:
8817         * support\librarian\configure
8818         * support\librarian\configure.in
8819         * support\librarian\config_in.h
8820         * support\librarian\Makefile.in
8821
8822         Hopefully these ones built the librarian and the rest of sdcc properly:
8823         * Makefile
8824         * Makefile.common.in
8825
8826         Messed up 'configure', so revert to previous version:
8827         * configure
8828         * configure.in
8829
8830 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8831
8832         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8833         there, while the mantissa of a double is "only" 53 bits wide.
8834
8835 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8836
8837         Adding sdcclib to the build.  MSVC project coming soon.
8838         Files added/changed:
8839
8840         * support\librarian\clean.mk
8841         * support\librarian\configure
8842         * support\librarian\configure.in
8843         * support\librarian\config_in.h
8844         * support\librarian\Makefile.bcc
8845         * support\librarian\Makefile.in
8846         * support\librarian\sdcclib.c
8847         * Makefile.bcc
8848         * Makefile
8849         * Makefile.common.in
8850         * configure
8851         * configure.in
8852
8853 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8854
8855         Linker now complaints if linked modules have conflicting options, for
8856         example, one compiled using --model-large and another one compiled with
8857         --model-small.  The following files were modified:
8858
8859         * as\mcs51\asdata.c
8860         * as\mcs51\aslink.h
8861         * as\mcs51\asm.h
8862         * as\mcs51\asmain.c
8863         * as\mcs51\asout.c
8864         * as\mcs51\i51pst.c
8865         * as\mcs51\lkdata.c
8866         * as\mcs51\lklibr.c
8867         * as\mcs51\lkmain.c
8868         * as\z80\asdata.c
8869         * as\z80\asm.h
8870         * as\z80\asmain.c
8871         * as\z80\asout.c
8872         * as\z80\z80pst.c
8873         * link\z80\aslink.h
8874         * link\z80\lkdata.c
8875         * link\z80\lklibr.c
8876         * link\z80\lkmain.c
8877         * src\SDCCglue.c
8878
8879 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8880
8881         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8882         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8883
8884 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8885
8886         * src/z80/mappings.i: fix _mul[us][int,long] entries
8887
8888 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8889
8890         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8891
8892 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8893
8894         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8895         * support/regression/tests/bitopcse.c: added
8896         fixed warning:
8897         * src/avr/gen.c:
8898         * src/pic/gen.c:
8899         * src/pic16/gen.c:
8900         * src/z80/gen.c:
8901         * src/xa51/gen.c:
8902
8903 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8904
8905         added support for new library format to z80, gbz80 linkers:
8906         *link/z80/aslink.h
8907         *link/z80/lklex.c
8908         *link/z80/lklib.c
8909         *link/z80/lklist.c
8910
8911 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8912
8913         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8914         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8915
8916 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8917
8918         added DUMMY_READ_VOLATILE:
8919         * src/SDCC.y:
8920         * src/avr/gen.c:
8921         * src/xa51/gen.c:
8922         * src/z80/gen.c:
8923         * src/pic/gen.c:
8924         * src/pic16/gen.c:
8925         * src/mcs51/gen.c:
8926         * src/ds390/gen.c:
8927         * src/SDCCcse.c (algebraicOpts): many improvements
8928         * src/SDCCcse.h: removed algebraicOpts()
8929         * src/SDCCicode.c (picDummyRead): added
8930
8931 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8932
8933         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8934         "Insufficient space in data memory".
8935
8936 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8937
8938         * src/mcs51/gen.c: fixed bug #771358
8939         * src/z80/gen.c: fixed bug #759087
8940
8941 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8942
8943         * src/pic16/glue.c: minor cleanup by Vangelis
8944
8945 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8946
8947         * device/include/regc515c.h: fixed #758477
8948         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8949         * device/lib/_gptrput.c: saved a few bytes
8950         * my tab spacing is 8, yours too?)
8951         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8952         * device/lib/serial.c: process RX bytes earlier than TX bytes
8953         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8954
8955 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8956
8957         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8958
8959 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8960
8961     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8962
8963 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8964
8965         * device/lib/Makefile.in: bad fix, reverted to 1.43
8966
8967 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8968
8969         * device/lib/Makefile.in: added missing z80 object files
8970
8971 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8972
8973         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8974         pic16 progress by Vangelis:
8975         * src/SDCCglobl.h:
8976         * src/SDCCmain.c:
8977         * src/pic/Makefile:
8978         * src/pic:
8979         * pic/Makefile:
8980         * pic16/device.c:
8981         * pic16/device.h:
8982         * pic16/gen.c:
8983         * pic16/gen.h:
8984         * pic16/genarith.c:
8985         * pic16/glue.c:
8986         * pic16/main.c:
8987         * pic16/pcode.c:
8988         * pic16/pcode.h:
8989         * pic16/pcodepeep.c:
8990         * pic16/peeph.def:
8991
8992 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8993
8994     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8995
8996 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8997
8998     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8999     added gbz80 build to MSVC project.
9000     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9001     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9002     from 8051 stuff and setup so it links using a .lnk file.
9003
9004 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9005
9006     * support/librarian/sdcclib.c: sdcc librarian.
9007     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9008     with sdcclib.
9009
9010 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9011
9012     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9013
9014 2003-07-02  Borut Razem <borut.razem AT siol.net>
9015
9016         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9017         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9018         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9019         src/xa51/main.c, src/z80/main.c:
9020         virtualization of glue() function: each port has it's own glue function,
9021         which is accessed by do_glue function pointer in PORT.general structure
9022
9023 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9024
9025         * DS800C400 fun, improved ROM interface and tinibios.
9026
9027 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9028
9029         * More support for DS80C400. Now includes beginning of interface to ROM.
9030
9031 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9032
9033         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9034
9035 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9036
9037         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9038
9039 2003-06-19  Borut Razem <borut.razem AT siol.net>
9040
9041         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9042
9043 2003-06-19  Borut Razem <borut.razem AT siol.net>
9044
9045         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9046         fixed Z80 port - crt0.o: cannot open.
9047
9048 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9049
9050         * support/Util/MySystem.c (merge_command): revert bad fix
9051
9052 2003-06-18  Borut Razem <borut.razem AT siol.net>
9053
9054         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9055
9056 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9057
9058         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9059         option --use-stdout sends errors to stdout instead of stderr.
9060
9061 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9062
9063         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9064
9065 2003-06-15  Borut Razem <borut.razem AT siol.net>
9066
9067         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9068         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9069         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9070         fixed width array of pointers replaced with sets;
9071         multiple include and lib paths ared transferred to preprocessor and linker
9072         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9073         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9074         fixed width array of pointers
9075         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9076         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9077         fixupPath(), getPathDifference()
9078         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9079         fixed width array of pointers
9080
9081 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9082
9083         * src/pic16/ralloc.c: fix warnings
9084         * src/pic16/pcode.c: fix warning
9085
9086 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9087
9088          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9089         know all the details, but essentially this set of changes enable
9090         the pic16 port to generate movff instructions and generate assembler
9091         directives,
9092         * src/SDCCmain.c:
9093         * src/pic16/gen.c:
9094         * src/pic16/glue.c:
9095         * src/pic16/pcode.c:
9096         * src/pic16/device.c:
9097         * src/pic16/main.c:
9098         * src/pic16/pcode.h:
9099         * src/pic16/pcoderegs.c:
9100         * src/pic16/ralloc.c:
9101         * src/pic16/ralloc.h:
9102
9103 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9104
9105         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9106         added option --vc, so sdcc errors and warnings are compatible with
9107         Microsoft Visual Studio.
9108
9109 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9110
9111         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9112           device/lib/libfloat.lib: added atof function.
9113
9114 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9115
9116         * doc/sdccman.lyx: updated to Lyx 1.3
9117         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9118         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9119         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9120
9121 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9122
9123         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9124
9125 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9126
9127         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9128           additions to the "related tools/documentation" section
9129
9130 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9131
9132         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9133
9134 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9135
9136         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9137         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9138
9139 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9140
9141         * doc/sdccman.lyx: fix double dash and other minor things
9142         * doc/Makefile: fix double dash
9143
9144 2003-05-28  Karl Bongers(patches from Martin Helmling)
9145         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9146           condition and ignore commands.
9147
9148 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9149
9150         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9151           is in parts still quite out of date, I did changes as far as I felt makes sense
9152           for a non-native english speaker.
9153           Please feel free to add to the manual or to correct my changes.
9154         * doc/Makefile: undid touching the date of intermediate tex files.
9155
9156 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9157
9158         * doc/sdccman.lyx: Manual has an index now
9159
9160 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9161
9162         Finalize muluint/mulsint and mululong/mulslong merging:
9163         * device/lib/_mulint.c
9164         * device/lib/_mullong.c
9165         * device/lib/gbz80/mul.s
9166         * device/lib/gbz80/stubs.s
9167         * device/lib/z80/mul.s
9168         * device/lib/z80/stubs.s
9169         * src/SDCCsymt.c (initCSupport)
9170
9171 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9172
9173         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9174         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9175           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9176           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9177           instead of /Zm500.
9178
9179 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9180
9181         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9182           the regression tests I'm not brave enough to enable 245.b, 245.c
9183         * doc/sdccman.lyx: added latex preamble for hyperref package.
9184           Using pdflatex this will give you a hyperlinked pdf file with
9185           bookmarks. (prepend '%' before /usepackage if this breaks something)
9186
9187 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9188
9189          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9190
9191 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9192
9193         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9194
9195 2003-05-21    <johan AT balder>
9196
9197         * src/SDCCglue.c (printIval): fixed bug #739934
9198
9199 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9200
9201         Applied patch from bug 737905 (renamed yylineo to mylineno):
9202         * src/altlex.c
9203         * src/SDCCast.c
9204         * src/SDCglobl.h
9205         * src/SDCC.lex
9206         * src/SDCCsymt.c
9207         * src/SDCCval.c
9208         * src/pic16/pcode.c: Cleaned warnings
9209         * src/pic16/pcodeflow.c: Cleaned warnings
9210         * src/pic16/pcoderegs.c: Cleaned warnings
9211
9212 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9213
9214         * src/pic16/pcode.c: Cleaned warnings
9215         * src/pic16/pcodepeep.c: Cleaned warnings
9216         * src/pic16/ralloc.c: Cleaned warnings
9217
9218 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9219
9220         * doc/sdccman.lyx: fixed bug 739745
9221         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9222
9223 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9224
9225         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9226         it can be defined with CFLAGS when running configure
9227         * src/SDCCmain.c: fixed compiling + linking with object files
9228
9229 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9230
9231         * configure.in: configure for pic16 port,
9232             added --disable-pic16-port
9233         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9234         * src/SDCCmain.c: linkOptions is changed to set *,
9235             added if/endif conditional macros to remove options help
9236             messages from optionsTable when a port is not configured, added
9237             support for the PIc16 port in the ports table, when executing
9238             the compiler with no port specified on command line, a default
9239             port is selected with the new macro DEFAULT_PORT which is
9240             defined in port.h, in setDefaultOptions() linkOptions is removed
9241             from initialization assignment, since now it is a set,
9242             parseCmdLine uses setParseWithComma for linkOptions, in
9243             linkEdit() linkOptions are accessed with new function indexSet()
9244             which returns the i'th item of a set variable. See SDCCset.c, in
9245             linkEdit() when calling buildCmdLine(), added linkOptions as
9246             last argument. Now users can pass arguments to gplink via the
9247             -Wl option, main() uses pic16glue() to glue up pic16 programs
9248         * src/SDCCpeeph.c: various changes to support pic16
9249         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9250             return the i'th item of the set
9251         * src/SDCCset.h: added function prototype for indexSet()
9252         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9253         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9254         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9255             added macro DEFAULT_PORT
9256         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9257         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9258             generated
9259         * src/pic16/glue.c: commented out some error producing lines
9260         * src/pic16/main.c: __config directives are commented out to stop
9261             gpasm complaining and test the linkage with gplink, _linkCmd and
9262             _asmCmd changed to be more gplink and gpasm friendly
9263         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9264             produced an error when parsed, peep rule 12 is added to utilize
9265             movff, but it is commented out since the pCode does not support
9266             yet a command with 2 address arguments
9267
9268 2003-05-18    <johan AT balder>
9269
9270         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9271         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9272 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9273
9274         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9275   Added feature to script commands from file.
9276
9277 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9278
9279         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9280         * src/SDCCutil.c: include ctype.h for win32
9281
9282 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9283
9284         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9285
9286 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9287
9288         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9289   Fixed so you can set breakpoints prior to run, run does not stop
9290   on entry now.  Add tbreak.  Other enhancements and fixes for use
9291   with ddd.
9292
9293 2003-05-12  Borut Razem <borut.razem AT siol.net>
9294
9295         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9296
9297 2003-05-11  Borut Razem <borut.razem AT siol.net>
9298
9299         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9300         the path of bin directory, so that PATH is the only env. variable, which has to be set
9301         in case of standard installation.
9302         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9303         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9304         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9305
9306 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9307
9308         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9309         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9310         temp files are in the port dir; clean the gen/test directory when
9311         generating new test.c
9312         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9313         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9314         * support/regression/tests/zeropad.c: added
9315
9316 2003-05-09    <johan AT balder>
9317
9318         * src/SDCCglue.c: fixed bug #597940
9319
9320 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9321
9322         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9323   cache sfr, optimize next,step, fix off by one sourceline,
9324   support ddd list function.
9325         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9326
9327 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9328
9329         * support/regression/HTMLgen.py: added compare_s2f()
9330         * support/regression/Makefile: redo 1.27
9331         * support/regression/generate-cases.py: redo 1.5
9332
9333 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9334
9335         * support/regression/tests/float.c: workaround 33 bit hex constant
9336         * support/regression/tests/simplefloat.c: fix division for host
9337
9338 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9339
9340         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9341         that tame's the PIC's over-aggressive optimizer.
9342
9343 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9344
9345          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9346          support for MSVC.
9347
9348 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9349
9350         Initial support for DS80C400. "Hello world" runs on TINIm400
9351         (with polled I/O).
9352
9353 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9354
9355          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9356          * Some notes on ddd usage added in debugger/README
9357          Martin Helmling adding more features and fixes for ddd GUI debugger.
9358          Code added for nexti, stepi, up, down, and other adjustments.
9359
9360 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9361
9362         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9363         * src/pic/peeph.def Added two rules to optimize carry manipulation
9364         * src/pic/* removed debug printfs
9365
9366 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9367
9368         * debugger/mcs51/cmd.c: added header newalloc.h
9369
9370 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9371
9372         * as/Makefile: new EXEEXT
9373         * as/z80/Makefile: remove trailing slash of BUILDIR
9374         * as/z80/clean.mk: new EXEEXT
9375         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9376         * support/cpp2/Makefile.in: new EXEEXT
9377         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9378
9379 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9380
9381         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9382         EXEEXT was introduced to fix all related problems with targets
9383         "clean", "install" and "uninstall"; a couple of further flaws
9384         especially with "clean" have been fixed too
9385         * as/mcs51/Makefile.in
9386         * as/mcs51/clean.mk
9387         * as/z80/Makefile
9388         * Makefile
9389         * clean.mk
9390         * debugger/mcs51/Makefile.in
9391         * debugger/mcs51/clean.mk
9392         * link/z80/Makefile
9393         * link/z80/Makefile.in
9394         * link/z80/clean.mk
9395         * link/Makefile
9396         * packihx/Makefile.in
9397         * packihx/clean.mk
9398         * sim/ucsim/Makefile
9399         * sim/ucsim/clean.mk
9400         * sim/ucsim/avr.src/Makefile.in
9401         * sim/ucsim/avr.src/clean.mk
9402         * sim/ucsim/s51.src/Makefile.in
9403         * sim/ucsim/s51.src/clean.mk
9404         * sim/ucsim/xa.src/Makefile.in
9405         * sim/ucsim/xa.src/clean.mk
9406         * sim/ucsim/z80.src/Makefile.in
9407         * sim/ucsim/z80.src/clean.mk
9408         * sim/ucsim/main_in.mk
9409         * sim/ucsim/packages_in.mk
9410         * sim/ucsim/gui.src/Makefile.in
9411         * sim/ucsim/gui.src/serio.src/Makefile.in
9412         * sim/ucsim/gui.src/serio.src/clean.mk
9413         * src/Makefile.in
9414         * src/clean.mk
9415         * support/cpp2/Makefile.in
9416         * support/cpp2/clean.mk
9417         * support/makebin/Makefile
9418         * support/makebin/clean.mk
9419         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9420         * doc/sdccman.lyx: --program-suffix no longer needed
9421
9422 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9423
9424          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9425          Martin Helmling added support for ddd GUI debugger.
9426          Code added to display assembly, set variables, and other commands
9427          to interface to ddd.
9428
9429 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9430
9431         * as/Makefile: fix target clean
9432         * as/clean.mk: fix target clean
9433         * as/z80/clean.mk: fix target clean
9434
9435 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9436
9437         * Makefile.common.in: added  AT EXEEXT AT
9438         * configure.in: removed all mingw32 stuff
9439         * configure: rebuilt from configure.in
9440         * doc/sdccman.lyx: updated section "installation"
9441         * support/scripts/sdcc_mingw32: adapted to configure
9442         * support/scripts/sdcc_cygwin_mingw32: added
9443
9444 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9445
9446         * src/pic Added object file support for the PIC port
9447         * src/pic Applied patch from Craig Franklin (this started the object file support)
9448         * src/regression Updated the PIC regression tests for object files
9449
9450 2003-04-20  Borut Razem <borut.razem AT siol.net>
9451
9452         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9453           lklex.c: In function `getfid':
9454           lklex.c:203: warning: array subscript has type `char'
9455         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9456           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9457         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9458           stack handling macros
9459
9460 2003-04-19  Borut Razem <borut.razem AT siol.net>
9461
9462         * "handling space characters in file path" task:
9463         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9464         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9465         * support/Util/MySystem.h: make it self-sufficient
9466         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9467           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9468           handling space characters in file path
9469         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9470           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9471         * support/Util/MySystem.c: handling space characters in executable's path
9472
9473 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9474
9475         * as/z80/Makefile: fix permanent rebuild of z80
9476         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9477         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9478
9479 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9480
9481         * src/SDCCopt.c: add special case optimization to replace modulo by
9482           a power of two with a bitwise AND.
9483
9484 2003-04-18    <johan AT balder>
9485
9486         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9487
9488 2003-04-17    <johan AT balder>
9489
9490         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9491         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9492
9493 2003-04-13  Borut Razem <borut.razem AT siol.net>
9494
9495         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9496         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9497           fixed mingw problem in adl_NORMALIZE_PATH
9498
9499 2003-04-12  Borut Razem <borut.razem AT siol.net>
9500
9501         * fixed "#pragma SAVE/RESTORE can not be nested":
9502         * src/SDCC.lex: reworked pragma handling functions
9503         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9504         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9505
9506 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9507
9508         * src/SDCCutil.c (pathEquivalent): defined but not used
9509         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9510         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9511         * configure: rebuilt from configure.in
9512         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9513         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9514         * device/include/Makefile.in: replace sdcc_datadir
9515         * device/lib/Makefile.in: replace sdcc_datadir
9516         * Makefile.common.in: add LDFLAGS from configure
9517         * packihx/Makefile.in: use LDFLAGS
9518         * src/Makefile.in: use LDFLAGS
9519         * support/cpp2/Makefile.in: add LDFLAGS from configure
9520         * support/makebin/Makefile: use LDFLAGS
9521         * .version: bumped version number to 2.3.5
9522
9523 2003-04-12  Borut Razem <borut.razem AT siol.net>
9524
9525         * completed "different paths" task:
9526         * src/SDCCmacro.c: fixed bug in handling quotes
9527         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9528         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9529
9530 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9531
9532         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9533
9534 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9535
9536         * ds390/gen.c ds390/peeph.def: fix bug 706781
9537
9538 2003-04-11  Borut Razem <borut.razem AT siol.net>
9539
9540         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9541
9542 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9543
9544         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9545         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9546          set - this bit used to not be set...).
9547         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9548           bad code in PIC Port
9549         * src/regression/and2.c added to test bug 609268
9550         * src/regression/Makefile added and2.c to regression test
9551
9552
9553 2003-04-08    <johan AT CP255758-A>
9554
9555         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9556         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9557         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9558
9559 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9560
9561         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9562         fix bug #487815
9563         * support/cpp2/Makefile.in: fix bug #487815
9564         * configure: rebuilt from configure.in
9565         * Makefile.common.in: docdir changed, new path suffixes
9566         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9567         * sdcc_vc_in.h: reflect changes from sdccconf.h
9568         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9569         * src/SDCCutil.h: remove BINDIR hack
9570         * doc/sdccman.lyx: update new path hierarchy
9571
9572 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9573
9574         * src/SDCCpeeph.c: added okToRemoveSLOC test
9575
9576 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9577
9578         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9579
9580 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9581
9582         * src/SDCCpeeph.c: added labelIsReturnOnly test
9583         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9584
9585 2003-04-05    <johan AT balder>
9586
9587         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9588         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9589         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9590         * src/SDCCast.c: fixed a warning
9591         * src/SDCCast.h: fixed a warning
9592         * src/SDCCicode.c (operandFromAst): fixed a warning
9593
9594 2003-04-04    <johan AT balder>
9595
9596         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9597         * src/SDCCast.c (decorateType): fixed bug #715076
9598         * src/SDCC.y: fixed bug #702907
9599
9600 2003-04-03    <johan AT balder>
9601
9602         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9603         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9604         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9605         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9606         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9607
9608 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9609
9610         * _decdptr.c: fix return values
9611         * _gptrget.c: fix return values
9612         * _gptrgetc.c: fix return values
9613         * _gptrput.c: fix return values
9614         * _mulint.c: fix return values
9615         * as/z80/Makefile: fix 'make -j' problem
9616
9617 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9618
9619         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9620         * configure.in: big cleanup, updated to autoconf 2.5x
9621         * configure: rebuilt from configure.in
9622         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9623         * sdcc_vc_in.h: reflect changes from sdccconf.h
9624         * doc/Makefile: fixed a flaw in "make install"
9625
9626 2003-04-02    <johan AT balder>
9627
9628         * src/ds390/gen.c (genCmp): no comments
9629         * src/mcs51/gen.c (genCmp): no comments
9630         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9631         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9632
9633 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9634
9635         * support/regression/generate-cases.py: place generated file in given sub directory
9636         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9637         * support/regression/Makefile: improvements for 'make -j';
9638         side effect: it's simpler and faster now
9639
9640 2003-03-31  Borut Razem <borut.razem AT siol.net>
9641
9642         * src/z80/main.c: link-{port} and as-{port} defined without path
9643         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9644
9645 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9646
9647         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9648
9649 2003-03-30  Borut Razem <borut.razem AT siol.net>
9650
9651         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9652           changed type of list parameter to set
9653         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9654         * src/port.h: changed type of do_assemble() parameter to set
9655         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9656           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9657           definition of "cppoutfilename" macro with NULL value in preProcess()
9658         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9659         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9660         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9661           replaced with set *binPathSet
9662         * shash_add() deallocates the item, if allready exsists, before adding the new one
9663         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9664
9665 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9666
9667         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9668           a nested for loop bug in the PIC port
9669         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9670           for loops
9671
9672 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9673
9674         * support/Util/dbuf.h: remove C++ stuff to make it portable
9675
9676 2003-03-28  Borut Razem <borut.razem AT siol.net>
9677
9678         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9679           literal strings in stringLiteral()
9680         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9681         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9682           to the project
9683
9684 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9685
9686         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9687
9688 2003-03-26    <johan AT balder>
9689
9690         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9691         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9692         * src/SDCCast.c (decorateType): fixed " -v < 3"
9693
9694 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9695
9696         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9697         Added Lenny Story's debug infrastructure changes:
9698         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9699         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9700         * src/cdbFile.c: added
9701         * src/SDCCdebug.c: added
9702         * src/SDCCdebug.h: added
9703         * src/SDCCast.c (createFunction)
9704         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9705         * src/SDCCmain.c (parseCmdLine, main)
9706         * src/SDCCmem.c (redoStackOffsets)
9707         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9708         * src/SDCCsymt.h
9709         * src/common.h
9710         * src/avr/gen.c (genAVRCode)
9711         * src/ds390/gen.c (gen390Code)
9712         * src/mcs51/gen.c (gen51Code)
9713         * src/pic/gen.c (genpic14Code)
9714         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9715         * src/xa51/gen.c (genXA51Code)
9716         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9717
9718 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9719
9720         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9721         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9722
9723 2003-03-22    <johan AT balder>
9724
9725         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9726
9727 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9728
9729         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9730         * doc/cdbfileformat.lyx: added, written by Lenny Story
9731         * doc/Makefile: added cdbfileformat.lyx
9732         * doc/clean.mk: added cdbfileformat.lyx
9733
9734 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9735
9736         * src/mcs51/peeph.def: fix bug #705773
9737
9738 2003-03-20    <johan AT balder>
9739
9740         An sfr/sbit can have an "at #" AND an initializer
9741         * src/SDCCsymt.c (checkSClass):
9742         * src/SDCCmem.c (allocGlobal):
9743         * src/SDCCmem.c (allocLocal):
9744         * src/SDCCast.c (createBlock):
9745
9746 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9747
9748         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9749
9750 2003-03-16    <johan AT balder>
9751
9752         Undid the hackup of const and volatile, the problem is much bigger
9753         * src/SDCC.y:1.65
9754         * src/SDCCast.c:1.171
9755         * src/SDCCglue.c:1.138
9756         * src/SDCCicode.c:1.146
9757         * src/SDCCsymt.c:1.150
9758         * src/SDCCval.c:1.65
9759
9760 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9761
9762         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9763         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9764
9765 2003-03-13    <johan AT balder>
9766
9767         Hackup const and volatile modifiers in type chains a bit:
9768         * src/SDCC.y:1.63
9769         * src/SDCCast.c:1.169
9770         * src/SDCCglue.c:1.136
9771         * src/SDCCicode.c:1.143
9772         * src/SDCCsymt.c1.146
9773         * src/SDCCsymt.h1.59
9774         * src/SDCCval.c:1.63
9775
9776 2003-03-12    <johan AT balder>
9777
9778         * src/SDCCBBlock.h: more LRH debugging junk
9779         * src/SDCCcflow.h: more LRH debugging junk
9780         * src/SDCCloop.c: more LRH debugging junk
9781         * src/SDCC.y (struct_declaration): fixed bug #697590
9782         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9783         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9784         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9785
9786 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9787         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9788         test function names must now match exactly).
9789         * src/SDCCcse.c: added special case in findCheaperOp to allow
9790         extending a short integer. Makes less awful code for bug 700121 test case.
9791
9792 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9793
9794         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9795         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9796
9797 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9798
9799         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9800         actually called (operandsNotEqual() was called for all
9801         operandsNotEqualX tests).
9802
9803 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9804
9805         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9806         with shorter literals. Fixes bug 700121.
9807
9808 2003-03-11    <johan AT balder>
9809
9810         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9811
9812 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9813
9814         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9815         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9816
9817 2003-03-10  Borut Razem <borut.razem AT siol.net>
9818
9819         * src/SDCCmain.c: pipe preprocessor's output
9820         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9821         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9822         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9823         which closes all pipes in pipeSet set
9824         * src/SDCCset.c: free deleted item in function deleteSetItem()
9825         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9826         moved from z80 to src subproject
9827         * .version: increased version number to 2.3.4
9828
9829 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9830
9831         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9832         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9833         * support/regression/ports/xa51/spec.mk: fix typo
9834
9835 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9836
9837         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9838
9839 2003-03-09  Borut Razem <borut.razem AT siol.net>
9840
9841         * src/SDCCmain.c: pipe preprocessor's output
9842         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9843         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9844         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9845         which closes all pipes in pipeSet set
9846         * src/SDCCset.c: free deleted item in function deleteSetItem()
9847         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9848         moved from z80 to src subproject
9849
9850 2003-03-09  Borut Razem <borut.razem AT siol.net>
9851
9852         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9853         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9854         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9855         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9856         * src/SDCCglobl.h: unification of WIN32 native definitions
9857
9858 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9859
9860         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9861
9862 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9863
9864         * src/configure.in:   check for endianess (even while cross-compiling)
9865         * src/configure:      check for endianess (even while cross-compiling)
9866         * src/configure_in.h: check for endianess (even while cross-compiling)
9867         * src/avr/gen.c:        remove old endianess stuff
9868         * src/mcs51/gen.c:      remove old endianess stuff
9869         * src/ds390/gen.c:      remove old endianess stuff
9870         * src/pic/gen.c:        remove old endianess stuff
9871         * src/pic/genarith.c:   remove old endianess stuff
9872         * src/pic/glue.c:       fix endianess check
9873         * src/pic16/gen.c:      remove old endianess stuff
9874         * src/pic16/genarith.c: remove old endianess stuff
9875         * src/pic16/glue.c:     fix endianess check
9876         * src/xa51/gen.c:       remove old endianess stuff
9877         * src/z80/gen.c:        fix endianess check
9878         * src/SDCCglue.c:       fix endianess check
9879         * src/ds390/peeph.def: fix bug 700036
9880
9881 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9882
9883         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9884         * src/configure: find appropriate data-types on host for SDCC's int and long
9885         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9886         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9887         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9888
9889 2003-03-07    <johan AT balder>
9890
9891         Just a big NOOP:
9892                 some minor cleanups before the big shot
9893                 OP_DEFS and OP_USES now use Kevin's protection
9894                 new option --nolabelopt
9895
9896         * src/SDCCBBlock.c:
9897         * src/SDCCast.c,:
9898         * src/SDCCcflow.c:
9899         * src/SDCCcse.c:
9900         * src/SDCCicode.c:
9901         * src/SDCCicode.h:
9902         * src/SDCClabel.c:
9903         * src/SDCCloop.c:
9904         * src/SDCCmain.c:
9905         * src/ds390/ralloc.c:
9906         * src/mcs51/ralloc.c:
9907         * src/pic/ralloc.c:
9908         * src/xa51/ralloc.c:
9909         * src/z80/ralloc.c:
9910
9911 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9912
9913         * src/pic/pcode.c (get_op): fix 64 bit warnings
9914         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9915         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9916         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9917         * support/regression/tests/malloc.c: fix 64 bit warnings
9918
9919 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9920
9921         * src/mcs51/gen.c (genMinus): fixed bug 696436
9922
9923 2003-03-02  Borut Razem <borut.razem AT siol.net>
9924
9925         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9926
9927 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9928
9929         * configure.in: test for mkstemp
9930         * sdccconf_in.h: add HAVE_MKSTEMP
9931
9932 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9933
9934         * device/include/ctype.h: removed warning while using --stack-auto
9935         * device/include/malloc.h: removed warning while using --stack-auto
9936         * device/include/string.h: removed warning while using --stack-auto
9937
9938 2003-02-23  Borut Razem <borut.razem AT siol.net>
9939
9940         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9941         because NDEBUG is defined (see man assert)
9942         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9943
9944 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9945
9946         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9947         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9948
9949 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9950
9951         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9952         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9953
9954 2003-02-18    <johan AT balder>
9955
9956         * as/mcs51/asmain.c (asmbl): module can start with a digit
9957         * as/z80/asmain.c (asmbl): module can start with a digit
9958
9959 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9960
9961         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9962         * src/asm.c: fix pipe() for Mingw32
9963
9964 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9965
9966         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9967         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9968         make -V work again; --c1mode reads now from stdin
9969         * doc/sdccman.lyx: added --c1mode
9970         * support/Util/SDCCerr.c: new messages for c1 mode
9971         * support/Util/SDCCerr.h: new messages for c1 mode
9972         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9973
9974 2003-02-15    <johan AT balder>
9975
9976         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9977
9978 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9979
9980         * doc/sdccman.lyx: Environment variables, -o and other minor things
9981
9982 2003-02-14    <johan AT balder>
9983
9984         * src/xa51/main.c: before anyone really tries to use it :)
9985
9986         * Install doc's in share/sdcc/doc
9987         * removed some obsolete files
9988         * Do a proper make distclean and uninstall
9989         M Makefile.common.in
9990         R sdccbuild.sh
9991         M as/Makefile
9992         M device/include/Makefile.in
9993         M device/lib/Makefile.in
9994         M doc/sdccman.lyx
9995         M link/Makefile
9996         M sim/ucsim/doc/Makefile.in
9997         M src/clean.mk
9998         R src/avr/peeph.rul
9999         R src/xa51/peeph.rul
10000         M support/cpp2/Makefile.in
10001         M support/makebin/Makefile
10002
10003
10004 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10005
10006         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10007
10008 2003-02-10  Borut Razem <borut.razem AT siol.net>
10009
10010         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10011         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10012         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10013         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10014         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10015         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10016         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10017         src/z80/Makefile.bcc: Borland Makefile cleanup
10018         * as/z80/Makefile.bcc: Added Borland Makefile
10019         * support/cpp2/borland.h: Removed
10020
10021 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10022
10023         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10024         * src/SDCC.lex: new pragma NOIV
10025         * src/SDCCglobl.h: new pragma NOIV
10026         * src/SDCCmem.c: new pragma NOIV
10027
10028 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10029
10030         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10031
10032 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10033
10034         * src/SDCCmain.c: signal handling is switched off by --debug
10035         * doc/Makefile: small fix for install; use clean.mk again
10036         * doc/clean.mk: clean *.pdf and *.html too
10037
10038 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10039
10040         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10041         * device/lib/printfl.c: fix a ds390 bug by making it portable
10042         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10043         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10044         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10045         * debugger/mcs51/cmd.c: converted multi-line string literals
10046         * sim/ucsim/globals.cc: converted multi-line string literals
10047         * src/SDCCmain.c: introduced signal handler to remove temp files
10048         * doc/Makefile: small tweaks, implement clean
10049         * doc: removed generated files
10050
10051 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10052
10053         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10054         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10055         Address Record is not correctly generated for DS390."
10056
10057 2003-02-02  Borut Razem <borut.razem AT siol.net>
10058
10059         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10060         * as/mcs51/asm.h: fixed compilation with Borland C
10061         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10062         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10063         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10064         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10065         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10066         src/z80/Makefile.bcc: delete $(LIB) only if exist
10067         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10068
10069 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10070
10071         * device/include/malloc.h: introduced NULL
10072         * device/include/string.h: introduced NULL
10073         * device/include/stdlib.h: introduced NULL
10074         * device/lib/_memcpy.c: removed NULL
10075         * device/lib/_strcat.c: removed NULL
10076         * device/lib/_strchr.c: removed NULL
10077         * device/lib/_strcmp.c: removed NULL
10078         * device/lib/_strcpy.c: removed NULL
10079         * device/lib/_strcspn.c: removed NULL
10080         * device/lib/_strlen.c: removed NULL
10081         * device/lib/_strncat.c: removed NULL
10082         * device/lib/_strncmp.c: removed NULL
10083         * device/lib/_strncpy.c: removed NULL
10084         * device/lib/_strpbrk.c: removed NULL
10085         * device/lib/_strrchr.c: removed NULL
10086         * device/lib/_strspn.c: removed NULL
10087         * device/lib/_strstr.c: removed NULL
10088         * device/lib/_strtok.c: removed NULL
10089         * device/lib/malloc.c: removed NULL, include own header
10090
10091 2003-02-02    <johan AT balder>
10092
10093         * 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
10094         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10095         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10096         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10097         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10098         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10099
10100 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10101
10102         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10103         area 'DATA'"
10104
10105 2003-02-01    <johan AT balder>
10106
10107         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10108
10109 2003-01-31    <johan AT CP255758-A>
10110
10111         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10112
10113 2003-01-30    <johan AT balder>
10114
10115         * src/SDCCBBlock.c: automatic bug detection
10116         * src/SDCCicode.c: automatic bug detection
10117
10118 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10119
10120         * src/SDCCglobl.h:   now --xram-size 0 works
10121         * src/SDCCmain.c:    now --xram-size 0 works
10122
10123 2003-01-29    <johan AT balder>
10124
10125         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10126
10127 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10128
10129         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10130         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10131         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10132         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10133         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10134         * src/SDCCmain.c:    Added options --xram-size and --code-size
10135
10136 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10137
10138         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10139         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10140
10141 2003-01-27    <johan AT balder>
10142
10143         * src/SDCC.y: fixed bug #613764
10144
10145 2003-01-26    <johan AT balder>
10146
10147         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10148         * src/SDCCsymt.h: fixed bug #673374
10149         * src/SDCCglue.c: fixed bug #661910
10150         * src/SDCCast.c: fixed bug #458099 and 673374
10151
10152 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10153
10154         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10155         * as/mcs51/strcmpi.h: added
10156         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10157         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10158         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10159         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10160         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10161         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10162         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10163         * as/mcs51/Makefile.aslink: new module strcmpi
10164         * as/mcs51/Makefile.asx8051: new module strcmpi
10165         * as/mcs51/Makefil.bcc: new module strcmpi
10166         * as/mcs51/Makefile.in: new module strcmpi
10167         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10168
10169 2003-01-26    <johan AT balder>
10170
10171         * src/SDCCglue.c: reverted back to 1.124
10172         * src/SDCCast.c: reverted back to 1.156
10173         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10174
10175 2003-01-25    <johan AT balder>
10176
10177         * src/SDCCglue.c: A better fix for bug #661910
10178         * src/SDCCast.c: A better fix for bug #661910
10179         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10180
10181 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10182
10183         * src/Makefile.in: remove spawn.o
10184         * src/SDCCmain.c: remove spawn.h
10185         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10186         * src/spawn.c: removed
10187         * src/spawn.h: removed
10188         * support/regression/ports/ds390/spec.mk: link with -r
10189
10190 2003-01-24    <johan AT CP255758-A>
10191
10192         * src/ds390/gen.c (aopOp): fixed bug #667458
10193         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10194         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10195         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10196
10197 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10198
10199         * src/mcs51/peeph.def: better assembler identation by Frieder
10200         * src/mcs51/gen.c: better assembler identation by Frieder
10201
10202 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10203
10204         * as/z80/string.h: removed for gcc 3.2
10205         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10206         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10207
10208 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10209
10210         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10211         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10212         * support/regression/Makefile: separate temp files for ports
10213         * support/regression/generate-cases.py: separate temp files for ports
10214         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10215         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10216
10217 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10218
10219         * moved tinitalk to device/examples/ds390
10220
10221 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10222
10223         * as/mcs51/lkmem.c: rflag is for DS390
10224         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10225         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10226                          (linkEdit): move mem- and map-files the same way as ihx-files
10227         * src/z80/main.c (_setDefaultOptions): removed --generic
10228         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10229         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10230         * src/pic/glue.c (picglue): --c1mode works again
10231         * src/pic16/glue.c (pic16glue): --c1mode works again
10232         * src/asm.c (printCLine): fix #660034
10233
10234 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10235
10236         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10237         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10238         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10239         * as/mcs51/lkmem (summary): better fix for sp problem
10240         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10241         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10242         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10243                                               remove --stack-after-data
10244
10245 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10246
10247         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10248         * src/SDCCutil.c (join): ugly bug: missing '\0'
10249         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10250
10251 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10252
10253         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10254         * src/port.h: typo
10255         * src/pic/main.c (_asmCmd): gpasm supports -o
10256         * src/z80/main.c: more general macros
10257         * device/lib/Makefile.in: remove intermediate files
10258
10259 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10260
10261         * .version: Bumped version number to 2.3.3
10262         * src/SDCCBBlock.c: new option -o
10263         * src/SDCCglobl.h: new option -o
10264         * src/SDCCglue.c: new option -o
10265         * src/SDCCmain.c: new option -o
10266         * src/asm.c: new option -o
10267         * src/ds390/main.c: new option -o
10268         * src/pic/glue.c: new option -o
10269         * src/pic/pcode.c: new option -o
10270         * src/pic/ralloc.c: new option -o
10271         * src/pic16/glue.c: new option -o
10272         * src/pic16/pcode.c: new option -o
10273         * src/pic16/ralloc.c: new option -o
10274         * src/z80/main.c: new option -o
10275         * device/lib/Makefile.in: use -o
10276         * support/regression/ports/ds390/spec.mk: use -o
10277         * support/regression/ports/gbz80/spec.mk: use -o
10278         * support/regression/ports/mcs51/spec.mk: use -o
10279         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10280         * support/regression/ports/z80/spec.mk: use -o
10281         * support/regression/ports/ucz80/spec.mk: use -o
10282         * support/regression/ports/xa51/spec.mk: use -o
10283         * support/regression/fwk/lib/timeout.c: fix usage string
10284
10285 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10286         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10287
10288 2003-01-07    <johan AT balder>
10289
10290         * src/SDCCast.c (decorateType): fixed bug #600035
10291
10292 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10293         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10294         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10295         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10296         * src/pic/pcode.c: outcommented unused variable to remove warnings
10297         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10298
10299 2003-01-06    <karl AT turbobit.com>
10300         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10301    regression tests.
10302
10303 2003-01-06    <johan AT balder>
10304
10305         * src/SDCCicode.c: fixed array add
10306
10307 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10308         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10309         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10310
10311 2003-01-04    <johan AT balder>
10312
10313         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10314
10315 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10316         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10317
10318 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10319         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10320         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10321
10322 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10323         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10324
10325 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10326         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10327
10328 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10329         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10330
10331 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10332
10333     * in \sdcc\as\mcs51\ changed these files in order to create an
10334     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10335     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10336     following files to include the previous two files: aslink.dsp,
10337     Makefile.aslink, Makefile.bcc, and Makefile.in.
10338
10339     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10340     .adb instead of .cdb
10341
10342 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10343
10344         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10345         value from option --iram-size.
10346
10347 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10348
10349         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10350         dram[] array.
10351
10352 2002-09-18    <wiml AT hhhh.org>
10353
10354         * SDCClrange.h: exposed setFromRange() and setToRange()
10355         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10356           packRegsForAccUse() (bug 542397)
10357         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10358           multiple times and emitting the fetch operations more than once
10359           added aopGetUsesAcc() function to allow binary operators to
10360           fetch their operands in the correct order; made genMinus() emit
10361           compact code for X = LITERAL - Y
10362
10363 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10364         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10365         sprintf() in line 1267.
10366
10367 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10368         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10369         like ports.
10370
10371 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10372         Changes to aslink (All the changes are marked with 'JCF'):
10373
10374         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10375         summary().
10376
10377         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10378         area BSEG.  Also moves, if possible, the DATA area down into the internal
10379         ram so more space is available.
10380
10381         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10382         sflag.
10383
10384         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10385         not bytes.  Function summary() which creates a memory usage summary
10386         file with extension .mem.  Reports of overlaping stack and small stack
10387         size.  If the space for the stack is less than 16 bytes aslink trows a
10388         warning.
10389
10390         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10391         the 8051.  Option 'y' for memory summary output file.
10392
10393         Changes to sdcc (All the changes are marked with 'JCF'):
10394
10395         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10396
10397         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10398         overlaying area for it (uses RegBankUsed[4]).
10399
10400         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10401         bank zero as used by default.  By default aslink locates the stack
10402         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10403         the creation of the .mem file.  Delegates the allocation of data area
10404         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10405         the begining of the stack area to aslink.
10406
10407         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10408         glue() in SDCCglue.c creates an area for it.
10409
10410 2002-09-03  Borut Razem <borut.razem AT siol.net>
10411         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10412         sdcc/src/pic/glue.c:
10413         introduced atexit() handler for teporay files removal in case of
10414         errors, assertions, ...
10415
10416 2002-08-29  Borut Razem <borut.razem AT siol.net>
10417         * sdcc/support/cpp2/auto-host_vc_in.h:
10418         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10419         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10420         Maybe there is a similar problem with BORLANDC? It should be checked!
10421
10422         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10423         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10424         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10425         was not executed, and the compiler (cl) launched a warning:
10426         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10427
10428 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10429         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10430
10431 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10432         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10433
10434         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10435           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10436           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10437           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10438           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10439           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10440           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10441         - added Release configuration in VS projects
10442         - review of compiler an linker options
10443         - VC .exe files are generated in bin_vc directory, not to interfere
10444           with binaries generated from other projects (cygwin, mingw, bcc ...)
10445
10446         * sdcc/src/yacc.dsp: added
10447
10448         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10449         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10450         and insert the version number definitions from .version
10451
10452         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10453
10454         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10455         added - genarate auto-host.h using auto-host_vc_in.h as template
10456
10457         * sdcc/sdcc_vc.h,
10458         removed from CVS, generated automatically
10459
10460 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10461         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10462
10463 2002-08-11  Borut Razem <borut.razem AT siol.net>
10464         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10465
10466 2002-08-10  Borut Razem <borut.razem AT siol.net>
10467         * src/SDCCmain.c (main):
10468         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10469         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10470         The consequence was that some temporary files were not removed.
10471
10472         * src/SDCCglue.c:
10473         unification of code in functions tempfilename() and tempfile():
10474         function tempnam() is defined in Visual Studio 6.0 and .NET
10475
10476         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10477
10478         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10479           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10480         - removed compiler command line option /WX: Treats all warnings as errors
10481         - update a list of source files, included into the project
10482
10483         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10484           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10485         changed project type to Generic Project so that can be correcly converted to VS.NET project
10486
10487         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10488
10489         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10490
10491         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10492
10493         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10494         added return 0 statements after assert() to make compiler happy
10495
10496         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10497         added newline in the def file to keep MSC compiler satisfied
10498
10499         * sdcc/src/z80/gen.c:
10500         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10501           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10502         - solved MSC error in function aopDump()
10503
10504         * sdcc_vc.h: define PREFIX as "\\sdcc"
10505
10506 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10507         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10508
10509 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10510         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10511         - Rewrote the register banking algorithm.
10512         - Added pCode live-range analysis to registers (for now, only non-used and
10513         singly-used registers optimized away)
10514
10515         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10516
10517         * 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.
10518
10519 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10520         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10521
10522 2002-04-22  Michael Hope  <michaelh AT vroom>
10523
10524         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10525
10526         * configure.in (DD_COPT): Added include support required for gbdk.
10527
10528         * .version: Bumped version number just to increase it.
10529
10530         * src/SDCCmain.c: Added -nostdinc to the default options.
10531
10532 2002-04-15  Michael Hope  <michaelh AT vroom>
10533
10534         * device/lib/z80/printf.c (sprintf): Added.
10535
10536         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10537
10538         * src/z80/peeph.def: Added transpose redundent load rule.
10539
10540         * src/z80/main.c: Added force callee saves for jaune.
10541
10542         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10543
10544         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10545
10546 2002-03-28  Johan Knol  <johan AT balder>
10547
10548         * src/SDCCval.c: fixed bug #532436
10549
10550 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10551         * /src/port.h:
10552         Added "char *Processor" field to the port structure.
10553
10554         * /src/SDCCmain.c:
10555         Added -p option. Allows port dependent processor to be specified.
10556
10557         * all ports:
10558         Initialized the new field char *Processor field to NULL in all ports
10559
10560         * /src/pic/*:
10561         Compiler generated registers for interrupt context saving
10562         were not getting allocated.
10563
10564 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10565
10566         * /src/SDCCast.c:
10567         Fixed left shift. Will promote the left side of a left shift
10568         if a) left shifting more than size of operand or b) when assigned
10569         to something size > size of left side
10570
10571 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10572         * src/pic/*
10573         tons of changes. Register allocation has been
10574         rewritten. Added customization for the various PICs. Flow
10575         analysis is restructured. ...
10576
10577         * src/pic/device.h:
10578         Added
10579
10580         * src/pic/device.c:
10581         Added. device.c is a PIC port hack to accomodate variations
10582         in PIC devices.
10583
10584 2002-03-13  Michael Hope  <michaelh AT vroom>
10585
10586         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10587
10588 2002-03-04  johanknol  <johanknol AT manik>
10589
10590         * /src/SDCCval.c: fixed
10591
10592         const unsigned char arr[][2] = { { 0, 1 } };
10593         t18.c:1: error: Initializer element is not constant
10594
10595 2002-03-04  bela  <bela AT manik>
10596
10597         * /device/include/mcs51reg.h:
10598         ds89c420 register definition update
10599
10600 2002-03-03    <johan AT FRIJA>
10601
10602         * support/Util/SDCCerr.c: did something, but don't no why anymore
10603
10604         * support/regression/tests/bug-524691.c: made it a little less shy
10605
10606         * src/SDCCast.c (decorateType): fixed bug #524697
10607
10608         * src/SDCCast.c: made some lineno improvements
10609
10610         * src/SDCCval.c (getNelements): changed warning to error
10611
10612         * src/SDCCglue.c (printIvalArray): changed warning to error
10613
10614         * src/SDCCicode.c: fixed a warning for mingw
10615
10616         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10617
10618         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10619
10620 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10621
10622         * src/ds390/peeph.def:
10623         Added some more peephole rules
10624
10625         * src/ds390/gen.c: Various fixes & enhancements
10626
10627         * src/SDCClrange.c, src/SDCClrange.h:
10628         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10629
10630         * src/ds390/ralloc.c:
10631         various fixes & enhancements (ds390) specific
10632
10633         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10634         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10635         from rallocs.
10636
10637         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10638
10639 2002-03-02    <johan AT FRIJA>
10640
10641         * src/SDCCast.c (decorateType): fixed bug #524708
10642
10643         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10644
10645         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10646
10647 2002-03-01  Michael Hope  <michaelh AT vroom>
10648
10649         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10650
10651         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10652
10653 2002-03-01    <johan AT FRIJA>
10654
10655         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10656
10657         * src/SDCCast.c (decorateType): fixed bug #524209
10658
10659         * src/SDCCval.c (valNot): fixed bug #524195
10660
10661 2002-02-26    <johan AT balder>
10662
10663         * src/xa51/gen.c: fixed a warning
10664
10665         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10666
10667         * src/SDCCast.c (decorateType): fixed bug #522534
10668
10669 2002-02-23    <johan AT balder>
10670
10671         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10672
10673 2002-02-22    <johan AT balder>
10674
10675         * src/SDCCast.c: fixed bug #514865
10676
10677         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10678
10679 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10680
10681         * sdcc/src/SDCCloop.c:
10682         Previous fix was not good. basic blocks that have "break" or "return" are
10683         not really partof a loop , but live ranges used in these blocks should
10684         be live thru the entire loop, so set partOfLoop but don't add them to
10685         loop region
10686
10687 2002-02-21    <johan AT FRIJA>
10688
10689         * src/SDCCcse.c: fixed bug #514308
10690
10691 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10692
10693         * src/SDCCloop.c:
10694         Fixed BUG #519583. If a conditional block ended in a return/break
10695         statement inside a loop, it was not being considered part of the loop.
10696
10697         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10698
10699 2002-02-10  Karl Bongers <karl AT turbobit.com>
10700
10701         * debugger/*:
10702         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10703         with lots of comments and notes.
10704
10705         * device/examples/test2.c:
10706         Fix bug, "red" variable not being initialized(compiler complained).
10707
10708         * device/examples/Makefile, examples/test3.c:
10709         Add Makefile in device/examples folder, compiles test3.c
10710         for use as a multiple module SDCDB test case.
10711
10712         * sim/ucsim/cmd.src/cmdset.cc:
10713         Took out debug printfs in ucsim "next" command.
10714
10715         * sim/ucsim/xa.src:
10716         Karl and Johan start ucsim XA support.  Most dissassembly working,
10717         about 75% emulation done(plenty of work remaining).
10718
10719         * sim/ucsim/z80.src:
10720         Add Z80 support to ucsim, add test-ucz80 regression test,
10721         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10722         Notice z80 compiler fails on examples/test3.c/crc code.
10723
10724 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10725
10726         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10727         Added support for --parms-in-bank1
10728
10729         * src/ds390/peeph.def:
10730         added a few more peephole optimzations
10731
10732         * src/ds390/main.c:
10733         1) added __builtin_inp & __builtin_outp used to read in data of given length
10734            from a memory mapped port
10735         2) added __builtin_memcmp
10736         3) added __builtin_swapw swap bytes of a short
10737
10738         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10739         1) handle multiple send & receives from register bank1
10740         2) ralloc can now allocate DPTR1 to some liveRanges
10741
10742         * src/SDCCsymt.c, src/SDCCsymt.h:
10743         changes to handle multiple sends & receives
10744
10745         * src/SDCCptropt.h:
10746         added some pointer arithmetic optimization
10747
10748         * src/SDCCptropt.c:
10749         added some pointer arithmetic optimizations but not stable yet so not
10750         called from anywhere (will get this working shortly)
10751
10752         * src/SDCCopt.c: fixed for multiple sends & receives
10753
10754         * src/SDCCmain.c:
10755         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10756         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10757            set preprocessor defines (depending on options)
10758
10759         * src/SDCCicode.c, src/SDCCicode.h:
10760         changes made to handle multiple sends & receives
10761
10762         * src/SDCCglobl.h:
10763         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10764
10765         * src/SDCCcse.c, src/SDCCcse.h:
10766         added function findbackward def (to be used in upcoming optimization)
10767
10768         * src/SDCCcflow.c, src/SDCCcflow.h:
10769         added function returnAtEnd - to determine if a basic block terminates with
10770         a RETURN iCode
10771
10772         * src/SDCCast.c, src/SDCCast.h:
10773         added option parms-in-bank1
10774
10775         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10776         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10777         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10778         adjusted for --parms-in-bank1 option
10779
10780         * device/include/string.h:
10781         donot redefine "reentrant" keyword
10782
10783         * device/include/ds80c390.h: Added some more SFRs
10784
10785 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10786
10787         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10788
10789 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10790
10791         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10792
10793 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10794
10795         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10796
10797 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10798
10799         * Added --xram-movc option
10800
10801 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10802
10803         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10804
10805 2002-01-11  Johan Knol
10806
10807         * Added math lib of Jesus Calvino-Fraga
10808
10809 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10810
10811         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10812         * support/regression/Makefile: new target test-mcs51-stack-auto
10813         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10814
10815 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10816
10817         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10818
10819 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10820
10821         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10822
10823 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10824
10825         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10826
10827         * src/SDCCglue.h: add definition for printIvalChar()
10828
10829 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10830
10831         * src/SDCCast.c: fix #498138 by Johan
10832
10833         * src/SDCCglue.c: fix #498138 by Johan
10834
10835 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10836
10837         * support/regression/Makefile: fix clean
10838
10839         * support/regression/ports/ds390/support.c: fix transmission of last character
10840
10841 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10842
10843         * /sdcc/src/ds390/gen.c:
10844         a) improved computing address of stack variable
10845         b) took out some #if 0 code
10846         c) improved parmBytes adjustment
10847         d) improved genPlusIncr & genMinusIncr
10848         e) genCmp could generate bad code (when left assigned to DPTR)
10849         f) Fixed bug in hasInc
10850
10851         * /sdcc/src/ds390/ralloc.c:
10852         a) packRegsForSupport could mess up live information (Fixed)
10853         b) packRegsDPTRuse could be incorrect for left & right shift
10854
10855         * /sdcc/src/mcs51/ralloc.c:
10856         packRegsForSupport could mess up the live information (Fixed)
10857
10858         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10859
10860         * /sdcc/src/SDCCast.c:
10861         can reverse a loop even if function call is present as long
10862         as the loop control variable is local & is not passed as parameter
10863
10864 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10865
10866         * /sdcc/ChangeLog: *** empty log message ***
10867
10868         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10869         More builtin function additions for TININative
10870
10871         * /sdcc/src/ds390/ralloc.c:
10872         Had broken the regression testsuite
10873
10874         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10875
10876         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10877         Added funcattr hasStackParms will be set for reentrant functions when there
10878         are paramteres on the stack, this helps in minimizing frame pointer generation
10879         typeFromStr can handle function pointers now
10880
10881         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10882         *** empty log message ***
10883
10884 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10885
10886         * /src/ds390/gen.c, /src/ds390/main.c:
10887         More builtin function additions for TININative
10888
10889         * /src/ds390/ralloc.c:
10890         Had broken the regression testsuite
10891
10892         * /src/SDCCast.c: Fixed a bug in dumptree
10893
10894         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10895         Added funcattr hasStackParms will be set for reentrant functions when there
10896         are paramteres on the stack, this helps in minimizing frame pointer generation
10897         typeFromStr can handle function pointers now
10898
10899         * /doc/builtins.txt, /doc/TININative.txt:
10900         *** empty log message ***
10901
10902
10903 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10904
10905         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10906         ALPHA version for -mTININative
10907
10908         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10909         updated to reflect changes in the port structure
10910
10911         * /src/port.h:
10912         added function do_assemble (similar to do_link) if non-null this function
10913         will be called to do assembly (-mTININative) requires a multi command
10914         assembly
10915         added function genAssemblerEnd will be called to generate assembler Epilogue
10916
10917         * /src/SDCCsymt.c:
10918         added _JavaNative to debug info printing
10919
10920         * /src/SDCCmain.c: added option --tini-libid
10921         added port->do_assemble function (-mTININative) has a multi command assemble
10922
10923         * /src/SDCCglue.c: Disabled "constExpr" check
10924         added port->genAssemblerEnd function
10925
10926         * /src/SDCCglobl.h: Added option --tini-libid value
10927
10928         * /src/SDCCast.h:
10929         tookout optimizeCompare from the header (has no external references)
10930
10931         * /src/SDCCast.c: made one more function "static"
10932
10933 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10934
10935         * src/z80/mappings.i: Added z80asm support.
10936
10937         * src/z80/main.c: Added z80asm support on --asm=z80asm
10938
10939         * src/z80/gen.c: Fixed asm portability issues.
10940
10941         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10942
10943         * src/SDCCglue.c (printExterns): Added global/extern split.
10944
10945 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10946
10947         * support/regression/Makefile: added test for mcs51 model large
10948
10949         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10950
10951         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10952
10953 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10954
10955         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10956
10957 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10958
10959         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10960
10961         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10962
10963 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10964
10965         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10966
10967         * support/regression/tests/simplefloat.c: Port to mcs51.
10968
10969 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10970         * support/regression/tests/bug-485362.c: Added.
10971
10972         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10973
10974         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10975
10976         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10977
10978         * src/z80/gen.c (aopDump): Added a dump function.
10979
10980 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10981         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10982
10983         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10984
10985         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10986
10987         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10988
10989         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10990
10991         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10992
10993         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10994
10995         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10996
10997         * support/regression/ports/ds390/support.c: Use tinibios.
10998
10999         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11000
11001 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11002
11003         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11004         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11005
11006         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11007
11008         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11009
11010 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11011
11012         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11013
11014         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11015         (packRegsForIYUse): Created and optimised.
11016
11017 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11018
11019         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11020 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11021
11022         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11023
11024         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11025
11026         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11027
11028 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11029
11030         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11031
11032         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11033
11034 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11035
11036         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11037
11038         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11039
11040         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11041
11042 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11043
11044         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11045         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11046         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11047
11048         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11049
11050         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11051         (genNotFloat): Added.
11052         (genUminusFloat): Added.
11053
11054         * device/lib/z80/Makefile: Added floating pt stubs.
11055
11056         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11057
11058         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11059
11060         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11061
11062 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11063
11064         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11065
11066         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11067
11068         * sdcc/support/regression/Makefile: Add port ds390.
11069
11070         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11071
11072         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11073
11074         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11075
11076         * sdcc/support/regression/ports/ds390/support.c: Added.
11077
11078         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11079
11080         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11081
11082         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11083
11084 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11085
11086         * device/include/malloc.h: Added z80 and gbz80 support.
11087
11088         * device/lib/gbz80/heap.s: Added.
11089
11090         * device/lib/z80/heap.s: Added.
11091
11092         * device/lib/malloc.c: Added z80 and gbz80 support.
11093
11094         * support/regression/tests/malloc.c (testMalloc): Added.
11095
11096         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11097
11098         * support/regression/tests/bug-478094.c: Added.
11099
11100         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11101
11102 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11103
11104         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11105
11106         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11107
11108         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11109
11110         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11111
11112         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11113
11114 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11115
11116         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11117
11118 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11119
11120         * support/regression/tests/bug-477927.c: Added.
11121
11122         * src/z80/peeph.def: Added minor rules.
11123
11124         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11125
11126         * src/z80/peeph.def: Added jump optimisation modification.
11127
11128 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11129
11130         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11131
11132 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11133
11134         * support/regression/tests/funptrs.c: Added.
11135
11136 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11137
11138         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11139
11140 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11141
11142         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11143
11144         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11145
11146         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11147         (movLeft2ResultLong): Created.
11148
11149         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11150         (joinPushes): Added.  Joins two char pushes into a word push.
11151
11152 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11153
11154         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11155
11156         * support/makebin/Makefile (install): Added creation of dest dir.
11157
11158 2001-10-24 Karl Bongers <karl AT turbobit.com>
11159
11160         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11161
11162 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11163
11164         * src/z80/ralloc.c: Turned off faulty pack for one use.
11165
11166         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11167
11168         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11169
11170 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11171
11172         * support/regression/Makefile: Improved clean
11173
11174         * support/regression/ports/gbz80/spec.mk: Added clean
11175
11176         * support/regression/ports/host/spec.mk: Added clean
11177
11178         * support/regression/ports/z80/spec.mk: Added clean
11179
11180         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11181
11182         * support/regression/ports/mcs51/timeout.c: little improvements
11183
11184 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11185
11186         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11187
11188         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11189
11190         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11191
11192 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11193
11194         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11195
11196         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11197
11198 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11199         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11200
11201         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11202
11203         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11204
11205         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11206
11207         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11208
11209         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11210
11211         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11212
11213         * support/regression/tests/longor.c: Added.
11214
11215 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11216
11217         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11218
11219         * as/mcs51/aslink.h: define PATH_MAX
11220
11221         * as/mcs51/asm.h: define PATH_MAX
11222
11223         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11224
11225         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11226
11227         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11228
11229         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11230
11231         * src/SDCCglobl.h: define PATH_MAX
11232
11233         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11234
11235         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11236
11237 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11238
11239         * src/z80/gen.c (gencjneshort): Fixed
11240
11241         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11242
11243 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11244
11245         * support/regression/tests/bug-469671.c: Added.
11246
11247         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11248
11249 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11250
11251         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11252
11253         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11254
11255 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11256
11257         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11258
11259         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11260
11261         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11262
11263         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11264
11265         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11266
11267         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11268
11269         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11270
11271 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11272
11273         * 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.
11274
11275         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11276
11277         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11278
11279 2001-10-07    <johan AT FRIJA>
11280
11281         * device/lib/gets.c (gets): fixed the return value.
11282
11283 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11284         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11285
11286         * 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.
11287
11288         * 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.
11289
11290         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11291
11292         * src/pic/gen.c: Removed Safe_strdup.
11293
11294         * configure.in: Added option to enable libgc support.
11295
11296         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11297         (bitVectUnion): Optimised.
11298         (bitVectIntersect): Optimised.
11299         (bitVectBitsInCommon): Optimised.
11300         (bitVectCplAnd): Optimised.
11301
11302         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11303
11304 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11305
11306         * src/SDCCmain.c: distinguish between assembler debug and plain options
11307
11308         * src/avr/main.c:   remove standard assembler options
11309
11310         * src/ds390/main.c: remove standard assembler options
11311
11312         * src/mcs51/main.c: remove standard assembler options
11313
11314         * src/port.h: removed "PENDING" comment
11315
11316 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11317
11318         * src/device/lib/_mulint.c  : new, with assember functions
11319
11320         * src/device/lib/_mullong.c : new, with assember functions
11321
11322         * src/device/lib/_divuint.c : with assember functions
11323
11324         * src/device/lib/_divsint.c : with assember functions
11325
11326         * src/device/lib/_divulong.c: with assember functions
11327
11328         * src/device/lib/_divslong.c: with assember functions
11329
11330         * src/device/lib/_moduint.c : with assember functions
11331
11332         * src/device/lib/_modsint.c : with assember functions
11333
11334         * src/device/lib/_modulong.c: with assember functions
11335
11336         * src/device/lib/_modslong.c: with assember functions
11337
11338         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11339
11340         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11341
11342         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11343                                       replaced _mululong.c and _mulslong.c by _mullong.c
11344
11345 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11346
11347         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11348
11349 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11350
11351         * src/SDCCglue.c: test, if win32api is available for MINGW
11352
11353 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11354
11355         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11356         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11357         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11358         * support/regression/ports/host/spec.mk: removed GENERIC
11359         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11360         * support/regression/ports/z80/spec.mk: removed GENERIC
11361
11362 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11363
11364         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11365
11366         * support/regression/tests/bug-467035.c: Created.
11367
11368 2001-10-01    <johan AT FRIJA>
11369
11370         * src/SDCC.y: fixed bug #466586 part 1
11371
11372 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11373
11374         * SDCCicode.c: z80 has no generic pointers
11375         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11376
11377 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11378
11379         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11380
11381 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11382
11383         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11384
11385         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11386
11387 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11388
11389         * configure.in: Fixed up so that ucsim is only configured once.
11390
11391         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11392
11393         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11394         (getPathDifference): As above.
11395
11396         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11397
11398         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11399
11400 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11401         * .version: Updated to 2.3.1
11402
11403         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11404         Added copyright header.
11405
11406         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11407         (assemble): Added support for macro based assembler commands.
11408         (linkEdit): Added support for macro based linker commands.
11409         (preProcess): Changed the pre-processor to use macros.
11410         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11411         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11412
11413         * device/lib/z80/crt0.s: Added module name for debugging.
11414
11415 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11416
11417         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11418
11419         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11420
11421         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11422
11423         * src/Makefile.in: Added SDCCmacro and SDCCutil
11424
11425 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11426
11427         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11428
11429 2001-09-16    <johan AT FRIJA>
11430
11431         * 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.
11432
11433 2001-09-15    <johan AT FRIJA>
11434
11435         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11436         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11437
11438 2001-09-11    <johan AT FRIJA>
11439
11440         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11441
11442 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11443
11444         * support/regression/tests/bug-460444.c: Added test case.
11445
11446         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11447         (genCast): Added justification for all of the asserts.
11448
11449 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11450
11451         * support/regression/support.c: _xdata replaced by xdata
11452
11453         * support/regression/spec.mk: removed _generic
11454
11455 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11456
11457         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11458
11459         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11460         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11461
11462         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11463
11464         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11465
11466         * support/regression/tests/bug-460010.c: Added test case.
11467
11468         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11469
11470 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11471
11472         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11473
11474         * support/regression/testfwk.c: removed workaround for bug #436344
11475
11476         * support/regression/tests/bp.c: use less memory with mcs51
11477
11478         * support/regression/tests/bug-441448.c: use less memory
11479
11480         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11481
11482         * support/regression/collate-results.py: typo
11483
11484 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11485
11486         * support/regression/tests/fetchoverlap.c: Added new test case.
11487
11488         * support/regression/tests/bp.c: Added new test case.
11489
11490         * support/regression/tests/bug-448984.c: Added new test case.
11491
11492         * support/regression/tests/pow2shifts.c: Added new test case.
11493
11494         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11495         (genlshTwo): Fixed right shift for count > 8.
11496
11497         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11498
11499 2001-09-08    <johan AT FRIJA>
11500
11501         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11502
11503 2001-09-07    <johan AT FRIJA>
11504
11505         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11506
11507         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11508
11509 2001-09-06    <johan AT FRIJA>
11510
11511         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11512         * bernhard noted me at this: "() equals to (void)" (1.38)
11513
11514 2001-09-05    <johan AT FRIJA>
11515
11516         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11517
11518 2001-09-04    <johan AT FRIJA>
11519
11520         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11521
11522
11523 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11524
11525         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11526
11527 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11528
11529         * link/z80/aslink.h: Fixed path for PATH_MAX
11530
11531 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11532
11533         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11534
11535         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11536
11537         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11538
11539         * 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.
11540
11541 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11542
11543         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11544         (genCmp): Fixed up genCmp for the GB with longs.
11545
11546         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11547
11548         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11549
11550         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11551
11552         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11553
11554 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11555
11556         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11557
11558 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11559
11560         * 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.
11561
11562         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11563
11564 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11565
11566         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11567
11568         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11569
11570 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11571
11572   * sim/ucsim/configure:    little improvement of Cygwin-detection
11573   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11574   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11575   * support/regression/tests/bug-221100.c: small changes for mcs51
11576   * support/regression/tests/bug-221168.c: small changes for mcs51
11577   * support/regression/tests/bug-227710.c: small changes for mcs51
11578   * support/regression/tests/staticinit.c: small changes for mcs51
11579   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11580   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11581   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11582
11583 $Revision$