* device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
[fw/sdcc] / ChangeLog
1 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
2
3         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
4
5 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6
7         * device/lib/mcs51/Makefile.in: changed string comparison operator
8           to = for POSIX compliance; == is bash extension
9
10 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
11
12         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
13           kosmonaut_pirx
14
15 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
16
17         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
18         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
19         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
20         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
21         bug report #1478657,
22
23 2006-05-05 Borut Razem <borut.razem AT siol.net>
24
25         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
26           making the html
27
28 2006-05-02 Borut Razem <borut.razem AT siol.net>
29
30         * doc/Makefile.in: removed *.ind dependency since there is no rule to
31           create *.ind, which made make to fail if invoked with -j 2
32
33 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
34
35         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
36           Hubert Sack for patch 1479782
37
38 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
39
40         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
41
42 2006-05-01 Raphael Neider <rneider AT web.de>
43
44         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
45           (create_pic): store only prefix-free device name,
46           (init_pic): check for device names with "16" prefix,
47           (list_valid_pics),
48         * src/pic/device.h (struct PIC_device),
49         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
50             stored device name,
51         * device/include/pic/pic12f{635,675,629,683}.h,
52         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
53         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
54         * device/include/pic/pic16f505.h,
55         * device/lib/pic/libdev/pic16f505.c: removed
56         * device/include/pic/pic14devices.txt: added support for pic12f
57             devices, removed unsupported non 16-bit devices
58             [above changes provided by patch from Zik Saleeba]
59         * src/pic/*, src/pic16/*, device/include/pic16/*,
60           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
61
62 2006-05-01 Borut Razem <borut.razem AT siol.net>
63
64         * configure.in, configure, doc/Makefile.in:
65           sync with nightly build makefile - latex, dvipdf and dvips
66           not needed any more
67
68 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
69
70         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
71         in the library source
72
73 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
74
75         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
76
77 2006-04-28 Raphael Neider <rneider AT web.de>
78
79         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
80         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
81           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
82         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
83
84 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
85
86         * device/lib/pic/libdev/Makefile.in,
87         * device/lib/hc08/Makefile.in,
88         * device/lib/gbz80/Makefile.in,
89         * device/lib/z80/Makefile.in,
90         * device/lib/ds390/Makefile.in,
91         * device/lib/ds400/Makefile.in: added srcdir to include search path,
92         thanks to Borut for the bug report
93         * configure.in,
94         * configure: always create doc/Makefile independent from --enable-doc
95         * Makefile.in: always install from directory doc independent from
96         --enable-doc
97         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
98         removed
99         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
100         * doc/Makefile.in: install *.txt if present
101         * device/include/Makefile.in (install): added installation of pic/*.inc
102         and pic/*.txt files again, they were erroneously removed
103
104 2006-04-28 Raphael Neider <rneider AT web.de>
105
106         * src/pic/{gen.c,main.h,pcode.c},
107         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
108             concerning signedness with casts
109
110 2006-04-28 Raphael Neider <rneider AT web.de>
111
112         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
113             definition of an interrupt handler,
114         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
115             interrupt handler stuff from picglue() to separate routine,
116           (picglue): enabled definition of intr handlers in files w/o main()
117
118 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
119
120         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
121           compilation with MSVC 2005 Express Edition (VC8)
122
123 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
124
125         * device/lib/Makefile: fixed build of gbz80 lib
126
127 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
128
129         * support/regression/tests/bug-460010.c,
130         * support/regression/tests/bug-524691.c,
131         * support/regression/tests/bug-716242.c: removed conditional defines
132           that are already in testfwk.h
133
134 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
135
136         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
137           (AccAXRsh1): added, shift right by 1,
138           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
139            AccAXLrl1
140         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
141
142 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
143
144         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
145         remove cast to same type
146         * src/SDCCast.c (decorateType): fix for RFE 1475742,
147         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
148         * as/z80/Makefile,
149         * link/z80/Makefile: removed, they have moved to
150         Makefile.in files
151         * configure,
152         * configure.in: replaced duplicate message about ucsim by missing sdcpp
153         * install-sh: fix bug #1204398 by setting umask 0022
154         * device/lib/Makefile: separate build of z80 and gbz80 lib
155
156 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
157
158         Enabled VPATH feature: changed nearly all Makefiles (149 files).
159         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
160
161         One basic decision: e.g. src/clean.mk includes further files. In order
162         to make this work there are two solutions:
163         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
164           run configure on them. This way they can use
165           'include $(srcdir)/port-clean.mk'
166         - always include clean.mk by the Makefile at the same level. To avoid
167           that `make clean` tries to include and build Makefile.dep the
168           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
169           implemented, because now even `make uninstall` doesn't create
170           Makefile.in. clean.mk could be eliminated by pasting it in
171           Makefile.in.
172
173         * debugger/mcs51/Makefile.in: build own objects from library sources
174         (SLIB, SDCC) in current directory
175
176         * configure, configure.in: renamed --disable-device-lib-build in
177         --disable-device-lib; added --enable-doc, the required tools are
178         searched by configure; added result message; the toolchain for the
179         belonging ports are now only built, if the port is enabled.
180
181         * support/regression/*: all output is written in directory gen, because
182         the fwk and ports directories don't livet in the build tree using vpath
183
184         * doc/sdccman.lyx: renamed --disable-device-lib-build to
185         --disable-device-lib, added --enable-doc, added section VPATH
186
187         * sim/ucsim/configure.in,
188         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
189         z80 are enabled by default
190
191 2006-04-24 Raphael Neider <rneider AT web.de>
192
193         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
194             to config word, "pic14_"-prefixed some extern functions
195           (pic14_emitConfigWord): emit __config directive(s) if assignment to
196             config word has been found
197         * src/pic/device.h: added prototypes
198         * src/pic/pcode.c: added "pic14_"-prefix where needed
199         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
200             fixup
201         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
202             words,
203           (pic14emitRegularMap): ignore config words,
204           (pic14createInterruptVect): moved generating __config directives away
205           (picglue): have __config directives emitted
206
207 2006-04-24 Borut Razem <borut.razem AT siol.net>
208
209         * doc/Makefile: sync with nightly build makefile
210
211 2006-04-24 Raphael Neider <rneider AT web.de>
212
213         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
214             registers that have not been assigned proper liveranges,
215             fixes #1469504 and #1474602,
216           (pCodeRegOptimizeRegUsage): fixed typo in comment
217
218 2006-04-24 Borut Razem <borut.razem AT siol.net>
219
220         * device/examples/main8051.c: deleted - it was removed from CVS
221           24.mar.2000 and after that modified 18.feb.2001, so it reappered
222           after the transition to Subversion
223         * src/SDCCalloc.h: deleted - it was removed  from CVS
224           3.feb.2001 and after that modified 18.feb.2001, so it reappered
225           after the transition to Subversion
226         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
227           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
228           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
229           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
230
231 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
232
233         * as/asx8051.dsp: added mcs51/strcmpi.h
234         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
235         * as/hc08/aslink.h: updated lnksect prototype
236         * as/hc08/asm.h,
237         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
238         * as/hc08/asmain.c,
239         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
240           (newdot): handle A_ABS
241         * as/hc08/asout.c,
242         * as/mcs51/asout.c (outarea): output address
243         * as/hc08/lkaomf51.c,
244         * as/mcs51/lkaomf51.c: disabled unused array UsageType
245         * as/hc08/m08pst.c,
246         * as/mcs51/i51pst.c,
247         * as/z80/z80pst.c: "ABS" is not A_OVR
248         * as/hc08/lkarea.c (newarea): read a_addr,
249           (lnkarea): added codemap array, sort absolute areas to the front,
250            combine all GSINITx/GSFINAL,
251           (find_empty_space, allocate_space): new functions,
252           (lnksect): return next address, handle absolute sections
253         * as/mcs51/lkarea.c (newarea): read a_addr,
254           lnksect2 prototype changed,
255           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
256           (find_empty_space, allocate_space): new, factored out of lnksect2,
257           (lnksect2): return next address, handle absolute sections
258         * as/hc08/lkhead.c,
259         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
260         * as/hc08/lklibr.c (addfile, fndsym),
261         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
262           index out of range and detect both '\' and '/'
263         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
264         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
265           regression tests (ds390 cannot return bool yet)
266         * doc/sdccman.lyx: changed version number, document changed --no-peep,
267           document critical interrupts on z80, document changed SDCC define
268         * src/asm.c (_asxxxx_mapping): fixed .org directive,
269           (_a390_mapping): added .org directive
270         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
271           (genMultOneByte): fixed warnings
272         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
273           ones
274         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
275         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
276           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
277         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
278         * src/pic16/main.c: removed newReg prototype
279         * src/pic16/pcode.c,
280         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
281           warnings
282         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
283           ones
284         * src/pic16/ralloc.c
285         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
286           to fix warnings
287         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
288           from short to PIC_OPTYPE
289         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
290         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
291           optype from short to PIC_OPTYPE
292         * src/port.h: made int_size unsigned to fix warnings
293         * src/SDCC.y: fixed warning on MSVC
294         * src/SDCCicode.c (getArraySizePtr): return unsigned int
295         * src/SDCCopt.c (convertToFcall): fixed warnings
296         * src/SDCCsymt.h: removed double prototype for genSymName
297         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
298           offset int to fix warnings
299
300 2006-04-22 Borut Razem <borut.razem AT siol.net>
301
302         * doc/sdccman.lyx, */Makefile, */Makefile.in:
303           references to CVS replaced with Subversion
304
305 2006-04-21 Borut Razem <borut.razem AT siol.net>
306
307         * doc/sdccman.lyx, */Makefile, */Makefile.in:
308           references to CVS replaced with Subversion
309
310 2006-04-19 Borut Razem <borut.razem AT siol.net>
311
312         * src/version.awk: adapted for svn
313         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
314           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
315           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
316           /binutils-avr/etc/*.vi, *.jin: removed all properties
317           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
318
319 2006-04-19 Borut Razem <borut.razem AT siol.net>
320
321         * CVS to Subversion migration completed
322
323 2006-04-18 Borut Razem <borut.razem AT siol.net>
324
325         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
326           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
327
328 2006-04-17 Borut Razem <borut.razem AT siol.net>
329
330         * device/include/Makefile.in: added pic/*.inc to the installation
331
332 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
333
334         * support/regression/collate-results.py: fixed output in case of
335         a valdiag error
336         * support/regression/generate-cases.py: fixed splitting of pathnames
337         with dots
338         * as/hc08/lklibr.c (addfile),
339         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
340
341 2006-04-11 Raphael Neider <rneider AT web.de>
342
343         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
344         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
345         * src/pic16/pcode.c (assignValnums): fixed #1460578
346
347 2006-04-11 Raphael Neider <rneider AT web.de>
348
349         * device/lib/pic/libdev/*.c,
350         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
351           fixes #1468739, enables compilation in --std-c99 mode
352         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
353
354 2006-04-11 Raphael Neider <rneider AT web.de>
355
356         * src/pic/device.c (find_device): removed debug output
357           (list_valid_pics): enabled verbose listing of supported devices
358         * device/include/stdbool.h: define bool as char for pic14/16 as well
359
360 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
361
362         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
363
364 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
365
366         * .version: bumped version to 2.5.6
367         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
368
369 2006-04-06 Raphael Neider <rneider AT web.de>
370
371         * .version: bumped version to 2.5.6 (pic14 ABI changed)
372         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
373         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
374           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
375             pic14_constructAbsMap
376           (pic14printPublics): declare absolute global symbols as global
377           (pic14createInterruptVect),
378         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
379           (newReg): assume new registers unused, use correct name in
380             hashtable (reg->name instead of name), more debugLog output
381         * src/pic/device.h (PIC_device): added fields for verbose output
382         * src/pic/device.c: moved device definition to pic14devices.txt,
383             added routines for runtime parsing of pic14devices.txt,
384             added support for second config word
385         * src/pic/main.c (_process_pragma): removed #pragma maxram,
386           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
387           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
388           (_pic14_parseOptions): moved pCodeInitRegisters here
389           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
390         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
391           (pCodeInitRegisters): rewrapped comments, perpared new approach to
392             handling the pseudo stack
393         * device/lib/Makefile.in: ignore failures in objects-pic16,
394         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
395         * device/lib/pic/NEWS: document new dependency on picXXX.lib
396         * device/lib/pic/Makefile.subdir,
397         * device/lib/pic16/Makefile.subdir: improved clean rules
398         * device/lib/pic/libdev/: NEW, pic14 device libraries
399         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
400         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
401         * device/include/Makefile.in: create subdir and install pic14 headers
402         * device/include/pic/p16f_common.inc: removed unused declarations
403         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
404             PICs from inc2h.pl v1.6,
405             replaced BIT_AT macros with struct declarations
406         * device/include/pic/pic14devices.txt: definition of supported devices,
407             all above improvements contributed by Zik Saleeba, thanks
408         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
409         * support/scripts/sdcc.nsi: also install pic14 device libraries and
410             headers
411
412 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
413
414         * device/include/mcs51/c8051f410.h: added interrupt numbers,
415         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
416           thanks to Charles Olds
417
418 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
419
420         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
421
422 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
423
424         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
425         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
426         * support/regression/bug1464657.c: added, new test
427
428 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
429
430         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
431           version number
432
433 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
434
435         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
436           --no-peep and --peep-file <file> are used don't use default rules but
437           do use the <file>
438
439 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
440
441         * src/mcs51/gen.c (genCall): fixed bug 1457608
442
443 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
444
445         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
446         changes seem to cause (trigger?) problems with the build system.
447
448 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
449
450         * src/SDCCpeeph.c (operandsLiteral): new, added,
451           (callFuncByName): inserted operandsLiteral
452         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
453
454 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
455
456         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
457         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
458
459 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
460
461         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
462           implemented patch 1120823 Thanks to Willy De la Court (normal
463           interrupts need an interrupt number now if they are made critical),
464           and enabled nesting of critical functions though not for gbz80
465           (genCritical, genEndCritical): added functions
466           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
467         * src/z80/mappings.i: added "ei" to all mappings
468
469 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
470
471         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
472         submitted by the Debian SDCC maintainer Aurelien Jarno:
473         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
474         archive with gcc 4.1 on mips and wrote the patch"
475
476 2006-03-16 Raphael Neider <rneider AT web.de>
477
478         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
479           the left operand is shorter than the result (c* = lit-c* + int),
480           fixes bug #1450796
481         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
482           OP_SYMBOL
483
484 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
485
486         * src/.version: increased version number to 2.5.5
487         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
488         linking is done manually in pic16 port's _linkEdit,
489         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
490         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
491         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
492         allocate asmop as AOP_ACC,
493         (aopForRemat): added parameter 'bool result' in function declaration,
494         (pic16_aopGet): return AOP_ACC when accessing WREG,
495         (pic16_popGetTempReg): minor modification,
496         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
497         'pic16_allocWithIdx',
498         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
499         calling function in absolute addresses,
500         (genAssign): take into account AOP_ACC asmop,
501         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
502         * src/pic16/pcoderegs.c: some debug functions and lines added,
503         * src/pic16/ralloc.c (decodeRegType): added but commented out,
504         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
505         register too,
506         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
507         call to allocReg, not by manually allocating a new one,
508         (pic16_assignRegisters): now before going through the register
509         allocating functions mark all registers as free. This eliminates some
510         side effects resulting from peephole parser done earlier in the backbone
511
512 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
513
514         * src/SDCCicode.c (geniCodeLogic),
515         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
516
517 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
518
519         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
520           (genSend): bugfix, do not allocate and free twice,
521           (shiftRLong): handle partially overlapping aops
522         * support/regression/tests/bitopcse.c: fixed warning redefined idata
523
524 2006-03-08 Borut Razem <borut.razem AT siol.net>
525
526         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
527           for pic16
528
529 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
530
531         * support/regression/tests/bug1409955.c: new, added
532         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
533         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
534           (aopForSym, aopOp): increment asmop.allocated if reused,
535           (freeAsmop): decrement asmop.allocated and check for zero instead of
536           using asmop.freed,
537           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
538           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
539            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
540            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
541            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
542            genSignedRightShift, genRightShift, genDataPointerGet,
543            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
544            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
545             in reverse order from allocation,
546           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
547             added swappedLR to keep track
548         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
549           pdata & code for GCC, z80, gbz80 & hc08
550         * support/regression/tests/zeropad.c: moved defines to testfwk.h
551
552 2006-03-08 Raphael Neider <rneider AT web.de>
553
554         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
555
556 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
557
558         * device/include/mcs51/c8051f410.h: new SiLabs mcu
559         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
560         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
561
562 2006-03-06 Borut Razem <borut.razem AT siol.net>
563
564         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
565           made the linker quiet
566
567 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
568
569         * src/pic16/gen.c (genPcall): fixed bug #1443644
570         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
571         which dumps before the function entry point a data byte which represents
572         the number of the local variables used by the specified function, added
573         'xinst' for initial support for Extended Instruction Support,
574         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
575         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
576         port->fun_prefix anymore (may change later),
577         (genFunction, genEndFunction): do not store/restore local registers for
578         _main (this should take care the --main-return command line option in
579         the future),
580         (genOr): removed some legacy pic-port instructions,
581         * src/pic16/genarith.c (genAddLit): re-enabled old code because
582         performing operations with SFR's causes data to be written more than
583         once to each SFR. Perhaps SFRs should be handled in special cases...
584         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
585         pcode.h
586         * src/pic16/main.c (_process_pragma): stack bound checking did not take
587         into account for stack starting position,
588         (struct OPTIONS pic16_optionsTable): added command line argument
589         --extended or -y for Extended Instruction Support,
590         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
591         (deassignLRs): *** perhaps the most important change, old 'for' code
592         (commented out for reference), didn't account for some registers which
593         were left marked 'not free' after a pointer operation. The change
594         reduces register usage a lot in some cases
595
596 2006-03-04 Borut Razem <borut.razem AT siol.net>
597
598         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
599           _clean
600         * support/regression/tests/bug-524697.c: decreased array size for
601           mcs51 to fit into the internal RAM
602         * support/regression/Makefile.in: a little bit more verbose
603
604 2006-03-03 Borut Razem <borut.razem AT siol.net>
605
606         * support/regression/fwk/lib/testfwk.c,
607           support/regression/fwk/include/testfwk.h: introduced function
608           _prints(), nonrecursive _printn(), call _initEmu() from main()
609         * support/regression/ports/gbz80/support.asm,
610           support/regression/ports/ucz80/support.asm,
611           support/regression/ports/z80/support.asm,
612           support/regression/ports/ds390/support.c,
613           support/regression/ports/hc08/support.c,
614           support/regression/ports/host/support.c,
615           support/regression/ports/mcs51/support.c,
616           support/regression/ports/xa51/support.c: added empty _initEmu()
617           function
618         * support/regression/ports/pic16/gpsim.cmd,
619           support/regression/ports/pic16/spec.mk,
620           support/regression/ports/pic16/support.c,
621           support/regression/Makefile.in: added pic16 regression test
622
623 2006-03-01 Raphael Neider <rneider AT web.de>
624
625         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
626           genConstPointerGet): use safe way of generating MOVFF to cover
627             literals as well as registers, fixes bug #1440527
628         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
629             dereference
630           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
631             more correctly, fixes bug #1232186
632           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
633         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
634             gplink guess the correct processor in more cases, applied patch
635             from Till Riedel attached to and fixing bug #1436552
636
637 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
638
639         * support/regression/tests/array.c: added, contains check for #1434401
640         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
641
642 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
643
644         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
645         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
646         * device/include/mcs51/c8051f326.h,
647         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
648         * device/include/mcs51/c8051f000.h,
649         * device/include/mcs51/c8051f018.h,
650         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
651           PCON_IDLE,PCON_STOP and added sfr16 definitions
652
653 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
654
655         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
656           genGetWord): fixed bug 1409955
657
658 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
659
660         * device/include/hc08/mc68hc908gp32.h,
661         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
662
663 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
664
665         * src/SDCCast.c (constExprValue): return NULL if not a value
666         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
667         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
668         * support/regression/tests/bitfields.c: enabled signed bitfield for all
669
670 2006-02-13 Borut Razem <borut.razem AT siol.net>
671
672         * src/regression/ptrarg.c: added, fails due to bug #1430967
673         * src/regression/Makefile: ptrarg.c added, ...
674
675 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
676
677         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
678         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
679
680 2006-02-11 Borut Razem <borut.razem AT siol.net>
681
682         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
683           print "Processor: xxx" message to stdout only if --verbose
684
685 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
686
687         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
688         * support/regression/tests/bug1426356.c: added
689         * support/regression/tests/bitfields.c: removed 2 tests
690
691 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
692
693         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
694         * device/include/mcs51/c8051f330.h,
695         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
696           PCON_IDLE,PCON_STOP and added sfr16 definitions
697         * device/lib/_divsint.c,
698         * device/lib/_divuint.c,
699         * device/lib/_divulong.c,
700         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
701           register bank bug for small stackauto
702
703 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
704
705         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
706
707 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
708
709         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
710         * all.dsp: corrected several bin paths
711         * device/include/mcs51/c8051f120.h,
712         * device/include/mcs51/c8051f300.h,
713         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
714           to PCON_IDLE,PCON_STOP
715         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
716         * device/lib/printf_large.c (output_float): fixed bug 1388703
717         * support/regression/tests/bug1057979.c: added test for bug 1388703
718
719 2006-02-08 Raphael Neider <rneider AT web.de>
720
721         * src/pic/pcode.c (pciTRIS): fixed typo,
722           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
723           (LinkFlow): fixed handling of flows that end in a call,
724           (ReuseReg): perform safety check earlier
725         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
726             to work with flows at the beginning of a pBlock,
727             fixes #1426557 (Symbol not previously defined),
728           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
729             usage information
730           (RemoveUnusedRegisters): update register usage info
731         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
732             created, reuse existing ones instead
733         * src/pic/gen.c (genPcall): fixed #1424719
734
735 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
736
737         * link/z80/lkmain.c,
738         * link/z80/lklex.c,
739         * link/z80/lkdata.c,
740         * link/z80/aslink.h: fixed build on current cygwin:
741         replaced getline() by lk_getline()
742
743 2006-02-01 Borut Razem <borut.razem AT siol.net>
744
745         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
746           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
747           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
748           src/regression/bool1.c, src/regression/bool2.c,
749           src/regression/bool3.c, src/regression/call1.c,
750           src/regression/compare.c, src/regression/compare10.c,
751           src/regression/compare2.c, src/regression/compare3.c,
752           src/regression/compare4.c, src/regression/compare5.c,
753           src/regression/compare6.c, src/regression/compare7.c,
754           src/regression/compare8.c, src/regression/compare9.c,
755           src/regression/configword.c, src/regression/for.c,
756           src/regression/inline.c, src/regression/mult1.c,
757           src/regression/nestfor.c, src/regression/or1.c,
758           src/regression/pointer1.c, src/regression/ptrfunc.c,
759           src/regression/rotate1.c, src/regression/rotate2.c,
760           src/regression/rotate3.c, src/regression/rotate4.c,
761           src/regression/rotate5.c, src/regression/rotate6.c,
762           src/regression/rotate7.c, src/regression/string1.c,
763           src/regression/struct1.c, src/regression/sub.c,
764           src/regression/sub2.c, src/regression/switch1.c,
765           src/regression/while.c, src/regression/xor.c,
766           src/regression/create_stc, src/regression/simulate,
767           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
768           regression tests
769         * src/regression/gpsim_assert.h: added
770
771 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
772
773         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
774         ((void (code *) (void)) 0) ();
775         * as/hc08/aslex.c,
776         * as/hc08/aslink.h,
777         * as/hc08/asm.h,
778         * as/hc08/asmain.c,
779         * as/hc08/lkdata.c,
780         * as/hc08/lklex.c,
781         * as/hc08/lkmain.c,
782         * as/mcs51/aslex.c,
783         * as/mcs51/aslink.h,
784         * as/mcs51/asm.h,
785         * as/mcs51/asmain.c,
786         * as/mcs51/lkdata.c,
787         * as/mcs51/lklex.c,
788         * as/mcs51/lkmain.c,
789         * as/z80/aslex.c,
790         * as/z80/asm.h,
791         * as/z80/asmain.c: fixed build on current cygwin:
792         replaced getline() by as_getline()
793
794 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
795
796         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
797         declarator in the symbol chain
798         * src/SDCCsymt.h,
799         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
800         parameter list for function pointers
801         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
802         * support/regression/tests/bug-716242.c: added
803
804 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
805
806         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
807         offset if possible
808         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
809
810 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
811
812         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
813         inifinitely recurseable, added static
814         * support/regression/tests/bug-1408066.c: added
815
816 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
817
818         * src/SDCCicode.h,
819         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
820         renamed, added possibility to create "postLoopLbl"-labels
821         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
822         newiTempLoopHeaderLabel
823         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
824         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
825         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
826         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
827         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
828         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
829         (basicInduction): fixed bug #136564, made static,
830         (loopInduction): changed parameter of basicInduction, made static,
831         (addPostLoopBlock): added
832         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
833         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
834         findLoopEndSeq
835         * support/regression/tests/bug-136564.c: added
836         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
837         --std-sdcc99 to LIBSDCCFLAGS
838
839 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
840
841         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
842         while loop
843         * support/regression/tests/bug-1406131.c: added
844
845 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
846
847         * src/SDCCast.c (decorateType): fix promotion of unary minus
848         * src/SDCCsymt.c (computeType): beautified
849         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
850         (valUnaryPM, valComplement): fix sign and promotion,
851         (valNot): ANSI: result type is int (SDCC: unsigned char)
852         * support/regression/tests/uminus.c: speedup by removing superflous
853         test case 'int'
854         * support/regression/tests/onebyte.c: added promotion and signedness
855         tests for unary minus
856         * support/regressions/tests/bug-477927.c: disable warning about
857         uninitialized variables
858         * support/regression/tests/not.c: added
859
860 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
861
862         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
863         * src/mcs51/gen.c (gen51Code): show final register usage after
864         fillGaps in asm with --i-code-in-asm
865         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
866         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
867         incUsed, rliveClear, adjustIChain): made static,
868         (setFromRange): excluded because it's unused,
869         (findPrevUseSym, markWholeLoop): added,
870         (findPrevUse): rewritten; fixes bug 895992; now a complete search
871         through all branches of predecessors enables sdcc to emit the warning
872         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
873         (rlivePoint): made static, added parameter emitWarnings which is only
874         true during the first run out of two,
875         (findRecursiveSucc, findRecursivePred): removed,
876         (computeLiveRanges): made static, added parameter emitWarnings,
877         (dumpIcRlive): added for debugging only
878         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
879         removed prototype of setFromRange()
880         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
881         in call of computeLiveRanges()
882         * support/regression/tests/bug-895992.c: added
883         * support/regression/tests/bug-971834.c: added
884         * support/valdiag/tests/bug-895992.c: added
885         * support/valdiag/tests/bug-971834.c: added
886
887 2005-12-18 Raphael Neider <rneider AT web.de>
888
889         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
890           (genUnpackBits): improved code for direct operands,
891           (genPackBits): improved code for literal assignment to bitfields
892             and for direct destination operands (no FSR indirection),
893             prevented redundant AND, fixes #1362800,
894           (AccLsh): added parameter to disable masking of the result
895         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
896           skip instructions with side-effects (like incfsz),
897           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
898         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
899         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
900           fixes #1375263
901
902 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
903
904         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
905         volatile variables as spill location
906
907 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
908
909         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
910         replacing literals
911         * support/regression/tests/bug-1376320.c: added
912
913 2005-12-08 Raphael Neider <rneider AT web.de>
914
915         * src/pic/device.c: renamed is_shared to pic14_is_shared
916         * src/pic/gen.c (genIfx): re-enabled handling of sbits
917         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
918           (is_valid_identifier): added for above workaround
919
920 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
921
922         * device/lib/Makefile.in: fixed to enable port-specific-objects
923         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
924           char, thanks Hubert Sack
925         * doc/sdccman.lyx: documented --xstack-loc,
926           elaborated a bit more on interrupts and pitfalls,
927           removed "setjmp/longjmp unsupported",
928           documented some unsupported C99 features
929         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
930         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
931           if, thanks Hubert Sack
932         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
933         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
934           make make_library
935         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
936           regression tests can report resource usage (rfe 700441)
937         * support/regression/collate-results.py: report resource usage
938         * support/regression/ports/ds390/spec.mk,
939         * support/regression/ports/hc08/spec.mk,
940         * support/regression/ports/mcs51/spec.mk,
941         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
942         * support/regression/ports/ds390/uCsim.cmd,
943         * support/regression/ports/hc08/uCsim.cmd,
944         * support/regression/ports/mcs51/uCsim.cmd,
945         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
946         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
947           library, use the default one
948         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
949           building the library
950
951 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
952
953         * config.dsp: added dependency on .version and configure_vc.awk
954         * device/include/setjmp.h: updated for --stack-auto and --xstack
955         * device/include/mcs51/at89c51snd1c.h: corrected line endings
956         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
957         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
958         * device/lib/libsdcc.lib: added _setjmp
959         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
960           (decorateType): fixed bug 1372851,
961           (optimizeGetHbit): fixed warning
962         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
963           array initialisation
964         * support/regression/tests/bug1057979.c: added test for bug 1358192
965         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
966
967 2005-12-03 Borut Razem <borut.razem AT siol.net>
968
969         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
970           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
971
972 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
973
974         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
975         createIval): implement symbol independant "flexible array member",
976         (createIvalCharPtr): implemented flexible array initialisation with a
977         string
978         * src/SDCCsymt.c (copyStruct): removed,
979         (getSize): fixed misleading comment,
980         (getAllocSize): removed, the additional allocation size is now in
981         sym->flexArrayLength,
982         (checkStructFlexArray): new, syntax checks for flexible array members,
983         (compStructSize): added syntax checks for "flexible array members"
984         (copyStruct): removed,
985         (copyLinkChain): removed inefficient fix for bug 770487
986         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
987         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
988         symbol->flexArrayLength
989         * src/SDCCerr.c,
990         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
991         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
992         * support/regression/tests/structflexarray.c: added
993         * support/valdiag/tests/structflexiblearray.c: added
994
995 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
996
997         * src/SDCCast.c (decorateType): fixed bug 1368489
998         * support/Util/SDCCerr.c,
999         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1000
1001 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1002
1003         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1004           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1005
1006 2005-11-27 Borut Razem <borut.razem AT siol.net>
1007
1008         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1009           support/cpp2/mkdeps.h: added command line option
1010           -obj-ext=<extension> to SDCPP to define object file externion, used
1011           for generation of make dependencies (-M)
1012         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1013
1014 2005-11-26 Borut Razem <borut.razem AT siol.net>
1015
1016         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1017           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1018           added pic and pic16 libraries
1019
1020 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1021
1022         * device/include/float.h: Corrected typo in prototype of __fsgt
1023
1024 2005-11-25 Borut Razem <borut.razem AT siol.net>
1025
1026         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1027           added creation of model-mcs51-stack-auto libraries
1028
1029 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1030
1031         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1032         and fields-list too
1033         * src/SDCCast.c (createIvalArray): removed obsolete comment
1034
1035 2005-11-24 Borut Razem <borut.razem AT siol.net>
1036
1037         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1038           added missing device/lib/mcs51/crt*.asm sources
1039
1040 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1041
1042         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1043
1044 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1045
1046         * device/lib/_fs2schar.c,
1047         * device/lib/_fs2sint.c,
1048         * device/lib/_fs2slong.c: optimized inline asm
1049
1050 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1051
1052         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1053           Better handling of floats between -1.0 and 0.0.
1054
1055 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1056
1057         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1058           (the missing "if"s prohibited removal of redundant labels)
1059
1060 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1061
1062         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1063           Properly convert floats between -1.0 and 0.0 to long, int, and char
1064           types (max integer value of negative floats tends to zero).
1065         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1066           Removed changes made so to work properly with floats between
1067           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1068           and _fs2char.c
1069
1070 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1071
1072         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1073         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1074         (genCast) cosmetic change
1075         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1076         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1077         from mcs51
1078         * support/regression/tests/bitfields (testSignedBitfields): added
1079
1080 2005-11-18 Borut Razem <borut.razem AT siol.net>
1081
1082         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1083         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1084           introduced SILENT option to make building of pic16 libraries less
1085
1086 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1087
1088         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1089           Now they work properly with floats between -1.0 and 0.0
1090         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1091
1092 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1093
1094         * src/SDCCicode.c (printOperand): added missing else
1095
1096 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1097
1098         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1099         reformatted for better readability
1100         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1101         signed bitfields
1102
1103 2005-11-17 Borut Razem <borut.razem AT siol.net>
1104
1105         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1106           introduced SILENT option to make building of pic16 libraries less
1107           verbose - used for nightly snapshot build
1108         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1109           available on Win32 platforms.
1110         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1111           medium, large, pic and pic16
1112
1113 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1114
1115         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1116           printf("%f"...) sets fraction to zero.
1117
1118 2005-11-16 Raphael Neider <rneider AT web.de>
1119
1120         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1121           fixes #1357221
1122         * src/pic/gen.c (genIfx): implemented for CARRY bit
1123         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1124           to generic pointers, fixes #1357332,
1125           (pic16_movLit2f): NEW,
1126           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1127
1128 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1129
1130         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1131
1132 2005-11-11 Raphael Neider <rneider AT web.de>
1133
1134         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1135         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1136           compute pointer's type from operand,
1137           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1138           improved single bit reads, fixes bug #1353379
1139
1140 2005-11-09 Borut Razem <borut.razem AT siol.net>
1141
1142         * support/scripts/sdcc.nsi: added lib/pic to the package
1143
1144 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1145
1146         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1147
1148 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1149
1150         * support/regression/tests/bug1348008.c: added
1151         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1152         * support/regression/tests/bug1337835.c: updated comment
1153
1154 2005-11-06 Borut Razem <borut.razem AT siol.net>
1155
1156         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1157           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1158           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1159           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1160           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1161           dynamic construction of cl_error_class and derivates - 2.nd try
1162
1163 2005-11-05 Borut Razem <borut.razem AT siol.net>
1164
1165         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1166           bug, which caused Bus Errors on sparc solaris
1167
1168 2005-11-04 Borut Razem <borut.razem AT siol.net>
1169
1170         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1171           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1172           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1173           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1174           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1175           and derivates to resolve the initialization problem on OSX
1176
1177 2005-11-02 Borut Razem <borut.razem AT siol.net>
1178
1179         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1180           corrected typo - #include <winsock2.h>
1181
1182 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1183
1184         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1185           (_asxxxx_mapping): added org directive for future enhancements
1186
1187 2005-11-01 Borut Razem <borut.razem AT siol.net>
1188
1189         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1190           enabled sockets on WIN32
1191         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1192
1193 2005-10-31 Borut Razem <borut.razem AT siol.net>
1194
1195         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1196           WIN32 backslash path delimiters should be escaped when used in C strings
1197         * support/regression/tests/bitfields.c: exclude failing assertions for
1198           __CYGWIN32__ and __MINGW32__ hosts
1199
1200 2005-10-30 Borut Razem <borut.razem AT siol.net>
1201
1202         * src/SDCCutil.c: corrected double comparison typo
1203
1204 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1205
1206         * device/lib/medium/Makefile: added for new memory model medium
1207         * device/include/asm/mcs51/features.h: updated for medium/pdata
1208         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1209           added Multiply & Accumulate sbit's and MAC0_PAGE define
1210         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1211         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1212         * device/lib/_mullong.c: update for medium model
1213         * device/lib/incl.mk: added medium model
1214         * doc/sdccman.lyx: documented medium model
1215         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1216         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1217         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1218         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1219           (allocParms): set SCLS and OCLS to pdata for medium model
1220         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1221           for pdata,
1222           (powof2): return <0 if not power of 2
1223         * src/avr/gen.c (genBitWise): use updated powof2
1224         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1225           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1226           (shiftLLeftOrResult): use B if necessary
1227         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1228         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1229         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1230         * support/regression/Makefile.in: added test-mcs51-medium
1231         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1232
1233 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1234
1235         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1236         specifier unsigned
1237         * device/lib/time.c (mktime): fixed bug 1334315
1238
1239 2005-10-28 Raphael Neider <rneider AT web.de>
1240
1241         * device/include/pic/p16f_common.inc: added common declarations
1242         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1243
1244 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1245
1246         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1247           (aopPutUsesAcc): added to predict accumulator use,
1248           (assignResultValue): save acc if necessary,
1249           (genMinusDec): store result if indirectly addressed,
1250           (genDivOneByte):  save acc if necessary,
1251           (movLeft2Result): bugfix if left already in acc,
1252           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1253             attention to accumulator use (esp. pdata),
1254           (genReceive): receive pdata correctly
1255         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1256         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1257
1258 2005-10-27 Raphael Neider <rneider AT web.de>
1259
1260         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1261
1262 2005-10-27 Raphael Neider <rneider AT web.de>
1263
1264         * .version: changed version to 2.5.4
1265         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1266         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1267           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1268             arithmetics support routines
1269         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1270         * device/lib/Makefile.in: also create installdir for pic
1271
1272         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1273           pic14 port as well
1274         * src/pic/device.c (dump_sfr): rewritten to delegate register
1275           placement to the linker (use `extern sym' rather than sym EQU addr),
1276           (validAddress): fixed to check last specified address
1277         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1278           (popGetLit): truncate literal value to 8 bit,
1279           (popGet): moved assert to more appropriate place
1280           (popGetExternal): create pCode operand from and mark the according
1281             symbol as being `extern'
1282           (popGetAddr): added sanity check on immediate's offset, provide
1283             GPOINTER tag on demand
1284           (aopPut): fixed for immediates,
1285           (mov2w_op): move operand's address or contents to WREG (depending on
1286             operand type), safer variant of mov2w,
1287           (movwf,call_libraryfunc): NEW, handy abbreviations,
1288           (get_argument_pcop,get_return_val_pcop,pass_argument,
1289           get_returnvalue): interface for accessing function parameters and
1290             return values,
1291           (assignResultValuei,genRet): use new parameter/return value interface
1292           (pic14_getDataSize): back to old version handling generic pointers,
1293           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1294             provided implementation and/or fixed old one,
1295           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1296             calls, removed legacy 8051 reference code
1297           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1298           (loadSignToC): NEW, move the operands sign bit to CARRY,
1299           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1300             genRightShiftSigned, accepts negative shift counts,
1301           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1302           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1303             generic pointers, __data pointers and __code pointers,
1304           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1305             and signed bitfields, limit bitfields to 8 bit,
1306           (genDataPointerGet): fixed number of bytes read,
1307           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1308           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1309             pointers to constant data are no longer assumed to point to __code
1310             space, removed invalid pointer types,
1311           (bitpatternFromVal): retrieve the PICs representation of an integer
1312             or float literal,
1313           (genDataPointerSet): fixed assigning to po_immediate operands,
1314           (genGenPointerSet): implemented as library call,
1315           (genIfx): fixed incorrect condition,
1316           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1317             provide GPOINTER tag according to destination's storage class,
1318           (genCast): added code to handle casting to generic pointers, added
1319             sign-/zero extension of the result
1320           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1321         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1322         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1323           extend the result
1324         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1325           address/register resides in the shared banks
1326           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1327             put all variables into separate sections (have the linker arrange
1328             them)
1329           (picglue): put init code and interrupt handlers in separate sections
1330         * src/pic/main.c: added port specific options table, modified to PORT
1331           structure to make GPOINTERs 3 byte, added pic14_options
1332           (_pic14_do_link): private linking routine (update paths to libraries,
1333             add libsdcc.lib by default)
1334         * src/pic/main.h: declare pic14_options
1335         * src/pic/pcode.c: fixed instructions i/o relations,
1336           (RegCond): reverted to correct version,
1337           (newpCodeOpLit): truncate literals to 8 bit,
1338           (genericPrint): added debug output,
1339           (getRegFromInstruction): fixed for various operand types, simplified
1340           (BuildFlow): fixed broken handling of isntructions with labels
1341           (LinkFlow): start at last instruction in flow (skip trailing comments),
1342             pass the flow on to the next instruction after CALL
1343           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1344           (insertPCodeInstruction): fixed inserting after a skip instruction,
1345           (DoBankSelect): fixed for labeled instructions
1346           (OptimizepBlock): honor --nopeep switch
1347           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1348         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1349         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1350           (pCodeOptime2pCodes): allow disabling this optimization via
1351             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1352             but is still buggy), started implementation of a dataflow based
1353             pCode optimization (CSE + dead code elimination)
1354           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1355         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1356           names are independant of the stack location and therefore portable across
1357           devices
1358
1359 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1360
1361         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1362           (selectSpil): fixed bug 1337835 by not spilling bit variables
1363         * support/regression/tests/bug1337835.c: added test for this bug
1364         * src/mcs51/peeph.def: restart after rule 3.c,
1365           addded rules 263.x to optimize loading constants
1366
1367 2005-10-26 Raphael Neider <rneider AT web.de>
1368
1369         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1370         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1371           (genAssign): emit warning when casting literals to generic pointer
1372             type, also applies when taking the address of a fixed variable,
1373           (genCast): improved casting to generic pointers
1374         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1375           extern variables, added verbose error message
1376         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1377
1378 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1379
1380         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1381         carry must be complemented too
1382         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1383         could be emitted by genMinus
1384         * src/SDCCval.c (constVal): fixed bug 1305065
1385
1386 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1387
1388         * src/SDCCast.c (addCast): added promotion for bit variables
1389         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1390         promotion casts + optimisation
1391         (optimizeGetWord): fix warning 'i' might be used uninitialized
1392         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1393         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1394
1395 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1396
1397         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1398         all chars are promoted to int; promotion should be handled in SDCCast.c
1399
1400 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1401
1402         * device/lib/_strcmp.c: Fixed bug 1326457
1403
1404 2005-10-11 Raphael Neider <rneider AT web.de>
1405
1406         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1407         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1408
1409 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1410
1411         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1412         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1413
1414 2005-10-04 Raphael Neider <rneider AT web.de>
1415
1416         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1417           device/lib/pic16/pics.all: added pic18f1320
1418         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1419
1420 2005-09-30 Raphael Neider <rneider AT web.de>
1421
1422         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1423         * src/pic16/devices.inc: NEW, provides device descriptions
1424         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1425
1426 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1427
1428         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1429           GETHBIT
1430
1431 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1432
1433         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1434           documented Any Order Bit, Higher Order Byte and Higher Order Word
1435         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1436         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1437           (optimizeGetAbit): new, to get any bit, not only the high bit,
1438           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1439           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1440           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1441           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1442             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1443             GETABIT, GETBYTE, GETWORD: decorate them,
1444           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1445           (ast_print): added GETABIT, GETBYTE, GETWORD
1446         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1447         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1448           (geniCodeBinary): new generic binary icode,
1449           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1450         * src/port.h: updated comment for PORT.hasExtBitOp
1451         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1452           (genGetByte): new, to get a single byte,
1453           (genGetWord): new, to get a word from a long,
1454           (gen51Code): added GETABIT, GETBYTE, GETWORD
1455         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1456
1457 2005-09-23 Raphael Neider <rneider AT web.de>
1458
1459         * configure.in, configure: have device/lib/pic configured
1460         * device/lib/Makefile.in: added model-pic14
1461         * device/lib/clean.mk: added pic/ to clean rule
1462         * device/lib/pic: added rudimentary pic14 library providing support
1463           functions for multiplication/division/generic pointer access
1464         * src/SDCCopt.c (convilong): mark support functions as extern
1465           for pic14 port as well
1466         * src/pic/gen.c (genMult): added assertions,
1467           (genpic14Code): emit warning on unhandled iCodes
1468         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1469         * src/pic/pcode.c (pCodeOpCopy),
1470         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1471           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1472           SFR_REGISTER}), made safe for future extensions
1473         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1474           instructions even if preceeded by SKIP instructions (also remove
1475           them); removed unused code
1476         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1477           prevents leaving parts of the structure uninitialized after copying
1478
1479 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1480
1481         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1482           ago by me
1483         * support/regression/tests/addsub.c: added test for the bug
1484
1485 2005-09-21 Raphael Neider <rneider AT web.de>
1486
1487         * device/include/pic16/pic18f1220.h,
1488           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1489         * device/lib/pic16/Makefile.rules: added missing opening paren
1490         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1491           are provided in genutils.c,
1492           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1493           operand/result sizes,
1494           (genCmp): assert on NULL pointers first, then check deref'ed values
1495         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1496           result size
1497
1498 2005-09-18 Raphael Neider <rneider AT web.de>
1499
1500         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1501           as these are now unused,
1502           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1503         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1504           local, avoids uninitialized pointer dereference on r->name
1505         * src/pic16/ralloc.c (newReg): fixed indentation
1506
1507 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1508
1509         * src/SDCCval.c (constVal): fixed bug 730366
1510         * support/Util/SDCCerr.c,
1511         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1512
1513 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1514
1515         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1516
1517 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1518
1519         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1520
1521 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1522
1523         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1524           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1525         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1526           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1527         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1528         * packihx/packihx.c (hexDigit): made c unsigned char
1529         * as/mcs51/lklibr.c (fndsym),
1530         * link/z80/lkgb.c (gb),
1531         * link/z80/lklibr.c (fndsym),
1532         * link/z80/lkrloc.c (relr),
1533         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1534         * src/SDCC.lex (checkCurrFile, process_pragma),
1535         * src/SDCCglue.c (spacesToUnderscores),
1536         * src/SDCCmain.c (setParseWithComma, processFile),
1537         * src/asm.c (tvsprintf, printCLine),
1538         * src/avr/gen.c (emitcode, aopPut),
1539         * src/ds390/gen.c (emitcode),
1540         * src/hc08/gen.c (emitcode, emitinline),
1541         * src/mcs51/gen.c (emitcode, genInline),
1542         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1543           tokenizeLineNode),
1544         * src/pic/ralloc.c (debugLog),
1545         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1546           tokenizeLineNode),
1547         * src/pic16/ralloc.c (debugLog),
1548         * src/z80/main.c (_process_pragma):
1549            made all ctype.h function calls safe
1550         * src/SDCCopt.c: include math.h for fabs
1551         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1552           and used them throughout the code to make ctype.h function calls safe
1553         * src/ds390/main.c (asmLineNodeFromLineNode),
1554         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1555         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1556            unsigned char*
1557         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1558           (newpCodeAsmDir): made ctype.h function calls safe
1559         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1560           pic16_emitcode):  made lbp unsigned char*
1561         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1562           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1563         * src/xa51/gen.c (emitcode),
1564         * src/z80/gen.c (_emit2): made lbp unsigned char*
1565         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1566            char*
1567
1568 2005-09-05 Raphael Neider <rneider AT web.de>
1569
1570         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1571           access bank splitpoint
1572
1573 2005-09-05 Raphael Neider <rneider AT web.de>
1574
1575         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1576
1577 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1578
1579         * .version: changed to version 2.5.3
1580         * doc/sdccman.lyx: changed version to 2.5.3,
1581           documented --codeseg and --constseg and pragma codeseg and constseg,
1582           documented bit parameters (reentrant) and bit returning
1583         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1584            currFunc->recvSize, but is this ok for all ports?
1585           (ast2iCode): result of ~ on unsigned char must be cast to int for
1586            bool to work
1587         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1588           function pointers in bit space
1589         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1590           (processFuncArgs): call port.reg_parm() with reentrancy info
1591         * src/port.h,
1592         * src/avr/main.c,
1593         * src/ds390/main.c,
1594         * src/hc08/main.c,
1595         * src/pic/main.c,
1596         * src/pic16/main.c,
1597         * src/xa51/main.c,
1598         * src/z80/main.c: port.reg_parm prototype extended with
1599           "bool reentrant" parameter
1600         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1601           options.stackAuto for allocating bit register parameters
1602         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1603           (genSend): set BitBankUsed if it is,
1604           (selectRegBank): factored out of genCall for use in genPcall,
1605           (genCall): removed redundant dtype assignmen, use selectRegBank,
1606           (genPcall): handle returning in Carry properly, save in F0 if needed,
1607           (genReceive): handle bit register parameters
1608         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1609           (mcs51_assignRegisters): enable bit registers for all reentrant
1610            functions and don't set BitBankUsed unconditionally
1611         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1612         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1613         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1614
1615 2005-08-27 Borut Razem <borut.razem AT siol.net>
1616
1617         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1618         ppc-osx (Darwin) does not support -u option. It seems that it is
1619         supported only on Linux - GNU cp
1620
1621 2005-08-25 Borut Razem <borut.razem AT siol.net>
1622
1623         * sim/ucsim/gui.src/serio.src/Makefile.in,
1624           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1625           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1626           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1627           install and strip, since the strip at /usr/ccs/bin should be used
1628           on solaris
1629
1630 2005-08-24 Borut Razem <borut.razem AT siol.net>
1631
1632         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1633
1634 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1635
1636         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1637         ffffffffu
1638
1639 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1640
1641         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1642         * as/mcs51/lkmain.c (link_main): fixed warning
1643         * device/include/stdbool.h: ds390 has no advanced bit support yet
1644         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1645         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1646         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1647           and updated their macros
1648         * src/SDCCval.c (constVal): updated comment for renamed b_long
1649
1650 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1651
1652         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1653         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1654           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1655           (oprio): set priority for '['
1656         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1657            and adb_24_bit
1658         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1659         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1660         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1661         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1662           added overlayable BIT_BANK area
1663         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1664           (summary2): explain 'T' in legenda
1665         * as/mcs51/lkrloc.c: replaced old K&R style,
1666           (relr): added R_BIT processing,
1667           (errmsg): added "Bit-addressable relocation error",
1668           (adb_bit): added for converting from byte- to bit-addressable space,
1669           (adb_24_bit): added for converting from byte- to bit-addressable space
1670         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1671            used in reentrant functions now even as return value
1672         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1673         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1674           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1675         * src/SDCCglobl.h: added indicator BitBankUsed
1676         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1677            the bit registers b0-b7
1678         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1679           (geniCodeCast): fixed bug 1263853,
1680           (geniCodeLogicAndOr): put result in bool or char,
1681           (geniCodeReceive): added parameter func for accessing the return type,
1682           (geniCodeFunctionBody): pass func to geniCodeReceive
1683         * src/SDCCmain.c: added indicator BitBankUsed
1684         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1685         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1686           (checkSClass): don't put automatic bool/bit on stack,
1687           (checkFunction): removed check on function cannot return bit
1688         * src/SDCCsymt.h: added newBoolLink prototype
1689         * src/mcs51/gen.c (rb1regs): added bit registers,
1690           (movc): created for assigning to carry,
1691           (pushReg, popReg): created for pushing registers,
1692           (sameRegs): check both AOP_REG and AOP_CRY types,
1693           (aopOp): handle bit registers,
1694           (aopPut): optimization no self-assign,
1695           (saveRegisters): push reg->base (bits) only once for bit registers,
1696            and use pushReg,
1697           (unsaveRegisters): pop reg->base only once and use popReg,
1698           (assignResultValue): added parameter func and return in carry for bits,
1699           (genIpush): optimization no reload in A if not changed,
1700           (genSend): bit parameters in reentrant functions are passed in bit
1701            registers by first assigning to bits in B, then save registers and
1702            copy B to bits,
1703           (genCall): handle returning in Carry properly, save it in F0 if needed,
1704           (genPcall): updated assignResultValue call, this is not safe yet for bit
1705            returning function !!!
1706           (genFunction): don't generate equ's for bit registers and use pushReg,
1707           (genEndFunction): take care of bit returning functions and use popReg,
1708           (genRet): return bit in Carry,
1709           (genIfx): optimize bit registers and other directly addressable bits,
1710           (genReceive): updated assignResultValue call
1711         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1712           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1713            registers when using stack-auto
1714         * src/mcs51/ralloc.c (_G): added allBitregs,
1715           (regs8051): added the bit registers,
1716           (createStackSpil): use macro IS_BIT,
1717           (getRegBit): added to allocate a bit register, else spill,
1718           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1719           (updateRegUsage): factored out to ease stepping while debugging,
1720           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1721            also allocate bit registers,
1722           (fillGaps): handle bit registers,
1723           (findAllBitregs): added to create bit vector with all bit registers,
1724           (mcs51_allBitregs): returns this bit vector,
1725           (mcs51_assignRegisters): when using stack-auto use bit registers for
1726            passing parameters and creating local variables
1727         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1728
1729 2005-08-22 Borut Razem <borut.razem AT siol.net>
1730
1731         * device/lib/Makefile.in: replaced find option -or with -o
1732           to make it run on solaris
1733
1734 2005-08-22 Raphael Neider <rneider AT web.de>
1735
1736         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1737           fixes #1265442 (crash on Solaris)
1738
1739 2005-08-20 Borut Razem <borut.razem AT siol.net>
1740
1741         * configure, configure.in: added tests for libsocket and libnsl libraries,
1742           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1743           from support/regression/Makefile.in
1744         * support/regression/Makefile.in: added
1745         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1746         * sim/ucsim/libtool: regenerated on sparc-solaris
1747         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1748           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1749           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1750           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1751           sparc-solaris, which doesn't use GNU ld linker
1752         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1753         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1754
1755 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1756
1757         * src/mcs51/peeph.def: updated comments
1758
1759 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1760
1761         * device/lib/_gptrget.c,
1762         * device/lib/_gptrput.c: slightly shorter
1763         * doc/sdccman.lyx: incremented version
1764         * src/mcs51/peeph.def: moved peephole comments to the line of first
1765           change to better keep line correlation, reanimated 186.e
1766         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1767
1768 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1769
1770         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1771           David Saxton with quotes around file name.
1772
1773 2005-08-15 Borut Razem <borut.razem AT siol.net>
1774
1775         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1776           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1777           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1778           make tests run on x86_64 platform
1779
1780 2005-08-13 Raphael Neider <rneider AT web.de>
1781
1782         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1783           as it might be executed DURING a build (parallel make is wonderful)
1784
1785 2005-08-13 Raphael Neider <rneider AT web.de>
1786
1787         * device/lib/Makefile.in (port-specific-objects-pic16):
1788           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1789         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1790           dependency
1791         * device/lib/pic16/Makefile.rules: build subdirs before creating
1792           the library, removed builddir rule, create $(builddir) early in
1793           recurse rule, use empty recurse rule for leaf directories
1794         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1795           mkdir errors (race condition), removed duplicate suffix "hex"
1796           from clean rules
1797         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1798         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1799           prevents mkdir -p from aborting on Alpha
1800
1801 2005-08-12 Raphael Neider <rneider AT web.de>
1802
1803         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1804           db-statements in order to allow for arrays of pointers in code
1805           sections to be placed without interspersed 0-padding, fixes
1806           bug #1256215
1807         * (emitStatistics): fixed division by zero for pic18f1220
1808         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1809           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1810         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1811         * (pic16_pCodeConstString): keep track of already emitted string
1812           literals to prevent "duplicate definitions of symbol _str_NR"
1813         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1814           debug message
1815         * device/lib/Makefile.in: ignore failing PIC16 library builds
1816         * device/lib/pic16/Makefile: do not build if gputils are missing
1817         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1818
1819 2005-08-10 Raphael Neider <rneider AT web.de>
1820
1821         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1822           my last commit)
1823
1824 2005-08-10 Raphael Neider <rneider AT web.de>
1825
1826         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1827           Rokas' patch to add the new fixed point type "__fixed16x16"
1828         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1829           functions for __fixed16x16 arithmetics
1830         * device/lib/pic16: reimplemented the build system to support
1831           a separate build directory, better handling of libio (create
1832           the library in a separate subdir for each architecture) and
1833           easier configuration (centralized in Makefile.common)
1834
1835 2005-08-07 Raphael Neider <rneider AT web.de>
1836
1837         * src/pic16/gen.c (genrshTwo): fixed sign extension
1838         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1839         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1840           added T0CONbits
1841         * device/include/pic16/pic18f4220.h: NEW, header for
1842           pic18f4220 and pic18f4320
1843         * device/include/pic16/pic18fregs.h: added new devices,
1844           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1845         * device/include/pic16/signal.h: resolved name clashes
1846           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1847           to also allow testing for interrupt enable bits, added
1848           comments on how to use the macros
1849         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1850         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1851           register definitions for the devices
1852         * device/lib/pic16/pics.all: added new devices
1853         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1854           allocated memory
1855         * device/lib/pic16/libc/stdlib/memfree: do not count
1856           the block header as free memory
1857         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1858           simplified and added missing end-of-blocklist-marker
1859           (reported by Peter Onion, fixes #1252814)
1860         * (_mergeHeapBlock): fixed loop condition
1861         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1862           len==0, restructured code
1863         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1864           up a bit, reduced bitfield accesses, prevent endless loops
1865           in case of heap corruption
1866         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1867           "unreferenced arguments/must return a value" warnings
1868         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1869           replaced BAUDREG with SPBRG
1870         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1871           device/lib/pic16/debug/gstack/gstack.c: replaced
1872           _naked, _asm, _endasm with __naked, __asm, __endasm
1873
1874 2005-08-05 Raphael Neider <rneider AT web.de>
1875
1876         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1877           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1878
1879 2005-08-05 Borut Razem <borut.razem AT siol.net>
1880
1881         * device/lib/Makefile.in: added missing ';'
1882         * configure: removed ^M characters
1883
1884 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1885
1886         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1887           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1888           License
1889
1890 2005-08-04 Borut Razem <borut.razem AT siol.net>
1891
1892         * configure.in: pic16 libraries build 2nd try - enable running
1893           configure in device/lib/pic16
1894         * configure: regenerated from configure.in
1895         * device/lib/Makefile.in: create $(PORT)/bin directory
1896
1897 2005-08-03 Raphael Neider <rneider AT web.de>
1898
1899         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1900           to get/set values via pointers
1901         * (genUnpackBits,genPackBits): changed detection of
1902           ptr->bitfield vs. sym.bitfield, fixed access via generic
1903           pointers, removed dead (wrong) code for multibyte bitfields
1904         * (genNearPointerGet, genGenPointerGet): removed useless code,
1905           fixed bitfield detection, fixes #1250594
1906         * (genNearPointerSet): removed useless code
1907         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1908           and introduced macro pic16_emitpcode that conditionally emits
1909           the origin of the following pCode (useful for debugging SDCC)
1910         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1911         * (createDefmap): fixed handling of LFSR for --optimize-df
1912
1913 2005-08-02 Borut Razem <borut.razem AT siol.net>
1914
1915         * device/lib/Makefile.in: pic16 libraries build enabled since
1916           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1917
1918 2005-08-02 Raphael Neider <rneider AT web.de>
1919
1920         * src/pic16/gen.c (genPackBits): removed deprecated warning
1921         * (genGenPointerSet): fixed bitfield detection
1922
1923 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1924
1925         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1926
1927 2005-07-31 Raphael Neider <rneider AT web.de>
1928
1929         * device/lib/pic16/libdev/pic18f458.c,
1930           device/include/pic16/pic18f458.h: added missing T0CONbits
1931
1932 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1933
1934         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1935
1936 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1937
1938         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1939
1940 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1941
1942         * device/include/mcs51/at89c51ed2.h: added.
1943
1944 2005-07-23 Raphael Neider <rneider AT web.de>
1945
1946         * src/pic/gen.h: added emitpcode macro for debugging
1947         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1948           and replace by macro adding debug information on demand
1949         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1950         * (gencjne): tried to fix; replaced with correct (slower) code
1951         * (gen{Unp,P}ackBits): fixed single bit access
1952         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1953         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1954           previous instruction
1955         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1956           register has to be handled with care (forbidding movement
1957           of assignments/uses, removing assignments completely, ...)
1958         * (pCodeOptime2pCodes): make use of regIsSpecial
1959         * added lots of debugging output (commented out)
1960         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1961           from being reused as result UNLESS it is known to work
1962
1963 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1964
1965         * support/Util/dbuf.h: include <stddef.h> for size_t
1966         * .version: changed to version 2.5.2
1967
1968 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1969
1970         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1971
1972 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1973
1974         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1975           (genModOneByte): removed needless psha/pula
1976
1977 2005-07-22 Raphael Neider <rneider AT web.de>
1978
1979         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1980           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1981         * src/pic/gen.c (resolveIfx): do not "invent" labels
1982         * (genSkipc): changed to positive logic
1983         * (genSkipCond): removed as no longer needed
1984         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1985           backport from PIC16
1986         * (genLeftShift): check operands are in different registers
1987         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1988           INCF does not update CARRY...
1989         * src/pic/main.c: fixed _linkCmd
1990         * src/pic/pcode.c (unlinkpCode): added inactive code
1991         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1992           alive (do not assign result and operand overlapping registers)
1993
1994 2005-07-22 Raphael Neider <rneider AT web.de>
1995
1996         * src/pic/device.c (dump_sfr): replaced register declaration with
1997           call to emitSymbolToFile() to avoid duplicate symbols
1998         * (assignRelocatableRegisters): do not declare external symbols
1999         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2000           right (take size of type, not etype)
2001         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2002         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2003         * (packRegsForAccUse): disabled assignment of WREG as
2004           the result reg to prevent occurence of just fixed #1235003,
2005           fixes #1242954
2006         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2007           symbols (avoids duplicate symbols in .asm file)
2008         * (pic14emitRegularMap): use emitSymbolToFile()
2009         * src/pic/gen.c (aopOp): fixed spillLocation handling
2010         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2011         * (genDataPointerSet): removed unneccessary variables/output
2012
2013 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2014
2015         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2016         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2017
2018 2005-07-21 Raphael Neider <rneider AT web.de>
2019
2020         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2021           architecture cannot handle them efficiently, fixes bug #1235003
2022         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2023           check for empty sets before using them (fixes bug #1232190)
2024
2025 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2026
2027         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2028           (lnksect2): generate warnings for memory overlap
2029         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2030           constseg to set the name of these segments so you can instruct the linker
2031           to place them in banks
2032         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2033         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2034           added code_seg and const_seg to options
2035         * src/SDCCglue.c (emitMaps): use options.const_seg,
2036           (createInterruptVect): put interrupt vectors in segment HOME,
2037           (glue): put HOME before static segment and put the main glue in HOME,
2038           (glue): use options.code_seg
2039         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2040         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2041           these segments so you can instruct the linker to place them in banks
2042           (linkEdit): use code_loc for HOME segment which should be the first
2043           segment in code memory now
2044         * src/SDCCmem.c: fixed more stuff like bug 1238386
2045         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2046           (changePointer): don't change function pointers to code pointers for
2047           banked functions,
2048           (compareType): added exceptional check for banked function pointers
2049         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2050         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2051           after static in code memory
2052         * src/mcs51/gen.c: added aopLiteralLong prototype,
2053           (aopForSym): use getSize for functions,
2054           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2055           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2056           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2057           the segment,
2058           (genPcall): use call for literal function pointers and generate banked
2059           calls over the one trampoline so there's only one place for the user to
2060           modify according to his/hers hardware,
2061           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2062           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2063         * src/mcs51/main.c: added keyword banked,
2064           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2065         * support/Util/SDCCerr.c,
2066         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2067           needed for passing the bank and address to the trampoline
2068         * device/lib/mcs51/crtbank.asm: added for bankswitching
2069         * device/lib/mcs51/Makefile: added crtbank
2070
2071 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2072
2073         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2074           for fields at offset 0 of a struct or union as reported
2075           on 2005-07-07 in the developer mailing list.
2076
2077 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2078
2079         * src/SDCCmem.c: fixed bug 1238386
2080
2081 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2082
2083         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2084           (patch #1144962), added peephole 300, enabled 259.x
2085         * doc/sdccman.lyx: removed screenshot and provided link instead
2086
2087 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2088
2089         * doc/sdccman.lyx: added section about debugging with ddd
2090         * doc/figures/ddd_example.eps: screenshot of debugging session
2091
2092 2005-07-04 Raphael Neider <rneider AT web.de>
2093
2094         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2095           like CODE pointers, fixes #1115683
2096         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2097           call, fixes bugs #1232211, #1228110,
2098           fixed wrong casts to pCodeFlow from pCodeInstructions
2099
2100 2005-07-04 Raphael Neider <rneider AT web.de>
2101
2102         * src/pic/gen.c (popGet): changed assert to allow for
2103           bit operands
2104         * (popGetAddr): changed signature to provide
2105           an additional index, patched all call sites
2106         * (genCmpEq): handle literal-like operands correctly
2107         * (genAddrOf): added sanity checks on __code/__data pointers
2108         * (genAssign): added handling of symbols from __code section
2109         * (gencjne): do not generate code for comparisons whose result
2110           is neither stored nor used, fixes bug #1171114
2111         * (AccLsh, AccRsh): operate on operand instead of WREG
2112         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2113           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2114           by known count
2115         * rewrote complete shift-by-literal logic, commented unused
2116           functions out
2117         * (genConstPointerGet): get multiple bytes (if result size > 1),
2118           fixed handling of non-immediate addresses
2119         * (genPointerGet): handle CODE pointers like CONST pointers
2120         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2121         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2122           operand is to be treated as a literal or not
2123         * (mov2w,genPcall,genCmpEq),
2124           src/pic/genarith.c: use aop_isLitLike() to decide between
2125           literal/register contents
2126         * (addSign): added missing offset
2127         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2128           only emit comment in debug-mode,
2129           use {aop,op}_isLitLike throughout the file
2130         * src/pic/glue.c: fix initializers for pointers (work in progress)
2131         * src/pic/pcode.c (get_op): honor index on _const symbols
2132         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2133         * (dumppBlock): added pCode size estimation
2134         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2135           check for IS_SYMOP before OP_SYMBOL'ing
2136         * fixed indentation, compacted switch-statements
2137         * (allocReg): find free register and allocate it instead of
2138           allocating new registers all the time
2139         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2140           registers as its operands (necessary only for multibyte GETs)
2141
2142 2005-07-01 Raphael Neider <rneider AT web.de>
2143
2144         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2145           debugging .asm-output macros FENTRY + FEXIT
2146         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2147           way... I wonder...
2148         * (emitpComment): NEW, printf to pCode
2149         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2150           offset handling
2151         * (popGetAddr): NEW, variant of popGet to access an immediates
2152           high(er) bytes instead of the n'th byte of memory they reference,
2153           replaced popGet with popGetAddr where neccessary
2154         * (genDataPointerGet): reactivated and fixed implementation
2155         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2156           accesses
2157         * (genDataPointerSet): fixed multibyte assignments
2158         * (genpic14Code): fixed --i-code-in-asm handling
2159         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2160         * (genPlus): fixed index-out-of-bounds error
2161         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2162         * src/pic/ralloc.c: added debugging output macro FENTRY2
2163         * (spillThis): fixed indentation, enbraced for-body for clarity
2164         * (rematStr): commented out as now unused
2165         * (regTypeNum): commented out special spill case (overwrites
2166           arbitrary values)
2167         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2168
2169 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2170
2171         * doc/sdccman.lyx: documented sfr16/sfr32,
2172           added example for using storage class with function pointers
2173         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2174
2175 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2176
2177         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2178         * device/lib/_itoa.c,
2179         * device/lib/_ltoa.c: optimized codesize
2180         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2181           but don't know how to suppress the double warning.
2182         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2183         * support/Util/SDCCerr.c,
2184         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2185
2186 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2187
2188         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2189           fixed old K&R prototypes
2190         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2191         * device/lib/_gptrget.c,
2192         * device/lib/_gptrgetc.c,
2193         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2194           also new versions for small generic pointers and banked generic pointers
2195         * src/port.h: added const_name
2196         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2197         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2198         * src/SDCCcse.c (findPrevIc): check all associative operators
2199         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2200         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2201         * src/SDCCmem.c: updated comments,
2202           set far-space to 0 for pdata, results in optimized code
2203         * src/SDCCmem.h: added macro CONST_NAME
2204         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2205           moving the info into the highest bits, see also gptrget/gptrput
2206         * src/src.dsp: added sdcc.ico to project files
2207         * src/avr/gen.c (genCast): fixed bug 0x%d
2208         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2209         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2210           relation between ptr_type and DCL_TYPE,
2211           (genCast): fixed bug 0x%d
2212         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2213           (CODE)" for const_name
2214         * src/hc08/gen.c (genCast): fixed bug 0x%d
2215         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2216           (hc08_port): added "CONST (CODE)" for const_name
2217         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2218           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2219           between ptr_type and DCL_TYPE,
2220           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2221           operand* and took AOP() inside function so sfr-ness can be checked,
2222           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2223           new prototype,
2224           (genFunction, genEndFunction): optimized stack setup,
2225           (genMinus): optimized for literals with ending zeroes (in bytes),
2226           (genCast): fixed bug 0x%d
2227         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2228           (mcs51_port): added "CONST (CODE)" for const_name
2229         * src/mcs51/peeph.def: made rule 226 more generic
2230         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2231         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2232         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2233         * src/z80/main.c (z80_port): added NULL for const_name,
2234           (gbz80_port): added NULL for const_name
2235         * support/regression/tests/bug663539.c,
2236         * support/regression/tests/sfr16.c: new tests
2237
2238 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2239
2240         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2241
2242 2005-06-24 Raphael Neider <rneider AT web.de>
2243
2244         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2245           corrected typos...
2246         * device/include/pic16/signal.h: added USBIF
2247           and SIG_USB
2248
2249 2005-06-24 Raphael Neider <rneider AT web.de>
2250
2251         * device/lib/pic16/libdev/pic18f2455.c,
2252           device/include/pic16/pic18f2455.h: NEW
2253         * device/include/pic16/pic18fregs.h,
2254           device/lib/pic16/pics.all,
2255           src/pic16/device.c: added 18f2455
2256         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2257           device/include/pic16/{pic18f[68][567].h,usart.h}:
2258           replaced MULTIPLE_USARTS define with more relaible
2259           compatibility sfrs (for USART access)
2260
2261 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2262
2263         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2264           and the output asm file line is printed on two lines.
2265
2266 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2267
2268         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2269           BGT, BLE, BHI, and BLS instructions
2270         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2271           genCmpEq): removed
2272         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2273           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2274           fixes bug #1216342
2275         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2276
2277 2005-06-15 Raphael Neider <rneider AT web.de>
2278
2279         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2280         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2281         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2282           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2283           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2284
2285 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2286
2287         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2288           Marcel Telka in bug #1215704
2289
2290 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2291
2292         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2293           located in shared memory bank.
2294
2295 2005-05-31 Raphael Neider <rneider AT web.de>
2296
2297         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2298           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2299           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2300
2301 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2302
2303         * device/lib/_strncpy.c: fixed the fix
2304
2305 2005-05-26 Raphael Neider <rneider AT web.de>
2306
2307         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2308           initializers with \0, bug #1208187
2309         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2310           intializers with \0, bug #1208187
2311
2312 2005-05-26 Raphael Neider <rneider AT web.de>
2313
2314         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2315           initializers with \0, bug #1208187
2316         * src/pic16/main.c (_process_pragma): added sanity checks
2317           for stack position and size, emit warnings when appropriate
2318
2319 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2320
2321         * device/lib/_strncpy.c: fixed not filling with \0
2322
2323 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2324
2325         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2326           createFunction),
2327         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2328           compound_statement),
2329         * src/SDCCsymt.h,
2330         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2331
2332 2005-05-24 Raphael Neider <rneider AT web.de>
2333
2334         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2335
2336 2005-05-24 Raphael Neider <rneider AT web.de>
2337
2338         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2339           TRISE definitions, closes bug #1162453
2340
2341 2005-05-22 Raphael Neider <rneider AT web.de>
2342
2343         * src/pic16/main.c (_process_pragma): check for missing
2344           arguments to pragmas code and udata
2345         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2346           consistency fixes to match other headers (thanks to Jim Paris)
2347         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2348
2349 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2350
2351         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2352
2353 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2354
2355         * support/regression/tests/bug1198642.c: new test
2356         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2357         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2358         * support/scripts/resource.h,
2359         * support/scripts/resource.rc,
2360         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2361         * support/scripts/sdcc.ico: added 32x32 icon
2362
2363 2005-05-18 Raphael Neider <rneider AT web.de>
2364
2365         * device/lib/pic16/libdev/pic18f*.c,
2366         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2367           keywords to "__sfr" and "__at (X)"
2368         * device/include/pic16/pic18fregs.h: added pic18f4520
2369         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2370           #1203088 (MPLAB compatibility)
2371
2372 2005-05-17 Raphael Neider <rneider AT web.de>
2373
2374         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2375         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2376         * device/lib/pic16/pics.all: added new devices
2377         * src/pic16/device.c: added support for pic18f4520
2378
2379 2005-05-16 Raphael Neider <rneider AT web.de>
2380         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2381         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2382         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2383           convenience function for bit access
2384
2385 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2386
2387         * device/lib/printf_large.c: fixed bug 1193299
2388         * support/regression/tests/bug1057979.c: added test %3.3s
2389
2390 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2391
2392         * device/include/mcs51/8051.h,
2393         * device/include/mcs51/8052.h: made parseable with lint
2394         * device/include/mcs51/lint.h: added include file for (sp)lint
2395         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2396         * doc/cdbfileformat.lyx,
2397         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2398
2399 2005-05-14 Raphael Neider <rneider AT web.de>
2400
2401         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2402         * device/lib/pic16/libc/stdlib/itoa.c (new)
2403         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2404         * device/lib/pic16/libio/Makefile: exclude subdir according to
2405           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2406         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2407         * src/pic16/gen.c (genFunction): prevent annoying warning
2408         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2409           nameclashes on BeOS
2410         * support/cpp2/cppmain.c (cpp_output_string): new
2411         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2412           fixes bug 1116802
2413
2414 2005-05-13 Borut Razem <borut.razem AT siol.net>
2415
2416         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2417
2418 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2419
2420         * .version: changed to version 2.5.1; back to bleeding edge development
2421
2422 2005-05-11 Borut Razem <borut.razem AT siol.net>
2423
2424         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2425           generate PDF version 1.3 documents
2426
2427 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2428
2429         * .version: changed to version 2.5.0
2430
2431 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2432
2433         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2434
2435 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2436
2437         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2438         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2439         well as many smaller updates.
2440         * .version: changed to version 2.5.0-pre1
2441
2442 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2443
2444         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2445
2446 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2447
2448         * support/regression/tests/bug1185672.c: added
2449         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2450           bug 1185672
2451         * src/mcs51/gen.c (genCall): added comments, made it look safer
2452         * src/mcs51/gen.c (genEndFunction): simplified
2453
2454 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2455
2456         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2457
2458 2005-04-14 Borut Razem <borut.razem AT siol.net>
2459
2460         * fixed bug 1045046 - SIGSEGV with really simple code?:
2461           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2462           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2463
2464 2005-04-14 Borut Razem <borut.razem AT siol.net>
2465
2466         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2467           src/pic16/device.h: temporarily disabled experimental #inline pragma
2468           for 2.5.0 release
2469
2470 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2471
2472         * device/include/z80/stdio.h,
2473         * device/include/z80/string.h: removed these highly incomplete files so
2474           SDCC can use the default ones in device/include/
2475
2476 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2477
2478         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2479         gcc warning.
2480         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2481         fix sdcpp warnings.
2482
2483 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2484
2485         * device/include/malloc.h: removed redundant __reentrant prototypes
2486         * device/lib/_mullong.c: added working xstack variant in asm (C version
2487           doesn't pass regression tests)
2488         * device/lib/bpx.c: used __data and made bpx char for mcs51
2489         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2490           (createFunction): fixed bug with xstackPtr
2491         * src/SDCCcse.c: corrected comments
2492         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2493           (killDeadCode, eBBlockFromiCode): removed unused code
2494         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2495           corrected comments
2496         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2497           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2498           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2499           (genModOneByte): fixed warning in MSVC
2500         * src/mcs51/main.c (): added comments
2501         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2502
2503 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2504
2505         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2506
2507 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2508
2509         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2510
2511 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2512
2513         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2514         characters arrays of larger size than the declared one.
2515
2516 2005-04-10 Borut Razem <borut.razem AT siol.net>
2517
2518         * src/pic/gen.c (genInline),
2519           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2520           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2521           (findNextInstruction), (findPrevInstruction),
2522           (findInstructionUsingLabel),
2523           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2524         * src/pic/pcode.c (findLabel): added missing '\n'
2525         * src/src.dsp: added SDCCdwarf2.c to the project
2526
2527 2005-04-09 Borut Razem <borut.razem AT siol.net>
2528
2529         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2530
2531 2005-04-08 Raphael Neider <rneider AT web.de>
2532
2533         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2534           into the chain after a given one) and mergeDefmapSymbols (combine
2535           defmap entries for each symbol per pcode)
2536         * (createDefmap): have defmap entries merged in the end
2537         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2538           a symbol before replacing one access type's symbol, merge symbols in
2539           the end (replacement symbol might already have an entry)
2540         * (assignValnums): keep reference to written WREG intact
2541
2542 2005-04-08 Raphael Neider <rneider AT web.de>
2543
2544         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2545           Alpha)
2546
2547 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2548
2549         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2550         bytes
2551
2552 2005-04-07 Raphael Neider <rneider AT web.de>
2553
2554         * device/include/pic16/usart.h: added compatibility defines for
2555           devices with more than one USART
2556         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2557
2558 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2559
2560         * device/lib/Makefile.in: updated for port specific include
2561
2562 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2563
2564         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2565
2566 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2567
2568         * device/include/8051.h,
2569         * device/include/8052.h,
2570         * device/include/at89S8252.h,
2571         * device/include/at89c55.h,
2572         * device/include/at89x051.h,
2573         * device/include/at89x51.h,
2574         * device/include/at89x52.h,
2575         * device/include/mcs51reg.h,
2576         * device/include/reg51.h,
2577         * device/include/reg764.h,
2578         * device/include/regc515c.h,
2579         * device/include/sab80515.h: (re)moved these 12 files
2580         * device/include/mcs51/8051.h,
2581         * device/include/mcs51/8052.h,
2582         * device/include/mcs51/at89S8252.h,
2583         * device/include/mcs51/at89c55.h,
2584         * device/include/mcs51/at89x051.h,
2585         * device/include/mcs51/at89x51.h,
2586         * device/include/mcs51/at89x52.h,
2587         * device/include/mcs51/mcs51reg.h,
2588         * device/include/mcs51/reg51.h,
2589         * device/include/mcs51/reg764.h,
2590         * device/include/mcs51/regc515c.h,
2591         * device/include/mcs51/sab80515.h: and added them here
2592
2593 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2594
2595         * device/include/stdarg.h: changed SDCC specific keywords to double
2596           underlined form.
2597         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2598           mcs51 and ds390.
2599         * device/include/hc08/mc68hc908gp32.h,
2600         * device/include/hc08/mc68hc908jb8.h,
2601         * device/include/hc08/mc68hc908jkjl.h,
2602         * device/include/hc08/mc68hc908qy.h: fixed comments
2603         * device/include/mcs51/README: updated
2604         * device/include/mcs51/c8051f120.h: added PINRSF
2605         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2606         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2607           amidst code. Also inline is not supported.
2608
2609 2005-04-06 Raphael Neider <rneider AT web.de>
2610
2611         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2612         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2613           callers stack/frame pointers
2614
2615 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2616
2617         * device/include/pic16/usart.h: added, missing in previous commit,
2618         * device/include/pic16/adc.h: fixed typo,
2619         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2620         commit,
2621         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2622         <p18fxxx.inc>
2623         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2624         uninitialized because a bug appears with gplink
2625         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2626         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2627         complains for unrecognised option
2628
2629 2005-04-05 Raphael Neider <rneider AT web.de>
2630
2631         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2632           structs as well (using memcpy)
2633         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2634           on ISRs (GOTO has no label)
2635         * src/pic16/device.h: added OF_OPTIMIZE_DF
2636         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2637           new data flow analysis/optimization
2638         * src/pic16/pcode.c: added (prototypes for and implementation of)
2639           dataflow analysis functions, fixed pCodeInstructions' inCond and
2640           outCond values, made RCALL a branch instruction
2641         * (pic16_unlinkpCode): keep C line if possible
2642         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2643           C line moved if possible
2644         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2645         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2646           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2647         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2648           new flow)
2649         * (pic16_getJumptabpCode): NEW, needed in...
2650         * (LinkFlow): fixed handling of jumptables, calls and conditional
2651           branches
2652         * (pic16_InsertCommentAfter): NEW
2653         * (pic16_pCodeReplace): made verbose and flow preserving
2654         * (AnalyzeFlow): added call to data flow analysis
2655         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2656         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2657         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2658
2659 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2660
2661         * src/SDCCast.c (decorateType): fixed bug #1105626
2662
2663 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2664
2665         * device/include/asm/pic16/features.h,
2666         * pic18f*.h headers,
2667         * device/include/pic16/adc.h,
2668         * device/include/pic16/delay.h,
2669         * device/include/pic16/i2c.h,
2670         * device/include/pic16/malloc.h,
2671         * device/include/pic16/stdio.h,
2672         * device/include/pic16/stdlib.h,
2673         * device/include/pic16/string.h,
2674         * device/lib/pic16/libc/stdio/printf_tiny.c,
2675         * device/lib/pic16/libc/stdio/printf_small.c,
2676         * device/lib/pic16/libc/stdio/strmgpsim.c,
2677         * device/lib/pic16/libc/stdio/strmmssp.c,
2678         * device/lib/pic16/libc/stdio/strmusart.c,
2679         * device/lib/pic16/libc/stdio/vfprintf.c,
2680         * device/lib/pic16/libc/stdlib/ltoa.c,
2681         * device/lib/pic16/libc/stdlib/putchar.c,
2682         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2683         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2684         * device/lib/pic16/libc/stdlib/memchrram.c,
2685         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2686         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2687         * device/lib/pic16/libio/adc/adcbusy.c,
2688         * device/lib/pic16/libio/adc/adcread.c,
2689         * device/lib/pic16/libio/adc/adcsetch.c,
2690         * device/lib/pic16/libio/usart/ubaud.c,
2691         * device/lib/pic16/libio/usart/ubusy.c,
2692         * device/lib/pic16/libio/usart/udrdy.c,
2693         * device/lib/pic16/libio/usart/uopen.c,
2694         * device/lib/pic16/libio/usart/uputc.c,
2695         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2696         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2697         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2698         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2699         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2700         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2701         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2702         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2703         specific keywords to double underlined form,
2704         * device/lib/pic16/libc/Makefile.rules,
2705         * device/lib/pic16/libsdcc/Makefile.rules,
2706         * device/lib/pic16/libm/Makefile,
2707         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2708         to compile with C standard set in Makefile.common
2709         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2710         rand.c and crc.c in compilation process,
2711         * device/lib/pic16/libsdcc/int/divuint.c,
2712         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2713         `c' from signed to unsigned,
2714         * device/lib/pic16/startup/crt0.c,
2715         * device/lib/pic16/startup/crt0i.c,
2716         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2717         keywords to double underlined form, bug fixes in _do_cinit function
2718         which prevented the correct initialization of the .idata segment,
2719         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2720         core to enter a infinite loop
2721         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2722
2723 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2724
2725         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2726
2727 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2728
2729         * device/include/Makefile.in: add support for hc08 subdirectory
2730         * device/include/hc08/: new subdirectory
2731         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2732         Lucas Loizaga, thanks!
2733         * device/include/hc08/mc68hc908qy.h,
2734         * device/include/hc08/mc68hc908gp32.h,
2735         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2736         their own directory. Changed internal macro names to use the compiler
2737         reserved namespace. Changed SDCC specific keywords to double
2738         underlined form.
2739         * device/include/math.h,
2740         * device/include/malloc.h,
2741         * device/include/stdarg.h,
2742         * device/include/stdbool.h
2743         * device/include/string.h,
2744         * device/include/tinibios.h,
2745         * device/include/ds400rom.h,
2746         * device/include/8051.h,
2747         * device/include/8052.h,
2748         * device/include/80c51xa.h,
2749         * device/include/at89c55.h,
2750         * device/include/at89S8252.h,
2751         * device/include/at89x51.h,
2752         * device/include/at89x52.h,
2753         * device/include/ds80c390.h,
2754         * device/include/reg764.h,
2755         * device/include/regc515c.h,
2756         * device/include/sab80515.h,
2757         * device/include/mcs51/c8051f000.h,
2758         * device/include/mcs51/c8051f018.h,
2759         * device/include/mcs51/c8051f020.h,
2760         * device/include/mcs51/c8051f040.h,
2761         * device/include/mcs51/c8051f060.h,
2762         * device/include/mcs51/c8051f120.h,
2763         * device/include/mcs51/c8051f300.h,
2764         * device/include/mcs51/c8051f310.h,
2765         * device/include/mcs51/c8051f320.h,
2766         * device/include/mcs51/c8051f330.h,
2767         * device/include/mcs51/c8051f350.h,
2768         * device/include/z180.h: Changed SDCC specific keywords to double
2769         underlined form.
2770
2771 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2772
2773         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2774         18F4455,
2775         * (pic16_assignConfigWordValue): disable testing of configuration
2776         register value with config mask,
2777         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2778         function with port->fun_prefix,
2779         * (genFunction): when generating a naked interrupt function never
2780         create an absolute segment placed in interrupt vector address, place
2781         the actual interrupt function at IVA instead, when an interrupt
2782         function is generated with unspecified interrupt then do not create
2783         the absolute section,
2784         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2785         code for generating a call to generic pointer get/put function with
2786         a call to function pic16_callGenericPointer(),
2787         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2788         the call to the generic pointer get/put functions with prefixing the
2789         function name with port->fun_prefix,
2790         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2791         * src/pic16/main.c (_process_pragma): prefix function with
2792         port->fun_prefix,
2793         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2794         calling assembler, old 18Fxxxx macro is deprecated,
2795         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2796         PC_ASMDIR in while condition,
2797         * (findInstruction): add PC_ASMDIR in while condition,
2798         * (buildCallTree): prefix main with port->fun_prefix,
2799         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2800         identifier for variable with banked access in instructions BTFSS,
2801         BTFSC, BCF, BSF, BTG
2802         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2803         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2804         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2805         perform optimization when enviroment variable NO_REG_OPT is set,
2806         * (insideLRBlock): NEW, return 1 if register is inside an
2807         INF_LOCALREGS block,
2808         * (RemoveRegFromLRBlock): remove a register that is completely
2809         eliminated by register optimization, but it is still left in local
2810         register store/restore in/from stack block,
2811         * (Remove2pcodes): after removing register, check to see if it
2812         should be removed from local register store/restore in/from stack
2813         block,
2814         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2815         DUMMY_READ_VOLATILE,
2816
2817         * device/include/pic16/adc.h: minor prototype modifications and
2818         update,
2819         * device/include/pic16/malloc.h: added GPL notice various
2820         modifications,
2821         * device/include/pic16/stdint.h: NEW, standard header for ints
2822         * device/include/pic16/delay.h: NEW, header for delay functions,
2823         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2824         delay1mtcy,
2825         * device/include/pic16/signal.h: NEW, header providing helper macros
2826         for implementing signal handlers,
2827         * device/include/pic16/stdio.h: added prototypes for functions,
2828         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2829         prototypes for stdin and stdout, added macro PUTCHAR to
2830         automatically implement putchar function prototype,
2831         * device/include/pic16/usart.h: modified and updated USART library,
2832         * device/lib/pic16/libio/adc/,
2833         * device/lib/pic16/libio/i2c: some modifications to improve library
2834         performance,
2835         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2836         family of functions,
2837         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2838         family of functions and other sources,
2839         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2840         of the PIC18Fxx[28] devices,
2841         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2842         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2843         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2844         _do_cinit function, because the previous failed when local variables
2845         where not placed in the same memory bank,
2846         * device/lib/pic16/libsdcc/char/: various modifications to improve
2847         library performance,
2848         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2849         information on the new functions of the c library and more...
2850
2851 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2852
2853         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2854
2855 2005-03-26 Raphael Neider <rneider AT web.de>
2856
2857         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2858           if condition == CARRY)
2859         * (genCmp): adapted to new genSkipc semantics
2860         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2861           on rIfx (genCmp was broken)
2862
2863 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2864
2865         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2866         * src/z80/main.c (_keywords[]),
2867         * src/SDCCglobal.h (struct options),
2868         * src/SDCC.y,
2869         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2870         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2871         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2872         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2873         always available in leading double underscore form. The C99 support is
2874         mostly missing, but it's a start.
2875         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2876         reserved identifier "__data".
2877
2878 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2879
2880         * src/mcs51/peeph.def: fixed bug 1170013
2881
2882 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2883
2884         * device/include/mcs51reg.h: fixed bug 842007
2885
2886 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2887
2888         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2889         last time.
2890
2891 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2892
2893         * src/port.h (struct PORT),
2894         * src/avr/ralloc.c (avr_assignRegisters),
2895         * src/avr/main.c,
2896         * src/ds390/ralloc.c (ds390_assignRegisters),
2897         * src/ds390/main.c,
2898         * src/hc08/ralloc.c (hc08_assignRegisters),
2899         * src/hc08/main.c,
2900         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2901         * src/mcs51/main.c,
2902         * src/pic/ralloc.c (pic14_assignRegisters),
2903         * src/pic/main.c,
2904         * src/pic16/ralloc.c (pic16_assignRegisters),
2905         * src/pic16/main.c,
2906         * src/xa51/ralloc.c (xa51_assignRegisters),
2907         * src/xa51/main.c,
2908         * src/z80/ralloc.c (z80_assignRegisters),
2909         * src/z80/ralloc.h,
2910         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2911         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2912         * src/SDCCcse.h,
2913         * src/SDCCdflow.c (computeDataFlow),
2914         * src/SDCCdflow.h,
2915         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2916         * src/SDCCloop.h,
2917         * src/SDCCcflow.c (*),
2918         * src/SDCCcflow.h,
2919         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2920         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2921         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2922         immedDom() returning wrong block; probably fixes bug #1160833)
2923
2924 2005-03-20 Borut Razem <borut.razem AT siol.net>
2925
2926         * support/scripts/inc2h.pl: WIN32 port
2927
2928 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2929
2930         * device/lib/makefile.in: added abs.c and labs.c
2931
2932 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2933
2934         * device/include/stdint.h: added
2935         * device/lib/abs.c: added
2936         * device/lib/labs.c: added
2937         * device/include/stdlib.h: added abs() and labs() prototypes
2938         * device/lib/libsdcc.lib: added abs and labs
2939         * device/include/float.h,
2940         * device/lib/_fsmul.c,
2941         * device/lib/printf_fast.c,
2942         * device/lib/printf_tiny.c: updated comments
2943
2944 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2945
2946         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2947         bug #1164313
2948
2949 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2950
2951         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2952         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2953
2954 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2955
2956         * device/lib/printf_large.c: removed inline assembly for portability and
2957           readability. Use printf_fast if speed or size are more important.
2958         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2959         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2960
2961 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2962
2963         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2964         prevent compiler warning
2965
2966 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2967
2968         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2969         moved to level 0 and declared as static. Also they are explicit
2970         placed in access bank. This was necessery because some times they
2971         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2972         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2973         optimizations. Currently only compare to unsigned char is implemented,
2974         * src/pic16/gen.c: added fReturnIdx array,
2975         * (struct resolvedIfx) is moved to gen.h and made public,
2976         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2977         * (aopForSym): added an optimization to directly store in stack of
2978         the operand of a SEND iCode,
2979         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2980         but as registers instead (AOP_REG) using the fReturnIdx array,
2981         * (pic16_freeAsmop): remove the freed register from the
2982         _G.sregsAlloc field,
2983         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2984         a compare of 'WREG',
2985         * (pic16_popGetTempRegCond): changed function prototype, now
2986         function takes also a bitVector argument v which holds the current
2987         set of registers that are allocated for stack access by aopForSym,
2988         registers allocated in aopForSym for accessing stack symbols are not
2989         any more part of the functions usedRegs field,
2990         * (genCall): some times aopOp is called for a stack variable to be
2991         send, aopForSym might perform the push, if this is true make sure
2992         that genCall doesn't push the variable twice by testing _G.resDirect,
2993         * (genFunction): changed testing for unspecified interrupt number
2994         from 256 to INTNO_UNSPEC,
2995         * modified selection scheme of frame pointer generation. Previously
2996         if function did use local registers a frame pointer was generated,
2997         now a frame pointer is generated only if function has arguments
2998         (that need PLUSW2 register access), or has stack arguments, or the
2999         compiler is not instructed to omit the frame pointer,
3000         * (genEndFunction): before restoring local registers that were saved
3001         in the function preamble, also restore the registers that *might*
3002         have been allocated for stack access,
3003         * (genRet): removed some old comments,
3004         * (genCmp, the active (RN's) version): added a call to the
3005         pic16_genCmp_special function to perform the compare with a more
3006         robust and optimized way,
3007         * (genInline): a feature has been added in inline code generation,
3008         which allows a wildcard variable substitution when writing inline
3009         assembly. Code is incomplete and experimental therefore undocumented,
3010         * (genCast): changed order of aopOp for result and right to allow
3011         aopForSym to directly load the result if possible,
3012         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3013         perform an optimized compare on some selected special occasions,
3014         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3015         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3016         generate an IVT any more,
3017         * src/pic16/main.c (pic16_optionsTable): added command line option
3018         --optimize-cmp,
3019         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3020         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3021         macros,
3022         * src/pic16/NOTES: Raphael Neider added in list of active developers
3023         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3024         jumptable_end to prevent bug #,
3025         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3026         inCond and outCond fields,
3027         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3028         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3029         turn off register spilling,
3030         * (packRegsForOneUse): synced with other ports' versions although it
3031         is not used currently,
3032         * (pic16_packRegisters): added an optimization while reading
3033         structure bitfields, some registers may be saved (malloc code is
3034         decreased by 80 bytes)
3035
3036 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3037
3038         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3039         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3040         this can be optimized more?
3041
3042 2005-03-10 Raphael Neider <rneider AT web.de>
3043
3044         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3045           genNearPointerGet): (hopefully) fixed access to bitfields via
3046           pointers (p->bitN = x; and x = p->bitN; failed)
3047
3048 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3049
3050         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3051
3052 2005-03-09 Raphael Neider <rneider AT web.de>
3053
3054         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3055
3056 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3057
3058         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3059         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3060           (regTypeNum): set REG_BIT type if necessary
3061         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3062         * support/regression/tests/critical.c: check bug 1144613
3063
3064 2005-03-02 Raphael Neider <rneider AT web.de>
3065
3066         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3067
3068 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3069
3070         * src/avr/ralloc.c (serialRegAssign),
3071         * src/ds390/ralloc.c (serialRegAssign),
3072         * src/hc08/ralloc.c (serialRegAssign),
3073         * src/mcs51/ralloc.c (serialRegAssign),
3074         * src/pic/ralloc.c (serialRegAssign),
3075         * src/pic16/ralloc.c (serialRegAssign),
3076         * src/xa51/ralloc.c (serialRegAssign),
3077         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3078
3079 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3080
3081         * src/SDCCast.c (decorateType): fixed bug 1124787
3082
3083 2005-02-20 Hubert Sack <sack AT digiplan.de>
3084         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3085
3086         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3087         patch #1121755
3088
3089 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3090
3091         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3092         to keep the correct label reference count when adding/removing references
3093         to labels. A peephole file using this is appended to patch #1144962.
3094
3095 2005-02-14 Raphael Neider <rneider AT web.de>
3096
3097         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3098         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3099         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3100           retrievals of result operand's value on assignment
3101
3102 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3103
3104         * device/include/pic16/string.h: modified prototype for memccpy()
3105         to memccpy(void *, void *, char, size_t)
3106         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3107         check whether to omit frame pointer or not,
3108         * (genInline): convert all occurences of "\n" to LF in inline
3109         assembler blocks, this helps formatting the inline text,
3110         * (pic16_loadFSR0): modified prototype,
3111         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3112         removed some 8051 legacy code,
3113         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3114         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3115         before allocating temporary registers in functions,
3116
3117 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3118
3119         * support/regression/tests/bitvars.c: corrected the "fix"
3120
3121 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3122
3123         * support/regression/tests/bitvars.c,
3124         * support/regression/tests/bitwise.c,
3125         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3126
3127 2005-02-10 Raphael Neider <rneider AT web.de>
3128
3129         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3130           different size for Alpha
3131         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3132
3133 2005-02-09 Raphael Neider <rneider AT web.de>
3134
3135         * src/SDCC.lex(doPragma) : save and restore warning options as well
3136           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3137         * have #pragma less_pedantic set the errorlevel to WARNING
3138           (fixes #1117001)
3139         * (cloneOptimize) : fixed wrong malloc's size
3140         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3141           facilitate correct handling of #pragma (save|restore)
3142
3143 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3144
3145         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3146
3147 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3148
3149         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3150
3151 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3152
3153         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3154
3155 2005-02-02 Raphael Neider <rneider AT web.de>
3156
3157         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3158         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3159         * (pic16_storeForReturn): fixed to allow returning function pointers
3160         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3161         * device/include/pic16/{stddef.h,stdbool.h}: added
3162
3163 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3164
3165         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3166
3167 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3168
3169         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3170         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3171          appeared to be required
3172
3173 2005-01-31 Borut Razem <borut.razem AT siol.net>
3174
3175         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3176           include/mcs51 and include/z80 directories to the package
3177
3178 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3179
3180         * src/hc08/gen.c (genFunction): fixed bug #1112752
3181
3182 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3183
3184         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3185
3186 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3187
3188         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3189
3190 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3191
3192         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3193
3194 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3195
3196         * device/include/c8051fxxx.h: removed these 6 files
3197         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3198
3199 2005-01-26 Raphael Neider <rneider AT web.de>
3200
3201         * src/pic16/gen.c (genAssign): fixed assignment from longs
3202           in codespace (were cut to three bytes)
3203         * (genDummyRead): implemented (except for CODESPACE...),
3204           fixed bug #1108575
3205         * src/pic16/glue.c (emitStatistics): beautified
3206         * device/lib/pic16/libm/Makefile: added include path
3207
3208 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3209
3210         * src/z80/gen.c (aopPut): fixed bug #1103902
3211
3212 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3213
3214         * device/lib/expf.c: fixed bug #1095792
3215
3216 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3217
3218         * device/lib/pic16/libm: added Math library sources
3219
3220 2005-01-24 Raphael Neider <rneider AT web.de>
3221
3222         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3223           to enable upcast to pCodeOpReg2 (there is no type tag to
3224           differenciate the two and pic16_popGet2p cast into PCOR2)
3225         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3226           (sizeof(sectNames) changed to sizeof(sectName))
3227           Both patches fix segfaults under MinGW.
3228
3229 2005-01-23 Raphael Neider <rneider AT web.de>
3230
3231         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3232           Safe_[mc]?alloc()'ed variables
3233         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3234           of (byte sized) temporaries (assign them to WREG for now)
3235         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3236           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3237           this might fix SIGSEGVs on MinGW...
3238         * src/SDCCopt.c (killDeadCode): restored original behaviour
3239           (volatile operands might get thrown away though)
3240
3241 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3242
3243         * src/pic16/gen.c: fixed bug #1106975,
3244         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3245         pointer update, INTCON is saved, global interrupts are disabled and
3246         restored after updateing TOS.
3247         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3248         * added function attribute 'shadowregs' to take advantage of shadow
3249         registers,
3250         * added function attribute 'wparam' as an alternative to the wparam
3251         pragma,
3252         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3253         user declares a non-ISR function as 'shadowregs',
3254         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3255
3256 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3257
3258         * .version: bumped version number to 2.4.8
3259         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3260         pic16 port,
3261         * device/lib/pic16/libio/i2c/: I2C module support library,
3262         * device/include/pic16/i2c.h: I2C support library header,
3263         * device/lib/pic16/libc/stdio/: standard IO support sources,
3264         * (printf_small.c): printf_small() source, supports float print,
3265         * (printf_tiny.c): printf_tiny() source, does not support floats,
3266         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3267         enable global optimizations for entire library source, other
3268         Makefiles in the source tree are also modified to reflect this,
3269         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3270         function,
3271         * doc/sdccman.lyx: updated to reflect new changes,
3272         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3273         sym->onStack if-case,
3274         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3275         sbit, idata, _idata, xdata, _xdata,
3276         * added pragma library, to link an external library, (see doc),
3277         * removed command line options, --pomit-config-words, --pomit-ivt,
3278         --pleave-reset-vector,
3279         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3280         when calling assembler to reflect memory model used, also define
3281         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3282         reflect stack model used,
3283         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3284         on stack return NULL,
3285
3286 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3287
3288         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3289           of the operands is volatile. Fixes #1020220
3290
3291 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3292
3293         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3294         * (OptimizeRegUsage): make sure that there is really no other flow where
3295           the first pCode is used
3296
3297 2005-01-22 Raphael Neider <rneider AT web.de>
3298
3299         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3300           to fix #1106967 (pCode->seq are not set up correctly)
3301
3302 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3303
3304         * src/SDCCglue.c (glue): make sure code area is declared before the
3305         static initialization area.
3306
3307 2005-01-21 Raphael Neider <rneider AT web.de>
3308
3309         * device/lib/Makefile.in: fixed test for pic16 install dir
3310         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3311           optimizations
3312         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3313           added --optimize-goto compiler switch and pragma wparam documentation
3314         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3315         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3316           and PRODH closing bug #1071770 (peephole optimizer)
3317
3318 2005-01-19 Raphael Neider <rneider AT web.de>
3319
3320         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3321           cmdLine buffers (used when calling sdcpp...) are large enough
3322           (MAX_PATH=256 truncates arguments leading to system halts when
3323           used in MinGW...)
3324         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3325         * (genUminus): rewritten to for efficiency
3326         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3327           used uninitialized in some cases)
3328         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3329           copy the third byte from the int -- now assumes 0x80 (data memory)
3330         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3331           operands (genAddLit expects the iCode's operands to swapped as
3332           well), fixed leftover bytes (crashed for short left operands)
3333         * (pic16_genMinusDec): performance improvements, removed false
3334           PIC14 emitSKPNCs
3335         * (pic16_genMinus): fixed to cope with differently sized operands
3336         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3337           for --obanksel > 1
3338         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3339         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3340           new banksel optimization
3341         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3342           analysis for temporary registers (segfaults...)
3343         * src/pic16/peeph.def: added rule
3344
3345 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3346
3347         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3348         which converts a float number to its ASCII representation
3349         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3350         functions to convert the fractional and integer part of a float to ASCII,
3351         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3352         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3353         ram
3354         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3355         _STATMEM macros,
3356         * device/include/pic16/adc.h: added GPL info,
3357         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3358         a pCodeOp as tested operand,
3359         * (genNearPointerGet): optimized bit testing, does not use
3360         intermediate register for bit value, test directly instead with
3361         BTFSS, BTFSC, works only for single bits,
3362         * (genpic16Code): dump the name of the iCode in the asm,
3363         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3364         renamed to pic16_decodeOp,
3365         * (serialRegAssign): do not allocate a temporary register for iCode
3366         sequences that test a single bit for 1/0
3367
3368 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3369
3370         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3371         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3372         access stack and frame pointers. They are initially assigned to
3373         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3374         accessing SFRs. Updated all occurences of modification of stack or
3375         frame pointer in gen.c and pcode.c,
3376         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3377         assigning of a literal value to pointers,
3378         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3379         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3380         selected
3381
3382 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3383
3384         * doc/sdccman.lyx: update documentation about stack pragma, added
3385         some info for stack memory models
3386
3387 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3388
3389         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3390
3391 2005-01-08 Raphael Neider <rneider AT web.de>
3392
3393         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3394           udata sections to fix bug #1097823
3395
3396 2005-01-05 Raphael Neider <rneider AT web.de>
3397
3398         * src/pic16/gen.c (genGenericShift): added handling of differently
3399           sized left operand and result
3400
3401 2005-01-04 Raphael Neider <rneider AT web.de>
3402
3403         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3404         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3405           to hold the condition bit)
3406         * added new version of genCmp (old code available via #define)
3407         * added new version of genShiftLeft/genShiftRight in a generic
3408           way, now supports shifting by negative values
3409         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3410           shiftCount (expected by genGenericShift)
3411         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3412         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3413           dump
3414         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3415           is an invalid literal too...)
3416
3417 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3418
3419         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3420         from Raphael Neider,
3421         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3422         for 8-bit literals. This fixes some literal operands which are sign
3423         extended to 16-bits ints when instruction needs only 8-bits.
3424
3425 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3426
3427         * device/lib/logf.c: added mcs51 assembly version
3428         * device/lib/expf.c: added mcs51 assembly version
3429         * device/lib/_logexpf.c: new shared asm code for expf and logf
3430         * device/include/math.h: add defines for assembly math library
3431         * device/lib/Makefile.in: build new _logexpf.c
3432         * device/lib/libfloat.lib: use new _logexpf.c
3433
3434 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3435
3436         * src/pic/device.c
3437         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3438           device types which have less than 0x7f registers.
3439
3440 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3441
3442         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3443
3444 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3445
3446         * device/lib/printf_fast.c: only build on supported arch.
3447         * device/lib/printf_tiny.c: only build on supported arch.
3448         * device/lib/printf_fast_f.c: only build if asm float lib
3449         * device/lib/_fsget1arg.c: only build if asm float lib
3450         * device/lib/_fsget2args.c: only build if asm float lib
3451         * device/lib/_fsnormalize.c: only build if asm float lib
3452         * device/lib/_fsreturnval.c: only build if asm float lib
3453         * device/lib/_fsrshift.c: only build if asm float lib
3454         * device/lib/_fsswapargs.c: only build if asm float lib
3455         * device/include/stdio.h: don't provide print_fast,
3456           print_fast_f, print_tiny prototypes if --xstack used
3457
3458 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3459
3460         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3461         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3462           to the SOURCES
3463
3464 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3465
3466         * device/lib/printf_fast_f.c: same as printf_fast, but
3467           with floating point enabled
3468         * device/lib/printf_fast.c: minor tweaks
3469         * device/include/stdio.h: add printf_fast_f
3470
3471 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3472
3473         * src/SDCCmain.c: make --float-reent default for mcs51
3474         * device/lib/_fsadd.c: added mcs51 assembly version
3475         * device/lib/_fssub.c: added mcs51 assembly version
3476         * device/lib/_fsmul.c: added mcs51 assembly version
3477         * device/lib/_fsdiv.c: added mcs51 assembly version
3478         * device/lib/_fseq.c: added mcs51 assembly version
3479         * device/lib/_fsneq.c: added mcs51 assembly version
3480         * device/lib/_fsgt.c: added mcs51 assembly version
3481         * device/lib/_fslt.c: added mcs51 assembly version
3482         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3483         * device/lib/Makefile.in: add _fscmp to build
3484         * device/lib/libfloat.lib: add _fscmp to build
3485
3486 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3487
3488         * device/lib/_fs2slong.c: added mcs51 assembly version
3489         * device/lib/_fs2sint.c: added mcs51 assembly version
3490         * device/lib/_fs2schar.c: added mcs51 assembly version
3491         * device/lib/_fs2ulong.c: added mcs51 assembly version
3492         * device/lib/_fs2uint.c: added mcs51 assembly version
3493         * device/lib/_fs2uchar.c: added mcs51 assembly version
3494         * device/lib/_slong2fs.c: added mcs51 assembly version
3495         * device/lib/_sint2fs.c: added mcs51 assembly version
3496         * device/lib/_schar2fs.c: added mcs51 assembly version
3497         * device/lib/_ulong2fs.c: added mcs51 assembly version
3498         * device/lib/_uint2fs.c: added mcs51 assembly version
3499         * device/lib/_uchar2fs.c: added mcs51 assembly version
3500         * device/include/float.h: added #define to select asm vs c
3501
3502 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3503
3504         * device/lib/printf_fast.c: improvements to float output
3505         * device/include/float.h: add defines for assembly float library
3506         * device/lib/_fsget1arg.c: receive 1 float arg
3507         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3508         * device/lib/_fsnormalize.c: normalize a float
3509         * device/lib/_fsreturnval.c: return float, various helper routines
3510         * device/lib/_fsrshift.c: right shift a float's mantissa
3511         * device/lib/_fsswapargs.c: swap 2 floats
3512         * device/lib/Makefile.in: build these 6 new files for mcs51
3513         * device/lib/libfloat.lib: add these 6 files to the library
3514
3515 2004-12-26 Borut Razem <borut.razem AT siol.net>
3516
3517         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3518           built by gcc 3.4.2
3519
3520 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3521
3522         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3523           and fully reentrant and register bank neutral.
3524         * device/lib/printf_fast.c: added float (not enabled by default),
3525           added compact/slower integer (also not enabled by default),
3526           improved size/speed of fast integer code, other minor changes
3527         * device/include/stdio.h, device/lib/Makefile.in,
3528           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3529
3530 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3531
3532         * src/pic16/pcode.c: declaring variables other than at the start of a
3533           block is not supported in C by VC6.
3534
3535 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3536
3537         * applied a previous patch from Raphael Neider that wasn't included
3538         in the previous commits, which fixes infinite loops within jumptable
3539         improvements,
3540         * made some fixes that previous patches introduced
3541
3542 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3543
3544         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3545         that fixes an issue with AOP_PCODE asmop's offset,
3546         * (pic16_popCopyReg): update instance field too,
3547         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3548         function of pic port,
3549         * (genCmp, genAnd, genAssign),
3550         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3551
3552 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3553
3554         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3555         variables initial values to idata section,
3556         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3557         variables in some functions. This utilizes parmBytes field of iCode
3558         structure to hold the offset of the variable in stack. (might be
3559         able to use the stack field too?)
3560         * applied patch from Raphael Neider # ### , # ###
3561         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3562         variable initial values in idata section,
3563         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3564         for static variables with initial value
3565         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3566         applied fix in while loop from Raphael Neider.
3567
3568 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3569
3570         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3571         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3572         * src/ds390/ralloc.c (serialRegAssign): spill bits
3573         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3574         * support/Util/SDCCerr.c,
3575         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3576         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3577         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3578
3579 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3580
3581         * device/include/sdcc-lib.h: inserted LGPL, added includes
3582           asm/ds390/features.h and asm/mcs51/features.h
3583         * device/include/asm/default/features.h,
3584         * device/include/asm/gbz80/features.h,
3585         * device/include/asm/z80/features.h: added empty _AUTOMEM
3586           and _STATMEM
3587         * device/include/asm/ds390/features.h,
3588         * device/include/asm/mcs51/features.h: added files with defines for
3589           _AUTOMEM and _STATMEM indicating automatic and static storage class
3590         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3591         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3592         * src/SDCCicode.c (geniCodeCast),
3593         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3594         * src/SDCCloop.c (loopInduction): removed unused variable lr
3595         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3596           to convertToFcall to include char modulo (RFE 1065037), added check
3597           if left operand is unsigned and use abs of literal value
3598         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3599           as it doesn't work after conversion from peephole.def to peephole.rul
3600         * src/mcs51/gen.c (toBoolean): added check for size,
3601           (genModOneByte): optimized code for signed char modulo a literal
3602           power of 2 (thanks to Hubert Sack),
3603           (genRRC): removed unnecessary "clr c",
3604           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3605         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3606           jump optimization,
3607           swapped rules 256.c and 256.d,
3608           extended 256.d by using new multiple checks (thanks Erik),
3609           added rules 256.e and 256.f,
3610           updated rule 261.a and 261.b to new generated code
3611         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3612
3613 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3614
3615         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3616           induction related bugs, including first part of bug #1074377
3617
3618 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3619
3620         * applied patch from bug-report #1076292,
3621         * applied patches for genAnd and Goto-optimizations for Raphael
3622         Neider,
3623         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3624         dump a less iCode information,
3625         * src/pic16/device.h (pic16_options_t): added field debgen,
3626         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3627         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3628         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3629         puclic,
3630         * (various functions): added macros FENTRY and FENTRY2 to functions,
3631         to emit function prologue,
3632         * (various functions): fixed indentation,
3633         * (genNearPointerGet): fixed loading of FSR0,
3634         * (genPackBits): applied patch from Raphael Neider to fix updating
3635         of FSR0 and touching only the modified bits,
3636         * src/pic16/genarith.c (various functions): added macros FENTRY to
3637         emit function prologue in comments,
3638         * src/pic16/pcode.h: added functions debugf2, debugf3,
3639         * src/pic16/ralloc.c: partial fix for packForPush caused
3640         segmentation fault,
3641
3642 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3643
3644         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3645           <stsp AT users.sourceforge.net> with reversed byte order
3646         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3647
3648 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3649
3650         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3651           bug #1074377
3652         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3653         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3654
3655 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3656
3657         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3658
3659 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3660
3661         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3662           conditions,
3663           (setFromConditionArgs): friendly operand parser for peephole rules,
3664           (operandBaseName, operandsNotRelated): new peephole condition
3665           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3666           architecture specific register naming into account, handles n-way
3667           comparisons, and supports quoted literals
3668         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3669
3670 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3671
3672         * src/mcs51/peeph.def: fixed bug #1076940
3673
3674 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3675
3676         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3677
3678 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3679
3680         Adding support for replacing ljmps with sjmps in jumptables
3681         generated for switch statements. For now you need to set the
3682         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3683         Now 4 algorithms for mcs51 jumptable generation are used:
3684         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3685         addresses loaded pc-relative for up to 112 cases and stack-pushing
3686         target addresses loaded with offset from dptr for up to 256 cases.
3687
3688         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3689         * src/mcs51/main.c: adapted constants for switch table generation
3690         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3691
3692 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3693
3694         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3695         * support/regression/tests/bug1057979.c: added test for bug 1073386
3696
3697 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3698
3699         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3700         compilers
3701
3702 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3703
3704         * src/pic16/device.h,
3705         * src/pic16/genarith.c,
3706         * src/pic16/glue.c,
3707         * src/pic16/main.c,
3708         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3709
3710 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3711
3712         Large cummulative patch for pic16 port.
3713         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3714         to call when a stack overflow occurs,
3715         * (malloc.h): added CVS Id tag,
3716         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3717         variable,
3718         * added libc directory. The current version of LibC contains string
3719         functions, ctype functions and macros and some functions of the
3720         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3721         be extensively tested in the future. Standard disclaimer here.
3722         Library is not automatically build yet. But one can build it by
3723         invoking 'make' inside the libc directory.
3724         * added ADC library under libio. Preliminary version yet.
3725
3726         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3727         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3728         aopForRemat() now and not by pic16_aopOp(),
3729         * (pic16_popGetTempReg): removed warning messgae when allocating
3730         temporary registers, its a buggy feature and will be removed,
3731         * (pic16_popGet): set register instance field in AOP_CRY,
3732         * (pic16_outBitC): fixed for results in size greater than 1,
3733         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3734         * (pic16_storeForReturn): optimized return of 0,
3735         * (genCmp): experimental code for new genCmp which uses PIC18's
3736         special compare&skip instructions. Initial tests fail some times
3737         with variables grater than 1 byte in size, so new code is disabled,
3738         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3739         a single bit,
3740         * (genCast): began a fix to optimize the casting of a bit to another
3741         bit, now assigning a bitfield to another bitfield will fail, sorry,
3742         * src/pic16/main.c: disabled the use of lr-support feature,
3743         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3744         * added some function prototypes, added function _debugf prototype,
3745         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3746         bits with offset (case PO_GPR_BIT),
3747         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3748         command line,
3749         * (isBankInstruction): modified to return 0 for no banking instruction,
3750         and 1 for banking instruction,
3751         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3752         caused stop processing pCodes after a inline assembly block,
3753         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3754         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3755         registers when it shouldn't,
3756         * src/pic16/ralloc.c (allocReg): add preliminary support for
3757         supporting a limited set of temporary registers,
3758
3759 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3760
3761         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3762           genDataPointerSet): ensure assignments always copy in MSB to LSB
3763           order,
3764           (loadRegFromAop): recognize CLRH optimization,
3765           (genFunction): optimize RECEIVE iCodes in reentrant functions
3766
3767 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3768
3769         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3770           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3771           selected.
3772         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3773         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3774           contiguous with data
3775
3776 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3777
3778         * device/lib/_gptrget.c (_gptrget),
3779         * device/lib/_gptrgetc.c (_gptrgetc),
3780         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3781           instead of sjmp to ret
3782         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3783           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3784
3785 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3786
3787         * .version: bumped version to 2.4.7
3788         * device/lib/_gptrget.c (_gptrget): is now _naked
3789         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3790         * device/lib/_gptrput.c (_gptrput): is now _naked
3791         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3792           (createFunction): fixed xstack
3793         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3794         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3795           or bit either,
3796           (geniCodeCritical): store original interrupt state in an iTemp bit
3797           var unless stack-auto
3798         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3799         * src/SDCCmain.c (setIncludePath): added include/target to search path
3800         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3801         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3802           prototype,
3803           (processFuncArgs): put bit vars in bit area
3804         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3805           unsaveRBank): fixed xstack,
3806           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3807           (genFunction, genEndFunction): fixed xstack,
3808           (genAssign): optimization don't walk backwards through mem
3809         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3810         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3811         * support/regression/Makefile: also make library (for stack-auto) when
3812           making "all" and added "test-mcs51-xstack-auto"
3813         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3814         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3815         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3816         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3817         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3818           make-library by MAKE_LIBRARY
3819         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3820           regression tests for xstack
3821         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3822         * support/regression/tests/critical.c: test for critical on mcs51
3823
3824 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3825
3826         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3827           built version of sdcc instead of installed version
3828
3829 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3830
3831         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3832         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3833           vprintf.c now
3834         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3835         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3836           WARNING: remove device/lib/build/z80/printf.o by hand when
3837           updating from previous build!
3838         * device/lib/z80/printf.c: updated comment
3839         * support/regression/tests/bug1057979.c: test all ports now
3840         * support/regression/tests/bug1065458.c: file added
3841
3842 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3843
3844         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3845           *_start and *_end symbols for static functions
3846
3847 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3848
3849         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3850           and search crt0.o in all library paths,
3851           (setIncludePath): proper handling of --nostdinc,
3852           (setLibPath): proper handling of --nostdlib
3853         * support/regression/Makefile,
3854         * support/regression/ports/ds390/spec.mk,
3855         * support/regression/ports/gbz80/spec.mk,
3856         * support/regression/ports/hc08/spec.mk,
3857         * support/regression/ports/mcs51/spec.mk,
3858         * support/regression/ports/mcs51-large/spec.mk,
3859         * support/regression/ports/mcs51-stack-auto/spec.mk,
3860         * support/regression/ports/z80/spec.mk: use include and lib files from
3861           built version of sdcc instead of installed version
3862         * doc/sdccman.lyx: fixed typo in --nostdinc
3863
3864 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3865
3866         * src/pic/pcode.c,
3867         * src/pic/device.c,
3868         * src/pic/ralloc.c,
3869         * src/pic/gen.c : added support to generate code for struct bit fields.
3870
3871 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3872
3873         * as/xa51/xa_version.h,
3874         * device/include/errno.h,
3875         * device/include/regc515c.h,
3876         * device/lib/_itoa.c,
3877         * device/lib/_ltoa.c,
3878         * device/lib/ser_ir_cts_rts.c,
3879         * sim/ucsim/xa.src/glob.cc,
3880         * sim/ucsim/xa.src/inst_gen.cc,
3881         * sim/ucsim/xa.src/xa_bit.cc,
3882         * sim/ucsim/xa.src/xa_sfr.cc,
3883         * sim/ucsim/z80.src/inst_dd.cc,
3884         * sim/ucsim/z80.src/inst_fdcb.cc,
3885         * support/scripts/keil2sdcc.pl,
3886         * src/pic16/pic16.dsp,
3887         * src/pic16/pic16a.dsp: corrected cvs line endings
3888         * device/lib/printf_large.c: fixed bug 1057979
3889         * src/pic16/gen.c: fixed non-C standard code
3890         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3891         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3892         * support/regression/ports/mcs51/support.c: reload T1 asap
3893         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3894           pdata use and clear idata startup behaviour
3895         * support/regression/tests/bug1057979.c: added
3896
3897 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3898
3899         * device/examples/ds390/ow390/ad26.h,
3900         * device/examples/ds390/ow390/cnt1d.h,
3901         * device/examples/ds390/ow390/crcutil.c,
3902         * device/examples/ds390/ow390/ownet.h,
3903         * device/examples/ds390/ow390/owsesu.c,
3904         * device/examples/ds390/ow390/swt12.h,
3905         * device/examples/ds390/ow390/swtoper.c,
3906         * device/examples/ds390/ow390/temp10.h,
3907         * device/examples/ds390/ow390/thermodl.c,
3908         * device/examples/ds390/tinitalk/tinitalk.dsp,
3909         * device/examples/ds390/tinitalk/tinitalk.dsw,
3910         * device/examples/mcs51/clock/hw.h,
3911         * device/examples/mcs51/simple2/go.bat,
3912         * device/examples/serialcomm/windows/serial.h,
3913         * device/examples/xa51/dummy.c,
3914         * device/examples/xa51/hello.c,
3915         * device/include/80c51xa.h,
3916         * device/include/at89x051.h: corrected cvs line endings
3917
3918 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3919
3920         * src/pic16/main.c (options): added command line --gstack, to trace
3921         stack over/under flows,
3922         * added pragma 'wparam' to allow passing first byte of function
3923         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3924         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3925         call to __gstack_test function and sets up the symbol as extern,
3926         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3927         * popaop): added call to pic16_testStackOverflow,
3928         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3929         wparamList list,
3930         * (genCall, genPcall): now all parameters are passed via stack
3931         except in functions that are pass to wparam pragma in which WREG is
3932         used too,
3933         * (genPcall): REENTRANT flag is checked to see if variable prototype
3934         contains reentrant keyword, don't call a non-reentrant function, via
3935         a reentrant function pointer or vice versa, functions are never
3936         passed via WREG,
3937         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3938         D.Winkler,
3939         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3940         SIGSEGV when accessing a NULL register stucture,
3941         * (pic16_printGPointerType): modified to handle UPPER modifier for
3942         function initializers, changed prototype of function to simpler one,
3943         * (pic16_printIvalFuncPtr): check to see if function is already
3944         added in externs list,
3945         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3946         optimized a move from W to SFR with a move to the same register
3947         later after a CALL,
3948         * device/lib/pic16/debug: NEW directory, contains debug features
3949         which are enabled when linking with libdebug.lib, currently command
3950         line option --gstack enables stack pointer tracing for over/under
3951         flow, corresponding sources are in debug/gstack
3952
3953 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3954
3955         * doc/sdccman.lyx: updated SDCC version,
3956         * (PIC16 port): update list of command line options,
3957         * src/pic16/device.h (structure pic16_options_t): added field gstack
3958         to enable stack overflow tracing on push/pops,
3959         * src/pic16/device.c (statistics structure): added statistics
3960         structure,
3961         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3962         pic16_dump_int_registers): increase statistics counters for each
3963         * variable which is encountered
3964         * (pic16_dump_usection): emit each .udata variable to its own udata
3965         section,
3966         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3967         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3968         parameters via stack, otherwise use old scheme,
3969         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3970         assembler output file,
3971         * src/pic16/main.c: added command line options --gstack to enable
3972         push/pop tracing for stack overflow,
3973         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3974         instructions): added size of each instruction,
3975         * (pic16_countInstruction): estimate size of instructions in
3976         the_pFile list, inline assembly blocks are not counted,
3977         * (pic16_FixRegisterBanking): trace previous register usage, when
3978         banksel optimizations is greater than 0, don't emit a redudant
3979         banksel directive,
3980
3981 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3982
3983         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3984         * src/pic16/ralloc.c : applied same fix for pic16.
3985         * src/pic/gen.c : tidied it up a little.
3986
3987 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3988
3989         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3990         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3991
3992 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3993
3994         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3995
3996 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3997
3998         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3999         non-reentrant function __modsint in the interrupt function (thus
4000         corrupting math operations during serial I/O)
4001         * device/lib/ser_ir.c: as above, changed buffersize
4002         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4003         256.c,d for zeroing
4004         * doc/Makefile: added option -t for rsync
4005
4006 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4007
4008         * src/SDCCast.h (struct ast),
4009         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4010
4011 2004-10-20 Borut Razem <borut.razem AT siol.net>
4012
4013         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4014         package
4015
4016 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4017
4018         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4019         makefile targets,
4020         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4021         support functions to replace long sequences of MOVFF's from access
4022         bank registers to stack and vice versa,
4023         * src/pic16/device.h: added new field opt_flags, where optimization
4024         flags can be set to enable certain features,
4025         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4026         * pBlock, (genFunction, genEndFunction): surroung loop for
4027         saving/loading used registers in stack with PC_INFO pCodes,
4028         INF_LREGS. Code in between can then be optimized by pCode optimizer
4029         to support function calls,
4030         * (genDataPointerSet): fixed bug which loaded float fields in
4031         structures with corrupt data,
4032         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4033         in a standard way debug info on stderr. Feature used for developing
4034         and debugging only,
4035         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4036         obsolete chunks of code,
4037         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4038         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4039         * pic16/src/pcode.c (pic16_newpCodeInfo,
4040         * (pic16_newpCodeOpLocalRegs),
4041         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4042         feature,
4043         * (pic16_pCodeConstString): printing of the initial value of a
4044         symbol as a comment is inhibited since parsing was already done by
4045         copyStr and output is corrupt,
4046         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4047
4048 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4049
4050         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4051
4052 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4053
4054         * as/mcs51/lkarea.c: removed old K&R style,
4055           (lnksect): changed check on boundary error,
4056           (lnksect2): changed check on boundary error,
4057           (lnksect2): extend XSTK to end of page if size = 1
4058         * as/mcs51/lkmain.c: removed old K&R style,
4059           (Areas51): create l_IRAM symbol
4060         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4061         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4062           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4063         * device/lib/_mullong.c: added version to be compiled with xstack
4064         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4065         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4066         * device/lib/mcs51/crtxstack.asm: fixed comment
4067         * src/SDCCglue.c: maxInterrupts defaults to 0,
4068           (emitMaps): added pdata,
4069           (createInterruptVect): (re)moved default,
4070           (glue): added pdata,
4071           (glue): moved __start__xstack to XSTK with default size 1
4072         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4073           and options.float_rent when options.stackAuto is set,
4074           (linkEdit): only write XDATA_NAME if provided on command line
4075         * src/SDCCmem.h,
4076         * src/SDCCmem.c: added pdata
4077         * src/port.h: added pdata_name to PORT
4078         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4079           (saveRegisters, unsaveRegisters): removed usage of B,
4080           (genMinus): fixed accumulator clash,
4081           (genJumpTab): added comment, this needs another look
4082         * src/mcs51/gen.c: added check for "B in use" paranoia,
4083           added pushB() and popB()
4084         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4085           chance
4086         * src/avr/main.c,
4087         * src/ds390/main.c,
4088         * src/hc08/main.c,
4089         * src/mcs51/main.c,
4090         * src/pic/main.c,
4091         * src/pic16/main.c,
4092         * src/xa51/main.c,
4093         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4094           added PSEG (PAG,XDATA) or NULL to port specifier
4095         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4096         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4097           (_mcs51_genInitStartup): removed __start__xstack equ,
4098           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4099         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4100         * src/z80/gen.c (_rleAppend): fixed warnings
4101         * support/regression/tests/zeropad.c: added pdata test
4102         * .version: bumped to 2.4.6
4103
4104 2004-10-17 Borut Razem <borut.razem AT siol.net>
4105
4106         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4107         as a part of nightly build
4108
4109 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4110
4111         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4112         WREG holds the first byte function parameters,
4113         * (aopForSym): take special case for symbols which are in FARSPACE
4114         but in CODESPACE too,
4115         * (assignResultValue): modified to take into account _G.useWreg,
4116         * (genCall): don't use wreg for parameter passing when function is
4117         declared as reentrant, too, added optimization INCF to stack
4118         pointer when stack parameter count is 1,
4119         * (genFunction, genEndFunction): refurnished and fixed to not using
4120         wreg for passing parameters when function has varargs or is
4121         reentrant, fixed bug with symbol name compare for generating
4122         functions in absolute address,
4123         * (pic16_storeForReturn): refurnished,
4124         * (genCmp): began writing a new version of the function, not ready
4125         yet, therefore it is disabled,
4126         * (genAssign): do not read code memory when assigning a function to
4127         a pointer function,
4128         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4129         array of characters, not pointer,
4130         * (pic16initialComments): in debug mode emit an .ident directive for
4131         the assembler,
4132         * (_process_pragma): emit a new warning type (internal to pic16)
4133         when setting stack to default length, emit a similar warning when
4134         placing a function at absolute address and address is not word aligned
4135         * (_pic16_parseOptions): added 'return TRUE' statement,
4136         * (_pic16_linkEdit): if compiling a source, then add the source's
4137         file object, first in the list of objects to link,
4138
4139 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4140
4141         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4142         * src/pic/main.c : removed VC warning.
4143         * src/pic/gen.c : changed comment.
4144
4145 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4146
4147         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4148         reference to a deprecated symbol _GPTRREG was causing failure to
4149         link. Thanks G. M. Gallant for the info.
4150
4151 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4152
4153         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4154         comments for Bugs item #954788.
4155
4156 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4157
4158         * src/pic16/device.c (pic16_dump_gsection,
4159         * pic16_groupRegistersInSection): handle symbols declared to be in
4160         access bank differently,
4161         * src/pic16/gen.c (struct _G): added field resDirect,
4162         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4163         send values read from stack directly to result and don't allocate
4164         temporary values,
4165         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4166         same registers,
4167         * (pic16_sameRegsOfs): NEW,
4168         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4169         free because they were not allocated from temporary pool,
4170         * pic16_popRegFromString): workaround to fix a problem with
4171         allocating variables twice or never,
4172         * (genGenPointerGet): using PRODL instead of FSR0H,
4173         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4174         instead of FSR0H,
4175         * (genAssign): take advantage of the _G.resDirect flag,
4176         * (genCast): around line 11844, use mov2f instead of directly
4177         MOVFF'ing between operands to account for literal values,
4178         * src/pic16/genutils.c: some new debug functions for gpsim have been
4179         added,
4180         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4181         float with integer part only,
4182         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4183         place variables in access bank
4184         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4185         updated sources to reflect recent changes in gen.c
4186
4187 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4188
4189         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4190         sources that searched for headers in installation path, now the
4191         device/include/pic16 is used,
4192         * src/pic16/glue.c (pic16glue),
4193         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4194         .line directives if not in debug mode, this suppresses assembler's
4195         warnings for ignored directives
4196
4197 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4198
4199         * src/port.h: made reset_regparms prototype void parameter explicit.
4200         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4201         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4202         * doc/sdccman.lyx: documented warning disabling and how to use
4203           printf_large to make it print floats.
4204         * device/include/stdbool.h: NEW
4205         * device/lib/_atof.c,
4206         * device/lib/_divuint.c,
4207         * device/lib/_divulong.c,
4208         * device/lib/expf.c,
4209         * device/lib/printf_large.c,
4210         * device/lib/sincosf.c,
4211         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4212         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4213           a completely reentrant lib.
4214
4215 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4216
4217         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4218         * device/include/pic16/stdio.h: fixed bug with colon
4219
4220 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4221
4222         * device/include/pic16/stdio.h,
4223         * device/include/pic16/stdlib.h,
4224         * device/include/pic16/math.h: NEW
4225         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4226         declared as _naked to reduce overhead
4227         * device/lib/Makefile.in (target port-specific-objects-pic16):
4228         changed * to *.* so to ignore the CVS directory,
4229         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4230         stacked variables back in stack,
4231         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4232         corruption
4233
4234 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4235
4236         * .version: bumped version number to 2.4.5
4237         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4238         * support/Util/SDCCerr.c (messages structure): added entry for
4239         W_POSSBUG2
4240
4241         Large cumulative patch for pic16 port and libraries.
4242         * device/include/pic16/sdcc-lib.h,
4243         * device/include/pic16/stdarg.h,
4244         * device/include/asm/pic16/features.h,
4245         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4246         * device/include/pic16/float.h: changes reentrant keyword with
4247         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4248         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4249         updated target build-libraries to include objects from gptr,
4250         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4251         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4252         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4253         all function headings,
4254         * src/SDCCmain.c: added global parameter userIncDirsSet,
4255         * (parseCmdLine): when option -I is encountered add directory to
4256         userIncDirsSet too,
4257         * src/version.awk: added space between control and long,
4258         * src/pic16/NOTES: added some notes for the port,
4259         * src/pic16/gen.c: added prototype for mov2fp function,
4260         * (fReturnpic16[]): properly named return value registers,
4261         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4262         * (aopForSym): added code to handle symbols with onStack flag set,
4263         symbols onStack are allocated PTRSIZE bytes,
4264         * (aopFreeAsmop): handles special case where asmops are stack objects,
4265         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4266         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4267         added argument lock to trace flaws in allocating temporary registers
4268         when developing port,
4269         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4270         * (pic16_popRegFromString): reenabled allocating a direct register
4271         from string,
4272         * (assignResultValue): various beautifications,
4273         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4274         referenced function argument,
4275         * (genIpush): reenabled to allow stacked arguments, handles only
4276         ic->parmPush iCodes,
4277         * (genCall, genPcall): major changes to allow for variable argument
4278         functions, fixed a bug with falsely restoring stack pointer after
4279         returning from call,
4280         * (genFunction): pending code for critical function,
4281         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4282         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4283         * (genNearPointerGet): fixed bug with indirect reading, was always
4284         reading from INDF0
4285         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4286         pointers,
4287         * (genAddrOf): rewrote code to take address of a stacked function parameter
4288         * (genCast): fixed casting to generic pointer type,
4289         * src/pic16/gen.h: added AOP_STA,
4290         * (struct asmop): added field stk,
4291         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4292         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4293         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4294         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4295         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4296         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4297         generic pointers,
4298         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4299         and library paths,
4300         * (pic16_port structure): generic pointer size is set to 3,
4301         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4302         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4303         compiler warning,
4304         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4305         operand is an iTemp,
4306
4307 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4308
4309         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4310         * debugger/mcs51/simi.c: addapt new syntax of s51
4311
4312 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4313
4314         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4315         * src/pic16/pcode.c: commented out some calls to free() in order to
4316         fix bug #989576,
4317
4318 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4319
4320         * src/SDCCicode.h,
4321         * src/SDCCicode.c (isiCodeInFunctionCall),
4322         * src/avr/ralloc.c (selectSpil),
4323         * src/pic/ralloc.c (selectSpil),
4324         * src/pic16/ralloc.c (selectSpil),
4325         * src/ds390/ralloc.c (selectSpil),
4326         * src/hc08/ralloc.c (selectSpil),
4327         * src/xa51/ralloc.c (selectSpil),
4328         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4329         stack in the middle of a function call sequence (fixes bug #1020268)
4330         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4331         costs associated with the minimum switch case.
4332
4333 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4334
4335         * src/SDCC.lex: fixed bug #1030549
4336
4337 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4338
4339         * src/SDCCcse.h (struct cseDef),
4340         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4341         over a function call if the CSE is derived from a symbol whose
4342         address has been taken (fixes bug #1029883)
4343         * support/regression/tests/bug-1029883: a new regression test for
4344         this bug
4345
4346 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4347
4348         * src/hc08/gen.c (emitinline): fixed bug #1029778
4349         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4350         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4351         and starts toward RFE #905167)
4352
4353 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4354
4355         * src/pic16/gen.c (mov2f): New function to move an operand to
4356         another without considering if it is a literal or a register,
4357         * (pic16_sameRegs): don't check if they are both AOP_REG,
4358         * (AccRsh): removed andmask=0 lines,
4359         * (genLeftShift): duplicated to be improved in future versions,
4360         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4361         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4362         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4363         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4364         * (insertBankSwitch): fixed inserting banksel directives algorithm
4365         for instructions that follow a skip instruction, this fixes a report
4366         for broken subtraction code generation,
4367         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4368         iCode is a left op, just in case result and right share the same
4369         registers
4370
4371 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4372
4373         * src/hc08/main.c,
4374         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4375         preservation of HX
4376         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4377         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4378         on 2004-09-12; it was buggy
4379
4380 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4381
4382         * src/SDCCsymt.h: removed RESULT_CHECK
4383         * src/SDCCast.c,
4384         * src/SDCCglue.c,
4385         * src/SDCCval.c,
4386         * src/pic/glue.c,
4387         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4388
4389 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4390
4391         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4392         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4393         configuration values no more rejected by compiler, they are assigned
4394         to configuration registers with a warning message instead,
4395         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4396         the for-loop so last conf register is emitted too,
4397         * (_pic16_initPaths): link library libsdcc.lib by default,
4398         * (_hasNativeMulFor): modified test for multiplication according to
4399         Raphael Neider's remarks. Integer multiplication is also done with
4400         support functions,
4401         * device/include/pic16/pic18fregs.h: corrected type error in while
4402         testing and including 18f6720 header file
4403
4404 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4405
4406         * src/pic16/device.h (pic16_options): removed field use_crt,
4407         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4408         until an optimization to handle single bits is added,
4409         * (pic16_loadFSR0): moved before genUnpackBits,
4410         * (genAnd): some white lines removed,
4411         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4412         leave_reset flags in pic16_options when using crt modules,
4413
4414 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4415
4416         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4417           for bugs 898889 & 979599. Also used some safer print instructions.
4418
4419 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4420
4421         * src/pic16/device.h (pic16_options_t): added field use_crt,
4422         crt_name, no_crt,
4423         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4424         catch a probable future bug,
4425         * src/pic16/gen.c: aopIdx function commented out,
4426         * (genAssign): commented out old code which used aopIdx,
4427         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4428         code, added if conditionals to take into account the --use-crt
4429         command line options,
4430         * src/pic16/main.c (pic16_optionsTable): added new command line
4431         options, --use-crt= and --no-crt,
4432         * (_pic16_linkEdit): now the proper crt object is added in the
4433         linker command line except than when --no-crt is specified,
4434         * src/pic16/pcode.c,
4435         * src/pic16/pcode.h: added some structures and functions for a new
4436         optimization scheme to compansate for instruction overhead between
4437         same iCodes, this scheme is currently under development and is not
4438         working in any way,
4439         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4440         to && operator,
4441         * device/lib/pic16/startup/crt0i.c,
4442         * device/lib/pic16/startup/crt0iz.c: added global char variable
4443         __uflags to force the generation of an idata section
4444
4445 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4446
4447         * doc/Makefile,
4448         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4449         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4450
4451 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4452
4453         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4454         Frieder) and clarified the default code optimization mode
4455
4456 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4457
4458         * src/SDCC.lex (doPragma, process_pragma),
4459         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4460         "opt_code_size", and "opt_code_balanced"
4461         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4462         regrouped options by category, added support for category headers
4463         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4464         and "--opt-code-size"
4465         * doc/sdccman.lyx: documented these new options and pragmas
4466         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4467         preference into account
4468
4469 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4470
4471         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4472           geniCodePreDec): Fixed bug 904237 by generating a warning
4473         * src/SDCCerr.h,
4474         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4475
4476 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4477
4478         * src/pic/device.c : When no max ram set validate full memory range.
4479         * src/pic/pcode.c,
4480         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4481
4482 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4483
4484         * device/lib/_gptrget.c,
4485         * device/lib/_gptrput.c: updated comment
4486         * device/lib/calloc.c,
4487         * device/lib/free.c,
4488         * device/lib/malloc.c,
4489         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4490         * src/SDCCcse.c (cseBBlock),
4491         * src/SDCCicode.c (printOperand, geniCodeArray),
4492         * src/SDCCicode.h (struct operand): fixed bug 868103
4493         * support/regression/tests/bug-868103.c: added
4494         * src/SDCCast.c (searchLitOp),
4495         * src/SDCCcse.h (struct cseDef),
4496         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4497         * src/SDCCicode.h (struct operand),
4498         * src/SDCCsymt.h (struct sym_link),
4499         * src/avr/gen.c (hasInc),
4500         * src/ds390/gen.c (hasInc),
4501         * src/hc08/gen.c (genPlusIncr, hasInc),
4502         * src/mcs51/gen.c (hasInc),
4503         * src/pic16/glue.c (pic16_printIvalChar),
4504         * src/pic16/ralloc.c (regWithIdx),
4505         * src/xa51/gen.c (hasInc) : removed warnings
4506         * src/SDCCast.c (createBlock): added comment ???
4507         * src/hc08/ralloc.c: updated comments
4508
4509 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4510
4511         * doc/sdccman.lyx: updated section on switch statements, added
4512         section about semaphore locking
4513         * doc/Makefile: added option -info for latex2html
4514         * device/lib/_gptrget.c,
4515         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4516
4517 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4518
4519         * src/pic/device.h,
4520         * src/pic/device.c,
4521         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4522          maxram is less than 0x100.
4523
4524 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4525
4526         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4527
4528 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4529
4530         * src/port.h,
4531         * src/mcs51/main.c,
4532         * src/ds390/main.c,
4533         * src/z80/main.c,
4534         * src/hc08/main.c,
4535         * src/pic/main.c,
4536         * src/pic16/main.c,
4537         * src/avr/main.c,
4538         * src/xa51/main.c
4539         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4540         a jump table is the best form for a switch statement, including
4541         automatic insertion of missing cases to make the case range
4542         continuous. Developed in collaboration with Frieder Ferlemann.
4543
4544 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4545
4546         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4547         accumulator result if it needs sign extension
4548
4549 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4550
4551         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4552
4553 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4554
4555         * device/lib/gbz80/printf.c,
4556         * device/lib/z80/printf.c: removed define for NULL
4557
4558 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4559
4560         * as/xa51/xa_link.c,
4561         * device/examples/ds390/ow390/ad26.c,
4562         * device/examples/ds390/ow390/cnt1d.c,
4563         * device/examples/ds390/ow390/counter.c,
4564         * device/examples/ds390/ow390/ds2480.h,
4565         * device/examples/ds390/ow390/ds2480ut.c,
4566         * device/examples/ds390/ow390/findtype.c,
4567         * device/examples/ds390/ow390/gethumd.c,
4568         * device/examples/ds390/ow390/owllu.c,
4569         * device/examples/ds390/ow390/ownetu.c,
4570         * device/examples/ds390/ow390/swt12.c,
4571         * device/examples/ds390/ow390/swtloop.c,
4572         * device/examples/ds390/ow390/temp.c,
4573         * device/examples/ds390/ow390/temp10.c,
4574         * device/examples/ds390/ow390/thermo21.c,
4575         * device/examples/ds390/ow390/tinilnk.c,
4576         * device/examples/ds390/ow390/tstfind.c,
4577         * device/examples/serialcomm/windows/serial.cpp,
4578         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4579         * device/include/reg51.h: fixed line endings for cvs
4580
4581 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4582
4583         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4584         packRegsForAccUse, packRegisters): new accumulator register
4585         packing algorithm
4586         * support/regression/ports/hc08/support.c (_putchar): suppress
4587         warning of unused variable
4588         * src/SDCCicode.c: added SWAP entry to codeTable
4589
4590 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4591
4592         * device/lib/sprintf.c: forgot to add this file before previous commit
4593
4594 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4595
4596         * src/pic16/gen.c (genPackBits): added operand right in function
4597         parameters, load result directly if p_type is POINTER (that is
4598         called by genNearPointerSet)
4599         * (genUnPackBits): added operand left in function parameters,
4600         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4601         FSR0 if accessing bitfields,
4602
4603 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4604
4605         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4606           _print_format; updated printf, sprintf, vsprintf
4607         * device/include/asm/default/features.h: corrected comment/define
4608         * device/lib/Makefile.in: added sprintf.c
4609         * device/lib/libsdcc.lib: added sprintf module
4610         * device/lib/printf_large.c,
4611         * device/lib/vprintf.c,
4612         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4613           into these 3 files
4614         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4615         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4616         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4617           hc08 test
4618         * support/regression/tests/zeropad.c: define idata as data for hc08
4619
4620 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4621
4622         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4623         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4624         labels are referenced at least once (even if a reference is not found)
4625         * src/hc08/gen.c (emitcode): set isComment flag for comments
4626         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4627         loads), rules 6a..6b (optimize jumps to return)
4628
4629 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4630
4631         * device/lib/acosf.c (acosf),
4632         * device/lib/asinf.c (asinf),
4633         * device/lib/atanf.c (atanf),
4634         * device/lib/ceilf.c (ceilf),
4635         * device/lib/cosf.c (cosf),
4636         * device/lib/coshf.c (coshf),
4637         * device/lib/cotf.c (cotf),
4638         * device/lib/fabsf.c (fabsf),
4639         * device/lib/floorf.c (floorf),
4640         * device/lib/log10f.c (log10f),
4641         * device/lib/logf.c (logf),
4642         * device/lib/sinf.c (sinf),
4643         * device/lib/sinhf.c (sinhf),
4644         * device/lib/sqrtf.c (sqrtf),
4645         * device/lib/tanf.c (tanf),
4646         * device/lib/tanhf.c (tanhf),
4647         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4648         replaced all instances of "reentrant" in the library functions
4649         defined in math.h with this macro.
4650         * support/regression/tests/float_trans.c: reenabled test for hc08
4651
4652 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4653
4654         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4655         erroneously deleted
4656
4657 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4658
4659         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4660         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4661         multi-byte volatile operands are used
4662         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4663         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4664         initialization to area GSINIT0 so that it would always precede
4665         any static initializers in GSINIT
4666         * support/regression/tests/zeropad.c: fixed idata define for hc08
4667         * support/regression/tests/bug-927659.c,
4668         * support/regression/tests/float_trans.c: disabled tests for hc08
4669         pending missing library routines
4670         * .version: increased version number to 2.4.4 - hc08 port now passes
4671         regression tests
4672
4673
4674 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4675
4676         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4677         * Makefile.common.in,
4678         * as/Makefile,
4679         * as/hc08/Makefile.in,
4680         * as/mcs51/Makefile.in,
4681         * as/z80/Makefile.in,
4682         * debugger/mcs51/Makefile.in,
4683         * device/include/Makefile.in,
4684         * device/lib/Makefile.in,
4685         * doc/Makefile,
4686         * link/Makefile,
4687         * link/z80/Makefile.in,
4688         * packihx/Makefile.in,
4689         * sim/ucsim/main_in.mk,
4690         * sim/ucsim/avr.src/Makefile.in,
4691         * sim/ucsim/doc/Makefile.in,
4692         * sim/ucsim/gui.src/serio.src/Makefile.in,
4693         * sim/ucsim/hc08.src/Makefile.in,
4694         * sim/ucsim/s51.src/Makefile.in,
4695         * sim/ucsim/xa.src/Makefile.in,
4696         * sim/ucsim/z80.src/Makefile.in,
4697         * src/Makefile.in,
4698         * support/cpp2/Makefile.in,
4699         * support/librarian/Makefile,
4700         * support/makebin/Makefile: added DESTDIR to the install path proposed
4701         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4702         * doc/sdccman.lyx: added DESTDIR documentation
4703
4704 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4705
4706         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4707         instruction for interrupt handlers, use fast returns when returning
4708         from high priority interrupts
4709
4710 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4711
4712         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4713         code generation
4714         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4715         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4716         bugs, ported much of Bernhard's code from mcs51
4717         * src/mcs51/gen.c (genSend),
4718         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4719         than one when calling a reentrant function
4720         * device/lib/_mullong.c: defined an alternate struct layout for big
4721         endian ports (hc08)
4722
4723 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4724
4725         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4726         test
4727
4728 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4729
4730         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4731         are sane and complete before asking the port its prefered parameter
4732         passing method (fixes bug #1017633)
4733         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4734         and _ret3
4735
4736 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4737
4738         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4739         problem in bitfields >= 8 bits.
4740
4741 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4742
4743         * src/SDCCsymt.c: undid changes that were not meant to be committed
4744
4745 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4746
4747         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4748
4749 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4750
4751         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4752           copied and wrong bit got inverted
4753
4754 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4755
4756         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4757         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4758         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4759         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4760         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4761         assignments to bitfields at known addresses
4762         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4763         reads from bitfields at known addresses
4764         * src/hc08/ralloc.c (packRegisters),
4765         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4766         genhc08Code): optimize pointer get values used as conditionals
4767         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4768         and branch
4769
4770 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4771
4772         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4773         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4774         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4775         as conditionals
4776
4777 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4778
4779         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4780
4781 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4782
4783         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4784         related problems
4785
4786 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4787
4788         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4789
4790 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4791
4792         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4793         mcs51 port
4794
4795 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4796
4797         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4798
4799 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4800
4801         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4802         cases use more compact code.
4803
4804 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4805
4806         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4807
4808 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4809
4810         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4811
4812 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4813
4814         * src/SDCCsymt.h,
4815         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4816         parameter of changePointer() from symbol* to sym_link*
4817         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4818         * src/SDCCsymt.c (compareType): void* type is castable to other
4819         pointers, but not necesarily an exact match.
4820         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4821         is no longer blindly treated as an exact match.
4822         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4823
4824 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4825
4826         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4827
4828 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4829
4830         * src/pic/gen.c,
4831         * src/pic/pcode.c,
4832         * src/pic/ralloc.h,
4833         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4834
4835 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4836
4837         * src/pic/device.c,
4838         * src/pic/device.h,
4839         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4840
4841 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4842
4843         * src/mcs51/gen.c (emitcode): fixed bug #992819
4844
4845 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4846
4847         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4848           there's no need to make it worse
4849
4850 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4851
4852         * src/mcs51/ralloc.c (deassignLR),
4853         * src/ds390/ralloc.c (deassignLR),
4854         * src/hc08/ralloc.c (deassignLR),
4855         * src/z80/ralloc.c (deassignLR),
4856         * src/pic/ralloc.c (deassignLR),
4857         * src/pic16/ralloc.c (deassignLR),
4858         * src/avr/ralloc.c (deassignLR),
4859         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4860         rlivePoint): fixed another part of bug #971834
4861
4862 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4863
4864         * src/z80/main.c: enabled "critical" keyword
4865         * src/z80/mappings.i,
4866         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4867         functions (fixes bug #979646)
4868         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4869
4870 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4871
4872         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4873           such as c:\mydir.
4874
4875 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4876
4877         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4878           doesn't disable too much optimizations
4879
4880 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4881
4882         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4883
4884 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4885
4886         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4887
4888 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4889
4890         * src/pic/gen.c tidied up tabs
4891         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4892         * src/pic/main.c tidied up tabs
4893         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4894         * src/pic/pcoderegs.c tidied up tabs
4895         * src/pic/ralloc.c tidied up tabs
4896
4897 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4898
4899         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4900         to S_FIXED for pic16 port and when symbol is not in level 0,
4901         allocate for S_REGISTER storage class and pic16 port, too,
4902         * src/pic16/device.h: prototype for checkSym,
4903         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4904         * (pic16_assignConfigWordValue): test the value and the mask to
4905         validate that the value is suitable for the configuration word,
4906         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4907         collect extern declared symbols, don't emit symbol twice, check
4908         first if symbol is in publics set first,
4909         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4910         * added command line '--fstack' which enables an experimental
4911         feature for stack access, too buggy to be used yet...
4912         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4913         * (pic16_allocDirReg): when register has storage class S_REGISTER
4914         allocate in pic16_dynAccessRegs,
4915         * device/include/pic16/pic18f????.h: modified configuration word
4916         naming convention, words started as CONFIG0H but should be CONFIG1H
4917
4918 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4919
4920         * device/include/mcs51reg.h: fixed bug 970993
4921
4922 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4923
4924         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4925         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4926         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4927         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4928         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4929         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4930           error/warning numbers,
4931           added function setWarningDisabled()
4932         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4933         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4934           _memcmp.c _memmove.c calloc.c realloc.c free.c
4935         * support/regression/tests/malloc.c: added tests for new functionality
4936         * support/regression/tests/zeropad.c: added tests for truncated initializers
4937           and initialized char arrays starting with '\x0'
4938         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4939
4940 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4941
4942         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4943
4944 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4945
4946         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4947         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4948         peephole 177.e. Thanks to anonymous
4949
4950 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4951
4952         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4953         function isn't used in the source but referenced as a
4954         variable initializer then declare it as extern in .asm file
4955
4956 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4957
4958         * .version: increased version number to 2.4.3
4959
4960         Adding version extension according to ChangeLog CVS revision
4961         * src/Makefile.in (target all): added dependency 'version.h'
4962         * (rule version.h): added rule to create version.h from ChangeLog,
4963         * (rule dep): added dependency version.h,
4964         * src/version.awk: AWK script to create version.h
4965         * src/SDCCdwarf2.c (dwWriteModule),
4966         * src/SDCCglue.c (initialComments),
4967         * src/SDCCmain.c (printVersionInfo): modified to write after
4968         version string the version extension number,
4969         * src/SDCCutil.c: included "version.h"
4970         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4971         number,
4972         * src/SDCCutil.h: added prototype for getBuildNumber
4973
4974         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4975         includeDirsSet, too,
4976         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4977         const char [] is found in function prototype...
4978
4979         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4980         moving to WREG with source is already in WREG,
4981         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4982         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4983         * (aopForSym): stack'ed symbols are partially supported, added
4984         if-clause to support symbols in FARSPACE,
4985         * (sameRegs): added test for AOP_ACC to see if registers are same,
4986         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4987         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4988         * (pic16_popRegFromString): will not allocate a new register if it
4989         doesn't find one by name, bug may have introduced...
4990         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4991         * (genIpush): revived to use pic16 port's stack,
4992         * (genAddrOf): added incomplete case for stack'ed operand,
4993         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4994         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4995         can handle multibyte operands,
4996         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4997         * (pic16initialComments): added message for MPLAB compatibility
4998         mode enabled,
4999         * src/pic16/main.h: prototype for pic16_mplab_comp,
5000         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5001         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5002         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5003         because of increased complexity of procedure,
5004         * (_process_pragma): stack pragma changed to format 'stack pos len',
5005         emit symbol '_stack_end' to conform with gplink,
5006         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5007         to search for register,
5008         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5009         PO_GPR_REGISTER,
5010         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5011         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5012         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5013         case for PO_GPR_REGISTER,
5014         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5015         dies, the new era is ahead !...
5016         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5017         pic16_dynInternalRegs,
5018         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5019         * (pic16_allocDirReg): minor optimizations and bug fixes,
5020         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5021
5022         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5023         load stack and frame pointer with address of 'stack_end' symbol
5024
5025 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5026
5027         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5028         without source code but only variable initializers
5029
5030 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5031
5032         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5033         external are not declared as extern to reduce overhead while linking
5034
5035 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5036
5037         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5038
5039 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5040
5041         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5042           Yee Keat for the patch
5043         * src/SDCCast.c (decorateType): fixed bug #979599
5044         * src/ds390/gen.h: removed local fReturnSizeDS390
5045         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5046         * src/ds390/gen.c (genAnd, genOr, genXor),
5047         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5048
5049 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5050
5051         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5052         add relFilesSet to $3, manipulate $2 to handle linking of object
5053         files without source files in command line,
5054         * device/include/pic16 (all headers): added ID location macros,
5055         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5056         entries for ID location bytes,
5057         * (pic16_assignIdByteValue): NEW,
5058         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5059         added field dumpcalltree to pic16_options_t,
5060         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5061         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5062         emitting rFalseIfx label after check_carry label,
5063         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5064         pic16_emitDIRegs), NEW
5065         * (pic16glue): dump .calltree file when option --calltree found,
5066         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5067         * (_pic16_genAssemblerPreamble): emit ID locations after
5068         configuration registers,
5069         * (pic16_linkCmd): modifications of the link command,
5070         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5071         * (pic16_pCodeInitRegisters): don't init stack registers,
5072         * (pic16_findPrevInstruction): fixed bug,
5073         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5074         bug with immediate registers,
5075         * (buildCallTree): traces stack push and pop,
5076         * (pct2): dump also stack usage for each function,
5077         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5078         * (pic16_allocDirReg): various modifications,
5079         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5080         fixed to 1,
5081
5082 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5083
5084         * src/pic16/pcode.c: removed buggy double colon
5085
5086 2004-07-01 Borut Razem <borut.razem AT siol.net>
5087
5088         * support/scripts/sdcc.nsi: added include/pic16 to setup
5089
5090 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5091
5092         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5093         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5094         target 'clean',
5095         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5096         specific command line arguments. Also added sample lkr script
5097         for placing a variable at a specific memory bank.
5098         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5099         at a specific memory bank,
5100         * (pic16_dump_isection): fixed bug which caused string literals to
5101         be omitted when dumping idata section,
5102         * (pic16_groupRegistersInSection): added code to handle registers
5103         in specific memory banks,
5104         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5105         public, all references are renamed too,
5106         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5107         AOP_DPTR2,
5108         * (pic16_storeForReturn): added case to handle when dest is WREG,
5109         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5110         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5111         pic16_rel_udata, check to see if that register is marked as being
5112         a member of a specific memory bank,
5113         * (pic16_printIvalCharPtr): added code to add string literals either
5114         to code or the idata sections,
5115         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5116         also accept the 'udata' pragma,
5117         * src/pic16/main.h: new structure types sectName and sectSym
5118         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5119         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5120         * (pic16_findPrevInstruction): fixed, it returned nothing,
5121         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5122         instruction combinations,
5123         * (pic16_FixRegisterBanking): heavily reorganised,
5124         * (pic16_AnalyzeBanking): if generating banksel directives is
5125         disabled, then don't call FixRegisterBanking at all,
5126         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5127         completely removed,
5128         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5129
5130 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5131
5132         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5133         Phuah Yee Keat <yk.phuah AT nestac.com>
5134
5135 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5136
5137         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5138         correctly the IVT even if it is relocated to some other location
5139
5140 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5141
5142         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5143         * device/include/pic16/pic18f2220.h: NEW,
5144         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5145         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5146         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5147         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5148         nodefaultlibs, ivt_loc is the location of the interrupt vector
5149         table, and nodefaultlibs signs that default libraries should not be
5150         linked in link stage,
5151         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5152         according to --ivt-loc argument,
5153         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5154         when pragma stack is found,
5155
5156 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5157
5158         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5159         256 (range check), 257 (do while), 258.a-f (bit banging
5160         f.e. on 3-wire SPI bus)
5161
5162 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5163
5164         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5165         variables used exclusively within a loop
5166
5167 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5168
5169         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5170
5171 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5172
5173         * src/SDCClrange.c (computeClash): fixed bug #971834
5174
5175 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5176
5177         * src/mcs51/gen.c (genCmp): fixed bug #975903
5178         * src/hc08/gen.c (operandsEqu),
5179         * src/ds390/gen.c (operandsEqu),
5180         * src/z80/gen.c (operandsEqu),
5181         * src/pic/gen.c (operandsEqu),
5182         * src/pic16/gen.c (operandsEqu),
5183         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5184         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5185
5186 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5187
5188         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5189
5190 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5191
5192         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5193         default case in switch statement,
5194         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5195         to eliminate problem with initialisation of pointers, but problem
5196         still exists,
5197         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5198         * (emitStaticSegment): removed various lines emitting debug info,
5199         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5200         added processor registers for utilizing EEPROM,
5201         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5202         configurable and set 8
5203
5204 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5205
5206         * .version: increased version number to 2.4.2,
5207
5208         Cumulative patch for pic16 port
5209         * src/pic16/device.c: changed scheme to dump initial values for
5210         variables in idata segment, all print_idata* functions were removed,
5211         now the pic16_printIval* will be called,
5212         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5213         * _pic16_printPointerType, pic16_printPointerType,
5214         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5215         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5216         NEW, similar to the respective functions in SDCCglue.c,
5217         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5218         way, emitting hex bytes,
5219         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5220
5221 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5222
5223         * src/avr/ralloc.c (serialRegAssign),
5224         * src/xa51/ralloc.c (serialRegAssign),
5225         * src/pic/ralloc.c (serialRegAssign),
5226         * src/pic16/ralloc.c (serialRegAssign),
5227         * src/hc08/ralloc.c (serialRegAssign),
5228         * src/z80/ralloc.c (serialRegAssign),
5229         * src/ds390/ralloc.c (serialRegAssign),
5230         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5231
5232 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5233
5234         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5235         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5236
5237 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5238
5239         Cumulative patch for pic16 port:
5240         * src/pic16/device.h (typedef PIC16_device) modified fields for
5241         defining microcontrollers,
5242         * src/pic16/device.c: added new info for all devices in Pics16 array,
5243         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5244         to be optimised out by the pCode optimiser,
5245         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5246         specially, bug reported by G.M. Gallant,
5247         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5248         as force'd so that cannot be optimised out by pCode optimiser,
5249         * src/pic16/pcode.c,
5250         * src/pic16/pcodepeeph.c,
5251         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5252         they are disabled by default, but can be enabled explicit with
5253         command argument --denable-peeps, for testing,
5254         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5255         --pomit-ivt in COMPILE_FLAGS
5256
5257 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5258
5259         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5260           compilation on MSVC
5261
5262 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5263
5264         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5265
5266 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5267
5268         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5269         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5270
5271 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5272
5273         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5274         would only assign 0x300001 register.
5275
5276 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5277
5278         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5279         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5280
5281 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5282
5283         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5284         for ds80c400
5285         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5286         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5287         added peephole 254 (left shift), 255 (jump table)
5288
5289 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5290
5291         * device/lib/Makefile.in: removed comment line with model-pic16,
5292         * (target port-specific-objects-pic16): the libraries and objects
5293         are copied to the build directory form the device/lib/pic16/bin
5294         directory
5295
5296         Cumulative patch concerning pic16 port:
5297         * library directory has been re-organized,
5298         * added support for PIC18F1220,
5299         * added headers and library sources for chips 18f1220,18f6520,
5300         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5301
5302         * configuration registers setting has changed, now each supported
5303         device has a complete description of the registers it uses,
5304         * all initialisations are moved to idata sections, these section
5305         can be absolute or relocatable,
5306         * fixed initialisation of codespace variables,
5307         * fixed warning about PCLATU and gpsim,
5308         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5309         * (genAssign): use table reads when assigning from variables in codespace,
5310         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5311         char/int variables placed in codespace,
5312         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5313         registers set in .asm file, no need for --pomit-config-words anymore,
5314         * (pic16glue): some 8051 legacy segments are commented out
5315         (to be removed completely),
5316         * added support for alternative assembler and linker with --asm=
5317         and --link= command line arguments,
5318         * peepholes are disabled automatically in the port, no need to
5319         specify on command line,
5320         * port supports natively char/int/long multiplication, but converts
5321         all divisions to support functions,
5322         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5323         to the file set in variable $2,
5324         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5325         strings in ASCII format and not in hex,
5326         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5327         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5328         allocate proper register if iCodes aren't temporary,
5329
5330 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5331
5332         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5333
5334 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5335
5336         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5337         is commented out
5338
5339 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5340
5341         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5342         computed address is reused
5343         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5344         multi-byte bitfields
5345
5346 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5347
5348         * src/z80/gen.c: (genArrayInit): must check for pointers too
5349
5350 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5351
5352         * support/regression/tests/zeropad.c: never meant to commit the
5353           nestedstruct test: removed, added check for GCC version
5354
5355 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5356
5357         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5358         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5359         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5360           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5361           bugs 928906 and 954082 half-empty initializers
5362         * src/SDCCsymt.h,
5363         * src/SDCCsymt.c (getAllocSize): added for above fix
5364         * src/z80/gen.c (genArrayInit): fixed bug 741044
5365         * support/regression/tests/zeropad.c: added tests
5366
5367 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5368
5369         * src/pic16/device.c (pic16_dump_section): corrected bug which
5370         caused some symbols of the libraries to be misplaced
5371
5372 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5373
5374         * src/pic16/glue.c,
5375         * src/pic16/ralloc.h,
5376         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5377         to fix conflict with pic port
5378
5379 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5380
5381         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5382         externs configuration variables,
5383         * src/pic16/ralloc.h,
5384         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5385         prototype in header, commented out some debug messages
5386
5387 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5388
5389         * src/pic16/glue.c,
5390         * src/pic16/main.c,
5391         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5392         for gpasm COFF object generation. Thanks to D. Hawkins for
5393         his patch info
5394
5395 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5396
5397         * src/ds390/main.c,
5398         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5399         Brock for spotting this)
5400         * src/ds390/gen.c (genEndFunction),
5401         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5402         interrupt handler and critical. Disable push/pop optimizations when
5403         peephole optimizations disabled.
5404
5405 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5406
5407         Updated pic16 library sources and headers.
5408         * device/lib/pic16/pic18f*/ ,
5409         * device/include/pic16/*.h: modified to handle structured SFR
5410         definitions
5411
5412 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5413
5414         * src/port.h (PORT structure): added hook initPaths, now each
5415         port can declare its own default search paths,
5416         which can been seen with the --print-search-dirs option,
5417         see pic16 port for example,
5418         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5419         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5420         * (doPrintSearchDirs): NEW, replaces in a central manner the
5421         printing of search dirs which was split in set*Paths functions,
5422         * (main): added call to port->initPaths and doPrintSearchDirs,
5423         * src/avr/main.c,
5424         * src/ds390/main.c,
5425         * src/hc08/main.c,
5426         * src/izt/i186.c,
5427         * src/izt/tlcs900h.c,
5428         * src/mcs51/main.c,
5429         * src/pic/main.c,
5430         * src/pic16/main.c: modified port structures to reflect addition of
5431         initPaths hook,
5432
5433         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5434         * (pic16_dump_section): for registers in same address reserve memory once,
5435         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5436         to no_banksel,
5437         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5438         result is greater in size than right or left,
5439         * (pic16_genUMult8X8_8): there are some cases where the result can
5440         be 16 bits size, so handle these,
5441         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5442         * (pic16_outBitC): modified to emit pcodes,
5443         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5444         or not,
5445         * (genDivOneByte): implemented algorithm to divide 8-bits,
5446         * (genCmp): uncommented goto, but issues still exist,
5447         * (genAnd): fixed a bug with variables >8bits,
5448         * (genPackBits): optimization added that uses BCF/BSF to change a
5449         single bit,
5450         * (genAssign): fixed bug when assigning floating point literals,
5451         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5452         __sdcc_gsinit_startup label,
5453         * src/pic16/main.c (_pic16_init): removed search directory
5454         initialisations,
5455         * (_pic16_initPaths): NEW, used to initialise search directories,
5456         * (_hasNativeMulFor): support functions for all except char/int
5457         multiplication, and char division,
5458         * (PIC16_port struct): modified entry for native mul support,
5459         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5460         no_banksel option,
5461         * (buildCallTree): call to register_usage is ifdef'ed out,
5462
5463 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5464
5465         * device/include/string.h: applied Stas Sergeev's patch to make this
5466         header file compatible with the preprocessor -Wundef option
5467         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5468         failure (fixes bug #941458)
5469
5470 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5471
5472         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5473         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5474         that the variable, not the function, should be static
5475         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5476         to be consistent with non-literal case
5477
5478 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5479
5480         * src/SDCCast.c (isConformingBody): fixed bug #949967
5481         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5482         convilong): fixed bug #952086
5483
5484 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5485
5486         * src/SDCCmem.c (allocVariables): fixed bug #955321
5487
5488 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5489
5490         * src/hc08/main.c (_hc08_genAssemblerEnd),
5491         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5492         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5493         completely eliminated the use of a temporary file
5494         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5495         when more than one file linked
5496         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5497
5498 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5499
5500         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5501         which fixes bug #543481
5502         * support/regression/tests/bug-751703.c: fixed comments left from a
5503         cut and paste error
5504         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5505         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5506         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5507         scopes
5508         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5509         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5510         are now changed to underscores in moduleName
5511
5512 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5513
5514         * as/mcs51/lkmem.c: better fix for bug #954173
5515
5516 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5517         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5518
5519         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5520         * device/include/c8051f000.h,
5521         * device/include/c8051f120.h,
5522         * device/include/c8051f300.h,
5523         * device/include/c8051f310.h,
5524         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5525         PWM16) and detab'ed
5526
5527 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5528
5529         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5530         and mailing lists, doc'ed --no-peep-comments, removed reference
5531         to knoppix (newest version has no LyX/LaTeX), other minor changes
5532         * src/SDCCglue.c (glue): save 2 bytes stack space with
5533         option --main-return. The ljmp could probably be avoided too
5534
5535 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5536
5537         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5538
5539 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5540
5541         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5542         * src/SDCCopt.c (isLocalWithoutDef),
5543         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5544         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5545         (credit to Maarten Brock for patch #949363, on which this is based)
5546         * support/regression/tests/bug-751703.c: some test cases of extern used
5547         within inner scopes.
5548
5549 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5550
5551         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5552         SPEC_STRUCT
5553         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5554         struct definitions
5555         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5556         dwWriteLabel): fix to create valid debugger symbols even when
5557         the module name has non-alphanumeric symbols in it
5558         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5559         when a variable's allocation has been optimized away
5560
5561
5562 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5563
5564         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5565         * src/hc08/main.c,
5566         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5567         * src/mcs51/main.c,
5568         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5569         * src/ds390/main.c,
5570         * src/z80/gen.c (z80_emitDebuggerSymbol),
5571         * src/z80/main.c,
5572         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5573         * src/pic/main.c,
5574         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5575         * src/pic16/main.c,
5576         * src/avr/gen.c (avr_emitDebuggerSymbol),
5577         * src/avr/main.c,
5578         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5579         * src/xa51/main.c,
5580         * src/SDCCdebug.c (emitDebuggerSymbol),
5581         * src/SDCCdebug.h,
5582         * src/port.h: added a debugger struct to the port struct. Added a
5583         callback for defining debugger symbols
5584
5585         * src/SDCCast.c (createLabel),
5586         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5587         with isitmp = 1
5588         * src/SDCCicode.h,
5589         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5590         iCode back to the ast for the function
5591
5592         * src/hc08/ralloc.c (hc08_assignRegisters),
5593         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5594         unneeded fields from the regs struct.
5595         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5596         pushReg() & pullReg() functions instead of emitcode()
5597
5598         * src/hc08/gen.c (genLabel, genhc08Code),
5599         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5600
5601         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5602         debugger hooks
5603
5604         * src/hc08/gen.c (genEndFunction, genhc08Code),
5605         * src/hc08/gen.h,
5606         * src/mcs51/gen.c (genEndFunction, gen51Code),
5607         * src/mcs51/gen.h,
5608         * src/ds390/gen.c (genEndFunction, gen390Code),
5609         * src/ds390/gen.h,
5610         * src/z80/gen.c (genEndFunction, genZ80Code),
5611         * src/z80/gen.h,
5612         * src/z80/z80.h,
5613         * src/pic/gen.c (genEndFunction, genpic14Code),
5614         * src/pic/gen.h,
5615         * src/pic16/gen.c (genEndFunction, genpic16Code),
5616         * src/pic16/gen.h,
5617         * src/avr/gen.c (genEndFunction, genAVRCode),
5618         * src/avr/gen.h,
5619         * src/xa51/gen.c (genEndFunction, genXA51Code),
5620         * src/xa51/gen.h,
5621         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5622         specific code to cdbFile.c and out of the backend code generators
5623
5624         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5625         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5626         starting address is now 0
5627
5628         * as/hc08/asm.h,
5629         * as/hc08/m08pst.c,
5630         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5631         assembler directive for DWARF support
5632         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5633
5634         * src/src.dsp,
5635         * src/Makefile.in,
5636         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5637
5638 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5639
5640         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5641         and inappropriate peephole optimization in jump tables
5642
5643 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5644
5645         * as/hc08/m08pst.c,
5646         * src/SDCCglue.c: sdccopt works for the hc08 port now
5647
5648 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5649
5650         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5651
5652 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5653
5654         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5655
5656 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5657
5658         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5659         rules
5660         * src/SDCCmain.c,
5661         * src/SDCCglobl.h,
5662         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5663         comments from the peephole optimizer replacement rules
5664         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5665         symbols
5666         * src/SDCCcse.c (updateSpillLocation),
5667         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5668         equivalents
5669         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5670         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5671         objects far pointers
5672
5673 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5674
5675         * src/SDCCsymt.h: a missing part of my last change
5676         * src/pic/ralloc.c (regTypeNum),
5677         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5678
5679 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5680
5681         * src/SDCCicode.h,
5682         * src/SDCCicode.c (aggrToPtrDclType),
5683         * src/SDCCptropt.h,
5684         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5685         ptrPseudoSymConvert),
5686         * src/pic/ralloc.c (regTypeNum),
5687         * src/pic16/ralloc.c (regTypeNum),
5688         * src/hc08/ralloc.c (regTypeNum),
5689         * src/ds390/ralloc.c (regTypeNum),
5690         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5691         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5692
5693 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5694
5695         * link/z80/lkmain.c (afile),
5696         * as/hc08/lkmain.c (afile),
5697         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5698         prevent a pointer problem when a filename has no directory and
5699         no extension specified.
5700
5701 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5702
5703         * link/z80/lkmain.c (afile): allow periods in directory names
5704         * link/z80/lkmain.c (afile),
5705         * as/mcs51/lkmain.c (afile),
5706         * as/hc08/lkmain.c (afile): allow linker script file to have an
5707         extension other than ".lnk"
5708         * link/z80/lklex.c (getfid),
5709         * link/z80/lkmain.c (parse),
5710         * as/mcs51/lklex.c (getfid),
5711         * as/mcs51/lkmain.c (parse),
5712         * as/hc08/lklex.c (getfid),
5713         * as/hc08/lkmain.c (parse): Support comments in the linker script
5714         file on lines by themselves and after filenames
5715
5716 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5717
5718         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5719
5720 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5721
5722         * src/z80/peeph-z80.def: removed some peephole rules that don't
5723         work with multibyte arithmetic (fixed bug #937126)
5724         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5725         to registers and not global variables
5726         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5727         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5728         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5729         checking for assignments not internally generated (fixed bug #931895)
5730         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5731         structure member (fixed bug #930072)
5732
5733 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5734
5735         * src/SDCCmain.c (linkEdit),
5736         * src/hc08/main.c (_hc08_parseOptions),
5737         * as/hc08/Makefile.in,
5738         * as/hc08/aslink.h,
5739         * as/hc08/asm.h,
5740         * as/hc08/m08pst.c,
5741         * as/hc08/lkrloc.c (relr, rele),
5742         * as/hc08/lkarea.c (lnkarea)
5743         * as/hc08/lkmain.c (afile, parse),
5744         * as/hc08/lkelf.c: support for ELF output
5745         * as/hc08/lks19.c (s19),
5746         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5747
5748 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5749
5750         * as/mcs51/lkihx.c: Fixed bug #899105.
5751
5752 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5753
5754         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5755         .dsp files from Unix to DOS.
5756
5757 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5758
5759         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5760         function pointers; we have been compliant for several months now.
5761         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5762         change that was accidently commented out
5763         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5764         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5765         bug #922319
5766
5767 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5768
5769         * src/hc08/gen.c: output of all of the internal debugging information
5770         is now controlled by the D() macro; it is disabled by default
5771
5772 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5773
5774         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5775         harder to keep the same registers during a CAST iCode
5776         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5777         long via int can be done in a single cast, if the signedness is
5778         correct.
5779         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5780         putchar() in tinibios.c in ds390's library
5781
5782 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5783
5784         * src/SDCCast.c (decorateType): fixed bug #898889,
5785         cast result of a literal complement too
5786         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5787         fixed check for bitfields
5788
5789 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5790
5791         * src/SDCCicode.c (geniCodeLogic): made it static,
5792         (geniCodeLogicAndOr): added in order to fix bug #905492,
5793         (ast2iCode): fixed bug #905492
5794         * support/regression/tests/bug-905492.c: added
5795         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5796         (processParms): fixed bug #927659: don't copy parms, this will clear
5797         decorated flag
5798         * support/regression/tests/bug-927659.c: added
5799
5800 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5801
5802         * src/SDCCast.c (addCast): don't cast float to char
5803         * device/lib/libsdcc.lib: added _memmove
5804
5805 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5806
5807         * device/lib/large/Makefile: fixed parallel execution by
5808         replacing `make` by `$(MAKE)`
5809
5810 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5811
5812         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5813         offsets (fixes bug #923936)
5814
5815 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5816
5817         * device/lib/small/Makefile: fixed parallel execution by
5818         replacing `make` by `$(MAKE)`
5819
5820 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5821
5822         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5823
5824 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5825
5826         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5827         * src/regression/Makefile: Regression test was not running.
5828
5829 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5830
5831         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5832         complement if possible
5833         * src/SDCCval.c (valComplement),
5834         * src/SDCCicode.c (operandOperation): fixed complement of literal
5835         * support/regression/tests/onebyte.c (testComplement): added
5836
5837 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5838
5839         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5840         return an optimized tree; actually replace actParm with the new tree
5841         * src/SDCCast.h: added some parantheses to remove side effects
5842         * support/regression/tests/bug-920866.c
5843
5844 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5845         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5846         Bit operands were not being handled properly in the pic14 port.
5847         (now src/regression/add.c passes again).
5848
5849 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5850
5851         * src/SDCC.y (labeled_statement): case and default no longer require
5852         a following statement (RFE #893037)
5853
5854 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5855
5856         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5857         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5858         disabled (fixes bug #916294)
5859         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5860         "mov a,acc"; patch provided by Lenny Story
5861         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5862
5863 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5864
5865         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5866         functions
5867         * src/ds390/gen.c (genFunction, genEndFunction),
5868         * src/ds390/ralloc.c (ds390_assignRegisters),
5869         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5870         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5871         pushed if there are parameters passed on the stack. Also, a cleaner
5872         way to decide if r0/r1 should be pushed/popped. (Together they fix
5873         bug #918693)
5874
5875 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5876
5877         * doc/sdccman.lyx,
5878         * device/lib/mcs51/crtpagesfr.asm,
5879         * device/lib/mcs51/crtxinit.asm,
5880         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5881         to avoid confusion with Si Lab's SFRPAGE register.
5882
5883 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5884
5885         * src/SDCCglue.c (emitMaps): allow public sfr variables
5886         * src/SDCCglue.c (initialComments): include compiler build date
5887         with compiler version and put the timestamp of the generated
5888         assembly file on a serperate line to be less confusing.
5889         * src/port.h: added genInitStartup hook
5890         * src/avr/main.c,
5891         * src/ds390/main.c,
5892         * src/hc08/main.c,
5893         * src/pic/main.c,
5894         * src/pic16/main.c,
5895         * src/xa51/main.c,
5896         * src/z80/main.c: genInitStartup initialize as NULL (default to
5897         historical behaviour)
5898         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5899         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5900         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5901         library instead of hard coding it into the compiler.
5902         * support/regression/ports/mcs51-stack-auto/spec.mk,
5903         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5904         * device/lib/mcs51/Makefile,
5905         * device/lib/small/Makefile,
5906         * device/lib/large/Makefile,
5907         * device/lib/mcs51/crtpagesfr.asm,
5908         * device/lib/mcs51/crtstart.asm,
5909         * device/lib/mcs51/crtxclear.asm,
5910         * device/lib/mcs51/crtxinit.asm,
5911         * device/lib/mcs51/crtclear.asm,
5912         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5913         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5914         and into user configurable files.
5915         * device/lib/clean.mk: clean mcs51 directory too
5916         * support/regression/tests/longlit.c: added static to T1 declaration
5917         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5918         accesses in the initialization code
5919
5920 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5921
5922         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5923         OSCTRIMVAL as noted in bug #916008
5924
5925 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5926
5927         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5928         in loops with multiple exits (reported as incorrect registers
5929         used by Martin Helmling in Sdcc-user list)
5930
5931 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5932
5933         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5934         made ds390 register extensions look less like error messages
5935
5936 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5937
5938         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5939         reported by Adam Wozniak in Sdcc-user list
5940
5941 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5942
5943         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5944         arithmetic optimizations, added debug output
5945
5946 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5947
5948         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5949         * sdcc.spec: updated and split sdcc into 3 rpms
5950         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5951         needed for literals of LEFT_OP and '+'
5952         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5953         introduced RESULT_TYPE_NOPROM
5954         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5955         left shift
5956         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5957         limited promotion to int only for '*'
5958         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5959
5960 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5961
5962         * src/pic16/gen.c (genSkip),
5963         (genc16bit2lit), (gencjneshort): commented out
5964         (is_LitOp): new helper function, checks operand type
5965         (genCmpEq): rewritten
5966
5967 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5968
5969         * support/regression/tests/bug-908454.c: added
5970
5971 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5972
5973         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5974         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5975         (geniCodeCast): cosmetic, don't preserve bit storage class
5976         (geniCodeLeftShift): added promotion
5977         (geniCodeLogic): fixed regression
5978         * src/SDCCsymt.c (computeTypeOr): accept bits too
5979         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5980
5981 2004-03-07  Borut Razem <borut.razem AT siol.net>
5982
5983         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5984
5985 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5986
5987         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5988         version of pic16_genPackRegisters which does not check if ic is a
5989         CAST operator,
5990         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5991         function cause string1.c regression test fails
5992
5993 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5994
5995         * sim/ucsim/configure.in,
5996         * sim/ucsim/configure,
5997         * sim/ucsim/doc/Makefile.in: use docdir
5998         * src/SDCC.y: fixed sbit atrributes
5999         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6000         * src/SDCCast.c (decorateType): |^& need special promotion handling
6001         * src/SDCCast.h,
6002         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6003         * src/SDCCsymt.h (computeType),
6004         * src/SDCCicode.c: computeType() needs op
6005         * src/SDCCsymt.c (checkTypeSanity),
6006         * doc/sddman.lyx: "plain" bitfields are unsigned
6007         * src/SDCCsymt.c (computeTypeOr): added
6008         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6009         |^& ops
6010         * src/SDCCval.c (val*): computeType() needs op
6011         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6012         * support/regression/tests/onebyte.c: added tests for |^&
6013
6014 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6015
6016         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6017         for writing icode into asm output.
6018
6019 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6020
6021         * src/pic16/device.c: added some debug lines enabled
6022         with macro DEBUG_CHECK,
6023         * src/pic16/genarith.c: more debug in genPlus,
6024         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6025         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6026         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6027         * (aopForSym): onStack symbols are re-placed in data memspace,
6028         and onStack flag is cleared,
6029         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6030         copy temporary pcodeop,
6031         * (genPcall): added warning for not updating PCLATU,
6032         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6033         always true for pic16 port,
6034         * (genMultOneWord): NEW, supports integer multiplication,
6035         * (genMult): modified to call genMultOneWord,
6036         * (ifxForOp): added warning when return NULL,
6037         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6038         flag is set before call to operandFromSymbol for implicit
6039         added structures,
6040         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6041         options.intlong_rent are set by default,
6042         * (_hasNativeMulFor): modified to allow port generation of integer
6043         multiplication,
6044         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6045         set regtype to REG_SFR for all registers, restricting seting the
6046         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6047
6048 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6049
6050         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6051         more than 500 times in the regression tests
6052
6053 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6054
6055         * support/Util/SDCCerr.h,
6056         * support/Util/SDCCerr.c,
6057         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6058         enumerator_list),
6059         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6060         for symbol conflicts.
6061         * support/valdiags/tests/enum.c,
6062         * support/valdiags/tests/tentdecl.c,
6063         * support/valdiags/tests/struct.c: expect possible error messages
6064         referring to original symbol definitions.
6065         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6066         * src/SDCCsymt.h,
6067         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6068
6069 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6070
6071         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6072
6073 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6074
6075         * src/pic16/ralloc.c (newReg): fixed bug #908929
6076
6077 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6078
6079         * src/ds390/gen.c: added missing #include "main.h"
6080
6081 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6082
6083         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6084         checking if symbol is already in set,
6085         * src/pic16/device.h: prototype for checkAddSym,
6086         * src/pic16/gen.c: (_G): added entry interruptvector,
6087         * (assignResultValue): removed some commented out lines,
6088         * (genFunction): check for ISR via sym->type, absolute section for
6089         interrupt code is created via a new pBlock, the goto instruction is
6090         placed now correctly at the interrupt vector position, changed all
6091         references from ivec to _G.interruptvector,
6092         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6093         is the interrupt is a high priority one, same for return from ISR,
6094         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6095         externs to calls of checkAddSym,
6096         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6097         pic16_pcode_verbose flag is set,
6098         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6099         * src/pic16/pcoderegs.c: message about how many registers are saved
6100         will only be emitted if pic16_pcode_verbose flag is set,
6101
6102 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6103
6104         * src/ds390/ralloc.h,
6105         * src/ds390/ralloc.c (ds390_regWithIdx),
6106         * src/ds390/gen.c (emitcode),
6107         * src/ds390/main.h,
6108         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6109         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6110         ds390operandCompare, getRegsRead, getRegsWritten,
6111         initializeAsmLineNode): customized instruction size calculation for
6112         ds390, started basis for some register optimizations
6113         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6114         corresponding assembly output
6115         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6116         missing push/pop of r0/r1. Optimized push/pops
6117
6118 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6119
6120         * src/mcs51/main.c (instructionSize): fixed ACALL size
6121         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6122
6123 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6124
6125         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6126         the sorting of rlist with NULL elements
6127         * (print_idataType, print_idata): NEW to create idata sections
6128         * src/pic16/device.h: idataSymSet new variable
6129         * src/pic16/gen.c (genFunction): fixed some bugs in string
6130         comparing, improved the absolute section creation for ISRs,
6131         added FSR0L/FSR0H in registers that are saved in an ISR,
6132         * (genInline): fixed the processing of inline snippets,
6133         now they undergo no process by the peephole optimizer
6134         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6135         are placed in idataSymSet,
6136         * (pic16emitStaticSeg): extern symbols are added in externs,
6137         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6138         switching when aboslute variables are placed in access bank memory
6139         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6140         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6141         commented out with #if,
6142         * (pic16_packRegisters): reintroduce the check for CAST because some
6143         symbols are not correctly handled,
6144         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6145         pCodeInstruction instead of pCode,
6146         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6147         pCodeAsmDir definition,
6148         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6149         directive, then the argument directive is emitted without the leading
6150         tab, hack for inline labels which must be in the first column,
6151         * (compareLabel,pic16_findNextInstruction),
6152         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6153         * (insertBankSwitch): modified for the new pCodeAsmDir,
6154
6155 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6156         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6157
6158         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6159         instance,
6160         * (pushSide): commented out with #if,
6161         * (assignResultValue): fixed some typos in saving
6162         registers,
6163         * (genPcall): FIXED and sync'ed with genCall,
6164         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6165         * (genNearPointerGet): fixed to handle some more cases,
6166         implementation scheme via table reads,
6167         * (genConstPointerGet): modified to access code memory correct,
6168         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6169         and improved to handle some cases
6170         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6171         instead of "RETLW" for init data
6172         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6173         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6174         variables are placed in access bank memory (<0x80 and >=0xf80),
6175         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6176         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6177         TBLWT_POSTDEC,TBLWT_PREINC
6178         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6179         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6180         directives
6181         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6182         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6183         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6184         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6185
6186 2004-02-29  Borut Razem <borut.razem AT siol.net>
6187
6188         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6189         support/Util/findme.h, support/Util/system.h: enhance binary relative
6190         search for lib and include by using findProgramPath()
6191
6192 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6193
6194         * src/SDCCpeeph.h,
6195         * src/SDCCpeeph.c (pcDistance),
6196         * src/port.h,
6197         * src/mcs51/ralloc.h,
6198         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6199         * src/mcs51/main.h,
6200         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6201         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6202         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6203         size calculation port specific, started basis for some register
6204         optimizations
6205         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6206         missing push/pop of r0/r1. Optimized push/pops
6207         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6208         * device/lib/_modsint.c (_modsint),
6209         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6210         and stack version so regression tests pass
6211
6212 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6213
6214         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6215         * src/SDCCast.c (decorateType): catch another small optimization
6216         with '?' operator
6217         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6218         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6219         modified to finally use computeType() all over SDCC,
6220         see Feature Request #877103
6221         * src/SDCCval.h: cosmetic
6222         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6223         valCompare(); regression tested in muldiv.c
6224         * support/regression/tests/muldiv.c (testMod): mod sign follows
6225         dividend only
6226
6227 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6228
6229         * src/SDCCast.c (decorateType): fixed bug #902362
6230         * doc/INSTALL.txt: fixed install instructions for win32
6231
6232 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6233
6234         * device/include/Makefile.in (install): fixed by replacing spaces
6235         by tabs
6236         * doc/README.txt,
6237         * doc/INSTALL.txt: updated for release
6238         * doc/sdccman.lyx: added warning for --xstack being buggy
6239
6240 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6241
6242         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6243         to eliminate build warnings.
6244         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6245
6246 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6247            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6248
6249         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6250         removed -penable-stack, added comment for stack pragma, added
6251         warning for not initializing the stack/frame registers, removed
6252         comment at interrupts section
6253
6254         Stack is made permanent, there is no ability to disable stack usage.
6255         * src/pic16/device.h,
6256         * src/pic16/device.c: removed all references to USE_STACK macro,
6257         * src/pic16/device.c (pic16_dump_section): when no elements in
6258         rlist, free rlist before return,
6259         * (pic16_dump_int_registers): NEW, internal registers are a new set
6260         of general purpose registers reused by each function,
6261         * (checkAddReg): returns 1 if registers is added to set,
6262         * (pic16_groupRegistersInSection): when a registers is of type
6263         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6264         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6265         SRCASECMP macro is moved here from device.c
6266         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6267         PO_PCLATU, PO_PRODL, PO_PRODH,
6268         * (pic16_pCodeOpType, genMinus,
6269         changed compares to "a" register, with AOP_ACC,
6270         * (pic16_genPlus): fixed some bugs and indented properly,
6271         * (pic16_addSign): changed size to size+offset in the MOVWF
6272         instruction,
6273         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6274         multiply 8-bit operand by literal, result is 8-bit,
6275         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6276         multiply 2 8-bit operand, result is 8-bit,
6277         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6278         genUMult8X*_16,
6279         * src/pic16/gen.c: changed accUse to contain WREG only,
6280         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6281         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6282         true, do not use immediate addressing any more unless sym is a
6283         pointer in codespace,
6284         * (aopForRemat): do not use immediate addressing when symbol not in
6285         codespace and when symbol's address is requested,
6286         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6287         accUse size (= 1),
6288         * (aopGet): added case for AOP_ACC and don't return "accumulator
6289         bug" but WREG instead,
6290         * (popGetTempReg): pushes contents of temporary register in stack,
6291         * (popReleaseTempReg): pops contents of temporary register from
6292         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6293         * (pic16_popGet): separated case AOP_ACC to return register WREG
6294         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6295         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6296         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6297         the use of immediate pointers to certain cases only.
6298
6299         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6300         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6301         * (assignResultValue, genCall, genRet): modified to use the new
6302         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6303         genPcall is still broken,
6304         * (genFunction): added code to create 'A' type pBlocks when
6305         interrupt functions are generated, code not extensively tested yet,
6306         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6307         * (genEndFunction): modified so ISRs pop stored registers from stack,
6308         * (genMultOneByte): cleanup,
6309         * (AccRsh): added flag andmask, to and result with appropriate mask,
6310         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6311         * (genDataPointerGet): fixed and reenabled its use,
6312         * (genNearDataPointerGet): bugs fixed,
6313         * (genDataPointerSet): bugs fixed,
6314         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6315         pic16_DumpSymbol, pic16_DumpOp,
6316         * src/pic16/genutils.h: function prototypes for the above functions,
6317         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6318         pointers,
6319         * (pic16emitRegularMap): many many many improvements, but needs a
6320         major cleanup,
6321         * src/pic16/main.c: enable_stack in pic16_options is removed,
6322         * (_pic16_parseOptions): removed command line options -penable-stack,
6323         * (_process_pragma): emit stack symbol only when stack pragma is
6324         processed,
6325         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6326         redirected to FSR0L/FSR0H pair,
6327         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6328         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6329         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6330         for immediates,
6331         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6332         * (dumpPicOptype): NEW,
6333         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6334         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6335         with movff instruction,
6336         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6337         added pic16_int_regs, some packRegsFor* functions are commented out,
6338         because produce errors,
6339         * src/pic16/NOTES: minor modifications
6340
6341 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6342
6343         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6344         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6345         --pack-iram.
6346         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6347         * as/mcs51/lkaomf51.c: fixed bug #895763
6348
6349 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6350
6351         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6352
6353 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6354
6355         * doc/sdccman.lyx: added details about the HC08 storage classes and
6356         interrupts, fixed the register usage info for z80 & gbz80
6357
6358 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6359
6360         * doc/sdccman.lyx: added more pic16 port documentation
6361         * device/include/pic16/: added header pic18fregs.h
6362
6363 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6364
6365         * doc/sdccman.lyx: added Vangelis' contribution
6366
6367 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6368
6369         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6370         extend to the next CALL or PCALL, not just to the next CALL.
6371
6372 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6373
6374         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6375
6376 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6377
6378         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6379         bug #895752 and a better fix for bug #716790
6380
6381 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6382
6383         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6384
6385 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6386
6387         * doc/sdccman.lyx: minor changes, minor changed
6388
6389 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6390
6391         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6392         which can't handle SDCC_NEWONEBYTEOPS,
6393         (geniCodeMultiply): removed conversion from mult to shift for pic14
6394         and pic16
6395
6396 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6397
6398         * src/hc08/gen.h,
6399         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6400         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6401         thus fixing bug #895406
6402
6403 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6404
6405         * device/lib/_modsint.c,
6406         * device/lib/_modslong.c: sign follows divisor only
6407         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6408         signs or signedness can be ignored
6409         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6410         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6411         added optimization for IFX,
6412         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6413         arguments;
6414         reenabled optimization for IFX, which was removed on 2004-01-11
6415         * src/SDCCast.h: added return type IFX
6416         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6417         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6418         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6419         SDCC_OLDONEBYTEOPS selects the old behaviour
6420         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6421         changed again and commented promotion rule
6422         * src/SDCCval.c (valDiv): promotion no longer necessary
6423         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6424         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6425         rewritten
6426         * support/regression/tests/onebyte.c: added
6427
6428 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6429
6430         * gen.c (genInline): reverted to old code for assemnling inline
6431         code because of bug reported James Chadd
6432
6433 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6434
6435         * ralloc.h: missing declarations from previous patch,
6436         seems that patch for ralloc.h was never applied, fixed
6437
6438 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6439            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6440
6441         * pcode.c,
6442         * pcode.h,
6443         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6444         indirect addressing. Marked FSR0 as deprecated
6445         * gen.c (pointerCode): commented out, not needed now
6446         (pic16_popGet2p): new MOVFF helper function
6447         (genGenPointerGet),
6448         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6449         (shiftRLong): removed duplicate debugging info
6450
6451 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6452
6453         * src/ds390/gen.c (genNearPointerGet),
6454         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6455         optimization with bits, but not bitfields.
6456         * src/ds390/ralloc.c (packRegisters),
6457         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6458
6459 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6460
6461         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6462
6463 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6464
6465         * src/SDCCsymt.h,
6466         * src/SDCCicode.c (operandFromSymbol),
6467         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6468         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6469         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6470         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6471         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6472         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6473         bug #892038
6474         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6475         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6476         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6477         * src/SDCCsymt.c (newSymbol),
6478         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6479         enumerator_list),
6480         * src/SDCCval.h,
6481         * src/SDCCval.c (newiList): fixed bug #885705
6482
6483 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6484
6485         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6486         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6487
6488 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6489
6490         * device/include/c8051f120.h,
6491         * device/include/c8051f300.h,
6492         * device/include/c8051f310.h: added/updated header files for Silicon
6493         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6494         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6495         in new section Submitting patches
6496
6497 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6498
6499         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6500         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6501         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6502         genGenPointerSet),
6503         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6504         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6505         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6506         genGenPointerSet),
6507         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6508         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6509         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6510         genGenPointerSet),
6511         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6512         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6513         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6514         genGenPointerSet): fixed bug #892400
6515         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6516         to eliminate build warnings.
6517         * src/SDCCast.c (processParms),
6518         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6519         fixed bug 751859
6520         * support/valdiag/valdiag.py: added GCC to the list of defines active
6521         when compiling with gcc
6522
6523 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6524
6525         * support/Util/SDCCerr.h,
6526         * support/Util/SDCCerr.c,
6527         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6528         with an incomplete type (fixed bug #883734)
6529         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6530
6531 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6532
6533         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6534
6535 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6536
6537         * src/SDCCast.c (decorateType),
6538         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6539         function pointer implementation
6540         * support/regression/tests/funptrs.c: added tests to verify both forms
6541         of function pointers work correctly. Added tests to verify parameters
6542         are passed in the correct order.
6543
6544 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6545
6546         * device.c (regCompare): registers are sorted by ascending
6547         address and increasing size,
6548         * main.c (_pic16_finaliseOptions): removed the declaration
6549         of compiler macro MCU. Now a macro of the format pic18fxxxx
6550         will be defined from the command line
6551
6552 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6553             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6554
6555         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6556         PCOP_RLCF was overwritten!
6557         * gen.c (genSkip): commented out calls to pic16_emitcode,
6558         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6559         * (genlshTwo),
6560         * (genRRC): added debugging info,
6561         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6562         overwritten while shifting,
6563         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6564         overwritten while shifting,
6565         * (AccLsh),
6566         * (AccRsh),
6567         * (shiftLLeftOrResult),
6568         * (shiftRLeftOrResult),
6569         * (shiftRLong),
6570         * (shiftLLong): Implemented with pic16_emitpcode
6571         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6572         * (genLeftShift): Fixed bug, operand for shift by variable always
6573         was "and"ed with 0x0f,
6574         * (genLeftShiftLiteral),
6575         * (genrshTwo),
6576         * (genRightShiftLiteral): added debugging info,
6577         * (genrshFour): added comment,
6578         * (genRightShift): determined signedness from operand "left"
6579         instead of "result"
6580
6581 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6582
6583         * src/SDCCicode.c (geniCodeParms),
6584         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6585         function pointers, fixed function pointer bugs #861242 and #861896
6586
6587 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6588
6589         * device/include/c8051f000.h,
6590         * device/include/c8051f120.h,
6591         * device/include/c8051f300.h: added header files for Silicon
6592         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6593
6594 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6595
6596         * src/SDCCast.c (processParams): added new type flow and restructured
6597         (gatherAutoInit): added new type flow
6598         (addCast): cosmetic changes
6599         (getLeftResultType): added new type flow for array indices, patch
6600         provided by Stas, see FR #877103
6601         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6602         array index patch by Stas
6603         * src/SDCCast.h: added prototype getResultTypeFromType()
6604         * src/SDCCval.h,
6605         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6606         * src/pic/glue.c (pic14emitStaticSeg),
6607         * src/pic16/glue.c (pic16emitStaticSeg),
6608         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6609         for initialization of symbols
6610         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6611         * support/Util/SDCCerr.h:
6612         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6613         * .version: bumped version number to 2.3.8
6614         * device/include/Makefile.in (install),
6615         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6616         avoid warnings
6617
6618 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6619
6620         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6621         Slade Rich fixed an optimization bug
6622         * src/pic/pcodepeep.c,
6623         * src/pic/pcoderegs.c
6624         * doc/Makefile (install): added test for directory
6625
6626 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6627
6628         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6629         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6630         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6631         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6632         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6633         * as/mcs51/asexpr.c (term),
6634         * as/hc08/asexpr.c (term): fixed bug #887146
6635
6636 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6637
6638         * src/z80/gen.c (genMult): handle single byte result product
6639         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6640         DUMMY_READ_VOLATILE (fixed bug #886367)
6641
6642 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6643
6644         * support/regression/tests/libmullong.c: fixed logic, on little endian
6645         hosts we ended without a mullong_wrapper()
6646
6647 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6648
6649         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6650         virus/worm forged address usage.
6651
6652 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6653
6654         Fixed promotion, it should be done on AST level:
6655         * src/SDCCast.c (addCast): added promotion to int
6656         (decorateType): updated call to upCast()
6657         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6658         usualUnaryConversions()
6659
6660 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6661
6662         * support/regression/tests/literalop.c (mulWrapper): Added a
6663         wrapper to remove integer overflow warnings.
6664
6665         * support/regression/tests/float_trans.c: Made work on host.
6666
6667         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6668         location of sz80.
6669
6670         * support/regression/generate-cases.py (main): Changed from inline
6671         to a main method.
6672
6673         * doc/Makefile (install): Changed to depth first to get rid of
6674         missing directory install warning.
6675
6676         * as/Makefile (install-doc): Made work on Mac.
6677
6678 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6679
6680         * src/SDCCast.c: added an additional type flow in decorateType() of
6681         opposite direction, see feature request #860006; it's enabled at runtime
6682         by setting the environment variable SDCC_NEWTYPEFLOW
6683         * src/SDCCast.h: changed prototype of decorateType()
6684         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6685         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6686         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6687         see feature request #877103
6688         * src/SDCCval.c: updated call of decorateType()
6689         (valBitwise): fixed bug #882876
6690         (valMinus): added promotion
6691         (valLogicAndOr): result is unsigned
6692         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6693         * src/SDCCsymt.c (computeType),
6694         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6695         must not cause an unsigned operation
6696         * src/pic/glue (pic14emitRegularMap),
6697         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6698
6699 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6700
6701         * src/pic/pcode.c (PCodeID): commented out left over debug code
6702
6703 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6704
6705         * support/valdiag/tests/overflow.c: added shift tests
6706         * src/pic/device.c,
6707         * src/pic/gen.c,
6708         * src/pic/gen.h,
6709         * src/pic/glue.c,
6710         * src/pic/main.c,
6711         * src/pic/pcode.c,
6712         * src/pic/pcode.h,
6713         * src/pic/pcodepeep.c,
6714         * src/pic/pcoderegs.c,
6715         * src/pic/ralloc.c,
6716         * src/pic/ralloc.h: applied patch from Slade Rich;
6717         added support for multiple code pages and multiple RAM banks on the
6718         PIC 14 port. The ASM files now no longer simply assume all the
6719         code / RAM are in the same page / bank. This means the linker can
6720         safely allocate code/RAM of separate ASM files to different pages/banks.
6721         * doc/sdccman.lyx: added Slade's tips
6722         * src/mcs51/peeph.def: fixed bug #880768
6723
6724 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6725
6726         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6727         * src/SDCCast.c (decorateType): fixed bug #880197
6728
6729 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6730
6731         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6732         getopt.h.
6733
6734         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6735         strtof is not part of C89 and isn't included with Mac OS X.
6736
6737 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6738
6739         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6740         shiftL2Left2Result): fixed bug #879326
6741         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6742         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6743         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6744         address fetch for clr instruction
6745         * device/lib/hc08/_mulint.c: created optimized assembly version
6746         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6747
6748 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6749
6750         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6751         proposed in FR #877103
6752
6753 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6754
6755         * src/SDCCval.c (cheapestVal): added missing checks
6756         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6757         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6758
6759 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6760
6761         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6762         equal operands
6763
6764 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6765
6766         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6767         loaded with the linker search paths (-L arguments) and the libraries
6768         to be linked with the current source (-l arguments). Changes
6769         currently will affect only the pic16 port.
6770         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6771         include path the port specific paths and port specific libraries,
6772         * gplink command now contains the $3 argument,
6773         * src/pic16/device.h,
6774         * src/pic16/device.c,: structure PIC_device is made public and
6775         renamed to PIC16_device, the same for variable Pics which is renamed
6776         to Pics16. Updated all references to them.
6777         * src/pic16/glue.c (pic16glue): corrected bug with code
6778         initialization which bypassed the variable initializations block.
6779
6780         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6781         COMPILE_FLAGS and added the --nostdinc option
6782
6783 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6784
6785         * device/include/mc68hc908jb8.h: Register defs for another member
6786         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6787
6788 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6789
6790         Documenting changes from previous commits.
6791         * configure.in (version 1.56),
6792         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6793         when generating output files to configure the pic16 library,
6794         but now I've commented it out, since gputils aren't installed in the
6795         SF compile farm, so library won't compile
6796
6797         * device/lib/Makefile.in (version 1.56): initially I've added in
6798         target 'all' the prerequestive 'model-pic16' so it compiled the
6799         pic16 library, but now I've commented it out for the same reasons
6800         above,
6801         * added targets 'model-pic16' and 'objects-pic16' to compile the
6802         library
6803         * added target 'port-specific-objects-pic16' to handle the
6804         generated libraries and copy them into the build/ directory
6805         * added target 'clean-intermediate-pic16' to clean intermediate
6806         files into pic16 directory
6807         * in target 'installdirs' added line to create directory pic16 in
6808         the installation path
6809
6810         * device/include/Makefile.in (version 1.11): in target 'install'
6811         added lines to copy all header files to installation path,
6812         * in target 'installdirs' added line create directory for pic16
6813         headers in the installation path
6814
6815 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6816
6817         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6818          a function call
6819
6820 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6821
6822         * configure,
6823         * device/lib/configure.in,
6824         * device/lib/configure: fixed for autoconf 2.57
6825
6826 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6827
6828         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6829         option so that it actually works. Made it specific to the z80, since
6830         the gbz80 doesn't have these kinds of I/O ports.
6831
6832 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6833
6834         * device/include/z180.h,
6835         * device/lib/_memcpy.c,
6836         * device/lib/_memmove.c,
6837         * device/lib/_mulint.c,
6838         * device/lib/ser_ir.c,
6839         * device/lib/ser_ir_cts_rts.c,
6840         * device/lib/_strcmp.c,
6841         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6842         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6843         portmode; added deprecation warning for bank= and protmode= forms.
6844         Also, guard against buffer overflow.
6845         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6846
6847 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6848
6849         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6850         changed interrupt vector table generation to only emit declared vectors.
6851         * device/include/Makefile.in: added missing backslash
6852         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6853
6854 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6855
6856         Mainly changes to support compilation of the device libraries
6857         * src/pic16/device.c: stack is allocated via symbol and not
6858         via literal number. The symbol is placed in the corresponding
6859         position of the data ram
6860         * (pic16_dump_section): relocatable and absolute uninitialized
6861         data are now emitted in sorted order to reduce section naming,
6862         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6863         weren't marked as being in the access bank,
6864
6865 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6866
6867         Added portion of GNU PIC Library under the directory
6868         device/include/pic16 and device/lib/pic16. These files
6869         contain the declarations of SFRs for the PIC18Fxx2 devices.
6870         The directory is initialized via configure from toplevel.
6871
6872 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6873
6874         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6875         the spilllocations to be compared correctly
6876
6877 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6878
6879         * src/SDCCast.c (decorateType): fixed bug introduced today
6880
6881 2004-01-12  Borut Razem <borut.razem AT siol.net>
6882
6883         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6884         doc/sdccman.lyx: upper case pragmas are deprecated
6885
6886 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6887
6888         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6889         in simpler and even better code
6890
6891 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6892
6893         * src/SDCCicode.c (operandOperation): fixed bug #874819
6894         * src/SDCCast.c (decorateType): fixed
6895         char foo (unsigned long ul) { return ul > 0; }
6896
6897 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6898
6899         * doc/sdccman.lyx: Moved and added some sections, small changes
6900         all over. Telling LaTeX to be less strict with word spacing
6901         to better keep the right margin. Changed some notes about
6902         maintainance of the ports in section 3.2.1 - is it OK like this?
6903
6904 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6905
6906         SDCC source changes:
6907         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6908         convilong): modified to inform the pic16 port that builtin functions
6909         are external
6910
6911         PIC16 PORT specific changes:
6912         * src/pic16/device.c pic16_dump_equates() added,
6913         processor registers declared internally by the port are emitted in
6914         the translation as equates,
6915         * src/pic16/gen.c: inline code is passed unprocessed to the
6916         translation,
6917         * (pic16_popGetLit2): fnuction modified to take second operand as
6918         pCodeOp pointer and not as literal,
6919         * (popRegFromIdx): prefixed with pic16_,
6920         * (pic16_popCombine2): modified to receive already allocated pCode
6921         operands,
6922         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6923         * (genFunction): initializes local stack frame and pushes on stack
6924         all the registers used by this function,
6925         * (genEndFunction): restores all registers from stack and restores
6926         stack frame,
6927         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6928         improvements,
6929         * (pic16glue): changed the program startup sequence,
6930         * added new dbName code 'A' for functions placed in absolute section
6931         * src/pic16/main.c: added function attribute _naked,
6932         * added pragma 'code' to place a fnuction at an absolute address,
6933         * added command line arguments --debug-ralloc and --pcode-verbose,
6934         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6935         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6936         * (pic16_newpCodeOpLit2): modified to take the second operand as
6937         pCodeOp pointer,
6938         * (pic16_printpBlock): modified to emit each function in a separate
6939         section,
6940         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6941         UPPER for immediate operands,
6942         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6943         instruction,
6944         * src/pic16/peeph.def: all peepholes with movff are commented out,
6945         because there is a problem in the pcode peep optimizer,
6946         * src/pic16/ralloc.c: the register allocator can now reuse local
6947         function symbols for another function. This saves register usage.
6948         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6949
6950         Added file src/pic16/NOTES with information about program writing on
6951         the current port version.
6952
6953 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6954
6955         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6956         and peephole 252 (array access)
6957
6958 2004-01-09  Borut Razem <borut.razem AT siol.net>
6959
6960         * src/SDCCmain.c : fixed #872250: -l command line defined library
6961           files are scanned before standard library files
6962
6963 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6964
6965         * src/SDCCast.c (decorateType): fixed bug #874046
6966
6967 2004-01-09  Borut Razem <borut.razem AT siol.net>
6968
6969         * support/scripts/sdcc.nsi: remove previous installation
6970
6971 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6972
6973         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6974         bytes for last interrupt vector (mcs51)
6975         * sdcc.spec: fixed typo
6976
6977 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6978
6979         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6980         gen51Code): more efficient parameter receive for --model-large
6981         ("bug" #845294)
6982
6983 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6984
6985         * src/ds390/main.c,
6986         * src/z80/main.c: added missed needLinkerScript flags (more than
6987         one port structure defined in these file)
6988         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6989         bug #795325
6990
6991 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6992
6993         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6994         * src/port.h: added flag needLinkerScript in port->linker
6995         structure to inform whether to create a .lnk file or not,
6996         * src/avr/main.c,
6997         * src/ds390/main.c,
6998         * src/hc08/main.c,
6999         * src/mcs51/main.c,
7000         * src/pic/main.c,
7001         * src/pic16/main.c,
7002         * src/xa51/main.c,
7003         * src/z80/main.c: changed appropriately to configure
7004         needLinkerScript flag
7005         * src/pic/gen.c,
7006         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7007         * src/pic/glue.c: added variable udata_section_name to
7008         override default uninitialized data segment definition for
7009         devices only with SHAREBANK memory (reported from Erik Epetrich)
7010         * (pic14emitOverlay): modified to emit a commented overlay segment
7011         directive when no overlay data exist
7012         * (picglue): modified to emit uninitialized data segment
7013         according to udata_section_name
7014         * src/pic/main.c (_pic14_parseOptions): added command line
7015         options --udata-section-name=[name] to override default
7016         udata definition name
7017         * modified _linkCmd and _asmCmd to include compiler passed
7018         arguments via -W option
7019         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7020         object file from '.rel' to '.o' in port->linker structure,
7021         changed size of fptr from 2 to 3 in port structure
7022
7023 2004-01-07  Borut Razem <borut.razem AT siol.net>
7024
7025         * support/scripts/sdcc.nsi: update PATH
7026         * support/scripts/sdcc.ico: craeted
7027
7028 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7029
7030         * device/include/Makefile.in: fix install
7031         * doc/Makefile: fix install
7032
7033 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7034
7035         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7036         in bug #860505
7037         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7038         how the function variable allocation summary is displayed; also
7039         include information about variables allocated to the overlay
7040         segment
7041
7042 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7043
7044         * as/mcs51/lkmain.c: Help about -Y option
7045         * as/mcs51/lkarea.c: Fixed gcc warnings
7046
7047 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7048
7049         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7050         fixed warning
7051         * support/valdiag/tests/overflow.c: added
7052         * src/SDCCast.c (decorateType),
7053         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7054         LEFT_OP (left shift)
7055
7056 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7057
7058         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7059         (default behaviour).
7060
7061 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7062
7063         A python script to validate compiler diagnostic messages. It can be
7064         used to verify that sdcc complains about bad c source code and
7065         gives a good location of the error.
7066         * support/valdiag/Makefile,
7067         * support/valdiag/valdiag.py,
7068         * support/valdiag/tests/*
7069
7070 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7071
7072         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7073         * src/SDCCsymt.c (newEnumType),
7074         * src/SDCCsymt.h
7075         * support/Util/SDCCerr.c,
7076         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7077         enum related bugs.
7078         * support/regression/tests/enum.c: added test for enum values that
7079         require at least 2 bytes of storage.
7080
7081 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7082
7083         * src/common.h: added ifndef/define/endif macros
7084         around the header file.
7085         Bug reported from Jesus Calvino-Fraga
7086
7087 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7088
7089         * sdcc.spec: updated
7090         * device/include/Makefile.in: don't install CVS directories
7091         * device/lib/Makefile.in: added removal of CVS directories after install
7092         * doc/Makefile: fixed install, added local_icons
7093         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7094         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7095         * src/ds390/gen.c (genRightShift): fixed bug #870788
7096         * src/SDCCast.c (decorateType): fixed bug #870781
7097
7098 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7099
7100         PIC16 port related changes:
7101         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7102         added variable stackPos,
7103
7104         * gen.c: genCall, assignResultValue: added support for
7105         pushing/retrieving function parameters to/from stack,
7106         genFunction,genEndFunction: setup stack frame for the
7107         generated function,
7108         genAddrOf: will be changed according to bug 863624
7109
7110         * added files genutils.c and genutils.h which contain gen*
7111         debugged and optimised functions extracted from gen.c
7112
7113         * glue.c: added variable 'externs' which holds extern symbols,
7114         pic16emitRegularMap: is modified to properly handle relocatable
7115          symbols under the new scheme,
7116         pic16createInterruptVect: is modified
7117         pic16printPublics: is modified to emit 'global' assembler directives,
7118         added pic16_printExterns to print extern symbols,
7119         pic16glue: initializes stack/frame pointer in the beginning of
7120         the assembly output. Temporary hack, will be corrected later,
7121         because gplink yet does not support stack and SDCC does not
7122         yet support a type of crt0.o object to create the final binary.
7123
7124         * Removed many lines that contain 8051 legacy code.
7125         * The code is finally placed under a 'code' directive.
7126         * Added port specific options.
7127
7128         * _process_pragma: simplified since now we do not need *special*
7129         include file to define SFR registers. But a separate header
7130         will be needed. This will be developed later.
7131         * _pic16_parseOptions: added, parses port specific options:
7132         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7133         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7134         --preplace-udata-with=
7135
7136         * _pic16_setDefaultOptions: modified to initialize section names,
7137         but hack is temporarly out of order since it needs improvement.
7138         * _pic16_genAssemblerPreamble: configuration words are emitted by
7139         their address instead of their name. This part is incomplete and
7140         supports only the 18Fxx2 devices. Other devices will emit an error
7141         during assembly since they do not contain the same set of config
7142         registers
7143         * _pic16_genIVT: is modified,
7144
7145         * pcode.c: added definitions for some hardware registers that are needed
7146         for stack support
7147         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7148         All PCI entries are updated. Now LFSR is supported.
7149         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7150         * added pic16_newpCodeOpLit2 to support instructions with
7151         two literal arguments
7152         * pic16_pCode2str: corrected code that emits assembler instructions
7153         with two literal operands and those that have an access bit modifier
7154         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7155         this fixes a bug which caused some labels to be lost, when an
7156         assembler directive was added, i.e. banksel,
7157         * pic16_FixRegisterBanking: improved logic that causes the insertion
7158         of bank switching,
7159         * InlineFunction: functions that are called once, are not any more
7160         inlined. This can be a port option in the future,
7161
7162         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7163
7164         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7165         hold the corresponding uninitialized symbols,
7166         * pic16_allocProcessorRegister: registers have explicit marked the
7167         accessBank field,
7168         * pic16_allocInternalRegister: registers are explicit marked as
7169         not used,
7170         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7171         processing list, so bit registers were lost,
7172         *
7173
7174         * ralloc.h: added field 'accessBank' and original symbol operand
7175         in register definition,
7176         * removed the field isMapped from register definition,
7177
7178         ** Several functions have been removed from various sources:
7179         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7180         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7181         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7182         pic16_assignRelocatableRegisters
7183
7184         ** others have been introduced:
7185         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7186         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7187
7188 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7189
7190         * support/scripts/inc2h.pl: changed definition of BIT_AT
7191         to emit 'sbit at' instead of 'bit at'. This was a request.
7192
7193         PIC16 port related preliminary changes:
7194         * gen.c: prefixed function popRegFromString with
7195         pic16_ and all references to it corrected
7196         * pcode.c: all pic16_pc_* hardware registers prefixed
7197         with underscore (_),
7198         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7199         * ralloc.c: newReg(): when register is REG_SFR then
7200         set address to rIdx,
7201         pic16_allocProcessorRegister(): marks register wasUsed=0
7202         pic16_writeUsedRegs(): added a call to assign processor
7203         registers via pic16_assignFixedRegisters
7204
7205 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7206
7207         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7208         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7209         variables in unused register banks.  Also the SSEG is placed
7210         wherever there is enough space for it, and IDATA can be anywhere
7211         in internal RAM.  For now compile using -Wl-Y[stack_size].
7212         The mem file is different for this option as well, since it
7213         makes no sense of talking about DSEG lenght.
7214
7215 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7216
7217         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7218         in certain cases, e.g. when ROM assignment, patch provided
7219         from Albert den Haan.
7220
7221 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7222
7223         Many signedness and type propagation fixes:
7224         * src/SDCCicode.c: made geniCodeCast() static
7225         replaced SPEC_ by IS_ (cosmetic)
7226         (operandOperation): fixed div and mod operation
7227         (usualBinaryConversions): added support for promotion of char
7228         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7229         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7230         (geniCodeAdd): an array index will stay unsigned, even if promoted
7231         from char to int
7232         (geniCodeArray): ditto
7233         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7234         * src/SDCCsymt.c (computeType): added more support for char;
7235         promotion of char is selectable by promoteCharToInt, fixed signedness
7236         for all cases
7237         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7238         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7239         * src/SDCCval (val*): replaced signedness calculation by
7240         computeType()
7241         rearranged if-branches (cosmetic)
7242         (valShift): added warning W_SHIFT_CHANGED
7243         (valCompare): fixed problem with different types
7244         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7245         * support/regression/tests/literalop.c: added many cases
7246         * support/regression/tests/ast_constant_folding.c: changed finally to
7247         'unsigned int'
7248         * .version: new year, new version: 2.3.7
7249         * src/SDCCmain.c (main): applied patch #866468
7250         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7251         provided by Scott Bronson
7252         * doc/sdccman.lyx: updated documentation for sdcdb
7253         updated and added chapter tips
7254
7255 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7256
7257         * src/SDCCsymt.h: missing from yesterday's commits
7258
7259 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7260
7261         * src/SDCC.y (struct_or_union_specifier),
7262         * support/Util/SDCCerr.c,
7263         * support/Util/SDCCerr.h: verify that struct & union tags are used
7264         as declared.
7265
7266 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7267
7268         * src/SDCCglobl.h: missing from yesterday's commits
7269
7270 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7271
7272         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7273         sft_attributes, struct_declaration, parameter_declaration,
7274         type_name, start_block, declaration_list),
7275         * src/SDCC.lex (check_type): support redefinition of typedef names
7276
7277 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7278
7279         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7280         aligned xdata arrays. Erik helped me with the if clause.
7281
7282 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7283
7284         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7285         warning
7286
7287 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7288
7289         * src/SDCCast.h,
7290         * src/SDCCast.c (newAst_),
7291         * src/SDCCicode.h,
7292         * src/SDCCicode.c (ast2iCode, newiCode),
7293         * src/SDCCglobl.h,
7294         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7295         expr, statement, expression_statement, selection_statement,
7296         iteration_statement, expr_opt, jump_statement): foundation for tracking
7297         sequence points
7298         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7299         point code too)
7300
7301 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7302
7303         * support/Util/SDCCerr.c,
7304         * src/SDCCast.h,
7305         * src/SDCCast.c (createCase, createDefault, decorateType),
7306         * src/SDCClabel.c (labelUnreach),
7307         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7308         to error messages.
7309         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7310         (with thanks to Stas Sergeev)
7311         * device/include/time.h,
7312         * device/lib/time.c (CheckTime): suppress unreachable code warning
7313
7314 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7315
7316         * src/SDCCast.c (createIvalCharPtr),
7317         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7318         bug #753752)
7319         * support/regression/tests/nullstring.c: tests for these two bugs
7320
7321 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7322
7323         * support/Util/SDCCerr.h,
7324         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7325         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7326         about storage class and 'at' used inside struct or union
7327         * src/SDCCBBlock.c (iCodeFromeBBlock),
7328         * src/SDCCcse.c (ifxOptimize),
7329         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7330         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7331         printIval, emitStaticSeg, emitOverlay),
7332         * src/SDCClabel.c (deleteIfx),
7333         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7334         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7335         gatherAutoInit, processParms),
7336         * support/Util/SDCCerr.h,
7337         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7338         reporting for post-parse errors.
7339
7340 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7341
7342         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7343         implicit casts via union; they don't work on big endian systems
7344         (possible fix for bug #861138)
7345
7346 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7347
7348         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7349         * src/mcs51/main.c: fixed the fix for bug #737001
7350
7351 2003-12-15  Borut Razem <borut.razem AT siol.net>
7352
7353         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7354
7355 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7356
7357         * support/makebin/makebin.c: put output in binary mode
7358
7359 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7360
7361         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7362         xdata and data memory on startup. Set the environment variable
7363         SDCC_NOGENRAMCLEAR to disable this.
7364         * src/mcs51/peephole.def,
7365         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7366         (allows non-interrupt and interrupt code to safely compete for a resource
7367         without the non-interrupt code having to disable interrupts)
7368
7369 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7370
7371         * src/SDCCicode.c (geniCodeAdd),
7372         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7373         with valFromType if type might be a pointer and host is big endian).
7374         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7375         types, not just integer types.
7376         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7377         multiply defined with mismatching "at" address.
7378
7379 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7380
7381         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7382         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7383         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7384         with embedded nulls (fixed bug #753752)
7385
7386 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7387
7388         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7389         Apparently this did not see much testing (endless loop)
7390
7391 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7392
7393         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7394
7395 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7396
7397         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7398         gracefully handle NULL memmap pointers
7399
7400 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7401
7402         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7403         instead of deleting the iCode when an operand is volatile
7404         * src/z80/gen.c (genDummyRead),
7405         * src/mcs51/gen.c (genDummyRead),
7406         * src/ds390/gen.c (genDummyRead),
7407         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7408         not just IC_RIGHT
7409         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7410         * src/SDCC.y: fixed bug #850420
7411
7412 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7413
7414         Applied z80 i/o port patch from Peter Townson and fixed some operators
7415         to better handle operands in A register.
7416         * device/include/z180.h
7417         * src/SDCC.y
7418         * src/SDCCglue.c
7419         * src/z80/gen.c
7420         * src/z80/gen.h
7421         * src/z80/main.c
7422         * src/z80/peeph-z80.def
7423         * src/z80/peeph.def
7424         * src/z80/z80.h
7425
7426 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7427
7428         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7429
7430 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7431
7432         * device/lib/hc08/_mullong.c: Removed extra #endif
7433
7434 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7435
7436         * sim/ucsim/hc08.src/inst.cc,
7437         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7438         carries from x to h
7439         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7440         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7441         * device/include/stdarg.h: fixed varargs for hc08
7442         * device/lib/Makefile.in,
7443         * device/lib/hc08/Makefile,
7444         * device/lib/hc08/_mulint.c,
7445         * device/lib/hc08/_mullong.c: fixed some endian problems
7446
7447 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7448
7449         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7450         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7451         * device/lib/_gptrget.c,
7452         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7453
7454 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7455
7456         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7457         * src/SDCCast.c (astErrors): fixed bug #846007
7458         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7459
7460 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7461
7462         * src/SDCCast.c (decorateType): disabled a transformation I added in
7463         revision 1.188 (access to fields of a structure at an absolute address);
7464         it breaks with bitfields, extern declarations, and gcse analysis.
7465         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7466         could be assigned through a pointer, so don't complain.
7467         * src/SDCCast.c (astErrors),
7468         * src/SDCCast.h,
7469         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7470
7471 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7472
7473         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7474         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7475         output of __config directives, since gpasm now supports them
7476         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7477         pre-processor macro, i.e. -DMCU=p18f452
7478         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7479         and modified to handle 'cast' icode similarly to '=' icode
7480         * src/pic16/device.h (typedef struct PIC_device): added field
7481         'extMIface' to indicate that chip has external memory interface
7482         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7483         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7484         18F8720
7485
7486 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7487
7488         * src/SDCC.y (pointer): fixed bug #846006
7489         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7490         * src/SDCCast.c (decorateType): fixed bug #846009
7491         * src/ds390/peeph.def,
7492         * src/ds390/gen.c (genAnd, genOr),
7493         * src/mcs51/peeph.def,
7494         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7495
7496 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7497
7498         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7499         * src/SDCCdflow.c
7500         * src/SDCCcse.c
7501         * src/SDCCcse.h
7502         * src/SDCCBBlock.h
7503         * src/SDCCBBlock.c
7504
7505 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7506
7507         fixed bug #845089
7508         * src/SDCCbitv.h,
7509         * src/SDCCbitv.c: added function to free a bitvector
7510         * src/SDCClrange.h,
7511         * src/SDCClrange.c: added function to recompute the liveranges
7512         * src/avr/ralloc.c,
7513         * src/ds390/ralloc.c,
7514         * src/hc08/ralloc.c,
7515         * src/mcs51/ralloc.c,
7516         * src/pic/ralloc.c,
7517         * src/pic16/ralloc.c,
7518         * src/xa51/ralloc.c,
7519         * src/z80/ralloc.c: recompute the liveranges after register packing
7520
7521 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7522
7523         * src/SDCCloop.c (newInduction): fixed bug #845630
7524
7525 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7526
7527         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7528         inadvertantly left behind from my 2003-11-12 change
7529
7530 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7531
7532         Updated headers I neglected to commit yesterday.
7533         * src/SDCClrange.h,
7534         * src/SDCCicode.h
7535
7536 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7537
7538         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7539         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7540         * src/SDCCopt.c (eBBlockFromiCode),
7541         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7542         the creation of the key hash table from the sequencing so it can be used
7543         earlier (for some GCSE bug fixes still pending)
7544
7545 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7546
7547         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7548         * support/regression/tests/addsub.c: testing genPlus shortcut
7549
7550 2003-11-15  Borut Razem <borut.razem AT siol.net>
7551
7552         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7553
7554 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7555
7556         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7557         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7558         ordering is immaterial.
7559         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7560
7561 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7562
7563         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7564         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7565         (SIGSEV) of bug #840381
7566         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7567         unlink new file before rename if new and old filenames are the same)
7568
7569 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7570
7571         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7572         uninitialized variables) for the mcs51. Set environment variable
7573         SDCC_GENRAMCLEAR to test.
7574         xdata initialization slightly shorter
7575
7576 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7577
7578         * src/SDCCsymt.h,
7579         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7580         #838241 & 780691 (basicly the same bug)
7581         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7582         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7583
7584 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7585
7586         * src/SDCCmain.c (linkEdit): "fix" #834252
7587
7588 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7589
7590         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7591         * src/SDCCast.h,
7592         * src/SDCC.y: fixed bug #819403
7593
7594 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7595
7596         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7597         the reentrant attribute.
7598         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7599         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7600         simulation
7601         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7602         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7603         erroneously reduced to a literal.
7604         * src/hc08/ralloc.c (packRegisters, rematStr),
7605         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7606         some cases
7607
7608 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7609
7610         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7611         * doc/sdccman.lyx: changed from 'article' to 'book'
7612         * doc/Makefile: readded test_suite_spec and cdbfileformat
7613
7614 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7615
7616         * device/include/stdlib.h: include malloc.h to comply with ANSI
7617         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7618
7619 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7620
7621         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7622         * doc/clean.mk: also remove *.out files
7623         * doc/sdccman.lyx: some additions, larger top/bottom margins
7624
7625 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7626
7627         * src/SDCC.y: fixed bug #837365
7628         * support/regression/tests/bitopcse.c
7629         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7630         a symbol (might be valop instead)
7631         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7632         * device/lib/clean.mk: added hc08 to the cleaning list
7633
7634 2003-11-04  Borut Razem <borut.razem AT siol.net>
7635
7636         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7637           made 2003-11-04
7638         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7639           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7640           malloc is declared in standard stdlib.h
7641
7642 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7643
7644         * device/lib/hc08/Makefile: need to clean .rel not .o files
7645         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7646
7647 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7648
7649         * src/port.h,
7650         * src/hc08/main.c,
7651         * src/mcs51/main.c,
7652         * src/ds390/main.c,
7653         * src/z80/main.c,
7654         * src/avr/main.c,
7655         * src/pic/main.c,
7656         * src/pic16/main.c,
7657         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7658         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7659         tests (which uses the port's oclsExpense function)
7660         * src/SDCC.y,
7661         * src/SDCCast.c,
7662         * src/SDCCicode.c,
7663         * src/hc08/gen.c,
7664         * src/ds390/gen.c,
7665         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7666
7667 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7668
7669         * src/SDCCcse.c (ifxOptimize),
7670         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7671         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7672         deleting the IFX iCode.
7673         * src/hc08/ralloc.c: reduced unneeded slocs
7674         * src/hc08/gen.c: fixed bug in asmopToBoolean
7675
7676 2003-11-04  Borut Razem <borut.razem AT siol.net>
7677
7678         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7679           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7680           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7681           transferred to configure
7682
7683 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7684
7685         Use headers defined in the C[++] standards:
7686         * sim/ucsim/gui.src/serio.src/fileio.cc
7687         * sim/ucsim/gui.src/serio.src/frontend.cc
7688         * sim/ucsim/gui.src/serio.src/main.cc
7689         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7690         * support/Util/NewAlloc.c
7691         * as/hc08/lklibr.c
7692         * as/mcs51/lklibr.c
7693         * as/z80/aslist.c
7694         * as/z80/assym.c
7695
7696 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7697
7698         * Added MSVC projects for hc08 assembler and linker:
7699         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7700         /as/hc08/link_hc08.dsp
7701
7702 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7703
7704         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7705
7706 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7707
7708         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7709
7710 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7711
7712         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7713
7714 2003-10-31  Borut Razem <borut.razem AT siol.net>
7715
7716         * support/cpp2/cpplib.h,
7717           support/cpp2/cpplib.c,
7718           support/cpp2/cpplex.c,
7719           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7720           to switch _asm block preprocessing on / off. Default is
7721           #pragma preproc_asm +
7722
7723 2003-10-31  Borut Razem <borut.razem AT siol.net>
7724
7725         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7726           when outputting comment blocks (when executed with -C option) and
7727           _asm (SDCPP specific) blocks
7728
7729 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7730
7731         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7732
7733 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7734
7735         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7736
7737 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7738
7739         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7740         * src/SDCCast.c (decorateType): fixed bug #832664
7741
7742 2003-10-31  Borut Razem <borut.razem AT siol.net>
7743
7744         * support\cpp2\cpplex.c: fixed for SDCPP:
7745           comments(when executed with -C option) and _asm blocks
7746           were included even if they where in skipped #if block.
7747           Applied solution from GCC cpp 3.3.2
7748
7749 2003-10-31  Borut Razem <borut.razem AT siol.net>
7750
7751         * src/SDCC.lex: sdcc now understands both formats:
7752           '# <line_number> <file_name>' and
7753           '#line <line_number> <file_name>'
7754         * support/cpp2/cppmain.c: sdcpp now generates the standard
7755           '# <line_number> <file_name>' instead of former
7756           '#line <line_number> <file_name>'
7757
7758 2003-10-30  Borut Razem <borut.razem AT siol.net>
7759
7760         * support/cpp2/cpphash.h,
7761         * support/cpp2/cpplib.h
7762         * support/cpp2/cpplex.c,
7763         * support/cpp2/cppmain.c,
7764         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7765
7766 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7767
7768         Fixed a number of problems revealed by bug #827883.
7769         * src/SDCCloop.c (loopInvariants): Spill location of the
7770         result operand should be recomputed if extracted from
7771         a loop. Also, don't extract assignments of an iTemp
7772         from a literal.
7773         * src/SDCCast.c (isConformingBody): loop reversal should
7774         not occur if the control variable is involved with a
7775         relational operator.
7776
7777 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7778
7779         * .version: bumped to 2.3.6 to reflect the big improvements
7780         made by Erik and Klaus. Thanks!
7781
7782 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7783
7784         Replaced the livrange code.
7785         * src/SDCClrange.c: added new LR code
7786         * src/SDCCloop.c,
7787         * src/SDCCBBlock.h: removed remainig parts from old LR code
7788         * src/ds390/ralloc.c,
7789         * src/ds390/gen.c: minor fixes to make it work with new code
7790
7791 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7792
7793         * as/hc08/asm.h,
7794         * as/hc08/lkrloc.c,
7795         * src/hc08/gen.c,
7796         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7797         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7798         (tweaked fix for bug #818696)
7799
7800 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7801
7802         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7803
7804 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7805
7806         * src/SDCCmain.c,
7807         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7808         * src/mcs51/gen.c (gencjneshort),
7809         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7810         more efficient (per Scott Bronson's suggestion)
7811
7812 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7813
7814         Extended the semantics of the critical keyword to include
7815         individual statements. See RFE #827755 and #799831
7816         * src/SDCC.y
7817         * src/SDCCicode.c
7818         * src/SDCCopt.c
7819         * src/SDCCast.c
7820         * support/Util/SDCCerr.c
7821         * support/Util/SDCCerr.h
7822         * src/mcs51/gen.c
7823         * src/ds390/gen.c
7824         * src/hc08/gen.c
7825
7826 2003-10-19  Borut Razem <borut.razem AT siol.net>
7827
7828         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7829
7830 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7831
7832         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7833         Fixed bug #818696
7834         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7835         and predecrement operand is displayed
7836
7837 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7838
7839         * src/SDCCval.c (valMinus): fixed bug #826041
7840
7841 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7842
7843         Some hc08 related updates that I missed earlier
7844         * sim/ucsim/stypes.h
7845         * support/regression/ports/hc08/spec.mk
7846
7847 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7848
7849         New target "hc08" for the Motorola 68hc08 family of micros
7850
7851         * configure
7852         * configure.in
7853         * Makefile
7854         * src/hc08/*
7855         * src/SDCCmain.c
7856         * src/port.h
7857         * sim/ucsim/hc08.src/*
7858         * sim/ucsim/configure.in
7859         * src/ucsim/configure
7860         * sim/ucsim/packages_in.mk
7861         * as/hc08/*
7862         * as/Makefile
7863         * device/include/mc68hc908qy.h
7864         * device/lib/hc08/*
7865         * device/lib/Makefile.in
7866         * support/regression/ports/hc08/*
7867         * support/regression/Makefile
7868
7869 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7870
7871         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7872         regression test
7873         * src/ds390/gen.c (genCast): fixed bug #821957
7874
7875 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7876
7877         * device/lib/logf.c: "fixed" overlay bug
7878         * support/regression/ports/host/spec.mk: added m library
7879         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7880         * support/regression/tests/float_trans: added (for Eric)
7881
7882 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7883
7884         * src/mcs51/gen.c (genCpl): fixed bug
7885         http://sf.net/mailarchive/message.php?msg_id=6263915
7886
7887 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7888
7889         * src/SDCCast.c (decorateType): added extended constant folding
7890         * src/SDCCsymt.c (computeType): cleanup
7891         * src/SDCCval.c (valShift): minor optimization
7892         * support/regression/tests/ast_constant_folding.c: added
7893
7894 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7895
7896         * src/SDCCmain.c: removed some unintended changes
7897
7898 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7899
7900         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7901         * src/z80/gen.c: fixed part of bug #817589
7902         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7903
7904 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7905
7906         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7907         * src/SDCCcflow.c
7908         * src/SDCCcse.c
7909         * src/SDCCdflow.c
7910         * src/SDCClabel.c
7911         * src/SDCClrange.c
7912         * src/SDCCmem.c
7913         * src/SDCCopt.c
7914         * src/SDCCpeeph.c
7915         * src/SDCCset.c
7916         * src/avr/ralloc.c
7917         * src/ds390/ralloc.c
7918         * src/izt/ralloc.c
7919         * src/mcs51/ralloc.c
7920         * src/pic/ralloc.c
7921         * src/pic16/ralloc.c
7922         * src/xa51/ralloc.c
7923         * src/z80/ralloc.c
7924         * src/z80/gen.c: removed unused label "release:"
7925
7926 2003-10-06  Borut Razem <borut.razem AT siol.net>
7927
7928         * src/SDCC.lex: removed definition of unused variables
7929           save_optimize and save_options
7930
7931 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7932
7933         * clean.mk: removed '=' in "-maxdepth=1"
7934         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7935         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7936
7937 2003-10-06  Borut Razem <borut.razem AT siol.net>
7938
7939         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7940           my_unput() replaced by unput()
7941
7942 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7943
7944         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7945         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7946         type-punned pointer will break strict-aliasing rules"
7947         Old LR behaviour is again default; Klaus' LR can be choosen by
7948         defining the environment variable LRKLAUS
7949         * src/SDCCBBlock.h
7950         * src/SDCCloop.c
7951         * src/SDCClrange.c
7952         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7953         * clean.mk: fixed removal of files in bin/CVS/
7954         * device/lib/clean.mk: fixed removal of directories small and large
7955         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7956         * src/SDCCicode.c,
7957         * src/SDCCval.c: removed superflous test for pedantic
7958
7959 2003-10-05  Borut Razem <borut.razem AT siol.net>
7960
7961         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7962           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7963           message "unmatched #pragma SAVE and #pragma RESTORE"
7964
7965 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7966
7967         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7968           assembly, critical functions, atomic, nojtbound)
7969
7970 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7971
7972         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7973         * src/SDCCBBlock.h
7974         * src/SDCCloop.c
7975         * src/SDCCloop.h
7976         * src/SDCClrange.c
7977
7978 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7979
7980         * src/z80/gen.h,
7981         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7982         * src/mcs51/gen.h
7983         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7984         * src/ds390/gen.h
7985         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7986         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7987         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7988
7989 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7990
7991         * src/z80/gen.c (genRet): fixed bug #524753
7992         * src/z80/gen.c (genCast): fixed internal error on cast from
7993         pointer to long
7994         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7995         fix for bug #477835 to the z80
7996         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7997         for tracking iCodes in the peephole optimizer for z80
7998
7999 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8000
8001         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8002         the other part of bug #814548
8003         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8004
8005 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8006
8007         * src/SDCCcse.c: fixed part of bug #814548
8008
8009 2003-09-28  Borut Razem <borut.razem AT siol.net>
8010
8011         * src/asm.c: rewrite of printILine() to use temporary file instead
8012           a pipe
8013         * src/xa51/main.c: commented out declaration of int rewinds
8014
8015 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8016
8017         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8018
8019 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8020
8021         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8022         * src/asm.c (printILine): Fixed bug #811015
8023
8024 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8025
8026         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8027         freeing.
8028
8029 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8030
8031         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8032         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8033         to correctly handle general case of AOP_PAIRPTR
8034         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8035
8036 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8037
8038         * src/mcs51/ralloc.c (fillGaps),
8039         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8040         register positioning bug)
8041
8042 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8043
8044         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8045
8046 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8047
8048         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8049         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8050         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8051         (ralloc doesn't intentionally do this now, but perhaps later)
8052         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8053         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8054         register positioning bugs (Fixed bug #762602 and #795325)
8055         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8056         (Fixed bug #808779)
8057         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8058         lines that --i-code-in-asm generates
8059
8060 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8061
8062         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8063         trying to fclose a FILE* that was already closed.
8064
8065 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8066
8067         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8068         of const struct should be treated as if const themselves)
8069
8070 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8071
8072         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8073
8074 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8075
8076         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8077         Unix (/n) and DOS (/r/n) line terminations.
8078
8079 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8080
8081         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8082         bug #613775
8083
8084 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8085
8086         * src/mcs51/gen.c (genFunction, genEndFunction),
8087         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8088         and restore of EA so that stack offsets to parameters are
8089         correct when using both critical and reentrant/stack-auto.
8090         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8091         size (can be triggered in error if sloc is shared between
8092         different sized objects)
8093         * device/include/float.h: fixed macros to explicitly use
8094         unsigned long where needed
8095
8096 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8097
8098         Feature req. 799831: added code to allow nesting of critical functions
8099         * src/mcs51/gen.c (genFunction, genEndFunction)
8100         * src/ds390/gen.c (genFunction, genEndFunction)
8101
8102 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8103
8104         * src/SDCCsymt.c (sclsFromPtr),
8105         * src/SDCCsymt.h,
8106         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8107         support for standard C idiom of memory mapped variables; for
8108         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8109         to xdata int at 0x1234 tempvar = 1.
8110         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8111         provided by Akiya ISHIDA
8112
8113 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8114
8115         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8116         * src/SDCCval.c (constVal): added reduction from int to char
8117         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8118         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8119         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8120         to ignore the sign
8121         * support/regression/tests/shifts.c: fixed
8122
8123 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8124
8125         * src/z80/gen.c (genXor): Fixed bug #805445
8126
8127 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8128
8129         Fixed bug #621531 (const & volatile confusion in the type chain).
8130         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8131         refer to the const or volatile state of the pointer itself.
8132
8133         * src/SDCCast.c
8134         * src/SDCCglue.c
8135         * src/SDCCicode.c
8136         * src/SDCCsymt.c
8137         * src/SDCCval.c
8138         * src/SDCC.y
8139         * src/SDCCsymt.h
8140         * src/pic/gen.c
8141         * src/pic/ralloc.c
8142         * src/pic16/gen.c
8143         * src/pic16/ralloc.c
8144         * support/regression/tests/const.c
8145
8146 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8147
8148         When checking for duplicated modules, use absolute paths
8149         instead of relative paths.  Files changed:
8150
8151         * as/mcs51/lklib.c
8152         * link/z80/lklib.c
8153
8154 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8155
8156         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8157
8158 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8159
8160         * device/include/string.h: added size_t typedef, changed
8161         prototypes to use size_t, eliminated separate reentrant and
8162         non-reentrant declarations, added _memmove declaration
8163         * device/lib/_memcpy.c: changed to use size_t instead of int,
8164         changed /4 to >>2 to avoid division library call
8165         * device/lib/_memcmp.c,
8166         * device/lib/_memset.c,
8167         * device/lib/_strncat.c,
8168         * device/lib/_strncpy.c,
8169         * device/lib/_strncmp.c: changed to use size_t instead of int
8170         * device/lib/_memmove.c: new file (fixed bug #772294)
8171         * device/lib/Makefile.in: added _memmove.c
8172         * device/lib/z80/asm_strings.s: fixed bug #772290
8173         * support/regression/tests/bitfields.c: attempt to fix host assertion
8174         failure on amd64-unknown-linux2.2
8175
8176 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8177
8178         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8179         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8180         * as/z80/asmain.c (main): fixed bug #801766
8181
8182 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8183
8184         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8185         compilers
8186
8187 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8188
8189         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8190         reported in bug #800609
8191
8192 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8193
8194         * Top header beautifications in src/pic16 directory:
8195           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8196           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8197           pcoderegs.h, ralloc.c, ralloc.h
8198         * main.c: added top header and GPL license notice
8199         * pcode.c: fixed the if-conditional warning
8200
8201 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8202
8203         * device/lib/_mullong.c: replaced int by short for gcc
8204
8205 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8206
8207         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8208         and JUMPTABLE iCodes properly now (worked by accident before)
8209         * src/mcs51/gen.c (leftRightUseAcc),
8210         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8211         iCode properly now. Use getSize instead of nRegs since a & b
8212         aren't part of the nRegs tally.
8213
8214 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8215
8216         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8217         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8218           before instructions that use the _STATUS register
8219
8220 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8221
8222         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8223         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8224         fetching of the pointer
8225         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8226         copied from genNearPointerSet()
8227         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8228         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8229         If they pop r0/r1 they must be called in the opposite order than aopOp().
8230         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8231         (resp. --stack-auto), prepared for --xstack
8232
8233 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8234
8235         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8236
8237 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8238
8239         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8240         these ports have their own __sdcc_external_start()
8241
8242 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8243
8244         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8245         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8246         type for bits was changed. It resulted in bit variables becoming
8247         global, which is not permitted in PIC 14 assembly output.
8248
8249 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8250
8251         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8252
8253 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8254
8255         Z80 and MCS51 linkers complaint if a public symbol is defined
8256         in more than one library module:
8257
8258         * as/mcs51/lklib.c
8259         * link/z80/lklib.c
8260         * as/mcs51/Makefile.in
8261
8262 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8263
8264         A few small changes that speed up the peephole optimizer.
8265
8266         * src/SDCCpeeph.c
8267
8268 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8269
8270         Try to make the peephole optimizer smarter by maintaining
8271         an association between the assembly source code and the
8272         iCodes that originated them. Put this information to use
8273         with a new peephole rule condition "notVolatile" so that
8274         the rules can be aggressive yet still safe.
8275
8276         * src/SDCCpeeph.c
8277         * src/SDCCpeeph.h
8278         * src/mcs51/gen.c
8279         * src/mcs51/peeph.def
8280
8281 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8282
8283         Fixed bug #741761
8284
8285         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8286         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8287         if the left or right operand symbols have the accuse flag set.
8288
8289 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8290
8291         Changed the type of the result of the ! (NOT) operator to char;
8292         previously it returned the same type as the source. This allows
8293         us to eliminate all the genFloatNot functions (all of its target
8294         implementations were very buggy) since !float can use the same
8295         code as !long now.
8296
8297         * src/SDCCicode.c (ast2iCode): ! returns char
8298         * src/mcs51/gen.c (genNot, genNotFloat),
8299         * src/ds390/gen.c (genNot, genNotFloat),
8300         * src/z80/gen.c (genNot, genNotFloat),
8301         * src/pic/gen.c (genNot, genNotFloat),
8302         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8303
8304 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8305
8306         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8307         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8308            during interrupts. Ensure WSAVE is located at a shared bank address.
8309         2. Fixed page selection in some places
8310         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8311            the registers name strings.
8312         4. Fixed "signed / unsigned compare" compiler warnings.
8313         5. The PIC port manages its own allocation of the general purpose
8314            registers, but makes no attempt to reuse them. As a result when
8315            compiling it soon runs out of general purpose registers. Some
8316            additional code was added to the files pcode.c and device.c to walk
8317            through the function call tree and rename the registers so that they
8318            get reused.
8319
8320         * src/pic/device.c
8321         * src/pic/gen.c
8322         * src/pic/glue.c
8323         * src/pic/pcode.c
8324         * src/pic/pcode.h
8325         * src/pic/ralloc.c
8326         * src/pic/ralloc.h
8327         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8328         genPlus() & genMinus() when the result is the same as left or right
8329
8330 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8331
8332         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8333
8334 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8335
8336         Made bitfield a distinct type from bit so that bitfields
8337         convert as per ANSI C and bits retain their traditional
8338         boolean style behaviour. Implemented bitfield support in
8339         the z80 port.
8340
8341         * src/SDCCsymt.h,
8342         * src/SDCCsymt.c,
8343         * src/SDCCast.c,
8344         * src/cdbFile.c,
8345         * src/mcs51/gen.c,
8346         * src/ds390/gen.c: bit v bitfield split
8347         * src/z80/gen.c: New support for bitfields
8348         * support/regression/tests/bitfields.c: reenabled z80,
8349         added more tests
8350
8351 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8352
8353         Rules 246.x, 247.x relate to bitfields, the others speed up
8354         access to xdata mapped I/O devices.
8355
8356         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8357
8358 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8359
8360         Cleaned up genPackBits and genUnpackBits and added two helper
8361         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8362         for literal assignments in genPackBits (thanks to Frieder for
8363         reminding me).
8364
8365         * src/mcs51/gen.c
8366         * src/ds390/gen.c
8367
8368 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8369
8370         Fixed bug #748310 (pointer to function type mishandled when the
8371         function name is omitted). Also fixed a SIGSEGV when a function
8372         attribute (reentrant, etc) is used on a non-function or on a
8373         function but misplaced before the parameter list.
8374
8375         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8376         bug #748310
8377         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8378         * support/Util/SDCCerr.h,
8379         * support/Util/SDCCerr.c: Added func attr misuse error msg
8380
8381 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8382
8383         Fixed bug #787649 by anonymous
8384         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8385         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8386
8387 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8388
8389         Fixed numerous bitfield problems.
8390
8391         * src/SDCC.y: More bitfield related error checking
8392         * src/SDCCsymt.h,
8393         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8394         * support/Util/SDCCerr.h,
8395         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8396         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8397         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8398         * support/regression/tests/bitfields.c: tests added
8399
8400 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8401
8402         Made the constant following the "interrupt" keyword optional. If
8403         omitted, the function will not automatically be given an entry
8404         in the interrupt vector table (similar to #pragma NOIV, but
8405         less syntacticly kludgy). The interrupt number is also now
8406         range checked. Also fixed a bug in the high order bit example
8407         in the manual.
8408
8409         * src/SDCC.y
8410         * src/SDCCmem.c
8411         * src/SDCCglue.c
8412         * src/SDCCsymt.h
8413         * support/Util/SDCCerr.c
8414         * support/Util/SDCCerr.h
8415         * doc/sdccman.lyx
8416
8417 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8418
8419         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8420         * src/SDCCicode.c (operandOperation): rewritten some ops
8421         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8422         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8423         other type
8424         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8425         be re-activated by defining REDUCE_LITERALS)
8426         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8427         unsigned, but are signed by default
8428         * src/SDCCval.c (constVal): rearranged
8429         * src/SDCCval.c (valMod): preliminary fix
8430         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8431         * support/regression/literalop.c: added, work in progress
8432
8433 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8434
8435         Generate warnings for useless declarations like "char data;"
8436         that don't do what new users expect.
8437
8438         * src/SDCC.y
8439         * support/Util/SDCCerr.h
8440         * support/Util/SDCCerr.c
8441
8442 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8443
8444         * src/SDCCval.c (valMult): fix overflow detection of negative int
8445
8446 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8447
8448         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8449
8450         Changes to support big endian targets:
8451
8452         * src/ports.h
8453         * src/SDCCglue.c
8454         * src/avr/main.c
8455         * src/ds390/main.c
8456         * src/izt/i186.c
8457         * src/mcs51/main.c
8458         * src/pic/main.c
8459         * src/pic16/main.c
8460         * src/xa51/main.c
8461         * src/z80/main.c
8462
8463 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8464
8465         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8466         * device/lib/time.c: fixed warning "integer overflow in expression"
8467
8468 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8469
8470         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8471         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8472         constants are unsigned; added recognition of "u" flag for unsigned
8473         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8474         * src/SDCCval.c (valDiv, valMod): fixed signdness
8475         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8476         signedness of modulo, left and right shift
8477         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8478         * support/Util/SDCCerr.h: added warning W_INT_OVL
8479         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8480         * src/SDCCast.c (ast_print): improved output of constants
8481
8482 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8483
8484         Fixed some warnings when building with MSVC:
8485
8486         * as\mcs51\asdata.c
8487         * as\z80\asdata.c
8488         * as\mcs51\asm.h
8489         * as\z80\asm.h
8490         * link\z80\aslink.h
8491         * link\z80\lkdata.c
8492         * link\z80\lkeval.c
8493         * link\z80\lkgb.c
8494         * link\z80\lkihx.c
8495         * link\z80\lks19.c
8496         * link\z80\lksym.c
8497         * support\cpp2\cpplib.c
8498         * src\ds390\gen.c
8499         * src\mcs51\gen.c
8500
8501 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8502
8503         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8504
8505 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8506
8507         * support\librarian\clean.mk: Do not remove Makefile.
8508         * support\librarian\Makefile: added.
8509
8510 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8511
8512         Added librarian to MSVC build:
8513         * all.dsp
8514         * sdcc.dsw
8515         * support\librarian\librarian.dsp
8516
8517         'configure' not needed for librarian, removed:
8518         * support\librarian\configure
8519         * support\librarian\configure.in
8520         * support\librarian\config_in.h
8521         * support\librarian\Makefile.in
8522
8523         Hopefully these ones built the librarian and the rest of sdcc properly:
8524         * Makefile
8525         * Makefile.common.in
8526
8527         Messed up 'configure', so revert to previous version:
8528         * configure
8529         * configure.in
8530
8531 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8532
8533         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8534         there, while the mantissa of a double is "only" 53 bits wide.
8535
8536 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8537
8538         Adding sdcclib to the build.  MSVC project coming soon.
8539         Files added/changed:
8540
8541         * support\librarian\clean.mk
8542         * support\librarian\configure
8543         * support\librarian\configure.in
8544         * support\librarian\config_in.h
8545         * support\librarian\Makefile.bcc
8546         * support\librarian\Makefile.in
8547         * support\librarian\sdcclib.c
8548         * Makefile.bcc
8549         * Makefile
8550         * Makefile.common.in
8551         * configure
8552         * configure.in
8553
8554 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8555
8556         Linker now complaints if linked modules have conflicting options, for
8557         example, one compiled using --model-large and another one compiled with
8558         --model-small.  The following files were modified:
8559
8560         * as\mcs51\asdata.c
8561         * as\mcs51\aslink.h
8562         * as\mcs51\asm.h
8563         * as\mcs51\asmain.c
8564         * as\mcs51\asout.c
8565         * as\mcs51\i51pst.c
8566         * as\mcs51\lkdata.c
8567         * as\mcs51\lklibr.c
8568         * as\mcs51\lkmain.c
8569         * as\z80\asdata.c
8570         * as\z80\asm.h
8571         * as\z80\asmain.c
8572         * as\z80\asout.c
8573         * as\z80\z80pst.c
8574         * link\z80\aslink.h
8575         * link\z80\lkdata.c
8576         * link\z80\lklibr.c
8577         * link\z80\lkmain.c
8578         * src\SDCCglue.c
8579
8580 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8581
8582         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8583         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8584
8585 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8586
8587         * src/z80/mappings.i: fix _mul[us][int,long] entries
8588
8589 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8590
8591         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8592
8593 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8594
8595         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8596         * support/regression/tests/bitopcse.c: added
8597         fixed warning:
8598         * src/avr/gen.c:
8599         * src/pic/gen.c:
8600         * src/pic16/gen.c:
8601         * src/z80/gen.c:
8602         * src/xa51/gen.c:
8603
8604 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8605
8606         added support for new library format to z80, gbz80 linkers:
8607         *link/z80/aslink.h
8608         *link/z80/lklex.c
8609         *link/z80/lklib.c
8610         *link/z80/lklist.c
8611
8612 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8613
8614         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8615         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8616
8617 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8618
8619         added DUMMY_READ_VOLATILE:
8620         * src/SDCC.y:
8621         * src/avr/gen.c:
8622         * src/xa51/gen.c:
8623         * src/z80/gen.c:
8624         * src/pic/gen.c:
8625         * src/pic16/gen.c:
8626         * src/mcs51/gen.c:
8627         * src/ds390/gen.c:
8628         * src/SDCCcse.c (algebraicOpts): many improvements
8629         * src/SDCCcse.h: removed algebraicOpts()
8630         * src/SDCCicode.c (picDummyRead): added
8631
8632 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8633
8634         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8635         "Insufficient space in data memory".
8636
8637 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8638
8639         * src/mcs51/gen.c: fixed bug #771358
8640         * src/z80/gen.c: fixed bug #759087
8641
8642 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8643
8644         * src/pic16/glue.c: minor cleanup by Vangelis
8645
8646 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8647
8648         * device/include/regc515c.h: fixed #758477
8649         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8650         * device/lib/_gptrput.c: saved a few bytes
8651         * my tab spacing is 8, yours too?)
8652         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8653         * device/lib/serial.c: process RX bytes earlier than TX bytes
8654         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8655
8656 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8657
8658         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8659
8660 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8661
8662     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8663
8664 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8665
8666         * device/lib/Makefile.in: bad fix, reverted to 1.43
8667
8668 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8669
8670         * device/lib/Makefile.in: added missing z80 object files
8671
8672 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8673
8674         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8675         pic16 progress by Vangelis:
8676         * src/SDCCglobl.h:
8677         * src/SDCCmain.c:
8678         * src/pic/Makefile:
8679         * src/pic:
8680         * pic/Makefile:
8681         * pic16/device.c:
8682         * pic16/device.h:
8683         * pic16/gen.c:
8684         * pic16/gen.h:
8685         * pic16/genarith.c:
8686         * pic16/glue.c:
8687         * pic16/main.c:
8688         * pic16/pcode.c:
8689         * pic16/pcode.h:
8690         * pic16/pcodepeep.c:
8691         * pic16/peeph.def:
8692
8693 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8694
8695     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8696
8697 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8698
8699     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8700     added gbz80 build to MSVC project.
8701     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8702     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8703     from 8051 stuff and setup so it links using a .lnk file.
8704
8705 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8706
8707     * support/librarian/sdcclib.c: sdcc librarian.
8708     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8709     with sdcclib.
8710
8711 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8712
8713     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8714
8715 2003-07-02  Borut Razem <borut.razem AT siol.net>
8716
8717         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8718         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8719         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8720         src/xa51/main.c, src/z80/main.c:
8721         virtualization of glue() function: each port has it's own glue function,
8722         which is accessed by do_glue function pointer in PORT.general structure
8723
8724 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8725
8726         * DS800C400 fun, improved ROM interface and tinibios.
8727
8728 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8729
8730         * More support for DS80C400. Now includes beginning of interface to ROM.
8731
8732 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8733
8734         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8735
8736 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8737
8738         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8739
8740 2003-06-19  Borut Razem <borut.razem AT siol.net>
8741
8742         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8743
8744 2003-06-19  Borut Razem <borut.razem AT siol.net>
8745
8746         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8747         fixed Z80 port - crt0.o: cannot open.
8748
8749 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8750
8751         * support/Util/MySystem.c (merge_command): revert bad fix
8752
8753 2003-06-18  Borut Razem <borut.razem AT siol.net>
8754
8755         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8756
8757 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8758
8759         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8760         option --use-stdout sends errors to stdout instead of stderr.
8761
8762 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8763
8764         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8765
8766 2003-06-15  Borut Razem <borut.razem AT siol.net>
8767
8768         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8769         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8770         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8771         fixed width array of pointers replaced with sets;
8772         multiple include and lib paths ared transferred to preprocessor and linker
8773         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8774         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8775         fixed width array of pointers
8776         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8777         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8778         fixupPath(), getPathDifference()
8779         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8780         fixed width array of pointers
8781
8782 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8783
8784         * src/pic16/ralloc.c: fix warnings
8785         * src/pic16/pcode.c: fix warning
8786
8787 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8788
8789          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8790         know all the details, but essentially this set of changes enable
8791         the pic16 port to generate movff instructions and generate assembler
8792         directives,
8793         * src/SDCCmain.c:
8794         * src/pic16/gen.c:
8795         * src/pic16/glue.c:
8796         * src/pic16/pcode.c:
8797         * src/pic16/device.c:
8798         * src/pic16/main.c:
8799         * src/pic16/pcode.h:
8800         * src/pic16/pcoderegs.c:
8801         * src/pic16/ralloc.c:
8802         * src/pic16/ralloc.h:
8803
8804 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8805
8806         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8807         added option --vc, so sdcc errors and warnings are compatible with
8808         Microsoft Visual Studio.
8809
8810 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8811
8812         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8813           device/lib/libfloat.lib: added atof function.
8814
8815 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8816
8817         * doc/sdccman.lyx: updated to Lyx 1.3
8818         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8819         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8820         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8821
8822 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8823
8824         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8825
8826 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8827
8828         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8829           additions to the "related tools/documentation" section
8830
8831 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8832
8833         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8834
8835 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8836
8837         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8838         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8839
8840 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8841
8842         * doc/sdccman.lyx: fix double dash and other minor things
8843         * doc/Makefile: fix double dash
8844
8845 2003-05-28  Karl Bongers(patches from Martin Helmling)
8846         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8847           condition and ignore commands.
8848
8849 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8850
8851         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8852           is in parts still quite out of date, I did changes as far as I felt makes sense
8853           for a non-native english speaker.
8854           Please feel free to add to the manual or to correct my changes.
8855         * doc/Makefile: undid touching the date of intermediate tex files.
8856
8857 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8858
8859         * doc/sdccman.lyx: Manual has an index now
8860
8861 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8862
8863         Finalize muluint/mulsint and mululong/mulslong merging:
8864         * device/lib/_mulint.c
8865         * device/lib/_mullong.c
8866         * device/lib/gbz80/mul.s
8867         * device/lib/gbz80/stubs.s
8868         * device/lib/z80/mul.s
8869         * device/lib/z80/stubs.s
8870         * src/SDCCsymt.c (initCSupport)
8871
8872 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8873
8874         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8875         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8876           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8877           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8878           instead of /Zm500.
8879
8880 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8881
8882         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8883           the regression tests I'm not brave enough to enable 245.b, 245.c
8884         * doc/sdccman.lyx: added latex preamble for hyperref package.
8885           Using pdflatex this will give you a hyperlinked pdf file with
8886           bookmarks. (prepend '%' before /usepackage if this breaks something)
8887
8888 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8889
8890          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8891
8892 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8893
8894         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8895
8896 2003-05-21    <johan AT balder>
8897
8898         * src/SDCCglue.c (printIval): fixed bug #739934
8899
8900 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8901
8902         Applied patch from bug 737905 (renamed yylineo to mylineno):
8903         * src/altlex.c
8904         * src/SDCCast.c
8905         * src/SDCglobl.h
8906         * src/SDCC.lex
8907         * src/SDCCsymt.c
8908         * src/SDCCval.c
8909         * src/pic16/pcode.c: Cleaned warnings
8910         * src/pic16/pcodeflow.c: Cleaned warnings
8911         * src/pic16/pcoderegs.c: Cleaned warnings
8912
8913 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8914
8915         * src/pic16/pcode.c: Cleaned warnings
8916         * src/pic16/pcodepeep.c: Cleaned warnings
8917         * src/pic16/ralloc.c: Cleaned warnings
8918
8919 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8920
8921         * doc/sdccman.lyx: fixed bug 739745
8922         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8923
8924 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8925
8926         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8927         it can be defined with CFLAGS when running configure
8928         * src/SDCCmain.c: fixed compiling + linking with object files
8929
8930 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8931
8932         * configure.in: configure for pic16 port,
8933             added --disable-pic16-port
8934         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8935         * src/SDCCmain.c: linkOptions is changed to set *,
8936             added if/endif conditional macros to remove options help
8937             messages from optionsTable when a port is not configured, added
8938             support for the PIc16 port in the ports table, when executing
8939             the compiler with no port specified on command line, a default
8940             port is selected with the new macro DEFAULT_PORT which is
8941             defined in port.h, in setDefaultOptions() linkOptions is removed
8942             from initialization assignment, since now it is a set,
8943             parseCmdLine uses setParseWithComma for linkOptions, in
8944             linkEdit() linkOptions are accessed with new function indexSet()
8945             which returns the i'th item of a set variable. See SDCCset.c, in
8946             linkEdit() when calling buildCmdLine(), added linkOptions as
8947             last argument. Now users can pass arguments to gplink via the
8948             -Wl option, main() uses pic16glue() to glue up pic16 programs
8949         * src/SDCCpeeph.c: various changes to support pic16
8950         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8951             return the i'th item of the set
8952         * src/SDCCset.h: added function prototype for indexSet()
8953         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8954         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8955         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8956             added macro DEFAULT_PORT
8957         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8958         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8959             generated
8960         * src/pic16/glue.c: commented out some error producing lines
8961         * src/pic16/main.c: __config directives are commented out to stop
8962             gpasm complaining and test the linkage with gplink, _linkCmd and
8963             _asmCmd changed to be more gplink and gpasm friendly
8964         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8965             produced an error when parsed, peep rule 12 is added to utilize
8966             movff, but it is commented out since the pCode does not support
8967             yet a command with 2 address arguments
8968
8969 2003-05-18    <johan AT balder>
8970
8971         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8972         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8973 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8974
8975         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8976   Added feature to script commands from file.
8977
8978 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8979
8980         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8981         * src/SDCCutil.c: include ctype.h for win32
8982
8983 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8984
8985         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8986
8987 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8988
8989         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8990   Fixed so you can set breakpoints prior to run, run does not stop
8991   on entry now.  Add tbreak.  Other enhancements and fixes for use
8992   with ddd.
8993
8994 2003-05-12  Borut Razem <borut.razem AT siol.net>
8995
8996         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8997
8998 2003-05-11  Borut Razem <borut.razem AT siol.net>
8999
9000         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9001         the path of bin directory, so that PATH is the only env. variable, which has to be set
9002         in case of standard installation.
9003         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9004         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9005         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9006
9007 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9008
9009         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9010         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9011         temp files are in the port dir; clean the gen/test directory when
9012         generating new test.c
9013         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9014         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9015         * support/regression/tests/zeropad.c: added
9016
9017 2003-05-09    <johan AT balder>
9018
9019         * src/SDCCglue.c: fixed bug #597940
9020
9021 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9022
9023         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9024   cache sfr, optimize next,step, fix off by one sourceline,
9025   support ddd list function.
9026         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9027
9028 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9029
9030         * support/regression/HTMLgen.py: added compare_s2f()
9031         * support/regression/Makefile: redo 1.27
9032         * support/regression/generate-cases.py: redo 1.5
9033
9034 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9035
9036         * support/regression/tests/float.c: workaround 33 bit hex constant
9037         * support/regression/tests/simplefloat.c: fix division for host
9038
9039 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9040
9041         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9042         that tame's the PIC's over-aggressive optimizer.
9043
9044 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9045
9046          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9047          support for MSVC.
9048
9049 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9050
9051         Initial support for DS80C400. "Hello world" runs on TINIm400
9052         (with polled I/O).
9053
9054 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9055
9056          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9057          * Some notes on ddd usage added in debugger/README
9058          Martin Helmling adding more features and fixes for ddd GUI debugger.
9059          Code added for nexti, stepi, up, down, and other adjustments.
9060
9061 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9062
9063         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9064         * src/pic/peeph.def Added two rules to optimize carry manipulation
9065         * src/pic/* removed debug printfs
9066
9067 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9068
9069         * debugger/mcs51/cmd.c: added header newalloc.h
9070
9071 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9072
9073         * as/Makefile: new EXEEXT
9074         * as/z80/Makefile: remove trailing slash of BUILDIR
9075         * as/z80/clean.mk: new EXEEXT
9076         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9077         * support/cpp2/Makefile.in: new EXEEXT
9078         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9079
9080 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9081
9082         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9083         EXEEXT was introduced to fix all related problems with targets
9084         "clean", "install" and "uninstall"; a couple of further flaws
9085         especially with "clean" have been fixed too
9086         * as/mcs51/Makefile.in
9087         * as/mcs51/clean.mk
9088         * as/z80/Makefile
9089         * Makefile
9090         * clean.mk
9091         * debugger/mcs51/Makefile.in
9092         * debugger/mcs51/clean.mk
9093         * link/z80/Makefile
9094         * link/z80/Makefile.in
9095         * link/z80/clean.mk
9096         * link/Makefile
9097         * packihx/Makefile.in
9098         * packihx/clean.mk
9099         * sim/ucsim/Makefile
9100         * sim/ucsim/clean.mk
9101         * sim/ucsim/avr.src/Makefile.in
9102         * sim/ucsim/avr.src/clean.mk
9103         * sim/ucsim/s51.src/Makefile.in
9104         * sim/ucsim/s51.src/clean.mk
9105         * sim/ucsim/xa.src/Makefile.in
9106         * sim/ucsim/xa.src/clean.mk
9107         * sim/ucsim/z80.src/Makefile.in
9108         * sim/ucsim/z80.src/clean.mk
9109         * sim/ucsim/main_in.mk
9110         * sim/ucsim/packages_in.mk
9111         * sim/ucsim/gui.src/Makefile.in
9112         * sim/ucsim/gui.src/serio.src/Makefile.in
9113         * sim/ucsim/gui.src/serio.src/clean.mk
9114         * src/Makefile.in
9115         * src/clean.mk
9116         * support/cpp2/Makefile.in
9117         * support/cpp2/clean.mk
9118         * support/makebin/Makefile
9119         * support/makebin/clean.mk
9120         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9121         * doc/sdccman.lyx: --program-suffix no longer needed
9122
9123 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9124
9125          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9126          Martin Helmling added support for ddd GUI debugger.
9127          Code added to display assembly, set variables, and other commands
9128          to interface to ddd.
9129
9130 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9131
9132         * as/Makefile: fix target clean
9133         * as/clean.mk: fix target clean
9134         * as/z80/clean.mk: fix target clean
9135
9136 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9137
9138         * Makefile.common.in: added  AT EXEEXT AT
9139         * configure.in: removed all mingw32 stuff
9140         * configure: rebuilt from configure.in
9141         * doc/sdccman.lyx: updated section "installation"
9142         * support/scripts/sdcc_mingw32: adapted to configure
9143         * support/scripts/sdcc_cygwin_mingw32: added
9144
9145 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9146
9147         * src/pic Added object file support for the PIC port
9148         * src/pic Applied patch from Craig Franklin (this started the object file support)
9149         * src/regression Updated the PIC regression tests for object files
9150
9151 2003-04-20  Borut Razem <borut.razem AT siol.net>
9152
9153         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9154           lklex.c: In function `getfid':
9155           lklex.c:203: warning: array subscript has type `char'
9156         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9157           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9158         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9159           stack handling macros
9160
9161 2003-04-19  Borut Razem <borut.razem AT siol.net>
9162
9163         * "handling space characters in file path" task:
9164         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9165         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9166         * support/Util/MySystem.h: make it self-sufficient
9167         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9168           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9169           handling space characters in file path
9170         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9171           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9172         * support/Util/MySystem.c: handling space characters in executable's path
9173
9174 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9175
9176         * as/z80/Makefile: fix permanent rebuild of z80
9177         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9178         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9179
9180 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9181
9182         * src/SDCCopt.c: add special case optimization to replace modulo by
9183           a power of two with a bitwise AND.
9184
9185 2003-04-18    <johan AT balder>
9186
9187         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9188
9189 2003-04-17    <johan AT balder>
9190
9191         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9192         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9193
9194 2003-04-13  Borut Razem <borut.razem AT siol.net>
9195
9196         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9197         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9198           fixed mingw problem in adl_NORMALIZE_PATH
9199
9200 2003-04-12  Borut Razem <borut.razem AT siol.net>
9201
9202         * fixed "#pragma SAVE/RESTORE can not be nested":
9203         * src/SDCC.lex: reworked pragma handling functions
9204         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9205         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9206
9207 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9208
9209         * src/SDCCutil.c (pathEquivalent): defined but not used
9210         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9211         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9212         * configure: rebuilt from configure.in
9213         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9214         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9215         * device/include/Makefile.in: replace sdcc_datadir
9216         * device/lib/Makefile.in: replace sdcc_datadir
9217         * Makefile.common.in: add LDFLAGS from configure
9218         * packihx/Makefile.in: use LDFLAGS
9219         * src/Makefile.in: use LDFLAGS
9220         * support/cpp2/Makefile.in: add LDFLAGS from configure
9221         * support/makebin/Makefile: use LDFLAGS
9222         * .version: bumped version number to 2.3.5
9223
9224 2003-04-12  Borut Razem <borut.razem AT siol.net>
9225
9226         * completed "different paths" task:
9227         * src/SDCCmacro.c: fixed bug in handling quotes
9228         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9229         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9230
9231 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9232
9233         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9234
9235 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9236
9237         * ds390/gen.c ds390/peeph.def: fix bug 706781
9238
9239 2003-04-11  Borut Razem <borut.razem AT siol.net>
9240
9241         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9242
9243 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9244
9245         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9246         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9247          set - this bit used to not be set...).
9248         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9249           bad code in PIC Port
9250         * src/regression/and2.c added to test bug 609268
9251         * src/regression/Makefile added and2.c to regression test
9252
9253
9254 2003-04-08    <johan AT CP255758-A>
9255
9256         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9257         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9258         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9259
9260 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9261
9262         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9263         fix bug #487815
9264         * support/cpp2/Makefile.in: fix bug #487815
9265         * configure: rebuilt from configure.in
9266         * Makefile.common.in: docdir changed, new path suffixes
9267         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9268         * sdcc_vc_in.h: reflect changes from sdccconf.h
9269         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9270         * src/SDCCutil.h: remove BINDIR hack
9271         * doc/sdccman.lyx: update new path hierarchy
9272
9273 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9274
9275         * src/SDCCpeeph.c: added okToRemoveSLOC test
9276
9277 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9278
9279         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9280
9281 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9282
9283         * src/SDCCpeeph.c: added labelIsReturnOnly test
9284         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9285
9286 2003-04-05    <johan AT balder>
9287
9288         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9289         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9290         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9291         * src/SDCCast.c: fixed a warning
9292         * src/SDCCast.h: fixed a warning
9293         * src/SDCCicode.c (operandFromAst): fixed a warning
9294
9295 2003-04-04    <johan AT balder>
9296
9297         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9298         * src/SDCCast.c (decorateType): fixed bug #715076
9299         * src/SDCC.y: fixed bug #702907
9300
9301 2003-04-03    <johan AT balder>
9302
9303         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9304         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9305         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9306         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9307         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9308
9309 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9310
9311         * _decdptr.c: fix return values
9312         * _gptrget.c: fix return values
9313         * _gptrgetc.c: fix return values
9314         * _gptrput.c: fix return values
9315         * _mulint.c: fix return values
9316         * as/z80/Makefile: fix 'make -j' problem
9317
9318 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9319
9320         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9321         * configure.in: big cleanup, updated to autoconf 2.5x
9322         * configure: rebuilt from configure.in
9323         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9324         * sdcc_vc_in.h: reflect changes from sdccconf.h
9325         * doc/Makefile: fixed a flaw in "make install"
9326
9327 2003-04-02    <johan AT balder>
9328
9329         * src/ds390/gen.c (genCmp): no comments
9330         * src/mcs51/gen.c (genCmp): no comments
9331         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9332         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9333
9334 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9335
9336         * support/regression/generate-cases.py: place generated file in given sub directory
9337         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9338         * support/regression/Makefile: improvements for 'make -j';
9339         side effect: it's simpler and faster now
9340
9341 2003-03-31  Borut Razem <borut.razem AT siol.net>
9342
9343         * src/z80/main.c: link-{port} and as-{port} defined without path
9344         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9345
9346 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9347
9348         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9349
9350 2003-03-30  Borut Razem <borut.razem AT siol.net>
9351
9352         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9353           changed type of list parameter to set
9354         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9355         * src/port.h: changed type of do_assemble() parameter to set
9356         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9357           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9358           definition of "cppoutfilename" macro with NULL value in preProcess()
9359         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9360         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9361         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9362           replaced with set *binPathSet
9363         * shash_add() deallocates the item, if allready exsists, before adding the new one
9364         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9365
9366 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9367
9368         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9369           a nested for loop bug in the PIC port
9370         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9371           for loops
9372
9373 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9374
9375         * support/Util/dbuf.h: remove C++ stuff to make it portable
9376
9377 2003-03-28  Borut Razem <borut.razem AT siol.net>
9378
9379         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9380           literal strings in stringLiteral()
9381         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9382         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9383           to the project
9384
9385 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9386
9387         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9388
9389 2003-03-26    <johan AT balder>
9390
9391         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9392         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9393         * src/SDCCast.c (decorateType): fixed " -v < 3"
9394
9395 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9396
9397         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9398         Added Lenny Story's debug infrastructure changes:
9399         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9400         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9401         * src/cdbFile.c: added
9402         * src/SDCCdebug.c: added
9403         * src/SDCCdebug.h: added
9404         * src/SDCCast.c (createFunction)
9405         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9406         * src/SDCCmain.c (parseCmdLine, main)
9407         * src/SDCCmem.c (redoStackOffsets)
9408         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9409         * src/SDCCsymt.h
9410         * src/common.h
9411         * src/avr/gen.c (genAVRCode)
9412         * src/ds390/gen.c (gen390Code)
9413         * src/mcs51/gen.c (gen51Code)
9414         * src/pic/gen.c (genpic14Code)
9415         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9416         * src/xa51/gen.c (genXA51Code)
9417         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9418
9419 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9420
9421         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9422         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9423
9424 2003-03-22    <johan AT balder>
9425
9426         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9427
9428 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9429
9430         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9431         * doc/cdbfileformat.lyx: added, written by Lenny Story
9432         * doc/Makefile: added cdbfileformat.lyx
9433         * doc/clean.mk: added cdbfileformat.lyx
9434
9435 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9436
9437         * src/mcs51/peeph.def: fix bug #705773
9438
9439 2003-03-20    <johan AT balder>
9440
9441         An sfr/sbit can have an "at #" AND an initializer
9442         * src/SDCCsymt.c (checkSClass):
9443         * src/SDCCmem.c (allocGlobal):
9444         * src/SDCCmem.c (allocLocal):
9445         * src/SDCCast.c (createBlock):
9446
9447 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9448
9449         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9450
9451 2003-03-16    <johan AT balder>
9452
9453         Undid the hackup of const and volatile, the problem is much bigger
9454         * src/SDCC.y:1.65
9455         * src/SDCCast.c:1.171
9456         * src/SDCCglue.c:1.138
9457         * src/SDCCicode.c:1.146
9458         * src/SDCCsymt.c:1.150
9459         * src/SDCCval.c:1.65
9460
9461 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9462
9463         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9464         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9465
9466 2003-03-13    <johan AT balder>
9467
9468         Hackup const and volatile modifiers in type chains a bit:
9469         * src/SDCC.y:1.63
9470         * src/SDCCast.c:1.169
9471         * src/SDCCglue.c:1.136
9472         * src/SDCCicode.c:1.143
9473         * src/SDCCsymt.c1.146
9474         * src/SDCCsymt.h1.59
9475         * src/SDCCval.c:1.63
9476
9477 2003-03-12    <johan AT balder>
9478
9479         * src/SDCCBBlock.h: more LRH debugging junk
9480         * src/SDCCcflow.h: more LRH debugging junk
9481         * src/SDCCloop.c: more LRH debugging junk
9482         * src/SDCC.y (struct_declaration): fixed bug #697590
9483         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9484         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9485         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9486
9487 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9488         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9489         test function names must now match exactly).
9490         * src/SDCCcse.c: added special case in findCheaperOp to allow
9491         extending a short integer. Makes less awful code for bug 700121 test case.
9492
9493 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9494
9495         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9496         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9497
9498 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9499
9500         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9501         actually called (operandsNotEqual() was called for all
9502         operandsNotEqualX tests).
9503
9504 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9505
9506         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9507         with shorter literals. Fixes bug 700121.
9508
9509 2003-03-11    <johan AT balder>
9510
9511         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9512
9513 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9514
9515         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9516         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9517
9518 2003-03-10  Borut Razem <borut.razem AT siol.net>
9519
9520         * src/SDCCmain.c: pipe preprocessor's output
9521         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9522         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9523         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9524         which closes all pipes in pipeSet set
9525         * src/SDCCset.c: free deleted item in function deleteSetItem()
9526         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9527         moved from z80 to src subproject
9528         * .version: increased version number to 2.3.4
9529
9530 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9531
9532         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9533         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9534         * support/regression/ports/xa51/spec.mk: fix typo
9535
9536 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9537
9538         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9539
9540 2003-03-09  Borut Razem <borut.razem AT siol.net>
9541
9542         * src/SDCCmain.c: pipe preprocessor's output
9543         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9544         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9545         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9546         which closes all pipes in pipeSet set
9547         * src/SDCCset.c: free deleted item in function deleteSetItem()
9548         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9549         moved from z80 to src subproject
9550
9551 2003-03-09  Borut Razem <borut.razem AT siol.net>
9552
9553         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9554         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9555         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9556         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9557         * src/SDCCglobl.h: unification of WIN32 native definitions
9558
9559 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9560
9561         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9562
9563 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9564
9565         * src/configure.in:   check for endianess (even while cross-compiling)
9566         * src/configure:      check for endianess (even while cross-compiling)
9567         * src/configure_in.h: check for endianess (even while cross-compiling)
9568         * src/avr/gen.c:        remove old endianess stuff
9569         * src/mcs51/gen.c:      remove old endianess stuff
9570         * src/ds390/gen.c:      remove old endianess stuff
9571         * src/pic/gen.c:        remove old endianess stuff
9572         * src/pic/genarith.c:   remove old endianess stuff
9573         * src/pic/glue.c:       fix endianess check
9574         * src/pic16/gen.c:      remove old endianess stuff
9575         * src/pic16/genarith.c: remove old endianess stuff
9576         * src/pic16/glue.c:     fix endianess check
9577         * src/xa51/gen.c:       remove old endianess stuff
9578         * src/z80/gen.c:        fix endianess check
9579         * src/SDCCglue.c:       fix endianess check
9580         * src/ds390/peeph.def: fix bug 700036
9581
9582 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9583
9584         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9585         * src/configure: find appropriate data-types on host for SDCC's int and long
9586         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9587         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9588         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9589
9590 2003-03-07    <johan AT balder>
9591
9592         Just a big NOOP:
9593                 some minor cleanups before the big shot
9594                 OP_DEFS and OP_USES now use Kevin's protection
9595                 new option --nolabelopt
9596
9597         * src/SDCCBBlock.c:
9598         * src/SDCCast.c,:
9599         * src/SDCCcflow.c:
9600         * src/SDCCcse.c:
9601         * src/SDCCicode.c:
9602         * src/SDCCicode.h:
9603         * src/SDCClabel.c:
9604         * src/SDCCloop.c:
9605         * src/SDCCmain.c:
9606         * src/ds390/ralloc.c:
9607         * src/mcs51/ralloc.c:
9608         * src/pic/ralloc.c:
9609         * src/xa51/ralloc.c:
9610         * src/z80/ralloc.c:
9611
9612 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9613
9614         * src/pic/pcode.c (get_op): fix 64 bit warnings
9615         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9616         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9617         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9618         * support/regression/tests/malloc.c: fix 64 bit warnings
9619
9620 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9621
9622         * src/mcs51/gen.c (genMinus): fixed bug 696436
9623
9624 2003-03-02  Borut Razem <borut.razem AT siol.net>
9625
9626         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9627
9628 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9629
9630         * configure.in: test for mkstemp
9631         * sdccconf_in.h: add HAVE_MKSTEMP
9632
9633 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9634
9635         * device/include/ctype.h: removed warning while using --stack-auto
9636         * device/include/malloc.h: removed warning while using --stack-auto
9637         * device/include/string.h: removed warning while using --stack-auto
9638
9639 2003-02-23  Borut Razem <borut.razem AT siol.net>
9640
9641         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9642         because NDEBUG is defined (see man assert)
9643         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9644
9645 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9646
9647         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9648         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9649
9650 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9651
9652         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9653         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9654
9655 2003-02-18    <johan AT balder>
9656
9657         * as/mcs51/asmain.c (asmbl): module can start with a digit
9658         * as/z80/asmain.c (asmbl): module can start with a digit
9659
9660 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9661
9662         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9663         * src/asm.c: fix pipe() for Mingw32
9664
9665 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9666
9667         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9668         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9669         make -V work again; --c1mode reads now from stdin
9670         * doc/sdccman.lyx: added --c1mode
9671         * support/Util/SDCCerr.c: new messages for c1 mode
9672         * support/Util/SDCCerr.h: new messages for c1 mode
9673         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9674
9675 2003-02-15    <johan AT balder>
9676
9677         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9678
9679 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9680
9681         * doc/sdccman.lyx: Environment variables, -o and other minor things
9682
9683 2003-02-14    <johan AT balder>
9684
9685         * src/xa51/main.c: before anyone really tries to use it :)
9686
9687         * Install doc's in share/sdcc/doc
9688         * removed some obsolete files
9689         * Do a proper make distclean and uninstall
9690         M Makefile.common.in
9691         R sdccbuild.sh
9692         M as/Makefile
9693         M device/include/Makefile.in
9694         M device/lib/Makefile.in
9695         M doc/sdccman.lyx
9696         M link/Makefile
9697         M sim/ucsim/doc/Makefile.in
9698         M src/clean.mk
9699         R src/avr/peeph.rul
9700         R src/xa51/peeph.rul
9701         M support/cpp2/Makefile.in
9702         M support/makebin/Makefile
9703
9704
9705 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9706
9707         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9708
9709 2003-02-10  Borut Razem <borut.razem AT siol.net>
9710
9711         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9712         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9713         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9714         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9715         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9716         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9717         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9718         src/z80/Makefile.bcc: Borland Makefile cleanup
9719         * as/z80/Makefile.bcc: Added Borland Makefile
9720         * support/cpp2/borland.h: Removed
9721
9722 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9723
9724         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9725         * src/SDCC.lex: new pragma NOIV
9726         * src/SDCCglobl.h: new pragma NOIV
9727         * src/SDCCmem.c: new pragma NOIV
9728
9729 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9730
9731         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9732
9733 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9734
9735         * src/SDCCmain.c: signal handling is switched off by --debug
9736         * doc/Makefile: small fix for install; use clean.mk again
9737         * doc/clean.mk: clean *.pdf and *.html too
9738
9739 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9740
9741         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9742         * device/lib/printfl.c: fix a ds390 bug by making it portable
9743         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9744         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9745         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9746         * debugger/mcs51/cmd.c: converted multi-line string literals
9747         * sim/ucsim/globals.cc: converted multi-line string literals
9748         * src/SDCCmain.c: introduced signal handler to remove temp files
9749         * doc/Makefile: small tweaks, implement clean
9750         * doc: removed generated files
9751
9752 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9753
9754         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9755         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9756         Address Record is not correctly generated for DS390."
9757
9758 2003-02-02  Borut Razem <borut.razem AT siol.net>
9759
9760         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9761         * as/mcs51/asm.h: fixed compilation with Borland C
9762         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9763         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9764         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9765         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9766         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9767         src/z80/Makefile.bcc: delete $(LIB) only if exist
9768         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9769
9770 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9771
9772         * device/include/malloc.h: introduced NULL
9773         * device/include/string.h: introduced NULL
9774         * device/include/stdlib.h: introduced NULL
9775         * device/lib/_memcpy.c: removed NULL
9776         * device/lib/_strcat.c: removed NULL
9777         * device/lib/_strchr.c: removed NULL
9778         * device/lib/_strcmp.c: removed NULL
9779         * device/lib/_strcpy.c: removed NULL
9780         * device/lib/_strcspn.c: removed NULL
9781         * device/lib/_strlen.c: removed NULL
9782         * device/lib/_strncat.c: removed NULL
9783         * device/lib/_strncmp.c: removed NULL
9784         * device/lib/_strncpy.c: removed NULL
9785         * device/lib/_strpbrk.c: removed NULL
9786         * device/lib/_strrchr.c: removed NULL
9787         * device/lib/_strspn.c: removed NULL
9788         * device/lib/_strstr.c: removed NULL
9789         * device/lib/_strtok.c: removed NULL
9790         * device/lib/malloc.c: removed NULL, include own header
9791
9792 2003-02-02    <johan AT balder>
9793
9794         * 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
9795         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9796         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9797         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9798         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9799         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9800
9801 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9802
9803         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9804         area 'DATA'"
9805
9806 2003-02-01    <johan AT balder>
9807
9808         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9809
9810 2003-01-31    <johan AT CP255758-A>
9811
9812         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9813
9814 2003-01-30    <johan AT balder>
9815
9816         * src/SDCCBBlock.c: automatic bug detection
9817         * src/SDCCicode.c: automatic bug detection
9818
9819 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9820
9821         * src/SDCCglobl.h:   now --xram-size 0 works
9822         * src/SDCCmain.c:    now --xram-size 0 works
9823
9824 2003-01-29    <johan AT balder>
9825
9826         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9827
9828 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9829
9830         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9831         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9832         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9833         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9834         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9835         * src/SDCCmain.c:    Added options --xram-size and --code-size
9836
9837 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9838
9839         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9840         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9841
9842 2003-01-27    <johan AT balder>
9843
9844         * src/SDCC.y: fixed bug #613764
9845
9846 2003-01-26    <johan AT balder>
9847
9848         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9849         * src/SDCCsymt.h: fixed bug #673374
9850         * src/SDCCglue.c: fixed bug #661910
9851         * src/SDCCast.c: fixed bug #458099 and 673374
9852
9853 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9854
9855         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9856         * as/mcs51/strcmpi.h: added
9857         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9858         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9859         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9860         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9861         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9862         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9863         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9864         * as/mcs51/Makefile.aslink: new module strcmpi
9865         * as/mcs51/Makefile.asx8051: new module strcmpi
9866         * as/mcs51/Makefil.bcc: new module strcmpi
9867         * as/mcs51/Makefile.in: new module strcmpi
9868         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9869
9870 2003-01-26    <johan AT balder>
9871
9872         * src/SDCCglue.c: reverted back to 1.124
9873         * src/SDCCast.c: reverted back to 1.156
9874         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9875
9876 2003-01-25    <johan AT balder>
9877
9878         * src/SDCCglue.c: A better fix for bug #661910
9879         * src/SDCCast.c: A better fix for bug #661910
9880         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9881
9882 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9883
9884         * src/Makefile.in: remove spawn.o
9885         * src/SDCCmain.c: remove spawn.h
9886         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9887         * src/spawn.c: removed
9888         * src/spawn.h: removed
9889         * support/regression/ports/ds390/spec.mk: link with -r
9890
9891 2003-01-24    <johan AT CP255758-A>
9892
9893         * src/ds390/gen.c (aopOp): fixed bug #667458
9894         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9895         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9896         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9897
9898 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9899
9900         * src/mcs51/peeph.def: better assembler identation by Frieder
9901         * src/mcs51/gen.c: better assembler identation by Frieder
9902
9903 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9904
9905         * as/z80/string.h: removed for gcc 3.2
9906         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9907         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9908
9909 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9910
9911         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9912         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9913         * support/regression/Makefile: separate temp files for ports
9914         * support/regression/generate-cases.py: separate temp files for ports
9915         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9916         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9917
9918 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9919
9920         * moved tinitalk to device/examples/ds390
9921
9922 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9923
9924         * as/mcs51/lkmem.c: rflag is for DS390
9925         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9926         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9927                          (linkEdit): move mem- and map-files the same way as ihx-files
9928         * src/z80/main.c (_setDefaultOptions): removed --generic
9929         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9930         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9931         * src/pic/glue.c (picglue): --c1mode works again
9932         * src/pic16/glue.c (pic16glue): --c1mode works again
9933         * src/asm.c (printCLine): fix #660034
9934
9935 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9936
9937         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9938         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9939         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9940         * as/mcs51/lkmem (summary): better fix for sp problem
9941         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9942         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9943         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9944                                               remove --stack-after-data
9945
9946 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9947
9948         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9949         * src/SDCCutil.c (join): ugly bug: missing '\0'
9950         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9951
9952 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9953
9954         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9955         * src/port.h: typo
9956         * src/pic/main.c (_asmCmd): gpasm supports -o
9957         * src/z80/main.c: more general macros
9958         * device/lib/Makefile.in: remove intermediate files
9959
9960 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9961
9962         * .version: Bumped version number to 2.3.3
9963         * src/SDCCBBlock.c: new option -o
9964         * src/SDCCglobl.h: new option -o
9965         * src/SDCCglue.c: new option -o
9966         * src/SDCCmain.c: new option -o
9967         * src/asm.c: new option -o
9968         * src/ds390/main.c: new option -o
9969         * src/pic/glue.c: new option -o
9970         * src/pic/pcode.c: new option -o
9971         * src/pic/ralloc.c: new option -o
9972         * src/pic16/glue.c: new option -o
9973         * src/pic16/pcode.c: new option -o
9974         * src/pic16/ralloc.c: new option -o
9975         * src/z80/main.c: new option -o
9976         * device/lib/Makefile.in: use -o
9977         * support/regression/ports/ds390/spec.mk: use -o
9978         * support/regression/ports/gbz80/spec.mk: use -o
9979         * support/regression/ports/mcs51/spec.mk: use -o
9980         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9981         * support/regression/ports/z80/spec.mk: use -o
9982         * support/regression/ports/ucz80/spec.mk: use -o
9983         * support/regression/ports/xa51/spec.mk: use -o
9984         * support/regression/fwk/lib/timeout.c: fix usage string
9985
9986 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9987         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9988
9989 2003-01-07    <johan AT balder>
9990
9991         * src/SDCCast.c (decorateType): fixed bug #600035
9992
9993 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9994         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9995         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9996         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9997         * src/pic/pcode.c: outcommented unused variable to remove warnings
9998         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9999
10000 2003-01-06    <karl AT turbobit.com>
10001         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10002    regression tests.
10003
10004 2003-01-06    <johan AT balder>
10005
10006         * src/SDCCicode.c: fixed array add
10007
10008 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10009         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10010         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10011
10012 2003-01-04    <johan AT balder>
10013
10014         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10015
10016 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10017         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10018
10019 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10020         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10021         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10022
10023 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10024         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10025
10026 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10027         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10028
10029 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10030         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10031
10032 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10033
10034     * in \sdcc\as\mcs51\ changed these files in order to create an
10035     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10036     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10037     following files to include the previous two files: aslink.dsp,
10038     Makefile.aslink, Makefile.bcc, and Makefile.in.
10039
10040     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10041     .adb instead of .cdb
10042
10043 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10044
10045         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10046         value from option --iram-size.
10047
10048 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10049
10050         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10051         dram[] array.
10052
10053 2002-09-18    <wiml AT hhhh.org>
10054
10055         * SDCClrange.h: exposed setFromRange() and setToRange()
10056         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10057           packRegsForAccUse() (bug 542397)
10058         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10059           multiple times and emitting the fetch operations more than once
10060           added aopGetUsesAcc() function to allow binary operators to
10061           fetch their operands in the correct order; made genMinus() emit
10062           compact code for X = LITERAL - Y
10063
10064 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10065         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10066         sprintf() in line 1267.
10067
10068 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10069         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10070         like ports.
10071
10072 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10073         Changes to aslink (All the changes are marked with 'JCF'):
10074
10075         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10076         summary().
10077
10078         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10079         area BSEG.  Also moves, if possible, the DATA area down into the internal
10080         ram so more space is available.
10081
10082         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10083         sflag.
10084
10085         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10086         not bytes.  Function summary() which creates a memory usage summary
10087         file with extension .mem.  Reports of overlaping stack and small stack
10088         size.  If the space for the stack is less than 16 bytes aslink trows a
10089         warning.
10090
10091         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10092         the 8051.  Option 'y' for memory summary output file.
10093
10094         Changes to sdcc (All the changes are marked with 'JCF'):
10095
10096         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10097
10098         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10099         overlaying area for it (uses RegBankUsed[4]).
10100
10101         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10102         bank zero as used by default.  By default aslink locates the stack
10103         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10104         the creation of the .mem file.  Delegates the allocation of data area
10105         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10106         the begining of the stack area to aslink.
10107
10108         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10109         glue() in SDCCglue.c creates an area for it.
10110
10111 2002-09-03  Borut Razem <borut.razem AT siol.net>
10112         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10113         sdcc/src/pic/glue.c:
10114         introduced atexit() handler for teporay files removal in case of
10115         errors, assertions, ...
10116
10117 2002-08-29  Borut Razem <borut.razem AT siol.net>
10118         * sdcc/support/cpp2/auto-host_vc_in.h:
10119         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10120         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10121         Maybe there is a similar problem with BORLANDC? It should be checked!
10122
10123         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10124         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10125         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10126         was not executed, and the compiler (cl) launched a warning:
10127         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10128
10129 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10130         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10131
10132 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10133         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10134
10135         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10136           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10137           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10138           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10139           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10140           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10141           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10142         - added Release configuration in VS projects
10143         - review of compiler an linker options
10144         - VC .exe files are generated in bin_vc directory, not to interfere
10145           with binaries generated from other projects (cygwin, mingw, bcc ...)
10146
10147         * sdcc/src/yacc.dsp: added
10148
10149         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10150         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10151         and insert the version number definitions from .version
10152
10153         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10154
10155         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10156         added - genarate auto-host.h using auto-host_vc_in.h as template
10157
10158         * sdcc/sdcc_vc.h,
10159         removed from CVS, generated automatically
10160
10161 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10162         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10163
10164 2002-08-11  Borut Razem <borut.razem AT siol.net>
10165         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10166
10167 2002-08-10  Borut Razem <borut.razem AT siol.net>
10168         * src/SDCCmain.c (main):
10169         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10170         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10171         The consequence was that some temporary files were not removed.
10172
10173         * src/SDCCglue.c:
10174         unification of code in functions tempfilename() and tempfile():
10175         function tempnam() is defined in Visual Studio 6.0 and .NET
10176
10177         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10178
10179         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10180           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10181         - removed compiler command line option /WX: Treats all warnings as errors
10182         - update a list of source files, included into the project
10183
10184         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10185           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10186         changed project type to Generic Project so that can be correcly converted to VS.NET project
10187
10188         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10189
10190         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10191
10192         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10193
10194         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10195         added return 0 statements after assert() to make compiler happy
10196
10197         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10198         added newline in the def file to keep MSC compiler satisfied
10199
10200         * sdcc/src/z80/gen.c:
10201         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10202           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10203         - solved MSC error in function aopDump()
10204
10205         * sdcc_vc.h: define PREFIX as "\\sdcc"
10206
10207 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10208         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10209
10210 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10211         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10212         - Rewrote the register banking algorithm.
10213         - Added pCode live-range analysis to registers (for now, only non-used and
10214         singly-used registers optimized away)
10215
10216         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10217
10218         * 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.
10219
10220 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10221         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10222
10223 2002-04-22  Michael Hope  <michaelh AT vroom>
10224
10225         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10226
10227         * configure.in (DD_COPT): Added include support required for gbdk.
10228
10229         * .version: Bumped version number just to increase it.
10230
10231         * src/SDCCmain.c: Added -nostdinc to the default options.
10232
10233 2002-04-15  Michael Hope  <michaelh AT vroom>
10234
10235         * device/lib/z80/printf.c (sprintf): Added.
10236
10237         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10238
10239         * src/z80/peeph.def: Added transpose redundent load rule.
10240
10241         * src/z80/main.c: Added force callee saves for jaune.
10242
10243         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10244
10245         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10246
10247 2002-03-28  Johan Knol  <johan AT balder>
10248
10249         * src/SDCCval.c: fixed bug #532436
10250
10251 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10252         * /src/port.h:
10253         Added "char *Processor" field to the port structure.
10254
10255         * /src/SDCCmain.c:
10256         Added -p option. Allows port dependent processor to be specified.
10257
10258         * all ports:
10259         Initialized the new field char *Processor field to NULL in all ports
10260
10261         * /src/pic/*:
10262         Compiler generated registers for interrupt context saving
10263         were not getting allocated.
10264
10265 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10266
10267         * /src/SDCCast.c:
10268         Fixed left shift. Will promote the left side of a left shift
10269         if a) left shifting more than size of operand or b) when assigned
10270         to something size > size of left side
10271
10272 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10273         * src/pic/*
10274         tons of changes. Register allocation has been
10275         rewritten. Added customization for the various PICs. Flow
10276         analysis is restructured. ...
10277
10278         * src/pic/device.h:
10279         Added
10280
10281         * src/pic/device.c:
10282         Added. device.c is a PIC port hack to accomodate variations
10283         in PIC devices.
10284
10285 2002-03-13  Michael Hope  <michaelh AT vroom>
10286
10287         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10288
10289 2002-03-04  johanknol  <johanknol AT manik>
10290
10291         * /src/SDCCval.c: fixed
10292
10293         const unsigned char arr[][2] = { { 0, 1 } };
10294         t18.c:1: error: Initializer element is not constant
10295
10296 2002-03-04  bela  <bela AT manik>
10297
10298         * /device/include/mcs51reg.h:
10299         ds89c420 register definition update
10300
10301 2002-03-03    <johan AT FRIJA>
10302
10303         * support/Util/SDCCerr.c: did something, but don't no why anymore
10304
10305         * support/regression/tests/bug-524691.c: made it a little less shy
10306
10307         * src/SDCCast.c (decorateType): fixed bug #524697
10308
10309         * src/SDCCast.c: made some lineno improvements
10310
10311         * src/SDCCval.c (getNelements): changed warning to error
10312
10313         * src/SDCCglue.c (printIvalArray): changed warning to error
10314
10315         * src/SDCCicode.c: fixed a warning for mingw
10316
10317         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10318
10319         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10320
10321 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10322
10323         * src/ds390/peeph.def:
10324         Added some more peephole rules
10325
10326         * src/ds390/gen.c: Various fixes & enhancements
10327
10328         * src/SDCClrange.c, src/SDCClrange.h:
10329         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10330
10331         * src/ds390/ralloc.c:
10332         various fixes & enhancements (ds390) specific
10333
10334         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10335         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10336         from rallocs.
10337
10338         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10339
10340 2002-03-02    <johan AT FRIJA>
10341
10342         * src/SDCCast.c (decorateType): fixed bug #524708
10343
10344         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10345
10346         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10347
10348 2002-03-01  Michael Hope  <michaelh AT vroom>
10349
10350         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10351
10352         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10353
10354 2002-03-01    <johan AT FRIJA>
10355
10356         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10357
10358         * src/SDCCast.c (decorateType): fixed bug #524209
10359
10360         * src/SDCCval.c (valNot): fixed bug #524195
10361
10362 2002-02-26    <johan AT balder>
10363
10364         * src/xa51/gen.c: fixed a warning
10365
10366         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10367
10368         * src/SDCCast.c (decorateType): fixed bug #522534
10369
10370 2002-02-23    <johan AT balder>
10371
10372         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10373
10374 2002-02-22    <johan AT balder>
10375
10376         * src/SDCCast.c: fixed bug #514865
10377
10378         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10379
10380 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10381
10382         * sdcc/src/SDCCloop.c:
10383         Previous fix was not good. basic blocks that have "break" or "return" are
10384         not really partof a loop , but live ranges used in these blocks should
10385         be live thru the entire loop, so set partOfLoop but don't add them to
10386         loop region
10387
10388 2002-02-21    <johan AT FRIJA>
10389
10390         * src/SDCCcse.c: fixed bug #514308
10391
10392 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10393
10394         * src/SDCCloop.c:
10395         Fixed BUG #519583. If a conditional block ended in a return/break
10396         statement inside a loop, it was not being considered part of the loop.
10397
10398         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10399
10400 2002-02-10  Karl Bongers <karl AT turbobit.com>
10401
10402         * debugger/*:
10403         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10404         with lots of comments and notes.
10405
10406         * device/examples/test2.c:
10407         Fix bug, "red" variable not being initialized(compiler complained).
10408
10409         * device/examples/Makefile, examples/test3.c:
10410         Add Makefile in device/examples folder, compiles test3.c
10411         for use as a multiple module SDCDB test case.
10412
10413         * sim/ucsim/cmd.src/cmdset.cc:
10414         Took out debug printfs in ucsim "next" command.
10415
10416         * sim/ucsim/xa.src:
10417         Karl and Johan start ucsim XA support.  Most dissassembly working,
10418         about 75% emulation done(plenty of work remaining).
10419
10420         * sim/ucsim/z80.src:
10421         Add Z80 support to ucsim, add test-ucz80 regression test,
10422         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10423         Notice z80 compiler fails on examples/test3.c/crc code.
10424
10425 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10426
10427         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10428         Added support for --parms-in-bank1
10429
10430         * src/ds390/peeph.def:
10431         added a few more peephole optimzations
10432
10433         * src/ds390/main.c:
10434         1) added __builtin_inp & __builtin_outp used to read in data of given length
10435            from a memory mapped port
10436         2) added __builtin_memcmp
10437         3) added __builtin_swapw swap bytes of a short
10438
10439         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10440         1) handle multiple send & receives from register bank1
10441         2) ralloc can now allocate DPTR1 to some liveRanges
10442
10443         * src/SDCCsymt.c, src/SDCCsymt.h:
10444         changes to handle multiple sends & receives
10445
10446         * src/SDCCptropt.h:
10447         added some pointer arithmetic optimization
10448
10449         * src/SDCCptropt.c:
10450         added some pointer arithmetic optimizations but not stable yet so not
10451         called from anywhere (will get this working shortly)
10452
10453         * src/SDCCopt.c: fixed for multiple sends & receives
10454
10455         * src/SDCCmain.c:
10456         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10457         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10458            set preprocessor defines (depending on options)
10459
10460         * src/SDCCicode.c, src/SDCCicode.h:
10461         changes made to handle multiple sends & receives
10462
10463         * src/SDCCglobl.h:
10464         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10465
10466         * src/SDCCcse.c, src/SDCCcse.h:
10467         added function findbackward def (to be used in upcoming optimization)
10468
10469         * src/SDCCcflow.c, src/SDCCcflow.h:
10470         added function returnAtEnd - to determine if a basic block terminates with
10471         a RETURN iCode
10472
10473         * src/SDCCast.c, src/SDCCast.h:
10474         added option parms-in-bank1
10475
10476         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10477         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10478         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10479         adjusted for --parms-in-bank1 option
10480
10481         * device/include/string.h:
10482         donot redefine "reentrant" keyword
10483
10484         * device/include/ds80c390.h: Added some more SFRs
10485
10486 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10487
10488         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10489
10490 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10491
10492         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10493
10494 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10495
10496         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10497
10498 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10499
10500         * Added --xram-movc option
10501
10502 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10503
10504         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10505
10506 2002-01-11  Johan Knol
10507
10508         * Added math lib of Jesus Calvino-Fraga
10509
10510 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10511
10512         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10513         * support/regression/Makefile: new target test-mcs51-stack-auto
10514         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10515
10516 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10517
10518         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10519
10520 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10521
10522         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10523
10524 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10525
10526         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10527
10528         * src/SDCCglue.h: add definition for printIvalChar()
10529
10530 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10531
10532         * src/SDCCast.c: fix #498138 by Johan
10533
10534         * src/SDCCglue.c: fix #498138 by Johan
10535
10536 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10537
10538         * support/regression/Makefile: fix clean
10539
10540         * support/regression/ports/ds390/support.c: fix transmission of last character
10541
10542 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10543
10544         * /sdcc/src/ds390/gen.c:
10545         a) improved computing address of stack variable
10546         b) took out some #if 0 code
10547         c) improved parmBytes adjustment
10548         d) improved genPlusIncr & genMinusIncr
10549         e) genCmp could generate bad code (when left assigned to DPTR)
10550         f) Fixed bug in hasInc
10551
10552         * /sdcc/src/ds390/ralloc.c:
10553         a) packRegsForSupport could mess up live information (Fixed)
10554         b) packRegsDPTRuse could be incorrect for left & right shift
10555
10556         * /sdcc/src/mcs51/ralloc.c:
10557         packRegsForSupport could mess up the live information (Fixed)
10558
10559         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10560
10561         * /sdcc/src/SDCCast.c:
10562         can reverse a loop even if function call is present as long
10563         as the loop control variable is local & is not passed as parameter
10564
10565 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10566
10567         * /sdcc/ChangeLog: *** empty log message ***
10568
10569         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10570         More builtin function additions for TININative
10571
10572         * /sdcc/src/ds390/ralloc.c:
10573         Had broken the regression testsuite
10574
10575         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10576
10577         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10578         Added funcattr hasStackParms will be set for reentrant functions when there
10579         are paramteres on the stack, this helps in minimizing frame pointer generation
10580         typeFromStr can handle function pointers now
10581
10582         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10583         *** empty log message ***
10584
10585 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10586
10587         * /src/ds390/gen.c, /src/ds390/main.c:
10588         More builtin function additions for TININative
10589
10590         * /src/ds390/ralloc.c:
10591         Had broken the regression testsuite
10592
10593         * /src/SDCCast.c: Fixed a bug in dumptree
10594
10595         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10596         Added funcattr hasStackParms will be set for reentrant functions when there
10597         are paramteres on the stack, this helps in minimizing frame pointer generation
10598         typeFromStr can handle function pointers now
10599
10600         * /doc/builtins.txt, /doc/TININative.txt:
10601         *** empty log message ***
10602
10603
10604 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10605
10606         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10607         ALPHA version for -mTININative
10608
10609         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10610         updated to reflect changes in the port structure
10611
10612         * /src/port.h:
10613         added function do_assemble (similar to do_link) if non-null this function
10614         will be called to do assembly (-mTININative) requires a multi command
10615         assembly
10616         added function genAssemblerEnd will be called to generate assembler Epilogue
10617
10618         * /src/SDCCsymt.c:
10619         added _JavaNative to debug info printing
10620
10621         * /src/SDCCmain.c: added option --tini-libid
10622         added port->do_assemble function (-mTININative) has a multi command assemble
10623
10624         * /src/SDCCglue.c: Disabled "constExpr" check
10625         added port->genAssemblerEnd function
10626
10627         * /src/SDCCglobl.h: Added option --tini-libid value
10628
10629         * /src/SDCCast.h:
10630         tookout optimizeCompare from the header (has no external references)
10631
10632         * /src/SDCCast.c: made one more function "static"
10633
10634 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10635
10636         * src/z80/mappings.i: Added z80asm support.
10637
10638         * src/z80/main.c: Added z80asm support on --asm=z80asm
10639
10640         * src/z80/gen.c: Fixed asm portability issues.
10641
10642         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10643
10644         * src/SDCCglue.c (printExterns): Added global/extern split.
10645
10646 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10647
10648         * support/regression/Makefile: added test for mcs51 model large
10649
10650         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10651
10652         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10653
10654 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10655
10656         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10657
10658 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10659
10660         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10661
10662         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10663
10664 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10665
10666         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10667
10668         * support/regression/tests/simplefloat.c: Port to mcs51.
10669
10670 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10671         * support/regression/tests/bug-485362.c: Added.
10672
10673         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10674
10675         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10676
10677         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10678
10679         * src/z80/gen.c (aopDump): Added a dump function.
10680
10681 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10682         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10683
10684         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10685
10686         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10687
10688         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10689
10690         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10691
10692         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10693
10694         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10695
10696         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10697
10698         * support/regression/ports/ds390/support.c: Use tinibios.
10699
10700         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10701
10702 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10703
10704         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10705         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10706
10707         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10708
10709         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10710
10711 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10712
10713         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10714
10715         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10716         (packRegsForIYUse): Created and optimised.
10717
10718 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10719
10720         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10721 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10722
10723         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10724
10725         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10726
10727         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10728
10729 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10730
10731         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10732
10733         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10734
10735 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10736
10737         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10738
10739         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10740
10741         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10742
10743 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10744
10745         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10746         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10747         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10748
10749         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10750
10751         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10752         (genNotFloat): Added.
10753         (genUminusFloat): Added.
10754
10755         * device/lib/z80/Makefile: Added floating pt stubs.
10756
10757         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10758
10759         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10760
10761         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10762
10763 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10764
10765         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10766
10767         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10768
10769         * sdcc/support/regression/Makefile: Add port ds390.
10770
10771         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10772
10773         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10774
10775         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10776
10777         * sdcc/support/regression/ports/ds390/support.c: Added.
10778
10779         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10780
10781         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10782
10783         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10784
10785 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10786
10787         * device/include/malloc.h: Added z80 and gbz80 support.
10788
10789         * device/lib/gbz80/heap.s: Added.
10790
10791         * device/lib/z80/heap.s: Added.
10792
10793         * device/lib/malloc.c: Added z80 and gbz80 support.
10794
10795         * support/regression/tests/malloc.c (testMalloc): Added.
10796
10797         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10798
10799         * support/regression/tests/bug-478094.c: Added.
10800
10801         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10802
10803 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10804
10805         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10806
10807         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10808
10809         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10810
10811         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10812
10813         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10814
10815 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10816
10817         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10818
10819 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10820
10821         * support/regression/tests/bug-477927.c: Added.
10822
10823         * src/z80/peeph.def: Added minor rules.
10824
10825         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10826
10827         * src/z80/peeph.def: Added jump optimisation modification.
10828
10829 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10830
10831         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10832
10833 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10834
10835         * support/regression/tests/funptrs.c: Added.
10836
10837 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10838
10839         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10840
10841 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10842
10843         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10844
10845         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10846
10847         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10848         (movLeft2ResultLong): Created.
10849
10850         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10851         (joinPushes): Added.  Joins two char pushes into a word push.
10852
10853 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10854
10855         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10856
10857         * support/makebin/Makefile (install): Added creation of dest dir.
10858
10859 2001-10-24 Karl Bongers <karl AT turbobit.com>
10860
10861         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10862
10863 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10864
10865         * src/z80/ralloc.c: Turned off faulty pack for one use.
10866
10867         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10868
10869         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10870
10871 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10872
10873         * support/regression/Makefile: Improved clean
10874
10875         * support/regression/ports/gbz80/spec.mk: Added clean
10876
10877         * support/regression/ports/host/spec.mk: Added clean
10878
10879         * support/regression/ports/z80/spec.mk: Added clean
10880
10881         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10882
10883         * support/regression/ports/mcs51/timeout.c: little improvements
10884
10885 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10886
10887         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10888
10889         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10890
10891         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10892
10893 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10894
10895         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10896
10897         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10898
10899 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10900         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10901
10902         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10903
10904         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10905
10906         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10907
10908         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10909
10910         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10911
10912         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10913
10914         * support/regression/tests/longor.c: Added.
10915
10916 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10917
10918         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10919
10920         * as/mcs51/aslink.h: define PATH_MAX
10921
10922         * as/mcs51/asm.h: define PATH_MAX
10923
10924         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10925
10926         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10927
10928         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10929
10930         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10931
10932         * src/SDCCglobl.h: define PATH_MAX
10933
10934         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10935
10936         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10937
10938 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10939
10940         * src/z80/gen.c (gencjneshort): Fixed
10941
10942         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10943
10944 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10945
10946         * support/regression/tests/bug-469671.c: Added.
10947
10948         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10949
10950 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10951
10952         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10953
10954         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10955
10956 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10957
10958         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10959
10960         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10961
10962         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10963
10964         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10965
10966         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10967
10968         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10969
10970         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10971
10972 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10973
10974         * 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.
10975
10976         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10977
10978         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10979
10980 2001-10-07    <johan AT FRIJA>
10981
10982         * device/lib/gets.c (gets): fixed the return value.
10983
10984 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10985         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10986
10987         * 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.
10988
10989         * 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.
10990
10991         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10992
10993         * src/pic/gen.c: Removed Safe_strdup.
10994
10995         * configure.in: Added option to enable libgc support.
10996
10997         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10998         (bitVectUnion): Optimised.
10999         (bitVectIntersect): Optimised.
11000         (bitVectBitsInCommon): Optimised.
11001         (bitVectCplAnd): Optimised.
11002
11003         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11004
11005 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11006
11007         * src/SDCCmain.c: distinguish between assembler debug and plain options
11008
11009         * src/avr/main.c:   remove standard assembler options
11010
11011         * src/ds390/main.c: remove standard assembler options
11012
11013         * src/mcs51/main.c: remove standard assembler options
11014
11015         * src/port.h: removed "PENDING" comment
11016
11017 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11018
11019         * src/device/lib/_mulint.c  : new, with assember functions
11020
11021         * src/device/lib/_mullong.c : new, with assember functions
11022
11023         * src/device/lib/_divuint.c : with assember functions
11024
11025         * src/device/lib/_divsint.c : with assember functions
11026
11027         * src/device/lib/_divulong.c: with assember functions
11028
11029         * src/device/lib/_divslong.c: with assember functions
11030
11031         * src/device/lib/_moduint.c : with assember functions
11032
11033         * src/device/lib/_modsint.c : with assember functions
11034
11035         * src/device/lib/_modulong.c: with assember functions
11036
11037         * src/device/lib/_modslong.c: with assember functions
11038
11039         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11040
11041         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11042
11043         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11044                                       replaced _mululong.c and _mulslong.c by _mullong.c
11045
11046 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11047
11048         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11049
11050 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11051
11052         * src/SDCCglue.c: test, if win32api is available for MINGW
11053
11054 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11055
11056         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11057         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11058         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11059         * support/regression/ports/host/spec.mk: removed GENERIC
11060         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11061         * support/regression/ports/z80/spec.mk: removed GENERIC
11062
11063 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11064
11065         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11066
11067         * support/regression/tests/bug-467035.c: Created.
11068
11069 2001-10-01    <johan AT FRIJA>
11070
11071         * src/SDCC.y: fixed bug #466586 part 1
11072
11073 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11074
11075         * SDCCicode.c: z80 has no generic pointers
11076         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11077
11078 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11079
11080         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11081
11082 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11083
11084         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11085
11086         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11087
11088 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11089
11090         * configure.in: Fixed up so that ucsim is only configured once.
11091
11092         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11093
11094         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11095         (getPathDifference): As above.
11096
11097         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11098
11099         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11100
11101 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11102         * .version: Updated to 2.3.1
11103
11104         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11105         Added copyright header.
11106
11107         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11108         (assemble): Added support for macro based assembler commands.
11109         (linkEdit): Added support for macro based linker commands.
11110         (preProcess): Changed the pre-processor to use macros.
11111         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11112         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11113
11114         * device/lib/z80/crt0.s: Added module name for debugging.
11115
11116 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11117
11118         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11119
11120         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11121
11122         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11123
11124         * src/Makefile.in: Added SDCCmacro and SDCCutil
11125
11126 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11127
11128         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11129
11130 2001-09-16    <johan AT FRIJA>
11131
11132         * 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.
11133
11134 2001-09-15    <johan AT FRIJA>
11135
11136         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11137         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11138
11139 2001-09-11    <johan AT FRIJA>
11140
11141         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11142
11143 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11144
11145         * support/regression/tests/bug-460444.c: Added test case.
11146
11147         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11148         (genCast): Added justification for all of the asserts.
11149
11150 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11151
11152         * support/regression/support.c: _xdata replaced by xdata
11153
11154         * support/regression/spec.mk: removed _generic
11155
11156 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11157
11158         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11159
11160         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11161         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11162
11163         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11164
11165         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11166
11167         * support/regression/tests/bug-460010.c: Added test case.
11168
11169         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11170
11171 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11172
11173         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11174
11175         * support/regression/testfwk.c: removed workaround for bug #436344
11176
11177         * support/regression/tests/bp.c: use less memory with mcs51
11178
11179         * support/regression/tests/bug-441448.c: use less memory
11180
11181         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11182
11183         * support/regression/collate-results.py: typo
11184
11185 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11186
11187         * support/regression/tests/fetchoverlap.c: Added new test case.
11188
11189         * support/regression/tests/bp.c: Added new test case.
11190
11191         * support/regression/tests/bug-448984.c: Added new test case.
11192
11193         * support/regression/tests/pow2shifts.c: Added new test case.
11194
11195         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11196         (genlshTwo): Fixed right shift for count > 8.
11197
11198         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11199
11200 2001-09-08    <johan AT FRIJA>
11201
11202         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11203
11204 2001-09-07    <johan AT FRIJA>
11205
11206         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11207
11208         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11209
11210 2001-09-06    <johan AT FRIJA>
11211
11212         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11213         * bernhard noted me at this: "() equals to (void)" (1.38)
11214
11215 2001-09-05    <johan AT FRIJA>
11216
11217         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11218
11219 2001-09-04    <johan AT FRIJA>
11220
11221         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11222
11223
11224 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11225
11226         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11227
11228 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11229
11230         * link/z80/aslink.h: Fixed path for PATH_MAX
11231
11232 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11233
11234         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11235
11236         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11237
11238         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11239
11240         * 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.
11241
11242 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11243
11244         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11245         (genCmp): Fixed up genCmp for the GB with longs.
11246
11247         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11248
11249         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11250
11251         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11252
11253         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11254
11255 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11256
11257         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11258
11259 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11260
11261         * 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.
11262
11263         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11264
11265 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11266
11267         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11268
11269         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11270
11271 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11272
11273   * sim/ucsim/configure:    little improvement of Cygwin-detection
11274   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11275   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11276   * support/regression/tests/bug-221100.c: small changes for mcs51
11277   * support/regression/tests/bug-221168.c: small changes for mcs51
11278   * support/regression/tests/bug-227710.c: small changes for mcs51
11279   * support/regression/tests/staticinit.c: small changes for mcs51
11280   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11281   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11282   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11283
11284 $Revision$